Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fireproofsocks committed Mar 6, 2015
1 parent d052a76 commit 52b2016
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -12,6 +12,13 @@ See the Wiki for more information: https://github.com/craftsmancoding/gmarker/wi

Overview video here: https://www.youtube.com/watch?v=dayu6RXZld4

## Required Google APIs:

Head to your [Google Developer Console](https://console.developers.google.com/project) and enable the following 3 APIs:

- Google Maps Embed API
- Google Maps JavaScript API v3
- Static Maps API

## Example

Expand Down
14 changes: 3 additions & 11 deletions elements/snippets/Gembed.php
Expand Up @@ -7,6 +7,7 @@
* LICENSE:
* See the core/components/gmarker/docs/license.txt for full licensing info.
*
* See https://developers.google.com/maps/documentation/embed/guide#place_mode
*
* SNIPPET PARAMETERS:
*
Expand All @@ -26,12 +27,8 @@
*
* Place the snippet call where you want your map to appear.
*
* [[!Gmap]]
*
* [[Gmap? &width=`100%` &height=`300px` &class=`my_class` &center=`40.3810679,-78.0758859` &zoom=`8`]]
*
* WARNING:
* - Your map cannot use percentages for BOTH height and width.
*
* @var array $scriptProperties
* @url http://craftsmancoding.com/
Expand All @@ -50,15 +47,10 @@
return $modx->lexicon('invalid_expired_msg');
}

$Gmarker = new Gmarker($modx);
$modx->lexicon->load('gmarker:default');

//------------------------------------------------------------------------------
//! Read inputs
//------------------------------------------------------------------------------
$secure = (int) $modx->getOption('secure', $scriptProperties, $modx->getOption('gmarker.secure'));
$headTpl = $modx->getOption('headTpl', $scriptProperties, 'gmap-example');
$outTpl = $modx->getOption('outTpl', $scriptProperties, 'gmap-canvas');
$outTpl = $modx->getOption('outTpl', $scriptProperties, 'gembed-iframe');
$center = $modx->getOption('center', $scriptProperties);

$props = $scriptProperties;
Expand Down

0 comments on commit 52b2016

Please sign in to comment.