This is the main shortcode of the plugin, it’ll display all your locations on a map and a carousel. This was introduced in version 3 as a replacement of the v2 shortcode [codespacing_progress_map]
The shortcode [cspm_main_map]
supports the following attributes:
The ID of the map to display. This attribute is required! When not provided, the plugin will display the message “Map not available!”. More infos about the error can be found on the browser console.
Example: [cspm_main_map id="55"]
The center point of the map. Enter the Latitude & Longitude of the center point or enter the ID of the post on which the map will be centered.
Only “Decimal” format is allowed. e.g. 55.7557860,-37.6176330
All underneath formats are not supported:
- Degrees minutes seconds:
40° 26′ 46″ N 79° 58′ 56″ W
- Degrees decimal minutes:
40° 26.767′ N 79° 58.933′ W
- Decimal degrees:
40.446° N 79.982° W
Example 1: [cspm_main_map id="55" center_at="51.510879,-0.117813"]
Example 2: [cspm_main_map id="55" center_at="109"]
One or more post ids to display on the map. This attribute is the equivalent of the field “Query settings => Posts to retrieve”.
If no post ID available, the plugin will call the post IDs based on the map query settings. When available, the plugin will ignore the other map query settings like post_type
, post_status
… etc
Example 1: [cspm_main_map id="55" post_ids="1"]
Example 2: [cspm_main_map id="55" post_ids="1,2,3,4,5"]
Detect browser window resize and recenter the map. Possible values are yes
and no
.
Example: [cspm_main_map id="55" window_resize="yes"]