GMAP multiple markers

Home Forums Duelmotion – HTML5 Template GMAP multiple markers

This topic contains 1 reply, has 2 voices, and was last updated by  ab-themes 10 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #387

    Criatura
    Participant

    Hello,

    I’m wanting to add multiple markers on a map in the template, I went behind the plugin’s documentation, there shows one way to do this but could not figure out how to implement the map template.

    How can I do this in the template?

    Thank you.

    #391

    ab-themes
    Keymaster

    Hi,
    unfortunately it is not possible to do it directly from template.
    This is great idea for update, i will do it but can’t promise the date :)
    However if you need only one map on site and you will not change it frequently you can do it in a code in file
    wp-content/plugins/dnd-shortcodes/js/init.js
    at lines 332-343
    basically duplicate them, change variable names and enter data, so it looks like this

    var infowindow1 = new google.maps.InfoWindow({
    content: ‘Our address’
    });
    var marker1 = new google.maps.Marker({
    position: ‘42.432453,16.453232’,
    map: map,
    title: ‘Marker1 title’,
    icon: ‘URL to marker image or delet this line’
    });
    google.maps.event.addListener(marker1, ‘click’, function() {
    infowindow.open(map,marker1);
    });

    Now do this one as many times as you need. But as i said this way every map you add on page will be the same no matter what you enter in Drag and Drop tab.

    Cheers

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘GMAP multiple markers’ is closed to new replies.