-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Create CustomIcon as suggested in #228 #230
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
Conversation
|
||
from .utilities import color_brewer, _parse_size, legend_scaler, _locations_mirror, _locations_tolist, write_png,\ | ||
mercator_transform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We needed this re-factoring! Thanks!!
@andrewgiessel this is your baby. Can take a quick look at it before we merge this?
Beautiful! I just re-wrote my horrible hack using this PR. http://nbviewer.ipython.org/github/ocefpaf/secoora_assets_map/blob/gh-pages/test_geojson.ipynb |
Yes, I'm on it! I have that and the retina PR at least On Mon, Nov 2, 2015 at 8:39 AM Filipe [email protected] wrote:
|
# We got an array-like object | ||
if mercator_project: | ||
data = mercator_transform(image, | ||
[bounds[0][0], bounds[1][0]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bounds is not defined here- needs to be passed into from the init method of ImageOverlay
This is amazing work! Other than the bounds issue I did a line comment on above, it seems like a very nice refactoring. Do the image_overlay tests still pass? Do we more stuff there? |
Silly me ; corrected.
The test still passes ; I did not use |
@andrewgiessel Are you OK with @BibMartin's two extra commits? |
Looks great to me, let's merge |
Create CustomIcon as suggested in #228
Done! |
import os style_function = lambda feature: dict(fillColor='#DEFFDE', for i in range(0,len(data_cm)): folium.LayerControl(collapsed=True).add_to(world_map) **--------------------------------------------------------------------------- NameError: name 'CustomIcon' is not defined** How can I solve this? i saved my custom icons in local folder instead of using icon_url |
Using a refactoring with ImageOverlay, you can provide an image url, file, or array.