Giter Site home page Giter Site logo

v3-utility-library's Introduction

Build Status codecov GitHub contributors TypeScript Apache-2.0

Google Maps JavaScript API v3 Utilities

Note: All packages are have been moved to individual repositories and placed in the @googlemaps NPM scope!

Description

In this project you can find a utility packages developed for the Google Maps JavaScript API V3.

Documentation

Documentation for the utility packages below can be found at https://googlemaps.github.io/v3-utility-library/.

Archive

The following packages have never been officially published and are not maintained. Please open an issue to prioritize their inclusion.

  • ArcGIS Server Link
  • CanvasLayer
  • ExtOverviewMapControl
  • Geolocation Marker
  • InfoBox
  • InfoBubble
  • KeyDragZoom
  • MapLabel
  • RichMarker
  • RouteBoxer
  • StyledMarker

Other Resources

Support

These libraries are community supported. We're comfortable enough with the stability and features of the libraries that we want you to build real production applications on it.

If you find a bug, or have a feature suggestion, please log an issue. If you'd like to contribute, please read How to Contribute.

v3-utility-library's People

Contributors

alex-hudson avatar amuramoto avatar andreyh13 avatar arriolac avatar bbrala avatar bmclain avatar brendankenny avatar broady avatar calvinsadewa avatar chadkillingsworth avatar coderpatros avatar crutchcorn avatar cs09g avatar dependabot-preview[bot] avatar dependabot[bot] avatar florencia-irena avatar garylittlerlp avatar ipcjs avatar jlivni avatar jpoehnelt avatar markmcd avatar nyholm avatar sebdesign avatar seppo0010 avatar skaree avatar stephenmcd avatar stevelacey avatar thekip avatar xdudu avatar yuvashkenazi 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  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  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

v3-utility-library's Issues

InfoBox, extending OverlayView in the constructor

*** InfoBox constructor ***

It would be great if this class extended OverlayView in the constructor since 
google.maps library might be included dynamically and therefore not being 
available when InfoBox is included and causing an error.

Thanks 

Original issue reported on code.google.com by [email protected] on 6 Oct 2010 at 10:30

MarkerClusterer: Anchor field not porperly set

Pretty easy: On line 939 of the unpacked markerclusterer.js it says:

  this.anchor = style.opt_anchor;

instead of

  this.anchor_ = style.opt_anchor;

