On 12/13/2010 10:36 PM, Daniel Carvalho wrote: > I know there is a OpenLayers module for drupal but I'm not using it. > > I'm using the usual openlayers library, as if I was using just html. > Then I tried to embed it in drupal.
Like this:
$(document).ready(function () {
map = new OpenLayers.Map( 'map' );
url =
"/cgi-bin/mapserv?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=mundo&map=/www/mapserver/mundo_110madmin.map&mode=map"
layer = new OpenLayers.Layer.Vector("OpenLayers", {
strategies: [new OpenLayers.Strategy.BBOX()],
isBaseLayer: true,
protocol: new OpenLayers.Protocol.WFS({
url: url,
featureType: "mundo",
featureNS: "http://mapserver.gis.umn.edu/mapserver"
})
});
map.addLayer(layer);
map.zoomToExtent(new OpenLayers.Bounds(-100.000000, -40.000000,
100.000000, 40))
});
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
