Android1

from GeoJSON data to FeatureLayer

Discussion created by Android1 on Aug 28, 2012
Latest reply on Apr 16, 2016 by tohashmi_analyze
Hello :D

I'm currently working on an offline app.

I have an internal database (Spatialite) that allows me to generate simple GeoJSON files via an SQL query, which only specifies the geometry type and the coordinates of the object.

I'm trying currently to generate a FeatureLayer from theses JSON objects. If I understand correctly, using the FeatureCollection sample and the BladeRunner source code, I would need to define a JSON output format, have a correctly formated JSON file containing my values, parse this file using the JSON definition, put the results in a Graphics object, then these in a FeatureSet, and construct my feature layer with the FeatureSet and the json definition.

Is there another way to do this? Do you have something more comprehensible? because BladeRunner's workflow to decode JSOn is quite difficult to understand, while FeatureCollection doesn't really fit with my needs since it uses an online resource.

Thanks in advance :)

Outcomes