Home > Articles

  • Print
  • + Share This
From the author of

Adding a Marker to Your Map

What’s a map mashup without an icon to mark a specific location? Here’s a quick way to add a single marker to your map, pointing to the specified location. All you have to do is insert the following lines of code after the map.setCenter line in the <HEAD> of your document:

var point = new GLatLng(LATITUDE,LONGITUDE)
map.addOverlay(new GMarker(point));

Replace LATITUDE and LONGITUDE with the precise latitude and longitude of the marker’s location, of course.

  • + Share This
  • 🔖 Save To Your Account