Template:Karakoram Mountain Pass OSM
<graph>
{ // // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:Street_map_with_marks // Please do not modify it anywhere else, as it may get copied and override your changes. // Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:Street_map_with_marks // // Template translation is in https://commons.wikimedia.org/wiki/Data:Original/Template:Graphs.tab // "version": 2, "width":400, "height": 400, "padding": 0, "signals":[ // These signals allow us to quickly move the map within the image, e.g. to leave space for the legend {"name":"legendWidth", "init": {"expr": "0"} }, {"name":"legendHeight", "init": {"expr": "height"} }, {"name":"imgWidth", "init": {"expr": "width-legendWidth"} }, {"name":"imgHeight", "init": {"expr": "height"} }, {"name":"imgXC", "init": {"expr": "imgWidth/2"} }, {"name":"imgYC", "init": {"expr": "imgHeight/2"} }, {"name":"imgTileSize", "init": {"expr": "256"} }, {"name":"imgLat", "init": {"expr": "35.7"} }, {"name":"imgLon", "init": {"expr": "76.0"} }, {"name":"imgZoom", "init": {"expr": "7"} }, {"name":"picWidth", "init": {"expr": "180"} }, {"name":"picHeight", "init": {"expr": "picWidth/2"} }, {"name":"picXC", "init": {"expr": "imgWidth-(picWidth/2)"} }, {"name":"picYC", "init": {"expr": "imgHeight-(picHeight/2)"} }, {"name":"showMiniMap", "init": {"expr": "0"} } ], "data": [ { "name": "data", // Otherwise use the first unnamed argument for source values "values": [ { "lat": 35.7, "lon": 76.0, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/1/10/Mapscaleline.svg/120px-Mapscaleline.svg.png", "width": 50, "height": 8, "offsetX": 163, "offsetY": 190, "textAlign": "right", "textDx": 22, "textDy": -2, "textColor": "grey", "textFont": "Tahoma", "textFontSize": 9, "text": "75km" } , { "lat": 0, "lon": 0, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
}
, { "lat": 35.5812, "lon": 76.7908, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "1", "textAngle": 0, "textAlign": "left", "textBaseline": "middle", "textDx": 4, "textDy": 1, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.3919, "lon": 76.9487, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "2", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.1744, "lon": 77.0702, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "3", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.033333, "lon": 77.733333, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "4", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.1823, "lon": 75.5168, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "5", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.27368, "lon": 76.31893, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "6", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 36.3366, "lon": 74.044, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "7", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 36.019198, "lon": 75.545712, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "8", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 36.426, "lon": 75.6851, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "9", "textAngle": 0, "textAlign": "left", "textBaseline": "middle", "textDx": 4, "textDy": 1, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.513333, "lon": 77.823056, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "10", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.656667, "lon": 76.860556, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "11", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.87318, "lon": 76.57692, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "12", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.840000, "lon": 76.250000, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "13", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 35.8234, "lon": 76.16249, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "14", "textAngle": 0, "textAlign": "right", "textBaseline": "middle", "textDx": -4, "textDy": 1, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 36.850000, "lon": 75.427778, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "15", "textAngle": 0, "textAlign": "left", "textBaseline": "middle", "textDx": 4, "textDy": 1, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 36.97374, "lon": 75.2973, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "16", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 37.0039, "lon": 74.8511, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "17", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
} , { "lat": 37.0792, "lon": 74.6722, "img": "wikirawupload:https://handwiki.org/wiki/images/thumb/d/d0/DeepPink_pog.svg/5px-DeepPink_pog.svg.png", "height": 5, "width": 5, "text": "18", "textAngle": 0, "textAlign": "center", "textBaseline": "bottom", "textDx": 0, "textDy": -4, "textFontSize": 10, "textColor": "#0000FF"
}
], "transform": [ { "type": "geo", "projection": "mercator", "scale": {"expr": "imgTileSize/PI/2*pow(2,imgZoom)"}, "translate": [{"expr": "imgXC"}, {"expr": "imgYC"}], "center": [{"expr": "imgLon"}, {"expr": "imgLat"}], "lon": "lon", "lat": "lat" }, { "type": "formula", "field":"layout_x", "expr": "datum.layout_x + (datum.offsetX || 0)" }, { "type": "formula", "field":"layout_y", "expr": "datum.layout_y + (datum.offsetY || 0)" }, { "type": "formula", "field":"color", "expr": "datum.color || '#c33'" }, { "type": "formula", "field":"textColor", "expr": "datum.textColor || datum.color" }, { "type": "formula", "field":"strokeColor", "expr": "datum.strokeColor || '#ffe7e6'" } ] }, { // Hack: single value data source for drawing/hiding images and other non-series elements "name": "dummyData", "values": [{}] } ], // Legend only works if showLegend and colorScaleField are set "marks": [ { "type": "image", "from": { "data": "dummyData", "transform": [ { "type": "formula", "field":"url", "expr": "'mapsnapshot:///?width='+imgWidth+'&height='+imgHeight+'&zoom='+imgZoom+'&lat='+imgLat+'&lon='+imgLon+'&style=osm'" } ] }, "properties": { "enter": { "url": {"field": "url"}, "xc": {"signal": "imgXC"}, "yc": {"signal": "imgYC"}, "width": {"signal": "imgWidth"}, "height": {"signal": "imgHeight"} } } }, { // Places an image of a given name and size at the [lan,lon] location "type": "image", "from": { "data": "data", "transform": [ { "type": "filter", "test": "datum.img" }, { "type": "formula", "field":"iconWidth", "expr": "datum.width || 0" }, { "type": "formula", "field":"iconHeight", "expr": "datum.height || 0" }, { "type": "formula", "field":"img", "expr": "if(!test(/^[a-z]+:\\/\\//, datum.img), 'wikifile:///'+datum.img, datum.img)" }, // Ensure that either width or height parameter is passed to wikifile:// request { "type": "formula", "field":"img", "expr": "if((datum.iconWidth || datum.iconHeight) && !test(/[?&](width|height)=\\d/, datum.img),if(datum.iconWidth,datum.img+'?width='+datum.iconWidth,datum.img+'?height='+datum.iconHeight), datum.img)" } ]}, "properties": { "enter": { "url": {"field": "img"}, "xc": {"field": "layout_x"}, "yc": {"field": "layout_y"}, "width": {"field": "iconWidth"}, "height": {"field": "iconHeight"} } } }, { // Draw marks of a given color, shape, and size at the [lan,lon] location "type": "symbol", "from": { "data": "data", "transform": [{ "type": "filter", "test": "!datum.img" }] }, "properties": { "enter": { "x": {"field": "layout_x"}, "y": {"field": "layout_y"}, // If colorScaleField is set, use color scaling, otherwise use the preset color value "fill": { "field": "color" }, "size": {"field": "size"}, "shape": {"field": "shape"}, "stroke": {"field": "strokeColor"} } } }, { // Draw text with the given color and size at the [lan,lon] location // See https://github.com/vega/vega/wiki/Marks#text for all parameter description (prepend "text" and capitalize them) "type": "text", "from": { "data": "data", "transform": [ { "type": "filter", "test": "datum.text" }, // Figure out if this is an LTR or RTL page. For LTR, show label to the right of the icon, left-aligned. For RTL, reverse. { "type": "formula", "field":"isLTR", "expr": "'' == '\\u200E'" }, // If these values are not defined ("undefined" is not allowed, so test for truthiness and not 0) { "type": "formula", "field":"textDx", "expr": "if(!datum.textDx && datum.textDx != 0, if(datum.isLTR,8,-8), datum.textDx)" }, { "type": "formula", "field":"textAlign", "expr": "if(!datum.textAlign, if(datum.isLTR,'left','right'), datum.textAlign)" }, { "type": "formula", "field":"textBaseline", "expr": "datum.textBaseline || 'middle'" } ]}, "properties": { "enter": { "text": {"field": "text"}, "x": {"field": "layout_x" }, "y": {"field": "layout_y"}, "dx": {"field": "textDx" }, "dy": {"field": "textDy"}, "fill": {"field": "textColor"}, "align": {"field": "textAlign"}, "baseline": {"field": "textBaseline"}, "radius": {"field": "textRadius"}, "theta": {"field": "textTheta"}, "angle": {"field": "textAngle"}, "font": {"field": "textFont"}, "fontSize": {"field": "textFontSize"}, "fontWeight": {"field": "textFontWeight"}, "fontStyle": {"field": "textFontStyle"} } } }, { // Draw a low-zoom locator map frame "type": "rect", "from": { "data": "dummyData", "transform": [ { "type": "filter", "test": "showMiniMap" } ] }, "properties": { "enter": { "xc": {"signal": "picXC"}, "yc": {"signal": "picYC"}, "width": {"signal": "picWidth", "offset":2}, "height": {"signal": "picHeight"}, "stroke": {"value":"#fff"},"strokeWidth": {"value":6} } } }, { // Draw a low-zoom locator map by using a premade world map image "type": "image", "from": { "data": "dummyData", "transform": [ { "type": "filter", "test": "showMiniMap" }, { "type": "formula", "field":"url", "expr": "1" } ] }, "properties": { "enter": { "url": {"value": "wikirawupload:https://handwiki.org/wiki/images/thumb/a/ac/Earthmap1000x500.jpg/180px-Earthmap1000x500.jpg"}, "xc": {"signal": "picXC"}, "yc": {"signal": "picYC"}, "width": {"signal": "picWidth"}, "height": {"signal": "picHeight"} } } }, { // Draw a zoom-out mark at the [lan,lon] location "type": "symbol", "from": { "data": "dummyData", "transform": [ { "type": "filter", "test": "showMiniMap" }, { "type": "formula", "field":"lat", "expr": "imgLat" }, { "type": "formula", "field":"lon", "expr": "imgLon" }, { "type": "geo", "projection": "equirectangular", "scale": {"expr": "180/2/PI"}, "translate": [{"expr": "picXC"}, {"expr": "picYC"}], "center": [{"expr": "0"}, {"expr": "0"}], "lon": "lon", "lat": "lat" } ] }, "properties": { "enter": { "x": {"field": "layout_x"}, "y": {"field": "layout_y"}, "fill": {"value": "#c33"}, "stroke": {"value": "#ffe7e6"}, "size": {"value": 40} } } } ] } </graph> <maplink zoom="8" latitude="35.7" longitude="76.0" text="[Interactive fullscreen map]">
[
"features": [
"properties": { "title": "Sia La", "description": " 35.5812,76.7908", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [76.7908,35.5812] } } , { "type": "Feature", "properties": { "title": "Bilafond La", "description": " 35.3919,76.9487", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [76.9487,35.3919] } } , { "type": "Feature", "properties": { "title": "Gyong La", "description": " 35.1744,77.0702", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [77.0702,35.1744] } } , { "type": "Feature", "properties": { "title": "Sasser Pass", "description": " 35.033333,77.733333", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [77.733333,35.033333] } } , { "type": "Feature", "properties": { "title": "Burji La", "description": " 35.1823,75.5168", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [75.5168,35.1823] } } , { "type": "Feature", "properties": { "title": "Machulo La", "description": " 35.27368,76.31893", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [76.31893,35.27368] } } , { "type": "Feature", "properties": { "title": "Naltar Pass", "description": " 36.3366,74.044", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [74.044,36.3366] } } , { "type": "Feature", "properties": { "title": "Hispar Pass", "description": " 36.019198,75.545712", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [75.545712,36.019198] } } , { "type": "Feature", "properties": { "title": "Shimshal Pass", "description": " 36.426,75.6851", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [75.6851,36.426] } } , { "type": "Feature", "properties": { "title": "Karakoram Pass", "description": " 35.513333,77.823056", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [77.823056,35.513333] } } , { "type": "Feature", "properties": { "title": "Turkistan La Pass", "description": " 35.656667,76.860556", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [76.860556,35.656667] } } , { "type": "Feature", "properties": { "title": "Windy Gap", "description": " 35.87318,76.57692", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [76.57692,35.87318] } } , { "type": "Feature", "properties": { "title": "Mustagh Pass", "description": " 35.840000,76.250000", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [76.250000,35.840000] } } , { "type": "Feature", "properties": { "title": "Sarpo Laggo Pass", "description": " 35.8234,76.16249", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [76.16249,35.8234] } } , { "type": "Feature", "properties": { "title": "Khunjerab Pass", "description": " 36.850000,75.427778", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [75.427778,36.850000] } } , { "type": "Feature", "properties": { "title": "Mutsjliga Pass", "description": " 36.97374,75.2973", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [75.2973,36.97374] } } , { "type": "Feature", "properties": { "title": "Mintaka Pass", "description": " 37.0039,74.8511", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [74.8511,37.0039] } } , { "type": "Feature", "properties": { "title": "Kilik Pass", "description": " 37.0792,74.6722", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "#008000" }, "geometry": {"type": "Point", "coordinates": [74.6722,37.0792] } }
|
Location of the passes in Karakoram Legend:
|