Help:Google Maps

From Placeography

Jump to: navigation, search

This tutorial is here to provide basic knowledge on how to create and add to a Google map. Google maps can include all sorts of nifty information. To learn more about working with Google maps beyond what we provide here go to their own Google maps documentation site.

Google maps start with the tags <googlemap> and end with </googlemap>

The latitude/longitude coordinates are the center of the map. For example, to center a map on New Ulm, Minnesota, you would take the coordinates latitude 44.317462, longitude -94.461136

So the basic code would be:

<googlemap lat="44.317462" lon="-94.461136">
</googlemap>

Any coordinates for placemarks on this map, need to go between the two basic start and end tags. So for example, the Wanda Gag House in New Ulm is at latitude 44.360188, longitude -94.627991. Giving the code:

<googlemap lat="44.317462" lon="-94.461136">
44.360188,-94.627991, Wanda Gag House
</googlemap>

The text after the longitude becomes the placemark label.

More placemarks can be added between the tags, each on it's own line:

<googlemap lat="44.317462" lon="-94.461136">
44.360188,-94.627991, Wanda Gag House
44.316633,-94.465814, Brown County Historical Society
</googlemap>

To link to a new or existing wikilink to a page enclose the text in "[[Some text]]" double brackets.
To link to an external web site enclose the text in single brackets "[http://www.someurl.com Some text ]" with a space between the URL and the text.

<googlemap lat="44.317462" lon="-94.461136">
44.360188,-94.627991, [[Wanda Gag]] House
44.316633,-94.465814, [http://www.browncohistoricalsoc.org Brown County Historical Society]
</googlemap>


The default zoom is too far out, so this can be adjusted within the first tag:

<googlemap lat="44.317462" lon="-94.461136" zoom="10">
44.360188,-94.627991, [[Wanda Gag]] House
44.316633,-94.465814, [http://www.browncohistoricalsoc.org Brown County Historical Society]
</googlemap>

0 is the furthest away, 17 is the closest in.

Other aspects that can be adjusted in the same way are:

  • width (in pixels; default is 740)
  • height (in pixels; default is 600)
  • type ("normal"/"map", "hybrid", or "satellite"; default is "hybrid")
  • controls ("small", "medium" or "large")
  • selector (show the map/hybrid/satellite selector? "yes" or "no"; default is "yes".)
  • scale (show the distance scale? "yes" or "no"; default is "no".)
  • units ("meters" or "miles"; default is "meters".)

So the final code might be:

<googlemap lat="44.317462" lon="-94.461136" zoom="10" width="300" height="300" type="map" controls="small">
44.360188,-94.627991, [[Wanda Gag]] House
44.316633,-94.465814, [http://www.browncohistoricalsoc.org Brown County Historical Society]
</googlemap>

And it should look like:


The easiest way to find coordinates is using a geocoder such as http://www.infosports.com/m/map.htm . Other resources can be found by searching for "free geocode" on Google or another search engine. Alternatively, go to Google Maps, find the location you wish to map, move the map very slightly and click "link to this page". The "ll" value in the resulting URL contains the geocode.

Personal tools
Contribute
[http://discussions.mnhs.org/HP/oneonone.cfm snubnosed]