LatLng p = LatLng.newInstance(stop.getLat(), stop.getLon());
MarkerClickHandler clickHandler = getClickHandlerForStop(stop);
// Show some close up stops by default
Marker largerMarker = getStopMarker(stop, p, ESize.LARGE);
largerMarker.addMarkerClickHandler(clickHandler);
addOverlayAtZoom(largerMarker, 17, 20);
stopAndOverlays.addOverlays(largerMarker);
// If we're not showing stops in our current view, it must mean we're in
// route view, so we show the stops more zoomed out
if (!_showStopsInCurrentView) {
Marker mediumMarker = getStopMarker(stop, p, ESize.MEDIUM);
mediumMarker.addMarkerClickHandler(clickHandler);
addOverlayAtZoom(mediumMarker, 16, 17);
Marker smallMarker = getStopMarker(stop, p, ESize.SMALL);
smallMarker.addMarkerClickHandler(clickHandler);
addOverlayAtZoom(smallMarker, 13, 16);
Marker tinyMarker = getStopMarker(stop, p, ESize.TINY);
tinyMarker.addMarkerClickHandler(clickHandler);
addOverlayAtZoom(tinyMarker, 9, 13);
stopAndOverlays.addOverlays(mediumMarker, smallMarker, tinyMarker);
}
if (_selectedStopIds.contains(stop.getId())) {
Marker big = StopIconFactory.getStopSelectionCircle(p, true);
Marker small = StopIconFactory.getStopSelectionCircle(p, false);
addOverlayAtZoom(small, 16, 17);
addOverlayAtZoom(big, 17, 20);
stopAndOverlays.addOverlays(big, small);
}
}