prasy8 / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
0 stars 0 forks source link

labelAnchor Y-value moves label in wrong direction #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 StickPla...@gmail.com on 11 Oct 2010 at 10:14

GoogleCodeExporter commented 9 years ago
A change has now been made to the documentation. Positive y-values are indeed 
intended to move the label higher.

Fixed in the MarkerWithLabel trunk (v1.1).

Original comment by garylitt...@gmail.com on 7 Dec 2010 at 8:18

GoogleCodeExporter commented 9 years ago
Fixed in tagged release 1.1

Original comment by garylitt...@gmail.com on 12 Dec 2010 at 6:32