Coder Social home page Coder Social logo

Add layer selector about brewmap HOT 4 CLOSED

jones139 avatar jones139 commented on September 26, 2024
Add layer selector

from brewmap.

Comments (4)

craigloftus avatar craigloftus commented on September 26, 2024

I've just committed initial work to support this (98f7a4b).

It makes use of the built in leaflet support for grouping markers, with a simple event handler on each row in the key.

Hiding a layer is nice and quick, but leaflet is actually removing all the markers, and you have to add them all back again to re-display. I'm going to file an issue with leaflet to see if the behaviour can be improved.

from brewmap.

jones139 avatar jones139 commented on September 26, 2024

Thanks - Looks good - I have deployed it on http://maps.webhop.net/BrewMap for now - will test it a bit and deploy it on the main site this evening.

I hadn't managed to work out how to hide a marker without removing it altogether either - it does seem like there is a 'visible' property missing from the Leaflet layer type. I might have a look at the Leaflet code to see what I can do - I would like to add a 'collision detection' feature so that it will not draw all the overlapping icons - a bit like mapnik does.

from brewmap.

jones139 avatar jones139 commented on September 26, 2024

Seems to work well to me, thanks. Have deployed it on main brewmap map (http://brewmap.maps3.org.uk). Will close this issue as you have it working, and we can open others if we come up with possible enhancements.

from brewmap.

craigloftus avatar craigloftus commented on September 26, 2024

I've just commented on a Leaflet issue on the problem:
https://github.com/CloudMade/Leaflet/issues/4

On 25 November 2011 17:26, Graham Jones
[email protected]
wrote:

Seems to work well to me, thanks.  Have deployed it on main brewmap map (http://brewmap.maps3.org.uk).  Will close this issue as you have it working, and we can open others if we come up with possible enhancements.


Reply to this email directly or view it on GitHub:
#16 (comment)

from brewmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.