Examples of BBOX


Examples of org.geomajas.geometry.Bbox

   *
   * @throws Exception
   */
  @Test
  public void transformBboxOverlappingTest() throws Exception {
    Bbox bbox = new Bbox(51, 5, 10, 10);
    Bbox transformed1 = geoService.transform(bbox, LONLAT, LAMBERT72);
    // we expect the same result if we transform the clipped part
    Bbox bboxClipped = new Bbox(51, 5, 6, 4);
    Bbox transformed2 = geoService.transform(bboxClipped, LONLAT, LAMBERT72);

    Assert.assertEquals(transformed1.getX(), transformed2.getX(), DELTA);
    Assert.assertEquals(transformed1.getY(), transformed2.getY(), DELTA);
    Assert.assertEquals(transformed1.getMaxX(), transformed2.getMaxX(), DELTA);
    Assert.assertEquals(transformed1.getMaxY(), transformed2.getMaxY(), DELTA);
  }
View Full Code Here

Examples of org.geomajas.geometry.Bbox

    geo.setLayerType(LayerType.POLYGON);

    ClientMapInfo mapInfo = new ClientMapInfo();
    mapInfo.setCrs("EPSG:4326");
    MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
    mapRasterizingInfo.setBounds(new Bbox(0, 0, 100, 100));
    mapRasterizingInfo.setScale(1);
    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

    DefaultMapContext mapContext = new DefaultMapContext();
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox

    Marker marker = (Marker) paintable;
    context.getVectorContext().drawImage(
        group,
        marker.getId(),
        marker.getImageSrc(),
        new Bbox(marker.getLocation().getX(), marker.getLocation().getY(), marker.getWidth(), marker
            .getHeight()), marker.getStyle());
  }
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox

    return getClass().getName();
  }

  public void paint(Paintable paintable, Object group, MapContext context) {
    context.getVectorContext().drawImage(group, getId(), imageSrc,
        new Bbox(transformed.getX(), transformed.getY(), width, height), style);
  }
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox

    IButton bboxBTN = new IButton(I18nProvider.getSampleMessages().navigationBtnBbox());
    bboxBTN.setWidth100();
    bboxBTN.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getMapModel().getMapView().applyBounds(new Bbox(1200000, 4600000, 1400000, 1400000),
            ZoomOption.EXACT);
      }
    });

    // Create a button that zooms out:
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox

    button5.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getVectorContext().drawGroup(map.getGroup(RenderGroup.SCREEN), group2);
        ShapeStyle style = new ShapeStyle("#337788", 0.5f, "#337766", 1, 2);
        map.getVectorContext().drawRectangle(group2, "rectangle", new Bbox(50, 200, 200, 50), style);
      }
    });
    button5.setWidth100();
    column2.addMember(button5);

    // Button6: Draw Image
    IButton button6 = new IButton(I18nProvider.getSampleMessages().renderingDrawImage());
    button6.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getVectorContext().drawGroup(map.getGroup(RenderGroup.SCREEN), group1);
        Image image = new Image("image");
        image.setHref(Geomajas.getIsomorphicDir() + "geomajas/example/images/smile.png");
        image.setBounds(new Bbox(250, 70, 48, 48));
        image.setStyle(new PictureStyle(0.5));
        // map.render(image, "all");
        map.getVectorContext().drawImage(group1, image.getId(), image.getHref(), image.getBounds(),
            (PictureStyle) image.getStyle());
      }
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox

      return new MaxBoundsToggleSample();
    }
  };

  public Canvas getViewPanel() {
    final Bbox belgiumBounds = new Bbox(135977.5229612165, 6242678.930647222, 679887.6148060877, 625824.2623034349);

    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();
    layout.setMembersMargin(10);
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox

    IButton button1 = new IButton(I18nProvider.getSampleMessages().screenWorldBTNScreen());
    button1.setWidth("50%");

    final Image screenImage = new Image("imageInScreenSpace");
    screenImage.setHref(Geomajas.getIsomorphicDir() + "geomajas/example/images/smile.png");
    screenImage.setBounds(new Bbox(60, 60, 48, 48)); // Pixel coordinates
    screenImage.setStyle(new PictureStyle(0.6));

    button1.addClickHandler(new ClickHandler() {

      // Draw an image in screen space:
      public void onClick(ClickEvent event) {
        map.render(screenImage, RenderGroup.SCREEN, RenderStatus.ALL);
      }
    });
    buttonLayout.addMember(button1);

    IButton button2 = new IButton(I18nProvider.getSampleMessages().screenWorldBTNWorld());
    button2.setWidth("50%");

    // An image
    final Image worldImage = new Image("imageInWorldSpace");
    worldImage.setHref(Geomajas.getIsomorphicDir() + "geomajas/example/images/smile.png");
    worldImage.setBounds(new Bbox(-2000000, -2000000, 4000000, 4000000)); // Mercator coordinates
    worldImage.setStyle(new PictureStyle(0.8));

    // And some geometries
    final GfxGeometry worldGeometry = new GfxGeometry("MultiPolygonInWorldSpace");
    final GeometryFactory gf = new GeometryFactory(map.getMapModel().getSrid(), map.getMapModel().getPrecision());
    Polygon p1 = gf.createPolygon(gf.createLinearRing(new Bbox(10000000d, 1000d, 1000000d, 1000000d)), null);
    Polygon p2 = gf.createPolygon(gf.createLinearRing(new Bbox(12000000d, 1000d, 500000d, 500000d)), null);
    MultiPolygon mp = gf.createMultiPolygon(new Polygon[] {p1, p2});
    worldGeometry.setStyle(new ShapeStyle("#FF0000", 0.5f, "#FF0000", 1.0f, 2));
    worldGeometry.setGeometry(mp);

    final GfxGeometry worldGeometry2 = new GfxGeometry("MultiPointInWorldSpace");
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox

  };

  public Canvas getViewPanel() {

    // Drawing information:
    final Bbox rectangle = new Bbox(100, 100, 300, 100);
    final ShapeStyle style = new ShapeStyle("#66AA00", 0.7f, "#667700", 0.8f, 3);
    final ShapeStyle hoverStyle = new ShapeStyle("#66AA00", 0.5f, "#667700", 0.7f, 3);

    VLayout layout = new VLayout();
    layout.setWidth100();
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.Bbox

  }

  public void onMapViewChanged(MapViewChangedEvent event) {
    // assume google coordinates here
    if (googleMap != null) {
      Bbox latLon = convertToLatLon(event.getBounds());
      fitGoogleMapBounds(googleMap, latLon.getX(), latLon.getY(), latLon.getMaxX(), latLon.getMaxY());
    }
  }
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.