Skip to content
fuzhenn edited this page Oct 12, 2017 · 3 revisions

Introduction

Layer is the core of maptalks, map does nearly everything by layers: display base maps by TileLayer, load sptaial data by VectorLayer and draw heatmaps by HeatMap, etc.

Each layer is an independent mechanism.

  • Independent: No correlation with each other
  • A mechanism: Every layer can have its own data format, rendering mechanism, interactions, spatial processing, etc.
  • Inheritance: Child layer can extend parent layer, e.g: inherits parent's data format with a new rendering mechanism

You can use layers to draw simple points/lines/polygons, load 3D terrain data, or create complicated interactions or animations. They are all layers.

maptalks's common layers

TileLayer

API | Examples

To display raster tiles, TileLayer uses different [Tile System|tile-system] to load tiles from different coordinate systems.

VectorLayer

API | Examples

Load vector data including Marker, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection and extended geometries like Curve, Ellipse, Rectangle

CanvasLayer

API | Examples

CanvasLayer is a HTML5 Canvas based layer, provides methods(prepareToDraw, draw) to manipulate canvas operations. It also provides some methods helpful for animations.

ParticleLayer

API | Examples

A child layer of CanvasLayer, it encapsulate particle's paintinging, you can simply implement its getParticles method to draw various particles on map.

CanvasTileLayer

API | Examples

CanvasTileLayer is a child layer of TileLayer, each tile of CanvasTileLayer is an independent canvas container instead of image.

Plugin Layers

ClusterLayer

Link

ClusterLayer, to cluster markers into customizable clusters, a child layer of VectorLayer.

HeatLayer

Link

HeatLayer, to draw data as heatmap.

AnimateMarkerLayer

Link

AnimateMarkerLayer, to draw markers with customizable animations, a child layer of VectorLayer.

You can go to plugins to check out other useful layers.