MapMyGlobe

Archive for the ‘GMaps API’ Category

Link on Google Maps Mania

Monday, January 7th, 2008

Yesterday we were linked to from Google Maps Mania which is one of the main directory for Google Maps mashups. Thanks to them! I hope this will help to make MapMyGlobe a little well-known :)

The post in question can be found here.

User-Generated Animation

Monday, October 29th, 2007

I’m happy to introduce MapMyGlobe’s new feature: the ability to animate transitions between frames, i.e. to zoom or unzoom smoothly instead of just switching the viewport to a different location. Right now, this transition is computed from just the frames’ view centers and zoom levels, however, I don’t exclude the possibility of a finer-grained control by the user in the future. Until then, try it out, it’s pretty cool…

movie-camera.jpg

Actually, it looks like Google might be willing to roll out a similar user-generated animation feature in their MyMaps app as well. One proof of that being Mark Clark of Google’s London Underground map. He actually uses the same map.panTo() GMaps function that we do.

By the way, it looks like another huge trend might just have emerged at Google Maps/Earth. I’m speaking of the incorporation of imagery from the Southern California fires into Google Earth. As far as I know, it is the first time that Google’s imagery team publishes map tiles relevant to the news, at such a large scale, and as quickly as that. Which makes me think that at some point, any big event visible from the sky will be available on the web almost in real-time

GMaps Geocoder Accuracy and Zoom level

Wednesday, August 29th, 2007

One year ago, the Google Maps API development team released a small but pretty neat improvement to their Geocoding API: the ability to get the response’s accuracy level for a given address.

This feature enables applications to modify their zoom level according to the precision of the address that’s being geocoded, for example, “Paris” at the city zoom level, but “1 rue Royale, 75008 Paris” at the much more precise street address zoom level.

What the Google geocoder actually outputs (see reference) is a value between 1 and 8. And the GMaps zoom level is an integer between 1 and 19. So the question is: given a geocoding accuracy, which zoom level should I use to display the place? I didn’t find any answer to that question on the web so I decided to make up my own correspondence between the two scales. Any such correspondence is bound to be imperfect since two different cities can have very different sizes, however the method usually outputs a decent result.

var tabAccuracy = new Array(2,4,6,10,12,13,16,16,17);

function showAddress(address) {
  if (geocoder) {
    geocoder.getLocations(address,
    function(response) {
      if(response.Status.code!=200){
        alert('"' + address + '" not found');
      } else {
        place = response.Placemark[0];
        accuracy = place.AddressDetails.Accuracy;
        map.setCenter(new GLatLng(place.Point.coordinates[1],
             place.Point.coordinates[0]), tabAccuracy[accuracy]);
      }
    }
    );
  }
}

I calibrated the association on a few cities such as Paris, NYC and San Francisco, and I was a bit conservative to ensure that people with small screens still get the picture. Let me know if you find this scale useful.