Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>if you want to use mobile properties with openlayers as panning or zooming with hand you have to use openlayers.mobile.js. </p> <p>you can use openlayers.light.js with mobile devices but not mobile functions.</p> <p>i think your structure should be :</p> <pre><code>myProject /js openlayers.light.js /img /theme </code></pre> <p>and i have tried openlayers.light.js in <a href="http://jsfiddle.net/aragon/ZecJj/" rel="nofollow">http://jsfiddle.net/aragon/ZecJj/</a> and there is no problem with it.</p> <p>My code:</p> <pre><code>var map = new OpenLayers.Map({ div: "map", minResolution: "auto", maxResolution: "auto", }); var osm = new OpenLayers.Layer.OSM(); var toMercator = OpenLayers.Projection.transforms['EPSG:4326']['EPSG:3857']; var center = toMercator({x:-0.05,y:51.5}); map.addLayers([osm]); map.setCenter(new OpenLayers.LonLat(center.x,center.y), 13); </code></pre> <p>and try to read <a href="http://docs.openlayers.org/library/deploying.html" rel="nofollow">Deploying (Shipping OpenLayers in your Application)</a>.</p> <blockquote> <p>OpenLayers comes with pre-configured examples out of the box: simply download a release of OpenLayers, and you get a full set of easy to use examples. However, these examples are designed to be used for development. When you’re ready to deploy your application, you want a highly optimized OpenLayers distribution, to limit bandwidth and loading time.</p> </blockquote> <p>you can change src file with this link and can see it still works.</p> <pre><code> &lt;script type="text/javascript" src="http://openlayers.org/dev/OpenLayers.light.debug.js"&gt;&lt;/script&gt; </code></pre> <p>to</p> <pre><code>&lt;script type="text/javascript" src="https://view.softwareborsen.dk/Softwareborsen/Vis%20Stedet/trunk/lib/OpenLayers/2.12/OpenLayers.light.js?content-type=text%2Fplain"&gt;&lt;/script&gt; </code></pre> <p>i hope it helps you... </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