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

DynamicMapLayers don't manage 'Antimeridian artifacts' #1127

Closed
UsgsMonkey opened this issue Oct 23, 2018 · 7 comments
Closed

DynamicMapLayers don't manage 'Antimeridian artifacts' #1127

UsgsMonkey opened this issue Oct 23, 2018 · 7 comments

Comments

@UsgsMonkey
Copy link

  • Browser and version:

All

  • Version of Leaflet (L.version):

1.2.0

  • Version of esri Leaflet (L.esri.VERSION):

2.1.1

Steps to reproduce the error:

  1. create a DynamicMapLayer with geographic coordinate system data crossing the International Date Line (e.g. polygon data on both sides of the IDL along the Alaskan Aleutian islands).
  2. display data on map using ESRI Leaflet

What happens is ...

You can view the problem by opening our public ESRI Leaflet application @ https://hydromaintenance.nationalmap.gov/hmp. Minimize the login sidebar using the hamburger button then open the layer control in the upper right. Click off all the layers except the last (Hydrologic Units (Hu-4/Hu-8)). Pan and zoom the map to the Alaskan Aleutian islands. You'll see that the polygon data stops at the International Date Line. As it happens, the map server supplies data on the other side of the line that's not being translated and displayed correctly.

I was expecting all our data from the map service to be rendered without issue.

There's a base Leaflet plugin designed to resolve this problem: https://github.com/briannaAndCo/Leaflet.Antimeridian. We're just missing a solution for DynamicMapLayers, which we use because of the complex rendering we need to apply for our layers. Deconstructing the object itself into GeoJSON to apply the solution offered by this plugin seems to be a misplaced solution if it might be better addressed in the ESRI Leaflet API itself.

@jgravois
Copy link
Contributor

have you seen this?
https://github.com/SVoyt/esri-leaflet-dynamic-advanced

@UsgsMonkey
Copy link
Author

UsgsMonkey commented Oct 23, 2018

Actually, no I hadn't. Thank you! - can you advise or offer any thoughts about what this offers vis-a-vis our problem?

Update: Ok looking at their implementation it seems pretty cut/dry... I'll give it a shot and see if we get lucky :) Thanks for the tip!

@UsgsMonkey
Copy link
Author

I gave it a shot and from what I can tell their implementation lacks at least one of the key functions exposed by DynamicMapLayer (i.e. 'redraw'). I posted an issue on their page, but if that functionality is missing, this may be a non-starter for us in creating new problems to solve others ("borrowing from Peter to pay Paul"). This certainly seems to be support that would be important for the core API. Is there any consideration to add this support sometime soon?

@jgravois
Copy link
Contributor

@jgravois
Copy link
Contributor

jgravois commented Oct 24, 2018

This certainly seems to be support that would be important for the core API. Is there any consideration to add this support sometime soon?

to answer your more general question, i'm more than happy to provide code review if someone wants to take a stab at this enhancement (or #1124, or anything else for that matter), but i don't have plans to tackle them anytime soon.

i've had my hands full with @esri/arcgis-rest-js and a few other oss projects lately.

@UsgsMonkey
Copy link
Author

Understood - appreciate your efforts. I figured it couldn't hurt to ask though :)

@jgravois
Copy link
Contributor

no worries at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants