How to dynamic custom google map in wordpress?

<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBm0uh_VRDYSFOnLewPnlmHrgiErw7GI6U"></script>

in html :

<div id="map-canvas"></div>

into main.js file :

(function(window, mapster) {

// Map Options
var options = mapster.MAP_OPTIONS,

element = document.getElementById('map-canvas'),

// Map
map = Mapster.create(element, options);
map.zoom(18);

map.addMarker({
    lat: 37.791350,
    lng: -122.435883,
    draggable: true,
    icon: 'images/map-icon.png'

});

}(window, window.Mapster || (window.Mapster = {})));

How to dynamic this type of google map in wordpress ?

Read more here: How to dynamic custom google map in wordpress?

Leave a Reply

Your email address will not be published. Required fields are marked *