Difference between revisions of "Widget:SpaceAPI"

From Hackerspace ACKspace
Jump to: navigation, search
m (array fix (really))
m (step 2 of the line coordinates)
Line 404: Line 404:
  
 
var linesRed = [[
 
var linesRed = [[
[50.892514028030334, 5.971161649524675], [50.89244602602161, 5.971209481358529]],[
+
[50.892514028030334, 5.971161649524675], [50.89251319586179, 5.971160894608546]],[
[50.89251114428003, 5.9711696663976], [50.89244602602161, 5.971209481358529]],[
+
[50.89251114428003, 5.9711696663976], [50.89251024343285, 5.9711689967662105]],[
[50.8924980950481, 5.971208224073053], [50.89244602602161, 5.971209481358529]],[
+
[50.8924980950481, 5.971208224073053], [50.892496785531904, 5.971207094194142]],[
[50.892495831897186, 5.971215394539513], [50.89244602602161, 5.971209481358529]],[
+
[50.892495831897186, 5.971215394539513], [50.89249461680935, 5.971214339470522]],[
[50.892482398287335, 5.971254612622375], [50.89244602602161, 5.971209481358529]],[
+
[50.892482398287335, 5.971254612622375], [50.89248148152484, 5.971253695897759]],[
[50.89248006555828, 5.971261391486564], [50.89244602602161, 5.971209481358529]],[
+
[50.89248006555828, 5.971261391486564], [50.8924792609356, 5.971260443329812]],[
[50.89246652683481, 5.971301496043679], [50.89244602602161, 5.971209481358529]],[
+
[50.89246652683481, 5.971301496043679], [50.8924656730421, 5.971300341188908]],[
[50.892464393586884, 5.971307247454547], [50.89244602602161, 5.971209481358529]]
+
[50.892464393586884, 5.971307247454547], [50.89246356324314, 5.971306176293467]]
 
];
 
];
  
 
var linesBlue = [[
 
var linesBlue = [[
[50.892505941019564, 5.971185087508389], [50.89244602602161, 5.971209481358529]],[
+
[50.892505941019564, 5.971185087508389], [50.89250524711004, 5.971184503287078]],[
[50.892503858003316, 5.971191544085743], [50.89244602602161, 5.971209481358529]],[
+
[50.892503858003316, 5.971191544085743], [50.892503132264245, 5.9711907897144565]],[
[50.89249048160161, 5.971230519935489], [50.89244602602161, 5.971209481358529]],[
+
[50.89249048160161, 5.971230519935489], [50.89248932268764, 5.971229581079457]],[
[50.89248770274671, 5.971239335350448], [50.89244602602161, 5.971209481358529]],[
+
[50.89248770274671, 5.971239335350448], [50.89248661219504, 5.97123836979705]],[
[50.89247468364275, 5.9712776963039005], [50.89244602602161, 5.971209481358529]],[
+
[50.89247468364275, 5.9712776963039005], [50.892473913492424, 5.97127688527138]],[
[50.892472469662096, 5.971284294786302], [50.89244602602161, 5.971209481358529]],[
+
[50.892472469662096, 5.971284294786302], [50.89247146830519, 5.971283237998365]],[
[50.89245897037926, 5.971323475241662], [50.89244602602161, 5.971209481358529]],[
+
[50.89245897037926, 5.971323475241662], [50.89245824463948, 5.9713221760466695]],[
[50.89245672874569, 5.971331032450281], [50.89244602602161, 5.971209481358529]]
+
[50.89245672874569, 5.971331032450281], [50.89245581256435, 5.971329635940493]]
 
];
 
];
  

Revision as of 13:07, 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.