Code Monkey home page Code Monkey logo

leafclusterer's Introduction

The API is similar to that of the Google Maps version ([1]):

var map = new L.Map('map');
var lat = ...;
var lng = ...;
var pos = new L.LatLng(lat, lng);
var zoom = 4;
map.setView(pos, zoom);

var clusterer = new LeafClusterer(map);

var lat = ...;
var lng = ...;
var pos = new L.LatLng(lat, lng);
var marker = new L.Marker(pos);
clusterer.addMarker(marker);

or for batched addition:

var markers=[];
for each marker (m) {
   markers.push(m);
}

clusterer.addMarkers(markers);



[1] http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer/



leafclusterer's People

Contributors

ideak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

leafclusterer's Issues

new LeafClusterer(map); fails?

I just wanted to start with leafclusterer, but even the initialization fails?!
In every browser I get a: Uncaught ReferenceError: L is not defined - leafclusterer.js:580
The leaflet map works as expected.

<script type="text/javascript">
        var map = new L.Map('map');
        var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/MY_API_KEY/22677/256/{z}/{x}/{y}.png',
            cloudmadeAttribution = 'Map data &copy; 2011 OpenStreetMap contributors, Imagery &copy; 2011 CloudMade',
            cloudmade = new L.TileLayer(cloudmadeUrl, { maxZoom: 18, attribution: cloudmadeAttribution });
        map.setView(new L.LatLng(51.5, -0.09), 13).addLayer(cloudmade);;
        var clusterer = new LeafClusterer(map);    // <------- fails
        var markers = [];
    </script>

Example images?

Hi, could you provide some images of it in action?

Is it easy to swap out images ourselves?

Instantiate different cluster

Hello,
I would like to create different LeafClusterer for different markers. At a click of button I would like to hide or to show that cluster ( and the related markers).

When I try to create different LeafClusterer it doesn't work.

Thanks in advance for your time.
-A

Is this repository being maintained?

The last commit by repo owner was in March, and there have been a few pull requests that appear fine to me, but no maintainer comments. It would be nice to have an updated blessed repository to pull from instead of needing to update my code from multiple other repositories.

So, ideak, do you still watch this repo?

addEventListener IE7

Hello!

Great start on this addon! I hate having to do workaround for old (shitty) browser like IE7, but I did test leafclusterer on IE7 and it didn't work, as IE7 use attachEvent instead of addEventListener.

I know leaflet use a workaround method to go over this issue, would it be easy to implement in leafclusterer?

Thank you !

Weird issue with cluster click and Safari

Hello,

it seems there is a problem with safari firing the onClick_ event.

The clusters doesn't even have pointer cursor when hovered.

The issue is strange, i'm investigating it but the only difference I can notice with leaflet markers is that they use .on() to bind the click event.

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.