Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace LinesPointsFeaturesExample

This example illustrates how to add user lines and points in MapView. As custom features, they are handled through a FeaturesDataSource.

First we create a base map, but with customized theme which derives from default, but adds custom [[StyleSet]] - myStyleSet - which will be used by datasource with our features.

For more details, check the hello example.

Then we generate all the MapViewLineFeatures, with the desired text string to use for the text style, straight from the data:

We also add the hotspots in the earth's mantle as a MapViewMultiPointFeature.

Then we use the general DataSource mechanism: the FeaturesDataSource is created, added to MapView, the MapViewFeatures are added to it, and we specify [[StyleSet]] name set previously in map theme.

Note how the [[StyleSet]] of this example creates the text paths out of the line features. Also, we duplicate the line styles, one being a dashed line and the other a solid line, to have this specific look for the ridges and trenches. The point style is also duplicated, so that a bigger point is rendered below the first one, and creates an outline effect.

Generated using TypeDoc