Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revisionBoth sides next revision | ||
deadland_map [2020/01/27 23:46] – created commander | deadland_map [2021/10/30 23:39] – viciousgmr | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | <WRAP centeralign> |
- | + | ====== | |
- | <WRAP centeralign> | + | |
- | ====== | + | |
</ | </ | ||
- | [[https:// | + | [[https:// |
+ | <html lang=" | ||
+ | < | ||
+ | <meta charset=" | ||
+ | <meta name=" | ||
+ | |||
+ | < | ||
+ | |||
+ | <!-- Fonts --> | ||
+ | <link href=" | ||
+ | |||
+ | <!-- Styles --> | ||
+ | <link rel=" | ||
+ | integrity=" | ||
+ | |||
+ | <script src=" | ||
+ | <script src=" | ||
+ | integrity=" | ||
+ | crossorigin=" | ||
+ | <script src=" | ||
+ | integrity=" | ||
+ | crossorigin=" | ||
+ | |||
+ | <link rel=" | ||
+ | integrity=" | ||
+ | crossorigin=""/> | ||
+ | <script src=" | ||
+ | integrity=" | ||
+ | crossorigin=""></ | ||
+ | |||
+ | <script src="/ | ||
+ | <link rel=" | ||
+ | |||
+ | < | ||
+ | html, body { | ||
+ | height: 100%; | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | } | ||
+ | |||
+ | #map { | ||
+ | width: 100vw; | ||
+ | height: 100%; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | <body class=" | ||
+ | < | ||
+ | <nav class=" | ||
+ | <a class=" | ||
+ | <button class=" | ||
+ | aria-controls=" | ||
+ | <span class=" | ||
+ | </ | ||
+ | <div class=" | ||
+ | <ul class=" | ||
+ | |||
+ | <form class=" | ||
+ | <div class=" | ||
+ | <label class=" | ||
+ | <select class=" | ||
+ | <option value=" | ||
+ | >Nibor | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | > | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | > | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | > | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | > | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | >Jerro Highlands | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | >Caratas Wasteland | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | >City Of Nodrog | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | >City Of Ardnas | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | > | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | >Frozen Land | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | > | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | > | ||
+ | |||
+ | </ | ||
+ | <option value=" | ||
+ | >Grand Arena | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | <input class=" | ||
+ | </ | ||
+ | </ | ||
+ | <li class=" | ||
+ | <a class=" | ||
+ | </ | ||
+ | </ | ||
+ | <form class=" | ||
+ | <input class=" | ||
+ | | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <div id=' | ||
+ | |||
+ | < | ||
+ | $(document).ready(function () { | ||
+ | var map = L.map(' | ||
+ | crs: L.CRS.Simple, | ||
+ | maxZoom: 5 | ||
+ | }); | ||
+ | |||
+ | |||
+ | var infernaIcon = L.Icon.extend({ | ||
+ | options: { | ||
+ | shadowUrl: ' | ||
+ | iconSize: [48, 48], | ||
+ | shadowSize: [64, 64], | ||
+ | // | ||
+ | // shadowAnchor: | ||
+ | popupAnchor: | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | //Tailor = new infernaIcon({iconUrl: | ||
+ | |||
+ | //Tailor = new infernaIcon({iconUrl: | ||
+ | |||
+ | var icons = [ | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ]; | ||
+ | |||
+ | |||
+ | // L.control.mousePosition().addTo(map); | ||
+ | var mapsizeX = 1000; | ||
+ | var mapsizeY = 2000; | ||
+ | var bounds = [ | ||
+ | [0, 0], | ||
+ | [mapsizeY, mapsizeX] | ||
+ | ]; | ||
+ | |||
+ | var image = L.imageOverlay('/ | ||
+ | |||
+ | map.fitBounds(bounds); | ||
+ | // | ||
+ | map.setView([750, | ||
+ | |||
+ | // var searchCtrl = L.control.fuseSearch() | ||
+ | // searchCtrl.addTo(map); | ||
+ | |||
+ | var yx = L.latLng; | ||
+ | |||
+ | var xy = function (x, y) { | ||
+ | if (L.Util.isArray(x)) { // When doing xy([x, y]); | ||
+ | return yx(x[1], x[0]); | ||
+ | } | ||
+ | return yx(y, x); // When doing xy(x, y); | ||
+ | }; | ||
+ | |||
+ | |||
+ | L.control.mousePosition().addTo(map); | ||
+ | |||
+ | var fg = L.featureGroup().addTo(map); | ||
+ | var markers = [] | ||
+ | |||
+ | $("# | ||
+ | filter($(this).val()); | ||
+ | }) | ||
+ | |||
+ | function filter(search) { | ||
+ | fg.clearLayers() | ||
+ | for (var i = 0; i < markers.length; | ||
+ | var marker = markers[i]; | ||
+ | if (!search || marker.npcname.toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) >= 0) { | ||
+ | fg.addLayer(marker); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | $(' | ||
+ | $.ajax({ | ||
+ | dataType: " | ||
+ | url: "/ | ||
+ | success: function (data) { | ||
+ | for (var key in data) { | ||
+ | d = data[key]; | ||
+ | |||
+ | var marker = null; | ||
+ | if (d.npc_map_type != undefined && d.npc_map_type != ' | ||
+ | |||
+ | if (icons.includes(d.npc_map_type)) { | ||
+ | if (d.npc_map_type == " | ||
+ | // L.marker(xy(d.x, | ||
+ | // | ||
+ | marker = (L.marker(xy(d.x, | ||
+ | } else { | ||
+ | marker = (L.marker(xy(d.x, | ||
+ | closeOnClick: | ||
+ | autoClose: false | ||
+ | })); | ||
+ | } | ||
+ | } else { | ||
+ | marker = (L.marker(xy(d.x, | ||
+ | } | ||
+ | |||
+ | } else { | ||
+ | marker = (L.marker(xy(d.x, | ||
+ | } | ||
+ | if (marker) { | ||
+ | marker.npcname = d.name + " " + d.npc_map_type; | ||
+ | markers.push(marker) | ||
+ | } | ||
+ | // | ||
+ | } | ||
+ | filter($("# | ||
+ | } | ||
+ | }); | ||
+ | $("# | ||
+ | $(this).parents(" | ||
+ | }) | ||
+ | }); | ||
+ | </ | ||
+ | </ | ||
+ | </ |