@@ -59,38 +59,38 @@ |
||
59 | 59 | Requirements::javascript(MAPPABLE_MODULE_PATH.'/javascript/mapField.js'); |
60 | 60 | |
61 | 61 | $attributes = array( |
62 | - 'class' => 'editableMap', |
|
63 | - 'id' => 'GoogleMap', |
|
64 | - 'data-LatFieldName' => $this->latField, |
|
62 | + 'class' => 'editableMap', |
|
63 | + 'id' => 'GoogleMap', |
|
64 | + 'data-LatFieldName' => $this->latField, |
|
65 | 65 | 'data-LonFieldName' => $this->longField, |
66 | 66 | 'data-ZoomFieldName' => $this->zoomField, |
67 | 67 | 'data-UseMapBounds' => false |
68 | - ); |
|
68 | + ); |
|
69 | 69 | |
70 | - Requirements::css('mappable/css/mapField.css'); |
|
71 | - $guidePointsJSON = ''; |
|
72 | - if (!empty($this->guidePoints)) { |
|
73 | - $latlongps = array(); |
|
70 | + Requirements::css('mappable/css/mapField.css'); |
|
71 | + $guidePointsJSON = ''; |
|
72 | + if (!empty($this->guidePoints)) { |
|
73 | + $latlongps = array(); |
|
74 | 74 | |
75 | 75 | foreach ($this->guidePoints as $guidepoint) { |
76 | 76 | array_push($latlongps, $guidepoint); |
77 | 77 | } |
78 | 78 | |
79 | - $guidePointsJSON = json_encode($latlongps); |
|
80 | - // convert the mappable guidepoints to lat lon |
|
79 | + $guidePointsJSON = json_encode($latlongps); |
|
80 | + // convert the mappable guidepoints to lat lon |
|
81 | 81 | |
82 | - $attributes['data-GuidePoints'] = $guidePointsJSON; |
|
82 | + $attributes['data-GuidePoints'] = $guidePointsJSON; |
|
83 | 83 | |
84 | - // we only wish to change the bounds to those of all the points iff |
|
85 | - // the item currently has no location |
|
86 | - $attributes['data-useMapBounds'] = true; |
|
87 | - } |
|
88 | - $content = '<div class="editableMapWrapper">' . $this->createTag( |
|
89 | - "div", |
|
90 | - $attributes |
|
91 | - ) . '</div>'; |
|
84 | + // we only wish to change the bounds to those of all the points iff |
|
85 | + // the item currently has no location |
|
86 | + $attributes['data-useMapBounds'] = true; |
|
87 | + } |
|
88 | + $content = '<div class="editableMapWrapper">' . $this->createTag( |
|
89 | + "div", |
|
90 | + $attributes |
|
91 | + ) . '</div>'; |
|
92 | 92 | |
93 | - $this->FieldList()->push(new LiteralField('locationEditor', $content)); |
|
93 | + $this->FieldList()->push(new LiteralField('locationEditor', $content)); |
|
94 | 94 | |
95 | 95 | $content2 = <<<HTML |
96 | 96 | <div id="mapSearch"> |