How To Set Up My ArcGis Server,Then I Can Us Android Runtime SDK

3525
1
03-17-2015 08:29 PM
凯钱
by
New Contributor

I'm running the Demo project

and add a layer use the official ArcGIS Server,like this

ArcGISTiledMapServiceLayer tileLayer = new ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer ");

mMapView.addLayer(tileLayer);

the Demo is working well

But when i use my own server url replace the official ArcGIS Server,like this

ArcGISTiledMapServiceLayer tileLayer = new ArcGISTiledMapServiceLayer("http://192.168.0.133:6080/arcgis/rest/services/SampleWorldCities/MapServer ");

mMapView.addLayer(tileLayer);

there is a running error is the Logcat and no map show in MapView

20150318111007.png

I have install ArcGIS For Server,and  a service named SampleWorldCities is running.

And i can visit the url http://192.168.0.133:6080/arcgis/rest/services/SampleWorldCities/MapServer in explorer

And the url http://localhost:6080/arcgis/rest/services//SampleWorldCities/MapServer?f=jsapi can show the map in explorer too.

So what can i do?

0 Kudos
1 Reply
omega_cancer
Occasional Contributor II

Is http://192.168.0.133:6080/arcgis/rest/services/SampleWorldCities/MapServer​ a DynamicService? ArcGISTiledMapServiceLayer works with tiledservices. use ArcGISDynamicMapServiceLayer class if it is dynamic.