Package com.gi.server.core.service.mapservice

Examples of com.gi.server.core.service.mapservice.MapServiceInstance


    try {
      MapService mapService = ServiceManager.getMapService(serviceName);

      if (mapService != null) {
        MapLayer mapLayer = null;
        MapServiceInstance instance = (MapServiceInstance) mapService
            .getMapServicePool().checkoutIdleInstance();
        try {
          mapLayer = instance.getMap().getLayer(layerId)
              .getMapLayer();
        } finally {
          if (instance != null) {
            mapService.getMapServicePool().checkinIdelInstance(
                instance);
View Full Code Here


          identifyParam.setGeometry(identifyGeometry);
          identifyParam.setIdentifyType(identifyType);
          identifyParam.setResolution(resolution);
          identifyParam.setTolerance(nTolerance);

          MapServiceInstance instance = (MapServiceInstance) mapService
              .getMapServicePool().checkoutIdleInstance();
          try {
            featureResults = instance.identify(layerIds,
                identifyParam);
          } finally {
            if (instance != null) {
              mapService.getMapServicePool().checkinIdelInstance(
                  instance);
View Full Code Here

          queryParam.setSpatialFilterType(relation);
          queryParam.setWhere(where);
        }

        FeatureCollection<? extends FeatureType, ? extends Feature> featureCollection = null;
        MapServiceInstance instance = (MapServiceInstance) mapService
            .getMapServicePool().checkoutIdleInstance();
        try {
          Layer layer = instance.getMap().getLayer(nLayerId);
          if (featureIds != null) {
            featureCollection = layer.query(featureIds);
          } else {
            featureCollection = layer.query(queryParam);
          }
View Full Code Here

        }

        String[] featureIds = new String[] { String.valueOf(featureId) };

        FeatureCollection<? extends FeatureType, ? extends Feature> featureCollection = null;
        MapServiceInstance instance = (MapServiceInstance) mapService
            .getMapServicePool().checkoutIdleInstance();
        try {
          Layer layer = instance.getMap().getLayer(layerId);
          featureCollection = layer.query(featureIds);
        } finally {
          if (instance != null) {
            mapService.getMapServicePool().checkinIdelInstance(
                instance);
View Full Code Here

      objTemp = new JSONObject();

      ReferencedEnvelope fullExtent = null;
      CoordinateReferenceSystem crs = null;
      MapServiceInstance instance = (MapServiceInstance) mapService
          .getMapServicePool().checkoutIdleInstance();
      try {
        fullExtent = instance.getFullExtent();
        crs = instance.getMap().getMapContext()
            .getCoordinateReferenceSystem();
      } finally {
        mapService.getMapServicePool().checkinIdelInstance(instance);
      }
View Full Code Here

      sb.append("<br/>ymax: " + initialExtent.getMaxY());
      sb.append("<br/><br/>");

      ReferencedEnvelope fullExtent = null;
      CoordinateReferenceSystem crs = null;
      MapServiceInstance instance = (MapServiceInstance) mapService
          .getMapServicePool().checkoutIdleInstance();
      try {
        fullExtent = instance.getFullExtent();
        crs = instance.getMap().getMapContext()
            .getCoordinateReferenceSystem();
      } finally {
        mapService.getMapServicePool().checkinIdelInstance(instance);
      }
View Full Code Here

          queryParam.setSpatialFilterType(relation);
          queryParam.setWhere(where);
        }

        boolean success = false;
        MapServiceInstance instance = (MapServiceInstance) mapService
            .getMapServicePool().checkoutIdleInstance();
        try {
          Layer layer = instance.getMap().getLayer(nLayerId);
          if (featureIds != null) {
            success = layer.delete(featureIds);
          } else {
            success = layer.delete(queryParam);
          }
View Full Code Here

        if (!editable) {
          return null;
        }

        FeatureType featureType = null;
        MapServiceInstance instance = (MapServiceInstance) mapService
            .getMapServicePool().checkoutIdleInstance();
        try {
          Layer layer = instance.getMap().getLayer(nLayerId);
          featureType = layer.getMapLayer().getFeatureSource()
              .getSchema();
        } finally {
          if (instance != null) {
            mapService.getMapServicePool().checkinIdelInstance(
                instance);
          }
        }

        // Handle features
        FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = EsriJsonUtil
            .json2FeatureCollection(features,
                (SimpleFeatureType) featureType);

        instance = (MapServiceInstance) mapService.getMapServicePool()
            .checkoutIdleInstance();
        HashMap<FeatureId, Boolean> updates = null;
        try {
          Layer layer = instance.getMap().getLayer(nLayerId);
          updates = layer.update(featureCollection);
        } finally {
          if (instance != null) {
            mapService.getMapServicePool().checkinIdelInstance(
                instance);
View Full Code Here

      MapDesc mapDesc = mapService.getMapDesc();
      boolean editable = mapDesc.getLayerInfo(layerId).isEditable();

      if (mapService != null) {
        MapLayer mapLayer = null;
        MapServiceInstance instance = (MapServiceInstance) mapService
            .getMapServicePool().checkoutIdleInstance();
        try {
          mapLayer = instance.getMap().getLayer(layerId)
              .getMapLayer();
        } finally {
          if (instance != null) {
            mapService.getMapServicePool().checkinIdelInstance(
                instance);
View Full Code Here

        }

        String[] featureIds = new String[] { String.valueOf(featureId) };

        FeatureCollection<? extends FeatureType, ? extends Feature> featureCollection = null;
        MapServiceInstance instance = (MapServiceInstance) mapService
            .getMapServicePool().checkoutIdleInstance();
        try {
          Layer layer = instance.getMap().getLayer(layerId);
          featureCollection = layer.query(featureIds);
        } finally {
          if (instance != null) {
            mapService.getMapServicePool().checkinIdelInstance(
                instance);
View Full Code Here

TOP

Related Classes of com.gi.server.core.service.mapservice.MapServiceInstance

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.