* Control Layer
*/
YelpLocalSearchProvider localSearchProvider = new YelpLocalSearchProvider("VJYMvEAOfkqDeyHh4C9gTg");
localSearchProvider.setTimeout(10000);
MapOverlayManager mapOverlayManager = new MapOverlayManager();
MinTransitTimeResultHandler minTransitTimeHandler = new MinTransitTimeResultHandler();
minTransitTimeHandler.setMapOverlayManager(mapOverlayManager);
// minTransitTimeHandler.setTimedRegionModel(timedRegionModel);
minTransitTimeHandler.setTimedPolygonModel(timedPolygonModel);
OneBusAwayStandardControlImpl control = new OneBusAwayStandardControlImpl();
control.setStateEvents(stateEvents);
// Models
control.setQueryModel(queryModel);
control.setResultsModel(resultsModel);
control.setFilteredResultsModel(filteredResultsModel);
control.setPagedResultsModel(pagedResultsModel);
control.setTripPlanModel(tripModel);
// Controls
control.setLocalSearchProvider(localSearchProvider);
control.setMinTransitTimeResultHandler(minTransitTimeHandler);
control.setContextManager(manager);
minTransitTimeHandler.setControl(control);
/**
* View Layer
*/
MapWidget mapWidget = new MapWidget(LatLng.newInstance(47.601533, -122.32933), 11);
mapWidget.addControl(new LargeMapControl());
mapWidget.addControl(new MapTypeControl());
mapWidget.addControl(new ScaleControl());
ColorGradientControl colorGradient = new ColorGradientControl();
mapWidget.addControl(colorGradient);
mapOverlayManager.setMapWidget(mapWidget);
SearchWidget searchWidget = new SearchWidget();
searchWidget.setControl(control);
searchWidget.setMapWidget(mapWidget);