Is Feminism a Jewish plot?

Topic by Eric Lauder

Eric Lauder

Home Forums MGTOW Central Is Feminism a Jewish plot?

This topic contains 105 replies, has 15 voices, and was last updated by Eric Lauder  Eric Lauder 1 month, 3 weeks ago.

Viewing 20 posts - 61 through 80 (of 106 total)
  • Author
    Posts
  • #917037
    +8
    Sandals
    Sandals
    Participant
    4253

    Ok, a couple things…

    There’s no moderators here so we do have to self moderate. Gravil Pitt, you gotta give some warning before showing pictures like that. Just hitting us with that WHAM was, well… I was unprepared for it.

    I am guessing that woman ended up there because she decided to walk outside in her bra.

    OK… so, these goat fvckers might be dirty but… no feminism there. They did send the message… don’t walk outside without clothes.

    What’s the alternative? Give women freedom. Look where THAT’S gotten us. I’m sorry but I just cannot agree that women’s lib has been good for society, and again, I have to come back to TFM… the goat fvckers are just DOING it. They are setting the boundaries for women. The simp white man is afraid of the goat fcukers because the goat fcukers push back and don’t allow the s~~~ the white man allows. And that’s why the goat fcukers are winning.

    Also, Gravil Pitt, I think you are unfairly intimidating guys here. I have done it too, so I apologize for any past over-emotion Ihave displayed to attack MGTOW on this site.

    This should be a free speech zone. There’s nothing wrong with talking about the Jewish Question. I brought up Christians. Why should Christianity or Islam be fair game for criticism but not Jewry? The Protocols of Zion exist, and that text is just as disgusting as those pictures you posted. SOMEONE wrote that text, and some people today in charge are obviously using it as their blueprint for the world – that is clear enough.

    People need to be free to talk about stuff. And this is the forum to do it. So I recommend not getting emotional or angry at our brothers (again, I have done it too, and I am not proud of it. Many of us do). But let’s make this a free speech zone, where we can bring our thoughts and perspective to the marketplace of ideas, since there is no marketplace of ideas in the outside world anymore.

    It is clear Jews are a problem. It’s also clear, what David Duke admitted himself, that many, if not most, Jews have no fvcking clue what the Ashkanazi / Talmudic Jews are doing. It’s also, I think, relevant that in any group, the ones at the top are expointing the ones at the bottom – Jews just happen to be at the top of the banking, and Catholics, as well as Jews, in Congress.

    Jordan Maxwell points out that Catholocism is just a sect of Judiasm. Christianity is just another sect of Judiasm.

    Also, I have noticed that the loudest opponents to what the “Jews” are doing are other Jews. The ones who speak out loudest against the Federal Reserve are Jews, such as Peter Schiff, whose father died in Jail protesting excessive taxation, when he could have gotten out any time by just apologizing to the judge and admitting the govt had the right to tax him. But he stood his ground.

    Also Alex Jones, who is funded by a freedom loving Jew, has exposed so much, including that priceless video of the Child Sacrifice Ritual at Bohemiem Grove. Jones should receive the Pulizter Prize for that video. That video is what made me realize Jones wasn’t just some shlthead talking out of his azz, and that there really is this dark cult of evil, and all the Politicians are in on it.

    May Jews are speaking out against the “Jews”, but unfortunately, these Jews are getting shut down by non-Jews and Christians, who I guess just need to be in their position of inferiority to maintain their inner ego / identity. I guess that’s why Christians call themselves “Sheep” in Church. It’s just fvcking wierd.

    What’s a Jew calling out “The Jews” to do?

    So, it’s all a big clusterfvck at this point, but unraveling it all does require talking about it, and in order to talk about it, we have to be intellectual. Once we get emotional or intimidate others, then people stop talking, iMickey style, and that, in my opinion, is not a way to solve, at least for ourselves, our problems as MGTOW.

    I really can’t find anything in iMickey’s post on this thread that I can find fault with. I tend to agree with him.

    #917045
    +5
    Monk
    Monk
    Participant
    16984

    How anyone could stand here in the 21st century of medicine and modern living and complain about “jews” is beyond me, when we have a plague of fvcking MUSLIMES growing out of control… Its like complaining of a roof leak as a tsunami is en-route.

    The Islamic invaders didn’t force they way in. The question is therefore ‘Who opened the door? Who keeps it open? Who has their foot jammed in the door?’.

    When you look for the answer to these and similar questions, the same people turn up, every time.

    #917048
    +2
    Christopher
    Christopher
    Participant
    2478

    There’s no moderators here so we do have to self moderate…..

    This should be a free speech zone. There’s nothing wrong with talking about the Jewish Question. I brought up Christians. Why should Christianity or Islam be fair game for criticism but not Jewry? The Protocols of Zion exist, and that text is just as disgusting as those pictures you posted. SOMEONE wrote that text, and some people today in charge are obviously using it as their blueprint for the world – that is clear enough.

    People need to be free to talk about stuff. And this is the forum to do it. So I recommend not getting emotional or angry at our brothers (again, I have done it too, and I am not proud of it. Many of us do). But let’s make this a free speech zone, where we can bring our thoughts and perspective to the marketplace of ideas, since there is no marketplace of ideas in the outside world anymore.

    It is clear Jews are a problem. It’s also clear, what David Duke admitted himself, that many, if not most, Jews have no fvcking clue what the Ashkanazi / Talmudic Jews are doing. It’s also, I think, relevant that in any group, the ones at the top are expointing the ones at the bottom – Jews just happen to be at the top of the banking, and Catholics, as well as Jews, in Congress.

    Jordan Maxwell points out that Catholocism is just a sect of Judiasm. Christianity is just another sect of Judiasm.

    Also, I have noticed that the loudest opponents to what the “Jews” are doing are other Jews. The ones who speak out loudest against the Federal Reserve are Jews, such as Peter Schiff, whose father died in Jail protesting excessive taxation, when he could have gotten out any time by just apologizing to the judge and admitting the govt had the right to tax him. But he stood his ground.

    Also Alex Jones, who is funded by a freedom loving Jew, has exposed so much, including that priceless video of the Child Sacrifice Ritual at Bohemiem Grove. Jones should receive the Pulizter Prize for that video. That video is what made me realize Jones wasn’t just some shlthead talking out of his azz, and that there really is this dark cult of evil, and all the Politicians are in on it.

    May Jews are speaking out against the “Jews”, but unfortunately, these Jews are getting shut down by non-Jews and Christians..What’s a Jew calling out “The Jews” to do? So, it’s all a big clusterfvck at this point, but unraveling it all does require talking about it, and in order to talk about it, we have to be intellectual. Once we get emotional or intimidate others, then people stop talking

    +1 ^

    An interesting book (well researched) that describes how major religions/manmade religious institutions have been corrupted or infiltrated by those seeking power (distorting the original teachings of God), and the history of freemasonry and secret societies is Transcending the Global Power game by Armin Risi. It is about 450 pages and unfortunately lacks editing (first 100 pages could be written in 10 pages and the book could be halved in length) so best to delve into specific chapters if reading.

    Feminism was funded by bankers/politicians to create more taxpayers. MGTOW IS FREEDOM https://archive.org/details/mgtowisfreedomblurayready

    #917051
    +5
    Christopher
    Christopher
    Participant
    2478

    Have you ever been curious as to what “the other side of the World War II story” was?

    The victors of the war were also the communists that went on write history books, infiltrate the media and public education but even going so far as to criminalize the mere questioning of the official story’s orthodoxy. For good reason in the 1940s the US public opinion was completely against going to war with Germany – pearl harbour dragged the US into the war.

    Since the mid-20th century, the world has only ever heard one side of the most horrific war in human history. We are today living in the world of the victors of that war (which includes the communist victors) and without hearing both sides of the story we are doomed to repeat the mistakes. The truth is, that our world today can only be understood through a correct understanding of World War II, the architects of it and the conflicts between Globalism and Nationalism. Between the old-and-new world order. The Traditional and the “Progressive”.

    The post-war propaganda been pounded into the minds of three subsequent generations. Every medium of mass indoctrination has been harnessed to the task of training the obedient masses as to what the proper and “acceptable” view of this event should be. Academia, news media, public education, book publishing, TV documentaries, Hollywood films and politicians of every stripe all sing the same song. For very good reasons, most people don’t trust the mainstream media anymore.

    This documentary gives an overview of how Europe has been shaped in modern history. In it, you will find the real root causes of World War II. It will lead you on the journey through the Bolshevik Revolution, the communist attempts to take over Germany; hyperinflation during the Weimar Republic, widespread unemployment and misery, Adolf Hitler’s rise to power, World War I & II – all the way to the modern world. Do be forewarned though, your worldview might never be the same. As always, the Truth Fears No Investigation.

    https://www.bitchute.com/video/s1nPYDj7KBEQ/

    Feminism was funded by bankers/politicians to create more taxpayers. MGTOW IS FREEDOM https://archive.org/details/mgtowisfreedomblurayready

    #917052
    +6
    Lord Humungus
    Lord Humungus
    Participant
    270

    Well said Christopher! I could not agree more. All your posts have been on point and you seem a true scholar when it comes to real factual history…/And just to emphasize the point one more time. It was the Jews who thought up the whole Idea of Communism as a political social structure and perpetrated that evil onto mankind to begin with. And that should tell any thinking individual everything they need to know about the Jews point blank! At least thats the way I see it… Scourge of the earth…

    #917056
    +3
    Christopher
    Christopher
    Participant
    2478

    The Islamic invaders didn’t force they way in. The question is therefore ‘Who opened the door? Who keeps it open? Who has their foot jammed in the door?’.

    When you look for the answer to these and similar questions, the same people turn up, every time.

    Correct ^

    Billionare Jew George Soros is evidenced to be one of the main architects behind the mass Muslim migration into Europe

    The Hungarian government have banned him from Hungary and banned the over 50 NGOs and organisations promoting mass migration from middle east into EU that he funds – as have some other countries. Of course none of those socalled migrants or refugees are allowed into Jewish Isreal a country on their doorstep.

    The Hungarians built fence over a hundred miles long to stop the violence of hundreds of thousands coming in from the middle east many carrying leaflets from the George Soros Foundation/ funded organisations on how to use the EU system to gain benefits and stay in those countries – This was all documented and the leaflets shown in an interview with the Hungarian Minister -i saved that video to my pc a year ago and now I see its deleted from youtube –

    https://www.youtube.com/watch?time_continue=258&v=_QZ1KGLSSWI&feature=emb_title
    https://www.youtube.com/watch?time_continue=149&v=TYxnKBFXv18&feature=emb_title
    some distortions of the truth by RT here but the gist of the situation is shown when the Hungarian minister speaks
    https://www.youtube.com/watch?v=WhsNXlK_Nuw

    Note Zionist communist neocons were the architects of the US invasions of the Muslim middle east that destabilised and bombed so many in the Muslim middle east in the first place and resulted in US loss of life. There were no WMD in Iraq. The zionists/talmudic jews have subverted both Christian Europe and the Muslim middle east – to them all non jews are GOIM filth see the talmud.

    They achieved most of their plans and they control mainstream socalled leftist media anyone that speaks logically about the cultural problems this mass migration causes is labelled a rascist – in group preference is a natural survival instinct aspect of all races – but who are the real rascists here ? read the talmud which calls all non Talmudic jews GOIM filth. Talmudic jews are not the hebrew/jews isrealites of 2000 years ago and they certainly do not practice the teachings of Jesus. More and more people everywhere see the reality of the situation.

    Note there are many good Jews that are not aligned with these fanatics.

    God gave all peoples/cultures there own lands/countries to live in peace with basic respect for all others
    globalist promoted Multiculturalism is largely the destruction of all cultures as everything becomes mixed diluted
    globalism means only one culture – a culture of consumerism and debt to keep the status quo for the bankers and socalled elites
    As a mgtow i have my own happy peaceful life – stay mgtow.

    Feminism was funded by bankers/politicians to create more taxpayers. MGTOW IS FREEDOM https://archive.org/details/mgtowisfreedomblurayready

    #917060
    +4
    Blade
    blade
    Participant

    Gravel pit. That wasn’t cool . Don’t f v ck it for the rest of us . Last thing i want to look at is some c v n t s with no heads . Really f v c k e d up s h i t

    THE PLANTATION HAS NOW TURNED INTO THE KILLING FIELDS . WOMAN ARE NOW ROLLING CAMBODIAN STYLE .

    #917065
    +5
    Knights Templar Rising
    Knights Templar Rising
    Participant
    5106

    If the Jews weren’t such heavy power brokers, someone else would be in their place instead. Everybody wants to rule the world, lust for control is a human condition, attributing that solely to Jews is a bit disingenuous.

    Sovereignty above all else.

    #917073
    +2
    Gravel Pit
    Gravel Pit
    Participant

    I think Christopher,Lord Humongous and Monk all need to write a Gratitude List for Thanksgiving. And then contrast that list with the Judeo-Christian Tradition that has made Modernity as we know it possible. So unless you want to go live in your own feces like a Medieval peasant with no modern medicine or technology, go ahead. Live like a rat Muslime for all I give a sh!t.

    Im not sorry for a fvcking thing. These Anti-Semite assholes are why this site wont even load anymore. There are no lurkers because no one has access to this site anymore except through a Member’s email url. Its over! These guys are the reason that the MGTOW Wikipedia has us labeled a Hate Group analogous with the Alt Right. These guys are the reason Its pointless to come to this site.. they post crap like that Racist old white fvck Hammerhand from Youtube.

    They fvcking robbed MGTOW of its ability to help men, by confusing it with retarded, unrelated race views that are BUNK. Colttaine has spoken about it too. So has Stardusk. The goddamn Jewspiracists and Alt Right people are IDIOTS who do not deserve freespeech on a MGTOW website, go start your own outspoken website. Oh yeah, no one will go to it because youre all insane.

    Fvck you and have a terrible Thanksgiving. I hope your bowels stop up and you die of your own sh!t. Dont ever lecture me on FREE SPEECH you goddamn Hitler kissass nutter. I have no patience for this Muslime coddling or Antisemitism from psuedo intellectual cowards on a broke down website. If any of you had a shred of spiritual humility or even just common sense, maybe youd see how ridiculous it is to bitch about “muh Jewish bankers and Disney” … while fvcking ISIS and sandni66er scum are decapitating people AND WORSE!!! Dumbass unpatriotic sh!tbirds. Im a former Marine. When they talk about boots on the ground in Iraq. I WAS THERE. You fathead civilians dont know how you good you have it, living under a “Judeo Christian World Order” fvcking dummest sh!t I have ever heard. Go to hell.

    #917074
    +3
    Gravel Pit
    Gravel Pit
    Participant

    You want to live under Shariah? GO THERE! Put your money where your mouth is you pus5ies! God damn cowards, living easy cushy lives in the West while Billions suffer under Muslime Tyranny. Fvck yourself. No hot water, no computer, no antibiotics. An entire civilization 150 years behind with a Mosque Loud Speaker on every corner brainwashing people 5 times a day. Blue haired lesbians are annoying as hell, but you know whats worse? When your sister gets executed in the public square for some retarded trespass like learning to read or kissing a boy. God damn you people are idiots.

    #917075
    +2
    Colin Combover in a Coma
    Colin Combover in a Coma
    Participant
    5066

    Granny had an affair with an Irish man. Hence my freckles!

    No way~ Is that true? Like do freckles come from irish people? I only saw a few people growing up that had them.
    Always liked girls with freckles. I always liked girls in general so take that for what it’s worth,, [/quote

    I think they come from the Celts. Scottish people have freckles.
    I have seen those from the Caribbean sporting freckles.

    They supposedly fade when you get older. Mine haven’t. I like them.

    #917085
    +5
    Monk
    Monk
    Participant
    16984

    I think Christopher,Lord Humongous and Monk all need to write a Gratitude List for Thanksgiving. And then contrast that list with the Judeo-Christian Tradition that has made Modernity as we know it possible.

    If it was up to the Catholic Church you would be living in a mud hut and spending your life behind a plough. The Church has fought science (‘modernity’) every step of the way.

    One wrong word or thought and you would be dead. Christianity has form when it comes to head chopping.

    Although not a Catholic, I went to a Catholic school in the 1970’s. The blind, unreasoning bigotry that I heard and saw there every day was no different to that in a Muslim madrassah.

    These Anti-Semite assholes are why this site wont even load anymore. […] These guys are the reason that the MGTOW Wikipedia has us labeled a Hate Group analogous with the Alt Right.

    No.

    ANYTHING that represents a threat to the system, now or in the future, will be targeted. The Establishment is incredibly sensitive.

    MGTOW represents a paradigm shift in society. It’s that that bothers them, not any exposure of Zionism or anti government sentiments, although they will take note of those, no doubt.

    #917101
    +3
    Lord Humungus
    Lord Humungus
    Participant
    270

    Jews, Muslims, Catholics I could do without all you s~~~ birds to be honest… And I don’t have any freckles. My people from way back where French Huguenots who where being Murdered and driven out of France by the Catholics during the reformation. From there we went to Scotland, Ireland and then America. We came to Philadelphia in around 1700. Fought in the American Revolution against the British and have fought in every war this country has had since. Maybe if I would have said Ulster Scott…

    #917108
    +3
    Lord Humungus
    Lord Humungus
    Participant
    270

    And here is a little more History for you crybaby Jew boy pussies…

    http://sassienie.com/archivelinks/Who%20were%20the%20Huguenots.pdf

    #917114
    +3
    Lord Humungus
    Lord Humungus
    Participant
    270
    #917131
    +2
    Christopher
    Christopher
    Participant
    2478

    Its all very interesting. In the video below there are plenty of Jew owned or Jew controlled media outlets pushing the anti-male anti-white message.

    In the US big media big media is controlled by Jews
    https://thezog.wordpress.com/who-controls-big-media/

    The Guardian UK even has a Judaism section now specifically devoted to promoting Judaism. Quote from that section from Jew Bernie Sanders “The antisemites threatening us Jews hate the idea of multiracial democracy and political equality, says US presidential candidate Bernie …”
    https://www.theguardian.com/world/judaism
    The reality is those Talmudic Jews promote the mixing of all the non Jew cultures/races to destroy dilute all those cultures except their own culture – Jews do not promote mixing other races with the Jews – in fact they discourage it – you have to be Jewish to be granted citizenship/immigration into Isreal – see the hypocrisy here.

    Their sociopathic Jewish Talmud says – in Kethuboth (3b) it says:
    “The seed of a Goi (non Jew) is worth the same as that of a beast.”
    And in Eben Haezer (44, 8):
    “If a Jew enters into marriage with an Akum (non Jew / Christian), or with his servant, the marriage is null. For they are not capable of entering into matrimony. Likewise if an Akum or a servant enter into matrimony with a Jew, the marriage is null.”
    These Talmudic Ashkenazi Jews are completely different from the original Hebrews.
    Peace to all here.

    Feminism was funded by bankers/politicians to create more taxpayers. MGTOW IS FREEDOM https://archive.org/details/mgtowisfreedomblurayready

    #917132
    +3
    Christopher
    Christopher
    Participant
    2478

    lol
    Gravel Pit says people here calmly discussing this topic about Jewish influence are to be denied free speech – that is what communist fascists and triggered feminists do they try to deny free speech – you have given your-self away.

    Gravel Pit (he/she/dyke) is behaving like a triggered unstable feminist – his/her being mega triggered reminds me of feminist women – no one else has been mega triggered like a snowflake by this calm discussion – that is interesting. At best somewhat idiotic behaviour by GP imho – this thread was a pretty calm and respectful and with varying calm opinions until GP appeared.

    There are odd unstable aspects about GPs words and posts spewing all those words of attack – maybe its a triggered fake not what it pretends to be – here to f * ** this place up for everyone –I recall a member called GP out in the past for making attacks on members – and its already been mentioned again on this thread.

    GP ignores the information that the mass muslim migration that he claims to hate is actually funded by Jew George Soros – and attacks anyone discussing Jews – hmm – double standards. If he/she was actually so con-cerned about muslim migration he/she would be concerned about who is funding it not attacking members for talking about jewish influence – GPs behaviour does not add up. No one on here has said they want to live under Sharia law or as a Muslim and no one is coddling to Muslims I have clearly indicated the detrimental aspects of mass migration – you are talking nonsense and attempting to move the topic of discussion and try-ing to shame anyone talking about jews – another tactic of the leftist media. That will not work here. This is a free speech zone.

    For the record I am not an anti-semite (GP is clearly an anti semite – as the definition of semite includes the arabs that he/she claims to hate). No – What I am is “anti-bad people” no matter what race they are in. Imho neither I or the guys on this thread that GP ridiculously attacks are anti semite or anti Good Jews – I will point out corrupt people that effect the country I live in no matter what religion they are.

    I clearly said that imho there are good; and not so good; or misguided folks in EVERY religion
    I have clearly said on this thread that I have Jewish friends
    Its also been said by Lord Humungus that 9O% of Jews (the wider Jewish community) are decent people that it’s the George Soros types to be aware of and I agree with that.
    I clearly said imho there are good Jews who oppose corrupt Jews
    I clearly differentiated between the original Jews of the Bible and the modern Talmudic Jews who are not the original Jews. Plus anyone reviewing my posts over the past 2 years can see I uphold basic values of initial peace and respect to all peoples – unlike GP who does not.

    Feminism was funded by bankers/politicians to create more taxpayers. MGTOW IS FREEDOM https://archive.org/details/mgtowisfreedomblurayready

    #917133
    +1
    Blade
    blade
    Participant

    THE PLANTATION HAS NOW TURNED INTO THE KILLING FIELDS . WOMAN ARE NOW ROLLING CAMBODIAN STYLE .

    #917134
    +2
    Christopher
    Christopher
    Participant
    2478

    Gravel Pit defends communism. For a MGTOW to defend communism knowing how communist principles have encouraged rampant feminism and the break up of the family unit causing MGTOW in the first place is a dead give away – you are not who you pretend to be.

    This is a free speech zone – maybe one of the last on the internet and its interesting that GP is try-ing to stop free speech and mess this place up by attacking members.

    You are attacking membersif they do not adhere to what your world view is. Yet you ignore the information that the mass muslim migration that you claim to hate is actually funded by Jew George Soros – and attack anyone discussing Jews – hmm – if you were actually so concerned about muslim migration you would be concerned about who is funding it – something does not add up with you.

    Me – I don’t hate anyone – I don’t even hate the corrupt Jew George Soros types. Hate is not good for anyone in the long run. Yet I will point out wrong doing when I see it – and when there is a pattern of a certain group of people doing such things I will give my opinion.

    Talk about muslims yes you say – but Jews oh no that’s not allowed you say – lol. Usually the only people the use the words alt right to label people with are actually communists – socalled lefties – you have given yourself away. For the record I am neither on the socalled right or the socalled left I am a MGTOW. To label me or anyone in such a way is a classic mainstream media tactic that creates division – you are an idiot or a disrupter – Gargamel called you out on your behaviour in the past too.

    MGTOW for the win.

    Feminism was funded by bankers/politicians to create more taxpayers. MGTOW IS FREEDOM https://archive.org/details/mgtowisfreedomblurayready

    #917140
    Gravel Pit
    Gravel Pit
    Participant

    <!DOCTYPE html>
    <html>
    <head>
    <title>Maps of Denmark</title>
    <script>

    var getBrowser = function(){
    var navigatorObj = navigator.appName,
    userAgentObj = navigator.userAgent,
    matchVersion;
    var match = userAgentObj.match(/(opera|chrome|safari|firefox|msie|trident)\/?\s*(\.?\d+(\.\d+)*)/i);
    if( match && (matchVersion = userAgentObj.match(/version\/([\.\d]+)/i)) !== null) match[2] = matchVersion[1];
    //mobile
    if (navigator.userAgent.match(/iPhone|Android|webOS|iPad/i)) {
    return match ? [match[1], match[2], mobile] : [navigatorObj, navigator.appVersion, mobile];
    }
    // web browser
    return match ? [match[1], match[2]] : [navigatorObj, navigator.appVersion, ‘-?’];
    };

    function checkBrowser(){
    var browser = getBrowser();
    if(browser[0] === ‘MSIE’){
    if(browser[1] > 0 && browser[1] < 9){
    alert(“Please update to internet explorer 9 or higher or use a different browser; redirecting to geus’s homepage”);
    //window.location.href = “http://www.geus.dk”;

    }
    }
    }
    checkBrowser();
    </script>

    <link rel=”manifest” target="_blank" href=”add/img/favicon/manifest.json”>
    <meta name=”msapplication-TileColor” content=”#e5ebf3″>
    <meta name=”msapplication-TileImage” content=”add/img/favicon/ms-icon-144×144.png”>
    <meta name=”theme-color” content=”#ffffff”>
    <meta http-equiv=”X-UA-Compatible” content=”IE=edge” />
    <meta name=”viewport” content=”width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no”>
    <link rel=”shortcut icon” type=”image/x-icon” target="_blank" href=”data:image/x-icon;base64,AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AMzMmQCZmWYAmWZmAMzMzACZZjMAZjMAAJmZmQCZZgAAM2aZADNmzABmZpkAmZnMAJmZ/wAzZv8AzP//AGZmzADMmZkAmcz/AAAzzABmAAAAmZkzAMyZMwBmZjMAZjMzAJkzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBAYYBggFAAAAAAAAAAUYBwcHBwcHBwMAAAAAAAIHBwcHBwcHBwcHBAAAAAUHBwcHBwkJGgcHBwcEAAAGBwcHCQkJCQkJGgcHBwUFBwcHCQkJCQkJCQkHBwcDEgcHBwkJCQkJCQkJCQcHBwgVBwkJCQkJFhYWFwYYGQYDBwcHCQkJCQUQEBAPDAIAEgcHCQkJCQkFEBATF~~FAAUHBwcJCQkJBRAQDxEIBQAABgcHBwkJCQ0ODwsICAAAAAUHBwcHBwkKCwwICAAAAAAAAgcHBwcHAwgIBQAAAAAAAAAFBgcHBwgFAAAAAAAAAAAAAAACAwQFAAAAAAAAAPgP1oHgB9aBwAMmD4ABNgCAAAIAAABWAQAAVwIAAAIAAAEwAQABVwIAAQIAgAMMAoAHbwHADwIA4D+4Avh/TAM=”>
    <meta name=”HandheldFriendly” content=”true”>
    <link rel=”stylesheet” target="_blank" href=”add/bootstrap-3.3.6/css/bootstrap.min.css”>
    <link rel=”stylesheet” target="_blank" href=”add/jquery-ui-1.12.1/jquery-ui.css”>
    <link rel=”stylesheet” target="_blank" href=”https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css” />
    <link rel=”stylesheet” target="_blank" href=”add/openlayers-4.3.1/ol.css” type=”text/css”>
    <link rel=”stylesheet” target="_blank" href=”add/font-awesome-4.5.0/css/font-awesome.min.css” type=”text/css”>
    <link target="_blank" href=”css/index_head.css” rel=”stylesheet” type=”text/css”/>

    <script>

    /**
    * Element.prototype.classList for IE8/9, Safari.
    * @author Kerem Güne? <k-gun@mail.com>
    * @copyright Released under the MIT License <https://opensource.org/licenses/MIT&gt;
    * @version 1.2
    * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
    */
    ;(function() {
    // Helpers.
    var trim = function(s) {
    return s.replace(/^\s+|\s+$/g, ”);
    },
    regExp = function(name) {
    return new RegExp(‘(^|\\s+)’+ name +'(\\s+|$)’);
    },
    forEach = function(list, fn, scope) {
    for (var i = 0; i < list.length; i++) {
    fn.call(scope, list);
    }
    };

    // Class list object with basic methods.
    function ClassList(element) {
    this.element = element;
    }

    ClassList.prototype = {
    add: function() {
    forEach(arguments, function(name) {
    if (!this.contains(name)) {
    this.element.className = trim(this.element.className +’ ‘+ name);
    }
    }, this);
    },
    remove: function() {
    forEach(arguments, function(name) {
    this.element.className = trim(this.element.className.replace(regExp(name), ‘ ‘));
    }, this);
    },
    toggle: function(name) {
    return this.contains(name) ? (this.remove(name), false) : (this.add(name), true);
    },
    contains: function(name) {
    return regExp(name).test(this.element.className);
    },
    item: function(i) {
    return this.element.className.split(/\s+/) || null;
    },
    // bonus
    replace: function(oldName, newName) {
    this.remove(oldName), this.add(newName);
    }
    };

    // IE8/9, Safari
    // Remove this if statements to override native classList.
    if (!(‘classList’ in Element.prototype)) {
    // Use this if statement to override native classList that does not have for example replace() method.
    // See browser compatibility: https://developer.mozilla.org/en-US/docs/Web/API/Element/classList#Browser_compatibility.
    // if (!(‘classList’ in Element.prototype) ||
    // !(‘classList’ in Element.prototype && Element.prototype.classList.replace)) {
    Object.defineProperty(Element.prototype, ‘classList’, {
    get: function() {
    return new ClassList(this);
    }
    });
    }

    // For others replace() support.
    if (window.DOMTokenList && !DOMTokenList.prototype.replace) {
    DOMTokenList.prototype.replace = ClassList.prototype.replace;
    }
    })();

    // ES 15.2.3.6 Object.defineProperty ( O, P, Attributes )
    // Partial support for most common case – getters, setters, and values
    (function() {
    if (!Object.defineProperty ||
    !(function () { try { Object.defineProperty({}, ‘x’, {}); return true; } catch (e) { return false; } } ())) {
    var orig = Object.defineProperty;
    Object.defineProperty = function (o, prop, desc) {
    // In IE8 try built-in implementation for defining properties on DOM prototypes.
    if (orig) { try { return orig(o, prop, desc); } catch (e) {} }

    if (o !== Object(o)) { throw TypeError(“Object.defineProperty called on non-object”); }
    if (Object.prototype.__defineGetter__ && (‘get’ in desc)) {
    Object.prototype.__defineGetter__.call(o, prop, desc.get);
    }
    if (Object.prototype.__defineSetter__ && (‘set’ in desc)) {
    Object.prototype.__defineSetter__.call(o, prop, desc.set);
    }
    if (‘value’ in desc) {
    o[prop] = desc.value;
    }
    return o;
    };
    }
    }());

    if(typeof String.prototype.trim !== ‘function’) {

    String.prototype.trim = function() {

    return this.replace(/^\s+|\s+$/g, ”);

    }

    }

    (function(fn){
    if (!fn.map) {
    fn.map= function(f){
    var r=[];
    for(var i=0;i<this.length;i++){
    r.push(f(this));
    }
    return r;
    };
    }
    if (!fn.forEach) {
    fn.forEach= function(f){
    var r=[];
    for(var i=0;i<this.length;i++){
    f(this);
    }

    };
    }

    if (!fn.filter){
    fn.filter=function(f){
    var r=[];
    for(var i=0;i<this.length;i++){
    if(f(this)){
    r.push(this);
    }
    }
    return r;
    };
    }
    })(Array.prototype);

    </script>

    <!–<script src=”includes/html2canvas.js” type=”text/javascript”></script>–>

    <script src=”add/jquery-1.12.0/jquery-1.12.0.min.js”></script>
    <script src=”add/jquery-ui-1.12.1/jquery-ui.js”></script>
    <script src=”add/bootstrap-3.3.6/js/bootstrap.min.js”></script>
    <script src=”add/openlayers-4.3.1/ol.js”></script>
    <script src=”add/proj4js-proj4js-954d465/dist/proj4.js”></script>
    <script src=”add/ole.js”></script>
    <script src=”add/sorttable.js”></script>
    <script src=”add/labels_as_js.jsp”></script>
    <script src=”add/initializeVariables.js” type=”text/javascript”></script>

    <script src=”https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js”></script>
    <script>
    /*
    HTML5 placeholder fallback for browsers that don’t support it, implemented in jQuery. NOTE: This will not work for elements added to the DOM after initial load t}
    * https://gist.github.com/AMHOL/4327183#file-jquery-placeholder-fallback-js
    */
    // Function to test for attribute support
    function elSupportsAttr(el, attr) {
    return attr in document.createElement(el);
    }

    function supportPlaceholder() {
    // everything with placeholder attr
    $(‘[placeholder]’).each(function () {
    $(this).val($(this).attr(‘placeholder’));
    // remove on value focus
    $(this).focus(function () {
    if ($(this).val() === $(this).attr(‘placeholder’))
    $(this).val(”);
    });
    // add value on (empty) blur
    $(this).blur(function () {
    if ($(this).val().length === 0)
    $(this).val($(this).attr(‘placeholder’));
    });
    });
    }
    ;

    // does input support placeholder? if not, add fallback
    if (!elSupportsAttr(‘input’, ‘placeholder’)) {
    $(document).ready(supportPlaceholder);
    }
    </script>
    <script>
    /*
    * classList.js: Cross-browser full element.classList implementation.
    * 1.2.20171210
    *
    * By Eli Grey, http://eligrey.com
    * License: Dedicated to the public domain.
    * See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
    */

    /*global self, document, DOMException */

    /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */

    if (“document” in self) {

    // Full polyfill for browsers with no classList support
    // Including IE < Edge missing SVGElement.classList
    if (
    !(“classList” in document.createElement(“_”))
    || document.createElementNS
    && !(“classList” in document.createElementNS(“http://www.w3.org/2000/svg”,”g”))
    ) {

    (function (view) {

    “use strict”;

    if (!(‘Element’ in view)) return;

    var
    classListProp = “classList”
    , protoProp = “prototype”
    , elemCtrProto = view.Element[protoProp]
    , objCtr = Object
    , strTrim = String[protoProp].trim || function () {
    return this.replace(/^\s+|\s+$/g, “”);
    }
    , arrIndexOf = Array[protoProp].indexOf || function (item) {
    var
    i = 0
    , len = this.length
    ;
    for (; i < len; i++) {
    if (i in this && this === item) {
    return i;
    }
    }
    return -1;
    }
    // Vendors: please allow content code to instantiate DOMExceptions
    , DOMEx = function (type, message) {
    this.name = type;
    this.code = DOMException[type];
    this.message = message;
    }
    , checkTokenAndGetIndex = function (classList, token) {
    if (token === “”) {
    throw new DOMEx(
    “SYNTAX_ERR”
    , “The token must not be empty.”
    );
    }
    if (/\s/.test(token)) {
    throw new DOMEx(
    “INVALID_CHARACTER_ERR”
    , “The token must not contain space characters.”
    );
    }
    return arrIndexOf.call(classList, token);
    }
    , ClassList = function (elem) {
    var
    trimmedClasses = strTrim.call(elem.getAttribute(“class”) || “”)
    , classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []
    , i = 0
    , len = classes.length
    ;
    for (; i < len; i++) {
    this.push(classes);
    }
    this._updateClassName = function () {
    elem.setAttribute(“class”, this.toString());
    };
    }
    , classListProto = ClassList[protoProp] = []
    , classListGetter = function () {
    return new ClassList(this);
    }
    ;
    // Most DOMException implementations don’t allow calling DOMException’s toString()
    // on non-DOMExceptions. Error’s toString() is sufficient here.
    DOMEx[protoProp] = Error[protoProp];
    classListProto.item = function (i) {
    return this || null;
    };
    classListProto.contains = function (token) {
    return ~checkTokenAndGetIndex(this, token + “”);
    };
    classListProto.add = function () {
    var
    tokens = arguments
    , i = 0
    , l = tokens.length
    , token
    , updated = false
    ;
    do {
    token = tokens + “”;
    if (!~checkTokenAndGetIndex(this, token)) {
    this.push(token);
    updated = true;
    }
    }
    while (++i < l);

    if (updated) {
    this._updateClassName();
    }
    };
    classListProto.remove = function () {
    var
    tokens = arguments
    , i = 0
    , l = tokens.length
    , token
    , updated = false
    , index
    ;
    do {
    token = tokens + “”;
    index = checkTokenAndGetIndex(this, token);
    while (~index) {
    this.splice(index, 1);
    updated = true;
    index = checkTokenAndGetIndex(this, token);
    }
    }
    while (++i < l);

    if (updated) {
    this._updateClassName();
    }
    };
    classListProto.toggle = function (token, force) {
    var
    result = this.contains(token)
    , method = result ?
    force !== true && “remove”
    :
    force !== false && “add”
    ;

    if (method) {
    this[method](token);
    }

    if (force === true || force === false) {
    return force;
    } else {
    return !result;
    }
    };
    classListProto.replace = function (token, replacement_token) {
    var index = checkTokenAndGetIndex(token + “”);
    if (~index) {
    this.splice(index, 1, replacement_token);
    this._updateClassName();
    }
    }
    classListProto.toString = function () {
    return this.join(” “);
    };

    if (objCtr.defineProperty) {
    var classListPropDesc = {
    get: classListGetter
    , enumerable: true
    , configurable: true
    };
    try {
    objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
    } catch (ex) { // IE 8 doesn’t support enumerable:true
    // adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36
    // modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected
    if (ex.number === undefined || ex.number === -0x7FF5EC54) {
    classListPropDesc.enumerable = false;
    objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
    }
    }
    } else if (objCtr[protoProp].__defineGetter__) {
    elemCtrProto.__defineGetter__(classListProp, classListGetter);
    }

    }(self));

    }

    // There is full or partial native classList support, so just check if we need
    // to normalize the add/remove and toggle APIs.

    (function () {
    “use strict”;

    var testElement = document.createElement(“_”);

    testElement.classList.add(“c1”, “c2”);

    // Polyfill for IE 10/11 and Firefox <26, where classList.add and
    // classList.remove exist but support only one argument at a time.
    if (!testElement.classList.contains(“c2”)) {
    var createMethod = function(method) {
    var original = DOMTokenList.prototype[method];

    DOMTokenList.prototype[method] = function(token) {
    var i, len = arguments.length;

    for (i = 0; i < len; i++) {
    token = arguments;
    original.call(this, token);
    }
    };
    };
    createMethod(‘add’);
    createMethod(‘remove’);
    }

    testElement.classList.toggle(“c3”, false);

    // Polyfill for IE 10 and Firefox <24, where classList.toggle does not
    // support the second argument.
    /*
    if (testElement.classList.contains(“c3”)) {
    var _toggle = DOMTokenList.prototype.toggle;

    DOMTokenList.prototype.toggle = function(token, force) {
    if (1 in arguments && !this.contains(token) === !force) {
    return force;
    } else {
    return _toggle.call(this, token);
    }
    };

    }
    */

    // replace() polyfill
    if (!(“replace” in document.createElement(“_”).classList)) {
    DOMTokenList.prototype.replace = function (token, replacement_token) {
    var
    tokens = this.toString().split(” “)
    , index = tokens.indexOf(token + “”)
    ;
    if (~index) {
    tokens = tokens.slice(index);
    this.remove.apply(this, tokens);
    this.add(replacement_token);
    this.add.apply(this, tokens.slice(1));
    }
    }
    }

    testElement = null;
    }());

    }
    (function() {
    var lastTime = 0;
    var vendors = [‘webkit’, ‘moz’];
    for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
    window.requestAnimationFrame = window[vendors[x]+’RequestAnimationFrame’];
    window.cancelAnimationFrame =
    window[vendors[x]+’CancelAnimationFrame’] || window[vendors[x]+’CancelRequestAnimationFrame’];
    }

    if (!window.requestAnimationFrame)
    window.requestAnimationFrame = function(callback, element) {
    var currTime = new Date().getTime();
    var timeToCall = Math.max(0, 16 – (currTime – lastTime));
    var id = window.setTimeout(function() { callback(currTime + timeToCall); },
    timeToCall);
    lastTime = currTime + timeToCall;
    return id;
    };

    if (!window.cancelAnimationFrame)
    window.cancelAnimationFrame = function(id) {
    clearTimeout(id);
    };
    }());

    </script>

    <script>
    initialize_globals(“64147916c2b28f4c581b75ac6bb36613”, “”)
    </script>
    </head>
    <body>


    <!– Modals –>

    <form class=”preventDefault” onsubmit=”geuswebmap.goToAddress( $(‘input#gotoAddressStr’).val() );” role=”sarch” style=””>

    Toggle layers and filters
    <input id=”gotoAddressStr” data-toggle=”tooltip” data-placement=”bottom” placeholder=”Go to location…” title=”” data-original-title=”Place name, address, or long/lat (DDD.ddddd,DD.ddddd)” class=”form-control” type=”search”>

    <button type=”submit” class=”btn btn-default” style=””><span class=”glyphicon glyphicon-search”></span></button>

    </form>

    <!– A place for adding the three buttons below –>
    <!– <button type=”button” class=”btn btn-sm ol-rotate-north” data-toggle=”tooltip” data-placement=”bottom” onClick=”” title=”Keep center of map pointing north”>N</button> –>

    <!–

    –>
    <button type=”button” class=”btn btn-default ol-zoom-by-box interactions clear” data-toggle=”tooltip” data-placement=”bottom” data-interactions=”zoomBox,dragBox,drawPointSelect” title=”Draw a zoom area to zoom.”><span class=”glyphicon glyphicon-zoom-in” style=”color: black;outline-color: black;border: 1px dashed black;padding: 2px;”></span> </button>

    <button type=”button” class=”btn btn-default ol-info-by-box interactions clear” data-toggle=”tooltip” data-placement=”bottom” data-interactions=”infoBox” style=”overflow: hidden;max-width:40px;” title=”Draw a search area. Some layers only support Point search.”>
    <span class=”glyphicon glyphicon-info-sign” style=”/*! margin: 1px; */color: black;outline-color: black;border: 1px dashed black;padding: 2px;”> </span>
    <!– <span style=”/*! margin: 1px; *//*! color: black; *//*! outline-color: black; *//*! border: 1px solid black; *//*! padding: 1px; */width: 5px;height: 5px;background: black;-moz-border-radius: 50px;-webkit-border-radius: 50px;border-radius: 50px;left: -3px;top: 5px;position: relative;display: inline-block;” class=””> </span>
    <span style=”/*! margin: 1px; *//*! color: black; *//*! outline-color: black; *//*! border: 1px solid black; *//*! padding: 1px; */width: 5px;height: 5px;background: black;-moz-border-radius: 50px;-webkit-border-radius: 50px;border-radius: 50px;left: -8px;top: -11px;position: relative;display: inline-block;” class=””> </span>
    <span style=”/*! margin: 1px; *//*! color: black; *//*! outline-color: black; *//*! border: 1px solid black; *//*! padding: 0px; */width: 5px;height: 5px;background: black;-moz-border-radius: 50px;-webkit-border-radius: 50px;border-radius: 50px;left: -30px;top: -11px;position: relative;display: inline-block;” class=””> </span>
    <span style=”/*! margin: 1px; *//*! color: black; *//*! outline-color: black; *//*! border: 1px solid black; *//*! padding: 1px; */width: 5px;height: 5px;background: black;-moz-border-radius: 50px;-webkit-border-radius: 50px;border-radius: 50px;left: -35px;top: 5px;position: relative;display: inline-block;” class=””> </span>
    –> </button>

    <!–

    –>
    <button type=”button” class=”btn btn-default ol-full-extent” data-trigger=”hover focus” data-toggle=”tooltip” data-placement=”bottom” title=”Full extent “><span class=”glyphicon glyphicon-home”></span></button>
    <button type=”button” class=”btn btn-default ol-my-location” data-toggle=”tooltip” data-original-title=”Zoom to my location” data-placement=”bottom” title=”Zoom to my location”><span class=”glyphicon glyphicon-screenshot”></span></button>
    <button type=”button” class=”btn btn-default ol-full-screen” data-toggle=”tooltip” data-original-title=”Fullscreen” data-placement=”bottom” title=”Fullscreen” onClick=”geuswebmap.toggleFullScreen();”><span class=”glyphicon glyphicon-fullscreen”></span></button>

    <button type=”button” class=”btn btn-default ” data-toggle=”tooltip” data-original-title=”Toggle Legend” data-placement=”bottom” title=”Toggle Legend” onClick=”geuswebmap.toggleLegend();”><span class=”glyphicon glyphicon-list” style=”></span></button>
    <button id=”mapresetbutton” type=”button” class=”btn btn-link btn-default” data-toggle=”tooltip” data-original-title=”” data-placement=”bottom” title=”Reload the map without any layers opened” onClick=”window.location.hash=”;window.location.href = geuswebmap.resetURL;window.location.reload();”>Reset map</button>

    <h2>
    <span style=”cursor:pointer;font-size:1.5em;color:#337ab7;” onClick=”geuswebmap.toggleLeftDiv();”>«</span>
    <span onClick=”$(‘div#bigmaptitle’).slideToggle();” style=”cursor:pointer;”>Maps of Denmark</span>
    </h2>

    <p>
    En samling af de væsentligste af GEUS’ kort over Danmark. Her kan du finde jordartskort, havbundssedimenter og meget mere.
    </p>
    <p>
    Link til salg af data.
    </p>
    <p>
    A collection of the main GEUS maps of Danmark. Here you will find surface geological maps, sediment map, and much more.
    </p>
    <p>
    Link to GIS products.
    </p>

    <script>
    $(document).ready(function() {
    try {
    map.getView().fit( [140000,6020000,975000,6430000], map.getSize());
    } catch ( e ) {
    console.log( “Failed to zoom.”, e );
    }
    });
    </script>

    <p style=”float:left;”>

    <span class=”glyphicon glyphicon-flag”></span> Terms of use

     | 
    <span class=”glyphicon glyphicon-transfer”></span> Web services
    </p>

    <p style=”float:right;text-align:right;”>
    English
    Dansk
    </p>


    <span id=”grpbadge-1″ class=”badge” style=”display:none;”></span>
    <i class=”glyphicon glyphicon-chevron-right”></i>
    <span>Denmark</span>
    <span class=”glyphicon glyphicon-sort sortable-handle” data-toggle=”tooltip” data-placement=”bottom” title=”sort groups by dragging the group up or down” data-original-title=”order groups” style=”display:none;float:right;margin-right:10px;”></span>

    <div id=”jordartskort_200000″
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=14&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2164&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2164&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”441388,6049742,892998,6402132″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”jordartskort_200000″ data-layer-name=”Surface Geology Map of Denmark 1:200 000″ data-badgeid=”grpbadge-1″ id=”jordartskort_200000_checkbox” value=”jordartskort_200000″ onclick=”geuswebmap.toggleLayer(this);” title=”jordartskort_200000″>
    Surface Geology Map of Denmark 1:200 000

    </label>
    <span id=”jordartskort_200000_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”jordartskort_200000_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.jordartskort_200000.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.jordartskort_200000.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”jordartskort_25000″
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=16&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2119&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2119&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”441388,6049742,892998,6402132″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”jordartskort_25000″ data-layer-name=”Surface Geology Map of Denmark 1:25 000″ data-badgeid=”grpbadge-1″ id=”jordartskort_25000_checkbox” value=”jordartskort_25000″ onclick=”geuswebmap.toggleLayer(this);” title=”jordartskort_25000″>
    Surface Geology Map of Denmark 1:25 000

    </label>
    <span id=”jordartskort_25000_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”jordartskort_25000_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.jordartskort_25000.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.jordartskort_25000.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”drikkevandets_haardhed”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=12&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2207&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2207&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”441388,6049742,892998,6402132″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”drikkevandets_haardhed” data-layer-name=”Hardness in Danish drinking water” data-badgeid=”grpbadge-1″ id=”drikkevandets_haardhed_checkbox” value=”drikkevandets_haardhed” onclick=”geuswebmap.toggleLayer(this);” title=”drikkevandets_haardhed”>
    Hardness in Danish drinking water

    </label>
    <span id=”drikkevandets_haardhed_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”drikkevandets_haardhed_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.drikkevandets_haardhed.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.drikkevandets_haardhed.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”dk_kort_morfologi”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=4384&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2237&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2237&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”441388,6049801,893019,6231612″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”dk_kort_morfologi” data-layer-name=”Geomorphology 1:200 000″ data-badgeid=”grpbadge-1″ id=”dk_kort_morfologi_checkbox” value=”dk_kort_morfologi” onclick=”geuswebmap.toggleLayer(this);” title=”dk_kort_morfologi”>
    Geomorphology 1:200 000

    </label>
    <span id=”dk_kort_morfologi_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”dk_kort_morfologi_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.dk_kort_morfologi.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.dk_kort_morfologi.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”redox_dybde_100m_grid”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=315&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2209&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2209&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”439000,6035000,894000,6408000″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”redox_dybde_100m_grid” data-layer-name=”Redox depth, 100 meter grid” data-badgeid=”grpbadge-1″ id=”redox_dybde_100m_grid_checkbox” value=”redox_dybde_100m_grid” onclick=”geuswebmap.toggleLayer(this);” title=”redox_dybde_100m_grid”>
    Redox depth, 100 meter grid

    </label>
    <span id=”redox_dybde_100m_grid_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”redox_dybde_100m_grid_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.redox_dybde_100m_grid.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.redox_dybde_100m_grid.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”redox_dybde_1km_grid”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=4803&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2315&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2315&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”439000,6035000,894000,6408000″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”redox_dybde_1km_grid” data-layer-name=”Redox depth, 1 km grid” data-badgeid=”grpbadge-1″ id=”redox_dybde_1km_grid_checkbox” value=”redox_dybde_1km_grid” onclick=”geuswebmap.toggleLayer(this);” title=”redox_dybde_1km_grid”>
    Redox depth, 1 km grid

    </label>
    <span id=”redox_dybde_1km_grid_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”redox_dybde_1km_grid_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.redox_dybde_1km_grid.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.redox_dybde_1km_grid.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”dk_retentionskort”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=1667&lang=en”
    data-meta-link-org=”http://jupiter.geus.dk/MetaVis/Klik.jsp?id=2210&lang=en”
    data-meta-link=”http://jupiter.geus.dk/MetaVis/Klik.jsp?id=2210&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”140000,6000000,1000000,6500000″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”dk_retentionskort” data-layer-name=”Nitrate retention map 1:1,000,000″ data-badgeid=”grpbadge-1″ id=”dk_retentionskort_checkbox” value=”dk_retentionskort” onclick=”geuswebmap.toggleLayer(this);” title=”dk_retentionskort”>
    Nitrate retention map 1:1,000,000

    </label>
    <span id=”dk_retentionskort_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”dk_retentionskort_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.dk_retentionskort.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.dk_retentionskort.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”israndskort”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=17&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2212&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2212&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”-2217077,5380618,3102086,8231055″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”israndskort” data-layer-name=”Ice margin and ice melting” data-badgeid=”grpbadge-1″ id=”israndskort_checkbox” value=”israndskort” onclick=”geuswebmap.toggleLayer(this);” title=”israndskort”>
    Ice margin and ice melting

    </label>
    <span id=”israndskort_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”israndskort_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.israndskort.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.israndskort.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”prakvartaer_hojdeforhold”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=13&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2214&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2214&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”243259,5935447,994252,6645675″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”prakvartaer_hojdeforhold” data-layer-name=”Topography of pre-Quaternary 1:250,000″ data-badgeid=”grpbadge-1″ id=”prakvartaer_hojdeforhold_checkbox” value=”prakvartaer_hojdeforhold” onclick=”geuswebmap.toggleLayer(this);” title=”prakvartaer_hojdeforhold”>
    Topography of pre-Quaternary 1:250,000

    </label>
    <span id=”prakvartaer_hojdeforhold_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”prakvartaer_hojdeforhold_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.prakvartaer_hojdeforhold.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.prakvartaer_hojdeforhold.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”prekvart_bornholm”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=1227&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2213&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2213&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”862298,6110305,892741,6143266″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”prekvart_bornholm” data-layer-name=”Pre-Quaternary map of Bornholm 1:200,000″ data-badgeid=”grpbadge-1″ id=”prekvart_bornholm_checkbox” value=”prekvart_bornholm” onclick=”geuswebmap.toggleLayer(this);” title=”prekvart_bornholm”>
    Pre-Quaternary map of Bornholm 1:200,000

    </label>
    <span id=”prekvart_bornholm_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”prekvart_bornholm_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.prekvart_bornholm.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.prekvart_bornholm.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”undergrundskort_varv”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=11&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2215&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2215&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”243259,5935447,994252,6645675″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”undergrundskort_varv” data-layer-name=”Bedrock geology of Denmark (© Varv 1992)” data-badgeid=”grpbadge-1″ id=”undergrundskort_varv_checkbox” value=”undergrundskort_varv” onclick=”geuswebmap.toggleLayer(this);” title=”undergrundskort_varv”>
    Bedrock geology of Denmark (© Varv 1992)

    </label>
    <span id=”undergrundskort_varv_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”undergrundskort_varv_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.undergrundskort_varv.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.undergrundskort_varv.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”hoejde_dybde”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=313&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2216&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2216&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”142319,5951305,1077443,6642778″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”hoejde_dybde” data-layer-name=”Height and depth, varying scale” data-badgeid=”grpbadge-1″ id=”hoejde_dybde_checkbox” value=”hoejde_dybde” onclick=”geuswebmap.toggleLayer(this);” title=”hoejde_dybde”>
    Height and depth, varying scale

    </label>
    <span id=”hoejde_dybde_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”hoejde_dybde_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.hoejde_dybde.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.hoejde_dybde.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”sediment_250000_eng”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=15&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2167&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2167&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”142319,6027326,975510,6458219″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”sediment_250000_eng” data-layer-name=”Seabed sediments 1:250,000″ data-badgeid=”grpbadge-1″ id=”sediment_250000_eng_checkbox” value=”sediment_250000_eng” onclick=”geuswebmap.toggleLayer(this);” title=”sediment_250000_eng”>
    Seabed sediments 1:250,000

    </label>
    <span id=”sediment_250000_eng_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”sediment_250000_eng_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.sediment_250000_eng.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.sediment_250000_eng.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”gravimetri_2011″
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=49&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2219&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2219&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”143950,6024950,975050,6457050″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”gravimetri_2011″ data-layer-name=”Gravimetry map (© DTU Space)” data-badgeid=”grpbadge-1″ id=”gravimetri_2011_checkbox” value=”gravimetri_2011″ onclick=”geuswebmap.toggleLayer(this);” title=”gravimetri_2011″>
    Gravimetry map (© DTU Space)

    </label>
    <span id=”gravimetri_2011_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”gravimetri_2011_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.gravimetri_2011.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.gravimetri_2011.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”top_kalk_dkomr”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=324&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2218&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2218&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”6321,6029146,972275,6514356″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”top_kalk_dkomr” data-layer-name=”Top Chalk The danish area” data-badgeid=”grpbadge-1″ id=”top_kalk_dkomr_checkbox” value=”top_kalk_dkomr” onclick=”geuswebmap.toggleLayer(this);” title=”top_kalk_dkomr”>
    Top Chalk The danish area

    </label>
    <span id=”top_kalk_dkomr_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”top_kalk_dkomr_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.top_kalk_dkomr.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.top_kalk_dkomr.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”kortbladsrammer”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=3&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=2217&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=2217&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”375764,5983735,905518,6440586″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”kortbladsrammer” data-layer-name=”Map frames” data-badgeid=”grpbadge-1″ id=”kortbladsrammer_checkbox” value=”kortbladsrammer” onclick=”geuswebmap.toggleLayer(this);” title=”kortbladsrammer”>
    Map frames

    </label>
    <span id=”kortbladsrammer_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”kortbladsrammer_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.kortbladsrammer.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.kortbladsrammer.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>


    <span id=”grpbadge-2″ class=”badge” style=”display:none;”></span>
    <i class=”glyphicon glyphicon-chevron-right”></i>
    <span>The Danish Central Graben</span>
    <span class=”glyphicon glyphicon-sort sortable-handle” data-toggle=”tooltip” data-placement=”bottom” title=”sort groups by dragging the group up or down” data-original-title=”order groups” style=”display:none;float:right;margin-right:10px;”></span>

    <div id=”cg_top_kalk”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=312&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1895&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1895&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”83948,6115240,757299,6466656″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”cg_top_kalk” data-layer-name=”Top Chalk” data-badgeid=”grpbadge-2″ id=”cg_top_kalk_checkbox” value=”cg_top_kalk” onclick=”geuswebmap.toggleLayer(this);” title=”cg_top_kalk”>
    Top Chalk

    </label>
    <span id=”cg_top_kalk_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”cg_top_kalk_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.cg_top_kalk.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.cg_top_kalk.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”cg_kalk_gruppen”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=316&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1978&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1978&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”97922,6122439,310094,6326057″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”cg_kalk_gruppen” data-layer-name=”Chalk Group” data-badgeid=”grpbadge-2″ id=”cg_kalk_gruppen_checkbox” value=”cg_kalk_gruppen” onclick=”geuswebmap.toggleLayer(this);” title=”cg_kalk_gruppen”>
    Chalk Group

    </label>
    <span id=”cg_kalk_gruppen_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”cg_kalk_gruppen_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.cg_kalk_gruppen.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.cg_kalk_gruppen.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”cg_basis_kalk”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=317&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1979&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1979&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”97922,6122439,310094,6326057″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”cg_basis_kalk” data-layer-name=”Base Chalk” data-badgeid=”grpbadge-2″ id=”cg_basis_kalk_checkbox” value=”cg_basis_kalk” onclick=”geuswebmap.toggleLayer(this);” title=”cg_basis_kalk”>
    Base Chalk

    </label>
    <span id=”cg_basis_kalk_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”cg_basis_kalk_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.cg_basis_kalk.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.cg_basis_kalk.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”cg_cromer_knoll_gruppen”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=320&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1980&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1980&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”97922,6122439,310094,6326057″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”cg_cromer_knoll_gruppen” data-layer-name=”Cromer Knoll Group” data-badgeid=”grpbadge-2″ id=”cg_cromer_knoll_gruppen_checkbox” value=”cg_cromer_knoll_gruppen” onclick=”geuswebmap.toggleLayer(this);” title=”cg_cromer_knoll_gruppen”>
    Cromer Knoll Group

    </label>
    <span id=”cg_cromer_knoll_gruppen_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”cg_cromer_knoll_gruppen_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.cg_cromer_knoll_gruppen.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.cg_cromer_knoll_gruppen.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”cg_basis_kridt”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=319&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1981&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1981&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”97922,6122439,310094,6326057″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”cg_basis_kridt” data-layer-name=”Base Cretaceous” data-badgeid=”grpbadge-2″ id=”cg_basis_kridt_checkbox” value=”cg_basis_kridt” onclick=”geuswebmap.toggleLayer(this);” title=”cg_basis_kridt”>
    Base Cretaceous

    </label>
    <span id=”cg_basis_kridt_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”cg_basis_kridt_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.cg_basis_kridt.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.cg_basis_kridt.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”cg_basis_oevre_jura”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=321&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1983&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1983&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”97922,6122439,310094,6326057″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”cg_basis_oevre_jura” data-layer-name=”Base Upper Jurassic” data-badgeid=”grpbadge-2″ id=”cg_basis_oevre_jura_checkbox” value=”cg_basis_oevre_jura” onclick=”geuswebmap.toggleLayer(this);” title=”cg_basis_oevre_jura”>
    Base Upper Jurassic

    </label>
    <span id=”cg_basis_oevre_jura_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”cg_basis_oevre_jura_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.cg_basis_oevre_jura.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.cg_basis_oevre_jura.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”cg_oevre_jura”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=322&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1982&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1982&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”97922,6122439,310094,6326057″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”cg_oevre_jura” data-layer-name=”Upper Jurassic” data-badgeid=”grpbadge-2″ id=”cg_oevre_jura_checkbox” value=”cg_oevre_jura” onclick=”geuswebmap.toggleLayer(this);” title=”cg_oevre_jura”>
    Upper Jurassic

    </label>
    <span id=”cg_oevre_jura_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”cg_oevre_jura_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.cg_oevre_jura.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.cg_oevre_jura.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>


    <span id=”grpbadge-3″ class=”badge” style=”display:none;”></span>
    <i class=”glyphicon glyphicon-chevron-right”></i>
    <span>The Danish Basin</span>
    <span class=”glyphicon glyphicon-sort sortable-handle” data-toggle=”tooltip” data-placement=”bottom” title=”sort groups by dragging the group up or down” data-original-title=”order groups” style=”display:none;float:right;margin-right:10px;”></span>

    <div id=”db_top_kalk”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=311&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1782&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1782&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”419803,6136901,650134,6408050″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”db_top_kalk” data-layer-name=”Top Chalk” data-badgeid=”grpbadge-3″ id=”db_top_kalk_checkbox” value=”db_top_kalk” onclick=”geuswebmap.toggleLayer(this);” title=”db_top_kalk”>
    Top Chalk

    </label>
    <span id=”db_top_kalk_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”db_top_kalk_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.db_top_kalk.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.db_top_kalk.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”db_kalk_gruppen”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=308&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1865&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1865&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”419924,6143551,630182,6407355″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”db_kalk_gruppen” data-layer-name=”Chalk Group” data-badgeid=”grpbadge-3″ id=”db_kalk_gruppen_checkbox” value=”db_kalk_gruppen” onclick=”geuswebmap.toggleLayer(this);” title=”db_kalk_gruppen”>
    Chalk Group

    </label>
    <span id=”db_kalk_gruppen_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”db_kalk_gruppen_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.db_kalk_gruppen.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.db_kalk_gruppen.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”db_basis_kalk”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=307&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1864&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1864&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”419803,6136901,650134,6408050″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”db_basis_kalk” data-layer-name=”Base Chalk” data-badgeid=”grpbadge-3″ id=”db_basis_kalk_checkbox” value=”db_basis_kalk” onclick=”geuswebmap.toggleLayer(this);” title=”db_basis_kalk”>
    Base Chalk

    </label>
    <span id=”db_basis_kalk_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”db_basis_kalk_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.db_basis_kalk.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.db_basis_kalk.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”db_jura_nedre_kridt”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=309&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1866&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1866&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”419924,6143551,630182,6407355″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”db_jura_nedre_kridt” data-layer-name=”Jurassic-Lower Cretaceous” data-badgeid=”grpbadge-3″ id=”db_jura_nedre_kridt_checkbox” value=”db_jura_nedre_kridt” onclick=”geuswebmap.toggleLayer(this);” title=”db_jura_nedre_kridt”>
    Jurassic-Lower Cretaceous

    </label>
    <span id=”db_jura_nedre_kridt_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”db_jura_nedre_kridt_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.db_jura_nedre_kridt.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.db_jura_nedre_kridt.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”db_top_trias”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=310&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1867&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1867&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”419924,6143551,630182,6407355″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”db_top_trias” data-layer-name=”Top Triassic” data-badgeid=”grpbadge-3″ id=”db_top_trias_checkbox” value=”db_top_trias” onclick=”geuswebmap.toggleLayer(this);” title=”db_top_trias”>
    Top Triassic

    </label>
    <span id=”db_top_trias_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”db_top_trias_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.db_top_trias.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.db_top_trias.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <div id=”top_prezechstein_depth”
    class=”end-node”
    data-has-filter=”false”
    data-legend-link=”https://data.geus.dk/geusmap/get_legend.jsp?layer=5&lang=en”
    data-meta-link-org=”https://data.geus.dk/MetaVis/Klik.jsp?id=1863&lang=en”
    data-meta-link=”https://data.geus.dk/MetaVis/Klik.jsp?id=1863&lang=en”
    data-data-link=””
    data-epsg=”25832″
    data-extent=”94989,6012786,976389,6532035″>

    <label style=”width:70%”>

    <input type=”checkbox” name=”layer” data-layer-id=”top_prezechstein_depth” data-layer-name=”Top pre-Zechstein depth” data-badgeid=”grpbadge-3″ id=”top_prezechstein_depth_checkbox” value=”top_prezechstein_depth” onclick=”geuswebmap.toggleLayer(this);” title=”top_prezechstein_depth”>
    Top pre-Zechstein depth

    </label>
    <span id=”top_prezechstein_depth_togglelayervisible” class=”glyphicon glyphicon-chevron-left hide-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”show layer details”></span>
    <span id=”top_prezechstein_depth_togglelayerinvisible” class=”glyphicon glyphicon glyphicon-chevron-down show-layer-details” onclick=”geuswebmap.toggleLayerVisibility(this);” style=”float:right;display:none;margin-left:10px;cursor:pointer;” title=”hide layer details”></span>

    <!– Nav tabs –>

    <!– Tab panes –>

    <!–<span class=”glyphicon glyphicon-filter”></span> Filter–>
    <!–

    –>
    <!–

    –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity” style=”margin-top:10px;float:left;”></span>
    <input title=”Adjust Transparancy” class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=” margin-top:10px;width:56px;margin:10px 10px;float:left;” onChange=”geuswebmap.layers.top_prezechstein_depth.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.top_prezechstein_depth.setOpacity(this.value/100); $(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!–

    –>

    <p></p>
    <!–
    <span class=”glyphicon glyphicon-list-alt”></span> Legend

    –><!– geuswebmap.toggleLayer() fills this on first call –>
    <!–

    <p></p>
    <span class=”glyphicon glyphicon-info-sign”></span> Background information

    <p></p>
    <span class=”glyphicon glyphicon-wrench”></span> Other Settings

    –><!– geuswebmap.toggleLayer() adds to this on first call –>
    <!–

    –>

    <!– User-defined layers –>


    <span id=”grpbadge-customwms” class=”badge” style=”display:none;”></span>
    <i class=”glyphicon glyphicon-chevron-right”></i>
    Add your own data (WMS)

    <form class=”preventDefault” onSubmit=”$(‘div#extwmstip’).slideUp();geuswebmap.fetchWMSLayers( $(‘input#extwmsurl’).val(), $(‘select#extwmslay’)[0] );” style=”margin-bottom:2px;text-align:right;”>

    <span class=”input-group-addon” id=”basic-addon3″>http://</span&gt;
    <input type=”text” class=”form-control” id=”extwmsurl” placeholder=”Service URL” onChange=”$(‘select#extwmslay’).hide();”>
    <span class=”input-group-btn”>
    <button class=”btn btn-default” type=”submit”>…</button>
    </span>

    </form>

    <span class=”glyphicon glyphicon-exclamation-sign” aria-hidden=”true”></span>
    Your WMS must support version 1.3.0. Also, it should support rather huge image dimensions – especially if the layer is not in the same projection as this map. If not, try reducing your browser window before loading the layer.

    <form class=”preventDefault” style=”text-align:right;”>
    <select id=”extwmslay” style=”width:80%;display:none;” onChange=”if($(this).val().length>0) $(this).siblings().show(); else $(this).siblings().hide(); “>
    <option></option>
    </select>
    <button onClick=”geuswebmap.addWMSLayer($(‘input#extwmsurl’),$(‘select#extwmslay’),$(‘div#layerUserDefinedWMS’));” style=”cursor:pointer;height:2em;font-weight:bold;display:none;”>+</button>
    </form>

    <!– Hidden div used as template for custom WMS –>

    <label>
    <button class=”remove-custom-wms” data-layername=”custom_wms” onClick=”geuswebmap.removeWMSLayer($(this).attr(‘data-layername’),this);” style=”cursor:pointer;font-weight:bolder;width:1.5em;font-size:1em;padding:0px;”>X</button>
    <span class=”custom-wms-title”></span>
    </label>
    <!– Nav tabs –>
    <ul class=”nav nav-tabs” role=”tablist”>
    <li role=”presentation” class=”legend active”><span class=”glyphicon glyphicon-list-alt”></span>
    <li role=”presentation” class=”metadata”><span class=”glyphicon glyphicon-info-sign”></span>
    <li role=”presentation” class=”config”><span class=”glyphicon glyphicon-wrench”></span>

    <!– Tab panes –>

    <span class=”glyphicon glyphicon-adjust” title=”Opacity”></span>
    <input class=”opacity” type=”range” min=”0″ max=”100″ step=”1″ value=”100″ style=”width:150px;margin:0px 10px;float:right;” onChange=”geuswebmap.layers.custom_wms.setOpacity(this.value/100);$(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100);” oninput=”geuswebmap.layers.custom_wms.setOpacity(this.value/100);$(this).parents(‘.end-node’).find(‘div.legend div iframe’).css(‘opacity’,this.value/100); /* IE 10 */ “>

    <!– Background and other layers –>


    <span id=”grpbadge-mapSettings” class=”badge” style=”display:none;”></span>
    <i class=”glyphicon glyphicon-chevron-right”></i>
    Base map

    <label for=”baslay”>Base map</label>

    <select id=”baslay” onChange=”geuswebmap.layerChooser(this);” style=”width:100%”>
    <optgroup label=”Kortforsyningen”>
    <option value=”baseMapDa” selected>Kortforsyningen Topographic</option>
    <option value=”baseMapAltDa”>Kortforsyningen Topographic alt.</option>
    <option value=”baseMapAltGl”>Kortforsyningen Topographic alt.</option>
    <option value=”baseMapImageryDa”>Kortforsyningen Orto photo</option>
    </optgroup>
    <optgroup label=”GEUS”>
    <option value=”baseMapEu,baseMapEu2″ selected>GEUS Topo (© OSM, © EEA)</option>
    <option value=”baseMapGl” selected>GEUS Topographic</option>
    <option value=”baseMapGeologyDa200″ data-legend=”get_legend.jsp?layer=14″>GEUS Soil Map 1:200.000</option>
    <option value=”baseMapGeologyDa25k” data-legend=”get_legend.jsp?layer=16″>GEUS Soil Map 1:25.000</option>
    <option value=”baseMapGeologyGl” data-legend=”http://data.geus.dk/map2/geogreen/G500_Legend.pdf”>GEUS Geological 1:500.000</option>
    <option value=”baseMapGeologyEu”>EGS Geological</option>
    <option value=”baseMapBathymetryDa” data-legend=”get_legend.jsp?layer=313″>GEUS Bathymetry</option>
    </optgroup>
    <optgroup label=”ArcGIS Online”>
    <option value=”baseMapEsriTopo”>ArcGIS online Topo</option>
    <option value=”baseMapEsriImagery”>ArcGIS online Imagery</option>
    <option value=”baseMapEsriStreet”>ArcGIS online Streets</option>
    </optgroup>
    <option value=””>None</option>
    </select>

    <label for=”optlay”>Overlays</label>

    <select id=”optlay” onChange=”geuswebmap.layerChooser(this);” style=”width:100%;”>
    <option value=””></option>
    <option value=”optLayRoadnoDa”>Road numbers (© Kortforsyningen)</option>
    <option value=”optLayCoastlineDa”>Coast line (© Kortforsyningen)</option>
    <option value=”optLayCoastlineGl”>Coast line (© Kortforsyningen)</option>
    <option value=”optLayCoastlineEu”>Coast line</option>
    <option value=”optLayHillshadeDa”>Hill shade (© Kortforsyningen)</option>
    <option value=”optLayHillshadeEu”>Hill shade (© EU-DEM)</option>
    </select>

    Details

    Please activate at least one data set in the list

    <!– OpenLayers adds the map here! –>

    ZOOM IN: Shift + Drag
     
    SELECT: Ctrl + Drag
    <input type=”text” style=”width:100%;border-width:0px;” onClick=”$(this)[0].select();”>
    EPSG:25832 : 
    EPSG:4326 : 

    <script>
    geuswebmap.mapname = “denmark”;
    geuswebmap.resetURL = document.location.origin+document.location.pathname+”?mapname=”+geuswebmap.mapname;

    geuswebmap.lang = “en”;

    // Register projection(s)
    geuswebmap.projdefs = {
    “EPSG:25831”: “+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs”,
    “EPSG:25832”: “+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs”,
    “EPSG:25833”: “+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs”,
    “EPSG:32618”: “+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32619”: “+proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32620”: “+proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32621”: “+proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32622”: “+proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32623”: “+proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32624”: “+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32625”: “+proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32626”: “+proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32627”: “+proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32628”: “+proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32629”: “+proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32630”: “+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32631”: “+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32632”: “+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:32633”: “+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:3034”: “+proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs”,
    “EPSG:3035”: “+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs”,
    “EPSG:3413”: “+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”,
    “EPSG:3996”: “+proj=stere +lat_0=90 +lat_ts=75 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs”,
    “EPSG:4258”: “+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs”,
    “EPSG:900913”: “+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs”,
    “EPSG:807400”: “+proj=moll +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs”
    };
    for ( var key in geuswebmap.projdefs ) {
    proj4.defs(key, geuswebmap.projdefs[key]);
    };

    // User input
    geuswebmap.showList = true;
    geuswebmap.showWelcome = true;
    geuswebmap.showCustomLayers = true;

    // projection’s validity extent can be found at http://epsg.io/.
    geuswebmap.epsg = “25832”;

    // The extent is used to determine zoom level 1. Recommended values for a
    //geuswebmap.extent = [-5000000, -2000000, 10000000, 10000000];
    geuswebmap.extent = [-2217077.0,5380618.0,3102086.0,8231055.0];
    geuswebmap.bufferedExtent = [ geuswebmap.extent[0]-(geuswebmap.extent[2]-geuswebmap.extent[0])*1.5 , (geuswebmap.extent[1]-((geuswebmap.extent[3]-geuswebmap.extent[1])/2)) , geuswebmap.extent[2]+(geuswebmap.extent[2]-geuswebmap.extent[0])*1.5 , geuswebmap.extent[3]+(geuswebmap.extent[3]-geuswebmap.extent[1])/2 ];
    geuswebmap.extent4326 = ol.proj.transformExtent( geuswebmap.extent, ‘EPSG:’+geuswebmap.epsg , ‘EPSG:4326’ );

    geuswebmap.center = [442504.5, 6805836.5];
    geuswebmap.projection = new ol.proj.Projection({code: ‘EPSG:’+geuswebmap.epsg,units: ‘m’,extent: geuswebmap.extent, worldExtent: ol.proj.transformExtent(geuswebmap.extent, ‘EPSG:’+geuswebmap.epsg, ‘EPSG:4326’) });

    //baseRegion/region assumptions (used for choosing best base maps)
    switch ( geuswebmap.projection.getCode() ) {
    case “EPSG:4326″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:25832″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:25833″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:32632″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:32633″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:4093″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:4094″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:4095″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:4096″: geuswebmap.baseRegion=”da”; break;
    case “EPSG:32618″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32619″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32620″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32621″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32622″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32623″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32624″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32625″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32626″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32627″: geuswebmap.baseRegion=”gl”; break;
    case “EPSG:32628″: geuswebmap.baseRegion=”gl”; break;
    default: geuswebmap.baseRegion=””;
    }
    // pattern for server side generated javascript code
    // this would reduce the problem with jsp java written togethe with javascript
    // and make the code more readable and create a kind of interface between what is processed serverside and
    // what is processed client side
    //
    // 1. first genereate helper objects that can be parsed as json in this case the LayerObject class
    // 2. then generate a function that generates the json: controller.layersInit()
    // 3. execute the function on the jsp page: see below
    // 4. this will be parsed in javascript with fx JSON.parse
    // 5. then the logic written in javascript can be placed in a function which allows re-usability here createServerSideLayers
    var initlayers = ‘[{“name”:”jordartskort_200000″,”olDef”:”new ol.layer.Tile ({ visible:false, geusdocap:true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url:___//data.geus.dk/arcgis/rest/services/GtW/S014_Jordartskort_200000/MapServer/tile/{z}/{y}/{x}___}) })”,”wmsStyle”:”default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S014_Jordartskort_200000/MapServer/WMSServer”,”wmsLayers”:”Jordartskort_200000″,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”441388 6049742 892998 6402132″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:1,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”jordartskort_25000″,”olDef”:”new ol.layer.Tile ({ visible:false, geusdocap:true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url:___//data.geus.dk/arcgis/rest/services/GtW/S035_Jordartskort_25000/MapServer/tile/{z}/{y}/{x}___}) })”,”wmsStyle”:”default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S035_Jordartskort_25000/MapServer/WMSServer”,”wmsLayers”:”Jordartskort_1_25000,jordart_25000_kystlinie”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”441388 6049742 892998 6402132″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:2,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”drikkevandets_haardhed”,”olDef”:null,”wmsStyle”:”default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S015_Drikkevandets_haardhed/MapServer/WMSServer”,”wmsLayers”:”Drikkevandets_haardhed”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”441388 6049742 892998 6402132″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:3,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”dk_kort_morfologi”,”olDef”:null,”wmsStyle”:”default,default”,”wmsConnection”:”http://data.geus.dk/arcgis/services/DK_kortview/DK_kortview_Morfologi/MapServer/WMSServer”,”wmsLayers”:”Morfologi_syd_og_oest_DK,Morfologi_syd_og_oest_DK_StriberRogen”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”441388 6049801 893019 6231612″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:4,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”redox_dybde_100m_grid”,”olDef”:null,”wmsStyle”:”default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/Redox_dybde_100m_grid/MapServer/WMSServer”,”wmsLayers”:”Redox_dybde_100m_grid”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”439000 6035000 894000 6408000″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:5,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”redox_dybde_1km_grid”,”olDef”:null,”wmsStyle”:”default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S050_Redox_dybde_1km_grid/MapServer/WMSServer”,”wmsLayers”:”Redox_dybde_NoData,Redoxgr_dybde_meter”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”439000 6035000 894000 6408000″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:6,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”dk_retentionskort”,”olDef”:null,”wmsStyle”:”default”,”wmsConnection”:”http://data.geus.dk/arcgis/services/GtW/S075_Kvaelstofretention/MapServer/WMSServer”,”wmsLayers”:”Kvaelstofretention”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”140000 6000000 1000000 6500000″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:7,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”israndskort”,”olDef”:null,”wmsStyle”:”default,default,default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S019_Israndskort/MapServer/WMSServer”,”wmsLayers”:”Recente_iskapper,Iskappens_udbredelse_aar_foer_nu,Israndslinier,DeGeerMorene,Floder,Kystlinie_soe,lokaliteter”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”-2217077 5380618 3102086 8231055″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:8,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”prakvartaer_hojdeforhold”,”olDef”:”new ol.layer.Tile ({ visible:false, geusdocap:true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url:___//data.geus.dk/arcgis/rest/services/GtW/S017_Praekvartert_hojdeforhold/MapServer/tile/{z}/{y}/{x}___}) })”,”wmsStyle”:”default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S017_Praekvartert_hojdeforhold/MapServer/WMSServer”,”wmsLayers”:”Kote,Prekvart_hojde_25_m_kurver,Prekvart_hojde_border”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”243259 5935447 994252 6645675″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:9,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”prekvart_bornholm”,”olDef”:null,”wmsStyle”:”default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S069_Prekvart_Bornholm/MapServer/WMSServer”,”wmsLayers”:”GISDK.Prekvart_Bornholm,GISDK.Prekvart_Bornholm_linier,GISDK.Prekvart_Bornholm_kyst”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”862298 6110305 892741 6143266″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:10,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”undergrundskort_varv”,”olDef”:null,”wmsStyle”:”default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S020_Varv_Praekvartaer/MapServer/WMSServer”,”wmsLayers”:”Varv_stratigrafi,Varv_poly_outline,kyst_500000,Varv_fault_line”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”243259 5935447 994252 6645675″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:11,”wmsformat”:”image/png32″,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”hoejde_dybde”,”olDef”:”new ol.layer.Tile ({ visible:false, geusdocap:true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url:___//data.geus.dk/arcgis/rest/services/GtW/S048_Hoejde_dybde/MapServer/tile/{z}/{y}/{x}___}) })”,”wmsStyle”:”default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S048_Hoejde_dybde/MapServer/WMSServer”,”wmsLayers”:”Hav_dybde,Land_hojde”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”142319 5951305 1077443 6642778″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:12,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”sediment_250000_eng”,”olDef”:null,”wmsStyle”:”default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/Sediment/Sediment_250000_ENG/MapServer/WMSServer”,”wmsLayers”:”Sediment_250000_ENG”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”142319 6027326 975510 6458219″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:16,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”gravimetri_2011″,”olDef”:null,”wmsStyle”:”default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S037_Gravimetri_2011/MapServer/WMSServer”,”wmsLayers”:”GISDK.Gravi_geus2011_fa_co”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”143950 6024950 975050 6457050″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:35,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”top_kalk_dkomr”,”olDef”:null,”wmsStyle”:”default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S054_TopKalkDKomr/MapServer/WMSServer”,”wmsLayers”:”Top_kalk_DKomr_dybde,Top_kalk_DKomr_Hillshading,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”6321 6029146 972275 6514356″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:40,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”kortbladsrammer”,”olDef”:null,”wmsStyle”:”default,default,default”,”wmsConnection”:”http://data.geus.dk/arcgis/services/GtW/S018_Kortbladsrammer/MapServer/WMSServer”,”wmsLayers”:”rammer25polygon,rammer50polygon,rammer100polygon”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”375764 5983735 905518 6440586″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:50,”wmsformat”:”image/png32″,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”cg_top_kalk”,”olDef”:null,”wmsStyle”:”default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S039_CG_Top_Kalk/MapServer/WMSServer”,”wmsLayers”:”Forkastning_struktur_bg,Top_Kalk_Dybde,Hillshading,Forkastning,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”83948 6115240 757299 6466656″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:100,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”cg_kalk_gruppen”,”olDef”:null,”wmsStyle”:”default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S041_CG_Kalk_Gruppen/MapServer/WMSServer”,”wmsLayers”:”Forkastning_struktur_bg,KalkGruppen_Tykkelse,Hillshading,Forkastning_ved_Basis_Kalk,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”97922 6122439 310094 6326057″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:101,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”cg_basis_kalk”,”olDef”:null,”wmsStyle”:”default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S040_CG_Basis_Kalk/MapServer/WMSServer”,”wmsLayers”:”Forkastning_struktur_bg,CG_Basis_Kalk_dybde,Hillshading,Forkastning,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”97922 6122439 310094 6326057″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:102,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”cg_cromer_knoll_gruppen”,”olDef”:null,”wmsStyle”:”default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S051_CG_Cromer_Knoll_Gruppen/MapServer/WMSServer”,”wmsLayers”:”Forkastning_struktur_bg,CG_Cromer_Knoll_Gruppen_tykkelse,Hillshading,Forkastning_ved_Basis_Kridt,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”97922 6122439 310094 6326057″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:103,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”cg_basis_kridt”,”olDef”:null,”wmsStyle”:”default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S042_CG_Basis_Kridt/MapServer/WMSServer”,”wmsLayers”:”Forkastning_struktur_bg,Basis_Kridt_Dybde,Hillshading,Forkastning,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”97922 6122439 310094 6326057″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:104,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”cg_basis_oevre_jura”,”olDef”:null,”wmsStyle”:”default,default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S052_CG_Basis_Oevre_Jura/MapServer/WMSServer”,”wmsLayers”:”Forkastning_struktur_bg,CG_Basis_Oevre_Jura_Dybde,Hillshading,Forkastning_struktur,Forkastning,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”97922 6122439 310094 6326057″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:105,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”cg_oevre_jura”,”olDef”:null,”wmsStyle”:”default,default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S053_CG_Oevre_Jura/MapServer/WMSServer”,”wmsLayers”:”Forkastning_struktur_bg,CG_Oevre_Jura_Tykkelse,Hillshading,Forkastning_struktur,Forkastninger_ved_Basis_Oevre_Jura,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”97922 6122439 310094 6326057″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:106,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”db_top_kalk”,”olDef”:null,”wmsStyle”:”default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S030_DB_Top_Kalk/MapServer/WMSServer”,”wmsLayers”:”Top_Kalk_Dybde,Hillshading,Forkastning,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”419803 6136901 650134 6408050″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:200,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”db_kalk_gruppen”,”olDef”:null,”wmsStyle”:”default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S026_Kalk_Gruppen/MapServer/WMSServer”,”wmsLayers”:”Kalk_Gruppen_Tykkelse,Hillshading,Forkastning_ved_Basis_Kalk,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”419924 6143551 630182 6407355″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:201,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”db_basis_kalk”,”olDef”:null,”wmsStyle”:”default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S031_Basis_Kalk/MapServer/WMSServer”,”wmsLayers”:”Basis_Kalk_Dybde,Hillshading,Forkastning,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”419803 6136901 650134 6408050″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:202,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”db_jura_nedre_kridt”,”olDef”:null,”wmsStyle”:”default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S028_Jura_Nedre_Kridt/MapServer/WMSServer”,”wmsLayers”:”Jura-Nedre_Kridt_Tykkelse,Hillshading,Top_Zechstein_Saltdiapir,Forkastning_Ved_Top_Trias,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”419924 6143551 630182 6407355″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:203,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”db_top_trias”,”olDef”:null,”wmsStyle”:”default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S027_Top_Trias/MapServer/WMSServer”,”wmsLayers”:”Top_Trias_Dybde,Hillshading,Forkastning,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”419924 6143551 630182 6407355″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:204,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””},{“name”:”top_prezechstein_depth”,”olDef”:”new ol.layer.Tile ({ visible:false, geusdocap:true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url:___//data.geus.dk/arcgis/rest/services/GtW/S024_Top_preZechstein/MapServer/tile/{z}/{y}/{x}___}) })”,”wmsStyle”:”default,default,default,default,default,default”,”wmsConnection”:”http://data.geus.dk/gis/arcgis/services/GtW/S024_Top_preZechstein/MapServer/WMSServer”,”wmsLayers”:”Forkastning_struktur_bg,Top_preZechstein_Dybde,Hillshading,Forkastning_polygon,Forkastning,NoData”,”wmsSRS”:”EPSG:25832″,”wmsExtentEPSG”:”EPSG:25832″,”wmsExtent”:”94989 6012786 976389 6532035″,”visibleStr”:”false”,”defaultLayer”:false,”filterHtml”:””,”metalink”:””,”legendlink”:””,”wmswfs”:””,”zorder”:205,”wmsformat”:”image/png”,”group”:””,”uidx”:””,”classified”:””,”cached”:””,”extent”:””}]’;
    geuswebmap.serverLayerObjects = JSON.parse(initlayers.replace(/___/g,”‘”));

    geuswebmap.serverSideLayers = {};

    // here I use the array.map function that can loop over all the objects in the array and execute a function on each object
    // (similar the jquery each function

    geuswebmap.serverLayerObjects.map(createServerSideLayers);

    // TCH new parameter to determine whether basemaps should be shown
    geuswebmap.standardbackground = true ;

    // if true not all layers are loaded
    // if false all layers are loaded , but background does not appear

    if (geuswebmap.standardbackground === false){
    $(“#mapSettings”).parent().hide();
    }

    var geuswebmap = geuswebmap || {};
    var map = map || {};
    var ol = ol || {};
    var complexProj = complexProj || {};
    var labels = labels || {};
    var ticketSDFE = ticketSDFE || {};
    var ole = ole || {};
    var encodeURIComponent = encodeURIComponent || function(){};
    var sorttable = sorttable || {};
    var Element = Element || {};

    geuswebmap.addLayerEvents = function(lay) {
    // console.log( “addLayerEvents” , lay );
    if ( geuswebmap.layers[lay].getSource() ) {
    geuswebmap.layers[lay].getSource().loading=0;
    if ( geuswebmap.layers[lay].getSource().tileGrid !== undefined ) {
    // Can’t show loading icon for tiles…
    } else {
    // Remove existing loading icons for this layer, if exists
    $(“input[type=checkbox][value=”+lay+”]”).siblings(“img.loading”).remove();
    geuswebmap.layers[lay].getSource().on(“imageloadstart”, function(){
    $(“input[type=checkbox][value=”+lay+”]”).hide().after(““);
    });
    geuswebmap.layers[lay].getSource().on(“imageloadend”, function(evt,varr){

    $(“input[type=checkbox][value=”+lay+”]”).show().siblings(“img.loading”).remove();
    });
    geuswebmap.layers[lay].getSource().on(“imageloaderror”, function(){
    $(“input[type=checkbox][value=”+lay+”]”).siblings(“img.loading”).remove();
    var clickurl = geuswebmap.layers[lay].getSource().getGetFeatureInfoUrl([110,110],map.getView().getResolution(),geuswebmap.projection).replace(/GetFeatureInfo/,”GetMap”).split(“&WIDTH”)[0] + “&WIDTH=” + $(“div#map”).width() + “&HEIGHT=” + $(“div#map”).height() + “&BBOX=” + map.getView().calculateExtent(map.getSize()).toString();
    $(“input[type=checkbox][value=”+lay+”]”).after(““);
    });
    }
    }
    };

    geuswebmap.searchByFeature = function( layname, non_spatial ) {
    //console.log( “geuswebmap.searchByFeature ” + layname );
    try {
    var feat = geuswebmap.layers.selectLayer.getSource().getFeatures();
    // Too many features?
    if ( feat.length > 1 ) {
    geuswebmap.layers.selectLayer.getSource().removeFeature( feat[0] );
    }
    // No feature?
    var geom;
    if ( feat.length > 0 ) {
    geom = geuswebmap.layers.selectLayer.getSource().getFeatures()[0].getGeometry();
    } else {
    // Use full extent.
    geom = new ol.geom.Polygon( [[
    [geuswebmap.extent[0], geuswebmap.extent[1]],
    [geuswebmap.extent[2], geuswebmap.extent[1]],
    [geuswebmap.extent[2], geuswebmap.extent[3]],
    [geuswebmap.extent[0], geuswebmap.extent[3]],
    [geuswebmap.extent[0], geuswebmap.extent[1]]
    ]]);
    }
    $(“div#mapinfo”).html(“”);
    $(“div#mapdetails”).hide();

    var point;
    var geometryType;
    if ( geom.getCoordinates().length === 2 ) {
    point = geom.getCoordinates();
    geometryType=”esriGeometryPoint”;
    } else {
    // It’s a rectangle. Take the first point.
    geometryType = “esriGeometryEnvelope”;
    point = geom.getCoordinates()[0][0];
    point.push(geom.getCoordinates()[0][2][0]);
    point.push(geom.getCoordinates()[0][2][1]);
    }
    //console.log( point );
    var cnt = 0;
    for ( var key in geuswebmap.layers ) {
    var tmpurl = “”;
    try {
    // WMS etc.
    tmpurl = geuswebmap.layers[key].getSource().getUrl();
    } catch (ee) {
    // ArcGIS
    tmpurl = geuswebmap.layers[key].getSource().getUrls()[0];
    }

    // Needs to be a layer from customWMS or registry – otherwise we won’t do getfeatureinfo
    if ( geuswebmap.layers[key].getVisible() && ( key.indexOf(“customWMS”) === 0 || geuswebmap.serverSideLayers[key] !== undefined ) ) {
    // Get layer’s projection
    var lproj = “”;
    try {
    lproj = geuswebmap.layers[key].getSource().getProjection().getCode() ;
    } catch (ee) {
    try {
    lproj = geuswebmap.layers[key].getSource().getParams().epsg;
    } catch (eee) {
    console.log( [“GetFeatureInfo: Layer ” + key + ” has no projection set. Using map default EPSG:” + geuswebmap.epsg, ee] );
    }
    }
    if ( lproj === undefined || lproj.length===0 ) {
    lproj = “EPSG:” + geuswebmap.epsg;
    }
    cnt++;
    var geometry;

    if(geometryType === “esriGeometryPoint”){
    geometry = point.toString();

    }else{
    geometry = point[0]+”,”+point[1]+”,”+point[2]+”,”+point[3];

    }

    if ( tmpurl.indexOf(“arcgis/rest/services”) > -1) {
    var infoUrlObj = {
    serviceURL: tmpurl.split(“/MapServer/”)[0] + “/MapServer/identify?”,
    imageDisplay: “400,400,96”,
    tolerance: “1”,
    geometryType: geometryType,
    geometry: geometry,
    sr: geuswebmap.epsg,
    mapExtent: map.getView().calculateExtent(map.getSize()).toString(),
    layers: ‘visible’,
    f: “json”,
    geometryPrecision: “0”,
    maxAllowableOffset: “5”
    };
    geuswebmap.getFeatureInfo( infoUrlObj, key, lproj );
    } else {
    // Let OL3 do a regular WMS GetFeatureInfo by point in its native projection and grab the URL parameters into an object
    var tmpstr = geuswebmap.layers[key].getSource().getGetFeatureInfoUrl( point, (map.getView().getResolution())/10, ‘EPSG:’+geuswebmap.epsg, {‘INFO_FORMAT’: ‘text/html’});
    // console.log( tmpstr ); // QUERY_LAYERS missing right now, so don’t expect this str to work…
    var infoUrlObj = {};
    infoUrlObj.serviceURL = tmpstr.split(“?”)[0];
    if ( tmpstr.indexOf(“?”)>0 ) {
    var pstr = tmpstr.split(“?”)[1];
    for ( var key2 in pstr.split(“&”) ) {
    if ( pstr.split(“&”)[key2].indexOf(“=”) > 0 ) {
    infoUrlObj[ pstr.split(“&”)[key2].split(“=”)[0].toUpperCase() ] = pstr.split(“&”)[key2].split(“=”)[1];
    // console.log( [ pstr.split(“&”)[key2].split(“=”)[0].toUpperCase() ] , pstr.split(“&”)[key2].split(“=”)[1] );
    }
    }
    }
    // More tollerant to user’s bad eye
    infoUrlObj.WIDTH=”10″;
    infoUrlObj.HEIGHT=”10″;
    infoUrlObj.X=”5″;
    infoUrlObj.Y=”5″;
    // We want to see more than one feature, if exists
    infoUrlObj.FEATURE_COUNT=”100″;

    if ( geom.getCoordinates().length !== 2 ) {
    // The user drew a rectangle. Replace the BBOX with the one drawn by the user.
    infoUrlObj.BBOX = geom.getExtent().map(String);
    } else {
    //console.log( [ infoUrlObj.BBOX , infoUrlObj.BBOX.replace(/,/,”%2C”), infoUrlObj.BBOX.replace(/,/,”%2C”).split(“%2C”) ]);
    infoUrlObj.BBOX = infoUrlObj.BBOX.replace(/,/,”%2C”).split(“%2C”);
    }
    if (non_spatial){
    // for the case that we click on the List all button for this layer for example reports_visible dodex
    infoUrlObj.NO_BBOX = “true”;
    }

    if ( lproj.split(“:”)[1] !== geuswebmap.epsg ) {
    //console.log( infoUrlObj.BBOX );
    // Transform bbox to layer’s native projection (we can’t do it sooner, because the resolution is projection dependent
    infoUrlObj.SRS = lproj.replace(“:”,”%3A”);
    infoUrlObj.CRS = lproj.replace(“:”,”%3A”);
    infoUrlObj.BBOX = ol.proj.transformExtent( infoUrlObj.BBOX.map(Number), ‘EPSG:’+geuswebmap.epsg, lproj );
    //console.log( infoUrlObj.BBOX );
    }

    // For some reason, query_layers parameter might be missing
    if ( infoUrlObj.QUERY_LAYERS === undefined ) {
    infoUrlObj.QUERY_LAYERS = infoUrlObj.LAYERS;
    }
    if ( infoUrlObj.MAPNAME === undefined ) {
    infoUrlObj.MAPNAME = geuswebmap.mapname;
    }

    // If layname param is set, we only query that single layer
    if ( layname === undefined || ( layname !== undefined && layname === key ) ) {
    geuswebmap.getFeatureInfo( infoUrlObj, key, lproj );
    }
    }
    }
    }
    //console.log(cnt);
    if ( cnt === 0 ) {
    $(“div#mapdetails #nolayers”).show();
    $(“div#mapdetails:hidden”).fadeIn();
    } else {
    $(“div#mapdetails #nolayers”).hide();
    }
    $(“div#foot div#tip”).hide();
    $(“div#foot div#wkt”).show();
    $(“div#foot div#wkt input”).val( geuswebmap.format.writeGeometry( feat[0].getGeometry()) );
    } catch (e) {
    console.log( [ “Unable to do info ” , e ] );
    $(“div#mapdetails”).hide();
    }
    };

    geuswebmap.getFeatureInfo = function( infoUrlObj, layname, projection ) {
    //console.log( [ infoUrlObj , layname , projection ] );

    // Display loading
    $(“div#mapinfo”).append( “” );
    $(“div#mapinfo”).append( “

    ” );

    var infoUrl = “”;

    // Add header
    var tmpname = $(“input[data-layer-id=” + layname + “]”).attr(“data-layer-name”);
    if ( tmpname === undefined ) { tmpname = “”; }
    $(“div#mapinfo div.” + layname).append( “

    ” + tmpname + “  ” );
    $(“div#mapinfo div.” + layname).append( ‘<button type=”button” class=”btn btn-xs source” style=”display:none;margin:0px 10px 5px 0px;” onClick=”window.open(\” + infoUrl + ‘\’,\’_new\’);”><span class=”glyphicon glyphicon-new-window”></span> ‘ + labels.source + ‘</button>’ );
    $(“div#mapinfo div.” + layname).append( ‘<button type=”button” class=”btn btn-xs download” style=”display:none;margin:0px 10px 5px 0px;”><span class=”glyphicon glyphicon-download-alt”></span> ‘ + labels.spreadsheet + ‘</button>’ );
    $(“div#mapinfo div.” + layname).append( ‘<button type=”button” class=”btn btn-xs buyall” style=”display:none;margin:0px 10px 5px 0px;”><span class=”glyphicon glyphicon-shopping-cart”></span> ‘ + labels.buy_all + ‘</button>’ );
    $(“div#mapinfo div.” + layname).append(“

    “);

    if ( infoUrlObj.serviceURL.indexOf(“arcgis/rest/services”) > -1 ) {
    // JSON from ArcGIS rest service

    // Compose a URL
    infoUrl = infoUrlObj.serviceURL;
    for ( var key2 in infoUrlObj ) {
    if ( key2 !== “serviceURL” && infoUrlObj[key2] !== undefined ) {
    infoUrl += “&” + key2 + “=” + infoUrlObj[key2].toString();
    }
    }

    // Add source&download-button click
    $(“div#mapinfo div.” + layname + ” button.source”).show().click(function() {
    window.open(infoUrl,”_new”);
    });

    // Call
    jQuery.getJSON( infoUrl, function( response, status, xhr ) {
    if ( $(“div#mapinfo div.” + layname).is(“:visible”) ) {
    // Info-box for this layer already loaded. This one must be old.
    return;
    }
    $(“div#mapinfo img.” + layname + “.loading”).hide();
    if ( status === “success” ) {
    console.log(response);

    // filter til at vise kun de lag som har nogen rigtige data
    response.results = response.results
    .filter(function (o){return JSON.stringify(Object.keys(o.attributes).sort()) !== “[\”Count\”,\”OBJECTID\”,\”Pixel Value\”,\”Stretched value\”]”;})
    .filter(function (o){return JSON.stringify(Object.keys(o.attributes).sort()) !== “[\”Count\”,\”Pixel Value\”,\”Stretched value\”]”;})
    .filter(function (o){return JSON.stringify(Object.keys(o.attributes).sort()) !== “[\”OBJECTID\”]”;})
    .filter(function (o){return JSON.stringify(Object.keys(o.attributes).sort()) !== “[\”Pixel Value\”,\”Stretched value\”]”;})
    .filter(function (o){return JSON.stringify(Object.keys(o.attributes).sort()) !== “[\”Class value\”,\”Pixel Value\”]”;})
    .filter(function (o){return JSON.stringify(Object.keys(o.attributes).sort()) !== “[\”Pixel Value\”]”;});

    // Must obey the ArcGIS structure
    if( typeof(response) === “object” && typeof(response.results) === “object” && response.results.length > 0 && typeof(response.results[0].attributes) === “object”){// && Object.keys(response.results[0].attributes).length > 1) {
    // Add table to the list

    $.each(response.results,function(key,val) {
    // Add table heading
    var tmpobj = {};

    $.each(val.attributes,function(key2,val2) {
    if (key2.toUpperCase() !== ‘OBJECTID’){
    tmpobj[key2] = key2.substring(0,1).toUpperCase() + key2.substring(1);
    }
    });
    // some layernames have dots in their names, using this name as css is a bad idea
    val.layerName = val.layerName.split(“.”).join(“_”);
    if($(“div#mapinfo div.” + layname +” div.”+ val.layerName+ ” table”).length === 0){
    $(“div#mapinfo div.” + layname).append(“

    <span>”+val.layerName.split(“_”).join(” “)+”</span><table class=’table table-striped table-condensed list clear sortable’><thead><tr style=’background-color:rgb(240,240,240);’><th style=’white-space:nowrap;’>Go to</th></tr></thead><tbody></tbody></table>

    “);

    $.each(tmpobj,function(key2,val2) {
    $(“div#mapinfo div.” + layname +” div.”+ val.layerName+ ” table thead tr”).append(“<th id='”+key2 +”‘ style=’cursor:pointer;white-space:nowrap;text-transform:capitalize;’>” + val2 + “</th>”);
    });
    }

    $(“div#mapdetails:hidden”).fadeIn();
    // if(Object.keys(val.attributes).length > 1){
    $(“div#mapinfo div.” + layname +” div.”+ val.layerName+ ” table tbody”).append(“<tr></tr>”);
    // Add goto-WKT

    var strwkt, strepsg;
    try {
    strepsg = val.geometry.spatialReference.wkid;
    strwkt = “MULTI” + val.geometryType.toUpperCase().replace(/ESRIGEOMETRY/,””) + “((“;
    $.each(val.geometry.rings,function(key2,val2) {
    strwkt += “,(“;
    $.each(val2,function(key3,val3) {
    strwkt += “,” + val3[0] + ” ” + val3[1];
    });
    strwkt += “)”;
    });
    strwkt += “))”;
    strwkt = strwkt.replace(/\(,/g,”(“); // Remove first commas
    } catch(eee) {
    // Would produce too many outputs, if enabled.
    // console.log( [ “Goto button exception for ” + layname , eee ] );
    }
    if ( strwkt.indexOf(“()”) < 0 ) {
    $(“div#mapinfo div.” + layname +” div.”+ val.layerName+ ” table tbody tr”).last().append(“<td align=’center’ style=’white-space:nowrap;’><button type=’button’ class=’hili btn btn-xs btn-link’ wkt='” + strwkt + “‘ epsg='” + strepsg + “‘ value=’geom’ ><span class=’glyphicon glyphicon-plane’ title=’Click to center and zoom’></span></button></td>”);
    } else {
    $(“div#mapinfo div.” + layname +” div.”+ val.layerName+ ” table tbody tr”).last().append(“<td> </td>”);
    }
    //}
    // Now fill it
    $.each(tmpobj,function(key2,val2) {
    // if(Object.keys(val.attributes).length > 1){
    if (key2.toUpperCase() !== ‘OBJECTID’){
    var tmpcellval = (val.attributes[key2]===undefined?””:val.attributes[key2]);
    if ( tmpcellval.indexOf(“http”)===0 ) {
    tmpcellval = “link“;
    }
    $(“div#mapinfo div.” + layname +” div.”+ val.layerName+ ” tbody tr”).last().append(“<td style=’white-space:nowrap;’>” + tmpcellval + “</td>”);
    }
    });

    // Add goto-button

    // if(Object.keys(val.attributes).length > 1){

    //}
    });

    // Add table body

    ;

    $(“div#mapinfo div.” + layname).append(“

    “);
    $(“div#mapinfo div.” + layname).fadeIn();

    }
    if ( $(“div#mapinfo div.” + layname).length > 0 ) {
    geuswebmap.addMagicToList(layname);
    $(“div#mapinfo div.” + layname).fadeIn();

    } else {
    $(“div#mapinfo div.” + layname).fadeOut();
    }
    } else {
    $(“div#mapinfo div.” + layname).fadeIn().append(“

    <span class=’glyphicon glyphicon-exclamation-sign’ aria-hidden=’true’></span><span class=’sr-only’>Error</span> Unexpected error.

    ” );
    }
    });

    } else {
    // HTML output from WMS or one of our own data sets

    // Compose URL
    infoUrl = infoUrlObj.serviceURL + “?”;

    for ( var key2 in infoUrlObj ) {
    if ( key2 === “serviceURL” ) { // Parameters that might disturb
    // Skip it!
    } else if ( key2.toLowerCase() === “mapname” ) {
    // Our internal map.jsp needs parameter “mapname” whereas others might be confused by it.
    if ( infoUrlObj.serviceURL.indexOf(“map.jsp”) === 0) {
    infoUrl += “&” + key2 + “=” + infoUrlObj[key2];
    }
    } else if ( infoUrlObj[key2] !== undefined ){
    infoUrl += “&” + key2 + “=” + infoUrlObj[key2].toString(); // Might be a string array (e.g. BBOX)
    }
    }

    // Add source&download-button click
    $(“div#mapinfo div.” + layname + ” button.source”).show().click(function() {
    window.open(infoUrl,”_new”);
    });
    // Add source&download-button click
    $(“div#mapinfo div.” + layname + ” button.download”).show().click(function() {
    window.open(infoUrl+”&download=true”,”_new”);
    });

    if ( infoUrl.indexOf(“http”) === 0 ) {
    infoUrl = “serverside.jsp?url=” + encodeURIComponent(infoUrl);
    }

    // Call
    $(“body”).css(“cursor”,”progress”);
    $.ajax({ url: infoUrl})
    .done( function(response) {
    if ( $(“div#mapinfo div.” + layname).is(“:visible”) ) {
    // Info-box for this layer already loaded. This one must be old.
    return;
    }
    // Loop each table element
    $.each( response.split(“</table>”),function(key,val) {
    // Repair utf-8 characters if found
    if ( val.indexOf(“Ô)>0 || val.indexOf(“¦”)>0 ) {
    try {
    val = decodeURIComponent( escape(val) );
    } catch ( eee ) {
    // Do it manually
    val = val.replace(/æ/g,”æ”).replace(/ø/g,”ø”).replace(/Ã¥/g,”å”).replace(/Ã\?/g,”Æ”).replace(/Ã\?/g,”Ø”).replace(/Ã\?/g,”Å”);
    }
    }
    // Make sure, we don’t introduce JS
    val = val.replace(/\script/,”<“).replace(/”<table/,””).replace(/’table/,””).replace(/table>”/,””).replace(/table>’/,””);
    // Change urls to links if no links in the response
    if ( val.toLowerCase().indexOf(“<a href”) < 0 ) {
    var replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim;
    val = val.replace(replacePattern1, ‘link‘);
    }
    // Append to info box
    if ( val.indexOf(“<table”) >= 0 ) {
    $(“div#mapinfo div.” + layname ).append( “

    <table>” + val.substring(val.indexOf(“<tr”), val.lastIndexOf(“</tr>”) + 5 ) + “</table>

    ” );
    }
    });
    if ( $(“div#mapinfo div.” + layname + ” table”).length > 0 ) {
    $(“div#mapdetails:hidden”).fadeIn();
    $(“div#mapinfo div.” + layname + ” table”).addClass(“table table-striped table-condensed list” + layname + ” clear sortable”);
    $(“div#mapinfo div.” + layname + ” table td”).css(“white-space”,”nowrap”);
    /* remove OBJECTID columns
    var headers_withobjectid = $(“table thead tr th”).filter(function() {return this.textContent.trim() === “OBJECTID”;});
    $(headers_withobjectid).hide();
    $(headers_withobjectid).each(function(){
    glob1 = this;
    $(this).parents(“table”).find(“tbody tr td:nth-child(“+this.cellIndex+1+”)”).hide();
    });
    */

    $(“div#mapinfo div.” + layname).fadeIn();
    geuswebmap.addMagicToList(layname);
    }
    })
    .error( function() {
    // Change to our internal service (prevents Ajax errors and CORS)
    infoUrl = “map.jsp?0=0”;
    for ( var key2 in infoUrlObj ) {
    if ( key2 === “LAYERS” || key2 === “QUERY_LAYERS” && infoUrlObj[key2] !== undefined ) {
    infoUrl += “&filter=layer.config=” + infoUrlObj[key2].toString();
    infoUrl += “&” + key2 + “=” + layname; // Use our internal layer names
    } else if ( key2 !== “serviceURL” && infoUrlObj[key2] !== undefined ) {
    infoUrl += “&” + key2 + “=” + infoUrlObj[key2].toString(); // Might be a string array (BBOX)
    }
    }
    // Display loading again
    $(“div#mapinfo img.” + layname + “.loading”).show();
    // Try calling again
    $.ajax({ url: infoUrl
    })
    .done( function(response) {
    if ( $(“div#mapinfo div.” + layname).is(“:visible”) ) {
    // Info-box for this layer already loaded. This one must be old.
    return;
    }
    $(“div#mapinfo div.” + layname ).append( response.substring( response.indexOf(“<table”) , response.lastIndexOf(“</table”) + 5 ) );
    if ( $(“div#mapinfo div.” + layname + ” table”).length > 0 ) {
    $(“div#mapdetails:hidden”).fadeIn();
    $(“div#mapinfo div.” + layname + ” table”).addClass(“table table-striped table-condensed list” + layname + ” clear sortable”);
    //$(“input#list4print”).fadeIn().unbind(“click”).click( function() { window.open(“map.jsp?print=true” + strParams); } );
    //$(“input#list4excel”).fadeIn().unbind(“click”).click( function() { window.open(“map.jsp?download=true” + strParams); } );
    $(“div#mapinfo div.” + layname + ” table td”).css(“white-space”,”nowrap”);
    geuswebmap.addMagicToList(layname);
    $(“div#mapinfo div.” + layname).fadeIn();
    }
    })
    .error( function() {
    if ( $(“div#mapinfo div.” + layname).is(“:visible”) ) {
    // Info-box for this layer already loaded. This one must be old.
    return;
    }
    $(“div#mapinfo div.” + layname).fadeIn().append(“

    <span class=’glyphicon glyphicon-exclamation-sign’ aria-hidden=’true’></span><span class=’sr-only’>Error</span> Unexpected error.

    ” );
    });

    })
    .always( function() {
    geuswebmap.ajaxCallActive = false;
    $(“body”).css(“cursor”,”default”);
    $(“div#mapinfo img.” + layname + “.loading”).hide();
    });

    }
    };

    geuswebmap.addMagicToList = function(layname) {
    // Add hover action to each item
    $(“div#mapinfo div.” + layname + ” button.hili”).parents(“tr”).mouseover( function(e) { $(this).css(“background-color”,”rgb(255,230,160)”); geuswebmap.hiliFeature( $(this).find(“.hili”).attr(“wkt”), $(this).find(“.hili”).attr(“epsg”) ); } );
    $(“div#mapinfo div.” + layname + ” button.hili”).parents(“tr”).mouseout( function(e) { $(this).css(“background-color”,””); } );
    $(“div#mapinfo div.” + layname + ” button.hili”).children(“span”).addClass(“glyphicon”).addClass(“glyphicon-plane”).prop(“title”,”Click to center and zoom”).css(“cursor”,”pointer”);
    $(“div#mapinfo div.” + layname + ” button.hili”).click( function(e) { geuswebmap.hiliFeature( $(this).attr(“wkt”), $(this).attr(“epsg”), true ); } );

    // Add new-window target to links
    $(“div#mapinfo div.” + layname + ” a”).each(function(){
    $(this).prop(“target”,”_new”);
    });
    //
    if ( $(“table.list” + layname).length > 0 ) {
    try {
    sorttable.makeSortable($(“table.list” + layname)[0]);
    } catch (ee) {
    console.log(“Can’t sort table ” + layname);
    }
    }

    // Add buy-all button to header
    if ( $(“.list” + layname + ” .th-buy”).size() > 1 ) {
    // Table holds several orderable data. Add “buy all” button to title
    $(“.list” + layname + ” .th-buy”).prepend(“<button class=’btn btn-xs btn-warning buy buyall’><span class=’glyphicon glyphicon-shopping-cart</span></button> ” );
    }
    // Add wehshop functionality
    $(“button.buy”).click( function(e) {
    var buyItemStr = “”;
    if( $(this).hasClass(“buybbox”) ) {
    var tb = $(this).parents(“table”);
    // Table-level buy button v.1
    buyItemStr = “” +
    “json={” +
    “\”layer\”: \”” + tb.attr(“data-layer”) + “\”,” +
    “\”layer_alias\”: \”” + encodeURIComponent(tb.attr(“data-layer-alias”)) + “\”,” +
    “\”currency\”: \”DKK\”,” +
    “\”price\”: \”0.00\”,” +
    “\”product_id\”: \”” + tb.attr(“data-product-id”) + “\”,” +
    “\”product_category\”: \”” + tb.attr(“data-product-category”) + “\”,” +
    “\”product_title\”: \”” + encodeURIComponent(tb.attr(“data-layer-alias”)) + ” BBOX\”,” +
    “\”bbox\”: \”” + tb.attr(“data-bbox”) + “\”,” +
    “\”wkt\”: \”” + tb.attr(“data-wkt”) + “\”,” +
    “\”layerFilter\”: \”” + encodeURIComponent($(this).attr(“data-layer-filter”)) + “\”” +
    “}”;
    } else if( $(this).hasClass(“buyall”) ) {
    // Table-level buy button v.2
    buyItemStr = “doh=doh”;
    // Add all rows to the basket one tr..td at a time
    $(this).parents(“table”).find(“tr”).each( function() {
    var buyJson = “”;
    if( $(this).find(“td”).length > 0 ) {
    buyJson += “{“;
    $(this).find(“td”).each( function(nth) {
    // Fetch the td-contents
    var buyItemValue = $(this).html();
    // Find the corresponding th title
    var buyItemParam = “”;
    try {
    buyItemParam = $(this).parents(“table”).find(“th:nth-child(“+(nth+1)+”)”).html().toLowerCase().replace(” “,”_”);
    } catch ( e ) {
    console.log(“th no. ” + (nth+1) + “?”);
    }
    // Add to basket if real value and parameter name not blank
    if ( $(this).html().indexOf(“<“)<0 && buyItemParam.replace(” “,””).length > 0 ) {
    buyJson += “\”” + buyItemParam.replace(“\””,”\\\””) + “\”: \”” + encodeURIComponent(buyItemValue).replace(“\””,”\\\””) + “\”,”;
    }
    });
    // Remove last comma and close row
    buyJson = buyJson.substring(0,buyJson.length-1) + “}”;
    // Add Json to buyItemStr
    buyItemStr +=”&json=” + buyJson;
    }
    });
    } else {
    var buyJson = “{“;
    // Add this row to the basket one td at a time
    $(this).parents(“tr”).find(“td”).each( function(nth) {
    // Fetch the td-contents
    var buyItemValue = $(this).html();
    // Find the corresponding th title
    var buyItemParam = “”;
    try {
    buyItemParam = $(this).parents(“table”).find(“th:nth-child(“+(nth+1)+”)”).html().toLowerCase().replace(” “,”_”);
    } catch ( e ) {
    console.log(“th no. ” + (nth+1) + “?”);
    }
    // Add to basket if value and parameter name not blank
    if ( $(this).html().indexOf(“<“)<0 && buyItemParam.replace(” “,””).length > 0 ) {
    buyJson += “\”” + buyItemParam.replace(“\””,”\\\””) + “\”: \”” + encodeURIComponent(buyItemValue).replace(“\””,”\\\””) + “\”,”;
    }
    });
    // Remove last comma and close row
    buyJson = buyJson.substring(0,buyJson.length-1) + “}”;
    buyItemStr = “json=” + buyJson;
    }
    var postdataArr = buyItemStr.substring(5).split(“&json=”);
    var urlparams = {};
    for ( var i = 0 ; i < postdataArr.length ; i++ ) {
    var jsonstr = postdataArr.replace(/’/g,””);
    if ( jsonstr.indexOf(“product”) >= 0 ) {
    try {
    JSON.parse( jsonstr );
    // Valid json – add to post request
    urlparams[“json”] = postdataArr.replace(/’/g,””);
    } catch (e) {
    console.log( “Not valid json: ” + jsonstr );
    }
    }
    }
    $.ajax({
    url: “basket.jsp”,
    data: urlparams,
    method: “POST”,
    dataType: “html”
    }).done( function(data) {
    $(“div.modal#webshop div.modal-body”).html(data);
    $(“div.modal#webshop”).modal();
    $(“body div.basketpop”).remove();
    $(“body”).append(“

    ” + data + “

    “);
    });
    });
    };

    geuswebmap.toggleLeftDiv = function(bool) {
    var width = $(“.sideMenu.left”).width()+5;
    var widthplus = width+3;
    if($(‘.sideMenu.left’).is(“:hidden”) ) {
    if ( bool !== undefined && !bool ){
    return;
    } // Already hidden
    else{
    $(‘.sideMenu.left’).show(“slide”, { direction: “left” }, 100);
    $(‘#main-search-ctrl’).css(“left”,”2px”).animate({left:’+=’+width},100);
    $(‘.interactions’).css(“left”,”2px”).animate({left:’+=’+width},100);
    // $(‘.ol-overviewmap’).css(“left”,”2px”).animate({left:’+=’+width},100);
    }
    } else {
    if ( bool !== undefined && bool ){
    return;
    } // Already shown
    else{
    $(‘.sideMenu.left’).hide(“slide”, { direction: “left” }, 100);
    $(‘#main-search-ctrl’).css(“left”,””+widthplus+”px”).animate({left:’-=’+width},100);
    $(‘.interactions’).css(“left”,””+widthplus+”px”).animate({left:’-=’+width},100);
    //$(‘.ol-overviewmap’).css(“left”,””+widthplus+”px”).animate({left:’-=’+width},100);
    }
    }
    };

    geuswebmap.toggleWelcomeDiv = function(bool) {
    if(bool) {
    $(‘div#bigmaptitle’).slideDown();
    } else {
    $(‘div#bigmaptitle’).slideUp();
    }
    };

    var maximize = function(){
    $(‘div#floatingDiv’).css({
    ‘width’: $(document).width(),
    ‘height’: $(document).height(),
    ‘margin-left’: ‘0px’,
    ‘left’: ‘5px’,
    ‘top’:’5px’
    });
    $(‘div#floatingDiv’).trigger(“resize”);

    };

    var minimize = function(){
    $(‘div#floatingDiv’).css({
    ‘position’: ‘absolute’,
    ‘top’: ‘5px’,
    ‘left’: ‘100%’,
    ‘margin-left’: ‘-305px’,
    ‘max-height’: ‘99%’,
    ‘width’: ‘300px’,
    ‘height’: ‘500px’
    });
    $(‘div#floatingDiv’).trigger(“resize”);
    };

    geuswebmap.floatingDiv = function(obj, title, isDynamicLegendCall) {
    var tmpsett = {
    left:$(“div#floatingDiv”).css(“left”),
    top:$(“div#floatingDiv”).css(“top”),
    width:$(“div#floatingDiv”).css(“width”),
    height:”auto”
    };
    if ( isDynamicLegendCall && $(“div#floatingDiv”).height() > 200 ) {
    tmpsett.height = $(“div#floatingDiv”).css(“height”);
    }
    //$(“div#floatingDiv”).remove();
    $(“#map”).append(“

    “);
    $(“div#floatingDiv”).css(“cursor”,”move”);

    $(“div#floatingDiv”).append(“<button type=’button’ onClick=’$(this).parent().remove();’ class=’btn btn-link’ style=’position:absolute;top:0px;right:0px;’><span class=’glyphicon glyphicon-remove’></span></button>”);
    $(“div#floatingDiv”).append(“<h3 style=’padding:7px;margin:0px;background-color:silver;’>” + title + “</h3>”);
    obj.clone().appendTo(“div#floatingDiv”);
    $(“div#floatingDiv”).children(“div,iframe,img”).each(function() {
    $(this).css(“width”,”100%”).css(“height”,”100%”).css(“resize”,”none”);
    if( $(this).hasClass(“ui-resizable-handle”) ) {
    $(this).remove();
    }
    });
    $(“div#floatingDiv”).draggable({
    containment: ‘parent’
    });
    $(“div#floatingDiv”).resizable();
    $(“div#floatingDiv”).css(tmpsett);
    };

    geuswebmap.resizeIFrameToFitContent = function ( e ) {
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf(“MSIE “);

    if (msie === 0){
    // Set width of iframe according to its content
    if (e.Document && e.Document.body.scrollWidth){ //ie5+ syntax
    e.width = e.contentWindow.document.body.scrollWidth;
    }
    else if (e.contentDocument && e.contentDocument.body.scrollWidth){ //ns6+ & opera syntax
    e.width = e.contentDocument.body.scrollWidth + 35;
    e.height = e.contentDocument.body.scrollHeight + 35;
    }
    else if(e.contentDocument && e.contentDocument.body.offsetWidth){ //standards compliant syntax ? ie8
    e.width = e.contentDocument.body.offsetWidth + 35;
    e.height = e.contentDocument.body.offsetHeight + 35;

    }
    }
    };

    function loadimage(element){
    var parent = element.parentElement.parentElement;
    // var width = $(element)[0].parentElement.parentElement.style.width;
    // var height = $(element)[0].parentElement.parentElement.style.height;

    var positionInfo_parent = parent.getBoundingClientRect();
    var positionInfo_element = element.getBoundingClientRect();

    var height_parent = positionInfo_parent.height;
    var width_parent = positionInfo_parent.width;
    var height_element = positionInfo_element.height;
    var width_element = positionInfo_element.width;
    $(element).css(“display”,null);
    if(element.naturalWidth !== “” && element.naturalWidth > width_parent && width_parent !== 0){
    $(element).css(“width”,width_parent-10);
    }
    else{
    $(element).css(“width”,element.naturalWidth-10);
    }

    };

    geuswebmap.toggleLegend = function(){
    if($(‘div#floatingDiv’).length > 0){
    $(‘div#floatingDiv’).toggle();
    }
    };

    geuswebmap.floatingDiv2 = function(url, title, isDynamicLegendCall, calcExtent,id, metadata, legend_name,metadata_name, layerinfo_name) {
    var tmpsett = {
    left:$(“div#floatingDiv”).css(“left”),
    top:$(“div#floatingDiv”).css(“top”),
    width:$(“div#floatingDiv”).css(“width”),
    height:”500px”
    };
    if (url === ” || url === undefined){
    return;
    }

    $(“.legendimage”).off();

    if ( isDynamicLegendCall && $(“div#floatingDiv”).height() > 200 ) {
    tmpsett.height = $(“div#floatingDiv”).css(“height”);
    }
    //$(“div#floatingDiv”).remove();
    if ($(“#floatingDiv”).length === 0){
    $(“#map”).append(“

    “);
    if (geuswebmap.lang === “en”){
    $(“div#floatingDiv”).append(“<h3 style=’padding:7px;margin:0px;background-color:silver;’>Legend</h3>”);
    }
    else {
    $(“div#floatingDiv”).append(“<h3 style=’padding:7px;margin:0px;background-color:silver;’>Legende</h3>”);
    }

    $(“div#floatingDiv”).append(“

    “);
    $(“div#floatingDiv”).append(“<button type=’button’ onClick=’$(this).parent().hide();’ class=’btn btn-link’ style=’position:absolute;top:0px;right:0px;’><span class=’glyphicon glyphicon-remove’></span></button>”);
    $(“div#floatingDiv”).append(“<button type=’button’ onClick=’maximize();’ class=’btn btn-link’ style=’position:absolute;top:0px;right:30px;’><span class=’glyphicon glyphicon-plus’></span></button>”);
    $(“div#floatingDiv”).append(“<button type=’button’ onClick=’minimize();’ class=’btn btn-link’ style=’position:absolute;top:0px;right:60px;’><span class=’glyphicon glyphicon-minus’></span></button>”);

    $(“div#floatingDiv”).draggable({containment: ‘parent’});
    $(“div#floatingDiv”).resizable();
    $(“div#floatingDiv”).resize(function() {
    $(“#tabs”).accordion(“refresh”);
    // $(“.legendimage”).each(function(o,p){ loadimage(p);});
    $(“.resizetoContent”).each(function(o,p){
    var height = $(p)[0].parentElement.parentElement.style.height;
    height = height.replace(“px”,””)*0.80+”px”;
    $(p).css(“height”,height);
    $(p).attr(‘src’, $(p).attr(‘src’));

    //geuswebmap.resizeIFrameToFitContent (p);
    });
    });
    $(“div#floatingDiv”).css(tmpsett);
    $(“div#floatingDiv”).css(“cursor”,”move”);
    var tabs = $(“#tabs”).accordion( {
    autoFill:true,
    autoHeight: false ,
    clearStyle: true,
    heightStyle: “fill”,
    activate: function(event, ui) {
    $(“.legendimage”).each(function(o,p){ loadimage(p);});

    },
    collapsible: true,
    active: 0
    });

    }
    //$(“ul#tablist”).append(“

  • “+title+”
  • “);
    if($(“[data-id='”+id+”‘]”).length === 0){
    var legendtext = “”;
    var metadatatext = “Metadata”;
    if (geuswebmap.lang === “da”){
    legendtext = “”;
    metadatatext = “Metadata”;

    }
    var content = “<iframe class=’resizetoContent’ style=’width:98%;height:78%;border-width: 0px;’ src='”+url+calcExtent()+”‘ />”;
    if(url.indexOf(“geusmap/get_legend.jsp”) > -1 || url.indexOf(“.jpg”) > -1 || url.indexOf(“.png”) > -1 || url.indexOf(“.gif”) > -1){
    content = ““;
    }

    $(“div#tabs”).append(“<h3 data-id='”+id+”‘>”+title+”</h3>

    <h4>”+legendtext+”</h4><p>”+content+”</p>

    “);
    }

    $(“div#floatingDiv”).children(“div,iframe,img”).each(function() {
    $(this);
    if( $(this).hasClass(“ui-resizable-handle”) ) {
    //$(this).remove();
    }
    });

    $(“#tabs”).accordion(“refresh”);
    $(“#tabs”).accordion({ active: $(“div#tabs”).children(“div”).length-1});
    //$(“div#floatingDiv”).trigger(“resize”);
    };

    geuswebmap.removeFromLegend = function(id){
    $(“#tabs”).children(“[data-id='”+id+”‘]”).remove();
    $(“#tabs”).accordion(“refresh”);
    $(“#tabs”).accordion({ active: $(“div#tabs”).children(“div”).length-1});

    };

    geuswebmap.toggleFullScreen = function() {
    if (!document.fullscreenElement && // alternative standard method
    !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) { // current working methods
    if (document.documentElement.requestFullscreen) {
    document.documentElement.requestFullscreen();
    } else if (document.documentElement.msRequestFullscreen) {
    document.documentElement.msRequestFullscreen();
    } else if (document.documentElement.mozRequestFullScreen) {
    document.documentElement.mozRequestFullScreen();
    } else if (document.documentElement.webkitRequestFullscreen) {
    document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
    }
    } else {
    if (document.exitFullscreen) {
    document.exitFullscreen();
    } else if (document.msExitFullscreen) {
    document.msExitFullscreen();
    } else if (document.mozCancelFullScreen) {
    document.mozCancelFullScreen();
    } else if (document.webkitExitFullscreen) {
    document.webkitExitFullscreen();
    }
    }
    };

    function addControls(){
    // Map controls
    geuswebmap.controls = {
    scaleline: new ol.control.ScaleLine({units: ‘metric’}),
    overviewmap: new ol.control.OverviewMap({layers: [
    new ol.layer.Vector({extent: geuswebmap.extent, source: new ol.source.Vector({projection: ‘EPSG:3857’, url: ‘add/data/countries.geojson’, format: new ol.format.GeoJSON()}), style: new ol.style.Style({stroke: new ol.style.Stroke({color: ‘#AFAFAF’, width: 1}), fill: new ol.style.Fill({color: ‘#FFFFFF’})}), opacity: 0.5}),
    new ol.layer.Tile({extent: geuswebmap.extent, source: new ol.source.TileArcGISRest({projection: ‘EPSG:3034’, url: “//data.geus.dk/arcgis/rest/services/basemaps/europe_osm/MapServer”, tileGrid: new ol.tilegrid.TileGrid({extent: geuswebmap.geusbg.extent, resolutions: geuswebmap.geusbg.resolutions, tileSize: [geuswebmap.geusbg.tilesize, geuswebmap.geusbg.tilesize]}), params: {“FORMAT”: “JPEG”, “TRANSPARENT”: “false”}})})
    ],
    view: new ol.View({projection: geuswebmap.projection, extent: geuswebmap.extent, center: geuswebmap.center, zoom: 3, maxZoom: 5}), collapsed: true, label: ‘\u00BB’, collapseLabel: ‘\u00AB’}),
    mousePositionControl2: new ol.control.MousePosition({coordinateFormat: ol.coordinate.createStringXY(0), projection: geuswebmap.projection, className: ‘custom-mouse-position’, target: document.getElementById(‘xy_mouse’), undefinedHTML: ‘ ‘})
    };

    if (geuswebmap.baseRegion === “gl”) {
    geuswebmap.controls.mousePositionControl = new ol.control.MousePosition({coordinateFormat: ol.coordinate.createStringXY(4), render: function () {
    complexProj.render();
    }, projection: ‘EPSG:4326’, className: ‘custom-mouse-position’, target: document.getElementById(‘ll_mouse’), undefinedHTML: ‘ ‘});
    } else {
    geuswebmap.controls.mousePositionControl = new ol.control.MousePosition({coordinateFormat: ol.coordinate.createStringXY(4), projection: ‘EPSG:4326’, className: ‘custom-mouse-position’, target: document.getElementById(‘ll_mouse’), undefinedHTML: ‘ ‘});
    }
    ;

    // Add controls
    for (var key in geuswebmap.controls) {
    map.addControl(geuswebmap.controls[key]);
    }

    // Add event to the selectLayer to show infobox
    geuswebmap.layers.selectLayer.getSource().on(“addfeature”, function () {
    // Is this a double-click?
    var now = new Date();
    if (geuswebmap.lastClick === undefined) {
    geuswebmap.lastClick = now;
    } else {
    if (now.getTime() – geuswebmap.lastClick.getTime() < 250) {
    try {
    map.getView().setZoom(map.getView().getZoom() + 3);
    map.getView().setCenter(geuswebmap.layers.selectLayer.getSource().getFeatures()[0].getGeometry().getCoordinates());
    } catch (eee) {
    // Ignore.
    }
    return;
    } else {
    geuswebmap.lastClick = now;
    }
    }
    var action = “info”;
    if ($(“button.active”).hasClass(“ol-info-by-poly”))
    action = “infopoly”;
    if ($(“button.active”).hasClass(“ol-info-by-line”))
    action = “infoline”;
    // Reset interaction and buttons
    geuswebmap.interactionsOnOff();
    var feat = geuswebmap.layers.selectLayer.getSource().getFeatures();
    if (feat.length > 1) {
    geuswebmap.layers.selectLayer.getSource().removeFeature(feat[0]);
    feat = geuswebmap.layers.selectLayer.getSource().getFeatures();
    }
    if (feat.length > 0) {
    if (action === “infoline” || action === “infopoly”) {
    // Various parameters necessary for detail pages
    var strParams = “”;
    var layerarr = [];
    var activeForms = $(“input[name=layer]:checked”).parents(“.end-node”).find(“form”);
    for (var idx = 0; idx < activeForms.length; idx++) {
    layerarr.push(activeForms.eq(idx).attr(“data-layer-name”));
    strParams = strParams + “&” + activeForms.eq(idx).attr(“data-layer-name”) + “_filter=” + encodeURIComponent(activeForms.eq(idx).serialize());
    }
    var featwkt = geuswebmap.format.writeGeometry(feat[0].getGeometry());
    var featarraystr = geuswebmap.format.writeGeometry(feat[0].getGeometry()).replace(/[^0-9 .,]/g, “”).replace(/ /g, “,”);
    var tmpurl = “”;
    if (action === “infoline”) {
    tmpurl = geuswebmap.lineSearchUrl;
    } else {
    tmpurl = geuswebmap.polySearchUrl;
    }
    tmpurl = tmpurl + featarraystr + “&epsg=” + geuswebmap.epsg + “&layers=” + layerarr.toString() + “&” + strParams + “&wkt=” + featwkt + “&mapname=” + geuswebmap.mapname + “&extent=” + geuswebmap.extent.toString().replace(/,/, “%252C”) + “&baslay=baseMapDa&bbox=” + feat[0].getGeometry().getExtent().toString().replace(/,/g, “%20”); // Some detail pages expect param “wkt” instead
    // iframe
    $(“div#mapinfo”).html(“<iframe src='” + tmpurl + “‘ width=’500′ height=’300′></iframe>”);
    $(“div#mapdetails:hidden”).fadeIn();
    $(“div#mapinfo”).append(“<button style=’position:absolute;bottom:2px;left:50%;margin-left:-90px;’ onclick=\”var win = window.open(‘” + tmpurl + “‘, ‘_blank’); win.focus();\”><span class=’glyphicon glyphicon-new-window’></span> ” + labels[“new_window”] + “</button>”);
    } else {
    geuswebmap.searchByFeature();
    }
    }
    });
    }

    function initialize_geuswebmap() {
    geuswebmap.geusbg = {};
    geuswebmap.geusbg.epsg = “EPSG:3034”;
    geuswebmap.geusbg.extent = [-5000000, -2000000, 10000000, 10000000];
    geuswebmap.geusbg.tilesize = 512;
    geuswebmap.geusbg.startResolution = ol.extent.getWidth(geuswebmap.geusbg.extent) / geuswebmap.geusbg.tilesize;
    geuswebmap.geusbg.resolutions = new Array(24);
    for (var i = 0, ii = geuswebmap.geusbg.resolutions.length; i < ii; ++i) {
    geuswebmap.geusbg.resolutions = geuswebmap.geusbg.startResolution / Math.pow(2, i);
    }

    geuswebmap.format = new ol.format.WKT();
    // Now you can do like this:
    //var geom = geuswebmap.format.readFeature(“POINT(1 1)”);
    //var wkt = geuswebmap.format.writeFeature( geom );

    /************************************** THE MAP DEFINITION *****************************************/
    map = new ol.Map({
    keyboardEventTarget: document,
    controls: ol.control.defaults({attributionOptions: /** @type {olx.control.AttributionOptions} */ ({collapsible: true})}), // more further down
    interactions: ol.interaction.defaults({
    altShiftDragRotate: false, doubleClickZoom: true, keyboard: true, shiftDragZoom: false, dragPan: false, pinchRotate: false, pinchZoom: true // some of these are set further down
    }),
    target: ‘map’,
    //renderer: ‘canvas’,
    //renderer: ‘dom’, // Unable to do layer opacity
    //renderer: ‘webgl’, // Black map…
    loadTilesWhileAnimating: false,
    loadTilesWhileInteracting: false,
    view: new ol.View({
    projection: geuswebmap.projection,
    enableRotation: false,
    rotation: 0,
    extent: geuswebmap.extent,
    center: geuswebmap.center,
    zoom: Math.round(Math.min($(‘#map’).width(), $(‘#map’).height()) / 250),
    zoomFactor: 1.5,
    minZoom: 1,
    maxZoom: 27
    })
    });
    /**************************************************************************************************/

    /*
    if ( geuswebmap.baseRegion==”da” && ticketSDFE.length > 0 ) {
    var projection = ol.proj.get(‘EPSG:3857’);
    var projectionExtent = projection.getExtent();
    var size = ol.extent.getWidth(projectionExtent) / 256;
    var resolutions = new Array(14);
    var matrixIds = new Array(14);
    for (var z = 0; z < 14; ++z) {
    // generate resolutions and matrixIds arrays for this WMTS
    resolutions[z] = size / Math.pow(2, z);
    matrixIds[z] = z;
    }
    }
    */

    geuswebmap.layers = {};

    }

    //Topo
    function setBaseLayers() {
    //Layers usable for all types of maps
    //OBS: Don’t use TileWMS and WMS version 1.3.0 or the tiles will be mixed on the map (OL3 bug?).
    //http://gis.stackexchange.com/questions/6662/using-arcgis-online-base-maps-without-esri-software
    geuswebmap.layers.baseMapEsriImagery = new ol.layer.Tile({visible: false, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url: ‘https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}’})});
    geuswebmap.layers.baseMapEsriTopo = new ol.layer.Tile({visible: false, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url: ‘https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}’})});
    geuswebmap.layers.baseMapEsriStreet = new ol.layer.Tile({visible: false, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url: ‘https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}’})});
    /*
    geuswebmap.layers.baseMapEsriImagery= new ol.layer.Tile ({visible:false, extent: geuswebmap.bufferedExtent, source: new ol.source.TileArcGISRest({ url: “https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer”, tileGrid: new ol.tilegrid.TileGrid({ extent: geuswebmap.geusbg.extent, resolutions: geuswebmap.geusbg.resolutions, tileSize: [geuswebmap.geusbg.tilesize, geuswebmap.geusbg.tilesize] }), params: {“FORMAT”:”JPEG”} }) });
    geuswebmap.layers.baseMapEsriTopo= new ol.layer.Tile ({visible:false, extent: geuswebmap.bufferedExtent, source: new ol.source.TileArcGISRest({ url: “https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer”, tileGrid: new ol.tilegrid.TileGrid({ extent: geuswebmap.geusbg.extent, resolutions: geuswebmap.geusbg.resolutions, tileSize: [geuswebmap.geusbg.tilesize, geuswebmap.geusbg.tilesize] }), params: {“FORMAT”:”JPEG”} }) });
    geuswebmap.layers.baseMapEsriStreet= new ol.layer.Tile ({visible:false, extent: geuswebmap.bufferedExtent, minResolution:0.5, source: new ol.source.TileArcGISRest({ url: “https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer”, tileGrid: new ol.tilegrid.TileGrid({ extent: geuswebmap.geusbg.extent, resolutions: geuswebmap.geusbg.resolutions, tileSize: [geuswebmap.geusbg.tilesize, geuswebmap.geusbg.tilesize] }), params: {“FORMAT”:”JPEG”} }) });
    */

    //geuswebmap.standardbackground = false;
    if (geuswebmap.standardbackground === true) {
    if (geuswebmap.baseRegion === “da” && ticketSDFE.length > 0) {
    //WMS: geuswebmap.layers.baseMapDa= new ol.layer.Tile ({visible:true, extent: geuswebmap.bufferedExtent, source: new ol.source.TileWMS ({projection: ‘EPSG:25832’, serverType: “mapserver”, url: “https://c.services.kortforsyningen.dk/topo_skaermkort?case=”+geuswebmap.mapname, ratio:1, hidpi:false, params: { ‘TICKET’:ticketSDFE, ‘LAYERS’:’dtk_skaermkort_daempet’, ‘VERSION’:’1.1.1′,’SRS’:’EPSG:25832′,”FORMAT”: “image/png”, “BGCOLOR”:”0xFFFFFF” } }), attributions: [new ol.Attribution ({html: “&copy SDFE“})], opacity:1 });
    geuswebmap.layers.baseMapDa = new ol.layer.Tile({visible: true, myval: true, extent: [120000, 5900000, 1000000, 6500000], source: new ol.source.WMTS({url: ‘https://services.kortforsyningen.dk/topo_skaermkort_daempet?ticket=’ + ticketSDFE, layer: ‘dtk_skaermkort_daempet’, matrixSet: ‘View1’, format: ‘image/jpeg’, projection: ‘EPSG:25832’,
    tileGrid: new ol.tilegrid.WMTS({origin: [120000, 6500000], resolutions: [1638.4, 819.2, 409.6, 204.8, 102.4, 51.2, 25.6, 12.8, 6.4, 3.2, 1.6, .8, .4, .2], matrixIds: [“L00”, “L01”, “L02”, “L03”, “L04”, “L05”, “L06”, “L07”, “L08”, “L09”, “L10”, “L11”, “L12”, “L13”]}), style: ‘default’})
    });
    } else if (geuswebmap.baseRegion === “gl”) {
    geuswebmap.layers.baseMapGl = new ol.layer.Tile({visible: false, geusdocap: true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url: ‘//data.geus.dk/arcgis/rest/services/GtW/S059_G250_Topographic_hillshaded_map/MapServer/tile/{z}/{y}/{x}’})});
    } else if (geuswebmap.baseRegion === “eu”) {
    geuswebmap.layers.baseMapEu = new ol.layer.Tile({visible: true, extent: geuswebmap.bufferedExtent, minResolution: 300, maxResolution: 100000, source: new ol.source.TileArcGISRest({url: “https://data.geus.dk/arcgis/rest/services/basemaps/europe_osm/MapServer”, tileGrid: new ol.tilegrid.TileGrid({extent: geuswebmap.geusbg.extent, resolutions: geuswebmap.geusbg.resolutions, tileSize: [geuswebmap.geusbg.tilesize, geuswebmap.geusbg.tilesize]}), params: {“FORMAT”: “JPEG”, “TRANSPARENT”: “false”}})});
    geuswebmap.layers.baseMapEu2 = new ol.layer.Tile({visible: true, extent: geuswebmap.bufferedExtent, minResolution: 0, maxResolution: 500, source: new ol.source.TileWMS({projection: ‘EPSG:3034’, serverType: “mapserver”, url: “http://sdi.eea.europa.eu/ows/osm-michelin”, ratio: 1, hidpi: false, params: {‘LAYERS’: ‘openstreetmap_cache’, ‘VERSION’: ‘1.1.1’, ‘SRS’: ‘EPSG:3034’, “FORMAT”: “image/png”, “BGCOLOR”: “0xFFFFFF”}}), attributions: [new ol.Attribution({html: “&copy EEA“})], opacity: 1});
    }

    //Topo alternative
    if (geuswebmap.baseRegion === “da” && ticketSDFE.length > 0) {
    //geuswebmap.layers.baseMapAltDa= new ol.layer.Tile ({visible:false, extent: geuswebmap.bufferedExtent, source: new ol.source.TileWMS ({projection: ‘EPSG:25832’, serverType: “mapserver”, url: “https://c.services.kortforsyningen.dk/topo_skaermkort?case=”+geuswebmap.mapname, ratio:1, hidpi:false, params: { ‘TICKET’:ticketSDFE, ‘LAYERS’:’dtk_skaermkort’, ‘VERSION’:’1.1.1′,’SRS’:’EPSG:25832′,”FORMAT”: “image/png”, “BGCOLOR”:”0xFFFFFF” } }), attributions: [new ol.Attribution ({html: “&copy SDFE“})], opacity:1 });
    geuswebmap.layers.baseMapAltDa = new ol.layer.Tile({visible: true, extent: [120000, 5900000, 1000000, 6500000], source: new ol.source.WMTS({url: ‘https://services.kortforsyningen.dk/topo_skaermkort?ticket=’ + ticketSDFE, layer: ‘dtk_skaermkort’, matrixSet: ‘View1’, format: ‘image/jpeg’, projection: ‘EPSG:25832’,
    tileGrid: new ol.tilegrid.WMTS({origin: [120000, 6500000], resolutions: [1638.4, 819.2, 409.6, 204.8, 102.4, 51.2, 25.6, 12.8, 6.4, 3.2, 1.6, .8, .4, .2], matrixIds: [“L00”, “L01”, “L02”, “L03”, “L04”, “L05”, “L06”, “L07”, “L08”, “L09”, “L10”, “L11”, “L12”, “L13”]}), style: ‘default’})
    });
    } else if (geuswebmap.baseRegion === “gl” && ticketSDFE.length > 0) {
    geuswebmap.layers.baseMapAltGl = new ol.layer.Tile({visible: false, extent: geuswebmap.bufferedExtent, source: new ol.source.TileWMS({projection: ‘EPSG:32624’, serverType: “mapserver”, url: “https://c.services.kortforsyningen.dk/gtopo?case=” + geuswebmap.mapname, ratio: 1, hidpi: false, params: {‘TICKET’: ticketSDFE, ‘LAYERS’: ‘Gtk_g500’, ‘VERSION’: ‘1.1.1’, ‘SRS’: ‘EPSG:25832’, “FORMAT”: “image/png”, “BGCOLOR”: “0xFFFFFF”}}), attributions: [new ol.Attribution({html: “&copy SDFE“})], opacity: 1});
    }

    // Imagery
    if (geuswebmap.baseRegion === “da” && ticketSDFE.length > 0) {
    //geuswebmap.layers.baseMapImageryDa= new ol.layer.Tile ({visible:false, extent: geuswebmap.bufferedExtent, source: new ol.source.TileWMS ({projection: ‘EPSG:25832’, serverType: “mapserver”, url: “https://c.services.kortforsyningen.dk/orto_foraar?case=”+geuswebmap.mapname, ratio:1, hidpi:false, params: { ‘TICKET’:ticketSDFE, ‘LAYERS’:’orto_foraar’, ‘VERSION’:’1.1.1′,’SRS’:’EPSG:25832′,”FORMAT”: “image/png”, “BGCOLOR”:”0xFFFFFF” } }), attributions: [new ol.Attribution ({html: “&copy SDFE“})], opacity:1 });
    geuswebmap.layers.baseMapImageryDa = new ol.layer.Tile({visible: true, extent: [120000, 5900000, 1000000, 6500000], source: new ol.source.WMTS({url: ‘https://services.kortforsyningen.dk/orto_foraar?ticket=’ + ticketSDFE, layer: ‘orto_foraar’, matrixSet: ‘View1’, format: ‘image/jpeg’, projection: ‘EPSG:25832’,
    tileGrid: new ol.tilegrid.WMTS({origin: [120000, 6500000], resolutions: [1638.4, 819.2, 409.6, 204.8, 102.4, 51.2, 25.6, 12.8, 6.4, 3.2, 1.6, .8, .4, .2], matrixIds: [“L00”, “L01”, “L02”, “L03”, “L04”, “L05”, “L06”, “L07”, “L08”, “L09”, “L10”, “L11”, “L12”, “L13”]}), style: ‘default’})
    });
    }

    // Geology
    if (geuswebmap.baseRegion === “da”) {
    geuswebmap.layers.baseMapGeologyDa200 = new ol.layer.Tile({visible: false, geusdocap: true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url: ‘//data.geus.dk/arcgis/rest/services/GtW/S014_Jordartskort_200000/MapServer/tile/{z}/{y}/{x}’})});
    geuswebmap.layers.baseMapGeologyDa25k = new ol.layer.Tile({visible: false, geusdocap: true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url: ‘//data.geus.dk/arcgis/rest/services/GtW/S035_Jordartskort_25000/MapServer/tile/{z}/{y}/{x}’})});
    } else if (geuswebmap.baseRegion === “gl”) {
    geuswebmap.layers.baseMapGeologyGl = new ol.layer.Tile({visible: false, geusdocap: true, extent: geuswebmap.bufferedExtent, source: new ol.source.XYZ({url: ‘//data.geus.dk/arcgis/rest/services/GtW/S064_G500_Geology_map/MapServer/tile/{z}/{y}/{x}’})});
    } else if (geuswebmap.baseRegion === “eu”) {
    geuswebmap.layers.baseMapGeologyEu = new ol.layer.Image({visible: false, extent: geuswebmap.bufferedExtent, source: new ol.source.ImageWMS({projection: ‘EPSG:3034’, serverType: “mapserver”, url: “http://mapsrefdev.brgm.fr/wxs/1GE/EGDI_1M_INSPIRE_geolUnits?language=eng”, ratio: 1, hidpi: false, params: {‘LAYERS’: ‘EGDI_GE_GeologicUnit_EN_1M_Surface_Lithology’, ‘VERSION’: ‘1.1.1’, ‘TRANSPARENT’: ‘true’, “BGCOLOR”: “0xFFFFFF”, “FORMAT”: “image/png”}}), opacity: 1, attributions: [new ol.Attribution({html: “&copy GEUS”})]});
    }

    //Bathymetry
    if (geuswebmap.baseRegion === “da”) {
    geuswebmap.layers.baseMapBathymetryDa = new ol.layer.Image({visible: false, extent: geuswebmap.bufferedExtent, source: new ol.source.ImageWMS({projection: ‘EPSG:25832’, serverType: “mapserver”, url: “https://data.geus.dk/geusmap/ows/25832.jsp”, ratio: 1, hidpi: false, params: {‘whoami’: ‘geus@geus.dk’, ‘LAYERS’: ‘hoejde_dybde,kystlinie_25000’, ‘VERSION’: ‘1.1.1’, ‘TRANSPARENT’: ‘true’, “BGCOLOR”: “0xFFFFFF”, “FORMAT”: “image/png”}}), opacity: 1, attributions: [new ol.Attribution({html: “&copy GEUS”})]});
    }

    //Road no.
    if (geuswebmap.baseRegion === “da” && ticketSDFE.length > 0) {
    geuswebmap.layers.optLayRoadnoDa = new ol.layer.Tile({visible: false, zIndex: 2000, extent: geuswebmap.bufferedExtent, source: new ol.source.TileWMS({projection: ‘EPSG:25832’, serverType: “mapserver”, url: “https://c.services.kortforsyningen.dk/topo_geo?case=” + geuswebmap.mapname, ratio: 1, hidpi: false, params: {‘TICKET’: ticketSDFE, ‘LAYERS’: ‘Adresse’, ‘VERSION’: ‘1.1.1’, ‘SRS’: ‘EPSG:25832’, “FORMAT”: “image/png”, “BGCOLOR”: “0xFFFFFF”}}), attributions: [new ol.Attribution({html: “&copy SDFE“})], opacity: 1});
    }

    // Coastline
    if (geuswebmap.baseRegion === “da”) {
    geuswebmap.layers.optLayCoastlineDa = new ol.layer.Image({visible: false, zIndex: 2000, opacity: 0.6, extent: geuswebmap.bufferedExtent, source: new ol.source.ImageWMS({projection: ‘EPSG:25832’, serverType: “mapserver”, url: “https://data.geus.dk/geusmap/ows/25832.jsp”, ratio: 1, hidpi: false, params: {‘whoami’: ‘geus@geus.dk’, ‘LAYERS’: ‘dansk_eez_zigzag,kystlinie_25000’, ‘VERSION’: ‘1.1.1’, ‘TRANSPARENT’: ‘true’, “BGCOLOR”: “0xFFFFFF”, “FORMAT”: “image/png”}}), attributions: [new ol.Attribution({html: “&copy GEUS”})]});
    } else if (geuswebmap.baseRegion === “gl”) {
    geuswebmap.layers.optLayCoastlineGl = new ol.layer.Tile({visible: false, zIndex: 2000, opacity: 0.6, extent: geuswebmap.bufferedExtent, source: new ol.source.TileWMS({projection: ‘EPSG:32624’, serverType: “mapserver”, url: “https://data.geus.dk/arcgis/services/GtW/S060_Kystlinier_Greenland/MapServer/WMSServer”, ratio: 1, hidpi: false, params: {‘LAYERS’: ‘G2500_offshore_arc’}})});
    } else if (geuswebmap.baseRegion === “eu”) {
    geuswebmap.layers.optLayCoastlineEu = new ol.layer.Vector({visible: false, zIndex: 2000, opacity: 0.6, source: new ol.source.Vector({projection: ‘EPSG:3857’, url: ‘add/data/countries.geojson’, format: new ol.format.GeoJSON()}), style: new ol.style.Style({stroke: new ol.style.Stroke({color: ‘#33AAFF’, width: 1}), fill: new ol.style.Fill({color: ‘#FFFFFF’})})});
    }

    //Hiilshade
    if (geuswebmap.baseRegion === “da” && ticketSDFE.length > 0) {
    geuswebmap.layers.optLayHillshadeDa = new ol.layer.Tile({visible: false, zIndex: 10, opacity: 0.3, extent: geuswebmap.bufferedExtent, source: new ol.source.TileWMS({projection: ‘EPSG:25832’, serverType: “mapserver”, url: “https://c.services.kortforsyningen.dk/dhm?case=” + geuswebmap.mapname, ratio: 1, hidpi: false, params: {‘TICKET’: ticketSDFE, ‘LAYERS’: ‘hillshade_1_6m’, ‘VERSION’: ‘1.1.1’, ‘SRS’: ‘EPSG:25832’, “FORMAT”: “image/png”, “BGCOLOR”: “0xFFFFFF”}}), attributions: [new ol.Attribution({html: “&copy SDFE“})]});
    } else if (geuswebmap.baseRegion === “eu”) {
    geuswebmap.layers.optLayHillshadeEu = new ol.layer.Image({visible: false, zIndex: 10, extent: geuswebmap.bufferedExtent, source: new ol.source.ImageWMS({projection: ‘EPSG:3034’, serverType: “mapserver”, url: “https://data.geus.dk/geusmap/ows/3034.jsp”, ratio: 1, hidpi: false, params: {‘LAYERS’: ‘europe_hillshade’, ‘VERSION’: ‘1.1.1’, ‘TRANSPARENT’: ‘true’, “BGCOLOR”: “0x000000”, “FORMAT”: “image/png”}}), opacity: 0.4, attributions: [new ol.Attribution({html: “&copy EU-DEM”})]});
    }
    }
    }

    function setServerSideLayers(){
    for (var sslayer in geuswebmap.serverSideLayers) {
    geuswebmap.layers[sslayer] = geuswebmap.serverSideLayers[sslayer];
    }

    // Get tileindex etc from ArcGIS XYZ getcap (a custom prop “geusdocap:true” must be added above)
    for (var layname in geuswebmap.layers) {
    try {
    if (geuswebmap.layers[layname].getProperties().geusdocap) {

    geuswebmap.layers[layname].setVisible(false);
    var layurl = geuswebmap.layers[layname].getSource().getUrls()[0];
    if (layurl.indexOf(“/MapServer/tile/{z}/{y}/{x}”) > 0) {
    // Fx //data.geus.dk/arcgis/rest/services/GtW/S014_Jordartskort_200000/MapServer
    $.ajax({url: layurl.split(“/tile/”)[0], layname: layname, jsonp: ‘callback’, dataType: ‘jsonp’, data: {f: ‘json’},
    success: function (config) {
    if (config.error) {
    console.log(config.error.message + ‘\n’ + config.error.details.join(‘\n’));
    } else {
    var generator = new ole.LayerGenerator({config: config, url: this.url});
    geuswebmap.layers[this.layname].setSource(new ol.source.XYZ({
    url: this.url.split(“?”)[0] + ‘/tile/{z}/{y}/{x}’,
    projection: generator.getProjection(),
    tileGrid: new ol.tilegrid.TileGrid({
    extent: generator.getFullExtent(),
    tileSize: config.tileInfo.rows,
    origin: [config.tileInfo.origin.x, config.tileInfo.origin.y],
    resolutions: generator.getResolutions()
    })
    }));
    }
    }
    });
    }
    }
    var currentobject = geuswebmap.serverLayerObjects.filter(function(o){ return o.name === layname;});
    if (currentobject.length > 0){
    if (currentobject[0].defaultLayer === true ){
    geuswebmap.layers[layname].setVisible(true);
    }
    }

    } catch (e) {
    console.log(layname, e);
    }
    }

    // Vector layers
    geuswebmap.layers.myLocation = new ol.layer.Vector({visible: true, zIndex: 3000, source: new ol.source.Vector({wrapX: false}), style: new ol.style.Style({stroke: new ol.style.Stroke({color: ‘#000000’, width: 3}), image: new ol.style.Circle({radius: 6, stroke: new ol.style.Stroke({color: ‘#000000’, width: 2}), fill: new ol.style.Fill({color: ‘#FFFFFF’, width: 4})})})});
    geuswebmap.layers.vectorLayer = new ol.layer.Vector({visible: true, zIndex: 3000, source: new ol.source.Vector({wrapX: false}), style: new ol.style.Style({stroke: new ol.style.Stroke({color: ‘#0000DE’, width: 3}), image: new ol.style.Circle({radius: 6, stroke: new ol.style.Stroke({color: ‘#0000DE’, width: 2})})})});
    geuswebmap.layers.selectLayer = new ol.layer.Vector({visible: true, zIndex: 3000, source: new ol.source.Vector({wrapX: false}), style: new ol.style.Style({stroke: new ol.style.Stroke({color: ‘#CE4A21’, width: 3}), image: new ol.style.Circle({radius: 8, stroke: new ol.style.Stroke({color: ‘#CE4A21’, width: 3})})})});
    geuswebmap.layers.zoomLayer = new ol.layer.Vector({visible: true, zIndex: 3000, source: new ol.source.Vector({wrapX: false}), style: new ol.style.Style({stroke: new ol.style.Stroke({color: ‘#2121FF’, width: 2}), image: new ol.style.Circle({radius: 8, stroke: new ol.style.Stroke({color: ‘#2121FF’, width: 2})})})});
    geuswebmap.layers.hiliLayer = new ol.layer.Vector({visible: true, zIndex: 3000, source: new ol.source.Vector({wrapX: false}), style: new ol.style.Style({stroke: new ol.style.Stroke({color: ‘#EEBB55’, width: 3}), image: new ol.style.Circle({radius: 8, stroke: new ol.style.Stroke({color: ‘#EEBB55’, width: 3})})})});
    geuswebmap.layers.dummyLayer = new ol.layer.Vector({visible: false, zIndex: 3000, source: new ol.source.Vector({wrapX: false}), style: new ol.style.Style({stroke: new ol.style.Stroke({color: ‘#EEBB55’, width: 3}), image: new ol.style.Circle({radius: 8, stroke: new ol.style.Stroke({color: ‘#EEBB55’, width: 3})})})});
    }

    function createServerSideLayers(layerobject){
    var zindex = 1;
    if (layerobject.zorder){
    zindex = 3000 – layerobject.zorder;
    //console.log(layerobject.zorder);
    }

    if ( layerobject.olDef !== null && layerobject.olDef.length > 0 ) {

    // Add a layer definition composed by configuration in DB
    geuswebmap.serverSideLayers[layerobject.name] = eval(layerobject.olDef);
    geuswebmap.serverSideLayers[layerobject.name].setZIndex(zindex);

    }
    else if (layerobject.wmsConnection !== null && layerobject.wmsLayers !== null ) {
    // Add a layer pointing directly to the source
    var format = layerobject.wmsformat ? layerobject.wmsformat : “image/png”;

    var params = {
    “LAYERS”: layerobject.wmsLayers,
    “VERSION”:”1.1.1″,
    “TRANSPARENT” : “true”,
    “BGCOLOR”: “0xFFFFFF”,
    “FORMAT”: format
    };

    layerobject.wmsStyle === null ? “” : params[“STYLES”] = layerobject.wmsStyle;
    var layerobject_extent_array = layerobject.wmsExtent.replace(/ /g,”,”).split(“,”).map(function(o){return parseFloat(o);});
    geuswebmap.serverSideLayers[layerobject.name] = new ol.layer.Image ({
    visible: (layerobject.visibleStr === “true”),
    zIndex: zindex,
    extent: ol.proj.transformExtent(layerobject_extent_array, layerobject.wmsExtentEPSG, ‘EPSG:’+geuswebmap.epsg ),
    source: new ol.source.ImageWMS({
    projection: layerobject.wmsSRS,
    serverType: “mapserver”,
    url: layerobject.wmsConnection,
    ratio:1,
    hidpi:false,
    params: params
    })
    });
    } else {
    // Have the layer point to our server
    geuswebmap.serverSideLayers[layerobject.name] = new ol.layer.Image ({
    visible: (layerobject.visibleStr === “true”),
    zIndex: zindex,
    extent: geuswebmap.bufferedExtent,
    source: new ol.source.ImageWMS({
    url: ‘map.jsp?0=0’,
    ratio:1,
    hidpi:false,
    params:{‘LAYERS’: layerobject.name, mapname: geuswebmap.mapname,
    epsg: ‘EPSG:’+geuswebmap.epsg,
    ‘TRANSPARENT’ : ‘true’
    }

    })
    });
    }
    if (layerobject.defaultLayer === true){
    geuswebmap.serverSideLayers[layerobject.name].setVisible(true);
    }
    }

    function addEventsToEachLayer(){
    // Add start/end/error-events
    for ( var key in geuswebmap.layers ) {
    geuswebmap.addLayerEvents(key);
    };

    // Add layers
    for ( key in geuswebmap.layers ) {
    geuswebmap.layers[key].name = key; // tag it (for debug purposes)
    map.addLayer( geuswebmap.layers[key] );
    }
    }

    function unhideMyLocation() {
    if (location.href.indexOf(“https”) === 0) {
    $(“button.ol-my-location”).removeClass(“hidden”);
    }
    }

    initialize_geuswebmap();
    setBaseLayers();
    setServerSideLayers();
    addEventsToEachLayer();
    addControls();
    unhideMyLocation();

    geuswebmap.displayWkt = function (wkt, epsg, showsecs) {
    if (showsecs == undefined || showsecs == null)
    showsecs = 15;
    if (wkt.indexOf(“POINT”) < 0 && wkt.indexOf(“POLYGON”) < 0 && wkt.indexOf(“LINESTRING”) < 0) {
    if ((wkt.match(/,/g) || []).length <= 1 && (wkt.match(/ /g) || []).length <= 1) { // The OR is to prevent null exception
    wkt = “POINT(” + wkt + “)”;
    } else {
    wkt = “LINESTRING(” + wkt + “)”;
    }
    }
    var coords, geom;
    console.log(wkt);
    try {
    coords = geuswebmap.format.readGeometry(wkt).getCoordinates();
    } catch (e) {
    // Replace comma and space and try again
    coords = geuswebmap.format.readGeometry(wkt.replace(/,/g, ‘_’).replace(/ /g, ‘,’).replace(/_/g, ‘ ‘)).getCoordinates();
    }
    if (wkt.indexOf(“POINT”) >= 0) {
    geom = new ol.geom.Point(coords);
    } else if (wkt.indexOf(“POLYGON”) >= 0) {
    geom = new ol.geom.Polygon(coords);
    } else if (wkt.indexOf(“LINESTRING”) >= 0) {
    geom = new ol.geom.LineString(coords);
    }
    if (epsg !== undefined && epsg !== null && geuswebmap.epsg.length > 0) {
    geom.transform(‘EPSG:’ + epsg, ‘EPSG:’ + geuswebmap.epsg);
    }
    geuswebmap.layers.myLocation.getSource().addFeature(new ol.Feature({geometry: geom}));

    map.getView().fit(geuswebmap.layers.myLocation.getSource().getExtent(), map.getSize(), {padding: [50, 50, 50, 50], minResolution: 3});
    setTimeout(function () {
    geuswebmap.layers.myLocation.getSource().clear();
    }, 1000 * showsecs);
    }

    geuswebmap.fetchWMSLayers = function(wmsURL,returnSelectItem,defaultLayer,loadAsCustomWmsNow) {
    //console.log( [ “fetchWMSLayers”, wmsURL,returnSelectItem,defaultLayer,loadAsCustomWmsNow ] );
    $(returnSelectItem).show();
    try {
    if ( wmsURL === undefined || wmsURL.length == 0 ) {
    //$(returnSelectItem).show().html(“<option>Not a valid WMS service URL…</option>”);
    return;
    }
    if ( !wmsURL.indexOf(“http://”) == 0 && !wmsURL.indexOf(“https://”) == 0 ) {
    wmsURL = “http://” + wmsURL;
    }
    if ( wmsURL.indexOf(“?”) < 0 ) {
    wmsURL = wmsURL + “?”;
    }
    if ( wmsURL.toUpperCase().indexOf(“SERVICE=”) > 0 ) {
    wmsURL = wmsURL.substring( 0, wmsURL.toUpperCase().indexOf(“SERVICE=”) ) + “SERVICE=WMS” + wmsURL.substring( wmsURL.toUpperCase().indexOf(“SERVICE=”) + “SERVICE=”.length+3 );
    } else {
    wmsURL = wmsURL + “&SERVICE=WMS”;
    }
    if ( wmsURL.toUpperCase().indexOf(“VERSION=”) > 0 ) {
    wmsURL = wmsURL.substring( 0, wmsURL.toUpperCase().indexOf(“VERSION=”) ) + “VERSION=1.3.0” + wmsURL.substring( wmsURL.toUpperCase().indexOf(“VERSION=”) + “VERSION=”.length+5 );
    } else {
    wmsURL = wmsURL + “&VERSION=1.3.0”;
    }
    if ( wmsURL.toUpperCase().indexOf(“REQUEST=”) > 0 ) {
    wmsURL = wmsURL.substring( 0, wmsURL.toUpperCase().indexOf(“REQUEST=”) ) + “REQUEST=GetCapabilities” + wmsURL.substring( wmsURL.toUpperCase().indexOf(“REQUEST=”) + “REQUEST=”.length+15 );
    } else {
    wmsURL = wmsURL + “&REQUEST=GetCapabilities”;
    }
    if ( wmsURL.toUpperCase().indexOf(“LANGUAGE=”) < 0 ) {
    wmsURL = wmsURL + “&LANGUAGE=eng”;
    }
    if ( wmsURL.indexOf(“?&”) > 0 ) {
    wmsURL = wmsURL.replace(“?&”,”?”);
    }
    if ( $(returnSelectItem).attr(“data-wms-source”) == wmsURL ) {
    // No need to load again
    return;
    } else {
    $(returnSelectItem).attr(“data-wms-source”,wmsURL);
    }
    $(returnSelectItem).show().html(“<option>” + labels.loading + “…</option>”);
    //console.log( wmsURL );
    $.ajax({
    type: “GET”,
    url: “proxy.jsp?callup=” + encodeURIComponent(wmsURL),
    layername: defaultLayer,
    success: function(response, textStatus, jqXHR) {
    try {
    geuswebmap.customWMS = {};
    geuswebmap.customWMS.response = [response, textStatus, jqXHR];
    geuswebmap.customWMS.format = new ol.format.WMSCapabilities({version: “1.3.0”});
    geuswebmap.customWMS.result = geuswebmap.customWMS.format.read(response);
    geuswebmap.customWMS.result = window.JSON.stringify(geuswebmap.customWMS.result, null, 2);
    geuswebmap.customWMS.getCap=window.JSON.parse( geuswebmap.customWMS.result );

    // Examples of object retrieval:
    // console.log( geuswebmap.customWMS.getCap[“Service”] );
    // console.log( geuswebmap.customWMS.getCap[“Capability”][“Layer”] );
    $(returnSelectItem).html(“<option style=’color:gray’ value=” data-legendurl=” data-metaurl=” data-dataurl=”>” + labels.choose_a_layer + “</option>”);
    $(returnSelectItem).append( geuswebmap.traverseWmsLayers( geuswebmap.customWMS.getCap[“Capability”][“Layer”][“Layer”] , 0 ) );
    if ( defaultLayer !== undefined ) {
    $(returnSelectItem).val( defaultLayer );
    if ( $(returnSelectItem).prop(“name”) == “layer.config” ) {
    geuswebmap.setLayerFilter( $(returnSelectItem).parents(“form”).attr(“data-layer-name”) );
    }
    if ( loadAsCustomWmsNow ) {
    geuswebmap.addWMSLayer( $(‘input#extwmsurl’) , $(returnSelectItem), $(‘div#layerUserDefinedWMS’) );
    }
    }
    } catch( ex ) {
    $(returnSelectItem).show().html(“<option>” + labels.unable_to_load_capabilities + “: ” + wmsURL + “</option”);
    }
    }.bind(this),
    error : function(jqXHR, textStatus, errorThrown) {
    $(returnSelectItem).show().html(“<option>Error: ” + errorThrown + “</option”);
    }.bind(this)
    });
    } catch ( eeee ) {
    console.log ( [ “fetchWMSLayers”, wmsURL, returnSelectItem, defaultLayer, eeee ] );
    }
    }

    geuswebmap.traverseWmsLayers = function(arrayList,depth){
    if (!arrayList) return “”;
    var html=””;
    for(var i=0;i<arrayList.length;i++){
    var extent,crs,layabstract,laytitle,legurl,metaurl,dataurl,description;
    try {
    extent = [ arrayList[“EX_GeographicBoundingBox”][“0”] , arrayList[“EX_GeographicBoundingBox”][1] , arrayList[“EX_GeographicBoundingBox”][2] , arrayList[“EX_GeographicBoundingBox”][3] ]; // Don’t do a toString(). It might mix the order of items.
    crs = arrayList[“CRS”].toString();
    try {
    layabstract = geuswebmap.utf8toiso88591( arrayList[“Abstract”] );
    laytitle = geuswebmap.utf8toiso88591( arrayList[“Title”] );
    legurl = arrayList[“Style”][“0”][“LegendURL”][“0”][“OnlineResource”];
    metaurl = arrayList[“MetadataURL”][“0”][“OnlineResource”];
    dataurl = arrayList[“DataURL”][“0”][“OnlineResource”];
    } catch(ee) {
    //console.log( ee );
    }
    html+=”<option value=\”” + arrayList[“Name”] + “\” title=\”” + (layabstract===undefined?””:layabstract) + “\” data-epsg=\”4326\” data-extent=\”” + (extent===undefined?””:extent) + “\” data-legendurl=\”” + (legurl===undefined?””:legurl) + “\” data-metaurl=\”” + (metaurl===undefined?””:metaurl) + “\” data-dataurl=\”” + (dataurl===undefined?””:dataurl) + “\” data-crs=\”” + crs + “\”>” + Array(depth*3).join(” “) + laytitle.replace(‘”‘, “‘”) + “</option>”; // the Array-thing is just to indent the title
    } catch(e) {
    //console.log( [“Missing extent and/or CRS node”, arrayList ] );
    }
    html+=geuswebmap.traverseWmsLayers( arrayList[“Layer”] , depth+1 );
    }
    return html;
    }

    geuswebmap.addWMSLayer = function(urlitm,layitm,showInDiv) {
    //console.log( [ “addWMSLayer”, urlitm, layitm, showInDiv ] );
    if ( layitm.val() == undefined || layitm.val().length == 0 || layitm.find(“option:selected”).attr(“data-dummy”) !== undefined ) {
    return;
    }
    if ( geuswebmap.customWMScount ) geuswebmap.customWMScount++; else geuswebmap.customWMScount = 1; // Sequence
    var serviceurl = urlitm.val();
    if ( !serviceurl.indexOf(“http://”) == 0 && !serviceurl.indexOf(“https://”) == 0 ) {
    // Assume
    serviceurl = “http://” + serviceurl;
    }
    var layername = layitm.val();
    if ( layername === undefined || layername == null ) {
    layername = ‘nothing’;
    }
    var layerID = “customWMS” + geuswebmap.customWMScount + “_” + layername.replace(/[^a-zA-Z0-9]/g,””);
    var layertitle = layitm.find(“option:selected”).html();
    var supportedepsg = layitm.find(“option:selected”).attr(“data-crs”);
    var legendurl = layitm.find(“option:selected”).attr(“data-legendurl”);
    var metaurl = layitm.find(“option:selected”).attr(“data-metaurl”);
    var dataurl = layitm.find(“option:selected”).attr(“data-dataurl”);
    var laydescription = geuswebmap.utf8toiso88591( layitm.find(“option:selected”).attr(“title”) );
    var layext = layitm.find(“option:selected”).attr(“data-extent”);
    var extent4326 = geuswebmap.extent4326; // Get default extent in EPSG:4326
    if ( layext !== undefined && layext.length > 0 ) {
    extent4326 = layitm.find(“option:selected”).attr(“data-extent”).split(“,”);
    }
    var epsg = geuswebmap.epsg;
    if ( supportedepsg !== undefined && supportedepsg.toUpperCase().indexOf( “EPSG:” + geuswebmap.epsg ) < 0 ) {
    // Prioritize
    if ( supportedepsg.toUpperCase().indexOf( “EPSG:3035” ) > 0 ) {
    epsg = “3035”;
    } else if ( supportedepsg.toUpperCase().indexOf( “EPSG:4326” ) > 0 ) {
    epsg = “4326”;
    } else {
    // Pick the first and hope for the best…
    epsg = supportedepsg.split(“,”)[0].split(“:”)[1];
    }
    }
    // ol.proj.transformExtent fails if close to the poles. Transform additional points for best fit.
    var tmpextentll = ol.proj.transform( [extent4326[0], extent4326[1]], ‘EPSG:4326’, ‘EPSG:’+geuswebmap.epsg );
    var tmpextentur = ol.proj.transform( [extent4326[2], extent4326[3]], ‘EPSG:4326’, ‘EPSG:’+geuswebmap.epsg );
    var tmpextentlc = ol.proj.transform( [ 1*extent4326[0]+(extent4326[2]-extent4326[0])/2, extent4326[1]], ‘EPSG:4326’, ‘EPSG:’+geuswebmap.epsg );
    var tmpextentuc = ol.proj.transform( [ 1*extent4326[0]+(extent4326[2]-extent4326[0])/2, extent4326[3]], ‘EPSG:4326’, ‘EPSG:’+geuswebmap.epsg );
    var tmpextent = [ tmpextentll[0], Math.min(tmpextentll[1],tmpextentlc[1],tmpextentur[1]), tmpextentur[0], Math.max(tmpextentll[1],tmpextentuc[1],tmpextentur[1]) ];
    if(serviceurl === undefined || layername === undefined || extent4326 === undefined || epsg === undefined || serviceurl.length==0 || layername.length==0 || extent4326.length==0 || epsg.length==0 ) {
    console.log( [“something missing…”,serviceurl,layername,epsg,extent4326] );
    return;
    }
    //console.log( [ extent4326, epsg, serviceurl, layername ] );
    geuswebmap.layers[layerID] = new ol.layer.Image ({visible:true, zIndex:1000, extent: tmpextent, source: new ol.source.ImageWMS({projection:’EPSG:’+epsg, ratio:1, serverType: ‘mapserver’, url: serviceurl.split(“?”)[0], params: { ‘LAYERS’:layername, ‘TRANSPARENT’:”TRUE”, ‘BGCOLOR’:’0xFFFFFF’, ‘VERSION’:’1.1.1′, ‘SRS’:’EPSG:’+epsg, ‘CRS’:’EPSG:’+epsg, ‘FORMAT’:’image/png’ } }), opacity:1 });
    geuswebmap.layers[layerID][“tmpTitle”] = layertitle; // Hack for use in info box
    geuswebmap.addLayerEvents(layerID);
    map.addLayer( geuswebmap.layers[layerID] );
    // Read HTML from template and change the references inside the HTML
    var tmpHtml = $(“div#custom-wms-template”).html().replace(/custom_wms/g,layerID);
    showInDiv.append(“

    “);
    showInDiv.find(“div#” + layerID).html( tmpHtml );
    showInDiv.find(“div#” + layerID).attr(“data-legend-link”, legendurl );
    showInDiv.find(“div#” + layerID).attr(“data-meta-link”, laydescription );
    showInDiv.find(“div#” + layerID).attr(“data-epsg”, “4326” );
    showInDiv.find(“div#” + layerID).attr(“data-extent”, extent4326 );
    showInDiv.find(“div#” + layerID).fadeIn();
    // Add extent
    showInDiv.find(“div#” + layerID).find(“div.goto-full-extent a”).click( function() {
    map.getView().fit( ol.proj.transformExtent( $(this).parents(“.end-node”).attr(‘data-extent’).split(“,”).map(Number),’EPSG:’+$(this).parents(“.end-node”).attr(‘data-epsg’),’EPSG:’+geuswebmap.epsg), map.getSize());
    });
    // Add legend and description
    if ( legendurl !== undefined && legendurl.length > 0 ) {
    showInDiv.find(“div#” + layerID + ” .legend div”).html(““);
    }
    showInDiv.find(“div#” + layerID + ” .metadata div”).html( “<p style=’font-weight:bold;’>” + laydescription + “</p>” );
    showInDiv.find(“div#” + layerID + ” .metadata div”).append( “<p>Service URL</p>” );

    if ( metaurl !== undefined && metaurl.length > 0 ) {
    showInDiv.find(“div#” + layerID + ” .metadata div”).append(“<p>” + labels.more_info + “</p>”);
    }
    if ( dataurl !== undefined && dataurl.length > 0 ) {
    showInDiv.find(“div#” + layerID + ” .metadata div”).append(“<p>” + labels.data_info + “</p>”);
    }
    showInDiv.find(“div#” + layerID + ” .custom-wms-title”).html( layertitle );
    //$(“div#customWMSList”).append(“

    ” + layername + ” <button onClick=\”geuswebmap.removeWMSLayer(‘” + layerID + “‘,this);\” style=’cursor:pointer;font-weight:bold;’>X</button>

    “);
    //if ( legendurl != “undefined” ) {
    //$(“div#customWMSList div”).last().append(“

    “);
    //}
    // Active layers counter
    var badge = showInDiv.prev().find(‘span.badge’ );
    var laycnt = (1*badge.html()) + 1;
    badge.html( laycnt ).show();
    geuswebmap.setUrlHash();
    }

    geuswebmap.removeWMSLayer = function(layerID,removeButton) {
    //console.log( [“removeWMSLayer”, layerID, removeButton] );
    // Find badge before deleting
    var badge = $(removeButton).parents(“.list-group”).first().prev().find(“span.badge”);
    map.removeLayer(geuswebmap.layers[layerID]);
    $(“div#” + layerID).remove();
    delete geuswebmap.layers[layerID];
    // Active layers counter
    var laycnt = (1*badge.html()) – 1;
    badge.html( laycnt );
    if ( laycnt == 0 ) {
    badge.hide();
    }
    geuswebmap.setUrlHash();
    }

    geuswebmap.updateFromWMSLayer = function( selectItem, layerName ) {
    //console.log( [“updateWMSLayer”, selectItem, layerName ] );
    // This function upates legend, metadata, and extent as necessary.
    // Updating the map layer is done together with other filter items in function setLayerFilter.
    var layname = selectItem.id.replace(“_layselect”,””);
    var tmplaymetaurl = $(selectItem).parents(“div.end-node”).attr(“data-meta-link-org”)
    var tmplegurl = $(selectItem).find(“option:selected”).attr(“data-legendurl”);
    var tmpmetaurl = $(selectItem).find(“option:selected”).attr(“data-metaurl”);
    var tmpdataurl = $(selectItem).find(“option:selected”).attr(“data-dataurl”);
    var tmpepsg = $(selectItem).find(“option:selected”).attr(“data-epsg”);
    var tmpextent = $(selectItem).find(“option:selected”).attr(“data-extent”);
    // Update hidden settings
    $(“div#”+layerName+”.end-node”).attr(“data-legend-link”,tmplegurl);
    $(“div#”+layerName+”.end-node”).attr(“data-meta-link”,tmpmetaurl);
    $(“div#”+layerName+”.end-node”).attr(“data-data-link”,tmpdataurl);
    if ( tmpepsg !== undefined && tmpepsg.length>0 ) {
    $(“div#”+layerName+”.end-node”).attr(“data-epsg”,tmpepsg);
    }
    if ( tmpextent !== undefined && tmpextent.length>0 ) {
    $(“div#”+layerName+”.end-node”).attr(“data-extent”,tmpextent);
    }
    // Update tabs
    if ( tmplegurl !== undefined && tmplegurl.length>0 ) {
    // first set to null because of a rendering bug in internet explorer
    //$(“div[data-id=”+layerName+”]”).find(“.legendimage”).attr(“src”,null);
    $(“div[data-id=”+layerName+”]”).find(“.legendimage”).attr(“src”,tmplegurl);
    //$(“div[data-id=”+layerName+”]”).find(“.legendimage”).css(“width”,”auto”);
    $(“.legendimage”).each(function(o,p){ loadimage(p);});
    //$(“div#”+layerName+”.end-node”).find(“div.legend div img”).prop(“src”,$(selectItem).find(“option:selected”).attr(“data-legendurl”));

    }
    // TODO: Handle all the various meta better
    var metafound = false;
    var metahtmlstr = “”;
    if ( tmpmetaurl !== undefined && tmpmetaurl.length>0 ) {
    if ( tmplaymetaurl === undefined || tmplaymetaurl != tmpmetaurl ) {
    metahtmlstr += “<p>” + labels.layer_description + “</p>”;
    }
    }
    if ( tmpdataurl !== undefined && tmpdataurl.length>0 ) {
    metahtmlstr += “<p>” + labels.data_description + “</p>”;
    }
    if ( $(selectItem).parents(“div”).first().find(“div.wmsinfo”).length==0 ) {
    $(selectItem).parents(“div”).first().append(“

    “);
    }
    $(selectItem).parents(“div”).first().find(“div.wmsinfo”).html( metahtmlstr );

    /*
    $(“div#”+layerName+”.end-node”).find(“div.metadata div”).css(“padding”,”10px”).html(“”); // Remove the existing meta-description
    if ( tmplaymetaurl !== undefined && tmplaymetaurl.length>0 ) {
    $(“div#”+layerName+”.end-node”).find(“div.metadata div”).append(“<p>Main metadata document</p>” );
    }
    if ( tmpmetaurl !== undefined && tmpmetaurl.length>0 ) {
    if ( tmplaymetaurl === undefined || tmplaymetaurl != tmpmetaurl ) {
    $(“div#”+layerName+”.end-node”).find(“div.metadata div”).append(“<p>Layer metadata document</p>” );
    }
    }
    if ( tmpdataurl !== undefined && tmpdataurl.length>0 ) {
    $(“div#”+layerName+”.end-node”).find(“div.metadata div”).append(“<p>Data description</p>” );
    }
    */
    }

    geuswebmap.utf8toiso88591 = function ( utf8string ) {
    try {
    return decodeURIComponent(escape( utf8string ) );
    } catch ( exc ) {
    return utf8string; // Return org.
    }

    }

    var geuswebmap = geuswebmap || {};
    var map = map || {};

    geuswebmap.hiliFeature = function(iWkt, epsg, doJump) {
    //console.log( “hiliFeature” );
    if( iWkt === null || iWkt.length === 0 ) {
    return;
    };
    geuswebmap.layers.hiliLayer.getSource().clear();
    var feat = geuswebmap.format.readFeature(iWkt, { dataProjection:”EPSG:”+epsg, featureProjection:’EPSG:’+geuswebmap.epsg });
    geuswebmap.layers.hiliLayer.getSource().addFeature( feat );
    if ( doJump ) {
    if ( iWkt.indexOf(“POINT”) >= 0 ) {
    map.getView().fit( feat.getGeometry(), map.getSize(), {minResolution:25} );
    } else {
    map.getView().fit( feat.getGeometry(), map.getSize(), {minResolution:100} );
    }
    }
    };

    // Remove existing highlighting
    geuswebmap.hiliClear = function() {
    //console.log( “hiliClear” );
    geuswebmap.layers.selectLayer.getSource().clear();
    geuswebmap.layers.hiliLayer.getSource().clear();
    };
    // This function loads the geocoder (call this before asking the user for a location)
    geuswebmap.loadGeocoder = function() {
    //console.log( “loadGeocoder” );
    if ( geuswebmap.geocoder === undefined ) {
    geuswebmap.geocoder = 0; // Prevents reload
    // Google Geocode support
    var fileref=document.createElement(‘script’);
    fileref.setAttribute(“type”,”text/javascript”);
    fileref.setAttribute(“src”, “https://maps.googleapis.com/maps/api/js?key=AIzaSyClLGyHJs4qZXlHpZgcUo2k2G_jB4WVxm4”);
    document.getElementsByTagName(“head”)[0].appendChild(fileref);
    }
    }

    // Functions for geocoding and flying to the spot
    geuswebmap.goToAddress = function(address) {
    if ( address.split(“,”).length==2 && !isNaN(parseInt(address.split(“,”)[0], 10)) && !isNaN(parseInt(address.split(“,”)[1], 10)) ) {
    geuswebmap.gotoPosition({coords:{
    longitude:parseFloat(address.split(“,”)[0], 10),
    latitude:parseFloat(address.split(“,”)[1], 10)
    }});
    return;
    }
    if ( geuswebmap.epsg.indexOf(“3262”) == 0 ) {
    // Use GRL place names instead
    geuswebmap.gotoPlacename(address);
    return;
    }
    geuswebmap.geocoder = new google.maps.Geocoder();
    geuswebmap.geocoder.geocode( { ‘address’: address}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
    var featid=0;
    for (featid=0;featid<results.length;featid++) {
    var tmpCoordinate = ol.proj.transform([results[featid].geometry.location.lng(), results[featid].geometry.location.lat()], ‘EPSG:4326’, ‘EPSG:’+geuswebmap.epsg);
    if ( ol.extent.containsCoordinate( geuswebmap.extent, tmpCoordinate ) ) {
    geuswebmap.layers.myLocation.getSource().addFeature( new ol.Feature({geometry: new ol.geom.Point( tmpCoordinate )}) );
    setTimeout(function () { geuswebmap.layers.myLocation.getSource().clear(); }, 10000 );
    }
    }
    if ( featid >= 1 ) {
    map.getView().fit(geuswebmap.layers.myLocation.getSource().getExtent(), map.getSize(), {padding:[50,50,50,50], minResolution: 1 } );
    // Guess an appropriate resolution. The more components, the more precise location and therefore small resolution
    switch ( results[0].address_components.length ) {
    case 1:
    // Probably a country
    map.getView().setResolution( 500 );
    break;
    case 2:
    // Probably a city
    map.getView().setResolution( 100 );
    break;
    case 3:
    // Probably a street
    map.getView().setResolution( 10 );
    break;
    case 4:
    // Probably a street
    map.getView().setResolution( 5 );
    break;
    default:
    // Probably a house
    map.getView().setResolution( 1 );
    }
    }
    } else {
    alert(status);
    }
    });
    }

    // Current location
    geuswebmap.gotoPosition = function(position) {
    //console.log( “gotoPosition” );
    var tmpCoordinate = ol.proj.transform([position.coords.longitude, position.coords.latitude], ‘EPSG:4326’, ‘EPSG:’+geuswebmap.epsg);
    map.getView().setCenter( tmpCoordinate );
    map.getView().setZoom(10);
    geuswebmap.layers.myLocation.getSource().clear();
    geuswebmap.layers.myLocation.getSource().addFeature( new ol.Feature({geometry: new ol.geom.Point( tmpCoordinate )}) );
    };

    geuswebmap.gotoPlacename = function(placename) {
    if(placename === “” || placename === undefined){
    alert(“please enter a value:”);
    ;

    }
    else{
    geuswebmap.layers.myLocation.getSource().clear();
    $.ajax({
    url: “ajax/grl_placenames.jsp”,
    data: “filter=” + placename,
    type: “GET”,
    timeout: 3000,
    contentType: “application/x-www-form-urlencoded;charset=UTF8”,
    dataType: ‘html’,
    success: function(data) {
    var tmpfound = false;
    var results = data.split(“|”);
    var featid=0;
    for (featid=0;featid<results.length;featid++) {
    if ( results[featid].length > 0 ) {
    var placenameText = results[featid].split(“;”)[0];
    var placenameWkt = results[featid].split(“;”)[1];
    try {
    // See layer grl_placenames for its projection (should be 32624)
    var tmpCoordinate = ol.proj.transform(geuswebmap.format.readGeometry( placenameWkt ).getCoordinates(), ‘EPSG:32624’, ‘EPSG:’+geuswebmap.epsg);
    if ( ol.extent.containsCoordinate( geuswebmap.extent, tmpCoordinate ) ) {
    geuswebmap.layers.myLocation.getSource().addFeature( new ol.Feature({geometry: new ol.geom.Point( tmpCoordinate )}) );
    setTimeout(function () { geuswebmap.layers.myLocation.getSource().clear(); }, 20000 );
    tmpfound = true;
    }
    } catch (eee) {
    console.log([“gotoPlacename”,placenameWkt,eee]);
    }
    }
    }
    if ( tmpfound && featid >= 1 ) {
    map.getView().fit(geuswebmap.layers.myLocation.getSource().getExtent(), map.getSize(), {padding:[50,50,50,50] } );
    if ( map.getView().getResolution() < 60 ) {
    map.getView().setResolution(60);
    }
    }else {
    alert(labels.hits + “: 0”);
    }
    },
    error: function(xhr) {
    $(“div#byFilter_data”).html(“<br><h3 style=’color:red;text-align:center;’>Error</h3>” );
    }

    });
    }};

    // Iterate through the layer checkboxes and turn OL3 layers on and off
    var geuswebmap = geuswebmap || {};
    var map = map || {};
    var labels = labels || {};
    var ol = ol || {};

    geuswebmap.layersOnOffSync = function() {
    $(“input[name=layer]”).each( function() {
    try {
    geuswebmap.layers[ $(this).attr(“value”) ].setVisible( $(this).is(“:checked”) );

    } catch (e) {
    console.log( [“layersOnOffSync” , “key”, e ] );
    }
    });
    //geuswebmap.sortupdate ();
    geuswebmap.setUrlHash();
    };

    geuswebmap.setLayerFilter = function(layername) {
    //console.log( [ “setLayerFilter”, layername, geuswebmap.layers[layername] ] );
    var tmpparams = {};
    var showList = false;
    var tmpurl = “”;
    try {
    // ArcGIS rest layers
    tmpurl = geuswebmap.layers[layername].getSource().getUrls()[0];
    } catch ( ee ) {
    // WMS etc.
    try {
    tmpurl = geuswebmap.layers[layername].getSource().getUrl();
    } catch ( eee ) {
    console.log( “function setLayerFilter error”, layername, eee );
    }
    }
    if ( tmpurl.indexOf(“http”) === 0 ) {
    // external source = use std wms possibilities
    $(“form.”+layername).find(“select,input”).each( function() {
    var tmpname = $(this).prop(“name”);
    if ( tmpname === “layer.config” ) {
    if ( $(this).val().length === 0 ) {
    geuswebmap.layers[layername].setVisible( false );
    } else {
    geuswebmap.layers[layername].setVisible( true );
    }
    // Make the custom field name into a std WMS param
    tmpname = “LAYERS”;
    }
    tmpparams[ tmpname ] = $(this).val();
    });
    } else {
    // internal source = more possibilities
    tmpparams.filter = encodeURIComponent( $(“form.”+layername).serialize() );
    showList = true;
    }
    // Add filter to layer
    geuswebmap.setUrlHash();
    try {
    geuswebmap.layers[layername].getSource().updateParams( tmpparams );
    } catch ( e ) {
    // Do nothing. Some layers doesn’t have the updateParams function.
    }
    if ( showList ) {
    // Remove search features if exists
    var feat = geuswebmap.layers.selectLayer.getSource().getFeatures();
    if ( feat.length > 0 ) {
    geuswebmap.layers.selectLayer.getSource().removeFeature( feat[0] );
    }
    $(“div#mapinfo”).html(“”);
    $(“div#mapdetails”).hide();

    // If search criteria exists, do a textual search as well
    /* TODO: Too aggressive?
    if ( $(“form.”+layername).length > 0 && ($(“form.”+layername).serialize()+”&”).split(“=&”).length != ($(“form.”+layername).serialize()+”&”).split(“&”).length ) {
    geuswebmap.searchByFeature( layername );
    }
    */
    }
    geuswebmap.setUrlHash();
    };

    geuswebmap.layerChooser = function(elm) {
    // Takes a select item and turns all named layers off except the selected option
    //console.log( “layerChooser” );
    // Remove legend link, if exists
    $(this).parents(“div.mapSettingsElm”).find(“div.legend”).remove();
    $(elm).find(“option”).each( function() {
    for ( var key in this.value.split(“,”) ) {
    // Add legend link?
    if ( $(this).is(“:selected”) && $(this).attr(“data-legend”) !== undefined ) {
    $(this).parents(“div.mapSettingsElm”).find(“div.legend”).remove();
    $(this).parents(“select”).after(“

    “);
    }
    var tmplayname = this.value.split(“,”)[key];
    // Does the value correspond to a layer ID, then sync with the option selected or not
    if ( geuswebmap.layers[ tmplayname ] !== undefined && geuswebmap.standardbackground ) {
    geuswebmap.layers[ tmplayname ].setVisible( $(this).is(“:selected”) );
    } else if ( tmplayname.length>0 && tmplayname!==”baseMap2″ ) {
    if ( $(this).parent(“optgroup”) && $(this).parent(“optgroup”).children().size() === 1 ) {
    $(this).parent(“optgroup”).remove();
    }
    $(this).remove();
    }
    }
    });

    geuswebmap.setUrlHash();
    };

    geuswebmap.toggleLayerVisibility = function(element){
    par = element.parentElement.parentElement;
    if ($(par).find(“span.hide-layer-details”).is(“:visible”)){

    $(par).find(“span.hide-layer-details”).hide();
    $(par).find(“span.show-layer-details”).show();
    $(par).find(“div.layerContents”).show();
    }
    else{

    $(par).find(“span.hide-layer-details”).show();
    $(par).find(“span.show-layer-details”).hide();
    $(par).find(“div.layerContents”).hide();
    }
    };

    geuswebmap.toggleLayer = function(checkbox,forceReload) {
    if ( checkbox === undefined ) return;
    //console.log( [“toggleLayer”,checkbox,forceReload] );
    try {
    var cb = $(checkbox);
    var cbiditm = “|”+checkbox.id+”|”;
    // Active layers counter
    var badge = $(‘.list-group span#’ + cb.attr(‘data-badgeid’) );

    var groupsort = $(badge).siblings(‘.list-group-item span.glyphicon-sort’);
    if( !cb.is(‘:checked’) ) {
    geuswebmap.removeFromLegend(cb.parents(“.end-node”).attr(“id”));
    //geuswebmap.toggleLayerVisibility($(cb.data().layerName+”_togglelayerinvisible”)[0]);
    badge.attr( “data-active-checkboxes”, badge.attr( “data-active-checkboxes”).replace(cbiditm,””) );

    $(‘div#’ + cb.val() + ‘ .layerContents’).slideUp();
    geuswebmap.hiliClear(); // Don’t want hanging hili features
    //
    // Remove legend?
    $(cb[0].parentElement.parentElement.parentElement).find(“span.hide-layer-details”).hide();
    $(cb[0].parentElement.parentElement.parentElement).find(“span.show-layer-details”).hide();
    $(cb[0].parentElement.parentElement.parentElement).find(“.glyphicon-sort”).hide();
    //geuswebmap.toggleLayerVisibility($(cb[0].parentElement.parentElement).find(“span.hide-layer-details”)[0]);
    if ( $(“div#floatingDiv h3”).html() === cb.parents(“.end-node”).find(‘div.layerContents’).attr(‘data-layer-name’) ) {
    $(“div#floatingDiv”).remove();
    }
    $(cb[0].parentElement.parentElement.parentElement).find(“div.goto-full-extent”).hide();
    } else if ( cb.is(‘:checked’) ) {
    //
    var calcExtent = function (){return “”;};
    var dynamic = false;
    if(cb.parents(“.end-node”).data(“legend-link”).indexOf(“supports=dynamic”)>-1){
    dynamic = true;
    calcExtent = function (){
    return “&extent=”+map.getView().calculateExtent(map.getSize()).toString()+”&epsg=”+geuswebmap.epsg;
    };
    }

    geuswebmap.floatingDiv2(cb.parents(“.end-node”).data(“legend-link”), $(cb).data(“layer-name”),dynamic,calcExtent,$(cb).data(“layer-id”),cb.parents(“.end-node”).data(“meta-link”));

    if ( badge.attr(“data-active-checkboxes”) === undefined ) {
    badge.attr( “data-active-checkboxes”, cbiditm );
    }
    badge.attr( “data-active-checkboxes”, badge.attr( “data-active-checkboxes”).replace(cbiditm,””) + cbiditm );
    //$(‘div#’ + cb.val() + ‘ .layerContents’).slideDown();

    $(cb[0].parentElement.parentElement.parentElement).find(“.glyphicon-sort”).show();
    $(cb[0].parentElement.parentElement.parentElement).find(“div.goto-full-extent”).show();
    if ($(cb[0].parentElement.parentElement.parentElement).find(“div.layerContents”).is(“:visible”)){

    // $(cb[0].parentElement.parentElement).find(“span.hide-layer-details”).show();
    // $(cb[0].parentElement.parentElement).find(“span.show-layer-details”).hide();
    geuswebmap.toggleLayerVisibility($(cb[0].parentElement.parentElement.parentElement).find(“span.hide-layer-details”)[0]);
    }
    else{
    // $(cb[0].parentElement.parentElement).find(“span.show-layer-details”).show();

    $(cb[0].parentElement.parentElement.parentElement).find(“span.hide-layer-details”).show();
    geuswebmap.toggleLayerVisibility($(cb[0].parentElement.parentElement.parentElement).find(“span.hide-layer-details”)[0]);

    }

    }
    var laycnt = badge.attr(“data-active-checkboxes”).split(“||”).length;
    if ( badge.attr(“data-active-checkboxes”).split(“||”)[0].length === 0 ) laycnt = 0; // Split never returns zero-length array.
    badge.html(laycnt);
    if ( laycnt === 0 ) {
    badge.fadeOut();
    groupsort.fadeOut();
    };
    if ( laycnt > 0 ) {
    badge.fadeIn();
    groupsort.fadeIn();
    };

    // Setup the layer at first load
    if ( !cb.parents(“.end-node”).attr(“data-ajax-loaded”) ) {
    //console.log( [“toggleLayer”,checkbox,forceLoad,”setup”] );
    cb.parents(“.end-node”).attr(“data-ajax-loaded”,”true”);
    // Default tab (if all other fails)
    cb.parents(“.end-node”).find(“li.config”).tab(‘show’);
    cb.parents(“.end-node”).find(“div.config”).addClass(“active”);
    var aval,bval;
    // Load meta
    aval = cb.parents(“.end-node”).attr(“data-meta-link”);
    if ( aval && aval.length > 0 ) {
    cb.parents(“.end-node”).find(“div.metadata div”).html( “” );
    if ( aval.indexOf(“http://egdi.geology.cz/csw/”)===0 && aval.indexOf(“&id=”) > 0 ) {
    $.ajax({
    url: “http://egdi.geology.cz/csw/?request=GetRecords&query=identifier%3D%27” + encodeURIComponent(aval.split(“&id=”)[1].split(“&”)[0]) + “%27&format=application/json&MaxRecords=1&StartPosition=&language=eng”,
    timeout: 30000,
    dataType: “json”,
    success: function (mickajson, textStatus, jqXHR) {
    //console.log(mickajson);
    cb.parents(“.end-node”).find(“div.metadata div”).css(“padding”,”10px”).css(“overflow-y”,”auto”);
    cb.parents(“.end-node”).find(“div.metadata div img.loading”).hide();
    try {
    for ( var key in mickajson.records ) {
    cb.parents(“.end-node”).find(“div.metadata div”).append( “<p style=’padding-top:10px;font-weight:bold;’>” + mickajson.records[key].title + “</p>”);
    cb.parents(“.end-node”).find(“div.metadata div”).append( “<p style=’padding-top:10px;’>” + mickajson.records[key].abstract + “</p>”);
    cb.parents(“.end-node”).find(“div.metadata div”).append( “<p style=’padding-top:10px;font-weight:bold;’>Contact: ” + mickajson.records[key].contact + “</p>”);
    }
    } catch ( ex ) {
    cb.parents(“.end-node”).find(“div.metadata div img.loading”).hide();
    cb.parents(“.end-node”).find(“div.metadata div”).append( “<p style=’padding-top:10px;font-weight:bold;’>Unable to handle response…</p>”);
    console.log ( [ “read meta1”, ex ] );
    }
    }.bind(this),
    error : function(jqXHR, textStatus, errorThrown) {
    cb.parents(“.end-node”).find(“div.metadata div img.loading”).hide();
    cb.parents(“.end-node”).find(“div.metadata div”).append( “<p style=’padding-top:10px;font-weight:bold;’>” + textStatus + “…</p>”);
    //console.log ( [ “read meta2”, jqXHR, textStatus, errorThrown ] );
    }.bind(this)
    });
    } else {
    cb.parents(“.end-node”).find(“div.metadata div”).append(“<iframe width=’100%’ height=’95%’></iframe>”);
    cb.parents(“.end-node”).find(“div.metadata div iframe”).css(“border-width”,”0px”).prop( “src”, aval );
    }
    cb.parents(“.end-node”).find(“li.metadata”).show().tab(‘show’);
    cb.parents(“.end-node”).find(“div.active”).removeClass(“active”);
    cb.parents(“.end-node”).find(“div.metadata”).addClass(“active”);
    cb.parents(“.end-node”).find(“div.metadata div img.loading”).hide();
    cb.parents(“.end-node”).find(“div.metadata”).append(“<button class=’btn btn-xs btn-default’ type=’button’ class=’btn btn-default’>” + labels[“new_tab”] + “</button>“);
    cb.parents(“.end-node”).find(“div.metadata”).append(“<button type=’button’ class=’btn btn-xs btn-default’ onclick=\”geuswebmap.floatingDiv($(this).siblings(‘div’),$(this).parents(‘div.layerContents’).attr(‘data-layer-name’));\”>” + labels[“new_window”] + “</button>”);
    } else {
    cb.parents(“.end-node”).find(“li.metadata”).hide();
    }
    // Load legend
    aval = cb.parents(“.end-node”).attr(“data-legend-link”);
    if ( aval && aval.length > 0 ) {
    // Add img object to DOM
    cb.parents(“.end-node”).find(“div.legend div”).html(““);
    cb.parents(“.end-node”).find(“div.legend div img”).load( function() {
    //geuswebmap.floatingDiv($(this).parent(‘div’),$(this).parents(‘div.layerContents’).attr(‘data-layer-name’));
    });
    cb.parents(“.end-node”).find(“div.legend div img”).error( function() {
    // Plan B for image not possible to load
    var tmpleglink = cb.parents(“.end-node”).attr(“data-legend-link”);
    // Since not a static image, it might be extent-dynamic (GEUS invention).
    if( tmpleglink.indexOf(“supports=dynamic”)>0 ) {
    tmpleglink = tmpleglink.split(“&extent”)[0]+”&extent=”+map.getView().calculateExtent(map.getSize()).toString()+”&epsg=”+geuswebmap.epsg;

    }
    cb.parents(“.end-node”).find(“div.legend div”).html(“<iframe src='” + tmpleglink + “‘ style=’width:100%;height:140px;’></iframe>”);
    // In case the iframe is dynamically updated and legend window visible
    cb.parents(“.end-node”).find(“div.legend”).find(“iframe”).load(function() {
    if ( $(this).parents(“.end-node”).find(“input[type=checkbox]”).is(“:checked”) && $(“div#floatingDiv”).is(“:visible”) ) {
    //geuswebmap.floatingDiv($(this),$(this).parents(‘div.layerContents’).attr(‘data-layer-name’),true);
    }
    });
    // Add buttons
    cb.parents(“.end-node”).find(“div.legend”).append(“<button type=’button’ class=’btn btn-xs btn-default’ onClick=\”window.open($(this).parent().find(‘iframe’).attr(‘src’));\”>” + labels[“new_tab”] + “</button>”);
    //cb.parents(“.end-node”).find(“div.legend”).append(“<button type=’button’ class=’btn btn-xs btn-default’ onClick=\”geuswebmap.floatingDiv($(this).siblings(‘div’).find(‘iframe’),$(this).parents(‘div.layerContents’).attr(‘data-layer-name’));\”>” + labels[“new_window”] + “</button>”);

    cb.parents(“.end-node”).find(“div.legend .newwindow”).remove();
    $(this).remove();
    } );

    // Now try to load the image
    cb.parents(“.end-node”).find(“div.legend div img”).prop(“src”,aval);

    cb.parents(“.end-node”).find(“li.legend”).show().tab(‘show’);
    cb.parents(“.end-node”).find(“div.active”).removeClass(“active”);
    cb.parents(“.end-node”).find(“div.legend”).addClass(“active”);

    cb.parents(“.end-node”).find(“div.legend”).append(“<button type=’button’ class=’btn btn-xs btn-default’>” + labels[“new_tab”] + “</button>“);
    cb.parents(“.end-node”).find(“div.legend”).append(“<button type=’button’ class=’btn btn-xs btn-default newwindow’ onclick=\”geuswebmap.floatingDiv($(this).siblings(‘div’),$(this).parents(‘div.layerContents’).attr(‘data-layer-name’));\”>” + labels[“new_window”] + “</button>”);

    } else {
    cb.parents(“.end-node”).find(“li.legend”).hide();
    }
    // Load filter
    aval = cb.parents(“.end-node”).attr(“data-has-filter”);
    if ( aval && aval !== “false” ) {
    //console.log( [ aval , cb.parents(“.end-node”) ] );
    cb.parents(“.end-node”).find(“li.filter”).show().tab(‘show’);
    cb.parents(“.end-node”).find(“div.active”).removeClass(“active”);
    cb.parents(“.end-node”).find(“div.filter”).addClass(“active”);
    } else {
    cb.parents(“.end-node”).find(“li.filter”).hide();
    }

    // Show full-extent-button
    aval = cb.parents(“.end-node”).attr(“data-extent”);
    bval = cb.parents(“.end-node”).attr(“data-epsg”);
    //console.log( [ aval, bval ] );
    if ( aval && aval.length > 0 && bval && bval.length > 0 ) {
    cb.parents(“.end-node”).find(“.goto-full-extent”).show();
    cb.parents(“.end-node”).find(“div.goto-full-extent”).click( function() {
    map.getView().fit( ol.proj.transformExtent( $(this).parents(“.end-node”).attr(‘data-extent’).split(“,”).map(Number),’EPSG:’+$(this).parents(“.end-node”).attr(‘data-epsg’),’EPSG:’+geuswebmap.epsg), map.getSize());
    });
    }
    // Show service URL
    var surl = “”;
    try {
    surl = geuswebmap.layers[ cb.parents(“.end-node”).prop(“id”) ].getSource().getUrl(); // ImageWMS
    } catch ( ee ) {
    surl = geuswebmap.layers[ cb.parents(“.end-node”).prop(“id”) ].getSource().getUrls()[0]; // TileArcGISRest
    }
    if ( surl !== undefined && surl.length > 0 && !surl.indexOf(“map.jsp”) === 0 ) {
    cb.parents(“.end-node”).find(“div.config”).append(“

    Service URL:<br><input type=’text’ style=’font-size:0.8em;width:95%;’ onClick=’$(this).select();’ value='” + surl + “‘>

    “);
    }
    } else {
    // Tabs already loaded. Show legend in popup
    if( cb.is(‘:checked’) ) {
    var lurl = cb.parents(“.end-node”).attr(“data-legend-link”);
    if ( lurl !== undefined && lurl.length > 0 ) {
    //geuswebmap.floatingDiv( cb.parents(“.end-node”).find(“div.tab-pane.legend div”),cb.parents(“.end-node”).find(‘div.layerContents’).attr(‘data-layer-name’));
    }
    }
    }
    } catch (e) {
    console.log( [“toggleLayer”,e,checkbox] );
    }
    geuswebmap.layersOnOffSync();
    };

    geuswebmap.FullExtentControl = function(opt_options) {
    var handleFullExtent = function() {
    map.getView().fit(geuswebmap.extent, map.getSize());
    };
    $(“div.tool-box button.ol-full-extent”)[0].addEventListener(‘click’, handleFullExtent, false);
    ol.control.Control.call(this, {
    element: $(“div.tool-box”)[0],
    target: $(“div.tool-box-control”)[0]
    });
    }
    ol.inherits(geuswebmap.FullExtentControl, ol.control.Control);
    map.getControls().extend([new geuswebmap.FullExtentControl()]);

    geuswebmap.MyLocationControl = function(opt_options) {
    var handleMyLocation = function() {
    navigator.geolocation.getCurrentPosition( function(position) { geuswebmap.gotoPosition(position); } );
    }
    $(“div.tool-box button.ol-my-location”)[0].addEventListener(‘click’, handleMyLocation, false);
    ol.control.Control.call(this, {
    element: $(“div.tool-box”)[0],
    target: $(“div.tool-box-control”)[0]
    });
    }
    ol.inherits(geuswebmap.MyLocationControl, ol.control.Control);
    map.getControls().extend([new geuswebmap.MyLocationControl()]);

    geuswebmap.gotoAddressControl = function(opt_options) {
    var handleGotoAddress = function() {
    geuswebmap.loadGeocoder();
    //$(“#gotoAddress”).modal();
    };
    //$(“div.tool-box button.ol-go-to-address”)[0].addEventListener(‘click’, handleGotoAddress, false);
    $(“input#gotoAddressStr”)[0].addEventListener(‘click’, handleGotoAddress, false);
    ol.control.Control.call(this, {
    element: $(“div.tool-box”)[0],
    target: $(“div.tool-box-control”)[0]
    });
    }
    ol.inherits(geuswebmap.gotoAddressControl, ol.control.Control);
    map.getControls().extend([new geuswebmap.gotoAddressControl()]);
    $(‘#gotoAddress’).on(‘shown.bs.modal’, function () {
    $(‘#gotoAddressStr’).focus();
    })

    // Map interactions where we want to do on/off
    geuswebmap.interactions = {
    // Shift + drag = zoom in
    dragZoom: new ol.interaction.DragZoom({condition: ol.events.condition.shiftKeyOnly}), // Shift
    // home-made draw (drag rectangle) interaction that zooms to extent on up-event
    zoomBox: new ol.interaction.Pointer({
    handleDownEvent: function(evt){ geuswebmap.zoomBegin = evt.pixel; geuswebmap.zoomBox = [ evt.coordinate[0],evt.coordinate[1],evt.coordinate[0],evt.coordinate[1] ]; geuswebmap.layers.zoomLayer.getSource().addFeature( new ol.Feature({ geometry: ol.geom.Polygon.fromExtent( geuswebmap.zoomBox ) }) ); return true; },
    handleDragEvent: function(evt){ geuswebmap.zoomBox[2] = evt.coordinate[0]; geuswebmap.zoomBox[3] = evt.coordinate[1]; geuswebmap.layers.zoomLayer.getSource().getFeatures()[0].setGeometry( ol.geom.Polygon.fromExtent( geuswebmap.zoomBox ) ); },
    handleUpEvent: function(evt){ geuswebmap.zoomEnd = evt.pixel; if ( Math.abs( geuswebmap.zoomEnd[0]-geuswebmap.zoomBegin[0] ) > 20 && Math.abs( geuswebmap.zoomEnd[1]-geuswebmap.zoomBegin[1] ) > 20 ) { map.getView().fit( ol.geom.Polygon.fromExtent( geuswebmap.zoomBox ).getExtent(), map.getSize() ); } geuswebmap.layers.zoomLayer.getSource().clear(); geuswebmap.interactionsOnOff(); }
    }),
    // home-made dragBox interaction that does getfeatureinfo on feature added (triggered by the up-event)
    infoBox: new ol.interaction.Pointer({
    handleDownEvent: function(evt){ geuswebmap.boxBegin = evt.pixel; geuswebmap.infoBox = [ evt.coordinate[0],evt.coordinate[1],evt.coordinate[0],evt.coordinate[1] ]; geuswebmap.layers.vectorLayer.getSource().addFeature( new ol.Feature({ geometry: ol.geom.Polygon.fromExtent( geuswebmap.infoBox ) }) ); return true; },
    handleDragEvent: function(evt){ geuswebmap.infoBox[2] = evt.coordinate[0]; geuswebmap.infoBox[3] = evt.coordinate[1]; geuswebmap.layers.vectorLayer.getSource().getFeatures()[0].setGeometry( ol.geom.Polygon.fromExtent( geuswebmap.infoBox ) ); },
    handleUpEvent: function(evt){ geuswebmap.boxEnd = evt.pixel; if ( Math.abs( geuswebmap.boxEnd[0]-geuswebmap.boxBegin[0] ) > 5 && Math.abs( geuswebmap.boxEnd[1]-geuswebmap.boxBegin[1] ) > 5 ) { geuswebmap.layers.selectLayer.getSource().clear(); geuswebmap.layers.selectLayer.getSource().addFeature( new ol.Feature({ geometry: ol.geom.Polygon.fromExtent( geuswebmap.infoBox ) }) ); } geuswebmap.layers.vectorLayer.getSource().clear(); }
    }),
    infoPoly: new ol.interaction.Draw({ source: geuswebmap.layers.selectLayer.getSource(), type: /** @type {ol.geom.GeometryType} */ (“Polygon”) }), // http://openlayers.org/en/latest/examples/draw-features.html
    infoLine: new ol.interaction.Draw({ source: geuswebmap.layers.selectLayer.getSource(), type: /** @type {ol.geom.GeometryType} */ (“LineString”) }), // http://openlayers.org/en/latest/examples/draw-features.html
    // Ctrl + drag = getfeatureinfo (event attached further down)
    dragBox: new ol.interaction.DragBox({
    condition: ol.events.condition.platformModifierKeyOnly // Ctrl
    }),
    // Drag the map if mouse-down + drag
    dragPan: new ol.interaction.DragPan({condition: ol.events.condition.noModifierKeys}),
    // Draw point if map clicked
    drawPointSelect: new ol.interaction.Draw({condition: ol.events.condition.noModifierKeys, style: new ol.style.Style({ image: new ol.style.Circle({ fill: new ol.style.Fill({color:’red’}), stroke: new ol.style.Stroke({width:3, color:’green’}), radius:0 }) }), source: geuswebmap.layers.selectLayer.getSource(), type: (“Point”) }),
    // Other draw interactions
    //drawBox: new ol.interaction.Draw({ source: geuswebmap.layers.selectLayer.getSource(), geometryFunction: ol.interaction.Draw.createBox(), maxPoints: 2, type: /** @type {ol.geom.GeometryType} */ (“Circle”) }), // http://openlayers.org/en/v3.14.1/examples/draw-features.html
    //drawCircle: new ol.interaction.Draw({ source: geuswebmap.layers.selectLayer.getSource(), geometryFunction: ol.interaction.Draw.createRegularPolygon(50), maxPoints: 2, type: /** @type {ol.geom.GeometryType} */ (“Circle”) }), // http://openlayers.org/en/v3.14.1/examples/draw-features.html
    //Select: new ol.interaction.Select({layers:[geuswebmap.layers.dummyLayer]})
    };

    //Helper function for turning interactions on/off in groups
    geuswebmap.interactionsOnOff = function(interactionButton) {
    // Reset all
    for ( var key in geuswebmap.interactions ) {
    map.removeInteraction( geuswebmap.interactions[key] );
    }
    if ( interactionButton === undefined || $(interactionButton).hasClass(“active”) ) {
    // User wants to stop the interaction.
    if ( interactionButton === undefined ) {
    $(“button.active”).removeClass(“active”);
    } else {
    $(interactionButton).removeClass(“active”);
    }
    // Add default
    map.addInteraction( geuswebmap.interactions[‘dragZoom’] );
    map.addInteraction( geuswebmap.interactions[‘dragBox’] );
    map.addInteraction( geuswebmap.interactions[‘dragPan’] );
    map.addInteraction( geuswebmap.interactions[‘drawPointSelect’] );
    } else {
    // User wants to use this interaction.
    // Remove others
    $(“button.interactions”).removeClass(“active”);
    // Activate
    var ianames = $(interactionButton).attr(“data-interactions”).split(“,”);
    for ( var key in ianames ) {
    map.addInteraction( geuswebmap.interactions[ ianames[key] ] );
    }
    // Light up
    $(interactionButton).addClass(“active”);
    }
    }
    // Add click event to all interaction buttons on the map
    $(“button.interactions”).click(function(){ geuswebmap.interactionsOnOff(this); });

    // Connect two of them to CTRL and SHIFT keys
    window.addEventListener(“keydown”, function(event) {
    if (event.keyCode == 17) {
    geuswebmap.interactionsOnOff();
    $(“div.interactions button”).removeClass(“active”); $(“div.interactions button.ol-info-by-box”).addClass(“active”);
    } else if (event.keyCode == 16) {
    geuswebmap.interactionsOnOff();
    $(“div.interactions button”).removeClass(“active”); $(“div.interactions button.ol-zoom-by-box”).addClass(“active”);
    }
    }, false);
    window.addEventListener(“keyup”, function(event) {
    if (event.keyCode == 17 || event.keyCode == 16) {
    $(“div.interactions button”).removeClass(“active”);
    }
    }, false);

    // Create a rectangle when dragBox ends – this automatically also fires getfeatureinfo (list)
    geuswebmap.interactions.dragBox.on(‘boxend’, function() {
    geuswebmap.layers.selectLayer.getSource().clear();
    geuswebmap.layers.selectLayer.getSource().addFeature( new ol.Feature({ geometry: geuswebmap.interactions.dragBox.getGeometry() }) );
    });

    // Add default interactions
    geuswebmap.interactionsOnOff();

    // PermaLink (home-made)
    geuswebmap = geuswebmap || {};
    map = map || {};
    decodeURI = decodeURI || function(){};
    decodeURIComponent = decodeURIComponent || function(){};

    geuswebmap.URLHashRead = false;

    geuswebmap.setUrlHash = function() {
    // Don’t set URL hash until the URL has been read at least once.
    if ( !geuswebmap.URLHashRead ) return;
    //console.log( “setUrlHash” );
    var tmpLayers = [];
    var tmpFilters = “”;
    var ix = 0;
    for ( var key in geuswebmap.layers ) {
    if ( geuswebmap.serverSideLayers[key] !== undefined && geuswebmap.layers[key].getVisible() ) {
    tmpLayers.push(key);
    try {
    if ( geuswebmap.layers[key].getSource().getParams()[“filter”] ) {
    tmpFilters += “&filter_” + ix + “=” + geuswebmap.layers[key].getSource().getParams()[“filter”];
    } else {
    // TODO: Not possible to honor this when later reading hash, since a lot of stuff is going on onLoad that fires later than reading this param (“it’s complicated” 😉
    // tmpFilters += “&filter_” + ix + “=” + encodeURIComponent( “layer.config=” + geuswebmap.layers[key].getSource().getParams()[“layers”] );
    }
    } catch (e) {
    // Do nothing. XYZ-layers will fail on above getParams call.
    }
    ix++;
    }
    }
    var tmpextent = map.getView().calculateExtent(map.getSize());
    for ( key in tmpextent ) {
    if ( Math.abs(tmpextent[key]) > 1000 ) {
    // [tch] the next statement causes the browser to when a user presses F-5 in the browser
    // i.e. to refresh the browser without zooming in or out to zoom out in the greenland portal
    // I dont know why this should be done…
    //tmpextent[key] = Math.round(0.1*tmpextent[key])*10;
    }
    }
    var customwms = [];
    for (var key in geuswebmap.layers ) {
    if ( key.indexOf(“customWMS”)===0 ) {
    var tmpurl = “”;
    try {
    // ArcGIS rest layers
    tmpurl = geuswebmap.layers[key].getSource().getUrls ();
    } catch ( ee ) {
    // WMS etc.
    tmpurl = geuswebmap.layers[key].getSource().getUrl ();
    }
    customwms.push( encodeURIComponent ( tmpurl ) + “:” + encodeURIComponent( geuswebmap.layers[key].getSource().getParams()[“LAYERS”] ) );
    }
    }
    //console.log( customwms );
    window.location.hash = “#baslay=” + $(“select#baslay”).val() + “&optlay=” + $(“select#optlay”).val() + “&extent=” + tmpextent.toString() + (tmpLayers.length>0?”&layers=” + tmpLayers.toString():””) + tmpFilters + (customwms.length>0?(“&customwms=” + customwms.toString()):””);
    // Add permalink to the page
    var permlink = document.referrer.split(“bmagic”)[0];
    if ( !( permlink.slice(-1)===”&” || permlink.slice(-1)===”?” ) ) {
    if ( permlink.indexOf(“?”) < 0 ) {
    permlink += “?”;
    } else {
    permlink += “&”;
    }
    }
    permlink += “bmagic=y&” + window.location.hash.replace(“#”,””);
    $(“a#permlink”).attr(“href”,window.location.search+”#”+permlink);
    };
    // Read map changes into URL and update legends if they support dynamic content.
    map.on(‘moveend’, function() {
    //console.log( “moveend” );
    geuswebmap.setUrlHash();
    $(“div.legend iframe,div#legendList iframe, div#floatingDiv iframe”).each(function() {
    if( $(this).attr(“src”).indexOf(“supports=dynamic”)>0 ) {
    $(this).attr(“src”,$(this).attr(“src”).split(“&extent”)[0]+”&extent=”+map.getView().calculateExtent(map.getSize()).toString()+”&epsg=”+geuswebmap.epsg);
    }
    });
    });

    // Page-specific URL input params for init
    geuswebmap.getUrlHash = function() {
    //console.log( “getUrlHash” );
    // Is the referrer page a portal and this map in an iframe?
    if ( (window.parent.frames.length > 0) ) {
    // Is the referrer trying to tell us something about map init in its URL?
    if ( document.referrer.indexOf(“bmagic=y”) > 0 ) {
    // Copy the parent’s URL-params to this as hash-params (ignore whatever already there)
    window.location.hash = document.referrer.substring( document.referrer.indexOf(“bmagic=y&”) );
    }
    }
    // Now parse the hash
    if ( window.location.hash.length === 0 ) {
    geuswebmap.URLHashRead = true;
    return;
    }
    try {
    geuswebmap.hashObj = JSON.parse(‘{“‘ + decodeURI(window.location.hash.substring(1)).replace(/”/g, ‘\\”‘).replace(/&/g, ‘”,”‘).replace(/=/g,'”:”‘) + ‘”}’);
    if ( geuswebmap.hashObj.baslay ) {
    $(“select#baslay”).val( geuswebmap.hashObj.baslay );
    }
    if ( geuswebmap.hashObj.optlay ) {
    $(“select#optlay”).val( geuswebmap.hashObj.optlay );
    }
    if ( geuswebmap.hashObj.extent ) {
    map.getView().fit( geuswebmap.hashObj.extent.split(“,”).map(Number), map.getSize() );
    }
    if ( geuswebmap.hashObj.layers ) {
    // Turn into an array
    geuswebmap.hashObj.layers = decodeURIComponent(geuswebmap.hashObj.layers).split(“,”);
    // Activate layer in the list and tag the group
    for (var x=0 ; x < geuswebmap.hashObj.layers.length ; x++) {
    var cb = $(“input#” + geuswebmap.hashObj.layers[x] + “_checkbox”);
    if ( cb ) {
    cb.parents(‘.collapse’).prev().find(‘.glyphicon-chevron-right’).click().removeClass(‘glyphicon-chevron-right’).addClass(‘glyphicon-chevron-down’);
    cb.click(); // Will provoke onClick functions on the checkbox if any.
    if ( !cb.attr(“checked”) ) {
    cb.attr(“checked”,true);
    }
    geuswebmap.toggleLayer( cb[0] );
    } else {
    console.log( [ “getUrlHash”, cb , “undefined?” ] );
    }
    }
    for ( var lidx = 0 ; lidx < geuswebmap.hashObj.layers.length ; lidx++ ) {
    if ( geuswebmap.hashObj[ “filter_” + lidx ] ) {
    var layFilterArr = decodeURIComponent( geuswebmap.hashObj[ “filter_” + lidx ] ).split(“&”);
    for (var x = 0; x < layFilterArr.length; x++) {
    var pName = layFilterArr[x].split(“=”)[0];
    var pValue = layFilterArr[x].split(“=”)[1];
    //console.log( [ pName , pValue ] );
    //console.log(“$(\”form.” + geuswebmap.hashObj.layers[lidx] + “\”).find(\”[name='” + pName + “‘]\”).val(\”” + pValue + “\”);”);
    $(“form.” + geuswebmap.hashObj.layers[lidx] ).find(“[name='” + pName + “‘]”).val( pValue );
    }
    }
    geuswebmap.setLayerFilter( geuswebmap.hashObj.layers[lidx] );
    }
    }
    if ( geuswebmap.hashObj.customwms ) {
    geuswebmap.hashObj.customwms = decodeURI( geuswebmap.hashObj.customwms );
    // Hide tip and unfold custom WMS
    $(“div#layerUserDefinedWMS div.alert”).hide();
    if ( $(“div#layerUserDefinedWMS”).height()===0 || !$(“div#layerUserDefinedWMS”).is(“:visible”) ) {
    $(“div#layerUserDefinedWMS”).prev().click();
    }
    for (var key in geuswebmap.hashObj.customwms.split(“,”) ) {
    var surl = decodeURIComponent( geuswebmap.hashObj.customwms.split(“,”)[key].split(“:”)[0] );
    var slay = undefined;
    var loadAsCustomWmsNow = false;
    $(“input#extwmsurl”).val( surl );
    if ( geuswebmap.hashObj.customwms.split(“,”)[key].indexOf(“:”) > 0 ) {
    slay = decodeURIComponent( geuswebmap.hashObj.customwms.split(“,”)[key].split(“:”)[1] );
    loadAsCustomWmsNow = true;
    }
    geuswebmap.fetchWMSLayers( surl, $(‘select#extwmslay’)[0], slay, loadAsCustomWmsNow ); // 3rd param does an automatic geuswebmap.addWMSLayer
    }
    }
    geuswebmap.URLHashRead = true;
    } catch ( e ) {
    geuswebmap.URLHashRead = true;
    console.log( [ “getUrlHash” , e ] );
    }
    };

    function switchLanguage(lang) {
    //console.log( “switchLanguage” );
    // Language specific divs
    if ( lang==”da” ) {
    $(“.english”).remove();
    $(“.danish”).fadeIn(“slow”);
    } else {
    $(“.danish”).remove();
    $(“.english”).fadeIn(“slow”);
    }
    }
    var geuswebmap = geuswebmap || {};
    var map = map || {};
    var ol = ol || {};

    geuswebmap.sortupdate = function (event) {
    // Order z-index according to new visible listing
    // Put baselayers behind all else

    var aa = Object.keys(geuswebmap.serverSideLayers);
    var serverzindex = aa.map(function (o) {
    return {“name”:o,”zindex”:geuswebmap.serverSideLayers[o].getZIndex()};
    });

    $(“select#baslay option”).each(function () {
    try {
    // geuswebmap.layers[$(this).val()].setZIndex(1);
    geuswebmap.layers[$(this).val()].setVisible(geuswebmap.layers[$(this).val()].getProperties().visible); // Redraw
    } catch (eee) {
    }
    });

    // Then the selectable ones
    $($(“input[name=’layer’]”).get().reverse()).each(function (index) {

    var name = $(this).val();
    var layer = serverzindex.filter(function (o){return o.name === name;})[0];
    layer.new_index = index;
    //console.log(layer);
    /*try {
    geuswebmap.layers[this.value].setZIndex(100 + index);
    geuswebmap.layers[this.value].setVisible($(this).is(“:checked”)); // Redraw
    } catch (eee) {
    }*/
    });
    serverzindex.sort(function(a, b){return a.zindex – b.zindex;});
    serverzindex = serverzindex.filter(function(o){return o.new_index !==undefined;});
    serverzindex = serverzindex.map(function(o,index){o.index = index; return o;});
    serverzindex.sort(function(a, b){return a.new_index – b.new_index;});
    serverzindex.map(function (o) {

    var layer = serverzindex.find(function (p){return p.index === o.new_index;});

    try {
    geuswebmap.serverSideLayers[o.name].setZIndex(layer.zindex);
    geuswebmap.serverSideLayers[o.name].setVisible($(“#”+o.name+”_checkbox”).is(“:checked”)); // Redraw
    } catch (eee) {
    }
    });
    //console.log(serverzindex);
    var serverzindex = Object.keys(geuswebmap.layers).map(function (o) {return {“name”:o,”zindex”:geuswebmap.layers[o].getZIndex()};});

    // Then the custom WMS
    $(“button.remove-custom-wms”).each(function (index) {
    try {
    geuswebmap.layers[$(this).attr(“data-layername”)].setZIndex(1000 + index);
    geuswebmap.layers[$(this).attr(“data-layername”)].setVisible(true); // Redraw
    } catch (eee) {
    }
    });
    // Then the helper layers
    $(“select#optlay option”).each(function () {
    try {
    if ($(this).val().indexOf(“Hillshade”) >= 0) {
    geuswebmap.layers[$(this).val()].setZIndex(10);
    } else {
    geuswebmap.layers[$(this).val()].setZIndex(2000);
    }
    geuswebmap.layers[$(this).val()].setVisible(geuswebmap.layers[$(this).val()].getProperties().visible); // Redraw
    } catch (eee) {
    }
    });
    event.stopPropagation();
    };

    $(document).ready(initialize_map);
    /*
    function KortToCanvas(){
    html2canvas(document.querySelector(“#map”)).then(canvas => {
    document.body.appendChild(canvas);
    });
    }

    function LegendToCanvas(){
    html2canvas(document.querySelector(“#floatingDiv”)).then(canvas => {
    document.body.appendChild(canvas);
    });
    }
    */

    function initialize_map() {

    // Turn language divs on and off when page rendered
    switchLanguage(geuswebmap.lang);

    // Android & IOS might not like screen object
    try {
    // Turn welcome and layer list on, if not disabled by URL
    if (geuswebmap.showList && screen.availWidth > 1000) {
    geuswebmap.toggleLeftDiv(true);
    } else {
    geuswebmap.toggleLeftDiv(false);
    }
    if (geuswebmap.showWelcome & screen.availWidth > 1000) {
    geuswebmap.toggleWelcomeDiv(true);
    } else {
    geuswebmap.toggleWelcomeDiv(false);
    }
    } catch (eee) {
    }

    // Show graticule
    if (geuswebmap.baseRegion === “da”) {
    geuswebmap.graticule = new ol.Graticule({
    map: map,
    targetSize: 300,
    strokeStyle: new ol.style.Stroke({
    color: ‘rgba(120,120,120,0.5)’,
    width: 1,
    lineDash: [3, 10]
    }),
    lonLabelStyle: new ol.style.Text({
    font: ’10px Calibri,sans-serif’,
    textBaseline: ‘bottom’,
    fill: new ol.style.Fill({
    color: ‘rgba(0,0,0,0.6)’
    }),
    stroke: new ol.style.Stroke({
    color: ‘rgba(255,255,255,0.8)’,
    width: 3
    })
    }),
    latLabelStyle: new ol.style.Text({
    font: ’10px Calibri,sans-serif’,
    textAlign: ‘end’,
    fill: new ol.style.Fill({
    color: ‘rgba(0,0,0,0.6)’
    }),
    stroke: new ol.style.Stroke({
    color: ‘rgba(255,255,255,0.8)’,
    width: 3
    })
    }),
    showLabels: true
    });
    }

    // Prevent page reload for named forms and links
    $(“a.preventDefault”).click(function (e) {
    e.preventDefault();
    });
    $(“form.preventDefault”).submit(function (e) {
    e.preventDefault();
    });

    //$(“canvas”).attr(“crossOrigin”, “Anonymous”);

    // List-grouping
    $(“.collapse”).on(‘show.bs.collapse’, function () {
    $(this).siblings(“a”).find(“i”).removeClass(‘glyphicon-chevron-right’).addClass(‘glyphicon-chevron-down’);
    });
    $(“.collapse”).on(‘hide.bs.collapse’, function () {
    $(this).siblings(“a”).find(“i”).addClass(‘glyphicon-chevron-right’).removeClass(‘glyphicon-chevron-down’);
    });

    // Go-to-my-location only works in https-mode on Chrome
    if (location.href.indexOf(“https://”) < 0) {
    //$(“input#gotoAddressStr”).css(“width”, “180”);
    $(“button.ol-my-location”).hide();
    } else {
    //$(“input#gotoAddressStr”).css(“width”, “140”);
    $(“button.ol-my-location”).show();
    }

    // Catch URL params into init params
    geuswebmap.getUrlHash();

    $(“img”).on(“error”, function() {
    $(this).hide();
    });

    // Clean up base map layer select
    geuswebmap.layerChooser($(“select#baslay”)[0]); // Run no matter what, so we can hide those that are irrelevant.
    geuswebmap.layerChooser($(“select#optlay”)[0]); // Run no matter what, so we can hide those that are irrelevant.
    $(“select#baslay”).change(); // Force load of chosen base layer

    // Add bootstrap style tooltip to elements (turned out to be too agressive)
    // $(“[title]”).attr(“data-placement”,”bottom”).tooltip(); // top bottom left right
    $(‘[data-toggle=”tooltip”]’).tooltip();

    // Add sortable
    $(“div.sortable”).sortable({
    handle: “.sortable-handle”,
    revert: true,
    axis: ‘y’,
    scroll: true,
    cancel: “div.layerContents”,
    start: function(event){

    $(this).css(“cursor”,”grabbing”);
    },
    stop: function(event){

    $(this).css(“cursor”,”default”);
    },
    update: geuswebmap.sortupdate
    });
    //$( “div.sortable” ).disableSelection();

    //
    // Make divs draggable and resizable
    $(“div#mapdetails”).draggable({handle: “.topTitle”,containment: ‘parent’});
    $(“div#mapdetails”).resizable();
    $(“div#mapdetails .topTitle”).css(“cursor”, “move”);
    //
    // Try to enable closing floating divs using esc-key.
    try {
    $(‘body’).keydown(function (e) {
    if (e.keyCode === 27) {
    $(“.glyphicon-remove:visible”).last().click();
    }
    });
    } catch (eee) {
    }

    // If no layers selected, open the first layer group
    if ($(“input[type=checkbox]:visible”).size() === 0) {
    $(“a.list-group-item”).first().click();
    }

    }
    ;

    // TODO: This should go into the geuswebmap object
    function videoEmbed(url) {
    // Do the same as when embedding metadata in the page
    $(“div#dialogDiv”).html(“” +

    ” +
    “<video id=’videoembed’ style=’width:100%;height:100%;’ poster=’img/loading_video.gif’ id=’video’ preload=’metadata’ controls autoplay>” +
    “<source src='” + url + “‘ type=’video/mp4’/>” +
    “</video>” +

    “);
    $(“div.modal#featureinfo”).modal();
    }

    function imageEmbed(url) {
    // Same as above – just for images
    $(“div#dialogDiv”).html(““);
    $(“div#dialogDiv”).append(““);
    $(“div#dialogDiv img#imgembed”).one(“load”,function() { $(“div#dialogDiv img#imgembed”).fadeIn(); $(“div#dialogDiv img#embedLoading”).hide(); });
    $(“div.modal#featureinfo”).modal();
    }

    // Extra functionality

    // Create compatiblity with registered egdi layers in GEUS’ db

    </script>

    </body>
    </html>

Viewing 20 posts - 61 through 80 (of 106 total)

You must be logged in to reply to this topic.