Create a default {@link FeatureInfoWidget} with a {@link ZoomToObjectAction}
to allow zooming to selected features.

@param mapPresenter The map presenter used by the action(s).
@return A feature info widget with actions.
29
public FeatureInfoWithActions getFeatureInfoWidgetWithActions(MapPresenter mapPresenter) {
		FeatureInfoWithActions widgetWithActions = new FeatureInfoWithActions();
		widgetWithActions.addHasFeature(new ZoomToObjectAction(mapPresenter));

		return widgetWithActions;
	}
220456
@Override
	public Menu getContextMenu() {
		if (menu == null) {
			menu = new Menu();
			menu.addItem(new NewFeatureAction(mapWidget, this));
			menu.addItem(new EditFeatureAction(mapWidget, this));
			menu.addItem(new DeleteFeatureAction(mapWidget, this));
			menu.addItem(new MenuItemSeparator());
			menu.addItem(new DeselectAllAction(mapWidget.getMapModel()));
		}
		return menu;
	}
664450
public boolean onClickDefault(Polygon polygon, MapView mapView, GeoPoint eventPos) {
		polygon.setInfoWindowLocation(eventPos);
		polygon.showInfoWindow();
		return true;
	}
939704
function(layerModel, gmapsMap) {
  var self = this;

  _.bindAll(this, 'featureOut', 'featureOver', 'featureClick');

  var opts = _.clone(layerModel.attributes);

  opts.map =  gmapsMap;

  var // preserve the user's callbacks
  _featureOver  = opts.featureOver,
  _featureOut   = opts.featureOut,
  _featureClick = opts.featureClick;

  opts.featureOver  = function() {
    _featureOver  && _featureOver.apply(this, arguments);
    self.featureOver  && self.featureOver.apply(this, arguments);
  };

  opts.featureOut  = function() {
    _featureOut  && _featureOut.apply(this, arguments);
    self.featureOut  && self.featureOut.apply(this, arguments);
  };

  opts.featureClick  = function() {
    _featureClick  && _featureClick.apply(this, arguments);
    self.featureClick  && self.featureClick.apply(opts, arguments);
  };

  cdb.geo.CartoDBLayerGMaps.call(this, opts);
  cdb.geo.GMapsLayerView.call(this, layerModel, this, gmapsMap);
}
1329279
public void onFeatureSelected(FeatureSelectedEvent event) {
		Feature feature = event.getFeature();
		mapWidget.setController(previousController);
		previousController = null;
		service.start(GeometryConverter.toDto(feature.getGeometry()));

		// Now let the user know:
		if (label != null) {
			label.destroy();
			label = null;
		}

		label = new Label("<p><b>You have selected " + feature.getLabel() + "!</b></p><p>Now continue by drawing a "
				+ "splitting line on the map. This is done by clicking points on the map, ending with a double " +
				"click.</p><p>Finally choose an option in the toolbar (finish, cancel, undo, ...).</p>");
		label.setParentElement(mapWidget);
		label.setShowEdges(true);
		label.setBackgroundColor("#ffffd0");
		label.setPadding(5);
		label.setWidth(350);
		label.setTop(25);
		label.setLeft(-220); // start off screen
		label.setValign(VerticalAlignment.CENTER);
		label.setAlign(Alignment.CENTER);
		label.setAnimateTime(1000); // milliseconds
		label.addClickHandler(new ClickHandler() {

			public void onClick(ClickEvent event) {
				label.destroy();
			}
		});

		label.animateMove(75, 25);
	}
539978
private MapConfiguration createMapConfiguration(ClientMapInfo mapInfo, MapPresenter mapPresenter) {
		MapConfiguration configuration = mapPresenter.getConfiguration();
		configuration.setCrs(mapInfo.getCrs(), mapInfo.getUnitLength());
		configuration.setHintValue(MapConfiguration.INITIAL_BOUNDS, mapInfo.getInitialBounds());
		configuration.setMaxBounds(mapInfo.getMaxBounds());
		configuration.setMinimumResolution(1 / mapInfo.getScaleConfiguration().getMaximumScale().getPixelPerUnit());
		List<Double> resolutions = new ArrayList<Double>();
		for (ScaleInfo scale : mapInfo.getScaleConfiguration().getZoomLevels()) {
			resolutions.add(1 / scale.getPixelPerUnit());
		}
		if (resolutions.size() != 0) {
			configuration.setResolutions(resolutions);
		}
		configuration.setHintValue(MAPINFO, mapInfo);
		return configuration;
	}
