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

Vector tile layer demo #170

Merged
merged 6 commits into from
Feb 10, 2022
Merged

Vector tile layer demo #170

merged 6 commits into from
Feb 10, 2022

Conversation

michaelpnelson
Copy link
Contributor

This adds a demo of vector tile layers using protocol buffers and sliced JSON.

@michaelpnelson michaelpnelson requested a review from dgboss February 2, 2022 19:23
@michaelpnelson michaelpnelson self-assigned this Feb 2, 2022
debug/customization/vector-tile-layer/index.html Outdated Show resolved Hide resolved
debug/customization/vector-tile-layer/smk-config.json Outdated Show resolved Hide resolved
debug/customization/vector-tile-layer/smk-init.js Outdated Show resolved Hide resolved
debug/customization/vector-tile-layer/smk-init.js Outdated Show resolved Hide resolved
debug/customization/vector-tile-layer/smk-init.js Outdated Show resolved Hide resolved
debug/customization/vector-tile-layer/smk-config.json Outdated Show resolved Hide resolved
debug/customization/vector-tile-layer/smk-init.js Outdated Show resolved Hide resolved
);

// Set an extent that includes BC as well as Europe
leafletMap.setView({ lat: 48, lng: -40 }, 3);
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider including the initial extent in the smk-config.json instead. It looks a little strange for the map to start at the extent of BC and then zoom out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@dgboss
Copy link
Contributor

dgboss commented Feb 8, 2022

What do you think about having the style objects defined in their own file, ie. move vectorTileStyling and esriStyle into a separate file? Just a thought to clean things up a little, though there are pros and cons...

@michaelpnelson
Copy link
Contributor Author

What do you think about having the style objects defined in their own file, ie. move vectorTileStyling and esriStyle into a separate file? Just a thought to clean things up a little, though there are pros and cons...

I'm fine moving the style setup to its own file. The code in smk-init.js becomes much more focused in its absence. This will be done in the next commit.

"enabled": true,
"title": "About",
"position": "list-menu",
"content": "<p>This demonstrates the use of vector tile layers of multiple types (<a href=\"https://docs.mapbox.com/data/tilesets/guides/vector-tiles-standards/\">Protobufs</a> and sliced <a href=\"https://geojson.org/\">GeoJSON</a>) in SMK using the <a href=\"https://github.com/Leaflet/Leaflet.VectorGrid\">Leaflet.VectorGrid</a> library.</p><p>While not yet supported in the Layers tool, vector tile layers can be added to SMK apps with custom javascript.</p>"
Copy link
Contributor

Choose a reason for hiding this comment

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

javascript should be JavaScript.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@michaelpnelson michaelpnelson merged commit 0a1e197 into master Feb 10, 2022
@michaelpnelson michaelpnelson deleted the vector_tile_layer_demo branch February 10, 2022 21:11
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