﻿var swissMaps = new Object();
swissMaps.init = function(map) {
    //if (window.location.hostname.indexOf('.') == -1 || swGroupId) {
    if ((window.location.hostname.indexOf('.') == -1) || (typeof swGroupId != 'undefined')) {
        //    if ((typeof swGroupId != 'undefined')) {
        var locHref = window.location.href.toLowerCase();
        var tileSource = locHref.substring(0, locHref.lastIndexOf('sensormap')) + 'maps/genepi/%4.png';
        var tileSourceSpec = new VETileSourceSpecification(tileSource, tileSource);
        tileSourceSpec.ID = tileSource;
        tileSourceSpec.TileSource = tileSource;
        tileSourceSpec.MaxZoom = 18;
        tileSourceSpec.MinZoom = 1;
        tileSourceSpec.ZIndex = 100;
        var TopLeftLatLong = new VELatLong(46.03370901, 7.03987598, 0, VEAltitudeMode.Default);
        var BottomRightLatLong = new VELatLong(46.02295257, 7.05824375, 0, VEAltitudeMode.Default);
        map.AddTileLayer(tileSourceSpec, true);
    }
};