Multiple choice technology platforms and products

Which is the correct way to create a GMarker?

  1. var marker = new GMarker(point);

  2. var marker = new GoogleGMarker(point);

  3. var marker = map.overlayMarker(new GMarker(point));

  4. var marker = new Marker(point,"G");

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

The GMarker class is instantiated with a GLatLng point object as its constructor argument. This is the standard syntax for creating markers in Google Maps API v2. Options B, C, and D either use incorrect class names or non-existent methods.