dustin10 / VichGeographicalBundle

A Symfony2 bundle which provides geographical features for ORM and ODM entities and object oriented javascript maps rendering.
104 stars 26 forks source link

Multiple maps #25

Closed Sydney-o9 closed 12 years ago

Sydney-o9 commented 12 years ago

This bundle is absolutely amazing!

Is there a way to plot multiple maps instead of plotting all the markers on one map. Is this already possible?

The only way I can think of is having

{% for location in locations %}

{{ vichgeo_map_for('location', location) }}

{% endfor %}

The thing is that in LocationMap, we have:

$this->setContainerId('map_canvas');

Should I override MapHelper::prepareAndRender()?

I was just wondering if there is a way to dynamically render a map for each iteration in the loop.

Many thanks for sharing this stunning bundle.

dustin10 commented 12 years ago

There is no built in support for this right now. The only thing I can think of is instead of using the twig helper you could build the maps in the controller setting different container ids and then pass them to the twig template. Even then you may have to set some other unique values so that the javascript doesnt conflict.

Sydney-o9 commented 12 years ago

Thanks Dustin! I'll give this a try :-)