944617
public ScreenComponent startEditor(Field fldProperties, boolean bAllowAppending, Map<String,Object> mapKeyDescriptions)
    {
        return null; // TODO add thin impl
    }
46181
protected void createMapViews() {
        mapView = getMapView();
        mapView.getModel().init(this.preferencesFacade);
        mapView.setClickable(true);
        mapView.getMapScaleBar().setVisible(true);
        mapView.setBuiltInZoomControls(hasZoomControls());
        mapView.getMapZoomControls().setAutoHide(isZoomControlsAutoHide());
        mapView.getMapZoomControls().setZoomLevelMin(getZoomLevelMin());
        mapView.getMapZoomControls().setZoomLevelMax(getZoomLevelMax());
    }
285888
public static ToolbarBaseAction getToolbarAction(String key, MapWidget mapWidget) {
		ToolCreator toolCreator = REGISTRY.get(key);
		if (null == toolCreator) {
			return null;
		}
		return toolCreator.createTool(mapWidget);
	}
430116
public static ObjectMapper createMapperWithJaxbAnnotationInspector() {
        ObjectMapper mapper = new ObjectMapper();
        AnnotationIntrospector annotationInspector = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
        mapper.getSerializationConfig().with(annotationInspector);
        return mapper;
    }
609243
@SuppressWarnings("unchecked")
  public static <F> FeatureVectorAdapter<F> featureVectorAdapter(FeatureVector<F> prototype) {
    return (FeatureVectorAdapter<F>) FEATUREVECTORADAPTER;
  }
563694
private MapRasterizingInfo buildMap(MapPresenter mapPresenter) {
		MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
		ViewPort viewPort = mapPresenter.getViewPort();
		mapRasterizingInfo.setBounds(viewPort.getBounds());
		mapRasterizingInfo.setScale(1 / viewPort.getResolution());
		mapRasterizingInfo.setTransparent(true);
		LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
		legendRasterizingInfo.setTitle("Legend");
		FontStyleInfo font = new FontStyleInfo();
		font.applyDefaults();
		legendRasterizingInfo.setFont(font);

		mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo);

		// Support for selection of layer object : create container for info on selected features;
		// store the selections layer per layer
		List<ClientLayerInfo> selectedLayers = new ArrayList<ClientLayerInfo>();
		mapRasterizingInfo.setExtraLayers(selectedLayers);

		ClientMapInfo mapInfo = mapPresenter.getConfiguration().getHintValue(GeomajasServerExtension.MAPINFO);
		mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
		// Note: mapRasterizingInfo at this time is pretty empty (rastering info for
		// layers not yet filled in)
		return mapRasterizingInfo;
	}
402191
public void setMap(Map map) {
		this.map = (MapImpl) map;
		mapWidget = this.map.getMapWidget();
		delegate = new GeometryEditorImpl(mapWidget);
		editingService = new JsGeometryEditService(delegate.getEditService());
		splitService = new JsGeometrySplitService(delegate.getEditService());
		mergeService = new JsGeometryMergeService();
		renderer = new JsGeometryRenderer(delegate.getRenderer());
		styleService = new JsStyleService(delegate.getStyleService());
		snapService = new JsSnapService(this);
	}
164481
@InterfaceAudience.Public
    public boolean setMap(Mapper mapBlock, String version) {
        return setMapReduce(mapBlock, null, version);
    }
456946
public Constituent getMap() {
    if (PTBConstituent_Type.featOkTst && ((PTBConstituent_Type)jcasType).casFeat_map == null)
      jcasType.jcas.throwFeatMissing("map", "de.julielab.jules.types.PTBConstituent");
    return (Constituent)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((PTBConstituent_Type)jcasType).casFeatCode_map)));}
167259
public JComponent addScreenControl(Container parent, Converter fieldInfo)
    {
        JComponent component = this.createScreenComponent(fieldInfo);
        if (component instanceof ScreenComponent)
            if (((ScreenComponent)component).getConverter() != null)
                fieldInfo = (Converter)((ScreenComponent)component).getConverter();
        this.addScreenComponent(parent, fieldInfo, component);
        return component;
    }
131988
public static void putPresenter(@NonNull Activity activity, @NonNull String viewId,
      @NonNull MvpPresenter<? extends MvpView> presenter) {
    if (activity == null) {
      throw new NullPointerException("Activity is null");
    }

    ActivityScopedCache scopedCache = getOrCreateActivityScopedCache(activity);
    scopedCache.putPresenter(viewId, presenter);
  }