This question about Topic Markup Language and applications: Answered

how to use OpenLayers.js in fowsiki?

I'm trying to include an OpenLayers map (as per on fowsiki.

I have a topic with:

%ADDTOHEAD{text="<script  type=\"text/javascript\" src=\"\"></script>"}%

      <div style="width:100%; height:100%" id="map"></div>
      <script defer="defer" type="text/javascript">
        var map = new OpenLayers.Map('map');
        var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",   "", {layers: 'basic'} );

but nothing is rendered. Any suggestions welcome!

dave r.
The first thing to do is to put <literal>...</literal> around your script. That will prevent Foswiki trying to render it. The other thing is to debug using firebug in Firefox, and watch to make sure it does something.

-- CrawfordCurrie - 21 Jun 2010
Thanks! After adding the literal tags and a bit of playing, I found that it was just a matter of specifying the size explicitly. Let's see if it works here...

-- DavidRayner - 23 Jun 2010

QuestionForm edit

Subject Topic Markup Language and applications
Version Foswiki 1.0.9
Status Answered
Topic revision: r3 - 23 Jun 2010, DavidRayner - This page was cached on 09 Jan 2018 - 15:28.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License