001    package com.google.gwt.maps.client.events;
002    
003    import com.google.gwt.ajaxloader.client.Properties;
004    import com.google.gwt.ajaxloader.client.Properties.TypeException;
005    import com.google.gwt.maps.client.base.LatLng;
006    
007    /**
008     * This object is returned from various mouse events on the map and overlays, and contains all the fields shown below.
009     * <br><br>
010     * See <a href="https://developers.google.com/maps/documentation/javascript/reference#MouseEvent">MouseEvent API Doc</a>
011     */
012    public class MouseEvent {
013      
014      /**
015       * {@link LatLng}
016       */
017      private LatLng latLng;
018      
019      /**
020       * Create a new MouseEvent from properties of the map event call back
021       * @param properties {@link com.google.gwt.ajaxloader.client.Properties}
022       */
023      public MouseEvent(Properties properties) {
024        parseProperties(properties);
025      }
026    
027      /**
028       * parse the properties for latlng
029       * @param properties
030       */
031      private void parseProperties(Properties properties) {
032        try {
033          latLng = (LatLng) properties.getObject("latLng");
034        } catch (TypeException e) {
035          e.printStackTrace();
036        }
037      }
038      
039      /**
040       * get lat lng
041       * @return {@link LatLng}
042       */
043      public LatLng getLatLng() {
044        return latLng;
045      }
046    
047    }