Skip to content

multiple paths don't work for me #151

@markshapiro

Description

@markshapiro

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions