Esempio n. 1
0
 private static void handleLayerInfo(TianDiTuLayerInfo layerInfo, int layerType)
 {
     switch (layerType)
     {
         case TianDiTuLayerTypes.TIANDITU_IMAGE_2000:
         case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_CHINESE_2000:
         case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_ENGLISH_2000:
         case TianDiTuLayerTypes.TIANDITU_VECTOR_2000:
         case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_CHINESE_2000:
         case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_ENGLISH_2000:
         case TianDiTuLayerTypes.TIANDITU_TERRAIN_2000:
         case TianDiTuLayerTypes.TIANDITU_TERRAIN_ANNOTATION_CHINESE_2000:
         case TianDiTuLayerTypes.TIANDITU_IMAGE_2000_OFFLINE:
         case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_CHINESE_2000_OFFLINE:
         case TianDiTuLayerTypes.TIANDITU_VECTOR_2000_OFFLINE:
         case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_CHINESE_2000_OFFLINE:
         case TianDiTuLayerTypes.TIANDITU_TERRAIN_2000_OFFLINE:
         case TianDiTuLayerTypes.TIANDITU_TERRAIN_ANNOTATION_CHINESE_2000_OFFLINE:
             layerInfo.setOrigin(LayerInfoFactory.ORIGIN_2000);
             layerInfo.setSrid(LayerInfoFactory.SRID_2000);
             layerInfo.setxMin(LayerInfoFactory.X_MIN_2000);
             layerInfo.setyMin(LayerInfoFactory.Y_MIN_2000);
             layerInfo.setxMax(LayerInfoFactory.X_MAX_2000);
             layerInfo.setyMax(LayerInfoFactory.Y_MAX_2000);
             layerInfo.setScales(LayerInfoFactory.SCALES);
             layerInfo.setResolutions(LayerInfoFactory.RESOLUTIONS_2000);
             layerInfo.setTileMatrixSet(LayerInfoFactory.TILE_MATRIX_SET_2000);
             break;
         case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_CHINESE_MERCATOR:
         case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_ENGLISH_MERCATOR:
         case TianDiTuLayerTypes.TIANDITU_IMAGE_MERCATOR:
         case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_CHINESE_MERCATOR:
         case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_ENGLISH_MERCATOR:
         case TianDiTuLayerTypes.TIANDITU_VECTOR_MERCATOR:
         case TianDiTuLayerTypes.TIANDITU_TERRAIN_MERCATOR:
         case TianDiTuLayerTypes.TIANDITU_TERRAIN_ANNOTATION_CHINESE_MERCATOR:
             layerInfo.setOrigin(LayerInfoFactory.ORIGIN_MERCATOR);
             layerInfo.setSrid(LayerInfoFactory.SRID_MERCATOR);
             layerInfo.setxMin(LayerInfoFactory.X_MIN_MERCATOR);
             layerInfo.setyMin(LayerInfoFactory.Y_MIN_MERCATOR);
             layerInfo.setxMax(LayerInfoFactory.X_MAX_MERCATOR);
             layerInfo.setyMax(LayerInfoFactory.Y_MAX_MERCATOR);
             layerInfo.setScales(LayerInfoFactory.SCALES);
             layerInfo.setResolutions(LayerInfoFactory.RESOLUTIONS_MERCATOR);
             layerInfo.setTileMatrixSet(LayerInfoFactory.TILE_MATRIX_SET_MERCATOR);
             break;
     }
 }
Esempio n. 2
0
 public TianDiTuOffLineLayer(int layerType)
     : base()
 {
     this.layerInfo = LayerInfoFactory.getLayerInfo(layerType);
 }
