This plugin makes it easy to add Google Maps to your WordPress post, pages or other custom post types.
Type: int|string
Default: WordPress default embed width
Type: int|string
Default: WordPress default embed height
Type: array|json
Default: array()
Type: array|json
Default: array()
Type: boolean
Default: false
[googlemaps width="250" height="250" static="true" label="M" color="orange"]
Type: boolean
Default: false
Type: char
Default: null
Type: string
Default: null
Examples: 0xFFFFCC
, black
, brown
See for information about styling markers the "Marker Styles" section on https://developers.google.com/maps/documentation/static-maps/intro#MarkerStyles.
Type: string
Default: null
Type: string
Default: roadmap
Map style, can be: roadmap
, satellite
, hybrid
, terrain
.
Type: float
Default: 0
Latitude value for the map center, only works if fit_bounds
is set to false
.
Type: float
Default: 0
Longitude value for the map center, only works if fit_bounds
is set to false
.
Type: int
Default: 8
Type: boolean
Default: true
Type: string|array
Default: array
For all cluster marker options see the MarkerClustererOptions section on the MarkerClustererPlus documentation page.
Example: maxZoom=15&gridSize=30
Type: string|array
Default: array
For all overlapping marker spiderfier options check the https://github.com/jawj/OverlappingMarkerSpiderfier page.
Example: markersWontMove=true&markersWontHide=true
<?php
if ( function_exists( 'pronamic_google_maps' ) ) {
pronamic_google_maps( array(
'width' => 800,
'height' => 800,
'map_options' => array(
'minZoom' => 5,
'maxZoom' => 10,
),
) );
}
Type: int|string
Default: WordPress default embed width
Type: int|string
Default: WordPress default embed height
Type: boolean
Default: false
Type: string
Default: null
The label
parameter is only available for Static Maps, for more information
see the Marker Styles section
of the Static Maps documentation page.
Type: string
Default: null
Type: boolean
Default: true
Type: array
Default: array()
For all marker options see the MarkerOptions section on the Google Maps JavaScript API documentation page.
Type: array
Default: array()
For all map options see the MapOptions section on the Google Maps JavaScript API documentation page.
<?php
if ( function_exists( 'pronamic_google_maps_mashup' ) ) {
pronamic_google_maps_mashup(
array(
'post_type' => 'post',
'posts_per_page' => 50,
),
array(
'width' => 800,
'height' => 800,
'map_type_id' => 'satellite',
'latitude' => 52,
'longitude' => 8,
'zoom' => 4,
'fit_bounds' => false,
)
);
}
Type: int|string
Default: WordPress default embed width
Type: int|string
Default: WordPress default embed height
The Pronamic Google Maps plugin has built-in support for the Overlapping Marker Spiderfier library.
This library will be enabled if you pass in the overlapping_marker_spiderfier_options
argument in the mashup arguments, see example below.
<?php
if ( function_exists( 'pronamic_google_maps_mashup' ) ) {
pronamic_google_maps_mashup(
array(
'post_type' => 'post',
'posts_per_page' => 50,
),
array(
'width' => 800,
'height' => 800,
'overlapping_marker_spiderfier_options' => array(
'markersWontMove' => false,
'markersWontHide' => false,
'keepSpiderfied' => false,
'nearbyDistance' => 20,
'circleSpiralSwitchover' => 9,
'legWeight' => 1.5,
),
)
);
}