Index: branches/Maps0.8/includes/services/OpenLayers/jquery.openlayers.js |
— | — | @@ -152,29 +152,21 @@ |
153 | 153 | var marker; |
154 | 154 | |
155 | 155 | if ( markerData.icon != "" ) { |
156 | | - marker = new OpenLayers.Marker(markerData.lonlat, new OpenLayers.Icon(markerData.icon)); |
| 156 | + marker = new OpenLayers.Marker( markerData.lonlat, new OpenLayers.Icon( markerData.icon ) ); |
157 | 157 | } else { |
158 | | - marker = new OpenLayers.Marker(markerData.lonlat); |
| 158 | + marker = new OpenLayers.Marker( markerData.lonlat ); |
159 | 159 | } |
160 | 160 | |
161 | | - if ( markerData.text != '' || markerData.title != '' ) { |
| 161 | + if ( markerData.text != '' ) { |
162 | 162 | // This is the handler for the mousedown event on the marker, and displays the popup. |
163 | 163 | marker.events.register('mousedown', marker, |
164 | | - function(evt) { |
165 | | - var popup = new OpenLayers.Feature(markerLayer, markerData.lonlat).createPopup(true); |
166 | | - |
167 | | - if ( markerData.title != '' && markerData.text != '' ) { // Add the title and text to the popup text. |
168 | | - popup.setContentHTML('<b>' + markerData.title + '</b><hr />' + markerData.text); |
169 | | - } |
170 | | - else { |
171 | | - popup.setContentHTML(markerData.title + markerData.text); |
172 | | - } |
173 | | - |
174 | | - markerLayer.map.addPopup(popup); |
175 | | - OpenLayers.Event.stop(evt); // Stop the event. |
| 164 | + function( evt ) { |
| 165 | + var popup = new OpenLayers.Feature( markerLayer, markerData.lonlat ).createPopup( true ); |
| 166 | + popup.setContentHTML( markerData.text ); |
| 167 | + markerLayer.map.addPopup( popup ); |
| 168 | + OpenLayers.Event.stop( evt ); // Stop the event. |
176 | 169 | } |
177 | 170 | ); |
178 | | - |
179 | 171 | } |
180 | 172 | |
181 | 173 | return marker; |
Index: branches/Maps0.8/includes/manipulations/Maps_ParamZoom.php |
— | — | @@ -29,10 +29,10 @@ |
30 | 30 | */ |
31 | 31 | public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
32 | 32 | // If there are multiple points and the value was not provided or incorrect (=defaulted), |
33 | | - // set it to 'null', so the mapping service can figure out the optimal value. |
| 33 | + // set it to false, so the mapping service can figure out the optimal value. |
34 | 34 | if ( $parameter->wasSetToDefault() && count( $parameters['coordinates']->getValue() ) > 1 ) { |
35 | 35 | $value = false; |
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | | -} |
\ No newline at end of file |
| 39 | +} |
Index: branches/Maps0.8/includes/features/Maps_BasePointMap.php |
— | — | @@ -154,9 +154,13 @@ |
155 | 155 | if ( $location->isValid() ) { |
156 | 156 | $jsonObj = $location->getJSONObject( $params['title'], $params['label'], $iconUrl ); |
157 | 157 | |
158 | | - $jsonObj['title'] = strip_tags( $parser->parse( $jsonObj['title'], $wgTitle, new ParserOptions() )->getText() ); |
| 158 | + $jsonObj['title'] = $parser->parse( $jsonObj['title'], $wgTitle, new ParserOptions() )->getText(); |
159 | 159 | $jsonObj['text'] = $parser->parse( $jsonObj['text'], $wgTitle, new ParserOptions() )->getText(); |
160 | 160 | |
| 161 | + $hasTitleAndtext = $jsonObj['title'] != '' && $jsonObj['text'] != ''; |
| 162 | + $jsonObj['text'] = ( $hasTitleAndtext ? '<b>' . $jsonObj['title'] . '</b><hr />' : $jsonObj['title'] ) . $jsonObj['text']; |
| 163 | + $jsonObj['title'] = strip_tags( $jsonObj['title'] ); |
| 164 | + |
161 | 165 | $params['locations'][] = $jsonObj; |
162 | 166 | } |
163 | 167 | } |