[Spanish] Ayuda Tilecache+mapserver+openlayers
Anderson castellanos
castellanos825 at hotmail.com
Wed Mar 13 08:29:22 PDT 2013
Buenos dias he ralizado un servicio de mapas con mapserver (ms4w) y openlayers, sin embargo al tratar de integrar tilecache al mismo, he fracasado. he seguido las instrucciones de algunos foros pero sin éxito por favor si alguien pudiera ayudarme estaria muy agradecido.estoy utilizando:Ms4w 3.0.4Openlayers 2.1.2Tilecache 2.11python 2.6.2
archivo tilecache.cfg
[cache]type=Diskbase=C:/ms4w/tmp/tilecache
[mapa] type={MapServer,WMS} mapfile=C:/ms4w/Apache/htdocs/map/mapfile4.map url=http://localhost:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/Apache/htdocs/map/mapfile4.map layers=Provincias,PaisesVecinos,Rios,Lagos,Edificaciones,Calles,Corregimiento,Distritosextension=pngsize=256,256 bbox=-89.512776,0.635665,-66.577208,12.207839 srs=EPSG:4326 levels=8 resolutions=0.009,0.00813762678,0.0017525356000000000000,0.0009633874600000000000,0.0004128803400000000000,0.0000564401700000000000,0.0000412881622611744000,0.0000072346966 extent_type=loose
archivo httpd.conf
<Directory "C:/ms4w/Apache/htdocs/tilecache/"> AddHandler cgi-script .cgi Options +ExecCGI</Directory>
archivo tilecache.cgi
#!C:/Python26/python.exe?
from TileCache import Service, cgiHandler, cfgfiles
if __name__ == '__main__': svc = Service.load(*cfgfiles) cgiHandler(svc)
Archivo Openlayers
var map ; function init(){ bounds = new OpenLayers.Bounds(); bounds.extend(new OpenLayers.LonLat(-89.512776,0.635665)); bounds.extend(new OpenLayers.LonLat(-66.577208,12.207839)); var scale1 = 0.009; var scale2 = 0.00813762678; var scale3 = 0.0017525356000000000000; var scale4 = 0.0009633874600000000000; var scale5 = 0.0004128803400000000000; var scale6 = 0.0000564401700000000000; var scale7 = 0.0000412881622611744000; var scale8 = 0.0000072346966; map_service = 'http://localhost:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/Apache/htdocs/map/mapfile4.map'; map = new OpenLayers.Map( 'map', { units: "m", maxResolution: scale1, minResolution: 0.000007234696613999980, maxExtent: bounds, restrictedExtent: bounds, numZoomLevels: 8, controls: [new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.MousePosition()], } );
ingeomaps_layer0 =new OpenLayers.Layer.WMS( "L0",//'http://127.0.0.1?' , map_service, { layers: 'Basef', transparent: 'false', format: 'gif' }, { isBaseLayer:true, visibility:false } ); ingeomaps_layer0.setVisibility(false);
// registerEvents(ingeomaps_layer0); ingeomaps_layer1 =new OpenLayers.Layer.WMS( "L1", map_service, { layers: 'PaisesVecinos'+ ',PaisesVecinos_txt'+ ',Provincias'+ ',Provinciastxt'+ ',Parques'+ ',Calles'+ ',Lagos', transparent: 'true', format: 'png' }, { isBaseLayer:false, transitionEffect: 'resize',visibility:true, minResolution: scale2, maxResolution: scale1 } ); ingeomaps_layer2 =new OpenLayers.Layer.WMS( "L2", map_service, { layers: 'PaisesVecinos'+ ',PaisesVecinos_txt'+ ',Provincias'+ ',Provinciastxt'+ ',Distritostxt'+ ',Parques'+ ',Calles'+ ',Lagos', transparent: 'true', format: 'png' }, { isBaseLayer:false, transitionEffect: 'resize',visibility:true, maxResolution: scale2, minResolution: scale3 } ); . . . .
map.addLayers([ingeomaps_layer0,ingeomaps_layer1, ingeomaps_layer1_1, ingeomaps_layer2 ....]); if (!map.getCenter()) { map.zoomToMaxExtent(); }
Al abrir el mapa en el navegador no me genera genera las imagenes en disco, por lo tanto supongo que el principal problema es la configuración del tilecache.
------------ pr?xima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.osgeo.org/pipermail/spanish/attachments/20130313/59f2302e/attachment.html>
More information about the Spanish
mailing list