Skip to content

Add class definition #569

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

Closed

Conversation

birdage
Copy link
Contributor

@birdage birdage commented Oct 31, 2016

@ocefpaf what do you think about adding a class definition to the markers. ive put an example of the proposed changes below for just the circle. Wed have to figure where to put the css, maybe folium/templates/user_defined.css? i can squash the multiple changes if we want to go down this path.

i.e we have a circle marker but we want to leverage css styling a bit more, this would aid in the following issue #524

leaflet js example

    L.circle([51.509, -0.11], 1500, {
        className:" sample-circle",
        color: 'red',
        fillColor: '#f03',
        fillOpacity: 0.5
    }).addTo(mymap).bindPopup("I am a circle.");

css style

.sample-circle:hover{
    stroke: blue;
}

normal circle
screen shot 2016-10-30 at 8 15 13 pm

on hover
screen shot 2016-10-30 at 8 15 16 pm

@ocefpaf
Copy link
Member

ocefpaf commented Oct 31, 2016

This looks nice. I am unfamiliar with the leaflet counter part to review this right now but I will take a look at it ASAP. Meanwhile we should add a notebook example and tests.

I am not sure about providing the css. Maybe the end user should ensure that the CSS is loaded in their application. I do not think we should try to cover all the possibilities... But I am open to suggestions. What to you think @BibMartin?

@birdage
Copy link
Contributor Author

birdage commented Oct 31, 2016

@ocefpaf i just think we could add an empty css file that the user could add their css too 😄

@ocefpaf ocefpaf added this to the v0.4.0 milestone Mar 6, 2017
@ocefpaf
Copy link
Member

ocefpaf commented Aug 26, 2017

@birdage I took leaflet's approach and added the default options. See #683

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