Hi I think I sorted this, sorry for bothering you.
In plugin folder in the file called simple-google-map-short-code.php I changed some javascript as below.
var map_<?php echo $map_id; ?>;
function pw_run_map_<?php echo $map_id ; ?>(){
var location = new google.maps.LatLng("<?php echo $coordinates['lat']; ?>", "<?php echo $coordinates['lng']; ?>");
// Added a new variable (set your own lat and long)
var latlng = new google.maps.LatLng(52.0, -7.0);
var map_options = {
zoom: <?php echo $atts['zoom']; ?>,
Original //center: location,
// New to call variables
center: latlng,
scrollwheel: <?php echo 'true' === strtolower( $atts['enablescrollwheel'] ) ? '1' : '0'; ?>,
disableDefaultUI: <?php echo 'true' === strtolower( $atts['disablecontrols'] ) ? '1' : '0'; ?>,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map_<?php echo $map_id ; ?> = new google.maps.Map(document.getElementById("<?php echo $map_id ; ?>"), map_options);
var marker = new google.maps.Marker({
position: location,
map: map_<?php echo $map_id ; ?>
});
}
pw_run_map_<?php echo $map_id ; ?>();
Might help someone.
Jimmy
-
This reply was modified 8 years, 1 month ago by
tag101.