To display the nearby palces map in your page, copy/paste the shortcode [cs_nearby_map]
in your page.
The settings of this map can be set from the menus (Progress Map / Default map settings), (Progress Map / Default map style settings) & (Progress Map / Default infobox settings)!
The shortcode supports the following attributes:
post_ids
map_id
center_at
height
width
zoom
show_overlay
show_secondary
map_style
initial_map_style
infobox_type
infobox_link_target
distance_unit
radius
rankby
geoloc
places
layout
list_cols
map_cols
list_grid
hide_modal
The ID of the post to display on the map. If no ID was provided, the map will use the ID of the current post displayed.
Example: [cs_nearby_map post_ids="1"]
A string name that represent the unique ID of the map. This attribute is only required if the attribute geoloc
is set to yes
.
Please don’t use the same ID for two maps displayed on the same page. This will create unexpected conflicts between the maps!
Example: [cs_nearby_map map_id="map25"]
The center point of the map. By default, the map center will be the position of the current post or the post specified with the post_ids
attribute. To override the map center point, enter the Latitude and Longitude of the new center point, or enter the ID of another post to center the map on that location.
Example 1 (latLng coordinates): [cs_nearby_map center_at="51.510879,-0.117813"]
Example 2 (Another post ID): [cs_nearby_map center_at="10"]
The unit system to use when displaying distance. Possible values are METRIC
and IMPERIAL
.
Example: [cs_nearby_map distance_unit="IMPERIAL"]
The distance from the given location within which to search for Places, in meters. Possible value is a number from 1
to 50000
maximum.
Example: [cs_nearby_map radius="2500"]
Whether to use the map to detect the user’s location and a given address, or, to use it with a post. Possible values are yes
and no
. Default to no
.
Example: [cs_nearby_map geoloc="yes"]
The list of place types to enable. Separated by comma (,).
Find the list of all available places in the plugin settings page under the field “General settings / Place types”.
Example: [cs_nearby_map places="school,hospital"]
Display layout. Possible values are pl-mr
, ml-pr
and pt-mb
.
pl-mr
Places Left, Map Rightpr-ml
Map Left, Places Rightpt-mb
Places Top, Map Bottom
Example: [cs_nearby_map layout="pr-ml"]
The number of place types to display in a single row. Possible values are 2cols
, 3cols
, 4cols
and 6cols
.
Example: [cs_nearby_map list_grid="4cols"]
The height of the map in pixels.
Example: [cs_nearby_map height="500px"]
The width of the map. For example, 600px
or 100%
.
Example 1: [cs_nearby_map width="100%"]
Example 2: [cs_nearby_map width="600px]
The skin of the map. To get the style name, follow these steps:
- Click on the menu “Progress Map”. Wait for the page to load!
- Click on the menu “Default Map style settings”
- Select the option “Progress Map styles” in the field “Style option”
- Click the link “Demo” next to the style you like. A new page/window will open, the URL of that page/window holds the style name as the last attribute. So if the URL looks like
http://snazzymaps.com/style/42/apple-maps-esque
, the style name will beapple-maps-esque
.
Example: [cs_nearby_map map_style="apple-maps-esque"]
The initial style of the map. Possible values are ROADMAP
, SATELLITE
, TERRAIN
, HYBRID
, custom_style
.
Example: [cs_nearby_map initial_map_style="SATELLITE"]
The zoom of the map. From 0
to 19
. Default to 13
.
Example: [cs_nearby_map zoom="6"]
Show/Hide the marker overlays (infobox). Possible values are yes
and no
.
Infoboxes are not used when geoloc
is set to yes
!
Example: [cs_nearby_map show_overlay="no"]
The infobox type. Possible values are, square_bubble
, rounded_bubble
, cspm_type1
, cspm_type2
, cspm_type3
and cspm_type4
.
Example: [cs_nearby_map infobox_type="cspm_type3"]
Defines the target of the infobox link. Possible value, “same_window”, “new_window” & “disable”.
Example: [cs_nearby_map infobox_link_target="new_window"]