Minor GvsY updates

Apparently some links got broken because I used pipes (“|” symbol) to separate fields, it also refused to accept lattitude and longtitude if zoom and type were missing (because of a broken link). Both problems are fixed now, it’ll also override links once it loads.

Also, Jeremy Zawodny didn’t like AdSense banners and he’s right – they were not related to content at all making them just some ads which is not cool ;) so I removed them until I’ll need really big money to pay for hosting.

Update: I also moved map type selectors into maps to use native interface. I hope to move zoom selectors there too.


Apparently some browsers (e.g. IE) perform a clicking sound on each URL update and this begavior wasn’t really pleasant when map URL was constantly updated when map was dragged. I tweaked a code a little so it updates URL only when dragging is over (link on the right updates in real time) so now you should here reasonable amount of clicking if you use those clicking browsers.

As a side effect URL stays the same when you originally load the page as http://www.sergeychernyshev.com/maps.html

Persisting location attributes in URLs hash

I noticed that new Flash Yahoo! maps interface uses location parameters using URLs hash (text that you can see after # sign).
Apparently it’s quite known way of storing page state when developing AJAX applications and I see several reasons to use it in application like GvsY:

  • It can be updated without reloading the page and therefore can be made always up to date
  • It removes a need for separate permalink because you can bookmark the page at any moment and always get working link (you can click “del.icio.us” link at any moment to store specific location)
  • It helps keep the page in the browsers cache without re-requesting it separately for each location
  • Geographical location fits anchor paradigm pretty well since anchor is a “location within a document” and since this document is AJAX page representing the world map, this location can be geographical too

I liked the idea and that’s why I replaced passing parameters through query string with passing them using hash (or anchor if it sounds better). Enjoy!

Google maps vs. Yahoo! maps permalinks

Yesterday I showed Alex my Google maps vs. Yahoo! maps side-by-side comparision tool that I created so people can easily compare Google maps and Yahoo! maps. And right at that moment I realized that I never posted about it in this blog so here it is.
Alex suggested to add links to both sites so people can go and check ogirinal thing, and finally I got that solved so now you can see “G” and “Y” next to main permalink (see screengrab).

I can say that I enjoy JavaScript development which is a weird thing for a server side developer to say but I stopped using JS (about 10 years ago) only because it was so puny as a technology and now I’m coming to AJAX and JS web services because they really allow making cool stuff pretty easily – whole project took approximately 20 hours of work (spread over a couple of weeks) including learning both APIs, setting up hosting and writing this post.

So please, come and enjoy the fun of searching for differences (coordinates permalink will allow you to link to current position). You can post them as comments to this blog for now, special interface integrated into main page is coming in future releases.

P.S. Looks like Google is not using zoom level in their URL but viewport size instead, also it seams that Google maps quality is much better then they provide with API while Yahoo! is letting you use their production imagery (+1 to Yahoo!).

P.P.S. I had hard time figuring our how to point to Yahoo’s plain maps service so I put a link to their Flash based beta which is noticebly slower on my computer. I’ll be happy to add plain version link if someone will give me a clue how to pass it all parameters.