[mapserver-users] Openlayers + Mapserver + Postgis

Barend Köbben kobben at itc.nl
Thu Sep 13 01:16:25 PDT 2012


>
>Hi Juan
>
>My guess is that the WMS you created has its maximum extent set
>incorrectly. Check by using a WMS GetCapabilities call to it and look at
>the <LatLonBoundingBox> and <BoundingBox> objects of your <LAYER>.
>
>If you have that service "say" it has maximum extents of the whole world,
>but you data is only one city, the last line of your script:
>  mapa.zoomToMaxExtent();
>zooms out to the whole world, so you data is there, but an invisibly small
>dot somewhere n your map...
>
>Barend
>
>--
>Barend Köbben
>Senior Lecturer, ITC - University of Twente,
>Faculty of Geo-Information Science and Earth Observation
>PO Box 217, 7500AE Enschede (The Netherlands)
>+31-(0)53 4874 253
>
>
>
>
>
>On 12-09-12 16:52, "Juan Jose Morales" <morocho1979 at gmail.com> wrote:
>
>>
>>
>>
>>Hello  I am
>>completely new esoty amateurcartography using #
>>OpenLayers and server #
>>mapserver, mapping is
>>a map of #
>>openstreetmap downloaded andimported into postgis.locally at #
>>mapserver I can see the mapdetail, the.
>>ESPG900913 Projection mapwas, but
>>when creating the OpenLayersweb map onlysee a rose I sendthe code to tell
>>me
>>that esoty doing wrong
>>
>><!DOCTYPE html>
>><html>
>><head>
>>    <meta charset="UTF-8">
>>    <title>Servidor de Mapas</title>
>><script src="OpenLayers.js"></script>
>>
>>    <style type="text/css">
>>        #divMapa {
>>            width: 100%;
>>            height: 515px;
>>            border: solid 2px #808080;
>>        }
>>    </style>
>>
>><script type="text/javascript">
>>
>>        // Definimos las variables globales 'mapa' y 'capa'
>>        var mapa, capa;
>>
>>        // Definimos una función que arranque al cargar la página
>>        window.onload= function() {
>>            // Creamos el mapa
>>            var mapa = new OpenLayers.Map("divMapa");
>>
>>            // Creamos una capa
>>            var capa = new OpenLayers.Layer.WMS(
>>                "Metacarta",
>>
>>"http://172.16.4.6/cgi-bin/mapserv?map=/opt/mapserver-utils/osm-outlined,
>>g
>>oogle.map",
>>
>>                {layers: 'basic'}
>>            );
>>
>>            // Añadimos la capa al mapa
>>            mapa.addLayer(capa);
>>
>>            // Fijamos centro y zoom
>>            mapa.zoomToMaxExtent();
>>        }
>>
>></script>
>></head>
>><body>
>>    <div id="divMapa"></div>
>></body>
>></html>
>>
>>thx for the help
>
>


Faculty of Geo-Information Science and Earth Observation (ITC)
University of Twente
Chamber of Commerce: 501305360000

E-mail disclaimer
The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission.


More information about the mapserver-users mailing list