Demo VisualData 1.0 / Geolocation

Geolocation: Difference between revisions

From Wikisphere
Jump to navigation Jump to search
(VisualData update)
(VisualData update)
Tag: Replaced
Line 1: Line 1:
This page demonstrates the use of [https://www.mediawiki.org/wiki/Extension:VisualData/Geolocation VisualData/Geolocation] in conjunction with the [https://www.mediawiki.org/wiki/Extension:Maps Extension:Maps].
 
 
{{#visualdataprint:{{FULLPAGENAME}}
{{#visualdataprint:{{FULLPAGENAME}}
|schema=Geolocation  
|schema=Geolocation  
Line 6: Line 5:
|template?geolocation=Geolocation map
|template?geolocation=Geolocation map
}}
}}
It is composed by the following elements:
1) the schema [[VisualDataSchema:Geolocation|Geolocation]], which is of course createable/editable from [https://wikisphere.org/w/index.php?title=Demo_VisualData/Geolocation&action=editdata here] or [https://wikisphere.org/wiki/Special:ManageSchemas here].
2) The data entered in the same action tab [https://wikisphere.org/w/index.php?title=Demo_VisualData/Geolocation&action=editdata Edit data]
3) The following parser function
<pre>
{{#visualdataprint:{{FULLPAGENAME}}
|schema=Geolocation
|format=template
|template?geolocation=Geolocation map
}}
</pre>
The template [[Template:Geolocation map]] containing the call to the [https://maps.extension.wiki/wiki/Display_map_function display_map] parser function in the following form:
<pre>
{{#display_map: {{{latitude}}},{{{longitude}}}
|zoom= {{{zoom}}}
|width=400
}}
</pre>
4) That's it
jsondata
Line 3: Line 3:
         "Geolocation": {
         "Geolocation": {
             "geolocation": {
             "geolocation": {
                 "latitude": 45.28877480735224,
                 "latitude": 34.52552434275947,
                 "longitude": 10.376470527483207,
                 "longitude": 69.18545765085074,
                 "zoom": 2.1519556723984246
                 "zoom": 9.820426799394296
             }
             }
         }
         }
     }
     }
}
}

Revision as of 20:51, 18 February 2024


[Mark as patrolled]