|
POST
|
I tested the following code it works fine. mMapView = (MapView) findViewById(R.id.map); ArcGISDynamicMapServiceLayer dl = new ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/MapServer"); mMapView.addLayer(dl); dl.setVisible(false); if you comment the last line out, you can see a small tree in the middle of the map, and when you set it invisible, you will be able to see basemap, but not the dynamicLayer. Please feel free to checkout the sample here: Rachel-Android-Sample/SetVisible at master · guo7711/Rachel-Android-Sample · GitHub
... View more
11-19-2014
01:40 PM
|
0
|
1
|
1300
|
|
POST
|
So you mean you want to hide ArcGISDynamicMapServiceLayer Is that correct?
... View more
11-19-2014
09:49 AM
|
0
|
1
|
1300
|
|
POST
|
Do you mean GeoCap is another MapView or another Layer?
... View more
11-19-2014
08:55 AM
|
0
|
1
|
1300
|
|
POST
|
Would you like to send your code to me? Maybe I can take a look at it. mguo@esri.com
... View more
11-19-2014
08:52 AM
|
1
|
0
|
1249
|
|
POST
|
Did you installed the eclipse plugin for ArcGIS Runtime SDK for Android? What is the version for that one?
... View more
11-18-2014
04:26 PM
|
0
|
1
|
1249
|
|
POST
|
Graphic(Geometry geometry, Symbol symbol) Instantiates a new Graphic object from the specified geometry and symbol. The constructor should exist. May I confirm the SDK version you are working with?
... View more
11-18-2014
04:04 PM
|
0
|
0
|
1250
|
|
POST
|
Try the following code to show the point.. also check what you imported.. the Point class should be com.esri.core.geometry.Point , and I think Android has a Point class as well. // create a point marker symbol (red, size 10, of type circle) SimpleMarkerSymbol simpleMarker = new SimpleMarkerSymbol(Color.RED, 10, SimpleMarkerSymbol.STYLE.CIRCLE); // create a point at x=-302557, y=7570663 (for a map using meters as units; this depends // on the spatial reference) Point pointGeometry = new Point(-302557, 7570663); // create a graphic with the geometry and marker symbol Graphic pointGraphic = new Graphic(pointGeometry, simpleMarker); // add the graphic to the graphics layer graphicsLayer.addGraphic(pointGraphic);
... View more
11-18-2014
03:46 PM
|
1
|
2
|
1250
|
|
POST
|
No problem. I will say test your code with the sample data(You can generate a runtime content from OfflineEditor sample) and see if it shows all the features. And then if it's possible, test your runtime content maybe with another API and see if it works. But I doubt the issue comes from the runtime content.
... View more
11-18-2014
02:46 PM
|
0
|
0
|
986
|
|
POST
|
How many layers do you have in this geodatabase file? The code should be something like... //Open the geodatabase file Geodatabase geodatabase = new Geodatabase("{/path/to/geodatabase}"); private GeodatabaseFeatureTable geodatabaseFeatureTable; //get the geodatabase feature table geodatabaseFeatureTable = geodatabase.getGeodatabaseFeatureTableByLayerId(0); //create a feature layer featureLayer = new FeatureLayer(geodatabaseFeatureTable); mMapView.addLayer(featureLayer); However, I think if you have part of the layer showed up, you probably known how to do this... I think the issue may come from the runtime content, check if there is some features that is not supported by runtime content. For feature and tabular data to be included in the Runtime content, there are a few restrictions to keep in mind: Only feature layers, tables, and relationship classes are supported. If a feature layer references or participates in a relationship class that references unsupported data, the layer will not be included in the Runtime content. All of the layers in the current map must come from the same workspace.
... View more
11-18-2014
01:54 PM
|
1
|
2
|
986
|
|
POST
|
I think this is because you set the layer invisible, but it is for the layer instance. To actually see it invisible in the view, you probably want to get the layer from Mapview and set it invisible. For example: MapView mv = new MapView(this); mv.addLayer(new ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer")); Then you can use mv.getLayer(int index) to get the ArcGISDynamicMapServiceLayer and set it invisible.
... View more
11-18-2014
01:37 PM
|
0
|
1
|
1300
|
|
POST
|
Is the issue happen when you retrieve runtime content in your Android app? What's the type of your layer?
... View more
11-18-2014
01:26 PM
|
1
|
4
|
986
|
|
POST
|
What's the URL of your TiledServiceLayer? In your onCreate method in java file, do the following code: // Retrieve the MapView from XML layout. mMapView = (MapView) findViewById(R.id.map); // Add a base map layer to the MapView. mMapView.addLayer(new ArcGISTiledMapServiceLayer("your tiled service URL")); Check this sample if needed. Add Layer | ArcGIS for Developers If it doesn't work, send your code to mguo@esri.com and I'll look into it.
... View more
11-18-2014
01:22 PM
|
0
|
0
|
611
|
|
POST
|
Could you please post the code in xml as well? Check if you have the mapview in your main.xml: <!-- MapView layout and initial extent --> <com.esri.android.map.MapView android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="fill_parent" mapoptions.MapType="Topo" mapoptions.center="34.056215, -117.195668" mapoptions.ZoomLevel="16"> </com.esri.android.map.MapView> And in the java file, use mMapView = (MapView) findViewById(R.id.map); to retrieve the map and map options from XML layout instead of create a new one. Let me know if it works.
... View more
11-18-2014
01:07 PM
|
0
|
0
|
346
|
|
POST
|
I think this is a Eclipse issue. I got the same error but when I tried to run with the error, it works. Just ignore the error and run it. It will work fine. I also tested the same code in IntelliJ, it works with no error.
... View more
09-03-2014
03:51 PM
|
0
|
0
|
1329
|
|
POST
|
Hi, Bill, I think right now we don't have an event to detect when the map extent has changed. You may go to Esri Arcgis Ideas | Ideas Submission Portal to submit an idea for that.
... View more
07-08-2014
04:07 PM
|
0
|
0
|
459
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-21-2016 04:58 PM | |
| 1 | 02-24-2015 10:42 AM | |
| 1 | 10-23-2015 02:09 PM | |
| 1 | 01-27-2016 09:48 AM | |
| 1 | 01-27-2016 11:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|