i'm new to using arcgis javascript api and to data visualization in general . my supposed use case is the following ::
I have a database of employees information that's stored in JSON format like this ::
[
{
"name":"lorem ipsum",
"role":"software engineer",
"location":"london, uk"
} ,,,,,,,
]
how can i represent this data on an arcgis map ?
i've been drowning in the sample code section of the docs but really didn't get my answer.
-
Cross-posted as stackoverflow.com/q/42999380/820534PolyGeo– PolyGeo ♦2017年03月24日 21:09:03 +00:00Commented Mar 24, 2017 at 21:09
2 Answers 2
Here is a straightforward walk-through of how to add a popuptemplate to a feature. You will need to load your json objects into each features attributes. This can be done through arcgis software itself. The popuptemplate populates based on the properties of feature.attributes.
To plot anything on arcgis map you need to have geojson data which contains geometry type and longitude and latitude coordinates for example:
var geojsonFeature = {
"type": "Feature",
"properties": {
"name": "Coors Field",
"amenity": "Baseball Stadium",
"popupContent": "This is where the Rockies play!"
},
"geometry": {
"type": "Point",
"coordinates": [-104.99404, 39.75621]
}
};
you can append other details of data.