Displaying GEONExT constructions

From JSXGraph Wiki
Revision as of 12:21, 17 September 2008 by 132.180.198.9 (talk)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Loading a GEONExT construction from a file

Here, we load the content of the GEONExT file "pythagoras.gxt" into JSXGraph, i.e. into the division with the id "box".

<div id="box" class="jxgbox" style="width:500px; height:500px;"></div>
<script type="text/javascript">
  var b2 = JXG.JSXGraph.loadBoardFromFile('box', '/geonext/viereck_gleiter_seiten.gxt', 'Geonext');
</script>

Another example for displaying GEONExT

Loading a GEONExT construction from a string

The content of a GEONExT file is a string which contains the GEONExT XML description of the construction compressed by gzip and encoded with base64. This string can be written directly into the HTML file. This has the advantage that the HTML file is complete. Here is an example:

<div id="box3" class="jxgbox" style="width:500px; height:500px;"></div>
<script type="text/javascript">
  var brd = JXG.JSXGraph.loadBoardFromString('box3', 'eNrtXOtv48YR/2z9FQv...+A+Ve+/sNQRlkZsVVddkvk/CpkHvA==', 'Geonext');
</script>