Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery mobile link transitioning to a leaflet map
    primarykey
    data
    text
    <p>I have a site using jQuery Mobile, and one of the pages shows a map using Cloudmade's Leaflet.</p> <p><a href="http://placr.mobi/map?lat=51.45289&amp;lon=-0.1003&amp;zoom=16" rel="nofollow">This page loads up and shows a map with a marker</a>, and this all works fine but...</p> <p><a href="http://placr.mobi/maplinktest" rel="nofollow">I have another page with a link to the map page</a>, then this loads up OK apart from it seems to try to get the marker image file from the wrong place.</p> <p><strong>Can anyone tell me more about what's going wrong on that page?</strong></p> <p>Here what I know. jQuery Mobile does rewriting of plain A HREF links to do ajax dynamic loading of the destination page instead. This is mysterious and unfathomable to me, but mostly a developer like me shouldn't need to concern myself with it right? However in this case something about the leaflet invocation code is not surviving the mangling.</p> <pre><code>Failed to load resource: the server responded with a status of 404 (Not Found) http://placr.mobi/dist/images/marker.png </code></pre> <p>...is the error reported by safari. Indeed this path is incorrect. I set it up leaflet with the contents of the 'dist' directory placed in a directory called 'leaflet'. Should work? In fact it <em>does</em> work apart from after the jQuery mangling.</p> <p>Investigating a little, I found no mention of 'dist' in the leaflet source code (as I would expect. I should be able to call that directory something else surely?) but a reference <em>does</em> get compiled into a the uglified javascript ('<code>return"../../dist/"</code>') </p> <p>Maybe someone has an example of jQuery Mobile and leaflet working together (ideally including marker image)</p>
    singulars
    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.
 

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