0

I am currently working on building a GIS system using Leaflet in Vue.js and am attempting to integrate OSMBuildings to incorporate 3D models. However, it seems that OSMBuildings does not have a specified file entry point.

I have specified the file entry point as "OSMBuildings-Leaflet.js" "main": "dist/OSMBuildings-Leaflet.js", and used the following

main.js

import * as L from 'leaflet'
import 'leaflet/dist/leaflet.css';
import 'osmbuildings';
Vue.L = Vue.prototype.$L = L

app.js

var osmb = new OSMBuildings(map)
  .date(new Date(2015, 5, 15, 17, 30))
  .set(JSON.parse(geojson))
  .click(function (id) {
    console.log('feature id clicked:', id);
  });

However, I am encountering an error:

OSMBuildings is not defined."

What is the issue?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.