Template:Fragoria Map

From FragoriaWiki

(Difference between revisions)
Jump to: navigation, search
Line 66: Line 66:
});
});
-
setMarkers (map, dungeons);
+
setMarkers (map, greendungeons);
    infowindow = new google.maps.InfoWindow({
    infowindow = new google.maps.InfoWindow({
                 content: "Loading..."
                 content: "Loading..."
Line 104: Line 104:
// repeat across x-axis
// repeat across x-axis
if (x < 0 || x >= tileRange) {
if (x < 0 || x >= tileRange) {
-
x = (x % tileRange + tileRange) % tileRange;
+
// x = (x % tileRange + tileRange) % tileRange;
-
// return null;
+
return null;
}
}
return {
return {
Line 111: Line 111:
y: y
y: y
};
};
-
 
}
}
-
var dungeons = [
+
var greendungeons = [
-
['Dark Konungs Tomb',-89.128166,16.829451,2,'<img src="/wiki/images/3/31/Pets1.png" alt="" width="170px" />'],
+
['Dark Konungs Tomb',-89.128166,16.829451,2,'<img src="/wiki/images/3/31/Pets1.png" />'],
['Robbers Vault',-89.089905,47.766951,3,'Test'],
['Robbers Vault',-89.089905,47.766951,3,'Test'],
['Savage Dens',-89.221718,29.309920,4,'Test'],
['Savage Dens',-89.221718,29.309920,4,'Test'],
Line 132: Line 131:
function setMarkers(map, locations) {
function setMarkers(map, locations) {
-
var dungeonimage = {
+
var greendungeonimage = {
url: '/wiki/images/f/f7/Greendungeonicon.png',
url: '/wiki/images/f/f7/Greendungeonicon.png',
size: new google.maps.Size(40, 40),  
size: new google.maps.Size(40, 40),  
Line 138: Line 137:
anchor: new google.maps.Point(20, 20)  
anchor: new google.maps.Point(20, 20)  
};
};
-
var shape = {
+
var greendungeonshape = {
coords: [0, 0, 0, 40, 40, 40 , 40, 0],  
coords: [0, 0, 0, 40, 40, 40 , 40, 0],  
type: 'poly'
type: 'poly'
};
};
for (var i = 0; i < locations.length; i++) {
for (var i = 0; i < locations.length; i++) {
-
var dungeon = locations[i];
+
var greendungeon = locations[i];
-
var dungeonLatLng = new google.maps.LatLng(dungeon[1], dungeon[2]);
+
var greendungeonLatLng = new google.maps.LatLng(greendungeon[1], greendungeon[2]);
var marker = new google.maps.Marker({
var marker = new google.maps.Marker({
-
position: dungeonLatLng,
+
position: greendungeonLatLng,
map: map,
map: map,
-
icon: dungeonimage,
+
icon: greendungeonimage,
-
shape: shape,
+
shape: greendungeonshape,
-
title: dungeon[0],
+
title: greendungeon[0],
-
                 html: dungeon[4],
+
                 html: greendungeon[4],
-
optimized: false,
+
optimized: false,
-
zIndex: dungeon[3]
+
zIndex: greendungeon[3]
});
});
-
 
+
             var contentString = "Content";
-
             var contentString = "Some content";
+
-
 
+
             google.maps.event.addListener(marker, "click", function () {
             google.maps.event.addListener(marker, "click", function () {
                 infowindow.setContent(this.html);
                 infowindow.setContent(this.html);
                 infowindow.open(map, this);
                 infowindow.open(map, this);
             });
             });
-
 
-
 
}
}
-
 
-
 
}
}
-
google.maps.event.addDomListener(window, 'load', initialize);
+
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</script>

Revision as of 23:39, 6 April 2015

Fragoria Map

 

Personal tools
Date/Time
Server & Cross

Super-Cross Server