This file contains hidden or 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
if (Object::has_extension($this->owner->ClassName, 'MapLayerExtension')) { | |
foreach($this->owner->MapLayers() as $layer) { | |
$map->addKML($layer->KmlFile()->getAbsoluteURL()); | |
} | |
} |
This file contains hidden or 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
<% require css(weboftalent-mappable-demo/css/mapdemo.css) %> | |
<h1>$Title</h1> | |
$Content | |
$BasicMap |
This file contains hidden or 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
Deny from all | |
<FilesMatch "\.(html|HTML|htm|HTM|xhtml|XHTML|js|JS|css|CSS|bmp|BMP|png|PNG|gif|GIF|jpg|JPG|jpeg|JPEG|ico|ICO|pcx|PCX|tif|TIF|tiff|TIFF|au|AU|mid|MID| | |
midi|MIDI|mpa|MPA|mp3|MP3|ogg|OGG|m4a|M4A|ra|RA|wma|WMA|wav|WAV|cda|CDA|avi|AVI|mpg|MPG|mpeg|MPEG|asf|ASF|wmv|WMV|m4v|M4V|mov|MOV|mkv|MKV|mp4|MP4|swf| | |
SWF|flv|FLV|ram|RAM|rm|RM|doc|DOC|docx|DOCX|txt|TXT|rtf|RTF|xls|XLS|xlsx|XLSX|pages|PAGES|ppt|PPT|pptx|PPTX|pps|PPS|csv|CSV|cab|CAB|arj|ARJ|tar|TAR|zi | |
p|ZIP|zipx|ZIPX|sit|SIT|sitx|SITX|gz|GZ|tgz|TGZ|bz2|BZ2|ace|ACE|arc|ARC|pkg|PKG|dmg|DMG|hqx|HQX|jar|JAR|xml|XML|pdf|PDF|kml|KML|gpx|GPX)$"> | |
Allow from all | |
</FilesMatch> | |
# We disable PHP via several methods | |
# Replace the handler with the default plaintext handler |
This file contains hidden or 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
Object::add_extension('PageWithMap', 'MapExtension'); | |
Object::add_extension('PageWithMapAndLayers', 'MapLayerExtension'); |
This file contains hidden or 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
<?php | |
// layers are configured in _config.php | |
class PageWithMapAndLayers extends PageWithMap { | |
} | |
class PageWithMapAndLayers_Controller extends DemoPage_Controller { |
This file contains hidden or 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
<% require css(weboftalent-mappable-demo/css/mapdemo.css) %> | |
<h1>$Title</h1> | |
$BriefDescription | |
<h2>Addresses</h2> | |
<% loop Locations %> | |
<h3>$PostalAddress</h3> | |
$BasicMap |
This file contains hidden or 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
Object::add_extension('ContactPageAddress','MapExtension'); |
This file contains hidden or 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
<?php | |
class ContactPageAddress extends DataObject { | |
static $db = array( | |
'PostalAddress' => 'Text' | |
); | |
static $has_one = array( 'ContactPage' => 'ContactPage' ); | |
public static $summary_fields = array( |
This file contains hidden or 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
<?php | |
class ContactPage extends DemoPage { | |
static $has_many = array( | |
'Locations' => 'ContactPageAddress' | |
); | |
function getCMSFields() { | |
$fields = parent::getCMSFields(); |
This file contains hidden or 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
<?php | |
class ContactPage extends DemoPage { | |
static $has_many = array( | |
'Locations' => 'ContactPageAddress' | |
); | |
function getCMSFields() { | |
$fields = parent::getCMSFields(); |