be3fb5e3 by chiangbt

添加了OSM图层,GeoQ图层和高德图层

1 parent a03b6542
...@@ -29,6 +29,7 @@ dependencies { ...@@ -29,6 +29,7 @@ dependencies {
29 compile 'com.github.arimorty:floatingsearchview:2.1.1' 29 compile 'com.github.arimorty:floatingsearchview:2.1.1'
30 compile 'com.amitshekhar.android:android-networking:0.2.0' 30 compile 'com.amitshekhar.android:android-networking:0.2.0'
31 compile 'com.github.chyrta:AndroidOnboarder:0.6' 31 compile 'com.github.chyrta:AndroidOnboarder:0.6'
32 compile 'cn.carbs.android:MDDialog:1.0.0'
32 33
33 implementation fileTree(dir: 'libs', include: ['*.jar']) 34 implementation fileTree(dir: 'libs', include: ['*.jar'])
34 //noinspection GradleCompatible 35 //noinspection GradleCompatible
......
...@@ -11,13 +11,10 @@ import com.esri.android.map.LocationDisplayManager; ...@@ -11,13 +11,10 @@ import com.esri.android.map.LocationDisplayManager;
11 import com.esri.android.map.MapView; 11 import com.esri.android.map.MapView;
12 import com.esri.android.runtime.ArcGISRuntime; 12 import com.esri.android.runtime.ArcGISRuntime;
13 import com.esri.core.geometry.Point; 13 import com.esri.core.geometry.Point;
14 import com.pashanhoo.landsurvey.layers.Geoq.GeoQMapLayerTypes; 14 import com.pashanhoo.landsurvey.layers.geoq.GeoQMapLayerTypes;
15 import com.pashanhoo.landsurvey.layers.Geoq.GeoQMapsTiledServiceLayer; 15 import com.pashanhoo.landsurvey.layers.geoq.GeoQMapsTiledServiceLayer;
16 import com.pashanhoo.landsurvey.layers.gaode.GaodeMapLayerTypes;
17 import com.pashanhoo.landsurvey.layers.gaode.GaodeMapsTiledServiceLayer;
18 import com.pashanhoo.landsurvey.layers.google.GoogleMapLayerTypes; 16 import com.pashanhoo.landsurvey.layers.google.GoogleMapLayerTypes;
19 import com.pashanhoo.landsurvey.layers.google.GoogleMapsTiledServiceLayer; 17 import com.pashanhoo.landsurvey.layers.google.GoogleMapsTiledServiceLayer;
20 import com.pashanhoo.landsurvey.layers.tianditu.TDTTileinfo;
21 import com.pashanhoo.landsurvey.utils.AppInfo; 18 import com.pashanhoo.landsurvey.utils.AppInfo;
22 import com.pashanhoo.landsurvey.utils.GISHelper; 19 import com.pashanhoo.landsurvey.utils.GISHelper;
23 import com.pashanhoo.landsurvey.utils.JZLocationConverter; 20 import com.pashanhoo.landsurvey.utils.JZLocationConverter;
...@@ -45,12 +42,14 @@ public class GoogleMapActivity extends AppCompatActivity { ...@@ -45,12 +42,14 @@ public class GoogleMapActivity extends AppCompatActivity {
45 // mapView.addLayer(GOOGLE_IMAGE_Layer); 42 // mapView.addLayer(GOOGLE_IMAGE_Layer);
46 // GoogleMapsTiledServiceLayer GOOGLE_ANNO_Layer = new GoogleMapsTiledServiceLayer(GoogleMapLayerTypes.IMAGE_ANNO_GOOGLE_MAP); 43 // GoogleMapsTiledServiceLayer GOOGLE_ANNO_Layer = new GoogleMapsTiledServiceLayer(GoogleMapLayerTypes.IMAGE_ANNO_GOOGLE_MAP);
47 // mapView.addLayer(GOOGLE_ANNO_Layer); 44 // mapView.addLayer(GOOGLE_ANNO_Layer);
45 GoogleMapsTiledServiceLayer OSM_Layer = new GoogleMapsTiledServiceLayer(GoogleMapLayerTypes.OSM_Map);
46 mapView.addLayer(OSM_Layer);
48 47
49 // GaodeMapsTiledServiceLayer gaodeMapsTiledServiceLayer = new GaodeMapsTiledServiceLayer(GaodeMapLayerTypes.VECTOR_Gaode_MAP); 48 // GaodeMapsTiledServiceLayer gaodeMapsTiledServiceLayer = new GaodeMapsTiledServiceLayer(GaodeMapLayerTypes.VECTOR_Gaode_MAP);
50 // mapView.addLayer(gaodeMapsTiledServiceLayer); 49 // mapView.addLayer(gaodeMapsTiledServiceLayer);
51 50
52 GeoQMapsTiledServiceLayer geoQMapsTiledServiceLayer = new GeoQMapsTiledServiceLayer(GeoQMapLayerTypes.ChinaOnlineCommunity_Mobile); 51 // GeoQMapsTiledServiceLayer geoQMapsTiledServiceLayer = new GeoQMapsTiledServiceLayer(GeoQMapLayerTypes.ChinaOnlineCommunity_Mobile);
53 mapView.addLayer(geoQMapsTiledServiceLayer); 52 // mapView.addLayer(geoQMapsTiledServiceLayer);
54 53
55 mapView.setMaxResolution(156543.03392800014); 54 mapView.setMaxResolution(156543.03392800014);
56 mapView.setMinResolution(0.29858214164761665); 55 mapView.setMinResolution(0.29858214164761665);
......
1 package com.pashanhoo.landsurvey.layers.Geoq; 1 package com.pashanhoo.landsurvey.layers.geoq;
2 2
3 import com.pashanhoo.landsurvey.layers.BaseTiledMapServiceType; 3 import com.pashanhoo.landsurvey.layers.BaseTiledMapServiceType;
4 4
......
1 package com.pashanhoo.landsurvey.layers.Geoq; 1 package com.pashanhoo.landsurvey.layers.geoq;
2 2
3 import android.annotation.SuppressLint; 3 import android.annotation.SuppressLint;
4 import android.content.ContentValues; 4 import android.content.ContentValues;
...@@ -13,7 +13,6 @@ import com.esri.core.geometry.SpatialReference; ...@@ -13,7 +13,6 @@ import com.esri.core.geometry.SpatialReference;
13 import com.esri.core.internal.io.handler.ResponseListener; 13 import com.esri.core.internal.io.handler.ResponseListener;
14 import com.esri.core.internal.io.handler.a; 14 import com.esri.core.internal.io.handler.a;
15 import com.esri.core.io.UserCredentials; 15 import com.esri.core.io.UserCredentials;
16 import com.pashanhoo.landsurvey.layers.gaode.GaodeMapLayerTypes;
17 import com.pashanhoo.landsurvey.utils.AppInfo; 16 import com.pashanhoo.landsurvey.utils.AppInfo;
18 import com.pashanhoo.landsurvey.utils.GADBHelper; 17 import com.pashanhoo.landsurvey.utils.GADBHelper;
19 18
......
...@@ -15,7 +15,9 @@ public enum GoogleMapLayerTypes implements BaseTiledMapServiceType { ...@@ -15,7 +15,9 @@ public enum GoogleMapLayerTypes implements BaseTiledMapServiceType {
15 /** * Google topographic map service ======= topographic map */ 15 /** * Google topographic map service ======= topographic map */
16 TERRAIN_GOOGLE_MAP, 16 TERRAIN_GOOGLE_MAP,
17 /** * Google road POI map service = = = = net road map */ 17 /** * Google road POI map service = = = = net road map */
18 IMAGE_ANNO_GOOGLE_MAP; 18 IMAGE_ANNO_GOOGLE_MAP,
19
20 OSM_Map;
19 21
20 @Override 22 @Override
21 public String getName() 23 public String getName()
......
...@@ -147,6 +147,9 @@ public class GoogleMapsTiledServiceLayer extends TiledServiceLayer { ...@@ -147,6 +147,9 @@ public class GoogleMapsTiledServiceLayer extends TiledServiceLayer {
147 url = "http://mt" + (col % 4) + ".google.cn/vt/lyrs=s@131,h@209000000&hl=zh-CN&gl=CN&src=app&" + "x=" + col + "&" + "y=" + row + "&" + "z=" + level + "&" + "s=" + s; 147 url = "http://mt" + (col % 4) + ".google.cn/vt/lyrs=s@131,h@209000000&hl=zh-CN&gl=CN&src=app&" + "x=" + col + "&" + "y=" + row + "&" + "z=" + level + "&" + "s=" + s;
148 // url = "http://webst02.is.autonavi.com/appmaptile?style=8&x=" + col + "&y=" + row + "&z=" + level; 148 // url = "http://webst02.is.autonavi.com/appmaptile?style=8&x=" + col + "&y=" + row + "&z=" + level;
149 break; 149 break;
150 case OSM_Map:
151 url = "https://c.tile.openstreetmap.org/"+ level +"/"+ col +"/"+ row +".png";
152 break;
150 } 153 }
151 154
152 try { 155 try {
......