<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Zoom To Fit All Markers on Google Maps API v3</title>
	<atom:link href="http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/</link>
	<description>Personal blog of Shane Preece. Occaisional politics and tech minddump.</description>
	<lastBuildDate>Thu, 01 Dec 2011 14:01:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Eddie</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-415</link>
		<dc:creator>Eddie</dc:creator>
		<pubDate>Thu, 17 Nov 2011 11:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-415</guid>
		<description>Great tip! Saved me a headache, thankyou :)</description>
		<content:encoded><![CDATA[<p>Great tip! Saved me a headache, thankyou :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ivan g.</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-381</link>
		<dc:creator>ivan g.</dc:creator>
		<pubDate>Mon, 24 Oct 2011 06:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-381</guid>
		<description>Great! Very helpful.
I will use it in my code. Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Great! Very helpful.<br />
I will use it in my code. Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rizwan</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-380</link>
		<dc:creator>Rizwan</dc:creator>
		<pubDate>Mon, 24 Oct 2011 05:29:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-380</guid>
		<description>Nice one.
Happy coding.</description>
		<content:encoded><![CDATA[<p>Nice one.<br />
Happy coding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prateek Jain</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-370</link>
		<dc:creator>Prateek Jain</dc:creator>
		<pubDate>Wed, 12 Oct 2011 06:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-370</guid>
		<description>This works !!

Thanks</description>
		<content:encoded><![CDATA[<p>This works !!</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-355</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Tue, 27 Sep 2011 22:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-355</guid>
		<description>A big help.  Thank you.</description>
		<content:encoded><![CDATA[<p>A big help.  Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: giovanni</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-349</link>
		<dc:creator>giovanni</dc:creator>
		<pubDate>Sun, 25 Sep 2011 14:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-349</guid>
		<description>thanks, worked perfect!</description>
		<content:encoded><![CDATA[<p>thanks, worked perfect!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nariman</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-321</link>
		<dc:creator>Nariman</dc:creator>
		<pubDate>Mon, 08 Aug 2011 08:08:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-321</guid>
		<description>If you have a list of markers and want to zoom and center them on screen, you can also keep extending bounds object while adding markers to list. So when you want to center map, you will not need to loop all markers again. Good luck

var fMapBounds = new google.maps.LatLngBounds(); 
function PlotMarker(Position) { //add a marker to map
        var latlng = new google.maps.LatLng(Position.Longitude);
        var googMarker = new google.maps.Marker({
            position: latlng,
            map: map,
        });
        fMapBounds.extend();
        return googMarker;
    }

function CenterMap() { //just fit it
        if (fMapBounds!= undefined) {
            map.fitBounds(fMapBounds);
        }
    }</description>
		<content:encoded><![CDATA[<p>If you have a list of markers and want to zoom and center them on screen, you can also keep extending bounds object while adding markers to list. So when you want to center map, you will not need to loop all markers again. Good luck</p>
<p>var fMapBounds = new google.maps.LatLngBounds();<br />
function PlotMarker(Position) { //add a marker to map<br />
        var latlng = new google.maps.LatLng(Position.Longitude);<br />
        var googMarker = new google.maps.Marker({<br />
            position: latlng,<br />
            map: map,<br />
        });<br />
        fMapBounds.extend();<br />
        return googMarker;<br />
    }</p>
<p>function CenterMap() { //just fit it<br />
        if (fMapBounds!= undefined) {<br />
            map.fitBounds(fMapBounds);<br />
        }<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudhakar</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-95</link>
		<dc:creator>Sudhakar</dc:creator>
		<pubDate>Thu, 16 Jun 2011 10:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-95</guid>
		<description>This is exactly what I was looking for... Thanks!</description>
		<content:encoded><![CDATA[<p>This is exactly what I was looking for&#8230; Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-93</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 19 Apr 2011 13:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-93</guid>
		<description>Thanks, this trick worked in V3!</description>
		<content:encoded><![CDATA[<p>Thanks, this trick worked in V3!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dibujando rutas en Google Maps &#124; Scipion Strikes Back</title>
		<link>http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/#comment-92</link>
		<dc:creator>Dibujando rutas en Google Maps &#124; Scipion Strikes Back</dc:creator>
		<pubDate>Mon, 14 Mar 2011 20:28:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.shamess.info/?p=809#comment-92</guid>
		<description>[...] visto en: http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/ [...] </description>
		<content:encoded><![CDATA[<p>[...] visto en: <a href="http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/" rel="nofollow">http://blog.shamess.info/2009/09/29/zoom-to-fit-all-markers-on-google-maps-api-v3/</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

