<div>Leaflet could use OpenSim tiles, but you need to set up custom projection, like this:</div><div> </div><div><p><script></p><p>var mapMinZoom = 1;<br /> var mapMaxZoom = 6;<br /> <br />L.Projection.Direct = {<br /> project: function (latlng) {<br /> return new L.Point(latlng.lat*256, latlng.lng*256);<br /> },<br /> <br /> unproject: function (point) {<br /> return new L.LatLng(point.x/256, point.y/256);<br /> }<br />};</p><p>L.CRS.OpenSim=L.extend({},L.CRS,{<br /> projection: L.Projection.Direct,<br /> transformation:new L.Transformation(1,0,1,0),<br /> <br /> scale: function (zoom) {<br /> return 1;// OpenSim zoom<br /> }<br /> });</p><p><br /> var map = L.map('map',{<br /> minZoom: mapMinZoom,<br /> maxZoom:mapMaxZoom,<br /> crs: L.CRS.OpenSim<br /> });</p><p><br /> <br /> <br /> <br /> map.setView([1000, 1000], 1);</p><p>L.tileLayer('http://localhost:8002/map-{z}-{x}-{y}-objects.jpg', {<br /> maxZoom: mapMaxZoom,<br /> continuousWorld: true,<br /> noWrap:true,<br /> tileSize:256,<br /> crs: L.CRS.OpenSim,<br /> attribution: 'opensim',<br /> id: 'opensim',<br /> }).addTo(map);<br /> <br /> map.panTo([1000,1000]);</p><p><br /></script></p></div><div> </div><div>14.12.2015, 17:04, "ssm2017" <ssm2017@gmail.com>:</div><blockquote type="cite"><div><div><div><div><div><div><div><div>hello</div>i would like to create a web map using leaflet and the crs projection.</div>i am not able to make something valuable.</div>i have asked in the #leaflet channel and someone told me that OpenSimulator tiles (located in the Robust folder bin/maptiles) are weird.</div>here is what the person told me :<br />"if you have a tile, e.g. <span>1-1000-1000</span>, make sure that the tiles <span>2-2000-2000</span>, <span>2-2001-2000</span>, <span>2-2000-2001</span> and <span>2-2001-2001</span> are the same thing, but 2x"<br /><br /></div>my questions are :</div>is this person right ?</div>did someone was able to create a web map using leaflet and v2 tiles ? (and if yes, how :) )</div>,<p>_______________________________________________<br />Opensim-dev mailing list<br /><a href="mailto:Opensim-dev@opensimulator.org">Opensim-dev@opensimulator.org</a><br /><a href="http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev">http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev</a></p></blockquote><div> </div><div> </div><div>-- <br />Отправлено из быстрой почты</div><div>http://mail.yandex.ru/neo2/collect/?exp=1&t=5</div><div> </div>