neveldo / jQuery-Mapael

jQuery plugin based on raphael.js that allows you to display dynamic vector maps
https://www.vincentbroute.fr/mapael/
MIT License
1.01k stars 195 forks source link

No adequate way of changing the map #310

Closed Vortelf closed 7 years ago

Vortelf commented 7 years ago

The trigger function can't change only the map, which is stupid.

The only possible way is by

$(".mapContainer").mapael({
  map : {
    name: 'new_map',
    zoom: zoom,
    defaultPlot: defaultPlot,
    defaultArea: defaultArea
  }
})

where you have to redefine every config again.

neveldo commented 7 years ago

You are free to contribute if you want to improve it.

However, the update() event aims to update the options for the current map, it doesn't aim to change the map itself as it can be done easily by replacing the old one by the new one in the container.

Indigo744 commented 7 years ago

@Vortelf calling something "stupid" may not be the best approach to get help in an open-source project. As you may surprisingly not be aware, @neveldo is maintaining this library on his spare time, for free, without any retribution, for people like us to freely use this nice library in our website.

A little respect goes a long way.

That said, if you wish to continue the conversation in a civilized manner, I would be interested in understanding your use case (why do you need to only replace the map, and why replacing the whole container is not suitable for you?).

Thanks.