init with mapcrafter markers

This commit is contained in:
David Kaasen 2024-09-02 13:01:44 +02:00 committed by Daniel Olsen
commit abfccce218
1 changed files with 380 additions and 0 deletions

380
maps/mapcrafter/markers.js Normal file
View File

@ -0,0 +1,380 @@
var MAPCRAFTER_MARKERS = [
{
"id" : "byer",
"name" : "Byer og steder",
"showDefault" : true,
"markers" : {
"verden" : [
// Sorter markoerene etter lengdegrad.
{
"pos" : [-2204, 447, 64],
"title" : "Vestlandet",
},
{
"pos" : [-1818, 98, 64],
"title" : "Vestsumpland",
},
{
"pos" : [-1760, -2440, 64],
"title" : "Smedby",
},
{
"pos" : [-1654, -654, 64],
"title" : "Snøklippan",
},
{
"pos" : [-1563, -1966, 64],
"title" : "Dypskiferhytta",
},
{
"pos" : [-1189, 1556, 75],
"title" : "England",
},
{
"pos" : [-980, 4090, 64],
"title" : "Hemmelig mesabiom",
},
{
"pos" : [-800, 0, 64],
"title" : "Vestisødet",
},
{
"pos" : [-378, 153, 64],
"title" : "Isjungelkatedralen",
},
{
"pos" : [-370, 2390, 64],
"title" : "Svartskoghavn",
},
{
"pos" : [-334, 473, 116],
"title" : "Kystbasen",
},
{
"pos" : [-305, 535, 64],
"title" : "Langstrand",
},
{
"pos" : [-220, 2890, 64],
"title" : "Summefjord",
},
{
"pos" : [-206, -35, 64],
"title" : "Slimegruva",
},
{
"pos" : [-160, 1480, 64],
"title" : "Turrikkelmyra",
},
{
"pos" : [-128, -1460, 64],
"title" : "Akasienborg",
},
{
"pos" : [-110, 3465, 64],
"title" : "Summevatn",
},
{
"pos" : [-99, 1025, 99],
"title" : "Tegltårnet",
},
{
"pos" : [-54, 234, 64],
"title" : "Huløyeid",
},
{
"pos" : [-47, 146, 64],
"title" : "Trangdalen",
},
{
"pos" : [-22, 67, 76],
"title" : "Tårnodden",
},
{
"pos" : [0, -485, 67],
"title" : "Nordørkenen",
},
{
"pos" : [4, 800, 64],
"title" : "Naturreservat",
},
{
"pos" : [56, -266, 67],
"title" : "Sandsteingruva",
},
{
"pos" : [58, -2860, 63],
"title" : "Tangen",
},
{
"pos" : [77, -348, 69],
"title" : "Smalelvbro",
},
{
"pos" : [100, -3830, 64],
"title" : "Ittoqqortoormiit",
},
{
"pos" : [102, 37, 77],
"title" : "Bjerkepalasset",
},
{
"pos" : [150, 80, 64],
"title" : "Piratbukta",
},
{
"pos" : [177, 177, 64],
"title" : "Heimfjell",
},
{
"pos" : [240, 3070, 64],
"title" : "Hulevatna",
},
{
"pos" : [267, -496, 89],
"title" : "Hodeskallegrotten",
},
{
"pos" : [280, -2800, 64],
"title" : "Jesus Christ Superstore",
},
{
"pos" : [337, -853, 64],
"title" : "NPC-landsby nord",
},
{
"pos" : [360, -460, 64],
"title" : "Vikingelandsbyen",
},
{
"pos" : [473, -3043, 78],
"title" : "Bjørnebukten",
},
{
"pos" : [512, -3320, 64],
"title" : "Leirhavn",
},
{
"pos" : [550, -1480, 64],
"title" : "Grensebuelvbu",
},
{
"pos" : [675, 362, 64],
"title" : "Storvatnet",
},
{
"pos" : [695, 2812, 64],
"title" : "Kløfteby",
},
{
"pos" : [723, -2380, 64],
"title" : "Isbjørnby",
},
{
"pos" : [730, -1900, 64],
"title" : "Lille isbjørnelv",
},
{
"pos" : [800, -3300, 64],
"title" : "Gammelleirnes",
},
{
"pos" : [834, -3089, 65],
"title" : "Biosfæren",
},
{
"pos" : [848, 1583, 70],
"title" : "Nyverdenhytta",
},
{
"pos" : [850, -2130, 64],
"title" : "Store isbjørnelv",
},
{
"pos" : [874, 160, 65],
"title" : "Blindodden",
},
{
"pos" : [910, 3050, 64],
"title" : "Ulveelva",
},
{
"pos" : [960, 460, 64],
"title" : "Tosjødalen",
},
{
"pos" : [1005, 1335, 64],
"title" : "Storhavskanalen",
},
{
"pos" : [1278, -397, 64],
"title" : "NPC-landsby",
},
{
"pos" : [1570, 3285, 64],
"title" : "SuperTheodors fiskehus",
},
{
"pos" : [1810, -1630, 64],
"title" : "Lamafjellet",
},
{
"pos" : [2111, 3777, 64],
"title" : "SuperTheodors strand",
},
{
"pos" : [2300, 250, 64],
"title" : "Andøya",
},
{
"pos" : [2350, -136, 64],
"title" : "Grantrebukta",
},
{
"pos" : [2734, -984, 64],
"title" : "Hestelandsby",
},
{
"pos" : [2950, 270, 64],
"title" : "Bikkjeby",
},
{
"pos" : [3000, 1000, 64],
"title" : "Storhavet i øst",
},
{
"pos" : [3085, 424, 64],
"title" : "Fyret",
},
{
"pos" : [3481, 210, 75],
"title" : "Vinterstranda hotel & resort",
},
{
"pos" : [4468, 1337, 64],
"title" : "Holmgard",
},
{
"pos" : [4630, 270, 64],
"title" : "Der Kölner Dom",
},
{
"pos" : [5470, -270, 64],
"title" : "Storsnøfjella",
},
{
"pos" : [6200, -300, 64],
"title" : "Bondeby",
},
{
"pos" : [6880, -465, 64],
"title" : "Kirkemyr",
},
],
"underverden" : [
// Sorter markoerene etter lengdegrad.
{
"pos" : [-900, 27, 64],
"title" : "Grisebukta",
},
{
"pos" : [-120, 510, 64],
"title" : "Hemmelig mesabiom, ca.",
},
{
"pos" : [120, -420, 64],
"title" : "Biosfæren, ca.",
},
{
"pos" : [520, 220, 64],
"title" : "Holmgard, ca.",
},
],
},
},
{
"id" : "spesial",
"name" : "Spesielle steder",
"showDefault" : true,
"icon" : "marker-icon-green.png",
"iconSize" : [25, 41],
"markers" : {
"verden" : [
{
"pos" : [0, 0, 64],
"title" : "Nullpunkt",
},
],
"underverden" : [
{
"pos" : [0, 0, 64],
"title" : "Nullpunkt",
},
],
},
},
{
//
// Tegner et rutenett som viser regiongrensene, og
// koordinatene for hver region.
//
"id" : "regioner",
"name" : "Regioner",
"showDefault" : false,
"createMarker" : function(ui, groupInfo, markerInfo) {
var rmax = 15;
var objekter = [];
var multilatlngs = [];
for (var rx = -rmax; rx < rmax; rx++) {
var latlngs = [];
var miny = -rmax*512;
var maxy = rmax*512;
var x = rx*512;
// use the ui.mcToLatLng-function to convert Minecraft coords to LatLngs
latlngs.push(ui.mcToLatLng(x, miny, 64));
latlngs.push(ui.mcToLatLng(x, maxy, 64));
multilatlngs.push(latlngs);
}
for (var ry = -rmax; ry < rmax; ry++) {
var latlngs = [];
var minx = -rmax*512;
var maxx = rmax*512;
var y = ry*512;
// use the ui.mcToLatLng-function to convert Minecraft coords to LatLngs
latlngs.push(ui.mcToLatLng(minx, y, 64));
latlngs.push(ui.mcToLatLng(maxx, y, 64));
multilatlngs.push(latlngs);
}
for (var rx = -rmax; rx < rmax; rx++) {
for (var ry = -rmax; ry < rmax; ry++) {
var x = rx*512 + 256;
var y = ry*512 + 256;
var myIcon = L.divIcon({iconSize: L.point(55, 20), html: "<center>r." + String(rx) + "." + String(ry) + "</center>"});
var myMarker = L.marker(ui.mcToLatLng(x, y, 64), {icon: myIcon});
objekter.push(myMarker);
}
}
var linjer = [];
if (L.version.startsWith("0.7.")) {
linjer = L.multiPolyline(multilatlngs, {"color" : markerInfo.color});
} else {
linjer = L.polyline(multilatlngs, {"color" : markerInfo.color});
}
objekter.push(linjer);
return L.layerGroup(objekter);
},
"markers" : {
"verden" : [
{
"color" : "yellow",
},
],
},
},
];