? Success

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
24 Aug 2014

With version 3 of the Google Maps API, the API key is optional for some functions (like displaying a normal map)

avatar bembelimen bembelimen - open - 24 Aug 2014
avatar jissues-bot jissues-bot - change - 24 Aug 2014
Status Pending New
Labels Added: ?
avatar mbabker
mbabker - comment - 24 Aug 2014

Could you also remove the test case for the Exception you've removed (it's at https://github.com/joomla/joomla-cms/blob/staging/tests/unit/suites/libraries/joomla/google/JGoogleEmbedMapsTest.php#L631-L641). The build failure is because the test expects that Exception.

avatar bembelimen
bembelimen - comment - 24 Aug 2014

Hello,
thank you for your message. I hope I removed the correct lines :)

avatar zero-24 zero-24 - change - 24 Aug 2014
Status New Ready to Commit
avatar zero-24
zero-24 - comment - 25 Aug 2014

@test successfull together with: #4166

RTC

avatar Bakual Bakual - change - 25 Aug 2014
Status Ready to Commit New
Labels Added: ?
avatar dbhurley dbhurley - close - 26 Aug 2014
avatar dbhurley dbhurley - change - 26 Aug 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-08-26 01:47:47
avatar dbhurley dbhurley - close - 26 Aug 2014
avatar bweston92
bweston92 - comment - 28 Aug 2014

Could I recommend actually splitting this function out abit? You're hard coding the URL to Google API twice... My example shows no "scheme" because // uses the current page scheme so yeah.

$src = $this->getGoogleSrc($sensor);
// or when a callback
$src = $this->getGoogleSrc($sensor, $asynccallback);

protected function getGoogleSrc($sensor, $callback = null)
{
    $key = $this->getKey();

    if (! is_null($callback))
    {
        $callback .= ';';
    }

    $query = compact('key', 'sensor', 'callback');
    return '//maps.googleapis.com/maps/api/js?' . http_build_query($query);
}

avatar bweston92
bweston92 - comment - 28 Aug 2014

I did in fact propose this #4027

Add a Comment

Login with GitHub to post a comment