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

dont convert extent objects with 'NaN' coordinate values to LatLngBounds #885

Merged
merged 4 commits into from
Nov 15, 2016

Conversation

jgravois
Copy link
Contributor

resolves #879

@jgravois jgravois mentioned this pull request Nov 11, 2016
@patrickarlt
Copy link
Contributor

@jgravois I would actually argue that instead of making latlngbounds in the callback be null, we should make error be something like Invalid Bounds.

This way I can ALWAYS handle latlngbounds as a bounds instead of having to do things like:

task.bounds(function (error, latlngbounds, raw) {
  if (error && latlngbounds) {
    // now I have to check for bounds and an error :(
  }
});

I can do

task.bounds(function (error, latlngbounds, raw) {
  if (error) {
    // request error or invalid bounds....
    return;
  }

  // now I know I have a valid bounds
});

@jgravois
Copy link
Contributor Author

this is good feedback and incorporated. 🚢 ing it.

@jgravois jgravois merged commit ac69bea into Esri:master Nov 15, 2016
@jgravois jgravois deleted the patch879 branch November 15, 2016 19:55
jgravois added a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
…nds (Esri#885)

* add test

* better to place the logic in extentToBounds

* try caching node dependencies on travis again

* throw an error when encountering null bounds
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

Successfully merging this pull request may close these issues.

Query bounds Mapserver
2 participants