Select to view content in your preferred language

Custom Featurelayer

736
2
03-31-2014 02:59 AM
mavenmaven
New Contributor
Hi:

We have some POIs which we want to add them to the maps as a kind of Layer.



In face, this is similar to ArcGISFeatureLayer, while the server does not hold a ArcgisFeatureService but a common web service, we can parse the data ourselves.

I wonder if this is possible?
0 Kudos
2 Replies
ShellyGill1
Esri Contributor
Perhaps you don't really need a custom Layer, as the GraphicsLayer might do everything you need. Take a look at this sample that converts a CSV file to a GraphicsLayer in a map by connecting to a URL, parsing the CSV file that contains coordinates and attributes into Graphic objects, adds these Graphics to a GraphicsLayer and adds the layer to a map:

http://developers.arcgis.com/android/sample-code/addcsv-file/

Whether this is suitable or not depends on what kind of functionality you need in the layer really - you can add and remove graphics, change graphics, change visibility, and get graphics based on screen coordinates. See the JavaDoc for more info:

https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/GraphicsLayer.htm...
0 Kudos
mavenmaven
New Contributor
That's not what I want.

First, it load all the csv data one time, but we have too many records, it is not a good idea to load all of them once.

Second, load all the record out side the viewport of the mapview is a waste of network and memory.

The ArcgisFeatureLayer seems load features on demand. Is it possible?
0 Kudos