diff --git a/docs/en/02_Developer_Guides/05_Extending/How_Tos/02_Create_a_Google_Maps_Shortcode.md b/docs/en/02_Developer_Guides/05_Extending/How_Tos/02_Create_a_Google_Maps_Shortcode.md index 2d6f0b38c..dd9dd54a4 100644 --- a/docs/en/02_Developer_Guides/05_Extending/How_Tos/02_Create_a_Google_Maps_Shortcode.md +++ b/docs/en/02_Developer_Guides/05_Extending/How_Tos/02_Create_a_Google_Maps_Shortcode.md @@ -20,7 +20,8 @@ use SilverStripe\View\Parsers\ShortcodeParser; ShortcodeParser::get('default')->register('googlemap', function($arguments, $address, $parser, $shortcode) { $iframeUrl = sprintf( - 'http://maps.google.com/maps?q=%s&hnear=%s&ie=UTF8&hq=&t=m&z=14&output=embed', + '%s://maps.google.com/maps?q=%s&hnear=%s&ie=UTF8&hq=&t=m&z=14&output=embed', + (isset($_SERVER['HTTPS'])) ? 'https': 'http', urlencode($address), urlencode($address) );