-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.html
47 lines (44 loc) · 2.35 KB
/
map.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAABCY4svSly2pLinPZJ2yw1hSx8r_rA1iAVBcmwt2_985XE-tsKhT1ewYunqd7JbUdHV-V_IgCpJiHMQ" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 800px; height: 600px"></div>
<script type="text/javascript">
//<![CDATA[
var map = new GMap(document.getElementById("map"));
;
map.centerAndZoom(new GPoint(-99.30529117, 34.90456888), 4);
var markerpoint = new GPoint(-99.30529117, 34.90456888);
var golfcoursept = new GPoint(-99.30387496948242, 34.878326713257394);
var campgroundpt = new GPoint(-99.29898262023926, 34.89029601271247);
var golficon = new GIcon();
golficon.image="http://quartz.wosc.edu/images/golf.png";
golficon.iconSize = new GSize(20,20);
golficon.iconAnchor = new GPoint(6,20);
golficon.infoWindowAnchor = new GPoint(5,1);
var golfmarker = new GMarker(golfcoursept,golficon);
var campicon = new GIcon();
campicon.image="http://quartz.wosc.edu/images/tent.png";
campicon.iconSize = new GSize(21,15);
campicon.iconAnchor = new GPoint(4,15);
campicon.infoWindowAnchor = new GPoint(4,1);
var campmarker = new GMarker(campgroundpt,campicon);
var marker = new GMarker(markerpoint);
var quartzhtml = '<div style="width: 520px; height: 450px;" >Quartz Mountain Resort and Hotel<img src="http://quartz.wosc.edu/images/lakeview.jpg" alt="lakeview"><br><a href="http://www.quartzmountainresort.com"> Quartz Mountain Resort.com</a></div>';
var camphtml = '<div style="width:200px;">Campground and Picnic Area</div>';
var golfhtml = '<div style="width:250px;">Quartz Mtn. Golf Course</div>';
GEvent.addListener(marker,'click',function() { marker.openInfoWindowHtml(quartzhtml);});
GEvent.addListener(campmarker,'click',function() { campmarker.openInfoWindowHtml(camphtml);});
GEvent.addListener(golfmarker,'click',function() { golfmarker.openInfoWindowHtml(golfhtml);});
GEvent.addListener(map,'infowindowclose',function() {map.recenterOrPanToLatLng(new GPoint(-99.30529117, 34.90456888),4);});
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.addOverlay(campmarker);
map.addOverlay(marker);
map.addOverlay(golfmarker);
//]]>
</script>
</body>
</html>