Difference between revisions of ":Map"

(United States Test)
Line 22: Line 22:
 
<mapframe text="North America Region Map" width=800 height=600 zoom=4 latitude=46.468 longitude=-98.723 />
 
<mapframe text="North America Region Map" width=800 height=600 zoom=4 latitude=46.468 longitude=-98.723 />
  
==United States Mapframe==
+
==MultiPoint Map==
<mapframe latitude="52" longitude="-110" zoom="3" width="500" height="500" text="Governors of US states with their party affiliation">
+
<maplink text="Add groups of different colored markers and different counters" width="350" height="350" zoom="13" longitude="-122.39902496337889" latitude="37.80151060070086"> {
{
+
"type": "FeatureCollection", "features":  [
  "type": "ExternalData",
+
    { "type": "Feature",
  "service": "geoshape",
+
      "properties": {
  "query": "
+
        "marker-symbol": "-number",
SELECT ?id ?head
+
        "marker-color": "302060" },
  (SAMPLE(?img) as ?img)
+
      "geometry": {
  (min(?partyId) as ?party)
+
        "type": "Point",
  (if(?party = '0', '#800000', if(?party = '1', '#000080', '#008000')) as ?fill)
+
        "coordinates": [ -122.41816520690917, 37.79097260220947 ] }},
  (concat('[[wikipedia:', substr(str(?link),31,500), '{{!}}', ?headLabel, ']]') as ?title)
+
    { "type": "Feature",
  (concat(?stateLabel, '\\n', '[[File:', substr(str(?img), 52, 500), '{{!}}200px]]') as ?description)
+
      "properties": {
WHERE {
+
        "marker-symbol": "-number",
  ?id wdt:P31 wd:Q35657 .
+
        "marker-color": "302060"
  ?id wdt:P6 ?head .
+
      },
  ?head wdt:P102 ?party .
+
      "geometry": {
  BIND(if(?party = wd:Q29468, '0', if(?party = wd:Q29552, '1', '2')) as ?partyId)
+
        "type": "Point",
  SERVICE wikibase:label {
+
        "coordinates": [ -122.40786552429199, 37.799654055191525 ] }},
    bd:serviceParam wikibase:language 'en' .
+
    {
     ?head rdfs:label ?headLabel .
+
      "type": "Feature",
     ?id rdfs:label ?stateLabel .
+
      "properties": {
  }
+
        "marker-symbol": "-number",
  OPTIONAL {
+
        "marker-color": "302060"
     ?head wdt:P18 ?img .
+
      },
  }
+
      "geometry": {
  ?link schema:about ?head .
+
        "type": "Point",
  ?link schema:isPartOf <https://en.wikipedia.org/> .
+
        "coordinates": [ -122.40185737609865, 37.796262984039544 ] }},
} GROUP BY ?id ?head ?headLabel ?link ?stateLabel
+
    {
"}
+
      "type": "Feature",
</mapframe>
+
      "properties": {
 +
        "marker-symbol": "-number",
 +
        "marker-color": "302060"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [ -122.38743782043457, 37.80535070427755 ] }},
 +
    {
 +
      "type": "Feature",
 +
      "properties": {
 +
        "marker-symbol": "-number",
 +
        "marker-color": "302060"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [ -122.38005638122557, 37.795449103799726 ] }},
 +
    {
 +
      "type": "Feature",
 +
      "properties": {
 +
        "marker-symbol": "-letter",
 +
        "marker-color": "208020"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [ -122.40941047668457, 37.81850557172186 ] }},
 +
    {
 +
      "type": "Feature",
 +
      "properties": {
 +
        "marker-symbol": "-letter",
 +
        "marker-color": "208020"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [ -122.40357398986815, 37.81280993744834 ] }},
 +
     {
 +
      "type": "Feature",
 +
      "properties": {
 +
        "marker-symbol": "-letter",
 +
        "marker-color": "208020"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [ -122.39842414855956, 37.8071138637568 ] }},
 +
     {
 +
      "type": "Feature",
 +
      "properties": {
 +
        "marker-symbol": "-number-bar",
 +
        "marker-color": "f01080"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [ -122.41181373596191, 37.78595317184089 ] }},
 +
     {
 +
      "type": "Feature",
 +
      "properties": {
 +
        "marker-symbol": "-number-bar",
 +
        "marker-color": "f01080"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [ -122.39542007446289, 37.787674400057654 ] }},
 +
    {
 +
      "type": "Feature",
 +
      "properties": {
 +
        "marker-symbol": "-number-bar",
 +
        "marker-color": "f01080"
 +
      },
 +
      "geometry": {
 +
        "type": "Point",
 +
        "coordinates": [ -122.38649368286131, 37.78401144262929 ] }}
 +
  ] }</maplink>

Revision as of 17:39, 8 June 2018

Region Map

Example 1

Example 2

United States Test

United States Test2

MultiPoint Map

Add groups of different colored markers and different counters