views:

119

answers:

2

Hi

I am busy with creating a Google map v3 site. If you have a look on google maps site you see they physically zoom(CSS like deepzoom) the tile just before they load the new tiles.

I want to reproduce this on my side. The problem is i cant find anything in API reference that i can do this with. I thought of creating a imagemaptype and just get the node of the img tag and do a css zoom on it and the call the normal maptype gettile but to no avail. I try using bound_change to see if the bounds change but i cant get the actual node(img tags).

Any help will be appreciated

thanks

A: 

I don't know if you can get it to behave exactly like their main Maps app, but this guy seems to have figured out a way to reproduce it: http://stackoverflow.com/questions/816100/google-maps-zoomout-pan-zoomin-animation

It looks like the continuous zoom was available in v2 but I can't find much reference to zooming at all in v3. Curious... http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2

Cory Larson
Will search and see if i can find anything
Pintac
A: 

In the v2 API you could call the GMap2.enableContinuousZoom() method to enable this feature. In the v3 API there is no such method as this feature is enabled by default in browsers that support it.

I tried the following short example in Chrome 5.0.375.99 and Firefox 3.6.6 (both for Mac), and only the map in Chrome came with continuous zoom enabled:

<!DOCTYPE html>
<html> 
<head> 
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 
  <title>Google Maps v3 Continuous Zoom</title> 
  <script src="http://maps.google.com/maps/api/js?sensor=false" 
          type="text/javascript"></script>
</head> 
<body> 
  <div id="map" style="width: 500px; height: 400px;"></div>

  <script type="text/javascript">

    var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 6,
      center: new google.maps.LatLng(-41.00, 174.00),
      mapTypeId: google.maps.MapTypeId.ROADMAP
    });

  </script>

</body>
</html>
Daniel Vassallo
thanks. I tried google maps site on ie8 and it has that ContinuousZoomis there a option i must set.
Pintac
@Pintac: No there is no option to set in the v3 API. There is a discussion [here](http://code.google.com/p/gmaps-api-issues/issues/detail?id=2079) on the fact that the maps.google.com site has this continuous zoom effect in more browsers than in maps using the v3 API. Unfortunately, there is nothing you can do at the moment.
Daniel Vassallo
oooh i see thanks
Pintac