Example usage for com.google.gwt.maps.client.overlay HasMarker getPosition

List of usage examples for com.google.gwt.maps.client.overlay HasMarker getPosition

Introduction

In this page you can find the example usage for com.google.gwt.maps.client.overlay HasMarker getPosition.

Prototype

HasLatLng getPosition();

Source Link

Usage

From source file:com.mashery.examples.api.client.PopupMapWidget.java

License:Open Source License

public void show(HasMarker marker) {
    HasLatLng position = marker.getPosition();
    double lat = position == null ? 0d : position.getLatitude();
    double lng = position == null ? 0d : position.getLongitude();
    MarkerKey key = new MarkerKey(marker.getTitle(), lat, lng);
    if (!markers.containsKey(key)) {
        marker.setMap(mapWidget.getMap());
        markers.put(key, marker);/*  www.  j a v  a  2  s  .  c  o m*/
    }

    show(position == null ? new LatLng(lat, lng) : position);
}