{"id":2993,"date":"2020-09-21T21:47:44","date_gmt":"2020-09-21T19:47:44","guid":{"rendered":"http:\/\/an.hamilton.lv\/?p=2993"},"modified":"2020-09-21T21:47:44","modified_gmt":"2020-09-21T19:47:44","slug":"novaya-velodorozhka-babite-imanta","status":"publish","type":"post","link":"http:\/\/an.hamilton.lv\/?p=2993","title":{"rendered":"\u041d\u043e\u0432\u0430\u044f \u0432\u0435\u043b\u043e\u0434\u043e\u0440\u043e\u0436\u043a\u0430 \u0411\u0430\u0431\u0438\u0442\u0435 &#8212; \u0418\u043c\u0430\u043d\u0442\u0430"},"content":{"rendered":"<div class=\"leaflet-map WPLeafletMap\" style=\"height:350px; 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\",\"noWrap\":false,\"maxZoom\":20}        )\n    );\n    var options = L.Util.extend({}, {\n        layers: [base],\n        attributionControl: false\n    },\n    {\"zoomControl\":true,\"scrollWheelZoom\":true,\"doubleClickZoom\":true,\"fitBounds\":false,\"minZoom\":0,\"maxZoom\":20,\"maxBounds\":null,\"attribution\":\"<a href=\\\"http:\\\/\\\/leafletjs.com\\\" title=\\\"A JS library for interactive maps\\\">Leaflet<\\\/a>; \\\\r\\\\n\\u00a9 <a href=\\\"http:\\\/\\\/www.openstreetmap.org\\\/copyright\\\">OpenStreetMap<\\\/a> contributors\"},\n    {});\nwindow.WPLeafletMapPlugin.createMap(options).setView([56.947922801729,24.103875160217],11);});<\/script>\n<script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletMarkerShortcode() {\/*<script>*\/\nvar map = window.WPLeafletMapPlugin.getCurrentMap();\nvar group = window.WPLeafletMapPlugin.getCurrentGroup();\nvar marker_options = window.WPLeafletMapPlugin.getIconOptions({});\nvar marker = L.marker(\n    [56.959390675886,23.953800201416],\n    marker_options\n);\nvar is_image = map.is_image_map;\nif (marker_options.draggable) {\n    marker.on('dragend', function () {\n        var latlng = this.getLatLng();\n        var lat = latlng.lat;\n        var lng = latlng.lng;\n        if (is_image) {\n            console.log('leaflet-marker y=' + lat + ' x=' + lng);\n        } else {\n            console.log('leaflet-marker lat=' + lat + ' lng=' + lng);\n        }\n    });\n}\nmarker.addTo( group );\nmarker.bindPopup(window.WPLeafletMapPlugin.unescape(' \u0412\u0435\u043b\u043e\u0434\u043e\u0440\u043e\u0436\u043a\u0430 '));window.WPLeafletMapPlugin.markers.push( marker );\n        });<\/script>\n<script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletMarkerShortcode() {\/*<script>*\/\nvar map = window.WPLeafletMapPlugin.getCurrentMap();\nvar group = window.WPLeafletMapPlugin.getCurrentGroup();\nvar marker_options = window.WPLeafletMapPlugin.getIconOptions({});\nvar marker = L.marker(\n    [56.96291204028,23.994736075401],\n    marker_options\n);\nvar is_image = map.is_image_map;\nif (marker_options.draggable) {\n    marker.on('dragend', function () {\n        var latlng = this.getLatLng();\n        var lat = latlng.lat;\n        var lng = latlng.lng;\n        if (is_image) {\n            console.log('leaflet-marker y=' + lat + ' x=' + lng);\n        } else {\n            console.log('leaflet-marker lat=' + lat + ' lng=' + lng);\n        }\n    });\n}\nmarker.addTo( group );\nmarker.bindPopup(window.WPLeafletMapPlugin.unescape(' \u0412\u0435\u043b\u043e\u0434\u043e\u0440\u043e\u0436\u043a\u0430 '));window.WPLeafletMapPlugin.markers.push( marker );\n        });<\/script>\n<p>&nbsp;<\/p>\n<script>\nwindow.WPLeafletMapPlugin = window.WPLeafletMapPlugin || [];\nwindow.WPLeafletMapPlugin.push(function WPLeafletgpxShortcode() {\/*<script>*\/\nvar src = 'gpx\/GPS_2020-09-21_143654.gpx';\nvar default_style = {\"color\":\"red\"};\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: 'gpx',\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 = \"\";\nvar table_view = 0;\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 (table_view) {\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}\n    function pointToLayer (feature, latlng) {\n    if (circleMarker) {\n        return L.circleMarker(latlng);\n    }\n    return L.marker(latlng, markerOptions);\n}});<\/script>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-2993","post","type-post","status-publish","format-standard","hentry","category-riga"],"_links":{"self":[{"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=\/wp\/v2\/posts\/2993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2993"}],"version-history":[{"count":10,"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=\/wp\/v2\/posts\/2993\/revisions"}],"predecessor-version":[{"id":3003,"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=\/wp\/v2\/posts\/2993\/revisions\/3003"}],"wp:attachment":[{"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2993"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/an.hamilton.lv\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}