This is a complete listing of available shortcode attributes for reference.
Attribute quoting
Like any other shortcode in WordPress, you can use quotes around shortcode attributes if the attribute is anything other than a single word or number. But be careful that you’re using plain old ASCII straight quotes like " or '. Don’t use “curly quotes” as they won’t work and you may just get a blank map, or you may get an error message to say that the position is not valid.
| Attribute | Description |
|---|---|
| zoom=7 | Sets the map zoom level to 1:50000. The default value and max/min zoom level can be set on the settings page. If you want to set a fixed initial zoom level you must also specify the centre point. |
| height=400 | Sets the map height in pixels. Default value on settings page. |
| width=600 | Sets a fixed map width. Default value on settings page. Usually left blank to use all available width |
| profile=200 | Height of the elevation profile in pixels. Default value on settings page. A non-zero value must be set to display elevation profiles. |
| centre=”53.068567,-4.076072″ center=”NY200200″ | Sets the map centre, along with zoom if you want a fixed display. Can be an OS gridref or latitude longitude. Either spelling works |
| extent=”NY200200|NY260220″ | Specify two diagonally opposite corners of the map area you want to display |
| gpx=”routefile1.gpx|routefile2.gpx|routefile3.gpx” | Add one or more GPX route files directly in the shortcode. Multiple files are separated by the | (pipe) character. Note that the full URL of each GPX file must be given |
| gpxfile=”routes.txt” | Add the GPX files listed in the separate text file |
| colour=red color=#ff0000 | GPX track colour. Default value on settings page. Can be any HTML colour or hash code. Either spelling works |
| track=4 | GPX track width in pixels. Default value on settings page |
| hover=1 | Non-zero to open marker and GPX waypoint popups on hover. Default value on settings page |
| opacity=0.8 | Set GPX track opacity from 0.0 to 1.0. Default value is 0.7 |
| gpxstyle=1 | Take the track colour from the GPX file itself rather than from the ‘track’ setting. |
| waypoint=1 | Enable GPX waypoint markers. Default value on settings page |
| start_marker=green | Place a marker at the start of the GPX route in the given colour |
| end_marker=red | Place a marker at the end of the GPX route in the given colour |
| kml=”kmlfile1.kml|kmlfile2.kml” | Add one or more KML files directly in the shortcode. Multiple files are separated by the | (pipe) character. Note that the full URL of each KML file must be given |
| kml_file=”kml.txt” | Add the KML files listed in the separate text file |
| markers=”SH6099054380;Snowdon” | Add a list of markers directly in the shortcode |
| markerfile | Add markers specified in a separate marker file, either in text or JSON format |
| marker_link=”auto,link” | Add marker jump links below the map |
| marker_zoom | Sets the new zoom factor to use after clicking on a jump link |
| class=”class-name” | Adds a CSS class name to an auto-generated marker list |
| layers=”Snowdon|Glyderau|Carneddau” | Used to enable markers, GPX routes or KML overlays as toggleable layers |
| fit_margin=20 | Override the default map margin when autofitting a map. Default 20 pixels |
| popup=”paoc-123″ | Specify the type of 3rd party popup plugin to use when displaying the map |
| gestures=mobile | Specify how drag and zoom gestures are handled. Default value on settings page |
| location=1 | Specify who can use GPS location to display their position on the map. Default value on settings page |
| start_locate=1 | Jumps to current location as soon as the map is opened if GPS location is enabled |
| premium_data=none | Specify who can display premium data on this map. Default value on settings page |
| open_data_style | Specify which open data style to use when premium data is not in use. Default value on settings page |
| leisure=0 | Used to override the default value of always using OS Leisure maps where premium data permits |