don't pass google api key, use Ox.Map.GoogleApiKey

This commit is contained in:
j 2017-10-26 12:42:25 +02:00
commit b11d6a81fe
2 changed files with 1 additions and 6 deletions

View file

@ -7,7 +7,6 @@ Ox.Map <f> Basic map object
API](http://code.google.com/apis/maps/documentation/javascript/).
# ARGUMENTS ----------------------------------------------------------------
options <o|{}> options
apiKey <s> Google API Key
clickable <b|false> If true, clicking on the map finds a place
editable <b|false> If true, places are editable
find <s|""> Initial query
@ -89,7 +88,6 @@ Ox.Map = function(options, self) {
var that = Ox.Element({}, self)
.defaults({
// fixme: isClickable?
apiKey: '',
clickable: false,
editable: false,
find: '',
@ -526,7 +524,7 @@ Ox.Map = function(options, self) {
$.getScript(
document.location.protocol
+ '//maps.google.com/maps/api/js?callback=googleCallback&sensor=false'
+ (options.apiKey ? '&key=' + options.apiKey : '')
+ (Ox.Map.GoogleApiKey ? '&key=' + Ox.Map.GoogleApiKey : '')
);
}