Skip to content

Conversation

@themiurgo
Copy link
Contributor

Solves #131

Copy link
Member

Choose a reason for hiding this comment

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

@themiurgo Quick questions before we merge this. Why did you choose an empty string instead of the 'var no_pop = null;'? Will the marker be clickable with the empty string? If so, that might be misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In fact if there is no popup text, I do not set a javascript variable at all in the HTML template. The marker will not be clickable so no variable is set.

Copy link
Member

Choose a reason for hiding this comment

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

In fact if there is no popup text, I do not set a javascript variable at all in the HTML template.

In a local test the "click" hand appears when hovering a mark making the user think that he can click and see something. I guess we do need to set 'var no_pop = null;'.

popuptest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In fact, in my tests, that behaviour happens anyways, even if no_popup is set. Try the same on the master branch and you'll see the hand popping up anyways, even if popup_on is set to False.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, so setting it to null does not change that. Let me take a closer look at this later (I am still travelling...)

If that is what leaflet does then lets merge as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Here's an example what comes out from folium (master branch) with popup_on=False on a marker:
https://gist.github.com/themiurgo/170dbb742897f9b86da6#file-no_popup-html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See also here:
http://leafletjs.com/examples/quick-start.html

Third map, there are some elements without popup content. Hand still shows. 😄

Copy link
Member

Choose a reason for hiding this comment

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

OK, then. It is a Leaflet issue! Lets merge...

@ocefpaf
Copy link
Member

ocefpaf commented May 26, 2015

Thanks @themiurgo! The PR looks good to merge. I just want to test it locally and once I get back in the office I will merge it.

@themiurgo
Copy link
Contributor Author

Great, let me know if any issues pop out! 😄

@ocefpaf
Copy link
Member

ocefpaf commented May 27, 2015

Great, let me know if any issues pop out!

One did not 😛

ocefpaf added a commit that referenced this pull request May 27, 2015
@ocefpaf ocefpaf merged commit ed69f9e into python-visualization:master May 27, 2015
@themiurgo themiurgo deleted the popup branch May 27, 2015 16:30
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