ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
683 stars 229 forks source link

Unsupported GeoJSON type: vl-geom-circle #380

Closed Nikitoring closed 3 years ago

Nikitoring commented 3 years ago

When I use dynamic component I get error: Unknown custom element: . And error: Error: Unsupported GeoJSON type: Circle ` <component v-for="layer in layers" :is="layer.cmp" :key="layer.id" v-bind="layer"

<component :is="layer.source.cmp" v-bind="layer.source" v-if=" layer.source.features && layer.source.features.length "

<vl-feature v-for="feature in layer.source.features" :key="feature.id" :id="feature.id"

<component :is="geometryTypeToCmpName(feature.geometry.type)" v-bind="feature.geometry" layers is computed : [{ id: 'radiuses', title: 'Radiuses', cmp: 'vl-layer-vector', source: { cmp: 'vl-source-vector', features:{ geometry:{ coordinates:[ 37.6174943, 55.75044610000003 ], radius: 5000, type: "Circle" } } } }]`

But when I try : `

  </vl-layer-vector>`

I have no error

ghettovoice commented 3 years ago

Hello @Nikitoring , I see two mistakes in your layers data:

There is a fixed demo https://jsfiddle.net/ghettovoice/qa8p913o/62/

Nikitoring commented 3 years ago

Thanks a lot. I was inattentive