Locations

Learn about the Location geography type

"Locations" refers to anything that has a single geographic coordinate. In the GeoJSON specification, this is a type "Point".

In the Mapster WP Maps plugin, locations can be:

Markers

Markers are the default display of a location post type. Markers are displayed using a traditional "map markers" icon, and are HTML elements. Markers have a scale, color, customizable anchor, and rotation.

To set a custom image as your marker, use the Icon & Label Location type instead of the marker type (this is because Mapbox and Maplibre don't generally play very nicely with custom icons for traditional markers).

Circle

Circles are another way to display a single location. Circles have a radius, opacity, and color, as well as a border radius, border color, and border opacity.

Label & Icon

This is the most complex type of Location geography. You can set an icon and options, a text and options, or a combination of both.

Labels allow you to write directly on your map. By turning Label on, you can customize text content, choose from amongst a few fonts, set font size, color, opacity, and rotation. You can also designate outline color, outline opacity (blur), and outline width. Finally, you can specify an offset from the location point by specifying a position x and position y. Note that these positions work as positive for right/up, and negative for left/down.

Fonts are a little wacky. For a font that works across all styles, use Open Sans. Other fonts will only work in non-Mapbox styles, unless you manually upload those fonts to Mapbox.

Icons allow you to add a custom image and customize it. By turning Icon on, you can set an icon image, set the scale, opacity, rotation, and anchor. You can specify an offset from the location point by specifying a position x and position y. Note that these positions work as positive for right/up, and negative for left/down.

By using Icons and Labels together, you can (by modifying their positions) create labels with text underneath or above, as you wish.

Last updated