Group Marker MapQuest

4 posts / 0 new
Last post
Group Marker MapQuest


I'm a french guy and i'll try to explain my problem :) 

I use API MAPquest, no problem to integrate it to my website. 


But i have some many marker on my map and want to group it : 

my map :

i want :

and when i click on a marker, make a zoom and pop markers in this zone 


My code :

window.onload = function() {

    L.mapquest.key = 'myKey';


    var map ='map', {

    center: [45.75, 4.85],

    layers: L.mapquest.tileLayer('map'),

    zoom: 12



    ajaxGet("", function (reponse) {

        // Transforme la réponse en un tableau d'articles

        var listePoints = JSON.parse(reponse);    


   for (var i = listePoints.length - 1; i >= 0; i--) {

    L.marker([listePoints[i], listePoints[i].position.lng], {

          icon: L.mapquest.icons.marker(),

          draggable: false







ty ! 




i see my response, ty ! :)

My favorite is marker
My favorite is marker clusters (I've used it often). But I've also used heat maps (a few times) and canvas (once).

But now

But now

When i click on a marker i want to know is attribute 

How can i make this ? 


I try : 


var titre = this.alt;




but nothing 

Here is how I grabbed the

Here is how I grabbed the marker's icon.


[marker].on("click", function(evt){console.log(;})