@@ -204,7 +204,7 @@ |
||
| 204 | 204 | /** |
| 205 | 205 | * Access the map editing field for the purpose of adding guide points. |
| 206 | 206 | * |
| 207 | - * @return [LatLongField] instance of location editing field |
|
| 207 | + * @return FormField instance of location editing field |
|
| 208 | 208 | */ |
| 209 | 209 | public function getMapField() |
| 210 | 210 | { |
@@ -265,6 +265,10 @@ discard block |
||
| 265 | 265 | /* |
| 266 | 266 | Add a map layer to an existing instance |
| 267 | 267 | */ |
| 268 | + |
|
| 269 | + /** |
|
| 270 | + * @param Member $instance |
|
| 271 | + */ |
|
| 268 | 272 | private function addLayerToInstance(&$instance) |
| 269 | 273 | { |
| 270 | 274 | // Create a layer |
@@ -279,6 +283,9 @@ discard block |
||
| 279 | 283 | $layers->add($layer); |
| 280 | 284 | } |
| 281 | 285 | |
| 286 | + /** |
|
| 287 | + * @param Member $instance |
|
| 288 | + */ |
|
| 282 | 289 | private function addMapPinToInstance(&$instance) |
| 283 | 290 | { |
| 284 | 291 | // Create a pin |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | 'data-LonFieldName' => $this->longField, |
| 66 | 66 | 'data-ZoomFieldName' => $this->zoomField, |
| 67 | 67 | 'data-UseMapBounds' => false, |
| 68 | - ); |
|
| 68 | + ); |
|
| 69 | 69 | |
| 70 | 70 | Requirements::css('mappable/css/mapField.css'); |
| 71 | 71 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $content = '<div class="editableMapWrapper">'.$this->create_tag( |
| 90 | 90 | 'div', |
| 91 | 91 | $attributes |
| 92 | - ).'</div>'; |
|
| 92 | + ).'</div>'; |
|
| 93 | 93 | |
| 94 | 94 | $this->FieldList()->push(new LiteralField('locationEditor', $content)); |
| 95 | 95 | |
@@ -18,8 +18,7 @@ |
||
| 18 | 18 | * @param string[] $buttonText |
| 19 | 19 | */ |
| 20 | 20 | public function __construct($children = array(), $buttonText = null) |
| 21 | - { |
|
| 22 | - ++self::$ctr; |
|
| 21 | + {++self::$ctr; |
|
| 23 | 22 | |
| 24 | 23 | if ((sizeof($children) < 2) || (sizeof($children) > 3) || |
| 25 | 24 | (!$children[0] instanceof FormField) || |
@@ -626,7 +626,7 @@ |
||
| 626 | 626 | $kmlJson = stripslashes(json_encode($this->kmlFiles, JSON_UNESCAPED_UNICODE)); |
| 627 | 627 | } |
| 628 | 628 | |
| 629 | - // Center of the GMap - text centre takes precedence |
|
| 629 | + // Center of the GMap - text centre takes precedence |
|
| 630 | 630 | $geocodeCentre = ($this->latLongCenter) ? |
| 631 | 631 | $this->latLongCenter : $this->geocoding($this->center); |
| 632 | 632 | |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Map field to point for pois langitude and longitude positioning. |
|
| 4 | - */ |
|
| 3 | + * Map field to point for pois langitude and longitude positioning. |
|
| 4 | + */ |
|
| 5 | 5 | class MapField extends DatalessField |
| 6 | 6 | { |
| 7 | 7 | /** |
| 8 | - * @var int The level of the <h1> to <h6> HTML tag. Default: 2 |
|
| 9 | - */ |
|
| 8 | + * @var int The level of the <h1> to <h6> HTML tag. Default: 2 |
|
| 9 | + */ |
|
| 10 | 10 | protected $headingLevel = 2; |
| 11 | 11 | private $divId; |
| 12 | 12 | |
@@ -132,8 +132,7 @@ |
||
| 132 | 132 | * @return MapAPI |
| 133 | 133 | */ |
| 134 | 134 | public static function instance() |
| 135 | - { |
|
| 136 | - ++self::$instances; |
|
| 135 | + {++self::$instances; |
|
| 137 | 136 | |
| 138 | 137 | if (self::$allow_full_screen == null) { |
| 139 | 138 | self::$allow_full_screen = Config::inst()->get('Mappable', 'allow_full_screen'); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Defines the interface for a mappable DataObject. Implementors of this interface |
|
| 4 | - * must define the following functions in order to work with the {@link GoogleMapUtil} |
|
| 5 | - * helper class. |
|
| 6 | - * |
|
| 7 | - * @author Uncle Cheese |
|
| 8 | - */ |
|
| 3 | + * Defines the interface for a mappable DataObject. Implementors of this interface |
|
| 4 | + * must define the following functions in order to work with the {@link GoogleMapUtil} |
|
| 5 | + * helper class. |
|
| 6 | + * |
|
| 7 | + * @author Uncle Cheese |
|
| 8 | + */ |
|
| 9 | 9 | interface Mappable |
| 10 | 10 | { |
| 11 | 11 | /** |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | // the id of the dom element to be used to render the street view |
| 54 | 54 | $arguments['DomID'] = 'google_streetview_'.self::$gsv_ctr; |
| 55 | 55 | |
| 56 | - // incrememt the counter to ensure a unique id for each map canvas |
|
| 57 | - ++self::$gsv_ctr; |
|
| 56 | + // incrememt the counter to ensure a unique id for each map canvas++self::$gsv_ctr; |
|
| 58 | 57 | |
| 59 | 58 | // merge defaults and arguments |
| 60 | 59 | $customised = array_merge($defaults, $arguments); |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | $this->fail('Creation of lat long field should have failed'); |
| 25 | 25 | } catch (Exception $e) { |
| 26 | 26 | $expected = 'LatLongField argument 1 must be an array containing at' |
| 27 | - .' least two FormField objects for Lat/Long values, resp' |
|
| 28 | - .'ectively.'; |
|
| 27 | + .' least two FormField objects for Lat/Long values, resp' |
|
| 28 | + .'ectively.'; |
|
| 29 | 29 | $this->assertEquals($expected, $e->getMessage()); |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | $html = $mapField->FieldHolder(); |
| 120 | 120 | $expected = 'data-GuidePoints="[{"latitude":42,"longitude":"113.1&' |
| 121 | - .'quot;},{"latitude":14.9,"longitude":"113.2"},{&q' |
|
| 122 | - .'uot;latitude":42.3,"longitude":"113.4"}]"'; |
|
| 121 | + .'quot;},{"latitude":14.9,"longitude":"113.2"},{&q' |
|
| 122 | + .'uot;latitude":42.3,"longitude":"113.4"}]"'; |
|
| 123 | 123 | |
| 124 | 124 | $this->assertContains($expected, $html); |
| 125 | 125 | } |