Multiple choice technology platforms and products

Which is the correct way to obtain a given point in the map, knowing the latitude and longitude of the point?

  1. var myGeographicCoordinates = new GPointM(new Lat(longitude),new Lng(longitude));

  2. var myGeographicCoordinates = new GLatLng(myLatitude, myLongitude);

  3. var myGeographicCoordinates = new GLatLng(GMarker.Lat(),GMarker.Lng())

  4. var myGeographicCoordinates = new GLatLng(GMarker.getLat(),GMarker.getLng())

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The GLatLng constructor takes latitude and longitude as parameters in that order. This is the correct way to create a geographic coordinate point in Google Maps API v2. Options A uses incorrect class names, and C/D incorrectly reference GMarker methods.