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 documentation about how to add a map layer #37

Open
wants to merge 2 commits into
base: hbg-mfdz-dev
Choose a base branch
from
Open

Add documentation about how to add a map layer #37

wants to merge 2 commits into from

Conversation

leonardehrenfried
Copy link
Collaborator

Comments welcome.

This layer takes a GeoJSON source and then converts it to the [Mapbox vector tile format](https://github.com/mapbox/vt-pbf).
This is a highly optimized format for sending geographic data to the client.

Take a note the the [`id` you give to your layer](https://github.com/mfdz/tilelive-roadworks-bw/blob/master/index.js#L85).
Copy link

Choose a reason for hiding this comment

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

Typo. And how about adding a small code example directly to this page?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean the source code of the layer? I'm not sure if a "small snippet" would contain the needed information but I can add it.

Take a note the the [`id` you give to your layer](https://github.com/mfdz/tilelive-roadworks-bw/blob/master/index.js#L85).
You will need it in the client in order to figure out which layer data should be processed in which UI component.

Once you have the layer source, add it to `hsl-map-server` like in the following PR: https://github.com/transportkollektiv/hsl-map-server/pull/1/files
Copy link

Choose a reason for hiding this comment

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

A short description would be helpful

## digitransit UI

This is where the main work needs to happen. The files you need to touch are:

Copy link

Choose a reason for hiding this comment

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

Again, some short code snippets would be great

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