Issue
i've an little AddressDB with about 100 Addresses. So now i added the Helpper from https://github.com/marcferna/CakePHP-GoogleMapHelper.
I know how i can add on address to the view. But how do i add all the addresses to one map?
Can every help me please?
Many thanks in advance
Marcus
Solution
Why are you adding a comma?
<?php $this->GoogleMap->addMarker("map_canvas",1, $atla['Atla']['street'].' '.$atla['Atla']['number'].', '.$atla['Atla']['zipcode'].' '.$atla['Atla']['city'],$atla['Atla']['name'])?> <?php endforeach; ?>
should probably be
<?php $this->GoogleMap->addMarker("map_canvas",1, $atla['Atla']['street'].' '.$atla['Atla']['number'].', '.$atla['Atla']['zipcode'].' '.$atla['Atla']['city'].','.$atla['Atla']['name'])?> <?php endforeach; ?>
But: How about http://www.dereuromark.de/2010/12/21/googlemapsv3-cakephp-helper/ ? It is probably a more complete alternative.
As documented you can use
$this->GoogleMapV3->addMarker($options);
any many times as you want. I tried it with 500 and - although at this point you might want to switch to clusters - it still worked.
Answered By - mark Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.