[mapserver-users] Openlayers + Mapserver + Postgis
Juan Jose Morales
morocho1979 at gmail.com
Wed Sep 12 07:52:01 PDT 2012
Hello I am completely new esoty amateur cartography using # OpenLayers and
server # mapserver, mapping is a map of # openstreetmap downloaded and imported
into postgis. locally at # mapserver I can see the map detail, the.
ESPG900913 Projection map was, but when creating the OpenLayers web
map only see
a rose I send the 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,google.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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120912/ae94d441/attachment.htm>
More information about the MapServer-users
mailing list