-
Notifications
You must be signed in to change notification settings - Fork 358
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
Support marker styling #83
Comments
I believe that that is specific to One way to do it with |
You can create custom marker icons in leaflet: http://leafletjs.com/examples/custom-icons/ That's not hooked directly up to the geojson data, but there may be something possible there. |
|
For completeness, I think here are the docs about those icons in mapbox: https://www.mapbox.com/help/markers-js/#style-markers-with-simplestyle |
How do I implement marker styling in jupyter notebook |
How to change markers from the default ipyleaflet markers. Say we want to use a custom marker. Is this possible? |
Yes, you can use |
@giswqs thanks for the quick response. I am referring to the markers themselves, to have a different shape for example a bus. |
This is also supported and documented https://ipyleaflet.readthedocs.io/en/latest/api_reference/icon.html. You can provide your own icon. |
@martinRenou thanks so much. Done. Problem solved. |
Using your own icons for individual markers is indeed explained in the docs https://ipyleaflet.readthedocs.io/en/latest/layers/awesome_icon.html but how about providing custom markers for |
It would be great if ipyleaflet supported marker styling.
Perhaps the same GeoJSON conventions as GitHub: https://help.github.com/articles/mapping-geojson-files-on-github/ ?
This would allow Ipyleaflet users to easily change marker colors and styles, fixing problems like reproducible-notebooks/ERDDAP_timeseries_explorer#3.
Simple example:
https://github.com/rsignell-usgs/dc-wifi-social/blob/master/bars.geojson
On GitHUB this GeoJSON produces a map that looks like this:
While the same GeoJSON in Ipyleaflet:
produces a map that looks like this:
The text was updated successfully, but these errors were encountered: