| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|---|
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 3 |
<head> |
|---|
| 4 |
<title>Mapstraction - a javascript library to hide differences between mapping APIs.</title> |
|---|
| 5 |
<link rel="stylesheet" type="text/css" href="bluefreedom.css" media="screen" /> |
|---|
| 6 |
<style type="text/css"> |
|---|
| 7 |
#mapstraction { |
|---|
| 8 |
height: 400px; |
|---|
| 9 |
width: 400px; |
|---|
| 10 |
} |
|---|
| 11 |
</style> |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
<script src="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script> |
|---|
| 15 |
<script type="text/javascript" src="mapstraction-js/mapstraction.js"></script> |
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
</head> |
|---|
| 19 |
<body> |
|---|
| 20 |
<div id="wrap"> |
|---|
| 21 |
<div id="header"> |
|---|
| 22 |
|
|---|
| 23 |
<img src="images/mapstraction_icon.png" style="float: right;"/> |
|---|
| 24 |
<h1><a href="#">Mapstraction</a></h1> |
|---|
| 25 |
<h2>Javascript mapping abstraction library</h2> |
|---|
| 26 |
|
|---|
| 27 |
</div> |
|---|
| 28 |
|
|---|
| 29 |
<div class="middle"> |
|---|
| 30 |
|
|---|
| 31 |
<div id="mapstraction"></div> |
|---|
| 32 |
<script type="text/javascript"> |
|---|
| 33 |
// initialise the map with your choice of API |
|---|
| 34 |
var mapstraction = new Mapstraction('mapstraction','microsoft'); |
|---|
| 35 |
|
|---|
| 36 |
// create a lat/lon object |
|---|
| 37 |
var myPoint = new LatLonPoint(37.4041960114344,-122.008194923401); |
|---|
| 38 |
|
|---|
| 39 |
// display the map centered on a latitude and longitude (Google zoom levels) |
|---|
| 40 |
mapstraction.setCenterAndZoom(myPoint, 15); |
|---|
| 41 |
|
|---|
| 42 |
// create a marker positioned at a lat/lon |
|---|
| 43 |
my_marker = new Marker(myPoint); |
|---|
| 44 |
|
|---|
| 45 |
my_marker.setIcon('icon.gif'); |
|---|
| 46 |
mapstraction.addMarker( new Marker( new LatLonPoint(37.404,-122.008))); |
|---|
| 47 |
|
|---|
| 48 |
// add a label to the marker |
|---|
| 49 |
my_marker.setLabel("<blink>H</blink>"); |
|---|
| 50 |
|
|---|
| 51 |
var text = "<b>South Austin, Texas Rocks!</b>"; |
|---|
| 52 |
|
|---|
| 53 |
// add info bubble to the marker |
|---|
| 54 |
my_marker.setInfoBubble(text); |
|---|
| 55 |
|
|---|
| 56 |
// display marker |
|---|
| 57 |
mapstraction.addMarker(my_marker); |
|---|
| 58 |
|
|---|
| 59 |
// open the marker |
|---|
| 60 |
|
|---|
| 61 |
my_marker.openBubble(); |
|---|
| 62 |
|
|---|
| 63 |
mapstraction.addEventListener('click', function(p) { alert('Clicked at ' + p) }); |
|---|
| 64 |
|
|---|
| 65 |
ufoo = function() { mapstraction.removeMarker(my_marker); } |
|---|
| 66 |
</script> |
|---|
| 67 |
|
|---|
| 68 |
<ul> |
|---|
| 69 |
<li><a onclick="mapstraction.removeAllMarkers();">click me to remove all markers</a>.</li> |
|---|
| 70 |
<li><a onclick="foo();">click me to remove the marker</a>.</li> |
|---|
| 71 |
</ul> |
|---|
| 72 |
</div> |
|---|
| 73 |
|
|---|
| 74 |
<div class="right"> |
|---|
| 75 |
|
|---|
| 76 |
<h2>Navigation</h2> |
|---|
| 77 |
<ul> |
|---|
| 78 |
<li><a href="http://mapstraction.com/trac">Documentation</a></li> |
|---|
| 79 |
<li><a href="http://mapstraction.com/svn/source/mapstraction.js">Download</a></li> |
|---|
| 80 |
<li><a href="http://mapstraction.com/trac">Trac</a></li> |
|---|
| 81 |
<li><a href="http://mapstraction.com/svn">Repository</a></li> |
|---|
| 82 |
</ul> |
|---|
| 83 |
<h2>Demos</h2> |
|---|
| 84 |
<ul> |
|---|
| 85 |
<li><a href="ljn.html">Single Page with all Maps</a></li> |
|---|
| 86 |
<li><a href="ypolyline/index.html">Line/Polygon</a></li> |
|---|
| 87 |
<li><a href="mpolyline/index.html">GeoRSS</a></li> |
|---|
| 88 |
|
|---|
| 89 |
<li><a href="demo-openstreemap.html">OpenStreetMap</a></li> |
|---|
| 90 |
<li><a href="demo-yahoo.html">Yahoo</a></li> |
|---|
| 91 |
<li><a href="demo-google.html">Google</a></li> |
|---|
| 92 |
<li><a href="demo-microsoft.html">Microsoft</a></li> |
|---|
| 93 |
<li><a href="demo-map24.html">Map24</a></li> |
|---|
| 94 |
<li><a href="demo-multimap.html">MultiMap</a></li> |
|---|
| 95 |
<li><a href="demo-mapquest.html">MapQuest</a></li> |
|---|
| 96 |
</ul> |
|---|
| 97 |
|
|---|
| 98 |
</div> |
|---|
| 99 |
|
|---|
| 100 |
<div id="clear"></div> |
|---|
| 101 |
|
|---|
| 102 |
</div> |
|---|
| 103 |
|
|---|
| 104 |
<div id="footer"> |
|---|
| 105 |
Hosted in <a href="http://http://highearthorbit.com">HighEarthOrbit</a> - |
|---|
| 106 |
Design by <a href="http://www.minimalistic-design.net">Minimalistic Design</a> |
|---|
| 107 |
</div> |
|---|
| 108 |
</body> |
|---|
| 109 |
</html> |
|---|
| 110 |
|
|---|