which leads to the expression on line 969 always evaluating to false:

  if (typeof this.anchor_ === 'object') {



Demo link or sample code:
-

What steps will reproduce the problem?
1. set anchor property of style object
2. you will not see the text at the correct position

Expected result:
You should see the text at the correct position.

Actual result:
The anchor property will not be set.

Version: 1.0

Browser / Operating System:
all

Additional comments:
See above

*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by [email protected] on 8 Sep 2010 at 1:08

  • Merged into: #17

MarkerWithLabel : problem of overlapping labels when two markers are in the same position

please, Looks this attach file.

Browser / Operating System:
all


*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by [email protected] on 16 Jul 2010 at 5:08

Attachments:

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

disableKeyDragZoom references listeners_ in wrong variable

Currently the code in line 764 references this.listeners_.length when it needs 
to get d.listeners_.length, effectively preventing disableKeyDragZoom

What steps will reproduce the problem?
1. try to call disableDragZoom

Expected result:
Error message in console

Version: r189

Browser / Operating System:
all

Original issue reported on code.google.com by [email protected] on 7 Oct 2010 at 2:04

MarkerClusterer removeMarkers - add opt_nodraw

The removeMarkers method does not have the option to not redraw the cluster.
Please add "opt_nodraw" as second parameter and the 2 lines at the bottom:
    if (!opt_nodraw) {
        this.resetViewport();
        this.redraw();
    }


This helps improving performance if you have to remove an amount of specific 
markers and handle the redraw manually afterwards.

Thanks

Original issue reported on code.google.com by [email protected] on 30 Jul 2010 at 12:04

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

MarkerManager not adding markers back to map after map move

If you zoom in on a point so that the other points are removed from the DOM/map 
then move the map in any other method other than dragging (eg. InfoBubble), the 
map won't add the marker back to the map as it depends on 'dragend' and since 
the map was never dragged, the event doesn't fire.

Instead of using dragend and zoom_changed, I believe bounds_changed may be a 
better option as it covers off both of those and fixes the issue.

What steps will reproduce the problem?
1. Load markers to map via MarkerManager
2. Zoom in on a marker so that other markers are removed
3. Trigger an infobubble elsewhere on the map
4. Map will reposition, but marker will not be shown

Expected result:
Marker to be shown.

Actual result:
Marker wasn't shown.

Version: MarkerManager v3 1.0

Browser / Operating System:
Win 7, Safari/Chrome/IE/Firefox

Additional comments:
n/a

Original issue reported on code.google.com by [email protected] on 30 Sep 2010 at 10:33

too much recursion over 300 markers

this.clusterer.addMarkers(this.arrayMarkerClusterer);

this.arrayMarkerClusterer contains about 600 markers with click event attached 
(onclick simply opens a shared infowindow object).

The method works fine if the array contains no more than 300 markers, 
displaying clusters and markers when zoomed in, otherwise the browser get 
blocked with a too much recursion error.

Version: 1.0

Browser / Operating System:
[e.g. FF3 / Windows XP]

Original issue reported on code.google.com by [email protected] on 6 Jul 2010 at 7:38

InfoBubble, domready event

Hi there,

In my opinion the "domready" event is triggered in the wrong place. In order to 
keep consistency with InfoWindow, it should be triggered right after attaching 
the dom element to the pane, in onAdd method:

InfoBubble.prototype.onAdd = function() {

  // ...

  var panes = this.getPanes();
  if (panes) {
    panes.floatPane.appendChild(this.bubble_);
    panes.floatShadow.appendChild(this.bubbleShadow_);
    google.maps.event.trigger(this, 'domready');
  }
}

Original issue reported on code.google.com by [email protected] on 30 Sep 2010 at 3:23

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

MarkerClusterer.removeMarkers only removes one marker

var markers = [...];
markerCluster.removeMarkers(markers);


What steps will reproduce the problem?
1. Initialize a markerClusterer
2. Add some markers
3. Try to remove more than one by passing an array of markers to removeMarkers

Expected result:
All markers in the array should be removed from the markerClusterer

Actual result:
Only the first successfully removed marker is removed from the markerClusterer. 
The function is using the OR (||) operator to track the return value of 
removeMarker_, but the operator short-circuits after the first successful 
remove. Here's the line of code:

removed = removed || this.removeMarker_(marker);

Version: r207

Browser / Operating System:
Safari, Chrome / Mac OS X

Additional comments:


*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by [email protected] on 7 Oct 2010 at 12:05

Function clearMarkers break everything

When I call 
    markerCluster.clearMarkers();
    delete markerCluster;
        markerCluster = new MarkerClusterer(map, markers); 

After these actions master clusterer stops redrawing clusters. 

Could you, please, give me a right way to clear clusters, load new data and
show it (for google map v3).

Original issue reported on code.google.com by [email protected] on 2 Jun 2010 at 2:24

Attachments:

Not recognizing "bounds_changed" events

When using the nav menu to repeatedly pan in any direction, MarkerManager 
eventually stops rendering markers. The limit seems to be the default boundary. 
This may be caused by the change in event actions between API v2 and v3. The 
previous version used "moveend" but the current API requires "bounds_changed" 
for this activity.

Example map: http://ericchristenson.com/battletech/map_test.html

To reproduce the problem, zoom-in to the max level and then keep 
panning to the right using the nav button. Eventually the markers just 
end, as if there's a distance they will not pass.

Version: 1.0

Browser / Operating System:
FF 3.6.6 and Chrome 5.0 on both Windows Vista and Mac OS X Snow Leopard

The forum thread that lead to this issue submission can be found here: 
http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/ed9311
cd0cdd1723

Original issue reported on code.google.com by [email protected] on 8 Jul 2010 at 6:20

MarkerClusterer.getExtendedBounds not exposed in compiled js

Version: 3

Browser / Operating System: Any

Additional comments:

In the reference, 
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/d
ocs/reference.html, getExtendedBounds(bounds:google.maps.LatLngBounds) is 
documented as an exposed function.

However, it is not available in http://google-maps-utility-library-
v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js

Thanks for taking a look!

Original issue reported on code.google.com by [email protected] on 19 Aug 2010 at 9:04

IE9 opacity issue

Demo link or sample code:

Under InfoBox.prototype.setBoxStyle_, when this line is run under IE9:

___________
if (typeof this.div_.style.opacity !== "undefined") {
  this.div_.style.filter = "alpha(opacity=" + (this.div_.style.opacity * 100) + ")";
}
___________

it will set the opacity to zero and the infobox will not display.  

I was able to "correct" this by adding:

___________
&& navigator.appVersion != "5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; 
x64; Trident/5.0)"
___________

