Initial commit
2
Creative/dynmap/web/config.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// This file is retired : settings now can be tailored using url section in configuration.txt, when needed
|
||||
//
|
1019
Creative/dynmap/web/css/dynmap_style.css
Normal file
15
Creative/dynmap/web/css/embedded_example.css
Normal file
@@ -0,0 +1,15 @@
|
||||
/* Embedded into website */
|
||||
|
||||
#mcmap {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.dynmap .sidebar {
|
||||
width: 140px; /* original width 200px */
|
||||
margin-right: -143px; /* original margin 203px, sidebar width +2xborder 1px +1px to hide */
|
||||
}
|
||||
|
||||
.dynmap .hitbar {
|
||||
right: 140px; /* width of sidebar */
|
||||
}
|
BIN
Creative/dynmap/web/css/images/layers.png
Normal file
After Width: | Height: | Size: 973 B |
BIN
Creative/dynmap/web/css/images/link.png
Normal file
After Width: | Height: | Size: 649 B |
BIN
Creative/dynmap/web/css/images/marker-icon.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
Creative/dynmap/web/css/images/marker-icon@2x.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
Creative/dynmap/web/css/images/marker-shadow.png
Normal file
After Width: | Height: | Size: 797 B |
BIN
Creative/dynmap/web/css/images/marker.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
Creative/dynmap/web/css/images/popup-close.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Creative/dynmap/web/css/images/zoom-in.png
Normal file
After Width: | Height: | Size: 963 B |
BIN
Creative/dynmap/web/css/images/zoom-out.png
Normal file
After Width: | Height: | Size: 959 B |
457
Creative/dynmap/web/css/leaflet.css
Normal file
@@ -0,0 +1,457 @@
|
||||
/* required styles */
|
||||
|
||||
.leaflet-map-pane,
|
||||
.leaflet-tile,
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow,
|
||||
.leaflet-tile-pane,
|
||||
.leaflet-overlay-pane,
|
||||
.leaflet-shadow-pane,
|
||||
.leaflet-marker-pane,
|
||||
.leaflet-popup-pane,
|
||||
.leaflet-overlay-pane svg,
|
||||
.leaflet-zoom-box,
|
||||
.leaflet-image-layer,
|
||||
.leaflet-layer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.leaflet-container {
|
||||
overflow: hidden;
|
||||
-ms-touch-action: none;
|
||||
}
|
||||
.leaflet-tile,
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow {
|
||||
display: block;
|
||||
}
|
||||
/* map is broken in FF if you have max-width: 100% on tiles */
|
||||
.leaflet-container img {
|
||||
max-width: none !important;
|
||||
}
|
||||
/* stupid Android 2 doesn't understand "max-width: none" properly */
|
||||
.leaflet-container img.leaflet-image-layer {
|
||||
max-width: 15000px !important;
|
||||
}
|
||||
.leaflet-tile {
|
||||
filter: inherit;
|
||||
visibility: hidden;
|
||||
}
|
||||
.leaflet-tile-loaded {
|
||||
visibility: inherit;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.leaflet-tile-pane { z-index: 2; }
|
||||
.leaflet-objects-pane { z-index: 3; }
|
||||
.leaflet-overlay-pane { z-index: 4; }
|
||||
.leaflet-shadow-pane { z-index: 5; }
|
||||
.leaflet-marker-pane { z-index: 6; }
|
||||
.leaflet-popup-pane { z-index: 7; }
|
||||
|
||||
|
||||
/* control positioning */
|
||||
|
||||
.leaflet-control {
|
||||
position: relative;
|
||||
z-index: 7;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.leaflet-top,
|
||||
.leaflet-bottom {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
pointer-events: none;
|
||||
}
|
||||
.leaflet-top {
|
||||
top: 0;
|
||||
}
|
||||
.leaflet-right {
|
||||
right: 0;
|
||||
}
|
||||
.leaflet-bottom {
|
||||
bottom: 0;
|
||||
}
|
||||
.leaflet-left {
|
||||
left: 0;
|
||||
}
|
||||
.leaflet-control {
|
||||
float: left;
|
||||
clear: both;
|
||||
}
|
||||
.leaflet-right .leaflet-control {
|
||||
float: right;
|
||||
}
|
||||
.leaflet-top .leaflet-control {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.leaflet-bottom .leaflet-control {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.leaflet-left .leaflet-control {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.leaflet-right .leaflet-control {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* zoom and fade animations */
|
||||
|
||||
.leaflet-fade-anim .leaflet-tile,
|
||||
.leaflet-fade-anim .leaflet-popup {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
-o-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
.leaflet-fade-anim .leaflet-tile-loaded,
|
||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-tile,
|
||||
.leaflet-pan-anim .leaflet-tile,
|
||||
.leaflet-touching .leaflet-zoom-animated {
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
-o-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* cursors */
|
||||
|
||||
.leaflet-clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
.leaflet-container {
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
}
|
||||
.leaflet-popup-pane,
|
||||
.leaflet-control {
|
||||
cursor: auto;
|
||||
}
|
||||
.leaflet-dragging,
|
||||
.leaflet-dragging .leaflet-clickable,
|
||||
.leaflet-dragging .leaflet-container {
|
||||
cursor: move;
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
}
|
||||
|
||||
|
||||
/* visual tweaks */
|
||||
|
||||
.leaflet-container {
|
||||
background: #ddd;
|
||||
outline: 0;
|
||||
}
|
||||
.leaflet-container a {
|
||||
color: #0078A8;
|
||||
}
|
||||
.leaflet-container a.leaflet-active {
|
||||
outline: 2px solid orange;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
border: 2px dotted #05f;
|
||||
background: white;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
|
||||
/* general typography */
|
||||
.leaflet-container {
|
||||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
/* general toolbar styles */
|
||||
|
||||
.leaflet-bar {
|
||||
box-shadow: 0 0 8px rgba(0,0,0,0.4);
|
||||
border: 1px solid #888;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.leaflet-bar-part {
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
.leaflet-bar-part-top {
|
||||
-webkit-border-radius: 4px 4px 0 0;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
.leaflet-bar-part-bottom {
|
||||
-webkit-border-radius: 0 0 4px 4px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-bar {
|
||||
-webkit-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.leaflet-touch .leaflet-bar-part {
|
||||
border-bottom: 4px solid rgba(0,0,0,0.3);
|
||||
}
|
||||
.leaflet-touch .leaflet-bar-part-top {
|
||||
-webkit-border-radius: 7px 7px 0 0;
|
||||
border-radius: 7px 7px 0 0;
|
||||
}
|
||||
.leaflet-touch .leaflet-bar-part-bottom {
|
||||
-webkit-border-radius: 0 0 7px 7px;
|
||||
border-radius: 0 0 7px 7px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
|
||||
/* zoom control */
|
||||
|
||||
.leaflet-container .leaflet-control-zoom {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.leaflet-control-zoom a {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
.leaflet-control-zoom a,
|
||||
.leaflet-control-layers-toggle {
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
}
|
||||
.leaflet-control-zoom a:hover {
|
||||
background-color: #fff;
|
||||
color: #777;
|
||||
}
|
||||
.leaflet-control-zoom-in {
|
||||
font: bold 18px/24px Arial, Helvetica, sans-serif;
|
||||
}
|
||||
.leaflet-control-zoom-out {
|
||||
font: bold 23px/20px Tahoma, Verdana, sans-serif;
|
||||
}
|
||||
.leaflet-control-zoom a.leaflet-control-zoom-disabled {
|
||||
cursor: default;
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-control-zoom a {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.leaflet-touch .leaflet-control-zoom-in {
|
||||
font-size: 24px;
|
||||
line-height: 29px;
|
||||
}
|
||||
.leaflet-touch .leaflet-control-zoom-out {
|
||||
font-size: 28px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
/* layers control */
|
||||
|
||||
.leaflet-control-layers {
|
||||
box-shadow: 0 1px 7px rgba(0,0,0,0.4);
|
||||
background: #f8f8f9;
|
||||
-webkit-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.leaflet-control-layers-toggle {
|
||||
background-image: url(images/layers.png);
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
.leaflet-touch .leaflet-control-layers-toggle {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
.leaflet-control-layers .leaflet-control-layers-list,
|
||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
||||
display: none;
|
||||
}
|
||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
.leaflet-control-layers-expanded {
|
||||
padding: 6px 10px 6px 6px;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
.leaflet-control-layers-selector {
|
||||
margin-top: 2px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
.leaflet-control-layers label {
|
||||
display: block;
|
||||
}
|
||||
.leaflet-control-layers-separator {
|
||||
height: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
margin: 5px -10px 5px -6px;
|
||||
}
|
||||
|
||||
|
||||
/* attribution and scale controls */
|
||||
|
||||
.leaflet-container .leaflet-control-attribution {
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
box-shadow: 0 0 5px #bbb;
|
||||
margin: 0;
|
||||
}
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-scale-line {
|
||||
padding: 0 5px;
|
||||
color: #333;
|
||||
}
|
||||
.leaflet-container .leaflet-control-attribution,
|
||||
.leaflet-container .leaflet-control-scale {
|
||||
font-size: 11px;
|
||||
}
|
||||
.leaflet-left .leaflet-control-scale {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.leaflet-bottom .leaflet-control-scale {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.leaflet-control-scale-line {
|
||||
border: 2px solid #777;
|
||||
border-top: none;
|
||||
color: black;
|
||||
line-height: 1.1;
|
||||
padding: 2px 5px 1px;
|
||||
font-size: 11px;
|
||||
text-shadow: 1px 1px 1px #fff;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child) {
|
||||
border-top: 2px solid #777;
|
||||
border-bottom: none;
|
||||
margin-top: -2px;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
||||
border-bottom: 2px solid #777;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-control-attribution,
|
||||
.leaflet-touch .leaflet-control-layers,
|
||||
.leaflet-touch .leaflet-control-zoom {
|
||||
box-shadow: none;
|
||||
}
|
||||
.leaflet-touch .leaflet-control-layers,
|
||||
.leaflet-touch .leaflet-control-zoom {
|
||||
border: 4px solid rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
|
||||
/* popup */
|
||||
|
||||
.leaflet-popup {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
}
|
||||
.leaflet-popup-content-wrapper {
|
||||
padding: 1px;
|
||||
text-align: left;
|
||||
-webkit-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
margin: 14px 20px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.leaflet-popup-content p {
|
||||
margin: 18px 0;
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
margin: 0 auto;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.leaflet-popup-tip {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
padding: 1px;
|
||||
|
||||
margin: -8px auto 0;
|
||||
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
|
||||
background: white;
|
||||
|
||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 4px 5px 0 0;
|
||||
text-align: center;
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
||||
color: #c3c3c3;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background: transparent;
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||||
color: #999;
|
||||
}
|
||||
.leaflet-popup-scrolled {
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
|
||||
/* div icon */
|
||||
|
||||
.leaflet-div-icon {
|
||||
background: #fff;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
.leaflet-editing-icon {
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
57
Creative/dynmap/web/css/leaflet.ie.css
Normal file
@@ -0,0 +1,57 @@
|
||||
.leaflet-vml-shape {
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
}
|
||||
.lvml {
|
||||
behavior: url(#default#VML);
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.leaflet-control {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.leaflet-popup-tip {
|
||||
width: 21px;
|
||||
_width: 27px;
|
||||
margin: 0 auto;
|
||||
_margin-top: -3px;
|
||||
|
||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
margin-top: -1px;
|
||||
}
|
||||
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
|
||||
border: 1px solid #999;
|
||||
}
|
||||
.leaflet-popup-content-wrapper {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.leaflet-control-zoom,
|
||||
.leaflet-control-layers {
|
||||
border: 3px solid #999;
|
||||
}
|
||||
.leaflet-control-zoom a {
|
||||
background-color: #eee;
|
||||
}
|
||||
.leaflet-control-zoom a:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
.leaflet-control-layers-toggle {
|
||||
}
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-layers,
|
||||
.leaflet-control-scale-line {
|
||||
background: white;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
.leaflet-control-attribution {
|
||||
border-top: 1px solid #bbb;
|
||||
border-left: 1px solid #bbb;
|
||||
}
|
39
Creative/dynmap/web/css/override_example.css
Normal file
@@ -0,0 +1,39 @@
|
||||
/*******************
|
||||
* This is the over-ride CSS file.
|
||||
*
|
||||
* if you know any CSS you can easily add custom rules to change how DynMap
|
||||
* looks and behaves under your DynMap installation.
|
||||
*
|
||||
* 1. Uncomment the override.css in the index.html.
|
||||
* 2. Rename this file or create a new override.css.
|
||||
* 3. Add your own rules (or steal these) to personalize how DynMap looks.
|
||||
*
|
||||
* By adding your own rules here, you can then save your changes
|
||||
* between DynMap updates and they won't get over-written.
|
||||
*/
|
||||
|
||||
|
||||
/* Use the alternate compass image */
|
||||
|
||||
.compass {
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
|
||||
background-image: url(../images/compass_alt.png);
|
||||
}
|
||||
|
||||
/* These next two keep the DynMap sidebar open... */
|
||||
|
||||
.dynmap .sidebar {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
/* ...and hide the hitbar along with the sidebar controls */
|
||||
|
||||
.dynmap .sidebar .hitbar,
|
||||
.dynmap .sidebar .panel > .pin {
|
||||
display: none;
|
||||
}
|
35
Creative/dynmap/web/css/regions.css
Normal file
@@ -0,0 +1,35 @@
|
||||
.regioninfo > * {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.regioninfo > *:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.regioninfo .regionname {
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.regioninfo .regionflags .regionflag {
|
||||
display: block;
|
||||
font-size: 90%;
|
||||
color: gray;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.regioninfo .owners:before {
|
||||
content: "Owners: ";
|
||||
}
|
||||
|
||||
.regioninfo .members:before {
|
||||
content: "Members: ";
|
||||
}
|
||||
|
||||
.regioninfo .regionflags:before {
|
||||
content: "Flags: ";
|
||||
}
|
||||
|
||||
.regioninfo .regionpriority:before {
|
||||
content: "Priority: ";
|
||||
}
|
41
Creative/dynmap/web/css/standalone.css
Normal file
@@ -0,0 +1,41 @@
|
||||
/* Standalone Document */
|
||||
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
|
||||
font-family: sans-serif;
|
||||
font-size: 11px;
|
||||
|
||||
color: #fff;
|
||||
background: #000;
|
||||
|
||||
margin: 0px;
|
||||
padding: 0px ;
|
||||
}
|
||||
|
||||
/* Chat Balloons */
|
||||
|
||||
#content { color: #000; }
|
||||
|
||||
#mcmap { width: 100%; height: 100%;}
|
||||
|
||||
.dynmap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.dynmap .sidebar {
|
||||
width: 200px; /* original width 200px */
|
||||
margin-right: -203px; /* original margin 203px, sidebar width +2xborder 1px +1px to hide */
|
||||
}
|
||||
|
||||
.dynmap .hitbar {
|
||||
right: 200px; /* width of sidebar */
|
||||
}
|
21
Creative/dynmap/web/gettiles.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
define ('TILESPATH', 'tiles/');
|
||||
|
||||
$path = $_SERVER['PATH_INFO'];
|
||||
|
||||
$fname = TILESPATH . $path;
|
||||
|
||||
if (!file_exists($fname)) {
|
||||
$fname = "images/blank.png";
|
||||
}
|
||||
$fp = fopen($fname, 'rb');
|
||||
if (strstr($path, ".png"))
|
||||
header("Content-Type: image/png");
|
||||
else
|
||||
header("Content-Type: image/jpeg");
|
||||
|
||||
header("Content-Length: " . filesize($fname));
|
||||
|
||||
fpassthru($fp);
|
||||
exit;
|
||||
?>
|
BIN
Creative/dynmap/web/images/BiomeKey.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
Creative/dynmap/web/images/armor.png
Normal file
After Width: | Height: | Size: 213 B |
BIN
Creative/dynmap/web/images/armor_depleted.png
Normal file
After Width: | Height: | Size: 192 B |
BIN
Creative/dynmap/web/images/blank.png
Normal file
After Width: | Height: | Size: 167 B |
BIN
Creative/dynmap/web/images/block_nether_flat.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
Creative/dynmap/web/images/block_nether_surface.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
Creative/dynmap/web/images/block_other.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
Creative/dynmap/web/images/block_skylands.png
Normal file
After Width: | Height: | Size: 993 B |
BIN
Creative/dynmap/web/images/block_the_end_flat.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
Creative/dynmap/web/images/block_the_end_surface.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
Creative/dynmap/web/images/block_world_biome.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Creative/dynmap/web/images/block_world_cave.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
Creative/dynmap/web/images/block_world_flat.png
Normal file
After Width: | Height: | Size: 387 B |
BIN
Creative/dynmap/web/images/block_world_surface.png
Normal file
After Width: | Height: | Size: 342 B |
BIN
Creative/dynmap/web/images/book.png
Normal file
After Width: | Height: | Size: 829 B |
BIN
Creative/dynmap/web/images/cave_off.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Creative/dynmap/web/images/cave_on.png
Normal file
After Width: | Height: | Size: 868 B |
BIN
Creative/dynmap/web/images/chat_bubble.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
Creative/dynmap/web/images/chat_cursor.png
Normal file
After Width: | Height: | Size: 261 B |
BIN
Creative/dynmap/web/images/clock_day.png
Normal file
After Width: | Height: | Size: 357 B |
BIN
Creative/dynmap/web/images/clock_night.png
Normal file
After Width: | Height: | Size: 360 B |
BIN
Creative/dynmap/web/images/compass.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
Creative/dynmap/web/images/compass_E.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
Creative/dynmap/web/images/compass_N.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
Creative/dynmap/web/images/compass_NE.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
Creative/dynmap/web/images/compass_NW.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
Creative/dynmap/web/images/compass_SW.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
Creative/dynmap/web/images/compass_W.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
Creative/dynmap/web/images/compass_alt.png
Normal file
After Width: | Height: | Size: 802 B |
BIN
Creative/dynmap/web/images/compass_flat.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
Creative/dynmap/web/images/dynmap.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Creative/dynmap/web/images/follow_off.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
Creative/dynmap/web/images/follow_on.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
Creative/dynmap/web/images/heart.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
Creative/dynmap/web/images/heart_depleted.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
Creative/dynmap/web/images/home.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
Creative/dynmap/web/images/list_off.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
Creative/dynmap/web/images/list_on.png
Normal file
After Width: | Height: | Size: 360 B |
BIN
Creative/dynmap/web/images/moon.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
Creative/dynmap/web/images/player.png
Normal file
After Width: | Height: | Size: 328 B |
BIN
Creative/dynmap/web/images/player_death.png
Normal file
After Width: | Height: | Size: 404 B |
BIN
Creative/dynmap/web/images/player_face.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
Creative/dynmap/web/images/player_follow_off.png
Normal file
After Width: | Height: | Size: 361 B |
BIN
Creative/dynmap/web/images/player_follow_on.gif
Normal file
After Width: | Height: | Size: 332 B |
BIN
Creative/dynmap/web/images/player_follow_on.png
Normal file
After Width: | Height: | Size: 355 B |
BIN
Creative/dynmap/web/images/player_travel.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
Creative/dynmap/web/images/scrolldown.png
Normal file
After Width: | Height: | Size: 1019 B |
BIN
Creative/dynmap/web/images/scrollup.png
Normal file
After Width: | Height: | Size: 1005 B |
BIN
Creative/dynmap/web/images/server.png
Normal file
After Width: | Height: | Size: 368 B |
BIN
Creative/dynmap/web/images/sidebar_hint.png
Normal file
After Width: | Height: | Size: 271 B |
BIN
Creative/dynmap/web/images/sign.png
Normal file
After Width: | Height: | Size: 681 B |
BIN
Creative/dynmap/web/images/sign_home.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
Creative/dynmap/web/images/sign_sign.png
Normal file
After Width: | Height: | Size: 431 B |
BIN
Creative/dynmap/web/images/sign_sign_alt.png
Normal file
After Width: | Height: | Size: 431 B |
BIN
Creative/dynmap/web/images/sign_warp.png
Normal file
After Width: | Height: | Size: 435 B |
BIN
Creative/dynmap/web/images/spawn.png
Normal file
After Width: | Height: | Size: 943 B |
BIN
Creative/dynmap/web/images/sun.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
Creative/dynmap/web/images/warp.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Creative/dynmap/web/images/weather_stormy.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
Creative/dynmap/web/images/weather_stormy_day.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
Creative/dynmap/web/images/weather_stormy_night.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
Creative/dynmap/web/images/weather_sunny.png
Normal file
After Width: | Height: | Size: 905 B |
BIN
Creative/dynmap/web/images/weather_sunny_day.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
Creative/dynmap/web/images/weather_sunny_night.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
Creative/dynmap/web/images/weather_thunder.png
Normal file
After Width: | Height: | Size: 627 B |
BIN
Creative/dynmap/web/images/weather_thunder_day.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
Creative/dynmap/web/images/weather_thunder_night.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
Creative/dynmap/web/images/window_close.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
Creative/dynmap/web/images/window_close_hover.png
Normal file
After Width: | Height: | Size: 355 B |
BIN
Creative/dynmap/web/images/window_open.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
Creative/dynmap/web/images/window_pinned.png
Normal file
After Width: | Height: | Size: 299 B |
BIN
Creative/dynmap/web/images/window_pinned_hover.png
Normal file
After Width: | Height: | Size: 290 B |
BIN
Creative/dynmap/web/images/window_unpinned.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
Creative/dynmap/web/images/zoom_in.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
Creative/dynmap/web/images/zoom_out.png
Normal file
After Width: | Height: | Size: 336 B |
20
Creative/dynmap/web/inactive.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<head><title>Minecraft Dynamic Map - Inactive</title></head>
|
||||
<style>
|
||||
div {
|
||||
position:fixed;
|
||||
top:40%;margin:-.5em 0 0 0;
|
||||
width:100%;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
color:#c33;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div>
|
||||
<h1>Map disabled due to inactivity.</h1>
|
||||
<a href="./">Click here to go back</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
57
Creative/dynmap/web/index.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<title>Minecraft Dynamic Map</title>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="keywords" content="minecraft, map, dynamic" />
|
||||
<meta name="description" content="Minecraft Dynamic Map" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
||||
<!-- These 2 lines make us fullscreen on apple mobile products - remove if you don't like that -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
|
||||
<link rel="icon" href="images/dynmap.ico" type="image/ico" />
|
||||
|
||||
<script type="text/javascript" src="js/jquery-3.5.1.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/leaflet.css?_=3.1-SNAPSHOT-Dev" />
|
||||
<script type="text/javascript" src="js/leaflet.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
|
||||
<script type="text/javascript" src="js/custommarker.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
|
||||
<script type="text/javascript" src="js/dynmaputils.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
<script type="text/javascript" src="js/sidebarutils.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
|
||||
<!--<link rel="stylesheet" type="text/css" href="css/embedded.css" media="screen" />-->
|
||||
<link rel="stylesheet" type="text/css" href="css/standalone.css?_=3.1-SNAPSHOT-Dev" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="css/dynmap_style.css?_=3.1-SNAPSHOT-Dev" media="screen" />
|
||||
<!-- <link rel="stylesheet" type="text/css" href="css/override.css" media="screen" /> -->
|
||||
|
||||
<script type="text/javascript" src="version.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
<script type="text/javascript" src="js/jquery.json.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
<script type="text/javascript" src="js/jquery.mousewheel.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
<script type="text/javascript" src="js/minecraft.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
<script type="text/javascript" src="js/map.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
<script type="text/javascript" src="js/hdmap.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
<script type="text/javascript" src="standalone/config.js?_=3.1-SNAPSHOT-Dev"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
window.dynmap = new DynMap($.extend({
|
||||
container: $('#mcmap')
|
||||
}, config));
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
For full functionality of this site it is necessary to enable JavaScript.
|
||||
Here are the <a href="http://www.enable-javascript.com/" target="_blank">
|
||||
instructions how to enable JavaScript in your web browser</a>.
|
||||
</noscript>
|
||||
|
||||
<div id="mcmap"></div>
|
||||
</body>
|
||||
</html>
|
47
Creative/dynmap/web/js/chat.js
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
componentconstructors['chat'] = function(dynmap, configuration) {
|
||||
var me = this;
|
||||
|
||||
if(dynmap.getBoolParameterByName("hidechat"))
|
||||
return;
|
||||
|
||||
// Provides 'chat'-events by monitoring the world-updates.
|
||||
$(dynmap).bind('worldupdate', function(event, update) {
|
||||
swtch(update.type, {
|
||||
chat: function() {
|
||||
$(dynmap).trigger('chat', [{source: update.source, name: update.playerName, text: update.message, account: update.account,
|
||||
channel: update.channel}]);
|
||||
}
|
||||
});
|
||||
});
|
||||
var pname = null;
|
||||
if(configuration.allowurlname) {
|
||||
pname = dynmap.getParameterByName("chatname");
|
||||
if(pname == "") pname = null;
|
||||
}
|
||||
|
||||
if (dynmap.options.allowwebchat) {
|
||||
// Accepts 'sendchat'-events to send chat messages to the server.
|
||||
$(dynmap).bind('sendchat', function(event, message) {
|
||||
var data = '{"name":'+JSON.stringify(pname?pname:"")+',"message":'+JSON.stringify(message)+'}';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url: config.url.sendmessage,
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if(response.error != "none") {
|
||||
var msg = dynmap.options['msg-chatnotallowed'];
|
||||
$(dynmap).trigger('chat', [{source: 'me', name: 'Error', text: msg }]);
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
if (xhr.status === 403) {
|
||||
$(dynmap).trigger('chat', [{source: 'me', name: 'Error', text: dynmap.options.spammessage.replace('%interval%', dynmap.options['webchat-interval'])}]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
69
Creative/dynmap/web/js/chatballoon.js
Normal file
@@ -0,0 +1,69 @@
|
||||
componentconstructors['chatballoon'] = function(dynmap, configuration) {
|
||||
var me = this;
|
||||
|
||||
if(dynmap.getBoolParameterByName("hidechat"))
|
||||
return;
|
||||
|
||||
me.chatpopups = {};
|
||||
$(dynmap).bind('playerupdated', function(event, player) {
|
||||
var popup = me.chatpopups[player.account];
|
||||
if (popup) {
|
||||
var markerPosition = dynmap.getProjection().fromLocationToLatLng(player.location);
|
||||
popup.layer.setLatLng(markerPosition);
|
||||
}
|
||||
});
|
||||
$(dynmap).bind('worldchanged', function() {
|
||||
$.each(me.chatpopups, function(name, popup) {
|
||||
popup.close();
|
||||
});
|
||||
});
|
||||
$(dynmap).bind('chat', function(event, message) {
|
||||
if (message.source != 'player') {
|
||||
return;
|
||||
}
|
||||
var player = dynmap.players[message.account];
|
||||
if (!player)
|
||||
return;
|
||||
if (dynmap.world !== player.location.world) {
|
||||
return;
|
||||
}
|
||||
var popupPosition = dynmap.getProjection().fromLocationToLatLng(player.location);
|
||||
var popup = me.chatpopups[message.account];
|
||||
if (!popup) {
|
||||
me.chatpopups[message.account] = popup = {
|
||||
layer: new L.Popup({autoPan: configuration.focuschatballoons, closeButton: false}),
|
||||
content: $('<div/>').addClass('balloonmessages')[0]
|
||||
};
|
||||
popup.layer.setContent($(popup.content).html());
|
||||
|
||||
popup.close = function() {
|
||||
if (popup.timeout) { window.clearTimeout(popup.timeout); }
|
||||
dynmap.map.removeLayer(popup.layer);
|
||||
delete me.chatpopups[message.account];
|
||||
};
|
||||
|
||||
popup.layer.setLatLng(popupPosition);
|
||||
dynmap.map.addLayer(popup.layer);
|
||||
}
|
||||
|
||||
// Add line to balloon.
|
||||
$('<div/>').addClass('balloonmessage').text(chat_encoder(message)).appendTo(popup.content);
|
||||
|
||||
// Remove older lines when too many messages are shown.
|
||||
var children = $(popup.content).children();
|
||||
if (children.length > 5) {
|
||||
$(children[0]).remove();
|
||||
}
|
||||
|
||||
popup.layer.setContent($(popup.content).html());
|
||||
|
||||
if (popup.timeout) { window.clearTimeout(popup.timeout); }
|
||||
popup.timeout = window.setTimeout(function() {
|
||||
popup.close();
|
||||
}, 8000);
|
||||
|
||||
if (configuration.focuschatballoons) {
|
||||
dynmap.panToLatLng(popupPosition);
|
||||
}
|
||||
});
|
||||
};
|
153
Creative/dynmap/web/js/chatbox.js
Normal file
@@ -0,0 +1,153 @@
|
||||
componentconstructors['chatbox'] = function(dynmap, configuration) {
|
||||
var me = this;
|
||||
|
||||
if(dynmap.getBoolParameterByName("hidechat"))
|
||||
return;
|
||||
var chat = $('<div/>')
|
||||
.addClass('chat')
|
||||
.appendTo(dynmap.options.container);
|
||||
var messagelist = $('<div/>')
|
||||
.addClass('messagelist')
|
||||
.appendTo(chat);
|
||||
|
||||
if (configuration.visiblelines) {
|
||||
messagelist.css('max-height', configuration.visiblelines + 'em');
|
||||
}
|
||||
else {
|
||||
messagelist.css('max-height', '6em');
|
||||
}
|
||||
|
||||
if (configuration.scrollback) {
|
||||
messagelist.addClass('scrollback')
|
||||
.click( function() { $(this).hide(); } );
|
||||
}
|
||||
|
||||
if (dynmap.options.allowwebchat) {
|
||||
if(dynmap.options.loggedin || !dynmap.options['webchat-requires-login']) {
|
||||
var chatinput = $('<input/>')
|
||||
.addClass('chatinput')
|
||||
.attr({
|
||||
id: 'chatinput',
|
||||
type: 'text',
|
||||
value: '',
|
||||
maxlength: dynmap.options.chatlengthlimit
|
||||
})
|
||||
.keydown(function(event) {
|
||||
if (event.keyCode == '13') {
|
||||
event.preventDefault();
|
||||
if(chatinput.val() != '') {
|
||||
$(dynmap).trigger('sendchat', [chatinput.val()]);
|
||||
chatinput.val('');
|
||||
}
|
||||
}
|
||||
});
|
||||
if(configuration.sendbutton) {
|
||||
var chatbutton = $('<button/>').addClass('chatsendbutton').click(function(event) {
|
||||
if(chatinput.val() != '') {
|
||||
$(dynmap).trigger('sendchat', [chatinput.val()]);
|
||||
chatinput.val('');
|
||||
}
|
||||
}).text("+").appendTo(chat);
|
||||
}
|
||||
chatinput.appendTo(chat);
|
||||
if (configuration.scrollback) {
|
||||
chatinput.click(function(){
|
||||
var m = $('.messagelist');
|
||||
m.show().scrollTop(m.scrollHeight());
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
var login = $('<button/>').addClass('loginbutton').click(function(event) {
|
||||
window.location = 'login.html';
|
||||
}).text(dynmap.options['msg-chatrequireslogin']).appendTo(chat);
|
||||
}
|
||||
}
|
||||
|
||||
var addrow = function(row) {
|
||||
if (configuration.scrollback) {
|
||||
var c = messagelist.children();
|
||||
c.slice(0, Math.max(0, c.length-configuration.scrollback)).each(function(index, elem){ $(elem).remove(); });
|
||||
} else {
|
||||
setTimeout(function() { row.remove(); }, (configuration.messagettl * 1000));
|
||||
}
|
||||
messagelist.append(row);
|
||||
messagelist.show();
|
||||
messagelist.scrollTop(messagelist.scrollHeight());
|
||||
};
|
||||
|
||||
$(dynmap).bind('playerjoin', function(event, playername) {
|
||||
if ((dynmap.options.joinmessage.length > 0) && (playername.length > 0)) {
|
||||
addrow($('<div/>')
|
||||
.addClass('messagerow')
|
||||
.append(dynmap.options.joinmessage.replace('%playername%', playername))
|
||||
);
|
||||
}
|
||||
else if ((dynmap.options['msg-hiddennamejoin'].length > 0) && (playername.length == 0)) {
|
||||
addrow($('<div/>')
|
||||
.addClass('messagerow')
|
||||
.append(dynmap.options['msg-hiddennamejoin'])
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
$(dynmap).bind('playerquit', function(event, playername) {
|
||||
if ((dynmap.options.quitmessage.length > 0) && (playername.length > 0)) {
|
||||
addrow($('<div/>')
|
||||
.addClass('messagerow')
|
||||
.append(dynmap.options.quitmessage.replace('%playername%', playername))
|
||||
);
|
||||
}
|
||||
else if ((dynmap.options['msg-hiddennamequit'].length > 0) && (playername.length == 0)) {
|
||||
addrow($('<div/>')
|
||||
.addClass('messagerow')
|
||||
.append(dynmap.options['msg-hiddennamequit'])
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
$(dynmap).bind('chat', function(event, message) {
|
||||
var playerName = message.name;
|
||||
var playerAccount = message.account;
|
||||
var messageRow = $('<div/>')
|
||||
.addClass('messagerow');
|
||||
|
||||
var playerIconContainer = $('<span/>')
|
||||
.addClass('messageicon');
|
||||
|
||||
if (message.source === 'player' && configuration.showplayerfaces &&
|
||||
playerAccount) {
|
||||
getMinecraftHead(playerAccount, 16, function(head) {
|
||||
messageRow.icon = $(head)
|
||||
.addClass('playerMessageIcon')
|
||||
.appendTo(playerIconContainer);
|
||||
});
|
||||
}
|
||||
|
||||
var playerChannelContainer = '';
|
||||
if (message.channel) {
|
||||
playerChannelContainer = $('<span/>').addClass('messagetext')
|
||||
.text('[' + message.channel + '] ')
|
||||
.appendTo(messageRow);
|
||||
}
|
||||
|
||||
if (message.source === 'player' && configuration.showworld && playerAccount) {
|
||||
var playerWorldContainer = $('<span/>')
|
||||
.addClass('messagetext')
|
||||
.text('['+dynmap.players[playerAccount].location.world.name+']')
|
||||
.appendTo(messageRow);
|
||||
}
|
||||
|
||||
var playerNameContainer = '';
|
||||
if(message.name) {
|
||||
playerNameContainer = $('<span/>').addClass('messagetext').append(' '+message.name+': ');
|
||||
}
|
||||
|
||||
var playerMessageContainer = $('<span/>')
|
||||
.addClass('messagetext')
|
||||
.text(chat_encoder(message));
|
||||
|
||||
messageRow.append(playerIconContainer,playerChannelContainer,playerNameContainer,playerMessageContainer);
|
||||
addrow(messageRow);
|
||||
});
|
||||
};
|
67
Creative/dynmap/web/js/coord.js
Normal file
@@ -0,0 +1,67 @@
|
||||
componentconstructors['coord'] = function(dynmap, configuration) {
|
||||
|
||||
var Coord = L.Control.extend({
|
||||
valfield: $('<span/>'),
|
||||
mcrfield: $('<span/>'),
|
||||
chunkfield: $('<span/>'),
|
||||
|
||||
onAdd: function(map) {
|
||||
if(configuration.hidey)
|
||||
this._container = L.DomUtil.create('div', 'coord-control coord-control-noy');
|
||||
else
|
||||
this._container = L.DomUtil.create('div', 'coord-control');
|
||||
this._map = map;
|
||||
$('<span/>').addClass('coord-control-label').text((configuration.label || 'x,y,z') + ': ').appendTo(this._container);
|
||||
$('<br/>').appendTo(this._container);
|
||||
this.valfield.addClass('coord-control-value').text(configuration.hidey ? '---,---' : '---,---,---').appendTo(this._container);
|
||||
if(configuration['show-mcr']) {
|
||||
$('<br/>').appendTo(this._container);
|
||||
this.mcrfield.addClass('coord-control-value').text('--------').appendTo(this._container);
|
||||
}
|
||||
if(configuration['show-chunk']) {
|
||||
$('<br/>').appendTo(this._container);
|
||||
this.chunkfield.addClass('coord-control-value').text('Chunk: ---,---').appendTo(this._container);
|
||||
}
|
||||
this._update();
|
||||
return this.getContainer();
|
||||
},
|
||||
|
||||
getPosition: function() {
|
||||
return 'topleft';
|
||||
},
|
||||
|
||||
getContainer: function() {
|
||||
return this._container;
|
||||
},
|
||||
|
||||
_update: function() {
|
||||
if (!this._map) return;
|
||||
}
|
||||
});
|
||||
|
||||
var coord = new Coord();
|
||||
dynmap.map.addControl(coord);
|
||||
dynmap.map.on('mousemove', function(mevent) {
|
||||
if(!dynmap.map) return;
|
||||
var loc = dynmap.getProjection().fromLatLngToLocation(mevent.latlng, dynmap.world.sealevel+1);
|
||||
if(configuration.hidey)
|
||||
coord.valfield.text(Math.round(loc.x) + ',' + Math.round(loc.z));
|
||||
else
|
||||
coord.valfield.text(Math.round(loc.x) + ',' + loc.y + ',' + Math.round(loc.z));
|
||||
if(configuration['show-mcr'])
|
||||
coord.mcrfield.text('r.' + Math.floor(loc.x/512) + '.' + Math.floor(loc.z/512) + '.mca');
|
||||
if(configuration['show-chunk'])
|
||||
coord.chunkfield.text('Chunk: ' + Math.floor(loc.x/16) + ',' + Math.floor(loc.z/16));
|
||||
});
|
||||
dynmap.map.on('mouseout', function(mevent) {
|
||||
if(!dynmap.map) return;
|
||||
if(configuration.hidey)
|
||||
coord.valfield.text('---,---');
|
||||
else
|
||||
coord.valfield.text('---,---,---');
|
||||
if(configuration['show-mcr'])
|
||||
coord.mcrfield.text('--------');
|
||||
if(configuration['show-chunk'])
|
||||
coord.chunkfield.text('Chunk: ---,---');
|
||||
});
|
||||
};
|
146
Creative/dynmap/web/js/custommarker.js
Normal file
@@ -0,0 +1,146 @@
|
||||
L.CustomMarker = L.Class.extend({
|
||||
|
||||
includes: L.Mixin.Events,
|
||||
|
||||
options: {
|
||||
contentCreator: undefined,
|
||||
shadowCreator: undefined,
|
||||
clickable: true,
|
||||
draggable: false
|
||||
},
|
||||
|
||||
initialize: function(latlng, options) {
|
||||
L.Util.setOptions(this, options);
|
||||
this._latlng = latlng;
|
||||
},
|
||||
|
||||
onAdd: function(map) {
|
||||
this._map = map;
|
||||
|
||||
if (!this._element && this.options.elementCreator) {
|
||||
this._element = this.options.elementCreator();
|
||||
|
||||
this._element.className += ' leaflet-marker-icon';
|
||||
|
||||
this._initInteraction();
|
||||
}
|
||||
if (!this._shadow && this.options.shadowCreator) {
|
||||
this._shadow = this.options.shadowCreator();
|
||||
}
|
||||
|
||||
if (this._element) {
|
||||
map._panes.markerPane.appendChild(this._element);
|
||||
}
|
||||
if (this._shadow) {
|
||||
map._panes.shadowPane.appendChild(this._shadow);
|
||||
}
|
||||
|
||||
map.on('viewreset', this._reset, this);
|
||||
this._reset();
|
||||
if (map.options.zoomAnimation && map.options.markerZoomAnimation) {
|
||||
map.on('zoomanim', this._animateZoom, this);
|
||||
}
|
||||
},
|
||||
|
||||
onRemove: function(map) {
|
||||
if (this._element) {
|
||||
map._panes.markerPane.removeChild(this._element);
|
||||
}
|
||||
if (this._shadow) {
|
||||
map._panes.shadowPane.removeChild(this._elementShadow);
|
||||
}
|
||||
|
||||
map.off('viewreset', this._reset, this);
|
||||
|
||||
map = null;
|
||||
},
|
||||
|
||||
getLatLng: function() {
|
||||
return this._latlng;
|
||||
},
|
||||
|
||||
setLatLng: function(latlng) {
|
||||
this._latlng = latlng;
|
||||
this._reset();
|
||||
},
|
||||
|
||||
_animateZoom: function (opt) {
|
||||
var pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center);
|
||||
L.DomUtil.setPosition(this._element, pos);
|
||||
this._element.style.zIndex = pos.y;
|
||||
},
|
||||
|
||||
_reset: function() {
|
||||
if(this._map == null)
|
||||
return;
|
||||
var pos = this._map.latLngToLayerPoint(this._latlng);
|
||||
|
||||
if (this._element) {
|
||||
L.DomUtil.setPosition(this._element, pos);
|
||||
}
|
||||
if (this._shadow) {
|
||||
L.DomUtil.setPosition(this._shadow, pos);
|
||||
}
|
||||
|
||||
if (this._element) {
|
||||
this._element.style.zIndex = pos.y;
|
||||
}
|
||||
},
|
||||
|
||||
_initInteraction: function() {
|
||||
if (this._element && this.options.clickable) {
|
||||
this._element.className += ' leaflet-clickable';
|
||||
|
||||
L.DomEvent.addListener(this._element, 'click', this._onMouseClick, this);
|
||||
|
||||
var events = ['dblclick', 'mousedown', 'mouseover', 'mouseout'];
|
||||
for (var i = 0; i < events.length; i++) {
|
||||
L.DomEvent.addListener(this._element, events[i], this._fireMouseEvent, this);
|
||||
}
|
||||
}
|
||||
|
||||
if (this._element && L.Handler.MarkerDrag) {
|
||||
this.dragging = new L.Handler.MarkerDrag(this);
|
||||
|
||||
if (this.options.draggable) {
|
||||
this.dragging.enable();
|
||||
}
|
||||
}
|
||||
var animation = (map.options.zoomAnimation && map.options.markerZoomAnimation);
|
||||
if (this._element)
|
||||
this._element.className += animation ? ' leaflet-zoom-animated' : ' leaflet-zoom-hide';
|
||||
},
|
||||
|
||||
_onMouseClick: function(e) {
|
||||
L.DomEvent.stopPropagation(e);
|
||||
if (this.dragging && this.dragging.moved()) { return; }
|
||||
this.fire(e.type);
|
||||
},
|
||||
|
||||
_fireMouseEvent: function(e) {
|
||||
this.fire(e.type);
|
||||
L.DomEvent.stopPropagation(e);
|
||||
},
|
||||
|
||||
openPopup: function() {
|
||||
this._popup.setLatLng(this._latlng);
|
||||
this._map.openPopup(this._popup);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
closePopup: function() {
|
||||
if (this._popup) {
|
||||
this._popup._close();
|
||||
}
|
||||
},
|
||||
|
||||
bindPopup: function(content, options) {
|
||||
this._popup = new L.Popup(options);
|
||||
this._popup.setContent(content);
|
||||
this.on('click', this.openPopup, this);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|