Nevron .NET Vision Documentation
Map Layers

A map layer is a container that contains map features of a given type. The most commonly use map feature types are points, polylines and polygons. The type of the features a given map layer contains is indicated by the FeaturesType property. In the context of GIS data in the ESRI format, map layers are called shapefiles. The sections below explain how to control the appearance and the behavior of map layers and how to add a map layer to the map importer.

Appearance

The following map layer properties lets you control the appearance of the Nevron diagram elements created from the map features of this map layer:

Behavior

The following map layer properties lets you configure its behavior:

ESRI Shapefiles

Nevron Map for .NET currently supports only one type of map layers - ESRI shapefiles. The ESRI shapefile support is implemented by NEsriShapefile class that inherits NMapLayer. You can create an NEsriShapefile either from a file or from a pair of streams - a shapefile stream and a DBF stream, which contains attribute data for the map features of the shapefile. In case you use the constructor that accepts a file name, Nevron Map assumes that a DBF file with the same file name and an extension ".dbf" exists in the directory of the ESRI shapefile.

The following piece of code demonstrates how to create, configure and add an ESRI shapefile to a map importer:

Create, configure and add a shapefile
Copy Code
NEsriShapefile countries = new NEsriShapefile(Path.Combine(Application.StartupPath, CountriesFileName));
countries.NameColumn = "CNTRY_NAME";
countries.TextColumn = "CNTRY_NAME";
countries.MinTextShowZoomFactor = 0.1f;   
countries.FillRule = new NMapFillRuleValue("COLOR_MAP", Colors);
mapImporter.AddLayer(countries);

This creates a shapefile and instructs the map importer that is should use the "CNTRY_NAME" column both for naming and for the labeling of the diagram elements created from the shapefile. The texts of the diagram elements will become visible when the user zooms the map to at least 10%.

See Also

 

 


©2017. Nevron Software LLC.

Send Feedback