User:Jts1882/maps/stadiums

This page is for testing maps using the mapframe. Sparql query and new json parser

Test maps


 * Template:Football map/demo
 * Template:Football map/demo2
 * Template:Football map/demo3
 * Template:Football map/demo4

Problem

Maps maximizing on single click. This behaviour is now seen on English Wikipedia (e.g. this page) and on MediaWiki (e.g. demo examples in mw:Help:Extension:Kartographer).

The interactive behaviour (with the single click gaining focus) works in show preview when editing and on the testwiki (e.g. here).

test
commented out

English Football Stadia
Coordinates:


 * White Hart Lane: 51.603333, -0.065833
 * New White Hart Lane: 51.60475, -0.066417
 * Wembley: 51.555833, -0.279722
 * Emirates Stadium: 51.555, -0.108611
 * Highbury: 51.557778, -0.102778
 * Stamford Bridge: 51.481667, -0.191111
 * Olympic Stadium: 51.538611, -0.016389
 * Upton Park: 51.531944, 0.039444
 * Craven Cottage: 51.475, -0.221667
 * The Valley (London): 51.486389, 0.036389

New White Hart Lane:

Using (left) or football map (right)



London Football Stadia
 [{ "type": "ExternalData", "service": "geoshape", "ids": "Q23306", "service": "geomask", "properties": { "fill":"#ccdddd", "stroke": "#003333", "stroke-width": 1, "opacity":0.9 } },{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.066417, 51.60475] }, "properties": { "title": "New White Hart Lane", "description": "File:NDProject2015.jpg", "marker-symbol": "-number", "marker-size": "large", "marker-color": "0050d0" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.065833, 51.603333] }, "properties": { "title": "White Hart Lane", "description": "White Hart Lane Aerial.jpgnham Hotspur Football Club (1899-2017)", "marker-symbol": "-number", "marker-size": "small", "marker-color": "dd50d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.108611, 51.555] }, "properties": { "title": "Emirates Stadium", "description": " Arsenal Football Club", "marker-symbol": "museum", "marker-size": "small", "marker-color": "0050d0" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.102778, 51.557778] }, "properties": { "title": "Highbury", "description": " Arsenal Football Club (1913-2006)", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "dd50d0" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.191111, 51.481667] }, "properties": { "title": "Stamford Bridge", "description": "Chelsea Football Club", "marker-symbol": "town-hall", "marker-size": "medium", "marker-color": "0050d0" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.221667, 51.475] }, "properties": { "title": "Craven Cottage", "description": "Fulham Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.016389, 51.538611] }, "properties": { "title": "Olympic Stadium", "description": "West Ham United Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [0.039444, 51.531944] }, "properties": { "title": "Upton Park", "description": " West Ham United Football Club (1904-2016)", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "dd50d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [0.036389, 51.486389] }, "properties": { "title": "The Valley", "description": "Charlton Athletic Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.085556, 51.398333] }, "properties": { "title": "Selhurst Park", "description": "Crystal Palace Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.281944, 51.405083] }, "properties": { "title": "Kingsmeadow", "description": " A.F.C. Wimbledon", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.401486, 51.649836] }, "properties": { "title": "Vicarage Road", "description": "Watford Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.291785, 51.602599] }, "properties": { "title": "The Hive Stadium", "description": "Barnet Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.232222, 51.509167] }, "properties": { "title": "Loftus Road", "description": "Queens Park Rangers Football Club", "marker-symbol": "soccer", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.302639, 51.488183] }, "properties": { "title": "Griffin Park", "description": "Brentford Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.012658, 51.56015] }, "properties": { "title": "Brisbane Road", "description": "Leyton Orient Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.05095, 51.485953] }, "properties": { "title": "The (New) Den", "description": "Millwall Football Club", "marker-symbol": "-number", "marker-size": "medium", "marker-color": "0050d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.048175, 51.480883] }, "properties": { "title": "The (Old) Den", "description": "Millwall Football Club (1910-1993)", "marker-symbol": "-number", "marker-size": "small", "marker-color": "dd50d0" } },

{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.279722, 51.555833] }, "properties": { "title": "Wembley Stadium", "description": "", "marker-symbol": "-number", "marker-size": "large", "marker-color": "0050d0" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-0.279722, 51.555556] }, "properties": { "title": "Wembley Stadium", "description": "", "marker-symbol": "-number", "marker-size": "small", "marker-color": "dd50d0" } }]

another test
This code is copied from List of state highways in Kerala and uses map frame with a Wikidata query for highways in India.

 { "type": "ExternalData", "service": "geoline", "properties": { "stroke": "#ff0000", "stroke-width": 2 }, "query": " SELECT ?id ?idLabel   (concat(, ?idLabel, ) as ?title) WHERE {   ?id wdt:P31 wd:Q269949 . # is a highway    ?id wdt:P17 wd:Q668 . # in India  	?id wdt:P16 wd:Q6640541 . # in List of SH in Kerala	SERVICE wikibase:label { bd:serviceParam wikibase:language 'en'} } "}
 * 1) Roads in Kerala