Netbrain has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87040
Change subject: Fixed special case when searchbox is enabled. There is a
special case when the searchbox is enabled where one can have markers and other
map objects beneath the search input box.
......................................................................
Fixed special case when searchbox is enabled.
There is a special case when the searchbox is enabled where one can have
markers and other map objects beneath the search input box.
This decreases usability.
However by panning the map -30 pixels on the y axis before the map is loaded,
this prevents that. And it also seems to prevent other map opbjects to be
pushed outside the map if they were within the 30px range which was panned out
of the map. This is probably due to the event type used when issuing the panBy
method. As it probably kicks in before the map calculates its own zoom and
center based on the bounding box.
Change-Id: I90fb6973298432631ee4de0e9f4ffb24742a6842
---
M includes/services/GoogleMaps3/jquery.googlemap.js
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Maps
refs/changes/40/87040/1
diff --git a/includes/services/GoogleMaps3/jquery.googlemap.js
b/includes/services/GoogleMaps3/jquery.googlemap.js
index c90b9a1..4715858 100644
--- a/includes/services/GoogleMaps3/jquery.googlemap.js
+++ b/includes/services/GoogleMaps3/jquery.googlemap.js
@@ -680,6 +680,12 @@
searchBox.appendTo(searchContainer);
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(searchContainer);
+ //prevents markers and other map objects to be
placed beneath searchfield
+ google.maps.event.addListenerOnce(map,
'bounds_changed', function () {
+ map.panBy(0,-30);
+ });
+
+
searchBox.on('keyup',function (e) {
for (var i = 0; i <
_this.markers.length; i++) {
var haystack = '';
--
To view, visit https://gerrit.wikimedia.org/r/87040
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90fb6973298432631ee4de0e9f4ffb24742a6842
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Maps
Gerrit-Branch: master
Gerrit-Owner: Netbrain <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits