{"id":706,"date":"2019-11-10T17:50:40","date_gmt":"2019-11-10T16:50:40","guid":{"rendered":"http:\/\/holmsten.net\/wordpress\/?page_id=706"},"modified":"2025-03-18T22:36:28","modified_gmt":"2025-03-18T21:36:28","slug":"290kommuner","status":"publish","type":"page","link":"https:\/\/famholmsten.se\/290kommuner\/","title":{"rendered":"#290 kommuner"},"content":{"rendered":"\n<div class=\"leaflet-map WPLeafletMap\" style=\"height:1000px; width:100%;\"><\/div><script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletMapShortcode() {\/*<script>*\/\nvar baseUrl = atob('aHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmc=');\nvar base = (!baseUrl && window.MQ) ?\n    window.MQ.mapLayer() : L.tileLayer(baseUrl,\n        L.Util.extend({}, {\n            detectRetina: 0,\n        },\n        {\"subdomains\":\"abc\",\"accessToken\":\"pk.eyJ1IjoiZmFtaG9sbXN0ZW4iLCJhIjoiY2s2c2M5dDBpMGUwcTNlcXZocTl0ZGUxNSJ9.1ors-ho_4ccmezHFnyP0zQ\",\"noWrap\":false,\"maxZoom\":20}        )\n    );\n    var options = L.Util.extend({}, {\n        layers: [base],\n        attributionControl: false\n    },\n    {\"zoomControl\":true,\"scrollWheelZoom\":false,\"doubleClickZoom\":false,\"fitBounds\":true,\"minZoom\":0,\"maxZoom\":20,\"maxBounds\":null,\"attribution\":\"<a href=\\\"http:\\\/\\\/leafletjs.com\\\" title=\\\"A JS library for interactive maps\\\">Leaflet<\\\/a>; \\u00a9 <a href=\\\"http:\\\/\\\/www.openstreetmap.org\\\/copyright\\\">OpenStreetMap<\\\/a> contributors\"},\n    {});\nwindow.WPLeafletMapPlugin.createMap(options).setView([61,17.2],6);});<\/script>\n<script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletjsonShortcode() {\/*<script>*\/\nvar src = 'https:\/\/famholmsten.se\/hp\/sweden-municipalities-color.json';\nvar default_style = {};\nvar rewrite_keys = {\n    stroke : 'color',\n    'stroke-width' : 'weight',\n    'stroke-opacity' : 'opacity',\n    fill : 'fillColor',\n    'fill-opacity' : 'fillOpacity',\n};\n\/\/ htmlspecialchars converts & to \"&amp;\"; maybe unnecessarily, and maybe 3x\nvar ampersandRegex = \/&(?:amp;){1,3}\/g\nvar layer = L.ajaxGeoJson(src.replace(ampersandRegex, '&'), {\n    type: 'json',\n    style : layerStyle,\n    onEachFeature : onEachFeature,\n    pointToLayer: pointToLayer\n});\nvar fitbounds = 0;\nvar circleMarker = 0;\nvar popup_text = window.WPLeafletMapPlugin.unescape(\"\");\nvar popup_property = \"popup\";\nvar group = window.WPLeafletMapPlugin.getCurrentGroup();\nvar markerOptions = window.WPLeafletMapPlugin.getIconOptions({});\nlayer.addTo( group );\nwindow.WPLeafletMapPlugin.geojsons.push( layer );\nif (fitbounds) {\n    layer.on('ready', function () {\n        this.map.fitBounds( this.getBounds() );\n    });\n}\nfunction layerStyle (feature) {\n    var props = feature.properties || {};\n    var style = {};\n    function camelFun (_, first_letter) {\n        return first_letter.toUpperCase();\n    };\n    for (var key in props) {\n        if (key.match('-')) {\n            var camelcase = key.replace(\/-(\\w)\/, camelFun);\n            style[ camelcase ] = props[ key ];\n        }\n        \/\/ rewrite style keys from geojson.io\n        if (rewrite_keys[ key ]) {\n            style[ rewrite_keys[ key ] ] = props[ key ];\n        }\n    }\n    return L.Util.extend(style, default_style);\n}\nfunction onEachFeature (feature, layer) {\n    var props = feature.properties || {};\n    var text;\n    if (0) {\n        text = window.WPLeafletMapPlugin.propsToTable(props);\n    } else {\n        text = popup_property\n            ? props[ popup_property ]\n            : window.WPLeafletMapPlugin.template(\n                popup_text, \n                feature.properties\n            );\n    }\n    if (text) {\n        layer.bindPopup( text );\n    }\n}\nfunction pointToLayer (feature, latlng) {\n    if (circleMarker) {\n        return L.circleMarker(latlng);\n    }\n    return L.marker(latlng, markerOptions);\n}});<\/script>\n<script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletCircleShortcode() {\/*<script>*\/\nvar previous_map = window.WPLeafletMapPlugin.getCurrentMap();\nvar group = window.WPLeafletMapPlugin.getCurrentGroup();\nvar fitbounds = 0;\nvar is_image = previous_map.is_image_map;\nvar lat = 67.721283333333;\nvar lng = 17.790383333333;\nvar radius = 100;\n\/\/ update lat lng to previous map's center\nif (!lat && !lng && !is_image) {\n    var map_center = previous_map.getCenter();\n    lat = map_center.lat;\n    lng = map_center.lng;\n}\nvar circle = L.circle([lat, lng], {radius: radius});\ncircle.setStyle({\"color\":\"red\",\"opacity\":1,\"fillOpacity\":1,\"radius\":100});\ncircle.addTo( group );\nwindow.WPLeafletMapPlugin.circles.push( circle );\nif (fitbounds) {\n    \/\/ zoom the map to the polyline\n    previous_map.fitBounds( circle.getBounds() );\n}});<\/script>\n<script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletCircleShortcode() {\/*<script>*\/\nvar previous_map = window.WPLeafletMapPlugin.getCurrentMap();\nvar group = window.WPLeafletMapPlugin.getCurrentGroup();\nvar fitbounds = 0;\nvar is_image = previous_map.is_image_map;\nvar lat = 67.431416666667;\nvar lng = 17.723;\nvar radius = 100;\n\/\/ update lat lng to previous map's center\nif (!lat && !lng && !is_image) {\n    var map_center = previous_map.getCenter();\n    lat = map_center.lat;\n    lng = map_center.lng;\n}\nvar circle = L.circle([lat, lng], {radius: radius});\ncircle.setStyle({\"color\":\"red\",\"opacity\":1,\"fillOpacity\":1,\"radius\":100});\ncircle.addTo( group );\nwindow.WPLeafletMapPlugin.circles.push( circle );\nif (fitbounds) {\n    \/\/ zoom the map to the polyline\n    previous_map.fitBounds( circle.getBounds() );\n}});<\/script>\n<script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletCircleShortcode() {\/*<script>*\/\nvar previous_map = window.WPLeafletMapPlugin.getCurrentMap();\nvar group = window.WPLeafletMapPlugin.getCurrentGroup();\nvar fitbounds = 0;\nvar is_image = previous_map.is_image_map;\nvar lat = 67.904716666667;\nvar lng = 18.5284;\nvar radius = 100;\n\/\/ update lat lng to previous map's center\nif (!lat && !lng && !is_image) {\n    var map_center = previous_map.getCenter();\n    lat = map_center.lat;\n    lng = map_center.lng;\n}\nvar circle = L.circle([lat, lng], {radius: radius});\ncircle.setStyle({\"color\":\"red\",\"opacity\":1,\"fillOpacity\":1,\"radius\":100});\ncircle.addTo( group );\nwindow.WPLeafletMapPlugin.circles.push( circle );\nif (fitbounds) {\n    \/\/ zoom the map to the polyline\n    previous_map.fitBounds( circle.getBounds() );\n}});<\/script>\n\n<br>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/famholmsten.se\/290kommuner\/wp-content\/uploads\/2022\/03\/Vuxna.jpg\"><img fetchpriority=\"high\" decoding=\"async\" width=\"3022\" height=\"3231\" data-id=\"2921\" src=\"https:\/\/famholmsten.se\/290kommuner\/wp-content\/uploads\/2022\/03\/Vuxna.jpg\" alt=\"\" class=\"wp-image-2921\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/famholmsten.se\/290kommuner\/wp-content\/uploads\/2022\/03\/Familjen.jpg\"><img decoding=\"async\" width=\"3648\" height=\"2736\" data-id=\"2922\" src=\"https:\/\/famholmsten.se\/290kommuner\/wp-content\/uploads\/2022\/03\/Familjen.jpg\" alt=\"\" class=\"wp-image-2922\"\/><\/a><\/figure>\n<\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":20,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-706","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/famholmsten.se\/290kommuner\/wp-json\/wp\/v2\/pages\/706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/famholmsten.se\/290kommuner\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/famholmsten.se\/290kommuner\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/famholmsten.se\/290kommuner\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/famholmsten.se\/290kommuner\/wp-json\/wp\/v2\/comments?post=706"}],"version-history":[{"count":1,"href":"https:\/\/famholmsten.se\/290kommuner\/wp-json\/wp\/v2\/pages\/706\/revisions"}],"predecessor-version":[{"id":4883,"href":"https:\/\/famholmsten.se\/290kommuner\/wp-json\/wp\/v2\/pages\/706\/revisions\/4883"}],"wp:attachment":[{"href":"https:\/\/famholmsten.se\/290kommuner\/wp-json\/wp\/v2\/media?parent=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}