Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I just tried your code (chri_chri) . </p> <p>I tried to load an images but seem to be wrong... Im also now to openlayers</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;Floorplan test&lt;/title&gt; &lt;script src="http://www.openlayers.org/api/OpenLayers.js"&gt;&lt;/script&gt; &lt;script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="http://openlayers.org/api/theme/default/style.css" type="text/css" /&gt; &lt;style type="text/css"&gt; #bmap { width:83%; height:90%; border:2px solid black; position:absolute; top:10px; left:200px; } body{ background:yellow; } &lt;/style&gt; &lt;script&gt; var map; function init(){ map = new OpenLayers.Map('map'); var options = {numZoomLevels: 3} var floorplan = new OpenLayers.Layer.Image( 'Floorplan Map', 'png_1.jpg', new OpenLayers.Bounds(-300, -188.759, 300, 188.759), new OpenLayers.Size(580, 288), options ); map.addLayer(floorplan); //Create a Format object var vector_format = new OpenLayers.Format.GeoJSON({}); //Create a Protocol object using the format object just created var vector_protocol = new OpenLayers.Protocol.HTTP({ url: 'ex5_data.json', format: vector_format }); //Create an array of strategy objects var vector_strategies = [new OpenLayers.Strategy.Fixed()]; //Create a vector layer that contains a Format, Protocol, and Strategy class var vector_layer = new OpenLayers.Layer.Vector('More Advanced Vector Layer',{ protocol: vector_protocol, strategies: vector_strategies }); map.addLayer(vector_layer); if(!map.getCenter()){ map.zoomToMaxExtent(); } } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;h3&gt;Floorplan&lt;/h3&gt; &lt;body onload="init();"&gt; &lt;div id="bmap"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>What im starting up with is to load a floorplan map and try to scale it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload