moshen / node-googlemaps

A simple way to query the Google Maps API from Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image binary encoding?

mikepc opened this issue · comments

I'm using staticMap to generate a binary map image.

When I use the following code:

fs.writeFile('testblob.png', mapImage, (err) => {
  if (err) throw err;
  console.log('It\'s saved!');
});

The testblob.png is unreadable. What do I need to do with this binary buffer in order to read it after writing it?

What is mapImage? Could you post a longer example?

I fixed the problem, it was a content encoding issue with s3, I needed to set it to binary.