OverviewAllows for users to tap into Google's event handling capabilities and execute a piece of javascript code on a variety of triggers. The variable 'map' can be used to affect the parent map and 'component' can be used to reference the parent component.
Getting Started<ace:gMap id="gMap" style="width: 675px; height: 500px"> <ace:gMapEvent eventType="dragend" scriptToUse="if(Math.abs(map.getCenter().lat())>30||Math.abs(map.getCenter().lng())>20)map.setCenter(new google.maps.LatLng(0,0));"/> </ace:gMap> Attributes
eventType The type of event that you want the script to execute on. The script will execute when the parent component of this tag fires the chosen event. Valid types vary based on parent tag, but can be found under the parent's mention in the google API. scriptToUse The script to be executed when the chosen event is fired. Use the variable 'map' to refer to the parent gMap (a google.maps.Map instance) and 'component' to refer to the Google Maps API Javascript object corresponding to the parent tag. |
gMapEvent
© Copyright 2021 ICEsoft Technologies Canada Corp.