ФRuŠKać

Api

constructor
Api()

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
Api.prototype

Api.prototype = {

ready

method
Api.prototype.ready()

Option name Type Description
callback Function

Fired when ready

ready: function (callback) {
    var self = this;
    event.subscribe('ready', function () {
        callback.apply(self);
    });
},

getData

method
Api.prototype.getData()

Get data

getData: function () {
    return storage.getSelectors();
},

clustering

method
Api.prototype.clustering()

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);
    }
},

type

method
Api.prototype.type()

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;

})();