<div dir="ltr">To use reprojection in openlayers you want to add a proj4js library. <br>Openlayers use proj4js if you insert the js files in your code.. Try download a js-combined file in <a href="http://svn.codehaus.org/mapbuilder/cscs/trunk/proj4js/lib/proj4js-combined.js">http://svn.codehaus.org/mapbuilder/cscs/trunk/proj4js/lib/proj4js-combined.js</a> and put this code in your workspace <script src=......................................<br>
<br><div class="gmail_quote">On Mon, Aug 25, 2008 at 10:56 AM, <span dir="ltr"><<a href="mailto:users-request@openlayers.org">users-request@openlayers.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Send Users mailing list submissions to<br>
<a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:users-request@openlayers.org">users-request@openlayers.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:users-owner@openlayers.org">users-owner@openlayers.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Automatic or dynamic mapsize (Dipl. Inf. Carsten Eider)<br>
2. switch Layers by resolution/zoom (crinolium)<br>
3. WMS and Google Maps - Overlayer Alignement (Salvaro)<br>
4. Re: WMS and Google Maps - Overlayer Alignement<br>
(Christopher Schmidt)<br>
5. Re: WMS and Google Maps - Overlayer Alignement (Salvaro)<br>
6. Re: WMS and Google Maps - Overlayer Alignement<br>
(Christopher Schmidt)<br>
7. Custom Map tiles (Kenny France)<br>
8. Re: WMS and Google Maps - Overlayer Alignement (Salvaro)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 25 Aug 2008 08:27:42 +0200<br>
From: "Dipl. Inf. Carsten Eider" <<a href="mailto:eider@fh-bingen.de">eider@fh-bingen.de</a>><br>
Subject: [OpenLayers-Users] Automatic or dynamic mapsize<br>
To: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Message-ID: <<a href="mailto:48B250DE.8020205@fh-bingen.de">48B250DE.8020205@fh-bingen.de</a>><br>
Content-Type: text/plain; charset="iso-8859-15"<br>
<br>
Hi folks,<br>
<br>
I am looking for an example where<br>
<br>
1. the size of the map depending on the screen-resolution is detected<br>
automatically<br>
2. the map can be resized by dragging the lower right corner<br>
<br>
Thx Carsten<br>
<br>
--<br>
Mit freundlichen Gr??en / Yours faithfully<br>
Carsten Eider<br>
<br>
Dipl. Inf. (FH)<br>
<br>
Kompetenzzentrum f?r Innovative Informationssysteme<br>
<br>
c/o Fachhochschhule Bingen / University of applied sciences Bingen<br>
<br>
Berlinstra?e 109<br>
55411 Bingen<br>
<br>
Tel: +49 (0) 6721 / 409-179<br>
Fax: +49 (0) 6721 / 409-158<br>
email: <a href="mailto:eider@fh-bingen.de">eider@fh-bingen.de</a><br>
Internet: <a href="http://iis.fh-bingen.de" target="_blank">iis.fh-bingen.de</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://openlayers.org/pipermail/users/attachments/20080825/c8f0fad3/attachment-0001.htm" target="_blank">http://openlayers.org/pipermail/users/attachments/20080825/c8f0fad3/attachment-0001.htm</a><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: eider.vcf<br>
Type: text/x-vcard<br>
Size: 330 bytes<br>
Desc: not available<br>
Url : <a href="http://openlayers.org/pipermail/users/attachments/20080825/c8f0fad3/attachment-0001.vcf" target="_blank">http://openlayers.org/pipermail/users/attachments/20080825/c8f0fad3/attachment-0001.vcf</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 25 Aug 2008 04:32:44 -0700 (PDT)<br>
From: crinolium <<a href="mailto:wengerter@gmail.com">wengerter@gmail.com</a>><br>
Subject: [OpenLayers-Users] switch Layers by resolution/zoom<br>
To: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Message-ID: <<a href="mailto:1219663964636-781199.post@n2.nabble.com">1219663964636-781199.post@n2.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
Hello List!<br>
<br>
I have got a map of 4 layers and 4 resolutions. Each layer for one<br>
resolution. But I've got a problem in switching between the layers by<br>
zooming. It works for the resolutions 40, 16 and 8 but not for 4.There the<br>
URL (f. e. <a href="http://localhost/uk500/400/.../" target="_blank">http://localhost/uk500/400/.../</a> .png) isn't correct. It must be<br>
<a href="http://localhost/tk50/400/.../.gif" target="_blank">http://localhost/tk50/400/.../.gif</a>.<br>
<br>
What I have to do to request with the right URL?<br>
<br>
What's wrong with the code? Or is there another, better way to switch<br>
between the layers than with setVisibility?<br>
<br>
I hope, someone can help me.<br>
<br>
<br>
Here is the code:<br>
<br>
function get_url (bounds) {<br>
var res = this.map.getResolution();<br>
var x = bounds.left;<br>
var y = bounds.bottom;<br>
var z = res*100;<br>
<br>
var path = z + "/" + x + "/" + x + y + "." + this.type;<br>
var url = this.url;<br>
if (url instanceof Array) {<br>
url = this.selectUrl(path, url);<br>
}<br>
return url + path;<br>
}<br>
<br>
var options = {resolutions: [40,16,8,4],...};<br>
<br>
var map = new OpenLayers.Map("map", options);<br>
<br>
tms_uk500 = new OpenLayers.Layer.TMS("TMS<br>
UK500","<a href="http://localhost/uk500/4000/" target="_blank">http://localhost/uk500/4000/</a>", 'type':'png', 'getURL':get_url});<br>
tms_tk50_16 = new OpenLayers.Layer.TMS("TMS TK50<br>
16","<a href="http://localhost/tk50/" target="_blank">http://localhost/tk50/</a>", {'type':'gif', 'getURL':get_url});<br>
tms_tk50_8 = new OpenLayers.Layer.TMS("TMS TK50 8","<a href="http://localhost/tk50/" target="_blank">http://localhost/tk50/</a>",<br>
{'type':'gif', 'getURL':get_url});<br>
tms_tk50_4 = new OpenLayers.Layer.TMS("TMS TK50 4","<a href="http://localhost/tk50/" target="_blank">http://localhost/tk50/</a>",<br>
{'type':'gif', 'getURL':get_url});<br>
<br>
map.addLayers([tms_uk500,tms_tk50_16,tms_tk50_8, tms_tk50_4]);<br>
<br>
map.events.register("zoomend", map, function() {<br>
switch(map.getResolution()) {<br>
case 40:<br>
tms_tk50_16.setVisibility(false);<br>
tms_tk50_8.setVisibility(false);<br>
tms_tk50_4.setVisibility(false);<br>
tms_uk500.setVisibility(true);<br>
case 16:<br>
tms_uk500.setVisibility(false);<br>
tms_tk50_8.setVisibility(false);<br>
tms_tk50_4.setVisibility(false);<br>
tms_tk50_16.setVisibility(true);<br>
case 8:<br>
tms_uk500.setVisibility(false);<br>
tms_tk50_16.setVisibility(false);<br>
tms_tk50_4.setVisibility(false);<br>
tms_tk50_8.setVisibility(true);<br>
case 4:<br>
tms_uk500.setVisibility(false);<br>
tms_tk50_16.setVisibility(false);<br>
tms_tk50_8.setVisibility(false);<br>
tms_tk50_4.setVisibility(true);<br>
}});<br>
<br>
--<br>
View this message in context: <a href="http://n2.nabble.com/switch-Layers-by-resolution-zoom-tp781199p781199.html" target="_blank">http://n2.nabble.com/switch-Layers-by-resolution-zoom-tp781199p781199.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 25 Aug 2008 06:47:46 -0700 (PDT)<br>
From: Salvaro <<a href="mailto:asufsc@gmail.com">asufsc@gmail.com</a>><br>
Subject: [OpenLayers-Users] WMS and Google Maps - Overlayer<br>
Alignement<br>
To: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Message-ID: <<a href="mailto:1219672066396-781460.post@n2.nabble.com">1219672066396-781460.post@n2.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
Hey,<br>
<br>
I've a map where I put three layers, WMS, Google Maps and vector Layer with<br>
data.<br>
When I'm using the WMS layer, the vector Layer works well and project the<br>
points in correct position.<br>
But using Google Maps when I change the position of the map, the points in<br>
vector Layer changes their position too (they "walk" up or down), changing<br>
the latitude (the longitude works well). I tested much things to change the<br>
projection, set the projection in layer, in map, display projection, but<br>
nothing works well. Anyone knows what I've to do to correct this?<br>
<br>
Another problem is when I set "Spherical Mercator" true in Google layer.<br>
Don't know why, but the controls doesn't work after this (including after I<br>
set the displayProjection).<br>
<br>
Thanks.<br>
--<br>
View this message in context: <a href="http://n2.nabble.com/WMS-and-Google-Maps---Overlayer-Alignement-tp781460p781460.html" target="_blank">http://n2.nabble.com/WMS-and-Google-Maps---Overlayer-Alignement-tp781460p781460.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Mon, 25 Aug 2008 09:58:55 -0400<br>
From: Christopher Schmidt <<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>><br>
Subject: Re: [OpenLayers-Users] WMS and Google Maps - Overlayer<br>
Alignement<br>
To: Salvaro <<a href="mailto:asufsc@gmail.com">asufsc@gmail.com</a>><br>
Cc: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Message-ID: <<a href="mailto:20080825135855.GA3669@metacarta.com">20080825135855.GA3669@metacarta.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Mon, Aug 25, 2008 at 06:47:46AM -0700, Salvaro wrote:<br>
><br>
> Hey,<br>
><br>
> I've a map where I put three layers, WMS, Google Maps and vector Layer with<br>
> data.<br>
> When I'm using the WMS layer, the vector Layer works well and project the<br>
> points in correct position.<br>
> But using Google Maps when I change the position of the map, the points in<br>
> vector Layer changes their position too (they "walk" up or down), changing<br>
> the latitude (the longitude works well). I tested much things to change the<br>
> projection, set the projection in layer, in map, display projection, but<br>
> nothing works well. Anyone knows what I've to do to correct this?<br>
<br>
The sphericalMercator: true option (which you've described as being<br>
problematic below) is the solution to this. Vectors don't work over<br>
google except in sphericalMercator.<br>
<br>
> Another problem is when I set "Spherical Mercator" true in Google layer.<br>
> Don't know why, but the controls doesn't work after this (including after I<br>
> set the displayProjection).<br>
<br>
Can you include a small example of this problem? I don't kno why this<br>
would be, but this is what you'll need to resolve.<br>
<br>
Regards,<br>
--<br>
Christopher Schmidt<br>
MetaCarta<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Mon, 25 Aug 2008 07:14:37 -0700 (PDT)<br>
From: Salvaro <<a href="mailto:asufsc@gmail.com">asufsc@gmail.com</a>><br>
Subject: Re: [OpenLayers-Users] WMS and Google Maps - Overlayer<br>
Alignement<br>
To: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Message-ID: <<a href="mailto:1219673677230-781508.post@n2.nabble.com">1219673677230-781508.post@n2.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
Sure.<br>
<br>
When I set this option (Spherical Mercator true), I can't move the map (or<br>
use the pan scan).<br>
<br>
I'm using map Options with these configs:<br>
maxResolution: 156543.0339<br>
maxExtent: -20037508., -20037508.34, 20037508.34, 20037508.34<br>
NumZoomLevels: 19<br>
Units: m<br>
Projection: "EPSG:900913"<br>
displayProjection: new Projection("EPSG:4326") (tried without this too)<br>
<br>
And using the layer with simple config (type, isBaseLayer and spherical<br>
mercator).<br>
<br>
Anything wrong?<br>
<br>
Thanks!<br>
Salvaro.<br>
<br>
<br>
<br>
<br>
Christopher Schmidt-2 wrote:<br>
><br>
> On Mon, Aug 25, 2008 at 06:47:46AM -0700, Salvaro wrote:<br>
>><br>
>> Hey,<br>
>><br>
>> I've a map where I put three layers, WMS, Google Maps and vector Layer<br>
>> with<br>
>> data.<br>
>> When I'm using the WMS layer, the vector Layer works well and project the<br>
>> points in correct position.<br>
>> But using Google Maps when I change the position of the map, the points<br>
>> in<br>
>> vector Layer changes their position too (they "walk" up or down),<br>
>> changing<br>
>> the latitude (the longitude works well). I tested much things to change<br>
>> the<br>
>> projection, set the projection in layer, in map, display projection, but<br>
>> nothing works well. Anyone knows what I've to do to correct this?<br>
><br>
> The sphericalMercator: true option (which you've described as being<br>
> problematic below) is the solution to this. Vectors don't work over<br>
> google except in sphericalMercator.<br>
><br>
>> Another problem is when I set "Spherical Mercator" true in Google layer.<br>
>> Don't know why, but the controls doesn't work after this (including after<br>
>> I<br>
>> set the displayProjection).<br>
><br>
> Can you include a small example of this problem? I don't kno why this<br>
> would be, but this is what you'll need to resolve.<br>
><br>
> Regards,<br>
> --<br>
> Christopher Schmidt<br>
> MetaCarta<br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
><br>
><br>
<br>
--<br>
View this message in context: <a href="http://n2.nabble.com/WMS-and-Google-Maps---Overlayer-Alignement-tp781460p781508.html" target="_blank">http://n2.nabble.com/WMS-and-Google-Maps---Overlayer-Alignement-tp781460p781508.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Mon, 25 Aug 2008 10:28:40 -0400<br>
From: Christopher Schmidt <<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>><br>
Subject: Re: [OpenLayers-Users] WMS and Google Maps - Overlayer<br>
Alignement<br>
To: Salvaro <<a href="mailto:asufsc@gmail.com">asufsc@gmail.com</a>><br>
Cc: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Message-ID: <<a href="mailto:20080825142840.GA4608@metacarta.com">20080825142840.GA4608@metacarta.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Mon, Aug 25, 2008 at 07:14:37AM -0700, Salvaro wrote:<br>
><br>
> Sure.<br>
><br>
> When I set this option (Spherical Mercator true), I can't move the map (or<br>
> use the pan scan).<br>
><br>
> I'm using map Options with these configs:<br>
> maxResolution: 156543.0339<br>
> maxExtent: -20037508., -20037508.34, 20037508.34, 20037508.34<br>
> NumZoomLevels: 19<br>
> Units: m<br>
> Projection: "EPSG:900913"<br>
> displayProjection: new Projection("EPSG:4326") (tried without this too)<br>
><br>
> And using the layer with simple config (type, isBaseLayer and spherical<br>
> mercator).<br>
<br>
Since you didn't include Javascript, it's hard to know. :)<br>
<br>
Please publish (on the web) or attach to email an HTML file which<br>
demonstrates the problem. What you've just described is also true of<br>
<a href="http://openlayers.org/dev/examples/spherical-mercator.html" target="_blank">http://openlayers.org/dev/examples/spherical-mercator.html</a> , which works<br>
fine.<br>
<br>
Regards,<br>
--<br>
Christopher Schmidt<br>
MetaCarta<br>
<br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Mon, 25 Aug 2008 16:46:46 +0200<br>
From: "Kenny France" <<a href="mailto:kenny@xarex.com">kenny@xarex.com</a>><br>
Subject: [OpenLayers-Users] Custom Map tiles<br>
To: <<a href="mailto:Users@openlayers.org">Users@openlayers.org</a>><br>
Message-ID: <D80B25D7DD5B4D648F713574B69112F5@xarexathlon><br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
Hi Guys,<br>
<br>
I am currently getting map tiles from a commercial provider, that i don't<br>
wish to say who at this time.<br>
<br>
i can pull single tiles from their map server but the only way i can do this<br>
is using the following...<br>
<br>
<a href="http://www.anotherhost.com/gettile.asp?lat=12.123456" target="_blank">http://www.anotherhost.com/gettile.asp?lat=12.123456</a><br>
<<a href="http://www.anotherhost.com/gettile.asp?lat=12.123456&lng=12.123456&scale=10&height=800&width=800" target="_blank">http://www.anotherhost.com/gettile.asp?lat=12.123456&lng=12.123456&scale=10<br>
&height=800&width=800</a>> &lng=12.123456&scale=10&height=800&width=800<br>
<br>
this will supply me with a with a single tile at a specific zoom level that<br>
is 800X800, the lat and lng supplyed is the center of the tile<br>
<br>
My question is.......<br>
<br>
is there anyway i can intergrate this tile with openlayers?<br>
or is there anyone that fancies a challange that can help me with this, i am<br>
prepared to pay if someone can help me<br>
<br>
Thanks<br>
<br>
K-<br>
<br>
<br>
<br>
_____<br>
<br>
I am using the free version of SPAMfighter for private users.<br>
It has removed 37698 spam emails to date.<br>
Paying users do not have this message in their emails.<br>
Try SPAMfighter <<a href="http://www.spamfighter.com/len" target="_blank">http://www.spamfighter.com/len</a>> for free now!<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://openlayers.org/pipermail/users/attachments/20080825/d71b9b9d/attachment-0001.htm" target="_blank">http://openlayers.org/pipermail/users/attachments/20080825/d71b9b9d/attachment-0001.htm</a><br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Mon, 25 Aug 2008 07:56:17 -0700 (PDT)<br>
From: Salvaro <<a href="mailto:asufsc@gmail.com">asufsc@gmail.com</a>><br>
Subject: Re: [OpenLayers-Users] WMS and Google Maps - Overlayer<br>
Alignement<br>
To: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Message-ID: <<a href="mailto:1219676177113-781654.post@n2.nabble.com">1219676177113-781654.post@n2.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
Right. I didn't post the JS because I'm programming direct in Java using<br>
gwt+openlayers.<br>
I'm trying to get the generated JS code (and check if it's correct) and<br>
after will post here.<br>
<br>
Thanks mate.<br>
<br>
<br>
Christopher Schmidt-2 wrote:<br>
><br>
> On Mon, Aug 25, 2008 at 07:14:37AM -0700, Salvaro wrote:<br>
>><br>
>> Sure.<br>
>><br>
>> When I set this option (Spherical Mercator true), I can't move the map<br>
>> (or<br>
>> use the pan scan).<br>
>><br>
>> I'm using map Options with these configs:<br>
>> maxResolution: 156543.0339<br>
>> maxExtent: -20037508., -20037508.34, 20037508.34, 20037508.34<br>
>> NumZoomLevels: 19<br>
>> Units: m<br>
>> Projection: "EPSG:900913"<br>
>> displayProjection: new Projection("EPSG:4326") (tried without this too)<br>
>><br>
>> And using the layer with simple config (type, isBaseLayer and spherical<br>
>> mercator).<br>
><br>
> Since you didn't include Javascript, it's hard to know. :)<br>
><br>
> Please publish (on the web) or attach to email an HTML file which<br>
> demonstrates the problem. What you've just described is also true of<br>
> <a href="http://openlayers.org/dev/examples/spherical-mercator.html" target="_blank">http://openlayers.org/dev/examples/spherical-mercator.html</a> , which works<br>
> fine.<br>
><br>
> Regards,<br>
> --<br>
> Christopher Schmidt<br>
> MetaCarta<br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
><br>
><br>
<br>
--<br>
View this message in context: <a href="http://n2.nabble.com/WMS-and-Google-Maps---Overlayer-Alignement-tp781460p781654.html" target="_blank">http://n2.nabble.com/WMS-and-Google-Maps---Overlayer-Alignement-tp781460p781654.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br>
<br>
End of Users Digest, Vol 23, Issue 62<br>
*************************************<br>
</blockquote></div><br></div>