html5 - Fictional interactive map with leaflet script issue between leaflet 0.6.4 and leaflet 0.7.3 -



html5 - Fictional interactive map with leaflet script issue between leaflet 0.6.4 and leaflet 0.7.3 -

i tried create map while using leaflet 0.6.4 , worked fine when tried switch leaflet 0.7.3 no tile uploaded. main error in html debugger "map" container not found.

the code never hosted on webserver because a)i don't have money , b)i'm not tech savy plenty (yet!) know how work. i've tested code localy (click on c:/ file here/ test.html).

if can help me understand did wrong, grateful.

here's code:

<head> <title>region1-7</title> <meta charset="utf-8" /> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> <!--[if lte ie 8]> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /> <![endif]--> <script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script> <script> function init() { var mapminzoom = 0; var mapmaxzoom = 5; var map = l.map('map', { maxzoom: mapmaxzoom, minzoom: mapminzoom, crs: l.crs.simple }).setview([0, 0], mapmaxzoom); var mapbounds = new l.latlngbounds( map.unproject([0, 5632], mapmaxzoom), map.unproject([5632, 0], mapmaxzoom)); map.fitbounds(mapbounds); l.tilelayer('{z}/map_{x}_{y}.png', { minzoom: mapminzoom, maxzoom: mapmaxzoom, bounds: mapbounds, attribution: 'rendered god emperor of mankind', nowrap: true }).addto(map); } </script> <style> html, body, #map { width: 100%; height: 100%; margin: 0; padding: 0; } </style> </head> <body onload="init()"> <div id="map"></div> </body> </html>

if has ressource free webhosting testing purposes or self-learning documentation leaflet i'm ears.

hell, if folks have commentary i'm open anything...except dan...he knows did....

you can prepare setting continuousworld: true tile layer.

if set true, tile coordinates won't wrapped world width (-180 180 longitude) or clamped lie within world height (-90 90). utilize if utilize leaflet maps don't reflect real world (e.g. game, indoor or photo maps).

source: http://leafletjs.com/reference.html#tilelayer-continuousworld

see perliedman's comment more information: https://github.com/leaflet/leaflet/issues/2579#issuecomment-38657771

html5 map leaflet

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -