Setting Up Google Maps My Maps and KML Files

From Fishcakes Wiki

Jump to: navigation, search
Edit Menu

Image:Icon_Google_Maps_40px.png Setting Up Google Maps My Maps and KML Files

Guide to setting up Google Maps My Maps and Google Maps KML Files for use with the Google Maps Wordpress Plugin and Exponent CMS Google Maps Simple module.


Contents

Using Google Maps to Create Maps

A guide to creating Maps with Google Maps and My Maps.

Google Maps Country Domains

To create a map, go to the Google Maps Domain for your country and use their controls to setup the map you want to display following the instructions below.

Setup a Basic Google Map

Instructions for setting up a basic map at Google Maps.

  1. Use the Pan Zoom tool or the Search Maps tool to find the location you want to display on your Map.
    image:Googlemapsimple_panzoom.png
  2. Double-click on the most important point on the map to set your Map Center or if you've used the Search Maps tool use the Search Results to select the correct location.
  3. Use the Zoom controls to set the map to the Zoom Level you want to display.
  4. Click on the Overview control to toggle the Overview Map to on or off.
    image:Googlemapsimple_overview.png
  5. Use the Map Type control to set the view you want to display: Map, Satelite or Hybrid.
    image:Googlemapsimple_maptype.png

Setup a Custom Google My Map

If you want to add your own Map Markers then use the My Maps widget to save your map.
Note: you can skip these steps if you don't wish to customise your map.

  1. Follow the instructions above for basic setup of your Map.
  2. Click on the My Maps tab then click on the Create new map link.
    image:Googlemapsimple_mymaps.png
  3. Save the Title and Description for your map.
  4. Use the map tools to add Placemarks, Lines and Shapes to your Map.
    image:Googlemapsimple_markers.png
  5. When complete, Save your Map.
  6. Once saved, reload your map by selecting it from the Created by me list.
    image:Googlemapsimple_createdbyme.png
    Note: this is necessary to refresh the Map Link for the next step.

Copy the Map Link

Now you're ready to copy the link for your map into the Google Maps Simple Module.

  1. Click Link to this page on the top-left corner of your Google Map.
    image:Googlemapsimple_linkpage.png
  2. Cop the link location to your clipboard.
    image:Googlemapsimple_linkpagecopy.png
  3. Return to Exponent and load your Google Maps Simple Module.
  4. Either Edit an existing map or Add a new map.
  5. Paste this Google link into the Google Map Link field.
  6. Input the other Map Details for your Map.
  7. Set which Map Controllers you want to display.
  8. Input your Map Title, Body Text and any Notes.
  9. Click Save and your map should now be displayed.

Editing a Custom Map

If you have saved your map to My Maps then changes made with Map Tools to your My Map layer will be automatically reflected on your Google Maps Simple Map.

  1. Use the map tools to add Placemarks, Lines and Shapes to your Map.
  2. When complete, Save your Map.
  3. Return to your Exponent website and hit refresh to see your updated Map.

Note: this only changes things saved in your My Map layer. To change the Map View see below.

Changing the Map View

If you want to change overall look of your map, you need to create a new Map Link.

  1. Go to your Map and make any changes to the Zoom Level, Map Type or Overview.
  2. When complete, Save your Map.
  3. Repeat the steps in Copy the Map Link as outlined above.

Troubleshooting

Solutions to a few common problems.

  • Map doesn't display — make sure the Google Maps Link you are pasting is correct and complete. A correct URL must have the following parameters:
  • ll= required to define latitude and longitude for center of the map.
  • z= required to define the initial zoom factor.
  • t= option to define if map is normal, satellite or hybrid.
  • om= option to show or not the overview map on bottom-right.
  • msid= required if you are pasting My Maps from Goole Maps website.
  • Map displays the wrong location or zoom level — this is usually caused by copying a Google Map Link which is set to a previous edit. If you're using a My Map then just click on the Map link in the Created by me list to refresh the link before copying.

Using a KML File to Create Maps

A guide to creating Maps with KML Files. This is a bit more complicated than using the Google Maps Link method, but does offer more customisation options for those familiar with the Google Maps API.

Please note, that the files outlined here are an old version of KML. Sorry but this Plugin doesn't support the current Google Maps and Google Earth KML files.

Setting Up a Basic KML File

Create a <dl> XHTML KML File with Map center point.

<dl style="visibility: hidden;" title="googlemap;w:100%;h:450">
   <dt><a href="http://maps.google.com/?z=15&ll=51.529386,-0.1273941&om=1&t=m"></a></dt>
</dl>
  1. Set dl to start the Definition List.
  2. Set style="visibility: hidden;" to hide the Map Markers until the Map has rendered. Other css style parameters can also be set.
  3. Set title="googlemap; to initialise the Google Map Plugin.
  4. Set w:100%;h:450 to the width and height you want for the Map.

  5. Set dt to start the Definition Tag for the Map Center.
  6. Set z= to define the desired Zoom Level. From z=1 to z=17.
  7. Set ll= to define the latitude and longitute for Map Center.
  8. Set om= to control display of Overview Map. Set to om=1 for Overview on. Set to om=0 for Overview off.
  9. Set t= to control what Map Type will be displayed. Set to t=m for normal Map. Set to t=k for Satellite map. Set to t=h for Hybrid map.
  10. Set /dt to end the Definition Tag.

  11. Set /dl to end the Definition List.

Your KML File is now ready to be uploaded to the Google Maps Simple Module.

Setting Up a KML File with Markers

Create a KML File consisting of a <dl> XHTML element list of a center points and markers with their text balloons.

<dl style="visibility: hidden;" title="googlemap;w:100%;h:450">
    <dt><a href="http://maps.google.com/?z=15&ll=51.529386,-0.1273941&om=1&t=m"></a></dt>
      <dt><a href="http://maps.google.com/?ll=51.52938484639296,-0.1273941993713379">map</a></dt>
      <dd><b>The British Library</b><br<96 Euston Rd<br>London, NW1 2DB</dd>
  </dl>
  1. Setup the basic file as outlined above.
  2. Set dt to start the Definition Tag for a Marker. You can add as many markers as you like.
  3. Set ll= to define the latitude and longitute where the Marker will appear. Make sure this is within the range of your Map!
  4. Set /dt to end the Definition Tag for this Marker.

  5. Set dd to start the Definition Delimiter for a Marker's popup window contents.
  6. Insert yourtext as either plain text or HTML. This can contain almost any HTML including image links.
  7. Set /dd to end the Definition Tag for this Marker.

Once you've added a few Markers to your KML File, upload it to the Google Maps Simple Module to view.

More About KML Files

For more information about KML files, and help setting up your own, see these resources:

  • Use the Sample KML File googlemaps/sample.kml included with the Google Maps Simple module to get an idea of what a KML file should look like.
  • There is also a KML Test File googlemaps/testfile.html which you can paste your KML list into to test your Markers are ok without needing to upload it to Module.
  • To find Latitude and Longitude for your map use the Mapki Latitude & Longitude Retriever.
  • For information about encoding your KML URL to enable various Google Map features, see Mapki Google Map Parameters. These should be added to the URL in the first <dt> which sets the Zoom Level and Map Center.

Links for this Page


Image:Icon Resources 20px.png Google Maps Links

Official Google Maps Links

Unofficial Google Maps Links

Great Google Maps Sites

Other Google Applications

  • Google Trends — compare the world's interest in your favourite topics.


Personal tools