var objectLayer;
var objectLoader;
-function createMap(divName, options) {
+function createMap(divName, options, moreOptions) {
if (!layers) {
layers = [
{
];
}
+ moreOptions = moreOptions || {};
+
options = $.extend({zoomControl: true, panZoomControl: true, layerControl: true}, options);
map = L.map(divName, $.extend({}, options, {panControl: false, zoomsliderControl: false, maxZoom: 18}));
map.layersControl = layersControl;
}
+ if (moreOptions.locateControl) {
+ var loc = L.control.locate({
+ position: 'topright'
+ });
+ loc.addTo(map);
+ }
+
for (var i = 0; i < layers.length; i++) {
layers[i].layer = new (layers[i].klass)(layers[i]);
layersControl.addBaseLayer(layers[i].layer, layers[i].name);