Hi guys, I can't seem to figure this out. When I intercept the values sent through to my pseudo WMS service, the coordinates in the BBOX property seem realy odd.
I'm getting values like -270,270,-270,270. Do I have to do some conversion on these? Or am I doing something wrong? Many thanks Matt -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Brailsford Sent: 29 February 2008 15:47 To: [email protected] Subject: Re: [OpenLayers-Dev] Custom Layer Ok, I'm trying to get this working, and am almost there. My javascript is currently as follows: function init() { var map = new OpenLayers.Map('map', {projection: "WGS84"}); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "/source/MaporamaHandler.ashx", {singleTile: true} ); map.addLayer(wms); map.zoomToMaxExtent(); } In MaporamaHandler.ashx, I grab BBOX in the querystring and split it on the comma. This currently creates 2 tiles (which should be a whole world view) one with a BBOX of -180,-90,0,90 and the other 0,-90,180,90 When I pass these value through to the 3rd party webservice it's not bringing back the right positions. Do I need to convert these into another format? Many thanks Matt -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Brailsford Sent: 29 February 2008 08:17 To: [email protected] Subject: Re: [OpenLayers-Dev] Custom Layer Excellent, I'll go look into this and give it a try. Many thanks Matt -----Original Message----- From: Roald de Wit [mailto:[EMAIL PROTECTED] Sent: 28 February 2008 22:45 To: Matt Brailsford Subject: Re: [OpenLayers-Dev] Custom Layer Hey Matt, You might find that Layer.WMS is sufficient for you. I don't know what your parameters look like, but you can quite easily build a request URL doing something like this: var params = { foo: bar, ping: pong }; var layer = new OpenLayers.Layer.WMS( "Custom Layer", "http://url.to.service/", params, {singleTile: true} ); This will automatically request your web service. You don't need to give it a lat/long yourself as this will be done for you! Btw: I assumed that your layer is a baseLayer. If it isn't and the projection of your layer is different from the baseLayer one, you'll need to do some more work. Good luck! Roald On Thu, 2008-02-28 at 16:48 +0000, Matt Brailsford wrote: > Hi Guys > > > > I’m working on a project where I need to offer a google style map > interface to some maps we are being provided by a 3rd party. The 3rd > party basically has some webservices which I can query for a map given > a number of criteria (one being a lat/lng boundary). > > > > My idea is to create a wrapper around the webservice which would allow > me to request an image via a defined url with querystring. From > looking through the code, I believe I would need write a custom Layer > to do use this as it is not a standard protocol. > > > > Could anyone offer my some starting points on writing a custom layer > for this? The image being returned would be an image for the whole map > are (not tiled). Could I just extend the OpenLayers. Layer.Image class > and override the moveTo and getUrl methods to return the dynamic > image? > > > > Could you also let me know how I would integrate this? Could I just > create a js file for my custom class and import this on the page and > import the OpenLayers js file remotely? > > > > And finaly, I tend to use jQuery for my javascript development > purposes, will using OpenLayers cause any conflicts what with it being > based on prototype? > > > > Many thanks > > > > Matt > > > _______________________________________________ > Dev mailing list > [email protected] > http://openlayers.org/mailman/listinfo/dev -- Roald de Wit Software Engineer [EMAIL PROTECTED] Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev
