[OpenLayers-Users] Openlayers 2.5 WFS request to MGOS spherical
mercator
mcarsel
carsella11 at msn.com
Tue Sep 18 13:46:16 EDT 2007
var options = {
projection: "EPSG:900913",
units: "m",
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
20037508, 20037508.34),
controls: [new OpenLayers.Control.MouseDefaults()]
};
//Initiate Map
map = new OpenLayers.Map( 'map' ,options);
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
// Add Google Maps
var googleSatellite = new OpenLayers.Layer.Google( "Google
Satellite" ,
{type: G_SATELLITE_MAP, 'maxZoomLevel':19,
sphericalmercator:true} );
var googleHybrid = new OpenLayers.Layer.Google( "Google Hybrid" ,
{type: G_HYBRID_MAP, 'maxZoomLevel':19,
sphericalmercator:true} );
var googleNormal = new OpenLayers.Layer.Google( "Google Normal" ,
{type: G_NORMAL_MAP, 'maxZoomLevel':19,
sphericalmercator:true} );
map.addLayers([googleNormal,googleSatellite,googleHybrid]);
//Add Yahoo Maps
var yahooNormal = new OpenLayers.Layer.Yahoo( "Yahoo Normal" ,
{type: YAHOO_MAP_REG, 'maxZoomLevel':17,
sphericalmercator:true});
var yahooSatellite = new OpenLayers.Layer.Yahoo( "Yahoo Satellite" ,
{type: YAHOO_MAP_SAT, 'maxZoomLevel':17,
sphericalmercator:true} );
var yahooHybrid = new OpenLayers.Layer.Yahoo( "Yahoo Hybrid" ,
{type: YAHOO_MAP_HYB, 'maxZoomLevel':17,
sphericalmercator:true} );
map.addLayers([yahooNormal,yahooSatellite,yahooHybrid]);
// Add Coords spmerc
spLayer = new OpenLayers.Layer.WFS( "Coords spmerc",
"http://server/mapguide/mapagent/mapagent.fcgi?",
{ service:'wfs', request:'getfeature', maxfeatures:200,
version:'1.0.0', typename:'ns22238581:coords_spmerc'},
{ isBaseLayer:false, reproject:false, maxZoomLevel:26,
extractAttributes: true, displayInLayerSwitcher: true});
map.addLayer(spLayer);
--End of code--
The URL going to the server looks like this:
http://server/mapguide/mapagent/mapagent.fcgi?service=wfs&request=getfeature&maxfeatures=200&version=1.0.0&typename=ns22238581%3Acoords_spmerc&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=-105.20696640014648,39.63522869943983,-104.84304428100586,39.8337718863171
If I remove the BBOX parameter and submit in a browser, the proper response
is returned.
Christopher Schmidt-4 wrote:
>
> On Tue, Sep 18, 2007 at 08:42:47AM -0700, mcarsel wrote:
>>
>> I set up an MGOS WFS server that can serve spherical mercator data,
>> however I
>> can't get it displayed in Openlayers because Openlayers is tacking on
>> BBOX
>> values in lat/lon on the WFS request. Verified this using firebug. I'm
>> using MGOS 1.2 RC1 and Openlayers 2.5 RC1. Anyone know how i can get
>> around
>> this?
>
> Can you link to an HTML page or provide the content in some way? This
> seems quite odd to me.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://www.nabble.com/Openlayers-2.5-WFS-request-to-MGOS-spherical-mercator-tf4475142.html#a12762369
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list