GeoTIFF / georaster-layer-for-leaflet

Display GeoTIFFs and soon other types of raster on your Leaflet Map
https://geotiff.github.io/georaster-layer-for-leaflet-example/
Apache License 2.0
284 stars 57 forks source link

integration with Vuejs #82

Closed rumski20 closed 2 years ago

rumski20 commented 2 years ago

Hello,

Thank you again for this great library. I am wondering if you have any examples that integrate this library with Vuejs or especially vue-leaflet? I have been able to create a geoRasterLayer and add it to a map the traditional way. But I am wondering if anyone has successfully integrated it with Vuejs so that it can take participate with some of the framework's reactive components?

I know the geoRasterLayer extends Leaflet's gridLayer, and vue-leaflet has a gridLayer component , so maybe there is a potential tie in here? I'm not adept enough with Vuejs to determine.

pinky2070500 commented 2 years ago

Hello I have the same question as you, I don't know if you have answered it yet. please tell me. how to put geotiff on map using leaflet + vue

rumski20 commented 2 years ago

Hello I have the same question as you, I don't know if you have answered it yet. please tell me. how to put geotiff on map using leaflet + vue

Hi @pinky2070500 , I was able to get this working with vue-leaflet to some effect. Essentially, I created a functional class that gets the geotiff, processes the georaster, and creates the georasterLayer. That all gets returned to a Vue component that has a leaflet map (l-map) with a feature group (l-feature-group) in it. The feature group then add the georasterLayer to it. I found that I also had to call .setZIndex(99) on the l-feature-group

I hope this helps.