Help:Google Maps

From MN150

Jump to: navigation, search

This tutorial is here to provide basic knowledge on how to create and add to a Google map to the MN150 wiki site. 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.

The best and easiest way to add a map (or modify an existing map) is to click on "Edit" on the top of the page you want to add the map to.


Under the wiki tool bar is a link "make a map" click on it.


In the text field that appears enter the address of the site you wish to create a map of. Be as specific as possible including state and street address.


In the Google location map that appears you can add more information to your entry. Wiki code is allowed. Select "Save & Close" in the box.
IMPORTANT! the information of the entry must be on one line.


Copy the google map code created and paste it in the section of the page you want.
Add <div align="center"> </div> round the Google map code to center it and keep text from wrapping through it.

So the final code might be:

<div align="center">
<googlemap lat="44.317462" lon="-94.461136" zoom="5" width="200" 
height="200" type="map" controls="small" selector="no">
44.360188,-94.627991, [[Wanda Gag]] House<br> 226 N Washington St,<br>  New Ulm, MN
</googlemap>
</div>

And it should look like:


Adding an image is simple if you are familiar with Mediawiki code. Just add the name of the image, the width (50px)and the alignment (left) within the <googlemap> tag. Example: [[Image:Pf041672.jpg|50px]] can be added to the following:

<div align="center">
<googlemap lat="44.317462" lon="-94.461136" zoom="5" width="200" 
height="200" type="map" controls="small" selector="no">
44.360188,-94.627991,[[Image:Pf041672.jpg|50px|left]] [[Wanda Gag]] House<br> 226 N Washington St,<br>  New Ulm, MN
</googlemap>
</div>



You can add more places to a map by putting the coordinates on its own separate line within the <googlemap></googlemap> tags.
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>


If the default zoom is too far out, this can be adjusted within the google tag: zoom="0" is the furthest away, zoom="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".)
Views
Personal tools