{"id":41940,"date":"2022-04-16T11:28:07","date_gmt":"2022-04-16T09:28:07","guid":{"rendered":"https:\/\/jonkopingmarathon.se\/map-half-marathon\/"},"modified":"2024-10-29T09:20:25","modified_gmt":"2024-10-29T08:20:25","slug":"map-half-marathon","status":"publish","type":"page","link":"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/","title":{"rendered":"Map Half Marathon"},"content":{"rendered":"<h2>Run 21 097,5 m through beautiful J\u00f6nk\u00f6ping<\/h2>\n<p>After the start in the middle of Munksj\u00f6bron you will see many beautiful places in J\u00f6nk\u00f6ping. You run along the lake V\u00e4ttern, Huskvarna, central J\u00f6nk\u00f6ping and parts of the race that existed in the 80s.<\/p>\n<p>Distance: 21 097,5 meters<br \/>Hydration stations: 5 along the course + 1 in Start\/Finish<\/p>\n<div id=\"map-canvas\" style=\"width:100%; height:600px\"><\/div>\n<div class=\"elevation-profile-container\" style=\"height:250px\">\n    <canvas id=\"route-elevation-chart\" style=\"width:100%;height:100%\"><\/canvas>\n<\/div>\n\n<script type=\"text\/javascript\">\n\tvar map;\n    var elevations = [];\n    var elevationsOnly = [];\n    var distancesOnly = []\n    var selectedPoint;\n\t\/\/google.charts.load('current', {packages: ['corechart']});\n\t\/\/google.charts.setOnLoadCallback(plotElevation);\n\n\tvar add_minutes =  function (dt, minutes) {\n\t    var date = new Date(dt.getTime() + minutes*60000);\n\t    return date.toLocaleTimeString('sv-SE', {hour: '2-digit', minute:'2-digit'});\n\t}\n\n    function jmMap() {\n    \t\/\/ICON DEFINITIONS\n    \tconst starticon = {\n\t\t    url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/start-marker.png\", \/\/ url\n\t\t    scaledSize: new google.maps.Size(77, 45), \/\/ scaled size\n\t\t    origin: new google.maps.Point(0,0), \/\/ origin\n\t\t    anchor: new google.maps.Point(50, 40) \/\/ anchor\n\t\t};\n\n\t\tconst kmicon = {\n\t\t    url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/km-marker.png\", \/\/ url\n\t\t    scaledSize: new google.maps.Size(20, 20), \/\/ scaled size\n\t\t    origin: new google.maps.Point(0,0), \/\/ origin\n\t\t    anchor: new google.maps.Point(10, 10) \/\/ anchor\n\t\t};\n\n        const watericon = {\n            url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/water-plus.png\", \/\/ url\n            scaledSize: new google.maps.Size(45, 30), \/\/ scaled size\n            origin: new google.maps.Point(0,0), \/\/ origin\n            anchor: new google.maps.Point(15, 15) \/\/ anchor\n        };\n\n        const waterminiicon = {\n            url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/water.png\", \/\/ url\n            scaledSize: new google.maps.Size(30, 30), \/\/ scaled size\n            origin: new google.maps.Point(0,0), \/\/ origin\n            anchor: new google.maps.Point(15, 15) \/\/ anchor\n        };\n\n        const musicicon = {\n            url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/music.png\", \/\/ url\n            scaledSize: new google.maps.Size(30, 30), \/\/ scaled size\n            origin: new google.maps.Point(0,0), \/\/ origin\n            anchor: new google.maps.Point(15, 15) \/\/ anchor\n        };\n        const duschicon = {\n            url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/dusch-icon.png\", \/\/ url\n            scaledSize: new google.maps.Size(30, 30), \/\/ scaled size\n            origin: new google.maps.Point(0,0), \/\/ origin\n            anchor: new google.maps.Point(15, 15) \/\/ anchor\n        };\n        const massageicon = {\n            url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/massage-icon.png\", \/\/ url\n            scaledSize: new google.maps.Size(30, 30), \/\/ scaled size\n            origin: new google.maps.Point(0,0), \/\/ origin\n            anchor: new google.maps.Point(15, 15) \/\/ anchor\n        };\n        const wcicon = {\n            url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/wc.png\", \/\/ url\n            scaledSize: new google.maps.Size(30, 30), \/\/ scaled size\n            origin: new google.maps.Point(0,0), \/\/ origin\n            anchor: new google.maps.Point(15, 15) \/\/ anchor\n        };\n        const stafetticon = {\n            url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/stafett-icon.png\", \/\/ url\n            scaledSize: new google.maps.Size(30, 30), \/\/ scaled size\n            origin: new google.maps.Point(0,0), \/\/ origin\n            anchor: new google.maps.Point(15, 15) \/\/ anchor\n        };\n\n\t\tvar myLatlng = new google.maps.LatLng( 57.778544605011, 14.169210248169 );\n\t\tvar mapOptions = {\n\t\t\tzoom: 14,\n\t\t\tcenter: myLatlng,\n\t\t\tstreetViewControl: false,\n\t\t\tscaleControl: true,\n\t\t\tmapId: '135889510cd9ff73'};\n\t\t\t\/\/mapId: '7db90ec79e62e4fe'};\n\n\t\t\n\t\tmap = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);\n\t\tvar marker = new google.maps.Marker({\n            position: myLatlng,\n            map: map,\n            zIndex: 2,\n            icon: starticon,\n            title: \"Start\/M\u00e5l\"\n        });\n\n        var prev_infowindow =false; \n\n\t\tvar infowindow = new google.maps.InfoWindow();\n\t  \tinfowindow.setContent('Start\/m\u00e5l<br\/>Start 10:00');\n\t  \tgoogle.maps.event.addListener(marker, 'click', function() {\n\t  \t\tif( prev_infowindow ) {\n\t\t           prev_infowindow.close();\n\t\t        }\n\n\t\t    prev_infowindow = infowindow;\n\t      \tinfowindow.open(map, marker);\n\t  \t});\n\n        \/\/function to get the km-markers coords. Remove comment marks, run on localhost, copy coordinates from console and create km-array from it. Put back comment marks.\n        \/*var kms = {};\n        jQuery.ajax({\n              type: \"GET\",\n              url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/gpx\/halfmarathon_elevation_distance2025.gpx\",\n\t\t  \tdataType: \"xml\",\n\t\t  \tsuccess: function(xml) {\n\t\t\t\tjQuery(xml).find(\"wpt\").each(function() {\n\t\t\t\tvar lat = jQuery(this).attr(\"lat\");\n\t\t\t\tvar lon = jQuery(this).attr(\"lon\");\n\t\t\t\tvar desc = jQuery(this).find('desc').text();\n\t\t\t\tvar distance = desc.substring(desc.length - 9);\n\t\t\t\tvar dist = parseFloat(distance).toFixed(1);\n\t\t\t\tif(dist%1 == 0){\n\t\t\t\t\tvar int = parseInt(distance);\n\t\t\t\tvar diff = Math.abs(parseFloat(distance) - parseFloat(int));\n\n\t\t\t\t\tif(dist in kms){\n\t\t\t\t\tconsole.log('key exists'+dist);\n\t\t\t\t\tconsole.log('diff is '+diff);\n\t\t\t\t\tif(diff < parseFloat(kms[dist].difference)) {\n\t\t\t\t\t\tconsole.log('saving diff');\n\t\t\t\t\t\tkms[dist] = {'distance': distance, 'coords' : '['+lat+','+lon+'],', 'difference': diff };\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.log('not saving diff bacause '+diff+' not larger than'+kms[dist].difference);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tkms[dist] = {'distance': distance, 'coords' : '['+lat+','+lon+'],', 'difference': diff };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tfor (var index in kms) {\n\t\t\t\t\tconsole.log(kms[index].coords);\n\t\t\t\t}\n\t    \t}\n\t\t});*\/\n\n\t  \tjQuery.ajax({\n\t\t  type: \"GET\",\n\t\t  url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/gpx\/halfmarathon_elevation_distance2025.gpx\",\n\t\t  dataType: \"xml\",\n\t\t  success: function(xml) {\n\t\t\tvar points = [];\n\t\t\tcount = 0;\n\t\t\tvar bounds = new google.maps.LatLngBounds ();\n              jQuery(xml).find(\"wpt\").each(function() {\n                  var lat = jQuery(this).attr(\"lat\");\n                  var lon = jQuery(this).attr(\"lon\");\n                  var elev = jQuery(this).find('ele').text();\n                  var desc = jQuery(this).find('desc').text();\n                  var distancestr = desc.substring(desc.length - 9);\n                  var dist = parseFloat(distancestr).toFixed(2);\n                  if(dist == \"NaN\"){\n                      dist = '0';\n                  }\n                  var p = new google.maps.LatLng(lat, lon);\n                  points.push(p);\n                  if(count % 2 || count == 0) {\n                      var elevation = {\n                          lat: parseFloat(lat),\n                          lng: parseFloat(lon),\n                          elevation: parseFloat(elev),\n                          distance: dist\n                      };\n                      elevations.push(elevation);\n                      elevationsOnly.push(elev);\n                      distancesOnly.push(dist);\n                  }\n                  bounds.extend(p);\n                  count++;\n              });\n\n\t\t\tconst lineSymbol = {\n\t\t\t    path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW,\n\t\t\t    scale: 2,\n\t\t\t    strokeColor: \"#000000\",\n\t\t    \tfillColor: \"#000000\",\n\t\t    \tfillOpacity: 1\n\t\t\t};\n\n\n\t\t\tvar poly = new google.maps.Polyline({\n\t\t\t  \/\/ use your own style here\n\t\t\t  path: points,\n\t\t\t  strokeColor: \"#2988b7\",\n\t\t\t  strokeOpacity: 1,\n\t\t\t  strokeWeight: 4,\n\t\t\t  icons: [{\n\t\t\t\t  icon: lineSymbol,\n\t\t\t\t  offset: '70%',\n\t\t\t\t  repeat: '150px'\n\t\t\t\t}],\n\t\t\t});\n\t\t\t\n\t\t\tpoly.setMap(map);\n\t\t\t\n\t\t\t\/\/ fit bounds to track\n\t\t\tmap.fitBounds(bounds);\n\n\t\t  }\n\t\t});\n\n\t\t\/* KILOMETRAR *\/\n\t\tvar kmArray = [[57.77931682822717, 14.173895201208556],\n\t\t\t[57.77107888822517, 14.176591230355248],\n\t\t\t[57.76854603684945, 14.186166759525138],\n\t\t\t[57.77467140376485, 14.19730775560777],\n\t\t\t[57.778762429381786, 14.20036579465507],\n\t\t\t[57.7773629,14.213440257],\n\t\t\t[57.777225328,14.226004387],\n\t\t\t[57.780176678379036, 14.241619509371262],\n            [57.78074670548577, 14.255046390928298],\/\/9\n\t\t\t[57.784549793960075, 14.264016378740848],\n\t\t\t[57.79227331392266, 14.266536994535324],\n\t\t\t[57.7929136750505, 14.254839811544414],\/\/12\n\t\t\t[57.788597410288084, 14.239576421974322],\n\t\t\t[57.793849864036396, 14.235594631000389],\n\t\t\t[57.79061847609885, 14.22191904144117],\n\t\t\t[57.783935288802795, 14.212712941445306],\/\/16\n\t\t\t[57.781974554201334, 14.196763082019874],\n\t\t\t[57.77813393657157, 14.196110517714832],\/\/18\n\t\t\t[57.774482114,14.184797708],\n\t\t\t[57.778627183,14.174162458],\n\t\t\t[57.778674317,14.1664465]];\n        var kmMarkersArray = [];\n\t    var kmInfoArray = [];\n\n\t    var kmMappning = [\n\t    \t[1,32.8],\/\/1\n\t    \t[2,2],\n\t    \t[3,3],\n\t    \t[4,4],\n\t    \t[5,5],\n\t    \t[6,6],\n\t    \t[7,7],\n\t    \t[8,8],\n\t    \t[9,9],\n\t    \t[10,10],\n\t    \t[11,11],\n\t    \t[12,12],\n\t    \t[13,13],\n\t    \t[14,14],\n\t    \t[15,15],\n\t    \t[16,16],\n\t    \t[17,17],\n\t    \t[4.6,30.7],\/\/18\n\t    \t[19,31.7],\/\/19\n\t    \t[1.1,32.7],\/\/20\n\t    \t[0.2,42.2]\/\/21\n\t    ];\n\n\t    for (let x = 1; x <= kmArray.length; x++) { \n\t    \tvar kmmarker = new google.maps.Marker({\n\t\t        position: new google.maps.LatLng(kmArray[parseInt(x-1)][0],kmArray[x-1][1]),\n\t\t        map: map,\n\t\t        icon: kmicon,\n\t\t        label: {\n                    text: String(x),\n                    fontSize: \"10px\"\n                },\n\t\t        size: new google.maps.Size(20, 20)\n\t\t    });\n\t\t    kmMarkersArray.push(kmmarker);\n\t\t    var first = kmMappning[x-1][0] * 3.15;\n\t\t    var last = kmMappning[x-1][1] * 8.5 + 15;\n\t\t    var thiskm = x * 3.15;\n\t\t    var start = new Date(2022,8,20,10,0,0);\n\t\t    var firsttime = add_minutes(start, first).toString();\n\t\t    var lasttime = add_minutes(start, last).toString();\n\t\t    var thiskmtime = add_minutes(start, thiskm).toString();\n\t\t    var infowindow = new google.maps.InfoWindow();\n\t\t  \tinfowindow.setContent('L\u00f6pare passerar ca. <strong>'+firsttime+' - '+lasttime+'<\/strong> <br\/> (b\u00e5da distanser)<br\/>F\u00f6rsta l\u00f6pare till '+x+ ' km  - ca <strong>'+thiskmtime+'<\/strong>');\n\t\t  \tkmInfoArray.push(infowindow);\n\t\t  \tgoogle.maps.event.addListener(kmMarkersArray[parseInt(x-1)], 'click', function() {\n\t\t  \t\tif( prev_infowindow ) {\n\t\t           prev_infowindow.close();\n\t\t        }\n\n\t\t        prev_infowindow = kmInfoArray[parseInt(x-1)];\n\t\t      \tkmInfoArray[parseInt(x-1)].open(map, kmMarkersArray[parseInt(x-1)],false);\n\t\t  \t});\n\t    }\n\n        \/* Powerzone *\/\n        var pzArray = [[57.77848419025409, 14.170536725022126],\/\/Start\n            [57.778628099267515, 14.1963386747704],\/\/Liljeholmen\n            [57.78251179817205, 14.205985740539647],\/\/Sj\u00f6n\n            [57.77978822398305, 14.173033590220975],\/\/Lilsj\u00f6plan\n            [57.78421908816135, 14.26395743151058]];\/\/Folkets Park\n\n        var pzLabels = [\n            'Startomr\u00e5de - uppv\u00e4rmning',\n            'TMG Taberg Power zone',\n            'Powerade Power zone',\n            'Mizuno Power zone',\n            'JLE AUDIO Power zone'];\n        var pzMarkersArray = [];\n        var pzInfoArray = [];\n\n        for (let x = 1; x <= pzArray.length; x++) {\n            var pzmarker = new google.maps.Marker({\n                position: new google.maps.LatLng(pzArray[parseInt(x-1)][0],pzArray[x-1][1]),\n                map: map,\n                icon: musicicon,\n                zIndex: 50 + x,\n                size: new google.maps.Size(30, 30)\n            });\n            pzMarkersArray.push(pzmarker);\n            var infowindow = new google.maps.InfoWindow();\n            infowindow.setContent(pzLabels[parseInt(x-1)]);\n            pzInfoArray.push(infowindow);\n            google.maps.event.addListener(pzMarkersArray[parseInt(x-1)], 'click', function() {\n                if( prev_infowindow ) {\n                    prev_infowindow.close();\n                }\n\n                prev_infowindow = pzInfoArray[parseInt(x-1)];\n                pzInfoArray[parseInt(x-1)].open(map, pzMarkersArray[parseInt(x-1)],false);\n            });\n        }\n        \/* V\u00e4xlingszone halfmara *\/\n        var stafettArray = [[57.779149798174785, 14.202355852042146],\/\/km 5\n            [57.7843206430977, 14.263883462376967],\/\/km 10 b\u00e5de mara och halvmara\n            [57.78289500978001, 14.208556926353898]];\/\/km 15\n\n        var stafettLabels = [\n            'V\u00e4xlingszone stafett (Relay transition zone)',\n            'V\u00e4xlingszone stafett (Relay transition zone)',\n            'V\u00e4xlingszone stafett (Relay transition zone)'];\n        var stafettMarkersArray = [];\n        var stafettInfoArray = [];\n\n        for (let x = 1; x <= stafettArray.length; x++) {\n            var stafettmarker = new google.maps.Marker({\n                position: new google.maps.LatLng(stafettArray[parseInt(x-1)][0],stafettArray[x-1][1]),\n                map: map,\n                icon: stafetticon,\n                zIndex: 50 + x,\n                size: new google.maps.Size(30, 30)\n            });\n            stafettMarkersArray.push(stafettmarker);\n            var infowindow = new google.maps.InfoWindow();\n            infowindow.setContent(stafettLabels[parseInt(x-1)]);\n            stafettInfoArray.push(infowindow);\n            google.maps.event.addListener(stafettMarkersArray[parseInt(x-1)], 'click', function() {\n                if( prev_infowindow ) {\n                    prev_infowindow.close();\n                }\n\n                prev_infowindow = stafettInfoArray[parseInt(x-1)];\n                stafettInfoArray[parseInt(x-1)].open(map, stafettMarkersArray[parseInt(x-1)],false);\n            });\n        }\n\n        \/*Massage *\/\n        var massageArray = [[57.78225079922473, 14.20426968947875], \/\/sj\u00f6n\n            [57.77889833071345, 14.196909001894797]];\/\/ liljeholmsparken\n\n        var massageLabels = [\n            'PRO Athlete - idrottsmassage, akut omh\u00e4ndertagande och professionell tejpning',\n            'PRO Athlete - idrottsmassage, akut omh\u00e4ndertagande och professionell tejpning'\n        ];\n        var massageMarkersArray = [];\n        var massageInfoArray = [];\n\n        for (let x = 1; x <= massageArray.length; x++) {\n            var massagemarker = new google.maps.Marker({\n                position: new google.maps.LatLng(massageArray[parseInt(x-1)][0],massageArray[x-1][1]),\n                map: map,\n                icon: massageicon,\n                zIndex: 50 + x,\n                size: new google.maps.Size(30, 30)\n            });\n            massageMarkersArray.push(massagemarker);\n            var infowindow = new google.maps.InfoWindow();\n            infowindow.setContent(massageLabels[parseInt(x-1)]);\n            massageInfoArray.push(infowindow);\n            google.maps.event.addListener(massageMarkersArray[parseInt(x-1)], 'click', function() {\n                if( prev_infowindow ) {\n                    prev_infowindow.close();\n                }\n\n                prev_infowindow = massageInfoArray[parseInt(x-1)];\n                massageInfoArray[parseInt(x-1)].open(map, massageMarkersArray[parseInt(x-1)],false);\n            });\n        }\n\n        \/*Duschar *\/\n        var duschArray = [[57.78242839633294, 14.205403981441068]];\n\n        var duschLabels = [\n            'Dusch - \u00c5ngtv\u00e4ttbilen'\n        ];\n        var duschMarkersArray = [];\n        var duschInfoArray = [];\n\n        for (let x = 1; x <= duschArray.length; x++) {\n            var duschmarker = new google.maps.Marker({\n                position: new google.maps.LatLng(duschArray[parseInt(x-1)][0],duschArray[x-1][1]),\n                map: map,\n                icon: duschicon,\n                zIndex: 50 + x,\n                size: new google.maps.Size(30, 30)\n            });\n            duschMarkersArray.push(duschmarker);\n            var infowindow = new google.maps.InfoWindow();\n            infowindow.setContent(duschLabels[parseInt(x-1)]);\n            duschInfoArray.push(infowindow);\n            google.maps.event.addListener(duschMarkersArray[parseInt(x-1)], 'click', function() {\n                if( prev_infowindow ) {\n                    prev_infowindow.close();\n                }\n\n                prev_infowindow = duschInfoArray[parseInt(x-1)];\n                duschInfoArray[parseInt(x-1)].open(map, duschMarkersArray[parseInt(x-1)],false);\n            });\n        }\n\n\n        \/* WC *\/\n        var wcArray = [[57.778496447962226, 14.170327393468027],\n            [57.77836495401469, 14.19686438771517]];\n\n        for (let x = 1; x <= wcArray.length; x++) {\n            var wcmarker = new google.maps.Marker({\n                position: new google.maps.LatLng(pzArray[parseInt(x-1)][0],pzArray[x-1][1]),\n                map: map,\n                icon: wcicon,\n                zIndex: x,\n                size: new google.maps.Size(30, 30)\n            });\n        }\n\n        \/* V\u00e4tskestationer *\/\n        var vsArray = [[57.77852200070473, 14.169852646222784],\/\/Start\n            [57.77850582094461, 14.196789417976088],\/\/Liljeholmen\n            [57.7839299042927, 14.26362132449349],\/\/Folkets Park\n            [57.78994389505676, 14.234603270240504], \/\/RC\n            [57.78261769693529, 14.206523200567263]]; \/\/Sj\u00f6n\n\n        var vsLabels = [\n            'V\u00e4tskestation Start\/M\u00e5l',\n            'V\u00e4tskestation TMG Taberg:<br\/>Vatten, Umara sportdryck, saltgurka',\n            'V\u00e4tskestation:<br\/>Vatten, Umara sportdryck',\n            'V\u00e4tskestation:<br\/>Vatten, Umara sportdryck, banan',\n            'V\u00e4tskestation:<br\/>Vatten, Umara sportdryck']; \/\/Sj\u00f6n\n        var vsMarkersArray = [];\n        var vsInfoArray = [];\n\n        for (let x = 1; x <= vsArray.length; x++) {\n            var vsmarker = new google.maps.Marker({\n                position: new google.maps.LatLng(vsArray[parseInt(x-1)][0],vsArray[x-1][1]),\n                map: map,\n                icon: watericon,\n                zIndex: 100 + x,\n                size: new google.maps.Size(30, 30)\n            });\n            vsMarkersArray.push(vsmarker);\n            var infowindow = new google.maps.InfoWindow();\n            infowindow.setContent(vsLabels[parseInt(x-1)]);\n            vsInfoArray.push(infowindow);\n            google.maps.event.addListener(vsMarkersArray[parseInt(x-1)], 'click', function() {\n                if( prev_infowindow ) {\n                    prev_infowindow.close();\n                }\n\n                prev_infowindow = vsInfoArray[parseInt(x-1)];\n                vsInfoArray[parseInt(x-1)].open(map, vsMarkersArray[parseInt(x-1)],false);\n            });\n        }\n\n\t}\n\n\n\/\/ Takes an array of ElevationResult objects, draws the path on the map\n\/\/ and plots the elevation profile on a Visualization API ColumnChart.\n    \/*\nfunction plotElevation() {\n\tconst chartDiv = document.getElementById(\"elevation_chart\");\n\tconst chart = new google.visualization.LineChart(chartDiv);\n\tconst data = new google.visualization.DataTable();\n\tsetTimeout(function(){\n\t\tdata.addColumn(\"string\", \"Distance\");\n\t\tdata.addColumn(\"number\", \"Elevation\");\n\t\tvar pointsperkm = parseInt(elevations.length\/21.1);\n\n\t\tfor (let i = 0; i < elevations.length; i++) {\n\t\t\tvar km = '';\n\t\t\tkm = String(parseInt(i\/pointsperkm));\n\t\t\tif(i%pointsperkm == 0){\n\n\t\t\t\tkm = String(parseInt(i\/pointsperkm));\n\t\t\t}\n\t\tdata.addRow(['', elevations[i].elevation]);\n\t  }\n\n\t  \/\/ Draw the chart using the data within its DIV.\n\t  chart.draw(data, {\n\t    height: 150,\n\t    titleY: \"Elevation (m)\",\n\t    titleX: \"Distance\",\n\t    legend: \"none\",\n\t    colors: ['#5c8a9f'],\n\t    lineWidth: 5,\n\t     chartArea:{left: 70 ,width:'100%'}\n\t  });\n\n\t   google.visualization.events.addListener(chart, 'onmouseover', function(e) {\n\t        selectHandler(chart, e.row);\n\t   });\n\t},2000);\n}\n*\/\n\tvar elevmarker;\n  \tfunction selectHandler(chart, row) {\n  \t\tif (row != null) {\n      \t\tvar elevationMarker = new google.maps.LatLng(elevations[row].lat, elevations[row].lng);\n      \t\tconst icon = {\n\t\t\t    url: \"https:\/\/jonkopingmarathon.se\/wp-content\/themes\/square-child\/images\/elevation-marker.png\", \/\/ url\n\t\t\t    scaledSize: new google.maps.Size(17, 17), \/\/ scaled size\n\t\t\t    origin: new google.maps.Point(0,0), \/\/ origin\n\t\t\t    anchor: new google.maps.Point(8, 8) \/\/ anchor\n\t\t\t};\n\t\t\tif(elevmarker == null) {\n\t\t\t\televmarker = new google.maps.Marker({\n\t\t\t        position: elevationMarker,\n\t\t\t        map: map,\n\t\t\t        icon: icon,\n\t\t\t        zIndex: 100, \n\t\t\t        label: \"\",\n\t\t\t        size: new google.maps.Size(17, 17)\n\t\t\t    });\n\t\t\t}\n\t\t\telse {\n\t\t\t\televmarker.setPosition(elevationMarker);\n\t\t\t}\n\n    \t}\n  \t}\n    \/*\n  jQuery('#elevation_chart').mouseleave(function(e) {\n      if(elevmarker) {\n          elevmarker.setMap(null);\n          elevmarker = null;\n      }\n  });*\/\n\n    Chart.register( Chart.LineElement, Chart.LineController, Chart.Legend, Chart.Tooltip, Chart.LinearScale, Chart.PointElement, Chart.Filler, Chart.Title);\n\n    setTimeout(function() {\n        const ctx = document.getElementById(\"route-elevation-chart\").getContext(\"2d\");\n        const chartData = {\n            labels: distancesOnly, \/\/ this is test data\n            datasets: [{\n                data: elevationsOnly, \/\/ this is test data\n                fill: true,\n                borderColor: '#66ccff',\n                backgroundColor: '#66ccff66',\n                lineTension: 0.5,\n                pointRadius: 1,\n                spanGaps: true\n            }]\n        };\n        const config = {\n            type: 'line',\n            data: chartData,\n            plugins: [{\n                beforeInit: (chart, args, options) => {\n                    const maxHeight = Math.max(...chart.data.datasets[0].data);\n                    chart.options.scales.x.min = 0;\n                    chart.options.scales.x.max = 21.195;\n                    chart.options.scales.y.min = 50;\/\/maxHeight + Math.round(maxHeight * 0.1);\n                    chart.options.scales.y.max = 300;\/\/maxHeight + Math.round(maxHeight * 0.1);\n                }\n            },\n                {\n                    id: 'myEventCatcher',\n                    afterEvent(chart, args, pluginOptions) {\n                        const event = args.event;\n                        if (event.type === 'mousemove') {\n                            \/\/ process the event\n                            selectHandler(chart, selectedPoint);\n\n                        }\n                    }\n                }],\n            options: {\n                animation: false,\n                maintainAspectRatio: false,\n                interaction: { intersect: false, mode: 'index' },\n                tooltip: { position: 'nearest' },\n                responsive: true,\n                scales: {\n                    x: {type: 'linear'},\n                    y: {type: 'linear', beginAtZero: false}\n                },\n                events: ['mousemove'],\n                plugins: {\n                    title: {align: \"end\", display: true, text: \"Distance, km \/ Elevation, m\"},\n                    legend: {display: false},\n                    tooltip: {\n                        displayColors: false,\n                        callbacks: {\n                            title: (tooltipItems) => {\n                                return \"Distance: \" + tooltipItems[0].label + 'km'\n                            },\n                            label: (tooltipItem) => {\n                                return \"Elevation: \" + tooltipItem.raw + 'm'\n                            },\n                            afterBody: (data) => {\n                                if(data && data[0])\n                                    selectedPoint = data[0].dataIndex;\n                                return [''];\n                            }\n                        }\n                    }\n                }\n            }\n        };\n\n        const chart = new Chart(ctx, config);\n\n        jQuery('#route-elevation-chart').mouseleave(function(e) {\n            if(elevmarker) {\n                elevmarker.setMap(null);\n                elevmarker = null;\n            }\n        });\n\n    },2000);\n\n\n\t  \t\/*var mapLayer = new google.maps.KmlLayer({\n\t    url: \"https:\/\/www.google.com\/maps\/d\/kml?mid=1TwkvZA_5r67r2f9AJ9xMw9M77evlQq2D&dummy=\"+(new Date()).getTime()});\n\t  \tmapLayer.setMap(map);*\/\n\n\t\t\n\n \n<\/script>\n<script src=\"https:\/\/maps.googleapis.com\/maps\/api\/js?key=AIzaSyCih0vmRdehLpvBvWTbn472_XCW-X186eU&callback=jmMap&?v=3.8\"><\/script>\n<p>Tip: hover your mouse over the track profile to see which area of the track the profile applies to. Click on the water stations to see what will be served there. Click on the kilometre markers to see the times the runners pass.<\/p>\n<p><!-- \n\n<h2>Karta f\u00f6r utskrift<\/h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<p>Klicka p\u00e5 bilden nedan s\u00e5 \u00f6ppnas kartan i ett nytt f\u00f6nster i PDF format.<\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<p><a href=\"\/wp-content\/uploads\/2022\/05\/halfmarathon_map_to_print.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/05\/halfmarathon_map_to_print.jpg\" alt=\"Karta J\u00f6nk\u00f6ping Half Marathon\" \/><\/a><\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h2>Banprofil<\/h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/05\/Halfmarathon-elevation.png\" alt=\"Banprofil J\u00f6nk\u00f6ping Half Marathon\" \/><\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n--><\/p>\n\n<p>Here you can download <a href=\"https:\/\/jonkopingmarathon.se\/wp-content\/uploads\/2022\/08\/karta-halfmarathon-web.pdf\" target=\"_blank\" rel=\"noopener\">the map as a PDF<\/a> or as a <a href=\"https:\/\/jonkopingmarathon.se\/wp-content\/uploads\/2024\/08\/halfmarathon2024.gpx\">GPX file<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the start in the middle of Munksj\u00f6bron you will see many beautiful places in J\u00f6nk\u00f6ping. You run along the lake V\u00e4ttern, Huskvarna, central J\u00f6nk\u00f6ping and parts of the race that existed in the 80s. Distance: 21 097,5 metersHydration stations: 5 along the course + 1 in Start\/Finish Tip: hover your mouse over the track [&#8230;]<\/p>\n","protected":false},"author":17,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-41940","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Map Half Marathon - J\u00f6nk\u00f6ping Marathon<\/title>\n<meta name=\"description\" content=\"The half marathon starts in the middle of the Munksj\u00f6 Bridge and you will see many beautiful places along the V\u00e4ttern, Huskvarna and central J\u00f6nk\u00f6ping.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Map Half Marathon - J\u00f6nk\u00f6ping Marathon\" \/>\n<meta property=\"og:description\" content=\"The half marathon starts in the middle of the Munksj\u00f6 Bridge and you will see many beautiful places along the V\u00e4ttern, Huskvarna and central J\u00f6nk\u00f6ping.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/\" \/>\n<meta property=\"og:site_name\" content=\"J\u00f6nk\u00f6ping Marathon\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stadenarredo\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-29T08:20:25+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/map-half-marathon\\\/\",\"url\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/map-half-marathon\\\/\",\"name\":\"Map Half Marathon - J\u00f6nk\u00f6ping Marathon\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/#website\"},\"datePublished\":\"2022-04-16T09:28:07+00:00\",\"dateModified\":\"2024-10-29T08:20:25+00:00\",\"description\":\"The half marathon starts in the middle of the Munksj\u00f6 Bridge and you will see many beautiful places along the V\u00e4ttern, Huskvarna and central J\u00f6nk\u00f6ping.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/map-half-marathon\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/map-half-marathon\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/map-half-marathon\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Start\",\"item\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Map Half Marathon\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/\",\"name\":\"J\u00f6nk\u00f6ping Marathon\",\"description\":\"jonkopingmarathon.se\",\"publisher\":{\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/#organization\",\"name\":\"J\u00f6nk\u00f6ping Marathon\",\"url\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/jonkopingmarathon.se\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/OG_IMAGE_JonkopingMarathon.jpg\",\"contentUrl\":\"https:\\\/\\\/jonkopingmarathon.se\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/OG_IMAGE_JonkopingMarathon.jpg\",\"width\":1200,\"height\":630,\"caption\":\"J\u00f6nk\u00f6ping Marathon\"},\"image\":{\"@id\":\"https:\\\/\\\/jonkopingmarathon.se\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/stadenarredo\",\"https:\\\/\\\/www.instagram.com\\\/jonkopingmarathon\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCbXk-FxL8Z1K_OdthfGt-YA\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Map Half Marathon - J\u00f6nk\u00f6ping Marathon","description":"The half marathon starts in the middle of the Munksj\u00f6 Bridge and you will see many beautiful places along the V\u00e4ttern, Huskvarna and central J\u00f6nk\u00f6ping.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/","og_locale":"en_US","og_type":"article","og_title":"Map Half Marathon - J\u00f6nk\u00f6ping Marathon","og_description":"The half marathon starts in the middle of the Munksj\u00f6 Bridge and you will see many beautiful places along the V\u00e4ttern, Huskvarna and central J\u00f6nk\u00f6ping.","og_url":"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/","og_site_name":"J\u00f6nk\u00f6ping Marathon","article_publisher":"https:\/\/www.facebook.com\/stadenarredo","article_modified_time":"2024-10-29T08:20:25+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/","url":"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/","name":"Map Half Marathon - J\u00f6nk\u00f6ping Marathon","isPartOf":{"@id":"https:\/\/jonkopingmarathon.se\/en\/#website"},"datePublished":"2022-04-16T09:28:07+00:00","dateModified":"2024-10-29T08:20:25+00:00","description":"The half marathon starts in the middle of the Munksj\u00f6 Bridge and you will see many beautiful places along the V\u00e4ttern, Huskvarna and central J\u00f6nk\u00f6ping.","breadcrumb":{"@id":"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jonkopingmarathon.se\/en\/map-half-marathon\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Start","item":"https:\/\/jonkopingmarathon.se\/en\/"},{"@type":"ListItem","position":2,"name":"Map Half Marathon"}]},{"@type":"WebSite","@id":"https:\/\/jonkopingmarathon.se\/en\/#website","url":"https:\/\/jonkopingmarathon.se\/en\/","name":"J\u00f6nk\u00f6ping Marathon","description":"jonkopingmarathon.se","publisher":{"@id":"https:\/\/jonkopingmarathon.se\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jonkopingmarathon.se\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jonkopingmarathon.se\/en\/#organization","name":"J\u00f6nk\u00f6ping Marathon","url":"https:\/\/jonkopingmarathon.se\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jonkopingmarathon.se\/en\/#\/schema\/logo\/image\/","url":"https:\/\/jonkopingmarathon.se\/wp-content\/uploads\/2024\/01\/OG_IMAGE_JonkopingMarathon.jpg","contentUrl":"https:\/\/jonkopingmarathon.se\/wp-content\/uploads\/2024\/01\/OG_IMAGE_JonkopingMarathon.jpg","width":1200,"height":630,"caption":"J\u00f6nk\u00f6ping Marathon"},"image":{"@id":"https:\/\/jonkopingmarathon.se\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stadenarredo","https:\/\/www.instagram.com\/jonkopingmarathon\/","https:\/\/www.youtube.com\/channel\/UCbXk-FxL8Z1K_OdthfGt-YA"]}]}},"_links":{"self":[{"href":"https:\/\/jonkopingmarathon.se\/en\/wp-json\/wp\/v2\/pages\/41940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jonkopingmarathon.se\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/jonkopingmarathon.se\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/jonkopingmarathon.se\/en\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/jonkopingmarathon.se\/en\/wp-json\/wp\/v2\/comments?post=41940"}],"version-history":[{"count":2,"href":"https:\/\/jonkopingmarathon.se\/en\/wp-json\/wp\/v2\/pages\/41940\/revisions"}],"predecessor-version":[{"id":55520,"href":"https:\/\/jonkopingmarathon.se\/en\/wp-json\/wp\/v2\/pages\/41940\/revisions\/55520"}],"wp:attachment":[{"href":"https:\/\/jonkopingmarathon.se\/en\/wp-json\/wp\/v2\/media?parent=41940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}