Tutorial - Markers
Create a map with a tile layer, define some data, and create a feature layer.
Step 1
Active
Inactive
Create a marker feature and set the data. The default marker feature looks just line a point feature -- circles with borders.
Step 2
Active
Inactive
Markers have many different symbols and style options:
symbol: the symbol shape, enumerated ingeo.markerFeature.symbols. This includesellipse,triangle(isosceles triangles),rectangle,oval, anddrop. There are symmetric repeating patterns such ascross4,flower6,star5,jack6, anddrop8, where the number is the rotational symmetry from 2 to 16.symbolValue: a number that modifies how the symbol appears, usually in the range of [0, 1]. This is often the ratio of the minor axis of the symbol to its major axis. Fortriangle, it is the length of the base side compared to the identical sides.rotation: the rotation in radians.rotateWithMap: a boolean; if true, the symbol rotates when the map is rotated. If false, it remains in the same orientation on the screen.radius: in pixels. Depending onstrokeOffsetandradiusIncludesStroke, this can include half or all of the stroke width.radiusIncludesStroke: if truthy or undefined, theradiusincludes thestrokeWidthbased on thestrokeOffset. If defined and falsy, the radius does not include thestrokeWidth; set this tofalseifscaleWithZoomis set to"fill".strokeWidth: the width of the stroke around the symbol in pixels.strokeOffset: the position of the stroke compared to the radius. This can only be -1 (inside), 0 (centered at the radius), or 1 (outside).scaleWithZoom: one of the values defined ingeo.markerFeature.scaleModes. Ifnone, the symbols remains the same size when the map is zoomed. This can also befill,stroke, orall, in which case the symbol will change size when the map is zoomed. If scaling with zoom, theradiusandstrokeWidthare in pixels at zoom level 0.fillColorfillOpacitystrokeColorstrokeOpacity:
Step 3
Active
Inactive
When scaling a marker with the map, the radius and stroke width are the values at zoom level 0.
Step 4
Active
Inactive
Markers are drawn efficiently, even if they all have different styles. This creates a large sample of symbols, each with a different style.
Step 5
Active
Inactive