38

After upgrade my complete code i had here the most currents tips to upgrade your code. Add other if you like.

Use : new google.maps. in place of G...

  • 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

Happy coding.

bdukes
  • 152,002
  • 23
  • 148
  • 175
user325558
  • 1,413
  • 5
  • 22
  • 35
  • map.InforWindow.Close() => map.InfoWindow.Close() stack overflow won't let me edit as single character – George Aug 21 '12 at 08:55
  • I have the same problem with Ossi. http://stackoverflow.com/questions/6153051/convert-this-from-google-maps-api-v2-to-v3 How can we convert it? – Rithy Dec 05 '13 at 08:09
  • GSize(x,y) should become: google.maps.Size(x, y) GIcon creation should be refactored to use: google.maps.MarkerImage( url, size:Size, origin?:Point, anchor?:Point, scaledSize?:Size ) map.addControl calls should be refactored into: MapOptions properties as follows: var mapOpts = { panControl: true, // First half of replacing GLargeMapControl zoomControl: true, // Other half of replacing GLargeMapControl scaleControl: true, // Replaces GScaleControl mapTypeControl: true // Replaces GMapTypeControl }; – Jitendra Sawant Jul 23 '21 at 12:25

0 Answers0