Giter Club home page Giter Club logo

clusterer's Introduction

clusterer

Evolution of Jef Poskanzer Clusterer for Google Maps API V3 compliance

clusterer's People

Contributors

melicerte avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

clusterer's Issues

Link url showing on hover rather than title

I'm using Drupal 7.22 with GMap 7x-2.7 and Location 7x-3.0-rc1 modules, and Jef Poskanzer's Clusterer in the 'thirdparty' folder.

When displaying node map there is no problem with using no marker manager at all (apart from nodes at same location being immediately one behind the other)

There are problems when I use Clusterer.

Where there are clusters everything work fine, but where there are no clusters instead of the title of the node appearing on hover I am seeing the whole URL as in the attached image.
githubgmap

Behavior if no icon is found for cluster.

Clusterer.PopUp = function(cluster){    
    var clusterer = cluster.clusterer;    
    var html = '<table width="300">';
    var n = 0;
    for (var i = 0; i < cluster.markers.length; ++i){
        var marker = cluster.markers[i];
        if (marker != null){
            ++n;
            var icon_marker = marker.getIcon();
            html += '<tr><td>';
            html += '<img src="' + icon_marker.url + '" width="' + (icon_marker.size.width / 2) + '" height="' + (icon_marker.size.height / 2) + '">';

If marker.getIcon() returns undefined, the method will blow up like this:

Uncaught TypeError: Cannot read property 'url' of undefined

This method fires a cluster is being clicked.

See also Clusterer2.js: marker.getIcon() returns null, and Clusterer.PopUp() blows up. in the drupal.org GMap issue queue.
I expect this is not an either-or, but both the Drupal module and the clusterer should add some sanity checks for early problem detection.

Btw, I remember having used the clusterer successfully in past projects, and having been happy with it. So something must have changed in the clusterer or in the Drupal module, or my setup is not correct. But even if my setup is not correct, adding some sanity checks can't be wrong.

Thanks!

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.