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


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


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

However, I am encountering an error:

OSMBuildings is not defined."

What is the issue?


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.