[OpenLayers-Dev] Custom Layer
Matt Brailsford
m.brailsford at think-eng.com
Fri Feb 29 03:16:41 EST 2008
Excellent, I'll go look into this and give it a try.
Many thanks
Matt
-----Original Message-----
From: Roald de Wit [mailto:rdewit at users.sourceforge.net]
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
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
--
Roald de Wit
Software Engineer
roald.dewit at lisasoft.com
Commercial Support for Open Source GIS Software
http://lisasoft.com/LISAsoft/SupportedProducts/
More information about the Dev
mailing list