UNPKG

waibu-maps

Version:
18 lines (15 loc) 575 B
import { glyphUrl } from './default-style.js' const wmaps = { url: '/wmaps.js', method: 'GET', noCacheReq: true, handler: async function (req, reply) { const { get } = this.app.lib._ const { routePath } = this.app.waibu const glyphs = routePath(glyphUrl, { uriEncoded: false }) const assetPrefix = get(this, 'app.waibuStatic.config.waibu.prefix') const iconPrefix = `/${assetPrefix}/${this.config.waibu.prefix}/icon` return await reply.view('waibuMaps.template:/wmaps.js', { glyphs, iconPrefix }) } } export default wmaps