jperelli / osm-static-maps

Openstreetmap static maps is a nodejs lib, CLI and server open source inspired on google static map service
http://osm-static-maps.herokuapp.com/
GNU General Public License v2.0
160 stars 52 forks source link

center Parameter is giving Error #6

Closed sameersb closed 4 years ago

sameersb commented 4 years ago

Thanks for the great library!

But when center parameter is passed to the url, it gives error! Please check examples http://osm-static-maps.herokuapp.com/?width=512&height=512&center='0,0' http://osm-static-maps.herokuapp.com/?width=512&height=512&center=0,0

Regards

n1k0 commented 4 years ago

Trying another approach : http://osm-static-maps.herokuapp.com/?center=48.8976,2.2574&zoom=15

Now the server crashes with

Error: TypeError: 2.2574.split is not a function
    at <anonymous>:16:51
jperelli commented 4 years ago

Hi @sameersb, you're welcome. Hi @n1k0. I released a new version 3.4.1 that should fix this issue.

Also @n1k0 note that the point is Lon Lat, so probably you need to switch the numbers http://osm-static-maps.herokuapp.com/?center=2.2574,48.8976&zoom=15

Feel free to reopen if you see the issue again. Thanks for using the package and reporting issues. Also share it! Regards

n1k0 commented 4 years ago

@jperelli thanks, works like a charm now :+1: