Skip to content
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

leaflet vector support request: leafletjs marker as html div contents instead? #1

Open
bronius opened this issue Oct 8, 2014 · 1 comment
Labels

Comments

@bronius
Copy link

bronius commented Oct 8, 2014

Hi - Your leaflet plugin seems to come the closest to what I'm after, and I wonder if you might push me in the right direction: I am looking to have a proper leaflet marker object as an html div instead of an img png (or vector for that matter). I don't know enough to know for sure, but it seems the library might be tightly bound to the notion of over anything else... thoughts?

Thanks!
-Bronius

@hiasinho
Copy link
Owner

hiasinho commented Oct 8, 2014

That shouldn't be a big problem to do. I think you can simply replace the SVG tag with a custom DIV or another HTML tag. Then you style it with CSS. Just keep an eye on the dimensions. In my case I use incode SVG, which is basically the same as html. Have a look at the following line: https://github.com/hiasinho/Leaflet.vector-markers/blob/master/src/Leaflet.vector-markers.coffee#L46-L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants