()
| 217 | } |
| 218 | |
| 219 | async getVectorEncoding() { |
| 220 | const resp = await fetch(this.url); |
| 221 | const j = await resp.json(); |
| 222 | const template = j.tiles[0]; |
| 223 | const pathname = new URL(template).pathname; |
| 224 | if (pathname.endsWith(".mlt")) return "mlt"; |
| 225 | return "mvt"; |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | // from a input box or a URL param state. |