The existing code base was developed in Google maps api V2. V2 got deprecated so we are modifying the code from V2 to V3. There have been lots of changes in this api revision and may things have been updated.
Features not supported in v3
- Xml was read through google's api http://code.google.com/apis/maps/documentation/javascript/v2/services.html#XML_Requests which is not supported in V3 now, so we have shifted to Jquery to parse xml to js object. This approach is used in /opt/gmaps/perfsonar-PS/client/gmaps/html/IO.js at functions below
discover: function( uri ) { $.ajax({ type: "GET", url: uri, dataType: "xml", success: function(data) Similary it has been used in get: function( uri, callback ) too
- GoogleTabs were used to display serves hosted at a node. These tabs classes are also deprecated so we have used our own custom tabs made in jquery to display information for services. /opt/gmaps/perfsonar-PS/client/gmaps/html/Info.js
$("#tabs").tabs(); // Initializing tabs $("#tabs").tabs("add","#"+serviceType,serviceType); // for dynamically adding a tab based on service found
Fixes
- List of services in info window tabs are dynamic. Not rewriting through DOM object.
- When providing a custom access point "Enter" will execute the query.
- Help Box border issue is resolved.
Syntax Changes
- GLatLngBounds() --> google.maps.LatLngBounds();
- GlatLng --> google.maps.LatLng
- GPoint --> google.maps.Point
- Event.addListener --> google.maps.event.addListener
- map.getInfoWindow().getPoint --> google.maps.getPosition()
- markers[i].getPoint() --> markers[i].getPosition()
- closeInfoWindow() --> map.InforWindow.Close();
- map.getBoundsZoomLevel(bounds) --> map.fitBounds(bounds)
- markers[i].setImage --> .setIcon
- map.InfoWindow.close() --> create a function to close
- find in maps for objects --> $('#id')[0] or $('#id').get(0) or document.getElementbyId
get: function( uri, callback )