Difference between revisions of "Using GPS Data with Google Maps"

From Pvdwiki
Jump to: navigation, search
(Sample Code)
(WIKI)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Google maps is probably one of the most powerful features within google.
 
Google maps is probably one of the most powerful features within google.
 +
 +
<googlemap lat="42.711618" lon="-73.25112">
 +
42.711618, -73.25112, this point is not on a line
 +
43.224024, -70.28301, neither is this one
 +
#770077
 +
42.202452, -72.83101, this is on a line of color #77077
 +
45.214425, -72.48114, so is this
 +
#668800
 +
42.201324, -70.95811, this starts a second line
 +
43.404142, -73.44514, this is also on the second line
 +
</googlemap>
 +
  
 
===The API===
 
===The API===
 +
To use google features within your own html, an API key must be applied for. Each URL needs it's own Key to funtion.
 +
 +
http://www.google.com/apis/maps/signup.html
 +
 
The google API has specific instructions for adding maps, including GPS tracks to your website.
 
The google API has specific instructions for adding maps, including GPS tracks to your website.
  
 
http://www.google.com/apis/maps/
 
http://www.google.com/apis/maps/
  
===Sample Code===
+
===HTML===
 +
[[Image:Googlemapcode.gif]]
 +
 
 +
===WIKI===
 +
 
 +
http://www.mediawiki.org/wiki/Extension:Google_Maps
 +
 
 +
http://en.giswiki.net/wiki/Google_Maps_Extensions/GMap
 +
 
 +
http://meta.wikimedia.org/wiki/User:Mafs/GoogleMapExtension
 +
 
 +
other types of maps in mediawiki are covered here: http://meta.wikimedia.org/wiki/Maps
  
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
+
http://mapki.com/wiki/Google_Map_Parameters
  <head>
 
    <title>Google Map Tracks</title>
 
    <style type="text/css">
 
    </style>
 
  <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAsNp9xgRS4yu00Rvm7mlCSRTn6FS1Bcq0FYDY5Ie8KnpnQlairxQRMrscabIS32xzU5Rop67ndJliZQ" type="text/javascript"></script>
 
  <script type="text/javascript">
 
    function onLoad() {
 
      var map = new GMap2(document.getElementById("map"),{mapTypes:[G_SATELLITE_MAP,G_NORMAL_MAP]});
 
      map.setCenter(new GLatLng(37.927895,-122.5702025), 15, G_SATELLITE_MAP);
 
  map.addControl(new GSmallZoomControl(),new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(1, 1)));
 
  map.addControl(new GMapTypeControl(),new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(1, 1)));
 
  map.addControl(new GScaleControl(),new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(25, 5)))
 
 
 
var polyline = new GPolyline([
 
new GLatLng(37.929631,-122.570308),
 
new GLatLng(37.929627,-122.570309),
 
new GLatLng(37.929625,-122.570321),
 
new GLatLng(37.929624,-122.570317),
 
new GLatLng(37.929629,-122.570315),
 
new GLatLng(37.929627,-122.570302),
 
new GLatLng(37.929586,-122.57035),
 
new GLatLng(37.929503,-122.570425)],
 
"#0000FF", 5, 1);
 
map.addOverlay(polyline);
 
}
 
</script>
 
  </head>
 
  <BODY onLoad="onLoad()" onunload="GUnload()">
 
<div id="map" style="width: 500px; height: 250px"></div>
 
  </body>
 
</html>
 
  
 
===Why Google Maps is better than Google Earth===
 
===Why Google Maps is better than Google Earth===
 +
 +
The biggest problem with Google Earth is that users need to sign in. a pain.
 +
 +
===Test Space===
 +
 +
<gmap>width=600|height=500|zoom=4|controls=no|type=hybrid|
 +
rss=http://www.gpxchange.com/gpxconvert/handler.asp?file=d%3A%5Cinetpub%5Cwwwroot%5CGPXchange%5CGPXconvert%5CGPX%5C100055%2Egpx&size=57509&name=100055%2Egpx| usecache=yes</gmap>
  
  
 
[[Category:GPS]]
 
[[Category:GPS]]

Latest revision as of 15:58, 8 March 2008

Google maps is probably one of the most powerful features within google.

<googlemap lat="42.711618" lon="-73.25112"> 42.711618, -73.25112, this point is not on a line 43.224024, -70.28301, neither is this one

  1. 770077

42.202452, -72.83101, this is on a line of color #77077 45.214425, -72.48114, so is this

  1. 668800

42.201324, -70.95811, this starts a second line 43.404142, -73.44514, this is also on the second line </googlemap>


The API

To use google features within your own html, an API key must be applied for. Each URL needs it's own Key to funtion.

http://www.google.com/apis/maps/signup.html

The google API has specific instructions for adding maps, including GPS tracks to your website.

http://www.google.com/apis/maps/

HTML

Googlemapcode.gif

WIKI

http://www.mediawiki.org/wiki/Extension:Google_Maps

http://en.giswiki.net/wiki/Google_Maps_Extensions/GMap

http://meta.wikimedia.org/wiki/User:Mafs/GoogleMapExtension

other types of maps in mediawiki are covered here: http://meta.wikimedia.org/wiki/Maps

http://mapki.com/wiki/Google_Map_Parameters

Why Google Maps is better than Google Earth

The biggest problem with Google Earth is that users need to sign in. a pain.

Test Space

<gmap>width=600|height=500|zoom=4|controls=no|type=hybrid| rss=http://www.gpxchange.com/gpxconvert/handler.asp?file=d%3A%5Cinetpub%5Cwwwroot%5CGPXchange%5CGPXconvert%5CGPX%5C100055%2Egpx&size=57509&name=100055%2Egpx%7C usecache=yes</gmap>