-
Notifications
You must be signed in to change notification settings - Fork 135
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 for custom mapboxgl style #19
Comments
@nlehuby great call - right now we wrap the python variable passed to style_url as a string in each jinja template. We should enable an option to pass a python dictionary in JSON format and have the Jinja template format it as a JS object, not a string. ProposalChange the parameter name for Sample Python syntax for a mapboxgl.viz class:
|
thanks for your reply ! Your proposal is very close to the javascript mapboxgl API, so it would very easy to use. I do approve 👍 |
@nlehuby is this an issue you could submit a PR for? |
This shipped in #59 ! |
Stumbled upon this issue while looking for a fix for: https://stackoverflow.com/questions/62751062/mapbox-gl-in-jupyter-notebook-add-custom-marker/. I'd like to use a custom marker for point coordinates, however, not seeing where do I make the fix. |
Hey there @kevalshah90 , I had started something along those lines with #149. Does something along those lines meet your need? Or are you looking for something that just substitutes a different shape in place of a circle marker? That's not (yet) supported, but definitely something we could look into! Feel free to open a new issue :) https://github.com/mapbox/mapboxgl-jupyter/issues/ |
Hi @akacarlyann. Thanks. Yes, I think something along those lines would
work. I was looking to replace the circle marker with a different icon from
maki library, if available, if not, replace it with a different custom
icon/image.
Side question, how do I change the size of the circle marker? Thx.
…On Tue, Jul 7, 2020, 06:51 akacarlyann ***@***.***> wrote:
Hey there @kevalshah90 <https://github.com/kevalshah90> , I had started
something along those lines with #149
<#149>. Does something
along those lines meet your need? Or are you looking for something that
just substitutes a different shape in place of a circle marker? That's not
(yet) supported, but definitely something we could look into!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABESAIIYLBE7NQNDK6VDGFDR2J2A7ANCNFSM4EEQ6GEQ>
.
|
@kevalshah90 ah yes, the maki icons was the direction we decided to go, instead of that old PR I linked. I haven't gotten around to it yet, but glad to hear there's another vote for that feature. For changing the marker radius, if you are using the viz = CircleViz(data,
radius=5,
access_token=token)
viz.show() Hope that helps! |
Excellent. That worked! Thanks, I might have missed it in the
documentation.
Yes, I look forward to when you push those changes. It's a feature I am
quite keen on. Does this apply for jupyter-notebook/mapbox-gl only?
…On Tue, Jul 7, 2020 at 10:18 PM akacarlyann ***@***.***> wrote:
@kevalshah90 <https://github.com/kevalshah90> ah yes, the maki icons was
the direction we decided to go, instead of that old PR I linked. I haven't
gotten around to it yet, but glad to hear there's another vote for that
feature.
For changing the marker radius, if you are using the CircleViz type, (
https://mapbox-mapboxgl-jupyter.readthedocs-hosted.com/en/latest/viz.html#class-circleviz)
then you can set the radius as an argument. Here's an example:
viz = CircleViz(data,
radius=5,
access_token=token)viz.show()
Hope that helps!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABESAIPQ6UPJNOCFEKNBWNTR2NGVZANCNFSM4EEQ6GEQ>
.
|
Glad to hear it! I think the answer to your question is yes. This repository just implements Python bindings to create visualizations embedded in a Jupyter notebook using Mapbox's JavaScript library. We are currently loading the Mapbox GL JS version 1.5.0 in our HTML template. Thanks for reaching out! Hoping to revisit some more features on this project again soon :) |
It would be nice to be able to load a custom json file with a malboxgl style in it, instead of using mapbox ones.
The text was updated successfully, but these errors were encountered: