Examples of MapView


Examples of org.geomajas.gwt.client.map.MapView

    this.zoomFactor = zoomFactor;
  }

  @Override
  public void onMouseUp(MouseUpEvent event) {
    MapView mapView = mapWidget.getMapModel().getMapView();
    WorldViewTransformer transformer = mapView.getWorldViewTransformer();
    Coordinate viewPosition = getScreenPosition(event);
    Coordinate worldPosition = transformer.viewToWorld(viewPosition);
    mapView.setCenterPosition(worldPosition);
    mapView.scale(zoomFactor, MapView.ZoomOption.LEVEL_CHANGE);
  }
View Full Code Here

Examples of org.geomajas.gwt.client.map.MapView

   */
  private void updateMaxExtent() {
    if (targetMap.getMapModel().isInitialized()) {
      Bbox targetMaxBounds = getOverviewMaxBounds();

      MapView mapView = getMapModel().getMapView();

      // Set the maxBounds on this map as well:
      mapView.setMaxBounds(targetMaxBounds.buffer(targetMaxBounds.getWidth()));

      // apply buffer
      if (maxExtentIncreasePercentage > 0) {
        targetMaxBounds = targetMaxBounds
            .buffer(targetMaxBounds.getWidth() * maxExtentIncreasePercentage / 100);
      }

      // Then apply the map extent:
      mapView.applyBounds(targetMaxBounds, MapView.ZoomOption.LEVEL_FIT);
      super.onMapViewChanged(null);

      // Immediately draw or remove the max extent rectangle:
      setDrawTargetMaxExtent(drawTargetMaxExtent);
    }
View Full Code Here

Examples of org.geomajas.gwt.client.map.MapView

  /**
   * Update the rectangle, and perhaps the entire map if needed.
   */
  private void updatePov() {
    MapView mapView = getMapModel().getMapView();
    WorldViewTransformer transformer = new WorldViewTransformer(mapView);
    Bbox targetBox = targetMap.getMapModel().getMapView().getBounds();
    Bbox overviewBox = mapView.getBounds();

    // check if bounds are valid
    if (Double.isNaN(overviewBox.getX())) {
      return;
    }
View Full Code Here

Examples of org.openstreetmap.josm.gui.MapView

    @Override
    public void zoomChanged() {
        if (Main.map == null)
            return;
        MapView mv = Main.map.mapView;
        Bounds bbox = mv.getLatLonBounds(mv.getBounds());

        // Have the user changed view since last time
        if (active && (lastBbox == null || !lastBbox.equals(bbox))) {
            if (task != null) {
                task.cancel();
View Full Code Here

Examples of org.traccar.web.client.view.MapView

    private MapView mapView;

    public MapController(MapHandler mapHandler) {
        this.mapHandler = mapHandler;
        mapView = new MapView(this);
    }
View Full Code Here

Examples of tiled.view.MapView

     *
     * @param filename Image filename to save map render to.
     */
    private void saveMapImage(String filename) {
        final Map currentMap = editor.getCurrentMap();
        final MapView myView = MapView.createViewforMap(currentMap);
        myView.setMode(MapView.PF_NOSPECIAL, true);

        // Take grid and zoom level from the current map view
        final MapView mapView = editor.getMapView();
        myView.setShowGrid(mapView.getShowGrid());
        myView.setZoom(mapView.getZoom());

        final Dimension imgSize = myView.getPreferredSize();

        final int lastDot = filename.lastIndexOf('.');
        if (lastDot == -1) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.