How do i set the "setMap" function here to port this code to v3?

    while ((!map.getBounds().containsLatLng(marker.getPosition())) &
(showAllCategoryElements == 0)) {
        var newCenterPointLng = (map.getBounds().getCenter().lng() +
marker.getPosition().lng()) / 2;
        var newCenterPointLat = (map.getBounds().getCenter().lat() +
marker.getPosition().lat()) / 2;
        map.panTo(new google.maps.LatLng(newCenterPointLat,
newCenterPointLng));
        map.setCenter(new google.maps.LatLng(newCenterPointLat,
newCenterPointLng));
        if (!map.getBounds().containsLatLng(marker.getPosition())){
            map.zoomOut();
        }

here is an example http://d.hatena.ne.jp/tsmsogn/20111216/1324026723
some tips: markus.tao.at/geo/google-maps-api-v3-is-in-town/

i also import https://github.com/tparkin/Google-Maps-Point-in-Polygon
js to get "containsLatLng" support

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to