-
Notifications
You must be signed in to change notification settings - Fork 140
Description
currently if I specify 2 paths:
path: [
{ points: ['52.52,13.4050', '52.53,13.4050', '52.53,13.4150', '52.52,13.4050'], },
{ points: ['52.52,13.4250', '52.53,13.4250', '52.53,13.4350', '52.52,13.4250'], },
],
it joins the the encoded paths with | and passes in single "path" parameter (&path=<encoded_path_1>|<encoded_path_2>)
this shows the whole world map instead of polygons, but passing both encodings in separate path parameters shows them both polygons correctly.
for example try the current library result url:
https://maps.googleapis.com/maps/api/staticmap?size=500x500&path=enc%3A_yp_IgdypAo%7D%40%3F%3Fo%7D%40n%7D%40%3F%3Fn%7D%40%7Cenc%3A_yp_Iga%7DpAo%7D%40%3F%3Fo%7D%40n%7D%40%3F%3Fn%7D%40&key=
VS separated in 2 path parameters:
https://maps.googleapis.com/maps/api/staticmap?size=500x500&path=enc%3A_yp_IgdypAo%7D%40%3F%3Fo%7D%40n%7D%40%3F%3Fn%7D%40&path=enc%3A_yp_Iga%7DpAo%7D%40%3F%3Fo%7D%40n%7D%40%3F%3Fn%7D%40&key=
it starts working when change code by removing the 2nd join:
node-googlemaps/lib/utils/parsePaths.js
Line 51 in 95d591b
| }).join('|'); |