0

Here is what I have done so far(had to wrap in a anchor tag for some reason...)

<a src="http://jsfiddle.net/christian4423/6oe9gLLn/"></a>

With each area being a region I want to zoom into when clicked. How would I do so? As far as my research shows there is no more click event with V3. If I am wrong please let me know, and how could I make it zoom to the overlay within its bounds?

4

1 回答 1

0

形状应该响应点击事件并且它会响应

// In your case
google.maps.event.addListener(polyline, 'click', function() {
    // Zoom as you wish here
    map.setZoom(map.getZoom() + 2); 
});

Perharps,您还应该将地图的中心设置为多边形的中心。

于 2014-09-11T18:51:31.417 回答