Overview
Google Maps Component Plugin provides support for displaying interactive maps, directions, and markers in a SAIL interface.
Pre-requisites:
Can someone paste the sample code for the googleMapsDisplayField() function. I am able to connect to the GMaps and also use the googleMapsDirectionsField() which is pretty straight forward. However, for googleMapsDisplayField. we need to pass the markers eg:
mapMarkers: { name: "MyPoint", content: "", lat: 25.7617, lng: 80.1918 },
Would appreciate if someone already tried this and working could help here.
Thanks in adv.
Regards,
Raghu
You need to wrap your "MyPoint" marker in another set of curly brackets. That parameter is expecting a list of markers since there can be more than one on a single map.
mapMarkers: { { name: "MyPoint", content: "", lat: 25.7617, lng: 80.1918 } }
With a single marker, you will need to set the map center and zoom level. The content parameter is the text shown if you click on the marker. Does the following example work for you?
fn!googleMapsDisplayField( googleMapsApiKey: "YOUR API KEY", mapCenter: { lat: 25.7617, lng: 80.1918 }, mapMarkers: { { name: "MyPoint", content: "", lat: 25.7617, lng: 80.1918 } }, zoomLevel: 10 )
Thanks Andy.. But this still dint resolve. I thin i would need to pass some valid value in content as well..