hubertokf / vue2-leaflet-draw

MIT License
32 stars 25 forks source link

Is it possible add property map to get map in any tag? #3

Open edutucci opened 5 years ago

edutucci commented 5 years ago

I have this tags in template and I got error: _this.$parent.$parent.$refs.map is undefined q-page .row.shadow-2 .col div(style="width: 100%; min-height: 30px; background-color: none;") l-map( style="height: 85vh; width: 100%;" ) l-draw-toolbar(position="topleft")

to work toolbar I have insert tag map after template like this div(style="width: 100%; min-height: 30px; background-color: none;") l-map( style="height: 85vh; width: 100%;" ) l-draw-toolbar(position="topleft")

uct8086 commented 5 years ago

hey,edutucci , i have the same error ,and just add ref can resolve this problem: <l-map ref="map" ></l-map>

edutucci commented 5 years ago

hey,edutucci , i have the same error ,and just add ref can resolve this problem: <l-map ref="map" ></l-map>

Sorry uct8086, but this is not my problem. I just forgot add ref in my examples. The problem is that we need add after template in vuejs. But I would like add using tags row and col too.

Example working:

Example not working: