0

I am working In an app to develop a custom ArcGis map. I am able to show the map using base map url. I am using following fragment of code

mapView.addLayer(new ArcGISTiledMapServiceLayer(
            "http://maps.ocparks.com/arcgis/rest/services/Imagery/2013_Imagery/MapServer"));

As this map shows a particular region (orange county). now i want to get current location and show on this map. is there any way to do this? after going through several docs of ArcGis I just came to kmow that to show current location the url of base map should be --

http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer

but for imagery map server how to show current location. if any one know please help me

kuldeep
  • 3
  • 4
  • I don't believe that the URL is the root cause of your issue. Acutally, both URLs are map servers being added as a layer and. Are you able to get current location working with `http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer`? – Plinio.Santos Jun 25 '15 at 20:28
  • yes ... with world_street_map I am able to get my current location – kuldeep Jun 25 '15 at 20:39
  • but with this imagery map server location is not getting – kuldeep Jun 25 '15 at 20:40
  • it may be because of imagery server lot belonging to your current location? – kuldeep Jun 25 '15 at 20:41
  • What is the coordinates of your current location? – Plinio.Santos Jun 25 '15 at 20:48
  • i am using---- LocationDisplayManager ls = map.getLocationDisplayManager(); ls.setLocationListener(new MyLocationListener()); ls.start(); //ls.setAutoPan(false); ls.setAutoPanMode(AutoPanMode.LOCATION); – kuldeep Jun 25 '15 at 21:23
  • in location listener's onLocationChange() method I am getting location – kuldeep Jun 25 '15 at 21:24
  • My guess would be something related with spacial references or coordinate systems. It would add your location to a map position where there is no image from `http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer`. If you are not satisfied with the answer you got, you can debug the application and get the coordinates (for instance X:Y or latitude:longitude), the spacial reference and the coordinate system. With this, we could see if is that your problem. – Plinio.Santos Jun 26 '15 at 13:52

1 Answers1

0

Till now it is not possible , may be using javascript it can be done. for getting current location we should use World_Street_Map as a base layer

  • Although I have developed a lot of android applications in the past and currently I'm a ArcGIS developer, I have never developed an ArcGIS client for android. That said, It makes no sense to me current location works for one URL but not for another. Maps services will just delivery images (like .png) and what you suggest would be like _it can add current location to 'yellow image' but not to a 'red image''_. Anyway, I believe you know more about this API than I. – Plinio.Santos Jun 26 '15 at 13:47