Can you help me to translate this API v2 to an API v3?
Thanks for help.

function initialize()
                {
                        try
                        {
                                if (GBrowserIsCompatible())
                                {
                                        map = new 
GMap2(document.getElementById("divMap"));
                                        map.addControl(new GLargeMapControl());
                                        map.addControl(new GMapTypeControl());
                                        map.addControl(new GScaleControl());
                                        var ne = new
GLatLng(document.getElementById("hdnLowerRightLatitude").value,
document.getElementById("hdnLowerRightLongitude").value); //
[usp_MapGetDisplay]  1
                                        var sw = new
GLatLng(document.getElementById("hdnUpperLeftLatitude").value,
document.getElementById("hdnUpperLeftLongitude").value);
                                        bounds = new GLatLngBounds(sw, ne);
                                        var mapZoomLevel = 
map.getBoundsZoomLevel(bounds);
                                        map.setCenter(bounds.getCenter(), 
mapZoomLevel);
                                        map.disableDoubleClickZoom();
                                        map.enableScrollWheelZoom();
                                        
GEvent.addListener(map,"click",function()
                                        {
                                                try
                                                {
                                                        mnuMap.Hide();
                                                        mnuVehicle.Hide();
                                                }
                                                catch(e)
                                                {
                                                        //alert(e.description)
                                                }
                                        });
                                        GEvent.addListener(map, 
"singlerightclick",
function(point,src,overlay)
                                        {
                                                if(overlay)
                                                {
                                                        if(overlay instanceof 
GMarker)
                                                        {
                                                                if(overlay.id 
== "GeoPoint")
                                                                {
                                                                        
Map_OnMapRightClick(point);
                                                                }
                                                                else
                                                                {
                                                                        
Map_OnVehicleRightClick(point,overlay)
                                                                }
                                                        }
                                                        else
                                                        {
                                                                
Map_OnMapRightClick(point);
                                                        }
                                                }
                                        } );

                                        GeoPoints();

                                        
window.document.all["divMap"].onVehiclePositionUpdate =
Map_OnVehiclePositionUpdate;
                                        
window.document.all["divMap"].onInactiveVehiclePositionUpdate =
Map_OnInactiveVehiclePositionUpdate;
                                        
window.document.all["divMap"].onReplayVehiclePositionUpdate =
Map_OnReplayVehiclePositionUpdate;
                                        
//window.document.all["divMap"].onGISDataFound = GISDataFound;
                                        
//window.document.all["divMap"].onCommandDone = CommandDone;
        
window.document.all["divMapVehicleDisplay"].onVehicleLocateClicked =
MapDisplay_OnVehicleLocateClicked;
                                        
window.document.all["divMapVehicleDisplay"].onVehicleGroupChange
= MapDisplay_OnVehicleGroupChange;
        
window.document.all["divMapInactiveVehicleDisplay"].onVehicleGroupChange
= MapDisplay_OnVehicleGroupChange;
                                        
window.document.all["divMapVehicleDisplay"].onStreetSearchClick =
PromptStreetSearch;
        
window.document.all["divMapInactiveVehicleDisplay"].onStreetSearchClick
= PromptStreetSearch;
                                        
window.document.all["divStreetSearch"].style.display = "none";
                                        if (!IsReplayWindow())
                                        {
                                                
window.document.all["divMapVehicleDisplay"].style.display = "";
        
window.document.all["divMapInactiveVehicleDisplay"].style.display =
"none";
                                                
window.document.all["divReplay"].style.display = "none";
                                        }
                                        else
                                        {
                                                
window.document.all["divMapVehicleDisplay"].style.display =
"none";
        
window.document.all["divMapInactiveVehicleDisplay"].style.display =
"none";
                                                
window.document.all["divReplay"].style.display = "";
                                        }

                                }
                        }
                        catch(e)
                        {
                                //alert(e.description+"")
                        }
                }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to