to the if statement in question.

Version: 1.0 and 1.1

Browser / Operating System:
Win 7 IE9 64 bit



Original issue reported on code.google.com by [email protected] on 27 Sep 2010 at 8:10

MarkerWithLabel - label remains clickable even when clickable is set to false

Repro

1. Set the 'clickable' option to 'false' for the provided MarkerWithLabelOption.
2. Note that the marker is no longer clickable but the label still is.

Expect

- The label is not clickable, and therefore the room that it occupies is still 
available for click-and-drag of the map itself.

Original issue reported on code.google.com by drewnoakes on 8 Oct 2010 at 2:37

MarkerClusterer dragging Markers performance

If you enable dragging on markers used with a MarkerClusterer, and you drag one 
marker, the full array is recalculated and the view refreshs.
This is fine with e.g. 20Markers, if you have 100+ Markers, this looks very 
wired because all markers disapear for a second and reapear... This slows down 
a lot if you have a lot more markers of cause...

Suggestion:
Make the redraw of markers after dragging optional (via opt_options) or remove 
this feature at all:
Line 411 af
if (marker['draggable']) {
...

thanks

Original issue reported on code.google.com by [email protected] on 30 Jul 2010 at 12:18

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

InfoBubble, closeclick

It would be great if InfoBubble triggered "closeclick" event when clicking on 
close link... for consistency with InfoWindow class.

InfoBubble.prototype.buildDom_ = function() {

  // ...  

  var that = this;
  google.maps.event.addDomListener(close, 'click', function() {
    that.close();
    google.maps.event.trigger(this, 'closeclick');
  });

  // ...

}

Original issue reported on code.google.com by [email protected] on 20 Sep 2010 at 11:45

MarkerCluster Example Bug

http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/e
xamples/advanced_example.html

What steps will reproduce the problem?
1. Zoom out one map level and notice the red cluster number amount (603) (above 
Europe)
2. Zoom out again and notice that same cluster diminish in amount.

Expected result:
When zooming out the amount in a cluster should increase, if nearby  
clusters/markers are no longer displayed.

Actual result:
The cluster over Europe seems to keep a current number amount up until the 
greatest zoom out level. Goes from 603 to 499.

Version: SVN Revision 203

Browser / Operating System:
Chrome 7.0.517.24, Win XP

*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by [email protected] on 5 Oct 2010 at 5:21

Unable to scroll inside InfoBox

If the content of the InfoBox overflows, you can't use the scrollbar to scroll 
down because it will drag the map instead.

Any ideas? 

Original issue reported on code.google.com by [email protected] on 2 Jul 2010 at 9:38

Using Zoom Control try zooming in after max zoom, Markers disappear.

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

What steps will reproduce the problem?
1. Zoom in to a any particular until you reach the maximum zoom.
2. Click on the Zoom In Control.
3. The marker disappears.

Expected result:
The marker should remain or the zoom event should be avoided after the map 
has reached the maximum zoom

Actual result:
The marker disappears.

Version: ###

Browser / Operating System:
FF3 / WIN

Cyril

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

Markercluster averageCenter bug [with solution]

What steps will reproduce the problem?
1. create a Markercluster with averageCenter

Expected result:
the cluster to have the average center of contained markers

Actual result:
random center

Version: 1.0

There is a bug in the way the average center is calculated. Eg. if the points 
have lat = [100, 140] the center has lat 80. If the points have lat = [140, 
100] the center has lat 120. The correct formula is:

var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;
var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;


Original issue reported on code.google.com by [email protected] on 26 Oct 2010 at 1:49

MarkerClusterer not functioning

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

What steps will reproduce the problem?
1. open the (official) demo link as provided above
2. javascript errors occur, on line 838 of markerclusterer.js

Expected result:
Clusters like in http://gmaps-samples-
v3.googlecode.com/svn/trunk/screenshots/markerclusterer.png

Actual result:
No clusters are shown at all.

Version: 1.0

Browser / Operating System:
IE8,FF3,Chrome4 / Windows XP,7

Additional comments:
In every browser tried, errors like "Uncaught
TypeError: Cannot call method 'fromLatLngToDivPixel' of undefined" are 
occuring, at line 
838 of markerclusterer.js. I hope somebody knows how to fix this.

Gerben

Original issue reported on code.google.com by gerben.meyer on 12 May 2010 at 11:44

Setting text anchor position with opt_anchor doesn't work

When trying to set the text position within the cluster markers, passing in 
positions using the opt_anchor property (see code below) does nothing; instead 
the dafult central position is always used.

var clusterStyles = [
{
    url: '/img/cluster1.png',
    width: 41,
    height: 60,
    opt_anchor: [2, 2]
},
{
    url: '/img/cluster2.png',
    width: 41,
    height: 60,
    opt_anchor: [2, 2]
},
{
    url: '/img/cluster3.png',
    width: 41,
    height: 60,
    opt_anchor: [2, 2]
}];

var clusterOptions = {
    gridSize: 40,
    maxZoom: 15,
    zoomOnClick: true,
    styles: clusterStyles
};

var clusterer = new MarkerClusterer(map, markers, clusterOptions);

This is because of a missing trailing underscore where the property is 
assigned, in markerclusterer.js at line 939:

this.anchor = style.opt_anchor;

Should be:

this.anchor_ = style.opt_anchor;



Version: 1.0

Browser / Operating System: All

Original issue reported on code.google.com by [email protected] on 14 Jun 2010 at 10:33

[KeyDragZoom] Fix for Javascript Exception in IE8

Demo link or sample code:
http://google-maps-utility-library-v3.googlecode.com/svn/tags/keydragzoom/2.0.2/
examples/visual.html

What steps will reproduce the problem?
1. Hold Shift key or click zoom icon
2. Single-click on map without dragging.

Expected result:
No action

Actual result:
Marking starts and Exception occurs. Map zooms to all the way in.

Version: 2.0.2 (Any)

Browser / Operating System:
IE8 / Windows 7

Additional comments:

In DragZoom.prototype.onMouseUp_

AFTER:
if (this.dragging_) {

BEFORE: 
var left = Math.min(this.startPt_.x, this.endPt_.x);

ADD:
if ((this.getMousePoint_(e).x == this.startPt_.x) && (this.getMousePoint_(e).y 
== this.startPt_.y)) {
    // Cancel event
    this.onKeyUp_(e);
    return;
}

Original issue reported on code.google.com by [email protected] on 11 Nov 2010 at 10:06

InfoBox acting weird

Demo link or sample code:
http://gmaps-samples-v3.googlecode.com/svn-history/r37/trunk/infowindow_custom/i
nfowindow-custom.html

What steps will reproduce the problem?
1. Clicking on map twice will require user to close twice

Expected result:
http://gmaps-samples-v3.googlecode.com/svn/trunk/single-infowindow/single-infowi
ndow.html

Additional comments:
I have searched everywhere for samples on how to close infobox when you click 
outside of the box but can't find it. Also when I click on the marker it builds 
up more and more boxes which cant be closed in 1 click.

Any way to get the InfoBox to behave like the expected result but with the 
possibility to customize the box like the first sample has.


Original issue reported on code.google.com by [email protected] on 21 Jul 2010 at 1:51

InfoBubble, open method

InfoBubble.prototype.open = function(opt_map, opt_anchor) {
  if (opt_map) {
    this.setMap(map); // <-- should be opt_map
  }

  // ...

}

Original issue reported on code.google.com by [email protected] on 20 Sep 2010 at 9:39

InfoBubble extending OverlayView

I'd be great if this class extended OverlayView in the constructor like 
MarkerClusterer does, since it might not be available when this one is included 
(google map might be included dynamically later on)

function InfoBubble(opt_options) {
  this.extend(InfoBubble, google.maps.OverlayView);

  // ...

}

Original issue reported on code.google.com by [email protected] on 20 Sep 2010 at 11:52

markerclusterer.js: getTotalMarkers incorrect (copy/paste error :) )

getTotalMarkers just returns the array of markers, as oppossed to the array 
length
Seems a copy/paste of getMarkers

/**
 *  Returns the array of markers in the clusterer.
 *
 *  @return {Array.<google.maps.Marker>} The number of markers.
 */
MarkerClusterer.prototype.getTotalMarkers = function() {
  return this.markers_;
};

Original issue reported on code.google.com by [email protected] on 13 Jul 2010 at 3:05

Accessible links to reference / example docs on project front page

For some reason it is hard to find the direct links to the documentation for 
the different libraries. (Something that people probably are looking for when 
hitting the project page)

It would be nice if the front page included links to the library docs (and the 
library page should probably have them as well).


Original issue reported on code.google.com by [email protected] on 8 Jun 2010 at 6:51

MarkerClusterer removeMarkers Line453 break>continue

The removeMarker method looks like this.

MarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {
...
        for (var i = 0, m; m = this.markers_[i]; i++) {
            if (m == marker) {
                index = i;
                continue
            }
        }
...

this is iterating all markers instead breaking the look after the index has 
been found. Replace "continue" with "break;"

Original issue reported on code.google.com by [email protected] on 30 Jul 2010 at 12:02

labelAnchor Y-value moves label in wrong direction

Demo link or sample code:
var mapArrowheadLabelAnchor = new google.maps.Point(0, 20);
function CreateArrowheadMarker(theLatLong, pathArrow, tooltip, labelText, 
theMap)
{
    var markerOpts = { title: tooltip, position: theLatLong, icon: new google.maps.MarkerImage(pathArrow, null, null, mapArrowheadAnchor, null), labelContent: labelText, labelClass: "MapArrowText", labelAnchor: mapArrowheadLabelAnchor };
    return CreateMapMarkerWithLabel(markerOpts);
}


Note that you can pretty use anything for the Y value. Docs state:

"(Note: x-values increase to the right and y-values increase to the bottom.)"

But increasing Y values move the label ABOVE the marker, not below it.

What steps will reproduce the problem?
1. Create a small marker with label.
2. Use labelAnchor to put the label well "below" the marker, per docs.
3. Note the position of the label.

Expected result:
Expected higher values for Y to position label increasingly below the marker.

Actual result:
Moved label above.

Version: hard to say. Source has this comment:

@version 1.0.1 [September 17, 2010]

But according to change log, version of that date would be 202.

Please correct source comment.

NOTE: At this point, anybody who's implemented a labelAnchor probably has 
already "corrected" their code to work with the inverted label meaning. Perhaps 
it would be best to update just the docs, so as not to introduce a breaking 
change.

Browser / Operating System:
[e.g. FF3 / MacOSX]

Additional comments:
[Enter any additional comments about the bug here.]


*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by [email protected] on 11 Oct 2010 at 10:14

MarkerClusterer: zoomOnClick not working on iPhone (and Android?)

Demo link or sample code:
http://palmdrive.net/temp/marker/

What steps will reproduce the problem?
1. Create a simple sample for MarkerClusterer (I took the site's example)
2. Add a line to disable zooming on iPhone: <meta name="viewport" 
content="initial-scale=1.0, user-scalable=no"> 

Expected result:
Clicking on a clustered marker should zoom in

Actual result:
The marker is centered on the page, but no zoom happens

Version:  
 * @name MarkerClusterer for Google Maps v3
 * @version version 1.0

Browser / Operating System:
[Safari on iPhone]

Additional comments:


*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by [email protected] on 24 Oct 2010 at 10:02

Map must be reset before each refresh

This bug is visible in the advanced example here:
http://google-maps-utility-library-
v3.googlecode.com/svn/trunk/markerclusterer/examples/advanced_example.html?

To reproduce the problem:
1. go to the advanced example
2. click on a cluster or zoom in/out
3. then click on the "Refresh Map" button
4. retry clicking on a cluster or zooming in/out


Expected result:
When clicking on a cluster after refreshing the map, you would expect the 
markers to be 
regrouped after the map zooms in.

Actual result:
The clusters remain the same, such that even if you zoom out all the way, you 
would see multiple 
clusters layered on top of each other.

I've found that one way of working around this is to simply reset the map 
before each request. 
For example, you might add the following code at the beginning of the 
refreshMap() function:

map = new google.maps.Map(document.getElementById('map'), {
    zoom: 2,
    center: new google.maps.LatLng(39.91, 116.38),
    mapTypeId: google.maps.MapTypeId.ROADMAP
});




Version: Trunk

Browser / Operating System:
FF3 and Chrome 5 on OS X

Original issue reported on code.google.com by [email protected] on 3 Jun 2010 at 11:36

*Clicking on cluster to expand not all the markers/clusters appear. Need to increase zoom level of the map.

Demo link or sample code:
http://jim.hollenback.org/SandBox/V3/TestWorld.html

My relevant markerClusterer code is:
            markerClusterer =  new MarkerClusterer(map, markers,  {
                gridSize: 50,
                maxZoom: 12, 
                styles: [0]
                }               
            );


What steps will reproduce the problem?
1. Run example code. Click on the cluster with 266 that is by San Jose. 
2. Click on the cluster with 253 by San Jose.
3. Click on on the cluster with 13 by Joesph D. Grant Park.  

Expected result:
I expected to see a marker or two that are located in this park and probably 
additional clusters with smaller counts.

Actual result:
One marker and no clusters. If I have counted right this is zoom level 12. If I 
click the + on the zoom control once all markers appear, again if I have 
counted right this is zoom level 13. 

Version: r114

Browser / Operating System:
[FF 3.6.3 Win7 64-bit]

Additional comments:
[Enter any additional comments about the bug here.]


*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by [email protected] on 12 Jun 2010 at 4:27

MarkerManager uses non-existing .getLatLng() method

It seems like Marker.getLatLng() was removed from the google maps API and 
replaced by Marker.getPosition().

On markermanager.js line 451 the ".getLatLng()" calls should be replaced by 
".getPosition()" and then everything seems to work with the most recent google 
maps version.

It would be nice to get this one fixed quickly so we can move away from a local 
copy of markermanager.js

Original issue reported on code.google.com by [email protected] on 8 Jun 2010 at 6:46

Map must be reset before each refresh in MarkerClusterer

This bug is visible in the advanced example here:
http://google-maps-utility-library-
v3.googlecode.com/svn/trunk/markerclusterer/examples/advanced_example.html?

To reproduce the problem:
1. go to the advanced example
2. click on a cluster or zoom in/out
3. then click on the "Refresh Map" button
4. retry clicking on a cluster or zooming in/out


Expected result:
When clicking on a cluster after refreshing the map, you would expect the 
markers to be 
regrouped after the map zooms in.

Actual result:
The clusters remain the same, such that even if you zoom out all the way, you 
would see multiple 
clusters layered on top of each other.

I've found that one way of working around this is to simply reset the map 
before each request. 
For example, you might add the following code at the beginning of the 
refreshMap() function:

map = new google.maps.Map(document.getElementById('map'), {
    zoom: 2,
    center: new google.maps.LatLng(39.91, 116.38),
    mapTypeId: google.maps.MapTypeId.ROADMAP
});




Version: Trunk

Browser / Operating System:
FF3 and Chrome 5 on OS X

Original issue reported on code.google.com by [email protected] on 3 Jun 2010 at 11:36

Attachments:

style option anchor doesn't work because of a typo

At the moment, the "anchor" style option is ignored because of a missing 
underscore.

Line 1036 is:
  this.anchor = style['anchor'];

Should be:
  this.anchor_ = style['anchor'];

Additionally, some examples in the svn repository use opt_anchor instead 
anchor, which of course doesn't work at all.

Original issue reported on code.google.com by [email protected] on 14 Sep 2010 at 9:03

  • Merged into: #17

bug in MarkerClusterer breaks multiple clusterers sharing a single map

Demo link or sample code:
http://intwoplacesatonce.com/marker_clusterer/markerclusterer/examples/example_t
wo_cluster
ers.html

What steps will reproduce the problem?
1. Create an app which uses more than one MarkerClusterer on a single map. 
Navigate to the app.
2. Zoom in on a cluster repeatedly by clicking on it.
3.

Expected result:
No matter which Clusterer owns the cluster being zoomed in to, the cluster 
should break up in to 
smaller clusters as the map zooms in.

Actual result:
Only clusters owned by the "first" clusterer break in to smaller clusters.

Version: svn rev 110

Browser / Operating System:
Chrome / Mac OS X

Additional comments:
Fix for the bug is to correct 'zoom_changed' handler added in MarkerClusterer's 
constructor. 'this' 
is used where 'that' should be used. prevZoom_ ends up being stored on the Map 
object itself. On 
the second and subsequent MarkerClusterers to have their zoom_changed handler 
called, 
prevZoom_ is not != that.map_.getZoom() and the code doesn't run.

Current code:
  google.maps.event.addListener(this.map_, 'zoom_changed', function() {
    if (this.prevZoom_ != that.map_.getZoom()) {
      this.prevZoom_ = that.map_.getZoom();
      that.resetViewport();
    }
  });

Minimal fix:
  google.maps.event.addListener(this.map_, 'zoom_changed', function() {
    if (that.prevZoom_ != that.map_.getZoom()) {
      that.prevZoom_ = that.map_.getZoom();
      that.resetViewport();
    }
  });

Fix with a possibly stylistically broken attempt at clarifying what is going on:
  var clusterer = this;
  google.maps.event.addListener(this.map_, 'zoom_changed', function() {
    var map = this;
    if (clusterer.prevZoom_ != map.getZoom()) {
      clusterer.prevZoom_ = map.getZoom();
      clusterer.resetViewport();
    }
  });

Original issue reported on code.google.com by dave.bc on 16 May 2010 at 5:47

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

make MarkerManager.prototype.updateMarkers_ just a little bit more efficient

class-MarkerManager

It would be nice to have the markermanager not refresh the markers on the map 
if its not needed.

For example, if the 'zoomgroup' has not changed and the new zoom/bounds are 
within the previous one then there is no point in refreshing.

I've got a map with around 300 markers (3 diff zoom ranges, so 3*300) and in a 
browser like firefox you can see the refresh every time (markers being readded 
I guess)

Something like

if (this.myBounds.contains(newBounds.getNorthEast()) && 
this.myBounds.contains(newBounds.getSouthWest()) && newzoomgroup == 
this.zoomgroup)
return;

and for zooming out

if ((!this.myBounds.contains(newBounds.getNorthEast()) || 
!this.myBounds.contains(newBounds.getSouthWest())) && newzoomgroup == 
this.zoomgroup && newBounds.z <= this.shownBounds_.z )
return;

(zoomgroup is an array of min,max created by addmarkers)

Additional comments:

For some reason the markermanager v3 is a lot slower than v2. I've used v2 a 
lot (great lib!) and never had such obvious refresh 'issues' before. But since 
google maps v3 is a lot nicer to work with I had to upgrade, and thus ended up 
with markermanager v3.

And as a side note, grouping of the markers is not an option :)

Original issue reported on code.google.com by [email protected] on 20 Jul 2010 at 10:29

zIndex on add has a typo for RichMarker

if you create a new RichMarker and use the format:

new RichMarker({
            position: LatLng,
            map: map,
            zIndex: 200,
            content: "<b>hello</b>"
          });

Current implementation will throw an error on not finding the getZindex method.

Change Line 703 to:

this.markerWrapper_.style['zIndex'] = this.getZIndex();

And it works fine

Cheers
AndrewF

Original issue reported on code.google.com by [email protected] on 15 Aug 2010 at 12:46

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.