You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
3.8 KiB
JavaScript
79 lines
3.8 KiB
JavaScript
alert('Your realm ends here and mine begins.');
|
|
|
|
var mymap = L.map('mapid', {
|
|
maxZoom: 2,
|
|
minZoom: 0,
|
|
zoom: 0,
|
|
crs: L.CRS.Simple,
|
|
center: new L.LatLng(-100,300),
|
|
|
|
}); //.setView([0, 0], 25);
|
|
|
|
// L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
|
|
// attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
|
// maxZoom: 100,
|
|
// id: 'mapbox.streets',
|
|
// accessToken: 'your.mapbox.access.token'
|
|
// }).addTo(mymap);
|
|
|
|
L.GridLayer.DebugCoords = L.GridLayer.extend({
|
|
createTile: function (coords) {
|
|
var tile = document.createElement('div');
|
|
var tileSize = this.getTileSize();
|
|
tile.setAttribute('width', '500px');
|
|
tile.setAttribute('height', tileSize.y);
|
|
var openpop = false;
|
|
|
|
// setTimeout(function () {
|
|
// done(null, tile); // Syntax is 'done(error, tile)'
|
|
// }, 500 + Math.random() * 1500);
|
|
|
|
|
|
// if (coords.x == 0 && coords.y == 0){
|
|
tile.innerHTML = '<p style="width:510px;">'+ text2[coords.z] + '</p>' ;
|
|
// }else{};
|
|
|
|
if (coords.z == 2 ){
|
|
openpop = true;
|
|
//}else if (coords.z == 2 ){popWindow2();
|
|
}else{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (openpop == true) {
|
|
setTimeout(function() {
|
|
// var myWindow = window.open("", "MyText", "height=230, width=390, left=100, top=100, resizable=no, scrollbars=no, toolbar=no, menubar=no, directories=no, status=yes");
|
|
// myWindow.document.write('<style type="text/css">body{background-color: red;font-family: "Lucida Console", Monaco, monospace;color: black;}</style>');
|
|
// myWindow.document.write('<style>function openClose(){window.open("https://www.youraddress.com","_parent")}</style>')
|
|
// myWindow.document.write('<p>The subject of this project is not the space exactly, but rather what there is round about or inside it. To start with, then, there is already very much: nothingness, the impalpable, the virtually immaterial; extension, the external, what is external to us, what we move about in the midst of, our ambient milieu, the void around us.</p>');
|
|
// myWindow.document.write('<button onclick="self.close();">close</button>')
|
|
setTimeout(function() {document.getElementById('bttn').innerHTML = '<a class="redirect" href="./example.html" style="margin-left:10%;">Show me</a>';}, 1000);
|
|
setTimeout(function() {document.getElementById('bttn').innerHTML = '<a class="redirect" href="./example.html" style="margin-left:15%;">Show me</a>';}, 1100);
|
|
setTimeout(function() {document.getElementById('bttn').innerHTML = '<a class="redirect" href="./example.html" style="margin-left:20%;">Show me</a>';}, 1200);
|
|
setTimeout(function() {document.getElementById('bttn').innerHTML = '<a class="redirect" href="./example.html" style="margin-left:35%;">Show me</a>';}, 1300);
|
|
setTimeout(function() {document.getElementById('bttn').innerHTML = '<a class="redirect" href="./example.html" style="margin-left:40%;">Show me</a>';}, 1400);
|
|
setTimeout(function() {document.getElementById('bttn').innerHTML = '<a class="redirect" href="./example.html" style="margin-left:55%;">Show me</a>';}, 1500);
|
|
setTimeout(function() {document.getElementById('bttn').innerHTML = '<a class="redirect" href="./example.html" style="margin-left:50%;">Show me</a>';}, 1600);
|
|
|
|
|
|
}, 1000);
|
|
|
|
}else{};
|
|
|
|
return tile;
|
|
}
|
|
});
|
|
|
|
function closeOpen(){
|
|
|
|
}
|
|
L.gridLayer.debugCoords = function(opts) {
|
|
return new L.GridLayer.DebugCoords(opts);
|
|
};
|
|
|
|
mymap.addLayer( L.gridLayer.debugCoords() ); |