How can I modify this script to read from a text file values Gauss Boaga?
var map; var lon =9.10; var lat =45.46; var zoom =10;
function init(){ epsg4326 = new OpenLayers.Projection("EPSG:4326") map = new OpenLayers.Map("map", {displayProjection:epsg4326, controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.LayerSwitcher() ] });
var newLayer = new OpenLayers.Layer.OSM("Mappa locale", "Tiles/${z}/${x}/${y}.png", {numZoomLevels: 19, alpha: false, isBaseLayer: true}); map.addLayer(newLayer); var layer = new OpenLayers.Layer.Vector("Mezzi disponibili", { strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1.1})],
protocol: new OpenLayers.Protocol.HTTP({ url: "./sinottico_mezziliberi.txt", format: new OpenLayers.Format.Text() }) }); map.addLayer(layer);
my text file:
lat lon title description icon iconSize1517748 5036815 mydescription msb.png 15,15
thanks you
أكثر...
var map; var lon =9.10; var lat =45.46; var zoom =10;
function init(){ epsg4326 = new OpenLayers.Projection("EPSG:4326") map = new OpenLayers.Map("map", {displayProjection:epsg4326, controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.LayerSwitcher() ] });
var newLayer = new OpenLayers.Layer.OSM("Mappa locale", "Tiles/${z}/${x}/${y}.png", {numZoomLevels: 19, alpha: false, isBaseLayer: true}); map.addLayer(newLayer); var layer = new OpenLayers.Layer.Vector("Mezzi disponibili", { strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1.1})],
protocol: new OpenLayers.Protocol.HTTP({ url: "./sinottico_mezziliberi.txt", format: new OpenLayers.Format.Text() }) }); map.addLayer(layer);
my text file:
lat lon title description icon iconSize1517748 5036815 mydescription msb.png 15,15
thanks you
أكثر...