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

Implement Vector Tiling for SMAP #1099

Merged
merged 2 commits into from
Feb 15, 2017
Merged

Conversation

linzjax
Copy link
Contributor

@linzjax linzjax commented Feb 8, 2017

Note: Not going into master

Proposed changes in this pull request

  • implemented tile->lat/long converter
  • view and template updated to serve vector tiles.
  • added L.Deflate back (currently not working)
  • added L.TileLayer.GeoJSON and updated to be compatible with Leaflet 1.0

When should this PR be merged

Whenever

Risks

None (Not going into master)

Follow up actions

  • location.getBounds() currently not working because the geojsonTileLayer returned doesn't contain the spatial unit features.
  • L.Deflate doesn't work with L.TileLayer.GeoJSON

Checklist (for reviewing)

General

  • Is this PR explained thoroughly? All code changes must be accounted for in the PR description.
  • Is the PR labeled correctly? It should have the migration label if a new migration is added.
  • Is the risk level assessment sufficient? The risks section should contain all risks that might be introduced with the PR and which actions we need to take to mitigate these risks. Possible risks are database migrations, new libraries that need to be installed or changes to deployment scripts.

Functionality

  • Are all requirements met? Compare implemented functionality with the requirements specification.
  • Does the UI work as expected? There should be no Javascript errors in the console; all resources should load. There should be no unexpected errors. Deliberately try to break the feature to find out if there are corner cases that are not handled.

Code

  • Do you fully understand the introduced changes to the code? If not ask for clarification, it might uncover ways to solve a problem in a more elegant and efficient way.
  • Does the PR introduce any inefficient database requests? Use the debug server to check for duplicate requests.
  • Are all necessary strings marked for translation? All strings that are exposed to users via the UI must be marked for translation.

Tests

  • Are there sufficient test cases? Ensure that all components are tested individually; models, forms, and serializers should be tested in isolation even if a test for a view covers these components.
  • If this is a bug fix, are tests for the issue in place There must be a test case for the bug to ensure the issue won’t regress. Make sure that the tests break without the new code to fix the issue.
  • If this is a new feature or a significant change to an existing feature has the manual testing spreadsheet been updated with instructions for manual testing?

Documentation

  • Are changes to the UI documented in the platform docs? If this PR introduces new platform site functionality or changes existing ones, the changes must be documented in the Cadasta Platform Documentation.
  • Are changes to the API documented in the API docs? If this PR introduces new API functionality or changes existing ones, the changes must be documented in the API docs.
  • Are reusable components documented? If this PR introduces components that are relevant to other developers (for instance a mixin for a view or a generic form) they should be documented in the Wiki.

Copy link
Member

@oliverroick oliverroick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good but there's one thing that bothers me (which is not your fault). The way L.TileLayer.GeoJSON is set up, it sends a lot of requests the the server which need to be processed. This makes sense when you provide different levels of geometry generalisation for each zoom level but not for our case. We want to load the geometry once and then don't worry about it any more when the map is zoomed or panned.

I thought about this a little and the best way to solve this is to keep track of the areas that have been downloaded already. I'm trying to come up with an idea to solve this efficiently. I'll keep you posted.

linzjax and others added 2 commits February 13, 2017 15:29
adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view
@linzjax linzjax force-pushed the feature/map-spa-vector-tiles branch from b80a457 to 2f00b31 Compare February 13, 2017 20:30
@linzjax linzjax merged commit 582f1b8 into feature/map-spa Feb 15, 2017
linzjax added a commit that referenced this pull request Feb 20, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request Feb 23, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request Mar 3, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
@oliverroick oliverroick deleted the feature/map-spa-vector-tiles branch March 15, 2017 09:51
linzjax added a commit that referenced this pull request Mar 17, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request Apr 6, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request Apr 20, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request May 12, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request May 18, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request May 23, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request Jun 5, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request Jun 13, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
linzjax added a commit that referenced this pull request Jun 19, 2017
* implemented tile->lat/long converter

adding L.Deflate back

added L.TileLayer.GeoJSON and updated to be compatable with Leaflet 1.0

Currently only loaded spatial resources. Should update to drop SUs when out of view

* Lazy tile loading
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.

2 participants