List of usage examples for com.google.gwt.maps.client.geocode Placemark getState
public final String getState()
From source file:org.maps.client.Maps.java
License:Apache License
private void handleMapClick(LatLng point, Placemark placemark, int zoomLevel) { String shortName = placemark.getState(); String country = placemark.getCountry(); if (country.equalsIgnoreCase("US") || country.equalsIgnoreCase("PR")) { if (shortName == null) { shortName = "PR"; }//from ww w .j ava 2 s. com State state = State.getByShortName(shortName); addStateContent(state); } }
From source file:org.onebusaway.webapp.gwt.where_library.impl.CombinedSearchHandlerImpl.java
License:Apache License
private Place getPlacemarkAsPlace(Placemark mark) { String name = null;// w w w . ja va2s . co m List<String> description = new ArrayList<String>(); if (mark.getStreet() != null) { name = mark.getStreet(); if (mark.getCity() != null) description.add(mark.getCity()); if (mark.getState() != null) description.add(mark.getState()); if (mark.getPostalCode() != null) description.add(mark.getPostalCode()); } else if (mark.getCity() != null) { name = mark.getCity(); if (mark.getState() != null) name += ", " + mark.getState(); } else if (mark.getState() != null) { name = mark.getState(); if (mark.getCounty() != null) description.add(mark.getCountry()); } return new PlaceImpl(name, description, mark.getPoint(), mark.getAccuracy()); }