Jump to:

10854 Posts in 2518 Topics by 1794 members

All other Modules

SilverStripe Forums » All other Modules » Getting "Google Map Selection Field" module to work

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1476 Views
  • Samba Sam
    Avatar
    Community Member
    85 Posts

    Getting "Google Map Selection Field" module to work Link to this post

    Hi,
    When I follow the directions for installing by inserting the following in MYSITE/_CONFIG.PHP:
    EditableGoogleMapSelectableField::$api_key = ABQIAAAAVl6l2mFrWO_iYsdKj2q7zhQZsr62tCq9UT--lZNx8crCYi83XRSvxwfvahQWD86LeX6MhJUSRbSKXg;

    I get the following error:
    Parse error: syntax error, unexpected T_DEC in /home3/islandro/public_html/connienimmon/mysite/_config.php on line 31

    Any ideas?
    Sam

  • Samba Sam
    Avatar
    Community Member
    85 Posts

    Re: Getting "Google Map Selection Field" module to work Link to this post

    Got it to work.
    I just needed to add the quotes around the key:
    As in
    EditableGoogleMapSelectableField::$api_key ="ABQIAAAAVl6l2mFrWO_iYsdKj2q7zhQZsr62tCq9UT--lZNx8crCYi83XRSvxwfvahQWD86LeX6MhJUSRbSKXg";

  • toarx
    Avatar
    Community Member
    34 Posts

    Re: Getting "Google Map Selection Field" module to work Link to this post

    yes, the installing instruction was bad

    ==
    Installation Instructions
    -----------------------------------------------
    - Enter your google map API key in your mysite/_config.php file like

    EditableGoogleMapSelectableField::$api_key = YOUR API KEY HERE;
    ==

    should be better

    EditableGoogleMapSelectableField::$api_key = "YOUR API KEY HERE";

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: Getting "Google Map Selection Field" module to work Link to this post

    This has been fixed in the module to make it a bit more clearer. But FYI - you quote every string in PHP, only time you don't is when you're referencing a constant (pre defined) value.

    1476 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.