Difference between revisions of "Widget:Map"

From EntropiaPlanets Wiki - Entropia Universe Guides Wiki Info
m
m
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<script>
var newStyle = document.createElement("link");
newStyle.rel = "stylesheet";
newStyle.href = "http://elderscrolls.cc/leaflet-0.8/leaflet.css";
document.getElementsByTagName("head")[0].appendChild(newStyle);
</script>


<div id="map" style="width: 768px; height: 768px; margin-left:auto; margin-right:auto;"></div>
<div id="map" style="width: 768px; height: 768px; margin-left:auto; margin-right:auto;"></div>


<script src="http://elderscrolls.cc/leaflet-0.8/leaflet.js"></script>
<script src="http://entropiaplanets.com/maps/leaflet/leaflet.js"></script>
 
 
<script>
<script>


Line 36: Line 22:
         map.fitBounds(mapBounds);
         map.fitBounds(mapBounds);
         L.tileLayer('http://entropiaplanets.com/maps/arkadia/{z}/{x}/{y}.png', {
         L.tileLayer('http://entropiaplanets.com/maps/arkadia/{z}_{x}_{y}.jpg', {
minZoom: mapMinZoom, maxNativeZoom: mapMaxZoom,
minZoom: mapMinZoom, maxNativeZoom: mapMaxZoom,
continuousWorld: true    
continuousWorld: true    
         }).addTo(map);
         }).addTo(map);
L.marker([5, -9]).addTo(map)
.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();
L.circle([50, -11], 30, {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.5
}).addTo(map).bindPopup("I am a circle.");
L.polygon([
[509, -8],
[503, -6],
[51, -47]
]).addTo(map).bindPopup("I am a polygon.");


var popup = L.popup();
var popup = L.popup();
Line 68: Line 37:


map.on('click', onMapClick);
map.on('click', onMapClick);
</script>


</includeonly>
</includeonly>

Latest revision as of 01:04, 17 June 2014