Option name | Type | Description |
---|---|---|
options | Object |
Api
function Api(options) {
fruskac.config = util.extend({
lang: 'en',
fullscreen: window.location,
data: [],
map: {
center: {
latitude: 45.1570741,
longitude: 19.7093099
},
zoom: 12
}
}, options);
fruskac.init();
}
Api.prototype = {
Option name | Type | Description |
---|---|---|
callback | Function |
Fired when ready
ready: function (callback) {
var self = this;
event.subscribe('ready', function () {
callback.apply(self);
});
},
Get data
getData: function () {
return storage.getSelectors();
},
Option name | Type | Description |
---|---|---|
value | boolean |
Get / Set clustering state
clustering: function (value) {
if (value === undefined) { // act as getter
return clusterer.enabled;
} else { // act as setter
clusterer.setEnabled(value);
}
},
Option name | Type | Description |
---|---|---|
value | string |
Get / Set map type
type: function (value) {
if (value === undefined) { // act as getter
return gmap.getMapTypeId();
} else { // act as setter
return gmap.setMapTypeId(value);
}
},
locate: function () {
geolocation.locate();
}
};
return Api;
})();