forked from MTSR/mapserver
directory move
This commit is contained in:
parent
ac8d76f1d3
commit
dc7653ffbc
@ -1,40 +0,0 @@
|
|||||||
import wsChannel from './WebSocketChannel.js';
|
|
||||||
import Hashroute from './Hashroute.js';
|
|
||||||
import SimpleCRS from './SimpleCRS.js';
|
|
||||||
import CoordinatesDisplay from './CoordinatesDisplay.js';
|
|
||||||
import WorldInfoDisplay from './WorldInfoDisplay.js';
|
|
||||||
import SearchControl from './SearchControl.js';
|
|
||||||
import Overlaysetup from './Overlaysetup.js';
|
|
||||||
import layerManager from './LayerManager.js';
|
|
||||||
|
|
||||||
export function setup(cfg){
|
|
||||||
|
|
||||||
var map = L.map('image-map', {
|
|
||||||
minZoom: 2,
|
|
||||||
maxZoom: 12,
|
|
||||||
center: Hashroute.getCenter(),
|
|
||||||
zoom: Hashroute.getZoom(),
|
|
||||||
crs: SimpleCRS
|
|
||||||
});
|
|
||||||
|
|
||||||
map.attributionControl.addAttribution('<a href="https://github.com/minetest-tools/mapserver">Minetest Mapserver</a>');
|
|
||||||
|
|
||||||
var overlays = {};
|
|
||||||
|
|
||||||
layerManager.setup(wsChannel, cfg.layers, map, Hashroute.getLayerId());
|
|
||||||
|
|
||||||
//All overlays
|
|
||||||
Overlaysetup(cfg, map, overlays, wsChannel, layerManager);
|
|
||||||
|
|
||||||
new CoordinatesDisplay({ position: 'bottomleft' }).addTo(map);
|
|
||||||
new WorldInfoDisplay(wsChannel, { position: 'bottomright' }).addTo(map);
|
|
||||||
|
|
||||||
if (cfg.enablesearch){
|
|
||||||
new SearchControl(wsChannel, { position: 'topright' }).addTo(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
//layer control
|
|
||||||
L.control.layers(layerManager.layerObjects, overlays, { position: "topright" }).addTo(map);
|
|
||||||
|
|
||||||
Hashroute.setup(map, layerManager);
|
|
||||||
}
|
|
@ -1,10 +1,10 @@
|
|||||||
import wsChannel from '../WebSocketChannel.js';
|
import wsChannel from './WebSocketChannel.js';
|
||||||
import SimpleCRS from '../SimpleCRS.js';
|
import SimpleCRS from './SimpleCRS.js';
|
||||||
import CoordinatesDisplay from '../CoordinatesDisplay.js';
|
import CoordinatesDisplay from './CoordinatesDisplay.js';
|
||||||
import WorldInfoDisplay from '../WorldInfoDisplay.js';
|
import WorldInfoDisplay from './WorldInfoDisplay.js';
|
||||||
import SearchControl from '../SearchControl.js';
|
import SearchControl from './SearchControl.js';
|
||||||
import Overlaysetup from '../Overlaysetup.js';
|
import Overlaysetup from './Overlaysetup.js';
|
||||||
import layerManager from '../LayerManager.js';
|
import layerManager from './LayerManager.js';
|
||||||
import config from '../config.js';
|
import config from '../config.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
@ -1,5 +1,5 @@
|
|||||||
import SearchMenu from './search/SearchMenu.js';
|
import SearchMenu from '../search/SearchMenu.js';
|
||||||
import SearchInput from './search/SearchInput.js';
|
import SearchInput from '../search/SearchInput.js';
|
||||||
|
|
||||||
export default L.Control.extend({
|
export default L.Control.extend({
|
||||||
initialize: function(wsChannel, opts) {
|
initialize: function(wsChannel, opts) {
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import Map from './components/Map.js';
|
import MapComponent from './map/MapComponent.js';
|
||||||
|
|
||||||
var Home = {
|
var Home = {
|
||||||
view: function() {
|
view: function() {
|
||||||
@ -9,5 +9,5 @@ var Home = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
"/": Home,
|
"/": Home,
|
||||||
"/map/:layerId/:zoom/:lon/:lat": Map
|
"/map/:layerId/:zoom/:lon/:lat": MapComponent
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user