POST
|
I think i figured out a way to do it. It works. However, can someone tell me if this is the best way to do it ? This is how i did it. In my strings.xml file i put the links to the some maps (I made for testing purposes) located in ArcGis online server: <string name="firstFloor">https://services3.arcgis.com/CapJ1hlMMupAogng/arcgis/rest/services/JB1STFLOOR/FeatureServer/0</string> <string name="secondFloor">https://services3.arcgis.com/CapJ1hlMMupAogng/arcgis/rest/services/JB2NDFLOOR/FeatureServer/0</string> <string name="thirdFloor">https://services3.arcgis.com/CapJ1hlMMupAogng/arcgis/rest/services/JB3RDFLOOR/FeatureServer/1</string> <string name="fourthFloor">https://services3.arcgis.com/CapJ1hlMMupAogng/arcgis/rest/services/JB4THFLOOR/FeatureServer/0</string> <string name="fifthFloor">https://services3.arcgis.com/CapJ1hlMMupAogng/arcgis/rest/services/JB5THFLOOR/FeatureServer/0</string> then in my code i switched between layers with the following methods (methods get invoked when user presses a button in the application): //first layer public void onClickButtonOne(View v){ // Remove any previous layers mMapView.removeLayer(mFeatureLayer); //set layer mMapView = (MapView) findViewById(R.id.map); //leave mFeatureServiceUrl = this.getResources().getString(R.string.secondFloor);//leave mFeatureLayer = new ArcGISFeatureLayer(mFeatureServiceUrl, ArcGISFeatureLayer.MODE.ONDEMAND);//leave mMapView.addLayer(mFeatureLayer);//leave mGraphicsLayer = new GraphicsLayer();//leave mMapView.addLayer(mGraphicsLayer);//leave } //Second layer public void onClickButtonTwo(View v){ // Remove any previous layers mMapView.removeLayer(mFeatureLayer); //set layers mMapView = (MapView) findViewById(R.id.map); //leave mFeatureServiceUrl = this.getResources().getString(R.string.thirdFloor);//leave mFeatureLayer = new ArcGISFeatureLayer(mFeatureServiceUrl, ArcGISFeatureLayer.MODE.ONDEMAND);//leave mMapView.addLayer(mFeatureLayer);//leave mGraphicsLayer = new GraphicsLayer();//leave mMapView.addLayer(mGraphicsLayer);//leave } etc..
... View more
08-12-2016
08:34 PM
|
1
|
1
|
423
|
POST
|
Basically, i want to know if there is code that allows my users to switch between layers.
... View more
08-12-2016
06:00 PM
|
0
|
2
|
423
|
POST
|
Hello, I was wondering if anyone could help me. I'm building an android application. I made five layers in ArcMap. The first layer is the first floor map of my building. The second layer is the second floor map of my building and so on. I know how to put a single layer on my on top of a basemap in my android application. However I want the application to switch between layers(floors) when the user touches a button. (There will be five buttons--one for each floor). Is there an effective way to do this ? Or is there code out there that already does this? Thanks for the help in advance!
... View more
08-11-2016
11:42 AM
|
0
|
3
|
1366
|
POST
|
yes, correct. Do you know if there are any basemaps like this?
... View more
08-11-2016
09:08 AM
|
0
|
1
|
743
|
POST
|
I was just looking for more options. I wanted a white base map. since my map is only going to be of a small campus.
... View more
08-09-2016
05:43 PM
|
0
|
3
|
743
|
POST
|
Does anyone know if there is such thing as a white basemap ?
... View more
08-08-2016
02:02 PM
|
0
|
6
|
1745
|
POST
|
Hello, Im building a map application of a campus. I want the user to be able to press a button for a building and have the mapoptions.center="" xml attribute in the mapview (or some other code) change the map to that location(building). Does anyone know if there is any code out there that does this and navigates the map to different coordinates? i hope my question is not confusing. Here is a picture of one of my buildings.
... View more
08-08-2016
01:57 PM
|
0
|
3
|
1355
|
Title | Kudos | Posted |
---|---|---|
1 | 08-12-2016 08:34 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|