Angular Binding JSON Files with Geographic Locations
With IgxGeographicMapComponent
, you can plot geographic data loaded from various file types. For example, you can load geographic locations from JavaScript Object Notation (JSON) file.
Demo
Data Example
Here is an example of data from JSON file:
[
{ "n": "Sydney Island", "y": -16.68972, "x": 139.45917 },
{ "n": "Sydney Creek", "y": -16.3, "x": 128.95 },
{ "n": "Mount Sydney", "y": -21.39864, "x": 121.193 },
// ...
]
Code Snippet
The following code loads and binds IgxGeographicHighDensityScatterSeriesComponent
in the map component to an array of objects created from loaded JSON file with geographic locations:
View page on
GitHub