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