Difference between revisions of "Widget:SpaceAPI"
m (no temperature polygons in debug (allows coordinate click)) |
m (added lines (outlets), added map) |
||
Line 14: | Line 14: | ||
|interval=20 | |interval=20 | ||
|float=right | |float=right | ||
− | |features= | + | |features=beacon |
}}</nowiki> | }}</nowiki> | ||
Line 25: | Line 25: | ||
|interval=20 | |interval=20 | ||
|float=right | |float=right | ||
− | |features= | + | |features=beacon |
}}<br/> | }}<br/> | ||
'''Notes''' | '''Notes''' | ||
Line 402: | Line 402: | ||
/*"288a13670500002a" : null*/ | /*"288a13670500002a" : null*/ | ||
}; | }; | ||
+ | |||
+ | var linesRed = [ | ||
+ | [50.892514028030334, 5.971161649524675], [50.89244602602161, 5.971209481358529] | ||
+ | [50.89251114428003, 5.9711696663976], [50.89244602602161, 5.971209481358529] | ||
+ | [50.8924980950481, 5.971208224073053], [50.89244602602161, 5.971209481358529] | ||
+ | [50.892495831897186, 5.971215394539513], [50.89244602602161, 5.971209481358529] | ||
+ | [50.892482398287335, 5.971254612622375], [50.89244602602161, 5.971209481358529] | ||
+ | [50.89248006555828, 5.971261391486564], [50.89244602602161, 5.971209481358529] | ||
+ | [50.89246652683481, 5.971301496043679], [50.89244602602161, 5.971209481358529] | ||
+ | [50.892464393586884, 5.971307247454547], [50.89244602602161, 5.971209481358529] | ||
+ | ]; | ||
+ | |||
+ | var linesBlue = [ | ||
+ | [50.892505941019564, 5.971185087508389], [50.89244602602161, 5.971209481358529] | ||
+ | [50.892503858003316, 5.971191544085743], [50.89244602602161, 5.971209481358529] | ||
+ | [50.89249048160161, 5.971230519935489], [50.89244602602161, 5.971209481358529] | ||
+ | [50.89248770274671, 5.971239335350448], [50.89244602602161, 5.971209481358529] | ||
+ | [50.89247468364275, 5.9712776963039005], [50.89244602602161, 5.971209481358529] | ||
+ | [50.892472469662096, 5.971284294786302], [50.89244602602161, 5.971209481358529] | ||
+ | [50.89245897037926, 5.971323475241662], [50.89244602602161, 5.971209481358529] | ||
+ | [50.89245672874569, 5.971331032450281], [50.89244602602161, 5.971209481358529] | ||
+ | ]; | ||
+ | |||
+ | if ( this._debug ) | ||
+ | { | ||
+ | L.polyline(linesRed, {color: 'red'}).addTo( this._leaflet.map ); | ||
+ | L.polyline(linesBlue, {color: 'blue'}).addTo( this._leaflet.map ); | ||
+ | } | ||
}.bind( this ) ); | }.bind( this ) ); | ||
Revision as of 12:28, 6 April 2018
This widget allows you to display the Space API data (provided as JSON)
Created by Xopr
Using this widget
To insert this widget, use the following code:
{{#widget:SpaceAPI |url=/spaceAPI/ |width=260px |height=20px |padding=8px |interval=20 |float=right |features=beacon }}
This will give the following result:
Notes
- url is mandatory, the rest is optional (leave out interval to make the data static).
- it also must be written without protocol since colon (:) is not allowed, and may be relative, for example: //ackspace.nl/spaceAPI/ or /spaceAPI/
- You must provide a unit for the sizes (i.e. px, %, etc.)
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy full source code of this page to your wiki as Widget:SpaceAPI article.