-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- (Feature) Added ability to add circles to a map from the fieldtype.
- (Feature) Added new GoogleMaps.Circle class for the plugin.js to plot circles on the front-end
- Loading branch information
1 parent
ef42cec
commit 7c08372
Showing
19 changed files
with
3,300 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
namespace Craft; | ||
|
||
class GoogleMaps_CircleModel extends BaseModel | ||
{ | ||
public function toJson() | ||
{ | ||
return json_encode($this->getAttributes()); | ||
} | ||
|
||
public function getStaticMapParameters() | ||
{ | ||
// return 'markers=' . urldecode(!empty($this->address) ? $this->address : $this->lat.','.$this->lng); | ||
} | ||
|
||
protected function defineAttributes() | ||
{ | ||
return array( | ||
// Location Parameters | ||
'title' => array(AttributeType::String, 'default' => ''), | ||
'content' => array(AttributeType::String, 'default' => ''), | ||
'lat' => array(AttributeType::Number, 'default' => 0), | ||
'lng' => array(AttributeType::Number, 'default' => 0), | ||
'metric' => array(AttributeType::String, 'default' => ''), | ||
'radius' => array(AttributeType::String, 'default' => ''), | ||
'address' => array(AttributeType::String, 'default' => ''), | ||
'addressComponents' => array(AttributeType::Mixed, 'default' => array()), | ||
'hideDetails' => array(AttributeType::Mixed, 'default' => true), | ||
'strokeColor' => array(AttributeType::Mixed, 'default' => null), | ||
'strokeWeight' => array(AttributeType::Mixed, 'default' => null), | ||
'strokeOpacity' => array(AttributeType::Mixed, 'default' => null), | ||
'fillColor' => array(AttributeType::Mixed, 'default' => null), | ||
'fillOpacity' => array(AttributeType::Mixed, 'default' => null), | ||
'isNew' => array(AttributeType::Bool, 'default' => true), | ||
'elementId' => array(AttributeType::Mixed, 'default' => false), | ||
'deleted' => array(AttributeType::Bool, 'default' => false), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.