<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3140844186062207174</id><updated>2012-01-30T20:00:53.511-08:00</updated><category term='v3'/><title type='text'>Google Maps API tricks</title><subtitle type='html'>This is my notebook for Google Maps API code snippets and tricks. I collect them from the forum, from other people's source code and sometimes create by myself.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>58</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-580118270966172416</id><published>2011-05-08T18:06:00.000-07:00</published><updated>2011-05-08T18:24:21.502-07:00</updated><title type='text'>Zoom tooltip hack</title><content type='html'>Average users don't care about zoom level numbers, but some people do. Developers do.&lt;br /&gt;&lt;br /&gt;I created a 'semihidden' zoom level display for my pages. Google provides hints like "zoom in" and "zoom out" if you hover the zoom control element (slider). I thought that average map users already know those things.&lt;br /&gt;&lt;br /&gt;Try hovering zoom slider of the first &lt;a href="http://koti.mbnet.fi/ojalesa/quadtree/quadtree_intro.htm"&gt;quadtree example page&lt;/a&gt;. Yes, hovering the zoom slider will display also meters/px resolution. That is an extra bonus for those who are interested in the World.&lt;br /&gt;&lt;br /&gt;Have a look in the source code. It is commented there as "zoom tooltip hack". Feel free to copy the hack, if you like it. You can molest the code any way you like.&amp;nbsp; Shall this post be the license.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-580118270966172416?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/580118270966172416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=580118270966172416' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/580118270966172416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/580118270966172416'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2011/05/zoom-tooltip-hack.html' title='Zoom tooltip hack'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-7355743818762704132</id><published>2011-05-05T18:27:00.000-07:00</published><updated>2011-05-05T18:30:19.956-07:00</updated><title type='text'>Distance Matrix</title><content type='html'>&lt;a href="http://code.google.com/apis/maps/documentation/javascript/services.html#distance_matrix"&gt;Distance Matrix service&lt;/a&gt; was introduced in the latest update of v3 API. It returns maximum 100 driving distances and durations by a single request. &lt;a href="http://code.google.com/apis/maps/documentation/javascript/reference.html#DistanceMatrixService"&gt;Reference&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;All of you who have a store locator, can now add true driving distances and estimated driving times in search results. Also you can filter out results that exceed a distance limit. If user searches by 100 km radius, you may want to return only results that have a true driving distance less than 100 km.&lt;br /&gt;&lt;br /&gt;It is like driving directions without directions. Some people have tried to implement something similar by making multiple driving distance requests. Many of them faced problems with the asynchronous responses not coming back in the same order that requests were made. The new service is very simple to use.&lt;br /&gt;&lt;br /&gt;It has travelMode option too. So it can be used for walking distances in city maps.&lt;br /&gt;&lt;br /&gt;This is a useful service.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-7355743818762704132?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/7355743818762704132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=7355743818762704132' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7355743818762704132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7355743818762704132'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2011/05/distance-matrix.html' title='Distance Matrix'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-7608729483909272717</id><published>2011-04-28T18:32:00.000-07:00</published><updated>2011-04-28T18:37:10.862-07:00</updated><title type='text'>Quadtree</title><content type='html'>Quadtree is a powerful spatial indexing technique. &lt;a href="http://en.wikipedia.org/wiki/Quadtree"&gt;Wikipedia&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Every now and then I been thinking to implement a collision detect function using quadtree. Playing with quadtrees is so fascinating that I haven't got as far as collision detect, but I have a simple general &lt;a href="http://koti.mbnet.fi/ojalesa/quadtree/quadtree_intro.htm"&gt;quadtree demo page&lt;/a&gt; online. Play with it. It's inspiring.&lt;br /&gt;&lt;br /&gt;If you are interested in experimenting, I enclosed the basic functions in &lt;a href="http://koti.mbnet.fi/ojalesa/quadtree/quadtree.js"&gt;QT.js library&lt;/a&gt;. The collision detector will be there too but I have some different applications in mind first.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-7608729483909272717?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/7608729483909272717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=7608729483909272717' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7608729483909272717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7608729483909272717'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2011/04/quadtree.html' title='Quadtree'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-2076364985831293410</id><published>2011-03-14T13:45:00.000-07:00</published><updated>2011-03-14T13:48:39.912-07:00</updated><title type='text'>Category sidebar - there is no sense without priority</title><content type='html'>Thanks for many of you that been applying the category sidebar script I wrote a long time ago for v2. Sure It works on desktop but what happens if all the entries don't fit in the limited viewport of a mobile browser?&lt;br /&gt;&lt;br /&gt;Web has changed since. Now we have to make pages that can be used by mobile browsers too. The screen size can be equal or smaller to the first Mac.&lt;br /&gt;&lt;br /&gt;The idea of 'gategory' is still living strong. I have extended makeMarker so that each marker has a 'cat' property. If you click one category visible, all those markers and their sidebar entries do not simply fit in view in iPhone. Also remember that mobile 'touch' devices do not support scrollbars at all. They simply cut the material! (People are shouting about Flash, hehe!)&lt;br /&gt;&lt;br /&gt;We have to bring one more parameter to a marker - that is priority. In my current design, the default priority is the distance from map center.&lt;br /&gt;&lt;br /&gt;The smallest mobile screen can display a sidebar with a few (&amp;lt;10) entries. You have to decide, which of those 1000 they are.&lt;br /&gt;&lt;br /&gt;Ideas?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-2076364985831293410?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/2076364985831293410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=2076364985831293410' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2076364985831293410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2076364985831293410'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2011/03/category-sidebar-there-is-no-sense.html' title='Category sidebar - there is no sense without priority'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-4409761508658976562</id><published>2010-12-10T18:12:00.000-08:00</published><updated>2010-12-11T03:19:14.926-08:00</updated><title type='text'>v3 Marker z-index, the way I thought it was</title><content type='html'>&lt;b&gt;The way it is &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Marker.getZindex() returns 'undefined' if you did not set any value for it. Looking under the hood reveals that actually there is a latitude dependent value set for the marker DOM element. The value seems to be equal to 'top' position of the marker in map container. That is clever. It takes care that markers are displayed in right order by latitude (South on front). But why is the value not returned?&lt;br /&gt;&lt;br /&gt;Set any value for Marker z-index. Now getZIndex() returns the value and that set for the Marker DOM element. So setting a z-index value of your own ruins the order set by API.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The way it might be &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;User z-index and actual DOM z-index should be separated.&lt;br /&gt;&lt;br /&gt;Markers should have the default DOM z-index as it is now. &lt;br /&gt;&lt;br /&gt;Marker.getZindex() should return zero if you did not set any z-index.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: red;"&gt;&lt;span style="font-size: small;"&gt;Setting a z-index value would be added to the default value.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;So user z-index would be relative to the actual DOM value.&lt;br /&gt;&lt;br /&gt;API would take care of order by latitude (of overlays with equal z-index) like it currently does without any z-index settings.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Why&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;That would make the zIndex property of Marker, Circle, InfoWindow etc much easier to use. Currently you have to rewrite all the z-index values if you want to raise z-index of a single marker..&lt;br /&gt;&lt;br /&gt;I have a feeling that it was originally meant to work that way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-4409761508658976562?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/4409761508658976562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=4409761508658976562' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4409761508658976562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4409761508658976562'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/12/v3-marker-z-index-way-i-thought-it-was.html' title='v3 Marker z-index, the way I thought it was'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-6793226437239180389</id><published>2010-10-16T11:16:00.000-07:00</published><updated>2010-10-16T11:46:18.588-07:00</updated><title type='text'>Automatic API v3 reference</title><content type='html'>I have a test page that analyzes contents of google.maps namespace. I've had it for a long time. The trouble was that controlling the version needed some hackery with v3. Now when the version control was released, I decided to polish and share the page. Actually it is a site of three pages, one for each version. &lt;a href="http://koti.mbnet.fi/ojalesa/v3/v3_methods_frozen.htm"&gt;Frozen&lt;/a&gt; (3.0), &lt;a href="http://koti.mbnet.fi/ojalesa/v3/v3_methods_release.htm"&gt;Release&lt;/a&gt; (3.1) and &lt;a href="http://koti.mbnet.fi/ojalesa/v3/v3_methods_nightly.htm"&gt;Nightly&lt;/a&gt; (3.2).&lt;br /&gt;&lt;br /&gt;API v2 is from 2005 and no namespace thinking was applied. The constructors and all the stuff that v2 offers is introduced in global scope. I never faced any troubles with that but nowadays some people like it as 'bad programming practice'. Actually it really was much trickier to write a similar test page for v2. Global scope (window) has a lot of stuff that is introduced by the browser and must be filtered.&lt;br /&gt;&lt;br /&gt;The test page scans google.maps object by a for-in loop. No rubbish is found and no additional filtering is needed. The results contain the constructors and some objects. Those are listed on page and also on the index in the header. All the members that were found are scanned by a for-in loop again. This time looking inside prototype objects. If prototype is not found, the object itself is looped. Resulting properties are listed in a row.&lt;br /&gt;&lt;br /&gt;The pages are coded for Firefox only. Firefox presents some unique features for this kind of work. One of them is .toSource() method of Object. It creates a string representation of source code. Firefox presents source code in nice prettyprinted format in alert() dialog box.&lt;br /&gt;&lt;br /&gt;With Firefox, you can click any listed method on page and see its internal code. Also there are links to search the method name from documentation, API forum or Google Code Search.&lt;br /&gt;&lt;br /&gt;The resulted listing proves that API v3 is written following good programming practices. Almost no internal variables are leaking. The internal source code of the constructors and their methods doesn't reveal much. Still it is worth exploring, you always find something that deepens your understanding about API.&lt;br /&gt;&lt;br /&gt;The documentation practice of v3 is different to v2 in the way that there are not many undocumented methods in v3. Still you can find some. Today I saw some new methods of Marker.&lt;br /&gt;&lt;br /&gt;You can use the pages for comparing versions. Yes, they are documented separately but still you can find something meaningful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-6793226437239180389?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/6793226437239180389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=6793226437239180389' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/6793226437239180389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/6793226437239180389'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/10/automatic-api-v3-reference.html' title='Automatic API v3 reference'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-4703756768294915030</id><published>2010-04-27T17:43:00.000-07:00</published><updated>2010-04-27T17:49:32.587-07:00</updated><title type='text'>Circle in v3</title><content type='html'>Circle object of v3 creates a circular overlay as expected. It is more useful than I first thought.&lt;br /&gt;&lt;br /&gt;If you want to zoom your map to show an area of say 50 km radius, that would mean some maths. Create a Circle() of 50 km radius and take its bounds by now provided getBounds(). You can use the bounds to zoom the map by fitBounds(). No calculations needed. &lt;a href="http://koti.mbnet.fi/ojalesa/v3/circleAndBounds.htm"&gt;An example&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Circle can be used as a marker as well. It is clickable and it works as an anchor for InfoWindow. Marker keeps its size when you zoom. Circle does not but Circle has a minimum size based on stroke width. That is actually nice behavior in many cases. Now there is an &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/makemarker_circle.htm"&gt;updated version of makeMarker()&lt;/a&gt;. It creates a Circle instead of Marker if you set any value to 'radius' option.&lt;br /&gt;&lt;br /&gt;'title' option does not create a flyover tooltip. However Circle supports all the usual mouse events. So you can create a custom tooltip for the purpose.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-4703756768294915030?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/4703756768294915030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=4703756768294915030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4703756768294915030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4703756768294915030'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/04/circle-in-v3.html' title='Circle in v3'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-5954706076002075581</id><published>2010-02-21T20:13:00.000-08:00</published><updated>2010-02-21T20:13:05.418-08:00</updated><title type='text'>Custom icons</title><content type='html'>Just discovered a &lt;a href="http://code.google.com/p/google-maps-icons/"&gt;custom icon collection project&lt;/a&gt; on Google Code. There are more than 900 icons this far.&lt;br /&gt;&lt;br /&gt;It would be nice if those were provided in sprite format. Happily there are sprite-making services. &lt;a href="http://spriteme.org/"&gt;SpriteMe&lt;/a&gt; is the most advanced of those.&lt;br /&gt;&lt;br /&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-5954706076002075581?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/5954706076002075581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=5954706076002075581' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5954706076002075581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5954706076002075581'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/02/custom-icons.html' title='Custom icons'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-8915399631111502974</id><published>2010-02-08T17:23:00.000-08:00</published><updated>2010-02-08T17:23:37.130-08:00</updated><title type='text'>clearOverlays() in V3</title><content type='html'>There is no clearOverlays() in API v3. Some practices have been presented. I think this is the simpliest so far.&lt;br /&gt;&lt;br /&gt;Push all the overlays in an array when created (as usual). Following code will clear both map and the array:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; while(overlays[0]){&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp; overlays.pop().setMap(null);&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; }&lt;/div&gt;&lt;br /&gt;pop() method of an array  removes the last element of an array, and returns that element. 'while' keeps that happening as long as there are elements in the array. When overlays[0] does not exist anymore, the mission is completed and code will proceed.&lt;br /&gt;&lt;br /&gt;Applied in the &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/rectangle.htm"&gt;example&lt;/a&gt; of the previous post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-8915399631111502974?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/8915399631111502974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=8915399631111502974' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8915399631111502974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8915399631111502974'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/02/clearoverlays-in-v3.html' title='clearOverlays() in V3'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-1509977583870429581</id><published>2010-02-08T17:00:00.000-08:00</published><updated>2010-02-08T17:00:22.640-08:00</updated><title type='text'>Rectangle() and Circle() of V3</title><content type='html'>API v3.28 has new constructors&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; new google.maps.Rectangle();&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; new google.maps.Circle();&lt;/div&gt;&lt;br /&gt;Dimensioning and positioning is set by bounds (Rectangle) or by center and radius (Circle). Circle radius is given in meters. Those can be set as options or by special methods setBounds(), setCenter() and setRadius().&amp;nbsp; They are &lt;a href="http://code.google.com/apis/maps/documentation/v3/reference.html#Rectangle"&gt;documented&lt;/a&gt; already.&lt;br /&gt;&lt;br /&gt;getBounds() for Circle would be a useful method that is missing.&lt;br /&gt;&lt;br /&gt;Altogether those are very handy classes and we can forget my boundsbox.js library in most cases. Image overlaying is still a perfect task for boundsbox.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/rectangle.htm"&gt;Quickly testing Rectangle()&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-1509977583870429581?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/1509977583870429581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=1509977583870429581' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/1509977583870429581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/1509977583870429581'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/02/rectangle-and-circle-of-v3.html' title='Rectangle() and Circle() of V3'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-8780906222064067951</id><published>2010-01-22T18:26:00.000-08:00</published><updated>2010-01-23T07:10:17.406-08:00</updated><title type='text'>Suggesting geocoder [3]</title><content type='html'>From the previous post: "Next logical step of development will be to display all the alternative addresses as a selectable list."&lt;br /&gt;&lt;br /&gt;While developing, I found this kind of user interface very handy. You can even learn something new while typing. I like it better than classic maps.google.com.&lt;br /&gt;&lt;br /&gt;Maybe I should give a hint to maps.google.com people:)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/geocode_basic_3.htm"&gt;Play with it&lt;/a&gt; and comment please.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;joke&amp;gt;&lt;br /&gt;Many geocoders recognize a placename "undefined".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-8780906222064067951?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/8780906222064067951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=8780906222064067951' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8780906222064067951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8780906222064067951'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/01/suggesting-geocoder-3.html' title='Suggesting geocoder [3]'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-226958878696160975</id><published>2010-01-21T12:45:00.000-08:00</published><updated>2010-01-21T13:24:48.157-08:00</updated><title type='text'>Buttonless geocoder [2]</title><content type='html'>Google's geocoding service is enhanced continuously. It doesn't read your thoughts yet but it is quite forgiving with typos and missing characters.&lt;br /&gt;&lt;br /&gt;Now you can see the geocoding result after every character you type in the &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/geocode_basic_2.htm"&gt;new geocoder experiment&lt;/a&gt;. When you agree with the result in the display, click outside text field or hit Tab or Enter (not IE) and the map is updated too.&lt;br /&gt;&lt;br /&gt;So the geocoding request is sent by 'keyup' and map is set by 'change' events of text input field. Clicking on map does not blur the text field and does not trigger 'change'. That is still waiting for a great idea.&lt;br /&gt;&lt;br /&gt;Some people can type damn fast. Therefore the geocoding requests are limited to maximum three requests per second.&lt;br /&gt;&lt;br /&gt;The 'hint' display shows the first address of the response set. Next logical step of development will be to display all the alternative addresses as a selectable list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-226958878696160975?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/226958878696160975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=226958878696160975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/226958878696160975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/226958878696160975'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/01/buttonless-geocoder-2.html' title='Buttonless geocoder [2]'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-1360971616831670232</id><published>2010-01-17T06:12:00.000-08:00</published><updated>2010-01-17T06:38:28.999-08:00</updated><title type='text'>Custom map types in v3</title><content type='html'>The latest version update (3.25) introduced custom map types for api v3. The &lt;a href="http://code.google.com/apis/maps/documentation/v3/overlays.html#CustomMapTypes"&gt;interface&lt;/a&gt; is nice. If you are familiar with custom tile sets in v2, there are not many new things to learn. There are three types of custom tile based map types.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Image map type, like Open Streetmap tiles in the &lt;a href="http://koti.mbnet.fi/ojalesa/v3/osm_dual.htm"&gt;example page&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Image overlay map type, like the Traffic tiles in the example page&lt;/li&gt;&lt;li&gt;Non-image tile based map type&lt;/li&gt;&lt;/ul&gt;Image Map Type behaves just like the standard map types. Image Overlay tiles are displayed on top of the Image Map Types. Both of them can be created using ImageMapType class. The difference is how you add the map type to your map. Either to mapTypes registry or to overlayMapTypes MVCArray. Both of them are properties of Map.&lt;br /&gt;&lt;br /&gt;The non-image map type makes it possible to create tile layers with SVG, canvas or any html elements.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-1360971616831670232?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/1360971616831670232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=1360971616831670232' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/1360971616831670232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/1360971616831670232'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2010/01/custom-map-types-in-v3.html' title='Custom map types in v3'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-6022803577623838345</id><published>2009-12-08T20:33:00.000-08:00</published><updated>2009-12-08T20:48:16.965-08:00</updated><title type='text'>Geocoder without Search button</title><content type='html'>We are used to see geocoders with address input field and [Search] button.&lt;br /&gt;&lt;br /&gt;We can discard the button and use 'onchange' event of the input field instead.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/geocode_basic_plain.htm"&gt;It works quite well&lt;/a&gt;. Just type in the address and click anywhere on the page. Well not anywhere because click on map is preventDefaulted. Hitting [Enter] key works too. @M$: please don't file a patent application.&lt;br /&gt;&lt;br /&gt;Text input field can also be used for showing how the geocoder actually understood the address.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/geocode_basic.htm"&gt;Full example&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-6022803577623838345?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/6022803577623838345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=6022803577623838345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/6022803577623838345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/6022803577623838345'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/12/geocoder-without-search-button.html' title='Geocoder without Search button'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-820435436746739000</id><published>2009-12-07T11:52:00.000-08:00</published><updated>2009-12-07T12:40:01.073-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='v3'/><title type='text'>Sidebar with makeMarker() v3</title><content type='html'>Wouldn't that be convenient if makeMarker(options) would construct a sidebar entry as well. &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/makemarker_sidebar.htm"&gt;See it here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A separate SidebarItem() constructor was written. It creates a button element and appends that to a div with id="sidebar" by default. makeMarker() calls the constructor if you have set an option property {sidebarItem: "My label"}&lt;br /&gt;&lt;br /&gt;The basic button element needs some CSS cure. You can also style individual sidebar items  by setting different CSS class names for them. {sidebarItemClassName: "important_item"}&lt;br /&gt;&lt;br /&gt;The events are set to work bidirectionally.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;click on sidebar -&gt; click on marker&lt;/li&gt;&lt;li&gt;select on sidebar -&gt; click on marker (select by [Tab])&lt;br /&gt;&lt;/li&gt;&lt;li&gt;click on marker -&gt; focus on sidebar&lt;/li&gt;&lt;li&gt;mouseover on sidebar -&gt; mouseover on marker&lt;/li&gt;&lt;li&gt;mouseout on sidebar -&gt; mouseout on marker&lt;/li&gt;&lt;/ul&gt;One of the reasons why I selected a button element was that it is 'focusable' and 'selectable'. You can open an info window by stepping the focus to a sidebar item by [Tab] or [Shift]+[Tab] and select the item by [Enter] or [Space] (some browsers). That is called accessibility.&lt;br /&gt;&lt;br /&gt;Also you can use :hover and :focus CSS pseudoselectors. (:focus does not work with IE)&lt;br /&gt;&lt;br /&gt;SidebarItem() instance  has methods addIn() and remove(). We need addIn() to decide where to add the item. That helps to implement the categories.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-820435436746739000?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/820435436746739000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=820435436746739000' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/820435436746739000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/820435436746739000'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/12/sidebar-with-makemarker-v3.html' title='Sidebar with makeMarker() v3'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-8648487787680489142</id><published>2009-11-26T03:31:00.000-08:00</published><updated>2009-11-26T04:08:43.332-08:00</updated><title type='text'>v3 markers and info windows</title><content type='html'>v3 constructors like Marker(opts) and InfoWindow(opts)  take an options object as their single parameter.&lt;br /&gt;&lt;br /&gt;How about composing a createMarker(opts) function that also takes a single options object and creates both Marker and Infowindow.&lt;br /&gt;&lt;br /&gt;Marker and InfoWindow options have 'position' and 'zIndex' properties in common. All the other property names are unique.&lt;br /&gt;&lt;br /&gt;You have to give 'position' for a Marker. Giving the same position to InfoWindow has no effect if InfoWindow.open() is given an anchor.&lt;br /&gt;&lt;br /&gt;There is no need to set zIndex of InfoWindow if you are using just a single instance of InfoWindow. It even doesn't have any visible effect. So we can freely use zIndex to control the marker.&lt;br /&gt;&lt;br /&gt;There was no need to convert any property names. makeMarker(opts) function can be seen &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/makemarker.htm"&gt;in action here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The single options object can further be extended to include new properties like 'category' and 'sidebarLabel'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-8648487787680489142?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/8648487787680489142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=8648487787680489142' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8648487787680489142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8648487787680489142'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/11/v3-markers-and-info-windows.html' title='v3 markers and info windows'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-2126360291023112626</id><published>2009-10-14T04:05:00.000-07:00</published><updated>2009-10-14T04:36:23.076-07:00</updated><title type='text'>Custom tooltip for v3</title><content type='html'>v3 BoundsBox library provides constructors to create a rectangular overlay &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/v3boundsbox.htm"&gt;by LatLngBounds&lt;/a&gt; or by LatLng plus &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/kmbox.htm"&gt;km-dimension&lt;/a&gt; (also miles or nautic miles). You can also &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/imagebox.htm"&gt;overlay images&lt;/a&gt; that scale with zoom.&lt;br /&gt;&lt;br /&gt;It is still missing an overlay with pixel dimensions. For tooltips and other labeling. &lt;a href="http://koti.mbnet.fi/ojalesa/boundsbox/tiptool_trains.htm"&gt;It is coming&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I haven't included the 'tiptool' to BoundsBox library yet. There are a few things still under development.&lt;br /&gt;&lt;br /&gt;I am impressed with 'universional' concept of a library that &lt;a href="http://notebook.kulchenko.com/maps/google-maps-using-multiple-api-versions"&gt;Paul Kulchenko&lt;/a&gt; has implemented. He has written some impressive Canvas experiments that work with v2 and v3 with one and only script.&lt;br /&gt;&lt;br /&gt;That is the way that Google Maps API libraries should be written.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-2126360291023112626?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/2126360291023112626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=2126360291023112626' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2126360291023112626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2126360291023112626'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/10/custom-tooltip-for-v3.html' title='Custom tooltip for v3'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-2472715815811605987</id><published>2009-09-24T07:29:00.000-07:00</published><updated>2009-09-25T01:49:36.274-07:00</updated><title type='text'>Gecoder response structure</title><content type='html'>I made simple test pages for &lt;a href="http://koti.mbnet.fi/ojalesa/geocode/prettygeocode_v2.htm"&gt;version 2&lt;/a&gt; and &lt;a href="http://koti.mbnet.fi/ojalesa/geocode/prettygeocode_v3.htm"&gt;version 3&lt;/a&gt; that display the geocoder response object contents prettyprinted.&lt;br /&gt;&lt;br /&gt;First I was using toSource() method of Firefox which is a handy way to have a look inside objects. You could say that is opposite to eval().&lt;br /&gt;&lt;br /&gt;Using non-standard toSource() debugging method means that the pages would work only with FF. I think that all the browsers have a similar method internally, but it is exposed only in Gecko browsers.&lt;br /&gt;&lt;br /&gt;I switched to JSON.stringify(). That is also built in FF3.1+ and even in IE but only in IE8 mode. The function is made cross-browser by loading Douglas Crockfords json2.js script. You can get it from &lt;a href="http://www.json.org/js.html"&gt;json.org&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The line breaks, spaces and indents are generated by beautify.js from &lt;a href="http://jsbeautifier.org/"&gt;jsbeautifier.org&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-2472715815811605987?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/2472715815811605987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=2472715815811605987' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2472715815811605987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2472715815811605987'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/09/gecoder-response-structure.html' title='Gecoder response structure'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-7817476903065356345</id><published>2009-09-14T10:57:00.000-07:00</published><updated>2009-09-14T11:45:43.297-07:00</updated><title type='text'>Zoom events</title><content type='html'>The following concerns version 2 of API.&lt;br /&gt;&lt;br /&gt;There is a single zoomend(old, new) event in documentation. However there are a few additional undocumented events that return a lot of data about zoom action.&lt;br /&gt;&lt;br /&gt;'zoomto' is triggered always when user changes zoom setting. It returns two parameters. The first one is a string that indicates how the zoom was started. The second is an object {infoWindow: boolean} that tells if the info window is open. Following string values are discovered:&lt;br /&gt;&lt;br /&gt;- "zi" or "zo" When zoom button is clicked&lt;br /&gt;- "zs_drag_zi " or "zs_drag_zo" When zoom slider is moved&lt;br /&gt;- "zb_click_zi" or "zb_click_zo" When zoom bar is clicked&lt;br /&gt;- "wl_zi" or "wl_zo" By scrollwheel zoom&lt;br /&gt;- "key_zi" or "key_zo" When zoomed by keyboard +/-&lt;br /&gt;&lt;br /&gt;If we have continuousZoom enabled, we get more events: 'zoomstart' and 'zooming'.&lt;br /&gt;&lt;br /&gt;'zooming' is triggered repeatedly while animated zoom is under progress. The interval is a few tens of milliseconds.&lt;br /&gt;&lt;br /&gt;'zoomstart' is triggered when continuous zoom is started by dblclick or scrollwheel. Its first parameter is -1 or 1 indicating the direction of the started zoom. The second parameter is a GLatLng mouse pointer position. By double rightclick zoomout the second parameter is a blank object.&lt;br /&gt;&lt;br /&gt;I have discovered a third parameter, a boolean that is true only by dblclick-zoom-in?&lt;br /&gt;&lt;br /&gt;When triggering a continuous zoom, we get a series of events:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;zoomstart&lt;/li&gt;&lt;li&gt;zoomto&lt;/li&gt;&lt;li&gt;zooming&lt;/li&gt;&lt;li&gt;zooming&lt;/li&gt;&lt;li&gt;zooming&lt;/li&gt;&lt;li&gt;zoomend&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;And a lot of data with them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-7817476903065356345?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/7817476903065356345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=7817476903065356345' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7817476903065356345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7817476903065356345'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/09/zoom-events.html' title='Zoom events'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-6001146284123575057</id><published>2009-08-28T18:24:00.000-07:00</published><updated>2009-08-29T09:14:59.818-07:00</updated><title type='text'>Accessibility and Google Maps</title><content type='html'>My understanding about accessibility of a web page is, that all its contents must be accessible without a mouse.&lt;br /&gt;&lt;br /&gt;So was the Map Kitchen examples written. Take &lt;a href="http://mapsapi.googlepages.com/categories.htm"&gt;categories example&lt;/a&gt; and you can open any info window by [Tab] key, check the checkboxes by [space]. ([Shift[Tab]] to go back).&lt;br /&gt;&lt;br /&gt;Accessibility is in the hands of the developer who writes the code for a map page. It is not built in Google Maps.&lt;br /&gt;&lt;br /&gt;Patrick H. Lauke  from Opera does not accept my opinion. We had a short public discussion on the forum and our opinions are:&lt;br /&gt;&lt;br /&gt;Patrick:&lt;br /&gt;Google Maps control elements (zoom, nav-buttons...) should be keyboard accessible&lt;br /&gt;&lt;br /&gt;My opinion:&lt;br /&gt;Those functions are easily made keyboard accessible by the page developer but they are not important. The contents must be accessible. There should be a method to open any info window without mouse.&lt;br /&gt;&lt;br /&gt;Patric has made great work with &lt;a href="http://dev.opera.com/articles/view/keyboard-accessible-google-maps/"&gt;a script that converts Google Maps control buttons keyboard accessible&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-6001146284123575057?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/6001146284123575057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=6001146284123575057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/6001146284123575057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/6001146284123575057'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/08/accessibility-and-google-maps.html' title='Accessibility and Google Maps'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-1054895808880352757</id><published>2009-08-28T17:43:00.000-07:00</published><updated>2009-08-28T18:20:47.486-07:00</updated><title type='text'>Usability and Google Maps</title><content type='html'>What does usability and Google Maps have in common. At least one thing, they are synonyms.&lt;br /&gt;&lt;br /&gt;Map is the user interface for any data - any. That is the reason why a search engine company acquired a startup that had the keys for that user interface.&lt;br /&gt;&lt;br /&gt;We who write map pages, must keep in mind, that we are using map as the user interface because it is the most intuitive way to present any data. Our client or boss may see map as a decoration on the web page. Try to make them see the difference between a list of addresses or that list presented on a map.&lt;br /&gt;&lt;br /&gt;I was very delighted to see that a blog called "&lt;a href="http://www.svennerberg.com/series/google-maps-api-3/"&gt;In usability we trust&lt;/a&gt;" talks a lot about Google Maps. The blog is kept by a Swedish guy called Gabriel Svennerberg. He has written some high quality articles about Google Maps API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-1054895808880352757?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/1054895808880352757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=1054895808880352757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/1054895808880352757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/1054895808880352757'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/08/usability-and-google-maps.html' title='Usability and Google Maps'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-8729857053608873141</id><published>2009-08-11T16:10:00.000-07:00</published><updated>2009-08-11T17:27:17.256-07:00</updated><title type='text'>Images on v3 map</title><content type='html'>BoundsBox extension was used for drawing rectangles on map a few posts ago.&lt;br /&gt;&lt;br /&gt;The new version of BoundsBox (1.0) has option to insert images inside (visible or invisible) rectangles. The image is attached in a draggable pane of map. So it pans with map. It scales when map is zoomed. It is attached below markers, so it doesn't eat marker clicks. The behavior is equal to GGroundOverlay of v2 api.&lt;br /&gt;&lt;br /&gt;A few more options and methods were introduced with the new version. They mainly serve image handling like opacity and z-index. Events 'imageloaded' and 'imageloaderror' are also provided.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://esa.easypagez.com/v3boundsbox/imagebox.htm"&gt;See an example with a table of options and methods&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update v1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://esa.easypagez.com/v3boundsbox/kmbox.htm"&gt;The most latest version&lt;/a&gt; provides also an alternative constructor KmBox(). Instead of LatLngBounds it takes LatLng and kmX, kmY dimensions as its parameters. As a side product we got LatLng.destinationLatLng(bearing, distance) method. That calculates LatLng 'that many kilometers from this LatLng to that compass bearing'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-8729857053608873141?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/8729857053608873141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=8729857053608873141' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8729857053608873141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8729857053608873141'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/08/images-on-v3-map.html' title='Images on v3 map'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-4271631220808643625</id><published>2009-08-11T14:24:00.000-07:00</published><updated>2009-08-11T15:08:23.990-07:00</updated><title type='text'>Curing IE8 complications</title><content type='html'>Many map pages work fine with all the other browsers but not IE8. Clicks seem to take place far away from the point that user actually clicked.&lt;br /&gt;&lt;br /&gt;The bug has been archived in IE8 issue list since beta times. The only known workaround is to force IE8 to "IE7 combatibility mode".&lt;br /&gt;&lt;br /&gt;Investigating Microsofts own code reveals that even they have not found any other workaround. You can find in the head section of Bing maps:&lt;br /&gt;&lt;br /&gt;&lt;pre id="line1"&gt;&lt;&lt;span class="start-tag"&gt;meta&lt;/span&gt;&lt;span class="attribute-name"&gt; http-equiv&lt;/span&gt;=&lt;span class="attribute-value"&gt;"X-UA-Compatible" &lt;/span&gt;&lt;span class="attribute-name"&gt;content&lt;/span&gt;=&lt;span class="attribute-value"&gt;"IE=7" &lt;/span&gt;&lt;span class="error"&gt;&lt;span class="attribute-name"&gt;/&lt;/span&gt;&lt;/span&gt;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And in maps.google.com:&lt;br /&gt;&lt;br /&gt;&lt;pre id="line1"&gt;&lt;span class="doctype"&gt;&lt;span id="__firefox-tidy-id"&gt;&lt;&lt;span class="start-tag"&gt;meta&lt;/span&gt;&lt;span class="attribute-name"&gt; http-equiv&lt;/span&gt;=&lt;span class="attribute-value"&gt;X-UA-Compatible &lt;/span&gt;&lt;span class="attribute-name"&gt;content&lt;/span&gt;=&lt;span class="attribute-value"&gt;IE=EmulateIE7 &lt;/span&gt;&lt;span class="error"&gt;&lt;span class="attribute-name"&gt;/&lt;/span&gt;&lt;/span&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Those tags make IE8 behave more like IE7 and cure the click coordinate issue.  If someone is really interested what they actually do, I would recommend starting from &lt;a href="http://hsivonen.iki.fi/doctype/"&gt;this excellent study&lt;/a&gt;. What I learned about that article, is that the tag will not pass HTML5 validation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-4271631220808643625?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/4271631220808643625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=4271631220808643625' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4271631220808643625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4271631220808643625'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/08/curing-ie8-complications.html' title='Curing IE8 complications'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-908023759990693521</id><published>2009-07-22T07:55:00.000-07:00</published><updated>2009-08-23T11:34:21.086-07:00</updated><title type='text'>Custom marker generators</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_kxd45MIZM2Q/SpGLIGBR3ZI/AAAAAAAAANc/ugIBlZkSd4w/s1600-h/chart.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 21px; height: 34px;" src="http://1.bp.blogspot.com/_kxd45MIZM2Q/SpGLIGBR3ZI/AAAAAAAAANc/ugIBlZkSd4w/s320/chart.png" alt="" id="BLOGGER_PHOTO_ID_5373228801600904594" border="0" /&gt;&lt;/a&gt;There are some fancy free services that generate custom marker icons for us. Google Chart API provides many useful &lt;a href="http://groups.google.com/group/google-chart-api/web/chart-types-for-map-pins"&gt;labeled map pin types&lt;/a&gt;. Even tilted ones.&lt;br /&gt;&lt;br /&gt;Graham has released a &lt;a href="http://www.powerhut.co.uk/googlemaps/custom_markers.php"&gt;fascinating service&lt;/a&gt; that generates all the needed files from an image file of your own. You upload the image as png, gif or jpeg and instantly you can download a zipped package containing:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;24-bit png icon image&lt;/li&gt;&lt;li&gt;shadow&lt;/li&gt;&lt;li&gt;printImage&lt;/li&gt;&lt;li&gt;mozPrintImage&lt;/li&gt;&lt;li&gt;printShadow&lt;/li&gt;&lt;li&gt;transparent&lt;br /&gt;&lt;/li&gt;&lt;li&gt;imageMap array&lt;/li&gt;&lt;/ul&gt;Wou!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-908023759990693521?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/908023759990693521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=908023759990693521' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/908023759990693521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/908023759990693521'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/07/custom-marker-generators.html' title='Custom marker generators'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_kxd45MIZM2Q/SpGLIGBR3ZI/AAAAAAAAANc/ugIBlZkSd4w/s72-c/chart.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-8696728498915468932</id><published>2009-07-20T11:37:00.000-07:00</published><updated>2009-07-20T14:06:49.408-07:00</updated><title type='text'>Drawing rectangles with V3</title><content type='html'>The experimental &lt;a href="http://code.google.com/apis/maps/documentation/v3/"&gt;API v3&lt;/a&gt; does not support polylines yet. We don't need polyline support for drawing simple rectangles. We can make browser to draw them.&lt;br /&gt;&lt;br /&gt;BoundsBox for v3 is an extension that takes LatLngBounds object as an argument and draws the bounds on map. A DIV is created and made an OverlayView overlay object.&lt;br /&gt;&lt;br /&gt;Styling of the rectangle is made with CSS. You can put text content also and even a background image. 'click' event is available, 'mouseover' is easily attached.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://esa.easypagez.com/v3boundsbox/"&gt;See the example&lt;/a&gt; that visualizes bounds that v3 geocoder returns.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-8696728498915468932?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/8696728498915468932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=8696728498915468932' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8696728498915468932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8696728498915468932'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/07/drawing-rectangles-with-v3.html' title='Drawing rectangles with V3'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-8913517941272259075</id><published>2009-07-13T16:19:00.000-07:00</published><updated>2009-07-13T16:34:49.625-07:00</updated><title type='text'>Location by browser</title><content type='html'>Now we have two browsers that provide client location by JavaScript API, Firefox 3.5 and Google Chrome.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;FF3.5 supports W3C specification (draft) and provides navigator.geolocation object. The objects getCurrentPosition() method returns coordinates and even heading and speed properties.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Chrome provides geolocation object by built in Google Gears.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Actually other browsers return the location too with Google Gears installed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Test and read more from the links of &lt;a href="http://koti.mbnet.fi/ojalesa/v3/geolocation.htm"&gt;this page&lt;/a&gt;. The page is the first one that I set sensor=true.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-8913517941272259075?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/8913517941272259075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=8913517941272259075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8913517941272259075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8913517941272259075'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2009/07/location-by-browser.html' title='Location by browser'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-5667779595934257495</id><published>2008-12-13T10:17:00.000-08:00</published><updated>2008-12-13T11:03:26.149-08:00</updated><title type='text'>GoogleBar hack</title><content type='html'>How to make a Local search and have an info window opened during page load.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you load the full blown Google AJAX Search API, that's not a problem. If you are using Local Search GControl, you have a &lt;code&gt;searchFormHint&lt;/code&gt; option but not a method to trigger the search. With GGoogleBar you don't have either of them.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Both GoogleBar and Local Search Control generate a form element with a text input field and a submit button. The form element of GoogleBar is not generated until the GoogleBar is opened. So we can assume that the form is the last one on your page and we can access it like:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;  var lastForm = document.forms.length - 1;&lt;br /&gt;  document.forms[lastForm].elements[0].value = "Music";&lt;br /&gt;  document.forms[lastForm].elements[1].click();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;You have to define the GoogleBar to open initially by googleBarOptions:{showOnLoad:true}.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How to trigger the form access? There is no event that would tell us when the form is built. I ended up using onIdleCallback function plus a small timeOut. The onIdleCallback  is triggered when GoogleBar is formed. It is triggered also after each search so I set a variable to make sure the seach is made only once.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://esa.ilmari.googlepages.com/googlebarhint.htm"&gt;It seems to work&lt;/a&gt; but with no quarantee.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-5667779595934257495?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/5667779595934257495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=5667779595934257495' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5667779595934257495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5667779595934257495'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/12/googlebar-hack.html' title='GoogleBar hack'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-687454008738734660</id><published>2008-12-02T10:39:00.000-08:00</published><updated>2008-12-02T11:13:24.984-08:00</updated><title type='text'>softstateurlhook</title><content type='html'>Just noticed an intresting GMap2 event 'softstateurlhook'. I did not find it mentioned on web. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is triggered when map state changes.  After panning , zooming or map type change and also on page load. &lt;a href="http://esa.ilmari.googlepages.com/softstateurlhook.htm"&gt;Try it&lt;/a&gt;. It returns an object as its single parameter. The properties of the object:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;ll: "60.170293,24.939554"&lt;/li&gt;&lt;li&gt;spn: "0.043719,0.087891"&lt;/li&gt;&lt;li&gt;z: 13&lt;/li&gt;&lt;li&gt;t: "k"&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;They are lat/lng, span, zoom and map type. They are maps.google.com url parameters. If you click 'Powered by Google' logo link, those parameters are used to form the url.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can use those for similar linking purpose, or you could store those in a cookie. A back button could also be constructed using the event.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The event is most convenient for fetching marker data from a server. Center lat/lng and span are just the parameters needed and the event is triggered just when needed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-687454008738734660?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/687454008738734660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=687454008738734660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/687454008738734660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/687454008738734660'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/12/softstateurlhook.html' title='softstateurlhook'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-3845113010607856371</id><published>2008-11-29T04:55:00.000-08:00</published><updated>2008-11-29T06:48:03.453-08:00</updated><title type='text'>Map Kitchen [part 5] ZMarker</title><content type='html'>GMarker is quite a complicated object. That is why a few hundread markers are too heavy a load for poor browsers. Loading even more features on GMarker doesn't sound sensible. Well, there is some sense if the new features enhance the UI so that user doesn't have too zoom in/out that often.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Z-index switching is a way to make each marker reachable on a crowded map. It is one of the simpliest solutions to the eternal markers-too-close-together problem. The marker that is clicked and the info window was read, is thrown behind the others.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The technique was first published in Dec 2006. The code of the original test page was once again so messy that not very many people have applied the idea. Now it is written as a &lt;a href="http://mapsapi.googlepages.com/zmarker.htm"&gt;simple to use GMap2 method&lt;/a&gt; createZMarker(). We need to know the status of infowindow, that is why it is a GMap2 method.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I haven't been promoting the technique very actively because it was based on an undocumented option of GMarker. The ZIndexProcess option has been documented for a few months now but still the documentation doesn't  tell the full truth. The ZIndexProcess function is documented to be called when marker is addOverlayed and when marker's infowindow is opened. Yes, that happens but the function is called also when the infowindow is closed. That is the most valuable feature but still undocumented and maybe a bug.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Whether the infowindow is opening or closing is determined by status of GMap2.getInfoWindow().isHidden(). If the timing of that flag changes, the z-index swap starts behaving wrong way. Live page using this method should be locked to a certain api version and tested with new version always before updating. That is actually a good practice anyway.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There have been some discussion about new documented way to control z-index. If we get it, we could control z-index also by mouseover. Go and star the &lt;a href="http://code.google.com/p/gmaps-api-issues/issues/detail?id=419"&gt;request&lt;/a&gt; if you find it useful.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Marker icon color change is independent of z-index process but it is built in createZMarker(). I find it an important feature for the journey towards better UI. It makes co-operation between sidebar and markers more efficient.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The marker icons are created by Google Charts API using MapIconMaker script. The markers are slightly transparent which looks good but harms color contrast in very crowded places.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-3845113010607856371?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/3845113010607856371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=3845113010607856371' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/3845113010607856371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/3845113010607856371'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/11/map-kitchen-part-5-zmarker.html' title='Map Kitchen [part 5] ZMarker'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-3215226121957591530</id><published>2008-11-23T03:11:00.000-08:00</published><updated>2008-11-23T04:01:41.651-08:00</updated><title type='text'>Map Kitchen [part 4]</title><content type='html'>Sidebar of maps.google.com can be collapsed to get full map view. The way it works is impressive. The map stays static when it is widened and its actual centerpoint changes. User doesn't see the tiles loading, they are loaded already.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A few people have been asking how to make something similar. The secret of the implementation seems to be solved. The map is fullscreen all the time. Only the sidebar is swithed on and off over the map.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Copying the idea is not very simple. There are many tricky details to be solved. Most of them are solved now. &lt;a href="http://mapsapi.googlepages.com/collapsible.htm"&gt;See the page&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The base and basic components for better map pages are about constructed. A page that imports and parses its data from text files, puts it on map and in collapsible interactive sidebar with category switching.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we can concentrate more at filtering the data and fine tuning the actual map UI.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-3215226121957591530?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/3215226121957591530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=3215226121957591530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/3215226121957591530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/3215226121957591530'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/11/map-kitchen-part-3_23.html' title='Map Kitchen [part 4]'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-795689145510349896</id><published>2008-11-13T08:39:00.000-08:00</published><updated>2008-11-13T18:24:44.254-08:00</updated><title type='text'>Drag &amp; drop sortable list</title><content type='html'>Today we have something more fascinating than a regular part of Map Kitchen series. We have a &lt;a href="http://mapsapi.googlepages.com/sortstack.htm"&gt;sortable list&lt;/a&gt; with GDraggableObject().  v0.1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-795689145510349896?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/795689145510349896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=795689145510349896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/795689145510349896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/795689145510349896'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/11/drag-drop-sortale-list.html' title='Drag &amp; drop sortable list'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-2813812727173256788</id><published>2008-11-10T14:00:00.000-08:00</published><updated>2008-11-10T14:16:23.962-08:00</updated><title type='text'>Map Kitchen [part 3]</title><content type='html'>Marker categories is the basic trick of filtering markers. Groups of markers can be switched on and off and the groups have different icons. The classic switching by sidebar checkboxes was chosen.&lt;br /&gt;&lt;br /&gt;Shall we load each category from a file of its own or shall we have a single file with category data. We shall provide both ways. The concepts can even be mixed.&lt;br /&gt;&lt;br /&gt;First we create a SideBar() object, then we create the needed BarCategory() objects. A category will be created if it is specified in file loading options. Also one is created if a new category name is found from files category cell.&lt;br /&gt;&lt;br /&gt;The category checkbox switches display of category entries and its markers. Also visibility of marker image on sidebar is switched making sidebar cleaner.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mapsapi.googlepages.com/categories.htm"&gt;See the page&lt;/a&gt;, play with it and see its source.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-2813812727173256788?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/2813812727173256788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=2813812727173256788' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2813812727173256788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2813812727173256788'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/11/map-kitchen-part-3.html' title='Map Kitchen [part 3]'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-9209028839185696638</id><published>2008-11-06T11:19:00.000-08:00</published><updated>2008-11-06T11:52:28.362-08:00</updated><title type='text'>Map Kitchen [part 2]</title><content type='html'>&lt;a href="http://mapsapi.googlepages.com/textmarkers.htm"&gt;A map page reading marker and infowindow data from a text file&lt;/a&gt;. It comes equipped with a 2-way interactive sidebar. That that fulfills many basic needs.&lt;br /&gt;&lt;br /&gt;If you have a single file with not very many markers and they do not overlap, you don't need the upcoming parts of this series. Just copy the code and display your file. You can make the infowindow and sidebar look good by css.&lt;br /&gt;&lt;br /&gt;Sidebar label and marker tooltips title are the same as infowindow header. The data cell of them is still hardcoded [2] but it is easy to find in the source code and can be changed independently to any cell in your csv line.&lt;br /&gt;&lt;br /&gt;I suddenly noticed that [part 1] did not parse the text file with IE7. It is fixed now and it was just introducing the parseCsv() too late in the code for IE. Risk of that kind of troubles is avoided when I package the methods as a library. There are methods coming before that.&lt;br /&gt;&lt;br /&gt;Too many markers is the most common UI issue on map pages. The following parts will show methods for filtering the markers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-9209028839185696638?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/9209028839185696638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=9209028839185696638' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9209028839185696638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9209028839185696638'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/11/map-kitchen-part-2.html' title='Map Kitchen [part 2]'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-140829103278438264</id><published>2008-11-02T11:52:00.000-08:00</published><updated>2008-11-02T13:09:11.331-08:00</updated><title type='text'>Map Kitchen [part 1]</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;What is Map Kitchen? &lt;span class="Apple-style-span" style="font-weight: normal; "&gt;It is a  series of experimental pages. Also it is a JavaScript library that will contain the functions and methods used on those pages.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Where does the name come from?&lt;/span&gt; We have a great FM-station in Helsinki playing experimental music. One of their best DJ's took a name 'Soul Kitchen' for his program (he is a cook). So this is thanks to DJ Soppamies for inspiring me by music.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Where does the idea come from?&lt;/span&gt; Many people been asking me help for applying code ideas presented in &lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;marker data from a text file&lt;/li&gt;&lt;li&gt;sorting by nearest location&lt;/li&gt;&lt;li&gt;switching z-index of a marker&lt;/li&gt;&lt;li&gt;two-way interactive sidebar&lt;/li&gt;&lt;/ul&gt;I was exploring source codes of those pages and I did not understand much. No wonder that people been asking for my help. So I decided to start from scratch.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The series will use CSV text files as the data source because it been asked a lot. Still you can use any source:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;inline hardcoded&lt;/li&gt;&lt;li&gt;XML/KML&lt;/li&gt;&lt;li&gt;JSON&lt;/li&gt;&lt;li&gt;feeds&lt;/li&gt;&lt;li&gt;Spreadsheets API&lt;/li&gt;&lt;li&gt;TSV&lt;/li&gt;&lt;/ul&gt;I been trying to write all the functions and methods to be programming modules for any kind of data source processing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I already blogged a few methods how to generate CSV-formatted text files. Many of you have those files already from various sources.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;When does it start?&lt;/span&gt; Just now, we start putting the CSV-data on maps. &lt;a href="http://mapsapi.googlepages.com/csv2poly.htm"&gt;The first part&lt;/a&gt; is very simple: polyline from CSV.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-140829103278438264?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/140829103278438264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=140829103278438264' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/140829103278438264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/140829103278438264'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/11/map-kitchen-part-1.html' title='Map Kitchen [part 1]'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-6546547700699213242</id><published>2008-10-31T14:05:00.000-07:00</published><updated>2008-11-01T05:47:51.734-07:00</updated><title type='text'>Geocoding by Google Spreadsheets</title><content type='html'>&lt;span class="Apple-style-span"   style="color: rgb(51, 51, 51);   line-height: 18px; font-family:'Trebuchet MS';font-size:13px;"&gt;&lt;div&gt;&lt;a href="http://ouseful.wordpress.com/2008/10/14/data-scraping-wikipedia-with-google-spreadsheets/"&gt;Tony Hirst published&lt;/a&gt; a highly inspiring article about doing a Google Maps mashup without JavaScript.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;I would like to show that Google Spreadsheets can do geocoding as well as Pipes.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is http-version of Google Maps geocoder. Send a request:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;http://maps.google.com/maps/geo?&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&amp;amp;output=xml&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and you get a full-blown XML response. With parameter &lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;output=csv &lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Georgia;"&gt;you get a simplified response&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;200,6,42.730070,-73.690570 &lt;span class="Apple-style-span"  style=" ;font-family:Georgia;"&gt;Status, accuracy, lat, lng, as a four cell csv text response,  yahoo!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Google Spreadsheets can import csv-data by  &lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;=ImportData()&lt;/span&gt;formula. So why don't we make it fetch coordinates of the address in the next cell.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The order of the parameters is not convenient for us, so we change it. The query-parameter 'q' shall be the last one. We type in the first cell of Spreadsheets:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;http://maps.google.com/maps/geo?output=csv&amp;amp;q=&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the next cell we type the requested address like &lt;span class="Apple-style-span" style="font-style: italic; "&gt;Helsinki&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The third cell will add together the two previous cells and ask for data by ImportData() formula:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;=ImportData(CONCATENATE(A2,B2))&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;When you finished typing that, you will see a miracle in the next cells: '&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;200&lt;/span&gt;' (http status), '&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;4&lt;/span&gt;' (Google accuracy parameter), &lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;60.169879&lt;/span&gt; (latitude of Helsinki) and &lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;24.938408(&lt;/span&gt;longitude of Helsinki). Did we ask anything more?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And they say that there is no geocoding in Google Spreadsheets. Plus think how it can import and export. Hold my hat!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is also automatic googling to get input data.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:'courier new';"&gt;=GoogleLookup(entity,attribute)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;can fetch your POI (entity) address(attribute), and you geocode that as above.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can use the output via a variety of feeds or read it by ajax-api as JSON. You can for instance preload your pages GClientGeocoder cache to know the POIs. Your visitors don't find the POI by geocoding unless you took care of it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://spreadsheets.google.com/pub?key=pHpNHC9GculN9G3u4ePhEDQ&amp;amp;output=html&amp;amp;gid=0&amp;amp;single=true" style="color: rgb(51, 68, 119); "&gt;A test spreadsheet&lt;/a&gt; and its &lt;a href="http://spreadsheets.google.com/pub?key=pHpNHC9GculN9G3u4ePhEDQ&amp;amp;output=csv&amp;amp;gid=0&amp;amp;range=F2:H10"&gt;csv-feed&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What happens when all the pages read each other in a loop.&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-6546547700699213242?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/6546547700699213242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=6546547700699213242' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/6546547700699213242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/6546547700699213242'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/10/geocoding-by-google-spreadsheets.html' title='Geocoding by Google Spreadsheets'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-2344610995610166662</id><published>2008-10-30T18:11:00.000-07:00</published><updated>2008-10-30T19:40:19.710-07:00</updated><title type='text'>Batch geocoder with CSV output</title><content type='html'>Geocoding a list of addresses as a batch can be done faster than some times ago. Still you cannot send a bunch of geocode requests by GClientGeocoder at one moment. They must be done one by one. Just wait that the former request is answered before you send a new one.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://mapsapi.googlepages.com/batchgeo.htm"&gt;This is a batch geocoder page&lt;/a&gt; that takes a line feed separated list of addresses. Many address lists don't contain country or state names if they are constant. There are even lists without town mentioned. Those missing constant names can be added in the [extension] field of the page.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Paste your address list and hit [geocode]. The geocoded coordinates will be listed on output field and corresponding markers are placed on map. Non-found addresses will be listed on error report field.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-2344610995610166662?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/2344610995610166662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=2344610995610166662' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2344610995610166662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2344610995610166662'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/10/batch-geocoder-with-csv-output.html' title='Batch geocoder with CSV output'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-9201794731527080504</id><published>2008-10-23T07:53:00.000-07:00</published><updated>2008-10-26T00:45:14.148-07:00</updated><title type='text'>Reverse GClientGeocoder</title><content type='html'>&lt;a href="http://googlegeodevelopers.blogspot.com/2008/10/geocoding-in-reverse.html"&gt;Pamela announced&lt;/a&gt; a few hours ago that the much requested feature is here. Great.  I made a random click on the &lt;a href="http://gmaps-samples.googlecode.com/svn/trunk/geocoder/reverse.html"&gt;example page&lt;/a&gt; and saved the server response.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;br /&gt;_xdc_._1fmnhtk4s &amp;amp;&amp;amp; _xdc_._1fmnhtk4s({&lt;br /&gt;"name":"-122.124367,37.436975",&lt;br /&gt;"Status":{&lt;br /&gt; "code":200,&lt;br /&gt; "request":"geocode"&lt;br /&gt;},&lt;br /&gt;"Placemark":[{&lt;br /&gt; "id":"p1",&lt;br /&gt; "address":"870 Bruce Dr, Palo Alto, CA 94303, USA",&lt;br /&gt; "AddressDetails":{&lt;br /&gt;   "Country":{&lt;br /&gt;     "CountryNameCode":"US",&lt;br /&gt;     "CountryName":"USA",&lt;br /&gt;     "AdministrativeArea":{&lt;br /&gt;       "AdministrativeAreaName":"CA",&lt;br /&gt;       "Locality":{&lt;br /&gt;         "LocalityName":"Palo Alto",&lt;br /&gt;         "Thoroughfare":{&lt;br /&gt;           "ThoroughfareName":"870 Bruce Dr"&lt;br /&gt;         },&lt;br /&gt;         "PostalCode":{&lt;br /&gt;           "PostalCodeNumber":"94303"&lt;br /&gt;         }&lt;br /&gt;       }&lt;br /&gt;     }&lt;br /&gt;   },&lt;br /&gt;   "Accuracy": 8&lt;br /&gt; },&lt;br /&gt; "Point":{&lt;br /&gt;   "coordinates":[-122.124557,37.437032,0]&lt;br /&gt; }&lt;br /&gt;}]&lt;br /&gt;})&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;I don't know who's address that is but you can see the structure.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The query is given conveniently as a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;GLatLng()&lt;/span&gt; to the &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;GClientGeocoder.getLocations()&lt;/span&gt; as you can see in the &lt;a href="http://code.google.com/apis/maps/documentation/reference.html#GClientGeocoder"&gt;updated documentation&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So the client side script makes the decision wheter we send geocode or reverse-geocode request. That is clever.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The new feature is a perfect building brick for my next csv generator page. I was just intending to publish the page!&lt;br /&gt;&lt;br /&gt;See a &lt;a href="http://esa.ilmari.googlepages.com/reversegeo.htm"&gt;temporary test page&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-9201794731527080504?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/9201794731527080504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=9201794731527080504' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9201794731527080504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9201794731527080504'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/10/reverse-gclientgeocoder.html' title='Reverse GClientGeocoder'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-7589769125620425027</id><published>2008-10-22T10:38:00.000-07:00</published><updated>2008-10-23T04:13:19.585-07:00</updated><title type='text'>GDraggableObject</title><content type='html'>I had to update the contex menu of the &lt;a href="http://mapsapi.googlepages.com/poly2csv.htm"&gt;editor of previous post&lt;/a&gt;. The idea of using infowindow as a context menu was bad. It covers the map and the area of interest is just beneath the infowindow.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I wrote a function that creates a popup block with hide() and show() methods. The block is made a GDraggableObject so that it will no more be on your way.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There has been a trouble with text input fields in a GDraggableObject.  No matter how hard you try to click it, the cursor doesn't stay in the field and you cannot enter anything. Suddenly the solution was found.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;TIP!&lt;/span&gt; Add to the properties of the text input:&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;onmouseover="this.focus()";&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Driving directions were also added to the editor.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;A few hours later:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Drop down selector is another problematic element on draggable block.  The block gets dragged unintentionally when the scrollbar is dragged. Actually all the elements with scrollbars do the same.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Fortunately GDraggableObject has some handy methods. disable() freezes the block and enable() makes it draggable again. The scrollbar problem was solved by disabling draggability on selector mouseover.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;TIP!&lt;/span&gt; Add to the properties of a draggable selector:&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;onmouseover = draggableObject.disable();&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;onmouseout = draggableObject.enable();&lt;span class="Apple-style-span"  style=" ;font-family:Georgia;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;After a few hours of sleep:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I noticed that Chrome doesn't build the selector options dynamically in the way I been using for a long time.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;selector.options[index] = new Option(value);&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Chromes dom inspector shows the generated options but they are not rendered! So the trouble is in Chrome. Lets go on.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-7589769125620425027?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/7589769125620425027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=7589769125620425027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7589769125620425027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7589769125620425027'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/10/gdraggableobject.html' title='GDraggableObject'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-1336451690247808738</id><published>2008-10-21T04:19:00.000-07:00</published><updated>2008-10-21T05:36:23.477-07:00</updated><title type='text'>Polyline editor, csv output</title><content type='html'>&lt;a href="http://mapsapi.googlepages.com/poly2csv.htm"&gt;A polyline editor&lt;/a&gt; is the first page that uses the CSV parser of the last post. At least I have not heard of any other.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The online editor uses the GPolyline.enableDrawing() method that came with api v2.111. The behaviour is similar to MyMaps. The line data is printed on a textarea in &lt;a href="http://en.wikipedia.org/wiki/Comma-separated_values"&gt;CSV&lt;/a&gt; format.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The csv parser is used for redrawing the polyline from generated code. You can come back with your csv file and go on editing.  That is a client side application aka web page. So you have to copy/paste the cvs text to your own text editor and save it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why csv? The reasons are still the same as they were in 1967.  It is still the interchange format with widest support. Also people are asking for it. It is the easiest to understand and edit. You can use it with any character set. A syntax error will not corrupt the whole file. The list goes on..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is no csv standard. The concept is so simple that there was never a need for a written standard. Instead there is an informational &lt;a href="http://tools.ietf.org/html/rfc4180"&gt;RCF document 4108&lt;/a&gt; from 2005!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The data validation I am using at the moment is super simple. If either of the excpected coordinate cells includes NaN data, the whole line is skipped. You don't even need a separate empty line skipping. I have not managed to write a bad line that would confuse the other lines.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The current parser is even slightly simplier than the one in previous post. I will not update the previous post. See the source of the &lt;a href="http://mapsapi.googlepages.com/poly2csv.htm"&gt;editor page&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A series of csv based pages follows.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-1336451690247808738?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/1336451690247808738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=1336451690247808738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/1336451690247808738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/1336451690247808738'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/10/polyline-editor-csv-output.html' title='Polyline editor, csv output'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-4689758529433280397</id><published>2008-10-18T10:31:00.000-07:00</published><updated>2008-10-18T15:27:17.348-07:00</updated><title type='text'>CSV parser</title><content type='html'>Comma separated text file CSV  is a lightweight alternative to XML/KML and JSON. It is extremely simple to create and maintain by a text editor. All the spreadheets and databases can export CSV.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;GPS POI files are widely available around the web in CSV format. No wonder that many people are trying to display those files on Google Maps. The code of my old page is so messy that not many people have managed to use it as a template. I am just finishing a cleaner page but actually the CSV parsing was one the main troubles.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Basic CSV is extremely simple to parse. Split the file into lines by split("\n") and split the lines by split(","). That's it, BUT. In real CSV the strings (that are separated by commas) may also contain commas if the string is quoted by double quotes. How not to split those quoted strings?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Four hours of googling and 100+ articles, discussions and snippets didn't bring a script but an idea how to do it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First split the line by quote. Then find the odd-indexed splits by if(i%2) and replace its commas temporarily with something like "::::". Do the usual splitting by comma and after that replace the original commas back.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Four hours googling plus one hour of code writing and testing gave results. A CSV parser that seems to work perfect.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;/**&lt;/div&gt;&lt;div&gt; * parseCsv()&lt;/div&gt;&lt;div&gt; * @return an array of GLatLng() objects&lt;/div&gt;&lt;div&gt; * @author Esa 2008&lt;/div&gt;&lt;div&gt; */&lt;/div&gt;&lt;div&gt;String.prototype.parseCsv = function(opt_options){&lt;/div&gt;&lt;div&gt;  var results = [];&lt;/div&gt;&lt;div&gt;  var opts = opt_options||{};&lt;/div&gt;&lt;div&gt;  var iLat = opts.lat||1;&lt;/div&gt;&lt;div&gt;  var iLng = opts.lng||0;&lt;/div&gt;&lt;div&gt;  var lines = this.split("\n");&lt;/div&gt;&lt;div&gt;  for (var i=0; i&lt;lines.length;&gt;&lt;div&gt;    var blocks = lines[i].split('"');&lt;/div&gt;&lt;div&gt;    //finding commas inside quotes. Replace them with '::::'&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;for(var j=0;j&lt;blocks.length;j++){&gt;&lt;/blocks.length;j++){&gt;&lt;/div&gt;&lt;div&gt;      if(j%2){&lt;/div&gt;&lt;div&gt;        blocks[j]=blocks[j].replace(/,/g,'::::');&lt;/div&gt;&lt;div&gt;      }&lt;/div&gt;&lt;div&gt;    }  //@author Esa 2008, keep this note.&lt;/div&gt;&lt;div&gt;    lines[i] = blocks.join("");&lt;/div&gt;&lt;div&gt;    var lineArray = lines[i].split(",");&lt;/div&gt;&lt;div&gt;    //skip empty lines&lt;/div&gt;&lt;div&gt;    if(lineArray.length&gt;1){&lt;/div&gt;&lt;div&gt;      var lat = lineArray[iLat]*1;&lt;/div&gt;&lt;div&gt;      var lng = lineArray[iLng]*1;&lt;/div&gt;&lt;div&gt;      var point = new GLatLng(lat,lng);&lt;/div&gt;&lt;div&gt;      //after splitting with commas, we put hidden ones back&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;  for(var cell in lineArray){&lt;/div&gt;&lt;div&gt;        lineArray[cell] = lineArray[cell].replace(/::::/g,',');&lt;/div&gt;&lt;div&gt;      }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;  point.textArray = lineArray;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;  results.push(point);&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;  }&lt;/div&gt;&lt;div&gt;  return results;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that the array of a line cells is attached as .textArray property to the GLatLng() object.&lt;/div&gt;&lt;/lines.length;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-4689758529433280397?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/4689758529433280397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=4689758529433280397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4689758529433280397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4689758529433280397'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/10/csv-parser.html' title='CSV parser'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-7938242226584873577</id><published>2008-10-06T15:35:00.000-07:00</published><updated>2008-10-18T15:22:06.184-07:00</updated><title type='text'>Sprites</title><content type='html'>GIcon() property .sprite was discovered in the api code two months ago but no-one has presented any use for that. It is an object with two properties .image and .top.&lt;br /&gt;&lt;br /&gt;sprite.image is uri of an image and sprite.top sets its style.top relative to the marker container.&lt;br /&gt;&lt;br /&gt;You can have a set of markers in a single image file and bring one icon at a time visible by .top.&lt;br /&gt;&lt;br /&gt;Hosting a large set of markers is not fun. A single file will do now. Also you don't have to preload separate image files anymore.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://esa.ilmari.googlepages.com/sprite.htm"&gt;See a demo&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Update:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;There are also 'width' and 'height' properties. Those can be used if you did not specify GIcon.size. You can have different sized icon images in a single sprite. Thanks Mike.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-7938242226584873577?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/7938242226584873577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=7938242226584873577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7938242226584873577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7938242226584873577'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/10/sprites.html' title='Sprites'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-7628456142754145404</id><published>2008-04-04T10:39:00.000-07:00</published><updated>2008-04-04T14:15:37.885-07:00</updated><title type='text'>zmarker.js library</title><content type='html'>It is simple to write a test page using a new functionality that was announced or was discovered by Mike Williams. I been doing that many times within a few hours from the publishing of a new feature.&lt;br /&gt;&lt;br /&gt;Sometimes you just got an idea and write a page for study and publish it. People mail you positive feedback. It is rewarding, useful and fun.&lt;br /&gt;&lt;br /&gt;Writing an api extension is totally different. You have to think about all the developers that are going to use your code. You have to write functions that have useful and useable I/O. You have to write clear code with descriptive variable and function names. You have to comment your code clearly. You have to follow general code writing conventions. You have to follow general comment tagging conventions. You have to write a reference. You have to write useful example pages. You have to make a page that describes the extension. You have to monitor and react feedback on group. Still you will get a lot of personal email.&lt;br /&gt;&lt;br /&gt;Writing a library of api extensions sounds like something that is not intended for any intelligent creature.&lt;br /&gt;&lt;br /&gt;I took the challenge. zmarker.js library will be announced in a few days.&lt;br /&gt;&lt;br /&gt;Writing an API is like something from Moon or Mars compared to my 'library'. Now I do respect the Google maps api people even more than ever before. They are doing some unbelievable work.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;P.S. From the beginning of the api group: Many of the first posters were disturbed that the marker is ugly. How did they find the right group without a vision.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-7628456142754145404?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/7628456142754145404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=7628456142754145404' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7628456142754145404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7628456142754145404'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2008/04/zmarkerjs-library.html' title='zmarker.js library'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-8084956033734391902</id><published>2007-11-02T17:57:00.000-07:00</published><updated>2008-10-18T15:11:26.656-07:00</updated><title type='text'>Languages</title><content type='html'>Languages available with &lt;span style="font-style: italic;"&gt;&amp;amp;hl=en&lt;/span&gt; like parameter in api js call.&lt;br /&gt;&lt;br /&gt;Croatian                hr&lt;br /&gt;Czech           cs&lt;br /&gt;Danish          da&lt;br /&gt;Dutch           nl&lt;br /&gt;English         en&lt;br /&gt;Finnish         fi&lt;br /&gt;French          fr&lt;br /&gt;German          de&lt;br /&gt;Greek           el&lt;br /&gt;Hindi           hi&lt;br /&gt;Indonesian              id&lt;br /&gt;Italian         it&lt;br /&gt;Japanese                ja&lt;br /&gt;Norwegian               no&lt;br /&gt;Portuguese      pt&lt;br /&gt;Raeto-Romance   rm&lt;br /&gt;Russian         ru&lt;br /&gt;Serbian         sr&lt;br /&gt;Slovak          sk&lt;br /&gt;Slovenian               sl&lt;br /&gt;Spanish         es&lt;br /&gt;Swedish         sv&lt;br /&gt;Thai            th&lt;br /&gt;Turkish         tr&lt;br /&gt;Ukrainian               uk&lt;br /&gt;Vietnamese      vi&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Update Oct 2008:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;The up-to-date list of supported languages is &lt;a href="http://gmaps-samples.googlecode.com/svn/trunk/mapcoverage_filtered.html"&gt;online&lt;/a&gt; in a sophisticated format.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-8084956033734391902?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/8084956033734391902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=8084956033734391902' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8084956033734391902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8084956033734391902'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2007/11/languages.html' title='Languages'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-4940445791398320138</id><published>2007-06-30T06:06:00.001-07:00</published><updated>2008-10-18T15:18:19.164-07:00</updated><title type='text'>api.js version display</title><content type='html'>Add a line:&lt;br /&gt;&lt;br /&gt;&lt;pre id="line188"&gt;document.write(_mJavascriptVersion);&lt;br /&gt;&lt;/pre&gt;&lt;pre id="line188"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre id="line188"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Update Oct 2008:&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;That variable told you the latest version available. No we have a variable that tells you the actual version you are using:&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;G_API_VERSION&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-4940445791398320138?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/4940445791398320138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=4940445791398320138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4940445791398320138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4940445791398320138'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2007/06/apijs-version-display.html' title='api.js version display'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-8797822506077425556</id><published>2007-05-17T01:48:00.000-07:00</published><updated>2007-05-17T02:16:58.745-07:00</updated><title type='text'>String to a GLatLng() object</title><content type='html'>Now we have a handy undocumented method&lt;br /&gt;.fromUrlValue();&lt;br /&gt;&lt;br /&gt;It converts a coordinate pair string like "60.21, 24.95" to a GLatLng object:&lt;br /&gt;&lt;br /&gt;var latLngString = "60.21, 24.95"&lt;br /&gt;var point = GLatLng.fromUrlValue(latLngString);&lt;br /&gt;&lt;br /&gt;Nice. The method performs split(",") and parseFloat() for you. It simplifies parsing of many file formats. Actually I am converting my Spreadsheets to have a 'latlng' column instead of 'lat' and 'lng' columns. It makes copy-paste-filling of the spreadsheet easier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-8797822506077425556?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/8797822506077425556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=8797822506077425556' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8797822506077425556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/8797822506077425556'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2007/05/string-to-glatlng-object.html' title='String to a GLatLng() object'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-5906048048201881066</id><published>2007-02-07T09:38:00.000-08:00</published><updated>2008-10-21T05:43:15.722-07:00</updated><title type='text'>Get coordinates simply</title><content type='html'>On maps.google.com, type in url-field:&lt;br /&gt;&lt;br /&gt;javascript:void(prompt('lat, lng', gApplication.getMap().getCenter()));&lt;br /&gt;&lt;br /&gt;Not very convenient but make it a bookmark! &lt;a href="javascript:void(prompt('lat, lng', gApplication.getMap().getCenter()));"&gt;Get maps.google coords&lt;/a&gt;. Drag it into your bookmarks folder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-5906048048201881066?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/5906048048201881066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=5906048048201881066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5906048048201881066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5906048048201881066'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2007/02/get-coordinates-simply.html' title='Get coordinates simply'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-9008391235398661567</id><published>2007-01-26T11:32:00.000-08:00</published><updated>2007-02-07T09:44:48.135-08:00</updated><title type='text'>Business graphics</title><content type='html'>I see a lot of  sense to make presentation graphigs by GPolygon. Graphics are the the easy part, legends cause some pain.&lt;br /&gt;&lt;br /&gt;Do it. Dynamic diagrams and pies. Easy as a lie.&lt;br /&gt;&lt;br /&gt;My project just now is &lt;a href="http://koti.mbnet.fi/ojalesa/exam/polytime.htm"&gt;a pie called 'clock'&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-9008391235398661567?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/9008391235398661567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=9008391235398661567' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9008391235398661567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9008391235398661567'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2007/01/business-graphics.html' title='Business graphics'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-5708132108910963664</id><published>2007-01-04T11:39:00.000-08:00</published><updated>2007-01-04T11:51:47.342-08:00</updated><title type='text'>Large Zoom Control Without Pan Buttons</title><content type='html'>A duplicate of my post on api forum:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;You can move the large control upwards: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; map.addControl(new GLargeMapControl(),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;new GControlPosition(G_ANCHOR_TOP_LEFT, &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;new GSize(5,-60)));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-style: italic;"&gt;Having a style definition 'overflow:hidden' for the map div hides the &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; overflowing pan buttons. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://esa.ilmari.googlepages.com/zoomnopan.htm"&gt;A demo.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There is also a clever commenting script called 'JS-Kit' on the demo page. That is loaded by GScript() just for testing. Try commenting or just sending regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-5708132108910963664?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/5708132108910963664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=5708132108910963664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5708132108910963664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5708132108910963664'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2007/01/large-zoom-control-without-pan-buttons.html' title='Large Zoom Control Without Pan Buttons'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-688911022687013077</id><published>2006-12-27T12:08:00.000-08:00</published><updated>2006-12-27T12:11:34.041-08:00</updated><title type='text'>ZMarker</title><content type='html'>My solution to 'markers too close together' is via manipulating z-index of the markers. The possibility was given to us with 2.70.&lt;br /&gt;&lt;br /&gt;A &lt;a href="http://esa.ilmari.googlepages.com/ZMarker.htm"&gt;test page&lt;/a&gt; with some more explanation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-688911022687013077?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/688911022687013077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=688911022687013077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/688911022687013077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/688911022687013077'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/12/zmarker.html' title='ZMarker'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-7674713852628915268</id><published>2006-12-04T14:31:00.000-08:00</published><updated>2008-10-21T05:49:35.621-07:00</updated><title type='text'>Finding map buttons</title><content type='html'>The string variables listed earlier can be used to identify map buttons.&lt;br /&gt;&lt;pre&gt;var divs = map.getContainer().getElementsByTagName("div");&lt;br /&gt;for(var i = 0; i&amp;lt;divs.length; i++)&lt;br /&gt;{&lt;br /&gt;var title = divs[i].getAttribute("title");&lt;br /&gt;&lt;br /&gt;if(title==_mZoomIn)&lt;br /&gt;{&lt;br /&gt;zoomInButton=divs[i];&lt;br /&gt;}}&lt;br /&gt;&lt;/pre&gt;Now variable 'zoomInButton' is the container of 'Zoom In' button and you can change its style or construct an event listener.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Update 2008. Excpected lifespan of this kind of hacks is a few months. This hasn't been working for a long time. &lt;span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 13px; font-style: normal; white-space: pre; "&gt;if(title=="Zoom in")&lt;span class="Apple-style-span" style="font-family: Georgia; font-size: 16px; font-style: italic; white-space: normal; "&gt; works but but you have to lock the language to hl=en.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-7674713852628915268?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/7674713852628915268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=7674713852628915268' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7674713852628915268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7674713852628915268'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/12/finding-map-buttons.html' title='Finding map buttons'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-5753025898986372000</id><published>2006-11-21T15:43:00.000-08:00</published><updated>2008-10-21T05:51:03.239-07:00</updated><title type='text'>GPolygon()</title><content type='html'>v2.69 gives us possibility to fill inner area of a polyline. The syntax is like GPolyline() but with two more parameters:&lt;br /&gt;&lt;br /&gt;&lt;pre id="line88"&gt;new GPolygon(array_of_points, line_color, line_width, line_opacity,&lt;br /&gt;fill_color, fill_opacity);&lt;span style="font-family:Georgia,serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Discovered by Mike Williams. &lt;a href="http://esa.ilmari.googlepages.com/dragpolygon.htm"&gt;An example&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-5753025898986372000?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/5753025898986372000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=5753025898986372000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5753025898986372000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/5753025898986372000'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/11/gpolygon.html' title='GPolygon()'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-7818679738805901821</id><published>2006-11-12T10:28:00.000-08:00</published><updated>2007-01-05T07:23:28.860-08:00</updated><title type='text'>A page without a key</title><content type='html'>Api checks&lt;br /&gt;&lt;pre&gt;if((d=="igoogle"||d=="gmodules"||d=="googlepages"||&lt;br /&gt;d=="orkut")&amp;&amp;amp;c=="com")&lt;br /&gt;&lt;/pre&gt; from the page url. If satisfied no key is needed. The bonus is that you get the same tileset as maps.google.com.&lt;br /&gt;&lt;br /&gt;If you have your page hosted in &lt;a href="http://pages.google.com/"&gt;GooglePages&lt;/a&gt; without a key you get Navteq maps for US and today you can get &lt;a href="http://esa.ilmari.googlepages.com/Dualnokey.htm#lat=-26.210895&amp;lng=28.028870&amp;amp;zoom=11&amp;ty=0"&gt;African maps&lt;/a&gt; with the trick. Just delete '&amp;amp;key=blahblah..' from the api call script. 'Powered by Google' logo goes with the key. &lt;a href="http://esa.ilmari.googlepages.com/Dualnokey.htm#lat=30.059809&amp;lng=31.226921&amp;amp;amp;zoom=14&amp;amp;ty=0"&gt;Cairo&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I have not solved how to make GClientGeocoder work with a page like that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-7818679738805901821?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/7818679738805901821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=7818679738805901821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7818679738805901821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/7818679738805901821'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/11/page-without-key.html' title='A page without a key'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-9107730341906787197</id><published>2006-11-03T23:45:00.000-08:00</published><updated>2006-11-04T00:19:50.128-08:00</updated><title type='text'>Event tester 2.0 pre alpha</title><content type='html'>Now I have a partially operating &lt;a href="http://esa.ilmari.googlepages.com/events8.html"&gt;pre alpha event test page v2.0&lt;/a&gt; on line:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;parameters (first three of them)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;draggable output fields&lt;/li&gt;&lt;li&gt;more objects (info window, overview map, draggable object...)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;the list of GEvents is read from text file that is a section of api&lt;/li&gt;&lt;li&gt;events are alphabetically sorted to a "List" field&lt;/li&gt;&lt;li&gt;events field is editable [submit]&lt;br /&gt;&lt;/li&gt;&lt;li&gt;call GLog to see timing&lt;/li&gt;&lt;li&gt;script area (also in v1) to write event listeners of your own&lt;/li&gt;&lt;li&gt;a bug was revealed:&lt;/li&gt;&lt;li&gt;mouseover and mouseout of map will not come back if once deleted&lt;/li&gt;&lt;li&gt;'mousemove' is deleted for saving output field&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I have managed to get  a few times&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Does not work with IE at this time but I quess that is not a problem. Please comment especially about 'zoomrangechange'  and 'blur'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-9107730341906787197?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/9107730341906787197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=9107730341906787197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9107730341906787197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9107730341906787197'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/11/event-tester-20-pre-alpha.html' title='Event tester 2.0 pre alpha'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-9039551974744404616</id><published>2006-10-30T16:37:00.000-08:00</published><updated>2006-10-30T16:51:01.550-08:00</updated><title type='text'>'load' GEvent of overview map</title><content type='html'>Oh yes. I took time to enhance the event test page. I will publish 2.0 beta very soon. During testing I made some discovery.&lt;br /&gt;&lt;br /&gt;It has been a common practice to apply a small delay when setting the initial map type or position of overview map.&lt;br /&gt;&lt;br /&gt;I happened to find a GEvent 'load' that is probably intended for the purpose.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var ovMap=new GOverviewMapControl();&lt;br /&gt;map.addControl(ovMap);&lt;br /&gt;var mini=map.getOverviewMap();&lt;br /&gt;&lt;br /&gt;GEvent.addListener(mini,"load",function(){&lt;br /&gt;mini.setZoom(14);&lt;br /&gt;mini.setMapType(G_SATELLITE_MAP);&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://koti.mbnet.fi/ojalesa/exam/ruler.html"&gt;Seems to work perfect.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-9039551974744404616?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/9039551974744404616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=9039551974744404616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9039551974744404616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/9039551974744404616'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/10/load-gevent-of-overview-map.html' title='&apos;load&apos; GEvent of overview map'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-4424507009301492325</id><published>2006-10-28T11:44:00.000-07:00</published><updated>2006-10-28T13:55:57.016-07:00</updated><title type='text'>GEvents</title><content type='html'>There is an easy to read section in api.js. The one where string variables are introduced (2.67):&lt;br /&gt;&lt;br /&gt;var Bb="newcopyright";&lt;br /&gt;var mf="blur";&lt;br /&gt;var X="click",&lt;br /&gt;bd="contextmenu",&lt;br /&gt;Ca="dblclick";&lt;br /&gt;var nf="error";&lt;br /&gt;var ce="keydown",&lt;br /&gt;de="keypress",&lt;br /&gt;of="keyup",&lt;br /&gt;cd="load",&lt;br /&gt;Da="mousedown",&lt;br /&gt;xc="mousemove",&lt;br /&gt;Ea="mouseout",&lt;br /&gt;Ma="mouseup",&lt;br /&gt;he="mousewheel",&lt;br /&gt;ie="DOMMouseScroll";&lt;br /&gt;var sf="unload",&lt;br /&gt;yc="remove",&lt;br /&gt;Va="mouseover",&lt;br /&gt;Yd="closeclick",&lt;br /&gt;fe="maximizeclick",&lt;br /&gt;ke="restoreclick",&lt;br /&gt;ge="maximizeend",&lt;br /&gt;rf="restoreend",&lt;br /&gt;pf="maxtab",&lt;br /&gt;Wd="animate",&lt;br /&gt;Vd="addmaptype",&lt;br /&gt;lf="addoverlay",&lt;br /&gt;Xd="clearoverlays",&lt;br /&gt;Zd="infowindowbeforeclose",&lt;br /&gt;be="infowindowprepareopen",&lt;br /&gt;$d="infowindowclose",&lt;br /&gt;ae="infowindowopen",&lt;br /&gt;Kb="maptypechanged",&lt;br /&gt;qa="moveend",&lt;br /&gt;Lb="movestart",&lt;br /&gt;je="removemaptype",&lt;br /&gt;qf="removeoverlay",&lt;br /&gt;Wa="resize",&lt;br /&gt;tf="zoom",&lt;br /&gt;dd="zoomend",&lt;br /&gt;le="zooming",&lt;br /&gt;me="zoomrangechange",&lt;br /&gt;ne="zoomstart",&lt;br /&gt;ub="dragstart",&lt;br /&gt;tb="drag",&lt;br /&gt;Ua="dragend",&lt;br /&gt;vb="move",&lt;br /&gt;wc="clearlisteners";&lt;br /&gt;var vc="changed";&lt;br /&gt;var ee="logclick";&lt;br /&gt;&lt;br /&gt;Most of them are known GEvents but there are a few strings that I have no idea about. They are not necessarily  GEvents but it is very easy to try that. I have to find time to create &lt;a href="http://koti.mbnet.fi/ojalesa/exam/events_v2x.html"&gt;the event test pages&lt;/a&gt; further on. For instance info window has GEvents now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-4424507009301492325?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/4424507009301492325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=4424507009301492325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4424507009301492325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/4424507009301492325'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/10/events.html' title='GEvents'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-2742472206086908926</id><published>2006-10-17T14:27:00.000-07:00</published><updated>2008-10-21T06:00:04.114-07:00</updated><title type='text'>More custom legends</title><content type='html'>Tooltips of map type buttons are here again. We had them in v1 and now in v2,65. When trying to find how to modify their contents I found many other parameters too.&lt;br /&gt;&lt;br /&gt;_mPanNorth, _mPanWest, _mPanEast, _mPanSouth (Arrow button tooltips)&lt;br /&gt;_mLastResult (Return button tooltip)&lt;br /&gt;_mZoomIn, _mZoomOut (Zoom button tooltips)&lt;br /&gt;_mMapMode (Map button legend)&lt;br /&gt;_mMapModeShort (Map legend of small button)&lt;br /&gt;_mStreetMapAlt (Map button tooltip)&lt;br /&gt;_mMapError (Error message of uncovered areas)&lt;br /&gt;_mSatelliteMode (Sat button legend)&lt;br /&gt;_mSatelliteModeShort (Sat legend of small button)&lt;br /&gt;_mSatelliteMapAlt (Sat button tooltip)&lt;br /&gt;_mSatelliteError (Error message of uncovered areas)&lt;br /&gt;_mHybridMode (Hyb button legend)&lt;br /&gt;_mHybridModeShort (Hyb legend of small button)&lt;br /&gt;_mHybridMapAlt (Hyb button tooltip)&lt;br /&gt;&lt;br /&gt;Syntax as in previous post.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Update 2008. These variables have gone a long time ago.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-2742472206086908926?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/2742472206086908926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=2742472206086908926' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2742472206086908926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2742472206086908926'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/10/more-custom-legends.html' title='More custom legends'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-744358715732333484</id><published>2006-10-15T12:35:00.001-07:00</published><updated>2006-10-28T11:15:19.099-07:00</updated><title type='text'>Custom type button legends</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add this script right after your Maps API call:&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;_mMapMode = "Karta";&lt;br /&gt;_mMapModeShort = "Karta";&lt;br /&gt;_mSatelliteMode = "Sputnik";&lt;br /&gt;_mSatelliteModeShort = "Sput";&lt;br /&gt;_mHybridMode = "Gibrid";&lt;br /&gt;_mHybridModeShort = "Gib";&lt;br /&gt;GLoadMapsScript();&lt;br /&gt;&amp;lt;\script&amp;gt;&lt;br /&gt;&lt;br /&gt;An &lt;a href="http://koti.mbnet.fi/ojalesa/exam/nearest.html"&gt;example&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The trick was presented by Alexander on the forum.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-744358715732333484?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/744358715732333484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=744358715732333484' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/744358715732333484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/744358715732333484'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/10/custom-type-button-legends.html' title='Custom type button legends'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3140844186062207174.post-2209298831223116188</id><published>2006-10-15T11:41:00.000-07:00</published><updated>2006-10-28T14:00:23.108-07:00</updated><title type='text'>var blog = new collectionOfTricks();</title><content type='html'>A blog is the most convenient notebook. This is my notebook for Google Maps API code snippets and tricks.&lt;br /&gt;&lt;br /&gt;The first one is a method to edit the legends of map type buttons.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3140844186062207174-2209298831223116188?l=apitricks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apitricks.blogspot.com/feeds/2209298831223116188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3140844186062207174&amp;postID=2209298831223116188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2209298831223116188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3140844186062207174/posts/default/2209298831223116188'/><link rel='alternate' type='text/html' href='http://apitricks.blogspot.com/2006/10/var-blog-new-collectionoftricks.html' title='var blog = new collectionOfTricks();'/><author><name>Esa</name><uri>http://www.blogger.com/profile/16422122370460025388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://bp2.blogger.com/_kxd45MIZM2Q/SBIv5XrtblI/AAAAAAAAAIs/1baMRLP2nyg/S220/Esannn.jpg'/></author><thr:total>0</thr:total></entry></feed>
