gMapEvent

Version 1 by Arturo Zambrano
on Nov 28, 2014 13:24.


 
compared with
Current by Arturo Zambrano
on Nov 28, 2014 13:59.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

  h2. Overview
  
 Allows 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.
  
 {tip}See the ICEfaces Showcase [Live Demo|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=gMapEventBean] of this component, complete with source code.{tip}
  
 h2. Getting Started
 {code}
  <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>
 {code}
  
 h2. Attributes
 {tip:title=TagLib Documentation}
  
 This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|http://www.icefaces.org/docs/v4_latest/ace/tld/ace/gMapEvent.html].
 {tip}
  
 {panel}
 *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.
 {panel}
 {panel}
 *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.
 {panel}

© Copyright 2018 ICEsoft Technologies Canada Corp.