560
Views
5
Comments
[Google Maps Web] Example of the new Polyline function
Question
google-maps-web
Web icon
Forge asset by Labs

Is it possible to provide an example of the new polyline function working?

im putting a Coordinate List throught JSON Serialize, and then inputting that into the AddPolylineToMap but it does not work, how should i do it?


cheers,


Miguel Pereira

2018-05-04 06-53-11
Steve Collins

Hi Miguel,

Here's an example screenshot of the JSON input to the CoordinatesJSON parameter to AddPolylineToMap.



You can view the output here

https://stevecollins-demos-dev.outsystemscloud.com/Waypoints/


UserImage.jpg
Miguel Pereira

Steve Collins wrote:

Hi Miguel,

Here's an example screenshot of the JSON input to the CoordinatesJSON parameter to AddPolylineToMap.



You can view the output here

https://stevecollins-demos-dev.outsystemscloud.com/Waypoints/


i have it working if i input the string by hand(as a test), but i can't by using the serialize on a Coordinate List Local Variable


the Output of the serialize in this instance is:


[{"Lat":38.710327,"Lng":-9.176256},{"Lat":38.713240,"Lng":-9.173874},{"Lat":38.704123,"Lng":-9.168145}]


the API key and configurations are all good since i've been using this component for a few months now with no problems


2018-05-04 06-53-11
Steve Collins

Also, make sure you have a correctly configured API Key in your Google Map that you are associating the AddPolylineToMap action to

https://developers.google.com/maps/documentation/javascript/get-api-key

and then make sure that the Google Maps JavaScript API is enabled in the Google API console

https://console.developers.google.com/apis/

Click on Library on the left to search and enable APIs or go straight to

https://console.developers.google.com/apis/library


UserImage.jpg
Ville Rontti

I have the same issue, if I use Google Map "Coordinate" structure, the json does not have "Coordinate" -element in it and polyline cannot be drawn.

UserImage.jpg
Guilherme Vinicyus Batista

Hello guys!

I was with the same problem. What I did was create a list of records where each record was the type coordinate (the structure provided by Google). After it, I use this list as the data for JSON Serialize. Finally, my input for the Polylines are: MapId (you get from the widget) and the JSON the output of JSON Serialize.

I hope to help you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.