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 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';
|
||||
import wsChannel from './WebSocketChannel.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';
|
||||
import config from '../config.js';
|
||||
|
||||
export default {
|
@ -1,5 +1,5 @@
|
||||
import SearchMenu from './search/SearchMenu.js';
|
||||
import SearchInput from './search/SearchInput.js';
|
||||
import SearchMenu from '../search/SearchMenu.js';
|
||||
import SearchInput from '../search/SearchInput.js';
|
||||
|
||||
export default L.Control.extend({
|
||||
initialize: function(wsChannel, opts) {
|
@ -1,5 +1,5 @@
|
||||
|
||||
import Map from './components/Map.js';
|
||||
import MapComponent from './map/MapComponent.js';
|
||||
|
||||
var Home = {
|
||||
view: function() {
|
||||
@ -9,5 +9,5 @@ var Home = {
|
||||
|
||||
export default {
|
||||
"/": Home,
|
||||
"/map/:layerId/:zoom/:lon/:lat": Map
|
||||
"/map/:layerId/:zoom/:lon/:lat": MapComponent
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user