src/pyams_gis/resources/js/pyams_gis.js
changeset 82 5d36f450143b
parent 79 c038be682567
child 84 e85d04d8a62e
equal deleted inserted replaced
81:c28955aee625 82:5d36f450143b
   257 					var clickMarker = function(e) {
   257 					var clickMarker = function(e) {
   258 						window.location.href = this.options.clickURL;
   258 						window.location.href = this.options.clickURL;
   259 					}
   259 					}
   260 					// show tooltip
   260 					// show tooltip
   261 					var hoverMarker = function(e) {
   261 					var hoverMarker = function(e) {
       
   262 						var icon = this.getIcon(),
       
   263 							tooltip = this.getTooltip(),
       
   264 							position = e.containerPoint.y,
       
   265 							height = $(this.getPane()).parents('.map').height();
       
   266 						if (position < height / 2) {
       
   267 							tooltip.options.direction = 'bottom';
       
   268 							tooltip.options.offset = [0, 0]
       
   269 						} else {
       
   270 							tooltip.options.direction = 'top';
       
   271 							tooltip.options.offset = [0, -icon.options.iconSize[1]]
       
   272 						}
   262 						this.openTooltip();
   273 						this.openTooltip();
   263 					}
   274 					}
   264 					// hide tooltip
   275 					// hide tooltip
   265 					var leaveMarker = function(e) {
   276 					var leaveMarker = function(e) {
   266 						this.closeTooltip();
   277 						this.closeTooltip();