Template:Fragoria Map
From FragoriaWiki
(Difference between revisions)
Line 13: | Line 13: | ||
} | } | ||
var bound = Math.pow(2, zoom); | var bound = Math.pow(2, zoom); | ||
- | return '/maptiles/' + zoom + ' | + | return '/maptiles/' + zoom + '/' + normalizedCoord.y + '_' + normalizedCoord.x + '.jpg'; |
}, | }, | ||
tileSize: new google.maps.Size(256, 256), | tileSize: new google.maps.Size(256, 256), | ||
maxZoom: 4, | maxZoom: 4, | ||
minZoom: 1, | minZoom: 1, | ||
- | + | radius: 1738000, | |
name: 'Fragoria' | name: 'Fragoria' | ||
}; | }; | ||
Line 25: | Line 25: | ||
function initialize() { | function initialize() { | ||
- | var Fragotown = new google.maps.LatLng(-89. | + | var Fragotown = new google.maps.LatLng(-89.623848,33.001326); |
var mapOptions = { | var mapOptions = { | ||
center: Fragotown, | center: Fragotown, | ||
Line 41: | Line 41: | ||
// Bounds | // Bounds | ||
var strictBounds = new google.maps.LatLngBounds( | var strictBounds = new google.maps.LatLngBounds( | ||
- | new google.maps.LatLng(-89.957, | + | new google.maps.LatLng(-89.957,-125), |
- | new google.maps.LatLng(65, | + | new google.maps.LatLng(65,125) |
); | ); | ||
// Listen for the CENTER_CHANGED event | // Listen for the CENTER_CHANGED event | ||
Line 67: | Line 67: | ||
var FragotownMarker = new google.maps.Marker({ | var FragotownMarker = new google.maps.Marker({ | ||
- | position: new google.maps.LatLng(-89. | + | position: new google.maps.LatLng(-89.623848,33.001326), |
map: map, | map: map, | ||
draggable:true, | draggable:true, | ||
Line 190: | Line 190: | ||
// tile range in one direction range is dependent on zoom level | // tile range in one direction range is dependent on zoom level | ||
// 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc | // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc | ||
- | var tileRange = | + | var tileRange = 2 << zoom; |
// repeat across y-axis (vertically) | // repeat across y-axis (vertically) | ||
Line 212: | Line 212: | ||
</script> | </script> | ||
- | <body onload="initialize()"><center> | + | |
+ | <body onload="initialize()"> | ||
+ | <center> | ||
<div id="current">Coordinates</div> | <div id="current">Coordinates</div> | ||
- | <div style="box-shadow: 2px 2px 5px #999999;border: 1px solid black;width: 97%; height: | + | <div style="box-shadow: 2px 2px 5px #999999;border: 1px solid black;width: 97%; height: 585px;background-image:url('/wiki/images/1/1f/Background.jpg');" id="map_canvas"> |
</div> | </div> | ||
</center> | </center> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 14:12, 6 April 2015
Coordinates