User tests: Successful: Unsuccessful:
With version 3 of the Google Maps API, the API key is optional for some functions (like displaying a normal map)
Status | Pending | ⇒ | New |
Labels |
Added:
?
|
Hello,
thank you for your message. I hope I removed the correct lines :)
Status | New | ⇒ | Ready to Commit |
Status | Ready to Commit | ⇒ | New |
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-08-26 01:47:47 |
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);
}
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.