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

Add Bounding Box and Z/Lon/Lat support to loc param #644

Merged
merged 1 commit into from
May 17, 2021

Conversation

theduckylittle
Copy link
Member

Allow passing in more location formats:

A. zxy - the default GeoMoose format since 3.0.
This is really map resoltion;center x;center y.
B. lonlat - Which is formatted as zoom/lon/lat.
C. bbox - Formatted as west;south;east;north. In ESPG:4326.

Adds the ability to change the hash emit format as well using
the new option for the HashTracker class. In app.js:

    var hash_tracker = new gm3.trackers.HashTracker(app.store, {
        locationFormat: 'lonlat'
    });

@chughes-lincoln
Copy link
Contributor

Is it intended that the locationFormat needs to be declared in the app.js for the default xyz format to work? When I tested this on my build, if I have a service declared to start on the initial load (via app.startService('simple-search');) I get an uncaught type error and the service doesn't automatically start (It still works if I manually run the tool, it just doesn't start on startup). Everything else appears to work as normal. If I then specify the locationFormat in the app.js (whether it's xyz, bbox, or latlon), everything works as it should.

@theduckylittle
Copy link
Member Author

I'll check on the error. Not sure how to note this appropriately but:

  1. ON STARTUP: The application will accept any of the three location formats (zxy, lonlat, bbox). It will check to see which one is coming in and use that as the startup-location.
  2. ON NAV: The application will put in the hash whichever is configured in locationFormat. Without being specified, zxy should work. I would be willing to hear-out an argument that we should switch to lonlat as the default format as I think that is more accessible, sensible, shorter, and more common.

Allow passing in more location formats:

A. `zxy` - the default GeoMoose format since 3.0.
    This is really `map resoltion;center x;center y`.
B. `lonlat` - Which is formatted as `zoom/lon/lat`.
C. `bbox` - Formatted as `west;south;east;north`. In ESPG:4326.

Adds the ability to change the hash emit format as well using
the new option for the HashTracker class. In `app.js`:

```
    var hash_tracker = new gm3.trackers.HashTracker(app.store, {
        locationFormat: 'lonlat'
    });
```
@theduckylittle
Copy link
Member Author

Fixed the startup parameter issue! Needed to ensure state was ready before formatting!

@chughes-lincoln
Copy link
Contributor

Everything looks good now, thanks!

@klassenjs klassenjs merged commit 87f0333 into geomoose:main May 17, 2021
@theduckylittle theduckylittle added this to the 3.8 milestone Aug 31, 2021
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.

None yet

3 participants