diff --git a/server/bundle/CSSHandler.go b/server/bundle/CSSHandler.go deleted file mode 100644 index bc80040..0000000 --- a/server/bundle/CSSHandler.go +++ /dev/null @@ -1,38 +0,0 @@ -package bundle - -import ( - "net/http" -) - -type CSSHandler struct { - Webdev bool - Cache []byte -} - -func NewCSSHandler(Webdev bool) *CSSHandler { - h := &CSSHandler{Webdev: Webdev} - - if !Webdev { - //populate cache - manifest := getManifest(Webdev) - h.Cache = createBundle(Webdev, manifest.Styles) - } - - return h -} - -func (h *CSSHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { - resp.Header().Add("content-type", "text/css") - - if h.Cache == nil { - //dev - manifest := getManifest(h.Webdev) - resp.Write(createBundle(h.Webdev, manifest.Styles)) - - } else { - //prod - resp.Header().Add("Cache-Control", "public, max-age=3600") - resp.Write(h.Cache) - - } -} diff --git a/server/bundle/JsHandler.go b/server/bundle/JsHandler.go deleted file mode 100644 index c0f2da1..0000000 --- a/server/bundle/JsHandler.go +++ /dev/null @@ -1,38 +0,0 @@ -package bundle - -import ( - "net/http" -) - -type JsHandler struct { - Webdev bool - Cache []byte -} - -func NewJsHandler(Webdev bool) *JsHandler { - h := &JsHandler{Webdev: Webdev} - - if !Webdev { - //populate cache - manifest := getManifest(Webdev) - h.Cache = createBundle(Webdev, manifest.Scripts) - } - - return h -} - -func (h *JsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { - resp.Header().Add("content-type", "text/javascript") - - if h.Cache == nil { - //dev - manifest := getManifest(h.Webdev) - resp.Write(createBundle(h.Webdev, manifest.Scripts)) - - } else { - //prod - resp.Header().Add("Cache-Control", "public, max-age=3600") - resp.Write(h.Cache) - - } -} diff --git a/server/bundle/Manifest.go b/server/bundle/Manifest.go deleted file mode 100644 index 51b6676..0000000 --- a/server/bundle/Manifest.go +++ /dev/null @@ -1,6 +0,0 @@ -package bundle - -type Manifest struct { - Scripts []string `json:"scripts"` - Styles []string `json:"styles"` -} diff --git a/server/bundle/bundle.go b/server/bundle/bundle.go deleted file mode 100644 index 37d58df..0000000 --- a/server/bundle/bundle.go +++ /dev/null @@ -1,33 +0,0 @@ -package bundle - -import ( - "encoding/json" - "mapserver/vfs" -) - -func getManifest(useLocal bool) *Manifest { - manifestBytes := vfs.FSMustByte(useLocal, "/manifest.js") - manifest := &Manifest{} - err := json.Unmarshal(manifestBytes, manifest) - if err != nil { - panic(err) - } - - return manifest -} - -func createBundle(useLocal bool, files []string) []byte { - script := make([]byte, 0) - - for _, name := range files { - script = append(script, []byte("\n/*File: "+name+"*/\n")...) - content, err := vfs.FSByte(useLocal, name) - if err != nil { - panic("vfs-file not found: " + name) - } - - script = append(script, content...) - } - - return script -} diff --git a/server/static/index.html b/server/static/index.html index 7b220f5..1172501 100644 --- a/server/static/index.html +++ b/server/static/index.html @@ -4,12 +4,30 @@ - + + + + + + + + Minetest Mapserver
- + + + + + + + + + + + + diff --git a/server/static/js/CoordinatesDisplay.js b/server/static/js/CoordinatesDisplay.js index 222bb09..fb4b004 100644 --- a/server/static/js/CoordinatesDisplay.js +++ b/server/static/js/CoordinatesDisplay.js @@ -1,7 +1,5 @@ -/* exported CoordinatesDisplay */ -// coord display -var CoordinatesDisplay = L.Control.extend({ +export default L.Control.extend({ onAdd: function(map) { var div = L.DomUtil.create('div', 'leaflet-bar leaflet-custom-display'); @@ -34,5 +32,4 @@ var CoordinatesDisplay = L.Control.extend({ return div; } - }); diff --git a/server/static/js/Hashroute.js b/server/static/js/Hashroute.js index 645183d..727a702 100644 --- a/server/static/js/Hashroute.js +++ b/server/static/js/Hashroute.js @@ -1,6 +1,6 @@ /* exported Hashroute */ -var Hashroute = { +export default { setup: function(map, layerMgr){ function updateHash(){ diff --git a/server/static/js/RealtimeTileLayer.js b/server/static/js/RealtimeTileLayer.js index a0063d1..0a3233f 100644 --- a/server/static/js/RealtimeTileLayer.js +++ b/server/static/js/RealtimeTileLayer.js @@ -1,6 +1,5 @@ -/* exported RealtimeTileLayer */ -var RealtimeTileLayer = L.TileLayer.extend({ +export default L.TileLayer.extend({ initialize: function(wsChannel, layerId, map) { var self = this; diff --git a/server/static/js/SearchControl.js b/server/static/js/SearchControl.js index 7ec2e36..bcea102 100644 --- a/server/static/js/SearchControl.js +++ b/server/static/js/SearchControl.js @@ -1,8 +1,5 @@ -/* exported SearchControl */ -/* globals SearchInput: true */ -/* globals SearchMenu: true */ -var SearchControl = L.Control.extend({ +export default L.Control.extend({ initialize: function(wsChannel, opts) { L.Control.prototype.initialize.call(this, opts); }, diff --git a/server/static/js/SimpleCRS.js b/server/static/js/SimpleCRS.js index 907c08d..152342a 100644 --- a/server/static/js/SimpleCRS.js +++ b/server/static/js/SimpleCRS.js @@ -1,6 +1,5 @@ -/* exported SimpleCRS */ -var SimpleCRS = L.Util.extend({}, L.CRS.Simple, { +export default L.Util.extend({}, L.CRS.Simple, { scale: function (zoom) { return Math.pow(2, zoom-9); } diff --git a/server/static/js/WorldInfoDisplay.js b/server/static/js/WorldInfoDisplay.js index 190991e..33f15ac 100644 --- a/server/static/js/WorldInfoDisplay.js +++ b/server/static/js/WorldInfoDisplay.js @@ -50,7 +50,7 @@ var worldInfoRender = function(info){ }; // coord display -var WorldInfoDisplay = L.Control.extend({ +export default L.Control.extend({ initialize: function(wsChannel, opts) { L.Control.prototype.initialize.call(this, opts); this.wsChannel = wsChannel; diff --git a/server/static/js/api.js b/server/static/js/api.js index f7c7439..8b42a97 100644 --- a/server/static/js/api.js +++ b/server/static/js/api.js @@ -1,18 +1,12 @@ -/* exported api */ -var api = { +export getMapObjects(query){ + return m.request({ + method: "POST", + url: "api/mapobjects/", + data: query + }); +} - getMapObjects: function(query){ - return m.request({ - method: "POST", - url: "api/mapobjects/", - data: query - }); - }, - - getConfig: function(){ - return m.request("api/config"); - } - - -}; +export getConfig(){ + return m.request("api/config"); +} diff --git a/server/static/js/lib/color-hash.js b/server/static/js/lib/color-hash.js deleted file mode 100644 index 560e27e..0000000 --- a/server/static/js/lib/color-hash.js +++ /dev/null @@ -1,173 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ColorHash = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o MAX_SAFE_INTEGER) { - hash = parseInt(hash / seed2); - } - hash = hash * seed + str.charCodeAt(i); - } - return hash; -}; - -module.exports = BKDRHash; - -},{}],2:[function(require,module,exports){ -var BKDRHash = require('./bkdr-hash'); - -/** - * Convert RGB Array to HEX - * - * @param {Array} RGBArray - [R, G, B] - * @returns {String} 6 digits hex starting with # - */ -var RGB2HEX = function(RGBArray) { - var hex = '#'; - RGBArray.forEach(function(value) { - if (value < 16) { - hex += 0; - } - hex += value.toString(16); - }); - return hex; -}; - -/** - * Convert HSL to RGB - * - * @see {@link http://zh.wikipedia.org/wiki/HSL和HSV色彩空间} for further information. - * @param {Number} H Hue ∈ [0, 360) - * @param {Number} S Saturation ∈ [0, 1] - * @param {Number} L Lightness ∈ [0, 1] - * @returns {Array} R, G, B ∈ [0, 255] - */ -var HSL2RGB = function(H, S, L) { - H /= 360; - - var q = L < 0.5 ? L * (1 + S) : L + S - L * S; - var p = 2 * L - q; - - return [H + 1/3, H, H - 1/3].map(function(color) { - if(color < 0) { - color++; - } - if(color > 1) { - color--; - } - if(color < 1/6) { - color = p + (q - p) * 6 * color; - } else if(color < 0.5) { - color = q; - } else if(color < 2/3) { - color = p + (q - p) * 6 * (2/3 - color); - } else { - color = p; - } - return Math.round(color * 255); - }); -}; - -function isArray(o) { - return Object.prototype.toString.call(o) === '[object Array]'; -} - -/** - * Color Hash Class - * - * @class - */ -var ColorHash = function(options) { - options = options || {}; - - var LS = [options.lightness, options.saturation].map(function(param) { - param = param || [0.35, 0.5, 0.65]; // note that 3 is a prime - return isArray(param) ? param.concat() : [param]; - }); - - this.L = LS[0]; - this.S = LS[1]; - - if (typeof options.hue === 'number') { - options.hue = {min: options.hue, max: options.hue}; - } - if (typeof options.hue === 'object' && !isArray(options.hue)) { - options.hue = [options.hue]; - } - if (typeof options.hue === 'undefined') { - options.hue = []; - } - this.hueRanges = options.hue.map(function (range) { - return { - min: typeof range.min === 'undefined' ? 0 : range.min, - max: typeof range.max === 'undefined' ? 360: range.max - }; - }); - - this.hash = options.hash || BKDRHash; -}; - -/** - * Returns the hash in [h, s, l]. - * Note that H ∈ [0, 360); S ∈ [0, 1]; L ∈ [0, 1]; - * - * @param {String} str string to hash - * @returns {Array} [h, s, l] - */ -ColorHash.prototype.hsl = function(str) { - var H, S, L; - var hash = this.hash(str); - - if (this.hueRanges.length) { - var range = this.hueRanges[hash % this.hueRanges.length]; - var hueResolution = 727; // note that 727 is a prime - H = ((hash / this.hueRanges.length) % hueResolution) * (range.max - range.min) / hueResolution + range.min; - } else { - H = hash % 359; // note that 359 is a prime - } - hash = parseInt(hash / 360); - S = this.S[hash % this.S.length]; - hash = parseInt(hash / this.S.length); - L = this.L[hash % this.L.length]; - - return [H, S, L]; -}; - -/** - * Returns the hash in [r, g, b]. - * Note that R, G, B ∈ [0, 255] - * - * @param {String} str string to hash - * @returns {Array} [r, g, b] - */ -ColorHash.prototype.rgb = function(str) { - var hsl = this.hsl(str); - return HSL2RGB.apply(this, hsl); -}; - -/** - * Returns the hash in hex - * - * @param {String} str string to hash - * @returns {String} hex with # - */ -ColorHash.prototype.hex = function(str) { - var rgb = this.rgb(str); - return RGB2HEX(rgb); -}; - -module.exports = ColorHash; - -},{"./bkdr-hash":1}]},{},[2])(2) -}); \ No newline at end of file diff --git a/server/static/js/main.js b/server/static/js/main.js index 53837f6..e69de29 100644 --- a/server/static/js/main.js +++ b/server/static/js/main.js @@ -1,40 +0,0 @@ -/* jshint undef: false */ - -api.getConfig().then(function(cfg){ - - var wsChannel = new WebSocketChannel(); - wsChannel.connect(); - - var map = L.map('image-map', { - minZoom: 2, - maxZoom: 12, - center: Hashroute.getCenter(), - zoom: Hashroute.getZoom(), - crs: SimpleCRS - }); - - map.attributionControl.addAttribution('Minetest Mapserver'); - - var overlays = {}; - - window.layerMgr = new LayerManager(wsChannel, cfg.layers, map, Hashroute.getLayerId()); - - //All overlays - Overlaysetup(cfg, map, overlays, wsChannel, layerMgr); - - - 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(layerMgr.layerObjects, overlays, { position: "topright" }).addTo(map); - - Hashroute.setup(map, layerMgr); - -}).catch(function(e){ - console.error(e); -}); diff --git a/server/static/js/map.js b/server/static/js/map.js new file mode 100644 index 0000000..0993f0c --- /dev/null +++ b/server/static/js/map.js @@ -0,0 +1,35 @@ + +export function setup(cfg){ + var wsChannel = new WebSocketChannel(); + wsChannel.connect(); + + var map = L.map('image-map', { + minZoom: 2, + maxZoom: 12, + center: Hashroute.getCenter(), + zoom: Hashroute.getZoom(), + crs: SimpleCRS + }); + + map.attributionControl.addAttribution('Minetest Mapserver'); + + var overlays = {}; + + window.layerMgr = new LayerManager(wsChannel, cfg.layers, map, Hashroute.getLayerId()); + + //All overlays + Overlaysetup(cfg, map, overlays, wsChannel, layerMgr); + + + 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(layerMgr.layerObjects, overlays, { position: "topright" }).addTo(map); + + Hashroute.setup(map, layerMgr); +} diff --git a/server/static/js/nomodule.js b/server/static/js/nomodule.js new file mode 100644 index 0000000..e69de29 diff --git a/server/static/js/overlays/ATMOverlay.js b/server/static/js/overlays/ATMOverlay.js index 7c19499..c850ab8 100644 --- a/server/static/js/overlays/ATMOverlay.js +++ b/server/static/js/overlays/ATMOverlay.js @@ -1,8 +1,6 @@ -/* exported ATMOverlay */ -/* globals AbstractIconOverlay: true */ +import AbstractIconOverlay from './AbstractIconOverlay.js'; - -var ATMOverlay = AbstractIconOverlay.extend({ +export default AbstractIconOverlay.extend({ initialize: function(wsChannel, layerMgr) { AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "atm"); }, diff --git a/server/static/js/overlays/AbstractGeoJsonOverlay.js b/server/static/js/overlays/AbstractGeoJsonOverlay.js index bcb03ba..5ed1e81 100644 --- a/server/static/js/overlays/AbstractGeoJsonOverlay.js +++ b/server/static/js/overlays/AbstractGeoJsonOverlay.js @@ -1,7 +1,5 @@ -/* exported AbstractGeoJsonOverlay */ -/* jshint unused: false */ -var AbstractGeoJsonOverlay = L.LayerGroup.extend({ +export default L.LayerGroup.extend({ initialize: function(wsChannel, layerMgr, type) { L.LayerGroup.prototype.initialize.call(this); diff --git a/server/static/js/overlays/AbstractIconOverlay.js b/server/static/js/overlays/AbstractIconOverlay.js index 69ec6e5..32c0035 100644 --- a/server/static/js/overlays/AbstractIconOverlay.js +++ b/server/static/js/overlays/AbstractIconOverlay.js @@ -1,7 +1,5 @@ -/* exported AbstractIconOverlay */ -/* jshint unused: false */ -var AbstractIconOverlay = L.LayerGroup.extend({ +export default L.LayerGroup.extend({ initialize: function(wsChannel, layerMgr, type, icon) { L.LayerGroup.prototype.initialize.call(this); diff --git a/server/static/js/overlays/BonesOverlay.js b/server/static/js/overlays/BonesOverlay.js index b7fd0c0..137a4f4 100644 --- a/server/static/js/overlays/BonesOverlay.js +++ b/server/static/js/overlays/BonesOverlay.js @@ -1,7 +1,6 @@ -/* exported BonesOverlay */ -/* globals AbstractIconOverlay: true */ +import AbstractIconOverlay from './AbstractIconOverlay.js'; -var BonesIcon = L.icon({ +export default L.icon({ iconUrl: 'pics/bones_top.png', iconSize: [16, 16], diff --git a/server/static/js/overlays/BorderOverlay.js b/server/static/js/overlays/BorderOverlay.js index d59344d..7dbd831 100644 --- a/server/static/js/overlays/BorderOverlay.js +++ b/server/static/js/overlays/BorderOverlay.js @@ -1,7 +1,6 @@ -/* exported BorderOverlay */ -/* globals AbstractGeoJsonOverlay: true */ +import AbstractGeoJsonOverlay from './AbstractGeoJsonOverlay.js'; -var BorderOverlay = AbstractGeoJsonOverlay.extend({ +export default AbstractGeoJsonOverlay.extend({ initialize: function(wsChannel, layerMgr) { AbstractGeoJsonOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "border"); }, diff --git a/server/static/js/overlays/DigitermOverlay.js b/server/static/js/overlays/DigitermOverlay.js index 2a8543a..1cf1360 100644 --- a/server/static/js/overlays/DigitermOverlay.js +++ b/server/static/js/overlays/DigitermOverlay.js @@ -1,5 +1,4 @@ -/* exported DigitermOverlay */ -/* globals AbstractIconOverlay: true */ +import AbstractIconOverlay from './AbstractIconOverlay.js'; var DigitermIcon = L.icon({ iconUrl: 'pics/digiterms_beige_front.png', @@ -9,7 +8,7 @@ var DigitermIcon = L.icon({ popupAnchor: [0, -16] }); -var DigitermOverlay = AbstractIconOverlay.extend({ +export default AbstractIconOverlay.extend({ initialize: function(wsChannel, layerMgr) { AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "digiterm", DigitermIcon); }, diff --git a/server/static/js/search/SearchInput.js b/server/static/js/search/SearchInput.js index adaebd8..ee128e6 100644 --- a/server/static/js/search/SearchInput.js +++ b/server/static/js/search/SearchInput.js @@ -1,8 +1,4 @@ -/* exported SearchInput */ -/* globals SearchService: true */ -/* globals SearchStore: true */ - -var SearchInput = { +export default { view: function(){ function handleInput(e){ SearchStore.query = e.target.value; diff --git a/server/static/js/search/SearchMenu.js b/server/static/js/search/SearchMenu.js index f1da9d9..66dcc21 100644 --- a/server/static/js/search/SearchMenu.js +++ b/server/static/js/search/SearchMenu.js @@ -1,9 +1,9 @@ -/* exported SearchMenu */ -/* globals SearchResult: true */ -/* globals SearchService: true */ -/* globals SearchStore: true */ -var SearchMenu = { +import SearchService from './SearchService.js'; +import SearchStore from './SearchStore.js'; +import SearchResult from './SearchResult.js'; + +export default { view: function(vnode){ var style = {}; diff --git a/server/static/js/search/SearchResult.js b/server/static/js/search/SearchResult.js index ca4f503..5993d10 100644 --- a/server/static/js/search/SearchResult.js +++ b/server/static/js/search/SearchResult.js @@ -1,8 +1,6 @@ -/* exported SearchResult */ -/* globals SearchStore: true */ -/* globals layerMgr: true */ +import SearchStore from './SearchStore.js'; -var SearchResult = { +export default { view: function(vnode){ var map = vnode.attrs.map; diff --git a/server/static/js/search/SearchService.js b/server/static/js/search/SearchService.js index d753e99..fe521a8 100644 --- a/server/static/js/search/SearchService.js +++ b/server/static/js/search/SearchService.js @@ -1,7 +1,7 @@ -/* exported SearchService */ -/* globals SearchStore: true */ +import SearchStore from './SearchStore.js'; +import { getMapObjects } from '../api.js'; -var SearchService = { +export default { search: function(){ SearchStore.show = true; @@ -18,7 +18,7 @@ var SearchService = { SearchStore.busy = true; function searchFor(type, key, valuelike){ - return api.getMapObjects({ + return getMapObjects({ pos1: { x:-2048, y:-2048, z:-2048 }, pos2: { x:2048, y:2048, z:2048 }, type: type, diff --git a/server/static/js/search/SearchStore.js b/server/static/js/search/SearchStore.js index 397abb0..a154484 100644 --- a/server/static/js/search/SearchStore.js +++ b/server/static/js/search/SearchStore.js @@ -1,6 +1,5 @@ -/* exported SearchStore */ -var SearchStore = { +export default { query: "", show: false, busy: false, diff --git a/server/static/js/util/debounce.js b/server/static/js/util/debounce.js index c71c0c9..a07bea6 100644 --- a/server/static/js/util/debounce.js +++ b/server/static/js/util/debounce.js @@ -1,6 +1,5 @@ -/* exported debounce */ -function debounce(func, wait, immediate) { +export default function debounce(func, wait, immediate) { var timeout; return function() { var context = this, args = arguments; diff --git a/server/static/manifest.js b/server/static/manifest.js deleted file mode 100644 index 782c0b5..0000000 --- a/server/static/manifest.js +++ /dev/null @@ -1,56 +0,0 @@ -{ - "scripts": [ - "/js/lib/leaflet.js", - "/js/lib/leaflet.awesome-markers.js", - "/js/lib/mithril.min.js", - "/js/lib/color-hash.js", - "/js/util/debounce.js", - "/js/api.js", - "/js/LayerManager.js", - "/js/SimpleCRS.js", - "/js/WebSocketChannel.js", - "/js/RealtimeTileLayer.js", - "/js/SearchControl.js", - "/js/CoordinatesDisplay.js", - "/js/WorldInfoDisplay.js", - "/js/search/SearchStore.js", - "/js/search/SearchService.js", - "/js/search/SearchResult.js", - "/js/search/SearchMenu.js", - "/js/search/SearchInput.js", - "/js/overlays/AbstractIconOverlay.js", - "/js/overlays/AbstractGeoJsonOverlay.js", - "/js/overlays/ATMOverlay.js", - "/js/overlays/TravelnetOverlay.js", - "/js/overlays/ShopOverlay.js", - "/js/overlays/PoiOverlay.js", - "/js/overlays/LabelOverlay.js", - "/js/overlays/PlayerOverlay.js", - "/js/overlays/TrainOverlay.js", - "/js/overlays/MinecartOverlay.js", - "/js/overlays/TrainlineOverlay.js", - "/js/overlays/BorderOverlay.js", - "/js/overlays/ProtectorOverlay.js", - "/js/overlays/XPProtectorOverlay.js", - "/js/overlays/PrivProtectorOverlay.js", - "/js/overlays/BonesOverlay.js", - "/js/overlays/LcdOverlay.js", - "/js/overlays/LocatorOverlay.js", - "/js/overlays/DigitermOverlay.js", - "/js/overlays/LuacontrollerOverlay.js", - "/js/overlays/TechnicAnchorOverlay.js", - "/js/overlays/TechnicQuarryOverlay.js", - "/js/overlays/TechnicSwitchOverlay.js", - "/js/overlays/MissionOverlay.js", - "/js/Overlaysetup.js", - "/js/Hashroute.js", - "/js/main.js" - ], - "styles": [ - "/css/fontawesome.min.css", - "/css/bootstrap.min.css", - "/css/leaflet.css", - "/css/leaflet.awesome-markers.css", - "/css/custom.css" - ] -} diff --git a/server/web/serve.go b/server/web/serve.go index 5996b06..112a876 100644 --- a/server/web/serve.go +++ b/server/web/serve.go @@ -2,7 +2,6 @@ package web import ( "mapserver/app" - "mapserver/bundle" "mapserver/vfs" "net" "net/http" @@ -23,9 +22,6 @@ func Serve(ctx *app.App) { mux.Handle("/", http.FileServer(vfs.FS(ctx.Config.Webdev))) - mux.Handle("/js/bundle.js", bundle.NewJsHandler(ctx.Config.Webdev)) - mux.Handle("/css/bundle.css", bundle.NewCSSHandler(ctx.Config.Webdev)) - tiles := &Tiles{ctx: ctx} tiles.Init() mux.Handle("/api/tile/", tiles)