Esempio n. 3
0
        public static TianDiTuLayerInfo getLayerInfo(int layerType)
        {
            TianDiTuLayerInfo layerInfo = new TianDiTuLayerInfo();
            switch (layerType)
            {
                case TianDiTuLayerTypes.TIANDITU_IMAGE_2000:

                    layerInfo.setUrl(LayerInfoFactory.URL_IMAGE_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_IMAGE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_CHINESE_2000:
                    layerInfo.setUrl(LayerInfoFactory.URL_IMAGE_ANNOTATION_CHINESE_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_IMAGE_ANNOTATION_CHINESE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_ENGLISH_2000:
                    layerInfo.setUrl(LayerInfoFactory.URL_IMAGE_ANNOTATION_ENGLISH_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_IMAGE_ANNOTATION_ENGLISH);
                    break;
                case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_CHINESE_MERCATOR:
                    layerInfo.setUrl(LayerInfoFactory.URL_IMAGE_ANNOTATION_CHINESE_MERCATOR);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_IMAGE_ANNOTATION_CHINESE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_ENGLISH_MERCATOR:
                    layerInfo.setUrl(LayerInfoFactory.URL_IMAGE_ANNOTATION_ENGLISH_MERCATOR);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_IMAGE_ANNOTATION_ENGLISH);
                    break;
                case TianDiTuLayerTypes.TIANDITU_IMAGE_MERCATOR:
                    layerInfo.setUrl(LayerInfoFactory.URL_IMAGE_MERCATOR);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_IMAGE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_VECTOR_2000:

                    layerInfo.setUrl(LayerInfoFactory.URL_VECTOR_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_VECTOR);
                    break;
                case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_CHINESE_2000:
                    layerInfo.setUrl(LayerInfoFactory.URL_VECTOR_ANNOTATION_CHINESE_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_VECTOR_ANNOTATION_CHINESE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_ENGLISH_2000:
                    layerInfo.setUrl(LayerInfoFactory.URL_VECTOR_ANNOTATION_ENGLISH_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_VECTOR_ANNOTATION_ENGLISH);
                    break;
                case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_CHINESE_MERCATOR:
                    layerInfo.setUrl(LayerInfoFactory.URL_VECTOR_ANNOTATION_CHINESE_MERCATOR);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_VECTOR_ANNOTATION_CHINESE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_ENGLISH_MERCATOR:
                    layerInfo.setUrl(LayerInfoFactory.URL_VECTOR_ANNOTATION_ENGLISH_MERCATOR);
                    break;
                case TianDiTuLayerTypes.TIANDITU_VECTOR_MERCATOR:
                    layerInfo.setUrl(LayerInfoFactory.URL_VECTOR_MERCATOR);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_VECTOR);
                    break;
                case TianDiTuLayerTypes.TIANDITU_TERRAIN_2000:
                    layerInfo.setUrl(LayerInfoFactory.URL_TERRAIN_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_TERRAIN);
                    break;
                case TianDiTuLayerTypes.TIANDITU_TERRAIN_ANNOTATION_CHINESE_2000:
                    layerInfo.setUrl(LayerInfoFactory.URL_TERRAIN_ANNOTATION_CHINESE_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_TERRAIN_ANNOTATION_CHINESE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_TERRAIN_MERCATOR:
                    layerInfo.setUrl(LayerInfoFactory.URL_TERRAIN_MERCATOR);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_TERRAIN);
                    break;
                case TianDiTuLayerTypes.TIANDITU_TERRAIN_ANNOTATION_CHINESE_MERCATOR:
                    layerInfo.setUrl(LayerInfoFactory.URL_TERRAIN_ANNOTATION_CHINESE_MERCATOR);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_TERRAIN_ANNOTATION_CHINESE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_IMAGE_2000_OFFLINE:
                    layerInfo.setUrl(LayerInfoFactory.URL_IMAGE_2000_OFFLINE);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_OFFLINE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_IMAGE_ANNOTATION_CHINESE_2000_OFFLINE:
                    layerInfo.setUrl(LayerInfoFactory.URL_IMAGE_ANNOTATION_CHINESE_2000_OFFLINE);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_ANNOTATION_CHINESE_OFFLINE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_VECTOR_2000_OFFLINE:
                    layerInfo.setUrl(LayerInfoFactory.URL_VECTOR_2000_OFFLINE);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_OFFLINE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_VECTOR_ANNOTATION_CHINESE_2000_OFFLINE:
                    layerInfo.setUrl(LayerInfoFactory.URL_VECTOR_ANNOTATION_CHINESE_2000_OFFLINE);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_ANNOTATION_CHINESE_OFFLINE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_TERRAIN_2000_OFFLINE:
                    layerInfo.setUrl(LayerInfoFactory.URL_TERRAIN_2000_OFFLINE);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_OFFLINE);
                    break;
                case TianDiTuLayerTypes.TIANDITU_TERRAIN_ANNOTATION_CHINESE_2000_OFFLINE:
                    layerInfo.setUrl(LayerInfoFactory.URL_TERRAIN_ANNOTATION_CHINESE_2000);
                    layerInfo.setLayerName(LayerInfoFactory.LAYER_NAME_ANNOTATION_CHINESE_OFFLINE);
                    break;
            }
            handleLayerInfo(layerInfo, layerType);
            return layerInfo;
        }