default map center to france
This commit is contained in:
@@ -64,7 +64,7 @@ add_filter('script_loader_tag', 'mp_tag_scripts', 10, 2);
|
||||
|
||||
|
||||
/**
|
||||
* when 'shortcode' in page, replace by 'return'
|
||||
* when 'shortcode' found in page, replace by return
|
||||
*/
|
||||
|
||||
function mp_add_div() {
|
||||
|
||||
@@ -7,12 +7,16 @@ function mp_init_map() {
|
||||
* - let icon_size[x, y]
|
||||
*/
|
||||
|
||||
// default map center to france
|
||||
let map_center = {lat:46.227638, lng:2.213749};
|
||||
if (locations.length > 0)
|
||||
map_center = locations[0];
|
||||
let map = new google.maps.Map(
|
||||
document.getElementById("ljdp_map"),
|
||||
{
|
||||
zoom: 5,
|
||||
disableDefaultUI: true,
|
||||
center: locations[0],
|
||||
center: map_center,
|
||||
}
|
||||
);
|
||||
let marker, icon, label;
|
||||
|
||||
Reference in New Issue
Block a user