Template:Fragoria Map
From FragoriaWiki
(Difference between revisions)
Line 67: | Line 67: | ||
setMarkers (map, dungeons); | setMarkers (map, dungeons); | ||
+ | infowindow = new google.maps.InfoWindow({ | ||
+ | content: "Loading..." | ||
+ | }); | ||
+ | |||
var FragotownMarker = new google.maps.Marker({ | var FragotownMarker = new google.maps.Marker({ | ||
Line 111: | Line 115: | ||
var dungeons = [ | var dungeons = [ | ||
- | ['Dark Konungs Tomb',-89.128166,16.829451,2], | + | ['Dark Konungs Tomb',-89.128166,16.829451,2,'Test'], |
- | ['Robbers Vault',-89.089905,47.766951,3], | + | ['Robbers Vault',-89.089905,47.766951,3,'Test'], |
- | ['Savage Dens',-89.221718,29.309920,4], | + | ['Savage Dens',-89.221718,29.309920,4,'Test'], |
- | ['Wolfs Lair',-89.931470,45.657576,5], | + | ['Wolfs Lair',-89.931470,45.657576,5,'Test'], |
- | ['Castle Pantry',-89.870076,-49.527971,6], | + | ['Castle Pantry',-89.870076,-49.527971,6,'Test'], |
- | ['Poisoned Spring',-89.848769,-88.551408,7], | + | ['Poisoned Spring',-89.848769,-88.551408,7,'Test'], |
- | ['Robbers Camp',-88.900931,-51.901018,8], | + | ['Robbers Camp',-88.900931,-51.901018,8,'Test'], |
- | ['Underwater Temple Grandmothers Cave',-87.884290,-87.760393,9], | + | ['Underwater Temple Grandmothers Cave',-87.884290,-87.760393,9,'Test'], |
- | ['Yard of the Red Witch',-82.335838,-100.152971,10], | + | ['Yard of the Red Witch',-82.335838,-100.152971,10,'Test'], |
- | ['Abandoned Bonekeep',-62.927026,-64.293596,11], | + | ['Abandoned Bonekeep',-62.927026,-64.293596,11,'Test'], |
- | ['White Worms Lair',24.423564,-113.072893,12], | + | ['White Worms Lair',24.423564,-113.072893,12,'Test'], |
- | ['Winter Castle',32.450837,-79.059221,13], | + | ['Winter Castle',32.450837,-79.059221,13,'Test'], |
- | ['Gates of Night',65.319363,-104.108049,14], | + | ['Gates of Night',65.319363,-104.108049,14,'Test'], |
- | ['Prison of the Ancient Gods',67.329878,-103.844377,15] | + | ['Prison of the Ancient Gods',67.329878,-103.844377,15,'Test'] |
]; | ]; | ||
function setMarkers(map, locations) { | function setMarkers(map, locations) { | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
var dungeonimage = { | var dungeonimage = { | ||
url: '/wiki/images/f/f7/Greendungeonicon.png', | url: '/wiki/images/f/f7/Greendungeonicon.png', | ||
Line 172: | Line 151: | ||
shape: shape, | shape: shape, | ||
title: dungeon[0], | title: dungeon[0], | ||
- | + | html: dungeon[4], | |
zIndex: dungeon[3] | zIndex: dungeon[3] | ||
}); | }); | ||
- | |||
+ | var contentString = "Some content"; | ||
+ | google.maps.event.addListener(marker, "click", function () { | ||
+ | alert(this.html); | ||
+ | infowindow.setContent(this.html); | ||
+ | infowindow.open(map, this); | ||
+ | }); | ||
- | |||
- | |||
- | } | + | } |
+ | |||
} | } |
Revision as of 23:11, 6 April 2015