NChartMapTopobase Class Reference

Inherits from NSObject
Declared in NChartMapTopobase.h

Overview

The NChartMapTopobase class provides methods to load the topobase for NChartMapSeries from a GeoJSON file.
Map topobase is a set of map shapes (represented as NChartMapShape instances), which can be displayed on the map. Each shape inherits from the NChartMarker, so it can be assigned to the NChartPointState of NChartPoint provided for the NChartMapSeries. This is the way to supply the topobase data to the chart. Topobases are loaded from the GeoJSON files, which you can obtain in map services like OpenStreetMap (https://www.openstreetmap.org) or in dedicated storages like this one: https://github.com/johan/world.geo.json/tree/master
Also, here is a handy tool to inspect GeoJSON files once you obtained them: https://geojson.io

+ mapTopobaseWithGeoJSON:

Create topobase with the GeoJSON file contents.

+ (NChartMapTopobase *)mapTopobaseWithGeoJSON:(NSString *)geoJSON

Parameters

geoJSON
  • string representation of the GeoJSON file.

Return Value

new instance of the map topobase.

Declared In

NChartMapTopobase.h

– initWithGeoJSON:

Init topobase with the GeoJSON file contents.

- (id)initWithGeoJSON:(NSString *)geoJSON

Parameters

geoJSON
  • string representation of the GeoJSON file.

Return Value

initialized instance of the map topobase.

Declared In

NChartMapTopobase.h

  shapes

Dictionary of shapes loaded. Keys are identifiers of the shapes, values are NChartMapShape instances.

@property (nonatomic, readonly) NSDictionary *shapes

Declared In

NChartMapTopobase.h