Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsQP.php |
— | — | @@ -53,9 +53,6 @@ |
54 | 54 | $this->type = MapsYahooMapsUtils::getYMapType($this->type, true); |
55 | 55 | $this->controls = MapsYahooMapsUtils::createControlsString($this->controls); |
56 | 56 | |
57 | | - MapsUtils::makePxValue($this->width); |
58 | | - MapsUtils::makePxValue($this->height); |
59 | | - |
60 | 57 | $this->autozoom = MapsYahooMapsUtils::getAutozoomJSValue($this->autozoom); |
61 | 58 | |
62 | 59 | $markerItems = array(); |
— | — | @@ -77,10 +74,10 @@ |
78 | 75 | $typesString = MapsYahooMapsUtils::createTypesString($this->types); |
79 | 76 | |
80 | 77 | $this->output .= " |
81 | | - <div id='$this->mapName' style='width: $this->width; height: $this->height;'></div> |
| 78 | + <div id='$this->mapName' style='width: {$this->width}px; height: {$this->height}px;'></div> |
82 | 79 | |
83 | 80 | <script type='$wgJsMimeType'>/*<![CDATA[*/ |
84 | | - addLoadEvent( |
| 81 | + addOnloadHook( |
85 | 82 | initializeYahooMap('$this->mapName', $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, [$markersString]) |
86 | 83 | ); |
87 | 84 | /*]]>*/</script>"; |
Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php |
— | — | @@ -77,18 +77,15 @@ |
78 | 78 | |
79 | 79 | $controlItems = MapsYahooMapsUtils::createControlsString($this->controls); |
80 | 80 | |
81 | | - MapsUtils::makePxValue($this->width); |
82 | | - MapsUtils::makePxValue($this->height); |
83 | | - |
84 | 81 | $this->types = explode(",", $this->types); |
85 | 82 | |
86 | 83 | $typesString = MapsYahooMapsUtils::createTypesString($this->types); |
87 | 84 | |
88 | 85 | $this->output .=" |
89 | | - <div id='".$this->mapName."' style='width: $this->width; height: $this->height;'></div> |
| 86 | + <div id='".$this->mapName."' style='width: {$this->width}px; height: {$this->height}px;'></div> |
90 | 87 | |
91 | 88 | <script type='$wgJsMimeType'>/*<![CDATA[*/ |
92 | | - addLoadEvent(makeFormInputYahooMap('$this->mapName', '$this->coordsFieldName', $this->centre_lat, $this->centre_lon, $this->zoom, $type, [$typesString], [$controlItems], $this->autozoom, $this->marker_lat, $this->centre_lon)); |
| 89 | + addOnloadHook(makeFormInputYahooMap('$this->mapName', '$this->coordsFieldName', $this->centre_lat, $this->centre_lon, $this->zoom, $type, [$typesString], [$controlItems], $this->autozoom, $this->marker_lat, $this->centre_lon)); |
93 | 90 | /*]]>*/</script>"; |
94 | 91 | }
|
95 | 92 |
|
Index: trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersQP.php |
— | — | @@ -54,9 +54,6 @@ |
55 | 55 | |
56 | 56 | MapsMapper::enforceArrayValues($this->layers); |
57 | 57 | $layerItems = MapsOpenLayersUtils::createLayersStringAndLoadDependencies($this->output, $this->layers); |
58 | | - |
59 | | - MapsUtils::makePxValue($this->width); |
60 | | - MapsUtils::makePxValue($this->height); |
61 | 58 | |
62 | 59 | $markerItems = array(); |
63 | 60 | |
— | — | @@ -72,9 +69,9 @@ |
73 | 70 | |
74 | 71 | $markersString = implode(',', $markerItems); |
75 | 72 | |
76 | | - $this->output .= "<div id='$this->mapName' style='width: $this->width; height: $this->height; background-color: #cccccc;'></div> |
| 73 | + $this->output .= "<div id='$this->mapName' style='width: {$this->width}px; height: {$this->height}px; background-color: #cccccc;'></div> |
77 | 74 | <script type='$wgJsMimeType'> /*<![CDATA[*/ |
78 | | - addLoadEvent( |
| 75 | + addOnloadHook( |
79 | 76 | initOpenLayer('$this->mapName', $this->centre_lon, $this->centre_lat, $this->zoom, [$layerItems], [$controlItems], [$markersString]) |
80 | 77 | ); |
81 | 78 | /*]]>*/ </script>"; |
Index: trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFormInput.php |
— | — | @@ -75,14 +75,11 @@ |
76 | 76 | |
77 | 77 | $layerItems = MapsOpenLayersUtils::createLayersStringAndLoadDependencies($this->output, $this->layers); |
78 | 78 | |
79 | | - $width = $this->width . 'px'; |
80 | | - $height = $this->height . 'px'; |
81 | | - |
82 | 79 | $this->output .=" |
83 | | - <div id='".$this->mapName."' style='width: $width; height: $height; background-color: #cccccc;'></div> |
| 80 | + <div id='".$this->mapName."' style='width: {$this->width}px; height: {$this->height}px; background-color: #cccccc;'></div> |
84 | 81 | |
85 | 82 | <script type='$wgJsMimeType'>/*<![CDATA[*/ |
86 | | - addLoadEvent(makeFormInputOpenLayer('".$this->mapName."', '".$this->coordsFieldName."', ".$this->centre_lat.", ".$this->centre_lon.", ".$this->zoom.", ".$this->marker_lat.", ".$this->marker_lon.", [$layerItems], [$controlItems])); |
| 83 | + addOnloadHook(makeFormInputOpenLayer('".$this->mapName."', '".$this->coordsFieldName."', ".$this->centre_lat.", ".$this->centre_lon.", ".$this->zoom.", ".$this->marker_lat.", ".$this->marker_lon.", [$layerItems], [$controlItems])); |
87 | 84 | /*]]>*/</script>";
|
88 | 85 | } |
89 | 86 | |
Index: trunk/extensions/SemanticMaps/SemanticMaps.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | die( 'Not an entry point.' ); |
25 | 25 | } |
26 | 26 | |
27 | | -define('SM_VERSION', '0.4 a8'); |
| 27 | +define('SM_VERSION', '0.4 a9'); |
28 | 28 | |
29 | 29 | $smgScriptPath = $wgScriptPath . '/extensions/SemanticMaps'; |
30 | 30 | $smgIP = $IP . '/extensions/SemanticMaps'; |
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | $this->output .= <<<END |
88 | 88 | <div id="$this->mapName" class="$this->class" style="$this->style" ></div> |
89 | 89 | <script type="$wgJsMimeType"> /*<![CDATA[*/ |
90 | | -addLoadEvent( |
| 90 | +addOnloadHook( |
91 | 91 | initializeGoogleMap('$this->mapName', $this->width, $this->height, $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, [$markersString]) |
92 | 92 | ); |
93 | 93 | /*]]>*/ </script> |
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | <div id='".$this->mapName."' class='".$this->class."'></div> |
91 | 91 | |
92 | 92 | <script type='$wgJsMimeType'>/*<![CDATA[*/ |
93 | | - addLoadEvent(makeFormInputGoogleMap('$this->mapName', '$this->coordsFieldName', $this->width, $this->height, $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, $this->marker_lat, $this->marker_lon)); |
| 93 | + addOnloadHook(makeFormInputGoogleMap('$this->mapName', '$this->coordsFieldName', $this->width, $this->height, $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, $this->marker_lat, $this->marker_lon)); |
94 | 94 | window.unload = GUnload; |
95 | 95 | /*]]>*/</script>"; |
96 | 96 | } |