Closed dupuchba closed 11 years ago
Can you provide the full marker creation with the marker addition on the map & the JS ouput? Thx
here it is (the code is pretty shit but that's life... :) )
$map = $this->get('ivory_google_map.map');
$map->setPrefixJavascriptVariable('map_');
$map->setHtmlContainerId('map_canvas');
$map->setAsync(false);
$map->setCenter(46.875213, -0.296631, true);
$map->setMapOption('zoom', 8);
$map->setMapOption('mapTypeId', MapTypeId::ROADMAP);
$map->setStylesheetOptions(array(
'width' => '100%',
'height' => '500px'
));
$marker6 = $this->get('ivory_google_map.marker');
$marker6->setPrefixJavascriptVariable('marker_');
$marker6->setPosition(46.556027,0.304871, true);
$markerImage6 = $this->get('ivory_google_map.marker_image');
$markerImage6->setUrl('http://www.google.com/intl/en_us/mapfiles/ms/micons/yellow-dot.png');
$marker6->setIcon($markerImage6);
$event6 = $this->get('ivory_google_map.event');
$event6->setInstance($marker6->getJavascriptVariable());
$event6->setEventName('click');
$event6->setHandle('function(){showShopInMap("titre6")}');
$marker7 = $this->get('ivory_google_map.marker');
$marker7->setPrefixJavascriptVariable('marker_');
$marker7->setPosition(46.564791,0.356863, true);
$markerImage7 = $this->get('ivory_google_map.marker_image');
$markerImage7->setUrl('http://www.google.com/intl/en_us/mapfiles/ms/micons/yellow-dot.png');
$marker7->setIcon($markerImage7);
$event7 = $this->get('ivory_google_map.event');
$event7->setInstance($marker7->getJavascriptVariable());
$event7->setEventName('click');
$event7->setHandle('function(){showShopInMap("titre7")}');
$map->addMarker($marker6);
$map->addMarker($marker7);
$event6->setCapture(true);
$event7->setCapture(true);
$map->getEventManager()->addDomEvent($event6);
$map->getEventManager()->addDomEvent($event7);
Can you confirm me $marker6 !== $marker7
?
That's the problem, for an unknow reasons, they are the same but I set differents position...
Okay, I'm sorry but there is a BC break in the last refactos that makes it not usable in your way anymore. If you want to keep your app working, you can lock the bundle to his 1.0.0 version.
I will update the doc & UPGRADE file accordingly.
@dupuchba All should work again now :)
Cool :), thx @egeloen !
Hi @egeloen ,
I just updated the bundle and only the last one marker is displaying on the google map... which is a problem. My code is something like that: \ouse Ivory\GoogleMap\Overlays\Animation; puse Ivory\GoogleMap\Overlays\Animation;
I have 3 of them... any idea