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

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

Introduction

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

Prototype

String getTitle();

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);//w  w w . j  a va 2  s  .c  o m
    }

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