Coder Social home page Coder Social logo

google-maps-utility-library-v3's People

Contributors

montoias avatar

Watchers

 avatar

google-maps-utility-library-v3's Issues

Style's textColor, anchor, textSize incorrectly documented and not obfuscated correctly in compiled js

Just a few small nits a I noticed when using this library.

Version: 3

Browser / Operating System: Any

Additional comments:

Refer to http://google-maps-utility-library-
v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js

Documentation lists 'anchor', 'textColor' and 'textSize':

 *     'styles': (object) An object that has style properties:
 *       'url': (string) The image url.
 *       'height': (number) The image height.
 *       'width': (number) The image width.
 *       'anchor': (Array) The anchor position of the label text.
 *       'textColor': (string) The text color.
 *       'textSize': (number) The text size.

But the code uses opt_textColor, opt_anchor, opt_textSize:

ClusterIcon.prototype.useStyle = function() {
  var index = Math.max(0, this.sums_.index - 1);
  index = Math.min(this.styles_.length - 1, index);
  var style = this.styles_[index];
  this.url_ = style.url;
  this.height_ = style.height;
  this.width_ = style.width;
  this.textColor_ = style.opt_textColor;
  this.anchor = style.opt_anchor;
  this.textSize_ = style.opt_textSize;
};

Further, look at http://google-maps-utility-library-
v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js

You can find the compiled version of ClusterIcon.prototype.useStyle by 
inspection:

a.G=b.url;a.g=b.height;a.n=b.width;a.D=b.Y;a.anchor=b.X;a.F=b.Z;

Notice that opt_textColor is referred to as 'Y', opt_anchor as 'X' and 
opt_textSize as 'Z'.  That means to pass in an array of styles in the 
constructor while using the compiled js, you have to use X, Y, and Z as 
property names instead of their real names, which is not robust in the face 
of changes to the obfuscator.



Original issue reported on code.google.com by [email protected] on 16 Apr 2010 at 3:33

MarkerManager for v3

Purpose of code changes on this branch:
It's a direct port of the markermanager from the v2 library.

When reviewing my code changes, please focus on:
The ProjectionHelper class, Bounds class and parts where you find v3
syntax. Don't forget the examples ;)

After the review, I'll merge this branch into:
Who knows, releases i guess ;)



Original issue reported on code.google.com by [email protected] on 3 Mar 2010 at 10:32

Performant removeMarkers (removing multiple markers fast)

Removing many markers individually is really slow, presumably due to the
repeated resetViewport()/redraw() calls. Below is removeMarkers() that
removes an array of markers and then does the reset/redraw. You have my
permission to include it in the lib.

PS. The code in the inner loop should be factored out to avoid duplication
with the removeMarker function.

MarkerClusterer.prototype.removeMarkers = function (toRemove) {
    for(var j = 0, marker; marker = toRemove[j]; j++)
    {
        var index = -1;
        if (this.markers_.indexOf) {
            index = this.markers_.indexOf(marker);
        } else {
            for (var i = 0, m; m = this.markers_[i]; i++) {
                if (m == marker) {
                    index = i;
                    continue;
                }
            }
        }

        this.markers_.splice(index, 1);
        marker.setVisible(false);
        marker.setMap(null);
    }
    this.resetViewport();
    this.redraw();
};

Original issue reported on code.google.com by [email protected] on 1 May 2010 at 7:44

markerCluster speed test example fails in IE7/8

Demo link or sample code:
http://google-maps-utility-library-
v3.googlecode.com/svn/tags/markerclusterer/1.0/examples/speed_test_example.
html

What steps will reproduce the problem?
1.open in IE7
2.click on a marker
3.error occers on this line 98 of speed_test.js

98  e.preventDefault();


Expected result:
infowindow should open

Actual result:
infowindow does not open.

Version: ###

Browser / Operating System:
IE7/8 Vista and XP

Additional comments:
my javascript knowledge isn't that good, so i don't know where to go from 
here, but i hope this helps someone.

Alex


Original issue reported on code.google.com by [email protected] on 9 Apr 2010 at 7:26

Clusters affect map's bounds.

I initiate clusters:
var mc = new MarkerClusterer(map, markers);

Than I drag the map, listen to this event and call map.getBounds()
function. In this case I expect to see the bounds of the visible area of
the map, but I get a bigger bounds instead, that is not correct.

These problems is causes by getExtendedBounds, when it calls
bounds.extend() function. It does not affect the view of the map, but
affects it's bounds:

MarkerClusterer.prototype.getExtendedBounds = function(bounds) {
...

  // Extend the bounds to contain the new bounds.
  bounds.extend(ne);
  bounds.extend(sw);

};


Rev r84, Firefox 3.6

Original issue reported on code.google.com by [email protected] on 16 Mar 2010 at 3:07

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.