Please note — we have deprecated this plugin in favor of a new Mapbox-related plugin. Please migrate to https://wordpress.org/plugins/mapster-wp-maps as this plugin is no longer supported.
  1. Home
  2. Docs
  3. Shortcode
  4. Map Options

Map Options

Center

center="-74.5,40"

Center allows you to specify initial longitude and latitude. Ensure you place these in the correct LNG LAT order for Mapbox GL JS! If a center is not specified, your style will provide one.

Zoom

zoom="14.5"

Zoom allows you to set an initial zoom for the user. You may use decimals. If zoom is not specified, your style will provide one.

Range: 0 (low zoom) to 22 (high zoom).

Pitch

pitch="60"

Pitch defines the tilt of the map on load.

Range: 0 to 60.

Bearing

bearing="-60"

Bearing defines the initial angle of the map rotated around its central point.

Range: 0 degrees to 360 degrees.

Height/Width

height="600px" // tall map
width="100%" // full width of map
height="20em"
width="50px" // very narrow map

Height and Width will define the pixel height and width of your map. You can enter any value you would normally enter with CSS for these values (%, px, em, etc). By default these are set to 400px height and 100% width.

Was this article helpful to you? Yes 5 No 3

How can we help?