r65780 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65779‎ | r65780 | r65781 >
Date:04:09, 2 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Applied solution of AlHooton for correct marker sizes to Yahoo! Maps
Modified paths:
  • /trunk/extensions/Maps/Services/YahooMaps/YahooMapFunctions.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Services/YahooMaps/YahooMapFunctions.js
@@ -15,10 +15,13 @@
1616 function createYMarker(geoPoint, title, label, icon){
1717 var newMarker;
1818
19 - if (icon != '') {
20 - newMarker = new YMarker(geoPoint, new YImage(icon));
 19+ if ( icon != '' ) {
 20+ /* Determine size of icon and pass it in */
 21+ var newimg = new Image();
 22+ newimg.src = icon;
 23+ newMarker = new YMarker( geoPoint, new YImage( icon, new YSize( newimg.width, newimg.height ) ) );
2124 } else {
22 - newMarker = new YMarker(geoPoint);
 25+ newMarker = new YMarker( geoPoint );
2326 }
2427
2528 if ((title + label).length > 0) {

Status & tagging log