Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenlayers 2.11 and Jquery Mobile 1.0.1 are not working together
    primarykey
    data
    text
    <p>I have been working on a project with OpenLayers and jquery Mobile. Whenever I write the code to run without Jquery Mobile, OpenLayers works perfectly. The problem comes when I put them together. The map never loads. What am I doing wrong? Is there something I have to take into account that I am missing? </p> <p>Here is the code I wrote: </p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta name="viewport" content="width=320; user-scalable=no" /&gt; &lt;meta http-equiv="Content-type" content="text/html; charset=utf-8"&gt; &lt;title&gt;ISEC App&lt;/title&gt; &lt;link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.0.1.min.css" /&gt; &lt;link rel="stylesheet" href="index.css" /&gt; &lt;script src="jquery.mobile/jquery-1.6.4.min"&gt;&lt;/script&gt; &lt;!-- If I comment this line, everything works fine --&gt; &lt;script src="jquery.mobile/jquery.mobile-1.0.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" charset="utf-8" src="phonegap-1.4.1.js"&gt; &lt;/script&gt; &lt;script type="text/javascript" src="barcodescanner.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" charset="utf-8" src="index.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="OpenLayers.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="lib/mapa.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div style="width:100%; height:100%" id="mapas"&gt;&lt;/div&gt; &lt;script defer="defer" type="text/javascript"&gt; var mapa = new OpenLayers.Map('mapas'); var wms = new OpenLayers.Layer.OSM( "Isec", "http://www.isec.com.co/osm/tiles/z${z}/ln${x}/lt${y}.png", {numZoomLevels: 18} ); mapa.addLayer(wms); mapa.setCenter(lonLatT(-74.1185,4.6867), 14); alert("*/*/*"); function lonLatT(lon, lat){ return new OpenLayers.LonLat(lon,lat).transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913")); } &lt;/script&gt; &lt;/body&gt; &lt;html&gt; </code></pre> <p>If I remove the reference to the jquery.mobile javascript file, it works. I don't understand why it is working that way. Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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