Is it possible to plot multiple locations on the map?

Asked by streetdaddy on 2009-12-02

I would like to plot multiple addresses on the map with an automatic zoom level that encompasses all points.

Is this possible or could I extend the extension to do this?

Question information

English Edit question
Yii GeoCoder Extension Edit question
Brian Armstrong Edit question
Solved by:
Last query:
Last reply:

As of version 1.0.4 it is now possible to render multiple results to the same map.

Please see this FAQ article for more details on how to accomplish this:

Brian Armstrong suggests this article as an answer to your question:
FAQ #845: “Can I render multiple points to the same map?”.


streetdaddy (streetdaddy) said : #4

Sorry for the delayed response, I've only just started playing with the new version.

Would it be possible to add intelligent zoom similar to the work-around described here:

streetdaddy (streetdaddy) said : #5

I've made some simple changes to be able to insert javascript that will automatically zoom to contain all points.

 - Only works with map type google
 - Only use with multiple points
 - Rush job so not perfect

See patch here: (for 1.0.4 only)

Example use (after multiple points have been rendered):

$result[0]->renderMap('my_map', array(
                    'mapTypeId' => 'ROADMAP',
                    'zoom' => 8



I like your implementation. It looks like you have spent some time going over my code and seeing how it works. Your solution is also clean and straightforward. I think I will integrate this into the next release. Thank you.

I'm not sure when the next release will be, though. I have some other projects that I need to focus on, so this one is slightly on the back burner at the moment.

streetdaddy (streetdaddy) said : #7

Cheers Brian, I'm glad you liked it. I'll be sure to contribute back any additions i make. I really like what you've created, it's perfect for my needs and easy to add more features and other map drivers.

That's exactly how I tired to design it. I am glad that it is useful to someone else and fulfills the purpose of it's creation.