TypeError: Cannot read property 'optIn' of undefined #1219
Unanswered
alphaev9
asked this question in
Questions & Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i use leaflet-geoman with vue3,when i run the project,sometimes ok,sometimes an error reported like this:
22:22:53.144 TypeError: Cannot read property 'optIn' of undefined
22:22:53.185 at NewClass.proto.callInitHooks (file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/app-renderjs.js:8177:36)
22:22:53.206 at NewClass.initialize (file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/app-renderjs.js:9593:18)
22:22:53.227 at new NewClass (file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/app-renderjs.js:8140:31)
22:22:53.247 at Object.createMap (file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/app-renderjs.js:10498:18)
code:<script module="locatemap" lang="renderjs">
import * as L from 'leaflet'
import '../util/flat.js'
import '@geoman-io/leaflet-geoman-free'
export default {
data() {
return {
map: null,
}
},
created() {
this.map = L.map('leaflet-container', {
pmIgnore: true,
attributionControl: false,
touchZoom: 'center',
minZoom: 1,
maxZoom: 4,
worldCopyJump: true
}).fitWorld()
}
}
</script>
Beta Was this translation helpful? Give feedback.
All reactions