POST
|
I'm currently exploring ArcGIS's Android SDK. However, I've found that when adding a ShapefileFeatureTable to a FeatureLayer: FeatureLayer featureLayer = new FeatureLayer(shapefileFeatureTable); featureLayer.setRenderer(new SimpleRenderer(new SimpleFillSymbol( getResources().getColor(android.R.color.holo_blue_bright), SimpleFillSymbol.STYLE.SOLID))); mapView.addLayer(featureLayer); and then trying to remove it: mapView.removeLayer(featureLayer); it doesn't work! (the layer is still visible) I've tried to change the following: mapView.addLayer(featureLayer,0); mapView.removeLayer(0); and this doesn't work either. EXPLANATORY NOTE: I'm trying to add and remove the feature layer because I want to show a GraphicsLayer on the map, but if I don't load a FeatureLayer first, the MapView stays completely black. I tried to set the SpatialReference and the background grid, but the only thing that worked was adding a bogus FeatureLayer first. I eventually "fixed it" by calling: mapView.addLayer(featureLayer); featureLayer.setVisible(false); But I still think it's suboptimal solution. Any ideas??
... View more
06-16-2015
08:35 AM
|
1
|
1
|
3440
|
POST
|
I've so far been able to add a feature layer from an ArcGIS server, and I've also been able to add an editor widget which allows me to draw to feature with the mouse. The added features are being correctly committed to the server, and are visible from other viewers as well as in the SDE database. I have also been able to add the Editor toolbar and edit the existing polygon features. However, I'm now looking for a way to add a feature without using the widget, just using JavaScript code. The closest thing I found was http://forums.esri.com/Thread.asp?c=206&f=2274&t=271592 but it discusses .NET and doesn't look similar to the way something like that would be achieved in Javascript. Where would the best starting point be for doing something like this?
... View more
01-27-2015
08:18 AM
|
0
|
2
|
6184
|
Title | Kudos | Posted |
---|---|---|
1 | 06-16-2015 08:35 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|