nickcam / FlareClusterLayer

ArcGIS javascript custom graphics layer. Create clusters...with flares.
https://flareclusterlayer.azurewebsites.net/index_v4.html
MIT License
134 stars 51 forks source link

Can I use FlareClusterLayer in a Gauss Kruger projection environment #64

Closed ibrucekong closed 4 years ago

ibrucekong commented 4 years ago

Hope to get your help!

I'm using the version 4.10 of the API.

How to use this repo in Gauss Kruger projection?

And what do I need to do to use it correctly? Thanks a lot.

nickcam commented 4 years ago

Hi mate, I'm not sure if it will work in that projection specifically. It's only tested in 4326 and 102100. To start with you should set the spatial reference to Gauss Kruger in the constructor options. It will have to be able to be projected to web mercator to work. You can try webmercatorUtils.canProject() to test.

Then everywhere there's a webMercatorUtils.lngLatToXY() or webMercatorUtils.geographicToWebMercator() call, you'll have to update them to do a webmercatorUtils.project() call to swap between your desired projection and webMercator.

This is quickly off the top off my head - you might need to review the api docs to get the right methods, but I would try that out first.

ibrucekong commented 4 years ago

Hi mate, I'm not sure if it will work in that projection specifically. It's only tested in 4326 and 102100. To start with you should set the spatial reference to Gauss Kruger in the constructor options. It will have to be able to be projected to web mercator to work. You can try webmercatorUtils.canProject() to test.

Then everywhere there's a webMercatorUtils.lngLatToXY() or webMercatorUtils.geographicToWebMercator() call, you'll have to update them to do a webmercatorUtils.project() call to swap between your desired projection and webMercator.

This is quickly off the top off my head - you might need to review the api docs to get the right methods, but I would try that out first.

Thank you very much for your answer, it helped me a lot. I will try it in my project.