Difference between revisions of "Widget:SpaceAPI"

From Hackerspace ACKspace
Jump to: navigation, search
m (array fix)
m (array fix (really))
Line 403: Line 403:
 
};
 
};
  
var linesRed = [
+
var linesRed = [[
 
[50.892514028030334, 5.971161649524675], [50.89244602602161, 5.971209481358529]],[
 
[50.892514028030334, 5.971161649524675], [50.89244602602161, 5.971209481358529]],[
 
[50.89251114428003, 5.9711696663976], [50.89244602602161, 5.971209481358529]],[
 
[50.89251114428003, 5.9711696663976], [50.89244602602161, 5.971209481358529]],[
Line 411: Line 411:
 
[50.89248006555828, 5.971261391486564], [50.89244602602161, 5.971209481358529]],[
 
[50.89248006555828, 5.971261391486564], [50.89244602602161, 5.971209481358529]],[
 
[50.89246652683481, 5.971301496043679], [50.89244602602161, 5.971209481358529]],[
 
[50.89246652683481, 5.971301496043679], [50.89244602602161, 5.971209481358529]],[
[50.892464393586884, 5.971307247454547], [50.89244602602161, 5.971209481358529]
+
[50.892464393586884, 5.971307247454547], [50.89244602602161, 5.971209481358529]]
 
];
 
];
  
var linesBlue = [
+
var linesBlue = [[
 
[50.892505941019564, 5.971185087508389], [50.89244602602161, 5.971209481358529]],[
 
[50.892505941019564, 5.971185087508389], [50.89244602602161, 5.971209481358529]],[
 
[50.892503858003316, 5.971191544085743], [50.89244602602161, 5.971209481358529]],[
 
[50.892503858003316, 5.971191544085743], [50.89244602602161, 5.971209481358529]],[
Line 422: Line 422:
 
[50.892472469662096, 5.971284294786302], [50.89244602602161, 5.971209481358529]],[
 
[50.892472469662096, 5.971284294786302], [50.89244602602161, 5.971209481358529]],[
 
[50.89245897037926, 5.971323475241662], [50.89244602602161, 5.971209481358529]],[
 
[50.89245897037926, 5.971323475241662], [50.89244602602161, 5.971209481358529]],[
[50.89245672874569, 5.971331032450281], [50.89244602602161, 5.971209481358529]
+
[50.89245672874569, 5.971331032450281], [50.89244602602161, 5.971209481358529]]
 
];
 
];
  

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