Maps API key
This commit is contained in:
parent
03dd6f94e4
commit
c77373e772
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.406.18) stable; urgency=low
|
||||
hedera-web (1.406.19) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,44 +1,40 @@
|
|||
|
||||
var gmapsIsLoaded = false;
|
||||
|
||||
Hedera.Location = new Class
|
||||
({
|
||||
Hedera.Location = new Class({
|
||||
Extends: Hedera.Form
|
||||
|
||||
,locations: null
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
,activate: function() {
|
||||
this.gui.loaderPush();
|
||||
|
||||
var sql = 'SELECT lat, lng, title, address, postcode, city, province, phone, language FROM location';
|
||||
this.conn.execQuery(sql, this.onLocationsDone.bind(this));
|
||||
|
||||
if (!gmapsIsLoaded)
|
||||
{
|
||||
if (!gmapsIsLoaded) {
|
||||
gmapsLoadedCallback = this.gmapsLoaded.bind(this);
|
||||
Vn.includeJs ('https://maps.google.com/maps/api/js'+
|
||||
'?sensor=false&callback=gmapsLoadedCallback', null, true);
|
||||
}
|
||||
else
|
||||
Vn.includeJs('https://maps.google.com/maps/api/js'
|
||||
+'?sensor=false&callback=gmapsLoadedCallback'
|
||||
+'&key=AIzaSyBbunFsAFEkjtw-c7BUHNgkThSlKEKFxiE',
|
||||
null, true
|
||||
);
|
||||
} else
|
||||
this.gmapsLoaded();
|
||||
}
|
||||
|
||||
,onLocationsDone: function (resultSet)
|
||||
{
|
||||
,onLocationsDone: function(resultSet) {
|
||||
this.locations = resultSet.fetchResult();
|
||||
this.allLoaded();
|
||||
}
|
||||
|
||||
,gmapsLoaded: function ()
|
||||
{
|
||||
,gmapsLoaded: function() {
|
||||
this.gui.loaderPop();
|
||||
gmapsIsLoaded = true;
|
||||
this.allLoaded();
|
||||
}
|
||||
|
||||
,allLoaded: function ()
|
||||
{
|
||||
,allLoaded: function() {
|
||||
if (!this.locations || !gmapsIsLoaded)
|
||||
return;
|
||||
|
||||
|
@ -56,8 +52,7 @@ Hedera.Location = new Class
|
|||
this.createMarker(this.locations, gmap);
|
||||
}
|
||||
|
||||
,createMarker: function (location, gmap)
|
||||
{
|
||||
,createMarker: function(location, gmap) {
|
||||
var div = document.createElement('div');
|
||||
div.className = 'marker';
|
||||
|
||||
|
@ -104,8 +99,7 @@ Hedera.Location = new Class
|
|||
this.openInfoWindow(infoWindow, gmap, marker);
|
||||
}
|
||||
|
||||
,openInfoWindow: function (infoWindow, gmap, marker)
|
||||
{
|
||||
,openInfoWindow: function(infoWindow, gmap, marker) {
|
||||
if (this.openedWindow)
|
||||
this.openedWindow.close();
|
||||
|
||||
|
@ -113,4 +107,3 @@ Hedera.Location = new Class
|
|||
this.openedWindow = infoWindow;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.406.18",
|
||||
"version": "1.406.19",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue