Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php |
— | — | @@ -16,10 +16,10 @@ |
17 | 17 | final class SMYahooMapsFormInput extends SMFormInput {
|
18 | 18 |
|
19 | 19 | /** |
20 | | - * @see SMFormInput::setFormInputSettings() |
| 20 | + * @see MapsMapFeature::setMapSettings() |
21 | 21 | * |
22 | 22 | */ |
23 | | - protected function setFormInputSettings() { |
| 23 | + protected function setMapSettings() { |
24 | 24 | global $egMapsYahooMapsZoom; |
25 | 25 | |
26 | 26 | $this->elementNamePrefix = 'map_yahoo'; |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | | - * @see SMFormInput::doMapServiceLoad() |
| 34 | + * @see MapsMapFeature::doMapServiceLoad() |
35 | 35 | * |
36 | 36 | */ |
37 | 37 | protected function doMapServiceLoad() { |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | |
40 | 40 | if (empty($egYahooMapsOnThisPage)) { |
41 | 41 | $egYahooMapsOnThisPage = 0; |
42 | | - MapsYahooMaps::addYMapDependencies($this->formOutput); |
| 42 | + MapsYahooMaps::addYMapDependencies($this->output); |
43 | 43 | } |
44 | 44 | $egYahooMapsOnThisPage++; |
45 | 45 | |
— | — | @@ -46,10 +46,10 @@ |
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | | - * @see SMFormInput::addSpecificFormInputHTML() |
| 50 | + * @see MapsMapFeature::addSpecificMapHTML() |
51 | 51 | * |
52 | 52 | */ |
53 | | - protected function addSpecificFormInputHTML() { |
| 53 | + protected function addSpecificMapHTML() { |
54 | 54 | global $wgJsMimeType; |
55 | 55 | |
56 | 56 | $type = MapsYahooMaps::getYMapType($this->type); |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | $width = $this->width . 'px'; |
61 | 61 | $height = $this->height . 'px'; |
62 | 62 | |
63 | | - $this->formOutput .=" |
| 63 | + $this->output .=" |
64 | 64 | <div id='".$this->mapName."' style='width: $width; height: $height;'></div> |
65 | 65 | |
66 | 66 | <script type='$wgJsMimeType'>/*<![CDATA[*/ |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | protected function manageGeocoding() { |
76 | 76 | global $egYahooMapsKey; |
77 | 77 | $this->enableGeocoding = strlen(trim($egYahooMapsKey)) > 0; |
78 | | - if ($this->enableGeocoding) MapsYahooMaps::addYMapDependencies($this->formOutput);
|
| 78 | + if ($this->enableGeocoding) MapsYahooMaps::addYMapDependencies($this->output);
|
79 | 79 | } |
80 | 80 |
|
81 | 81 | |
Index: trunk/extensions/SemanticMaps/OpenLayers/SM_OpenLayersFormInput.php |
— | — | @@ -16,10 +16,10 @@ |
17 | 17 | final class SMOpenLayersFormInput extends SMFormInput {
|
18 | 18 | |
19 | 19 | /** |
20 | | - * @see SMFormInput::setFormInputSettings() |
| 20 | + * @see MapsMapFeature::setMapSettings() |
21 | 21 | * |
22 | 22 | */ |
23 | | - protected function setFormInputSettings() { |
| 23 | + protected function setMapSettings() { |
24 | 24 | global $egMapsOpenLayersZoom; |
25 | 25 | |
26 | 26 | $this->elementNamePrefix = 'open_layer'; |
— | — | @@ -30,33 +30,33 @@ |
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | | - * @see SMFormInput::doMapServiceLoad() |
| 34 | + * @see MapsMapFeature::doMapServiceLoad() |
35 | 35 | * |
36 | 36 | */ |
37 | 37 | protected function doMapServiceLoad() { |
38 | 38 | global $egOpenLayersOnThisPage; |
39 | 39 | |
40 | | - MapsOpenLayers::addOLDependencies($this->formOutput); |
| 40 | + MapsOpenLayers::addOLDependencies($this->output); |
41 | 41 | $egOpenLayersOnThisPage++; |
42 | 42 | |
43 | 43 | $this->elementNr = $egOpenLayersOnThisPage; |
44 | 44 | } |
45 | 45 |
|
46 | 46 | /** |
47 | | - * @see SMFormInput::addSpecificFormInputHTML() |
| 47 | + * @see MapsMapFeature::addSpecificMapHTML() |
48 | 48 | * |
49 | 49 | */
|
50 | | - protected function addSpecificFormInputHTML() { |
| 50 | + protected function addSpecificMapHTML() { |
51 | 51 | global $wgJsMimeType; |
52 | 52 | |
53 | 53 | $controlItems = MapsOpenLayers::createControlsString($this->controls); |
54 | 54 | |
55 | | - $layerItems = MapsOpenLayers::createLayersStringAndLoadDependencies($this->formOutput, $this->layers); |
| 55 | + $layerItems = MapsOpenLayers::createLayersStringAndLoadDependencies($this->output, $this->layers); |
56 | 56 | |
57 | 57 | $width = $this->width . 'px'; |
58 | 58 | $height = $this->height . 'px'; |
59 | 59 | |
60 | | - $this->formOutput .=" |
| 60 | + $this->output .=" |
61 | 61 | <div id='".$this->mapName."' style='width: $width; height: $height; background-color: #cccccc;'></div> |
62 | 62 | |
63 | 63 | <script type='$wgJsMimeType'>/*<![CDATA[*/ |
Index: trunk/extensions/SemanticMaps/SM_FormInput.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | abstract class SMFormInput extends MapsMapFeature { |
18 | 18 | |
19 | 19 | /** |
20 | | - * Detrmine if geocoding will be enabled and load the required dependencies. |
| 20 | + * Determine if geocoding will be enabled and load the required dependencies. |
21 | 21 | */ |
22 | 22 | protected abstract function manageGeocoding(); |
23 | 23 | |
— | — | @@ -31,6 +31,8 @@ |
32 | 32 | |
33 | 33 | private $startingCoords =''; |
34 | 34 | |
| 35 | + private $coordinates; |
| 36 | + |
35 | 37 | /** |
36 | 38 | * This function is a hook for Semantic Forms, and returns the HTML needed in |
37 | 39 | * the form to handle coordinate data. |
— | — | @@ -42,7 +44,7 @@ |
43 | 45 | |
44 | 46 | $this->manageGeocoding(); |
45 | 47 | |
46 | | - $this->setFormInputSettings(); |
| 48 | + $this->setMapSettings(); |
47 | 49 | |
48 | 50 | $this->doMapServiceLoad(); |
49 | 51 | |
— | — | @@ -61,7 +63,7 @@ |
62 | 64 | $this->infoFieldName = $this->elementNamePrefix.'_info_'.$this->elementNr; |
63 | 65 | |
64 | 66 | // Create the non specific form HTML |
65 | | - $this->formOutput .= " |
| 67 | + $this->output .= " |
66 | 68 | <input id='".$this->coordsFieldName."' name='$input_name' type='text' value='$this->startingCoords' size='40' tabindex='$sfgTabIndex'> |
67 | 69 | <span id='".$this->infoFieldName."' class='error_message'></span>"; |
68 | 70 | |
— | — | @@ -75,16 +77,16 @@ |
76 | 78 | $not_found_text = wfMsg('semanticmaps_notfound'); |
77 | 79 | |
78 | 80 | $adress_field = smfGetDynamicInput($this->geocodeFieldName, $enter_address_here_text, 'size="30" name="geocode" style="color: #707070" tabindex="'.$sfgTabIndex.'"'); |
79 | | - $this->formOutput .= " |
| 81 | + $this->output .= " |
80 | 82 | <p> |
81 | 83 | $adress_field |
82 | 84 | <input type='submit' onClick=\"$this->showAddresFunction(document.forms['createbox'].$this->geocodeFieldName.value, '$this->mapName', '$this->coordsFieldName', '$not_found_text'); return false\" value='$lookup_coordinates_text' /> |
83 | 85 | </p>"; |
84 | 86 | } |
85 | 87 | |
86 | | - $this->addSpecificFormInputHTML(); |
| 88 | + $this->addSpecificMapHTML(); |
87 | 89 | |
88 | | - return array($this->formOutput, ''); |
| 90 | + return array($this->output, ''); |
89 | 91 | } |
90 | 92 | |
91 | 93 | /** |
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php |
— | — | @@ -18,10 +18,10 @@ |
19 | 19 | final class SMGoogleMapsFormInput extends SMFormInput {
|
20 | 20 | |
21 | 21 | /** |
22 | | - * @see SMFormInput::setFormInputSettings() |
| 22 | + * @see MapsMapFeature::setMapSettings() |
23 | 23 | * |
24 | 24 | */ |
25 | | - protected function setFormInputSettings() { |
| 25 | + protected function setMapSettings() { |
26 | 26 | global $egMapsGoogleMapsZoom; |
27 | 27 | |
28 | 28 | $this->elementNamePrefix = 'map_google'; |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | |
35 | 35 | |
36 | 36 | /** |
37 | | - * @see SMFormInput::doMapServiceLoad() |
| 37 | + * @see MapsMapFeature::doMapServiceLoad() |
38 | 38 | * |
39 | 39 | */ |
40 | 40 | protected function doMapServiceLoad() { |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | |
43 | 43 | if (empty($egGoogleMapsOnThisPage)) { |
44 | 44 | $egGoogleMapsOnThisPage = 0; |
45 | | - MapsGoogleMaps::addGMapDependencies($this->formOutput); |
| 45 | + MapsGoogleMaps::addGMapDependencies($this->output); |
46 | 46 | } |
47 | 47 | |
48 | 48 | $egGoogleMapsOnThisPage++; |
— | — | @@ -50,10 +50,10 @@ |
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
54 | | - * @see SMFormInput::addSpecificFormInputHTML() |
| 54 | + * @see MapsMapFeature::addSpecificFormInputHTML() |
55 | 55 | * |
56 | 56 | */ |
57 | | - protected function addSpecificFormInputHTML() { |
| 57 | + protected function addSpecificMapHTML() { |
58 | 58 | global $wgJsMimeType; |
59 | 59 | |
60 | 60 | $enableEarth = $this-earth == 'on' || $this->earth == 'yes'; |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | $this->type = MapsGoogleMaps::getGMapType($this->type, $enableEarth); |
64 | 64 | $control = MapsGoogleMaps::getGControlType($this->controls); |
65 | 65 | |
66 | | - $this->formOutput .= " |
| 66 | + $this->output .= " |
67 | 67 | <div id='".$this->mapName."' class='".$this->class."'></div> |
68 | 68 | |
69 | 69 | <script type='$wgJsMimeType'>/*<![CDATA[*/ |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | protected function manageGeocoding() { |
80 | 80 | global $egGoogleMapsKey; |
81 | 81 | $this->enableGeocoding = strlen(trim($egGoogleMapsKey)) > 0; |
82 | | - if ($this->enableGeocoding) MapsGoogleMaps::addGMapDependencies($this->formOutput); |
| 82 | + if ($this->enableGeocoding) MapsGoogleMaps::addGMapDependencies($this->output); |
83 | 83 | }
|
84 | 84 | |
85 | 85 | } |