Package org.geomajas.gwt.client.map.store

Examples of org.geomajas.gwt.client.map.store.VectorLayerStore


  private void onAddClick() {
    List<Geometry> geoms = new ArrayList<Geometry>();
    for (VectorLayer layer : mapWidget.getMapModel().getVectorLayers()) {
      if (layer.isShowing()) {
        VectorLayerStore store = layer.getFeatureStore();
        for (String featureId : layer.getSelectedFeatures()) {
          Feature f = store.getPartialFeature(featureId);
          if (f.isSelected()) {
            geoms.add(f.getGeometry());
          }
        }
      }
View Full Code Here


  private void onZoomClick() {
    Bbox bounds = null;
    for (VectorLayer layer : mapWidget.getMapModel().getVectorLayers()) {
      if (layer.isShowing()) {
        VectorLayerStore store = layer.getFeatureStore();
        for (String featureId : layer.getSelectedFeatures()) {
          Feature f = store.getPartialFeature(featureId);
          if (bounds == null) {
            bounds = f.getGeometry().getBounds();
          } else {
            bounds = bounds.union(f.getGeometry().getBounds());
          }
View Full Code Here

  public void onClick(ClickEvent clickEvent) {
    // get the selected VectorLayer
    Layer<?> selectedLayer = mapWidget.getMapModel().getSelectedLayer();
    if (selectedLayer instanceof VectorLayer) {
      // iterate all features of the selected layer
      VectorLayerStore featureStore = ((VectorLayer) selectedLayer).getFeatureStore();
      featureStore.getFeatures(GeomajasConstant.FEATURE_INCLUDE_GEOMETRY, new LazyLoadCallback() {

        public void execute(List<Feature> features) {
          boolean success = false;
          Bbox selectionBounds = new Bbox(0, 0, 0, 0);
          for (Feature feature : features) {
View Full Code Here

  public void onClick(ClickEvent clickEvent) {
    // get the selected VectorLayer
    Layer<?> selectedLayer = mapWidget.getMapModel().getSelectedLayer();
    if (selectedLayer instanceof VectorLayer) {
      // iterate all features of the selected layer
      VectorLayerStore featureStore = ((VectorLayer) selectedLayer).getFeatureStore();
      featureStore.getFeatures(GeomajasConstant.FEATURE_INCLUDE_GEOMETRY, new LazyLoadCallback() {

        public void execute(List<Feature> response) {
          boolean success = false;
          Bbox selectionBounds = new Bbox(0, 0, 0, 0);
          for (Feature feature : response) {
View Full Code Here

TOP

Related Classes of org.geomajas.gwt.client.map.store.VectorLayerStore

Copyright © 2018 www.massapicom. 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.