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