Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COG support #859

Closed
abdul-imran opened this issue Sep 3, 2024 · 3 comments
Closed

COG support #859

abdul-imran opened this issue Sep 3, 2024 · 3 comments
Labels
type: question Request for information or clarification. Not an issue.

Comments

@abdul-imran
Copy link

abdul-imran commented Sep 3, 2024

Is your feature request related to a problem? Please describe.
I can't seem to find a way of loading a Cloud Optimized GeoTiff on google maps

Describe the solution you'd like
We have a similar solution using Leaflet & Google Mutant plugin, but it's a grey area when it comes to Google Terms & Conditions. Hence I would like to be completely Google Maps & JavaScript based solution

Describe alternatives you've considered
Combination of Leaflet Maps, Google Mutant plugin & georaster-layer-for-leaflet plugin

Additional context
Add any other context or screenshots about the feature request here.

@abdul-imran abdul-imran added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 3, 2024
@usefulthink
Copy link
Contributor

Google Maps doesn't directly support COG Overlays, but you can create your own overlay with a canvas and use GeoTIFF.js to render the data into the canvas.

@usefulthink usefulthink added type: question Request for information or clarification. Not an issue. and removed type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. triage me I really want to be triaged. labels Oct 1, 2024
@abdul-imran
Copy link
Author

Hey @usefulthink - Thank you for getting back. I have tried GeoTiff.js, but couldn't get the tiles to load. Because I couldn't get the range requests being made, I also tried to load the entire COG once & then draw the tiles. But even that didn't work.
Attaching my html file
dynamic-tiling.zip

@usefulthink
Copy link
Contributor

I haven't done anything like that myself, but just looking at your html, I noticed you used GeoTIFF.fromArrayBuffer, which requires the entire TIFF to be loaded into an ArrayBuffer first. You'll probably need to use the GeoTIFF.fromSource() with a RemoteSource, but that is just guessing on my part from a quick glance at the documentation.

I'll be closing this issue since it is unrelated to the @googlemaps/js-api-loader package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants