From kgeusebroek at xebia.com Mon Feb 1 02:39:43 2010 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: References: Message-ID: Hi Eric, It's been a while since I've had time to spent on this. If I remember correctly there where at first some problems with adding images in the onload so I implemented a chache array to add the images and draw them from there into the canvas. For that to work I needed to load all the tiles when panning etc. In my local setting all works pretty well but since we are using a proprietary grid format I needed to override some of the grid functions. It might be because I load the tiles from localhost that it looks like its working ok on my side. Or it might be because when the canvas is resized it clears itself, and that;s what is making it look like disappearing. I haven't been able to investigate further myself. But the main thing I wanted to do next is see if I can make it work without the caching array and redrawing all but only redraw the new loaded tiles. Need to be aware of the memory consumption of the canvas and the loaded images though. Hope this helps. If you need more information. I can have a look at some of this later this week maybe. Any help is appreciated though. I still think it will be a valuable extra to the current rendering types. Cheers Kris -----Original Message----- From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] Sent: Sunday, January 31, 2010 9:51 AM To: Kris Geusebroek Cc: OpenLayers Users Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers On Monday, November 23, 2009, Kris Geusebroek wrote: > Hi Eric, > > I haven't measured the memory use yet. But I'm implementing the > tilecache layer with a single canvas, all images are loaded through a > javascript Image object and when all are loaded they are 'drawn' in the > single canvas. This way the number of dom elements is significantly > lower. Hi Kris. I've taken a look at your Canvas work again. One can see in the tilecacheCanvas example that, when moving the map, it disappears and then comes back (when all the new tiles have been loaded I guess). Do you think there are ways to solve that? Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From subhajeetsur at gmail.com Mon Feb 1 05:45:13 2010 From: subhajeetsur at gmail.com (subhajeet sur) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] WMS error with openlayers In-Reply-To: References: Message-ID: On 1/31/10, Pierre Giraud wrote: > On Sun, Jan 31, 2010 at 10:40 AM, subhajeet sur > wrote: >> Dear all, >> >> I'm new to openlayers and mapserver. I'm trying to run a particular >> mapfile via mapserver. I've encountered the following errors: >> >> 1. On using OpenLayers.Layers.MapServer: >> Base layer isn't gettting displayed when the overlays are selected. > > transparent is a parameter, not an option. > new OpenLayers.Layers.MapServer(name, url, parameters, options); > >> 2. On using OpenLayers.Layers.WMS: >> Following error message is generated inspite of defining METADATA >> msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in >> the LAYERS parameter. > > The parameter is "layers" (plural) not "layer". > > Regards, > Pierre > >> >> Please find the attached mapfile and the html template. >> Could anyone please help me out. >> >> Thanks in advance. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- > Pierre GIRAUD > G?omaticien, Analyste > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 93 > Mail : pierre.giraud@camptocamp.com > http://www.camptocamp.com > Hi Pierre, Thanks for your reply. Your suggestions were duly noted and the required changes were made. However, the problem still persists in case of WMS. 1. In case of Layer.WMS: I have some queries regarding the projection of the map(which i believe is epsg:4326): Is it necessary to define PROJECTION property within each LAYER explicitly, even if the same has been defined in METADATA in the WEB section of the mapfile 2. In case of Layer.MapServer : Base Layer is visible but as soon as any of the overlays are activated, the overlays completely overlap the base layer thereby making the base not visible. The truth of the matter is that these mapfiles are examples from Bill Kropla's book and have been written for mapserver. I just wanted to modify them and try using openlayers with the same. Attached are the modified files I shall be grateful if you could provide a pointer or two in this regard. Thanks Subhajeet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100201/56c1fffb/mapserverexp.html -------------- next part -------------- A non-text attachment was scrubbed... Name: third.map Type: application/octet-stream Size: 11854 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100201/56c1fffb/third.obj From darrenkarstens at googlemail.com Mon Feb 1 07:48:48 2010 From: darrenkarstens at googlemail.com (Darren Karstens) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Changing a points location when drawing a polygon Message-ID: <1265028528143-4494150.post@n2.nabble.com> Hi, I need to change the location of a point on a polygon when it is created. I tried adding a point callback: drawFeature.handler.callbacks.point = function(point) { return pointCallback(point); } then I tried changing the location of the point in the callback: function pointCallback(point) { point.x += 10; return point; } This didn't work. The point was created at the origional location and then the cursor was moved to the new location (x+10). Does anyone know a way that I can intercept the creation of this new node to change its location, or get access to the new node after its created to change its position? -- View this message in context: http://n2.nabble.com/Changing-a-points-location-when-drawing-a-polygon-tp4494150p4494150.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From me at dylanparry.com Mon Feb 1 07:56:08 2010 From: me at dylanparry.com (Dylan Parry) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] What layer type to use, and how to use it? In-Reply-To: <17356447.01265028499081.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> Message-ID: <4562882.21265028966381.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> Hi, I?m working on a project that has an existing tile server that generates and serves map tiles of the UK based on the British National Grid projection (EPSG:27700). The tiles are based on the following principles: Tile x=0, y=0 begins at the UK origin, ie. 0,0 at the bottom-left of the map. The server accepts parameters for x, y and resolution. The coordinates for each tile can be calculated by by applying the following calculations: // Min X Coordinate x1 = x > 0 ? x * width * resolution : 0; // Max X Coordinate x2 = x * width * resolution + (width * resolution); // Min Y Coorinate y1 = y > 0 ? y * height * resolution : 0; // Max Y Coordinate y2 = y * height * resolution + (height * resolution); The X and Y values are always greater than or equal to zero. Now what I?m unsure of is what sort of layer I should use in order to implement a map viewer for this tile server. Any ideas? If so, how would I go about setting it up? My current experiments have all resulted in lots of maps of the sea when they should have been of land!! I know that the tile server is working correctly as it already works in other contexts. >From what I?ve seen, the XYZ layer numbers tiles from the top-left, which is obviously different to how the tile server I?m using does it, so I?ve ruled that layer type out already. Am I going to have to define something from scratch or does another existing type already fit the bill? Cheers, -- Dylan Parry From luis.a.de.sousa at gmail.com Mon Feb 1 10:38:45 2010 From: luis.a.de.sousa at gmail.com (=?ISO-8859-1?Q?Lu=EDs_de_Sousa?=) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Request with wrong column name In-Reply-To: References: <831026.83789.qm@web37104.mail.mud.yahoo.com> Message-ID: Hello everyone, I hit the GeoServer list once more, as it was sounding again as some issue between server and database. The folk there found out what as wrong, the field's name is case sensitive. Here's the GeoServer thread for future reference: http://old.nabble.com/Inserting-geometries-into-Oracle-database-td27309510.html Thanks to all for the help, Lu?s 2010/1/27 Lu?s de Sousa : > Hi Bart, > > Thanks for the tip. This way OpenLayers seems to produce the request > correctly: > > > ? > ? > ??? 186758.05565625,285364.15754687 > ?? > ? > > > But in the database I'm still getting a null geometry. Here's the result > from Geoserver: > > > ? > > > ? > > > There's indeed a new row at the database with the key 18315724, but the > geometry column is null. What's wrong? > > Any ideas? Thank you, > > Lu?s > > > 2010/1/27 Bart van den Eijnden >> >> Hi, >> use?geometry_column instead of geometryName. >> Bart >> >> > > From sumith.paul at gmail.com Tue Feb 2 01:26:17 2010 From: sumith.paul at gmail.com (runningcodez) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] zoombox displacement Message-ID: <1265091977292-4499258.post@n2.nabble.com> Hi list, I am stuck with an issue of my zoombox control where the zoom box is displaced by miles from the cursor..I came to know that it has somehing to do with the styling..but couldnt get a right direction...could anyone advise me on this? regards Sumith -- View this message in context: http://n2.nabble.com/zoombox-displacement-tp4499258p4499258.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Tue Feb 2 01:47:43 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] zoombox displacement In-Reply-To: <1265091977292-4499258.post@n2.nabble.com> References: <1265091977292-4499258.post@n2.nabble.com> Message-ID: On Tuesday, February 2, 2010, runningcodez wrote: > > Hi list, > > I am stuck with an issue of my zoombox control where the zoom box is > displaced by miles from the cursor..I came to know that it has somehing to > do with the styling..but couldnt get a right direction...could anyone advise > me on this? Hi. I'd suggest pruning your CSS, in a step-by-step way, to see where the problem is. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From vincent.gulinao at gmail.com Tue Feb 2 02:07:18 2010 From: vincent.gulinao at gmail.com (Vincent Gulinao) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Creating custom layer Message-ID: I'm a total newbie on Openlayers, and map dev in general. I need to develop custom layer defining map political boundaries just like this: http://www.google.com/intl/en_us/2008election/. I'd appreciate pointers, code sample and docs links, learning path suggestions, etc. that you may give. TIA. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100202/f47d37cf/attachment.html From frederic.junod at camptocamp.com Tue Feb 2 04:32:53 2010 From: frederic.junod at camptocamp.com (Frederic Junod) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] onImageLoadError not triggered when a tile is missing In-Reply-To: <1264793381028-4481931.post@n2.nabble.com> References: <1264793381028-4481931.post@n2.nabble.com> Message-ID: <21c3d1f41002020132q659aab18n939336075b4e75ee@mail.gmail.com> Hello, It's a know problem with chrome, see http://trac.openlayers.org/ticket/2371 fredj On Fri, Jan 29, 2010 at 8:29 PM, Etides wrote: > > Hi, > > ? ?I have overwrited the OpenLayers.Util.onImageLoadError function to > switch the src of the tiles that does not exist in the Tilecache directory > of a layer. When the tiles has not been created in the cache, we switch the > src of the image to a "missing.png" tile that contain nothing... this way we > can create in the cache only the tiles that contain features and save a lot > of disk space... > > This is working well with Internet Explorer but with Google Chrome we are > facing a problem... Some tiles that do not exist in the Tilecache cache > directory are not replaced with our ?missing.png? tile and a red cross is > showed instead. After investigation it seems that the problem come from the > OpenLayers.Util.onImageLoadError function that are not triggered when Open > Layers is trying to show the tiles that do not exist? Worst, this problem is > intermittent because sometime, some of the missing tiles are correctly > replaced with our "missing.png". > > Someone have an idea why OpenLayers.Util.onImageLoadError is not triggered > with Google Chrome? Anyone have experienced the same problem? > > Thanks a lot. > > Etienne > -- > View this message in context: http://n2.nabble.com/onImageLoadError-not-triggered-when-a-tile-is-missing-tp4481931p4481931.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Fr?d?ric Junod Camptocamp SA From pelle at alma.nu Tue Feb 2 07:01:49 2010 From: pelle at alma.nu (=?iso-8859-1?Q?Per-Olof_Nor=E9n?=) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Transition effects when altering parameters/options Message-ID: Hi all, We?re currently using OL to view meterological data through WMS-T (ie supplying TIME and DIM_FORECAST_TIME parameters to WMSLayer). Standard OL tiled layer apart from this feature. To accomplish navigation in TIME we have created a control that is used to provide a visual interface for the descrete timestemps. When stepping in time, Layer.mergeNewParams is called do set the current time viewed. All this is working fine, apart from the fact that this is run in fullscreen which gives quite a number to be loaded when "zooming in time", giiving the effect of no snappy switching as tiles are loaded with visible "holes" where tiles are not loaded. I Have been looking at transition effects and how its done. Im looking for suggestions to how to implement backBufferTiles for parameter merging Any suggestions? regards, Per-Olof From ahocevar at opengeo.org Tue Feb 2 08:39:07 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Problems with SLD_BODY In-Reply-To: References: <011701ca8feb$801f9380$3998a8c0@geopinar.pinar.geocuba.cu> <5b021dd1001080314hfb22fd7y4dffa049f868e5f9@mail.gmail.com> Message-ID: <4B682AFB.40009@opengeo.org> Florent Gravin wrote: > Layer.WMS.Post gives me very strange behavior on my layer (with FireFox) : > - first the layer is white > - then layer appears > - when i move the map, everything around the map is moving like an > earthquake... > It seems you changed the unsupportedBrowsers property? See http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS/Post-js.html#OpenLayers.Layer.WMS.Post.unsupportedBrowsers This property should not be touched, unless you know what you are doing. Browsers that are in this array will still work with Layer.WMS.Post, but GET will be used to fetch the tiles, using image tiles (instead of IFrame tiles). By default, in Firefox the same good old GET tiles will be used as with a plain Layer.WMS, and it will work, because Firefox has no problem with long urls. > i can't use it =) > Yes you can :-). Regards, Andreas. > i will use sld param instead, but it's a pity > > thks > > > ----- Original Message ----- > From: "Andreas Hocevar" > To: "fsalasGeocuba" ; > Sent: Friday, January 08, 2010 12:14 PM > Subject: Re: [OpenLayers-Users] Problems with SLD_BODY > > > you can use Layer.WMS.Post instead of Layer.WMS, and things should be fine. > > Regards, > Andreas. > > 2010/1/7, fsalasGeocuba : > >> Hi, >> >> I?m trying to apply one new style to point layer using for that the >> property >> SLD_BODY. >> >> For do this operation I do with my own rules one StyledLayerDescriptor but >> here is the problem, when hay try to put >> >> more of six rules, no drawing me the layer. My questions is. >> >> There are rulers?s limits for SLD_BODY? >> >> Example: >> >> function Change_Styles() >> >> { >> >> map.layers[0].params.SLD_BODY = '> version="1.0.0">topp:sennalUserSelection> xmlns:gml="http://www.opengis.net/gml">tipo_senalFVciega_luminicaL> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" >> xlink:href="file:/D:/AppServ/www/SIGANAV/images/FFENFL.png"/>image/gif1.020.00.0> xmlns:gml="http://www.opengis.net/gml">tipo_senalFAciega_luminicaL> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" >> xlink:href="file:/D:/AppServ/www/SIGANAV/images/FFENFL.png"/>image/gif1.020.00.0> xmlns:gml="http://www.opengis.net/gml">tipo_senalENFciega_luminicaL> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" >> xlink:href="file:/D:/AppServ/www/SIGANAV/images/FFENFL.png"/>image/gif1.020.00.0> xmlns:gml="http://www.opengis.net/gml">tipo_senalENFciega_luminicaC> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" >> xlink:href="file:/D:/AppServ/www/SIGANAV/images/ENFC.png"/>image/gif1.020.00.0> xmlns:gml="http://www.opengis.net/gml">tipo_senalBZciega_luminicaLcolorVerde> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" >> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZL-V.png"/>image/gif1.020.00.0> xmlns:gml="http://www.opengis.net/gml">tipo_senalBZciega_luminicaL >> colorRoja> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" >> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZL-R.png"/>image/gif1.020.00.0> xmlns:gml="http://www.opengis.net/gml">tipo_senalBZciega_luminicaLcolorAmarilla> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" >> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZL-A.png"/>image/gif1.020.00.0'; >> //map.layers[0].params.SLD_BODY = '> version="1.0.0">topp:sennalUserSelection> xmlns:gml="http://www.opengis.net/gml">tipo_senalBZciega_luminicaCcolorAmarilla> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" >> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZC-A.png"/>image/gif1.020.00.0'; >> >> map.layers[0].redraw(); >> >> } >> >> >> >> >> >> Greetings Salas >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From Gerben.Tiemens at grontmij.nl Tue Feb 2 10:22:09 2010 From: Gerben.Tiemens at grontmij.nl (Tiemens, Gerben) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] What layer type to use, and how to use it? In-Reply-To: <4562882.21265028966381.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> References: <17356447.01265028499081.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> <4562882.21265028966381.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> Message-ID: <6B6B9B2EDF037F4CBE1627DE6BFEA4AF264D08D1@EVS10.grontmij.net> Maybe this example will help you implement it. (look at the function for the tiles of mapnik openstreetmap.) http://www.openlayers.org/dev/examples/sundials-spherical-mercator.html Greets Gerben -----Oorspronkelijk bericht----- Van: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Namens Dylan Parry Verzonden: Monday, February 01, 2010 1:56 PM Aan: users@openlayers.org Onderwerp: [OpenLayers-Users] What layer type to use, and how to use it? Hi, I'm working on a project that has an existing tile server that generates and serves map tiles of the UK based on the British National Grid projection (EPSG:27700). The tiles are based on the following principles: Tile x=0, y=0 begins at the UK origin, ie. 0,0 at the bottom-left of the map. The server accepts parameters for x, y and resolution. The coordinates for each tile can be calculated by by applying the following calculations: // Min X Coordinate x1 = x > 0 ? x * width * resolution : 0; // Max X Coordinate x2 = x * width * resolution + (width * resolution); // Min Y Coorinate y1 = y > 0 ? y * height * resolution : 0; // Max Y Coordinate y2 = y * height * resolution + (height * resolution); The X and Y values are always greater than or equal to zero. Now what I'm unsure of is what sort of layer I should use in order to implement a map viewer for this tile server. Any ideas? If so, how would I go about setting it up? My current experiments have all resulted in lots of maps of the sea when they should have been of land!! I know that the tile server is working correctly as it already works in other contexts. >From what I've seen, the XYZ layer numbers tiles from the top-left, which is obviously different to how the tile server I'm using does it, so I've ruled that layer type out already. Am I going to have to define something from scratch or does another existing type already fit the bill? Cheers, -- Dylan Parry _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users << Please read our E-mail Disclaimer at: Emaildisclaimer.Grontmij.com >> From jbloc1878 at googlemail.com Tue Feb 2 12:52:11 2010 From: jbloc1878 at googlemail.com (jbloc1878@googlemail.com) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Maxextent, resolution and zoom issue Message-ID: <78A787E1-987D-4AF5-83D6-F6F6BCD3A193@googlemail.com> Hi, i have been struggling with this problem for some time now. Basically I am trying to display two layers. 50k and 250K of the uk. Can anyone explain further what resolution, maxextent and zoom values I should have to display these layers correctly? My layers cover the whole of the UK. I have tried quite a few different values however I cannot make sense of how this works. The example I am referring to is below. Thanks for any help in advance Create an options object that holds a limited set of map resolutions and a maximum bounding extent to show the map. A new OS OpenSpace map object is created by passing in our 'map' HTML div element id and the map options. 1. var options = {resolutions: [10, 5], 2. maxExtent: new OpenSpace.MapBounds(400000, 100000, 450000, 150000) ); 3. osMap = new OpenSpace.Map('map', options); We now set the centre of the map and set the initial map zoom level to 1 (corresponding to the second defined layer in the resolutions array). 1. osMap osMap.setCenter(new OpenSpace.MapPoint(400000,100000), 1); Cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100202/ea4ea0b1/attachment.html From paweluz at o2.pl Tue Feb 2 13:58:07 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Style of line which geometry is being changed In-Reply-To: <1264690391859-4473704.post@n2.nabble.com> References: <1264621741496-4469289.post@n2.nabble.com> <1264690391859-4473704.post@n2.nabble.com> Message-ID: <1265137087973-4502826.post@n2.nabble.com> Hi Max Sorry I did not writ sooner but unfortunately I was sick... Today I was trying your solution but I got error "Invalid label " like this: Error: invalid label Source code: drawControls["modify_wfs_layer"].initialize: function(zielona_wfs) { ^ My code looks like this: drawControls = { chooseobject: new OpenLayers.Control.SelectFeature( zielona_wfs, { onSelect: onFeatureSelect } ), modify_wfs_layer: new OpenLayers.Control.ModifyFeature(zielona_wfs) , point: new OpenLayers.Control.DrawFeature( vector, OpenLayers.Handler.Point ), line: new OpenLayers.Control.DrawFeature( vector, OpenLayers.Handler.Path ), add_object:new OpenLayers.Control.DrawFeature( zielona_wfs, OpenLayers.Handler.Path ), polygon: new OpenLayers.Control.DrawFeature( vector, OpenLayers.Handler.Polygon ) }; drawControls["modify_wfs_layer"].initialise: function(zielona_wfs) { this.layer = zielona_wfs; this.vertices = []; this.virtualVertices = []; this.virtualStyle = OpenLayers.Util.extend({}, this.layer.style || this.layer.styleMap.createSymbolizer()); this.virtualStyle.fillOpacity = 1; this.virtualStyle.strokeOpacity = 1; this.deleteCodes = [46, 68]; this.mode = OpenLayers.Control.ModifyFeature.RESHAPE; OpenLayers.Control.prototype.initialize.apply(this, []); if(!(this.deleteCodes instanceof Array)) { this.deleteCodes = [this.deleteCodes]; } drawControls["add_object"].featureAdded = function(feature) { feature.layer.eraseFeatures([feature]); // dodawanie obiektu do bazy danych feature.geometry = new OpenLayers.Geometry.MultiLineString( feature.geometry ); selectedfeature=feature; feature.state = OpenLayers.State.INSERT; feature.layer.drawFeature(feature); } I honesly have now idea how to make i right and what is wrong. I do not even if I made right changes in the code you gave me. I did not use any options as you can see... Can you look on my code and tell me or give me a clue what is wrong... Thanks, Poul -- View this message in context: http://n2.nabble.com/Style-of-line-which-geometry-is-being-changed-tp4469289p4502826.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From wendell at enflight.com Tue Feb 2 15:38:03 2010 From: wendell at enflight.com (Wendell Turner) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] right mouse drag? Message-ID: <20100202203803.GA30551@cloud3.rho.net> Is there an OpenLayers way to capture right mouse drag events? map.div.oncontextmenu works fine for right mouse clicks, and OpenLayers.Handler.Drag seems to only work on the left mouse button. Is there some way to combine those? Thanks, Wendell From me at dylanparry.com Tue Feb 2 16:45:25 2010 From: me at dylanparry.com (Dylan Parry) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] What layer type to use, and how to use it? In-Reply-To: <6B6B9B2EDF037F4CBE1627DE6BFEA4AF264D08D1@EVS10.grontmij.net> Message-ID: <33044264.561265147124219.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> ----- "Gerben Tiemens" wrote: > Maybe this example will help you implement it. (look at the function > for the tiles of mapnik openstreetmap.) > > http://www.openlayers.org/dev/examples/sundials-spherical-mercator.html Ah yes, I think that?s exactly what I?m looking for. Thanks very much! -- Dylan Parry From arnd.wippermann at web.de Tue Feb 2 17:00:46 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Maxextent, resolution and zoom issue In-Reply-To: <78A787E1-987D-4AF5-83D6-F6F6BCD3A193@googlemail.com> Message-ID: Hi, that's from an OS OpenSpace map for the whole UK: osMap.getMaxResolution() : 2500 osMap.getExtent() for zoomLevel 0 (whole UK) : left-bottom=(-611483,-135514) right-top=(1888517,1364486) osMap.resolutions : [2500,1000,500,200,100,50,25,10,5,2,1] The example you refer to, seems to display only a small area of the UK, perhaps Southampton. Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von jbloc1878@googlemail.com Gesendet: Dienstag, 2. Februar 2010 18:52 An: users@openlayers.org Betreff: [OpenLayers-Users] Maxextent, resolution and zoom issue Hi, i have been struggling with this problem for some time now. Basically I am trying to display two layers. 50k and 250K of the uk. Can anyone explain further what resolution, maxextent and zoom values I should have to display these layers correctly? My layers cover the whole of the UK. I have tried quite a few different values however I cannot make sense of how this works. The example I am referring to is below. Thanks for any help in advance Create an options object that holds a limited set of map resolutions and a maximum bounding extent to show the map. A new OS OpenSpace map object is created by passing in our 'map' HTML div element id and the map options. 1. var options = {resolutions: [10, 5], 2. maxExtent: new OpenSpace.MapBounds(400000, 100000, 450000, 150000) ); 3. osMap = new OpenSpace.Map('map', options); We now set the centre of the map and set the initial map zoom level to 1 (corresponding to the second defined layer in the resolutions array). 1. osMap osMap.setCenter(new OpenSpace.MapPoint(400000,100000), 1); Cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100202/5c9a292b/attachment.html From paweluz at o2.pl Tue Feb 2 17:44:24 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Modify object other then from muse click Message-ID: <1265150664424-4504224.post@n2.nabble.com> Hi! I hope some of more experiences OpenLayers users could help me with my next problem. I have a line goemetry on map that I can select and modify. When I click on road on map the info about road is presented on the right of the page in 'Information' fieldset. http://img3.imageshack.us/img3/5350/77062173.jpg The object parameters can not be changed, unless the checkbox is checked. http://img693.imageshack.us/img693/7809/44422866.jpg If it is, the control is changed from select to modify. But I have to click twice on that geometry to modify it. First I click on it and I unselect geometry http://img685.imageshack.us/img685/761/74394384.jpg Second I click and I can modify the geometry. http://img191.imageshack.us/img191/7878/45033082.jpg The goal is to achieve functionality that after changing checkbox to true the selected line on a map would change to modify mode. Without the double clicking on it. Just changing the style (I mean mode but this is maybe more clearly) of geometry on the map from select to modify by changing the checkbox mode. Is it possible ?? I may show you my code if you would like. Please... any ideas would be good... BTW... Sorry for my poor English Thanks, Poul -- View this message in context: http://n2.nabble.com/Modify-object-other-then-from-muse-click-tp4504224p4504224.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From truong_pham_minh at yahoo.com Tue Feb 2 20:49:15 2010 From: truong_pham_minh at yahoo.com (truongpm) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Save polyline drawn in to database Message-ID: <1265161755958-4505039.post@n2.nabble.com> Hello, I want to create function that draw a polyline in to new feature class of map and save this line in to database. My ideal is similar with this tutorial. http://dev.openlayers.org/releases/OpenLayers-2.8/examples/vector-formats.html It will generate data at KML format and can use it to save to database. I have some question: 1. In above example, the KML string generate when select line which just draw. How could I change it to automatically when draw line? 2. Is there any other ideal about how to draw polyline and save it into database (postgres or mysql)? 3. How to edit polyline which display from database? Thank for your attention and sorry about my language skill. -- View this message in context: http://n2.nabble.com/Save-polyline-drawn-in-to-database-tp4505039p4505039.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Wed Feb 3 03:31:34 2010 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Save polyline drawn in to database In-Reply-To: <1265161755958-4505039.post@n2.nabble.com> References: <1265161755958-4505039.post@n2.nabble.com> Message-ID: Hi, Did you look at http://dev.openlayers.org/releases/OpenLayers-2.8/examples/wfs-t.html ? I'm using it as a base for our drawing app where you can draw points, lines and polygon's. With the WFS-T it's send to geoserver which stores it in an oracle spatial table If you need more info feel free to contact me Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of truongpm Sent: Wednesday, February 03, 2010 2:49 AM To: users@openlayers.org Subject: [OpenLayers-Users] Save polyline drawn in to database Hello, I want to create function that draw a polyline in to new feature class of map and save this line in to database. My ideal is similar with this tutorial. http://dev.openlayers.org/releases/OpenLayers-2.8/examples/vector-format s.html It will generate data at KML format and can use it to save to database. I have some question: 1. In above example, the KML string generate when select line which just draw. How could I change it to automatically when draw line? 2. Is there any other ideal about how to draw polyline and save it into database (postgres or mysql)? 3. How to edit polyline which display from database? Thank for your attention and sorry about my language skill. -- View this message in context: http://n2.nabble.com/Save-polyline-drawn-in-to-database-tp4505039p450503 9.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From max.weidemann at freenet.de Wed Feb 3 04:18:08 2010 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Style of line which geometry is being changed In-Reply-To: <1265137087973-4502826.post@n2.nabble.com> References: <1264621741496-4469289.post@n2.nabble.com> <1264690391859-4473704.post@n2.nabble.com> <1265137087973-4502826.post@n2.nabble.com> Message-ID: <1265188688746-4506211.post@n2.nabble.com> Hello Poul, I can you try this Code. I think you confuses "s" with "z" in initialize and ":" with"=". drawControls["modify_wfs_layer"].initialize = function(zielona_wfs) { this.layer = zielona_wfs; this.vertices = []; this.virtualVertices = []; this.virtualStyle = OpenLayers.Util.extend({}, this.layer.style || this.layer.styleMap.createSymbolizer()); this.virtualStyle.fillOpacity = 1; this.virtualStyle.strokeOpacity = 1; this.deleteCodes = [46, 68]; this.mode = OpenLayers.Control.ModifyFeature.RESHAPE; OpenLayers.Control.prototype.initialize.apply(this, []); if(!(this.deleteCodes instanceof Array)) { this.deleteCodes = [this.deleteCodes]; } cheers Max -- View this message in context: http://n2.nabble.com/Style-of-line-which-geometry-is-being-changed-tp4469289p4506211.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Wed Feb 3 05:45:13 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Style of line which geometry is being changed In-Reply-To: <1265188688746-4506211.post@n2.nabble.com> References: <1264621741496-4469289.post@n2.nabble.com> <1264690391859-4473704.post@n2.nabble.com> <1265137087973-4502826.post@n2.nabble.com> <1265188688746-4506211.post@n2.nabble.com> Message-ID: <1265193913909-4506501.post@n2.nabble.com> Hi Max You got me... That was my mistake. I changed it to the way it should be, but unfortunately the points have all the time this same opacity. If I change the value form 1 to 0.1 I can not see any response on the map. The opacity of points is this same... So am I guessing this code is not even used. I have no idea where the problem is now... any ideas? cheers, Poul -- View this message in context: http://n2.nabble.com/Style-of-line-which-geometry-is-being-changed-tp4469289p4506501.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From henry.rotzoll at dlr.de Wed Feb 3 05:56:44 2010 From: henry.rotzoll at dlr.de (Henry Rotzoll) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Read WFS capabilities file Message-ID: <1265194604077-4506548.post@n2.nabble.com> Hi there, Does anybody know how to access the layers from a WFS capabilities file? I have this code: var XMLformat = new OpenLayers.Format.XML(); var xml = XMLformat.read(responseText); --> "responseText" ist the returned WFS capabilities file from the server var CAPformat = new OpenLayers.Format.WFSCapabilities(); var cap = CAPformat.read(xml); "cap" is an object, not null, but I can't access it like in the WMS Capabilities case (e. g. cap.capability.layers[i]). JavaScript says it's undefined. Thanks in advance! Best regards, Henry -- View this message in context: http://n2.nabble.com/Read-WFS-capabilities-file-tp4506548p4506548.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Wed Feb 3 06:10:51 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Style of line which geometry is being changed In-Reply-To: <1265193913909-4506501.post@n2.nabble.com> References: <1264621741496-4469289.post@n2.nabble.com> <1264690391859-4473704.post@n2.nabble.com> <1265137087973-4502826.post@n2.nabble.com> <1265188688746-4506211.post@n2.nabble.com> <1265193913909-4506501.post@n2.nabble.com> Message-ID: <1265195451435-4506612.post@n2.nabble.com> Hi Max I made changes in openlayers.js file. Exactly this line: this.virtualStyle.fillOpacity=1;this.virtualStyle.strokeOpacity=1 And everything is ok. The opacity of points is alright. I know it is not maybe the best way to do it, because now I have to move my html file with hole openlayers library, but for now I did not how to make it right. Maybe you or someone else will figure it out. If you have any ideas please do not hesitate to write to me... cheers, Poul -- View this message in context: http://n2.nabble.com/Style-of-line-which-geometry-is-being-changed-tp4469289p4506612.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dave.potts at pinan.co.uk Wed Feb 3 06:37:27 2010 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Open layers 2.9 In-Reply-To: <1265195451435-4506612.post@n2.nabble.com> References: <1264621741496-4469289.post@n2.nabble.com> <1264690391859-4473704.post@n2.nabble.com> <1265137087973-4502826.post@n2.nabble.com> <1265188688746-4506211.post@n2.nabble.com> <1265193913909-4506501.post@n2.nabble.com> <1265195451435-4506612.post@n2.nabble.com> Message-ID: <4B695FF7.3050107@pinan.co.uk> Hi List When is the release month for open layers 2.9? Dave. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5790 bytes Desc: S/MIME Cryptographic Signature Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100203/c3a4c864/smime.bin From igrcic at gmail.com Wed Feb 3 10:05:52 2010 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] right mouse drag? In-Reply-To: <20100202203803.GA30551@cloud3.rho.net> References: <20100202203803.GA30551@cloud3.rho.net> Message-ID: Yes I managed to do it... I'll try to open a ticket for it... here's some tip... DragPan controls uses OpenLayers.Handler.Drag which has leftClick hardcoded in it: mousedown: function (evt) { var propagate = true; this.dragging = false; if (this.checkModifiers(evt) && OpenLayers.Event.isMiddleClick(evt)) { .... We should make it optional so uses can make Drag handlers with left, right or middle click (ive also managed to do it) Again, ill try to open ticket this weekend.. cheers On Tue, Feb 2, 2010 at 9:38 PM, Wendell Turner wrote: > Is there an OpenLayers way to capture right mouse drag > events? > > map.div.oncontextmenu works fine for right mouse clicks, and > OpenLayers.Handler.Drag seems to only work on the left mouse > button. ?Is there some way to combine those? > > Thanks, > > Wendell > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From igrcic at gmail.com Wed Feb 3 10:08:05 2010 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] right mouse drag? In-Reply-To: References: <20100202203803.GA30551@cloud3.rho.net> Message-ID: ...also DragPan doesnt have possibility to asign different keyMask to handler. Maybe theres opened ticket for it somewhere, if not ill open it. cheers On Wed, Feb 3, 2010 at 4:05 PM, Ivan Grcic wrote: > Yes I managed to do it... I'll try to open a ticket for it... > > here's some tip... DragPan controls uses OpenLayers.Handler.Drag which > has leftClick hardcoded in it: > > mousedown: function (evt) { > ? ? ? ?var propagate = true; > ? ? ? ?this.dragging = false; > ? ? ? ?if (this.checkModifiers(evt) && OpenLayers.Event.isMiddleClick(evt)) { > .... > > We should make it optional so uses can make Drag handlers with left, > right or middle click (ive also managed to do it) > > Again, ill try to open ticket this weekend.. > > cheers > > On Tue, Feb 2, 2010 at 9:38 PM, Wendell Turner wrote: >> Is there an OpenLayers way to capture right mouse drag >> events? >> >> map.div.oncontextmenu works fine for right mouse clicks, and >> OpenLayers.Handler.Drag seems to only work on the left mouse >> button. ?Is there some way to combine those? >> >> Thanks, >> >> Wendell >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Ivan Grcic > -- Ivan Grcic From oussama.mubarak at hyptique.fr Wed Feb 3 10:21:26 2010 From: oussama.mubarak at hyptique.fr (Oussama Mubarak) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Control with dynamic icon Message-ID: <4B699476.5000200@hyptique.fr> Hello, I am trying to create a panel with a list of controls created dynamically. I created a custom control class based on OpenLayers.Control.Point to allow me to define default attributes and styles to each point created with this control, by replacing the following line: var feature = new OpenLayers.Feature.Vector(geometry); with the following: this.featureAttributes = this.featureAttributes || {}; this.featureStyle = this.featureStyle || {}; var feature = new OpenLayers.Feature.Vector(geometry, this.featureAttributes, this.featureStyle); I did that essentially because I needed to allow the addition of icons associated with the control. So that when a certain control is active, all points created on the map will have its styles.externalGraphic modified. (I didn't want to use the Marker class as the ability to drag and drop is not implemented) This works great so far. I am now trying to give each control a different look. Say I have for example a control that allows me to add boys on the map, and another one allows me to add girls. I want to add the boy icon to the first control, and the girl icon to the second, without using the "displayClass" property, as the list of controls is dynamic, so no css rules can be created in advance! Any help would be greatly appreciated. Best, -- Oussama Mubarak D?veloppeur web et nouveaux m?dias http://semiaddict.com // 06 83 65 76 90 From igrcic at gmail.com Wed Feb 3 10:25:43 2010 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] right mouse drag? In-Reply-To: References: <20100202203803.GA30551@cloud3.rho.net> Message-ID: its is supposed to be OpenLayers.Event.isLeftClikc(evt) instead of Middle On Wed, Feb 3, 2010 at 4:05 PM, Ivan Grcic wrote: > Yes I managed to do it... I'll try to open a ticket for it... > > here's some tip... DragPan controls uses OpenLayers.Handler.Drag which > has leftClick hardcoded in it: > > mousedown: function (evt) { > ? ? ? ?var propagate = true; > ? ? ? ?this.dragging = false; > ? ? ? ?if (this.checkModifiers(evt) && OpenLayers.Event.isMiddleClick(evt)) { > .... > > We should make it optional so uses can make Drag handlers with left, > right or middle click (ive also managed to do it) > > Again, ill try to open ticket this weekend.. > > cheers > > On Tue, Feb 2, 2010 at 9:38 PM, Wendell Turner wrote: >> Is there an OpenLayers way to capture right mouse drag >> events? >> >> map.div.oncontextmenu works fine for right mouse clicks, and >> OpenLayers.Handler.Drag seems to only work on the left mouse >> button. ?Is there some way to combine those? >> >> Thanks, >> >> Wendell >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Ivan Grcic > -- Ivan Grcic From henry.rotzoll at dlr.de Wed Feb 3 12:06:59 2010 From: henry.rotzoll at dlr.de (Henry Rotzoll) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Read WFS capabilities file In-Reply-To: <1265194604077-4506548.post@n2.nabble.com> References: <1265194604077-4506548.post@n2.nabble.com> Message-ID: <1265216819079-4508357.post@n2.nabble.com> *push* -- View this message in context: http://n2.nabble.com/Read-WFS-capabilities-file-tp4506548p4508357.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From oussama.mubarak at hyptique.fr Wed Feb 3 12:10:59 2010 From: oussama.mubarak at hyptique.fr (Oussama Mubarak) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Control with dynamic icon In-Reply-To: <4B699476.5000200@hyptique.fr> References: <4B699476.5000200@hyptique.fr> Message-ID: <4B69AE23.9080200@hyptique.fr> I managed to do what I needed using the jQuery.Rule plugin (http://flesler.blogspot.com/2007/11/jqueryrule.html), which allowed me to add css rules dynamically for each of my controls. Oussama Mubarak a ?crit : > Hello, > > I am trying to create a panel with a list of controls created > dynamically. > > I created a custom control class based on OpenLayers.Control.Point to > allow me to define default attributes and styles to each point created > with this control, by replacing the following line: > var feature = new OpenLayers.Feature.Vector(geometry); > > with the following: > this.featureAttributes = this.featureAttributes || {}; > this.featureStyle = this.featureStyle || {}; > var feature = new OpenLayers.Feature.Vector(geometry, > this.featureAttributes, this.featureStyle); > > I did that essentially because I needed to allow the addition of icons > associated with the control. So that when a certain control is active, > all points created on the map will have its styles.externalGraphic > modified. (I didn't want to use the Marker class as the ability to > drag and drop is not implemented) > > This works great so far. > > I am now trying to give each control a different look. Say I have for > example a control that allows me to add boys on the map, and another > one allows me to add girls. I want to add the boy icon to the first > control, and the girl icon to the second, without using the > "displayClass" property, as the list of controls is dynamic, so no css > rules can be created in advance! > > Any help would be greatly appreciated. > > Best, > -- Oussama Mubarak D?veloppeur web et nouveaux m?dias http://semiaddict.com // 06 83 65 76 90 From igrcic at gmail.com Wed Feb 3 12:27:03 2010 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] How to access mouse modifier during "featureselected" In-Reply-To: <4B6324EB.1040206@marcelruff.info> References: <4B61DA60.1000501@marcelruff.info> <4B6324EB.1040206@marcelruff.info> Message-ID: hi, just use firebug to browse trough evt object. should be something like evt.altKey. ctrlKey or shiftKey i think... cheers On Fri, Jan 29, 2010 at 7:11 PM, Marcel Ruff wrote: > Can anybody give me a hint if it is possible? > > Thanks > Marcel > > Marcel Ruff schrieb: >> Hi, >> >> i assume it is trivial, but i couldn't figure it out. >> >> When a user clicks on my markers I would like to see if it was a "Right >> mouse click" or a "Shift Left mouse click" etc. >> >> How can I do this? Here is my code snippet: >> >> .... >> this.markersLayer.events.register("featureselected", this.markersLayer, >> this.__onMarkerSelect); >> >> ... >> >> this.__onMarkerSelect = function(evt) { >> ? if (evt.isShiftPressed()) { // How??? >> ? } >> >> >> >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From nolasco_gabriel at yahoo.com.br Wed Feb 3 12:59:54 2010 From: nolasco_gabriel at yahoo.com.br (Gabriel Nolasco) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Users Digest, Vol 41, Issue 5 In-Reply-To: Message-ID: <49919.26221.qm@web37107.mail.mud.yahoo.com> Hi, Use WFSCapabilities format instead [1]: wfsParser = new OpenLayers.Format.WFSCapabilities(); wfsCapabilities = wfsParser.read(response.responseText); wfsCapabilities.featureTypeList.featureTypes [1]http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Format/WFSCapabilities-js.html Best regards, Gabriel Nolasco Message: 6 Date: Wed, 3 Feb 2010 02:56:44 -0800 (PST) From: Henry Rotzoll Subject: [OpenLayers-Users] Read WFS capabilities file To: users@openlayers.org Message-ID: <1265194604077-4506548.post@n2.nabble.com> Content-Type: text/plain; charset=us-ascii Hi there, Does anybody know how to access the layers from a WFS capabilities file? I have this code: var XMLformat = new OpenLayers.Format.XML(); var xml = XMLformat.read(responseText); --> "responseText" ist the returned WFS capabilities file from the server var CAPformat = new OpenLayers.Format.WFSCapabilities(); var cap = CAPformat.read(xml); "cap" is an object, not null, but I can't access it like in the WMS Capabilities case (e. g. cap.capability.layers[i]). JavaScript says it's undefined. Thanks in advance! Best regards, Henry ____________________________________________________________________________________ Veja quais s?o os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100203/1e1e73ff/attachment.html From seileef at gmail.com Wed Feb 3 13:41:51 2010 From: seileef at gmail.com (Tom B) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] WMS overlay not shown at zoom level 0 when singleTile: true Message-ID: <1265222511416-4508945.post@n2.nabble.com> Hi all, In the attached code, the WMS overlay is shown fine at zoom level 1, but at zoom level 0, it disappears. If I either remove the "singleTile: true" option, or use a MetaCarta base layer instead of the Google one, then the overlay shows up fine at zoom level 0. I took a look at the WMS request at map.layers[1].grid[0][0].url at zoom level 0, and GeoServer renders that URL fine, so it looks like this issue is related to OpenLayers. Any ideas of what might be going wrong here? Best, Tom
-- View this message in context: http://n2.nabble.com/WMS-overlay-not-shown-at-zoom-level-0-when-singleTile-true-tp4508945p4508945.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Feb 3 13:49:08 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] WMS overlay not shown at zoom level 0 when singleTile: true In-Reply-To: <1265222511416-4508945.post@n2.nabble.com> References: <1265222511416-4508945.post@n2.nabble.com> Message-ID: <20100203184908.GJ20135@metacarta.com> On Wed, Feb 03, 2010 at 10:41:51AM -0800, Tom B wrote: > > Hi all, > > In the attached code, the WMS overlay is shown fine at zoom level 1, but at > zoom level 0, it disappears. If I either remove the "singleTile: true" > option, or use a MetaCarta base layer instead of the Google one, then the > overlay shows up fine at zoom level 0. The problem is usually that Google wraps the world, so when we ask for corners, the bbox ends up being invalid. -- Chris > I took a look at the WMS request at map.layers[1].grid[0][0].url at zoom > level 0, and GeoServer renders that URL fine, so it looks like this issue is > related to OpenLayers. > > Any ideas of what might be going wrong here? > > Best, > Tom > > > > > > > > > >
> > > > -- > View this message in context: http://n2.nabble.com/WMS-overlay-not-shown-at-zoom-level-0-when-singleTile-true-tp4508945p4508945.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From seileef at gmail.com Wed Feb 3 13:57:58 2010 From: seileef at gmail.com (Tom B) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] WMS overlay not shown at zoom level 0 when singleTile: true In-Reply-To: <20100203184908.GJ20135@metacarta.com> References: <1265222511416-4508945.post@n2.nabble.com> <20100203184908.GJ20135@metacarta.com> Message-ID: <1265223478381-4509041.post@n2.nabble.com> Thanks, Chris, that makes sense. Is there a common workaround for this? -- View this message in context: http://n2.nabble.com/WMS-overlay-not-shown-at-zoom-level-0-when-singleTile-true-tp4508945p4509041.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From emmexx at tiscalinet.it Wed Feb 3 15:14:10 2010 From: emmexx at tiscalinet.it (emmexx) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Mouse wheel zoom not deactivating Message-ID: <4B69D912.7080800@tiscalinet.it> I have some control on 2 panels. One of them is a Navigation control. I tried to disable the mouse wheel zoom feature to no avail. map.addControl(panel); panel.activateControl(BITools.get('navigazione')); //default controls = map.getControlsByClass('OpenLayers.Control.Navigation'); for (var i=0; i Hi List, I am not able to configure to proxy server for WMSGetFeatureInfo control for fetching information about a position from WMS (via GetFeatureInfo request). Results are displayed in a popup. For I copied the proxy.cgi on different web application: http://localhost:8085/propertytax/proxy.cgi?url= Please can you help how to configure the proxy server. I tried many ways including geoserver proxy also. Thanks in Advance Bhimanna -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100204/4f8a177e/attachment.html From paweluz at o2.pl Thu Feb 4 05:16:42 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] WFS-T Update problem, wrong SRID for changed geometry Message-ID: <1265278602937-4512597.post@n2.nabble.com> Hi I have problem with WFS-T when I update geometry on map. I am using OL 2.8, Geoserver 1.6.4 and PostgreSQL8.3 with Postgis 1.3.6. I am using google layer as a base layer. When I update the geometry on map and do commit() the geometry disappears! I did not know what was happening until I check my database. Al my data are in SRID 4326. When I execute SQL query "Select astext(the_geom) from my_table" I got one geometry that is so much different from the other. It was a geometry in google SRID. Why??? I check everything in QuantumGIS and my changed geometry is far, far away from the place I wanted it to be. I am also using WFS to add new data to database and there everything works just fine!! For update I am using feature.state = OpenLayers.State.UPDATE; For adding I am using feature.state = OpenLayers.State.INSERT; My WFS definition is zielona_wfs = new OpenLayers.Layer.WFS( "Zielona Gora WFS - drogi, postgis", "http://localhost:8080/geoserver/wfs?", {typename: 'topp:zielona_openstreets'}, { typename: 'zielona_openstreets', featureNS: 'http://www.openplans.org/topp', styleMap: wfs_style, srs: 'EPSG:4326', extractAttributes: true } ); Does anyone know what is wrong? Maybe there is a way to change the srs for geometry that is being changed? Regards, Poul -- View this message in context: http://n2.nabble.com/WFS-T-Update-problem-wrong-SRID-for-changed-geometry-tp4512597p4512597.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Thu Feb 4 05:53:30 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Saving vector features in various formats In-Reply-To: <1265280226879-4512698.post@n2.nabble.com> References: <1265280226879-4512698.post@n2.nabble.com> Message-ID: <1265280810586-4512749.post@n2.nabble.com> Hi Yes it is possible. I am actually writing an application that has that functionality. You draw f.g. line on map, then you click save button and geometry is save in the Postgis database. I am using WFS to display data on map and to imput a new data to database. Hope it helps you... I ddd not get you with Frost89 wrote: > > what formats can it be saved in? > can you be more clearly cheers, Poul -- View this message in context: http://n2.nabble.com/Saving-vector-features-in-various-formats-tp4512698p4512749.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Thu Feb 4 11:16:07 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Overviewmap Message-ID: Hi, How I can attach an overviewmap to a map whose base layer is a google maps layer (with spherical mercator)? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100204/1d51c79f/attachment.html From maxime.phaneuf at usherbrooke.ca Thu Feb 4 12:16:09 2010 From: maxime.phaneuf at usherbrooke.ca (Maxime Phaneuf) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] WFS-T Update problem, wrong SRID for changed geometry In-Reply-To: <1265278602937-4512597.post@n2.nabble.com> References: <1265278602937-4512597.post@n2.nabble.com> Message-ID: <1265303769580-4514818.post@n2.nabble.com> What is the projection for your map? Is it spherical mercator or 4326? Maybe there is a conflict there. I suppose you're drawing in spherical mercator, but you're saving in a PostGIS table that has 4326 as projection. Can you show your map declaration please? Maxime -- View this message in context: http://n2.nabble.com/WFS-T-Update-problem-wrong-SRID-for-changed-geometry-tp4512597p4514818.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From maxime.phaneuf at usherbrooke.ca Thu Feb 4 12:20:45 2010 From: maxime.phaneuf at usherbrooke.ca (Maxime Phaneuf) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Saving vector features in various formats In-Reply-To: <618950b81002040526t1b8d5834u1e3f59710fec9b85@mail.gmail.com> References: <1265280226879-4512698.post@n2.nabble.com> <1265280810586-4512749.post@n2.nabble.com> <618950b81002040526t1b8d5834u1e3f59710fec9b85@mail.gmail.com> Message-ID: <1265304045501-4514847.post@n2.nabble.com> John, You need to set up a cartographic server that can handle WFS-T manipulation, such as INSERT, UPDATE, DELETE. You can use Geoserver or TinyOWS. Both of them work. Also, you can look at this example: http://dev.openlayers.org/releases/OpenLayers-2.8/examples/wfs-t.html to understand the interaction between OL and the cartographic server. Maxime -- View this message in context: http://n2.nabble.com/Saving-vector-features-in-various-formats-tp4512698p4514847.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From elvin.ibbotson at googlemail.com Thu Feb 4 13:28:52 2010 From: elvin.ibbotson at googlemail.com (elvin ibbotson) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] DragPan Message-ID: <1265308132079-4515293.post@n2.nabble.com> I want to allow dragging to pan an OSM map but not to allow double-click zooming (instead using external controls for zoom). I instantiated the map with... map=new OpenLayers.Map($("map"),{units:'degrees', controls:[]}); then added the DragPan control with... map.addControl(new OpenLayers.Control.DragPan()); but dragging has no effect and I am unable to pan the map unless I use the Navigation control. Am I doing something wrong? -- View this message in context: http://n2.nabble.com/DragPan-tp4515293p4515293.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ricardorodot02 at gmail.com Thu Feb 4 13:40:43 2010 From: ricardorodot02 at gmail.com (=?ISO-8859-1?Q?Ricardo_Rodr=EDguez?=) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] help(wps.js in other proyects) Message-ID: <3fe9e6d71002041040q44042854wbd57065afb3be9f@mail.gmail.com> hello all, I wonder if it is possible to use "libraries pure" openlayers on other projects derived from, for example, using a library wps.js with mapfish. I recommend doing this is feasible Ricardo Rodr?guez Ing. Topogr?fico Univalle -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100204/a52da952/attachment.html From Steve.Toutant at inspq.qc.ca Thu Feb 4 15:07:58 2010 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Magnifier window Message-ID: Hi, I'm using openlayers with geoext. I would like to create a magnifier window. So it is like an overview map with a fix map center and a fix zoom level, but the main map and this overview map share the same geoext tree, so the layers are shown/hidden on both maps. I think I can do it if I start with the overview map example, here http://www.openlayers.org/dev/examples/example-list.html Does someone have a better idea or already tried this? thanks in advance Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100204/8a16642a/attachment.html From adube at mapgears.com Thu Feb 4 15:36:21 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Magnifier window In-Reply-To: References: Message-ID: <4B6B2FC5.5070307@mapgears.com> Hi Steve, I think you could do something like that (pseudo-code) : Create your original map Create all your layers and add them to the map Create your ov-map Register a mapmove event to the map to make ov-map follow it For each layer Clone it and add it to ov-map Register a visibilitychange event to a onVisibilityChanged function onVisibilityChanged: function(event) var layers = ov-map.getLayersByName(this.name); // this is the layer the visibility was changed if(layers && layers.length == 1) layers[0].setVisibility(this.visibility()) Do you get the idea ? Best regards, Alexandre Steve.Toutant@inspq.qc.ca wrote: > > Hi, > I'm using openlayers with geoext. > I would like to create a magnifier window. So it is like an overview > map with a fix map center and a fix zoom level, but the main map and > this overview map share the same geoext tree, so the layers are > shown/hidden on both maps. > > I think I can do it if I start with the overview map example, here > http://www.openlayers.org/dev/examples/example-list.html > > Does someone have a better idea or already tried this? > > thanks in advance > Steve > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From jennifer at greeninfo.org Thu Feb 4 15:59:10 2010 From: jennifer at greeninfo.org (Jennifer Strahan) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Drag pan while drawing a polygon? Message-ID: <4B6B351E.8080201@greeninfo.org> Hello, Has anyone has figured out a way to enable drag pan while drawing a polygon? I've found that I can click on the pan buttons to move the map while drawing, but I think for my application, a drag pan will be a better choice. Any suggestions on how I can set this up? Thanks, Jennifer -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jennifer Strahan, GIS Specialist GreenInfo Network, St Paul, MN Field Office 1541 Laurel Ave, Saint Paul, Minnesota, 55104 phone: 651.917.0191 fax: 651.917.0191 www.greeninfo.org | www.mapsportal.org Subscribe to MapLines, our e-enewsletter at www.GreenInfo.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GreenInfo Network, San Francisco 564 Market Street, Suite 510, San Francisco, California 94104 phone: 415.979.0343 fax: 415.797.0371 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From Steve.Toutant at inspq.qc.ca Thu Feb 4 16:14:03 2010 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Magnifier window In-Reply-To: <4B6B2FC5.5070307@mapgears.com> Message-ID: Thanks Alexandre, More detailed... Per example, a user could watch the whole world and the ov-map will be zoomed on Chicoutimi. Whatever the user do on the main map (panning, zooming), I want the ov-map to stick on Chicoutimi, because it is so beautiful ;-) But if a layer is selected on the tree I want both maps to show it. So if I understood well your idea I don't need to add a mapmove event since the ov-map will have a fix position. But, cloning layers and add handler function on each node will do what I expect. Of course, I need to anchor this new map in the bottom right corner. Correct me if I'm wrong thanks again Steve Alexandre Dube 04/02/2010 03:36 PM A Steve.Toutant@inspq.qc.ca cc users@openlayers.org Objet Re: [OpenLayers-Users] Magnifier window Hi Steve, I think you could do something like that (pseudo-code) : Create your original map Create all your layers and add them to the map Create your ov-map Register a mapmove event to the map to make ov-map follow it For each layer Clone it and add it to ov-map Register a visibilitychange event to a onVisibilityChanged function onVisibilityChanged: function(event) var layers = ov-map.getLayersByName(this.name); // this is the layer the visibility was changed if(layers && layers.length == 1) layers[0].setVisibility(this.visibility()) Do you get the idea ? Best regards, Alexandre Steve.Toutant@inspq.qc.ca wrote: > > Hi, > I'm using openlayers with geoext. > I would like to create a magnifier window. So it is like an overview > map with a fix map center and a fix zoom level, but the main map and > this overview map share the same geoext tree, so the layers are > shown/hidden on both maps. > > I think I can do it if I start with the overview map example, here > http://www.openlayers.org/dev/examples/example-list.html > > Does someone have a better idea or already tried this? > > thanks in advance > Steve > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100204/e5f82800/attachment.html From sumith.paul at gmail.com Thu Feb 4 23:56:57 2010 From: sumith.paul at gmail.com (runningcodez) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] getFeaturebyId clarification Message-ID: <1265345817271-4518258.post@n2.nabble.com> Hello list, Let me showcase my issue straightaway. I have a GML layer served from a json file containing lots of features one of which looks like {"type":"FeatureCollection","features":[{"type":"Feature","id":"property_final.1","geometry":{"type":"MultiPolygon","coordinates":[.....]},"geometry_name":"the_geom","properties":{"Id":76,"Name":"David","Ph_no":234}} When i try to get this feature using layer.getFeatureById('property_final.1') to change its styling,it gives me null .I feelthat I am trying to do something terribly stupid since 'property_final.1' is seen as 'fid'.If its the case which id should I pass as a parameter to the funtion getFeatureById()? and how will i get the id value? Is there any methodology to get a feature from any property value? Thanks in advance Sumith -- View this message in context: http://n2.nabble.com/getFeaturebyId-clarification-tp4518258p4518258.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100204/fd23cc04/attachment.html From sumith.paul at gmail.com Thu Feb 4 23:58:44 2010 From: sumith.paul at gmail.com (runningcodez) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] zoombox displacement In-Reply-To: References: <1265091977292-4499258.post@n2.nabble.com> Message-ID: <1265345924499-4518262.post@n2.nabble.com> Thanks Eric...fixed as u said.... -- View this message in context: http://n2.nabble.com/zoombox-displacement-tp4499258p4518262.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From antoni.vidal at icc.cat Fri Feb 5 02:21:21 2010 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] OL and mobile devices Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D6710@CORRIOL.icc.local> Hi list, In order to offer our products to mobile phones and other devices, is possible to use OL ? Is there any version oriented to these devices?. Thanks in advance Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogr?fic de Catalunya Parc de Montju?c, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/c01a3e7e/attachment.html From zac.spitzer at gmail.com Fri Feb 5 02:36:08 2010 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] OL and mobile devices In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D6710@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D6710@CORRIOL.icc.local> Message-ID: <7a85053e1002042336u59a3405ck3c5af9008e539da7@mail.gmail.com> OL does work (load) on anroid and nokia's out of the box, ppk has been testing touch stuff out which I'm not aware of OL supporting just yet.. http://www.quirksmode.org/blog/archives/2010/02/persistent_touc.html#more On 5 February 2010 18:21, Vidal, Antoni wrote: > Hi list, > > > > In order to offer our products to mobile phones and other devices, is > possible to use OL ? Is there any version oriented to these devices?. > > > > Thanks in advance > > > > Antoni Vidal > > Unitat d'Aplicacions SIG-WEB > Institut Cartogr?fic de Catalunya > Parc de Montju?c, E-08038 Barcelona > Tel. (+34) 93 567 15 00 (ext. 3228) > www.icc.cat > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 From kristian_frost7 at hotmail.com Fri Feb 5 03:59:18 2010 From: kristian_frost7 at hotmail.com (Frost89) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Saving vector features in various formats In-Reply-To: <1265280810586-4512749.post@n2.nabble.com> References: <1265280226879-4512698.post@n2.nabble.com> <1265280810586-4512749.post@n2.nabble.com> Message-ID: <1265360358982-4518912.post@n2.nabble.com> Thanks for the answer :) What I meant about formats was if i will be able to save it as gml/kml or something like that. But a Postgis could work too - Kristian -- View this message in context: http://n2.nabble.com/Saving-vector-features-in-various-formats-tp4512698p4518912.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Fri Feb 5 05:12:20 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Google Overviewmap Message-ID: Hi, I create an overview map with a gmaps layer, but it doesn't center on the ovmap.. It puts the center of the base layer in the top left of the ovmap instead of putting it in the center of the ov map... I create the map and ov like this: var Google_SAT = new OpenLayers.Layer.Google("GMap Sat", { type: G_SATELLITE_MAP, numZoomLevels: 20, "sphericalMercator": true }, { isBaseLayer: true }); var ovMAP = new OpenLayers.Layer.Google("GMap Streets", { }, { isBaseLayer: false }); var bounds = new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34); options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", maxResolution: 156543.0339, maxExtent: bounds }; map = new OpenLayers.Map('map', options); var optionsOV = { projection: new OpenLayers.Projection("EPSG:4326"), units: "m", maxResolution: 156543.0339, maxExtent: bounds, layers: [ovMAP] }; var overview = new OpenLayers.Control.OverviewMap(optionsOV); map.addControl(overview); Does any body can help? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/93c5fd1a/attachment.html From mario.nunez at atosresearch.eu Fri Feb 5 05:24:47 2010 From: mario.nunez at atosresearch.eu (=?UTF-8?B?TWFyaW8gTnXDsWV6IEppbWVuZXo=?=) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] click and unclick events (button) Message-ID: Hello list, I am trying to catch events in my buttons but I only see how to do click configuration behaviour and not how to do unclick configuration behaviour. I mean When the buttons are clicked then their own event gets triggered. Also I have the handler option to define an additional action when the button is selected but I do not know how the catch and configure a unclick event on the buttons. This is my source code: toolbar.addControl( new OpenLayers.Control.Button ({ trigger:OpenLayers.Function.bind(pointLayer.commit,pointLayer)}), { tooltip: 'Save points layer, map: map, iconCls: 'savefeatures', toggleGroup: 'map', handler: deactivateSelectionTool }); I need to add a handler for the unclick event on the button to do a activateSelectionTool. Any tip? Thank you in advance for your appreciated help. Kind regards. Mario. ------------------------------------------------------------------ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. Este mensaje y los ficheros adjuntos pueden contener informacion confidencial destinada solamente a la(s) persona(s) mencionadas anteriormente pueden estar protegidos por secreto profesional. Si usted recibe este correo electronico por error, gracias por informar inmediatamente al remitente y destruir el mensaje. Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin no se hace responsable por su contenido. Su contenido no constituye ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas partes. Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor no puede garantizar nada al respecto y no sera responsable de cualesquiera danos que puedan resultar de una transmision de virus. ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/4d877081/attachment.html From max.weidemann at freenet.de Fri Feb 5 06:44:22 2010 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] google overviewmap southeast shift problem Message-ID: <1265370262156-4519468.post@n2.nabble.com> Hello List, I think i have found a bug in the OverviewMap Control. I have a map with an GoogleLayer and an overviewmap which also should display an Google Layer. When i open the overview Control the center in the overwiew is not on the correct position. It is shifted in southeast direction depending on the zoomlevel. I wrote a little test case and found out that when i call the maximizeControl function before i set the center of the map the center on the overviewmap is on the correct Position. I will keep on investigating this problem, but if this is an known bug and there is an solution for this problem i would be happy to hear it!!! cheers Max ---->here is my test case: Overview Map Example

Overview Map

-- View this message in context: http://n2.nabble.com/google-overviewmap-southeast-shift-problem-tp4519468p4519468.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From max.weidemann at freenet.de Fri Feb 5 06:54:14 2010 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Google Overviewmap In-Reply-To: References: Message-ID: <1265370854430-4519507.post@n2.nabble.com> Hello JuKiM, Try this layer as you overview layer. var ovMAP = new OpenLayers.Layer.Google("GMap Streets", { type:G_NORMAL_MAP, 'sphericalMercator': true, maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34) }); cheers Max -- View this message in context: http://n2.nabble.com/Google-Overviewmap-tp4519147p4519507.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From max.weidemann at freenet.de Fri Feb 5 07:14:47 2010 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Pointlist of Polygon In-Reply-To: <1265365580738-4519183.post@n2.nabble.com> References: <1265365580738-4519183.post@n2.nabble.com> Message-ID: <1265372087571-4519574.post@n2.nabble.com> Hi frotho, You have too look at the Vector layer. In your case ---> var lastGeometry=vectors.features[(vectors.features.length-1)].geometry; will give you the last geometry from the layer. To get the points from an Polygon you have look at the components array. ---> var points=lastGeometry.components I hope this will help you. cheers Max -- View this message in context: http://n2.nabble.com/Pointlist-of-Polygon-tp4519183p4519574.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From xintaoliu at hotmail.com Fri Feb 5 07:23:08 2010 From: xintaoliu at hotmail.com (xintao.liu) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Can I move Marker or Vertor by using Tween to get transition effect? Message-ID: <1265372588771-4519612.post@n2.nabble.com> There is an example of transition effects by using OpenLayers.Tween: OpenLayers-2.8\tests\manual\tween.html. I was wondering whether we can use OpenLayers.Tween to move Vector Markers to get the transition effect? Many thanks in advance. Any of your reply is highly appreciated. Xintao -- View this message in context: http://n2.nabble.com/Can-I-move-Marker-or-Vertor-by-using-Tween-to-get-transition-effect-tp4519612p4519612.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Fri Feb 5 07:53:10 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Google Overviewmap In-Reply-To: <1265370854430-4519507.post@n2.nabble.com> References: <1265370854430-4519507.post@n2.nabble.com> Message-ID: Hi, In the code you passed me, if I put the spherical Mercator to true, it doesn't center correctly.. If I zoom at maximum the center of overview is very near from the "right" center, but if i zoom out.. every time the overviewmap changes the scale, it centers far from the center of base layer.. (if i center newyork in base layer, the overview map, is centered over south africa..) And if I don't put the sphericalmercator to true, then it centers ok, but again it put the center of the baselayer to the top-left of overviewmap. What i'm doing wrong? Thanks! 2010/2/5 Max Weidemann > > Hello JuKiM, > > Try this layer as you overview layer. > > var ovMAP = new OpenLayers.Layer.Google("GMap Streets", { > type:G_NORMAL_MAP, > 'sphericalMercator': true, > maxExtent: new OpenLayers.Bounds(-20037508, > -20037508, > 20037508, 20037508.34) > }); > > cheers > Max > -- > View this message in context: > http://n2.nabble.com/Google-Overviewmap-tp4519147p4519507.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/42cab493/attachment.html From adube at mapgears.com Fri Feb 5 08:38:55 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Magnifier window In-Reply-To: References: Message-ID: <4B6C1F6F.7080202@mapgears.com> Steve, You've got it all right. Kind regards, Alexandre Steve.Toutant@inspq.qc.ca wrote: > > Thanks Alexandre, > More detailed... > Per example, a user could watch the whole world and the ov-map will be > zoomed on Chicoutimi. Whatever the user do on the main map (panning, > zooming), I want the ov-map to stick on Chicoutimi, because it is so > beautiful ;-) :) > But if a layer is selected on the tree I want both maps to show it. > So if I understood well your idea I don't need to add a mapmove event > since the ov-map will have a fix position. > But, cloning layers and add handler function on each node will do what > I expect. > > Of course, I need to anchor this new map in the bottom right corner. > Correct me if I'm wrong > thanks again > Steve > > > > > > *Alexandre Dube * > > 04/02/2010 03:36 PM > > > A > Steve.Toutant@inspq.qc.ca > cc > users@openlayers.org > Objet > Re: [OpenLayers-Users] Magnifier window > > > > > > > > > > > > Hi Steve, > > I think you could do something like that (pseudo-code) : > > Create your original map > Create all your layers and add them to the map > > Create your ov-map > Register a mapmove event to the map to make ov-map follow it > For each layer > Clone it and add it to ov-map > Register a visibilitychange event to a onVisibilityChanged function > > onVisibilityChanged: function(event) > var layers = ov-map.getLayersByName(this.name); // this is the layer > the visibility was changed > if(layers && layers.length == 1) > layers[0].setVisibility(this.visibility()) > > Do you get the idea ? > > Best regards, > > Alexandre > > Steve.Toutant@inspq.qc.ca wrote: > > > > Hi, > > I'm using openlayers with geoext. > > I would like to create a magnifier window. So it is like an overview > > map with a fix map center and a fix zoom level, but the main map and > > this overview map share the same geoext tree, so the layers are > > shown/hidden on both maps. > > > > I think I can do it if I start with the overview map example, here > > http://www.openlayers.org/dev/examples/example-list.html > > > > Does someone have a better idea or already tried this? > > > > thanks in advance > > Steve > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > > > -- Alexandre Dub? Mapgears www.mapgears.com From max.weidemann at freenet.de Fri Feb 5 09:04:18 2010 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Google Overviewmap In-Reply-To: References: <1265370854430-4519507.post@n2.nabble.com> Message-ID: <1265378658174-4520026.post@n2.nabble.com> I think it is a bug in Openlayers. I described it here if you call the maximizeControl Function after you add the Control and set spherical Mercator to true it will work. map.addControl(overview); overview.maximizeControl(); -- View this message in context: http://n2.nabble.com/Google-Overviewmap-tp4519147p4520026.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From lukas.baehler at fhnw.ch Fri Feb 5 09:18:04 2010 From: lukas.baehler at fhnw.ch (luke82) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] IE and "return!!(document.namespace) In-Reply-To: <4AD2ACE6.5020304@gns.cri.nz> References: <4AD2ACE6.5020304@gns.cri.nz> Message-ID: <1265379484631-4520100.post@n2.nabble.com> I've got the exactly same problem. I'm loading 3 valid KML-Layers and a WMS for background-information. Works well in Firefox, Opera, Safari etc., but no in IE6, IE7 and IE8. Does anyone has a solution for that? -- View this message in context: http://n2.nabble.com/IE-and-return-document-namespace-tp3806076p4520100.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Fri Feb 5 09:27:12 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Google Overviewmap In-Reply-To: <1265378658174-4520026.post@n2.nabble.com> References: <1265370854430-4519507.post@n2.nabble.com> <1265378658174-4520026.post@n2.nabble.com> Message-ID: It doesn't works for me.. For a high zoom level, the center of the base layer and the center of the overview are very similar, but as I got lower zoom levels and showing more map, it seems like the center of the base layer is more to the north-west than the center of the overview.. And in each refresh of overview map zoom level the diference between both centers increases.. Can be a problem with projections maybe? Thanks! 2010/2/5 Max Weidemann > > I think it is a bug in Openlayers. I described it here > > if you call the maximizeControl Function after you add the Control and set > spherical Mercator to true it will work. > > map.addControl(overview); > overview.maximizeControl(); > -- > View this message in context: > http://n2.nabble.com/Google-Overviewmap-tp4519147p4520026.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/ab52454e/attachment.html From Steve.Toutant at inspq.qc.ca Fri Feb 5 09:29:56 2010 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Magnifier window In-Reply-To: <4B6B2FC5.5070307@mapgears.com> Message-ID: Almost done....Amasing how things are easy to do with OL. I have a wms layers array, "overlays[]" I use this code to create the layers array of the overview map and to define the visibilitychanged event. var addLayersToMap = function() { for( i in overlays )//overlays contains my wms layers { map.addLayer( overlays[i] ); ov_overlays[i] = overlays[i].clone(); ov_map.addLayer( ov_overlays[i] ); //Ajoute un listener au niveau de la carte principal pour g?rer l'affichage sur la ov_map overlays[i].events.on( { 'visibilitychanged': function(event) { ov_overlays[i].setVisibility(overlays[i].getVisibility()); } }); } } in run time, only the visibility of the last layer of the array gets updated in the other map. I also tried with map.addLayers after adding the overlays[i]. events on...with the same result Do you see something wrong thanks Steve Alexandre Dube 04/02/2010 03:36 PM A Steve.Toutant@inspq.qc.ca cc users@openlayers.org Objet Re: [OpenLayers-Users] Magnifier window Hi Steve, I think you could do something like that (pseudo-code) : Create your original map Create all your layers and add them to the map Create your ov-map Register a mapmove event to the map to make ov-map follow it For each layer Clone it and add it to ov-map Register a visibilitychange event to a onVisibilityChanged function onVisibilityChanged: function(event) var layers = ov-map.getLayersByName(this.name); // this is the layer the visibility was changed if(layers && layers.length == 1) layers[0].setVisibility(this.visibility()) Do you get the idea ? Best regards, Alexandre Steve.Toutant@inspq.qc.ca wrote: > > Hi, > I'm using openlayers with geoext. > I would like to create a magnifier window. So it is like an overview > map with a fix map center and a fix zoom level, but the main map and > this overview map share the same geoext tree, so the layers are > shown/hidden on both maps. > > I think I can do it if I start with the overview map example, here > http://www.openlayers.org/dev/examples/example-list.html > > Does someone have a better idea or already tried this? > > thanks in advance > Steve > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/8368a353/attachment.html From rifins at gmail.com Fri Feb 5 09:38:06 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:27 2010 Subject: [OpenLayers-Users] Google Overviewmap In-Reply-To: References: <1265370854430-4519507.post@n2.nabble.com> <1265378658174-4520026.post@n2.nabble.com> Message-ID: The only thing that changes with overview.maximizeControl(); is that the square that indicates the visible zone of the base layer in the overview map is centered in the overview's map, but I think that the real center of the base layer, is still in the top left of the overview... Any ideas? 2010/2/5 JuKiM > It doesn't works for me.. > > For a high zoom level, the center of the base layer and the center of the > overview are very similar, but as I got lower zoom levels and showing more > map, it seems like the center of the base layer is more to the north-west > than the center of the overview.. And in each refresh of overview map zoom > level the diference between both centers increases.. > > Can be a problem with projections maybe? > > Thanks! > > > 2010/2/5 Max Weidemann > >> >> I think it is a bug in Openlayers. I described it here >> >> if you call the maximizeControl Function after you add the Control and set >> spherical Mercator to true it will work. >> >> map.addControl(overview); >> overview.maximizeControl(); >> -- >> View this message in context: >> http://n2.nabble.com/Google-Overviewmap-tp4519147p4520026.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/cdbb97ae/attachment.html From adube at mapgears.com Fri Feb 5 09:39:59 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Magnifier window In-Reply-To: References: Message-ID: <4B6C2DBF.6090809@mapgears.com> Steve, Instead of relying on the layer's position in the layers array, try to use the following the getLayersByName method (see in my first reply). Tell me if that worked. Alexandre Steve.Toutant@inspq.qc.ca wrote: > > Almost done....Amasing how things are easy to do with OL. > > I have a wms layers array, "overlays[]" > I use this code to create the layers array of the overview map and to > define the visibilitychanged event. > var addLayersToMap = function() > { > for( i in overlays )//overlays contains my wms layers > { > map.addLayer( overlays[i] ); > ov_overlays[i] = overlays[i].clone(); > ov_map.addLayer( ov_overlays[i] ); > > //Ajoute un listener au niveau de la carte principal pour > g?rer l'affichage sur la ov_map > overlays[i].events.on( > { > 'visibilitychanged': function(event) > { > > ov_overlays[i].setVisibility(overlays[i].getVisibility()); > } > }); > } > } > > in run time, only the visibility of the last layer of the array gets > updated in the other map. > I also tried with map.addLayers after adding the overlays[i]. events > on...with the same result > > Do you see something wrong > thanks > Steve > > > > > *Alexandre Dube * > > 04/02/2010 03:36 PM > > > A > Steve.Toutant@inspq.qc.ca > cc > users@openlayers.org > Objet > Re: [OpenLayers-Users] Magnifier window > > > > > > > > > > > > Hi Steve, > > I think you could do something like that (pseudo-code) : > > Create your original map > Create all your layers and add them to the map > > Create your ov-map > Register a mapmove event to the map to make ov-map follow it > For each layer > Clone it and add it to ov-map > Register a visibilitychange event to a onVisibilityChanged function > > onVisibilityChanged: function(event) > var layers = ov-map.getLayersByName(this.name); // this is the layer > the visibility was changed > if(layers && layers.length == 1) > layers[0].setVisibility(this.visibility()) > > Do you get the idea ? > > Best regards, > > Alexandre > > Steve.Toutant@inspq.qc.ca wrote: > > > > Hi, > > I'm using openlayers with geoext. > > I would like to create a magnifier window. So it is like an overview > > map with a fix map center and a fix zoom level, but the main map and > > this overview map share the same geoext tree, so the layers are > > shown/hidden on both maps. > > > > I think I can do it if I start with the overview map example, here > > http://www.openlayers.org/dev/examples/example-list.html > > > > Does someone have a better idea or already tried this? > > > > thanks in advance > > Steve > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > > > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Fri Feb 5 09:43:54 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Magnifier window In-Reply-To: <4B6C2DBF.6090809@mapgears.com> References: <4B6C2DBF.6090809@mapgears.com> Message-ID: <4B6C2EAA.4040705@mapgears.com> Steve, You could try (pseudo-code): For each layer Clone it, add it to ov-map and attach it to the original layer ( layer.clonedLayer = myCloneLayer ) Register a visibilitychange event to a onVisibilityChanged function onVisibilityChanged: function(event) this.clonedLayer.setVisibility(this.visibility()) Regards, Alexandre Alexandre Dube wrote: > Steve, > > Instead of relying on the layer's position in the layers array, try to > use the following the getLayersByName method (see in my first reply). > Tell me if that worked. > > Alexandre > > > Steve.Toutant@inspq.qc.ca wrote: > >> Almost done....Amasing how things are easy to do with OL. >> >> I have a wms layers array, "overlays[]" >> I use this code to create the layers array of the overview map and to >> define the visibilitychanged event. >> var addLayersToMap = function() >> { >> for( i in overlays )//overlays contains my wms layers >> { >> map.addLayer( overlays[i] ); >> ov_overlays[i] = overlays[i].clone(); >> ov_map.addLayer( ov_overlays[i] ); >> >> //Ajoute un listener au niveau de la carte principal pour >> g?rer l'affichage sur la ov_map >> overlays[i].events.on( >> { >> 'visibilitychanged': function(event) >> { >> >> ov_overlays[i].setVisibility(overlays[i].getVisibility()); >> } >> }); >> } >> } >> >> in run time, only the visibility of the last layer of the array gets >> updated in the other map. >> I also tried with map.addLayers after adding the overlays[i]. events >> on...with the same result >> >> Do you see something wrong >> thanks >> Steve >> >> >> >> >> *Alexandre Dube * >> >> 04/02/2010 03:36 PM >> >> >> A >> Steve.Toutant@inspq.qc.ca >> cc >> users@openlayers.org >> Objet >> Re: [OpenLayers-Users] Magnifier window >> >> >> >> >> >> >> >> >> >> >> >> Hi Steve, >> >> I think you could do something like that (pseudo-code) : >> >> Create your original map >> Create all your layers and add them to the map >> >> Create your ov-map >> Register a mapmove event to the map to make ov-map follow it >> For each layer >> Clone it and add it to ov-map >> Register a visibilitychange event to a onVisibilityChanged function >> >> onVisibilityChanged: function(event) >> var layers = ov-map.getLayersByName(this.name); // this is the layer >> the visibility was changed >> if(layers && layers.length == 1) >> layers[0].setVisibility(this.visibility()) >> >> Do you get the idea ? >> >> Best regards, >> >> Alexandre >> >> Steve.Toutant@inspq.qc.ca wrote: >> >>> Hi, >>> I'm using openlayers with geoext. >>> I would like to create a magnifier window. So it is like an overview >>> map with a fix map center and a fix zoom level, but the main map and >>> this overview map share the same geoext tree, so the layers are >>> shown/hidden on both maps. >>> >>> I think I can do it if I start with the overview map example, here >>> http://www.openlayers.org/dev/examples/example-list.html >>> >>> Does someone have a better idea or already tried this? >>> >>> thanks in advance >>> Steve >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> -- >> Alexandre Dub? >> Mapgears >> www.mapgears.com >> >> >> >> >> > > > -- Alexandre Dub? Mapgears www.mapgears.com From ashley_c_mort at raytheon.com Fri Feb 5 10:18:24 2010 From: ashley_c_mort at raytheon.com (mortac8) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Visualizing GeoTIFF and basic WMS In-Reply-To: <1265383104071-1829221.post@n2.nabble.com> References: <1265383104071-1829221.post@n2.nabble.com> Message-ID: <1265383104070-4520373.post@n2.nabble.com> I have the same question. Is there any way to overlay GeoRectified images (GeoTIFF, NITF, etc) on a Layer or does that need to be handled via the map server? Christian Braun wrote: > > Hi guys, > > I am new to OpenLayers and I wondered after several try outs if it isn't > possible to show a single GeoTIFF image (EPSG 2169) superimposed a general > basic WMS service like the standard ones (EPSG: 4326)? > Do I have to use in between a Geoserver/Mapserver WMS solution? > > Thanks in advance > Christian > -- View this message in context: http://n2.nabble.com/Visualizing-GeoTIFF-and-basic-WMS-tp1829221p4520373.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From lgaudette at ehealthinformation.ca Fri Feb 5 10:40:37 2010 From: lgaudette at ehealthinformation.ca (Lisa Gaudette) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Image layer maximum file size? Message-ID: I am trying to display pre-generated map images using an image layer; these maps are to be used from the local machine. The first set of images was created for a fairly small area at 5000 x 2500, with the images under 100kb each. I have had no problems displaying these images. Then I had a set (representing a different, much larger, area) that I made at 10000 x 12725 (~850kb). I could not get it to display. I thought for a while that maybe it had something to do with the height being greater than the width, but then I tried creating that set at half the size 5000x6326 (~270kb), and things worked. I then thought that perhaps a dimension over 10,000 was some sort of maximum, so tried making them at 7800x9925 (~545kb). Didn't work. There are no apparent errors, the image simply doesn't display. When I right click in the map area and pick properties, it would seem like the browser (IE - this must work with IE) thinks the image is there and I get information about it (e.g. the correct address, size: 558646 bytes, Dimensions: 780x992 pixels). For a simple code example, this is my modified version of the init() function from the image-layer.html example: var map; function init(){ map = new OpenLayers.Map('map'); var options = {numZoomLevels: 6, maxResolution: 10}; var imgWidth = 7800; var imgHeight = 9925; var graphic = new OpenLayers.Layer.Image( 'Test', '/Maps/SK2/S/2/1588.png', // File size is 545kb new OpenLayers.Bounds(0, 0, imgWidth, imgHeight), new OpenLayers.Size(imgWidth, imgHeight), options ); map.addLayers([graphic]); map.zoomToMaxExtent(); } Is this some maximum file size that it can load? Or perhaps some other issue? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/f4473b0c/attachment.html From florian_diederichs at hotmail.com Fri Feb 5 10:51:04 2010 From: florian_diederichs at hotmail.com (Florian Diederichs) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Clustering lots feautures and making them selectable with a box Message-ID: <1265385064719-4520577.post@n2.nabble.com> Hi list, i might be on the wrong board, so sorry in advance... I made an OL-application that draws vector features as clusters and makes them selectable via drawing a box. I modified the cluster strategy, so that the attributes of the features get copied to the clusters in a way that lets me extract them properly from the cluster. Basically the clusters represent people, and selecting multiple clusters extracts the mobile-numbers of all the selected people. Works great with 100-500 people. Now you probably know what i'm going for: I know that the way i did it is wrong if you want to work with a lot of features. Which is what i want. So i'm probably stuck with WMS. Thats why i might be on the wrong board. But anyway: Does anybody have a hint how the behavior i described above can be achieved using a WMS-Layer? Or by using anything else that doesn't kill browsers? Meaning that the user is able to select features in a box, and that features can be clustered. Thanks Florian -- View this message in context: http://n2.nabble.com/Clustering-lots-feautures-and-making-them-selectable-with-a-box-tp4520577p4520577.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Steve.Toutant at inspq.qc.ca Fri Feb 5 11:36:10 2010 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Magnifier window In-Reply-To: <4B6C2EAA.4040705@mapgears.com> Message-ID: This code works if comment " layers.length == 1" var addLayersToMap = function() { var ov_overlays; for( i in overlays ) { map.addLayer( overlays[i] ); ov_overlays = overlays[i].clone(); ov_map.addLayer( ov_overlays ); overlays[i].events.register('visibilitychanged', overlays[i], function() { var layers = ov_map.getLayersByName(this.name); // this is the layer if(layers /*&& layers.length == 1*/) layers[0].setVisibility(this.getVisibility()) }); } layers.length is always = 2 Why ov_map.getLayersByName(this.name) returns 2 layers? Alexandre, i don't understand want you mean by "and attach it to the original layer ( layer.clonedLayer = myCloneLayer )" Do you think that could help with the length returned by ov_map.getLayersByName(this.name) thanks Steve Alexandre Dube @openlayers.org Envoy? par : users-bounces@openlayers.org 05/02/2010 09:43 AM A Steve.Toutant@inspq.qc.ca cc users@openlayers.org Objet Re: [OpenLayers-Users] Magnifier window Steve, You could try (pseudo-code): For each layer Clone it, add it to ov-map and attach it to the original layer ( layer.clonedLayer = myCloneLayer ) Register a visibilitychange event to a onVisibilityChanged function onVisibilityChanged: function(event) this.clonedLayer.setVisibility(this.visibility()) Regards, Alexandre Alexandre Dube wrote: > Steve, > > Instead of relying on the layer's position in the layers array, try to > use the following the getLayersByName method (see in my first reply). > Tell me if that worked. > > Alexandre > > > Steve.Toutant@inspq.qc.ca wrote: > >> Almost done....Amasing how things are easy to do with OL. >> >> I have a wms layers array, "overlays[]" >> I use this code to create the layers array of the overview map and to >> define the visibilitychanged event. >> var addLayersToMap = function() >> { >> for( i in overlays )//overlays contains my wms layers >> { >> map.addLayer( overlays[i] ); >> ov_overlays[i] = overlays[i].clone(); >> ov_map.addLayer( ov_overlays[i] ); >> >> //Ajoute un listener au niveau de la carte principal pour >> g?rer l'affichage sur la ov_map >> overlays[i].events.on( >> { >> 'visibilitychanged': function(event) >> { >> >> ov_overlays[i].setVisibility(overlays[i].getVisibility()); >> } >> }); >> } >> } >> >> in run time, only the visibility of the last layer of the array gets >> updated in the other map. >> I also tried with map.addLayers after adding the overlays[i]. events >> on...with the same result >> >> Do you see something wrong >> thanks >> Steve >> >> >> >> >> *Alexandre Dube * >> >> 04/02/2010 03:36 PM >> >> >> A >> Steve.Toutant@inspq.qc.ca >> cc >> users@openlayers.org >> Objet >> Re: [OpenLayers-Users] Magnifier window >> >> >> >> >> >> >> >> >> >> >> >> Hi Steve, >> >> I think you could do something like that (pseudo-code) : >> >> Create your original map >> Create all your layers and add them to the map >> >> Create your ov-map >> Register a mapmove event to the map to make ov-map follow it >> For each layer >> Clone it and add it to ov-map >> Register a visibilitychange event to a onVisibilityChanged function >> >> onVisibilityChanged: function(event) >> var layers = ov-map.getLayersByName(this.name); // this is the layer >> the visibility was changed >> if(layers && layers.length == 1) >> layers[0].setVisibility(this.visibility()) >> >> Do you get the idea ? >> >> Best regards, >> >> Alexandre >> >> Steve.Toutant@inspq.qc.ca wrote: >> >>> Hi, >>> I'm using openlayers with geoext. >>> I would like to create a magnifier window. So it is like an overview >>> map with a fix map center and a fix zoom level, but the main map and >>> this overview map share the same geoext tree, so the layers are >>> shown/hidden on both maps. >>> >>> I think I can do it if I start with the overview map example, here >>> http://www.openlayers.org/dev/examples/example-list.html >>> >>> Does someone have a better idea or already tried this? >>> >>> thanks in advance >>> Steve >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> -- >> Alexandre Dub? >> Mapgears >> www.mapgears.com >> >> >> >> >> > > > -- Alexandre Dub? Mapgears www.mapgears.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/95524b1d/attachment.html From adube at mapgears.com Fri Feb 5 11:40:28 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Magnifier window In-Reply-To: References: Message-ID: <4B6C49FC.8020109@mapgears.com> Steve, Steve.Toutant@inspq.qc.ca wrote: > > Alexandre, i don't understand want you mean by > "and attach it to the original layer ( layer.clonedLayer = > myCloneLayer )" > Do you think that could help with the length returned by > ov_map.getLayersByName(this.name) The 2nd option is : do not use ov_map.getLayersByName(this.name). Instead, when creating your myCloneLayer object, make a reference to it to its original layer : layer.cloneLayer = myCloneLayer. Alexandre > thanks > > Steve > > > > > *Alexandre Dube @openlayers.org* > Envoy? par : users-bounces@openlayers.org > > 05/02/2010 09:43 AM > > > A > Steve.Toutant@inspq.qc.ca > cc > users@openlayers.org > Objet > Re: [OpenLayers-Users] Magnifier window > > > > > > > > > > > > Steve, > > You could try (pseudo-code): > > For each layer > Clone it, add it to ov-map and attach it to the original layer ( > layer.clonedLayer = myCloneLayer ) > Register a visibilitychange event to a onVisibilityChanged function > > onVisibilityChanged: function(event) > this.clonedLayer.setVisibility(this.visibility()) > > Regards, > > Alexandre > > > Alexandre Dube wrote: > > Steve, > > > > Instead of relying on the layer's position in the layers array, > try to > > use the following the getLayersByName method (see in my first reply). > > Tell me if that worked. > > > > Alexandre > > > > > > Steve.Toutant@inspq.qc.ca wrote: > > > >> Almost done....Amasing how things are easy to do with OL. > >> > >> I have a wms layers array, "overlays[]" > >> I use this code to create the layers array of the overview map and to > >> define the visibilitychanged event. > >> var addLayersToMap = function() > >> { > >> for( i in overlays )//overlays contains my wms layers > >> { > >> map.addLayer( overlays[i] ); > >> ov_overlays[i] = overlays[i].clone(); > >> ov_map.addLayer( ov_overlays[i] ); > >> > >> //Ajoute un listener au niveau de la carte principal pour > >> g?rer l'affichage sur la ov_map > >> overlays[i].events.on( > >> { > >> 'visibilitychanged': function(event) > >> { > >> > >> ov_overlays[i].setVisibility(overlays[i].getVisibility()); > >> } > >> }); > >> } > >> } > >> > >> in run time, only the visibility of the last layer of the array gets > >> updated in the other map. > >> I also tried with map.addLayers after adding the overlays[i]. events > >> on...with the same result > >> > >> Do you see something wrong > >> thanks > >> Steve > >> > >> > >> > >> > >> *Alexandre Dube * > >> > >> 04/02/2010 03:36 PM > >> > >> > >> A > >> Steve.Toutant@inspq.qc.ca > >> cc > >> users@openlayers.org > >> Objet > >> Re: [OpenLayers-Users] Magnifier window > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> Hi Steve, > >> > >> I think you could do something like that (pseudo-code) : > >> > >> Create your original map > >> Create all your layers and add them to the map > >> > >> Create your ov-map > >> Register a mapmove event to the map to make ov-map follow it > >> For each layer > >> Clone it and add it to ov-map > >> Register a visibilitychange event to a onVisibilityChanged function > >> > >> onVisibilityChanged: function(event) > >> var layers = ov-map.getLayersByName(this.name); // this is the layer > >> the visibility was changed > >> if(layers && layers.length == 1) > >> layers[0].setVisibility(this.visibility()) > >> > >> Do you get the idea ? > >> > >> Best regards, > >> > >> Alexandre > >> > >> Steve.Toutant@inspq.qc.ca wrote: > >> > >>> Hi, > >>> I'm using openlayers with geoext. > >>> I would like to create a magnifier window. So it is like an overview > >>> map with a fix map center and a fix zoom level, but the main map and > >>> this overview map share the same geoext tree, so the layers are > >>> shown/hidden on both maps. > >>> > >>> I think I can do it if I start with the overview map example, here > >>> http://www.openlayers.org/dev/examples/example-list.html > >>> > >>> Does someone have a better idea or already tried this? > >>> > >>> thanks in advance > >>> Steve > >>> > >>> > ------------------------------------------------------------------------ > >>> > >>> _______________________________________________ > >>> Users mailing list > >>> Users@openlayers.org > >>> http://openlayers.org/mailman/listinfo/users > >>> > >>> > >> -- > >> Alexandre Dub? > >> Mapgears > >> www.mapgears.com > >> > >> > >> > >> > >> > > > > > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > -- Alexandre Dub? Mapgears www.mapgears.com From geomartino at gmail.com Fri Feb 5 12:37:38 2010 From: geomartino at gmail.com (Martin Ouellet) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] zIndex of the attribution Message-ID: <28d70b141002050937s2156f17dq5c985c6163db844b@mail.gmail.com> Hi all, I have a OpenLayers.Popup.FramedCloud object that appear on my map when users click on feature. I also have a attribution logo with my tiled baselayer at the bottom of my map. But the attribution always appear on top of the popup content. Is there a way to change the zIndex of the Attribution and/or the Popup? or a another way maybe? Thank you in advance! MartinO -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/d4e3f904/attachment.html From rifins at gmail.com Fri Feb 5 13:06:51 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Google Overviewmap In-Reply-To: References: <1265370854430-4519507.post@n2.nabble.com> <1265378658174-4520026.post@n2.nabble.com> Message-ID: Maybe this is why is not shown correctly the overview.. http://trac.openlayers.org/ticket/1050 Thanks. 2010/2/5 JuKiM > The only thing that changes with overview.maximizeControl(); is that the > square that indicates the visible zone of the base layer in the overview map > is centered in the overview's map, but I think that the real center of the > base layer, is still in the top left of the overview... > > Any ideas? > > > 2010/2/5 JuKiM > > It doesn't works for me.. >> >> For a high zoom level, the center of the base layer and the center of the >> overview are very similar, but as I got lower zoom levels and showing more >> map, it seems like the center of the base layer is more to the north-west >> than the center of the overview.. And in each refresh of overview map zoom >> level the diference between both centers increases.. >> >> Can be a problem with projections maybe? >> >> Thanks! >> >> >> 2010/2/5 Max Weidemann >> >>> >>> I think it is a bug in Openlayers. I described it here >>> >>> if you call the maximizeControl Function after you add the Control and >>> set >>> spherical Mercator to true it will work. >>> >>> map.addControl(overview); >>> overview.maximizeControl(); >>> -- >>> View this message in context: >>> http://n2.nabble.com/Google-Overviewmap-tp4519147p4520026.html >>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/3af1fd1f/attachment.html From luis.a.de.sousa at gmail.com Fri Feb 5 13:46:59 2010 From: luis.a.de.sousa at gmail.com (=?ISO-8859-1?Q?Lu=EDs_de_Sousa?=) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Visualizing GeoTIFF and basic WMS In-Reply-To: <1265383104070-4520373.post@n2.nabble.com> References: <1265383104071-1829221.post@n2.nabble.com> <1265383104070-4520373.post@n2.nabble.com> Message-ID: Hello, I'm no OpenLayers expert, but you wont able to reproject images on-the-fly client-side. That can only be made with WFS layers. If indeed there's some functionality to overlay images client-side, you'll have to make sure it is in the same reference system (EPSG). Good luck, Lu?s On Fri, Feb 5, 2010 at 3:18 PM, mortac8 wrote: > > I have the same question. ?Is there any way to overlay GeoRectified images > (GeoTIFF, NITF, etc) on a Layer or does that need to be handled via the map > server? > > > Christian Braun wrote: >> >> Hi guys, >> >> I am new to OpenLayers and I wondered after several try outs if it isn't >> possible to show a single GeoTIFF image (EPSG 2169) superimposed a general >> basic WMS service like the standard ones (EPSG: 4326)? >> Do I have to use in between a Geoserver/Mapserver WMS solution? >> >> Thanks in advance >> Christian >> > > -- > View this message in context: http://n2.nabble.com/Visualizing-GeoTIFF-and-basic-WMS-tp1829221p4520373.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From Steve.Toutant at inspq.qc.ca Fri Feb 5 15:25:05 2010 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Magnifier window solved In-Reply-To: <4B6C49FC.8020109@mapgears.com> Message-ID: solved using clone() Thanks Alexandre, Steve for(i in overlays) { var oOriginalLayer = overlays[i]; // add the original layer to the 1st map map.addLayer(oOriginalLayer); // create the clone layer, reference it to its original and add it to the second map var oClonedLayer = oOriginalLayer.clone(); oOriginalLayer.cloneLayer = oClonedLayer; ov_map.addLayer(oClonedLayer); // register the 'visibilitychanged' on the original layer oOriginalLayer.events.register('visibilitychanged', oOriginalLayer, function() { // when this function is called, 'this' is the oOriginal layer // that had its visibility changed and since it has a reference // to its clone, we simply use it direclty this.cloneLayer.setVisibility(this.getVisibility()); }); } Alexandre Dube 05/02/2010 11:40 AM A Steve.Toutant@inspq.qc.ca cc users@openlayers.org, users-bounces@openlayers.org Objet Re: [OpenLayers-Users] Magnifier window Steve, Steve.Toutant@inspq.qc.ca wrote: > > Alexandre, i don't understand want you mean by > "and attach it to the original layer ( layer.clonedLayer = > myCloneLayer )" > Do you think that could help with the length returned by > ov_map.getLayersByName(this.name) The 2nd option is : do not use ov_map.getLayersByName(this.name). Instead, when creating your myCloneLayer object, make a reference to it to its original layer : layer.cloneLayer = myCloneLayer. Alexandre > thanks > > Steve > > > > > *Alexandre Dube @openlayers.org* > Envoy? par : users-bounces@openlayers.org > > 05/02/2010 09:43 AM > > > A > Steve.Toutant@inspq.qc.ca > cc > users@openlayers.org > Objet > Re: [OpenLayers-Users] Magnifier window > > > > > > > > > > > > Steve, > > You could try (pseudo-code): > > For each layer > Clone it, add it to ov-map and attach it to the original layer ( > layer.clonedLayer = myCloneLayer ) > Register a visibilitychange event to a onVisibilityChanged function > > onVisibilityChanged: function(event) > this.clonedLayer.setVisibility(this.visibility()) > > Regards, > > Alexandre > > > Alexandre Dube wrote: > > Steve, > > > > Instead of relying on the layer's position in the layers array, > try to > > use the following the getLayersByName method (see in my first reply). > > Tell me if that worked. > > > > Alexandre > > > > > > Steve.Toutant@inspq.qc.ca wrote: > > > >> Almost done....Amasing how things are easy to do with OL. > >> > >> I have a wms layers array, "overlays[]" > >> I use this code to create the layers array of the overview map and to > >> define the visibilitychanged event. > >> var addLayersToMap = function() > >> { > >> for( i in overlays )//overlays contains my wms layers > >> { > >> map.addLayer( overlays[i] ); > >> ov_overlays[i] = overlays[i].clone(); > >> ov_map.addLayer( ov_overlays[i] ); > >> > >> //Ajoute un listener au niveau de la carte principal pour > >> g?rer l'affichage sur la ov_map > >> overlays[i].events.on( > >> { > >> 'visibilitychanged': function(event) > >> { > >> > >> ov_overlays[i].setVisibility(overlays[i].getVisibility()); > >> } > >> }); > >> } > >> } > >> > >> in run time, only the visibility of the last layer of the array gets > >> updated in the other map. > >> I also tried with map.addLayers after adding the overlays[i]. events > >> on...with the same result > >> > >> Do you see something wrong > >> thanks > >> Steve > >> > >> > >> > >> > >> *Alexandre Dube * > >> > >> 04/02/2010 03:36 PM > >> > >> > >> A > >> Steve.Toutant@inspq.qc.ca > >> cc > >> users@openlayers.org > >> Objet > >> Re: [OpenLayers-Users] Magnifier window > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> Hi Steve, > >> > >> I think you could do something like that (pseudo-code) : > >> > >> Create your original map > >> Create all your layers and add them to the map > >> > >> Create your ov-map > >> Register a mapmove event to the map to make ov-map follow it > >> For each layer > >> Clone it and add it to ov-map > >> Register a visibilitychange event to a onVisibilityChanged function > >> > >> onVisibilityChanged: function(event) > >> var layers = ov-map.getLayersByName(this.name); // this is the layer > >> the visibility was changed > >> if(layers && layers.length == 1) > >> layers[0].setVisibility(this.visibility()) > >> > >> Do you get the idea ? > >> > >> Best regards, > >> > >> Alexandre > >> > >> Steve.Toutant@inspq.qc.ca wrote: > >> > >>> Hi, > >>> I'm using openlayers with geoext. > >>> I would like to create a magnifier window. So it is like an overview > >>> map with a fix map center and a fix zoom level, but the main map and > >>> this overview map share the same geoext tree, so the layers are > >>> shown/hidden on both maps. > >>> > >>> I think I can do it if I start with the overview map example, here > >>> http://www.openlayers.org/dev/examples/example-list.html > >>> > >>> Does someone have a better idea or already tried this? > >>> > >>> thanks in advance > >>> Steve > >>> > >>> > ------------------------------------------------------------------------ > >>> > >>> _______________________________________________ > >>> Users mailing list > >>> Users@openlayers.org > >>> http://openlayers.org/mailman/listinfo/users > >>> > >>> > >> -- > >> Alexandre Dub? > >> Mapgears > >> www.mapgears.com > >> > >> > >> > >> > >> > > > > > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > -- Alexandre Dub? Mapgears www.mapgears.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/0f676cb2/attachment.html From ahocevar at opengeo.org Fri Feb 5 17:12:12 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] IE and "return!!(document.namespace) In-Reply-To: <1265379484631-4520100.post@n2.nabble.com> References: <4AD2ACE6.5020304@gns.cri.nz> <1265379484631-4520100.post@n2.nabble.com> Message-ID: <4B6C97BC.8070608@opengeo.org> luke82 wrote: > I've got the exactly same problem. I'm loading 3 valid KML-Layers and a WMS > for background-information. Works well in Firefox, Opera, Safari etc., but > no in IE6, IE7 and IE8. > Does anyone has a solution for that? > See the explanations in http://trac.openlayers.org/ticket/2304 Basically, you have to make sure that you don't create the vector layer before document.onload. This is why all OpenLayers examples start building the map in an init function that is assigned to document.onload. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From paweluz at o2.pl Sat Feb 6 05:56:34 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] WFS-T Update problem, wrong SRID for changed geometry In-Reply-To: <1265303769580-4514818.post@n2.nabble.com> References: <1265278602937-4512597.post@n2.nabble.com> <1265303769580-4514818.post@n2.nabble.com> Message-ID: <1265453794241-4524854.post@n2.nabble.com> Hi Max! All my data is in 4326 projection (e.g 15.3445345 15.4242432 ). On my map in the right-lower cornet coordinates are presented in google projection (e.g 678984.455666 654544.34443). Maybe there is a problem, I do not know. Just to remind when I add new geometry everything is all right. Problem is when I modify existing one. Here is my map definition: var options = { units: "m", controls: [], maxResolution: 156543.0339, numZoomLevels: 13, minZoomLevel: 11, maxZoomLevel: 9, maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508) }; map = new OpenLayers.Map('map',options); Is it all right? What do you thing?? Any ideas... Cheers, Poul -- View this message in context: http://n2.nabble.com/WFS-T-Update-problem-wrong-SRID-for-changed-geometry-tp4512597p4524854.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Sat Feb 6 05:58:02 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Modify object other then from muse click In-Reply-To: <1265150664424-4504224.post@n2.nabble.com> References: <1265150664424-4504224.post@n2.nabble.com> Message-ID: <1265453882371-4524858.post@n2.nabble.com> Did anyone have this kind of problem? Anyone?? Is there a way to manage with it? Please... -- View this message in context: http://n2.nabble.com/Modify-object-other-then-from-muse-click-tp4504224p4524858.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Sat Feb 6 06:11:31 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Saving vector features in various formats In-Reply-To: <618950b81002040526t1b8d5834u1e3f59710fec9b85@mail.gmail.com> References: <1265280226879-4512698.post@n2.nabble.com> <1265280810586-4512749.post@n2.nabble.com> <618950b81002040526t1b8d5834u1e3f59710fec9b85@mail.gmail.com> Message-ID: <1265454691507-4524884.post@n2.nabble.com> Hi Max! I am using Openlayers, Geoserver, Postgis on Windows XP. I was thinking that adding new object into database would be difficult but is was not. I am using only JS. I do not use any PHP or something like that. I add a new object into database with: road geometry, id of road and name of road. Here is some of my code. Hope it could help you: drawControls = { ...... add_object:new OpenLayers.Control.DrawFeature( zielona_wfs, OpenLayers.Handler.Path ), .... }; drawControls["add_object"].featureAdded = function(feature) { feature.layer.eraseFeatures([feature]); feature.geometry = new OpenLayers.Geometry.MultiLineString( feature.geometry ); selectedfeature=feature; //global variable feature.state = OpenLayers.State.INSERT; feature.layer.drawFeature(feature); } I get the id and name from html input text element. I add new object on button click (function add_object). function add_object() { selectedfeature.attributes['Id'] =parseInt(document.getElementById("id_geometry").value); selectedfeature.attributes['Road'] = document.getElementById("road_geometry").value; map.layers[1].commit(); document.getElementById("id_geometry").value=""; document.getElementById("road_geometry").value=""; //return false; } After adding new object you should get alert (SUCCESS). BTW, i do not know how to remove this alert, other then looking into source code. maybe you will figure it out. Hope I helped you Cheers, Poul -- View this message in context: http://n2.nabble.com/Saving-vector-features-in-various-formats-tp4512698p4524884.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From vincent.gulinao at gmail.com Sat Feb 6 23:30:52 2010 From: vincent.gulinao at gmail.com (Vincent Gulinao) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to make OpenLayers.Map.panTo() work? Message-ID: I'm a newbie, I copied this from an example somewhere to start: map = new OpenLayers.Map('map', { numZoomLevels: 19, maxResolution: 156543.0399, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326") }); var layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik"); map.addLayers([layerMapnik,layerTah]); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100207/1a9837fb/attachment.html From vincent.gulinao at gmail.com Sat Feb 6 23:37:31 2010 From: vincent.gulinao at gmail.com (Vincent Gulinao) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to make OpenLayers.Map.panTo() work? In-Reply-To: References: Message-ID: Sorry, accidentally sent... I copied this from an example somewhere to start: map = new OpenLayers.Map('map', { numZoomLevels: 19, maxResolution: 156543.0399, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326") }); var layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik"); map.addLayers([layerMapnik]); Then I call this function from html drop-down list's onchange: function setCenter(region) { lon = Math.random() * 360 - 180; lat = Math.random() * 180 - 90; var lonlat = new OpenLayers.LonLat(lon, lat); map.panTo(lonlat); } ... but it only brings me to (I believe) 0,0. I've been trying to figure it out for hours but with no luck. Please help. TIA. On Sun, Feb 7, 2010 at 12:30 PM, Vincent Gulinao wrote: > I'm a newbie, I copied this from an example somewhere to start: > > map = new OpenLayers.Map('map', > { > numZoomLevels: 19, > maxResolution: 156543.0399, > units: 'm', > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4326") > }); > > > var layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik"); > map.addLayers([layerMapnik,layerTah]); > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100207/49a1db84/attachment.html From percyd at pdx.edu Sun Feb 7 01:49:14 2010 From: percyd at pdx.edu (percy) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] arcgis server rest service problem Message-ID: <4B6E626A.2030102@pdx.edu> any idea why this rest service: http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export won't work in openlayers? I've tried debugging via rt-clicking on the gray tiles and modifying the parameters to match the parameters from the interactive page at the above address, all I get are gray tiles. It might be a problem with the TRANSPARENT=true parameter, but I just can't seem to figure out why it's not working. At the risk of being chided for my sloppy coding, here's the page I'm trying to implement it in: http://maps.ngmdb.us/OpenLayers-2.8/examples/spherical-mercator-gmna.html :-) Any help greatly appreciated. Percy -- David Percy Geospatial Data Manager Geology Department Portland State University http://gisgeek.pdx.edu 503-725-3373 From jamesmikedupont at googlemail.com Sun Feb 7 04:41:06 2010 From: jamesmikedupont at googlemail.com (jamesmikedupont@googlemail.com) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] http://gallery.openlayers.org/ is full of spam Message-ID: http://gallery.openlayers.org/ is full of spam, is anyone moderating it? mike From bartvde at osgis.nl Sun Feb 7 04:43:59 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] http://gallery.openlayers.org/ is full of spam In-Reply-To: References: Message-ID: Hi, see: http://openlayers.org/pipermail/dev/2010-February/005652.html Best regards, Bart On Feb 7, 2010, at 10:41 AM, jamesmikedupont@googlemail.com wrote: > http://gallery.openlayers.org/ is full of spam, > is anyone moderating it? > > mike > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From arnd.wippermann at web.de Sun Feb 7 07:39:30 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to make OpenLayers.Map.panTo() work? In-Reply-To: Message-ID: Hi, your result is absolute right. For sphericalMercator (180,90) are ~(0,0). You can calculate your lonlat from sphericalMercator bounds new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508) or transform your coordinates to sphericalMercator var lonlat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913")); Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Vincent Gulinao Gesendet: Sonntag, 7. Februar 2010 05:38 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] How to make OpenLayers.Map.panTo() work? Sorry, accidentally sent... I copied this from an example somewhere to start: map = new OpenLayers.Map('map', { numZoomLevels: 19, maxResolution: 156543.0399, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326") }); var layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik"); map.addLayers([layerMapnik]); Then I call this function from html drop-down list's onchange: function setCenter(region) { lon = Math.random() * 360 - 180; lat = Math.random() * 180 - 90; var lonlat = new OpenLayers.LonLat(lon, lat); map.panTo(lonlat); } ... but it only brings me to (I believe) 0,0. I've been trying to figure it out for hours but with no luck. Please help. TIA. On Sun, Feb 7, 2010 at 12:30 PM, Vincent Gulinao wrote: I'm a newbie, I copied this from an example somewhere to start: map = new OpenLayers.Map('map', { numZoomLevels: 19, maxResolution: 156543.0399, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326") }); var layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik"); map.addLayers([layerMapnik,layerTah]); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100207/0da8cf39/attachment.html From mr at marcelruff.info Sun Feb 7 16:58:27 2010 From: mr at marcelruff.info (Marcel Ruff) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to access mouse modifier during "featureselected" In-Reply-To: References: <4B61DA60.1000501@marcelruff.info> <4B6324EB.1040206@marcelruff.info> Message-ID: <4B6F3783.7010101@marcelruff.info> Ivan, thank you for your help. But I've tried this in the beginning, there is no such altKey etc. So, I'm still looking for the solution .... regards Marcel Ivan Grcic schrieb: > hi, just use firebug to browse trough evt object. should be something > like evt.altKey. ctrlKey or shiftKey i think... > cheers > > On Fri, Jan 29, 2010 at 7:11 PM, Marcel Ruff wrote: > >> Can anybody give me a hint if it is possible? >> >> Thanks >> Marcel >> >> Marcel Ruff schrieb: >> >>> Hi, >>> >>> i assume it is trivial, but i couldn't figure it out. >>> >>> When a user clicks on my markers I would like to see if it was a "Right >>> mouse click" or a "Shift Left mouse click" etc. >>> >>> How can I do this? Here is my code snippet: >>> >>> .... >>> this.markersLayer.events.register("featureselected", this.markersLayer, >>> this.__onMarkerSelect); >>> >>> ... >>> >>> this.__onMarkerSelect = function(evt) { >>> if (evt.isShiftPressed()) { // How??? >>> } >>> >>> >>> >>> >>> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- Marcel Ruff http://www.xmlBlaster.org http://watchee.net Phone: +49 7551 309371 From max.weidemann at freenet.de Mon Feb 8 01:46:09 2010 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to access mouse modifier during "featureselected" In-Reply-To: <4B6F3783.7010101@marcelruff.info> References: <4B61DA60.1000501@marcelruff.info> <4B6324EB.1040206@marcelruff.info> <4B6F3783.7010101@marcelruff.info> Message-ID: <1265611569753-4532622.post@n2.nabble.com> Hello Marcel, Try this code too find out if it is a right click. if(((evt.which) && (evt.which == 3)) || ((evt.button) && (evt.button == 2))){ //your Code } cheers Max -- View this message in context: http://n2.nabble.com/How-to-access-mouse-modifier-during-featureselected-tp4475175p4532622.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Mon Feb 8 05:13:45 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] WFS-T Update problem, wrong SRID for changed geometry In-Reply-To: <1265453794241-4524854.post@n2.nabble.com> References: <1265278602937-4512597.post@n2.nabble.com> <1265303769580-4514818.post@n2.nabble.com> <1265453794241-4524854.post@n2.nabble.com> Message-ID: <1265624025383-4533388.post@n2.nabble.com> Solved! In my map definition I add two lines: projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:900913"), I also have hanged my data in database from 4326 to 900913. Now every thing is working just fine: ADD, MODIFY and DELETE feature. cheers, Poul -- View this message in context: http://n2.nabble.com/WFS-T-Update-problem-wrong-SRID-for-changed-geometry-tp4512597p4533388.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From antoni.vidal at icc.cat Mon Feb 8 05:57:51 2010 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] WCS and OL Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D671C@CORRIOL.icc.local> Hello list, In order to offer Z on our OL client, I supose that We need a WCS service isn't it? By the other hand, I didn't found examples. Wich is the best way to get this functionality? Thank's in advance. Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogr?fic de Catalunya Parc de Montju?c, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100208/ce963326/attachment.html From kildimo at gmail.com Mon Feb 8 06:23:18 2010 From: kildimo at gmail.com (protos) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] layer loadend event Message-ID: <1265628198551-4533615.post@n2.nabble.com> Hi, I'm trying to implement animated zoom functionality in our openlayers based application. I'm doing this by : 1. Cloning the base layer, 2. Firing the 'load more tiles' event 3. While the tiles are loading in the baseLayer, displaying and scaling the cloned layer in interval steps. 4. When all the tiles are loaded I delete the cloned layer and the new tiles in the base layer should be displayed. I'm trying to use the loadend event to indicate that all the new tiles are loaded, and that cloned layer should be deleted, but this event does NOT seem to get fired when all the new tiles are loaded - it seems to get fired a long time before that - especially in all browsers except firefox. In firefox loadend still gets fired early but not quite as early as other browsers. The event gets fired, the cloned layer is deleted, and the base layer is still busy downloading and rendering the new tiles when it becomes visible ............... Do I have a wrong impression of what the loadend event does or is it just an openlayers bug ? A little bit offtopic, but I had a lot of trouble with the openlayers cloning functions as well. To me cloning should produce an identical deep copy of whatever is being cloned. Openlayers seems to produce a shallow copy of a layer with a reference back to the clonee layers grid - and if you clone a grid it references back to the clonee tiles !! Seems strange to me. Anyway - any help with the loadend thing would be very much appreciated. Cheers, Colm -- View this message in context: http://n2.nabble.com/layer-loadend-event-tp4533615p4533615.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Mon Feb 8 06:25:48 2010 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] layer loadend event In-Reply-To: <1265628198551-4533615.post@n2.nabble.com> References: <1265628198551-4533615.post@n2.nabble.com> Message-ID: Hi, I believe this functionality is already there. It's called the 'resize' transitionEffect. Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of protos Sent: Monday, February 08, 2010 12:23 PM To: users@openlayers.org Subject: [OpenLayers-Users] layer loadend event Hi, I'm trying to implement animated zoom functionality in our openlayers based application. I'm doing this by : 1. Cloning the base layer, 2. Firing the 'load more tiles' event 3. While the tiles are loading in the baseLayer, displaying and scaling the cloned layer in interval steps. 4. When all the tiles are loaded I delete the cloned layer and the new tiles in the base layer should be displayed. I'm trying to use the loadend event to indicate that all the new tiles are loaded, and that cloned layer should be deleted, but this event does NOT seem to get fired when all the new tiles are loaded - it seems to get fired a long time before that - especially in all browsers except firefox. In firefox loadend still gets fired early but not quite as early as other browsers. The event gets fired, the cloned layer is deleted, and the base layer is still busy downloading and rendering the new tiles when it becomes visible ............... Do I have a wrong impression of what the loadend event does or is it just an openlayers bug ? A little bit offtopic, but I had a lot of trouble with the openlayers cloning functions as well. To me cloning should produce an identical deep copy of whatever is being cloned. Openlayers seems to produce a shallow copy of a layer with a reference back to the clonee layers grid - and if you clone a grid it references back to the clonee tiles !! Seems strange to me. Anyway - any help with the loadend thing would be very much appreciated. Cheers, Colm -- View this message in context: http://n2.nabble.com/layer-loadend-event-tp4533615p4533615.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From kildimo at gmail.com Mon Feb 8 06:39:15 2010 From: kildimo at gmail.com (protos) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] layer loadend event In-Reply-To: References: <1265628198551-4533615.post@n2.nabble.com> Message-ID: <1265629155981-4533662.post@n2.nabble.com> Hi Kris, Thanks for the reply. I'm aware of that transition effect, but it's not exactly what we're looking for for I'm trying to implement a customized version of it. Cheers, Colm -- View this message in context: http://n2.nabble.com/layer-loadend-event-tp4533615p4533662.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bas.wolvers at movements.nl Mon Feb 8 06:45:26 2010 From: bas.wolvers at movements.nl (Bas Wolvers) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Question about radius and bounds Message-ID: <203396de1002080345n1e79d133k17743aae59777ec@mail.gmail.com> Hi Im working on a openlayer - openstreet map implementation. I was wondering can someone help me to set the closest zoomlevel when i have a latlon and a radius in km. For example i have a latlon :> 4.7500454 and 52.6316131 I want to center the map on this latlon and then zoom in to the closed zoomlevel when i have a radius of 10km (the map is always a square) I was trying with bounds but i don't know how to subtract 10 km from the latlon. Thanks in advanced. Bas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100208/ea26b43e/attachment.html From osm at tappenbeck.net Mon Feb 8 07:27:36 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] OSM-Data to OL-Map Message-ID: <4B700338.10500@tappenbeck.net> Hallo ! i found on the side of JOHN07 an example to show osm-data in OL-Maps: http://wiki.openstreetmap.org/wiki/User:John07/openlayers_osm_file I had an own example http://www.tappenbeck.net//forum/osm/ol_osm20100208.zip but the data will not show !!! can anybody have a look an help me ? regards Jan :-) From jansen at terrestris.de Mon Feb 8 07:38:50 2010 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] OSM-Data to OL-Map In-Reply-To: <4B700338.10500@tappenbeck.net> References: <4B700338.10500@tappenbeck.net> Message-ID: <4B7005DA.1090108@terrestris.de> Hi Jan, The given example in the zip-file works well for me as long as it is accessed through an localhost-URL and one zooms to left-bottom=(-8183712.4810411,2060937.2357758) right-top=(-7929330.0509536,2134775.405086) (Haiti, that is) Regards, Marc Jan Tappenbeck wrote: > Hallo ! > > i found on the side of JOHN07 an example to show osm-data in OL-Maps: > > http://wiki.openstreetmap.org/wiki/User:John07/openlayers_osm_file > > I had an own example > http://www.tappenbeck.net//forum/osm/ol_osm20100208.zip but the data > will not show !!! > > can anybody have a look an help me ? > > regards Jan :-) > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From tobias.wendorff at uni-dortmund.de Mon Feb 8 07:49:21 2010 From: tobias.wendorff at uni-dortmund.de (Tobias Wendorff) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] OSM-Data to OL-Map In-Reply-To: <4B700338.10500@tappenbeck.net> References: <4B700338.10500@tappenbeck.net> Message-ID: <4B700851.7090006@uni-dortmund.de> Hi Jan, Jan Tappenbeck schrieb: > Hallo ! "Hallo" ;-) > can anybody have a look an help me ? Orthography or OpenLayers? ;-) First of all, get some Firefox-Addons like "Firebug" and "Web Developer". Those will help you a lot. Okay, now to your problem: protocol: new OpenLayers.Protocol.HTTP({ url: "myosmfile.osm", //<-- relative or absolute URL to your .osm file format: new OpenLayers.Format.OSM() }) Put your file on a webserver - I think, this won't work on local files. Best regards, Tobias From osm at tappenbeck.net Mon Feb 8 07:44:54 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] OSM-Data to OL-Map In-Reply-To: <4B700851.7090006@uni-dortmund.de> References: <4B700338.10500@tappenbeck.net> <4B700851.7090006@uni-dortmund.de> Message-ID: Am 08.02.2010 13:49, schrieb Tobias Wendorff: > Hi Jan, > > Jan Tappenbeck schrieb: >> Hallo ! > > "Hallo" ;-) > >> can anybody have a look an help me ? > > Orthography or OpenLayers? ;-) > > First of all, get some Firefox-Addons like "Firebug" and "Web > Developer". Those will help you a lot. > > Okay, now to your problem: > protocol: new OpenLayers.Protocol.HTTP({ > url: "myosmfile.osm", //<-- relative or absolute URL to your .osm file > format: new OpenLayers.Format.OSM() > }) > > Put your file on a webserver - I think, this won't work on local files. > > Best regards, > Tobias thanks - oder auch danke ! regards Jan :-) From adube at mapgears.com Mon Feb 8 08:33:54 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Modify object other then from muse click In-Reply-To: <1265150664424-4504224.post@n2.nabble.com> References: <1265150664424-4504224.post@n2.nabble.com> Message-ID: <4B7012C2.60703@mapgears.com> Hi, The ModifyFeature control has its own SelectFeature control, so you could do the following when your checkbox is checked : var features = youVectorLayer.selectedFeatures; for(i=0; i Hi! > > I hope some of more experiences OpenLayers users could help me with my next > problem. I have a line goemetry on map that I can select and modify. When I > click on road on map the info about road is presented on the right of the > page in 'Information' fieldset. > > http://img3.imageshack.us/img3/5350/77062173.jpg > > The object parameters can not be changed, unless the checkbox is checked. > > http://img693.imageshack.us/img693/7809/44422866.jpg > > If it is, the control is changed from select to modify. But I have to click > twice on that geometry to modify it. First I click on it and I unselect > geometry > > http://img685.imageshack.us/img685/761/74394384.jpg > > Second I click and I can modify the geometry. > > http://img191.imageshack.us/img191/7878/45033082.jpg > > The goal is to achieve functionality that after changing checkbox to true > the selected line on a map would change to modify mode. Without the double > clicking on it. Just changing the style (I mean mode but this is maybe more > clearly) of geometry on the map from select to modify by changing the > checkbox mode. Is it possible ?? I may show you my code if you would like. > Please... any ideas would be good... > > BTW... Sorry for my poor English > > Thanks, > Poul > > -- Alexandre Dub? Mapgears www.mapgears.com From paweluz at o2.pl Mon Feb 8 09:06:19 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Modify object other then from muse click In-Reply-To: <4B7012C2.60703@mapgears.com> References: <1265150664424-4504224.post@n2.nabble.com> <4B7012C2.60703@mapgears.com> Message-ID: <1265637979618-4534285.post@n2.nabble.com> Hi! Thanks for your help but unfortunately it does not work. Here is my code: My controlls drawControls = { chooseobject: new OpenLayers.Control.SelectFeature( zielona_wfs, { onSelect: onFeatureSelect } ), modify_wfs_layer: new OpenLayers.Control.ModifyFeature(zielona_wfs) .... }; Getting the feature function onFeatureSelect(feature) { .... selectedfeature = feature; ... } Checkbox Onclick method function edit_object() { if (document.getElementById('checkbox_editable').checked==true) { ..... for(var i=0; i Hi! I am using WFS layer on may map with modify and select control. After I zoom in or out the selected geometry in no longer selected. This same goes with modify. Is there a way, maybe some option on map that allows to remember selection. Or maybe there is a way to select this feature from code?? How to do this?? Regards, Poul -- View this message in context: http://n2.nabble.com/Selection-disappears-after-zooming-tp4534320p4534320.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Steve.Toutant at inspq.qc.ca Mon Feb 8 10:01:28 2010 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] problem with empty baselayer and google Message-ID: Hi, I have a problem using an empty base layer with a google layer. They are defined like this var googleH = new OpenLayers.Layer.Google( "Google Hybrid", { type: G_HYBRID_MAP, 'sphericalMercator': true} ); var aucunContexte = new OpenLayers.Layer("AucunContexte",{isBaseLayer: true}); I have an overlay layer var overlay = new OpenLayers.Layer.WMS('RSS', 'http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=MAPCA&',{layers: 'RSS', transparent: "true", format:"image/gif"},{isBaseLayer: false, visibility: true,singleTile:true}); When the empty layer and the overlay layer are visible by default when the application opens, everyting is fine. But if I switch to the google hybrid layer, I see only one tile at the upper left corner But, if the applications loads with the hybrid and overlay layer visible, this problem does not occur. i can switch to the empty layer without problem. I also tried with this, but the result is the same. var aucunContexte = new OpenLayers.Layer("AucunContexte",{isBaseLayer: true, maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34)}); Here is the mapOptions var mapOptions = { projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher les coord lat long units: "m", maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), controls: [],//on les d?finit plus loin numZoomLevels: 20 }; What could be the problem? Thanks Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100208/7acbc882/attachment.html From adube at mapgears.com Mon Feb 8 10:33:15 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Modify object other then from muse click In-Reply-To: <1265637979618-4534285.post@n2.nabble.com> References: <1265150664424-4504224.post@n2.nabble.com> <4B7012C2.60703@mapgears.com> <1265637979618-4534285.post@n2.nabble.com> Message-ID: <4B702EBB.5020009@mapgears.com> Poul, you already keep track of your feature when selecting it with your SelectFeature control : selectedfeature = feature; so you don't need to make any loop (you should also deactivate the SelectFeature control too and do the opposite when your checkbox is unchecked): if (document.getElementById('checkbox_editable').checked==true) { alert("Watch out!!!"); drawControls["chooseobject"].unselect(selectedfeature); drawControls["chooseobject"].deactivate(); drawControls["modify_wfs_layer"].selectControl.select(selectedfeature); drawControls["modify_wfs_layer"].activate(); .... } else { // do the opposite... } Regards, Alexandre paweluz wrote: > Hi! > > Thanks for your help but unfortunately it does not work. Here is my code: > > My controlls > > drawControls = { > chooseobject: new OpenLayers.Control.SelectFeature( > zielona_wfs, > { > onSelect: onFeatureSelect > } > ), > modify_wfs_layer: new OpenLayers.Control.ModifyFeature(zielona_wfs) > .... > }; > > Getting the feature > > function onFeatureSelect(feature) { > .... > selectedfeature = feature; > ... > } > > Checkbox Onclick method > > function edit_object() > { > if (document.getElementById('checkbox_editable').checked==true) > { > > ..... > for(var i=0; i { > alert("Watch out!!!"); > drawControls["chooseobject"].unselect(selectedfeature[i]); > > drawControls["modify_wfs_layer"].selectControl.select(selectedfeature[i]); > } > drawControls["modify_wfs_layer"].activate(); > .... > } > } > > The alert does not appear even once! I checked in firebug that > selectedfeature is not empty. This is a screen from firebug > > http://i47.tinypic.com/2dwarzr.jpg > > I am not sure about the length property?? What do you thing. Maybe I made so > mistake?? > > Cheers, > Poul > > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Mon Feb 8 10:39:47 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Selection disappears after zooming In-Reply-To: <1265638334339-4534320.post@n2.nabble.com> References: <1265638334339-4534320.post@n2.nabble.com> Message-ID: <4B703043.60901@mapgears.com> Poul, If your features have some sort of unique attribute value, you could register a map "moveend" event to manually keep track of your selected features from this kind of attribute. You could also take a look at the Vector.js "getFeatureFromEvent" method (looks like it could do what you want). Regards, Alexandre paweluz wrote: > Hi! > > I am using WFS layer on may map with modify and select control. After I zoom > in or out the selected geometry in no longer selected. This same goes with > modify. Is there a way, maybe some option on map that allows to remember > selection. Or maybe there is a way to select this feature from code?? How to > do this?? > > Regards, > Poul > > > -- Alexandre Dub? Mapgears www.mapgears.com From guillaume at cogesaf.qc.ca Mon Feb 8 11:53:43 2010 From: guillaume at cogesaf.qc.ca (Guillaume) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Using a proxy for WMS not WFS Message-ID: <000301caa8df$463210a0$d29631e0$@qc.ca> Hello, I have a problem I?ve never encountered on forums before. Every topics deals with proxy for WFS service and getcapabilities request, but I would like to use a proxy for WMS service and getdata. I use OpenLayers to interrogate several WMS services. One of this service (private) is not hide behind a DNS and use the port 8080, so the address is http://ip:8080/cgi-bin//mapserv.exe. For most of the users, everything works fine. But for some users highly protected like government, they can?t see the layers form this WMS service because their security doesn?t allow such addresses. So I would like to use a proxy to hide WMS addresses to users. The proxy installed on my apache server is cURL. The best would be to use this proxy only for the WMS service that causes problems. All examples I?ve seen on internet deal with WFS services and html/xml response. Would it be better to force the WMS service in question to hide his ip behind a DNS ? Is ?openlayer.proxyhost? usefull for such case and how to use cURL instead of the proxy.cgi in OpenLayer?s examples which use is not allowed by my webmaster? Is it a case that require modifications in the code of the openlayer.js file ? Thanks a lot ! Guillaume Lef?vre Charg? de projet, Portail de l'eau COGESAF 5182, Boul. Bourque Sherbrooke (QC) J1N 1H4 T?l?phone (819) 864-1033 poste 24 T?l?copieur (819) 864-1864 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100208/bb0e1304/attachment.html From ahocevar at opengeo.org Mon Feb 8 12:07:58 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] problem with empty baselayer and google In-Reply-To: References: Message-ID: <4B7044EE.8020108@opengeo.org> Hi, a lot of these google and baselayer issues have been fixed recently. Are you seeing his problem with OpenLayers 2.8 or trunk? If the latter, then please create a ticket. If the former, then please try a nightly build or check out trunk from svn. Regards, Andreas. Steve.Toutant@inspq.qc.ca wrote: > > Hi, > I have a problem using an empty base layer with a google layer. They > are defined like this > var googleH = new OpenLayers.Layer.Google( "Google Hybrid", { type: > G_HYBRID_MAP, 'sphericalMercator': true} ); > var aucunContexte = new OpenLayers.Layer("AucunContexte",{isBaseLayer: > true}); > > I have an overlay layer > var overlay = new OpenLayers.Layer.WMS('RSS', > 'http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=MAPCA&',{layers: > 'RSS', transparent: "true", format:"image/gif"},{isBaseLayer: false, > visibility: true,singleTile:true}); > > When the empty layer and the overlay layer are visible by default when > the application opens, everyting is fine. But if I switch to the > google hybrid layer, I see only one tile at the upper left corner > But, if the applications loads with the hybrid and overlay layer > visible, this problem does not occur. i can switch to the empty layer > without problem. > > I also tried with this, but the result is the same. > var aucunContexte = new OpenLayers.Layer("AucunContexte",{isBaseLayer: > true, maxResolution: 156543.0339, maxExtent: new > OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, > 20037508.34)}); > > Here is the mapOptions > var mapOptions = { > projection: "EPSG:900913", > displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour > afficher les coord lat long > units: "m", > maxResolution: 156543.0339, > maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, > 20037508.34, 20037508.34), > controls: [],//on les d?finit plus loin > numZoomLevels: 20 > }; > > What could be the problem? > Thanks > Steve > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From crschmidt at metacarta.com Mon Feb 8 13:34:17 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Migration of Trac/SVN to OSGeo Message-ID: <20100208183417.GD11294@metacarta.com> Hi, In order to shift the OpenLayers trac/svn services off of a server that is being decommissioned, it would be beneficial to have OpenLayers developers: * Register for an OSGeo Account: https://www.osgeo.org/cgi-bin/ldap_create_user.py * List their names under: http://trac.openlayers.org/wiki/OSGeoAccounts Thanks, -- Christopher Schmidt MetaCarta From me at dylanparry.com Mon Feb 8 14:20:51 2010 From: me at dylanparry.com (Dylan Parry) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Error in IE8 In-Reply-To: <29133850.1361265656658443.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> Message-ID: <12787219.1381265656849027.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> Hi folks, I?m getting the following error when attempting to view an OpenLayers-based page in IE8: ---- Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729) Timestamp: Mon, 8 Feb 2010 19:10:49 UTC Message: 'undefined' is null or not an object Line: 797 Char: 204 Code: 0 URI: http://openlayers.org/api/OpenLayers.js ---- Has anyone else experienced such an error? once the page has finished loading all I see is the OpenLayers UI but there is no base mapping showing and the zoom and layers controls appear to be empty. When put into compatibility mode I don?t even get that much, just an empty space where the map should be. The page in question works fine in every other browser that I have tested in. Cheers, -- Dylan Parry From forums at 2kgt.com Mon Feb 8 17:22:23 2010 From: forums at 2kgt.com (HKChad) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] WFSDescribeFeatureType with complex type element ref Message-ID: <1265667743917-4537546.post@n2.nabble.com> I have a WFS that includes some complex types as element ref's in the schema. The WFSDescribeFeatureType parser is choking on them and throwing the error 'TypeError: fullType.split is not a function'. I have a sample here, http://www.2kgt.com/test/WFSDescribeFeatureType.html The error gets thrown on line 119 in the file above where I call, res2 = parser.read(broken); My schema that I'm trying to parse contains many more of these types but the samples I have provided demonstrate the issue that I'm running into. The '' is where I believe the parser is having troubles. I tried to look through the WFSDescribeFeatureType.js but couldn't figure out what needed to be changed to get it to recognize these complex ref's. Any help would be appreciated. Thanks, Chad -- View this message in context: http://n2.nabble.com/WFSDescribeFeatureType-with-complex-type-element-ref-tp4537546p4537546.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jbloc1878 at googlemail.com Mon Feb 8 17:36:31 2010 From: jbloc1878 at googlemail.com (jbloc1878@googlemail.com) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Drawing and labelling a circle in openlayers 2.7. Message-ID: <76F84314-DDE5-438E-926C-E6C127EA129C@googlemail.com> Hi does anyone have a code example of drawing a circle within open layers 2.7? I was Reading through the open layers documentation but cannot get it to work, also I am not sure if it is only for 2.8. Also is it possible to label the circle with some text? Or any shape for that matter polygon or line? Thanks for any help in advance Jay From brian.stempin at gmail.com Mon Feb 8 18:58:09 2010 From: brian.stempin at gmail.com (Brian Stempin) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Possible bug with Protocol.WFS Message-ID: <351785351002081558q34afbfa7nb9e0f13dba5f31e8@mail.gmail.com> Hi all, I've been working with a few people on #openlayers to help me out with a WFS issue. I'm posting this to the list because I may have found a bug in the process. So, at one point, I packaged some of my WFS output into an XML file and tschaub wrote the following example for me (which worked, http://astro.temple.edu/~tub09307/tschaub.html): > > > Brian's Data > > > >
> >
> > > I then modified it to this, which did not work: > > > Brian's Data > > > > >
> > > > I found that the above code will work if you add srsName: "EPSG:900913" to the WFS options. Is this a feature/bug/magic, or me being silly? Thanks, Brian Stempin brian.stempin@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100208/af452a33/attachment.html From igrcic at gmail.com Tue Feb 9 03:01:05 2010 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to access mouse modifier during "featureselected" In-Reply-To: <1265611569753-4532622.post@n2.nabble.com> References: <4B61DA60.1000501@marcelruff.info> <4B6324EB.1040206@marcelruff.info> <4B6F3783.7010101@marcelruff.info> <1265611569753-4532622.post@n2.nabble.com> Message-ID: Oh yes, as i see feature handler doesnt have same evt attribs as click handler does... so you need to catch click handler of feature handler somehow :| On Mon, Feb 8, 2010 at 7:46 AM, Max Weidemann wrote: > > Hello Marcel, > > Try this code too find out if it is a right click. > > if(((evt.which) && (evt.which == 3)) || > ? ? ? ? ? ? ? ?((evt.button) && (evt.button == 2))){ > //your Code > } > > cheers > Max > -- > View this message in context: http://n2.nabble.com/How-to-access-mouse-modifier-during-featureselected-tp4475175p4532622.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From ahocevar at opengeo.org Tue Feb 9 03:45:24 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Possible bug with Protocol.WFS In-Reply-To: <351785351002081558q34afbfa7nb9e0f13dba5f31e8@mail.gmail.com> References: <351785351002081558q34afbfa7nb9e0f13dba5f31e8@mail.gmail.com> Message-ID: <4B7120A4.7070701@opengeo.org> Hi, Brian Stempin wrote: > I've been working with a few people on #openlayers to help me out with > a WFS issue. I'm posting this to the list because I may have found a > bug in the process. > > > protocol:new OpenLayers.Protocol.WFS({ > version: "1.1.0", > //url: "test.xml", > // modified by bstempi > url: "/geoserver/wms", > featureType: "v_stats_20090101_000000", > featureNS: "http://192.168.0.20/geoserver/wms", > geometryName: "the_geom" > }) > }); > > > I found that the above code will work if you add srsName: > "EPSG:900913" to the WFS options. > > Is this a feature/bug/magic, or me being silly? You mean it works if you add that to the protocol options, right? That's the way it is done. The BBOX strategy will use map coordinates (EPSG:900913), and the protocol would think they are in the default SRS for the feature type if you don't tell it what the SRS is. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From normanmann at btinternet.com Tue Feb 9 04:14:14 2010 From: normanmann at btinternet.com (NORMAN MANN) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] OpenLayers used with OS on demand? Message-ID: <203180.39948.qm@web86204.mail.ird.yahoo.com> Hi all, ? I am new to GIS, and definately OpenLayers. ? Does anyone know if OpenLayers can be used with the OS on Demand WMS? ? http://www.ordnancesurvey.co.uk/oswebsite/services/osondemand/ ? I have tried many examples, but can't get it to serve tiles of the location I want. Well, no tiles at all. ? I think its a problem with the BBOX parameters being generated by OpenLayers and sent to the WMS. I have tried various options with the Map (projection etc), but still cannot get it to work. Does anyone know if it can work, and if so, does anyone have any examples? ? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100209/68f07871/attachment.html From mamyashev.marat at gmail.com Tue Feb 9 06:36:04 2010 From: mamyashev.marat at gmail.com (=?UTF-8?B?0JzQsNGA0LDRgg==?=) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] tilecache Message-ID: Hi, I've got quiete a trouble here: 1) tilecache is set up the way you have one resolution per one level. Actually when I use some direct request to get tile like http://tileserver.com/lv1/ the next request goes to ttp:// tileserver.com/lv2/. Lv is just a zoom here. And lv1 is actually the first level. 2) JS goes like this var resolutions = [ 60000, ....15 more ]; function init(){ map = new OpenLayers.Map( 'map', { projection: new OpenLayers.Projection("EPSG:3395"), resolutions: resolutions //?!? }); for (var i = 0; i<=15; i++) { var layer = new OpenLayers.Layer.TileCache("TileCache Layer", ["htttp://tileserver.com/"], ('lv'+(i+1)), {serverResolutions: resolutions[i]} ); map.addLayer(layer); } map.setCenter(new OpenLayers.LonLat(0, 0), 0); } 3) Interseting is that the first tile gets well but I don't get further. Any ideas how to handle this? -- ____________________________________ Summa cum pietate, Marat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100209/bd5b9f6b/attachment.html From paweluz at o2.pl Tue Feb 9 07:28:16 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Modify object other then from muse click In-Reply-To: <4B702EBB.5020009@mapgears.com> References: <1265150664424-4504224.post@n2.nabble.com> <4B7012C2.60703@mapgears.com> <1265637979618-4534285.post@n2.nabble.com> <4B702EBB.5020009@mapgears.com> Message-ID: <1265718496976-4540752.post@n2.nabble.com> Hi Alexandre! Thanks for your help. The first part works just great. But there is an error in the second part, when I change the status of checkbox from true to false. My code is below: else { drawControls["modify_wfs_layer"].unselect(selectedfeature); drawControls["modify_wfs_layer"].deactivate(); drawControls["chooseobject"].selectControl.select(selectedfeature); drawControls["chooseobject"].activate(); } I got an error that: drawControls.modify_wfs_layer.unselect is not a function When I comment line drawControls["modify_wfs_layer"].unselect(selectedfeature); then I got an error: drawControls.chooseobject.selectControl is undefined Do you know what is wrong in here?? Cheers, Poul -- View this message in context: http://n2.nabble.com/Modify-object-other-then-from-muse-click-tp4504224p4540752.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ibrahimsaricicek at gmail.com Tue Feb 9 09:08:41 2010 From: ibrahimsaricicek at gmail.com (ibrahimsaricicek) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Adobe Flex Message-ID: <1265724521380-4541204.post@n2.nabble.com> Hi all; is there someone, developed applications with Adobe Flex and Openlayers. Is there an examle page? Regards.. -- View this message in context: http://n2.nabble.com/Adobe-Flex-tp4541204p4541204.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From maxime.phaneuf at usherbrooke.ca Tue Feb 9 09:12:00 2010 From: maxime.phaneuf at usherbrooke.ca (Maxime Phaneuf) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Delete layer.vector on a map In-Reply-To: <1265724037644-4541171.post@n2.nabble.com> References: <1265713860515-4540464.post@n2.nabble.com> <1265724037644-4541171.post@n2.nabble.com> Message-ID: <1265724720227-4541229.post@n2.nabble.com> Hi, I think you have an error because you're removing layer[1], and right after that, you're trying to destroy a layer that is already removed for the map's list of layer. I suppose you could just destroy the layer, or you could just remove it and refresh the map object. Maxime -- View this message in context: http://n2.nabble.com/Delete-layer-vector-on-a-map-tp4540464p4541229.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From maxime.phaneuf at usherbrooke.ca Tue Feb 9 10:03:24 2010 From: maxime.phaneuf at usherbrooke.ca (Maxime Phaneuf) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Delete layer.vector on a map In-Reply-To: <1265726273411-4541360.post@n2.nabble.com> References: <1265713860515-4540464.post@n2.nabble.com> <1265724037644-4541171.post@n2.nabble.com> <1265724720227-4541229.post@n2.nabble.com> <1265726273411-4541360.post@n2.nabble.com> Message-ID: <1265727804897-4541517.post@n2.nabble.com> Hello, Since you removed the layer from the map, you cannot use map.layer[1].destroy(). You can still use the destroy() function, but you'll have to use it on the layer variable directly. For example: var myLayer = new OpenLayers.Layer.XXX map.removeLayer(map.layer[1]) //map.layer[1].destroy() myLayer.destroy(); Hope this helps Maxime -- View this message in context: http://n2.nabble.com/Delete-layer-vector-on-a-map-tp4540464p4541517.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From etienne.desgagne at roche.ca Tue Feb 9 11:04:07 2010 From: etienne.desgagne at roche.ca (Etides) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Different Projection transformation for EPSG:3785 between Oracle and OL Message-ID: <1265731447595-4541907.post@n2.nabble.com> Hi, I'm using Oracle Spatial to transform some polygon features from EPSG:4326 to the Google Spherical projection EPSG:3785 and it give me a different result than when projecting my features in a vector layer in OpenLayer to use with a Google base map. I have a difference of about 5km. Here is the WKT definition of the EPSG:3785 projection of Oracle: PROJCS["Popular Visualisation CRS / Mercator", GEOGCS [ "Popular Visualisation CRS", DATUM ["Popular Visualisation Datum (EPSG ID 6055)", SPHEROID ["Popular Visualisation Sphere (EPSG ID 7059)", 6378137, 1000000000000]], PRIMEM [ "Greenwich", 0.000000 ], UNIT ["Decimal Degree", 0.01745329251994328]], PROJECTION ["Popular Visualisation Mercator"], UNIT ["Meter", 1]] Someone has an idea what is the cause of this transformation difference? Thanks a lot Etienne -- View this message in context: http://n2.nabble.com/Different-Projection-transformation-for-EPSG-3785-between-Oracle-and-OL-tp4541907p4541907.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tschaub at opengeo.org Tue Feb 9 11:47:38 2010 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Possible bug with Protocol.WFS In-Reply-To: <4B7120A4.7070701@opengeo.org> References: <351785351002081558q34afbfa7nb9e0f13dba5f31e8@mail.gmail.com> <4B7120A4.7070701@opengeo.org> Message-ID: <4B7191AA.2080506@opengeo.org> Andreas Hocevar wrote: > Hi, > > Brian Stempin wrote: >> I've been working with a few people on #openlayers to help me out with >> a WFS issue. I'm posting this to the list because I may have found a >> bug in the process. >> >> >> protocol:new OpenLayers.Protocol.WFS({ >> version: "1.1.0", >> //url: "test.xml", >> // modified by bstempi >> url: "/geoserver/wms", >> featureType: "v_stats_20090101_000000", >> featureNS: "http://192.168.0.20/geoserver/wms", >> geometryName: "the_geom" >> }) >> }); >> >> >> I found that the above code will work if you add srsName: >> "EPSG:900913" to the WFS options. >> >> Is this a feature/bug/magic, or me being silly? > > You mean it works if you add that to the protocol options, right? That's > the way it is done. The BBOX strategy will use map coordinates > (EPSG:900913), and the protocol would think they are in the default SRS > for the feature type if you don't tell it what the SRS is. > Right. Sorry I stopped short of making it work for your WFS (as an aside, though GeoServer is lenient with your /geoserver/wms url above, it might be less misleading to use /geoserver/ows or /geoserver/wfs - no real difference if you are sending the SERVICE parameter, but it is less confusing to the reader). One way you could have determined what was wrong was to examine the outgoing GetFeature request. In Firebug, you should see the POST request being issued. Looking at the body of the request, I imagine you'll see an element representing the bounding box with an srsName attribute of "EPSG:4326". It is a shortcoming of the protocol that it doesn't try to guess the srsName from the layer projection. I'll ticket this. In the meantime, you should set srsName explicitly in the protocol options if it differs from "EPSG:4326". The reason it is settable (instead of always derived from the layer projection) is that some servers may require an srsName that cannot be derived from the layer projection (as things currently stand). Thanks for the patience. Tim > Regards, > Andreas. > -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From tschaub at opengeo.org Tue Feb 9 11:58:44 2010 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Possible bug with Protocol.WFS In-Reply-To: <4B7191AA.2080506@opengeo.org> References: <351785351002081558q34afbfa7nb9e0f13dba5f31e8@mail.gmail.com> <4B7120A4.7070701@opengeo.org> <4B7191AA.2080506@opengeo.org> Message-ID: <4B719444.6060003@opengeo.org> Tim Schaub wrote: > Andreas Hocevar wrote: >> Hi, >> >> Brian Stempin wrote: >>> I've been working with a few people on #openlayers to help me out with >>> a WFS issue. I'm posting this to the list because I may have found a >>> bug in the process. >>> >>> >>> protocol:new OpenLayers.Protocol.WFS({ >>> version: "1.1.0", >>> //url: "test.xml", >>> // modified by bstempi >>> url: "/geoserver/wms", >>> featureType: "v_stats_20090101_000000", >>> featureNS: "http://192.168.0.20/geoserver/wms", >>> geometryName: "the_geom" >>> }) >>> }); >>> >>> >>> I found that the above code will work if you add srsName: >>> "EPSG:900913" to the WFS options. >>> >>> Is this a feature/bug/magic, or me being silly? >> You mean it works if you add that to the protocol options, right? That's >> the way it is done. The BBOX strategy will use map coordinates >> (EPSG:900913), and the protocol would think they are in the default SRS >> for the feature type if you don't tell it what the SRS is. >> > > Right. Sorry I stopped short of making it work for your WFS (as an > aside, though GeoServer is lenient with your /geoserver/wms url above, > it might be less misleading to use /geoserver/ows or /geoserver/wfs - no > real difference if you are sending the SERVICE parameter, but it is less > confusing to the reader). > > One way you could have determined what was wrong was to examine the > outgoing GetFeature request. In Firebug, you should see the POST > request being issued. Looking at the body of the request, I imagine > you'll see an element representing the bounding box with an srsName > attribute of "EPSG:4326". It is a shortcoming of the protocol that it > doesn't try to guess the srsName from the layer projection. I'll ticket > this. Scratch that. The protocol doesn't know about the layer. Hmmmm. > > In the meantime, you should set srsName explicitly in the protocol > options if it differs from "EPSG:4326". The reason it is settable > (instead of always derived from the layer projection) is that some > servers may require an srsName that cannot be derived from the layer > projection (as things currently stand). > > Thanks for the patience. > > Tim > >> Regards, >> Andreas. >> > > -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From eric.lemoine at camptocamp.com Tue Feb 9 12:07:23 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Possible bug with Protocol.WFS In-Reply-To: <4B719444.6060003@opengeo.org> References: <351785351002081558q34afbfa7nb9e0f13dba5f31e8@mail.gmail.com> <4B7120A4.7070701@opengeo.org> <4B7191AA.2080506@opengeo.org> <4B719444.6060003@opengeo.org> Message-ID: On Tuesday, February 9, 2010, Tim Schaub wrote: > Tim Schaub wrote: >> Andreas Hocevar wrote: >>> Hi, >>> >>> Brian Stempin wrote: >>>> I've been working with a few people on #openlayers to help me out with >>>> a WFS issue. ?I'm posting this to the list because I may have found a >>>> bug in the process. >>>> >>>> >>>> ? ? ? ? ? ? ? ? ? ? protocol:new OpenLayers.Protocol.WFS({ >>>> ? ? ? ? ? ? ? ? ? ? ? ? version: "1.1.0", >>>> ? ? ? ? ? ? ? ? ? ? ? ? //url: "test.xml", >>>> ? ? ? ? ? ? ? ? ? ? ? ? // modified by bstempi >>>> ? ? ? ? ? ? ? ? ? ? ? ? url: "/geoserver/wms", >>>> ? ? ? ? ? ? ? ? ? ? ? ? featureType: "v_stats_20090101_000000", >>>> ? ? ? ? ? ? ? ? ? ? ? ? featureNS: "http://192.168.0.20/geoserver/wms", >>>> ? ? ? ? ? ? ? ? ? ? ? ? geometryName: "the_geom" >>>> ? ? ? ? ? ? ? ? ? ? }) >>>> ? ? ? ? ? ? ? ? }); >>>> >>>> >>>> I found that the above code will work if you add srsName: >>>> "EPSG:900913" to the WFS options. >>>> >>>> Is this a feature/bug/magic, or me being silly? >>> You mean it works if you add that to the protocol options, right? That's >>> the way it is done. The BBOX strategy will use map coordinates >>> (EPSG:900913), and the protocol would think they are in the default SRS >>> for the feature type if you don't tell it what the SRS is. >>> >> >> Right. ?Sorry I stopped short of making it work for your WFS (as an >> aside, though GeoServer is lenient with your /geoserver/wms url above, >> it might be less misleading to use /geoserver/ows or /geoserver/wfs - no >> real difference if you are sending the SERVICE parameter, but it is less >> confusing to the reader). >> >> One way you could have determined what was wrong was to examine the >> outgoing GetFeature request. ?In Firebug, you should see the POST >> request being issued. ?Looking at the body of the request, I imagine >> you'll see an element representing the bounding box with an srsName >> attribute of "EPSG:4326". ?It is a shortcoming of the protocol that it >> doesn't try to guess the srsName from the layer projection. ?I'll ticket >> this. > > Scratch that. ?The protocol doesn't know about the layer. ?Hmmmm. The strategy does, so it could pass the srsName to the protocol. Just an idea... I'm not sure this is relevant. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From curtis at the-jensens.org Tue Feb 9 14:08:35 2010 From: curtis at the-jensens.org (Curtis Jensen) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] TMS Overlay on WMS Message-ID: I'm trying to overlay a TMS on a WMS. The TMS appears to be configured for a specific max extend. If I don't use that max extend in my WMS, then the TMS overlays on top the entire world, instead of the area it is suppose to. Below is the WMS example that I've modified to have an TMS overlay. I can't get it to work without having the max extends set. However, I would like to have the whole world shown and the TMS scaled and translated to the correct location. Is this doable? Thanks, Curtis

WMS Example

Shows the basic use of openlayers using a WMS layer

This is an example of how to add an WMS layer to the OpenLayers window. The images are tiled in this instance if you wanted to not use a tiled WMS please use this example and pass the option ?singleTile? as true.
From jb_adams at verizon.net Tue Feb 9 15:50:02 2010 From: jb_adams at verizon.net (J. Brian Adams) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Map doesn't load in Internet Explorer Message-ID: <1C19AEE4-8EB4-4A58-AC9B-14E3E3AD7FB5@verizon.net> I have written several OL applications that work well on OS X using Firefox, Safari, and Chrome, but when I pass them on to colleagues using Windows and IE they all say the same thing. The maps do not load at all. They do, however, work fine on Windows if we use one of the other browsers. i checked this behavior on a borrowed PC away from the office and yes the maps do not load at all. Any thoughts on specific IE problems that might cause this type of behavior? Brian From madair at dmsolutions.ca Tue Feb 9 15:56:07 2010 From: madair at dmsolutions.ca (Mike Adair) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Map doesn't load in Internet Explorer In-Reply-To: <1C19AEE4-8EB4-4A58-AC9B-14E3E3AD7FB5@verizon.net> References: <1C19AEE4-8EB4-4A58-AC9B-14E3E3AD7FB5@verizon.net> Message-ID: <4B71CBE7.9080107@dmsolutions.ca> First thing to check is that you don't have any extraneous commas in your JSON structures, eg.: var jsonData = { propertyA: "valueA", propertyB: "valueB", <--- this comma will break IE }; Mike J. Brian Adams wrote: > I have written several OL applications that work well on OS X using > Firefox, Safari, and Chrome, but when I pass them on to colleagues > using Windows and IE they all say the same thing. The maps do not load > at all. They do, however, work fine on Windows if we use one of the > other browsers. > > i checked this behavior on a borrowed PC away from the office and yes > the maps do not load at all. > > Any thoughts on specific IE problems that might cause this type of > behavior? > > Brian > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Michael Adair Senior Software Architect DM Solutions Group Inc. Office: (613) 565-5056 x26 madair@dmsolutions.ca http://www.dmsolutions.ca http://research.dmsolutions.ca From crschmidt at metacarta.com Tue Feb 9 15:59:40 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Map doesn't load in Internet Explorer In-Reply-To: <1C19AEE4-8EB4-4A58-AC9B-14E3E3AD7FB5@verizon.net> References: <1C19AEE4-8EB4-4A58-AC9B-14E3E3AD7FB5@verizon.net> Message-ID: <20100209205939.GA24279@metacarta.com> On Tue, Feb 09, 2010 at 03:50:02PM -0500, J. Brian Adams wrote: > I have written several OL applications that work well on OS X using > Firefox, Safari, and Chrome, but when I pass them on to colleagues > using Windows and IE they all say the same thing. The maps do not load > at all. They do, however, work fine on Windows if we use one of the > other browsers. > > i checked this behavior on a borrowed PC away from the office and yes > the maps do not load at all. > > Any thoughts on specific IE problems that might cause this type of > behavior? OL.Layer("I see this", {'all': 'the', 'time': '(extra_comma)',}); map.addLayers([this,too,]); IE doesn't support trailing commas in lists or hashes, however, if your code works on Safari, you're likely already not doing that. Other than those obvious issues, you'll need an IE debugger (Visual Studio 2008 works great, but costs money) to find more complex errors. Regards, -- Christopher Schmidt MetaCarta From fewayne at wisc.edu Tue Feb 9 16:22:48 2010 From: fewayne at wisc.edu (Rick Wayne) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Wanted: WFS and WCS clients Message-ID: <49A42D55-C6D8-4424-B39F-3BB218BDC156@wisc.edu> Hey all, We're developing a desktop app which will incorporate some geodata. A full dataset for our area (the state of Wisconsin) is way too big to download or even install with the desktop app, so we're planning to provide a download service where users can define an area of interest (AOI) and automatically download the geodata. We have the imagery available via WCS, the vector data via WFS, and a composite view via WMS for AOI-picking. A key point here is that our users run the gamut from very sophisticated GIS experts down to people who have trouble copying a file using Windows Explorer. So the traditional download-shapefiles-and-images path won't do at all, we'd spend endless hours explaining that shape "files" are really sets of files, etc. etc. Instead, we need a seamless process where the user selects an AOI and presses one button -- hey presto, the geodata are available in the desktop app! Building the AOI picker is easy, of course, any of you could do it in your sleep. But that "hey presto" part...hmm. Anybody know of a library or component that will read a WFS feed (i.e., GML) and insert the geometry into a geodatabase? (We're planning on SpatialLite at this point.) Likewise, is there easily-accessible code that will construct, say, a GeoTIFF from a WCS call? I know of applications that do these things (e.g. uDig or QGIS for WFS, and svSIG for WCS), but of course would rather use a library than trying to port code. Your pardon if this is somewhat off-topic; my excuse is (a) the AOI- picker will use OpenLayers, and (b) this is a rather knowledgeable set of developers! If you prefer to contact me off-list, feel free, and I'll summarize and post anything useful that we find. TIA, rw UW Soil Science Madison, WI From p.scadden at gns.cri.nz Tue Feb 9 20:07:47 2010 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] "srs" contains unacceptable value with WMS from ARCGIS server In-Reply-To: <52B5AE411DD44F0384000E8D0E20109D@flshedu.usherbrooke.ca> References: <52B5AE411DD44F0384000E8D0E20109D@flshedu.usherbrooke.ca> Message-ID: <4B7206E3.2010802@gns.cri.nz> Trying to combine layer from Arcgis WMS service with google and I get the above. In arc, the resource is in ESPG:102113 which is apparently the same as 900913. Arcgis 9.4 will support the official ESPG:3785 but no way to force a 900913. So can I fudge this somehow on the openlayers end? I want to use Arcgis server rather geoserver etc (also available) because I have a lot of features crossing 180 degree line and others are too stupid to handle this. -- Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232 Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From osm at tappenbeck.net Tue Feb 9 23:45:40 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] help to show gpx-tracks Message-ID: <4B7239F4.8010909@tappenbeck.net> hi ! i create a simple map for haiti and want to show two gpx-tracks. but the tracks will not show. can anybody have a look ?? here is the link: http://www.tappenbeck.net/osm/haiti/index_new.php?id=1&type=5&zoom=12&lat=18.57882&lon=-72.27869 regards Jan :-) From crschmidt at metacarta.com Wed Feb 10 00:03:29 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] help to show gpx-tracks In-Reply-To: <4B7239F4.8010909@tappenbeck.net> References: <4B7239F4.8010909@tappenbeck.net> Message-ID: <20100210050329.GD24279@metacarta.com> On Wed, Feb 10, 2010 at 05:45:40AM +0100, Jan Tappenbeck wrote: > hi ! > > i create a simple map for haiti and want to show two gpx-tracks. > > but the tracks will not show. > > can anybody have a look ?? > > here is the link: > http://www.tappenbeck.net/osm/haiti/index_new.php?id=1&type=5&zoom=12&lat=18.57882&lon=-72.27869 http://docs.openlayers.org/library/spherical_mercator.html#reprojecting-vector-data -- Chris -- Christopher Schmidt MetaCarta From burnsr77 at gmail.com Wed Feb 10 00:37:00 2010 From: burnsr77 at gmail.com (ryan burns) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] vector layer from text file Message-ID: <3735903f1002092137o424c73c1tbc4a191d7ee6bac8@mail.gmail.com> Hi all OLers- Does anyone know of a way to structure a text file (for reading into OpenLayers) to support lines and polygons? In my OL interface I am reading a text file into a vector layer but so far it only works with points. My code is below. Many, many thanks in advance for any suggestions!! var tLayer = new OpenLayers.Layer.Vector( 'Features', { strategies: [new OpenLayers.Strategy.Fixed()], projection:map.displayProjection, protocol: new OpenLayers.Protocol.HTTP({ url: loc, format: new OpenLayers.Format.Text }) } ); -- Department of Geography University of Washington BurnsR77@gmail.com rlburns@uw.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100210/d97e5966/attachment.html From osm at tappenbeck.net Wed Feb 10 03:01:31 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] help to show gpx-tracks In-Reply-To: <20100210050329.GD24279@metacarta.com> References: <4B7239F4.8010909@tappenbeck.net> <20100210050329.GD24279@metacarta.com> Message-ID: Am 10.02.2010 06:03, schrieb Christopher Schmidt: > On Wed, Feb 10, 2010 at 05:45:40AM +0100, Jan Tappenbeck wrote: >> hi ! >> >> i create a simple map for haiti and want to show two gpx-tracks. >> >> but the tracks will not show. >> >> can anybody have a look ?? >> >> here is the link: >> http://www.tappenbeck.net/osm/haiti/index_new.php?id=1&type=5&zoom=12&lat=18.57882&lon=-72.27869 > > http://docs.openlayers.org/library/spherical_mercator.html#reprojecting-vector-data > > -- Chris > sorry but i did not understand. in time i change the url to http://www.tappenbeck.net/osm/haiti/index.php?id=1&type=5&zoom=12&lat=18.57882&lon=-72.27869 on example with same and good data you can found here: http://www.tappenbeck.net/osm/maps/deu/maps4osm.php?id=30 please give me a little light ! regards Jan :-) From osm at tappenbeck.net Wed Feb 10 03:03:21 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] insert wms-image Message-ID: <4B726849.2020502@tappenbeck.net> hi ! someone wish to have wms image into a map like http://www.tappenbeck.net/osm/haiti/index.php?id=1&type=3&zoom=12&lat=18.57882&lon=-72.27869 did someone know a simple example ? regards Jan :-) From osm at tappenbeck.net Wed Feb 10 03:05:15 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] proble by update new data in map Message-ID: <4B7268BB.3060009@tappenbeck.net> hi ! i insert poi-data via a txt file into a map like http://www.tappenbeck.net/osm/haiti/index.php?id=1&type=3&zoom=12&lat=18.57882&lon=-72.27869 and after update the data on the server the new data will now show automatic by the next side-connection. even F5 did not help every time - sometimes it need less time. did anybody know if there is a meta-data or else to process this ? regards Jan .-) From ks at geograf.dk Wed Feb 10 03:08:19 2010 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Map doesn't load in Internet Explorer In-Reply-To: <20100209205939.GA24279@metacarta.com> References: <1C19AEE4-8EB4-4A58-AC9B-14E3E3AD7FB5@verizon.net> <20100209205939.GA24279@metacarta.com> Message-ID: <4B726973.4010308@geograf.dk> Short of having VS 2008, IE8 also has a built-in developer plugin, just press F12. You get a console with error messages, and even a script debugger. Regards, Kenneth Skovhede, GEOGRAF A/S On 09-02-2010 21:59, Christopher Schmidt wrote: > support trailing commas in lists or hashes, however, if your > code works on Safari, you're likely already not doing that. > > Other than those obvious issues, you'll need an IE debugger (Visual Studio > 2008 works great, but costs money) to find more complex errors. > > From jbloc1878 at googlemail.com Wed Feb 10 03:18:47 2010 From: jbloc1878 at googlemail.com (jbloc1878@googlemail.com) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Drawing and labelling a circle in OL 2.7 Message-ID: Hi does anyone have a code example of drawing a circle within open layers 2.7? I was Reading through the open layers documentation but cannot get it to work, also I am not sure if it is only for 2.8. Also is it possible to label the circle with some text? Or any shape for that matter polygon or line? Thanks for any help in advance Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100210/dffc7950/attachment.html From kibet1086 at hotmail.com Wed Feb 10 03:18:38 2010 From: kibet1086 at hotmail.com (Seth Kigen) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Adding javascript popup on mapserver output. Message-ID: I am working on mapserver application where I need to display a popup when a user places a cursor on a shaded area of a map. it this possible with mapserver? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100210/1b0d48bd/attachment.html From apestgas2 at yahoo.com.hk Wed Feb 10 03:30:25 2010 From: apestgas2 at yahoo.com.hk (Aypes2) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Ajust scale ratio when using Google map Message-ID: <1265790625429-4546599.post@n2.nabble.com> Hi everyone, I use a google street map as base map: var gmap = new OpenLayers.Layer.Google("Google Street"); It works, but the scale is shown 1:433K / 1:216K/108K/54K.....6759. I have tried to tune the scale but it doesn't change. Just have a guess, is it possible to change the scale when using google map as base layer? I want to change it into something like 1:1000, 1:5000. Thanks, Aypes2 -- View this message in context: http://n2.nabble.com/Ajust-scale-ratio-when-using-Google-map-tp4546599p4546599.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zac.spitzer at gmail.com Wed Feb 10 03:31:40 2010 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Ajust scale ratio when using Google map In-Reply-To: <1265790625429-4546599.post@n2.nabble.com> References: <1265790625429-4546599.post@n2.nabble.com> Message-ID: <7a85053e1002100031j2553ac82vdd2b9b611fb19629@mail.gmail.com> alas google has fixed scales On Wed, Feb 10, 2010 at 7:30 PM, Aypes2 wrote: > > Hi everyone, > > I use a google street map as base map: ?var gmap = new > OpenLayers.Layer.Google("Google Street"); > It works, but the scale is shown 1:433K / 1:216K/108K/54K.....6759. > > I have tried to tune the scale but it doesn't change. Just have a guess, is > it possible to change the scale when using google map as base layer? I want > to change it into something like 1:1000, 1:5000. > > Thanks, > Aypes2 > > > > > -- > View this message in context: http://n2.nabble.com/Ajust-scale-ratio-when-using-Google-map-tp4546599p4546599.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 From apestgas2 at yahoo.com.hk Wed Feb 10 03:35:31 2010 From: apestgas2 at yahoo.com.hk (Aypes2) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Ajust scale ratio when using Google map In-Reply-To: <7a85053e1002100031j2553ac82vdd2b9b611fb19629@mail.gmail.com> References: <1265790625429-4546599.post@n2.nabble.com> <7a85053e1002100031j2553ac82vdd2b9b611fb19629@mail.gmail.com> Message-ID: <1265790931342-4546613.post@n2.nabble.com> So I cannot change scale ratio and resolution when using the google raster map? -- View this message in context: http://n2.nabble.com/Ajust-scale-ratio-when-using-Google-map-tp4546599p4546613.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed Feb 10 03:47:48 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Drawing and labelling a circle in OL 2.7 In-Reply-To: References: Message-ID: <4B7272B4.6020306@opengeo.org> Hi, for drawing a circle you would use a DrawFeature control with a RegularPolygon handler. See http://www.openlayers.org/dev/examples/regular-polygons.html for an example. Labeling features is possible, but requires at least OpenLayers 2.8. See http://www.openlayers.org/dev/examples/vector-features-with-text.html for an example. Upgrading to a more recent version of OpenLayers should not cause you any big trouble. Regards, Andreas. jbloc1878@googlemail.com wrote: > Hi does anyone have a code example of drawing a circle within open > layers 2.7? I was Reading through the open layers documentation but > cannot get it to work, also I am not sure if it is only for 2.8. > > Also is it possible to label the circle with some text? Or any shape for > that matter polygon or line? > > Thanks for any help in advance > > Jay > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From jansen at terrestris.de Wed Feb 10 04:53:22 2010 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] proble by update new data in map In-Reply-To: <4B7268BB.3060009@tappenbeck.net> References: <4B7268BB.3060009@tappenbeck.net> Message-ID: <4B728212.9050706@terrestris.de> Hey Jan, I would guess that the txt-file is being cached. Maybe you can teach you webserver (Apache, that is) to output additional headers [1] when the resource http://www.tappenbeck.net/osm/haiti/data/data_haiti/health_facility_paho_poi.txt is requested. Currently the server answers with: Date: Wed, 10 Feb 2010 09:48:56 GMT Server: Apache Last-Modified: Wed, 10 Feb 2010 07:24:39 GMT Etag: "f06341a3-669b2-4b725f37" Accept-Ranges: bytes Content-Length: 420274 Content-Type: text/plain 200 OK [1] http://httpd.apache.org/docs/2.2/caching.html Regards, Marc Jan Tappenbeck wrote: > hi ! > > i insert poi-data via a txt file into a map like > http://www.tappenbeck.net/osm/haiti/index.php?id=1&type=3&zoom=12&lat=18.57882&lon=-72.27869 > and after update the data on the server the new data will now show > automatic by the next side-connection. even F5 did not help every time - > sometimes it need less time. > > did anybody know if there is a meta-data or else to process this ? > > regards Jan .-) > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From f.pennica at gmail.com Wed Feb 10 05:34:05 2010 From: f.pennica at gmail.com (Francesco Pennica) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] "srs" contains unacceptable value with WMS from ARCGIS server In-Reply-To: <4B7206E3.2010802@gns.cri.nz> References: <52B5AE411DD44F0384000E8D0E20109D@flshedu.usherbrooke.ca> <4B7206E3.2010802@gns.cri.nz> Message-ID: <27da8fdb1002100234v1d96b117td6c4efc7ae575a6d@mail.gmail.com> I had the same problem; a simple way is to force OL to send the request with "EPSG:102113" instead of "EPSG:900913", so you can either modify the "getFullRequestString" function in OpenLayers.Layer.WMS class or override it. I used this override with Ext JS and added a boolean option in the layer definition (ags = true) to distinguish between arcgis server wms and 'regular' wms Ext.override(OpenLayers.Layer.WMS, { getFullRequestString:function(newParams, altUrl) { var projectionCode = this.map.getProjection(); if((projectionCode == 'EPSG:900913') && (this.ags)) { this.params.SRS = 'EPSG:102113'; } else { this.params.SRS = (projectionCode == "none") ? null : projectionCode; } return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply( this, arguments); } }); Just a suggestion, but it works for me. 2010/2/10 Phil Scadden > Trying to combine layer from Arcgis WMS service with google and I get > the above. In arc, the resource is in ESPG:102113 which is apparently > the same as 900913. Arcgis 9.4 will support the official ESPG:3785 but > no way to force a 900913. So can I fudge this somehow on the openlayers > end? I want to use Arcgis server rather geoserver etc (also available) > because I have a lot of features crossing 180 degree line and others are > too stupid to handle this. > > -- > Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, > Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232 > > Notice: This email and any attachments are confidential. If received in > error please destroy and immediately notify us. Do not copy or disclose the > contents. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100210/4a72d154/attachment.html From strk at keybit.net Wed Feb 10 05:41:51 2010 From: strk at keybit.net (strk) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Changing map max extent on the fly Message-ID: <20100210104151.GF37036@keybit.net> Hi all, is there a way to change a map's max extent on the fly ? I've tried with setOption with no success The goal is to change whole projection, but that also isn't working. So first thing first (extent): // Coming from: console.log(map.getMaxExtent()); ---> left-bottom=(-180,-90) right-top=(180,90) // Trying to set new extent: var newext = new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508.34); console.log(newext) -> left-bottom=(-20037508,-20037508) right-top=(20037508,20037508.34) map.setOptions( { maxExtent : newext } ); // Nothing changed: console.log(map.getMaxExtent()); ---> left-bottom=(-180,-90) right-top=(180,90) Is it expected ? -- () Free GIS & Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html From kildimo at gmail.com Wed Feb 10 05:49:12 2010 From: kildimo at gmail.com (protos) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] layer loadend event In-Reply-To: <1265629155981-4533662.post@n2.nabble.com> References: <1265628198551-4533615.post@n2.nabble.com> <1265629155981-4533662.post@n2.nabble.com> Message-ID: <1265798952737-4547100.post@n2.nabble.com> In case anyone is interested - this is what I did to get around the loadend bug : checkBaseLayerReady: function(map) { if (!map.baseLayer) { return false; } else { var ldiv = map.baseLayer.div; var flag = true; for (var k = 0, len = ldiv.childNodes.length; k < len; k++) { var node = ldiv.childNodes[k]; if (!node.complete) { flag = false; } } return flag; } }, checkAndClearCloneLayer:function(map){ console.debug ("Checking and clearing Cloned Layer."); if(!map){ map = this.map; } if (map){ // OL loadend event gets fired too early so we need // this to check if indeed the new baseLayer is fully loaded. var retrier = new PeriodicalExecuter(function(pe) { if (this.checkBaseLayerReady(map)) { if (map.baseLayerClone){ map.layerContainerDiv.removeChild(map.baseLayerClone.div); if (Prototype.Browser.IE) { map.baseLayerClone.outerHTML = ""; } map.baseLayerClone.grid = null; map.baseLayerClone = null; pe.stop(); } } }.bind(this), 0.1); } }, -- View this message in context: http://n2.nabble.com/layer-loadend-event-tp4533615p4547100.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Wed Feb 10 05:49:23 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Changing map max extent on the fly In-Reply-To: <20100210104151.GF37036@keybit.net> References: <20100210104151.GF37036@keybit.net> Message-ID: <292982C6-37EE-4C5D-B20C-501014AED331@osgis.nl> Hi strk, maybe you can look at: http://dev.openlayers.org/sandbox/elemoine/reproject/examples/reproject-map.html There are some OL tickets opened up by elemoine that should make reprojection easier, but I don't have the numbers by hand right now. Best regards, Bart On Feb 10, 2010, at 11:41 AM, strk wrote: > Hi all, > is there a way to change a map's max extent on the fly ? > I've tried with setOption with no success > The goal is to change whole projection, but that also isn't working. > So first thing first (extent): > > // Coming from: > console.log(map.getMaxExtent()); ---> left-bottom=(-180,-90) right-top=(180,90) > > // Trying to set new extent: > var newext = new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508.34); > console.log(newext) -> left-bottom=(-20037508,-20037508) right-top=(20037508,20037508.34) > map.setOptions( { maxExtent : newext } ); > > // Nothing changed: > console.log(map.getMaxExtent()); ---> left-bottom=(-180,-90) right-top=(180,90) > > Is it expected ? > > -- > > () Free GIS & Flash consultant/developer > /\ http://foo.keybit.net/~strk/services.html > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From mr at marcelruff.info Wed Feb 10 06:10:10 2010 From: mr at marcelruff.info (Marcel Ruff) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to access mouse modifier during "featureselected" In-Reply-To: References: <4B61DA60.1000501@marcelruff.info> <4B6324EB.1040206@marcelruff.info> <4B6F3783.7010101@marcelruff.info> <1265611569753-4532622.post@n2.nabble.com> Message-ID: <4B729412.1000403@marcelruff.info> Ivan Grcic schrieb: > Oh yes, as i see feature handler doesnt have same evt attribs as click > handler does... so you need to catch click handler of feature handler > somehow :| > Yes, this is all I get, so no chance to detect which mouse button was pressed: evt.element evt.feature evt.object evt.type="featureselected" If I use "click" I need to somehow compute myself which feature was hit ... There is no simple solution available? Thanks Marcel > On Mon, Feb 8, 2010 at 7:46 AM, Max Weidemann wrote: > >> Hello Marcel, >> >> Try this code too find out if it is a right click. >> >> if(((evt.which) && (evt.which == 3)) || >> ((evt.button) && (evt.button == 2))){ >> //your Code >> } >> >> cheers >> Max >> From paweluz at o2.pl Wed Feb 10 06:54:16 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Modify object other then from muse click In-Reply-To: <1265718496976-4540752.post@n2.nabble.com> References: <1265150664424-4504224.post@n2.nabble.com> <4B7012C2.60703@mapgears.com> <1265637979618-4534285.post@n2.nabble.com> <4B702EBB.5020009@mapgears.com> <1265718496976-4540752.post@n2.nabble.com> Message-ID: <1265802856159-4547368.post@n2.nabble.com> Solved! The Modify control uses unselectFeature and selectFeature method. Only the onselect control uses unselect and select method. Now everything works fine. Thanks for your help Alex!! cheers, Poul -- View this message in context: http://n2.nabble.com/Modify-object-other-then-from-muse-click-tp4504224p4547368.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From me at dylanparry.com Wed Feb 10 07:18:47 2010 From: me at dylanparry.com (Dylan Parry) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Watermarks and attributions Message-ID: <11439702.1541265804323420.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> Hi folks, I?ve managed to use layer attributions without any problems, but I?m wondering how I am able to style the text that is added to the map, ie. position, font, colour etc. I presume there?s some simple CSS that I can use? Secondly, I?d like to be able to add a graphical watermark to the map so that a semi-transparent image is overlaid on the map at all times. Is this possible using OpenLayers, or is this going to be only possible by physically watermarking the map tiles as they are produced on the server? Cheers, -- Dylan Parry From ngerber999 at gmail.com Wed Feb 10 07:22:02 2010 From: ngerber999 at gmail.com (Nathan Gerber) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Watermarks and attributions In-Reply-To: <11439702.1541265804323420.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> References: <11439702.1541265804323420.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> Message-ID: I'd imagine you can embed the image in HTML for your attribution layer. I have done hyperlinks through the attribution numerous times so I can't see why an image wouldn't work. -- Nathan Gerber On Wed, Feb 10, 2010 at 7:18 AM, Dylan Parry wrote: > Hi folks, > > I?ve managed to use layer attributions without any problems, but I?m > wondering how I am able to style the text that is added to the map, ie. > position, font, colour etc. I presume there?s some simple CSS that I can > use? > > Secondly, I?d like to be able to add a graphical watermark to the map so > that a semi-transparent image is overlaid on the map at all times. Is this > possible using OpenLayers, or is this going to be only possible by > physically watermarking the map tiles as they are produced on the server? > > Cheers, > > -- > Dylan Parry > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100210/4f0ba585/attachment.html From crschmidt at metacarta.com Wed Feb 10 07:53:50 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] help to show gpx-tracks In-Reply-To: References: <4B7239F4.8010909@tappenbeck.net> <20100210050329.GD24279@metacarta.com> Message-ID: <20100210125350.GE24279@metacarta.com> On Wed, Feb 10, 2010 at 09:01:31AM +0100, Jan Tappenbeck wrote: > Am 10.02.2010 06:03, schrieb Christopher Schmidt: > > On Wed, Feb 10, 2010 at 05:45:40AM +0100, Jan Tappenbeck wrote: > >> hi ! > >> > >> i create a simple map for haiti and want to show two gpx-tracks. > >> > >> but the tracks will not show. > >> > >> can anybody have a look ?? > >> > >> here is the link: > >> http://www.tappenbeck.net/osm/haiti/index_new.php?id=1&type=5&zoom=12&lat=18.57882&lon=-72.27869 > > > > http://docs.openlayers.org/library/spherical_mercator.html#reprojecting-vector-data > > > > -- Chris > > > > > sorry but i did not understand. > in time i change the url to > > http://www.tappenbeck.net/osm/haiti/index.php?id=1&type=5&zoom=12&lat=18.57882&lon=-72.27869 > > on example with same and good data you can found here: > http://www.tappenbeck.net/osm/maps/deu/maps4osm.php?id=30 > > please give me a little light ! The documentation provides the answers you need. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Feb 10 07:57:52 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] vector layer from text file In-Reply-To: <3735903f1002092137o424c73c1tbc4a191d7ee6bac8@mail.gmail.com> References: <3735903f1002092137o424c73c1tbc4a191d7ee6bac8@mail.gmail.com> Message-ID: <20100210125751.GF24279@metacarta.com> On Wed, Feb 10, 2010 at 12:37:00AM -0500, ryan burns wrote: > Hi all OLers- > > Does anyone know of a way to structure a text file (for reading into > OpenLayers) to support lines and polygons? In my OL interface I am reading a > text file into a vector layer but so far it only works with points. My code > is below. Many, many thanks in advance for any suggestions!! Use GeoJSON, KML, GML, OSM, or any of the other formats provided in OpenLayers. http://docs.openlayers.org/library/formats.html -- chris > var tLayer = new OpenLayers.Layer.Vector( 'Features', { > strategies: [new OpenLayers.Strategy.Fixed()], > projection:map.displayProjection, > protocol: new OpenLayers.Protocol.HTTP({ > url: loc, > format: new OpenLayers.Format.Text > }) > } > ); > > > > > > -- > Department of Geography > University of Washington > > BurnsR77@gmail.com > rlburns@uw.edu > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Feb 10 07:58:18 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Ajust scale ratio when using Google map In-Reply-To: <1265790625429-4546599.post@n2.nabble.com> References: <1265790625429-4546599.post@n2.nabble.com> Message-ID: <20100210125818.GG24279@metacarta.com> On Wed, Feb 10, 2010 at 12:30:25AM -0800, Aypes2 wrote: > > Hi everyone, > > I use a google street map as base map: var gmap = new > OpenLayers.Layer.Google("Google Street"); > It works, but the scale is shown 1:433K / 1:216K/108K/54K.....6759. > > I have tried to tune the scale but it doesn't change. Just have a guess, is > it possible to change the scale when using google map as base layer? I want > to change it into something like 1:1000, 1:5000. You can't. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Feb 10 07:58:39 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Ajust scale ratio when using Google map In-Reply-To: <1265790931342-4546613.post@n2.nabble.com> References: <1265790625429-4546599.post@n2.nabble.com> <7a85053e1002100031j2553ac82vdd2b9b611fb19629@mail.gmail.com> <1265790931342-4546613.post@n2.nabble.com> Message-ID: <20100210125839.GH24279@metacarta.com> On Wed, Feb 10, 2010 at 12:35:31AM -0800, Aypes2 wrote: > > So I cannot change scale ratio and resolution when using the google raster > map? Correct. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Feb 10 08:04:04 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Watermarks and attributions In-Reply-To: <11439702.1541265804323420.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> References: <11439702.1541265804323420.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> Message-ID: <20100210130404.GI24279@metacarta.com> On Wed, Feb 10, 2010 at 12:18:47PM +0000, Dylan Parry wrote: > Hi folks, > > I?ve managed to use layer attributions without any problems, but I?m wondering how I am able to style the text that is added to the map, ie. position, font, colour etc. I presume there?s some simple CSS that I can use? http://openlayers.org/dev/examples/custom-style.html Look at that, then use .olControlAttribution As your CSS class. > Secondly, I?d like to be able to add a graphical watermark to the map so that a semi-transparent image is overlaid on the map at all times. Is this possible using OpenLayers, or is this going to be only possible by physically watermarking the map tiles as they are produced on the server? Use attribution: '' -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Feb 10 08:04:49 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to access mouse modifier during "featureselected" In-Reply-To: <4B729412.1000403@marcelruff.info> References: <4B61DA60.1000501@marcelruff.info> <4B6324EB.1040206@marcelruff.info> <4B6F3783.7010101@marcelruff.info> <1265611569753-4532622.post@n2.nabble.com> <4B729412.1000403@marcelruff.info> Message-ID: <20100210130449.GJ24279@metacarta.com> On Wed, Feb 10, 2010 at 12:10:10PM +0100, Marcel Ruff wrote: > Ivan Grcic schrieb: > > Oh yes, as i see feature handler doesnt have same evt attribs as click > > handler does... so you need to catch click handler of feature handler > > somehow :| > > > Yes, this is all I get, so no chance to detect which mouse button was > pressed: > > evt.element > evt.feature > evt.object > evt.type="featureselected" > > If I use "click" I need to somehow compute myself which feature was hit ... > > There is no simple solution available? When you click, the browser doesn't *know* which feature was hit. So no, there is not. -- Chris > Thanks > Marcel > > On Mon, Feb 8, 2010 at 7:46 AM, Max Weidemann wrote: > > > >> Hello Marcel, > >> > >> Try this code too find out if it is a right click. > >> > >> if(((evt.which) && (evt.which == 3)) || > >> ((evt.button) && (evt.button == 2))){ > >> //your Code > >> } > >> > >> cheers > >> Max > >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From olivier.thierry at gmail.com Wed Feb 10 08:06:35 2010 From: olivier.thierry at gmail.com (Olivier THIERRY) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] zindex for markers ? Message-ID: <6bbf89b81002100506l1b602bdqb43a8346a00f80f6@mail.gmail.com> Hi, I have a layer with markers. I want to highlight some of them on user click by changing their colour and I could do this. Now I want these markers to be displayed above the others. I tried to set zindex this way : marker.icon.imageDiv.style.zIndex = 900; But it doesn't work. How can I do this ? Thanks in advance, Olivier From me at dylanparry.com Wed Feb 10 08:28:20 2010 From: me at dylanparry.com (Dylan Parry) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Watermarks and attributions In-Reply-To: <20100210130404.GI24279@metacarta.com> Message-ID: <18561427.1581265808495343.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> ----- "Christopher Schmidt" wrote: > http://openlayers.org/dev/examples/custom-style.html > > Look at that, then use > > .olControlAttribution > > As your CSS class. > > > Secondly, I?d like to be able to add a graphical watermark to the > map so that a semi-transparent image is overlaid on the map at all > times. Is this possible using OpenLayers, or is this going to be only > possible by physically watermarking the map tiles as they are produced > on the server? > > Use attribution: '' Thanks to all that replied. Got it sorted now and it works pretty well. Thanks again. -- Dylan Parry From tobias.wendorff at uni-dortmund.de Wed Feb 10 08:45:21 2010 From: tobias.wendorff at uni-dortmund.de (Tobias Wendorff) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] help to show gpx-tracks In-Reply-To: <20100210125350.GE24279@metacarta.com> References: <4B7239F4.8010909@tappenbeck.net> <20100210050329.GD24279@metacarta.com> <20100210125350.GE24279@metacarta.com> Message-ID: <4B72B871.2090001@uni-dortmund.de> Christopher Schmidt schrieb: > The documentation provides the answers you need. English: Jan, you have to reproject your GPX-Data. PM me. German: Jan, Du musst Deine GPX-Daten reprojizieren. Schreib' mich direkt an. From paweluz at o2.pl Wed Feb 10 08:37:02 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Can't update a feature for which there is no FID (WFS-T) Message-ID: <1265809022350-4547884.post@n2.nabble.com> Hi! I have problem with WFS-T ADD state. I my application the user is able to add, update and delete a feature from map. The problem appears if: 1. User draw new geometry on map, fill out the attributes of new object and click SAVE to database. 2. Then user click on the new object on map. The attributes of the object appear. 3. User is trying to modify or delete the object... Then I got an alert Can't update a feature for which there is no FID I check it in firebug, and the FID is null. Why is that... The real funny think is that when I change the zoom of the map, or click F5, or in layer switch a uncheck and check my wfs_layer, the FID of my new object is changed to correct!! Now the user is able to remove or change the geometry (object) on map. Did anyone have this problem? Here is code for adding new object into the database feature.layer.eraseFeatures([feature]); feature.geometry = new OpenLayers.Geometry.MultiLineString( feature.geometry ); selectedfeature=feature; feature.state = OpenLayers.State.INSERT; feature.layer.drawFeature(feature); my_wfslayer.commit(); If I add the line my_wfslayer.refresh(); at the end I got response (SUCCEED), my layer is refreshed but I can't see my new object (new geometry does not appear on map). I have to click F5 or zomm in/out or make change in layer switch(off/on)... What is wrong? Regards, Poul -- View this message in context: http://n2.nabble.com/Can-t-update-a-feature-for-which-there-is-no-FID-WFS-T-tp4547884p4547884.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pj_maloney at hotmail.com Wed Feb 10 08:40:35 2010 From: pj_maloney at hotmail.com (PhilM) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Watermarks and attributions In-Reply-To: <20100210130404.GI24279@metacarta.com> References: <11439702.1541265804323420.JavaMail.DYLAN-NETBOOK$@Dylan-Netbook> <20100210130404.GI24279@metacarta.com> Message-ID: <1265809235168-4547912.post@n2.nabble.com> > Secondly, I?d like to be able to add a graphical watermark to the map so that a semi-transparent image is overlaid on the map at all times. Is this possible using OpenLayers, or is this going to be only possible by physically watermarking the map tiles as they are produced on the server? I have also achieved this by creating a custom layer based on OpenLayers.Layer.TMS. Point this at your required image, set the grid cell size, and apply the opacity. I have attached the required js. http://n2.nabble.com/file/n4547912/Watermark.js Watermark.js e.g. new OpenLayers.Layer.Watermark('WM','[path to image]',{isBaseLayer:false,opacity:0.1,tileSize: new OpenLayers.Size(400,400)}) Regards Phil Maloney -- View this message in context: http://n2.nabble.com/Watermarks-and-attributions-tp4547472p4547912.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mr at marcelruff.info Wed Feb 10 09:39:49 2010 From: mr at marcelruff.info (Marcel Ruff) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to access mouse modifier during "featureselected" In-Reply-To: <20100210130449.GJ24279@metacarta.com> References: <4B61DA60.1000501@marcelruff.info> <4B6324EB.1040206@marcelruff.info> <4B6F3783.7010101@marcelruff.info> <1265611569753-4532622.post@n2.nabble.com> <4B729412.1000403@marcelruff.info> <20100210130449.GJ24279@metacarta.com> Message-ID: <4B72C535.9040101@marcelruff.info> The openlayers lib should be extended to deliver all details: evt.element evt.feature evt.object evt.type="featureselected" evt.button=1; // 1==left mouse, 2==middle mouse, 3==right mouse evt.modifier=1; // Shift==1, Ctrl==2 , WindowsKey==8. Alt==3 etc or probably human readable convenience methods: e.isLeftPressed() e.isMiddlePressed() e.isRightPressed() e.isAltPressed() e.isCtrlPressed() ... Marcel > On Wed, Feb 10, 2010 at 12:10:10PM +0100, Marcel Ruff wrote: > >> Ivan Grcic schrieb: >> >>> Oh yes, as i see feature handler doesnt have same evt attribs as click >>> handler does... so you need to catch click handler of feature handler >>> somehow :| >>> >>> >> Yes, this is all I get, so no chance to detect which mouse button was >> pressed: >> >> evt.element >> evt.feature >> evt.object >> evt.type="featureselected" >> >> If I use "click" I need to somehow compute myself which feature was hit ... >> >> There is no simple solution available? >> > > When you click, the browser doesn't *know* which feature was hit. So > no, there is not. > > -- Chris > > >> From ydumais at korem.com Wed Feb 10 10:11:54 2010 From: ydumais at korem.com (ydumais) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] DrawFeature stops event propagation Message-ID: <1265814714205-4548447.post@n2.nabble.com> [this is a repost. Originally posted in the dev forum and realised my error]. Hi, we are using a custom Control.DrawFeature like so: ... var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); this.map.addLayers([this.baseLayer, polygonLayer]); var selectControl = new OpenLayers.Control.DrawFeature(polygonLayer, OpenLayers.Handler.Point, {handlerOptions: {}}); this.map.addControl(selectControl); ... and the following Control.Click: Navigator.Control = {}; Navigator.Control.Click = OpenLayers.Class(OpenLayers.Control, { defaultHandlerOptions: {'single': true, 'double': false, 'pixelTolerance': 0, 'stopSingle': false, 'stopDouble': false}, initialize: function(instance) { this.instance = instance; this.handlerOptions = OpenLayers.Util.extend({},this.defaultHandlerOptions); OpenLayers.Control.prototype.initialize.apply(this, arguments); this.handler = new OpenLayers.Handler.Click(this, { 'click': this.trigger }, this.handlerOptions); }, trigger: function(event) { var me = this; console.log(event.altKey); } }); The issue is that the trigger is not fired when the Draw control is active (works fine otherwise). Is there a way to send the trigger to the map? To put in context, we are creating a select control that forwards the drawn polygon to our mapping server (serving a WMS layer in this case). The selection is done server side... I believe we can't use the Control.SelectFeature with multipleSelect option since our OL map layers is not aware of the different features. If I can't forward the event to the map, I contemplate creating double controls (one with a handler with keyMask.MOD_NONE and one with a handler keyMask.MOD_ALT) but I find this hack clunky. Any help appreciated. -- View this message in context: http://n2.nabble.com/DrawFeature-stops-event-propagation-tp4548447p4548447.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mr at marcelruff.info Wed Feb 10 11:26:09 2010 From: mr at marcelruff.info (Marcel Ruff) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] How to access mouse modifier during "featureselected" In-Reply-To: <4B72C535.9040101@marcelruff.info> References: <4B61DA60.1000501@marcelruff.info> <4B6324EB.1040206@marcelruff.info> <4B6F3783.7010101@marcelruff.info> <1265611569753-4532622.post@n2.nabble.com> <4B729412.1000403@marcelruff.info> <20100210130449.GJ24279@metacarta.com> <4B72C535.9040101@marcelruff.info> Message-ID: <4B72DE21.3030902@marcelruff.info> I have investigated where the event info of a "featureselected" event is lost: The events starts at the top of the stack and propagates down to my html page: BaseTypes.js bindAsEventListener() evt.altKey evt.button ... OK Event.js handleBrowserEvent() evt.altKey evt.button Event.js triggerEvent() evt.altKey evt.button loops over 7 listeners (returns true to chain) Feature.js click() evt.altKey evt.button Feature.js handle() evt.altKey evt.button loops to find the feature Feature.js triggerCallback() Here the evt object is not available anymore, details are lost!!! Handler.js callback() SelectFeature.js clickFeature() SelectFeature.js select() Events.js triggerEvent() select-feature-multilayer.html Our callback code In Feature.js triggerCallback() the original event object (which knows about mouse buttons and meta keys) is lost! From my point of view, there is no reason to stop delivering the evt info to the follow-up functions. What is your opinion? If I modify the code to transport the original event down to my listener function, will such a patch be accepted? Thanks Marcel Marcel Ruff schrieb: > The openlayers lib should be extended to deliver all details: > > evt.element > evt.feature > evt.object > evt.type="featureselected" > evt.button=1; // 1==left mouse, 2==middle mouse, 3==right mouse > evt.modifier=1; // Shift==1, Ctrl==2 , WindowsKey==8. Alt==3 etc > > or probably human readable convenience methods: > > e.isLeftPressed() > e.isMiddlePressed() > e.isRightPressed() > e.isAltPressed() > e.isCtrlPressed() > ... > > Marcel > >> On Wed, Feb 10, 2010 at 12:10:10PM +0100, Marcel Ruff wrote: >> >> >>> Ivan Grcic schrieb: >>> >>> >>>> Oh yes, as i see feature handler doesnt have same evt attribs as click >>>> handler does... so you need to catch click handler of feature handler >>>> somehow :| >>>> >>>> >>>> >>> Yes, this is all I get, so no chance to detect which mouse button was >>> pressed: >>> >>> evt.element >>> evt.feature >>> evt.object >>> evt.type="featureselected" >>> >>> If I use "click" I need to somehow compute myself which feature was hit ... >>> >>> There is no simple solution available? >>> From eric.lemoine at camptocamp.com Wed Feb 10 11:58:55 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Changing map max extent on the fly In-Reply-To: <292982C6-37EE-4C5D-B20C-501014AED331@osgis.nl> References: <20100210104151.GF37036@keybit.net> <292982C6-37EE-4C5D-B20C-501014AED331@osgis.nl> Message-ID: On Wednesday, February 10, 2010, Bart van den Eijnden wrote: > Hi strk, > > maybe you can look at: > > http://dev.openlayers.org/sandbox/elemoine/reproject/examples/reproject-map.html > > There are some OL tickets opened up by elemoine that should make reprojection easier, but I don't have the numbers by hand right now. Here they are: http://trac.openlayers.org/ticket/2359 http://trac.openlayers.org/ticket/2360 These patches aren't in a final state. We, at Camptocamp, may spend more time on them and on the ZoneSelector control in the coming weeks. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Wed Feb 10 12:07:56 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Can't update a feature for which there is no FID (WFS-T) In-Reply-To: <1265809022350-4547884.post@n2.nabble.com> References: <1265809022350-4547884.post@n2.nabble.com> Message-ID: On Wednesday, February 10, 2010, paweluz wrote: > > Hi! > > I have problem with WFS-T ADD state. I my application the user is able to > add, update and delete a feature from map. The problem appears if: > 1. User draw new geometry on map, fill out the attributes of new object and > click SAVE to database. > 2. Then user click on the new object on map. The attributes of the object > appear. > 3. User is trying to modify or delete the object... Then I got an alert > Can't update a feature for which there is no FID > I check it in firebug, and the FID is null. Why is that... The real funny > think is that when I change the zoom of the map, or click F5, or in layer > switch a uncheck and check my wfs_layer, the FID of my new object is changed > to correct!! Now the user is able to remove or change the geometry (object) > on map. Did anyone have this problem? > Here is code for adding new object into the database > > ? ? ? ? ? ? ? ?feature.layer.eraseFeatures([feature]); > ? ? ? ? ? ? ? ?feature.geometry = new OpenLayers.Geometry.MultiLineString( > ? ? ? ? ? ? ? ? ? ?feature.geometry > ? ? ? ? ? ? ? ?); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?selectedfeature=feature; > ? ? ? ? ? ? ? ?feature.state = OpenLayers.State.INSERT; > ? ? ? ? ? ? ? ?feature.layer.drawFeature(feature); > ? ? ? ? ? ? ? ?my_wfslayer.commit(); > > > If I add the line ?my_wfslayer.refresh(); ?at what if you do refresh({force: true}); ? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Wed Feb 10 12:15:28 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:28 2010 Subject: [OpenLayers-Users] Can't update a feature for which there is no FID (WFS-T) In-Reply-To: <1265809022350-4547884.post@n2.nabble.com> References: <1265809022350-4547884.post@n2.nabble.com> Message-ID: On Wednesday, February 10, 2010, paweluz wrote: > > Hi! > > I have problem with WFS-T ADD state. I my application the user is able to > add, update and delete a feature from map. The problem appears if: > 1. User draw new geometry on map, fill out the attributes of new object and > click SAVE to database. > 2. Then user click on the new object on map. The attributes of the object > appear. > 3. User is trying to modify or delete the object... Then I got an alert > Can't update a feature for which there is no FID > I check it in firebug, and the FID is null. Why is that... The real funny > think is that when I change the zoom of the map, or click F5, or in layer > switch a uncheck and check my wfs_layer, the FID of my new object is changed > to correct!! Now the user is able to remove or change the geometry (object) > on map. Did anyone have this problem? > Here is code for adding new object into the database > > ? ? ? ? ? ? ? ?feature.layer.eraseFeatures([feature]); > ? ? ? ? ? ? ? ?feature.geometry = new OpenLayers.Geometry.MultiLineString( > ? ? ? ? ? ? ? ? ? ?feature.geometry > ? ? ? ? ? ? ? ?); > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?selectedfeature=feature; > ? ? ? ? ? ? ? ?feature.state = OpenLayers.State.INSERT; > ? ? ? ? ? ? ? ?feature.layer.drawFeature(feature); > ? ? ? ? ? ? ? ?my_wfslayer.commit(); > > > If I add the line ?my_wfslayer.refresh(); ?at the end I got response > (SUCCEED), my layer is refreshed but I can't see my new object (new geometry > does not appear on map). I have to click F5 or zomm in/out or make change in > layer switch(off/on)... What is wrong? Are you using Layer.WFS or Layer.Vector? Using the latter is recommended. In your case you'd use it with a Strategy.Save and a Protocol.WFS configured into it. The Strategy.Save should take care of updating the features' fid once the create operation is complete. Check out the WFS examples for more practical information. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From mulone at rome.com Wed Feb 10 12:42:03 2010 From: mulone at rome.com (Mulone) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Openlayers on android In-Reply-To: <1255002936602-3787492.post@n2.nabble.com> References: <3d3d9f400908210638m669b3828sfcdc32c4d4ae6c74@mail.gmail.com> <1254270764056-3739857.post@n2.nabble.com> <4ACDB3B3.7020300@opengeo.org> <1255002936602-3787492.post@n2.nabble.com> Message-ID: <1265823723565-4549517.post@n2.nabble.com> Hi guys, I m trying to run OL on Android too! With my setup (OL with 5 WMS layers) it's just not loading the map. If I put just a slim layer (e.g. cloudmade) it opens it, but the controls are screwed. I'll try IOL soon! ----- Mulone PhD student -- View this message in context: http://n2.nabble.com/Openlayers-on-android-tp3489433p4549517.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Wed Feb 10 13:26:17 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Can't update a feature for which there is no FID (WFS-T) In-Reply-To: References: <1265809022350-4547884.post@n2.nabble.com> Message-ID: <1265826377861-4549777.post@n2.nabble.com> Hi! Thanks for your help. I try to use my_wfs_layer.refresh({force:true }) but it works this same. I am using the Openlayer.state.INSERT for adding new data into database. I am also using Layer.WFS, not vector. When I try to use Openlayers.State.SAVE like you told me to I got an error: B??d: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://localhost:8080/geoserver/www/deegree/openlayers/OpenLayers.js :: anonymous :: line 2046" data: no] I actually did not here about SAVE state? Or we maybe talking about two different thinks?? Can you help me please? Regards, Poul -- View this message in context: http://n2.nabble.com/Can-t-update-a-feature-for-which-there-is-no-FID-WFS-T-tp4547884p4549777.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From d.vangilst at nserc.und.edu Wed Feb 10 15:11:46 2010 From: d.vangilst at nserc.und.edu (David Van Gilst) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Using Vector features with Google Base Maps.. Message-ID: <669635a81002101211o4edb3554q9b4444d2341b1641@mail.gmail.com> Hello, I'm relatively new to OpenLayers and having a problem with a relatively basic setup... I'm using the Google Base Maps and trying to add a point feature to the map at point -70.84480 and -53.00471. (The airport in Punta Arenas, Chile). When I add the point, the blue star appears at the correct longitude, but at an incorrect latitude. Furthermore, the point moves when I drag the map up or down, jumping to a different latitude when the mouse button is released. Additionally, when the map is dragged far enough to the right/east, the point disappears. I've tried using point.transform of the point geometry and changing the projection on the vector layer, and been unable to fix this behavior. I'm sure I'm missing something relatively simple, but I'm new to this and after two days of digging around the documentation and examples, I'm not sure what it is. Any suggestions would be appreciated. The code can be found at: http://128.177.27.207/display.html or: var layer_style = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']); layer_style.fillOpacity = 0.2; layer_style.graphicOpacity = 1; var style_blue = OpenLayers.Util.extend({}, layer_style); style_blue.strokeColor = "blue"; style_blue.fillColor = "blue"; style_blue.graphicName = "star"; style_blue.pointRadius = 10; style_blue.strokeWidth = 3; style_blue.rotation = 45; style_blue.strokeLinecap = "butt"; var options = { projection: new OpenLayers.Projection("EPSG:900913"), units: "m", numZoomLevels: 18, maxResolution: 'auto', maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34), sphericalMercator: true }; var map = new OpenLayers.Map('map', options); var google_physical = new OpenLayers.Layer.Google("Google Physical", {type: G_PHYSICAL_MAP}); var google_sattelite = new OpenLayers.Layer.Google("Google Satellite", {type: G_SATELLITE_MAP}); var google_hybrid = new OpenLayers.Layer.Google("Google Hybrid", {type: G_HYBRID_MAP}); map.addLayers([google_sattelite, google_physical, google_hybrid]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.MousePosition()); map.addControl(new OpenLayers.Control.KeyboardDefaults()); map.setCenter(new OpenLayers.LonLat(-13200000, 4500000), 5); map.zoomToMaxExtent(); var vectorLayer = new OpenLayers.Layer.Vector("Aircraft Location"); var point = new OpenLayers.Geometry.Point(-70.84480, -53.00471); var feature = new OpenLayers.Feature.Vector( point, null, style_blue); vectorLayer.addFeatures(feature); map.addLayer(vectorLayer); David Van Gilst DC-8 Network Engineer National Suborbital Education and Research Center University of North Dakota (701) 330-2978 d.vangilst@nserc.und.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100210/077483de/attachment.html From crschmidt at metacarta.com Wed Feb 10 15:44:00 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Using Vector features with Google Base Maps.. In-Reply-To: <669635a81002101211o4edb3554q9b4444d2341b1641@mail.gmail.com> References: <669635a81002101211o4edb3554q9b4444d2341b1641@mail.gmail.com> Message-ID: <20100210204359.GM24279@metacarta.com> On Wed, Feb 10, 2010 at 12:11:46PM -0800, David Van Gilst wrote: > Hello, I'm relatively new to OpenLayers and having a problem with a > relatively basic setup... > > I'm using the Google Base Maps and trying to add a point feature to the map > at point -70.84480 and -53.00471. (The airport in Punta Arenas, Chile). When > I add the point, the blue star appears at the correct longitude, but at an > incorrect latitude. Furthermore, the point moves when I drag the map up or > down, jumping to a different latitude when the mouse button is released. > Additionally, when the map is dragged far enough to the right/east, the > point disappears. http://faq.openlayers.org/vector-related-questions/why-dont-my-vector-features-work-over-google-yahoo-virtual-earth-etc/ -- Chris > I've tried using point.transform of the point geometry and changing the > projection on the vector layer, and been unable to fix this behavior. I'm > sure I'm missing something relatively simple, but I'm new to this and after > two days of digging around the documentation and examples, I'm not sure what > it is. Any suggestions would be appreciated. > > The code can be found at: http://128.177.27.207/display.html > > or: > > var layer_style = OpenLayers.Util.extend({}, > OpenLayers.Feature.Vector.style['default']); > layer_style.fillOpacity = 0.2; > layer_style.graphicOpacity = 1; > > var style_blue = OpenLayers.Util.extend({}, layer_style); > style_blue.strokeColor = "blue"; > style_blue.fillColor = "blue"; > style_blue.graphicName = "star"; > style_blue.pointRadius = 10; > style_blue.strokeWidth = 3; > style_blue.rotation = 45; > style_blue.strokeLinecap = "butt"; > > var options = { > projection: new OpenLayers.Projection("EPSG:900913"), > units: "m", > numZoomLevels: 18, > maxResolution: 'auto', > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, > 20037508, 20037508.34), > sphericalMercator: true > }; > > var map = new OpenLayers.Map('map', options); > > var google_physical = > new OpenLayers.Layer.Google("Google Physical", > {type: G_PHYSICAL_MAP}); > var google_sattelite = > new OpenLayers.Layer.Google("Google Satellite", > {type: G_SATELLITE_MAP}); > var google_hybrid = > new OpenLayers.Layer.Google("Google Hybrid", > {type: G_HYBRID_MAP}); > > map.addLayers([google_sattelite, > google_physical, google_hybrid]); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new OpenLayers.Control.MousePosition()); > map.addControl(new OpenLayers.Control.KeyboardDefaults()); > > map.setCenter(new OpenLayers.LonLat(-13200000, 4500000), 5); > map.zoomToMaxExtent(); > > var vectorLayer = > new OpenLayers.Layer.Vector("Aircraft Location"); > > var point = new OpenLayers.Geometry.Point(-70.84480, -53.00471); > > var feature = new OpenLayers.Feature.Vector( > point, > null, > style_blue); > > vectorLayer.addFeatures(feature); > map.addLayer(vectorLayer); > > > > > David Van Gilst > DC-8 Network Engineer > National Suborbital Education and Research Center > University of North Dakota > (701) 330-2978 > d.vangilst@nserc.und.edu > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From vbokin at gmail.com Wed Feb 10 15:54:30 2010 From: vbokin at gmail.com (Vadim B.) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] KML and area colorization In-Reply-To: <98899A492FDEB84185B0C47DE30C8A5512D2E424@inf-messagerie.ATMO.local> References: <98899A492FDEB84185B0C47DE30C8A5512D2E303@inf-messagerie.ATMO.local> <98899A492FDEB84185B0C47DE30C8A5512D2E424@inf-messagerie.ATMO.local> Message-ID: <1265835270103-4550765.post@n2.nabble.com> Hi, I'm experiencing the same problem in IE7/8 as well - KML layer with a shaded polygon has NO shading in Internet explorer but looks fine in Firefox. This can be replicated without my app code using the online samples 1) Browser to http://www.openlayers.org/dev/examples/vector-formats.html http://www.openlayers.org/dev/examples/vector-formats.html in IE and FF 2) Select "KML" from dropdown 3) Download KML from http://finder.geocommons.com/overlays/download/4433.kml http://finder.geocommons.com/overlays/download/4433.kml . Also attaching a TXT with the KML data http://n2.nabble.com/file/n4550765/HurricaneKML.txt HurricaneKML.txt 4) Click "add features" * In FF - you see the hurricane path with a white outline and blue shading * In IE - you see a white outline with no shading at all. Can you please help explain what's going on? Error in OL or bad KML? -- View this message in context: http://n2.nabble.com/KML-and-area-colorization-tp3081092p4550765.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Feb 10 15:56:19 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Using Vector features with Google Base Maps.. In-Reply-To: <20100210204359.GM24279@metacarta.com> References: <669635a81002101211o4edb3554q9b4444d2341b1641@mail.gmail.com> <20100210204359.GM24279@metacarta.com> Message-ID: <20100210205619.GN24279@metacarta.com> On Wed, Feb 10, 2010 at 03:44:00PM -0500, Christopher Schmidt wrote: > On Wed, Feb 10, 2010 at 12:11:46PM -0800, David Van Gilst wrote: > > Hello, I'm relatively new to OpenLayers and having a problem with a > > relatively basic setup... > > > > I'm using the Google Base Maps and trying to add a point feature to the map > > at point -70.84480 and -53.00471. (The airport in Punta Arenas, Chile). When > > I add the point, the blue star appears at the correct longitude, but at an > > incorrect latitude. Furthermore, the point moves when I drag the map up or > > down, jumping to a different latitude when the mouse button is released. > > Additionally, when the map is dragged far enough to the right/east, the > > point disappears. > > http://faq.openlayers.org/vector-related-questions/why-dont-my-vector-features-work-over-google-yahoo-virtual-earth-etc/ Strike that, replace with: http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#WhydontmyvectorfeaturesworkoverGoogleYahooVirtualEarthetc. -- Chris > -- Chris > > > I've tried using point.transform of the point geometry and changing the > > projection on the vector layer, and been unable to fix this behavior. I'm > > sure I'm missing something relatively simple, but I'm new to this and after > > two days of digging around the documentation and examples, I'm not sure what > > it is. Any suggestions would be appreciated. > > > > The code can be found at: http://128.177.27.207/display.html > > > > or: > > > > var layer_style = OpenLayers.Util.extend({}, > > OpenLayers.Feature.Vector.style['default']); > > layer_style.fillOpacity = 0.2; > > layer_style.graphicOpacity = 1; > > > > var style_blue = OpenLayers.Util.extend({}, layer_style); > > style_blue.strokeColor = "blue"; > > style_blue.fillColor = "blue"; > > style_blue.graphicName = "star"; > > style_blue.pointRadius = 10; > > style_blue.strokeWidth = 3; > > style_blue.rotation = 45; > > style_blue.strokeLinecap = "butt"; > > > > var options = { > > projection: new OpenLayers.Projection("EPSG:900913"), > > units: "m", > > numZoomLevels: 18, > > maxResolution: 'auto', > > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, > > 20037508, 20037508.34), > > sphericalMercator: true > > }; > > > > var map = new OpenLayers.Map('map', options); > > > > var google_physical = > > new OpenLayers.Layer.Google("Google Physical", > > {type: G_PHYSICAL_MAP}); > > var google_sattelite = > > new OpenLayers.Layer.Google("Google Satellite", > > {type: G_SATELLITE_MAP}); > > var google_hybrid = > > new OpenLayers.Layer.Google("Google Hybrid", > > {type: G_HYBRID_MAP}); > > > > map.addLayers([google_sattelite, > > google_physical, google_hybrid]); > > > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > map.addControl(new OpenLayers.Control.MousePosition()); > > map.addControl(new OpenLayers.Control.KeyboardDefaults()); > > > > map.setCenter(new OpenLayers.LonLat(-13200000, 4500000), 5); > > map.zoomToMaxExtent(); > > > > var vectorLayer = > > new OpenLayers.Layer.Vector("Aircraft Location"); > > > > var point = new OpenLayers.Geometry.Point(-70.84480, -53.00471); > > > > var feature = new OpenLayers.Feature.Vector( > > point, > > null, > > style_blue); > > > > vectorLayer.addFeatures(feature); > > map.addLayer(vectorLayer); > > > > > > > > > > David Van Gilst > > DC-8 Network Engineer > > National Suborbital Education and Research Center > > University of North Dakota > > (701) 330-2978 > > d.vangilst@nserc.und.edu > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From jimlug at co.clackamas.or.us Wed Feb 10 16:44:16 2010 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Optimizing OpenLayers - missing images Message-ID: <1265838256463-4551053.post@n2.nabble.com> Hey folks, I am trying to optimize OpenLayers and everything is working great except I'm missing some images for my controls. First, I downloaded OpenLayers2.8. Then I ran build.py and created the library.cfg file. I moved this file and the other recommended directories to our web server (build/OpenLayers.js and theme/ and img/ directories). I set the path of OpenLayers.js to reflect the new configuration and successfully tested my site. This is when I noticed the missing images. Issues: 1) Missing close box image for popups. It used to be there when I was accessing OpenLayers.js from http://openlayers.org/dev/lib/OpenLayers.js. Now it's not. 2) I've also noticed the layer-switcher-minimize.png is not showing up. 3) Also, the mouse position control has shifted from the bottom left to the upper right of the map. Has anyone experienced these anomlyes? If so, how did you rectify them? Any help would be greatly appreciated. Thanks... -- View this message in context: http://n2.nabble.com/Optimizing-OpenLayers-missing-images-tp4551053p4551053.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Feb 10 16:58:52 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Optimizing OpenLayers - missing images In-Reply-To: <1265838256463-4551053.post@n2.nabble.com> References: <1265838256463-4551053.post@n2.nabble.com> Message-ID: <20100210215851.GO24279@metacarta.com> On Wed, Feb 10, 2010 at 01:44:16PM -0800, Dash wrote: > > Hey folks, > > I am trying to optimize OpenLayers and everything is working great except > I'm missing some images for my controls. First, I downloaded OpenLayers2.8. > Then I ran build.py and created the library.cfg file. I moved this file and > the other recommended directories to our web server (build/OpenLayers.js and > theme/ and img/ directories). I set the path of OpenLayers.js to reflect > the new configuration and successfully tested my site. This is when I > noticed the missing images. http://docs.openlayers.org/library/deploying.html#deploying-files -- Chris > Issues: > 1) Missing close box image for popups. It used to be there when I was > accessing OpenLayers.js from http://openlayers.org/dev/lib/OpenLayers.js. > Now it's not. > > 2) I've also noticed the layer-switcher-minimize.png is not showing up. > > 3) Also, the mouse position control has shifted from the bottom left to the > upper right of the map. > > Has anyone experienced these anomlyes? If so, how did you rectify them? > Any help would be greatly appreciated. > > Thanks... > -- > View this message in context: http://n2.nabble.com/Optimizing-OpenLayers-missing-images-tp4551053p4551053.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From jimlug at co.clackamas.or.us Wed Feb 10 18:03:09 2010 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Optimizing OpenLayers - missing images In-Reply-To: <20100210215851.GO24279@metacarta.com> References: <1265838256463-4551053.post@n2.nabble.com> <20100210215851.GO24279@metacarta.com> Message-ID: <1265842989994-4551494.post@n2.nabble.com> Thanks Chris for pointing me to the Deploying Documentation. I guess I miss understood the readme.txt supplied with OpenLayers. The doc mentioned the files can be in subdirectories on your website. Anyway, everything is working now. Thanks. -- View this message in context: http://n2.nabble.com/Optimizing-OpenLayers-missing-images-tp4551053p4551494.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From osm at tappenbeck.net Thu Feb 11 02:48:17 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] WMS will not show Message-ID: <4B73B641.5050705@tappenbeck.net> hi ! i had an example url with poi of Haiti and want to insert a google-image via wms: http://www.tappenbeck.net/osm/haiti/index_wms.php?id=1&type=4 the source url i clip from http://wiki.openstreetmap.org/wiki/WikiProject_Haiti/Imagery_and_data_sources in the layer-panel the name will list but when i switch to the layer no image will show !! did anybody now the mistake ???? regards Jan :-) From osm at tappenbeck.net Thu Feb 11 02:57:53 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] firefox died with large gpx-files Message-ID: <4B73B881.8070008@tappenbeck.net> hallo ! i have a map with two gpx-files to show and one is very large (2mb). the creation needs less time but sometimes the ff will died. did anybody know more about this problem or a way to reduce the data ???? alternative to gpx - only coord. file ??? there is not gpx-file structur request =?!?!? the link: http://www.tappenbeck.net/osm/maps/deu/maps4osm.php?id=30 regards Jan :-) From henry.rotzoll at dlr.de Thu Feb 11 04:26:24 2010 From: henry.rotzoll at dlr.de (Henry Rotzoll) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Read WFS capabilities file In-Reply-To: <1265216819079-4508357.post@n2.nabble.com> References: <1265194604077-4506548.post@n2.nabble.com> <1265216819079-4508357.post@n2.nabble.com> Message-ID: <1265880384198-4553581.post@n2.nabble.com> Gabriel Nolasco [nolasco_gabriel@yahoo.com.br] helped me with this code: Use WFSCapabilities format instead [1]: wfsParser = new OpenLayers.Format.WFSCapabilities(); wfsCapabilities = wfsParser.read(response.responseText); wfsCapabilities.featureTypeList.featureTypes [1]http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Format/WFSCapabilities-js.html The problem is, that "wfsCapabilities.featureTypeList.featureTypes" is nowhere documented. Best regards, Henry Rotzoll -- View this message in context: http://n2.nabble.com/Read-WFS-capabilities-file-tp4506548p4553581.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From boris.tkc at googlemail.com Thu Feb 11 05:01:09 2010 From: boris.tkc at googlemail.com (Boris T.) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Parsing KML file or rather using custom format Message-ID: <1265882469611-4553678.post@n2.nabble.com> Hi all, first of all thanks to all you folks spending your time for such a great library. I'm pretty new to OpenLayers and started reading the API few weeks ago and checked the examples too. Bit by bit I think to understand the concept of OpenLayers, and I was hoping that some of you OL "cracks" can help me to answer a few questions. I need to build a small application where I can see a bunch of vehicles moving on the map. Actually, I already have an application which is generating a KML file with all information for Google Earth. This is working pretty well. Now I want to use OpenLayer with Open Street Map. My first thought was to use the KML I already have and use the OL integrated function to parse the KML file and put the marker on the map. However, the KML file my application generates right now is pretty complex (Data Schema and other ugly things). My first test showed that the KML parser isn't reading all attributes and styles. And one of the most important styles is ignored - heading/rotation/direction! Is this correct? Can some one approve it?According to my tests the IconStyle is ignored by the KML parser. Is there a way to get the feature included? (probably something for the dev-list) Or, can I manipulate the parsed KML placemarks before they are added to the map? Another approach could be to create an custom format, described in the Library Documentation (http://docs.openlayers.org/library/formats.html). I thought of having a function which generates a XML or JSON string I can trigger to put the markers on the map - including the icon rotation. What would be the best way to do that? Does anybody know/has an example I can check? Many Thanks! Boris -- View this message in context: http://n2.nabble.com/Parsing-KML-file-or-rather-using-custom-format-tp4553678p4553678.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From sebastian.marsky at ptv.de Thu Feb 11 05:12:40 2010 From: sebastian.marsky at ptv.de (Wintermute) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Draw lines in fancy styles? Message-ID: <1265883160509-4553715.post@n2.nabble.com> hi, I want to draw some lines in more advanced styles, would that be possible with OpenLayers? I attached a sample screenshot of another application I use. Especially I'm looking for a way to get small outlines and the small center lines. http://n2.nabble.com/file/n4553715/lines.jpg -- View this message in context: http://n2.nabble.com/Draw-lines-in-fancy-styles-tp4553715p4553715.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Thu Feb 11 07:59:45 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Can't update a feature for which there is no FID (WFS-T) In-Reply-To: <1265826377861-4549777.post@n2.nabble.com> References: <1265809022350-4547884.post@n2.nabble.com> <1265826377861-4549777.post@n2.nabble.com> Message-ID: On Wednesday, February 10, 2010, paweluz wrote: > > Hi! > > Thanks for your help. I try to ?use my_wfs_layer.refresh({force:true }) but > it works this same. I am using the Openlayer.state.INSERT for adding new > data into database. I am also using Layer.WFS, not vector. When I ?try to > use Openlayers.State.SAVE like you told me to I got an error: I was referring to Strategy.Save. > > B??d: uncaught exception: [Exception... "Could not convert JavaScript > argument arg 0" ?nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" > location: "JS frame :: > http://localhost:8080/geoserver/www/deegree/openlayers/OpenLayers.js :: > anonymous :: line 2046" ?data: no] > > I actually did not here about SAVE state? Or we maybe talking about two > different thinks?? Can you help me please? I just recommend using Layer.Vector with Protocol.WFS and Strategy.Save. Search the examples to get more concrete information on how to use those classes. Cheers, > > Regards, > Poul > -- > View this message in context: http://n2.nabble.com/Can-t-update-a-feature-for-which-there-is-no-FID-WFS-T-tp4547884p4549777.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ahocevar at opengeo.org Thu Feb 11 10:31:31 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] KML and area colorization In-Reply-To: <1265835270103-4550765.post@n2.nabble.com> References: <98899A492FDEB84185B0C47DE30C8A5512D2E303@inf-messagerie.ATMO.local> <98899A492FDEB84185B0C47DE30C8A5512D2E424@inf-messagerie.ATMO.local> <1265835270103-4550765.post@n2.nabble.com> Message-ID: <4B7422D3.5070108@opengeo.org> See http://trac.openlayers.org/ticket/2465#comment:10 Regards, Andreas. Vadim B. wrote: > Hi, I'm experiencing the same problem in IE7/8 as well - KML layer with a > shaded polygon has NO shading in Internet explorer but looks fine in > Firefox. > > This can be replicated without my app code using the online samples > > 1) Browser to http://www.openlayers.org/dev/examples/vector-formats.html > http://www.openlayers.org/dev/examples/vector-formats.html in IE and FF > > 2) Select "KML" from dropdown > > 3) Download KML from > http://finder.geocommons.com/overlays/download/4433.kml > http://finder.geocommons.com/overlays/download/4433.kml . Also attaching a > TXT with the KML data http://n2.nabble.com/file/n4550765/HurricaneKML.txt > HurricaneKML.txt > > 4) Click "add features" > > * In FF - you see the hurricane path with a white outline and blue shading > * In IE - you see a white outline with no shading at all. > > Can you please help explain what's going on? Error in OL or bad KML? -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From lists at remoteinformation.com.au Thu Feb 11 11:19:24 2010 From: lists at remoteinformation.com.au (Ben Madin) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Bad Bounding box request Message-ID: G'day all, I am getting the hang of OpenLayers & tilecache, but have noticed some 404 errors creeping into my apache access logs. After fixing most of them, I'm still noticing these odd ones (500, 404) consistently occurring. xyz.xyz.xyz.xyz - - [12/Feb/2010:01:57:11 +1000] "GET /tilecache/tilecache.py?TRANSPARENT=true&LAYERS=countries&ISBASELAYER=true&VERSION=1.1.1&SRS=EPSG%3A4326&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&BBOX=92.74999936,-3.5527136788005e-15,103.99999872,11.24999936&WIDTH=256&HEIGHT=256 HTTP/1.1" 500 68919 xyz.xyz.xyz.xyz - - [12/Feb/2010:01:57:11 +1000] "GET /tilecache/tilecache.py?TRANSPARENT=true&LAYERS=countries&ISBASELAYER=true&VERSION=1.1.1&SRS=EPSG%3A4326&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&BBOX=81.5,0,209.5,128&WIDTH=256&HEIGHT=256 HTTP/1.1" 404 177 xyz.xyz.xyz.xyz - - [12/Feb/2010:01:57:11 +1000] "GET /tilecache/tilecache.py?TRANSPARENT=true&LAYERS=countries&ISBASELAYER=true&VERSION=1.1.1&SRS=EPSG%3A4326&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&BBOX=87.12499968,11.24999936,92.74999936,16.87499904&WIDTH=256&HEIGHT=256 HTTP/1.1" 200 4435 xyz.xyz.xyz.xyz - - [12/Feb/2010:01:57:11 +1000] "GET /tilecache/tilecache.py?TRANSPARENT=true&LAYERS=countries&ISBASELAYER=true&VERSION=1.1.1&SRS=EPSG%3A4326&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&BBOX=109.6249984,16.87499904,115.24999808,22.49999872&WIDTH=256&HEIGHT=256 HTTP/1.1" 200 42407 If I zoom in, mostly fine, but xyz.xyz.xyz.xyz - - [12/Feb/2010:02:08:18 +1000] "GET /tilecache/tilecache.py?TRANSPARENT=true&LAYERS=urban&GRAPHID=1&ISBASELAYER=false&VERSION=1.1.1&SRS=EPSG%3A4326&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&BBOX=89.93749952,22.49999872,92.74999936,25.31249856&WIDTH=256&HEIGHT=256 HTTP/1.1" 200 1096 xyz.xyz.xyz.xyz - - [12/Feb/2010:02:08:18 +1000] "GET /tilecache/tilecache.py?TRANSPARENT=true&LAYERS=countries&ISBASELAYER=true&VERSION=1.1.1&SRS=EPSG%3A4326&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&BBOX=113.5,0,145.5,32&WIDTH=256&HEIGHT=256 HTTP/1.1" 404 176 xyz.xyz.xyz.xyz - - [12/Feb/2010:02:08:18 +1000] "GET /tilecache/tilecache.py?TRANSPARENT=true&LAYERS=countries&ISBASELAYER=true&VERSION=1.1.1&SRS=EPSG%3A4326&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&BBOX=81.5,0,113.5,32&WIDTH=256&HEIGHT=256 HTTP/1.1" 404 176 So, in summary: If the request BBox is too big I get a 404 - ie if it is 81.5,0,209.5,128 An error occurred: can't find resolution index for 0.062500. Available resolutions are: [0.0439453125, 0.02197265625, 0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625, 0.0006866455078125, 0.00034332275390625] If the request BBox is overdetailed I get a 500 error - ie 92.74999936,-3.5527136788005e-15,103.99999872,11.24999936 The map definitions are : maxResolution: '0.04394531', numZoomLevels: 8, maxExtent: new OpenLayers.Bounds(81.5,0,126.5,30), OpenLayers 2.8 (locally installed version (June 2009) TileCache 2.10 (Python) MapServer 5.4 (for WMS) on FreeBSD 7 It seems to be mainly working? is this a bug (the bbox size)?, or something I have overlooked cheers Ben From tobia.dipisa at geo-solutions.it Thu Feb 11 11:59:39 2010 From: tobia.dipisa at geo-solutions.it (Tobia Di Pisa) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Changing icons in GeoRSS layer Message-ID: <53c07b91002110859p21ad16a5gaca34b54b8e05aa3@mail.gmail.com> Hi, I'm having a problem with Firefox by changing the icons in a GeoRSS layer. This is my code: ... var rss_layer= new OpenLayers.Layer.GeoRSS(...); for(var f=0; f References: <73b080cc1001041015l4654d5e6o70cb45b92fd71825@mail.gmail.com> <1262881626741-4267311.post@n2.nabble.com> <1262889389141-4268014.post@n2.nabble.com> Message-ID: <1265908573854-4556020.post@n2.nabble.com> Thanks again Arnd. I was able to get the coordinates back, however they are formatted differently. i get a csv list i.e. 50, 0, 50, 50, 0, 50, 0, 0, 50, 0 instead of brackets i.e. [50, 0], [50, 50], [0, 50], [0, 0], [50, 0] i am using the value to get the coordinates of a polygon added to my map so i can save it to a database and dynamically create a json file for my openlayers map, it looks like the only issue is the brackets, it crashes without them and i cannot fiigure out how to get them. should i save them to the database the way they are and try to add the brackets in my php code when creating the json? -- View this message in context: http://n2.nabble.com/Trying-to-draw-a-box-on-a-map-and-get-the-coordinates-back-tp4251287p4556020.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From burnsr77 at gmail.com Thu Feb 11 12:57:09 2010 From: burnsr77 at gmail.com (ryan burns) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] vector layer from text file In-Reply-To: <20100210125751.GF24279@metacarta.com> References: <3735903f1002092137o424c73c1tbc4a191d7ee6bac8@mail.gmail.com> <20100210125751.GF24279@metacarta.com> Message-ID: <3735903f1002110957g108a49bdy5ba375f1e24bf5a0@mail.gmail.com> Thanks, Chris! ryan On Wed, Feb 10, 2010 at 4:57 AM, Christopher Schmidt < crschmidt@metacarta.com> wrote: > On Wed, Feb 10, 2010 at 12:37:00AM -0500, ryan burns wrote: > > Hi all OLers- > > > > Does anyone know of a way to structure a text file (for reading into > > OpenLayers) to support lines and polygons? In my OL interface I am > reading a > > text file into a vector layer but so far it only works with points. My > code > > is below. Many, many thanks in advance for any suggestions!! > > Use GeoJSON, KML, GML, OSM, or any of the other formats provided > in OpenLayers. > > http://docs.openlayers.org/library/formats.html > > -- chris > > > var tLayer = new OpenLayers.Layer.Vector( 'Features', { > > strategies: [new OpenLayers.Strategy.Fixed()], > > projection:map.displayProjection, > > protocol: new OpenLayers.Protocol.HTTP({ > > url: loc, > > format: new OpenLayers.Format.Text > > }) > > } > > ); > > > > > > > > > > > > -- > > Department of Geography > > University of Washington > > > > BurnsR77@gmail.com > > rlburns@uw.edu > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta > -- Department of Geography University of Washington BurnsR77@gmail.com rlburns@uw.edu 859-582-9125 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100211/797f6e99/attachment.html From vbokin at gmail.com Thu Feb 11 14:16:47 2010 From: vbokin at gmail.com (Vadim B.) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] KML and area colorization In-Reply-To: <4B7422D3.5070108@opengeo.org> References: <98899A492FDEB84185B0C47DE30C8A5512D2E303@inf-messagerie.ATMO.local> <98899A492FDEB84185B0C47DE30C8A5512D2E424@inf-messagerie.ATMO.local> <1265835270103-4550765.post@n2.nabble.com> <4B7422D3.5070108@opengeo.org> Message-ID: <1265915807539-4556774.post@n2.nabble.com> Wow, thanks for the quick response and code change. I rolled the latest VML.js into my codebase (OL 2.8) and rebuilt OpenLayers.js, but I'm still seeing the same behavior in IE. Do I need to get other files besides VML.js to see the change? Thanks, -Vadim -- View this message in context: http://n2.nabble.com/KML-and-area-colorization-tp3081092p4556774.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Thu Feb 11 16:20:07 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Trying to draw a box on a map, and get the coordinates back. In-Reply-To: <1265908573854-4556020.post@n2.nabble.com> Message-ID: Hi, function findcoords (event) { var vertices = event.feature.geometry.getVertices(); var brackets = vertices.toString().replace(/POINT\(/g,"[").replace(/\),/g,"],").replace(/ /g,",").replace(/\)/,"]"); alert('ID:' + brackets); } This is one way to get what you want. If there is a simple way to get the coordinates in this form from a geojson string or object, i don't know. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Jtrsmith Gesendet: Donnerstag, 11. Februar 2010 18:16 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] Trying to draw a box on a map,and get the coordinates back. Thanks again Arnd. I was able to get the coordinates back, however they are formatted differently. i get a csv list i.e. 50, 0, 50, 50, 0, 50, 0, 0, 50, 0 instead of brackets i.e. [50, 0], [50, 50], [0, 50], [0, 0], [50, 0] i am using the value to get the coordinates of a polygon added to my map so i can save it to a database and dynamically create a json file for my openlayers map, it looks like the only issue is the brackets, it crashes without them and i cannot fiigure out how to get them. should i save them to the database the way they are and try to add the brackets in my php code when creating the json? -- View this message in context: http://n2.nabble.com/Trying-to-draw-a-box-on-a-map-and-get-the-coordinates-b ack-tp4251287p4556020.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Thu Feb 11 17:20:09 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Trying to draw a box on a map, and get the coordinates back. In-Reply-To: References: <1265908573854-4556020.post@n2.nabble.com> Message-ID: <20100211222008.GR24279@metacarta.com> On Thu, Feb 11, 2010 at 10:20:07PM +0100, Arnd Wippermann wrote: > Hi, > > function findcoords (event) { > var vertices = event.feature.geometry.getVertices(); > var brackets = > vertices.toString().replace(/POINT\(/g,"[").replace(/\),/g,"],").replace(/ > /g,",").replace(/\)/,"]"); > alert('ID:' + brackets); > } event.feature.geometry.components[0].components is a list of POINT objects, each with a .x .y property for lon/lat. (components[0] is the first ring of the polygon, .components is the list of vertices in that ring.) -- Chris > This is one way to get what you want. If there is a simple way to get the > coordinates in this form from a geojson string or object, i don't know. > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Jtrsmith > Gesendet: Donnerstag, 11. Februar 2010 18:16 > An: users@openlayers.org > Betreff: Re: [OpenLayers-Users] Trying to draw a box on a map,and get the > coordinates back. > > > Thanks again Arnd. > > I was able to get the coordinates back, however they are formatted > differently. > i get a csv list i.e. 50, 0, 50, 50, 0, 50, 0, 0, 50, 0 instead of brackets > i.e. [50, 0], [50, 50], [0, 50], [0, 0], [50, 0] > > i am using the value to get the coordinates of a polygon added to my map so > i can save it to a database and dynamically create a json file for my > openlayers map, it looks like the only issue is the brackets, it crashes > without them and i cannot fiigure out how to get them. > > should i save them to the database the way they are and try to add the > brackets in my php code when creating the json? > -- > View this message in context: > http://n2.nabble.com/Trying-to-draw-a-box-on-a-map-and-get-the-coordinates-b > ack-tp4251287p4556020.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From frederic.junod at camptocamp.com Fri Feb 12 02:51:02 2010 From: frederic.junod at camptocamp.com (Frederic Junod) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] KML and area colorization In-Reply-To: <1265915807539-4556774.post@n2.nabble.com> References: <98899A492FDEB84185B0C47DE30C8A5512D2E303@inf-messagerie.ATMO.local> <98899A492FDEB84185B0C47DE30C8A5512D2E424@inf-messagerie.ATMO.local> <1265835270103-4550765.post@n2.nabble.com> <4B7422D3.5070108@opengeo.org> <1265915807539-4556774.post@n2.nabble.com> Message-ID: <21c3d1f41002112351m587b741dx87ae732f3e75fed5@mail.gmail.com> Hello, Seems to be an issue with VML and the kml IconStyle property: * edit [1] and remove the IconStyle element (in Style id 'default_normal') * load this kml in http://www.openlayers.org/dev/examples/vector-formats.html The fill color and opacity is correct. maybe: http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Renderer/VML.js#L280 fredj [1] http://finder.geocommons.com/overlays/download/4433.kml On Thu, Feb 11, 2010 at 8:16 PM, Vadim B. wrote: > > Wow, thanks for the quick response and code change. > > I rolled the latest VML.js into my codebase (OL 2.8) and rebuilt > OpenLayers.js, but I'm still seeing the same behavior in IE. > > Do I need to get other files besides VML.js to see the change? > > Thanks, > > -Vadim > -- > View this message in context: http://n2.nabble.com/KML-and-area-colorization-tp3081092p4556774.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Fr?d?ric Junod Camptocamp SA From hcollin78 at googlemail.com Fri Feb 12 03:14:46 2010 From: hcollin78 at googlemail.com (Henrik Collin) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] OpenLayers + MapServer + Own maps showing miniature tiles Message-ID: <1265962486829-4559876.post@n2.nabble.com> Hello, I am currently trying to build a service that shows a map in a webpage with OpenLayers. The OpenLayers requests the map data from MapServer by using WMS and then draws some features in a layer on top of the map data. My main problem is that the loaded map shows as a tiny dot in the screen until I zoom enough. This would be okay if the features would be drawn correctly on the map but alas they are not. They are off from the position thousands of kilometres. My features are in projection EPSG4326 which is converted to EPSG2393 the map uses. Projections have been setup in both systems MapServer and OpenLayers. The map consists of multiple tiles that have been combined to shapefile with MapServers shp2img.exe. When I request the map file form the browser it works perfectly. It returns me the correct piece of the map in the correct tile size. Does anyone have any idea what am I doing wrong? This is my first try with both services OpenLayers and MapServer so I am not quite sure which one is causing the problems, but as the MapServer returns a correct result when quering directly my educated guess is that the problem lies in the OpenLayers side. I originally tried the OpenLayers side with Google Maps and got that working ok. _____________________________________________________________________________________ HTML (In Header): _____________________________________________________________________________________ OPENLAYERS: (This is not a direct copy of the code as the actual code is written inside multiple MooTools classes and contains a lot of code not needed in here.) var mapOptions = { projection: new OpenLayers.Projection("EPSG:2393"), units: "m", // maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34) } var x = 23; var y = 60; var pos = { lat: x, lon: y, zoom: 6 }; Method from a class responsible for loading the layers and initializing the map. loadMap: function() { // Create map layer this.map = new OpenLayers.Map(paneMain, mapOptions); this.map.addControl(new OpenLayers.Control.NavToolbar()); /* this.gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP, sphericalMercator: true} ); this.map.addLayer(this.gphy); */ this.wmsserv = new OpenLayers.Layer.WMS( "WMS Server", "http://localhost:591/cgi-bin/mapserv.exe?map=/ms4w/apps/service/wms.map&", { layers: "Kartta", SRS: "EPSG:2393", format: "image/png" }, { isBaseLayer: true } ); this.map.addLayer(this.wmsserv); // Add Vector Layer on top of the map layer var vectorStyleMap = new OpenLayers.StyleMap({ graphicZIndex: 100 }); this.layerLines = new OpenLayers.Layer.Vector("Line Layer", { styleMap: vectorStyleMap, rendererOptions: { zIndexing: true } }); this.map.addLayer(this.layerLines); // Add layer controls selectControl = new OpenLayers.Control.SelectFeature( this.layerLines, { clickout: true, toggle: true, multiple: false, hover: false, onSelect: this.LineClick, onUnSelect: this.LineUnSelect } ); this.map.addControl(selectControl); selectControl.activate(); this.map.events.register("zoomend", this, function(e) { this.redrawDots(); }); // Center the map var centerPos = new OpenLayers.LonLat(pos.lon, pos.lat).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:2393")); this.map.setCenter(centerPos, this.pos.zoom, false, false); }, _____________________________________________________________________________________ WMS.MAP (Settings in the MapServer side) MAP NAME "Service" STATUS ON SIZE 256 256 IMAGECOLOR 128 128 192 # EXTENT 2417774 6720000 2430000 6730000 # Koko kartta # EXTENT 2427774 6724000 2429000 6726000 # Zoom # EXTENT 3050187.8969 6585228.0377 3761549.0272 7803095.3519 IMAGETYPE PNG UNITS METERS SHAPEPATH "maps/" PROJECTION "init=epsg:2393" # "proj=tmerc" # "lat_0=0" # "lon_0=27" # "k=1" # "x_0=3500000" # "y_0=0" # "ellps=intl" # "towgs84=-96.0617,-82.4278,-121.7435,4.80107,0.34543,-1.37646,1.4964" # "units=m" # "no_defs" END WEB IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" TEMPLATE "service.html" LOG "service.log" METADATA "wms_title" "Service" "wms_onlineresource" "http://localhost:591/cgi-bin/mapserv.exe?map=/ms4w/apps/service/wms.map&" "wms_srs" "EPSG:4022" END END LAYER NAME "Kartta" METADATA "wms_title" "Map layer" END TYPE RASTER STATUS ON TILEINDEX "testshape.shp" DUMP TRUE PROJECTION "init=epsg:2393" # "proj=tmerc" # "lat_0=0" # "lon_0=27" # "k=1" # "x_0=3500000" # "y_0=0" # "ellps=intl" # "towgs84=-96.0617,-82.4278,-121.7435,4.80107,0.34543,-1.37646,1.4964" # "units=m" # "no_defs" END END END -- View this message in context: http://n2.nabble.com/OpenLayers-MapServer-Own-maps-showing-miniature-tiles-tp4559876p4559876.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From guillaume.polet at trasys.be Fri Feb 12 05:03:47 2010 From: guillaume.polet at trasys.be (Polet Guillaume) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Clip WMS layers Message-ID: Hi, I wondered if it was possible to have a Basic WMS layer (displaying for example the whole world) and on top of that have a non-basic layer clipped to a specific extent. The purpose of this is to display the results of a catalogue of images clipped to the selected area of interest selected by a user. The Image layer can do the trick of course but it is a bit painful to have to recompute constantly the url of the image to have a nice resolution. I tried to use two WMS layers with different extents but this does not work (but maybe I have miscoded something). I tried googling the mailing lists, forum and other stuff but I could not find something useful so far. Thanks in advance to whoever can answer this. Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100212/8069adac/attachment.html From stefanie at weykam.net Fri Feb 12 06:55:07 2010 From: stefanie at weykam.net (Stefanie Weykam) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] WMSGetFeatureInfo not working as expected with msGMLoutput Message-ID: <4B75419B.7080207@weykam.net> Hi list members, I have a problem with my Mapserver WMS server and the OpenLayers.Control.WMSGetFeatureInfo. According to wmsOptions.params.info_format in the WMSGetFeatureInfo.js request function is 'application/vnd.ogc.gml' (this is what I want) In the WMSGetFeatureInfo.js handleResponse function request.responseXML is null and request.responseText contains the data (see below). Is this the normal behaviour? -5.133333,43.583333 -5.133333,43.583333 50 43.583333 -5.133333 0.854413312 I then get an error message saying ?Geometry Type not supported: Box? How do I get my GML response parsed correctly? Related Software: OpenLayers 2.8 Firefox 3.5.7 on Windows with Firebug UMN Mapserver 5.2.1 as WMS Server From paweluz at o2.pl Fri Feb 12 08:17:08 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Can't update a feature for which there is no FID (WFS-T) In-Reply-To: References: <1265809022350-4547884.post@n2.nabble.com> <1265826377861-4549777.post@n2.nabble.com> Message-ID: <1265980628198-4560973.post@n2.nabble.com> Hi! Oh, I see now what you meant. Thanks for your help, I am going to look into it... Cheers, Poul -- View this message in context: http://n2.nabble.com/Can-t-update-a-feature-for-which-there-is-no-FID-WFS-T-tp4547884p4560973.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From cbo at le34.dk Fri Feb 12 08:47:56 2010 From: cbo at le34.dk (=?iso-8859-1?Q?Casper_B=F8rgesen?=) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Corrupted selection in IE8 In-Reply-To: <4B75419B.7080207@weykam.net> References: <4B75419B.7080207@weykam.net> Message-ID: Hi! I have encountered this strange behavior in IE8. See: Corrupted: http://imgur.com/2HyEP&BTJ13l Normal: http://imgur.com/2HyEPl&BTJ13 It happened when I selected an object (it's a lake) and was trying to visualize it using OL 2.8. Usually this works but suddenly it didn't. After refreshing the page, everything is back to normal and I can select again. I haven't encountered this in FF and very rarely in IE8. But I would like to know what causes this problem, so that I might avoid it in the future. Does anyone know why this is happening? Regards Casper From crschmidt at metacarta.com Fri Feb 12 08:56:04 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] OpenLayers + MapServer + Own maps showing miniature tiles In-Reply-To: <1265962486829-4559876.post@n2.nabble.com> References: <1265962486829-4559876.post@n2.nabble.com> Message-ID: <20100212135603.GS24279@metacarta.com> On Fri, Feb 12, 2010 at 12:14:46AM -0800, Henrik Collin wrote: > > Hello, > > I am currently trying to build a service that shows a map in a webpage with > OpenLayers. The OpenLayers requests the map data from MapServer by using WMS > and then draws some features in a layer on top of the map data. > > My main problem is that the loaded map shows as a tiny dot in the screen > until I zoom enough. This would be okay if the features would be drawn > correctly on the map but alas they are not. They are off from the position > thousands of kilometres. My features are in projection EPSG4326 which is > converted to EPSG2393 the map uses. Projections have been setup in both > systems MapServer and OpenLayers. > > The map consists of multiple tiles that have been combined to shapefile with > MapServers shp2img.exe. When I request the map file form the browser it > works perfectly. It returns me the correct piece of the map in the correct > tile size. > > Does anyone have any idea what am I doing wrong? This is my first try with > both services OpenLayers and MapServer so I am not quite sure which one is > causing the problems, but as the MapServer returns a correct result when > quering directly my educated guess is that the problem lies in the > OpenLayers side. Your maxExtent and maxResolution are wrong, and unset, respectively. You'll need to fix that. -- Chris > I originally tried the OpenLayers side with Google Maps and got that working > ok. > > _____________________________________________________________________________________ > > HTML (In Header): > > > > > > > > _____________________________________________________________________________________ > > OPENLAYERS: (This is not a direct copy of the code as the actual code is > written inside multiple MooTools classes and contains a lot of code not > needed in here.) > > var mapOptions = { > projection: new OpenLayers.Projection("EPSG:2393"), > units: "m", > // maxResolution: 156543.0339, > maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, > 20037508.34, 20037508.34) > } > > var x = 23; > var y = 60; > var pos = { > lat: x, > lon: y, > zoom: 6 > }; > > Method from a class responsible for loading the layers and initializing the > map. > loadMap: function() { > > // Create map layer > this.map = new OpenLayers.Map(paneMain, mapOptions); > this.map.addControl(new OpenLayers.Control.NavToolbar()); > > > /* > this.gphy = new OpenLayers.Layer.Google( > "Google Physical", > {type: G_PHYSICAL_MAP, sphericalMercator: true} > ); > this.map.addLayer(this.gphy); > */ > > this.wmsserv = new OpenLayers.Layer.WMS( > "WMS Server", > > "http://localhost:591/cgi-bin/mapserv.exe?map=/ms4w/apps/service/wms.map&", > { > layers: "Kartta", > SRS: "EPSG:2393", > format: "image/png" > }, > { isBaseLayer: true } > ); > this.map.addLayer(this.wmsserv); > > // Add Vector Layer on top of the map layer > var vectorStyleMap = new OpenLayers.StyleMap({ > graphicZIndex: 100 > }); > > this.layerLines = new OpenLayers.Layer.Vector("Line Layer", { styleMap: > vectorStyleMap, rendererOptions: { zIndexing: true } }); > this.map.addLayer(this.layerLines); > > // Add layer controls > selectControl = new OpenLayers.Control.SelectFeature( > this.layerLines, > { > clickout: true, toggle: true, > multiple: false, hover: false, > onSelect: this.LineClick, > onUnSelect: this.LineUnSelect > } > ); > this.map.addControl(selectControl); > selectControl.activate(); > > this.map.events.register("zoomend", this, function(e) { > this.redrawDots(); > }); > > // Center the map > var centerPos = new OpenLayers.LonLat(pos.lon, pos.lat).transform(new > OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:2393")); > this.map.setCenter(centerPos, this.pos.zoom, false, false); > }, > > _____________________________________________________________________________________ > > WMS.MAP (Settings in the MapServer side) > > MAP > > NAME "Service" > STATUS ON > SIZE 256 256 > IMAGECOLOR 128 128 192 > # EXTENT 2417774 6720000 2430000 6730000 # Koko kartta > # EXTENT 2427774 6724000 2429000 6726000 # Zoom > # EXTENT 3050187.8969 6585228.0377 3761549.0272 7803095.3519 > IMAGETYPE PNG > UNITS METERS > SHAPEPATH "maps/" > > PROJECTION > "init=epsg:2393" > # "proj=tmerc" > # "lat_0=0" > # "lon_0=27" > # "k=1" > # "x_0=3500000" > # "y_0=0" > # "ellps=intl" > # "towgs84=-96.0617,-82.4278,-121.7435,4.80107,0.34543,-1.37646,1.4964" > # "units=m" > # "no_defs" > END > > WEB > IMAGEPATH "/ms4w/tmp/ms_tmp/" > IMAGEURL "/ms_tmp/" > TEMPLATE "service.html" > LOG "service.log" > > METADATA > "wms_title" "Service" > "wms_onlineresource" > "http://localhost:591/cgi-bin/mapserv.exe?map=/ms4w/apps/service/wms.map&" > "wms_srs" "EPSG:4022" > END > > END > > LAYER > NAME "Kartta" > METADATA > "wms_title" "Map layer" > END > TYPE RASTER > STATUS ON > > TILEINDEX "testshape.shp" > > DUMP TRUE > PROJECTION > "init=epsg:2393" > # "proj=tmerc" > # "lat_0=0" > # "lon_0=27" > # "k=1" > # "x_0=3500000" > # "y_0=0" > # "ellps=intl" > # > "towgs84=-96.0617,-82.4278,-121.7435,4.80107,0.34543,-1.37646,1.4964" > # "units=m" > # "no_defs" > END > > END > > END > > > > > > > > > > > > > > -- > View this message in context: http://n2.nabble.com/OpenLayers-MapServer-Own-maps-showing-miniature-tiles-tp4559876p4559876.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Feb 12 08:58:13 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Clip WMS layers In-Reply-To: References: Message-ID: <20100212135813.GT24279@metacarta.com> On Fri, Feb 12, 2010 at 11:03:47AM +0100, Polet Guillaume wrote: > Hi, > > I wondered if it was possible to have a Basic WMS layer (displaying for > example the whole world) and on top of that have a non-basic layer > clipped to a specific extent. The purpose of this is to display the > results of a catalogue of images clipped to the selected area of > interest selected by a user. I believe this is possible, so long as the overlaid datasource is not a tiled datasource with extents that are different than the data extent. > I tried to use two WMS layers with different extents but this does not > work (but maybe I have miscoded something). If you tried something and it didn't work, providing that code will always help actually understand the problem. Regards, -- Christopher Schmidt MetaCarta From hcollin78 at googlemail.com Fri Feb 12 09:14:02 2010 From: hcollin78 at googlemail.com (Henrik Collin) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] OpenLayers + MapServer + Own maps showing miniature tiles In-Reply-To: <20100212135603.GS24279@metacarta.com> References: <1265962486829-4559876.post@n2.nabble.com> <20100212135603.GS24279@metacarta.com> Message-ID: <1265984042750-4561208.post@n2.nabble.com> I changed the maxExtent and Resolution and it did some good. This is how it looks now: maxResolution: 20000, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34) The scale of the map is 1:20000 in meters and that Extent is the max extent of the epsg:2393. It now draws a box into the map with the background color defined in the wms.map and the dots I am drawing are in a correct place in this box. The actual map pictures are still drawn way out of bounds and they are still too small. Am I using the maxResolution correctly? And if not how am I able figure out the correct resolution? I also played with the x_0 definitions in the wms.map and that did move the map, but that is fake solution as far as I am aware. Thanks in advance! Christopher Schmidt-2 wrote: > > On Fri, Feb 12, 2010 at 12:14:46AM -0800, Henrik Collin wrote: >> >> Hello, >> >> I am currently trying to build a service that shows a map in a webpage >> with >> OpenLayers. The OpenLayers requests the map data from MapServer by using >> WMS >> and then draws some features in a layer on top of the map data. >> >> My main problem is that the loaded map shows as a tiny dot in the screen >> until I zoom enough. This would be okay if the features would be drawn >> correctly on the map but alas they are not. They are off from the >> position >> thousands of kilometres. My features are in projection EPSG4326 which is >> converted to EPSG2393 the map uses. Projections have been setup in both >> systems MapServer and OpenLayers. >> >> The map consists of multiple tiles that have been combined to shapefile >> with >> MapServers shp2img.exe. When I request the map file form the browser it >> works perfectly. It returns me the correct piece of the map in the >> correct >> tile size. >> >> Does anyone have any idea what am I doing wrong? This is my first try >> with >> both services OpenLayers and MapServer so I am not quite sure which one >> is >> causing the problems, but as the MapServer returns a correct result when >> quering directly my educated guess is that the problem lies in the >> OpenLayers side. > > Your maxExtent and maxResolution are wrong, and unset, respectively. > You'll need to fix that. > > -- Chris > >> I originally tried the OpenLayers side with Google Maps and got that >> working >> ok. >> >> _____________________________________________________________________________________ >> >> HTML (In Header): >> >> >> >> >> >> >> >> _____________________________________________________________________________________ >> >> OPENLAYERS: (This is not a direct copy of the code as the actual code is >> written inside multiple MooTools classes and contains a lot of code not >> needed in here.) >> >> var mapOptions = { >> projection: new OpenLayers.Projection("EPSG:2393"), >> units: "m", >> // maxResolution: 156543.0339, >> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, >> 20037508.34, 20037508.34) >> } >> >> var x = 23; >> var y = 60; >> var pos = { >> lat: x, >> lon: y, >> zoom: 6 >> }; >> >> Method from a class responsible for loading the layers and initializing >> the >> map. >> loadMap: function() { >> >> // Create map layer >> this.map = new OpenLayers.Map(paneMain, mapOptions); >> this.map.addControl(new OpenLayers.Control.NavToolbar()); >> >> >> /* >> this.gphy = new OpenLayers.Layer.Google( >> "Google Physical", >> {type: G_PHYSICAL_MAP, sphericalMercator: true} >> ); >> this.map.addLayer(this.gphy); >> */ >> >> this.wmsserv = new OpenLayers.Layer.WMS( >> "WMS Server", >> >> "http://localhost:591/cgi-bin/mapserv.exe?map=/ms4w/apps/service/wms.map&", >> { >> layers: "Kartta", >> SRS: "EPSG:2393", >> format: "image/png" >> }, >> { isBaseLayer: true } >> ); >> this.map.addLayer(this.wmsserv); >> >> // Add Vector Layer on top of the map layer >> var vectorStyleMap = new OpenLayers.StyleMap({ >> graphicZIndex: 100 >> }); >> >> this.layerLines = new OpenLayers.Layer.Vector("Line Layer", { >> styleMap: >> vectorStyleMap, rendererOptions: { zIndexing: true } }); >> this.map.addLayer(this.layerLines); >> >> // Add layer controls >> selectControl = new OpenLayers.Control.SelectFeature( >> this.layerLines, >> { >> clickout: true, toggle: true, >> multiple: false, hover: false, >> onSelect: this.LineClick, >> onUnSelect: this.LineUnSelect >> } >> ); >> this.map.addControl(selectControl); >> selectControl.activate(); >> >> this.map.events.register("zoomend", this, function(e) { >> this.redrawDots(); >> }); >> >> // Center the map >> var centerPos = new OpenLayers.LonLat(pos.lon, pos.lat).transform(new >> OpenLayers.Projection("EPSG:4326"), new >> OpenLayers.Projection("EPSG:2393")); >> this.map.setCenter(centerPos, this.pos.zoom, false, false); >> }, >> >> _____________________________________________________________________________________ >> >> WMS.MAP (Settings in the MapServer side) >> >> MAP >> >> NAME "Service" >> STATUS ON >> SIZE 256 256 >> IMAGECOLOR 128 128 192 >> # EXTENT 2417774 6720000 2430000 6730000 # Koko kartta >> # EXTENT 2427774 6724000 2429000 6726000 # Zoom >> # EXTENT 3050187.8969 6585228.0377 3761549.0272 7803095.3519 >> IMAGETYPE PNG >> UNITS METERS >> SHAPEPATH "maps/" >> >> PROJECTION >> "init=epsg:2393" >> # "proj=tmerc" >> # "lat_0=0" >> # "lon_0=27" >> # "k=1" >> # "x_0=3500000" >> # "y_0=0" >> # "ellps=intl" >> # >> "towgs84=-96.0617,-82.4278,-121.7435,4.80107,0.34543,-1.37646,1.4964" >> # "units=m" >> # "no_defs" >> END >> >> WEB >> IMAGEPATH "/ms4w/tmp/ms_tmp/" >> IMAGEURL "/ms_tmp/" >> TEMPLATE "service.html" >> LOG "service.log" >> >> METADATA >> "wms_title" "Service" >> "wms_onlineresource" >> "http://localhost:591/cgi-bin/mapserv.exe?map=/ms4w/apps/service/wms.map&" >> "wms_srs" "EPSG:4022" >> END >> >> END >> >> LAYER >> NAME "Kartta" >> METADATA >> "wms_title" "Map layer" >> END >> TYPE RASTER >> STATUS ON >> >> TILEINDEX "testshape.shp" >> >> DUMP TRUE >> PROJECTION >> "init=epsg:2393" >> # "proj=tmerc" >> # "lat_0=0" >> # "lon_0=27" >> # "k=1" >> # "x_0=3500000" >> # "y_0=0" >> # "ellps=intl" >> # >> "towgs84=-96.0617,-82.4278,-121.7435,4.80107,0.34543,-1.37646,1.4964" >> # "units=m" >> # "no_defs" >> END >> >> END >> >> END >> >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://n2.nabble.com/OpenLayers-MapServer-Own-maps-showing-miniature-tiles-tp4559876p4559876.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/OpenLayers-MapServer-Own-maps-showing-miniature-tiles-tp4559876p4561208.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Fri Feb 12 09:17:31 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] OpenLayers + MapServer + Own maps showing miniature tiles In-Reply-To: <1265984042750-4561208.post@n2.nabble.com> References: <1265962486829-4559876.post@n2.nabble.com> <20100212135603.GS24279@metacarta.com> <1265984042750-4561208.post@n2.nabble.com> Message-ID: <20100212141731.GU24279@metacarta.com> On Fri, Feb 12, 2010 at 06:14:02AM -0800, Henrik Collin wrote: > > I changed the maxExtent and Resolution and it did some good. > > This is how it looks now: > > maxResolution: 20000, > maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, > 20037508.34) > > The scale of the map is 1:20000 in meters and that Extent is the max extent > of the epsg:2393. I pretty seriously doubt that. http://spatialreference.org/ref/epsg/2393/ In addition, 1:20000 *scale* and 1:20000 resolution are not the same thing. > It now draws a box into the map with the background color > defined in the wms.map and the dots I am drawing are in a correct place in > this box. The actual map pictures are still drawn way out of bounds and they > are still too small. Because your maxExtent is still totally wrong :) > Am I using the maxResolution correctly? And if not how am I able figure out > the correct resolution? Generally speaking: width of maxExtent / mapWidth (512,256, etc.) Regards, -- Christopher Schmidt MetaCarta From guillaume.polet at trasys.be Fri Feb 12 09:18:33 2010 From: guillaume.polet at trasys.be (Polet Guillaume) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Clip WMS layers In-Reply-To: <20100212135813.GT24279@metacarta.com> References: <20100212135813.GT24279@metacarta.com> Message-ID: Hi Christopher, Thanks for your quick response. I have not put my code because it is a GWT code (combined with GWT-openlayers library), however it is pretty straightforward to go from to another. The only problem is that it requires a much heavier environment to make it run. Anyway, here is a snippet of what I did, maybe somebody can immediately spot my error. If not, I will try to set up a complete example. // This is the base layers that shows a basic world map (it goes on a simple MapServer hosted locally) WMSParams params = new WMSParams(); params.setMaxExtent(new Bounds(-180, -90, 180, 90)); params.setFormat("image/png"); params.setLayers("world"); WMS layer = new WMS("Basic", "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/mapfiles/W orldMap.map", params); // This is the second layer I would like to clip to the extent of Africa WMSParams p2 = new WMSParams(); Bounds extent = new Bounds(-25, -38, 52, 35); p2.setMaxExtent(extent); p2.setFormat("image/png"); p2.setLayers("Bathymetry,Topography,Hillshading,Builtup areas,Cities,Borders,Coastlines"); WMS resLayer = new WMS("Result", "http://www2.demis.nl/wms/wms.asp?wms=WorldMap", p2); resLayer.setIsBaseLayer(false); resLayer.setIsVisible(true); getMap().addLayers(new Layer[]{layer, resLayer}); getMap().addControl(new LayerSwitcher()); getMap().addControl(new PanZoomBar()); getMap().addControl(new Navigation()); getMap().setCenter(new LonLat(0, 0),1); With that code, the second layer takes the whole extent and therefore hides the rest of the map. Guillaume Polet -----Original Message----- From: Christopher Schmidt [mailto:crschmidt@metacarta.com] Sent: 12 February 2010 14:58 To: Polet Guillaume Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Clip WMS layers On Fri, Feb 12, 2010 at 11:03:47AM +0100, Polet Guillaume wrote: > Hi, > > I wondered if it was possible to have a Basic WMS layer (displaying for > example the whole world) and on top of that have a non-basic layer > clipped to a specific extent. The purpose of this is to display the > results of a catalogue of images clipped to the selected area of > interest selected by a user. I believe this is possible, so long as the overlaid datasource is not a tiled datasource with extents that are different than the data extent. > I tried to use two WMS layers with different extents but this does not > work (but maybe I have miscoded something). If you tried something and it didn't work, providing that code will always help actually understand the problem. Regards, -- Christopher Schmidt MetaCarta From sphyrz at gmail.com Fri Feb 12 09:58:29 2010 From: sphyrz at gmail.com (Lewis Oaten) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] WFS Not loading In-Reply-To: <3ddca5671002090909h3a2b25e9v4d1ac109a99d84e1@mail.gmail.com> References: <3ddca5671002090909h3a2b25e9v4d1ac109a99d84e1@mail.gmail.com> Message-ID: <3ddca5671002120658s5c02819cv91c4e92b9b846d4d@mail.gmail.com> Hi all, I am very sorry if this is a duplicate post but I believe my last message didn't appear as I wasn't signed up to the mailing list. I would be very grateful if you could read through my message and pass on your thoughts. Many thanks, Lewis Oaten web: lewisoaten.com twit: twitter.com/lewisoaten key: pk.caecus.co.uk cal: tgl.me/LewisOaten ---------- Forwarded message ---------- From: "Lewis Oaten" Date: 9 Feb 2010 17:09 Subject: WFS Not loading To: Hi All, Excuse me if my etiquette isn't up-to-scratch, this is my first time posting on this mailing list. I have been fighting with a bug for some time when working with GeoServer, GeoExt and OpenLayers. When I try to load a WFS layer, nothing happens. No connection attempt is made to the server and no errors are displayed. If, however, I try to load the same data as WMS, from the same server with similar parameters, the layer loads correctly. Examples of my code are: var geoserverWMS = new OpenLayers.Layer.WMS( "Geoserver WMS: Itasca Lakes", "http://172.16.172.129:8080/geoserver/wms", {layers: "prco303:itasca", transparent: "true"}, {isBaseLayer: false, projection: "EPSG:26915"} ); var geoserver = new OpenLayers.Layer.Vector( "GeoServer WFS: Itasca Lakes", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://172.16.172.129:8080/geoserver/wfs", featureType: "prco303:itasca", featureNS: "http://172.16.172.129", }) }); I have whittled away at the parts of the system until I am attempting to run the WFS example (http://openlayers.org/dev/examples/wfs-states.html) on my own server and am faced with the same problem. Unfortunately, I have run out of ideas to test next. I would be very grateful if someone could give me some idea of what I am doing wrong or at least a suggestion for how to continue debugging. Thanks in advanced for your help. Yours sincerely, Lewis Oaten web: lewisoaten.com twit: twitter.com/lewisoaten pk: pk.caecus.co.uk cal: tgl.me/LewisOaten -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100212/5322c741/attachment.html From crschmidt at metacarta.com Fri Feb 12 10:07:25 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Clip WMS layers In-Reply-To: References: <20100212135813.GT24279@metacarta.com> Message-ID: <20100212150724.GV24279@metacarta.com> On Fri, Feb 12, 2010 at 03:18:33PM +0100, Polet Guillaume wrote: > Hi Christopher, > > Thanks for your quick response. I have not put my code because it is a > GWT code (combined with GWT-openlayers library), however it is pretty > straightforward to go from to another. The only problem is that it > requires a much heavier environment to make it run. > Anyway, here is a snippet of what I did, maybe somebody can immediately > spot my error. If not, I will try to set up a complete example. maxExtent is an *option*, not a parameter. -- Chris > // This is the base layers that shows a basic world map > (it goes on a simple MapServer hosted locally) > WMSParams params = new WMSParams(); > params.setMaxExtent(new Bounds(-180, -90, 180, 90)); > params.setFormat("image/png"); > params.setLayers("world"); > WMS layer = new WMS("Basic", > > "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/mapfiles/W > orldMap.map", > params); > > // This is the second layer I would like to clip to the > extent of Africa > WMSParams p2 = new WMSParams(); > Bounds extent = new Bounds(-25, -38, 52, 35); > p2.setMaxExtent(extent); > p2.setFormat("image/png"); > p2.setLayers("Bathymetry,Topography,Hillshading,Builtup > areas,Cities,Borders,Coastlines"); > WMS resLayer = new WMS("Result", > > "http://www2.demis.nl/wms/wms.asp?wms=WorldMap", > p2); > resLayer.setIsBaseLayer(false); > resLayer.setIsVisible(true); > getMap().addLayers(new Layer[]{layer, resLayer}); > getMap().addControl(new LayerSwitcher()); > getMap().addControl(new PanZoomBar()); > getMap().addControl(new Navigation()); > getMap().setCenter(new LonLat(0, 0),1); > > With that code, the second layer takes the whole extent and therefore > hides the rest of the map. > > > Guillaume Polet > > > > -----Original Message----- > From: Christopher Schmidt [mailto:crschmidt@metacarta.com] > Sent: 12 February 2010 14:58 > To: Polet Guillaume > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Clip WMS layers > > On Fri, Feb 12, 2010 at 11:03:47AM +0100, Polet Guillaume wrote: > > Hi, > > > > I wondered if it was possible to have a Basic WMS layer (displaying > for > > example the whole world) and on top of that have a non-basic layer > > clipped to a specific extent. The purpose of this is to display the > > results of a catalogue of images clipped to the selected area of > > interest selected by a user. > > I believe this is possible, so long as the overlaid datasource > is not a tiled datasource with extents that are different than the > data extent. > > > I tried to use two WMS layers with different extents but this does not > > work (but maybe I have miscoded something). > > If you tried something and it didn't work, providing that code will > always > help actually understand the problem. > > Regards, > -- > Christopher Schmidt > MetaCarta > -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Feb 12 10:15:42 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] WFS Not loading In-Reply-To: <3ddca5671002120658s5c02819cv91c4e92b9b846d4d@mail.gmail.com> References: <3ddca5671002090909h3a2b25e9v4d1ac109a99d84e1@mail.gmail.com> <3ddca5671002120658s5c02819cv91c4e92b9b846d4d@mail.gmail.com> Message-ID: <20100212151542.GW24279@metacarta.com> On Fri, Feb 12, 2010 at 02:58:29PM +0000, Lewis Oaten wrote: > Hi all, > > I am very sorry if this is a duplicate post but I believe my last message > didn't appear as I wasn't signed up to the mailing list. > > I would be very grateful if you could read through my message and pass on > your thoughts. http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost > Many thanks, > > Lewis Oaten > web: lewisoaten.com > twit: twitter.com/lewisoaten > key: pk.caecus.co.uk > cal: tgl.me/LewisOaten > > ---------- Forwarded message ---------- > From: "Lewis Oaten" > Date: 9 Feb 2010 17:09 > Subject: WFS Not loading > To: > > Hi All, > > Excuse me if my etiquette isn't up-to-scratch, this is my first time > posting on this mailing list. > > I have been fighting with a bug for some time when working with > GeoServer, GeoExt and OpenLayers. When I try to load a WFS layer, > nothing happens. No connection attempt is made to the server and no > errors are displayed. If, however, I try to load the same data as WMS, > from the same server with similar parameters, the layer loads > correctly. > > Examples of my code are: > > var geoserverWMS = new OpenLayers.Layer.WMS( > "Geoserver WMS: Itasca Lakes", > "http://172.16.172.129:8080/geoserver/wms", > {layers: "prco303:itasca", transparent: "true"}, > {isBaseLayer: false, projection: "EPSG:26915"} > ); > > var geoserver = new OpenLayers.Layer.Vector( "GeoServer WFS: > Itasca Lakes", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://172.16.172.129:8080/geoserver/wfs", > featureType: "prco303:itasca", > featureNS: "http://172.16.172.129", > }) > }); > > I have whittled away at the parts of the system until I am attempting > to run the WFS example > (http://openlayers.org/dev/examples/wfs-states.html) on my own server > and am faced with the same problem. > > Unfortunately, I have run out of ideas to test next. I would be very > grateful if someone could give me some idea of what I am doing wrong > or at least a suggestion for how to continue debugging. > > Thanks in advanced for your help. > > Yours sincerely, > > Lewis Oaten > web: lewisoaten.com > twit: twitter.com/lewisoaten > pk: pk.caecus.co.uk > cal: tgl.me/LewisOaten > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From rifins at gmail.com Fri Feb 12 10:21:14 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Get viewport in server side Message-ID: Hi, I would like to know how can I get the viewport of the map on the server side, in order to do a query to a database limiting the bounds... Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100212/dc4cfe85/attachment.html From brian.stempin at gmail.com Fri Feb 12 10:46:12 2010 From: brian.stempin at gmail.com (Brian Stempin) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] WFS Not loading In-Reply-To: <20100212151542.GW24279@metacarta.com> References: <3ddca5671002090909h3a2b25e9v4d1ac109a99d84e1@mail.gmail.com> <3ddca5671002120658s5c02819cv91c4e92b9b846d4d@mail.gmail.com> <20100212151542.GW24279@metacarta.com> Message-ID: <351785351002120746l357089c4t1cba4a62f1551a18@mail.gmail.com> You may also want to explicitly set your SRS on your WFS layer. Eg: var geoserver = new OpenLayers.Layer.Vector( "GeoServer WFS: Itasca Lakes", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://172.16.172.129:8080/geoserver/wfs", featureType: "prco303:itasca", featureNS: "http://172.16.172.129", srs: "EPSG:26915" }) }); PS: You have a trailing comma after your featureNS in the code you posted. HTH, Brian On Fri, Feb 12, 2010 at 10:15 AM, Christopher Schmidt < crschmidt@metacarta.com> wrote: > On Fri, Feb 12, 2010 at 02:58:29PM +0000, Lewis Oaten wrote: > > Hi all, > > > > I am very sorry if this is a duplicate post but I believe my last message > > didn't appear as I wasn't signed up to the mailing list. > > > > I would be very grateful if you could read through my message and pass on > > your thoughts. > > http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost > > > Many thanks, > > > > Lewis Oaten > > web: lewisoaten.com > > twit: twitter.com/lewisoaten > > key: pk.caecus.co.uk > > cal: tgl.me/LewisOaten > > > > ---------- Forwarded message ---------- > > From: "Lewis Oaten" > > Date: 9 Feb 2010 17:09 > > Subject: WFS Not loading > > To: > > > > Hi All, > > > > Excuse me if my etiquette isn't up-to-scratch, this is my first time > > posting on this mailing list. > > > > I have been fighting with a bug for some time when working with > > GeoServer, GeoExt and OpenLayers. When I try to load a WFS layer, > > nothing happens. No connection attempt is made to the server and no > > errors are displayed. If, however, I try to load the same data as WMS, > > from the same server with similar parameters, the layer loads > > correctly. > > > > Examples of my code are: > > > > var geoserverWMS = new OpenLayers.Layer.WMS( > > "Geoserver WMS: Itasca Lakes", > > "http://172.16.172.129:8080/geoserver/wms", > > {layers: "prco303:itasca", transparent: "true"}, > > {isBaseLayer: false, projection: "EPSG:26915"} > > ); > > > > var geoserver = new OpenLayers.Layer.Vector( "GeoServer WFS: > > Itasca Lakes", { > > strategies: [new OpenLayers.Strategy.BBOX()], > > protocol: new OpenLayers.Protocol.WFS({ > > url: "http://172.16.172.129:8080/geoserver/wfs", > > featureType: "prco303:itasca", > > featureNS: "http://172.16.172.129", > > }) > > }); > > > > I have whittled away at the parts of the system until I am attempting > > to run the WFS example > > (http://openlayers.org/dev/examples/wfs-states.html) on my own server > > and am faced with the same problem. > > > > Unfortunately, I have run out of ideas to test next. I would be very > > grateful if someone could give me some idea of what I am doing wrong > > or at least a suggestion for how to continue debugging. > > > > Thanks in advanced for your help. > > > > Yours sincerely, > > > > Lewis Oaten > > web: lewisoaten.com > > twit: twitter.com/lewisoaten > > pk: pk.caecus.co.uk > > cal: tgl.me/LewisOaten > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100212/493a10b8/attachment.html From frederic.junod at camptocamp.com Fri Feb 12 10:50:50 2010 From: frederic.junod at camptocamp.com (Frederic Junod) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] KML and area colorization In-Reply-To: <21c3d1f41002112351m587b741dx87ae732f3e75fed5@mail.gmail.com> References: <98899A492FDEB84185B0C47DE30C8A5512D2E303@inf-messagerie.ATMO.local> <98899A492FDEB84185B0C47DE30C8A5512D2E424@inf-messagerie.ATMO.local> <1265835270103-4550765.post@n2.nabble.com> <4B7422D3.5070108@opengeo.org> <1265915807539-4556774.post@n2.nabble.com> <21c3d1f41002112351m587b741dx87ae732f3e75fed5@mail.gmail.com> Message-ID: <21c3d1f41002120750m3dde2d93s31ae3b89a44a5c83@mail.gmail.com> maybe related to http://trac.openlayers.org/ticket/2485 On Fri, Feb 12, 2010 at 8:51 AM, Frederic Junod wrote: > Hello, > > Seems to be an issue with VML and the kml IconStyle property: > ?* edit [1] and remove the IconStyle element (in Style id 'default_normal') > ?* load this kml in http://www.openlayers.org/dev/examples/vector-formats.html > > The fill color and opacity is correct. > > maybe: http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Renderer/VML.js#L280 > > fredj > > [1] http://finder.geocommons.com/overlays/download/4433.kml > > On Thu, Feb 11, 2010 at 8:16 PM, Vadim B. wrote: >> >> Wow, thanks for the quick response and code change. >> >> I rolled the latest VML.js into my codebase (OL 2.8) and rebuilt >> OpenLayers.js, but I'm still seeing the same behavior in IE. >> >> Do I need to get other files besides VML.js to see the change? >> >> Thanks, >> >> -Vadim >> -- >> View this message in context: http://n2.nabble.com/KML-and-area-colorization-tp3081092p4556774.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Fr?d?ric Junod > Camptocamp SA > -- Fr?d?ric Junod Camptocamp SA From guillaume.polet at trasys.be Fri Feb 12 11:27:53 2010 From: guillaume.polet at trasys.be (Polet Guillaume) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Clip WMS layers In-Reply-To: <20100212150724.GV24279@metacarta.com> References: <20100212135813.GT24279@metacarta.com> <20100212150724.GV24279@metacarta.com> Message-ID: Yeah thanks a lot Christopher. I am now one step further. I have rewritten the example in HTML/JS to provide a fully working example. Indeed setting the extent through the options instead of the parameters works a lot better. One last thing though, the extent does not match exactly what I asked (the north/east extent is not respected). I suppose that this is due to the tiling which "can only" make 256x256 px tiles (I know that this can be configured but I am guessing that setting this to 1x1 is the worst solution, I tried 32x32 and it is a bit painful already), so I tried to set singleTile option to true but then I am back to where I started, the whole map is covered by the "clipped layer". Any thoughts? Anyway, thanks a lot for the effort and time spent. Here is the snippet without the singleTile: true option (and a fully working example in attachement): var b = new OpenLayers.Bounds(-25, -38, 52, 35); map = new OpenLayers.Map({ div: "map", projection: "EPSG:4326" }); map.addControl(mp); var layers = new Array(); var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic', maxExtent: new OpenLayers.Bounds(-180.0,-90,180,90)} ); layers.push(wms); layer = new OpenLayers.Layer.WMS("Clipped image", "http://www2.demis.nl/wms/wms.asp?wms=WorldMap", {layers: 'Bathymetry,Topography,Hillshading,Builtup areas,Cities,Borders,Coastlines,Roads,Highways,Rivers,Trails', format: 'image/png'}, {isBaseLayer: false,maxExtent: b, opacity: 1}); layers.push(layer); map.addLayers(layers); map.setCenter(b.getCenterLonLat(), zoom); map.addControl( new OpenLayers.Control.LayerSwitcher() ); Guillaume Polet -----Original Message----- From: Christopher Schmidt [mailto:crschmidt@metacarta.com] Sent: 12 February 2010 16:07 To: Polet Guillaume Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Clip WMS layers On Fri, Feb 12, 2010 at 03:18:33PM +0100, Polet Guillaume wrote: > Hi Christopher, > > Thanks for your quick response. I have not put my code because it is a > GWT code (combined with GWT-openlayers library), however it is pretty > straightforward to go from to another. The only problem is that it > requires a much heavier environment to make it run. > Anyway, here is a snippet of what I did, maybe somebody can immediately > spot my error. If not, I will try to set up a complete example. maxExtent is an *option*, not a parameter. -- Chris > // This is the base layers that shows a basic world map > (it goes on a simple MapServer hosted locally) > WMSParams params = new WMSParams(); > params.setMaxExtent(new Bounds(-180, -90, 180, 90)); > params.setFormat("image/png"); > params.setLayers("world"); > WMS layer = new WMS("Basic", > > "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/mapfiles/W > orldMap.map", > params); > > // This is the second layer I would like to clip to the > extent of Africa > WMSParams p2 = new WMSParams(); > Bounds extent = new Bounds(-25, -38, 52, 35); > p2.setMaxExtent(extent); > p2.setFormat("image/png"); > p2.setLayers("Bathymetry,Topography,Hillshading,Builtup > areas,Cities,Borders,Coastlines"); > WMS resLayer = new WMS("Result", > > "http://www2.demis.nl/wms/wms.asp?wms=WorldMap", > p2); > resLayer.setIsBaseLayer(false); > resLayer.setIsVisible(true); > getMap().addLayers(new Layer[]{layer, resLayer}); > getMap().addControl(new LayerSwitcher()); > getMap().addControl(new PanZoomBar()); > getMap().addControl(new Navigation()); > getMap().setCenter(new LonLat(0, 0),1); > > With that code, the second layer takes the whole extent and therefore > hides the rest of the map. > > > Guillaume Polet > > > > -----Original Message----- > From: Christopher Schmidt [mailto:crschmidt@metacarta.com] > Sent: 12 February 2010 14:58 > To: Polet Guillaume > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Clip WMS layers > > On Fri, Feb 12, 2010 at 11:03:47AM +0100, Polet Guillaume wrote: > > Hi, > > > > I wondered if it was possible to have a Basic WMS layer (displaying > for > > example the whole world) and on top of that have a non-basic layer > > clipped to a specific extent. The purpose of this is to display the > > results of a catalogue of images clipped to the selected area of > > interest selected by a user. > > I believe this is possible, so long as the overlaid datasource > is not a tiled datasource with extents that are different than the > data extent. > > > I tried to use two WMS layers with different extents but this does not > > work (but maybe I have miscoded something). > > If you tried something and it didn't work, providing that code will > always > help actually understand the problem. > > Regards, > -- > Christopher Schmidt > MetaCarta > -- Christopher Schmidt MetaCarta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100212/fcbfc7a2/wms-testdemis3.html From crschmidt at metacarta.com Fri Feb 12 11:44:01 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Clip WMS layers In-Reply-To: References: <20100212135813.GT24279@metacarta.com> <20100212150724.GV24279@metacarta.com> Message-ID: <20100212164400.GX24279@metacarta.com> On Fri, Feb 12, 2010 at 05:27:53PM +0100, Polet Guillaume wrote: > Yeah thanks a lot Christopher. I am now one step further. I have > rewritten the example in HTML/JS to provide a fully working example. > Indeed setting the extent through the options instead of the parameters > works a lot better. > > One last thing though, the extent does not match exactly what I asked > (the north/east extent is not respected). I suppose that this is due to > the tiling which "can only" make 256x256 px tiles (I know that this can > be configured but I am guessing that setting this to 1x1 is the worst > solution, I tried 32x32 and it is a bit painful already), so I tried to > set singleTile option to true but then I am back to where I started, the > whole map is covered by the "clipped layer". Any thoughts? Anyway, > thanks a lot for the effort and time spent. All of these are correct statements; the singleTile layer does not respect maxExtent (though it probably would be relatively simple to make it do so), and the tiles in a WMS layer aren't clipped (adding this would be possible, but harder). I can't imagine a way to fix either of these situations simply. > Here is the snippet without the singleTile: true option (and a fully > working example in attachement): > > var b = new OpenLayers.Bounds(-25, -38, 52, 35); > map = new OpenLayers.Map({ > div: "map", > projection: "EPSG:4326" > }); > > map.addControl(mp); > > var layers = new Array(); > var wms = new OpenLayers.Layer.WMS( "OpenLayers > WMS", > "http://labs.metacarta.com/wms/vmap0", > {layers: 'basic', maxExtent: new > OpenLayers.Bounds(-180.0,-90,180,90)} ); > layers.push(wms); > > layer = new OpenLayers.Layer.WMS("Clipped > image", > > "http://www2.demis.nl/wms/wms.asp?wms=WorldMap", > {layers: > 'Bathymetry,Topography,Hillshading,Builtup > areas,Cities,Borders,Coastlines,Roads,Highways,Rivers,Trails', format: > 'image/png'}, > {isBaseLayer: false,maxExtent: > b, opacity: 1}); > layers.push(layer); > > map.addLayers(layers); > map.setCenter(b.getCenterLonLat(), zoom); > map.addControl( new > OpenLayers.Control.LayerSwitcher() ); > > > > > Guillaume Polet > > > -----Original Message----- > From: Christopher Schmidt [mailto:crschmidt@metacarta.com] > Sent: 12 February 2010 16:07 > To: Polet Guillaume > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Clip WMS layers > > On Fri, Feb 12, 2010 at 03:18:33PM +0100, Polet Guillaume wrote: > > Hi Christopher, > > > > Thanks for your quick response. I have not put my code because it is a > > GWT code (combined with GWT-openlayers library), however it is pretty > > straightforward to go from to another. The only problem is that it > > requires a much heavier environment to make it run. > > Anyway, here is a snippet of what I did, maybe somebody can > immediately > > spot my error. If not, I will try to set up a complete example. > > maxExtent is an *option*, not a parameter. > > -- Chris > > > // This is the base layers that shows a basic world map > > (it goes on a simple MapServer hosted locally) > > WMSParams params = new WMSParams(); > > params.setMaxExtent(new Bounds(-180, -90, 180, 90)); > > params.setFormat("image/png"); > > params.setLayers("world"); > > WMS layer = new WMS("Basic", > > > > > "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/mapfiles/W > > orldMap.map", > > params); > > > > // This is the second layer I would like to clip to the > > extent of Africa > > WMSParams p2 = new WMSParams(); > > Bounds extent = new Bounds(-25, -38, 52, 35); > > p2.setMaxExtent(extent); > > p2.setFormat("image/png"); > > p2.setLayers("Bathymetry,Topography,Hillshading,Builtup > > areas,Cities,Borders,Coastlines"); > > WMS resLayer = new WMS("Result", > > > > "http://www2.demis.nl/wms/wms.asp?wms=WorldMap", > > p2); > > resLayer.setIsBaseLayer(false); > > resLayer.setIsVisible(true); > > getMap().addLayers(new Layer[]{layer, resLayer}); > > getMap().addControl(new LayerSwitcher()); > > getMap().addControl(new PanZoomBar()); > > getMap().addControl(new Navigation()); > > getMap().setCenter(new LonLat(0, 0),1); > > > > With that code, the second layer takes the whole extent and therefore > > hides the rest of the map. > > > > > > Guillaume Polet > > > > > > > > -----Original Message----- > > From: Christopher Schmidt [mailto:crschmidt@metacarta.com] > > Sent: 12 February 2010 14:58 > > To: Polet Guillaume > > Cc: users@openlayers.org > > Subject: Re: [OpenLayers-Users] Clip WMS layers > > > > On Fri, Feb 12, 2010 at 11:03:47AM +0100, Polet Guillaume wrote: > > > Hi, > > > > > > I wondered if it was possible to have a Basic WMS layer (displaying > > for > > > example the whole world) and on top of that have a non-basic layer > > > clipped to a specific extent. The purpose of this is to display the > > > results of a catalogue of images clipped to the selected area of > > > interest selected by a user. > > > > I believe this is possible, so long as the overlaid datasource > > is not a tiled datasource with extents that are different than the > > data extent. > > > > > I tried to use two WMS layers with different extents but this does > not > > > work (but maybe I have miscoded something). > > > > If you tried something and it didn't work, providing that code will > > always > > help actually understand the problem. > > > > Regards, > > -- > > Christopher Schmidt > > MetaCarta > > > > -- > Christopher Schmidt > MetaCarta > Content-Description: wms-test demis3.html > > > > > > > > >
>
>
> > > > > > > -- Christopher Schmidt MetaCarta From vbokin at gmail.com Fri Feb 12 13:08:07 2010 From: vbokin at gmail.com (Vadim B.) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] KML and area colorization In-Reply-To: <21c3d1f41002120750m3dde2d93s31ae3b89a44a5c83@mail.gmail.com> References: <98899A492FDEB84185B0C47DE30C8A5512D2E303@inf-messagerie.ATMO.local> <98899A492FDEB84185B0C47DE30C8A5512D2E424@inf-messagerie.ATMO.local> <1265835270103-4550765.post@n2.nabble.com> <4B7422D3.5070108@opengeo.org> <1265915807539-4556774.post@n2.nabble.com> <21c3d1f41002112351m587b741dx87ae732f3e75fed5@mail.gmail.com> <21c3d1f41002120750m3dde2d93s31ae3b89a44a5c83@mail.gmail.com> Message-ID: <1265998087719-4562636.post@n2.nabble.com> may also be realted to http://trac.openlayers.org/ticket/2485 this post . User is experiencing same problem but with multigeometry. Upon inspecting of the KML that I was pulling in, it has multigeometries as well! And they are nested. ...data... ...data... ... If I modify the KML and remove the POINT after the inner-multigeometry, then it loads fine on the test page. So is this a multi-geometry parsing issue? -Vadim -- View this message in context: http://n2.nabble.com/KML-and-area-colorization-tp3081092p4562636.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stefanie at weykam.net Sat Feb 13 13:23:18 2010 From: stefanie at weykam.net (Stefanie Weykam) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] =?windows-1252?q?WMSGetFeatureInfo=2C_missing_?= =?windows-1252?q?geometry_type_=91box=92?= Message-ID: <4B76EE16.2080905@weykam.net> Hi again, My problem still continues but I have been able to trace down the error ? Seems that OpenLayers actually tries to parse the data ? I got as far as to the parseFeature function in Format/GML.js. Here, the geometry type is read (?Box?) and then the parseGeometry function is called. This is where the trouble starts since ?box? is missing here and thus not recognized as a valid geometry? I can hardly believe that I am the only one here struggling with MapServer GetFeatureInfo responses in GML format. Is there any workaround? By the way, I am not really interested in the geometry itself, what matters is the attribute. Thanks for any advice 12.1.1020: WMSGetFeatureInfo not working as expected with msGMLoutput Hi list members, I have a problem with my Mapserver WMS server and the OpenLayers.Control.WMSGetFeatureInfo. According to wmsOptions.params.info_format in the WMSGetFeatureInfo.js request function is 'application/vnd.ogc.gml' (this is what I want) In the WMSGetFeatureInfo.js handleResponse function request.responseXML is null and request.responseText contains the data (see below). Is this the normal behaviour? -5.133333,43.583333 -5.133333,43.583333 50 43.583333 -5.133333 0.854413312 I then get an error message saying ?Geometry Type not supported: Box? How do I get my GML response parsed correctly? Related Software: OpenLayers 2.8 Firefox 3.5.7 on Windows with Firebug UMN Mapserver 5.2.1 as WMS Server From hbadenhorst at hotmail.com Sun Feb 14 06:50:06 2010 From: hbadenhorst at hotmail.com (Herman Badenhorst) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] IE8 error in VML.js Message-ID: Hi all. My map works fine in mozilla firefox 3.5.7, but with IE8 am am getting the following error. Message: Unspecified error. Line: 85 Char: 9 Code: 0 URI: http://cdewocat.unibe.ch/wocatQM_2/mapfish/client/mfbase/openlayers/lib/OpenLayers/Renderer/VML.js I have even tried the compatibility mode below but with no luck: Below is the link to the map: http://cdewocat.unibe.ch/wocatQM_2/MapViewerSelectMappingUnit.php?CountryCode=RSA&CountryName=SouthAfrica&BaseMap=2009 Please advice Regards, Herman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100214/d7fc03bf/attachment.html From vincentgf at gmail.com Sun Feb 14 07:31:58 2010 From: vincentgf at gmail.com (vincent) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Graticule style Message-ID: <4B77ED3E.2010406@gmail.com> Can anybody guide me how to change the color of Graticule lines and fonts (in labels)? I can't get to understand the concept of symbolizers and their correct usage, can anybody provide some simple example? Please, please help:) regards Vincent From vincent.gulinao at gmail.com Sun Feb 14 08:59:08 2010 From: vincent.gulinao at gmail.com (Vincent Gulinao) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Any good tool for creating vectors available around? Message-ID: I'm trying to define lots of boundaries (e.g. political boundaries down to city level of a certain country) but the only method I know is to manually plot them (i.e. manually taking note of MousePosition, then plot to supported format). I'm sure this is a common burden to many map developers, so I wonder if there's any available tool (preferably free) around, or if experts here could share their own technique to make it easier than manually plotting them? TIA. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100214/cd0a330f/attachment.html From bartvde at osgis.nl Sun Feb 14 10:03:02 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] =?windows-1252?q?WMSGetFeatureInfo=2C_missing_?= =?windows-1252?q?geometry_type_=91box=92?= In-Reply-To: <4B76EE16.2080905@weykam.net> References: <4B76EE16.2080905@weykam.net> Message-ID: <58A38B13-1975-4A6B-8A8B-6F28EE2261F1@osgis.nl> Hi, can you try with trunk, IIRC this has been fixed. Best regards, Bart On Feb 13, 2010, at 7:23 PM, Stefanie Weykam wrote: > Hi again, > My problem still continues but I have been able to trace down the error ? > > Seems that OpenLayers actually tries to parse the data ? I got as far as > to the parseFeature function in Format/GML.js. Here, the geometry type > is read (?Box?) and then the parseGeometry function is called. This is > where the trouble starts since ?box? is missing here and thus not > recognized as a valid geometry? > > I can hardly believe that I am the only one here struggling with > MapServer GetFeatureInfo responses in GML format. Is there any > workaround? By the way, I am not really interested in the geometry > itself, what matters is the attribute. > > Thanks for any advice > > > 12.1.1020: WMSGetFeatureInfo not working as expected with msGMLoutput > Hi list members, > > I have a problem with my Mapserver WMS server and the > OpenLayers.Control.WMSGetFeatureInfo. > > According to wmsOptions.params.info_format in the WMSGetFeatureInfo.js > request function is 'application/vnd.ogc.gml' (this is what I want) > > In the WMSGetFeatureInfo.js handleResponse function request.responseXML > is null and request.responseText contains the data (see below). Is this > the normal behaviour? > > > > > xmlns:gml="http://www.opengis.net/gml" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > > > -5.133333,43.583333 -5.133333,43.583333 > > > 50 > 43.583333 > -5.133333 > 0.854413312 > > > > > I then get an error message saying ?Geometry Type not supported: Box? > > How do I get my GML response parsed correctly? > > > Related Software: > OpenLayers 2.8 > Firefox 3.5.7 on Windows with Firebug > UMN Mapserver 5.2.1 as WMS Server > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From osm at tappenbeck.net Sun Feb 14 12:03:11 2010 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] alternative to show large gpx-file Message-ID: <4B782CCF.4050102@tappenbeck.net> hi! i had a very large gpx-file to show in my haiti map -> http://www.tappenbeck.net/osm/maps/deu/maps4osm.php?id=30 (named). this file is much then 2 mb - did anybody know a alternative way to show this data because the ways will not show every time ! regards Jan :-) From ijturton at gmail.com Sun Feb 14 15:46:24 2010 From: ijturton at gmail.com (Ian Turton) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] alternative to show large gpx-file In-Reply-To: <4B782CCF.4050102@tappenbeck.net> References: <4B782CCF.4050102@tappenbeck.net> Message-ID: On Sun, Feb 14, 2010 at 12:03 PM, Jan Tappenbeck wrote: > hi! > > i had a very large gpx-file to show in my haiti map -> > http://www.tappenbeck.net/osm/maps/deu/maps4osm.php?id=30 (named). > > this file is much then 2 mb - did anybody know a alternative way to show > this data because the ways will not show every time ! Try a Web Map Server - GeoServer (GeoServer.org) or MapServer (mapserver.org) would probably be good choices. You may also want to look at http://www.google.com/search?q=gpx+to+shapefile Ian -- Ian Turton Sent from Altoona, PA, United States From p.scadden at gns.cri.nz Sun Feb 14 19:54:41 2010 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Hassles parsing Arcgis WFS getcapabilities in openlayers. Message-ID: <4B789B51.3060708@gns.cri.nz> My code for pulling apart an getcapabilities response looks like this: var wfsGetCapabilitiesParsed = new OpenLayers.Format.WFSCapabilities.v1_1_0().read(response.responseXML); for (i = 0; i < wfsGetCapabilitiesParsed.featureTypeList.featureTypes.length; i++) { var layer = wfsGetCapabilitiesParsed.featureTypeList.featureTypes[i]; etc Works fine for geoserver, but featurTypeList is undefined when run against an ArcGIS WFS service. Looking at the returned xml, Geoserver: QueryLayer1Layer1GNSurn:x-ogc:def:crs:EPSG:27200170.51335720141336 -45.88837478493096176.46451602211573 -38.63275247150488 ArcGIS: Layer1Layer1urn:x-ogc:def:crs:EPSG:6.9:27200urn:x-ogc:def:crs:EPSG:6.9:4326text/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0-180 -54.1184466840914180 -23.1331836761979 Is the wfs: bits causing the parser to fail? -- Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232 Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From J.Phan at bom.gov.au Sun Feb 14 23:40:38 2010 From: J.Phan at bom.gov.au (John Phan) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] GeoJSON MultiPoint Features [SEC=UNCLASSIFIED] In-Reply-To: Message-ID: <8ECEF889F305C8439DE8A3FD733264AD015038F32765@BOM-VMBX-HO.bom.gov.au> Hi, I'm kind of new to OpenLayers. But I want to use GeoJSON to request geometric features using the geometric type: MultiPoint. The browser has no problems rendering the vector layer. Now how do I associate an onclick event with each of these points (rather than a collection of points). My OL code looks like this. .... var pointsLayer = new OpenLayers.Layer.Vector("A Layer", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "multipoints.json", format: new OpenLayers.Format.GeoJSON() }) }); map.addLayer(pointsLayer); .... And my geojson file looks like this: { "type": "Feature", "id": "OpenLayers.Feature.Vector_336", "properties": { }, "geometry": { "type": "MultiPoint", "coordinates": [ [176.5,-15.0],[177.2,-15.1],[178.0,-15.1],[178.4,-15.1] ] } } Thanks, John From bartvde at osgis.nl Mon Feb 15 01:35:18 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Hassles parsing Arcgis WFS getcapabilities in openlayers. In-Reply-To: <4B789B51.3060708@gns.cri.nz> References: <4B789B51.3060708@gns.cri.nz> Message-ID: <4755F061-4880-4B7C-9CB8-8329AA4ACA92@osgis.nl> Hi Phil, can you either validate the output from AGS against an XML validator, or post the full WFS GetCapabilities XML. TIA. Best regards, Bart On Feb 15, 2010, at 1:54 AM, Phil Scadden wrote: > My code for pulling apart an getcapabilities response looks like this: > var wfsGetCapabilitiesParsed = new > OpenLayers.Format.WFSCapabilities.v1_1_0().read(response.responseXML); > for (i = 0; i < > wfsGetCapabilitiesParsed.featureTypeList.featureTypes.length; i++) { > var layer = > wfsGetCapabilitiesParsed.featureTypeList.featureTypes[i]; > etc > > Works fine for geoserver, but featurTypeList is undefined when run > against an ArcGIS WFS service. > Looking at the returned xml, > > Geoserver: > QueryLayer1Layer1GNSurn:x-ogc:def:crs:EPSG:27200170.51335720141336 > -45.88837478493096176.46451602211573 > -38.63275247150488 > > > ArcGIS: > Layer1Layer1urn:x-ogc:def:crs:EPSG:6.9:27200urn:x-ogc:def:crs:EPSG:6.9:4326text/xml; > subType=gml/3.1.1/profiles/gmlsf/1.0.0/0-180 > -54.1184466840914180 > -23.1331836761979 > > Is the wfs: bits causing the parser to fail? > > -- > Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, > Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232 > > > Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From eric.lemoine at camptocamp.com Mon Feb 15 01:44:13 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] GeoJSON MultiPoint Features [SEC=UNCLASSIFIED] In-Reply-To: <8ECEF889F305C8439DE8A3FD733264AD015038F32765@BOM-VMBX-HO.bom.gov.au> References: <8ECEF889F305C8439DE8A3FD733264AD015038F32765@BOM-VMBX-HO.bom.gov.au> Message-ID: On Monday, February 15, 2010, John Phan wrote: > > Hi, > > I'm kind of new to OpenLayers. But I want to use GeoJSON to request geometric features using the geometric type: MultiPoint. > > The browser has no problems rendering the vector layer. > > Now how do I associate an onclick event with each of these points (rather than a collection of points). Hi. Have you looked at Control.SelectFeature? When clicking on a point the control will select and highlight the whole collection of points the feature comprises though. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Mon Feb 15 01:52:59 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Graticule style In-Reply-To: <4B77ED3E.2010406@gmail.com> References: <4B77ED3E.2010406@gmail.com> Message-ID: On Sunday, February 14, 2010, vincent wrote: > Can anybody guide me how to change the color of Graticule lines and > fonts (in labels)? I can't get to understand the concept of symbolizers > and their correct usage, can anybody provide some simple example? A symbolizer is a hash of style properties. For example, see [1] for the default symbolizer of lines for the Graticule control. The page [2] in the docs provides a list of style properties. [1] [2] Hope it helps, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Mon Feb 15 02:19:30 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Get viewport in server side In-Reply-To: References: Message-ID: On Friday, February 12, 2010, JuKiM wrote: > Hi, > I would like to know how can I get the viewport of the map on the server side, in order to do a query to a database limiting the bounds... Hi. You can send the return value of map.getExtent().toBBOX() to your server code. Hope this answers your question. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ahocevar at opengeo.org Mon Feb 15 02:31:23 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] IE8 error in VML.js In-Reply-To: References: Message-ID: <4B78F84B.5030600@opengeo.org> On 2010-02-14 12:50, Herman Badenhorst wrote: > Hi all. > > My map works fine in mozilla firefox 3.5.7, but with IE8 am am getting > the following error. > > Message: Unspecified error. > Line: 85 > Char: 9 > Code: 0 > URI: > http://cdewocat.unibe.ch/wocatQM_2/mapfish/client/mfbase/openlayers/lib/OpenLayers/Renderer/VML.js You are creating your map too early. Execute your createMap method in a document.onload handler (instead of Ext.onReady), and things will be fine. Regards, Andreas. > > I have even tried the compatibility mode below but with no luck: > > > Below is the link to the map: > http://cdewocat.unibe.ch/wocatQM_2/MapViewerSelectMappingUnit.php?CountryCode=RSA&CountryName=SouthAfrica&BaseMap=2009 > > > Please advice > > Regards, > Herman > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From hcollin78 at googlemail.com Mon Feb 15 02:58:05 2010 From: hcollin78 at googlemail.com (Henrik Collin) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] OpenLayers + MapServer + Own maps showing miniature tiles In-Reply-To: <20100212141731.GU24279@metacarta.com> References: <1265962486829-4559876.post@n2.nabble.com> <20100212135603.GS24279@metacarta.com> <1265984042750-4561208.post@n2.nabble.com> <20100212141731.GU24279@metacarta.com> Message-ID: <1266220685658-4573338.post@n2.nabble.com> On Fri, Feb 12, 2010 at 06:14:02AM -0800, Henrik Collin wrote: >> >> I changed the maxExtent and Resolution and it did some good. >> >> This is how it looks now: >> >> maxResolution: 20000, >> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, >> 20037508.34) >> >> The scale of the map is 1:20000 in meters and that Extent is the max >> extent >> of the epsg:2393. > I pretty seriously doubt that. > > http://spatialreference.org/ref/epsg/2393/ > >In addition, 1:20000 *scale* and 1:20000 resolution are not the same thing. Ah so true. My bad I actually posted the wrong extent from the code. I have tried about fifty different Extents. Now the extent is as it was posted in the spatialreference: maxExtent: new OpenLayers.Bounds(3050187.8969, 6585228.0377, 3761549.0272, 7803095.3519) >> It now draws a box into the map with the background color >> defined in the wms.map and the dots I am drawing are in a correct place >> in >> this box. The actual map pictures are still drawn way out of bounds and >> they >> are still too small. >Because your maxExtent is still totally wrong :) >> Am I using the maxResolution correctly? And if not how am I able figure >> out >> the correct resolution? >Generally speaking: width of maxExtent / mapWidth (512,256, etc.) I calculated the resolution to be: (3761549.0272-3050187.8969)/256 = 2778,754415234375 maxResolution: 2779, This does not produce any good results either. I think I am missing something simple... Scale, resolutions settings or something. I am sorry about these complete newbie questions as this is my first work with OpenLayers and MapServer. - Henrik -- View this message in context: http://n2.nabble.com/OpenLayers-MapServer-Own-maps-showing-miniature-tiles-tp4559876p4573338.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Mon Feb 15 03:07:02 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] IE8 error in VML.js In-Reply-To: <4B78F84B.5030600@opengeo.org> References: <4B78F84B.5030600@opengeo.org> Message-ID: On Monday, February 15, 2010, Andreas Hocevar wrote: > On 2010-02-14 12:50, Herman Badenhorst wrote: >> Hi all. >> >> My map works fine in mozilla firefox 3.5.7, but with IE8 am am getting >> the following error. >> >> Message: Unspecified error. >> Line: 85 >> Char: 9 >> Code: 0 >> URI: >> http://cdewocat.unibe.ch/wocatQM_2/mapfish/client/mfbase/openlayers/lib/OpenLayers/Renderer/VML.js > > You are creating your map too early. Execute your createMap method in a > document.onload handler (instead of Ext.onReady), and things will be fine. Andreas, would you consider this a bug in Ext.onReady? Thanks, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ahocevar at opengeo.org Mon Feb 15 03:17:31 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] IE8 error in VML.js In-Reply-To: References: <4B78F84B.5030600@opengeo.org> Message-ID: <4B79031B.7000609@opengeo.org> On 2010-02-15 09:07, Eric Lemoine wrote: > On Monday, February 15, 2010, Andreas Hocevar wrote: > >> On 2010-02-14 12:50, Herman Badenhorst wrote: >> >>> Hi all. >>> >>> My map works fine in mozilla firefox 3.5.7, but with IE8 am am getting >>> the following error. >>> >>> Message: Unspecified error. >>> Line: 85 >>> Char: 9 >>> Code: 0 >>> URI: >>> http://cdewocat.unibe.ch/wocatQM_2/mapfish/client/mfbase/openlayers/lib/OpenLayers/Renderer/VML.js >>> >> You are creating your map too early. Execute your createMap method in a >> document.onload handler (instead of Ext.onReady), and things will be fine. >> > Andreas, would you consider this a bug in Ext.onReady? > Not necessarily, because the documentation of Ext.onReady says "Fires when the document is ready (before onload and before images are loaded)" *before onload*. Microsoft's documentation does not say when document.namespaces is ready, but all our OpenLayers examples use an init function, which is bound to document.onload, because we know that document.namespaces is available at the time document.onload is fired. Regards, Andreas. > Thanks, > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From feeneyi at forthvalleygis.co.uk Mon Feb 15 03:37:31 2010 From: feeneyi at forthvalleygis.co.uk (Ian Feeney) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Custom proxy/facade between OpenLayers client and a SOAP Web Service Message-ID: <4B7907CA.788A.00B1.0@forthvalleygis.co.uk> Hi, Fairly new to open Layers, and looking for some advice and hopefully pointed in the right direction. Looking to develop web mapping for internet clients using OpenLayers. Mapping will come from a SOAP web service (NOT WMS) behind a firewall. For security reasons we don't want to make this SOAP service available on the internet, and have the idea that we could develop a sort of proxy, or facade that will sit between OpenLayers in the client browsers, and the SOAP service to handle image requests. The idea is that we then only need to allow access to the SOAP ws from the proxy. This will proxy will probably be a php componenet in an existing php site. The url property of the OpenLayers.Layer will point to this proxy, and the proxy will simply pull out parameters from the request such as BBOX, layers, and present them to the SOAP ws. A base64 image string will come back from the ws, and the image will be returned to the client. So, does this sound like a goer? What do I need to think about? What OpenLayers.Layer type should I use? Was thinking OpenLayers.Layer.HTTPRequest? Appropriate? Any performance considerations with this? Any considerations for still being able to use the OpenLayers functionality in full? Any advice gratefully recieved. Ian Ian Feeney Senior Consultant (Systems) Forth Valley GIS Ltd. Drummond House Wellgreen Place Stirling FK8 2DY Tel: 01786 443939 Fax: 01786 443987 Email: feeneyi@forthvalleygis.co.uk Web: www.forthvalleygis.co.uk For Support & Training please call 01786 443930 From hbadenhorst at hotmail.com Mon Feb 15 03:41:52 2010 From: hbadenhorst at hotmail.com (Herman Badenhorst) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] IE8 error in VML.js In-Reply-To: <4B79031B.7000609@opengeo.org> References: <4B78F84B.5030600@opengeo.org> <4B79031B.7000609@opengeo.org> Message-ID: Hi all. Thanks for feedback! I've made the suggested change by creating the map in the onload="init()" event of the body, but now I am getting this error: Message: 'undefined' is null or not an object Line: 12041 Char: 17 Code: 0 URI: http://cdewocat.unibe.ch/wocatQM_2/mapfish/client/mfbase/ext/ext-all-debug.js Regards, Herman On Mon, Feb 15, 2010 at 10:17 AM, Andreas Hocevar wrote: > On 2010-02-15 09:07, Eric Lemoine wrote: > > On Monday, February 15, 2010, Andreas Hocevar > wrote: > > > >> On 2010-02-14 12:50, Herman Badenhorst wrote: > >> > >>> Hi all. > >>> > >>> My map works fine in mozilla firefox 3.5.7, but with IE8 am am getting > >>> the following error. > >>> > >>> Message: Unspecified error. > >>> Line: 85 > >>> Char: 9 > >>> Code: 0 > >>> URI: > >>> > http://cdewocat.unibe.ch/wocatQM_2/mapfish/client/mfbase/openlayers/lib/OpenLayers/Renderer/VML.js > >>> > >> You are creating your map too early. Execute your createMap method in a > >> document.onload handler (instead of Ext.onReady), and things will be > fine. > >> > > Andreas, would you consider this a bug in Ext.onReady? > > > > Not necessarily, because the documentation of Ext.onReady says > > "Fires when the document is ready (before onload and before images are > loaded)" > > *before onload*. Microsoft's documentation does not say when > document.namespaces is ready, but all our OpenLayers examples use an > init function, which is bound to document.onload, because we know that > document.namespaces is available at the time document.onload is fired. > > Regards, > Andreas. > > > Thanks, > > > > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100215/3c13be1d/attachment.html From feeneyi at forthvalleygis.co.uk Mon Feb 15 03:43:20 2010 From: feeneyi at forthvalleygis.co.uk (feenster) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Custom proxy/facade between OpenLayers client and a SOAP Web Service Message-ID: <1266223400336-4573481.post@n2.nabble.com> Hi, Fairly new to open Layers, and looking for some advice and hopefully pointed in the right direction. Looking to develop web mapping for internet clients using OpenLayers. Mapping will come from a SOAP web service (NOT WMS) behind a firewall. For security reasons we don't want to make this SOAP service available on the internet, and have the idea that we could develop a sort of proxy, or facade that will sit between OpenLayers in the client browsers, and the SOAP service to handle image requests. OpenLayers Client <---> Proxy Server Components(s) <---> SOAP Web Service (for mapping) The idea is that we then only need to allow access to the SOAP ws from the proxy. This will proxy will probably be a php componenet in an existing php site. The url property of the OpenLayers.Layer will point to this proxy, and the proxy will simply pull out parameters from the request such as BBOX, layers, and present them to the SOAP ws. A base64 image string will come back from the ws, and the image will be returned to the client. So, does this sound like a goer? What do I need to think about? What OpenLayers.Layer type should I use? Was thinking OpenLayers.Layer.HTTPRequest? Appropriate? Any performance considerations with this? Any considerations for still being able to use the OpenLayers functionality in full? Any advice gratefully recieved. Ian -- View this message in context: http://n2.nabble.com/Custom-proxy-facade-between-OpenLayers-client-and-a-SOAP-Web-Service-tp4573481p4573481.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hcollin78 at googlemail.com Mon Feb 15 05:22:01 2010 From: hcollin78 at googlemail.com (Henrik Collin) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] OpenLayers + MapServer + Own maps showing miniature tiles In-Reply-To: <1266220685658-4573338.post@n2.nabble.com> References: <1265962486829-4559876.post@n2.nabble.com> <20100212135603.GS24279@metacarta.com> <1265984042750-4561208.post@n2.nabble.com> <20100212141731.GU24279@metacarta.com> <1266220685658-4573338.post@n2.nabble.com> Message-ID: <1266229321144-4573766.post@n2.nabble.com> Well I solved the problem. The map data was in a different projection than it said on the label. The real projection was 2392. After switching the MapServer'S layer settings to this projection everything fell in place. Thank you for everybody for helping me out! It was appriciated. - Henrik -- View this message in context: http://n2.nabble.com/OpenLayers-MapServer-Own-maps-showing-miniature-tiles-tp4559876p4573766.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From thedoktor78 at gmail.com Mon Feb 15 10:41:34 2010 From: thedoktor78 at gmail.com (thedok78) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Zoom to the extent of a cluster Message-ID: <1266248494563-4575116.post@n2.nabble.com> Hello everyone, I'm using the cluster strategy for improving visualization of points from a WFS. Now I'm trying to figure out how to zoom to the extent of a cluster when you click on a point. Anybody has any ideas on how to create this function? Thanks Luca -- View this message in context: http://n2.nabble.com/Zoom-to-the-extent-of-a-cluster-tp4575116p4575116.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Mon Feb 15 10:50:04 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] GeoJSON MultiPoint Features [SEC=UNCLASSIFIED] In-Reply-To: References: <8ECEF889F305C8439DE8A3FD733264AD015038F32765@BOM-VMBX-HO.bom.gov.au> Message-ID: <20100215155003.GA21714@metacarta.com> On Mon, Feb 15, 2010 at 07:44:13AM +0100, Eric Lemoine wrote: > On Monday, February 15, 2010, John Phan wrote: > > > > Hi, > > > > I'm kind of new to OpenLayers. But I want to use GeoJSON to request geometric features using the geometric type: MultiPoint. > > > > The browser has no problems rendering the vector layer. > > > > Now how do I associate an onclick event with each of these points (rather than a collection of points). > > Hi. Have you looked at Control.SelectFeature? When clicking on a point > the control will select and highlight the whole collection of points > the feature comprises though. Eric, It sounds like this is exactly the problem he is having, since his query specifically mentioned "only one, and not a collection". To the OP: AFAIK, you can't. -- Chris From crschmidt at metacarta.com Mon Feb 15 10:51:53 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Custom proxy/facade between OpenLayers client and a SOAP Web Service In-Reply-To: <4B7907CA.788A.00B1.0@forthvalleygis.co.uk> References: <4B7907CA.788A.00B1.0@forthvalleygis.co.uk> Message-ID: <20100215155153.GB21714@metacarta.com> On Mon, Feb 15, 2010 at 08:37:31AM +0000, Ian Feeney wrote: > Hi, > > Fairly new to open Layers, and looking for some advice and hopefully pointed in the right direction. > > Looking to develop web mapping for internet clients using OpenLayers. Mapping will come from a SOAP web service (NOT WMS) behind a firewall. For security reasons we don't want to make this SOAP service available on the internet, and have the idea that we could develop a sort of proxy, or facade that will sit between OpenLayers in the client browsers, and the SOAP service to handle image requests. The idea is that we then only need to allow access to the SOAP ws from the proxy. This will proxy will probably be a php componenet in an existing php site. The url property of the OpenLayers.Layer will point to this proxy, and the proxy will simply pull out parameters from the request such as BBOX, layers, and present them to the SOAP ws. A base64 image string will come back from the ws, and the image will be returned to the client. > > So, does this sound like a goer? Yes. > What do I need to think about? What OpenLayers.Layer type should I use? No reason, in my mind not to just make the proxy look "WMS-like"; take ?BBOX= from the URL, and use that to form your proxy request. So long as your service just ignores extra parameters, you'll end up using the most commonly used OL layer class and won't have to write much fancy code. Regards, -- Christopher Schmidt MetaCarta From eric.lemoine at camptocamp.com Mon Feb 15 11:10:37 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] GeoJSON MultiPoint Features [SEC=UNCLASSIFIED] In-Reply-To: <20100215155003.GA21714@metacarta.com> References: <8ECEF889F305C8439DE8A3FD733264AD015038F32765@BOM-VMBX-HO.bom.gov.au> <20100215155003.GA21714@metacarta.com> Message-ID: On Mon, Feb 15, 2010 at 4:50 PM, Christopher Schmidt wrote: > On Mon, Feb 15, 2010 at 07:44:13AM +0100, Eric Lemoine wrote: >> On Monday, February 15, 2010, John Phan wrote: >> > >> > Hi, >> > >> > I'm kind of new to OpenLayers. But I want to use GeoJSON to request geometric features using the geometric type: MultiPoint. >> > >> > The browser has no problems rendering the vector layer. >> > >> > Now how do I associate an onclick event with each of these points (rather than a collection of points). >> >> Hi. Have you looked at Control.SelectFeature? When clicking on a point >> the control will select and highlight the whole collection of points >> the feature comprises though. > > Eric, > > It sounds like this is exactly the problem he is having, since his query > specifically mentioned "only one, and not a collection". > > To the OP: AFAIK, you can't. Indeed. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From braas at steckelfisch.nl Mon Feb 15 11:47:43 2010 From: braas at steckelfisch.nl (Gert-Jan Braas) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Problem when switching controls Message-ID: <56646.82.73.227.53.1266252463.squirrel@webmail.mx10.nl> Hi, I'm having a problem with OpenLayers.Control.NavToolbar. The problem is shown on this page: http://ligplekwijzer.steckelfisch.nl/marker-test.html click on the magnifing glass, and use that to zoom in to the lowest level. If the lowest level is reached, a black dot is shown. This black dot is movable and clickable. When (left)clicked, a popup with a form is shown (or it should be), and information regarding the location can be filled in. If the dot is richt-clicked, and then left clicked, the popup works. If the magnifiing-glass is not used, (but zooming-in is done with the slider) everyting usualy works. What am I missing here? Regards, Gert-Jan Braas ==================== Scholen dienen methodes te onderwijzen, niet het gebruik van Microsoft producten. From p.scadden at gns.cri.nz Mon Feb 15 15:16:44 2010 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Hassles parsing Arcgis WFS getcapabilities in openlayers. In-Reply-To: <4755F061-4880-4B7C-9CB8-8329AA4ACA92@osgis.nl> References: <4B789B51.3060708@gns.cri.nz> <4755F061-4880-4B7C-9CB8-8329AA4ACA92@osgis.nl> Message-ID: <4B79ABAC.2040604@gns.cri.nz> An example of the full XML response for the WFS capabilities from AGS is: wfs:WFS_Capabilities version='1.1.0' xsi:schemaLocation='http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/gml.xsd http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.1.0/filter.xsd http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsAll.xsd http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd' xmlns:wfs='http://www.opengis.net/wfs' xmlns:ogc='http://www.opengis.net/ogc' xmlns:gml='http://www.opengis.net/gml' xmlns:ows='http://www.opengis.net/ows' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:MyDomain='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer'>PBE_MyDomainWFS1.1.01.1.0text/xmltext/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0resultshitstext/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0resultstext/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0text/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0ALLGenerateNewlatitude,longitudeMyDomain:Layer_1Layer_1urn:x-ogc:def:crs:EPSG:6.9:27200urn:x-ogc:def:crs:EPSG:6.9:4326text/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0-180 -54.1184466840914180 -23.1331836761979MyDomain:Layer_2Layer_2urn:x-ogc:def:crs:EPSG:6.9:4326urn:x-ogc:def:crs:EPSG:6.9:4326text/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0172.390547995875 -41.8486191231589174.468258516558 -38.7705021368543gml:Envelopegml:Pointgml:Polygongml:LineStringEqualToNotEqualToLessThanGreaterThanLessThanEqualToGreaterThanEqualToLikeBetweenNullCheck Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From J.Phan at bom.gov.au Mon Feb 15 17:30:33 2010 From: J.Phan at bom.gov.au (John Phan) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] GeoJSON MultiPoint Features [SEC=UNCLASSIFIED] In-Reply-To: Message-ID: <8ECEF889F305C8439DE8A3FD733264AD015038F32766@BOM-VMBX-HO.bom.gov.au> I think I probably have a solution to it. Using the FeatureCollection in the geojson file (instead of MultiPoint) seems to have solved the problem. Anyway, thanks for your prompt reply. John -----Original Message----- From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] Sent: Tuesday, 16 February 2010 3:11 AM To: Christopher Schmidt Cc: John Phan; users@openlayers.org Subject: Re: [OpenLayers-Users] GeoJSON MultiPoint Features [SEC=UNCLASSIFIED] On Mon, Feb 15, 2010 at 4:50 PM, Christopher Schmidt wrote: > On Mon, Feb 15, 2010 at 07:44:13AM +0100, Eric Lemoine wrote: >> On Monday, February 15, 2010, John Phan wrote: >> > >> > Hi, >> > >> > I'm kind of new to OpenLayers. But I want to use GeoJSON to request geometric features using the geometric type: MultiPoint. >> > >> > The browser has no problems rendering the vector layer. >> > >> > Now how do I associate an onclick event with each of these points (rather than a collection of points). >> >> Hi. Have you looked at Control.SelectFeature? When clicking on a >> point the control will select and highlight the whole collection of >> points the feature comprises though. > > Eric, > > It sounds like this is exactly the problem he is having, since his > query specifically mentioned "only one, and not a collection". > > To the OP: AFAIK, you can't. Indeed. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From antoni.vidal at icc.cat Tue Feb 16 02:34:44 2010 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] alternative to show large gpx-file Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D673F@CORRIOL.icc.local> Hi, Try to convert to kml, is lighter than gpx format, and method to show in OL is very simillar. Regards. Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogr?fic de Catalunya Parc de Montju?c, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat Message: 1 Date: Sun, 14 Feb 2010 18:03:11 +0100 From: Jan Tappenbeck Subject: [OpenLayers-Users] alternative to show large gpx-file To: users@openlayers.org Message-ID: <4B782CCF.4050102@tappenbeck.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed hi! i had a very large gpx-file to show in my haiti map -> http://www.tappenbeck.net/osm/maps/deu/maps4osm.php?id=30 (named). this file is much then 2 mb - did anybody know a alternative way to show this data because the ways will not show every time ! regards Jan :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100216/ac5c69db/attachment.html From dalda at ikt.es Tue Feb 16 05:48:41 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Problems with marker.events.register and firefox Message-ID: <224DBDAF88A6AC47BD22432815351BE007BF4A69@nekaposta1> Hi, I'm having some issues with mousedown or click events associated to a marker. The problem is that it works on Chrome and IE8/IE7 but not in Firefox. Here is the code I use: marker.events.register('click', objectArray[i], function(evt){ var coords = this.getCoords().split(","); //

var labelColor = this.getLabelColor().split(","); var innerHtml = '

'; map.addPopup(new OpenLayers.Popup.FramedCloud("id", new OpenLayers.LonLat(coords[0],coords[1]),null,innerHtml + this.getLabelText() + "

",evt.object.icon,true),true); }); Any ideas? Tested in Firefox 3.6, 3.5.7, 3.0.16 and not working. Is there something special that I have to configure? Thanks. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? From hcan at hotmail.com Tue Feb 16 08:25:25 2010 From: hcan at hotmail.com (ZerM) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Show polygon vertices? Message-ID: <1266326725856-4580179.post@n2.nabble.com> Hi, Is there a way to show (with a dot or other mark) the vertices in a polygon or line on a vector layer? Thanks, -ZM -- View this message in context: http://n2.nabble.com/Show-polygon-vertices-tp4580179p4580179.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From maxime.phaneuf at usherbrooke.ca Tue Feb 16 08:54:59 2010 From: maxime.phaneuf at usherbrooke.ca (Maxime Phaneuf) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Show polygon vertices? In-Reply-To: <1266326725856-4580179.post@n2.nabble.com> References: <1266326725856-4580179.post@n2.nabble.com> Message-ID: <1266328499685-4580312.post@n2.nabble.com> Hi Yes it is possible, You juste have to create a modify control and select the feature you want to modify. Just take a look at this example: http://dev.openlayers.org/releases/OpenLayers-2.8/examples/modify-feature.html Good luck Maxime -- View this message in context: http://n2.nabble.com/Show-polygon-vertices-tp4580179p4580312.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tobias.wendorff at uni-dortmund.de Tue Feb 16 09:07:04 2010 From: tobias.wendorff at uni-dortmund.de (Tobias Wendorff) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] alternative to show large gpx-file In-Reply-To: <4B782CCF.4050102@tappenbeck.net> References: <4B782CCF.4050102@tappenbeck.net> Message-ID: <4B7AA688.8020805@uni-dortmund.de> Jan Tappenbeck schrieb: > this file is much then 2 mb - did anybody know a alternative way to show > this data because the ways will not show every time ! Featureserver, GeoJSON etc. etc. From hcan at hotmail.com Tue Feb 16 09:37:39 2010 From: hcan at hotmail.com (ZerM) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] Show polygon vertices? In-Reply-To: <1266328499685-4580312.post@n2.nabble.com> References: <1266326725856-4580179.post@n2.nabble.com> <1266328499685-4580312.post@n2.nabble.com> Message-ID: <1266331059264-4580541.post@n2.nabble.com> Thanks Maxime, I have two layers with polygon vectors and want to edit polygons from one layer, snapping against vectors on the target layer. I want to show the vertices on the target layer in order to make the snapping procedure more precise for the user. I don't really want to select features on the target layer, since I already have a feature selected, using the modify control, when snapping. Is there another way to show the vertices? Thanks, ZM -- View this message in context: http://n2.nabble.com/Show-polygon-vertices-tp4580179p4580541.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From nabble at stevemartin.org.uk Tue Feb 16 11:11:28 2010 From: nabble at stevemartin.org.uk (smartini) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] How to recenter the map when drawing Message-ID: <1266336688585-4581070.post@n2.nabble.com> Hi. Just to define my business requirement first. When drawing on the map aka plotting a trail, I need to be able to recenter the map at the point at which a vertex is added. Registering a click handler for the map to trigger a recenter only appears to work when not in sketch mode. The myriad of events available during drawing do not appear to provide me with what I need. Basically, there's the absence of a 'click' or a 'VertexAdded' event. Just to reiterate, I can successfully register click events with the map and perform recentering based on the coordinates from these event arguments. I cannot, however, seem to be able to achieve this while in the process of plotting lines. Regards, Steve -- View this message in context: http://n2.nabble.com/How-to-recenter-the-map-when-drawing-tp4581070p4581070.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From woodbri at swoodbridge.com Tue Feb 16 11:30:03 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] How to recenter the map when drawing In-Reply-To: <1266336688585-4581070.post@n2.nabble.com> References: <1266336688585-4581070.post@n2.nabble.com> Message-ID: <4B7AC80B.2080803@swoodbridge.com> smartini wrote: > Hi. > Just to define my business requirement first. When drawing on the map aka > plotting a trail, I need to be able to recenter the map at the point at > which a vertex is added. > > Registering a click handler for the map to trigger a recenter only appears > to work when not in sketch mode. > The myriad of events available during drawing do not appear to provide me > with what I need. Basically, there's the absence of a 'click' or a > 'VertexAdded' event. > > Just to reiterate, I can successfully register click events with the map and > perform recentering based on the coordinates from these event arguments. I > cannot, however, seem to be able to achieve this while in the process of > plotting lines. > > Regards, > Steve Why don't you just call map.setCenter() after you add you point? -Steve From nabble at stevemartin.org.uk Tue Feb 16 11:47:37 2010 From: nabble at stevemartin.org.uk (smartini) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] How to recenter the map when drawing In-Reply-To: <4B7AC80B.2080803@swoodbridge.com> References: <1266336688585-4581070.post@n2.nabble.com> <4B7AC80B.2080803@swoodbridge.com> Message-ID: <1266338857052-4581324.post@n2.nabble.com> Hi Stephen. I am aware of what method I need to call on the map in order to center it. The problem is that I don't yet know how to intercept the event that occurs when a point is plotted such that I can then call: map.setCenter(evt.xy); [for instance] Layer/Vector.js defines: beforefeatureadded", "beforefeaturesadded", "featureadded", "featuresadded", "beforefeatureremoved", "featuresremoved", "beforefeatureselected", "featureselected", "featureunselected", "beforefeaturemodified", "featuremodified", "afterfeaturemodified", "vertexmodified", "sketchstarted", "sketchmodified", "sketchcomplete", "refresh" as the set of supported event types. None of these appear to fire when a point is plotted. Cheers, Steve -- View this message in context: http://n2.nabble.com/How-to-recenter-the-map-when-drawing-tp4581070p4581324.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Tue Feb 16 11:49:39 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] How to recenter the map when drawing In-Reply-To: <1266338857052-4581324.post@n2.nabble.com> References: <1266336688585-4581070.post@n2.nabble.com> <4B7AC80B.2080803@swoodbridge.com> <1266338857052-4581324.post@n2.nabble.com> Message-ID: <20100216164938.GE21714@metacarta.com> On Tue, Feb 16, 2010 at 08:47:37AM -0800, smartini wrote: > > Hi Stephen. > I am aware of what method I need to call on the map in order to center it. > The problem is that I don't yet know how to intercept the event that occurs > when a point is plotted such that I can then call: map.setCenter(evt.xy); > [for instance] > > Layer/Vector.js defines: > beforefeatureadded", "beforefeaturesadded", "featureadded", "featuresadded", > "beforefeatureremoved", "featuresremoved", "beforefeatureselected", > "featureselected", "featureunselected", "beforefeaturemodified", > "featuremodified", "afterfeaturemodified", "vertexmodified", > "sketchstarted", "sketchmodified", "sketchcomplete", "refresh" > > as the set of supported event types. None of these appear to fire when a > point is plotted. If you're using the Control.DrawFeature, I'm surprised that sketchmodified doesn't: Control/DrawFeature.js:75:"sketchmodified", {vertex: vertex, feature: feature} Did you try that one? Regards, -- Christopher Schmidt MetaCarta From nabble at stevemartin.org.uk Tue Feb 16 11:56:24 2010 From: nabble at stevemartin.org.uk (smartini) Date: Wed Sep 1 17:18:29 2010 Subject: [OpenLayers-Users] How to recenter the map when drawing In-Reply-To: <20100216164938.GE21714@metacarta.com> References: <1266336688585-4581070.post@n2.nabble.com> <4B7AC80B.2080803@swoodbridge.com> <1266338857052-4581324.post@n2.nabble.com> <20100216164938.GE21714@metacarta.com> Message-ID: <1266339384568-4581371.post@n2.nabble.com> Christopher, sketchmodified appears to fire constantly while you are drawing and the mouse is moving. I hooked this in to setCenter() for a laugh as the map constantly recentered as I moved the mouse. This event appears to offer a little more than I require. I console logged all the events just to see if there was anything suitable but alas, there was not, hence my cry for help. Regs, Steve Christopher Schmidt-2 wrote: > > On Tue, Feb 16, 2010 at 08:47:37AM -0800, smartini wrote: >> >> [...] >> "sketchstarted", "sketchmodified", "sketchcomplete", "refresh" >> >> as the set of supported event types. None of these appear to fire when a >> point is plotted. > > If you're using the Control.DrawFeature, I'm surprised that sketchmodified > doesn't: > > Control/DrawFeature.js:75:"sketchmodified", {vertex: vertex, feature: > feature} > > Did you try that one? > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/How-to-recenter-the-map-when-drawing-tp4581070p4581371.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Tue Feb 16 12:05:08 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] How to recenter the map when drawing In-Reply-To: <1266339384568-4581371.post@n2.nabble.com> References: <1266336688585-4581070.post@n2.nabble.com> <4B7AC80B.2080803@swoodbridge.com> <1266338857052-4581324.post@n2.nabble.com> <20100216164938.GE21714@metacarta.com> <1266339384568-4581371.post@n2.nabble.com> Message-ID: <20100216170508.GF21714@metacarta.com> On Tue, Feb 16, 2010 at 08:56:24AM -0800, smartini wrote: > > Christopher, > sketchmodified appears to fire constantly while you are drawing and the > mouse is moving. I hooked this in to setCenter() for a laugh as the map > constantly recentered as I moved the mouse. This event appears to offer a > little more than I require. > > I console logged all the events just to see if there was anything suitable > but alas, there was not, hence my cry for help. Makes sense. A quick look at the code doesn't show anything obvious that would be better. -- Chris > Regs, > Steve > > > Christopher Schmidt-2 wrote: > > > > On Tue, Feb 16, 2010 at 08:47:37AM -0800, smartini wrote: > >> > >> [...] > >> "sketchstarted", "sketchmodified", "sketchcomplete", "refresh" > >> > >> as the set of supported event types. None of these appear to fire when a > >> point is plotted. > > > > If you're using the Control.DrawFeature, I'm surprised that sketchmodified > > doesn't: > > > > Control/DrawFeature.js:75:"sketchmodified", {vertex: vertex, feature: > > feature} > > > > Did you try that one? > > > > Regards, > > -- > > Christopher Schmidt > > MetaCarta > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > -- > View this message in context: http://n2.nabble.com/How-to-recenter-the-map-when-drawing-tp4581070p4581371.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From joel at srcti.com Tue Feb 16 12:11:20 2010 From: joel at srcti.com (Joel) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] How do I transform deg decimal to Transverse Mercator projection NAD27 Message-ID: <1266340280776-4581461.post@n2.nabble.com> How do I transform deg decimal to Transverse Mercator projection for the following? SRS WKT: PROJCS["NAD27 / Illinois East", GEOGCS["NAD27", DATUM["North American Datum 1927", SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -88.33333333333333], PARAMETER["latitude_of_origin", 36.666666666666664], PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 0.0], UNIT["foot_survey_us", 0.30480060960121924], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","26771"]] Native SRS WKT: PROJCS["NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet", GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["GRS_1980", 6378137.0, 298.257222101]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude", NORTH]], PROJECTION["Transverse_Mercator"], PARAMETER["central_meridian", -88.33333333333333], PARAMETER["latitude_of_origin", 36.666666666666664], PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 984250.0], PARAMETER["false_northing", 0.0], UNIT["foot_survey_us", 0.3048006096012192], AXIS["X", EAST], AXIS["Y", NORTH]] I have tried numerious combinations including : var proj3 = new OpenLayers.Projection("EPSG:4326"); var proj1 = new OpenLayers.Projection("EPSG:900913"); itemloc = new OpenLayers.LonLat(gpslon2, gpslat2); itemloc.transform( proj3, proj1); I end up with: -87.66646666666666 lon: -9758986.427620362 deglat: 41.90336666666667 lat: 5146515.211664708 should be: -87.66646666666666 lon: 1160049.27959 deglat: 41.90336666666667 lat: 1912889.44114 -87.68734166666668 lon: -9761310.22199035 deglat: 41.91610833333334 lat: 5148421.150384361 should be: -87.68734166666668 lon: 1163172.7780096494 deglat: 41.91610833333334 lat: 1909982.150384361 -- View this message in context: http://n2.nabble.com/How-do-I-transform-deg-decimal-to-Transverse-Mercator-projection-NAD27-tp4581461p4581461.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mulone at rome.com Tue Feb 16 12:14:13 2010 From: mulone at rome.com (Mulone) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Issue with Mouse Events Message-ID: <1266340453666-4581475.post@n2.nabble.com> Hi all, I'm trying to catch and log several events from OpenLayers. I bound some listeners with: openLayersMap.events.register( eventType, openLayersMap, myHandler(e) ); where eventType is mousemove, mouseup and mousedown. Mousemove and Mouseup are handled perfectly, but no chance to get a mousedown. So I have 2 questions for you: 1) Why is the mousedown not working? Do I need to set some options? 2) How can I get the current boundaries of the map (e.g. the latlon of top-left and bottom-right corners)? Thanks for any hints! Mulone ----- Mulone PhD student -- View this message in context: http://n2.nabble.com/Issue-with-Mouse-Events-tp4581475p4581475.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From SansonR at asurequality.com Tue Feb 16 15:28:56 2010 From: SansonR at asurequality.com (Robert Sanson) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] How do I transform deg decimal to TransverseMercator projection NAD27 In-Reply-To: <1266340280776-4581461.post@n2.nabble.com> References: <1266340280776-4581461.post@n2.nabble.com> Message-ID: <4B7BB6D7.379F.0037.0@asurequality.com> Hi Joel This is how I do something similar. I use proj4 - with appropriate projection files specified: Here is the code that does the re-projection: src = new OpenLayers.Projection('EPSG:4326'); dest = new OpenLayers.Projection('EPSG:2193'); markergeom = new OpenLayers.Geometry.Point(gpsx,gpsy); //now in-place re-projection OpenLayers.Projection.transform(markergeom, src, dest); gpsx = markergeom.x; gpsy = markergeom.y; alert("from WGS84:" + gpsx + "," + gpsy); Regards, Robert Sanson >>> Joel 17/02/2010 6:11 a.m. >>> How do I transform deg decimal to Transverse Mercator projection for the following? SRS WKT: PROJCS["NAD27 / Illinois East", GEOGCS["NAD27", DATUM["North American Datum 1927", SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -88.33333333333333], PARAMETER["latitude_of_origin", 36.666666666666664], PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 0.0], UNIT["foot_survey_us", 0.30480060960121924], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","26771"]] Native SRS WKT: PROJCS["NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet", GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["GRS_1980", 6378137.0, 298.257222101]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude", NORTH]], PROJECTION["Transverse_Mercator"], PARAMETER["central_meridian", -88.33333333333333], PARAMETER["latitude_of_origin", 36.666666666666664], PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 984250.0], PARAMETER["false_northing", 0.0], UNIT["foot_survey_us", 0.3048006096012192], AXIS["X", EAST], AXIS["Y", NORTH]] I have tried numerious combinations including : var proj3 = new OpenLayers.Projection("EPSG:4326"); var proj1 = new OpenLayers.Projection("EPSG:900913"); itemloc = new OpenLayers.LonLat(gpslon2, gpslat2); itemloc.transform( proj3, proj1); I end up with: -87.66646666666666 lon: -9758986.427620362 deglat: 41.90336666666667 lat: 5146515.211664708 should be: -87.66646666666666 lon: 1160049.27959 deglat: 41.90336666666667 lat: 1912889.44114 -87.68734166666668 lon: -9761310.22199035 deglat: 41.91610833333334 lat: 5148421.150384361 should be: -87.68734166666668 lon: 1163172.7780096494 deglat: 41.91610833333334 lat: 1909982.150384361 -- View this message in context: http://n2.nabble.com/How-do-I-transform-deg-decimal-to-Transverse-Mercator-projection-NAD27-tp4581461p4581461.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ------------------------------------------------------------------ The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message. ------------------------------------------------------------------ This message has been scanned for malware by SurfControl plc. www.surfcontrol.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100217/ece662f5/attachment.html From ashley_c_mort at raytheon.com Tue Feb 16 22:52:02 2010 From: ashley_c_mort at raytheon.com (ashley_c_mort) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] StyleMap and Select style issues Message-ID: <011001caaf84$903ad8c0$22099195@us.ray.com> I am having trouble getting the 'Select' style to work the way I need (when using the ModifyFeature control). I have two issues: 1) The vertices in the Select style always use the externalGraphic image from the 'default' style. It seems that setting extendDefault:false on the StyleMap behaves properly for all styles except externalGraphic/graphicName. How can I display a separate graphic for my regular point features and the vertex point features (when I'm using the ModifyFeature control)? 2) I'm using styleMap.addUniqueValueRules to show/hide features. When I use addUniqueValueRules code in there, my vertex point graphics (during ModifyFeature) don't show up at all. Is there a better way to control visibility of features when using a StyleMap? Any ideas are appreciated! var defaultModified = OpenLayers.Util.applyDefaults({ "externalGraphic":"../common/img/geoLoc.png"}, OpenLayers.Feature.Vector.style["default"]); var selectModified = OpenLayers.Util.applyDefaults({ "graphicName":"circle", "fillColor":"white", "strokeColor":"red", "strokeWidth":5 }, OpenLayers.Feature.Vector.style["select"]); var defaultStyle= new OpenLayers.Style(defaultModified); var selectStyle= new OpenLayers.Style(selectModified); var customStyleMap = new OpenLayers.StyleMap({ "default": defaultStyle, "select": selectStyle },{"extendDefault":false}); var displayLookup={ 'on':{display:"block"}, 'off':{display:"none"} }; customStyleMap.addUniqueValueRules("default", "display", displayLookup); var layer=new OpenLayers.Layer.Vector(name, { styleMap: customStyleMap }); map.addLayer(layer); From hbadenhorst at hotmail.com Wed Feb 17 00:44:27 2010 From: hbadenhorst at hotmail.com (Herman Badenhorst) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Gallery not working? Message-ID: Hi, it seems that the gallery is not working anymore? http://gallery.openlayers.org Regards, Herman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100217/0f26daaa/attachment.html From paulborodaev at gmail.com Wed Feb 17 03:18:37 2010 From: paulborodaev at gmail.com (BrainDrain) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Geometry.Collection (LineString) GetCentroid - fake? Message-ID: <1266394717928-4584888.post@n2.nabble.com> Hi. I use this function to locate geometry on map OpenLayers.Map.prototype.locate = function(geometry, panOnly) { var bounds = geometry.getBounds(); //this.zoomToExtent(bounds); //this.zoomToScale(scale); if ((this.getExtent().containsBounds(bounds) || this.getZoomForExtent(bounds) > this.zoom) || panOnly) { //wrong for complex LineStrings (points to the center of the extent - not center of the geometry) //this.panTo(bounds.getCenterLonLat()); //incorrect with current implemetation of Geometry.Collection GetCentroid //this.panTo(WEM.Util.point2ll(geometry.getCentroid())); var parser = new OpenLayers.Format.WKT(); //this works - BUT! I need to send all geometry WKT to the server //server (MapServer mapscript c# via webservice webmetod) getCentroid works perfectly application.server.MapParser.GetCentroid(parser.write(geometry), function(geometryWKT, scope) { scope.panTo(WEM.Util.point2ll(parser.read(geometryWKT).geometry)); }, null, this); } else { var zoom = this.zoom; this.zoomToExtent(bounds); this.zoomTo(zoom); } }; What's this (for ex. for LineString)??? /** * APIMethod: getCentroid * * Returns: * {} The centroid of the collection */ getCentroid: function() { return this.components.length && this.components[0].getCentroid(); //just great)))(((! } Currently I can: - pass only featureId to the server (not all geometry text) - get centroid forcibly on server on querying features and then use it - compress geometry WKT with JavaScript lib (deflate) and decompress on server as I do it on update feature.... But I want correct getCentroid implemetation -- View this message in context: http://n2.nabble.com/Geometry-Collection-LineString-GetCentroid-fake-tp4584888p4584888.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dragan.podvezanec at gmail.com Wed Feb 17 03:40:51 2010 From: dragan.podvezanec at gmail.com (Dragan Podvezanec) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Wrong area calculation Message-ID: <1266396051734-4584951.post@n2.nabble.com> Hi all. I have one WFS layer from EPSG:31275, which is then reprojected to 900913 and overlayed on Google layer. I noticed that polygon areas caculated with feature.geometry.getArea() are wrong. Original layer is stored in database, and uses same units (meters), so I'm sure about original feature area in DB. What is strange is that areas are always those from DB * 2 For example: Original polygon area from DB: 812m2 Area calculated by feature.geometry.getArea(): 1624m2 Can someone point me what is wrong here? Is this due to reprojection, or something else? -- View this message in context: http://n2.nabble.com/Wrong-area-calculation-tp4584951p4584951.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From amrit08 at gmail.com Wed Feb 17 04:12:20 2010 From: amrit08 at gmail.com (Amritayan Nayak) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Showing the number features on a cluster marker Message-ID: <131155ea1002170112s598dcd52vfd49bc873fd7f99b@mail.gmail.com> Hi, I want to show the number of features within a cluster on the clustered marker that replaces the individual points. This functionality is supported by the marker manager provided with Google API. Is there a way of doing it in Openlayers ? -- Amritayan Nayak, ZS Associates Magarpatta Cybercity, Hadapsar, Pune Ph: 02066485243 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100217/a8400b65/attachment.html From ahti.lahtela at pp.inet.fi Wed Feb 17 05:03:39 2010 From: ahti.lahtela at pp.inet.fi (Ahti Lahtela) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] catching zooming events Message-ID: <4B7BBEFB.1030601@pp.inet.fi> Hi, I'm new with OpenLayers and I have working example which contains WMS-layer. Now I want to catch zooming events (control ZoomPanel) and change the layers -parameter in WMS request. The goal is to load suitable layer from WMS-MapServer depending the new zoom level. I didn't find suitable examples, so can someone help me how to: - catch ZoomPanel events - change the layer parameter of the WMS -request before sending the request after changing zoom level. Thanks in advance al From ahocevar at opengeo.org Wed Feb 17 05:11:40 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Geometry.Collection (LineString) GetCentroid - fake? In-Reply-To: <1266394717928-4584888.post@n2.nabble.com> References: <1266394717928-4584888.post@n2.nabble.com> Message-ID: <4B7BC0DC.3030802@opengeo.org> Hi, see http://trac.openlayers.org/ticket/2469 Regards, Andreas. On 2010-02-17 09:18, BrainDrain wrote: > Hi. > I use this function to locate geometry on map > OpenLayers.Map.prototype.locate = function(geometry, panOnly) { > var bounds = geometry.getBounds(); > //this.zoomToExtent(bounds); > //this.zoomToScale(scale); > if ((this.getExtent().containsBounds(bounds) || > this.getZoomForExtent(bounds) > this.zoom) || panOnly) { > //wrong for complex LineStrings (points to the center of the extent - not > center of the geometry) > //this.panTo(bounds.getCenterLonLat()); > > //incorrect with current implemetation of > Geometry.Collection GetCentroid > //this.panTo(WEM.Util.point2ll(geometry.getCentroid())); > > var parser = new OpenLayers.Format.WKT(); > //this works - BUT! I need to send all geometry WKT > to the server > //server (MapServer mapscript c# via webservice > webmetod) getCentroid works perfectly > application.server.MapParser.GetCentroid(parser.write(geometry), > function(geometryWKT, scope) { > scope.panTo(WEM.Util.point2ll(parser.read(geometryWKT).geometry)); > }, null, this); > } > else { > var zoom = this.zoom; > this.zoomToExtent(bounds); > this.zoomTo(zoom); > } > }; > > What's this (for ex. for LineString)??? > /** > * APIMethod: getCentroid > * > * Returns: > * {} The centroid of the collection > */ > getCentroid: function() { > return this.components.length && this.components[0].getCentroid(); > //just great)))(((! > } > > Currently I can: > - pass only featureId to the server (not all geometry text) > - get centroid forcibly on server on querying features and then use it > - compress geometry WKT with JavaScript lib (deflate) and decompress on > server as I do it on update feature.... > But I want correct getCentroid implemetation > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Wed Feb 17 05:13:35 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Wrong area calculation In-Reply-To: <1266396051734-4584951.post@n2.nabble.com> References: <1266396051734-4584951.post@n2.nabble.com> Message-ID: <4B7BC14F.7060705@opengeo.org> On 2010-02-17 09:40, Dragan Podvezanec wrote: > Hi all. > > I have one WFS layer from EPSG:31275, which is then reprojected to 900913 > and overlayed on Google layer. > > I noticed that polygon areas caculated with feature.geometry.getArea() are > wrong. Original layer is stored in database, and uses same units (meters), > so I'm sure about original feature area in DB. > Use feature.geometry.getGeodesicArea() instead. Regards, Andreas. > What is strange is that areas are always > > those from DB * 2 > > For example: > > Original polygon area from DB: 812m2 > Area calculated by feature.geometry.getArea(): 1624m2 > > Can someone point me what is wrong here? Is this due to reprojection, or > something else? > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From paulborodaev at gmail.com Wed Feb 17 06:22:12 2010 From: paulborodaev at gmail.com (BrainDrain) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Geometry.Collection (LineString) GetCentroid - fake? In-Reply-To: <4B7BC0DC.3030802@opengeo.org> References: <1266394717928-4584888.post@n2.nabble.com> <4B7BC0DC.3030802@opengeo.org> Message-ID: <1266405732316-4585487.post@n2.nabble.com> Thanks! I'll try. -- View this message in context: http://n2.nabble.com/Geometry-Collection-LineString-GetCentroid-fake-tp4584888p4585487.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From boris.tkc at googlemail.com Wed Feb 17 06:37:36 2010 From: boris.tkc at googlemail.com (Boris T.) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Add custom attribute for vector feature Message-ID: <1266406656769-4585538.post@n2.nabble.com> Hi List, I worte a function which is loading a JSON string via AJAX and creating markers from the received values (x, y, icon, angle, etc.). This is working quite well. What I'm struggling with is that each marker should have a popup with a description (name, id and other values from the JSON data). I created a onFeatureSelect function to create the popup function onFeatureSelect(feature) { selectedFeature = feature; var content = feature.attributes.description + feature.attribute.name + ... ; popup = new OpenLayers.Popup.FramedCloud(null, feature.geometry.getBounds().getCenterLonLat(), new OpenLayers.Size(150,300), content, null, true, function() {onPopupClose(feature)}); feature.popup = popup; feature.attributes.static=true; feature.attributes.poppedup=true; map.addPopup(popup); } What attributes are available for a geometry point? x, y, angel? Can I create a custom feature.attribute? Or is there a more accurate way to do that? Thanks for you help! Boris -- View this message in context: http://n2.nabble.com/Add-custom-attribute-for-vector-feature-tp4585538p4585538.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dragan.podvezanec at gmail.com Wed Feb 17 06:49:49 2010 From: dragan.podvezanec at gmail.com (Dragan Podvezanec) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Wrong area calculation In-Reply-To: <4B7BC14F.7060705@opengeo.org> References: <1266396051734-4584951.post@n2.nabble.com> <4B7BC14F.7060705@opengeo.org> Message-ID: <1266407389558-4585575.post@n2.nabble.com> Thanks, works great now! -- View this message in context: http://n2.nabble.com/Wrong-area-calculation-tp4584951p4585575.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Wed Feb 17 07:17:17 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Hassles parsing Arcgis WFS getcapabilities in openlayers. In-Reply-To: <4B79ABAC.2040604@gns.cri.nz> References: <4B789B51.3060708@gns.cri.nz> <4755F061-4880-4B7C-9CB8-8329AA4ACA92@osgis.nl> <4B79ABAC.2040604@gns.cri.nz> Message-ID: <22941E6F-AF65-4201-8F21-F31A134F0B8C@osgis.nl> Hi Phil, please see http://trac.openlayers.org/ticket/2489 can you report back if this works for you? Best regards, Bart On Feb 15, 2010, at 9:16 PM, Phil Scadden wrote: > An example of the full XML response for the WFS capabilities from AGS is: > > wfs:WFS_Capabilities version='1.1.0' > xsi:schemaLocation='http://www.opengis.net/gml > http://schemas.opengis.net/gml/3.1.1/base/gml.xsd > http://www.opengis.net/ogc > http://schemas.opengis.net/filter/1.1.0/filter.xsd > http://www.opengis.net/ows > http://schemas.opengis.net/ows/1.0.0/owsAll.xsd > http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd' > xmlns:wfs='http://www.opengis.net/wfs' > xmlns:ogc='http://www.opengis.net/ogc' > xmlns:gml='http://www.opengis.net/gml' > xmlns:ows='http://www.opengis.net/ows' > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' > xmlns:xlink='http://www.w3.org/1999/xlink' > xmlns:MyDomain='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer'>PBE_MyDomainWFS1.1.0 name='GetCapabilities'> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer?'/> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer'/> name='AcceptVersions'>1.1.0 name='AcceptFormats'>text/xml name='DescribeFeatureType'> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer?'/> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer'/> name='outputFormat'>text/xml; > subType=gml/3.1.1/profiles/gmlsf/1.0.0/0 name='GetFeature'> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer?'/> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer'/> name='resultType'>resultshits name='outputFormat'>text/xml; > subType=gml/3.1.1/profiles/gmlsf/1.0.0/0 name='GetFeatureWithLock'> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer?'/> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer'/> name='resultType'>results name='outputFormat'>text/xml; > subType=gml/3.1.1/profiles/gmlsf/1.0.0/0 name='Transaction'> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer?'/> xlink:href='http://myserver/arcgis/services/PBE/myservice/MapServer/WFSServer'/> name='inputFormat'>text/xml; > subType=gml/3.1.1/profiles/gmlsf/1.0.0/0 name='releaseAction'>ALL name='idgen'>GenerateNew name='serviceAxisOrderForSwappableSRS'>latitude,longitudeMyDomain:Layer_1Layer_1urn:x-ogc:def:crs:EPSG:6.9:27200urn:x-ogc:def:crs:EPSG:6.9:4326text/xml; > subType=gml/3.1.1/profiles/gmlsf/1.0.0/0-180 > -54.1184466840914180 > -23.1331836761979MyDomain:Layer_2Layer_2urn:x-ogc:def:crs:EPSG:6.9:4326urn:x-ogc:def:crs:EPSG:6.9:4326text/xml; > subType=gml/3.1.1/profiles/gmlsf/1.0.0/0172.390547995875 > -41.8486191231589174.468258516558 > -38.7705021368543gml:Envelopegml:Pointgml:Polygongml:LineString name='BBOX'/> name='Disjoint'/> name='Intersects'/> name='Crosses'/> name='Touches'/> name='Contains'/> name='Overlaps'/>EqualToNotEqualToLessThanGreaterThanLessThanEqualToGreaterThanEqualToLikeBetweenNullCheck > > > > Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. > > From paulborodaev at gmail.com Wed Feb 17 08:05:35 2010 From: paulborodaev at gmail.com (BrainDrain) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Geometry.Collection (LineString) GetCentroid - fake? In-Reply-To: <4B7BC0DC.3030802@opengeo.org> References: <1266394717928-4584888.post@n2.nabble.com> <4B7BC0DC.3030802@opengeo.org> Message-ID: <1266411935050-4585847.post@n2.nabble.com> hmm - it's only for collection of polygons(( not useful for LineStrings I'll calculate centroid on server side with mapscript/nts: {mapid, layerid, featureid}=>queryFeaure()=>getGeometry()=>getCentroid() -- View this message in context: http://n2.nabble.com/Geometry-Collection-LineString-GetCentroid-fake-tp4584888p4585847.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Feb 17 08:06:03 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] catching zooming events In-Reply-To: <4B7BBEFB.1030601@pp.inet.fi> References: <4B7BBEFB.1030601@pp.inet.fi> Message-ID: <20100217130603.GD8508@metacarta.com> On Wed, Feb 17, 2010 at 12:03:39PM +0200, Ahti Lahtela wrote: > Hi, > > I'm new with OpenLayers and I have working example which contains WMS-layer. > > Now I want to catch zooming events (control ZoomPanel) and change the > layers -parameter in WMS request. The goal is to load suitable layer > from WMS-MapServer depending the new zoom level. I would highly recommend just doing this on the server instead, using minscale/maxscale. THe way you would do it in OpenLayers if you wanted to was to set a fake base layer (or set the allOverlays option in the map to true), and then set the minScale/maxScale options on your layer options. -- Chris > I didn't find suitable examples, so can someone help me how to: > - catch ZoomPanel events > - change the layer parameter of the WMS -request before sending the > request after changing zoom level. > > Thanks in advance > > al > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From dalda at ikt.es Wed Feb 17 10:47:13 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Problems using Layer.WMS.Post Message-ID: <224DBDAF88A6AC47BD22432815351BE007C1DDDA@nekaposta1> Hello list, I had som problems applying a SLD to a OpenLayers.Layer.WMS becuase of the mentioned problem of URL length in IE. I followed up the discussions about this solution and decided to apply it to my app. But I get an error when I try to apply an SLD and make it visible. I mean, I create the layer without any error: olLayers[0] = new OpenLayers.Layer.WMS.Post( "WMSLayer",url, { transparent: 'true', layers: 'RecintosSigpac,ParcelasSigpac,PoligonosSigpac'},{visibility: false, displayInLayerSwitcher:false, isBaseLayer: false, units: 'm', maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, 4820000), maxResolution: 292.96875} ); Then, later, I have some links that the user can click to apply some SLD's to some parcels. I create the SLD dynamically. var wms = this.map.getLayersByName("megaWMSLayer")[0]; wms.mergeNewParams({SLD_BODY: sld}); wms.setVisibility(true); And the problem comes in the line 'wms.setVisibility(true);'. Debugging the error, I found that it crashes in line 1275 character 174 of OpenLayers.js to be precise. This is the code of that line: tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart");} this.numLoadingTiles++;}; And the variable tile is undefined. Is this a known problem or it's just my fault??. Any ideas?? Thanks in advance. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? From boehme at supportgis.de Wed Feb 17 10:47:50 2010 From: boehme at supportgis.de (=?UTF-8?B?U3ZlbiBCw7ZobWU=?=) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] wfs digitize Message-ID: <4B7C0FA6.4080204@supportgis.de> Hi List, I?m an OpenLayers newbie, but the first steps work great and I think it?s a very nice software! So, I?ll like to offer a map where you can add, edit or delete polygons via WFS-T. I found some examples how to use WFS-T, but only for the geometry. And I like to add polygon with attributes. So it would be nice if there is an example for a digitalisation (insert,update,delete) of polygon with attributes. Thanks in advance Sven -- -------------------------------------- Dipl.-Geogr. Sven B?hme boehme@supportgis.de -------------------------------------- CPA Systems GmbH Grantham-Allee 2-8 D-53757 Sankt Augustin Tel.: +49 (0) 2241 / 25 94 ? 24 Fax.: +49 (0) 2241 / 25 94 - 29 www.cpa-systems.de -------------------------------------- Handelsregister: HRB 9706, Amtsgericht Siegburg Gesch?ftsf?hrer: Dr.-Ing. habil. Christoph Averdung Dr.-Ing. Ren? Thiele Dr.-Ing. Matthias Ellsiepen From zer_matt at hotmail.com Wed Feb 17 10:58:51 2010 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Show polygon vertices? In-Reply-To: <1266331059264-4580541.post@n2.nabble.com> References: <1266326725856-4580179.post@n2.nabble.com> <1266328499685-4580312.post@n2.nabble.com> <1266331059264-4580541.post@n2.nabble.com> Message-ID: <1266422331617-4586772.post@n2.nabble.com> I found out that there is an option to only snap to nodes and vertices, and not to edges. This will work out fine for me! -ZM -- View this message in context: http://n2.nabble.com/Show-polygon-vertices-tp4580179p4586772.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From j_schumann at gmx.de Wed Feb 17 11:14:57 2010 From: j_schumann at gmx.de (J.Schumann) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Textfield Event Handling in a Custom Control In-Reply-To: <756275.50182.qm@web36108.mail.mud.yahoo.com> References: <756275.50182.qm@web36108.mail.mud.yahoo.com> Message-ID: <1266423297299-4586882.post@n2.nabble.com> Hello! I'm having the exact problem. Using Tag I can get into the textfield and enter text, after that when clicking on it I can activate the browsers auto-complete drop-down. But I can't get the elements focus by clicking. I'm planning on loading different forms via XHR into the control so binding event-handlers manually to each form element isn't really an option. Thanks in advance for any help, J.Schumann Michael Hampton wrote: > > How can I enable default event handling for a textfield input in a custom > control? > > When I place a textfield into a control on the map, it does not receive > mouse events or keyboard events. > How can I make the textfield receive these events and handle them as it > normally would? > -- View this message in context: http://n2.nabble.com/Textfield-Event-Handling-in-a-Custom-Control-tp4165457p4586882.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From j_schumann at gmx.de Wed Feb 17 11:24:05 2010 From: j_schumann at gmx.de (J.Schumann) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Keep Feature.Vector visible near the maps border Message-ID: <1266423845024-4586959.post@n2.nabble.com> Hi! I'm using OpenLayers.Feature.Vector with OpenLayers.Geometry.Point and a StyleMap using an externalGraphic. This works good except the fact that the features dissappear to early near the map border, when the Point leaves the viewport. But I need the externalGraphic to stay visible for some more pixels even when the graphics center / the Geometry.Point leaves the map. Is there any threshold I can set for this purpose? Best regards, J.Schumann -- View this message in context: http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586959p4586959.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed Feb 17 11:33:19 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Problems using Layer.WMS.Post In-Reply-To: <224DBDAF88A6AC47BD22432815351BE007C1DDDA@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE007C1DDDA@nekaposta1> Message-ID: <4B7C1A4F.4060704@opengeo.org> Hi, you should use firebug to see what requests were issued and what was returned. In your case, I suspect that the combination of LAYERS and SLD_BODY params is invalid and you don't get back an image from your WMS. Regards, Andreas. On 2010-02-17 16:47, David Alda Fernandez de Lezea wrote: > Hello list, > > I had som problems applying a SLD to a OpenLayers.Layer.WMS becuase of the mentioned problem of URL length in IE. I followed up the discussions about this solution and decided to apply it to my app. But I get an error when I try to apply an SLD and make it visible. I mean, I create the layer without any error: > > olLayers[0] = new OpenLayers.Layer.WMS.Post( "WMSLayer",url, > { transparent: 'true', layers: 'RecintosSigpac,ParcelasSigpac,PoligonosSigpac'},{visibility: false, displayInLayerSwitcher:false, isBaseLayer: false, units: 'm', maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, 4820000), maxResolution: 292.96875} ); > > Then, later, I have some links that the user can click to apply some SLD's to some parcels. I create the SLD dynamically. > > var wms = this.map.getLayersByName("megaWMSLayer")[0]; > wms.mergeNewParams({SLD_BODY: sld}); > wms.setVisibility(true); > > And the problem comes in the line 'wms.setVisibility(true);'. Debugging the error, I found that it crashes in line 1275 character 174 of OpenLayers.js to be precise. This is the code of that line: > > tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart");} > this.numLoadingTiles++;}; > > And the variable tile is undefined. > > Is this a known problem or it's just my fault??. > > Any ideas?? > > Thanks in advance. > > Un saludo, > > ?????????????????????????????????????????????????????????????????????????????????? > > David Alda Fern?ndez de Lezea > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad > > IKT > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > ?????????????????????????????????????????????????????????????????????????????????? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From david.fawcett at gmail.com Wed Feb 17 11:44:01 2010 From: david.fawcett at gmail.com (David Fawcett) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] wfs digitize In-Reply-To: <4B7C0FA6.4080204@supportgis.de> References: <4B7C0FA6.4080204@supportgis.de> Message-ID: It isn't pure OpenLayers, but there is a MapFish example that may fit your case at: http://demo.mapfish.org/mapfishsample/1.2/examples/editing/editing-panel.html David. On Wed, Feb 17, 2010 at 9:47 AM, Sven B?hme wrote: > Hi List, > > I?m an OpenLayers newbie, but the first steps work great and I think > it?s a very nice software! > > So, I?ll like to offer a map where you can add, edit or delete polygons > via WFS-T. I found some examples how to use WFS-T, but only for the > geometry. And I like to add polygon with attributes. So it would be nice > if there is an example for a digitalisation (insert,update,delete) of > polygon with attributes. > > Thanks in advance > Sven > -- > > -------------------------------------- > > Dipl.-Geogr. Sven B?hme > boehme@supportgis.de > > -------------------------------------- > > CPA Systems GmbH > Grantham-Allee 2-8 > D-53757 Sankt Augustin > > Tel.: +49 (0) 2241 / 25 94 ? 24 > Fax.: +49 (0) 2241 / 25 94 - 29 > > www.cpa-systems.de > > -------------------------------------- > Handelsregister: > HRB 9706, Amtsgericht Siegburg > > Gesch?ftsf?hrer: > > Dr.-Ing. habil. Christoph Averdung > Dr.-Ing. Ren? Thiele > Dr.-Ing. Matthias Ellsiepen > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From janhenrik.overland at gmail.com Wed Feb 17 11:48:59 2010 From: janhenrik.overland at gmail.com (=?ISO-8859-1?Q?Jan_Henrik_=D8verland?=) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Display cector feature labels with spaces? Message-ID: <58a5e5241002170848u56237d65gb6f3c200e9d97b7a@mail.gmail.com> Hi, displaying feature labels works fine like this: 'label': '${Name}' However, the name column in my stupid facility shapefile is called "Name of fa" and then the labels are displayed as ${Name of fa} in the map. I know I can just change the shapefile, but is it possible to display labels where the name column has spaces? Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100217/e3642cd5/attachment.html From woodbri at swoodbridge.com Wed Feb 17 11:53:55 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Display cector feature labels with spaces? In-Reply-To: <58a5e5241002170848u56237d65gb6f3c200e9d97b7a@mail.gmail.com> References: <58a5e5241002170848u56237d65gb6f3c200e9d97b7a@mail.gmail.com> Message-ID: <4B7C1F23.2080203@swoodbridge.com> Jan Henrik ?verland wrote: > Hi, displaying feature labels works fine like this: > > 'label': '${Name}' > > However, the name column in my stupid facility shapefile is called "Name > of fa" and then the labels are displayed as ${Name of fa} in the map. > I know I can just change the shapefile, but is it possible to display > labels where the name column has spaces? Just off the top of my head, did you try: 'label: '${"Name of fa"}' -Steve From janhenrik.overland at gmail.com Wed Feb 17 14:07:42 2010 From: janhenrik.overland at gmail.com (=?ISO-8859-1?Q?Jan_Henrik_=D8verland?=) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Display cector feature labels with spaces? In-Reply-To: <4B7C1F23.2080203@swoodbridge.com> References: <58a5e5241002170848u56237d65gb6f3c200e9d97b7a@mail.gmail.com> <4B7C1F23.2080203@swoodbridge.com> Message-ID: <58a5e5241002171107n5e5a963dt30ca0dd7c8cd9fe@mail.gmail.com> You can't use " " as '${Name}' works perfectly, but '${"Name"}' does not. So obviously '${"Name of fa"}' did not work. By the way, '${Name }' (with a space) did not either. Jan On Wed, Feb 17, 2010 at 5:53 PM, Stephen Woodbridge wrote: > Jan Henrik ?verland wrote: > >> Hi, displaying feature labels works fine like this: >> >> 'label': '${Name}' >> >> However, the name column in my stupid facility shapefile is called "Name >> of fa" and then the labels are displayed as ${Name of fa} in the map. >> I know I can just change the shapefile, but is it possible to display >> labels where the name column has spaces? >> > > Just off the top of my head, did you try: 'label: '${"Name of fa"}' > > -Steve > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100217/36314dc8/attachment.html From joel at srcti.com Wed Feb 17 14:11:05 2010 From: joel at srcti.com (Joel) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] How do I transform deg decimal to TransverseMercator projection NAD27 In-Reply-To: <4B7BB6D7.379F.0037.0@asurequality.com> References: <1266340280776-4581461.post@n2.nabble.com> <4B7BB6D7.379F.0037.0@asurequality.com> Message-ID: <1266433865911-4587905.post@n2.nabble.com> Hi - Used: src = new OpenLayers.Projection('EPSG:4326'); dest = new OpenLayers.Projection('EPSG:2193'); For -87.66646666666666,41.90336666666667 I tried it and it gives me: from WGS84:444721.56582364725,4639284.90907464 instead of 1160049.27959, 1912889.44114 What projections should I use for my data??? I am using: var bounds = new OpenLayers.Bounds( 1059161.886961375, 1799425.612618936, 1217175.2129157984, 1966132.2372266736 ); With projection: "EPSG:26771", instead instead of the normal EPSG:2193 Projected Bounds: 267699.6323, 5098206.2404, 732300.3677, 6305600.2275 EPSG:26771 Projected Bounds:226459.7115, 122422.1778, 743362.6170, 2126155.5095 - Joel -- View this message in context: http://n2.nabble.com/How-do-I-transform-deg-decimal-to-Transverse-Mercator-projection-NAD27-tp4581461p4587905.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed Feb 17 14:17:39 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Keep Feature.Vector visible near the maps border In-Reply-To: <1266423845024-4586959.post@n2.nabble.com> References: <1266423845024-4586959.post@n2.nabble.com> Message-ID: <4B7C40D3.5080300@opengeo.org> On 2010-02-17 17:24, J.Schumann wrote: > I'm using OpenLayers.Feature.Vector with OpenLayers.Geometry.Point and a > StyleMap using an externalGraphic. This works good except the fact that the > features dissappear to early near the map border, when the Point leaves the > viewport. But I need the externalGraphic to stay visible for some more > pixels even when the graphics center / the Geometry.Point leaves the map. Is > there any threshold I can set for this purpose? > I could think of a workaround, but not a real solution: If you have a styleMap, you can modify the bounds of your point geometries (feature.geometry.bounds) in a context function, to make them fit your symbol size. See http://www.openlayers.org/dev/examples/styles-context.html. A real solution would be one that tweaks the Renderer::drawFeature method. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From luis.a.de.sousa at gmail.com Wed Feb 17 14:50:30 2010 From: luis.a.de.sousa at gmail.com (=?ISO-8859-1?Q?Lu=EDs_de_Sousa?=) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Reload/refresh WMS layer Message-ID: Hello everyone, I have a wms layer that needs to be reload/refreshed after the introduction of a new feature into a WFS layer. Reading previous messages to this list I tried the following: myWMSLayer.mergeNewParams({'random':Math.random()}); myWMSLayer.redraw(true); without result. I then tried to remove and add the layer again to the map: map.removeLayer(myWMSLayer, false); map.addLayer(myWMSLayer); again this code fails to refresh the layer. What can I do to force the code to fetch the layer? Thank you, Lu?s From arnd.wippermann at web.de Wed Feb 17 16:27:06 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Keep Feature.Vector visible near the maps border In-Reply-To: <1266423845024-4586959.post@n2.nabble.com> Message-ID: Hi, I use externalGraphic as Image layer and had the same problem. The image vanished, when the point lie outside the view. I have patched for this purpose the drawFeature function of renderer.js (as Andreas suggest). I add an attribute render="drawAlways" to my feature(s) and in the patched function I test for the attribute. It works perfect. drawFeature: function(feature, style) { if(style == null) { style = feature.style; } if (feature.geometry) { var bounds = feature.geometry.getBounds(); if(bounds) { if(!bounds.intersectsBounds(this.extent) && (feature.attributes.render == "undefined" || feature.attributes.render != "drawAlways")) {style={display:"none"}; } /* if (!bounds.intersectsBounds(this.extent)) { style = {display: "none"}; } */ var rendered = this.drawGeometry(feature.geometry, style, feature.id); if(style.display != "none" && style.label && rendered !== false) { this.drawText(feature.id, style, feature.geometry.getCentroid()); } else { this.removeText(feature.id); } return rendered; } } }, http://gis.ibbeck.de/ginfo/apps/OLExamples/OL27/examples/ExternalGraphicOver lay/ExternalGraphicOverlay.asp The examples shows the use of externalGraphic as Image layer with the possibility to rotate an image. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von J.Schumann Gesendet: Mittwoch, 17. Februar 2010 17:24 An: users@openlayers.org Betreff: [OpenLayers-Users] Keep Feature.Vector visible near the maps border Hi! I'm using OpenLayers.Feature.Vector with OpenLayers.Geometry.Point and a StyleMap using an externalGraphic. This works good except the fact that the features dissappear to early near the map border, when the Point leaves the viewport. But I need the externalGraphic to stay visible for some more pixels even when the graphics center / the Geometry.Point leaves the map. Is there any threshold I can set for this purpose? Best regards, J.Schumann -- View this message in context: http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586 959p4586959.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From j_schumann at gmx.de Wed Feb 17 16:52:19 2010 From: j_schumann at gmx.de (J.Schumann) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Keep Feature.Vector visible near the maps border In-Reply-To: References: <1266423845024-4586959.post@n2.nabble.com> Message-ID: <4B7C64C3.5050304@gmx.de> Hello, thanks for that, i'll give it a try or maybe I adjust it to add +X pixels to each side of this.extent for the intersect-check. J.Schumann Am 17.02.2010 22:27, schrieb Arnd Wippermann [via OSGeo.org]: > Hi, > > I use externalGraphic as Image layer and had the same problem. The image > vanished, when the point lie outside the view. > > I have patched for this purpose the drawFeature function of renderer.js (as > Andreas suggest). I add an attribute render="drawAlways" to my feature(s) > and in the patched function I test for the attribute. > > It works perfect. > > drawFeature: function(feature, style) { > if(style == null) { > style = feature.style; > } > if (feature.geometry) { > var bounds = feature.geometry.getBounds(); > if(bounds) { > if(!bounds.intersectsBounds(this.extent) && > (feature.attributes.render == "undefined" || feature.attributes.render != > "drawAlways")) > {style={display:"none"}; > } > /* > if (!bounds.intersectsBounds(this.extent)) { > style = {display: "none"}; > } > */ > var rendered = this.drawGeometry(feature.geometry, style, > feature.id); > if(style.display != "none" && style.label && rendered !== > false) { > this.drawText(feature.id, style, > feature.geometry.getCentroid()); > } else { > this.removeText(feature.id); > } > return rendered; > } > } > }, > > http://gis.ibbeck.de/ginfo/apps/OLExamples/OL27/examples/ExternalGraphicOver > lay/ExternalGraphicOverlay.asp > The examples shows the use of externalGraphic as Image layer with the > possibility to rotate an image. > > Arnd > > > > -----Urspr?ngliche Nachricht----- > Von: [hidden email] > > [mailto:[hidden email] > ] Im > Auftrag von J.Schumann > Gesendet: Mittwoch, 17. Februar 2010 17:24 > An: [hidden email] > > Betreff: [OpenLayers-Users] Keep Feature.Vector visible near the maps > border > > > Hi! > > I'm using OpenLayers.Feature.Vector with OpenLayers.Geometry.Point and a > StyleMap using an externalGraphic. This works good except the fact that the > features dissappear to early near the map border, when the Point leaves the > viewport. But I need the externalGraphic to stay visible for some more > pixels even when the graphics center / the Geometry.Point leaves the > map. Is > there any threshold I can set for this purpose? > > Best regards, > J.Schumann > -- > View this message in context: > http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586 > 959p4586959.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > [hidden email] > > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > [hidden email] > > http://openlayers.org/mailman/listinfo/users > > > View message @ > http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586959p4588629.html > > To unsubscribe from Keep Feature.Vector visible near the maps border, > click here > < (link removed) ==>. > > -- View this message in context: http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586959p4588778.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100217/6d6e32a4/attachment.html From n13green at gmail.com Wed Feb 17 17:17:54 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] OL + database Message-ID: <1266445074251-4588879.post@n2.nabble.com> I'm looking for some help getting started. I've spent about a week looking at various OL examples and "getting started" pages but they cover only the most minimal basics. And while I'm very handy with php and SQL, my Javascript is limited so I'm struggling. I want to set up a basic map with an image base (done) and vector layers for points, lines (done) and polygons (done). The bit that's unclear is how to write that information to a database and load it into the map. The information at http://dev.openlayers.org/docs/files/ doesn't help me much because of my limited javascript and examples which touch on what I want to do tend to offer only part of the solution. All I've figured out is that I should probably be using the GeoJSON format and for the loading info part, writing the JSON to a php file something like this? http://n2.nabble.com/Displaying-Multiple-Markers-from-Database-td1828946.html#a1828954 I've googled and googled and googled and searched these forums but can't find any decent examples that tell the whole story. Can anyone point me to one? I'm doing this as a favour for some friends who sadly don't know anyone with better javascript than me. -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4588879.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahti.lahtela at pp.inet.fi Thu Feb 18 02:51:34 2010 From: ahti.lahtela at pp.inet.fi (ahlah) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] catching zooming events In-Reply-To: <20100217130603.GD8508@metacarta.com> References: <4B7BBEFB.1030601@pp.inet.fi> <20100217130603.GD8508@metacarta.com> Message-ID: <1266479494109-4590478.post@n2.nabble.com> Hi, sorry but my explanation was probably not clear enough... Minscale/Maxscale solution in Mapserver side is propabably the best solution if the WMS-layer is overlay layer in OL client but I want to change the base layer depending on zoom level. I have 7 different topografic (raster) map levels in Mapserver. Most detailed one is suitable if the resolution in client is <2m/pixel (zoom level 6), next if 2 Hello, thanks for your response. I'm trying to make it work in IE so I guess Firebug is not very useful in this case. Maybe I didn't mention, but it works in FF, Chrome and Safari, the only problematic browser is IE, which has the limitation I mentioned. Digging a little bit in the code I found that an OL class was missing to get WMS.Post work. This class was IFrame.js, but know I've got another error pointing this class: In method 'createRequestForm' form.action = OpenLayers.Util.urlAppend(this.layer.url, cacheId); Saying that the object doesn't accept function urlAppend. Again, digging into the code I found that the class Util.js doesnt' have the function urlAppend, and I've started wondering how many classes do I have to update to make this work. Are there some instructions to apply this change or some info about the classes involved in this change?? Where I can find the new Util.js for download?? Thanks. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Andreas Hocevar Enviado el: mi?rcoles, 17 de febrero de 2010 17:33 Para: users@openlayers.org Asunto: Re: [OpenLayers-Users] Problems using Layer.WMS.Post Hi, you should use firebug to see what requests were issued and what was returned. In your case, I suspect that the combination of LAYERS and SLD_BODY params is invalid and you don't get back an image from your WMS. Regards, Andreas. On 2010-02-17 16:47, David Alda Fernandez de Lezea wrote: > Hello list, > > I had som problems applying a SLD to a OpenLayers.Layer.WMS becuase of the mentioned problem of URL length in IE. I followed up the discussions about this solution and decided to apply it to my app. But I get an error when I try to apply an SLD and make it visible. I mean, I create the layer without any error: > > olLayers[0] = new OpenLayers.Layer.WMS.Post( "WMSLayer",url, > { transparent: 'true', layers: > 'RecintosSigpac,ParcelasSigpac,PoligonosSigpac'},{visibility: false, > displayInLayerSwitcher:false, isBaseLayer: false, units: 'm', > maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, 4820000), > maxResolution: 292.96875} ); > > Then, later, I have some links that the user can click to apply some SLD's to some parcels. I create the SLD dynamically. > > var wms = this.map.getLayersByName("megaWMSLayer")[0]; > wms.mergeNewParams({SLD_BODY: sld}); > wms.setVisibility(true); > > And the problem comes in the line 'wms.setVisibility(true);'. Debugging the error, I found that it crashes in line 1275 character 174 of OpenLayers.js to be precise. This is the code of that line: > > tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.tr > iggerEvent("loadstart");} > this.numLoadingTiles++;}; > > And the variable tile is undefined. > > Is this a known problem or it's just my fault??. > > Any ideas?? > > Thanks in advance. > > Un saludo, > > ?????????????????????????????????????????????????????????????????????? > ???????????? > > David Alda Fern?ndez de Lezea > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y > Biodiversidad > > IKT > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > ?????????????????????????????????????????????????????????????????????? > ???????????? _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From ahocevar at opengeo.org Thu Feb 18 03:46:49 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Problems using Layer.WMS.Post In-Reply-To: <224DBDAF88A6AC47BD22432815351BE007C1DEF2@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE007C1DEF2@nekaposta1> Message-ID: <4B7CFE79.1090604@opengeo.org> Hi, please use a current trunk version of OpenLayers, not a patched 2.8 version. You can download a nightly build from http://trac.openlayers.org/wiki/HowToDownload Regards, Andreas. On 2010-02-18 08:59, David Alda Fernandez de Lezea wrote: > Hello, thanks for your response. > > I'm trying to make it work in IE so I guess Firebug is not very useful in this case. Maybe I didn't mention, but it works in FF, Chrome and Safari, the only problematic browser is IE, which has the limitation I mentioned. Digging a little bit in the code I found that an OL class was missing to get WMS.Post work. This class was IFrame.js, but know I've got another error pointing this class: > > In method 'createRequestForm' > > form.action = OpenLayers.Util.urlAppend(this.layer.url, cacheId); > > Saying that the object doesn't accept function urlAppend. Again, digging into the code I found that the class Util.js doesnt' have the function urlAppend, and I've started wondering how many classes do I have to update to make this work. Are there some instructions to apply this change or some info about the classes involved in this change?? > > Where I can find the new Util.js for download?? > > > Thanks. > > > -----Mensaje original----- > De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Andreas Hocevar > Enviado el: mi?rcoles, 17 de febrero de 2010 17:33 > Para: users@openlayers.org > Asunto: Re: [OpenLayers-Users] Problems using Layer.WMS.Post > > Hi, > > you should use firebug to see what requests were issued and what was returned. In your case, I suspect that the combination of LAYERS and SLD_BODY params is invalid and you don't get back an image from your WMS. > > Regards, > Andreas. > > On 2010-02-17 16:47, David Alda Fernandez de Lezea wrote: > >> Hello list, >> >> I had som problems applying a SLD to a OpenLayers.Layer.WMS becuase of the mentioned problem of URL length in IE. I followed up the discussions about this solution and decided to apply it to my app. But I get an error when I try to apply an SLD and make it visible. I mean, I create the layer without any error: >> >> olLayers[0] = new OpenLayers.Layer.WMS.Post( "WMSLayer",url, >> { transparent: 'true', layers: >> 'RecintosSigpac,ParcelasSigpac,PoligonosSigpac'},{visibility: false, >> displayInLayerSwitcher:false, isBaseLayer: false, units: 'm', >> maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, 4820000), >> maxResolution: 292.96875} ); >> >> Then, later, I have some links that the user can click to apply some SLD's to some parcels. I create the SLD dynamically. >> >> var wms = this.map.getLayersByName("megaWMSLayer")[0]; >> wms.mergeNewParams({SLD_BODY: sld}); >> wms.setVisibility(true); >> >> And the problem comes in the line 'wms.setVisibility(true);'. Debugging the error, I found that it crashes in line 1275 character 174 of OpenLayers.js to be precise. This is the code of that line: >> >> tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.tr >> iggerEvent("loadstart");} >> this.numLoadingTiles++;}; >> >> And the variable tile is undefined. >> >> Is this a known problem or it's just my fault??. >> >> Any ideas?? >> >> Thanks in advance. >> >> Un saludo, >> >> ?????????????????????????????????????????????????????????????????????? >> ???????????? >> >> David Alda Fern?ndez de Lezea >> Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y >> Biodiversidad >> >> IKT >> Granja Modelo s/n ? 01192 ? Arkaute (Araba) >> >> ?????????????????????????????????????????????????????????????????????????????????? >> Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 >> ?????????????????????????????????????????????????????????????????????????????????? >> email: dalda@ikt.es web: www.ikt.es >> ?????????????????????????????????????????????????????????????????????? >> ???????????? _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From dalda at ikt.es Thu Feb 18 04:00:33 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Problems using Layer.WMS.Post Message-ID: <224DBDAF88A6AC47BD22432815351BE007C1DF8B@nekaposta1> Hi, Thanks for your help. What does trunk mean?? Whenever a change is made, another build is also made? And is available as one file only?? I'm a bit confused withs names (trunk, nightly build, etc) If I create my own control, how can I add the control to this .js file?? Thanks again. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Andreas Hocevar Enviado el: jueves, 18 de febrero de 2010 9:47 Para: users@openlayers.org Asunto: Re: [OpenLayers-Users] Problems using Layer.WMS.Post Hi, please use a current trunk version of OpenLayers, not a patched 2.8 version. You can download a nightly build from http://trac.openlayers.org/wiki/HowToDownload Regards, Andreas. On 2010-02-18 08:59, David Alda Fernandez de Lezea wrote: > Hello, thanks for your response. > > I'm trying to make it work in IE so I guess Firebug is not very useful in this case. Maybe I didn't mention, but it works in FF, Chrome and Safari, the only problematic browser is IE, which has the limitation I mentioned. Digging a little bit in the code I found that an OL class was missing to get WMS.Post work. This class was IFrame.js, but know I've got another error pointing this class: > > In method 'createRequestForm' > > form.action = OpenLayers.Util.urlAppend(this.layer.url, cacheId); > > Saying that the object doesn't accept function urlAppend. Again, digging into the code I found that the class Util.js doesnt' have the function urlAppend, and I've started wondering how many classes do I have to update to make this work. Are there some instructions to apply this change or some info about the classes involved in this change?? > > Where I can find the new Util.js for download?? > > > Thanks. > > > -----Mensaje original----- > De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > En nombre de Andreas Hocevar Enviado el: mi?rcoles, 17 de febrero de > 2010 17:33 > Para: users@openlayers.org > Asunto: Re: [OpenLayers-Users] Problems using Layer.WMS.Post > > Hi, > > you should use firebug to see what requests were issued and what was returned. In your case, I suspect that the combination of LAYERS and SLD_BODY params is invalid and you don't get back an image from your WMS. > > Regards, > Andreas. > > On 2010-02-17 16:47, David Alda Fernandez de Lezea wrote: > >> Hello list, >> >> I had som problems applying a SLD to a OpenLayers.Layer.WMS becuase of the mentioned problem of URL length in IE. I followed up the discussions about this solution and decided to apply it to my app. But I get an error when I try to apply an SLD and make it visible. I mean, I create the layer without any error: >> >> olLayers[0] = new OpenLayers.Layer.WMS.Post( "WMSLayer",url, >> { transparent: 'true', layers: >> 'RecintosSigpac,ParcelasSigpac,PoligonosSigpac'},{visibility: false, >> displayInLayerSwitcher:false, isBaseLayer: false, units: 'm', >> maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, 4820000), >> maxResolution: 292.96875} ); >> >> Then, later, I have some links that the user can click to apply some SLD's to some parcels. I create the SLD dynamically. >> >> var wms = this.map.getLayersByName("megaWMSLayer")[0]; >> wms.mergeNewParams({SLD_BODY: sld}); >> wms.setVisibility(true); >> >> And the problem comes in the line 'wms.setVisibility(true);'. Debugging the error, I found that it crashes in line 1275 character 174 of OpenLayers.js to be precise. This is the code of that line: >> >> tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.t >> r >> iggerEvent("loadstart");} >> this.numLoadingTiles++;}; >> >> And the variable tile is undefined. >> >> Is this a known problem or it's just my fault??. >> >> Any ideas?? >> >> Thanks in advance. >> >> Un saludo, >> >> ????????????????????????????????????????????????????????????????????? >> ? >> ???????????? >> >> David Alda Fern?ndez de Lezea >> Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y >> Biodiversidad >> >> IKT >> Granja Modelo s/n ? 01192 ? Arkaute (Araba) >> >> ?????????????????????????????????????????????????????????????????????????????????? >> Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 >> ?????????????????????????????????????????????????????????????????????????????????? >> email: dalda@ikt.es web: www.ikt.es >> ????????????????????????????????????????????????????????????????????? >> ? ???????????? _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From ahocevar at opengeo.org Thu Feb 18 04:11:20 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Problems using Layer.WMS.Post In-Reply-To: <224DBDAF88A6AC47BD22432815351BE007C1DF8B@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE007C1DF8B@nekaposta1> Message-ID: <4B7D0438.2030602@opengeo.org> On 2010-02-18 10:00, David Alda Fernandez de Lezea wrote: > Thanks for your help. What does trunk mean?? > Trunk is the development branch in Subversion, our code versioning system. The nightly builds are built off this version. Layer.WMS.Post was added *after* release 2.8, which is the latest official release. So you have to use a more recent version, preferably a nightly build. > Whenever a change is made, another build is also made? And is available as one file only?? I'm a bit confused withs names (trunk, nightly build, etc) > Nightly builds, as the name says, are created every night. The code is minified and contains the whole library in one file. In addition, you only nead the theme and img folders. > If I create my own control, how can I add the control to this .js file?? > You can either use the python based build tool in the build folder of OpenLayers, or any javascript minifaction tool you prefer. But you can also just create a separate .js file for your custom control and add it in your html page, after OpenLayers.js. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From bluesky003 at gmail.com Thu Feb 18 04:28:24 2010 From: bluesky003 at gmail.com (Albert Ang) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Accessing the events of DrawFeature and ModifyFeature to calculate area Message-ID: <4b3d213d1002180128y62a04ce5u63c960b97641ba2c@mail.gmail.com> Dear all, I need assistance in using the events of DrawFeature and ModifyFeature. Can anyone provide some examples? I use the DrawFeature and ModifyFeature as following but need guidance on how to use the events of DrawFeature (featureadded) and ModifyFeatures (featuremodified). Basically I like to use the feature.geometry.getGeodesicArea() function to calculate area dynamically when an user draws a polygon or when he modifies the polygon. controls = { dpolygon: new OpenLayers.Control.DrawFeature(aoi, OpenLayers.Handler.Polygon, drawOptions), modify: new OpenLayers.Control.ModifyFeature(aoi, modifyOptions), selectVector: new OpenLayers.Control.SelectFeature(aoi, wktOptions) } Thank you in advance. Albert -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100218/7c85921b/attachment.html From paulborodaev at gmail.com Thu Feb 18 05:31:09 2010 From: paulborodaev at gmail.com (BrainDrain) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Geometry.Collection (LineString) GetCentroid - fake? In-Reply-To: <1266411935050-4585847.post@n2.nabble.com> References: <1266394717928-4584888.post@n2.nabble.com> <4B7BC0DC.3030802@opengeo.org> <1266411935050-4585847.post@n2.nabble.com> Message-ID: <1266489069574-4591018.post@n2.nabble.com> I need just center point of polyline that belongs to polyline. Ok, I'll do it with Linear Referencing System of NTS (C# port of JTS) [WebMethod(EnableSession = true)] [ScriptMethod(UseHttpGet = true)] public string GetCenterPoint(...) { //... return new NetTopologySuite.IO.WKTWriter().Write(new NetTopologySuite.Geometries.Point(LengthLocationMap.GetLocation(geometry, geometry.Length/2).GetCoordinate(geometry))); } -- View this message in context: http://n2.nabble.com/Geometry-Collection-LineString-GetCentroid-fake-tp4584888p4591018.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From me at dylanparry.com Thu Feb 18 05:36:52 2010 From: me at dylanparry.com (Dylan Parry) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] vsdoc for Visual Studio intellisense? Message-ID: <4B7D1844.1010606@dylanparry.com> Hi, I usually use Visual Studio for writing my code, and I was wondering if there is a ?-vsdoc.js? file available for OpenLayers so that I can get code completion hints via Intellisense? I?ve had a look around, but I can?t find one. Does anyone know of such a file? Thanks, -- Dylan Parry From j_schumann at gmx.de Thu Feb 18 05:37:58 2010 From: j_schumann at gmx.de (J.Schumann) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Textfield Event Handling in a Custom Control In-Reply-To: <1266423297299-4586882.post@n2.nabble.com> References: <756275.50182.qm@web36108.mail.mud.yahoo.com> <1266423297299-4586882.post@n2.nabble.com> Message-ID: <1266489478385-4591043.post@n2.nabble.com> Hello Michael and everyone else! I solved it now, using the way like OpenLayers.Popup works, register all the available events for this.div and stop event bubbling but don't prevent the default actions: OpenLayers.Event.stop(evt, true); The second param is the important one :-) Just check OpenLayers.Popup for the registerEvents() and onmousedown() etc. functions! Regards, JS Michael Hampton wrote: > > How can I enable default event handling for a textfield input in a custom > control? > > When I place a textfield into a control on the map, it does not receive > mouse events or keyboard events. > How can I make the textfield receive these events and handle them as it > normally would? > -- View this message in context: http://n2.nabble.com/Textfield-Event-Handling-in-a-Custom-Control-tp4165457p4591043.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Thu Feb 18 06:57:38 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] rewrite 00-map-with-wms.html in GWT and org.gwtopenmaps.openlayers library In-Reply-To: References: Message-ID: <1266494258220-4591336.post@n2.nabble.com> Hi Jim! I have this same problem!!!! Did you manage to deal with it?? I tried everything, on different server (glassfish, Jetty) and the problem still occurs. Please write to me whether you found the solution... Cheers, Poul www.gwtorm.com wrote: > > Anybody uses GWT and org.gwtopenmaps library for Google maps. > When I convert js version into GWT version, Google map just occurs in > upper > left of map widget instead of whole part of map widget. After I resize web > browser and change zoom level, I can get the same look as original js > version. > > > -- View this message in context: http://n2.nabble.com/rewrite-00-map-with-wms-html-in-GWT-and-org-gwtopenmaps-openlayers-library-tp3503835p4591336.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From liste12A45q7 at gmx.de Thu Feb 18 06:58:00 2010 From: liste12A45q7 at gmx.de (Markus) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Sailor wanted Message-ID: <4B7D2B48.2060903@gmx.de> Dear professionals, I have a nice customized mesurement-tool (made by Arnd/Tobias). Now I would like to integrate it in OpenSeaMap. Who can help me doing this? (Specification is finished in German, can be translated if necessary) Thanks a lot! Markus From paweluz at o2.pl Thu Feb 18 07:08:40 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] GWT and Openlayers In-Reply-To: <3036.193.123.19.10.1228208087.squirrel@dp2642.force9.co.uk> References: <3036.193.123.19.10.1228208087.squirrel@dp2642.force9.co.uk> Message-ID: <1266494920224-4591382.post@n2.nabble.com> Hi! I know that the post is actually pretty old, but maybe you still remember what library did you choose, and why? I am looking for a java library too, I was actually thinking about using gwt-openlayers. I made an application using just js Openlayers and now I am tyring to rewrite it with GWT + some java map library... Any suggestion Cheers, Poul -- View this message in context: http://n2.nabble.com/GWT-and-Openlayers-tp1831706p4591382.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Thu Feb 18 07:36:07 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Appliaction loads the first google tile and then gives up In-Reply-To: <1250500074097-3457374.post@n2.nabble.com> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> <4976733D.1070605@pinan.co.uk> <1250500074097-3457374.post@n2.nabble.com> Message-ID: <1266496567637-4591485.post@n2.nabble.com> I have this same problem. Did anyone solve it?? Please write .... agul wrote: > > Hi David I faced the sama problem but I couldnt solve if you find a way > please write... > > David Potts wrote: >> >> >> Hi >> >> Am trying to load a google map via the gwt plug in and its not working. >> >> As far as I can tell openlayers is correctly requesting the map tiles >> from google maps(I have traced the net connection via firefox and you >> can see all the tiles being downloaded) >> >> When the program loads, a google map is shown in the left hand side of >> the viewport, but its cliped to about a 3rd of the viewport. >> >> If you scroll to the left or the right, the next tile is loaded, the >> image now takes up two thirds of the viewport. >> >> If you scroll to far to the right, the image drops back to left hand 1/3 >> of the viewport. >> >> >> Dave. >> >> >> > > -- View this message in context: http://n2.nabble.com/SelectFeature-control-and-click-event-on-marker-tp2186747p4591485.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu Feb 18 07:49:08 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Appliaction loads the first google tile and then gives up In-Reply-To: <1266496567637-4591485.post@n2.nabble.com> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> <4976733D.1070605@pinan.co.uk> <1250500074097-3457374.post@n2.nabble.com> <1266496567637-4591485.post@n2.nabble.com> Message-ID: <4B7D3744.8020800@opengeo.org> On 2010-02-18 13:36, paweluz wrote: > I have this same problem. Did anyone solve it?? Please write .... > Make sure that your gwt plugin uses the latest nightly build of OpenLayers, not version 2.8. These issues should all be fixed now. Regards, Andreas. > > agul wrote: > >> Hi David I faced the sama problem but I couldnt solve if you find a way >> please write... >> >> David Potts wrote: >> >>> >>> Hi >>> >>> Am trying to load a google map via the gwt plug in and its not working. >>> >>> As far as I can tell openlayers is correctly requesting the map tiles >>> from google maps(I have traced the net connection via firefox and you >>> can see all the tiles being downloaded) >>> >>> When the program loads, a google map is shown in the left hand side of >>> the viewport, but its cliped to about a 3rd of the viewport. >>> >>> If you scroll to the left or the right, the next tile is loaded, the >>> image now takes up two thirds of the viewport. >>> >>> If you scroll to far to the right, the image drops back to left hand 1/3 >>> of the viewport. >>> >>> >>> Dave. >>> >>> >>> >>> >> >> > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From boehme at supportgis.de Thu Feb 18 08:06:32 2010 From: boehme at supportgis.de (=?windows-1252?Q?Sven_B=F6hme?=) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] wfs digitize In-Reply-To: References: <4B7C0FA6.4080204@supportgis.de> Message-ID: <4B7D3B58.6040302@supportgis.de> Hi David, thank you for the answer. That a nice example, but I hoped there would be an example without MapFish. Greetz Sven Am 17.02.2010 17:44, schrieb David Fawcett: > It isn't pure OpenLayers, but there is a MapFish example that may fit > your case at: > > http://demo.mapfish.org/mapfishsample/1.2/examples/editing/editing-panel.html > > David. > > On Wed, Feb 17, 2010 at 9:47 AM, Sven B?hme wrote: > >> Hi List, >> >> I?m an OpenLayers newbie, but the first steps work great and I think >> it?s a very nice software! >> >> So, I?ll like to offer a map where you can add, edit or delete polygons >> via WFS-T. I found some examples how to use WFS-T, but only for the >> geometry. And I like to add polygon with attributes. So it would be nice >> if there is an example for a digitalisation (insert,update,delete) of >> polygon with attributes. >> >> Thanks in advance >> Sven >> -- >> >> -------------------------------------- >> >> Dipl.-Geogr. Sven B?hme >> boehme@supportgis.de >> >> -------------------------------------- >> >> CPA Systems GmbH >> Grantham-Allee 2-8 >> D-53757 Sankt Augustin >> >> Tel.: +49 (0) 2241 / 25 94 ? 24 >> Fax.: +49 (0) 2241 / 25 94 - 29 >> >> www.cpa-systems.de >> >> -------------------------------------- >> Handelsregister: >> HRB 9706, Amtsgericht Siegburg >> >> Gesch?ftsf?hrer: >> >> Dr.-Ing. habil. Christoph Averdung >> Dr.-Ing. Ren? Thiele >> Dr.-Ing. Matthias Ellsiepen >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > -- -------------------------------------- Dipl.-Geogr. Sven B?hme boehme@supportgis.de -------------------------------------- CPA Systems GmbH Grantham-Allee 2-8 D-53757 Sankt Augustin Tel.: +49 (0) 2241 / 25 94 ? 24 Fax.: +49 (0) 2241 / 25 94 - 29 www.cpa-systems.de -------------------------------------- Handelsregister: HRB 9706, Amtsgericht Siegburg Gesch?ftsf?hrer: Dr.-Ing. habil. Christoph Averdung Dr.-Ing. Ren? Thiele Dr.-Ing. Matthias Ellsiepen From adube at mapgears.com Thu Feb 18 09:00:38 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266445074251-4588879.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> Message-ID: <4B7D4806.2060209@mapgears.com> Hi, I'm not sure if I fully understand your need, but anyway here's a solution that could work for you : put your data in a PostGIS table and have them served by a "feature server". Then, create a vector layer in your OpenLayers application that connects to this "feature server". PostGIS : http://postgis.refractions.net/ --> check the 'installation' procedure on the right Importation of your data to PostGIS : If the format of your data is suppoted by GDAL, you could use one of its tool (ogr2ogr or shp2pgsql) to import you data to your PostGIS database. I would go with shp2pgsql : http://postgis.refractions.net/documentation/manual-svn/ch04.html Once it's done, make a quick test of your data by creating a new layer to your existing WMS server. If you're using MapServer : http://mapserver.org/input/vector/postgis.html Now, choose and set up a "feature server". Choose among : * GeoServer, supports WFS and WFS-T (GML) (there could be more, I don't know much of GeoServer) * MapServer, supports WFS (GML) * TinyOWS, supports WFS and WFS-T (GML) * FeatureServer, supports WFS and GeoJSON (in transactional mode) * MapFish-server, supports GeoJSON (in transactional mode) (I don't know much of this one either) If you seek simplicity and the use of standards (WFS-T is a standard), I'd go with TinyOWS. FeatureServer is really easy to install and use too. Create a layer object in the config file of your chosen "feature server" that connects to your PostGIS table. Here's a sample TinyOWS config I made for a demo a while ago : http://dev4.mapgears.com/bdga/config.xml What remains after that is to create an OpenLayers.Layer.Vector object that connects to your "feature server" layer created. Here's a demo using OpenLayers+TinyOWS+PostGIS I made a while ago. The vector lines (roads) are served by TinyOWS and the data comes from a PostGIS database. You can look at the source for inspiration : http://dev4.mapgears.com/bdga/bdgaWFS-T.html Be sure to read any "readme" files you find along the way. I really hope this helps, Alexandre ngreen wrote: > I'm looking for some help getting started. I've spent about a week looking at > various OL examples and "getting started" pages but they cover only the most > minimal basics. And while I'm very handy with php and SQL, my Javascript is > limited so I'm struggling. > > I want to set up a basic map with an image base (done) and vector layers for > points, lines (done) and polygons (done). > > The bit that's unclear is how to write that information to a database and > load it into the map. > > The information at http://dev.openlayers.org/docs/files/ doesn't help me > much because of my limited javascript and examples which touch on what I > want to do tend to offer only part of the solution. All I've figured out is > that I should probably be using the GeoJSON format and for the loading info > part, writing the JSON to a php file something like this? > > http://n2.nabble.com/Displaying-Multiple-Markers-from-Database-td1828946.html#a1828954 > > I've googled and googled and googled and searched these forums but can't > find any decent examples that tell the whole story. > > Can anyone point me to one? I'm doing this as a favour for some friends who > sadly don't know anyone with better javascript than me. > -- Alexandre Dub? Mapgears www.mapgears.com From paweluz at o2.pl Thu Feb 18 09:11:50 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Appliaction loads the first google tile and then gives up In-Reply-To: <4B7D3744.8020800@opengeo.org> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> <4976733D.1070605@pinan.co.uk> <1250500074097-3457374.post@n2.nabble.com> <1266496567637-4591485.post@n2.nabble.com> <4B7D3744.8020800@opengeo.org> Message-ID: <1266502310406-4591932.post@n2.nabble.com> Hi Andreas! I have tried using Openlayers2.7 and 2.8, and I still have this same problem? What version should I use -> http://openlayers.org/download/ ?? Regards, Poul -- View this message in context: http://n2.nabble.com/SelectFeature-control-and-click-event-on-marker-tp2186747p4591932.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Steve.Toutant at inspq.qc.ca Thu Feb 18 09:34:16 2010 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] Appliaction loads the first google tile and then gives up In-Reply-To: <1266502310406-4591932.post@n2.nabble.com> Message-ID: Hi, These problems were fix after the release of OL 2.8. So you have the use a recent built of OL see the response of Andreas on another thread, please use a current trunk version of OpenLayers, not a patched 2.8 version. You can download a nightly build from http://trac.openlayers.org/wiki/HowToDownload Steve paweluz @openlayers.org Envoy? par : users-bounces@openlayers.org 18/02/2010 09:11 AM A users@openlayers.org cc Objet Re: [OpenLayers-Users] Appliaction loads the first google tile and then gives up Hi Andreas! I have tried using Openlayers2.7 and 2.8, and I still have this same problem? What version should I use -> http://openlayers.org/download/ ?? Regards, Poul -- View this message in context: http://n2.nabble.com/SelectFeature-control-and-click-event-on-marker-tp2186747p4591932.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100218/d26153ef/attachment.html From zer_matt at hotmail.com Thu Feb 18 11:00:25 2010 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] problem using pointRadius computed in context In-Reply-To: <1229631773.4250.2.camel@localhost> References: <1229631773.4250.2.camel@localhost> Message-ID: <1266508825860-4592561.post@n2.nabble.com> Hi, I'm also fighting with this problem. I stared out with this code: var myStyle = new OpenLayers.Style( { pointRadius :"${radius}", fillColor :'#FFFF00', fillOpacity :0.5, strokeColor :'#FFFFFF', strokeWidth :2, strokeOpacity :0.5 }, { context : { radius: function(feature) { return Math.min(feature.attributes.radius, 7) + 3;; } } }); var myStyleMap = new OpenLayers.StyleMap( { "default" :myStyle }); var wfsSurvey = new OpenLayers.Layer.Vector("Points", { styleMap: myStyleMap, strategies: [new OpenLayers.Strategy.BBOX()], projection: new OpenLayers.Projection("EPSG:4326"), protocol: new OpenLayers.Protocol.WFS({ version: "1.1.0", srsName: "EPSG:4326", url: "http://localhost:8080/geoserver/wfs", extractAttributes: true, featureNS : "http://www.px.org", featureType: "antenna", geometryName: "the_geom", schema: "http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0& typename=px:antenna" }) }); If I skip the attribute based styling, the points show up correctly. But as soon as I try using the radius, points will not show on the map. Or they will show, but with radius = 0. It seems like the value for the attributes always will be zero and I get the error "Unexpected value parsing r attribute." in the Firebug console. Struggling with this all day, I decided to copy some of the code from the OpenLayers Examples, to see if it works or not. It did not work.... I am using the exact same code as in the OpenLayers StyleMap Example. If I run the example from the url http://openlayers.org/dev/examples/ , it works just fine. But when I runt it from my local site, http://localhost:8080/px/mapjsp, I get the error "Unexpected value parsing r attribute." in the Firebug console. I'm using OpenLayers 2.8 and have tried the code in FF 3.0. FF3.5 and IE 7 with the same negative result. I've checked the GML that's returned from then WFS-service and everything looks OK. I've totally run out of ideas.... Anyone? Suggestions will be highly appreciable! Thanks, ZM -- View this message in context: http://n2.nabble.com/problem-using-pointRadius-computed-in-context-tp1830106p4592561.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rmarianski at openplans.org Thu Feb 18 11:32:22 2010 From: rmarianski at openplans.org (Robert Marianski) Date: Wed Sep 1 17:18:30 2010 Subject: [OpenLayers-Users] click/hover select controls on one layer Message-ID: <20100218163222.GB2684@openplans.org> I want to be able to handle both hover and click events on features in a vector layer. I created two select controls, one with hover set to true, added them to the layer, and activated them. What I'm seeing is that the click select control doesn't receive any of featured selected events, but the hover select control does receive the hover events. If I don't add the hover select control but only the click select control, then I do receive all the click events. Am I approaching this the wrong way? Any workarounds? I'm using the nightly openlayers build from 2/17/10. Thanks, Robert From de_labarre at yahoo.com Thu Feb 18 11:40:10 2010 From: de_labarre at yahoo.com (Eric France) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Scale Control Position In-Reply-To: <1266508825860-4592561.post@n2.nabble.com> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> Message-ID: <425945.47282.qm@web33603.mail.mud.yahoo.com> "The Scale control displays the current map scale as a ratio (e.g. Scale = 1:1M). By default it is displayed in the lower right corner of the map." This page does not seem to indicate how to change the default position of the scale display (I would like to move it to the lower left so that it is not covered by the OverviewMap). How can I do this? http://dev.openlayers.org/docs/files/OpenLayers/Control/Scale-js.html Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100218/2c6e2443/attachment.html From crschmidt at metacarta.com Thu Feb 18 11:58:28 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Scale Control Position In-Reply-To: <425945.47282.qm@web33603.mail.mud.yahoo.com> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> Message-ID: <20100218165828.GG8508@metacarta.com> On Thu, Feb 18, 2010 at 08:40:10AM -0800, Eric France wrote: > "The Scale control displays the current map scale as a ratio (e.g. > Scale = 1:1M). By default it is displayed in the lower right corner of > the map." > > This page does not seem to indicate how to change the default position of the scale display (I would like to move it to the lower left so that it is not covered by the OverviewMap). How can I do this? > > http://dev.openlayers.org/docs/files/OpenLayers/Control/Scale-js.html CSS. http://openlayers.org/dev/examples/custom-style.html Class name is .olControlScale. Regards, -- Christopher Schmidt MetaCarta From de_labarre at yahoo.com Thu Feb 18 12:49:52 2010 From: de_labarre at yahoo.com (Eric France) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Scale Control Position In-Reply-To: <20100218165828.GG8508@metacarta.com> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> <20100218165828.GG8508@metacarta.com> Message-ID: <9084.32970.qm@web33608.mail.mud.yahoo.com> Thanks! Are these CSS classes and styles documented anywhere? Eric ________________________________ From: Christopher Schmidt To: Eric France Cc: OpenLayers Users Sent: Thu, February 18, 2010 11:58:28 AM Subject: Re: [OpenLayers-Users] Scale Control Position On Thu, Feb 18, 2010 at 08:40:10AM -0800, Eric France wrote: > "The Scale control displays the current map scale as a ratio (e.g. > Scale = 1:1M). By default it is displayed in the lower right corner of > the map." > > This page does not seem to indicate how to change the default position of the scale display (I would like to move it to the lower left so that it is not covered by the OverviewMap). How can I do this? > > http://dev.openlayers.org/docs/files/OpenLayers/Control/Scale-js.html CSS. http://openlayers.org/dev/examples/custom-style.html Class name is .olControlScale. Regards, -- Christopher Schmidt MetaCarta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100218/4318679a/attachment.html From ahocevar at opengeo.org Thu Feb 18 12:50:30 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] click/hover select controls on one layer In-Reply-To: <20100218163222.GB2684@openplans.org> References: <20100218163222.GB2684@openplans.org> Message-ID: <4B7D7DE6.30900@opengeo.org> Hi Rob, Robert Marianski wrote: > I want to be able to handle both hover and click events on features in a > vector layer. I created two select controls, one with hover set to true, > added them to the layer, and activated them. > > What I'm seeing is that the click select control doesn't receive any of > featured selected events, but the hover select control does receive the > hover events. If I don't add the hover select control but only the click > select control, then I do receive all the click events. This is because by default, hovering over a feature also selects it. You can change that easily by configuring the one that you use for hover with highlightOnly: true Hope this helps, Andreas. > > Am I approaching this the wrong way? Any workarounds? I'm using the > nightly openlayers build from 2/17/10. > > Thanks, > Robert > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Thu Feb 18 13:01:57 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] click/hover select controls on one layer In-Reply-To: <4B7D7DE6.30900@opengeo.org> References: <20100218163222.GB2684@openplans.org> <4B7D7DE6.30900@opengeo.org> Message-ID: <4B7D8095.8030901@opengeo.org> Andreas Hocevar wrote: > Hi Rob, > > Robert Marianski wrote: >> I want to be able to handle both hover and click events on features in a >> vector layer. I created two select controls, one with hover set to true, >> added them to the layer, and activated them. >> >> What I'm seeing is that the click select control doesn't receive any of >> featured selected events, but the hover select control does receive the >> hover events. If I don't add the hover select control but only the click >> select control, then I do receive all the click events. > > This is because by default, hovering over a feature also selects it. You > can change that easily by configuring the one that you use for hover with > > highlightOnly: true Meaning, configure the SelectFeature control that you use for hovering with: { hover: true, highlightOnly: true } Regards, Andreas. > > Hope this helps, > Andreas. > >> Am I approaching this the wrong way? Any workarounds? I'm using the >> nightly openlayers build from 2/17/10. >> >> Thanks, >> Robert >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From zer_matt at hotmail.com Thu Feb 18 13:03:08 2010 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Scale Control Position In-Reply-To: <9084.32970.qm@web33608.mail.mud.yahoo.com> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> <20100218165828.GG8508@metacarta.com> <9084.32970.qm@web33608.mail.mud.yahoo.com> Message-ID: <1266516188380-4593293.post@n2.nabble.com> Hey! What happened to this thread? Did it just change subject by it self? What about my question? :) Well... I'd better open a new thread then.... ZM -- View this message in context: http://n2.nabble.com/problem-using-pointRadius-computed-in-context-tp1830106p4593293.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zer_matt at hotmail.com Thu Feb 18 13:05:00 2010 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Error when cumputing attribute value in context for WFS styling Message-ID: <1266516300301-4593311.post@n2.nabble.com> Hi, I'm also fighting with this problem. I stared out with this code: var myStyle = new OpenLayers.Style( { pointRadius :"${radius}", fillColor :'#FFFF00', fillOpacity :0.5, strokeColor :'#FFFFFF', strokeWidth :2, strokeOpacity :0.5 }, { context : { radius: function(feature) { return Math.min(feature.attributes.radius, 7) + 3;; } } }); var myStyleMap = new OpenLayers.StyleMap( { "default" :myStyle }); var wfsSurvey = new OpenLayers.Layer.Vector("Points", { styleMap: myStyleMap, strategies: [new OpenLayers.Strategy.BBOX()], projection: new OpenLayers.Projection("EPSG:4326"), protocol: new OpenLayers.Protocol.WFS({ version: "1.1.0", srsName: "EPSG:4326", url: "http://localhost:8080/geoserver/wfs", extractAttributes: true, featureNS : "http://www.px.org", featureType: "antenna", geometryName: "the_geom", schema: "http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0& typename=px:antenna" }) }); If I skip the attribute based styling, the points show up correctly. But as soon as I try using the radius, points will not show on the map. Or they will show, but with radius = 0. It seems like the value for the attributes always will be zero and I get the error "Unexpected value parsing r attribute." in the Firebug console. Struggling with this all day, I decided to copy some of the code from the OpenLayers Examples, to see if it works or not. It did not work.... I am using the exact same code as in the OpenLayers StyleMap Example. If I run the example from the url http://openlayers.org/dev/examples/ , it works just fine. But when I runt it from my local site, http://localhost:8080/px/mapjsp, I get the error "Unexpected value parsing r attribute." in the Firebug console. I'm using OpenLayers 2.8 and have tried the code in FF 3.0. FF3.5 and IE 7 with the same negative result. I've checked the GML that's returned from then WFS-service and everything looks OK. I've totally run out of ideas.... Anyone? Suggestions will be highly appreciable! Thanks, ZM -- View this message in context: http://n2.nabble.com/Error-when-cumputing-attribute-value-in-context-for-WFS-styling-tp4593311p4593311.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From christoph.ratke at gmx.net Thu Feb 18 13:05:24 2010 From: christoph.ratke at gmx.net (Christoph Ratke) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Accessing the events of DrawFeature and ModifyFeature to calculate area In-Reply-To: <4b3d213d1002180128y62a04ce5u63c960b97641ba2c@mail.gmail.com> References: <4b3d213d1002180128y62a04ce5u63c960b97641ba2c@mail.gmail.com> Message-ID: <4B7D8164.2050602@gmx.net> Hi Mr. Ang, you can have a look here: http://dev.openlayers.org/releases/OpenLayers-2.8/examples/modify-feature.html or here: http://dev.openlayers.org/releases/OpenLayers-2.8/examples/highlight-feature.html Have a good day, Christoph Albert Ang schrieb: > Dear all, > > I need assistance in using the events of DrawFeature and > ModifyFeature. Can anyone provide some examples? I use the DrawFeature > and ModifyFeature as following but need guidance on how to use the > events of DrawFeature (featureadded) and ModifyFeatures > (featuremodified). Basically I like to use the > feature.geometry.getGeodesicArea() function to calculate area > dynamically when an user draws a polygon or when he modifies the polygon. > > controls = { > dpolygon: new OpenLayers.Control.DrawFeature(aoi, > OpenLayers.Handler.Polygon, drawOptions), > modify: new OpenLayers.Control.ModifyFeature(aoi, > > modifyOptions), > selectVector: new OpenLayers.Control.SelectFeature(aoi, > wktOptions) > } > > Thank you in advance. > > Albert > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From de_labarre at yahoo.com Thu Feb 18 14:17:37 2010 From: de_labarre at yahoo.com (Eric France) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Scale Control Position In-Reply-To: <1266516188380-4593293.post@n2.nabble.com> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> <20100218165828.GG8508@metacarta.com> <9084.32970.qm@web33608.mail.mud.yahoo.com> <1266516188380-4593293.post@n2.nabble.com> Message-ID: <34896.53904.qm@web33607.mail.mud.yahoo.com> Oops! I was trying to start a new thread, but apparently my topic got appended to yours as a subthread. I did not mean to threadjack. Eric ________________________________ From: Zer To: users@openlayers.org Sent: Thu, February 18, 2010 1:03:08 PM Subject: Re: [OpenLayers-Users] Scale Control Position Hey! What happened to this thread? Did it just change subject by it self? What about my question? :) Well... I'd better open a new thread then.... ZM -- View this message in context: http://n2.nabble.com/problem-using-pointRadius-computed-in-context-tp1830106p4593293.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100218/31c223ca/attachment.html From n13green at gmail.com Thu Feb 18 15:30:04 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <4B7D4806.2060209@mapgears.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> Message-ID: <1266525004395-4594162.post@n2.nabble.com> Thank you. That does fill in some gaps. I'm trying to keep this simple for these friends though, so I'll probably stick to the mySQL database they currently have. I have made a bit of progress on this - passing map coords to form fields - but am stuck on two points. The below code will pass a dragged point's lat and lon to the relevant form field. My two questions are: 1) Why does the Ajax "onComplete" work here but not OL's "mouseup", "up" etc.? 2) How do I make this work for creating new points and lines? I've tried copying this method but changing the onComplete to onCreate (and for lines changing feature.geometry.x/y to feature.geometry.linestring) but had no luck. controls = { point: new OpenLayers.Control.DrawFeature(pointLayer, OpenLayers.Handler.Point), line: new OpenLayers.Control.DrawFeature(lineLayer, OpenLayers.Handler.Path), polygon: new OpenLayers.Control.DrawFeature(polygonLayer, OpenLayers.Handler.Polygon), dragpoint: new OpenLayers.Control.DragFeature(pointLayer, {onComplete: onCompleteMovePoint}) }; for(var key in controls) { map.addControl(controls[key]); } document.getElementById('noneToggle').checked = true; } function onCompleteMovePoint(feature) { if(feature) { // replace coordinate values in feature attributes var pointX = feature.geometry.x; var pointY = feature.geometry.y; document.editpoint.lat.value = pointX; document.editpoint.lon.value = pointY; } } -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4594162.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From n13green at gmail.com Thu Feb 18 15:41:04 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266525004395-4594162.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> Message-ID: <1266525664187-4594242.post@n2.nabble.com> I forgot number 3 - what does the OpenLayers.Feature.Vector url thingy do? The description for it says "If this property is set it will be taken into account by {} when upadting or deleting the feature." Does that mean I could point this to a particular script external to the map page which executes on updating or delete? -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4594242.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From p.scadden at gns.cri.nz Thu Feb 18 15:47:03 2010 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Changing the srs of a map In-Reply-To: <34896.53904.qm@web33607.mail.mud.yahoo.com> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> <20100218165828.GG8508@metacarta.com> <9084.32970.qm@web33608.mail.mud.yahoo.com> <1266516188380-4593293.post@n2.nabble.com> <34896.53904.qm@web33607.mail.mud.yahoo.com> Message-ID: <4B7DA747.9020308@gns.cri.nz> I am wanting to change the SRS of map "on the fly", (largely dependent on what imagery is selected am using as a backdrop). Can you just change it for an existing map or do you have to destroy the map and recreate with a the new srs? Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From zer_matt at hotmail.com Thu Feb 18 15:52:41 2010 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266525664187-4594242.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> Message-ID: <1266526362000-4594308.post@n2.nabble.com> Go with GeoServer's WMS/WFS protocols. Most likely it will save you tremendous time and lots of teared out hair! :) OpenLayers, GeoServer and PostGIS is a perfect combination. You will be off with just a few rows of js-code. MySQL will probably do if you do not need advanced GIS functionality. -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4594308.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Thu Feb 18 15:53:29 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266525664187-4594242.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> Message-ID: <20100218205329.GH8508@metacarta.com> On Thu, Feb 18, 2010 at 12:41:04PM -0800, ngreen wrote: > > I forgot number 3 - what does the OpenLayers.Feature.Vector url thingy do? > The description for it says "If this property is set it will be taken into > account by {} when upadting or deleting the feature." > > Does that mean I could point this to a particular script external to the map > page which executes on updating or delete? No. It means that if it's set, the Protocol.HTTP will POST/PUT/DELETE the feature to that URL, I expect. Regards, -- Christopher Schmidt MetaCarta From n13green at gmail.com Thu Feb 18 16:25:57 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266526362000-4594308.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> <1266526362000-4594308.post@n2.nabble.com> Message-ID: <1266528357374-4594449.post@n2.nabble.com> Zer wrote: > > Go with GeoServer's WMS/WFS protocols. Most likely it will save you > tremendous time and lots of teared out hair! :) > I wasn't aware of GeoServer. It does look handy though I'm trying to keep this simple. I don't know if installing new server software is even an option and I'm just a few steps away from having OL doing what I need it to do. Christopher Schmidt-2 wrote: > > No. It means that if it's set, the Protocol.HTTP will POST/PUT/DELETE > the feature to that URL, I expect. > Thanks - I'll stick to trying to update via forms then. -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4594449.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From n13green at gmail.com Thu Feb 18 16:51:50 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266525004395-4594162.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> Message-ID: <1266529910823-4594612.post@n2.nabble.com> I've half figured it out. I was reading OpenLayers.Handler.Drag instead of OpenLayers.Control.DragFeature. onComplete is OL and the equivalent property for new points is featureAdded - which works for new points. Hurrah! But using {featureAdded: onNewLine} for a line causes the linedraw feature to stop after adding the second point, rather than on double-click, and doesn't return the coords. -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4594612.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zer_matt at hotmail.com Thu Feb 18 17:18:52 2010 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266528357374-4594449.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> <1266526362000-4594308.post@n2.nabble.com> <1266528357374-4594449.post@n2.nabble.com> Message-ID: <1266531532659-4594754.post@n2.nabble.com> I can understand that you feel hesitant about installing another server, but it's just a war-file that you can deploy in your container. Depending of what server you are running, that is. Well.... anyway, good luck with your project! ZM -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4594754.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu Feb 18 17:25:39 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Changing the srs of a map In-Reply-To: <4B7DA747.9020308@gns.cri.nz> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> <20100218165828.GG8508@metacarta.com> <9084.32970.qm@web33608.mail.mud.yahoo.com> <1266516188380-4593293.post@n2.nabble.com> <34896.53904.qm@web33607.mail.mud.yahoo.com> <4B7DA747.9020308@gns.cri.nz> Message-ID: <4B7DBE63.2080605@opengeo.org> Phil Scadden wrote: > I am wanting to change the SRS of map "on the fly", (largely dependent > on what imagery is selected am using as a backdrop). Can you just change > it for an existing map or do you have to destroy the map and recreate > with a the new srs? If your backdrop is a base layer, and configured with the right srs, the map will automatically switch to the srs that is configured for the base layer. Regards, Andreas. > > Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From n13green at gmail.com Thu Feb 18 17:47:33 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266531532659-4594754.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> <1266526362000-4594308.post@n2.nabble.com> <1266528357374-4594449.post@n2.nabble.com> <1266531532659-4594754.post@n2.nabble.com> Message-ID: <1266533253229-4594900.post@n2.nabble.com> Zer wrote: > > I can understand that you feel hesitant about installing another server, > but it's just a war-file that you can deploy in your container. Depending > of what server you are running, that is. > It isn't my server - that's why I said I don't even know if that's an option. And most of what GeoServer seems to do are things I can handle myself. There doesn't seem to be a property attached to lines - but I think I can treat them as separate points linked by a lineID and get around it that way. -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4594900.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From joel at srcti.com Thu Feb 18 18:10:49 2010 From: joel at srcti.com (Joel) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] How do I transform deg decimal to TransverseMercator projection NAD27 In-Reply-To: <1266433865911-4587905.post@n2.nabble.com> References: <1266340280776-4581461.post@n2.nabble.com> <4B7BB6D7.379F.0037.0@asurequality.com> <1266433865911-4587905.post@n2.nabble.com> Message-ID: <1266534649714-4594991.post@n2.nabble.com> Hi - I am restating my problem: How do I make a proj4 EPSG projection file that works to transform GPS deg decimal to TransverseMercator projection with adjusted bounds. I have my map and layers defined as the following: OpenLayers.DOTS_PER_INCH = 25.4 / 0.28; var bounds = new OpenLayers.Bounds( 1059161.886961375, 1799425.612618936, 1217175.2129157984, 1966132.2372266736 ); var mapoptions = { controls: [], maxExtent: bounds, maxResolution: 651.1977523739752, projection: "EPSG:26771", units: 'm' }; map = new OpenLayers.Map('map', mapoptions); // setup tiled layer state1tiled = new OpenLayers.Layer.WMS( "sf:Export_OutputCityBoundry - Tiled", "http://localhost:8082/geoserver/wms", { height: '445', width: '770', layers: 'sf:Export_OutputCityBoundry,sf:Export_OutputWater,sf:Export_OutputMajorStreets1', styles: '', srs: 'EPSG:26771', numZoomLevels:8, format: format, tiled: 'true', tilesOrigin : "1079161.886961375,1799425.612618936" }, {buffer: 0} ); sf:Export_OutputCityBoundry SRS WKT: PROJCS["NAD27 / Illinois East", GEOGCS["NAD27", DATUM["North American Datum 1927", SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -88.33333333333333], PARAMETER["latitude_of_origin", 36.666666666666664], PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 0.0], UNIT["foot_survey_us", 0.30480060960121924], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","26771"]] Native SRS WKT: PROJCS["NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet", GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["GRS_1980", 6378137.0, 298.257222101]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude", NORTH]], PROJECTION["Transverse_Mercator"], PARAMETER["central_meridian", -88.33333333333333], PARAMETER["latitude_of_origin", 36.666666666666664], PARAMETER["scale_factor", 0.999975], PARAMETER["false_easting", 984250.0], PARAMETER["false_northing", 0.0], UNIT["foot_survey_us", 0.3048006096012192], AXIS["X", EAST], AXIS["Y", NORTH]] Bounding Box: Data min X: 1085435.2199593033 Data min Y: 1807003.1864647423 Data max X: 1210901.87991787 Data max Y: 1958554.6633808673 Min Long:-87.9422506107938 Min Lat: 41.64397219008913 Max Long:-87.52018418018955 Max Lat: 42.02423221521252 I am trying to use proj4 src = new OpenLayers.Projection('EPSG:4326'); dest = new OpenLayers.Projection('EPSG:2193'); markergeom = new OpenLayers.Geometry.Point(gpsx,gpsy); //now in-place re-projection OpenLayers.Projection.transform(markergeom, src, dest); gpsx = markergeom.x; gpsy = markergeom.y; alert("from WGS84:" + gpsx + "," + gpsy); For -87.66646666666666,41.90336666666667 I tried it and it gives me: from WGS84:444721.56582364725,4639284.90907464 instead of 1160049.27959, 1912889.44114 How do I make a proj4 EPSG projection that works??? - Joel -- View this message in context: http://n2.nabble.com/How-do-I-transform-deg-decimal-to-Transverse-Mercator-projection-NAD27-tp4581461p4594991.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ricardorodot02 at gmail.com Thu Feb 18 18:14:57 2010 From: ricardorodot02 at gmail.com (=?ISO-8859-1?Q?Ricardo_Rodr=EDguez?=) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] help (pgrouting) Message-ID: <3fe9e6d71002181514t19df2c8fp967f8c6f6528e4@mail.gmail.com> hello all, it is possible that openlayers, work DIRECTLY with postgres, postgis and mapserver without pgrouting or need something WFS, which recommend. additionally there are tutorials or examples that utilize these programs thanks for your answers Ricardo Rodr?guez Ing. Topogr?fico Univalle -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100218/1c40ac2f/attachment.html From vbokin at gmail.com Thu Feb 18 19:03:07 2010 From: vbokin at gmail.com (Vadim Bokin) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Overview map with ArcIMS breaks Message-ID: <1266537787539-4595244.post@n2.nabble.com> Hi, Created a new ticket on Trac but didn't get a response there, so I'm wondering if this is a user error API error (http://trac.openlayers.org/ticket/2490). When an ArcIMS layer is a base layer, the overview map doesn't load and errors are throw in Grid.js.addTileMonitoringHooks(tile) the "tile" that is passed is undefined. I was able to trace it back to Grid.js.initGriddedTiles(..) => line 408 if (!tile) { tile = this.addTile(tileBounds, px); this.addTileMonitoringHooks(tile); row.push(tile); } else { tile.moveTo(tileBounds, px, false); } The call to tile = this.addTile(tileBounds, px); returns undefined. So it seems that the actual error is in ArcIMS.js.addTile(...) To replicate: 1) Take the basic ArcIMS example http://www.openlayers.org/dev/examples/arcims.html 2) Add 1 line at the end of the init() routine to add the overview map map.addControl (new OpenLayers.Control.OverviewMap( ) ); 3) Load sample HTML file -> map loads, but the overview control throws errors Are there any parameters I can pass in to OverviewMap to make it work? I've tried it WMS and ArcGIS (both Tile based layers) and they both worked. Thanks, -Vadim -- View this message in context: http://n2.nabble.com/Overview-map-with-ArcIMS-breaks-tp4595244p4595244.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Thu Feb 18 19:07:38 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Changing the srs of a map In-Reply-To: <4B7DBE63.2080605@opengeo.org> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> <20100218165828.GG8508@metacarta.com> <9084.32970.qm@web33608.mail.mud.yahoo.com> <1266516188380-4593293.post@n2.nabble.com> <34896.53904.qm@web33607.mail.mud.yahoo.com> <4B7DA747.9020308@gns.cri.nz> <4B7DBE63.2080605@opengeo.org> Message-ID: <20100219000738.GI8508@metacarta.com> On Thu, Feb 18, 2010 at 11:25:39PM +0100, Andreas Hocevar wrote: > Phil Scadden wrote: > > I am wanting to change the SRS of map "on the fly", (largely dependent > > on what imagery is selected am using as a backdrop). Can you just change > > it for an existing map or do you have to destroy the map and recreate > > with a the new srs? > > If your backdrop is a base layer, and configured with the right srs, the > map will automatically switch to the srs that is configured for the base > layer. Sort of. Vectors loaded statically won't reproject. -- Chris > Regards, > Andreas. > > > > > Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From woodbri at swoodbridge.com Thu Feb 18 19:48:31 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] help (pgrouting) In-Reply-To: <3fe9e6d71002181514t19df2c8fp967f8c6f6528e4@mail.gmail.com> References: <3fe9e6d71002181514t19df2c8fp967f8c6f6528e4@mail.gmail.com> Message-ID: <4B7DDFDF.3020809@swoodbridge.com> Ricardo Rodr?guez wrote: > hello all, it is possible that openlayers, work DIRECTLY with postgres, > postgis and mapserver without pgrouting or need something WFS, which > recommend. > additionally there are tutorials or examples that utilize these programs OpenLayers runs in your browser and it can not work "DIRECTLY" with postgres/postgis but is can work via a simple Ajax request to a PHP or other service you provide on the server. There are plenty of examples and probably a tutorial: http://www.google.com/#hl=en&source=hp&q=pgrouting+openlayers Since pgRouting runs in the database and PHP can trivially access the database, it is very straight forward to write a simple PHP routing that takes a starting and end location via an Ajax request, then makes the appropriate SQL queries to the database and gets back its results that are then returned to the browser is simple XML. In Javascript you parse the XML, there are tools to help already in OpenLayers, and display the track as a vector layer. Here is a demo I put together. However it uses code that is not part of pgRouting, but the idea would be the same for what you are trying to do. http://gis.imaptools.com/routing/leaddog/?zoom=10&lat=33.85667&lon=35.52978&layers=B0TTTF&start=35.492313%2033.826188&stop=35.595811%2033.906827&method=STS&lang=eng Hope this helps, -Steve > thanks for your answers > > Ricardo Rodr?guez > Ing. Topogr?fico > Univalle > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From johnj.alvarado at hotmail.com Thu Feb 18 20:45:20 2010 From: johnj.alvarado at hotmail.com (johnalvarado) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Multiple invoke by zoom, very bad performance Message-ID: <1266543920276-4595600.post@n2.nabble.com> Hello, I need your help. I have a problem with openlayers in performance. I have an application that has an interface where I show a map that is composed of two layers, but do not directly invoking the Web service GIS, I do it through a servlet, I apply a logic and stores information in a database data. But the problem is that openlayer invoke the servlet 2^n times. Namely: 1 zoom = 2 invocations, 2 zooming = 4 invocations ... 5 zoom = 32 invocations, and this for each layer, ie, if I have 3 layers, 5 zoom is 32 invocations*3 = 69!!!, generate 2^n*3 records in the database. Is there any way to config openlayers to invoke only once per zoom? Thank you very much for the attention or assistance offered. -- View this message in context: http://n2.nabble.com/Multiple-invoke-by-zoom-very-bad-performance-tp4595600p4595600.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bluesky003 at gmail.com Thu Feb 18 22:26:21 2010 From: bluesky003 at gmail.com (Albert Ang) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Accessing the events of DrawFeature and ModifyFeature to calculate area In-Reply-To: <4B7D8164.2050602@gmx.net> References: <4b3d213d1002180128y62a04ce5u63c960b97641ba2c@mail.gmail.com> <4B7D8164.2050602@gmx.net> Message-ID: <4b3d213d1002181926n7d49f43i2176b70badd3fceb@mail.gmail.com> Hi Christoph, thank you very much for your assistance. I tried the following and it works beautifully. One little problem is the closing of the polygon vertices. Before adding the events listeners, a simple double-click will close the polygon. After adding the events, sometimes I need to double-click twice to close the polygon. Not a big problem though. Thanks again. - Albert Ang function report(event) { //OpenLayers.Console.log(event.type, event.feature ? event.feature.id : event.components); displayWKT(event.feature); } aoi.events.on({ "beforefeaturemodified": report, "featuremodified": report, "afterfeaturemodified": report, "vertexmodified": report, "sketchmodified": report, "sketchstarted": report, "sketchcomplete": report }); function displayWKT(feature) { var str = wkt.write(feature); // not a good idea in general, just for this demo //str = str.replace(/,/g, ', '); document.getElementById('info').innerHTML = str; document.aoi.vertex.value = str; var areaAOI = feature.geometry.getGeodesicArea(); areaAOI = areaAOI / 1000000; var areaAOIstr = 'Approx. area : ' + areaAOI + ' sq. km'; document.getElementById('area').innerHTML = areaAOIstr; } // end function displayWKT(feature) On Fri, Feb 19, 2010 at 2:05 AM, Christoph Ratke wrote: > Hi Mr. Ang, > > you can have a look here: > > http://dev.openlayers.org/releases/OpenLayers-2.8/examples/modify-feature.html > or here: > > http://dev.openlayers.org/releases/OpenLayers-2.8/examples/highlight-feature.html > > Have a good day, > Christoph > > > Albert Ang schrieb: > > Dear all, > > > > I need assistance in using the events of DrawFeature and > > ModifyFeature. Can anyone provide some examples? I use the DrawFeature > > and ModifyFeature as following but need guidance on how to use the > > events of DrawFeature (featureadded) and ModifyFeatures > > (featuremodified). Basically I like to use the > > feature.geometry.getGeodesicArea() function to calculate area > > dynamically when an user draws a polygon or when he modifies the polygon. > > > > controls = { > > dpolygon: new OpenLayers.Control.DrawFeature(aoi, > > OpenLayers.Handler.Polygon, drawOptions), > > modify: new OpenLayers.Control.ModifyFeature(aoi, > > > > modifyOptions), > > selectVector: new OpenLayers.Control.SelectFeature(aoi, > > wktOptions) > > } > > > > Thank you in advance. > > > > Albert > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100219/f1b7381e/attachment.html From Bytechanger at gmx.de Fri Feb 19 02:22:34 2010 From: Bytechanger at gmx.de (Bytechanger) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] NavToolbar BUG ?? ScrollWheel Zoom / MapClick ? Message-ID: <1266564154236-4596496.post@n2.nabble.com> Hi, when I add the NavToolbar to my map then : - when I scroll with the mousewheel, the zoom-level steps not 10, 11, 12 it steps 10,12,14, ... - the mousclick event doesn?t work anymore ! when I remove the toolbar all this thinks works fine ! Greetings Byte -- View this message in context: http://n2.nabble.com/NavToolbar-BUG-ScrollWheel-Zoom-MapClick-tp4596496p4596496.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zer_matt at hotmail.com Fri Feb 19 03:32:44 2010 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Error when cumputing attribute value in context for WFS styling In-Reply-To: <1266516300301-4593311.post@n2.nabble.com> References: <1266516300301-4593311.post@n2.nabble.com> Message-ID: <1266568364159-4596668.post@n2.nabble.com> OK, boys and girls, seems like I found the problem after some more hours of digging in the mud. The problem was that I had the js-script inside a JSP-page, and the $ symbol is interpreted as an expression, i.e. ${field}, which the compiler could not resolve, resulting in the function returning nothing. A note on the wiki about this might be good? ZM -- View this message in context: http://n2.nabble.com/Error-when-cumputing-attribute-value-in-context-for-WFS-styling-tp4593311p4596668.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Fri Feb 19 03:54:20 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Changing the srs of a map In-Reply-To: <20100219000738.GI8508@metacarta.com> References: <1229631773.4250.2.camel@localhost> <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> <20100218165828.GG8508@metacarta.com> <9084.32970.qm@web33608.mail.mud.yahoo.com> <1266516188380-4593293.post@n2.nabble.com> <34896.53904.qm@web33607.mail.mud.yahoo.com> <4B7DA747.9020308@gns.cri.nz> <4B7DBE63.2080605@opengeo.org> <20100219000738.GI8508@metacarta.com> Message-ID: On Friday, February 19, 2010, Christopher Schmidt wrote: > On Thu, Feb 18, 2010 at 11:25:39PM +0100, Andreas Hocevar wrote: >> Phil Scadden wrote: >> > I am wanting to change the SRS of map "on the fly", (largely dependent >> > on what imagery is selected am using as a backdrop). Can you just change >> > it for an existing map or do you have to destroy the map and recreate >> > with a the new srs? >> >> If your backdrop is a base layer, and configured with the right srs, the >> map will automatically switch to the srs that is configured for the base >> layer. > > Sort of. Vectors loaded statically won't reproject. + I think one needs to reconfigure the overlays, i.e. set the projection, recalculate min/maxResolution, etc. We, at Camptocamp, have been working on a SelectZone control. This control allows switching to a new geographic zone, with a new projection, max extent etc. Switching zone can be done manually using control.select(newzone) or automatically on zoom in/out. See the example . The example includes the code of the Control. This control relies on three OpenLayers patches, see #2360, #2427, and #2359. I think these patches could be useful for other "reproject map" implementations than our SelectZone control. Also, note that the control doesn't currently support reprojecting vectors, but adding that shoudn't be a problem. And FYI we've been thinking about making the SelectZone an OpenLayers addin, but we haven't gotten to that at this point. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From bartvde at osgis.nl Fri Feb 19 04:42:34 2010 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Overview map with ArcIMS breaks In-Reply-To: <1266537787539-4595244.post@n2.nabble.com> References: <1266537787539-4595244.post@n2.nabble.com> Message-ID: <46239.145.50.39.11.1266572554.squirrel@webmail.hostingdiscounter.nl> Hi Vadim, I just tried and I can reproduce your problem. Normally these issues can be fixed by cloning the baselayer, however for the ArcIMS case this did not work for me, probably since it misses a specific implementation of the clone method. However, using a nother separate ArcIMS layer for the overview map control works okay. I know it's a workaround for the problems you encountered, but hopefully it will keep you moving. layer = new OpenLayers.Layer.ArcIMS( "Global Sample Map", "http://sample.avencia.com/servlet/com.esri.esrimap.Esrimap", options ); var overview = new OpenLayers.Layer.ArcIMS( "overview", "http://sample.avencia.com/servlet/com.esri.esrimap.Esrimap", options ); map.addLayer(layer); map.addControl (new OpenLayers.Control.OverviewMap({layers: [overview]}) ); Best regards, Bart > > Hi, > > Created a new ticket on Trac but didn't get a response there, so I'm > wondering if this is a user error API error > (http://trac.openlayers.org/ticket/2490). > > > When an ArcIMS layer is a base layer, the overview map doesn't load and > errors are throw in > > Grid.js.addTileMonitoringHooks(tile) > > the "tile" that is passed is undefined. I was able to trace it back to > > Grid.js.initGriddedTiles(..) > > => line 408 > > if (!tile) { > tile = this.addTile(tileBounds, px); > this.addTileMonitoringHooks(tile); > row.push(tile); > } else { > tile.moveTo(tileBounds, px, false); > } > > > The call to > > tile = this.addTile(tileBounds, px); > > returns undefined. So it seems that the actual error is in > ArcIMS.js.addTile(...) > > To replicate: > > 1) Take the basic ArcIMS example > > http://www.openlayers.org/dev/examples/arcims.html > > 2) Add 1 line at the end of the init() routine to add the overview map > > map.addControl (new OpenLayers.Control.OverviewMap( ) ); > > 3) Load sample HTML file -> map loads, but the overview control throws > errors > > Are there any parameters I can pass in to OverviewMap to make it work? > > I've tried it WMS and ArcGIS (both Tile based layers) and they both > worked. > > Thanks, > > -Vadim > -- > View this message in context: > http://n2.nabble.com/Overview-map-with-ArcIMS-breaks-tp4595244p4595244.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From bartvde at osgis.nl Fri Feb 19 05:07:30 2010 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Overview map with ArcIMS breaks In-Reply-To: <46239.145.50.39.11.1266572554.squirrel@webmail.hostingdiscounter.nl> References: <1266537787539-4595244.post@n2.nabble.com> <46239.145.50.39.11.1266572554.squirrel@webmail.hostingdiscounter.nl> Message-ID: <17221.145.50.39.11.1266574050.squirrel@webmail.hostingdiscounter.nl> Hi Vadim, I've just added a patch to your ticket which should solve this issue, so you don't need the workaround. Best regards, Bart > Hi Vadim, > > I just tried and I can reproduce your problem. Normally these issues can > be fixed by cloning the baselayer, however for the ArcIMS case this did > not work for me, probably since it misses a specific implementation of the > clone method. > > However, using a nother separate ArcIMS layer for the overview map control > works okay. I know it's a workaround for the problems you encountered, but > hopefully it will keep you moving. > > layer = new OpenLayers.Layer.ArcIMS( "Global Sample Map", > "http://sample.avencia.com/servlet/com.esri.esrimap.Esrimap", > options ); > > var overview = new OpenLayers.Layer.ArcIMS( "overview", > "http://sample.avencia.com/servlet/com.esri.esrimap.Esrimap", > options ); > > map.addLayer(layer); > > map.addControl (new OpenLayers.Control.OverviewMap({layers: > [overview]}) ); > > Best regards, > Bart > >> >> Hi, >> >> Created a new ticket on Trac but didn't get a response there, so I'm >> wondering if this is a user error API error >> (http://trac.openlayers.org/ticket/2490). >> >> >> When an ArcIMS layer is a base layer, the overview map doesn't load and >> errors are throw in >> >> Grid.js.addTileMonitoringHooks(tile) >> >> the "tile" that is passed is undefined. I was able to trace it back to >> >> Grid.js.initGriddedTiles(..) >> >> => line 408 >> >> if (!tile) { >> tile = this.addTile(tileBounds, px); >> this.addTileMonitoringHooks(tile); >> row.push(tile); >> } else { >> tile.moveTo(tileBounds, px, false); >> } >> >> >> The call to >> >> tile = this.addTile(tileBounds, px); >> >> returns undefined. So it seems that the actual error is in >> ArcIMS.js.addTile(...) >> >> To replicate: >> >> 1) Take the basic ArcIMS example >> >> http://www.openlayers.org/dev/examples/arcims.html >> >> 2) Add 1 line at the end of the init() routine to add the overview map >> >> map.addControl (new OpenLayers.Control.OverviewMap( ) ); >> >> 3) Load sample HTML file -> map loads, but the overview control throws >> errors >> >> Are there any parameters I can pass in to OverviewMap to make it work? >> >> I've tried it WMS and ArcGIS (both Tile based layers) and they both >> worked. >> >> Thanks, >> >> -Vadim >> -- >> View this message in context: >> http://n2.nabble.com/Overview-map-with-ArcIMS-breaks-tp4595244p4595244.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From jansen at terrestris.de Fri Feb 19 05:17:03 2010 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] NavToolbar BUG ?? ScrollWheel Zoom / MapClick ? In-Reply-To: <1266564154236-4596496.post@n2.nabble.com> References: <1266564154236-4596496.post@n2.nabble.com> Message-ID: <4B7E651F.4030303@terrestris.de> Hi Byte, which other controls are added to the map? Are you using controls: [] within the config object to OpenLayers.Map? Regards, Marc Bytechanger wrote: > Hi, > > when I add the NavToolbar to my map then : > > - when I scroll with the mousewheel, the zoom-level steps not 10, 11, 12 > it steps 10,12,14, ... > - the mousclick event doesn?t work anymore ! > > when I remove the toolbar all this thinks works fine ! > > Greetings > > Byte > From jansen at terrestris.de Fri Feb 19 05:19:27 2010 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Multiple invoke by zoom, very bad performance In-Reply-To: <1266543920276-4595600.post@n2.nabble.com> References: <1266543920276-4595600.post@n2.nabble.com> Message-ID: <4B7E65AF.4020503@terrestris.de> Hi johnalvarado, so you say that the maprequest is issued to often? Is there any code/live example we can see? Regards, Marc johnalvarado wrote: > Hello, I need your help. > I have a problem with openlayers in performance. I have an application that > has an interface where I show a map that is composed of two layers, but do > not directly invoking the Web service GIS, I do it through a servlet, I > apply a logic and stores information in a database data. But the problem is > that openlayer invoke the servlet 2^n times. Namely: 1 zoom = 2 invocations, > 2 zooming = 4 invocations ... 5 zoom = 32 invocations, and this for each > layer, ie, if I have 3 layers, 5 zoom is 32 invocations*3 = 69!!!, generate > 2^n*3 records in the database. > > Is there any way to config openlayers to invoke only once per zoom? > > Thank you very much for the attention or assistance offered. > From nabble at stevemartin.org.uk Fri Feb 19 06:58:39 2010 From: nabble at stevemartin.org.uk (smartini) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] How to recenter the map when drawing In-Reply-To: <20100216170508.GF21714@metacarta.com> References: <1266336688585-4581070.post@n2.nabble.com> <4B7AC80B.2080803@swoodbridge.com> <1266338857052-4581324.post@n2.nabble.com> <20100216164938.GE21714@metacarta.com> <1266339384568-4581371.post@n2.nabble.com> <20100216170508.GF21714@metacarta.com> Message-ID: <1266580719847-4597434.post@n2.nabble.com> Christopher Schmidt-2 wrote: > > On Tue, Feb 16, 2010 at 08:56:24AM -0800, smartini wrote: >> >> Christopher, >> sketchmodified appears to fire constantly while you are drawing and the >> mouse is moving. I hooked this in to setCenter() for a laugh as the map >> constantly recentered as I moved the mouse. This event appears to offer a >> little more than I require. >> >> I console logged all the events just to see if there was anything >> suitable >> but alas, there was not, hence my cry for help. > > Makes sense. A quick look at the code doesn't show anything obvious that > would be better. > > -- Chris > So, would you or anybody else in the community have any suggestions as to how to go about handling such an event? I offer as an example a site which manages to accomplish this: http://www.sanoodi.com/routes/create/ (after registering/logging in) though I have as yet been unable to reverse engineer the approach used here. Regards, Steve -- View this message in context: http://n2.nabble.com/How-to-recenter-the-map-when-drawing-tp4581070p4597434.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Fri Feb 19 08:11:01 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Changing the srs of a map In-Reply-To: References: <1266508825860-4592561.post@n2.nabble.com> <425945.47282.qm@web33603.mail.mud.yahoo.com> <20100218165828.GG8508@metacarta.com> <9084.32970.qm@web33608.mail.mud.yahoo.com> <1266516188380-4593293.post@n2.nabble.com> <34896.53904.qm@web33607.mail.mud.yahoo.com> <4B7DA747.9020308@gns.cri.nz> <4B7DBE63.2080605@opengeo.org> <20100219000738.GI8508@metacarta.com> Message-ID: <20100219131101.GK8508@metacarta.com> On Fri, Feb 19, 2010 at 09:54:20AM +0100, Eric Lemoine wrote: > On Friday, February 19, 2010, Christopher Schmidt > wrote: > > On Thu, Feb 18, 2010 at 11:25:39PM +0100, Andreas Hocevar wrote: > >> Phil Scadden wrote: > >> > I am wanting to change the SRS of map "on the fly", (largely dependent > >> > on what imagery is selected am using as a backdrop). Can you just change > >> > it for an existing map or do you have to destroy the map and recreate > >> > with a the new srs? > >> > >> If your backdrop is a base layer, and configured with the right srs, the > >> map will automatically switch to the srs that is configured for the base > >> layer. > > > > Sort of. Vectors loaded statically won't reproject. > > + I think one needs to reconfigure the overlays, i.e. set the > projection, recalculate min/maxResolution, etc. Probably not any more. Most of the time, overlays will be alwaysInRange these days unless you have specific configurations for min/max scale, so overlays will always be on; in general, non-vector overlays just take their projection information from the base layer at draw time, so changing the base layer projection will cause the raster overlays to change projection as well. Regards, -- Christopher Schmidt MetaCarta From rahn at zhaw.ch Fri Feb 19 08:44:07 2010 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Paneldiv Message-ID: <3F643797A078EB4FB02880080968098401CA0E22@langouste.zhaw.ch> Hello list, I try to realise a paneldiv with buttons for the navigation. For example the zoom and pan and so on. I made it like this: var zoomBox = new OpenLayers.Control.ZoomBox({ title: "Zoom In / Rechteckzoom" }); var navHistory = new OpenLayers.Control.NavigationHistory(); navHistory.previous.title = "letzte Ansicht"; navHistory.next.title = "n?chste Ansicht"; map.addControl(navHistory); // build the featureInfo control (aka query tool/button) featureInfo = new OpenLayers.Control({ displayClass: "olControlFeatureInfo", title: "Datenabfrage" }); // create the panel where the controls will be added var panel = new OpenLayers.Control.Panel({ defaultControl: featureInfo, div: document.getElementById("paneldiv")}); panel.addControls([ zoomBox, new OpenLayers.Control.ZoomBox({ title:"Zoom Out / Rechteckzoom", displayClass: 'olControlZoomOutBox', out: true }), new OpenLayers.Control.DragPan({title:'Pan', displayClass: 'olControlPanMap'}), featureInfo, new OpenLayers.Control.ZoomToMaxExtent({title: "Zoom Max"}), navHistory.previous, navHistory.next ]); // add the panel to the map map.addControl(panel); map.addControl(new OpenLayers.Control.MouseDefaults()); It works. But now I will arrange the buttons in another way. I have now 7 buttons in one line, but I will have the buttons in two lines. But I have no idea where I have to change the code for doing this. Perhaps it is a bad question but I hope that someone can help me. A lot of thanks. Greetings Hanno ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch www.iunr.zhaw.ch/geoinformatik -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100219/a4866af6/attachment.html From adube at mapgears.com Fri Feb 19 08:49:42 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266531532659-4594754.post@n2.nabble.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> <1266526362000-4594308.post@n2.nabble.com> <1266528357374-4594449.post@n2.nabble.com> <1266531532659-4594754.post@n2.nabble.com> Message-ID: <4B7E96F6.5030806@mapgears.com> ngreen, I agree with Zer. By choosing an existing "feature server" for your transactions rather than creating your own script for that, you would save a lot of time. Problems you could face could be solved in the chosen server. As I wrote, for simplicity, you could go with TinyOWS (use WFS-T) or FeatureServer (GeoJSON), but both only support Postgresql/PostGIS only (no support for MySQL). If your database is young, it could be a option to export it in Postgresql. Those are only suggestions, though. Best of luck, Alexandre Zer wrote: > I can understand that you feel hesitant about installing another server, but > it's just a war-file that you can deploy in your container. Depending of > what server you are running, that is. > > Well.... anyway, good luck with your project! > > ZM > -- Alexandre Dub? Mapgears www.mapgears.com From antoni.vidal at icc.cat Fri Feb 19 08:58:15 2010 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] 2 loadurl request in parallel Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> Hello list, I need to make 2 ajax request at the same time. Is this possible? Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogr?fic de Catalunya Parc de Montju?c, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100219/d06ff08b/attachment.html From johnj.alvarado at hotmail.com Fri Feb 19 09:02:56 2010 From: johnj.alvarado at hotmail.com (johnalvarado) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Multiple invoke by zoom, very bad performance In-Reply-To: <4B7E65AF.4020503@terrestris.de> References: <1266543920276-4595600.post@n2.nabble.com> <4B7E65AF.4020503@terrestris.de> Message-ID: <1266588176862-4597953.post@n2.nabble.com> Hi Marc, thank you very much for your attention. The test is very simple: in jsp: invke the map throughout servlet: map = new OpenLayers.Map( 'map' ); layer = new OpenLayers.Layer.WMS( "SampleWMS", "OpenlayerZoomMultipleInvoke",//invoke the serlvlet {layers: 'sea_ice_concentration_02'}, {singleTile: true} int the servlet: I catch the parameter (getParameter layer, bbxo, etc...) and load the rul, for example: url = server + request.getParameter("BBOX") + ....; and print a message: System.out.println("invoke the map"); The message is print 2^n times (n = #zoom), ie: zoom=2 => message print 4 times...zoom=4=>16 times... Thanks, Marck -- View this message in context: http://n2.nabble.com/Multiple-invoke-by-zoom-very-bad-performance-tp4595600p4597953.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Fri Feb 19 09:07:12 2010 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Multiple invoke by zoom, very bad performance In-Reply-To: <1266588176862-4597953.post@n2.nabble.com> References: <1266543920276-4595600.post@n2.nabble.com> <4B7E65AF.4020503@terrestris.de> <1266588176862-4597953.post@n2.nabble.com> Message-ID: <44390.145.50.39.11.1266588432.squirrel@webmail.hostingdiscounter.nl> Does this happen with normal zoom or with the mousewheel zoom? If with the mousehweel zoom, check the new options (in OL trunk) for the MouseWheel handler: /** * Property: interval * {Integer} In order to increase server performance, an interval (in * milliseconds) can be set to reduce the number of up/down events * called. If set, a new up/down event will not be set until the * interval has passed. * Defaults to 0, meaning no interval. */ interval: 0, /** * Property: delta * {Integer} When interval is set, delta collects the mousewheel z-deltas * of the events that occur within the interval. * See also the cumulative option */ delta: 0, /** * Property: cumulative * {Boolean} When interval is set: true to collect all the mousewheel * z-deltas, false to only record the delta direction (positive or * negative) */ cumulative: true, Best regards, Bart > > Hi Marc, thank you very much for your attention. > > The test is very simple: > > in jsp: invke the map throughout servlet: > > map = new OpenLayers.Map( 'map' ); > layer = new OpenLayers.Layer.WMS( > "SampleWMS", > "OpenlayerZoomMultipleInvoke",//invoke the serlvlet > {layers: 'sea_ice_concentration_02'}, > {singleTile: true} > > int the servlet: I catch the parameter (getParameter layer, bbxo, etc...) > and load the rul, for example: > > url = server + request.getParameter("BBOX") + ....; and print a message: > > System.out.println("invoke the map"); > > The message is print 2^n times (n = #zoom), ie: zoom=2 => message print 4 > times...zoom=4=>16 times... > > Thanks, Marck > -- > View this message in context: > http://n2.nabble.com/Multiple-invoke-by-zoom-very-bad-performance-tp4595600p4597953.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From jgr at di.uminho.pt Fri Feb 19 09:10:18 2010 From: jgr at di.uminho.pt (Jorge Gustavo Rocha) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] 2 loadurl request in parallel In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> Message-ID: <1266588618.3106.15.camel@ushuaia> Hi Antoni, Yes, you can make any number of AJAX requests. They are, by definition, asynchronous. If you do several different requests, and you need to collect all the results, for example, you need to add some logic, to know how many requests have already finished, and do something at the end of the last callback. Please explain you question a little bit further, to find allow a better answer. I really don't know what do you want to do. regards, jorge Sex, 2010-02-19 ?s 14:58 +0100, Vidal, Antoni escreveu: > Hello list, > > > > I need to make 2 ajax request at the same time. Is this possible? > > > > Antoni Vidal > > Unitat d'Aplicacions SIG-WEB > Institut Cartogr?fic de Catalunya > Parc de Montju?c, E-08038 Barcelona > Tel. (+34) 93 567 15 00 (ext. 3228) > www.icc.cat > > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- jorge gustavo rocha departamento de inform?tica universidade do minho 4710-057 braga portugal N 41?33'44,5" W 8?23'40,5" tel +351 253604470 fax +351 253604471 cel +351 927210173 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 315 bytes Desc: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100219/341576c3/attachment.bin From crschmidt at metacarta.com Fri Feb 19 09:17:34 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] 2 loadurl request in parallel In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> Message-ID: <20100219141734.GL8508@metacarta.com> On Fri, Feb 19, 2010 at 02:58:15PM +0100, Vidal, Antoni wrote: > Hello list, > > > > I need to make 2 ajax request at the same time. Is this possible? Depending on your definition of 'same time', probably. -- Chris > > > Antoni Vidal > > Unitat d'Aplicacions SIG-WEB > Institut Cartogr?fic de Catalunya > Parc de Montju?c, E-08038 Barcelona > Tel. (+34) 93 567 15 00 (ext. 3228) > www.icc.cat > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Feb 19 09:39:25 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <4B7E96F6.5030806@mapgears.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> <1266526362000-4594308.post@n2.nabble.com> <1266528357374-4594449.post@n2.nabble.com> <1266531532659-4594754.post@n2.nabble.com> <4B7E96F6.5030806@mapgears.com> Message-ID: <20100219143925.GM8508@metacarta.com> On Fri, Feb 19, 2010 at 08:49:42AM -0500, Alexandre Dube wrote: > ngreen, > > I agree with Zer. By choosing an existing "feature server" for your > transactions rather than creating your own script for that, you would > save a lot of time. Problems you could face could be solved in the > chosen server. > > As I wrote, for simplicity, you could go with TinyOWS (use WFS-T) or > FeatureServer (GeoJSON), but both only support Postgresql/PostGIS only > (no support for MySQL). FeatureServer has support for everything OGR supports, which includes MySQL. I still think going with GeoServer is the better way to go. Regards, -- Christopher Schmidt MetaCarta From vbokin at gmail.com Fri Feb 19 09:50:39 2010 From: vbokin at gmail.com (Vadim Bokin) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Overview map with ArcIMS breaks In-Reply-To: <17221.145.50.39.11.1266574050.squirrel@webmail.hostingdiscounter.nl> References: <1266537787539-4595244.post@n2.nabble.com> <46239.145.50.39.11.1266572554.squirrel@webmail.hostingdiscounter.nl> <17221.145.50.39.11.1266574050.squirrel@webmail.hostingdiscounter.nl> Message-ID: <1266591039098-4598211.post@n2.nabble.com> So the problem wasn't in ArcIMS.addTile() but in clone. Good catch. Thanks for the quick fix. -Vadim -- View this message in context: http://n2.nabble.com/Overview-map-with-ArcIMS-breaks-tp4595244p4598211.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Louis.Versailles at USherbrooke.ca Fri Feb 19 10:08:57 2010 From: Louis.Versailles at USherbrooke.ca (Louis Versailles) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] save feature attribut Message-ID: <1266592137.4b7ea9898c81d@www.usherbrooke.ca> Hi everyone im am working with geoserver 2.0 and shapfiles and OpenLayers 2.8 I have small problem to save attribut with the saveStrategy. The new feature is saved in the shp but no attribut is there some exemple of saving wfs feature with attribute thanks louis versailles From vbokin at gmail.com Fri Feb 19 10:28:27 2010 From: vbokin at gmail.com (Vadim Bokin) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Overview map with ArcIMS breaks In-Reply-To: <17221.145.50.39.11.1266574050.squirrel@webmail.hostingdiscounter.nl> References: <1266537787539-4595244.post@n2.nabble.com> <46239.145.50.39.11.1266572554.squirrel@webmail.hostingdiscounter.nl> <17221.145.50.39.11.1266574050.squirrel@webmail.hostingdiscounter.nl> Message-ID: <1266593307049-4598416.post@n2.nabble.com> FYI for anyone else that uses just this patch: I'm running 2.8, not trunk, so the fix failed and had to grab the method from Layer.js.getOptions() which doesn't existing in 2.8 http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer.js And now it works great. Thanks. -- View this message in context: http://n2.nabble.com/Overview-map-with-ArcIMS-breaks-tp4595244p4598416.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From beppenapo at gmail.com Fri Feb 19 10:44:28 2010 From: beppenapo at gmail.com (beppe) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] work with postgis & geoserver Message-ID: <1266594268.6619.36.camel@beppe> Hi list, I've a postgis point table (epsg:32632) and I'm using a wfs service (geoserver) to display it. Now I'd like to be able to handle it (insert/delete/update/modify) but I'm a little bit confused!!! I could start from this [1], but I need also to define/change the features attributes, something like this [2]. There is some simple example (easiest than example 2 !) to start? Your suggestions are really precious for me thanks -beppe- [1] http://www.openlayers.org/dev/examples/wfs-protocol-transactions.html [2] http://dev4.mapgears.com/bdga/bdgaWFS-T.html From eric.lemoine at camptocamp.com Fri Feb 19 11:57:01 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Changing the srs of a map In-Reply-To: <20100219131101.GK8508@metacarta.com> References: <1266508825860-4592561.post@n2.nabble.com> <20100218165828.GG8508@metacarta.com> <9084.32970.qm@web33608.mail.mud.yahoo.com> <1266516188380-4593293.post@n2.nabble.com> <34896.53904.qm@web33607.mail.mud.yahoo.com> <4B7DA747.9020308@gns.cri.nz> <4B7DBE63.2080605@opengeo.org> <20100219000738.GI8508@metacarta.com> <20100219131101.GK8508@metacarta.com> Message-ID: On Friday, February 19, 2010, Christopher Schmidt wrote: > On Fri, Feb 19, 2010 at 09:54:20AM +0100, Eric Lemoine wrote: >> On Friday, February 19, 2010, Christopher Schmidt >> wrote: >> > On Thu, Feb 18, 2010 at 11:25:39PM +0100, Andreas Hocevar wrote: >> >> Phil Scadden wrote: >> >> > I am wanting to change the SRS of map "on the fly", (largely dependent >> >> > on what imagery is selected am using as a backdrop). Can you just change >> >> > it for an existing map or do you have to destroy the map and recreate >> >> > with a the new srs? >> >> >> >> If your backdrop is a base layer, and configured with the right srs, the >> >> map will automatically switch to the srs that is configured for the base >> >> layer. >> > >> > Sort of. Vectors loaded statically won't reproject. >> >> + I think one needs to reconfigure the overlays, i.e. set the >> projection, recalculate min/maxResolution, etc. > > Probably not any more. Most of the time, overlays will be alwaysInRange > these days unless you have specific configurations for min/max scale, > so overlays will always be on; in general, non-vector overlays just take > their projection information from the base layer at draw time, so changing > the base layer projection will cause the raster overlays to change projection Right. But as you said min/maxResolution must be recalculated if max/minScale is set in the layer config. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From rifins at gmail.com Fri Feb 19 12:43:25 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Hide some markers of a OpenLayers.Layer.Marker Message-ID: Hi, I have a couple of markers in a Marker Layer, and I would like to hide some of them.. I've tried to do lyr.markers[i].onScreen=false, or lyr.markers[i].display='none'.. But the markers are still on the map.. How can I hide the desired markers? Thanks!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100219/e9ff0174/attachment.html From johnj.alvarado at hotmail.com Fri Feb 19 14:46:09 2010 From: johnj.alvarado at hotmail.com (johnalvarado) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Multiple invoke by zoom, very bad performance In-Reply-To: <44390.145.50.39.11.1266588432.squirrel@webmail.hostingdiscounter.nl> References: <1266543920276-4595600.post@n2.nabble.com> <4B7E65AF.4020503@terrestris.de> <1266588176862-4597953.post@n2.nabble.com> <44390.145.50.39.11.1266588432.squirrel@webmail.hostingdiscounter.nl> Message-ID: <1266608769425-4599750.post@n2.nabble.com> Thanks Bart, I will look at that, but the problem also happens if I zoom with the zoom tool. Thanks. -- View this message in context: http://n2.nabble.com/Multiple-invoke-by-zoom-very-bad-performance-tp4595600p4599750.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Fri Feb 19 23:22:49 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Error when cumputing attribute value in context for WFS styling In-Reply-To: <1266568364159-4596668.post@n2.nabble.com> References: <1266516300301-4593311.post@n2.nabble.com> <1266568364159-4596668.post@n2.nabble.com> Message-ID: <4B7F6399.5090301@opengeo.org> Zer wrote: > OK, boys and girls, seems like I found the problem after some more hours of > digging in the mud. > > The problem was that I had the js-script inside a JSP-page, and the $ symbol > is interpreted as an expression, i.e. ${field}, which the compiler could not > resolve, resulting in the function returning nothing. > > > A note on the wiki about this might be good? Feel free to add that note on the wiki. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From n13green at gmail.com Sat Feb 20 06:24:27 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <20100219143925.GM8508@metacarta.com> References: <1266445074251-4588879.post@n2.nabble.com> <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> <1266526362000-4594308.post@n2.nabble.com> <1266528357374-4594449.post@n2.nabble.com> <1266531532659-4594754.post@n2.nabble.com> <4B7E96F6.5030806@mapgears.com> <20100219143925.GM8508@metacarta.com> Message-ID: <1266665067367-4602384.post@n2.nabble.com> It's always good to know what options are available, but in this case GeoServer etc. definitely qualify as an unnecessary complication. OL is sufficient for this job. What I needed was this: http://openlayers.org/dev/examples/vector-formats.html and this: http://www.w3schools.com/php/php_ajax_database.asp I've trimmed the code from the vector-formats example down to just geojson. That works nicely. The simple ajax script lets me interact with the database as needed and it's quite easy to convert the geojson string into php variables and vice versa. The only thing I haven't figured out is how to access specific parts of the geojson string within OL. Eg. if you copy this into the vector-formats example above: {"type":"Feature", "id":"OpenLayers.Feature.Vector_107", "properties":{"icon":"icon_1.jpg"}, "geometry":{"type":"Point", "coordinates":[26.015625, 18.6328125]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}} You can see that everything gets pulled into OL by the script. On my own page I can return the id and coordinates via feature.id and feature.geometry.x /y, but so far have had no luck trying to access other parts, eg. "properties":{"icon":"icon_1.jpg"}. Any geojson'ers know how to get at these? -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4602384.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Sat Feb 20 12:07:16 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: <1266665067367-4602384.post@n2.nabble.com> Message-ID: Hi, Try this var theObj = { "type":"Feature", "id":"OpenLayers.Feature.Vector_107", "properties": {"icon":"icon_1.jpg"}, "geometry": {"type":"Point", "coordinates":[26.015625, 18.6328125]}, "crs": {"type":"OGC", "properties": {"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"} } }; alert(theObj["properties"]["icon"] + "\n" + theObj["geometry"]["type"]); or alert(theObj.properties.icon + "\n" + theObj.geometry.type); Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von ngreen Gesendet: Samstag, 20. Februar 2010 12:24 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] OL + database It's always good to know what options are available, but in this case GeoServer etc. definitely qualify as an unnecessary complication. OL is sufficient for this job. What I needed was this: http://openlayers.org/dev/examples/vector-formats.html and this: http://www.w3schools.com/php/php_ajax_database.asp I've trimmed the code from the vector-formats example down to just geojson. That works nicely. The simple ajax script lets me interact with the database as needed and it's quite easy to convert the geojson string into php variables and vice versa. The only thing I haven't figured out is how to access specific parts of the geojson string within OL. Eg. if you copy this into the vector-formats example above: {"type":"Feature", "id":"OpenLayers.Feature.Vector_107", "properties":{"icon":"icon_1.jpg"}, "geometry":{"type":"Point", "coordinates":[26.015625, 18.6328125]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}} You can see that everything gets pulled into OL by the script. On my own page I can return the id and coordinates via feature.id and feature.geometry.x /y, but so far have had no luck trying to access other parts, eg. "properties":{"icon":"icon_1.jpg"}. Any geojson'ers know how to get at these? -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4602384.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From luis.a.de.sousa at gmail.com Sat Feb 20 12:11:13 2010 From: luis.a.de.sousa at gmail.com (=?ISO-8859-1?Q?Lu=EDs_de_Sousa?=) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] work with postgis & geoserver In-Reply-To: <1266594268.6619.36.camel@beppe> References: <1266594268.6619.36.camel@beppe> Message-ID: HI beppe, You have a simple example to add new features with Geoserver. If can find it following: My Geoserver -> Demo -> WFS-T demo this should open a link to geoserver/www/wfs-t.html To edit attributes you can have a look the last example in chapter 4 of OpenGeo's OpenLayers Workshop: http://workshops.opengeo.org/openlayers-intro/vector.html Good luck, Lu?s On Fri, Feb 19, 2010 at 3:44 PM, beppe wrote: > Hi list, > I've a postgis point table (epsg:32632) and I'm using a wfs service > (geoserver) to display it. > Now I'd like to be able to handle it (insert/delete/update/modify) but > I'm a little bit confused!!! > I could start from this [1], but I need also to define/change the > features attributes, something like this [2]. > There is some simple example (easiest than example 2 !) to start? > > Your suggestions are really precious for me > > thanks > > -beppe- > > [1] > http://www.openlayers.org/dev/examples/wfs-protocol-transactions.html > > [2] http://dev4.mapgears.com/bdga/bdgaWFS-T.html > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From eric.lemoine at camptocamp.com Sat Feb 20 13:00:27 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Showing the number features on a cluster marker In-Reply-To: <131155ea1002170112s598dcd52vfd49bc873fd7f99b@mail.gmail.com> References: <131155ea1002170112s598dcd52vfd49bc873fd7f99b@mail.gmail.com> Message-ID: On Wednesday, February 17, 2010, Amritayan Nayak wrote: > Hi, > > I want to show the number of features within a cluster on the clustered marker that replaces the individual points. This functionality is supported by the marker manager provided with Google API. Is there a way of doing it in Openlayers ? cluster features have an attribute named "count", so defining a style with label:"${count}" should do what you want. You can start from the strategy-cluster example, and add the aboe style property. Cheers, Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From n13green at gmail.com Sat Feb 20 16:07:47 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] OL + database In-Reply-To: References: <4B7D4806.2060209@mapgears.com> <1266525004395-4594162.post@n2.nabble.com> <1266525664187-4594242.post@n2.nabble.com> <1266526362000-4594308.post@n2.nabble.com> <1266528357374-4594449.post@n2.nabble.com> <1266531532659-4594754.post@n2.nabble.com> <4B7E96F6.5030806@mapgears.com> <20100219143925.GM8508@metacarta.com> <1266665067367-4602384.post@n2.nabble.com> Message-ID: <1266700067805-4604402.post@n2.nabble.com> Someone replied privately - what I needed was feature.attributes.XXX That will grab anything I define inside the geojson properties {} group. That was the last piece of this puzzle and I can now start building the map! Thanks to all :) -- View this message in context: http://n2.nabble.com/OL-database-tp4588879p4604402.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From johnj.alvarado at hotmail.com Sun Feb 21 00:07:43 2010 From: johnj.alvarado at hotmail.com (johnalvarado) Date: Wed Sep 1 17:18:31 2010 Subject: [OpenLayers-Users] Multiple invoke by zoom, very bad performance In-Reply-To: <1266608769425-4599750.post@n2.nabble.com> References: <1266543920276-4595600.post@n2.nabble.com> <4B7E65AF.4020503@terrestris.de> <1266588176862-4597953.post@n2.nabble.com> <44390.145.50.39.11.1266588432.squirrel@webmail.hostingdiscounter.nl> <1266608769425-4599750.post@n2.nabble.com> Message-ID: <1266728863138-4605642.post@n2.nabble.com> Hi, the "problem" is that openlayers print the image for parts, every part is print in base to BBOX (which is vary) . Exist any form of configurate OpenLayers to print the image completely, not for parts?. Thannks. -- View this message in context: http://n2.nabble.com/Multiple-invoke-by-zoom-very-bad-performance-tp4595600p4605642.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From info.ethio at gmail.com Sun Feb 21 02:39:44 2010 From: info.ethio at gmail.com (ethio info) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Beginner issue Message-ID: <561c16701002202339m65495fd7r27aa545f58d95772@mail.gmail.com> Hi, Please take a look at this site: http://projects.latimes.com/mapping-la/neighborhoods/. I have copied the source and cleaned it up of ads and so forth and have put in my data and I just can not see the overlay on the Google map. I will include the changes I made below. The only thing I can think of that is blocking my overlay is the bounds. Basically, I want the country of Ethiopia. Just to complicate things further, my overlay was showing when I did not use a spherical mercator projection but the overlay matched what is in Google maps ONLY when I zoomed in. so after reading some of the issues some people had, I figured I should use what is in the Mapping LA w/minor changes. Can someone suggest a solution? BTW, the overlay switch works and gives my overlay as a check box option to click on but it is not displayed on the Google map Here are my changes to the Mapping LA Neighborhood source: var max_extent = new OpenLayers.Bounds(860986,-4383204,5870363,3600489); index_map.addControl(new OpenLayers.Control.LayerSwitcher()); var hood_polygon_371 = wkt_f.read('MULTIPOLYGON (((39.2968382026 8.8274792477, 39.3135039775 8.748488041, 39.3016324666 8.742095689, 39.3036871512 8.7357033371, 39.269899005 8.6920983646, 39.2315448931 8.6608214995, 39.2265223308 8.645982111, 39.2479823696 8.6108241751, 39.2249242428 8.589135838, 39.2221846634 8.5756662392, 39.2306316999 8.5656211146, 39.257114301 8.5601419558, 39.2502653525 8.5464440587, 39.2139659251 8.5220161421, 39.1744703218 8.4606039034, 39.0858905871 8.385037171, 39.0758454626 8.3950822956, 39.0381762455 8.399419963, 39.0363498593 8.5128842107, 39.0671701278 8.5432478827, 39.0655720398 8.5562608849, 39.0872603769 8.5968979797, 39.0874886751 8.6528310595, 39.10415445 8.6825098366, 39.0982186945 8.6939247509, 39.1075789242 8.7101339291, 39.1603158281 8.742095689, 39.1840588498 8.7877553461, 39.1767533046 8.8019098398, 39.2014095194 8.8146945437, 39.2057471869 8.8039645243, 39.2199016805 8.8012249449, 39.2461559833 8.8299905288, 39.2710404964 8.8224566854, 39.2968382026 8.8274792477 )))'); hood_polygon_371.data = {'slug':' 371', 'name': '371'}; var hood_polygon_260 = wkt_f.read('MULTIPOLYGON (((39.506872625 9.3384108099, 39.5290175587 9.3116999105, 39.510068801 9.2838475198, 39.522853505 9.2751721849, 39.4963709039 9.2509725667, 39.5105253976 9.2502876718, 39.5089273096 9.2354482833, 39.5290175587 9.2133033496, 39.5598378272 9.2203805965, 39.5456833335 9.1938979954, 39.5376928935 9.1470968469, 39.5771884968 9.0621698849, 39.5447701403 9.0523530586, 39.4872389725 9.0171951227, 39.461212968 9.0137706484, 39.4299361029 9.0452758117, 39.4004856241 9.0596586037, 39.3701219522 9.1025786813, 39.3758294093 9.126321703, 39.3498034048 9.1690134823, 39.2920439386 9.1770039223, 39.281085621 9.1865924503, 39.2514068439 9.2676383415, 39.2509502473 9.3203752454, 39.2584840907 9.3308769665, 39.266702829 9.3265392991, 39.3011758701 9.2909247666, 39.3253754883 9.3107867174, 39.3824500596 9.293664346, 39.434045472 9.3477710396, 39.4589299851 9.3511955139, 39.506872625 9.3384108099 )))'); hood_polygon_260.data = {'slug':' 260', 'name': '260'}; var hood_vector = new OpenLayers.Layer.Vector("Wereda"); (hood_vector.addFeatures([hood_polygon_260,hood_polygon_371); var lon = 4387103; var lat = 1007363; var zoom = 0; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100221/749986ce/attachment.html From n.e.kendall at gmail.com Sun Feb 21 11:40:45 2010 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Beginner issue In-Reply-To: <561c16701002202339m65495fd7r27aa545f58d95772@mail.gmail.com> References: <561c16701002202339m65495fd7r27aa545f58d95772@mail.gmail.com> Message-ID: <33fd44f91002210840s1a7c2200k4e7be079f04c9@mail.gmail.com> you really need to post more code than that for someone to be able to help you. Are you using proj4.js to change your projection? OL only uses a few projections/coordinate systems natively. On Sun, Feb 21, 2010 at 2:39 AM, ethio info wrote: > Hi, Please take a look at this site: > http://projects.latimes.com/mapping-la/neighborhoods/. > I have copied the source and cleaned it up of ads and so forth and have put > in my data and I just can not see the overlay on the Google map. > I will include the changes I made below. The only thing I can think of > that is blocking my overlay is the bounds. Basically, I want the country of > Ethiopia. > Just to complicate things further, my overlay was showing when I did not > use a spherical mercator projection but the overlay matched what is in > Google maps ONLY when I zoomed in. > so after reading some of the issues some people had, I figured I should use > what is in the Mapping LA w/minor changes. > Can someone suggest a solution? BTW, the overlay switch works and gives my > overlay as a check box option to click on but it is not displayed on the > Google map > Here are my changes to the Mapping LA Neighborhood source: > > var max_extent = new OpenLayers.Bounds(860986,-4383204,5870363,3600489); > index_map.addControl(new OpenLayers.Control.LayerSwitcher()); > > var hood_polygon_371 = wkt_f.read('MULTIPOLYGON (((39.2968382026 > 8.8274792477, 39.3135039775 8.748488041, 39.3016324666 8.742095689, > 39.3036871512 8.7357033371, 39.269899005 8.6920983646, > 39.2315448931 8.6608214995, 39.2265223308 8.645982111, > 39.2479823696 8.6108241751, 39.2249242428 8.589135838, > 39.2221846634 8.5756662392, 39.2306316999 8.5656211146, > 39.257114301 8.5601419558, 39.2502653525 8.5464440587, > 39.2139659251 8.5220161421, 39.1744703218 8.4606039034, > 39.0858905871 8.385037171, 39.0758454626 8.3950822956, > 39.0381762455 8.399419963, 39.0363498593 8.5128842107, > 39.0671701278 8.5432478827, 39.0655720398 8.5562608849, > 39.0872603769 8.5968979797, 39.0874886751 8.6528310595, 39.10415445 > 8.6825098366, 39.0982186945 8.6939247509, 39.1075789242 8.7101339291, > 39.1603158281 8.742095689, 39.1840588498 8.7877553461, > 39.1767533046 8.8019098398, 39.2014095194 8.8146945437, > 39.2057471869 8.8039645243, 39.2199016805 8.8012249449, > 39.2461559833 8.8299905288, 39.2710404964 8.8224566854, > 39.2968382026 8.8274792477 )))'); > hood_polygon_371.data = {'slug':' 371', 'name': '371'}; > > var hood_polygon_260 = wkt_f.read('MULTIPOLYGON (((39.506872625 > 9.3384108099, 39.5290175587 9.3116999105, 39.510068801 9.2838475198, > 39.522853505 9.2751721849, 39.4963709039 9.2509725667, > 39.5105253976 9.2502876718, 39.5089273096 9.2354482833, > 39.5290175587 9.2133033496, 39.5598378272 9.2203805965, > 39.5456833335 9.1938979954, 39.5376928935 9.1470968469, > 39.5771884968 9.0621698849, 39.5447701403 9.0523530586, > 39.4872389725 9.0171951227, 39.461212968 9.0137706484, > 39.4299361029 9.0452758117, 39.4004856241 9.0596586037, > 39.3701219522 9.1025786813, 39.3758294093 9.126321703, > 39.3498034048 9.1690134823, 39.2920439386 9.1770039223, > 39.281085621 9.1865924503, 39.2514068439 9.2676383415, > 39.2509502473 9.3203752454, 39.2584840907 9.3308769665, > 39.266702829 9.3265392991, 39.3011758701 9.2909247666, > 39.3253754883 9.3107867174, 39.3824500596 9.293664346, 39.434045472 > 9.3477710396, 39.4589299851 9.3511955139, 39.506872625 9.3384108099 > )))'); > hood_polygon_260.data = {'slug':' 260', 'name': '260'}; > var hood_vector = new OpenLayers.Layer.Vector("Wereda"); > (hood_vector.addFeatures([hood_polygon_260,hood_polygon_371); > var lon = 4387103; > var lat = 1007363; > var zoom = 0; > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100221/8b7a029b/attachment.html From joepub1962 at gmail.com Sun Feb 21 13:55:35 2010 From: joepub1962 at gmail.com (Joe Public) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Newbie questions Message-ID: <1266778535164-4608007.post@n2.nabble.com> Hi Folks!! I've be tasked with creating a demo to show the powers that be how we can use GIS to present and analyze that data they collect.... I made the decision the go fully open source... I am really new to the OpenGIS world and having fun and learned a lot in a real short time.... Now I a bit stuck.... and hopefully my questions are easy enough for someone in this forum can answer.... A little background... I have 3 shape files of a land mass 1. a base shape file that is just an outline of the area with no attributes 2. a shape file that shows the land mass as a set of parcels with attribute data 3. a shape file that further divides the parcels (2nd shape file) into smaller pieces or lots Using postgres/postGIS, groserver and openlayer, I have been successful in displaying the 3 shape files in my web browser... One overlaying of the other (base layer -> parcels layer -> lots layer) I was able use the getfeatureinfo to show attribute data in a pop box The problem I'm having is: when I click on the map, I get "info" for the base layer (which is blank of course) and the other layer(s) if they are checked.... So my question: is there a way to make it so that when I click on the map, only info the top most layer appears in the popup box? Also, if you click on the base layer (the other layers are un-checked) the popup box does not show up My other issue: I have data that was collected on various things about the parcels and lots... This data is stored in tables in the database.... The only links these tables/data have with the shape files are the name and id variables.... Question: Is there a way to include info from the tables in the pop display along with the getfeatureinfo information when I click on the map? Thanks -- View this message in context: http://n2.nabble.com/Newbie-questions-tp4608007p4608007.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rmarianski at openplans.org Sun Feb 21 13:59:26 2010 From: rmarianski at openplans.org (Robert Marianski) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] click/hover select controls on one layer In-Reply-To: <4B7D8095.8030901@opengeo.org> References: <20100218163222.GB2684@openplans.org> <4B7D7DE6.30900@opengeo.org> <4B7D8095.8030901@opengeo.org> Message-ID: <20100221185926.GA2252@openplans.org> On Thu, Feb 18, 2010 at 07:01:57PM +0100, Andreas Hocevar wrote: > Andreas Hocevar wrote: > >Hi Rob, > > > >Robert Marianski wrote: > >>I want to be able to handle both hover and click events on features in a > >>vector layer. I created two select controls, one with hover set to true, > >>added them to the layer, and activated them. > >> > >>What I'm seeing is that the click select control doesn't receive any of > >>featured selected events, but the hover select control does receive the > >>hover events. If I don't add the hover select control but only the click > >>select control, then I do receive all the click events. > > > >This is because by default, hovering over a feature also selects > >it. You can change that easily by configuring the one that you use > >for hover with > > > >highlightOnly: true > > Meaning, configure the SelectFeature control that you use for hovering with: > > { > hover: true, > highlightOnly: true > } > > Regards, > Andreas. > > > >Hope this helps, > >Andreas. I gave that a shot, but it didn't work for me. I've created a simple example below to reproduce the issue I'm seeing. I've tried it both with the current nightly version of openlayers, as well as this one: http://openlayers.org/api/OpenLayers.js When the hover event gets called, it looks like there aren't any selected features, regardless of whether I have the highlightOnly option set or not. Thoughts? Thanks, Robert
From ahocevar at opengeo.org Sun Feb 21 14:45:47 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] click/hover select controls on one layer In-Reply-To: <20100221185926.GA2252@openplans.org> References: <20100218163222.GB2684@openplans.org> <4B7D7DE6.30900@opengeo.org> <4B7D8095.8030901@opengeo.org> <20100221185926.GA2252@openplans.org> Message-ID: <4B818D6B.2080401@opengeo.org> Hi Rob, you have run into a common OpenLayers annoyance: controls with mouse handlers involved have different behavior, depending on the order they are added, activated. To make your example work, you just have to change the order of your SelectFeature controls to look like this: //* map.addControl(selectControlHover); selectControlHover.activate(); /**/ map.addControl(selectControlClicks); selectControlClicks.activate(); Regards, Andreas. Robert Marianski wrote: > On Thu, Feb 18, 2010 at 07:01:57PM +0100, Andreas Hocevar wrote: >> Andreas Hocevar wrote: >>> Hi Rob, >>> >>> Robert Marianski wrote: >>>> I want to be able to handle both hover and click events on features in a >>>> vector layer. I created two select controls, one with hover set to true, >>>> added them to the layer, and activated them. >>>> >>>> What I'm seeing is that the click select control doesn't receive any of >>>> featured selected events, but the hover select control does receive the >>>> hover events. If I don't add the hover select control but only the click >>>> select control, then I do receive all the click events. >>> This is because by default, hovering over a feature also selects >>> it. You can change that easily by configuring the one that you use >>> for hover with >>> >>> highlightOnly: true >> Meaning, configure the SelectFeature control that you use for hovering with: >> >> { >> hover: true, >> highlightOnly: true >> } >> >> Regards, >> Andreas. >>> Hope this helps, >>> Andreas. > > I gave that a shot, but it didn't work for me. I've created a simple > example below to reproduce the issue I'm seeing. I've tried it both with > the current nightly version of openlayers, as well as this one: > http://openlayers.org/api/OpenLayers.js > > When the hover event gets called, it looks like there aren't any > selected features, regardless of whether I have the highlightOnly option > set or not. Thoughts? > > Thanks, > Robert > > > > >
> > > > > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From info.ethio at gmail.com Sun Feb 21 16:23:21 2010 From: info.ethio at gmail.com (ethio info) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Beginner issue In-Reply-To: <33fd44f91002210840s1a7c2200k4e7be079f04c9@mail.gmail.com> References: <561c16701002202339m65495fd7r27aa545f58d95772@mail.gmail.com> <33fd44f91002210840s1a7c2200k4e7be079f04c9@mail.gmail.com> Message-ID: <561c16701002211323m2a546dbbg15301749afb82e5e@mail.gmail.com> I understand what you are saying but my previous request was rejected because it was over the size limit. Here it is:

Woreda's

Select one of the 583 woreda's

On Sun, Feb 21, 2010 at 10:40 AM, Nicholas Efremov-Kendall < n.e.kendall@gmail.com> wrote: > you really need to post more code than that for someone to be able to help > you. Are you using proj4.js to change your projection? OL only uses a few > projections/coordinate systems natively. > > On Sun, Feb 21, 2010 at 2:39 AM, ethio info wrote: > >> Hi, Please take a look at this site: >> http://projects.latimes.com/mapping-la/neighborhoods/. >> I have copied the source and cleaned it up of ads and so forth and have >> put in my data and I just can not see the overlay on the Google map. >> I will include the changes I made below. The only thing I can think of >> that is blocking my overlay is the bounds. Basically, I want the country of >> Ethiopia. >> Just to complicate things further, my overlay was showing when I did not >> use a spherical mercator projection but the overlay matched what is in >> Google maps ONLY when I zoomed in. >> so after reading some of the issues some people had, I figured I should >> use what is in the Mapping LA w/minor changes. >> Can someone suggest a solution? BTW, the overlay switch works and gives >> my overlay as a check box option to click on but it is not displayed on the >> Google map >> Here are my changes to the Mapping LA Neighborhood source: >> >> var max_extent = new OpenLayers.Bounds(860986,-4383204,5870363,3600489); >> index_map.addControl(new OpenLayers.Control.LayerSwitcher()); >> >> var hood_polygon_371 = wkt_f.read('MULTIPOLYGON (((39.2968382026 >> 8.8274792477, 39.3135039775 8.748488041, 39.3016324666 8.742095689, >> 39.3036871512 8.7357033371, 39.269899005 8.6920983646, >> 39.2315448931 8.6608214995, 39.2265223308 8.645982111, >> 39.2479823696 8.6108241751, 39.2249242428 8.589135838, >> 39.2221846634 8.5756662392, 39.2306316999 8.5656211146, >> 39.257114301 8.5601419558, 39.2502653525 8.5464440587, >> 39.2139659251 8.5220161421, 39.1744703218 8.4606039034, >> 39.0858905871 8.385037171, 39.0758454626 8.3950822956, >> 39.0381762455 8.399419963, 39.0363498593 8.5128842107, >> 39.0671701278 8.5432478827, 39.0655720398 8.5562608849, >> 39.0872603769 8.5968979797, 39.0874886751 8.6528310595, 39.10415445 >> 8.6825098366, 39.0982186945 8.6939247509, 39.1075789242 8.7101339291, >> 39.1603158281 8.742095689, 39.1840588498 8.7877553461, >> 39.1767533046 8.8019098398, 39.2014095194 8.8146945437, >> 39.2057471869 8.8039645243, 39.2199016805 8.8012249449, >> 39.2461559833 8.8299905288, 39.2710404964 8.8224566854, >> 39.2968382026 8.8274792477 )))'); >> hood_polygon_371.data = {'slug':' 371', 'name': '371'}; >> >> var hood_polygon_260 = wkt_f.read('MULTIPOLYGON (((39.506872625 >> 9.3384108099, 39.5290175587 9.3116999105, 39.510068801 9.2838475198, >> 39.522853505 9.2751721849, 39.4963709039 9.2509725667, >> 39.5105253976 9.2502876718, 39.5089273096 9.2354482833, >> 39.5290175587 9.2133033496, 39.5598378272 9.2203805965, >> 39.5456833335 9.1938979954, 39.5376928935 9.1470968469, >> 39.5771884968 9.0621698849, 39.5447701403 9.0523530586, >> 39.4872389725 9.0171951227, 39.461212968 9.0137706484, >> 39.4299361029 9.0452758117, 39.4004856241 9.0596586037, >> 39.3701219522 9.1025786813, 39.3758294093 9.126321703, >> 39.3498034048 9.1690134823, 39.2920439386 9.1770039223, >> 39.281085621 9.1865924503, 39.2514068439 9.2676383415, >> 39.2509502473 9.3203752454, 39.2584840907 9.3308769665, >> 39.266702829 9.3265392991, 39.3011758701 9.2909247666, >> 39.3253754883 9.3107867174, 39.3824500596 9.293664346, 39.434045472 >> 9.3477710396, 39.4589299851 9.3511955139, 39.506872625 9.3384108099 >> )))'); >> hood_polygon_260.data = {'slug':' 260', 'name': '260'}; >> var hood_vector = new OpenLayers.Layer.Vector("Wereda"); >> (hood_vector.addFeatures([hood_polygon_260,hood_polygon_371); >> var lon = 4387103; >> var lat = 1007363; >> var zoom = 0; >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > Nicholas Efremov-Kendall > Fulbright Student 2009-2010, Ukraine > nefremov@artsci.wustl.edu > c/o Halyna Yerko > Balzaka 92a, Kv 27 > 02232 > Kyiv, Ukraine > (mob) +380963576524 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100221/911017a2/attachment.html From ijturton at gmail.com Sun Feb 21 18:16:56 2010 From: ijturton at gmail.com (Ian Turton) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Newbie questions In-Reply-To: <1266778535164-4608007.post@n2.nabble.com> References: <1266778535164-4608007.post@n2.nabble.com> Message-ID: On Sun, Feb 21, 2010 at 1:55 PM, Joe Public wrote: > > The problem I'm having is: when I click on the map, I get "info" for the > base layer (which is blank of course) and the other layer(s) if they are > checked.... > So my question: is there a way to make it so that when I click on the map, > only info the top most layer appears in the popup box? Also, if you click on > the base layer (the other layers are un-checked) the popup box does not show > up Look at the list of layers in your getfeatureInfo request - just remove the layers you don't want to show up. > > My other issue: > > I have data that was collected on various things about the parcels and > lots... This data is stored in > tables in the database.... The only links these tables/data have with the > shape files are ?the name and id variables.... > Question: Is there a way to include info from the tables in the pop display > along with the getfeatureinfo information when I click on the map? > You'll need to load the shapefiles in to PostGIS and then create a view of the joined tables. http://geoserver.org/display/GEOSDOC/PostGIS+DataStore shows how to do this. Ian -- Ian Turton Sent from Altoona, PA, United States From joepub1962 at gmail.com Sun Feb 21 19:44:24 2010 From: joepub1962 at gmail.com (Joe Public) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Newbie questions In-Reply-To: References: <1266778535164-4608007.post@n2.nabble.com> Message-ID: <1266799464682-4609543.post@n2.nabble.com> Ian: Thanks for pointing me in the right direction.... The folks in open source rocks!!! -- View this message in context: http://n2.nabble.com/Newbie-questions-tp4608007p4609543.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From joepub1962 at gmail.com Sun Feb 21 22:22:31 2010 From: joepub1962 at gmail.com (Joe Public) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Newbie questions In-Reply-To: <1266799464682-4609543.post@n2.nabble.com> References: <1266778535164-4608007.post@n2.nabble.com> <1266799464682-4609543.post@n2.nabble.com> Message-ID: <1266808951449-4610023.post@n2.nabble.com> Ok... I've been looking at my openlayer script and I am at a loss since I have little knowledge of Javascript So I am not sure how do as Ian suggested i.e.to check the layers being queried in the getfeatureinfo section of my script.... I hoping someone on here can tell me what I can tell it to only look at the layers that sit on top of the base layer... Thanks Here is the snippet for the popup.... info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://tobagoborn.com:8080/geoserver/wms', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } }); map.addControl(info); info.activate(); -- View this message in context: http://n2.nabble.com/Newbie-questions-tp4608007p4610023.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jb_adams at verizon.net Sun Feb 21 23:07:49 2010 From: jb_adams at verizon.net (J. Brian Adams) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Map doesn't load in Internet Explorer In-Reply-To: <20100209205939.GA24279@metacarta.com> References: <1C19AEE4-8EB4-4A58-AC9B-14E3E3AD7FB5@verizon.net> <20100209205939.GA24279@metacarta.com> Message-ID: Thanks for your help. After scrutinizing my code I realized that this was not a problem with OpenLayers as such. Instead it was the issue mentioned (about extraneous punctuation.) but it was that I had an extra semi colon on the last line of each group in my style sheets. Brian On Feb 9, 2010, at 3:59 PM, Christopher Schmidt wrote: > On Tue, Feb 09, 2010 at 03:50:02PM -0500, J. Brian Adams wrote: >> I have written several OL applications that work well on OS X using >> Firefox, Safari, and Chrome, but when I pass them on to colleagues >> using Windows and IE they all say the same thing. The maps do not >> load >> at all. They do, however, work fine on Windows if we use one of the >> other browsers. >> >> i checked this behavior on a borrowed PC away from the office and yes >> the maps do not load at all. >> >> Any thoughts on specific IE problems that might cause this type of >> behavior? > > OL.Layer("I see this", {'all': 'the', 'time': '(extra_comma)',}); > > map.addLayers([this,too,]); > > IE doesn't support trailing commas in lists or hashes, however, if > your > code works on Safari, you're likely already not doing that. > > Other than those obvious issues, you'll need an IE debugger (Visual > Studio > 2008 works great, but costs money) to find more complex errors. > > Regards, > -- > Christopher Schmidt > MetaCarta From antoni.vidal at icc.cat Mon Feb 22 02:55:16 2010 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] 2 loadurl request in parallel In-Reply-To: <1266588618.3106.15.camel@ushuaia> References: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> <1266588618.3106.15.camel@ushuaia> Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D674D@CORRIOL.icc.local> I need to parse a huge json response (4 MB), trying this, browsers break down. My intention is to make "tiling" of the original request in 2 or more request getting smaller response. I think this is more efficient and faster. What do you think? Antoni Vidal Unitat d'Aplicacions SIG-WEB Ext.?3228 -----Missatge original----- De: Jorge Gustavo Rocha [mailto:jgr@di.uminho.pt] Enviat: viernes, 19 de febrero de 2010 15:10 Per a: Vidal, Antoni A/c: users@openlayers.org Tema: Re: [OpenLayers-Users] 2 loadurl request in parallel Hi Antoni, Yes, you can make any number of AJAX requests. They are, by definition, asynchronous. If you do several different requests, and you need to collect all the results, for example, you need to add some logic, to know how many requests have already finished, and do something at the end of the last callback. Please explain you question a little bit further, to find allow a better answer. I really don't know what do you want to do. regards, jorge Sex, 2010-02-19 ?s 14:58 +0100, Vidal, Antoni escreveu: > Hello list, > > > > I need to make 2 ajax request at the same time. Is this possible? > > > > Antoni Vidal > > Unitat d'Aplicacions SIG-WEB > Institut Cartogr?fic de Catalunya > Parc de Montju?c, E-08038 Barcelona > Tel. (+34) 93 567 15 00 (ext. 3228) > www.icc.cat > > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- jorge gustavo rocha departamento de inform?tica universidade do minho 4710-057 braga portugal N 41?33'44,5" W 8?23'40,5" tel +351 253604470 fax +351 253604471 cel +351 927210173 From zac.spitzer at gmail.com Mon Feb 22 02:59:21 2010 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] 2 loadurl request in parallel In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D674D@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> <1266588618.3106.15.camel@ushuaia> <784FAC631C0CB14CAE68764151D5DA41081D674D@CORRIOL.icc.local> Message-ID: <7a85053e1002212359g354431d0ua5b453a681f26849@mail.gmail.com> filter your json server side first, 4MB is still 4MB breaking the requests up won't help that much you'd be better of using a mapping server On Mon, Feb 22, 2010 at 6:55 PM, Vidal, Antoni wrote: > I need to parse a huge json response (4 MB), trying this, browsers break down. My intention is to make "tiling" of the original request in 2 or more request getting smaller response. > > I think this is more efficient and faster. > > What do you think? > > Antoni Vidal > Unitat d'Aplicacions SIG-WEB > Ext.?3228 > > -----Missatge original----- > De: Jorge Gustavo Rocha [mailto:jgr@di.uminho.pt] > Enviat: viernes, 19 de febrero de 2010 15:10 > Per a: Vidal, Antoni > A/c: users@openlayers.org > Tema: Re: [OpenLayers-Users] 2 loadurl request in parallel > > Hi Antoni, > > Yes, you can make any number of AJAX requests. They are, by definition, asynchronous. If you do several different requests, and you need to collect all the results, for example, you need to add some logic, to know how many requests have already finished, and do something at the end of the last callback. > > Please explain you question a little bit further, to find allow a better answer. I really don't know what do you want to do. > > regards, > > jorge > > Sex, 2010-02-19 ?s 14:58 +0100, Vidal, Antoni escreveu: >> Hello list, >> >> >> >> I need to make 2 ajax request at the same time. Is this possible? >> >> >> >> Antoni Vidal >> >> Unitat d'Aplicacions SIG-WEB >> Institut Cartogr?fic de Catalunya >> Parc de Montju?c, E-08038 Barcelona >> Tel. (+34) 93 567 15 00 (ext. 3228) >> www.icc.cat >> >> >> >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > > -- > jorge gustavo rocha > departamento de inform?tica > universidade do minho > 4710-057 braga > portugal > N 41?33'44,5" W 8?23'40,5" > tel +351 253604470 fax +351 253604471 cel +351 927210173 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 From antoni.vidal at icc.cat Mon Feb 22 03:01:41 2010 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] 2 loadurl request in parallel In-Reply-To: <7a85053e1002212359g354431d0ua5b453a681f26849@mail.gmail.com> References: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> <1266588618.3106.15.camel@ushuaia> <784FAC631C0CB14CAE68764151D5DA41081D674D@CORRIOL.icc.local> <7a85053e1002212359g354431d0ua5b453a681f26849@mail.gmail.com> Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D674E@CORRIOL.icc.local> I cannot filter data in server side. Is necesary to make complete request to get all data. Antoni Vidal Unitat d'Aplicacions SIG-WEB Ext.?3228 -----Missatge original----- De: Zac Spitzer [mailto:zac.spitzer@gmail.com] Enviat: lunes, 22 de febrero de 2010 8:59 Per a: Vidal, Antoni A/c: Jorge Gustavo Rocha; users@openlayers.org Tema: Re: [OpenLayers-Users] 2 loadurl request in parallel filter your json server side first, 4MB is still 4MB breaking the requests up won't help that much you'd be better of using a mapping server On Mon, Feb 22, 2010 at 6:55 PM, Vidal, Antoni wrote: > I need to parse a huge json response (4 MB), trying this, browsers break down. My intention is to make "tiling" of the original request in 2 or more request getting smaller response. > > I think this is more efficient and faster. > > What do you think? > > Antoni Vidal > Unitat d'Aplicacions SIG-WEB > Ext.?3228 > > -----Missatge original----- > De: Jorge Gustavo Rocha [mailto:jgr@di.uminho.pt] > Enviat: viernes, 19 de febrero de 2010 15:10 > Per a: Vidal, Antoni > A/c: users@openlayers.org > Tema: Re: [OpenLayers-Users] 2 loadurl request in parallel > > Hi Antoni, > > Yes, you can make any number of AJAX requests. They are, by definition, asynchronous. If you do several different requests, and you need to collect all the results, for example, you need to add some logic, to know how many requests have already finished, and do something at the end of the last callback. > > Please explain you question a little bit further, to find allow a better answer. I really don't know what do you want to do. > > regards, > > jorge > > Sex, 2010-02-19 ?s 14:58 +0100, Vidal, Antoni escreveu: >> Hello list, >> >> >> >> I need to make 2 ajax request at the same time. Is this possible? >> >> >> >> Antoni Vidal >> >> Unitat d'Aplicacions SIG-WEB >> Institut Cartogr?fic de Catalunya >> Parc de Montju?c, E-08038 Barcelona >> Tel. (+34) 93 567 15 00 (ext. 3228) >> www.icc.cat >> >> >> >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > > -- > jorge gustavo rocha > departamento de inform?tica > universidade do minho > 4710-057 braga > portugal > N 41?33'44,5" W 8?23'40,5" > tel +351 253604470 fax +351 253604471 cel +351 927210173 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 From antoni.vidal at icc.cat Mon Feb 22 03:02:30 2010 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] 2 loadurl request in parallel In-Reply-To: <20100219141734.GL8508@metacarta.com> References: <784FAC631C0CB14CAE68764151D5DA41081D674C@CORRIOL.icc.local> <20100219141734.GL8508@metacarta.com> Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D674F@CORRIOL.icc.local> Hi, Two request to the same server and service in parallel. Thanks. Antoni Vidal Unitat d'Aplicacions SIG-WEB Ext.?3228 -----Missatge original----- De: Christopher Schmidt [mailto:crschmidt@metacarta.com] Enviat: viernes, 19 de febrero de 2010 15:18 Per a: Vidal, Antoni A/c: users@openlayers.org Tema: Re: [OpenLayers-Users] 2 loadurl request in parallel On Fri, Feb 19, 2010 at 02:58:15PM +0100, Vidal, Antoni wrote: > Hello list, > > > > I need to make 2 ajax request at the same time. Is this possible? Depending on your definition of 'same time', probably. -- Chris > > > Antoni Vidal > > Unitat d'Aplicacions SIG-WEB > Institut Cartogr?fic de Catalunya > Parc de Montju?c, E-08038 Barcelona > Tel. (+34) 93 567 15 00 (ext. 3228) > www.icc.cat > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From rifins at gmail.com Mon Feb 22 03:46:28 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Hide markers of a Marker layer.. Message-ID: Hi, I want to hide some of the markers of a marker layer, but not all of them.. I'm doing lyr.markers[i].setOpacity(0); but the marker is still there, and if i click in the zone, the popup is shown.. What is the best way to hide markes of a layer? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100222/7b4cd32c/attachment.html From rifins at gmail.com Mon Feb 22 03:51:49 2010 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] arrow heads in a line.. Message-ID: Hi, I'm defining a line in the map, adding points to a pointlist.. var linearRing = new OpenLayers.Geometry.LinearRing(pointList); var polygonFeature = new OpenLayers.Feature.Vector(linearRing, null, style_poly); But, is there any way to create the line with arrow heads showing the direction of the line? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100222/99b19fe9/attachment.html From kgeusebroek at xebia.com Mon Feb 22 05:17:04 2010 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] arrow heads in a line.. In-Reply-To: References: Message-ID: Hi, There is a blog about this on the geoserver blog. http://blog.geoserver.org/2009/04/02/follow-the-arrows/ Hope this is of use to you Cheers Kris From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of JuKiM Sent: Monday, February 22, 2010 9:52 AM To: users@openlayers.org Subject: [OpenLayers-Users] arrow heads in a line.. Hi, I'm defining a line in the map, adding points to a pointlist.. var linearRing = new OpenLayers.Geometry.LinearRing(pointList); var polygonFeature = new OpenLayers.Feature.Vector(linearRing, null, style_poly); But, is there any way to create the line with arrow heads showing the direction of the line? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100222/eca0cda0/attachment.html From chris.green at ibstv.co.uk Mon Feb 22 06:12:12 2010 From: chris.green at ibstv.co.uk (Chris Green) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] WMSGetFeatureInfo not firing In-Reply-To: References: Message-ID: <1266837132108-4611415.post@n2.nabble.com> Hi Puneet Just want to thank you for posting the solution to your problem. I had exactly the same thing and like you spent many hours trying to fix it before finally stumbling across your second post. Furthermore my heartfelt support for your plea for better documentation. I have spent about 3 weeks now alternating between joy and despair as each new setback can take so many hours of digging before being resolved. There must be so many people who just give up in frustration. Someone could make real money by writing a book about this...? Chris -- View this message in context: http://n2.nabble.com/WMSGetFeatureInfo-not-firing-tp3677952p4611415.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From robhyx at gmail.com Mon Feb 22 10:16:10 2010 From: robhyx at gmail.com (Robert Hicks) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Changing the width of the LayerSwitcher? Message-ID: Hey all, is there an easy way to do this? I tried the plain old CSS approach by referencing the class name(s): div.olControlLayerSwitcher { width: 250px; } div.olControlNoSelect { width: 250px; } But no luck. I also tried maximizeDiv:true in the objects constructor but no changes. Ideas? -- web http://www.hyxspace.com aim hyx1138 From rmarianski at openplans.org Mon Feb 22 10:53:26 2010 From: rmarianski at openplans.org (Robert Marianski) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] click/hover select controls on one layer In-Reply-To: <4B818D6B.2080401@opengeo.org> References: <20100218163222.GB2684@openplans.org> <4B7D7DE6.30900@opengeo.org> <4B7D8095.8030901@opengeo.org> <20100221185926.GA2252@openplans.org> <4B818D6B.2080401@opengeo.org> Message-ID: <20100222155326.GB2767@openplans.org> On Sun, Feb 21, 2010 at 02:45:47PM -0500, Andreas Hocevar wrote: > Hi Rob, > > you have run into a common OpenLayers annoyance: controls with mouse > handlers involved have different behavior, depending on the order > they are added, activated. To make your example work, you just have > to change the order of your SelectFeature controls to look like > this: > > //* > map.addControl(selectControlHover); > selectControlHover.activate(); > /**/ > > map.addControl(selectControlClicks); > selectControlClicks.activate(); > > > Regards, > Andreas. That indeed worked for me. Thanks! Robert > Robert Marianski wrote: > >On Thu, Feb 18, 2010 at 07:01:57PM +0100, Andreas Hocevar wrote: > >>Andreas Hocevar wrote: > >>>Hi Rob, > >>> > >>>Robert Marianski wrote: > >>>>I want to be able to handle both hover and click events on features in a > >>>>vector layer. I created two select controls, one with hover set to true, > >>>>added them to the layer, and activated them. > >>>> > >>>>What I'm seeing is that the click select control doesn't receive any of > >>>>featured selected events, but the hover select control does receive the > >>>>hover events. If I don't add the hover select control but only the click > >>>>select control, then I do receive all the click events. > >>>This is because by default, hovering over a feature also selects > >>>it. You can change that easily by configuring the one that you use > >>>for hover with > >>> > >>>highlightOnly: true > >>Meaning, configure the SelectFeature control that you use for hovering with: > >> > >>{ > >> hover: true, > >> highlightOnly: true > >>} > >> > >>Regards, > >>Andreas. > >>>Hope this helps, > >>>Andreas. > > > >I gave that a shot, but it didn't work for me. I've created a simple > >example below to reproduce the issue I'm seeing. I've tried it both with > >the current nightly version of openlayers, as well as this one: > >http://openlayers.org/api/OpenLayers.js > > > >When the hover event gets called, it looks like there aren't any > >selected features, regardless of whether I have the highlightOnly option > >set or not. Thoughts? > > > >Thanks, > >Robert > > > > > > > > > >
> > > > > > > > > > > > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. From ahocevar at opengeo.org Mon Feb 22 11:18:20 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Changing the width of the LayerSwitcher? In-Reply-To: References: Message-ID: <4B82AE4C.1020503@opengeo.org> Robert Hicks wrote: > Hey all, is there an easy way to do this? I tried the plain old CSS > approach by referencing the class name(s): > > div.olControlLayerSwitcher { > width: 250px; > } > div.olControlNoSelect { > width: 250px; > } > > But no luck. I also tried maximizeDiv:true in the objects constructor > but no changes. Ideas? The above (for .olControlLayerSwitcher) should work if you are using the current trunk version, and include theme/default/style.css before the above declarations. If you are still using OpenLayers 2.8, you can try to make the width declaration of .olControlLayerSwitcher !important. Regards, Andreas. > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From bjorn at thematicmapping.org Mon Feb 22 14:14:55 2010 From: bjorn at thematicmapping.org (=?ISO-8859-1?Q?Bj=F8rn_Sandvik?=) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] GeoRSS layer - how to change link target? Message-ID: <2e99535e1002221114o5c4dabe0saaa81d94fc2c623c@mail.gmail.com> Hi, The default behavior of OpenLayers.Layer.GeoRSS is to open links shown in marker popups in a new browser window (target="_blank"). This seems to be hardcoded GeoRSS.js (line 203): http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer/GeoRSS.js Is it possible to change this behavior? I would like all links to open in the same browser window. Bj?rn -- http://blog.thematicmapping.org From mario1982 at libero.it Mon Feb 22 15:04:16 2010 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click Message-ID: Hi, I'm working on drawFeature.js and Path.js for drawing feature such as lines and polygons. How can I handle right mouse click during the feature drawing? My goal is to find a way to undo the current feature by right mouse clicking. Thank you for your help. Regards, Mario From mario1982 at libero.it Mon Feb 22 15:05:53 2010 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click Message-ID: Hi, I'm working on drawFeature.js and Path.js for drawing feature such as lines and polygons. How can I handle right mouse click during the feature drawing? My goal is to find a way to undo the current feature by right mouse clicking. Thank you for your help. Regards, Mario From mario1982 at libero.it Mon Feb 22 15:05:55 2010 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click Message-ID: Hi, I'm working on drawFeature.js and Path.js for drawing feature such as lines and polygons. How can I handle right mouse click during the feature drawing? My goal is to find a way to undo the current feature by right mouse clicking. Thank you for your help. Regards, Mario From mario1982 at libero.it Mon Feb 22 15:05:57 2010 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click Message-ID: Hi, I'm working on drawFeature.js and Path.js for drawing feature such as lines and polygons. How can I handle right mouse click during the feature drawing? My goal is to find a way to undo the current feature by right mouse clicking. Thank you for your help. Regards, Mario From mario1982 at libero.it Mon Feb 22 15:05:58 2010 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click Message-ID: Hi, I'm working on drawFeature.js and Path.js for drawing feature such as lines and polygons. How can I handle right mouse click during the feature drawing? My goal is to find a way to undo the current feature by right mouse clicking. Thank you for your help. Regards, Mario From mario1982 at libero.it Mon Feb 22 15:06:00 2010 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click Message-ID: Hi, I'm working on drawFeature.js and Path.js for drawing feature such as lines and polygons. How can I handle right mouse click during the feature drawing? My goal is to find a way to undo the current feature by right mouse clicking. Thank you for your help. Regards, Mario From mario1982 at libero.it Mon Feb 22 15:06:01 2010 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click Message-ID: Hi, I'm working on drawFeature.js and Path.js for drawing feature such as lines and polygons. How can I handle right mouse click during the feature drawing? My goal is to find a way to undo the current feature by right mouse clicking. Thank you for your help. Regards, Mario From mario1982 at libero.it Mon Feb 22 15:06:03 2010 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click Message-ID: Hi, I'm working on drawFeature.js and Path.js for drawing feature such as lines and polygons. How can I handle right mouse click during the feature drawing? My goal is to find a way to undo the current feature by right mouse clicking. Thank you for your help. Regards, Mario From plablo09 at gmail.com Mon Feb 22 21:56:33 2010 From: plablo09 at gmail.com (pablo lopez) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Newbie questions In-Reply-To: <1266808951449-4610023.post@n2.nabble.com> References: <1266778535164-4608007.post@n2.nabble.com> <1266799464682-4609543.post@n2.nabble.com> <1266808951449-4610023.post@n2.nabble.com> Message-ID: You're querying all visible layers ( queryVisible: true), try changing that for: layers:"yor list of layers" That should do it Regards P -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100222/b9438a82/attachment.html From zeitalex at googlemail.com Tue Feb 23 05:21:47 2010 From: zeitalex at googlemail.com (Al Zi) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Problems with GetFeatureInfo Message-ID: <8634e70f1002230221h398d4187y5f1efe6fdaa4a1fc@mail.gmail.com> Dear All, OpenLayers used together with geoserver 2, tomcat6, Sun Java 6 on Ubuntu server 64 bit. while trying to use GetFeatureInfo following problems appear: 1) if using GetFeatureInfo like this: map.events.register('click', map, function (e) { document.getElementById('nodelist').innerHTML = "Loading ... please wait ..."; var params = { REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: map.getExtent().toBBOX(), X: e.xy.x, Y: e.xy.y, INFO_FORMAT: 'text/html', QUERY_LAYERS: map.layers[0].params.LAYERS, FEATURE_COUNT: 50, Srs: 'EPSG:32638', Layers: 'Moskva', Styles: '', WIDTH: map.size.w, HEIGHT: map.size.h, format: format}; OpenLayers.loadURL(" http://hboard.iwk.uni-karlsruhe.de:8080/geoserver/wms", params, this, setHTML, setHTML); // window.open(" http://hboard.iwk.uni-karlsruhe.de:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=Moskva&styles=&bbox=-125830.05,6099218.02,153008.285,6277080.521&width=517&height=330&srs=EPSG:32638&format=application/openlayers"); OpenLayers.Event.stop(e); }); } // sets the HTML provided into the nodelist element function setHTML(response){ document.getElementById('nodelist').innerHTML = response.responseText; } clicking on maps brings up "Loading ... please wait ..." message only and nothing else. 2) if using in a way as described in http://trac.openlayers.org/wiki/GetFeatureInfo nothing happens at all. 3) I tried to save OpenLayers html provided by geoserver locally and it does not work as well. "Loading ... please wait ..." message appears for a short time then disappears and nothing happens Any help would be highly appreciated. Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100223/04555394/attachment.html From paweluz at o2.pl Tue Feb 23 06:13:28 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Appliaction loads the first google tile and then gives up In-Reply-To: References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> <4976733D.1070605@pinan.co.uk> <1250500074097-3457374.post@n2.nabble.com> <1266496567637-4591485.post@n2.nabble.com> <4B7D3744.8020800@opengeo.org> <1266502310406-4591932.post@n2.nabble.com> Message-ID: <1266923608073-4618241.post@n2.nabble.com> Hi... Sorry for writing so late but I wasn't at work. I used as you said OL from this page http://dev.openlayers.org/nightly/OpenLayers.js and still this same. Still when I want to use google layer I have you max and min webbrowser or start and close firebug e.g. What is wrong?? Are you sure that this new nightly wersion is correct?? regards, Poul -- View this message in context: http://n2.nabble.com/SelectFeature-control-and-click-event-on-marker-tp2186747p4618241.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hbadenhorst at hotmail.com Tue Feb 23 06:15:24 2010 From: hbadenhorst at hotmail.com (Herman Badenhorst) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Convert JSON to geoJSON with Java Message-ID: Hi all. Is there some opensource java code available that can convert a JSON string received from ESRI REST API and convert it to a geoJSON string? Regards, Herman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100223/221e98ab/attachment.html From vince at vvl.com Tue Feb 23 06:40:55 2010 From: vince at vvl.com (Vince Lotito) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Problems with GetFeatureInfo In-Reply-To: <8634e70f1002230221h398d4187y5f1efe6fdaa4a1fc@mail.gmail.com> References: <8634e70f1002230221h398d4187y5f1efe6fdaa4a1fc@mail.gmail.com> Message-ID: <5D226D9E05A7E342B774D1881408C3EB6FC19799@34093-MBX-C15.mex07a.mlsrvr.com> It sounds like a security issue. Are your web page/scripts being served from http://hboard.iwk.uni-karlsruhe.de:8080? If you are not then your HTTP response will be blank. Kind Regards Vince ________________________________ From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Al Zi Sent: Tuesday, February 23, 2010 5:22 AM To: users@openlayers.org Subject: [OpenLayers-Users] Problems with GetFeatureInfo Dear All, OpenLayers used together with geoserver 2, tomcat6, Sun Java 6 on Ubuntu server 64 bit. while trying to use GetFeatureInfo following problems appear: 1) if using GetFeatureInfo like this: map.events.register('click', map, function (e) { document.getElementById('nodelist').innerHTML = "Loading ... please wait ..."; var params = { REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: map.getExtent().toBBOX(), X: e.xy.x, Y: e.xy.y, INFO_FORMAT: 'text/html', QUERY_LAYERS: map.layers[0].params.LAYERS, FEATURE_COUNT: 50, Srs: 'EPSG:32638', Layers: 'Moskva', Styles: '', WIDTH: map.size.w, HEIGHT: map.size.h, format: format}; OpenLayers.loadURL("http://hboard.iwk.uni-karlsruhe.de:8080/geoserver/wms", params, this, setHTML, setHTML); // window.open("http://hboard.iwk.uni-karlsruhe.de:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=Moskva&styles=&bbox=-125830.05,6099218.02,153008.285,6277080.521&width=517&height=330&srs=EPSG:32638&format=application/openlayers"); OpenLayers.Event.stop(e); }); } // sets the HTML provided into the nodelist element function setHTML(response){ document.getElementById('nodelist').innerHTML = response.responseText; } clicking on maps brings up "Loading ... please wait ..." message only and nothing else. 2) if using in a way as described in http://trac.openlayers.org/wiki/GetFeatureInfo nothing happens at all. 3) I tried to save OpenLayers html provided by geoserver locally and it does not work as well. "Loading ... please wait ..." message appears for a short time then disappears and nothing happens Any help would be highly appreciated. Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100223/5c0b6cf7/attachment.html From pj_maloney at hotmail.com Tue Feb 23 06:52:16 2010 From: pj_maloney at hotmail.com (PhilM) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] handle right mouse click In-Reply-To: References: Message-ID: <1266925936507-4618395.post@n2.nabble.com> I have achieved this by changing the mousedown handler in Handler\Path.js mousedown: function(evt) { //PhilMaloney - Cancel drawing with right-click var rightclick; if (evt.which) rightclick = (evt.which == 3); else if (evt.button) rightclick = (evt.button == 2); if (rightclick) { var index = this.line.geometry.components.length - 1; this.line.geometry.removeComponent(this.line.geometry.components[index]); this.removePoint(); this.finalize('cancel'); return false; } // ignore double-clicks if (this.lastDown && this.lastDown.equals(evt.xy)) { return false; } if(this.lastDown == null) { if(this.persist) { this.destroyFeature(); } this.createFeature(evt.xy); } else if((this.lastUp == null) || !this.lastUp.equals(evt.xy)) { this.addPoint(evt.xy); } this.mouseDown = true; this.lastDown = evt.xy; this.drawing = true; return false; }, Regards Phil mario1982 wrote: > > Hi, > I'm working on drawFeature.js and Path.js for drawing feature such as > lines and polygons. How can I handle right mouse click during the feature > drawing? > My goal is to find a way to undo the current feature by right mouse > clicking. > > Thank you for your help. > Regards, > > Mario > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/handle-right-mouse-click-tp4614676p4618395.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Tue Feb 23 10:47:43 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] GWt + Openlayers - problem:GOOGLE layer appears in left corner Message-ID: <1266940063239-4619582.post@n2.nabble.com> Hi! I am using GTW_OpenLayers from http://sourceforge.net/projects/gwt-openlayers/ page. I have google and wms layer. The problem is: When I load the page my map looks like this: http://i45.tinypic.com/e9aqvn.jpg I try to zoom in, zoom out, move on the map, the google layer does not appear on the hole map. As you can see in the right bottom corner there is my wms layer, but in wrong position on map!! I have to e.g. click F12 (start firebug) and close it, or change the size of my browser. Then the google maps appears on the hole map, immediately, see screen below: http://i45.tinypic.com/1zya7uc.jpg As you can see the google map is now ok but the wms layer is wrong. Then I click once (just once!!) on the "move-east button" http://i47.tinypic.com/214747q.jpg , and my map looks like this: http://i50.tinypic.com/2h7l1s1.jpg Now my wms layer fits to the google layer, but the google layer is moved a lot more that it should be after just once click in the "east" button. I have tried many approaches but non of the were succeed e.g. I tried with the newest version of Openlayers, and the nightly version of OL (http://dev.openlayers.org/nightly/OpenLayers.js). None of this work... If you want I may show you my code... Does anyone knows how to solve this problem??? Regards, Poul -- View this message in context: http://n2.nabble.com/GWt-Openlayers-problem-GOOGLE-layer-appears-in-left-corner-tp4619582p4619582.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Tue Feb 23 10:49:07 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Appliaction loads the first google tile and then gives up In-Reply-To: <1266923608073-4618241.post@n2.nabble.com> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> <4976733D.1070605@pinan.co.uk> <1250500074097-3457374.post@n2.nabble.com> <1266496567637-4591485.post@n2.nabble.com> <4B7D3744.8020800@opengeo.org> <1266502310406-4591932.post@n2.nabble.com> <1266923608073-4618241.post@n2.nabble.com> Message-ID: <1266940147457-4619594.post@n2.nabble.com> Hi! I move the topic here: http://n2.nabble.com/GWt-Openlayers-problem-GOOGLE-layer-appears-in-left-corner-td4619582.html#a4619582 cheers, Poul -- View this message in context: http://n2.nabble.com/SelectFeature-control-and-click-event-on-marker-tp2186747p4619594.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dalda at ikt.es Tue Feb 23 11:33:39 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Problems with overview map and Chrome Message-ID: <224DBDAF88A6AC47BD22432815351BE007C4E04B@nekaposta1> Hi, I'm having some troubles with overviewMap control and chrome, when I click (+) to expand the control, it appears on the left top corner of the control, on the right bottom corner of the map, and I can?t see what's in it. I've read something about this problem related with chrome and using layer.clone() but the example of the openlayers webpage works perfect with chrome, and also the layer I'm using with the overview map is a totally different layer. In fact it's not added to the map. My code: var wms = new OpenLayers.Layer.WMS("mapOverView","http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wms.map", {layers: 'mapOverView',format: 'image/png; mode=24bit',alpha : 'true',transparent: 'true'},{isBaseLayer: true,projection: 'EPSG:23030',units: 'm'}); var opt = {mapOptions: {projection: new OpenLayers.Projection("EPSG:23030"),units: 'm',numZoomLevels: [1],maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, 4820000), maxResolution: 'auto'}, layers: [wms]}; var ovmCtrl = new OpenLayers.Control.OverviewMap(opt); What could be happening?? TIA. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? From bartvde at osgis.nl Tue Feb 23 12:19:12 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Layer.WMS.Post and loadstart-loadend event In-Reply-To: References: Message-ID: <9D95B795-C9A4-4C8B-AA68-7C40010C7B95@osgis.nl> Hi Steve, FYI, this has just been fixed in OpenLayers trunk, see ticket 2406 for the details. Best regards, Bart On Jan 8, 2010, at 4:36 PM, Steve.Toutant@inspq.qc.ca wrote: > > Thanks Bart, > I created a ticket (#2405...and 2406). > http://trac.openlayers.org/ticket/2405 > > I tried it twice because I got an error message saying that my attached file was too big. It is only 284ko... > It is my first ticket, I might missed something. If the file is not attached, tell me how to send it please. > > I used the loadingPanel example. Using the layer switcher, the problen also occurs in IE. > > Steve > > > > > Bart van den Eijnden > 07/01/2010 04:14 PM > > A > Steve.Toutant@inspq.qc.ca > cc > users@openlayers.org > Objet > Re: [OpenLayers-Users] Layer.WMS.Post and loadstart-loadend event > > > > > > > > Hi Steve, > > this sounds like an OpenLayers issue. > > Can you please open up a Trac ticket in the OpenLayers Trac with a reproducable testcase? > > The iframe code (which is used by the POST WMS layer) in OL does have some logic for the loadend event, but maybe something is going wrong somehwere, we will be able to debug once you submit a reproducable testcase. TIA. > > Best regards, > Bart > > On Jan 7, 2010, at 9:04 PM, Steve.Toutant@inspq.qc.ca wrote: > > > Hi, > I'm using Layer.WMS.Post for one of my layers since the geometry comes from a complex query and GET method often doesn't work in IE. > > For this layer when I check this layer in mapfish layertree widget (Ext.treepanel) I got a progress bar that starts but never stops. > If I create this layer with Layer.WMS with a simple query the progress bar disapear. > > Is it because Layer.WMS.Post doesn't have a loadend event? I don't know how to verify this. > > I'm using OpenLayers.Control.LoadingPanel example > Please tell me if this is a mapfish issue. > > Thanks > Steve > > Steve Toutant, M. Sc. > Analyste en g?omatique > Secteur environnement > Direction de la sant? environnementale et de la toxicologie > Institut national de sant? publique du Qu?bec > 945, avenue Wolfe > Qu?bec, Qc G1V 5B3 > T?l.: (418) 650-5115 #5281 > Fax.: (418) 654-3144 > steve.toutant@inspq.qc.ca > http://www.inspq.qc.ca > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100223/0f959bdf/attachment.html From asufsc at gmail.com Tue Feb 23 12:43:39 2010 From: asufsc at gmail.com (And.) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] GWt + Openlayers - problem:GOOGLE layer appears in left corner In-Reply-To: <1266940063239-4619582.post@n2.nabble.com> References: <1266940063239-4619582.post@n2.nabble.com> Message-ID: <1266947019950-4620546.post@n2.nabble.com> If you show your code will be easier to help. Btw, 1) check if you are setting all params to the object map; 2) check if you are setting all params to the gmaps layers; 3) call the method updateSize() (Map.java); 4) then set the center (don't forget to transform the coordinates to EPSG900913); It should work. Regards, And. -- View this message in context: http://n2.nabble.com/GWt-Openlayers-problem-GOOGLE-layer-appears-in-left-corner-tp4619582p4620546.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kguardado at gmail.com Tue Feb 23 12:55:38 2010 From: kguardado at gmail.com (Karina Guardado) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] question about select feature Message-ID: <4a92b0c31002230955g6b51c87fo1aa6d9657790d8ed@mail.gmail.com> Hello everybody, I have 2 layers that are point type and I want users to be able to click on one point (of any layer) and get the information(attributes) related to that point. Here is my code var estaciones = new OpenLayers.Layer.WMS("estaciones", "http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map", {layers:'estaciones', transparent: "true",format:"image/gif"}); var puntos = new OpenLayers.Layer.WMS("puntos", "http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.mapl", {layers:'puntos', transparent: "true",format:"image/gif"}); so far what I was using was a text layer to generate a marker and then get the information as follows: var infpuntos = new OpenLayers.Layer.Text( "infpuntos", {location: "textpunto.php"}, " http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map"); var infestaciones = new OpenLayers.Layer.Text( "infestaciones", {location: "textpunto.php"}, " http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map"); but I would like that users could be able to click on one point and get the information without using this text markers. I found information about vector and gml layers with text format but I would like to know how to use them to work with more than one layer or if there are other solutions that someone could recomend. thanks in advance. Karina Guardado El Salvador -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100223/4269dac3/attachment.html From info.ethio at gmail.com Tue Feb 23 15:51:05 2010 From: info.ethio at gmail.com (ethio info) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Beginner issue In-Reply-To: <561c16701002211323m2a546dbbg15301749afb82e5e@mail.gmail.com> References: <561c16701002202339m65495fd7r27aa545f58d95772@mail.gmail.com> <33fd44f91002210840s1a7c2200k4e7be079f04c9@mail.gmail.com> <561c16701002211323m2a546dbbg15301749afb82e5e@mail.gmail.com> Message-ID: <561c16701002231251g482c1a25g6c55a5ec718da598@mail.gmail.com> Sorry to keep pestering you, but does anyone know what I am doing wrong? if anyone can make this work, and tell me how to fix it, I would be very grateful. thanks On Sun, Feb 21, 2010 at 3:23 PM, ethio info wrote: > I understand what you are saying but my previous request was rejected > because it was over the size limit. > Here it is: > > http://www.w3.org/TR/html4/loose.dtd"> > > > > > > > > > > > > > > > > >

Woreda's

>
style="margin-right:20px;">
> >

Select one of the 583 > woreda's

> >
> > > > > On Sun, Feb 21, 2010 at 10:40 AM, Nicholas Efremov-Kendall < > n.e.kendall@gmail.com> wrote: > >> you really need to post more code than that for someone to be able to help >> you. Are you using proj4.js to change your projection? OL only uses a few >> projections/coordinate systems natively. >> >> On Sun, Feb 21, 2010 at 2:39 AM, ethio info wrote: >> >>> Hi, Please take a look at this site: >>> http://projects.latimes.com/mapping-la/neighborhoods/. >>> I have copied the source and cleaned it up of ads and so forth and have >>> put in my data and I just can not see the overlay on the Google map. >>> I will include the changes I made below. The only thing I can think of >>> that is blocking my overlay is the bounds. Basically, I want the country of >>> Ethiopia. >>> Just to complicate things further, my overlay was showing when I did not >>> use a spherical mercator projection but the overlay matched what is in >>> Google maps ONLY when I zoomed in. >>> so after reading some of the issues some people had, I figured I should >>> use what is in the Mapping LA w/minor changes. >>> Can someone suggest a solution? BTW, the overlay switch works and gives >>> my overlay as a check box option to click on but it is not displayed on the >>> Google map >>> Here are my changes to the Mapping LA Neighborhood source: >>> >>> var max_extent = new OpenLayers.Bounds(860986,-4383204,5870363,3600489); >>> index_map.addControl(new OpenLayers.Control.LayerSwitcher()); >>> >>> var hood_polygon_371 = wkt_f.read('MULTIPOLYGON (((39.2968382026 >>> 8.8274792477, 39.3135039775 8.748488041, 39.3016324666 8.742095689, >>> 39.3036871512 8.7357033371, 39.269899005 8.6920983646, >>> 39.2315448931 8.6608214995, 39.2265223308 8.645982111, >>> 39.2479823696 8.6108241751, 39.2249242428 8.589135838, >>> 39.2221846634 8.5756662392, 39.2306316999 8.5656211146, >>> 39.257114301 8.5601419558, 39.2502653525 8.5464440587, >>> 39.2139659251 8.5220161421, 39.1744703218 8.4606039034, >>> 39.0858905871 8.385037171, 39.0758454626 8.3950822956, >>> 39.0381762455 8.399419963, 39.0363498593 8.5128842107, >>> 39.0671701278 8.5432478827, 39.0655720398 8.5562608849, >>> 39.0872603769 8.5968979797, 39.0874886751 8.6528310595, 39.10415445 >>> 8.6825098366, 39.0982186945 8.6939247509, 39.1075789242 8.7101339291, >>> 39.1603158281 8.742095689, 39.1840588498 8.7877553461, >>> 39.1767533046 8.8019098398, 39.2014095194 8.8146945437, >>> 39.2057471869 8.8039645243, 39.2199016805 8.8012249449, >>> 39.2461559833 8.8299905288, 39.2710404964 8.8224566854, >>> 39.2968382026 8.8274792477 )))'); >>> hood_polygon_371.data = {'slug':' 371', 'name': '371'}; >>> >>> var hood_polygon_260 = wkt_f.read('MULTIPOLYGON (((39.506872625 >>> 9.3384108099, 39.5290175587 9.3116999105, 39.510068801 9.2838475198, >>> 39.522853505 9.2751721849, 39.4963709039 9.2509725667, >>> 39.5105253976 9.2502876718, 39.5089273096 9.2354482833, >>> 39.5290175587 9.2133033496, 39.5598378272 9.2203805965, >>> 39.5456833335 9.1938979954, 39.5376928935 9.1470968469, >>> 39.5771884968 9.0621698849, 39.5447701403 9.0523530586, >>> 39.4872389725 9.0171951227, 39.461212968 9.0137706484, >>> 39.4299361029 9.0452758117, 39.4004856241 9.0596586037, >>> 39.3701219522 9.1025786813, 39.3758294093 9.126321703, >>> 39.3498034048 9.1690134823, 39.2920439386 9.1770039223, >>> 39.281085621 9.1865924503, 39.2514068439 9.2676383415, >>> 39.2509502473 9.3203752454, 39.2584840907 9.3308769665, >>> 39.266702829 9.3265392991, 39.3011758701 9.2909247666, >>> 39.3253754883 9.3107867174, 39.3824500596 9.293664346, 39.434045472 >>> 9.3477710396, 39.4589299851 9.3511955139, 39.506872625 9.3384108099 >>> )))'); >>> hood_polygon_260.data = {'slug':' 260', 'name': '260'}; >>> var hood_vector = new OpenLayers.Layer.Vector("Wereda"); >>> (hood_vector.addFeatures([hood_polygon_260,hood_polygon_371); >>> var lon = 4387103; >>> var lat = 1007363; >>> var zoom = 0; >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> -- >> Nicholas Efremov-Kendall >> Fulbright Student 2009-2010, Ukraine >> nefremov@artsci.wustl.edu >> c/o Halyna Yerko >> Balzaka 92a, Kv 27 >> 02232 >> Kyiv, Ukraine >> (mob) +380963576524 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100223/185ddf42/attachment.html From hiebert at uvic.ca Tue Feb 23 18:51:29 2010 From: hiebert at uvic.ca (James Hiebert) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Help needed with using OpenLayers.Layer.Image Message-ID: <20100223235127.GH18708@basalt.uvic.ca> Hi All, I'm working on a project where I'd like to take an image raster and overlay that on top of a OpenLayers base layer (from OpenStreetMap). I have my raster in a geotiff which I have created from the data (climate temperature data, not that it makes any difference). I'm having problems understanding what options and attributes I need to actually set when creating the instance of OpenLayers.Layer.Image (the documentation does not seem to be very complete or verbose). I've gdalwarp'ed my geotiff to match the projection of the base layer (EPSG:900913). I'm fairly certain that my geotiff is fine... it loads into QGIS fine and is displayed by standard image viewers like xview and eog without problems. In my openlayers example I hard coded the bounds and the rater size based on the output of tiffinfo and passed those to the constructor. Are the bounds supposed to be map coordinates (EPSG:900913) or in LatLon? When I load the page, the base layer (OpenStreetMap) displays fine, but my overlay ("Autumn tmax...") is greyed out in the layer switcher. The layer's name is "climate" and if I do a: climate.calculateInRange() it returns false. Seems that the auto resolution calculation is not working since climate.resolutions and osm.resolutions (the base layer) are very, very different. >>> climate.resolutions [0.32142857142857145, 0.16071428571428573, 0.08035714285714286, 0.04017857142857143, 0.020089285714285716, 0.010044642857142858, 0.005022321428571429, 0.0025111607142857145, 0.0012555803571428572, 0.0006277901785714286, 0.0003138950892857143, 0.00015694754464285715, 0.00007847377232142858, 0.00003923688616071429, 0.000019618443080357144, 0.000009809221540178572] >>> osm.resolutions [156543.0339, 78271.51695, 39135.758475, 19567.8792375, 9783.93961875, 4891.969809375, 2445.9849046875, 1222.99245234375, 611.496226171875, 305.7481130859375, 152.87405654296876, 76.43702827148438, 38.21851413574219, 19.109257067871095, 9.554628533935547, 4.777314266967774, 2.388657133483887, 1.1943285667419434, 0.5971642833709717] This is probably because I didn't supply an option that I'm supposed to, but I can't figure it out. Could someone more knowledgable than I about the Layer.Image take a look at it for me? My trimmed down example can be found here: http://basalt.pcic.uvic.ca/index-mini.html Any help or suggestions is much appreciated. ~James Hiebert From stuart.jones at jacobs.com Tue Feb 23 19:00:51 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] Problems doing an OpenLayers build Message-ID: <1266969651875-4622761.post@n2.nabble.com> Dear all I've downloaded the ZIP of OL2.8 [http://openlayers.org/download/OpenLayers-2.8.zip] I've opened up the /build folder at a command prompt (Windows XP). I've typed "python build.py" and successfully generated OpenLayers.js (total files merged: 204; file size 728,952 bytes). When I copy the generated file to my web folder and include it in my page it errors on load. According to Firebug it's looking for all the supporting scripts from the /lib folder. Demo: http://gingerbbm.com/dev/homemade/ol.html Should this build be working out of the box? What am I doing wrong? Many thanks Stuart -- View this message in context: http://n2.nabble.com/Problems-doing-an-OpenLayers-build-tp4622761p4622761.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dalda at ikt.es Wed Feb 24 03:59:57 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:32 2010 Subject: [OpenLayers-Users] RV: Problems with overview map and Chrome Message-ID: <224DBDAF88A6AC47BD22432815351BE007C4E17D@nekaposta1> I forgot to note that this works in FireFox 3.6 and IE8. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de David Alda Fernandez de Lezea Enviado el: martes, 23 de febrero de 2010 17:34 Para: openlayers users Asunto: [OpenLayers-Users] Problems with overview map and Chrome Hi, I'm having some troubles with overviewMap control and chrome, when I click (+) to expand the control, it appears on the left top corner of the control, on the right bottom corner of the map, and I can?t see what's in it. I've read something about this problem related with chrome and using layer.clone() but the example of the openlayers webpage works perfect with chrome, and also the layer I'm using with the overview map is a totally different layer. In fact it's not added to the map. My code: var wms = new OpenLayers.Layer.WMS("mapOverView","http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wms.map", {layers: 'mapOverView',format: 'image/png; mode=24bit',alpha : 'true',transparent: 'true'},{isBaseLayer: true,projection: 'EPSG:23030',units: 'm'}); var opt = {mapOptions: {projection: new OpenLayers.Projection("EPSG:23030"),units: 'm',numZoomLevels: [1],maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, 4820000), maxResolution: 'auto'}, layers: [wms]}; var ovmCtrl = new OpenLayers.Control.OverviewMap(opt); What could be happening?? TIA. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From kildimo at gmail.com Wed Feb 24 05:22:08 2010 From: kildimo at gmail.com (protos) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] changing the baselayer Message-ID: <1267006928276-4624844.post@n2.nabble.com> Hi, I need to create a new layer and make this the new base layer and use the old base layer for something else but I'm having issues with it - when I switch the baseLayer, and request new tiles the tiles still end up in the old baseLayer instead of the new one. This is how I'm switching the baseLayer : var baseId = this.map.baseLayer.id; var cloneId = baseId + "_clone"; // point baseLayer at the cloned layer // point baseLayerClone at the base layer this.map.tmp = this.map.baseLayerClone; this.map.baseLayerClone = this.map.baseLayer; this.map.baseLayer = this.map.tmp; this.map.tmp = null; // change the openlayer object ids this.map.baseLayer.id = baseId; this.map.baseLayerClone.id = cloneId; // change the DOM div ids this.map.baseLayer.div.id = baseId; this.map.baseLayerClone.div.id = cloneId; this.map.baseLayerClone.isBaseLayer = false; // set the layer indexes var cidx = this.map.getLayerIndex(this.map.baseLayerClone); var bidx = this.map.getLayerIndex(this.map.baseLayer); this.map.setLayerIndex(this.map.baseLayerClone, bidx); this.map.setLayerIndex(this.map.baseLayer, cidx); this.map.baseLayerClone.index = bidx; this.map.baseLayer.index = cidx; this.map.setBaseLayer(this.map.baseLayer); A lot of this is probably unnecessary but I'm trying to make sure that everything is covered. I think the problem might be that the old baseLayer is still seen as a base layer and I now have two baseLayers. Is there something I need to do with the old baseLayer to make it a normal layer ? Cheers, Colm -- View this message in context: http://n2.nabble.com/changing-the-baselayer-tp4624844p4624844.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From emmanuele.sordini at gmail.com Wed Feb 24 05:50:36 2010 From: emmanuele.sordini at gmail.com (Emmanuele Sordini) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Color-coded maps with OpenLayers Message-ID: Dear all, I'm faced with the task of adding a color-coded world map to my Java web app, and showing it in an interactive form via OpenLayers. The map should have clear regional borders, with light (or even white) background, so that the countries can be painted individually, and very few other features. I would probably break down this task into 2-3 subtasks: 1) Find a map layer with the suitable look and feel 2) Color the map (I would do that with some kind of Java API) 3) Show the map in OpenLayers I do have a hunch #2 is the trickiest bit. Anyway, any help on the subject will be greatly appreciated. Thanks in advance Emmanuele From zac.spitzer at gmail.com Wed Feb 24 07:08:13 2010 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Color-coded maps with OpenLayers In-Reply-To: References: Message-ID: <7a85053e1002240408p19732db0sb9c4ecd24904978b@mail.gmail.com> have you had a look through the examples? http://www.openlayers.org/dev/examples/ it's a great place to get an idea about what openlayers can do On Wed, Feb 24, 2010 at 9:50 PM, Emmanuele Sordini wrote: > Dear all, > I'm faced with the task of adding a color-coded world map to my Java > web app, and showing it in an interactive form via OpenLayers. The map > should have clear regional borders, with light (or even white) > background, so that the countries can be painted individually, and > very few other features. I would probably break down this task into > 2-3 subtasks: > > 1) Find a map layer with the suitable look and feel > 2) Color the map (I would do that with some kind of Java API) > 3) Show the map in OpenLayers > > I do have a hunch #2 is the trickiest bit. Anyway, any help on the > subject will be greatly appreciated. > > Thanks in advance > Emmanuele > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 From n.e.kendall at gmail.com Wed Feb 24 07:44:26 2010 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Beginner issue In-Reply-To: <561c16701002231251g482c1a25g6c55a5ec718da598@mail.gmail.com> References: <561c16701002202339m65495fd7r27aa545f58d95772@mail.gmail.com> <33fd44f91002210840s1a7c2200k4e7be079f04c9@mail.gmail.com> <561c16701002211323m2a546dbbg15301749afb82e5e@mail.gmail.com> <561c16701002231251g482c1a25g6c55a5ec718da598@mail.gmail.com> Message-ID: <33fd44f91002240444o5d056c59n4838316450579dff@mail.gmail.com> what does firebug tell you? On Tue, Feb 23, 2010 at 3:51 PM, ethio info wrote: > Sorry to keep pestering you, but does anyone know what I am doing wrong? > if anyone can make this work, and tell me how to fix it, I would be very > grateful. > > thanks > > On Sun, Feb 21, 2010 at 3:23 PM, ethio info wrote: > >> I understand what you are saying but my previous request was rejected >> because it was over the size limit. >> Here it is: >> >> > http://www.w3.org/TR/html4/loose.dtd"> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>

Woreda's

>>
> style="margin-right:20px;">
>> >>

Select one of the 583 >> woreda's

>> >>
>> >> >> >> >> On Sun, Feb 21, 2010 at 10:40 AM, Nicholas Efremov-Kendall < >> n.e.kendall@gmail.com> wrote: >> >>> you really need to post more code than that for someone to be able to >>> help you. Are you using proj4.js to change your projection? OL only uses a >>> few projections/coordinate systems natively. >>> >>> On Sun, Feb 21, 2010 at 2:39 AM, ethio info wrote: >>> >>>> Hi, Please take a look at this site: >>>> http://projects.latimes.com/mapping-la/neighborhoods/. >>>> I have copied the source and cleaned it up of ads and so forth and have >>>> put in my data and I just can not see the overlay on the Google map. >>>> I will include the changes I made below. The only thing I can think of >>>> that is blocking my overlay is the bounds. Basically, I want the country of >>>> Ethiopia. >>>> Just to complicate things further, my overlay was showing when I did not >>>> use a spherical mercator projection but the overlay matched what is in >>>> Google maps ONLY when I zoomed in. >>>> so after reading some of the issues some people had, I figured I should >>>> use what is in the Mapping LA w/minor changes. >>>> Can someone suggest a solution? BTW, the overlay switch works and gives >>>> my overlay as a check box option to click on but it is not displayed on the >>>> Google map >>>> Here are my changes to the Mapping LA Neighborhood source: >>>> >>>> var max_extent = new OpenLayers.Bounds(860986,-4383204,5870363,3600489); >>>> index_map.addControl(new OpenLayers.Control.LayerSwitcher()); >>>> >>>> var hood_polygon_371 = wkt_f.read('MULTIPOLYGON (((39.2968382026 >>>> 8.8274792477, 39.3135039775 8.748488041, 39.3016324666 8.742095689, >>>> 39.3036871512 8.7357033371, 39.269899005 8.6920983646, >>>> 39.2315448931 8.6608214995, 39.2265223308 8.645982111, >>>> 39.2479823696 8.6108241751, 39.2249242428 8.589135838, >>>> 39.2221846634 8.5756662392, 39.2306316999 8.5656211146, >>>> 39.257114301 8.5601419558, 39.2502653525 8.5464440587, >>>> 39.2139659251 8.5220161421, 39.1744703218 8.4606039034, >>>> 39.0858905871 8.385037171, 39.0758454626 8.3950822956, >>>> 39.0381762455 8.399419963, 39.0363498593 8.5128842107, >>>> 39.0671701278 8.5432478827, 39.0655720398 8.5562608849, >>>> 39.0872603769 8.5968979797, 39.0874886751 8.6528310595, 39.10415445 >>>> 8.6825098366, 39.0982186945 8.6939247509, 39.1075789242 8.7101339291, >>>> 39.1603158281 8.742095689, 39.1840588498 8.7877553461, >>>> 39.1767533046 8.8019098398, 39.2014095194 8.8146945437, >>>> 39.2057471869 8.8039645243, 39.2199016805 8.8012249449, >>>> 39.2461559833 8.8299905288, 39.2710404964 8.8224566854, >>>> 39.2968382026 8.8274792477 )))'); >>>> hood_polygon_371.data = {'slug':' 371', 'name': '371'}; >>>> >>>> var hood_polygon_260 = wkt_f.read('MULTIPOLYGON (((39.506872625 >>>> 9.3384108099, 39.5290175587 9.3116999105, 39.510068801 9.2838475198, >>>> 39.522853505 9.2751721849, 39.4963709039 9.2509725667, >>>> 39.5105253976 9.2502876718, 39.5089273096 9.2354482833, >>>> 39.5290175587 9.2133033496, 39.5598378272 9.2203805965, >>>> 39.5456833335 9.1938979954, 39.5376928935 9.1470968469, >>>> 39.5771884968 9.0621698849, 39.5447701403 9.0523530586, >>>> 39.4872389725 9.0171951227, 39.461212968 9.0137706484, >>>> 39.4299361029 9.0452758117, 39.4004856241 9.0596586037, >>>> 39.3701219522 9.1025786813, 39.3758294093 9.126321703, >>>> 39.3498034048 9.1690134823, 39.2920439386 9.1770039223, >>>> 39.281085621 9.1865924503, 39.2514068439 9.2676383415, >>>> 39.2509502473 9.3203752454, 39.2584840907 9.3308769665, >>>> 39.266702829 9.3265392991, 39.3011758701 9.2909247666, >>>> 39.3253754883 9.3107867174, 39.3824500596 9.293664346, 39.434045472 >>>> 9.3477710396, 39.4589299851 9.3511955139, 39.506872625 9.3384108099 >>>> )))'); >>>> hood_polygon_260.data = {'slug':' 260', 'name': '260'}; >>>> var hood_vector = new OpenLayers.Layer.Vector("Wereda"); >>>> (hood_vector.addFeatures([hood_polygon_260,hood_polygon_371); >>>> var lon = 4387103; >>>> var lat = 1007363; >>>> var zoom = 0; >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>> >>> >>> -- >>> Nicholas Efremov-Kendall >>> Fulbright Student 2009-2010, Ukraine >>> nefremov@artsci.wustl.edu >>> c/o Halyna Yerko >>> Balzaka 92a, Kv 27 >>> 02232 >>> Kyiv, Ukraine >>> (mob) +380963576524 >>> >> >> > -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/b5e3fa66/attachment.html From kildimo at gmail.com Wed Feb 24 08:01:12 2010 From: kildimo at gmail.com (protos) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] changing the baselayer In-Reply-To: <1267006928276-4624844.post@n2.nabble.com> References: <1267006928276-4624844.post@n2.nabble.com> Message-ID: <1267016472493-4625540.post@n2.nabble.com> I'm surprised that this list is so inactive ....... I thought it would be much busier ! In case someone else is looking for an answer to my question, I managed to figure it out - you need to make sure that the visibility of the new baseLayer is set to true. as in : map.baseLayer.setVisibility(true); and set an Not immediately obvious from the available documentation ....... Cheers, Colm -- View this message in context: http://n2.nabble.com/changing-the-baselayer-tp4624844p4625540.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From franzzoa77 at yahoo.co.uk Wed Feb 24 08:11:48 2010 From: franzzoa77 at yahoo.co.uk (Franz Okyere) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Customised Navigation Message-ID: <165791.17799.qm@web29001.mail.ird.yahoo.com> Hi all, Nice to meet you. This happens to be my first posting on this list so you can choose to be extra nice. My query is on customising the navigation button to: i. on single click show popups ii. on mouse drag pan or move map iii. and on double click keep the dafault (zoom) I am working on a geomoose project (based on openlayers) Thanks a lot Franz GIS Specialist -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/c576a3ee/attachment.html From chris.green at ibstv.co.uk Wed Feb 24 08:47:24 2010 From: chris.green at ibstv.co.uk (Chris Green) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Selectfeature not firing Message-ID: <008801cab557$e5e20ea0$b1a62be0$@green@ibstv.co.uk> Hello all Hope someone can help with what is probably a simple problem that I don't seem to be able to solve. I have created a vector layer which has features taken from a wms layer: var wfs = new OpenLayers.Layer.Vector("Countries WFS", { styleMap: styleMap2, strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/OLFurtherTest/htdocs/ wfsVectorGetFeature.map", featureType: "France", featureNS: "http://mapserver.gis.umn.edu/mapserver" }) }); map.addLayer(wfs); This works OK, but I want to be able to click to select an individual feature so I added: var selectCtrl = new OpenLayers.Control.SelectFeature(wfs, {clickout: true} ); map.addControl(selectCtrl); selectCtrl.activate(); However the selectfeature control does not fire in response to any map clicks. Can anyone suggest what I am missing? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/635edc0f/attachment.html From stuart.jones at jacobs.com Wed Feb 24 09:29:19 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Problems doing an OpenLayers build In-Reply-To: <1266969651875-4622761.post@n2.nabble.com> References: <1266969651875-4622761.post@n2.nabble.com> Message-ID: <1267021759758-4626100.post@n2.nabble.com> Apologies. This was sheer incompetence and a late night on my part. The build is working for me when I stipulate library.cfg. Cheers Stuart -- View this message in context: http://n2.nabble.com/Problems-doing-an-OpenLayers-build-tp4622761p4626100.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kguardado at gmail.com Wed Feb 24 10:13:38 2010 From: kguardado at gmail.com (Karina Guardado) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] about text layers Message-ID: <4a92b0c31002240713h2ac6ed1aw86bf5f6b102d81b0@mail.gmail.com> Hello everybody, I have 2 layers that are point type and I want users to be able to click on one point (of any layer) and get the information(attributes) related to that point. Here is my code var estaciones = new OpenLayers.Layer.WMS(" estaciones", "http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map", {layers:'estaciones', transparent: "true",format:"image/gif"}); var puntos = new OpenLayers.Layer.WMS("puntos", "http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.mapl", {layers:'puntos', transparent: "true",format:"image/gif"}); so far what I was using was a text layer to generate a marker and then get the information as follows: var infpuntos = new OpenLayers.Layer.Text( "infpuntos", {location: "textpunto.php"}, " http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map"); var infestaciones = new OpenLayers.Layer.Text( "infestaciones", {location: "textpunto.php"}, " http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map"); but I would like that users could be able to click on one point and get the information without using this text markers. I found information about vector and gml layers with text format but I would like to know how to use them to work with more than one layer or if there are other solutions that someone could recomend. thanks in advance. Karina Guardado El Salvador -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/a45550fc/attachment.html From kguardado at gmail.com Wed Feb 24 10:18:32 2010 From: kguardado at gmail.com (Karina Guardado) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] text marker question Message-ID: <4a92b0c31002240718k3592eb32o61fa40882a03a179@mail.gmail.com> Hello, When working with the text layer and click on one marker there is not option to close it just to click on the icon again. Is there any code to add a close button or something in this window without having to click the icon again. The problem is that users get confused when they open a window and then disactive the text layer and the windows is still open but there is not way to close it. any suggestion , thanks, karina El salvador -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/f41cad68/attachment.html From adube at mapgears.com Wed Feb 24 10:43:34 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] about text layers In-Reply-To: <4a92b0c31002240713h2ac6ed1aw86bf5f6b102d81b0@mail.gmail.com> References: <4a92b0c31002240713h2ac6ed1aw86bf5f6b102d81b0@mail.gmail.com> Message-ID: <4B854926.10301@mapgears.com> Karina, Karina Guardado wrote: > Hello everybody, > Hi > but I would like that users could be able to click on one point and > get the information without using this text markers. I found > information about vector and gml layers with text format but I would > like to know how to use them to work with more than one layer or if > there are other solutions that someone could recomend. You're right about using Vector layers. It shouldn't matter if you have more than one if you use the SelectFeature control for feature selection. You can give it an array of Vector layers, so, on your map, regardless on which feature from any Vector layer, you should be able to select it. See more about this control in these examples : http://openlayers.org/dev/examples/select-feature-multilayer.html http://openlayers.org/dev/examples/select-feature-openpopup.html Kind regards, Alexandre > > > thanks in advance. > > Karina Guardado > El Salvador > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Wed Feb 24 10:47:11 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Selectfeature not firing In-Reply-To: <008801cab557$e5e20ea0$b1a62be0$@green@ibstv.co.uk> References: <008801cab557$e5e20ea0$b1a62be0$@green@ibstv.co.uk> Message-ID: <4B8549FF.6040903@mapgears.com> Chris, Could you share a live example or more code demonstrating your problem ? The code you pasted below doesn't seem to have any issue. Kind regards, Alexandre Chris Green wrote: > > Hello all > > Hope someone can help with what is probably a simple problem that I > don?t seem to be able to solve. I have created a vector layer which > has features taken from a wms layer: > > var wfs = new OpenLayers.Layer.Vector("Countries WFS", { > > styleMap: styleMap2, > > strategies: [new OpenLayers.Strategy.BBOX()], > > protocol: new OpenLayers.Protocol.WFS({ > > url: > "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/OLFurtherTest/htdocs/wfsVectorGetFeature.map", > > featureType: "France", > > featureNS: "http://mapserver.gis.umn.edu/mapserver" > > }) > > }); > > map.addLayer(wfs); > > This works OK, but I want to be able to click to select an individual > feature so I added: > > var selectCtrl = new OpenLayers.Control.SelectFeature(wfs, > > {clickout: true} > > ); > > map.addControl(selectCtrl); > > selectCtrl.activate(); > > However the selectfeature control does not fire in response to any map > clicks. Can anyone suggest what I am missing? > > Chris > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Wed Feb 24 10:50:50 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Customised Navigation In-Reply-To: <165791.17799.qm@web29001.mail.ird.yahoo.com> References: <165791.17799.qm@web29001.mail.ird.yahoo.com> Message-ID: <4B854ADA.5060906@mapgears.com> Franz, The Control.Navigation should already do ii and iii, so you basically need to create a control that do stuff on "click" (simple) and activate it as soon as the Control.Navigation control is activated and the opposite for deactivation. Does that make sense ? Alexandre Franz Okyere wrote: > Hi all, > > Nice to meet you. This happens to be my first posting on this list so > you can choose to be extra nice. My query is on customising the > navigation button to: > > i. on single click show popups > ii. on mouse drag pan or move map > iii. and on double click keep the dafault (zoom) > > I am working on a geomoose project (based on openlayers) > > Thanks a lot > > Franz > GIS Specialist > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Wed Feb 24 10:52:54 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] text marker question In-Reply-To: <4a92b0c31002240718k3592eb32o61fa40882a03a179@mail.gmail.com> References: <4a92b0c31002240718k3592eb32o61fa40882a03a179@mail.gmail.com> Message-ID: <4B854B56.6030107@mapgears.com> Karina, You could register a "visibilitychanged" event on your Layer.Text object to close all popups on the map when the visibility is changed to "false". Alexandre Karina Guardado wrote: > Hello, > > When working with the text layer and click on one marker there is not > option to close it just to click on the icon again. Is there any code > to add a close button or something in this window without having to > click the icon again. The problem is that users get confused when they > open a window and then disactive the text layer and the windows is > still open but there is not way to close it. > any suggestion , thanks, > > karina > El salvador > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From ashley_c_mort at raytheon.com Wed Feb 24 11:16:48 2010 From: ashley_c_mort at raytheon.com (ashley_c_mort) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Spherical Mercator and WMS question Message-ID: <001501cab56c$c3e85880$22099195@us.ray.com> I have a simple question, how does the example at http://openlayers.org/dev/examples/baseLayers.html place the marker correctly on both WMS and Google layers? I thought you had to configure everything for Spherical Mercator when using something like Google Maps with WMS How does that baseLayers.html example seem to work correctly without any Spherical Mercator settings??? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/f43c49c6/attachment.html From adube at mapgears.com Wed Feb 24 11:55:21 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] about text layers In-Reply-To: <4a92b0c31002240841x597efaf5hd194daa80ebd7c0c@mail.gmail.com> References: <4a92b0c31002240713h2ac6ed1aw86bf5f6b102d81b0@mail.gmail.com> <4B854926.10301@mapgears.com> <4a92b0c31002240841x597efaf5hd194daa80ebd7c0c@mail.gmail.com> Message-ID: <4B8559F9.2000800@mapgears.com> Karina, You need to have your features served by a "feature server". MapServer can do that for you. The OGC standard for that is "WFS" so you can try to set a WFS server layer in MapServer : http://mapserver.org/ogc/wfs_server.html and then read it with a OpenLayers.Layer.Vector layer using a WFS protocol : http://openlayers.org/dev/examples/wfs-states.html If you have trouble with the Feature Name Space property, try : featureNS: "http://mapserver.gis.umn.edu/mapserver" Also, don't forget to "reply-to-all" to have the MailingList aware of our discussion. Others may want to comment too. Kind regards, Alexandre Karina Guardado wrote: > Hi, > > I reviewed the examples you gave me but I have a question. When I > create my wms layer I provide the url and the name of the layer from > mapserver in my mapfile like this > > var estaciones = new OpenLayers.Layer.WMS("estaciones", > "http://myurl/cgi-bin/mapserv?MAP=/var/www/amss_wms2.map", > {layers:'estaciones', transparent: > "true",format:"image/gif"}); > > but in the example I can see something like this > > var vectors1 = new OpenLayers.Layer.Vector("Vector Layer 1", { > styleMap: new OpenLayers.StyleMap({ > "default": new > OpenLayers.Style(OpenLayers.Util.applyDefaults({ > externalGraphic: "../img/marker-green.png", > graphicOpacity: 1, > rotation: -45, > pointRadius: 10 > }, OpenLayers.Feature.Vector.style["default"])), > "select": new OpenLayers.Style({ > externalGraphic: "../img/marker-blue.png" > }) > }) > }); > > But I can't see where I should write the name of my layer and the url > it is confused to me. So please if you could help me how to convert my > wms layer into the vector layer I would really thanks a lot to you. > > karina > > On Wed, Feb 24, 2010 at 9:43 AM, Alexandre Dube > wrote: > > Karina, > > Karina Guardado wrote: > > Hello everybody, > > Hi > > > > but I would like that users could be able to click on one > point and get the information without using this text markers. > I found information about vector and gml layers with text > format but I would like to know how to use them to work with > more than one layer or if there are other solutions that > someone could recomend. > > You're right about using Vector layers. It shouldn't matter if > you have more than one if you use the SelectFeature control for > feature selection. You can give it an array of Vector layers, so, > on your map, regardless on which feature from any Vector layer, > you should be able to select it. > > See more about this control in these examples : > > http://openlayers.org/dev/examples/select-feature-multilayer.html > http://openlayers.org/dev/examples/select-feature-openpopup.html > > Kind regards, > > Alexandre > > > > thanks in advance. > > Karina Guardado > El Salvador > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Wed Feb 24 12:01:01 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] text marker question In-Reply-To: <4a92b0c31002240829k35b3f9e2j32a2ec9225b92524@mail.gmail.com> References: <4a92b0c31002240718k3592eb32o61fa40882a03a179@mail.gmail.com> <4B854B56.6030107@mapgears.com> <4a92b0c31002240829k35b3f9e2j32a2ec9225b92524@mail.gmail.com> Message-ID: <4B855B4D.2000205@mapgears.com> Karina, Sure. Here's something to start from : yourVectorLayer.events.register("visibilitychanged", yourVectorLayer, myOnChange); var myOnChange = function() { if(this.visibility === false) { //remove your popup } }; Alexandre Karina Guardado wrote: > thanks for your help and maybe you could provide me a code example > about using this register event because I have never use this kind of > object. > > thanks again, > > > > On Wed, Feb 24, 2010 at 9:52 AM, Alexandre Dube > wrote: > > Karina, > > You could register a "visibilitychanged" event on your Layer.Text > object to close all popups on the map when the visibility is > changed to "false". > > Alexandre > > > Karina Guardado wrote: > > Hello, > > When working with the text layer and click on one marker there > is not option to close it just to click on the icon again. Is > there any code to add a close button or something in this > window without having to click the icon again. The problem is > that users get confused when they open a window and then > disactive the text layer and the windows is still open but > there is not way to close it. > any suggestion , thanks, > > karina > El salvador > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -- Alexandre Dub? Mapgears www.mapgears.com From franzzoa77 at yahoo.co.uk Wed Feb 24 12:45:06 2010 From: franzzoa77 at yahoo.co.uk (Franz Okyere) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Customised Navigation In-Reply-To: <4B854ADA.5060906@mapgears.com> Message-ID: <734642.59540.qm@web29009.mail.ird.yahoo.com> I will try it and see how it goes. I guess I will need to figure out how I hook up the popup on the navigation.js. I'll get back to you. ? Thanks Alexandre ? Franz --- On Wed, 24/2/10, Alexandre Dube wrote: From: Alexandre Dube Subject: Re: [OpenLayers-Users] Customised Navigation To: "Franz Okyere" Cc: Users@openlayers.org Date: Wednesday, 24 February, 2010, 15:50 Franz, The Control.Navigation should already do ii and iii, so you basically need to create a control that do stuff on "click" (simple) and activate it as soon as the Control.Navigation control is activated and the opposite for deactivation. Does that make sense ? Alexandre Franz Okyere wrote: > Hi all, > > Nice to meet you. This happens to be my first posting on this list so you can choose to be extra nice. My query is on customising the navigation button to: > > i. on single click show popups > ii. on mouse drag pan or move map > iii. and on double click keep the dafault (zoom) > > I am working on a geomoose project (based on openlayers) > > Thanks a lot > > Franz > GIS Specialist > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users >??? -- Alexandre Dub? Mapgears www.mapgears.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/7c95e31b/attachment.html From hiebert at uvic.ca Wed Feb 24 12:52:03 2010 From: hiebert at uvic.ca (James Hiebert) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Help needed with using OpenLayers.Layer.Image In-Reply-To: <20100223235127.GH18708@basalt.uvic.ca> References: <20100223235127.GH18708@basalt.uvic.ca> Message-ID: <20100224175202.GB23570@basalt.uvic.ca> OpenLayers Users, I ended up figuring out the answer to my problem below. I had most of the geo-referencing correct, but the Image layer doesn't work with geotiffs (or tiffs for that matter), which I probably should have guessed. I converted the tiff to a gif (and probably could use a jpg, png or any other web image format), set the layer's maxResolution to be geotiff's resolution (in meters / pixel) and everything worked like a charm. Maybe it was already obvious to everyone else, but could someone add a little info to the API docs for OpenLayers.Layer.Image as to what image formats should be expected to work? ~James Hiebert On Tue, Feb 23, 2010 at 03:51:29PM -0800, James Hiebert wrote: > Hi All, > > I'm working on a project where I'd like to take an image raster and overlay > that on top of a OpenLayers base layer (from OpenStreetMap). I have my > raster in a geotiff which I have created from the data (climate temperature > data, not that it makes any difference). > > I'm having problems understanding what options and attributes I need to > actually set when creating the instance of OpenLayers.Layer.Image (the > documentation does not seem to be very complete or verbose). > > I've gdalwarp'ed my geotiff to match the projection of the base layer > (EPSG:900913). I'm fairly certain that my geotiff is fine... it loads into > QGIS fine and is displayed by standard image viewers like xview and eog > without problems. > > In my openlayers example I hard coded the bounds and the rater size based on > the output of tiffinfo and passed those to the constructor. Are the bounds > supposed to be map coordinates (EPSG:900913) or in LatLon? > > When I load the page, the base layer (OpenStreetMap) displays fine, but my > overlay ("Autumn tmax...") is greyed out in the layer switcher. The layer's > name is "climate" and if I do a: climate.calculateInRange() it returns > false. Seems that the auto resolution calculation is not working since > climate.resolutions and osm.resolutions (the base layer) are very, very > different. > > >>> climate.resolutions > [0.32142857142857145, 0.16071428571428573, 0.08035714285714286, > 0.04017857142857143, 0.020089285714285716, 0.010044642857142858, > 0.005022321428571429, 0.0025111607142857145, 0.0012555803571428572, > 0.0006277901785714286, 0.0003138950892857143, 0.00015694754464285715, > 0.00007847377232142858, 0.00003923688616071429, 0.000019618443080357144, > 0.000009809221540178572] > >>> osm.resolutions > [156543.0339, 78271.51695, 39135.758475, 19567.8792375, 9783.93961875, > 4891.969809375, 2445.9849046875, 1222.99245234375, 611.496226171875, > 305.7481130859375, 152.87405654296876, 76.43702827148438, 38.21851413574219, > 19.109257067871095, 9.554628533935547, 4.777314266967774, 2.388657133483887, > 1.1943285667419434, 0.5971642833709717] > > This is probably because I didn't supply an option that I'm supposed to, but > I can't figure it out. Could someone more knowledgable than I about the > Layer.Image take a look at it for me? > > My trimmed down example can be found here: > http://basalt.pcic.uvic.ca/index-mini.html > > Any help or suggestions is much appreciated. > > ~James Hiebert > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From arnd.wippermann at web.de Wed Feb 24 14:21:28 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Beginner issue In-Reply-To: <561c16701002231251g482c1a25g6c55a5ec718da598@mail.gmail.com> Message-ID: Hi, 1. you have to reproject your vector data (with EPSG:900913 and EPSG:4326 it is possible without proj4js) 2. you have to add your vector layer to your map 3. you have to center the map //! set projections for transformation your vectors (before wkt_f.read) wkt_f.internalProjection = new OpenLayers.Projection("EPSG:900913"); wkt_f.externalProjection = new OpenLayers.Projection("EPSG:4326"); //! add vector layer index_map.addLayer(hood_vector); //! set MouseDefaults for navigation index_map.addControl(new OpenLayers.Control.MouseDefaults()); //! center map index_map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); that should show your map. Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von ethio info Gesendet: Dienstag, 23. Februar 2010 21:51 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] Beginner issue Sorry to keep pestering you, but does anyone know what I am doing wrong? if anyone can make this work, and tell me how to fix it, I would be very grateful. thanks On Sun, Feb 21, 2010 at 3:23 PM, ethio info wrote: I understand what you are saying but my previous request was rejected because it was over the size limit. Here it is:

Woreda's

Select one of the 583 woreda's

On Sun, Feb 21, 2010 at 10:40 AM, Nicholas Efremov-Kendall wrote: you really need to post more code than that for someone to be able to help you. Are you using proj4.js to change your projection? OL only uses a few projections/coordinate systems natively. On Sun, Feb 21, 2010 at 2:39 AM, ethio info wrote: Hi, Please take a look at this site:http://projects.latimes.com/mapping-la/neighborhoods/. I have copied the source and cleaned it up of ads and so forth and have put in my data and I just can not see the overlay on the Google map. I will include the changes I made below. The only thing I can think of that is blocking my overlay is the bounds. Basically, I want the country of Ethiopia. Just to complicate things further, my overlay was showing when I did not use a spherical mercator projection but the overlay matched what is in Google maps ONLY when I zoomed in. so after reading some of the issues some people had, I figured I should use what is in the Mapping LA w/minor changes. Can someone suggest a solution? BTW, the overlay switch works and gives my overlay as a check box option to click on but it is not displayed on the Google map Here are my changes to the Mapping LA Neighborhood source: var max_extent = new OpenLayers.Bounds(860986,-4383204,5870363,3600489); index_map.addControl(new OpenLayers.Control.LayerSwitcher()); var hood_polygon_371 = wkt_f.read('MULTIPOLYGON (((39.2968382026 8.8274792477, 39.3135039775 8.748488041, 39.3016324666 8.742095689, 39.3036871512 8.7357033371, 39.269899005 8.6920983646, 39.2315448931 8.6608214995, 39.2265223308 8.645982111, 39.2479823696 8.6108241751, 39.2249242428 8.589135838, 39.2221846634 8.5756662392, 39.2306316999 8.5656211146, 39.257114301 8.5601419558, 39.2502653525 8.5464440587, 39.2139659251 8.5220161421, 39.1744703218 8.4606039034, 39.0858905871 8.385037171, 39.0758454626 8.3950822956, 39.0381762455 8.399419963, 39.0363498593 8.5128842107, 39.0671701278 8.5432478827, 39.0655720398 8.5562608849, 39.0872603769 8.5968979797, 39.0874886751 8.6528310595, 39.10415445 8.6825098366, 39.0982186945 8.6939247509, 39.1075789242 8.7101339291, 39.1603158281 8.742095689, 39.1840588498 8.7877553461, 39.1767533046 8.8019098398, 39.2014095194 8.8146945437, 39.2057471869 8.8039645243, 39.2199016805 8.8012249449, 39.2461559833 8.8299905288, 39.2710404964 8.8224566854, 39.2968382026 8.8274792477 )))'); hood_polygon_371.data = {'slug':' 371', 'name': '371'}; var hood_polygon_260 = wkt_f.read('MULTIPOLYGON (((39.506872625 9.3384108099, 39.5290175587 9.3116999105, 39.510068801 9.2838475198, 39.522853505 9.2751721849, 39.4963709039 9.2509725667, 39.5105253976 9.2502876718, 39.5089273096 9.2354482833, 39.5290175587 9.2133033496, 39.5598378272 9.2203805965, 39.5456833335 9.1938979954, 39.5376928935 9.1470968469, 39.5771884968 9.0621698849, 39.5447701403 9.0523530586, 39.4872389725 9.0171951227, 39.461212968 9.0137706484, 39.4299361029 9.0452758117, 39.4004856241 9.0596586037, 39.3701219522 9.1025786813, 39.3758294093 9.126321703, 39.3498034048 9.1690134823, 39.2920439386 9.1770039223, 39.281085621 9.1865924503, 39.2514068439 9.2676383415, 39.2509502473 9.3203752454, 39.2584840907 9.3308769665, 39.266702829 9.3265392991, 39.3011758701 9.2909247666, 39.3253754883 9.3107867174, 39.3824500596 9.293664346, 39.434045472 9.3477710396, 39.4589299851 9.3511955139, 39.506872625 9.3384108099 )))'); hood_polygon_260.data = {'slug':' 260', 'name': '260'}; var hood_vector = new OpenLayers.Layer.Vector("Wereda"); (hood_vector.addFeatures([hood_polygon_260,hood_polygon_371); var lon = 4387103; var lat = 1007363; var zoom = 0; _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/b679eca8/attachment.html From chris.green at ibstv.co.uk Wed Feb 24 14:38:45 2010 From: chris.green at ibstv.co.uk (Chris Green) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Selectfeature not firing In-Reply-To: <4B8549FF.6040903@mapgears.com> References: <008801cab557$e5e20ea0$b1a62be0$@green@ibstv.co.uk> <4B8549FF.6040903@mapgears.com> Message-ID: <00e201cab588$fa8faca0$efaf05e0$@green@ibstv.co.uk> Alex Can't really offer much more except that I observe that if I comment out selectCtrl.activate(); then I can drag the map to a new position when the cursor is over the feature on the vector layer delivered by WFS, but if the selectctrl is activated then dragging the map does not work when the cursor is in that position (but it does work if the cursor is anywhere else on the map). So there seems to be some kind of conflict caused by this control. Does this help? Regards, Chris -----Original Message----- From: Alexandre Dube [mailto:adube@mapgears.com] Sent: 24 February 2010 15:47 To: chris.green@ibstv.co.uk Cc: Users@openlayers.org Subject: Re: [OpenLayers-Users] Selectfeature not firing Chris, Could you share a live example or more code demonstrating your problem ? The code you pasted below doesn't seem to have any issue. Kind regards, Alexandre Chris Green wrote: > > Hello all > > Hope someone can help with what is probably a simple problem that I > don?t seem to be able to solve. I have created a vector layer which > has features taken from a wms layer: > > var wfs = new OpenLayers.Layer.Vector("Countries WFS", { > > styleMap: styleMap2, > > strategies: [new OpenLayers.Strategy.BBOX()], > > protocol: new OpenLayers.Protocol.WFS({ > > url: > "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/OLFurtherTest/htdocs/ wfsVectorGetFeature.map", > > featureType: "France", > > featureNS: "http://mapserver.gis.umn.edu/mapserver" > > }) > > }); > > map.addLayer(wfs); > > This works OK, but I want to be able to click to select an individual > feature so I added: > > var selectCtrl = new OpenLayers.Control.SelectFeature(wfs, > > {clickout: true} > > ); > > map.addControl(selectCtrl); > > selectCtrl.activate(); > > However the selectfeature control does not fire in response to any map > clicks. Can anyone suggest what I am missing? > > Chris > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Wed Feb 24 16:55:20 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Selectfeature not firing In-Reply-To: <00e201cab588$fa8faca0$efaf05e0$@green@ibstv.co.uk> References: <008801cab557$e5e20ea0$b1a62be0$@green@ibstv.co.uk> <4B8549FF.6040903@mapgears.com> <00e201cab588$fa8faca0$efaf05e0$@green@ibstv.co.uk> Message-ID: <4B85A048.4060102@mapgears.com> Chris, What you're describing is a normal behavior when the Navigation and SelectFeature control are both activated, yes. To resolve this, you could : * have a toolbar with your controls as buttons and only one is active at a time * have your SelectFeature control clicks work only while pressing a specific key (ctrl for example). This could be done by defining a 'keymask' to the Handler.Feature object of your SF control. * make the "select" on "hover" instead of "click", see an example [1] Hope this helps, Alexandre [1] http://openlayers.org/dev/examples/highlight-feature.html Chris Green wrote: > Alex > > Can't really offer much more except that I observe that if I comment out > selectCtrl.activate(); then I can drag the map to a new position when the > cursor is over the feature on the vector layer delivered by WFS, but if the > selectctrl is activated then dragging the map does not work when the cursor > is in that position (but it does work if the cursor is anywhere else on the > map). So there seems to be some kind of conflict caused by this control. > Does this help? > > > Regards, > > > > Chris > > > -----Original Message----- > From: Alexandre Dube [mailto:adube@mapgears.com] > Sent: 24 February 2010 15:47 > To: chris.green@ibstv.co.uk > Cc: Users@openlayers.org > Subject: Re: [OpenLayers-Users] Selectfeature not firing > > Chris, > > Could you share a live example or more code demonstrating your problem ? > The code you pasted below doesn't seem to have any issue. > > Kind regards, > > Alexandre > > > Chris Green wrote: > >> Hello all >> >> Hope someone can help with what is probably a simple problem that I >> don?t seem to be able to solve. I have created a vector layer which >> has features taken from a wms layer: >> >> var wfs = new OpenLayers.Layer.Vector("Countries WFS", { >> >> styleMap: styleMap2, >> >> strategies: [new OpenLayers.Strategy.BBOX()], >> >> protocol: new OpenLayers.Protocol.WFS({ >> >> url: >> >> > "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/OLFurtherTest/htdocs/ > wfsVectorGetFeature.map", > >> featureType: "France", >> >> featureNS: "http://mapserver.gis.umn.edu/mapserver" >> >> }) >> >> }); >> >> map.addLayer(wfs); >> >> This works OK, but I want to be able to click to select an individual >> feature so I added: >> >> var selectCtrl = new OpenLayers.Control.SelectFeature(wfs, >> >> {clickout: true} >> >> ); >> >> map.addControl(selectCtrl); >> >> selectCtrl.activate(); >> >> However the selectfeature control does not fire in response to any map >> clicks. Can anyone suggest what I am missing? >> >> Chris >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- Alexandre Dub? Mapgears www.mapgears.com From J.Phan at bom.gov.au Wed Feb 24 21:00:28 2010 From: J.Phan at bom.gov.au (John Phan) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Preloading WFS feature data [SEC=UNCLASSIFIED] Message-ID: <8ECEF889F305C8439DE8A3FD733264AD0197668F1BE2@BOM-VMBX-HO.bom.gov.au> Hi, I have a vector layer with some feature data. The layer is not visible at first (vectorLayer.setVisibility(false)), but made visible when user starts selecting an option. But I only want certain vector points drawn based on their feature attributes (i.e. vectorLayer.features.attributes.). When a user option is selected, I loop through all features (i.e. vectorLayer.features.length). Set renderIntent to no display ( OpenLayers.Style({display: "none"}) ) for the vector point if its feature attribute ( vectorLayer.features.attributes. ) does not match user input. This only works when all the feature data are loaded onto the browser. That is all features are drawn because I can't enter the loop the first time (length=0) Does anyone know how to preload those features before the layer is made visible the first time? Thanks, John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/68c4cecc/attachment.html From joepub1962 at gmail.com Wed Feb 24 22:54:25 2010 From: joepub1962 at gmail.com (Joe public) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Newbie questions In-Reply-To: References: <1266778535164-4608007.post@n2.nabble.com> <1266799464682-4609543.post@n2.nabble.com> <1266808951449-4610023.post@n2.nabble.com> Message-ID: <2f6614521002241954o30174c9cy1f49fd04cdcc6931@mail.gmail.com> Pablo: Thanks for your reply!! I've been trying to find out how to make the change that you suggested... But can't find an example anywhere and I knowledge of JavaScript is very limited So can you point me to any documentation or an example? Thanks On Mon, Feb 22, 2010 at 9:56 PM, pablo lopez wrote: > You're querying all visible layers ( queryVisible: true), try changing that > for: > layers:"yor list of layers" > > That should do it > > Regards > P > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/79119340/attachment.html From rahn at zhaw.ch Thu Feb 25 01:32:47 2010 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] LayerSwitcher Message-ID: <3F643797A078EB4FB02880080968098401CA1183@langouste.zhaw.ch> Hello list, Perhaps you can help me with another question. I try to make the layerswitcher more individual. First I want to show it at another place in an extra div and not at the right border. But I can't find where I have to do this. Then I want to change the color of the div. The darkblue is not good for my webside. I try to make it with css directly in my page. It works but I always get terrible blue span tags over the div and under the div object with the layer switcher. Can perhaps somebody help me to arrange the layerswitcher somewhere else on the screen with a width of 200px and a height of 500px. And can somebody tell me how to change the color of the div and the layernames? Thank you for your help. Greetings Hanno ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch www.iunr.zhaw.ch/geoinformatik -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/3f0e1aba/attachment.html From bartvde at osgis.nl Thu Feb 25 01:42:32 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] LayerSwitcher In-Reply-To: <3F643797A078EB4FB02880080968098401CA1183@langouste.zhaw.ch> References: <3F643797A078EB4FB02880080968098401CA1183@langouste.zhaw.ch> Message-ID: <1FA4EA0B-D460-41BD-B36C-4AC269628D6A@osgis.nl> Hi, the layerswitcher.html example already shows how to place it in another div. Wrt the other question, set the following API properties: /** * APIProperty: roundedCorner * {Boolean} If true the Rico library is used for rounding the corners * of the layer switcher div, defaults to true. */ roundedCorner: true, /** * APIProperty: roundedCornerColor * {String} The color of the rounded corners, only applies if roundedCorner * is true, defaults to "darkblue". */ roundedCornerColor: "darkblue", Best regards, Bart On Feb 25, 2010, at 7:32 AM, Rahn Hanno (rahn) wrote: > > Hello list, > > Perhaps you can help me with another question. I try to make the layerswitcher more individual. First I want to show it at another place in an extra div and not at the right border. But I can't find where I have to do this. Then I want to change the color of the div. The darkblue is not good for my webside. I try to make it with css directly in my page. It works but I always get terrible blue span tags over the div and under the div object with the layer switcher. Can perhaps somebody help me to arrange the layerswitcher somewhere else on the screen with a width of 200px and a height of 500px. And can somebody tell me how to change the color of the div and the layernames? > > Thank you for your help. > > Greetings > Hanno > > ------------------------------------------ > Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik > ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen > Fachstelle Geoinformatik > Gr?ental, Postfach CH-8820 W?denswil > Tel +41 (0)58 934 5592 > Fax +41 (0)58 934 5580 > hanno.rahn@zhaw.ch > www.iunr.zhaw.ch/geoinformatik > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/3d16fae8/attachment.html From paweluz at o2.pl Thu Feb 25 01:47:50 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] GWt + Openlayers - problem:GOOGLE layer appears in left corner In-Reply-To: <1266947019950-4620546.post@n2.nabble.com> References: <1266940063239-4619582.post@n2.nabble.com> <1266947019950-4620546.post@n2.nabble.com> Message-ID: <1267080470233-4630934.post@n2.nabble.com> Hi And! Thanks for your help. I do not have any method updateSize() on my map... Below is my code...I hope you could help me... I removed the WMS layer from the code, because with or without it I still got the same problem... private void initializeGooglLayer(){ GoogleOptions googleLayeroptions= new GoogleOptions(); googleLayeroptions.setIsBaseLayer(true); googleLayeroptions.setSphericalMercator(true); googleLayeroptions.setDisplayInLayerSwitcher(true); googleLayeroptions.setDisplayOutsideMaxExtent(true); GMapType gmapType = GMapType.G_NORMAL_MAP; googleLayeroptions.setType(gmapType); googleLayer = new Google("Goole Layer",googleLayeroptions); } private void initializeMap(){ MapOptions mapOptions = new MapOptions(); mapOptions.setControls(new JObjectArray(new JSObject[] {})); mapOptions.setNumZoomLevels(17); mapOptions.setMaxResolution((float) 156543.0339); Bounds myBounds = new Bounds(-20037508, -20037508,20037508, 20037508); mapOptions.setMaxExtent(myBounds); Projection myProjection = new Projection("EPSG:900913"); mapOptions.setProjection("EPSG:900913"); mapOptions.setDisplayProjection(myProjection); mapWidget = new MapWidget("750px", "600px", mapOptions); myMap = mapWidget.getMap(); this.initializeGooglLayer(); // initialize Google layer myMap.addLayers(new Layer[] {googleLayer}); myMap.addControl(new PanZoomBar()); myMap.addControl(new MousePosition()); myMap.addControl(new LayerSwitcher()); myMap.addControl(new Navigation()); LonLat center = new LonLat(1722814.18028, 6792060.56768); myMap.setCenter(center, 14); } public void onModuleLoad() { this.initializeMap(); openlayersPanel.add(mapWidget,DockPanel.CENTER); addPanel.add(openlayersPanel); mainPanel.add(addPanel); RootPanel.get("mainDiv").add(mainPanel); } Regards, Poul -- View this message in context: http://n2.nabble.com/GWt-Openlayers-problem-GOOGLE-layer-appears-in-left-corner-tp4619582p4630934.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Thu Feb 25 03:25:01 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] WFS + GWT Message-ID: <1267086301080-4631183.post@n2.nabble.com> Hi! I have no idea what is going on but I can not create the simplest WFS layer !! My code: WFSOptions wfsOptions = new WFSOptions(); WFSParams wfsParams =new WFSParams();// ERROR !!!!!!! wfsParams.getJSObject().setProperty( "typename", "topp:zielona_openstreets"); wfsLayer = new WFS( "wfs", " http://localhost:8080/geoserver/wfs?", wfsParams , wfsOptions ); The suggestion is: Add argument to match WFSParams(JSObject) So I made WFSParams wfsParams = new WFSParams(null); and it still error!!! I do not get it. I was looking into this post... https://sourceforge.net/mailarchive/forum.php?thread_name=a09537371002130236v74e345dqa190e107e3a2c2ed%40mail.gmail.com&forum_name=gwt-openlayers-users ...and in that case everything works How come it works somewhere but not in my case?? Any ideas... Regards, Poul -- View this message in context: http://n2.nabble.com/WFS-GWT-tp4631183p4631183.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rahn at zhaw.ch Thu Feb 25 03:32:36 2010 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] LayerSwitcher In-Reply-To: <1FA4EA0B-D460-41BD-B36C-4AC269628D6A@osgis.nl> References: <3F643797A078EB4FB02880080968098401CA1183@langouste.zhaw.ch> <1FA4EA0B-D460-41BD-B36C-4AC269628D6A@osgis.nl> Message-ID: <3F643797A078EB4FB02880080968098401CA11AB@langouste.zhaw.ch> hello again, I try to realise Barts tips, but I have a little problem it doesn't work and I don't see my fault. I can't "delete" the rounded Corners of my layerswitcher. Perhaps somebody can give me a code example? I try it like this in my openlayers side: //create the layerswitcher map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('mapSwitcher')},{roundedCorner:false})); //make the background not transparent and gray if (navigator.appName == 'Microsoft Internet Explorer') { document.getElementById('OpenLayers.Control.LayerSwitcher_32_layersDiv').style.filter ="alpha(opacity = 100)"; } if (navigator.appName == 'Netscape') { document.getElementById('OpenLayers.Control.LayerSwitcher_32_layersDiv').style.opacity ="1"; } document.getElementById('OpenLayers.Control.LayerSwitcher_32_layersDiv').style.backgroundColor="#e9e9e4"; // to place the layerswitcher div OpenLayers.Util.getElement('mapSwitcher').style.width = "200"; OpenLayers.Util.getElement('mapSwitcher').style.color = "black"; OpenLayers.Util.getElement('mapSwitcher').style.position = "absolute"; OpenLayers.Util.getElement('mapSwitcher').style.top = "400"; OpenLayers.Util.getElement('mapSwitcher').style.left = "5"; you can see my side here: http://webgis.hsw.ch/GINES_V1.2/Start.php Greetings and a lot of thanks Hanno Rahn ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch www.iunr.zhaw.ch/geoinformatik ________________________________ Von: Bart van den Eijnden [mailto:bartvde@osgis.nl] Gesendet: Donnerstag, 25. Februar 2010 07:43 An: Rahn Hanno (rahn) Cc: users@openlayers.org Betreff: Re: [OpenLayers-Users] LayerSwitcher Hi, the layerswitcher.html example already shows how to place it in another div. Wrt the other question, set the following API properties: /** * APIProperty: roundedCorner * {Boolean} If true the Rico library is used for rounding the corners * of the layer switcher div, defaults to true. */ roundedCorner: true, /** * APIProperty: roundedCornerColor * {String} The color of the rounded corners, only applies if roundedCorner * is true, defaults to "darkblue". */ roundedCornerColor: "darkblue", Best regards, Bart On Feb 25, 2010, at 7:32 AM, Rahn Hanno (rahn) wrote: Hello list, Perhaps you can help me with another question. I try to make the layerswitcher more individual. First I want to show it at another place in an extra div and not at the right border. But I can't find where I have to do this. Then I want to change the color of the div. The darkblue is not good for my webside. I try to make it with css directly in my page. It works but I always get terrible blue span tags over the div and under the div object with the layer switcher. Can perhaps somebody help me to arrange the layerswitcher somewhere else on the screen with a width of 200px and a height of 500px. And can somebody tell me how to change the color of the div and the layernames? Thank you for your help. Greetings Hanno ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch www.iunr.zhaw.ch/geoinformatik _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/94d05d8e/attachment.html From christoph at lingg.eu Thu Feb 25 03:52:29 2010 From: christoph at lingg.eu (Christoph Lingg) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Click on OpenLayers.Feature.Vector Message-ID: <20100225085229.C444A18EFCBC1@dd19100.kasserver.com> Hello! I changed from GoogleMap to OpenLayers, and although I enjoy to use the opensource equivalent, sometimes I feel lost in the OL documentation ;-) Would anyone be so kind and could give me hint how to achieve this very low level problem: I have a Vector Layer (I can't use marker class as I use the dragging feature as well) to which I add some Feature Vector, that are displayed on the map. What I need now is triggering an event when a feature was clicked. Very basically my code looks like this: > layer = new OpenLayers.Layer.Vector("layer"); > map.addLayers([layer]); > ftr = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lon, lat), null, styleMarker); // an icon > layer.addFeatures([ftr]); I tried different approaches that never worked out! What is the right way to go? Thank you in advance for any help! Christoph From dalda at ikt.es Thu Feb 25 04:38:51 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] RV: RV: Problems with overview map and Chrome Message-ID: <224DBDAF88A6AC47BD22432815351BE007C73F0C@nekaposta1> Nobody knows why this could be happening? -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de David Alda Fernandez de Lezea Enviado el: mi?rcoles, 24 de febrero de 2010 10:00 Para: openlayers users Asunto: [OpenLayers-Users] RV: Problems with overview map and Chrome I forgot to note that this works in FireFox 3.6 and IE8. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de David Alda Fernandez de Lezea Enviado el: martes, 23 de febrero de 2010 17:34 Para: openlayers users Asunto: [OpenLayers-Users] Problems with overview map and Chrome Hi, I'm having some troubles with overviewMap control and chrome, when I click (+) to expand the control, it appears on the left top corner of the control, on the right bottom corner of the map, and I can?t see what's in it. I've read something about this problem related with chrome and using layer.clone() but the example of the openlayers webpage works perfect with chrome, and also the layer I'm using with the overview map is a totally different layer. In fact it's not added to the map. My code: var wms = new OpenLayers.Layer.WMS("mapOverView","http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wms.map", {layers: 'mapOverView',format: 'image/png; mode=24bit',alpha : 'true',transparent: 'true'},{isBaseLayer: true,projection: 'EPSG:23030',units: 'm'}); var opt = {mapOptions: {projection: new OpenLayers.Projection("EPSG:23030"),units: 'm',numZoomLevels: [1],maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, 4820000), maxResolution: 'auto'}, layers: [wms]}; var ovmCtrl = new OpenLayers.Control.OverviewMap(opt); What could be happening?? TIA. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From kristian_frost7 at hotmail.com Thu Feb 25 05:37:24 2010 From: kristian_frost7 at hotmail.com (Frost89) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Custom toolbars outside the map Message-ID: <1267094244366-4631691.post@n2.nabble.com> Hi all I'm trying to add a custom toolbar to my map webapp. I was trying to use Control.Panel, but besides the standard controls in OpenLayers I also need to add some custom function such as print/user management and some others. So I was thinking if I would be able to make my own toolbar (I'm using a standard HTML
    ) and then add a onClick handler, which could set the active tool to eg. being zoom in. Or are there any other alternatives? / Kristian -- View this message in context: http://n2.nabble.com/Custom-toolbars-outside-the-map-tp4631691p4631691.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Bytechanger at gmx.de Thu Feb 25 05:54:42 2010 From: Bytechanger at gmx.de (Bytechanger) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] NavToolbar BUG ?? ScrollWheel Zoom / MapClick ? In-Reply-To: <4B7E651F.4030303@terrestris.de> References: <1266564154236-4596496.post@n2.nabble.com> <4B7E651F.4030303@terrestris.de> Message-ID: <4B8656E2.2050400@gmx.de> Hi, sorry, I wasn?t here last time... I use the following Code to implement the Toolbar... ------------------------------------------------------------ map = new OpenLayers.Map('map', { maxExtent: new OpenLayers.Bounds(maxExtend_minLON, maxExtend_minLAT, maxExtend_maxLON, maxExtend_maxLAT), restrictedExtent: new OpenLayers.Bounds(Lon2Merc(minlon),Lat2Merc(minlat), Lon2Merc(maxlon),Lat2Merc(maxlat)), numZoomLevels: ZoomLevels, //17, eventListeners: { "zoomend": mapEvent }, maxResolution: 156543, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), // Kartenprojektion displayProjection: new OpenLayers.Projection("EPSG:4326"), controls: [ new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.ScaleLine(), new OpenLayers.Control.NavToolbar() ] }); map.events.register("mousedown", map, mapclick); // THIS doesn? t work also when i use NavToolbar ------------------------------------------------------------------------------------ Greetings Byte Am 19.02.2010 11:17, schrieb Marc Jansen: > Hi Byte, > > which other controls are added to the map? Are you using controls: [] > within the config object to OpenLayers.Map? > > Regards, > Marc > > > Bytechanger wrote: >> Hi, >> >> when I add the NavToolbar to my map then : >> >> - when I scroll with the mousewheel, the zoom-level steps not 10, 11, 12 >> it steps 10,12,14, ... >> - the mousclick event doesn?t work anymore ! >> >> when I remove the toolbar all this thinks works fine ! >> >> Greetings >> >> Byte >> > -- View this message in context: http://n2.nabble.com/NavToolbar-BUG-ScrollWheel-Zoom-MapClick-tp4596496p4631766.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/36c9de41/attachment.html From afrozk at gmail.com Thu Feb 25 05:55:10 2010 From: afrozk at gmail.com (Afroz Kannancheri) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Getfeatureinfo and MSsql 2008 server Message-ID: <1267095310526-4631771.post@n2.nabble.com> Hi All, I have a layer drawn from the shape information stored in MSSQL 2008 server. The layer has around 300 polygons which are drawn perfectly on a world base map. When i try to get the details for each polygon using the Getfeatureinfo during the click event, i get the following error from MSSQL 2008 server. msMSSQL2008LayerGetShape(): Query error. Error executing MSSQL2008 SQL statement: SELECT convert(varchar(max), numb1),convert(varchar(max), poprate),geom.STAsBinary(),convert(varchar(20), ID) from table1 WHERE geom.STIntersects(Geometry::STGeomFromText('POLYGON((-16.4101563310658 17.724609875,-16.4101563310658 17.724609875,-16.4101563310658 17.724609875,-16.4101563310658 17.724609875,-16.4101563310658 17.724609875))',0)) = 1 -[Microsoft][ODBC SQL Server Driver][SQL Server]A .NET Framework error occurred during execution of user defined routine or aggregate 'geometry': System.FormatException: 24118: The Polygon input is not valid because the exterior ring does not have enough points. Each ring of a polygon must contain at least three distinct points. System.FormatException: at Microsoft.SqlServer.Types.GeometryDataBuilder.EndFigure() at Microsoft.SqlServer.Types.OpenGisWktReader.ParseLineStringText(FigureAttributes attributes) at Microsoft.SqlServer.Types.OpenGisWktReader.ParsePolygonText() at Microsoft.SqlServer.Types.OpenGisWktReader.ParsePolygonTaggedText() at Microsoft.SqlServer.Types.OpenGisWktReader.ParseGeometryTaggedText() at Microsoft.SqlServer.Types.OpenGisWktReader.ReadGeometry() at Microsoft.SqlServer.Types.SqlGeometry.STGeomFromText(SqlChars geometryTaggedText, Int32 srid) Has anyone faced such an issue before. Thanks and regards Afroz Kannancheri -- View this message in context: http://n2.nabble.com/Getfeatureinfo-and-MSsql-2008-server-tp4631771p4631771.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Thu Feb 25 06:56:00 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] WFS + GWT, WFSParams problem In-Reply-To: <1267086301080-4631183.post@n2.nabble.com> References: <1267086301080-4631183.post@n2.nabble.com> Message-ID: <1267098960638-4631990.post@n2.nabble.com> Problem solved thanks to Edvin! There is missing constructor for WFSParam. This code deals with the problem. public class WFSParamsExt extends WFSParams { protected WFSParamsExt(JSObject jsObject) { super(jsObject); } public WFSParamsExt(){ this(JSObject.createJSObject()); } } Cheers, Poul -- View this message in context: http://n2.nabble.com/WFS-GWT-WFSParams-problem-tp4631183p4631990.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From greenkov at gmail.com Thu Feb 25 07:17:31 2010 From: greenkov at gmail.com (Alexander Petkov) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Custom toolbars outside the map In-Reply-To: <1267094244366-4631691.post@n2.nabble.com> References: <1267094244366-4631691.post@n2.nabble.com> Message-ID: > So I was thinking if I would be able to make my own toolbar (I'm using a > standard HTML
      ) and then add a onClick handler, which could set the > active tool to eg. being zoom in. This should work. I am using the same concept with Mapfish. Alex From ahocevar at opengeo.org Thu Feb 25 08:31:27 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Preloading WFS feature data [SEC=UNCLASSIFIED] In-Reply-To: <8ECEF889F305C8439DE8A3FD733264AD0197668F1BE2@BOM-VMBX-HO.bom.gov.au> References: <8ECEF889F305C8439DE8A3FD733264AD0197668F1BE2@BOM-VMBX-HO.bom.gov.au> Message-ID: <4B867BAF.3030205@opengeo.org> Hi, you should loop through your feature in a listener function to the "loadend" event of the layer. Also, if you are using Layer.Vector with Protocol.WFS, you can provide a filter property on the layer, configured with an OpenLayers.Filter, to filter your features on the server side, instead of loading them all and filtering on the client. Another option, if you want to stick with loading all features to the client, is to provide a StyleMap, configured with a Style that has a context option, where you can set the symbolizer's "display" property to "none" in a context function, for features that you don't want to show up. Look at the examples [1] and [2] to get a clue of how this works. Regards, Andreas. [1] http://openlayers.org/dev/examples/wfs-protocol.html [2] http://openlayers.org/dev/examples/styles-context.html John Phan wrote: > Hi, > > I have a vector layer with some feature data. The layer is not > visible at first (vectorLayer.setVisibility(false)), but made visible > when user starts selecting an option. But I only want certain vector > points drawn based on their feature attributes (i.e. > vectorLayer.features.attributes.). > > When a user option is selected, I loop through all features (i.e. > vectorLayer.features.length). Set renderIntent to no display ( > OpenLayers.Style({display: "none"}) ) for the vector point if its > feature attribute ( vectorLayer.features.attributes. ) does not > match user input. > > This only works when all the feature data are loaded onto the > browser. That is all features are drawn because I can't enter the > loop the first time (length=0) > > Does anyone know how to preload those features before the layer is > made visible the first time? > > Thanks, John > > > > > > ------------------------------------------------------------------------ > > > _______________________________________________ Users mailing list > Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Thu Feb 25 08:36:48 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Click on OpenLayers.Feature.Vector In-Reply-To: <20100225085229.C444A18EFCBC1@dd19100.kasserver.com> References: <20100225085229.C444A18EFCBC1@dd19100.kasserver.com> Message-ID: <4B867CF0.4060908@opengeo.org> Hi, you need to create an OpenLayers.Control.SelectFeature instance, configure it with your vector layer, and add it to the map. You can then listen for the layer's "featureselected" event. See the [1] example if you need a code snippet. The example does exactly the same, but on two different layers instead of just one. Regards, Andreas. [1] http://openlayers.org/dev/examples/select-feature-multilayer.html Christoph Lingg wrote: > Hello! > > I changed from GoogleMap to OpenLayers, and although I enjoy to use the opensource equivalent, sometimes I feel lost in the OL documentation ;-) > > Would anyone be so kind and could give me hint how to achieve this very low level problem: I have a Vector Layer (I can't use marker class as I use the dragging feature as well) to which I add some Feature Vector, that are displayed on the map. What I need now is triggering an event when a feature was clicked. Very basically my code looks like this: >> layer = new OpenLayers.Layer.Vector("layer"); >> map.addLayers([layer]); >> ftr = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lon, lat), null, styleMarker); // an icon >> layer.addFeatures([ftr]); > I tried different approaches that never worked out! What is the right way to go? > > Thank you in advance for any help! > > Christoph > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Thu Feb 25 08:40:17 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] RV: RV: Problems with overview map and Chrome In-Reply-To: <224DBDAF88A6AC47BD22432815351BE007C73F0C@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE007C73F0C@nekaposta1> Message-ID: <4B867DC1.3050000@opengeo.org> David Alda Fernandez de Lezea wrote: > Nobody knows why this could be happening? I suspect that it is a css problem. Make sure that you have included theme/default/style.css as css resource in your web page, and try to temporarily disable all other css definitions on your page to find the offending one. Regards, Andreas. > > -----Mensaje original----- De: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] En nombre de David Alda > Fernandez de Lezea Enviado el: mi?rcoles, 24 de febrero de 2010 10:00 > Para: openlayers users Asunto: [OpenLayers-Users] RV: Problems with > overview map and Chrome > > I forgot to note that this works in FireFox 3.6 and IE8. > > -----Mensaje original----- De: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] En nombre de David Alda > Fernandez de Lezea Enviado el: martes, 23 de febrero de 2010 17:34 > Para: openlayers users Asunto: [OpenLayers-Users] Problems with > overview map and Chrome > > Hi, > > I'm having some troubles with overviewMap control and chrome, when I > click (+) to expand the control, it appears on the left top corner of > the control, on the right bottom corner of the map, and I can?t see > what's in it. I've read something about this problem related with > chrome and using layer.clone() but the example of the openlayers > webpage works perfect with chrome, and also the layer I'm using with > the overview map is a totally different layer. In fact it's not added > to the map. My code: > > var wms = new > OpenLayers.Layer.WMS("mapOverView","http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wms.map", > {layers: 'mapOverView',format: 'image/png; mode=24bit',alpha : > 'true',transparent: 'true'},{isBaseLayer: true,projection: > 'EPSG:23030',units: 'm'}); > > var opt = {mapOptions: {projection: new > OpenLayers.Projection("EPSG:23030"),units: 'm',numZoomLevels: > [1],maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, > 4820000), maxResolution: 'auto'}, layers: [wms]}; > > var ovmCtrl = new OpenLayers.Control.OverviewMap(opt); > > What could be happening?? > > TIA. > > > Un saludo, > > ?????????????????????????????????????????????????????????????????????????????????? > > > David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / > Dpto. de Territorio y Biodiversidad > > IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > ?????????????????????????????????????????????????????????????????????????????????? > _______________________________________________ Users mailing list > Users@openlayers.org http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list > Users@openlayers.org http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list > Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Thu Feb 25 08:44:54 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Custom toolbars outside the map In-Reply-To: <1267094244366-4631691.post@n2.nabble.com> References: <1267094244366-4631691.post@n2.nabble.com> Message-ID: <4B867ED6.4050700@opengeo.org> Frost89 wrote: > Hi all > > I'm trying to add a custom toolbar to my map webapp. I was trying to use > Control.Panel, but besides the standard controls in OpenLayers I also need > to add some custom function such as print/user management and some others. > > So I was thinking if I would be able to make my own toolbar (I'm using a > standard HTML
        ) and then add a onClick handler, which could set the > active tool to eg. being zoom in. > > Or are there any other alternatives? There are many ways to do it for sure. But the OpenLayers way would be to use Control.Panel, configure it with the div that you want it to be rendered in (i.e. some container outside the map), and use OpenLayers.Control.Button for your custom controls. Look at the [1] example to see which css classes you need to give your custom controls the icons you want, and [2] to see how to place it outside the map. Regards, Andreas. [1] http://openlayers.org/dev/examples/panel.html [2] http://openlayers.org/dev/examples/editingtoolbar-outside.html > > / Kristian -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From antoni.vidal at icc.cat Thu Feb 25 08:46:59 2010 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Mouse stop Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D675B@CORRIOL.icc.local> Hello, I need to detect when mouse stops, witch event I have to register? Thank's in advance Antoni Vidal Unitat d'Aplicacions SIG-WEB Ext. 3228 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/564be8fb/attachment.html From shawn at niagarafalls.ca Thu Feb 25 09:32:48 2010 From: shawn at niagarafalls.ca (Shawn Oatley) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Mouse stop In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D675B@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D675B@CORRIOL.icc.local> Message-ID: <4B8643C0.D927.0016.0@niagarafalls.ca> mousemove would probably what you will want to tie into and then set a timeout on it which would get reset each time mousemove gets fired. When the timeout gets fired, it should call your mousestop even. Play with the timeout value until you are happy with the amount of time it waits before considering it a 'mouse stop'. Shawn >>> On 2/25/2010 at 8:46 AM, "Vidal, Antoni" wrote: Hello, I need to detect when mouse stops, witch event I have to register? Thank*s in advance Antoni Vidal Unitat d'Aplicacions SIG-WEB Ext. 3228 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/e292ec14/attachment.html From dalda at ikt.es Thu Feb 25 10:01:21 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] RV: RV: Problems with overview map and Chrome Message-ID: <224DBDAF88A6AC47BD22432815351BE007C7415B@nekaposta1> Thanks for your response. I've tried what you told me but without success. I've made my own style to specify some different things, but I've got a demo app that I did some time ago with same style and it works on Chrome. It's something strange. In theory the style of the overview map is created dynamically, isn't it? I don't really know what to do. I'll give it a try in some days, and if it doesn't work I'll give up using it in chrome. Thanks anyway. David Alda Fernandez de Lezea wrote: > Nobody knows why this could be happening? I suspect that it is a css problem. Make sure that you have included theme/default/style.css as css resource in your web page, and try to temporarily disable all other css definitions on your page to find the offending one. Regards, Andreas. > > -----Mensaje original----- De: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] En nombre de David Alda > Fernandez de Lezea Enviado el: mi?rcoles, 24 de febrero de 2010 10:00 > Para: openlayers users Asunto: [OpenLayers-Users] RV: Problems with > overview map and Chrome > > I forgot to note that this works in FireFox 3.6 and IE8. > > -----Mensaje original----- De: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] En nombre de David Alda > Fernandez de Lezea Enviado el: martes, 23 de febrero de 2010 17:34 > Para: openlayers users Asunto: [OpenLayers-Users] Problems with > overview map and Chrome > > Hi, > > I'm having some troubles with overviewMap control and chrome, when I > click (+) to expand the control, it appears on the left top corner of > the control, on the right bottom corner of the map, and I can?t see > what's in it. I've read something about this problem related with > chrome and using layer.clone() but the example of the openlayers > webpage works perfect with chrome, and also the layer I'm using with > the overview map is a totally different layer. In fact it's not added > to the map. My code: > > var wms = new > OpenLayers.Layer.WMS("mapOverView","http://192.168.1.65/cgi-bin/mapser > v.exe?map=../htdocs/MFD/ejemplo_wms.map", > {layers: 'mapOverView',format: 'image/png; mode=24bit',alpha : > 'true',transparent: 'true'},{isBaseLayer: true,projection: > 'EPSG:23030',units: 'm'}); > > var opt = {mapOptions: {projection: new > OpenLayers.Projection("EPSG:23030"),units: 'm',numZoomLevels: > [1],maxExtent: new OpenLayers.Bounds(460000, 4710000, 610000, > 4820000), maxResolution: 'auto'}, layers: [wms]}; > > var ovmCtrl = new OpenLayers.Control.OverviewMap(opt); > > What could be happening?? > > TIA. > > > Un saludo, > > ?????????????????????????????????????????????????????????????????????? > ???????????? > > > David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / > Dpto. de Territorio y Biodiversidad > > IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > ?????????????????????????????????????????????????????????????????????? > ???????????? _______________________________________________ Users > mailing list Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list > Users@openlayers.org http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list > Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From EGoss at Geosyntec.com Thu Feb 25 10:13:09 2010 From: EGoss at Geosyntec.com (EGoss@Geosyntec.com) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] KML Message-ID: <4659515AEAC40A4788B346D2B21698C1488B229530@EXCHANGE-00.GeoSyntec.net> Does anyone know why the line(s) below would return 'null' or null? xmlDoc.getElementsByTagName("description")[0].childNodes[0].nodeValue; Thanks! ///////////////////////PARSING OUT KML INFORMATION////////////////////////////////////// OpenLayers.loadURL(kmlLayer.url, '', this, setKML); ///////////////////////////////////////////////////////////////////////////////////////////// function setKML(response) { if (response.responseText.indexOf('no results') == -1) { alert(response.responseText); var xmlDoc = response.responseXML.documentElement; //var xmlDoc = response.responseText; var name = xmlDoc.getElementsByTagName("name")[0].childNodes[0].nodeValue; alert(name); var description = xmlDoc.getElementsByTagName("description")[0].childNodes[0].nodeValue; alert(description); var coordinates = xmlDoc.getElementsByTagName("coordinates")[0].childNodes[0].nodeValue; alert(coordinates); var content = ''; content += ''; content += ''; content += '
        NameDescriptionCoordinates
        '+name+''+description+''+coordinates+'
        '; document.getElementById('content').innerHTML = content; } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/b6e30aaa/attachment.html From Atle.Frenvik.Sveen at geomatikk.no Thu Feb 25 10:19:34 2010 From: Atle.Frenvik.Sveen at geomatikk.no (Sveen Atle Frenvik (Geomatikk IKT)) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Mouse stop In-Reply-To: <4B8643C0.D927.0016.0@niagarafalls.ca> References: <784FAC631C0CB14CAE68764151D5DA41081D675B@CORRIOL.icc.local> <4B8643C0.D927.0016.0@niagarafalls.ca> Message-ID: <02656758FFFCDF4D9CC79BC33EBC55F880E446@TD-VIRT-EX-01.geomatikk.ad> REMOVED_BY_THE_EXCHANGE_EMAIL_SCANNING_SERVICE_008BC5E7_55E9F026D000000 GUID::= 695731b2-611a-4e58-847c-ac52466d2628 PATH::= !CRYPT!840D757A8080D0C76A26FF81F3FA70208F6A98816EB00D12DB336E0E9CCCAFD62668D88A1AD46A6A8FC2A126F4F9B166A5C3D60A992565F4A7A65F24E2C229CDD2D32107744!84073BA692635189B9E1EB87F821836BC06D0663E3042BDD857008A3FBAE037649B6848CB28DD632798FA6CFB4288F0B6C003C8299803A022B95E1338DC6BC196B93D1A0746!84079C28BD1DCE1D04C4F0751E1A4393044A085499E9351764FC37C335DD7FC8CD50D56FA3B88F70DC2396BEA9F78B7A8B0D82273E7F88899DA38618626B298DA104E687648!840C88983C6599DB209E6D3F6FC0F741086A4841236840ACC3177236D83C5D1BFA3E4B30FB51FA0A64C113CA14ED3E2AE3581F69C0E8DB217184FEF2849388AD90D4015763F!84021F62F7265D89AD27638E600989B2A9130AE119C3309D33CD1BFB5F0EF09D69412414EC78FE17C420C9603F09599DDE2F3F32B069991C145EFDA5E4521806F73496D0044!840FE51F8438A8EC288F84D2F5D180C864243F38C17FDB9FF16C3C41CEE7CCD8DAD099C66879732195F94BF6AC3BFDEFFBECCFFFDAF201C4A2A034DE03E0D48C1783F170935!840B110B5D768BBCAFC47E1A151E709AC93EA7D02FEFD7B1FC507B6CA9D38E073B5748E439D3BBB652CFB36344F7468E0D01F1817D7BA0209A0446DCC78A3B1025C4B687149!8401485F8997099CE185BCD36FA69B474B6136BE63184F94571104FD2B6CE8D310B44779EDE14EA43BABB275E84BBF4113C878B9DF2D60360B46EC0738396EAC37243130945!840D7BC44E8BDFEE5A974107084E47A67A1E0687D66B2379E995B353D765F41BD79B80ACCD697536D392A821B22B0A5F3048600267CB720330F1AE55EF9A403E56B3E157537!8406EB65460ABF46FD445E90CD4DF01D7CD2F02B7BB3ABC00E7AE39CF94322E6D81CF562B8C8855E6ACC5EEA57A8992CA315C8089B9556F98365529A57508DDBD544815073A!840492F22B359B1C2194DB19087736E14B37C12728A9DB7F53BBFD4AA3E5EE55D36492EE6E250946926D029BF1D9C267EDE7D9EE21CE3347BAD221910D7EA1DBA9B366A7940!8405CF0A28882526B8EE6F609434D551BFA71F6BB406FCD0B252880EF7F4AC9D9158A2F6E8D10634941557FD5EB3951EEA18E06664F8AA8C080C3B20B0925C774714B6B0834!840D70E7F6837F02D27ED8E396D2CE1524B5ED478B2A812F1A3F7E4B9A5E078BDFF935D574DB1A6821E277C116A3951F4A01DD73ACD8F2DEDFA16DD76173E21A39F3C687C4C!84008084EFEF1442AD8EB4888FDA019E82637A99D25A1E59450A6876E4F0D9BE782A1D091A4CBD8F56627727F044A512BFE3BE3CBB7538F0C48602B4204051D4A0B40140B3D!840EB7398D97EE91F0DEC2386B9E7F9A8FBDBF8A9972EB6E5E33D2B0D00FFC19FC97C14480585402F0A227934A928D37374B774D7D324351D4DB16D2BD41668DB354D690B3B!840F09CA8A241BBE38AFB7E10F9D8E2D18D65071C26347BCAEA7505E0C16F5F3D9AA6B009C9BB58FE00A65E4F2F7013ECDDAD0053F3DA8D696FCE774C0EDA2D15E63264083E!8401D5362048ADEF157DC7CE38E02B0CC680EC79B8F4379D0A87A273F500A39B7909D99FE994090AB6BB74F0D6407F22F51777EE17F1E037B50FC847D721B53D24C451D0831!8406AE580CB3A1E056C2BA0C3A6B6F1B8DE4ABF43BADFFF89E3E2CD96B90AB397F021C4FCAA50B15A70632818568756A0C930A9C7C35CEDF4F1F9AA2982F2246AF449177C36!840A7317CA042FB4CF7963271DE489759C269DF067E45F4D9CE7D189A1BA6398444CE92659DE313030B2057E3AC8FCB5EF74595A378E917735D85CD2D28AE003B463E1F7D36!8403C0ECC30F40C9ED55FCA482FF0F16ACC7A58AF9C9FD378C85EF939258FC75AB0F64458CBBE50129E15BE859A90BCC492F87E0513510EA7B109CA09F308B9BB793D157D4D!840EF791CD9D532D21EEACBFD9E2EBCBE77F005E5D54E986ADD423366EC3EAA6F67414892C94C0650009326D462120C8D7D38759E1CD198D70CF576593C3FF052BF42187D40!840E6E90B3A1D97C3202E3D6A065C55C16FF2F8ADC8231A5C4C529BE3174FDAD9C706A33957303F33C6597AB20EC32C5C7909F5C93933210B8630835B9223202CB94E1A7031!8405A47C9791D5118B4C3A71331538B855DF6AB50066C467602F8591B2E490F6C90F7ABDEC0B072CFCF4A4650318C3FDDD7E23280199FC87B2F44596FF382E9D40332647049!84042F582944360A1FAD79B881CE77F941D4E3DC975A76EF191C4CF6B09299AED9FA56B06B4ECA7BD6A85712054BEF78660E2436DA7E3246762B19DA8D5F95C23374A667139!527CC25016465748671468B7C326E84A776EC01CF562F7A0DE27FC5630C4ED73083984B0C706A7707B00B554408 FILENAME::= TYPE::= text/html CHARSET::= iso-8859-15 REASON::= PROFANITY SERVER::= TD-VIRT-EX-01 END::= REMOVED_BY_THE_EXCHANGE_EMAIL_SCANNING_SERVICE_008BC5E7_55E9F026D000000 A policy violated content was detected and removed from the original mail entity. You can safely save or delete this replacement attachment. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/49f1f4e4/attachment.html From Atle.Frenvik.Sveen at geomatikk.no Thu Feb 25 10:31:17 2010 From: Atle.Frenvik.Sveen at geomatikk.no (Sveen Atle Frenvik (Geomatikk IKT)) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Mouse stop In-Reply-To: <02656758FFFCDF4D9CC79BC33EBC55F880E446@TD-VIRT-EX-01.geomatikk.ad> References: <784FAC631C0CB14CAE68764151D5DA41081D675B@CORRIOL.icc.local> <4B8643C0.D927.0016.0@niagarafalls.ca> <02656758FFFCDF4D9CC79BC33EBC55F880E446@TD-VIRT-EX-01.geomatikk.ad> Message-ID: <02656758FFFCDF4D9CC79BC33EBC55F880E447@TD-VIRT-EX-01.geomatikk.ad> Oops, as I tried to say: I came across this problem a while ago, and came up with something like this (as was outlined by Shawn) MouseOver = OpenLayers.Class({ ????????? map: null, ????????? timer: null,????????? ????????? prevXY: null, ????????? ????????? /** ???????????? * ???????????? * ???????????? * @param map the map ???????????? * @param options options ???????????? */ ????????? initialize: function(map, options) { ????????????????????? OpenLayers.Util.extend(this, options); ????????????????????? this.map = map; ????????? }, ????????? /** ???????????? * ???????????? */ ????????? activate: function () { ????????????????????? if (this.active) { ????????????????????????????????? return false; ????????????????????? } ????????????????????? this.map.events.register("mousemove", this, this.mouseMoveListener); ????????????????????? this.active = true; ????????????????????? return true; ????????? }, ????????? /** ???????????? * ???????????? */ ????????? deactivate: function (notremove) { ????????????????????? if (!notremove) { ????????????????????????????????? this.removePopups(); ????????????????????? } ????????????????????? if (this.active) { ????????????????????????????????? this.map.events.unregister("mousemove", this, this.mouseMoveListener); ????????????????????????????????? this.active = false; ????????????????????????????????? return true; ????????????????????? } ????????????????????? return false; ????????? }, ????????? /** ???????????? * ???????????? * Listens for mouse movements, and uses timers to detect a "mouse stop event" ???????????? * ???????????? * @param evt ???????????? */ ????????? mouseMoveListener: function(evt) { ????????????????????? //disable if shiftKey is presses (as we do not want to interfere with zooming) ????????????????????? if (!evt.shiftKey) { ????????????????????????????????? if (this.timer) { ????????????????????????????????????????????? clearTimeout(this.timer); ????????????????????????????????? } ????????????????????????????????? that = this; ????????????????????????????????? this.sleep(100, function () { ????????????????????????????????????????????? this.timer = null; ????????????????????????????????????????????? that.mouseStop(evt); ????????????????????????????????? }); ????????????????????? } ????????? }, ????????? /** ???????????? * sleeps (used to detect mouse stops) ???????????? * ???????????? * @param ms millisecs to sleep ???????????? * @param callback callback function ???????????? */ ????????? sleep: function (ms, callback) { ????????????????????? this.timer = setTimeout(callback, ms); ????????? }, ????????? /** ???????????? * ???????????? * Handles the "mouse stop event" ???????????? * ???????????? * @param evt the event (actually a mousemove event ???????????? */ ????????? mouseStop: function(evt) { ????????????????????? //stupid check because IE does not handle mousemove correctly (or i f*** things up) ????????????????????? if (this.prevXY) { ????????????????????????????????? if (evt.xy.x != this.prevXY.x && evt.xy.y != this.prevXY.y) { ????????? ????????? //get the position we stopped at, and current map scale ????????????????????????????????????????????? var pos = this.map.getLonLatFromPixel(evt.xy); ????????? ????????? var scale = this.map.getScale(); ????????? ????????? console.log("mouse stopped at " + pos.toString() + ", scale = " + scale.toString()); ????????????????????????????????? } ????????????????????? } ????????????????????? //update this so that the check for if we actually have moved between two mouse stops works ????????????????????? //f*** ie! ????????????????????? this.prevXY = evt.xy; ????????? } }); On 02/25/2010 04:19 PM, Sveen Atle Frenvik (Geomatikk IKT) wrote: REMOVED_BY_THE_EXCHANGE_EMAIL_SCANNING_SERVICE_008BC5E7_55E9F026D000000 GUID::= 695731b2-611a-4e58-847c-ac52466d2628 PATH::= !CRYPT!840D757A8080D0C76A26FF81F3FA70208F6A98816EB00D12DB336E0E9CCCAFD62668D88A1AD46A6A8FC2A126F4F9B166A5C3D60A992565F4A7A65F24E2C229CDD2D32107744!84073BA692635189B9E1EB87F821836BC06D0663E3042BDD857008A3FBAE037649B6848CB28DD632798FA6CFB4288F0B6C003C8299803A022B95E1338DC6BC196B93D1A0746!84079C28BD1DCE1D04C4F0751E1A4393044A085499E9351764FC37C335DD7FC8CD50D56FA3B88F70DC2396BEA9F78B7A8B0D82273E7F88899DA38618626B298DA104E687648!840C88983C6599DB209E6D3F6FC0F741086A4841236840ACC3177236D83C5D1BFA3E4B30FB51FA0A64C113CA14ED3E2AE3581F69C0E8DB217184FEF2849388AD90D4015763F!84021F62F7265D89AD27638E600989B2A9130AE119C3309D33CD1BFB5F0EF09D69412414EC78FE17C420C9603F09599DDE2F3F32B069991C145EFDA5E4521806F73496D0044!840FE51F8438A8EC288F84D2F5D180C864243F38C17FDB9FF16C3C41CEE7CCD8DAD099C66879732195F94BF6AC3BFDEFFBECCFFFDAF201C4A2A034DE03E0D48C1783F170935!840B110B5D768BBCAFC47E1A151E709AC93EA7D02FEFD7B1FC507B6CA9D38E073B5748E439D3BBB652CFB36344F7468E0D01F1817D7BA0209A0446DCC78A3B1025C4B68 7149!8401485F8997099CE185BCD36FA69B474B6136BE63184F94571104FD2B6CE8D310B44779EDE14EA43BABB275E84BBF4113C878B9DF2D60360B46EC0738396EAC37243130945!840D7BC44E8BDFEE5A974107084E47A67A1E0687D66B2379E995B353D765F41BD79B80ACCD697536D392A821B22B0A5F3048600267CB720330F1AE55EF9A403E56B3E157537!8406EB65460ABF46FD445E90CD4DF01D7CD2F02B7BB3ABC00E7AE39CF94322E6D81CF562B8C8855E6ACC5EEA57A8992CA315C8089B9556F98365529A57508DDBD544815073A!840492F22B359B1C2194DB19087736E14B37C12728A9DB7F53BBFD4AA3E5EE55D36492EE6E250946926D029BF1D9C267EDE7D9EE21CE3347BAD221910D7EA1DBA9B366A7940!8405CF0A28882526B8EE6F609434D551BFA71F6BB406FCD0B252880EF7F4AC9D9158A2F6E8D10634941557FD5EB3951EEA18E06664F8AA8C080C3B20B0925C774714B6B0834!840D70E7F6837F02D27ED8E396D2CE1524B5ED478B2A812F1A3F7E4B9A5E078BDFF935D574DB1A6821E277C116A3951F4A01DD73ACD8F2DEDFA16DD76173E21A39F3C687C4C!84008084EFEF1442AD8EB4888FDA019E82637A99D25A1E59450A6876E4F0D9BE782A1D091A4CBD8F56627727F044A512BFE3BE3CBB7538F0C48602B4204051D4A0B40140B3D!840EB 7398D97EE91F0DEC2386B9E7F9A8FBDBF8A9972EB6E5E33D2B0D00FFC19FC97C14480585402F0A227934A928D37374B774D7D324351D4DB16D2BD41668DB354D690B3B!840F09CA8A241BBE38AFB7E10F9D8E2D18D65071C26347BCAEA7505E0C16F5F3D9AA6B009C9BB58FE00A65E4F2F7013ECDDAD0053F3DA8D696FCE774C0EDA2D15E63264083E!8401D5362048ADEF157DC7CE38E02B0CC680EC79B8F4379D0A87A273F500A39B7909D99FE994090AB6BB74F0D6407F22F51777EE17F1E037B50FC847D721B53D24C451D0831!8406AE580CB3A1E056C2BA0C3A6B6F1B8DE4ABF43BADFFF89E3E2CD96B90AB397F021C4FCAA50B15A70632818568756A0C930A9C7C35CEDF4F1F9AA2982F2246AF449177C36!840A7317CA042FB4CF7963271DE489759C269DF067E45F4D9CE7D189A1BA6398444CE92659DE313030B2057E3AC8FCB5EF74595A378E917735D85CD2D28AE003B463E1F7D36!8403C0ECC30F40C9ED55FCA482FF0F16ACC7A58AF9C9FD378C85EF939258FC75AB0F64458CBBE50129E15BE859A90BCC492F87E0513510EA7B109CA09F308B9BB793D157D4D!840EF791CD9D532D21EEACBFD9E2EBCBE77F005E5D54E986ADD423366EC3EAA6F67414892C94C0650009326D462120C8D7D38759E1CD198D70CF576593C3FF052BF42187D40!840E6E90B3A1D97 C3202E3D6A065C55C16FF2F8ADC8231A5C4C529BE3174FDAD9C706A33957303F33C6597AB20EC32C5C7909F5C93933210B8630835B9223202CB94E1A7031!8405A47C9791D5118B4C3A71331538B855DF6AB50066C467602F8591B2E490F6C90F7ABDEC0B072CFCF4A4650318C3FDDD7E23280199FC87B2F44596FF382E9D40332647049!84042F582944360A1FAD79B881CE77F941D4E3DC975A76EF191C4CF6B09299AED9FA56B06B4ECA7BD6A85712054BEF78660E2436DA7E3246762B19DA8D5F95C23374A667139!527CC25016465748671468B7C326E84A776EC01CF562F7A0DE27FC5630C4ED73083984B0C706A7707B00B554408 FILENAME::= TYPE::= text/html CHARSET::= iso-8859-15 REASON::= PROFANITY SERVER::= TD-VIRT-EX-01 END::= REMOVED_BY_THE_EXCHANGE_EMAIL_SCANNING_SERVICE_008BC5E7_55E9F026D000000 A policy violated content was detected and removed from the original mail entity. You can safely save or delete this replacement attachment. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Atle Frenvik Sveen GIS Konsulent Geomatikk IKT AS tlf: 45 27 86 89 atle.frenvik.sveen@geomatikk.no -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/efcbbc7f/attachment.html From jerome.petazzoni at sipartech.com Thu Feb 25 10:38:49 2010 From: jerome.petazzoni at sipartech.com (=?ISO-8859-15?Q?J=E9r=F4me_Petazzoni?=) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Best strategy to implement show/hide for large sets of features ? Message-ID: <4B869989.8070201@sipartech.com> Hi all, I have coded a GeoDJango app to import a KML file into a PostGIS database, preserving folders and styles. I can successfully display the features (or "placemarks" in KML terminology) on my OpenLayers map, serving them with FeatureServer. Each feature has a folder_id and a style_id attribute. I also have two custom webservices, generating JSON documents : - one with the styles to be used for each feature (and loaded using StyleMap.addUniqueValueRules), - another with the hierarchy of folders. The hierarchy of folders is then displayed (using ExtJS Ext.tree), allowing to show/hide folders (and features contained into folders) - in a manner similar to Google Earth. I think that my current implementation is a bit naive, since each time I check/uncheck a folder, I : - create a new StyleMap, - apply the KML styles, - apply a dynamic "foldervisibility" map (containing, for each folder, a {display:'none'} if the folder should be hidden), - redraw the layer. This approach worked well enough at first (displaying 150 linestrings with ~10 points per linestring), but when I added the "points" layer with 250 point features, it started to be really slow. I have four layers right now : a WMS background map, and three Vector layers (for points, linestrings and polygons). I am considering two other methods : 1. Use one distinct layer for each KML folder, and toggle layer visibility when the user checks/unchecks a folder. Since I have ~50 folders (and probably hundreds when the app will be in production), I am wondering if OpenLayers is supposed to behave nicely with large number of layers ? 2. Maintain (client-side or server-side) a mapping to associate a folder with the list of features contained into the folder. In that case, should I toggle each feature visibility and redraw them one by one, or is there a more efficient way (like, toggling visibility and redrawing the whole layer, or submitting the list of modified features...?) Any comment about those methods will be more than welcome ! :-) By the way, if anyone thinks that the KML->GeoDjango importer can be useful, it will be made public (but it's still at preliminary stages, therefore not very well documented nor written, to be honnest!) Best regards, From crschmidt at metacarta.com Thu Feb 25 11:10:48 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] KML In-Reply-To: <4659515AEAC40A4788B346D2B21698C1488B229530@EXCHANGE-00.GeoSyntec.net> References: <4659515AEAC40A4788B346D2B21698C1488B229530@EXCHANGE-00.GeoSyntec.net> Message-ID: <20100225161048.GS8508@metacarta.com> On Thu, Feb 25, 2010 at 10:13:09AM -0500, EGoss@Geosyntec.com wrote: > Does anyone know why the line(s) below would return 'null' or null? > > xmlDoc.getElementsByTagName("description")[0].childNodes[0].nodeValue; ... Without your KML file? How could we know? -- Chris > Thanks! > > ///////////////////////PARSING OUT KML INFORMATION////////////////////////////////////// > > OpenLayers.loadURL(kmlLayer.url, '', this, setKML); > > ///////////////////////////////////////////////////////////////////////////////////////////// > > function setKML(response) { > if (response.responseText.indexOf('no results') == -1) { > alert(response.responseText); > var xmlDoc = response.responseXML.documentElement; > //var xmlDoc = response.responseText; > > var name = > xmlDoc.getElementsByTagName("name")[0].childNodes[0].nodeValue; > alert(name); > > var description = > xmlDoc.getElementsByTagName("description")[0].childNodes[0].nodeValue; > alert(description); > > var coordinates = > xmlDoc.getElementsByTagName("coordinates")[0].childNodes[0].nodeValue; > alert(coordinates); > > var content = ''; > content += ''; > content += ''; > content += '
        NameDescriptionCoordinates
        '+name+''+description+''+coordinates+'
        '; > > document.getElementById('content').innerHTML = content; > > } > } > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From EGoss at Geosyntec.com Thu Feb 25 11:18:57 2010 From: EGoss at Geosyntec.com (EGoss@Geosyntec.com) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] KML In-Reply-To: <20100225161048.GS8508@metacarta.com> References: <4659515AEAC40A4788B346D2B21698C1488B229530@EXCHANGE-00.GeoSyntec.net> <20100225161048.GS8508@metacarta.com> Message-ID: <4659515AEAC40A4788B346D2B21698C1488B229587@EXCHANGE-00.GeoSyntec.net> Sorry, Here is the kml... Simple placemark TP-1 -74.0835,42.9065,0 -----Original Message----- From: Christopher Schmidt [mailto:crschmidt@metacarta.com] Sent: Thursday, February 25, 2010 11:11 AM To: Ed Goss Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] KML On Thu, Feb 25, 2010 at 10:13:09AM -0500, EGoss@Geosyntec.com wrote: > Does anyone know why the line(s) below would return 'null' or null? > > xmlDoc.getElementsByTagName("description")[0].childNodes[0].nodeValue; ... Without your KML file? How could we know? -- Chris > Thanks! > > ///////////////////////PARSING OUT KML INFORMATION////////////////////////////////////// > > OpenLayers.loadURL(kmlLayer.url, '', this, setKML); > > ///////////////////////////////////////////////////////////////////////////////////////////// > > function setKML(response) { > if (response.responseText.indexOf('no results') == -1) { > alert(response.responseText); > var xmlDoc = response.responseXML.documentElement; > //var xmlDoc = response.responseText; > > var name = > xmlDoc.getElementsByTagName("name")[0].childNodes[0].nodeValue; > alert(name); > > var description = > xmlDoc.getElementsByTagName("description")[0].childNodes[0].nodeValue; > alert(description); > > var coordinates = > xmlDoc.getElementsByTagName("coordinates")[0].childNodes[0].nodeValue; > alert(coordinates); > > var content = ''; > content += ''; > content += ''; > content += '
        NameDescriptionCoordinates
        '+name+''+description+''+coordinates+'
        '; > > document.getElementById('content').innerHTML = content; > > } > } > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Thu Feb 25 11:25:32 2010 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] KML In-Reply-To: <4659515AEAC40A4788B346D2B21698C1488B229587@EXCHANGE-00.GeoSyntec.net> References: <4659515AEAC40A4788B346D2B21698C1488B229530@EXCHANGE-00.GeoSyntec.net> <20100225161048.GS8508@metacarta.com> <4659515AEAC40A4788B346D2B21698C1488B229587@EXCHANGE-00.GeoSyntec.net> Message-ID: <20100225162532.GT8508@metacarta.com> On Thu, Feb 25, 2010 at 11:18:57AM -0500, EGoss@Geosyntec.com wrote: > Sorry, > > Here is the kml... > > > > > Simple placemark > TP-1 > > -74.0835,42.9065,0 > > > Because the description tag doesn't have any childNodes? -- Christopher Schmidt MetaCarta From n.e.kendall at gmail.com Thu Feb 25 11:50:14 2010 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] stylemap conditional on gml attribute. Message-ID: <33fd44f91002250850s3804a1c2ie272aa46b436f8df@mail.gmail.com> Hi all, I'd like to have a dynamic style map, that depending on the value returned in the xml changes the color of a point. I only have 3 values (null, 1, 2) and I'm just not sure how to set up the conditional within the style map. If anyone has done this, or can point me in the right direction, much appreciated. best, -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/3fa94e6b/attachment.html From bartvde at osgis.nl Thu Feb 25 11:57:38 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] LayerSwitcher In-Reply-To: <3F643797A078EB4FB02880080968098401CA11AB@langouste.zhaw.ch> References: <3F643797A078EB4FB02880080968098401CA1183@langouste.zhaw.ch> <1FA4EA0B-D460-41BD-B36C-4AC269628D6A@osgis.nl> <3F643797A078EB4FB02880080968098401CA11AB@langouste.zhaw.ch> Message-ID: Hanno, the constructor takes 1 argument, so use: new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('mapSwitcher'), roundedCorner:false}); Best regards, Bart On Feb 25, 2010, at 9:32 AM, Rahn Hanno (rahn) wrote: > hello again, > > I try to realise Barts tips, but I have a little problem it doesn't work and I don't see my fault. I can't "delete" the rounded Corners of my layerswitcher. Perhaps somebody can give me a code example? > I try it like this in my openlayers side: > > //create the layerswitcher > map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('mapSwitcher')},{roundedCorner:false})); > //make the background not transparent and gray > if (navigator.appName == 'Microsoft Internet Explorer') { > document.getElementById('OpenLayers.Control.LayerSwitcher_32_layersDiv').style.filter ="alpha(opacity = 100)"; > } > if (navigator.appName == 'Netscape') { > > document.getElementById('OpenLayers.Control.LayerSwitcher_32_layersDiv').style.opacity ="1"; > } > document.getElementById('OpenLayers.Control.LayerSwitcher_32_layersDiv').style.backgroundColor="#e9e9e4"; > > // to place the layerswitcher div > OpenLayers.Util.getElement('mapSwitcher').style.width = "200"; > OpenLayers.Util.getElement('mapSwitcher').style.color = "black"; > OpenLayers.Util.getElement('mapSwitcher').style.position = "absolute"; > OpenLayers.Util.getElement('mapSwitcher').style.top = "400"; > OpenLayers.Util.getElement('mapSwitcher').style.left = "5"; > > you can see my side here: > > http://webgis.hsw.ch/GINES_V1.2/Start.php > > Greetings and a lot of thanks > > Hanno Rahn > ------------------------------------------ > Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik > ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen > Fachstelle Geoinformatik > Gr?ental, Postfach CH-8820 W?denswil > Tel +41 (0)58 934 5592 > Fax +41 (0)58 934 5580 > hanno.rahn@zhaw.ch > www.iunr.zhaw.ch/geoinformatik > > > > > > > Von: Bart van den Eijnden [mailto:bartvde@osgis.nl] > Gesendet: Donnerstag, 25. Februar 2010 07:43 > An: Rahn Hanno (rahn) > Cc: users@openlayers.org > Betreff: Re: [OpenLayers-Users] LayerSwitcher > > Hi, > > the layerswitcher.html example already shows how to place it in another div. > > Wrt the other question, set the following API properties: > > /** > * APIProperty: roundedCorner > * {Boolean} If true the Rico library is used for rounding the corners > * of the layer switcher div, defaults to true. > */ > roundedCorner: true, > > /** > * APIProperty: roundedCornerColor > * {String} The color of the rounded corners, only applies if roundedCorner > * is true, defaults to "darkblue". > */ > roundedCornerColor: "darkblue", > > Best regards, > Bart > > On Feb 25, 2010, at 7:32 AM, Rahn Hanno (rahn) wrote: > >> >> Hello list, >> >> Perhaps you can help me with another question. I try to make the layerswitcher more individual. First I want to show it at another place in an extra div and not at the right border. But I can't find where I have to do this. Then I want to change the color of the div. The darkblue is not good for my webside. I try to make it with css directly in my page. It works but I always get terrible blue span tags over the div and under the div object with the layer switcher. Can perhaps somebody help me to arrange the layerswitcher somewhere else on the screen with a width of 200px and a height of 500px. And can somebody tell me how to change the color of the div and the layernames? >> >> Thank you for your help. >> >> Greetings >> Hanno >> >> ------------------------------------------ >> Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik >> ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen >> Fachstelle Geoinformatik >> Gr?ental, Postfach CH-8820 W?denswil >> Tel +41 (0)58 934 5592 >> Fax +41 (0)58 934 5580 >> hanno.rahn@zhaw.ch >> www.iunr.zhaw.ch/geoinformatik >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/d8b10af0/attachment.html From christoph at lingg.eu Thu Feb 25 13:00:22 2010 From: christoph at lingg.eu (Christoph Lingg) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] =?utf-8?q?=5B_OpenLayers-Users_=5D_Click_on_Op?= =?utf-8?q?enLayers=2EFeature=2EVector?= In-Reply-To: <4B867CF0.4060908@opengeo.org> Message-ID: <20100225180022.4F0261819B082@dd19100.kasserver.com> Hi Andreas, thank you for your help! I have alreade tried to use the SelectFeature class. But a strange behaviour appears when combing it with the DragFeature: i can click the feature only once. If i don't use the DragFeature the SelectFeature works like expected. I created a working example of that phenomena, see at the bottom. If you disable the dragFeature the selectFeature works like expected, maybe this is even a bug...? Cheers, Christoph layer = new OpenLayers.Layer.Vector("layer"); map.addLayers([layer]); drag = new OpenLayers.Control.DragFeature(layer); map.addControl(drag); drag.activate(); click = new OpenLayers.Control.SelectFeature( [layer], { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" // shift key adds to selection } ); map.addControl(click); layer.events.on({ "featureselected": function(e) { alert('selected'); }, "featureunselected": function(e) { alert('unselected'); } }); click.activate(); ftr = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(1, 2)); // an icon layer.addFeatures([ftr]); ----- Original Message ----- From: ahocevar@opengeo.org To: christoph@lingg.eu Date: 25.02.2010 14:36:48 Subject: Re: [OpenLayers-Users] Click on OpenLayers.Feature.Vector > Hi, > > you need to create an OpenLayers.Control.SelectFeature instance, > configure it with your vector layer, and add it to the map. You can then > listen for the layer's "featureselected" event. > > See the [1] example if you need a code snippet. The example does exactly > the same, but on two different layers instead of just one. > > Regards, > Andreas. > > [1] http://openlayers.org/dev/examples/select-feature-multilayer.html > > Christoph Lingg wrote: > > Hello! > > > > I changed from GoogleMap to OpenLayers, and although I enjoy to use the opensource equivalent, sometimes I feel lost in the OL documentation ;-) > > > > Would anyone be so kind and could give me hint how to achieve this very low level problem: I have a Vector Layer (I can't use marker class as I use the dragging feature as well) to which I add some Feature Vector, that are displayed on the map. What I need now is triggering an event when a feature was clicked. Very basically my code looks like this: > >> layer = new OpenLayers.Layer.Vector("layer"); > >> map.addLayers([layer]); > >> ftr = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lon, lat), null, styleMarker); // an icon > >> layer.addFeatures([ftr]); > > I tried different approaches that never worked out! What is the right way to go? > > > > Thank you in advance for any help! > > > > Christoph > > > > > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > From ahocevar at opengeo.org Thu Feb 25 14:37:25 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Click on OpenLayers.Feature.Vector In-Reply-To: <20100225180022.4F0261819B082@dd19100.kasserver.com> References: <20100225180022.4F0261819B082@dd19100.kasserver.com> Message-ID: <4B86D175.4000106@opengeo.org> Christoph Lingg wrote: > Hi Andreas, > > thank you for your help! > > I have alreade tried to use the SelectFeature class. But a strange > behaviour appears when combing it with the DragFeature: i can click > the feature only once. If i don't use the DragFeature the > SelectFeature works like expected. I created a working example of > that phenomena, see at the bottom. If you disable the dragFeature the > selectFeature works like expected, maybe this is even a bug...? Not necessarily a bug, but an annoyance that has to do with the way OpenLayers controls work. One proper way to deal with this would be to have the DragFeature control deactivated by default, and activate it in the featureselected handler. In the onComplete callback of the DragFeature control, you can deactivate the DragFeature control and re-activate the SelectFeature control. Regards, Andreas. > > Cheers, Christoph > > layer = new OpenLayers.Layer.Vector("layer"); map.addLayers([layer]); > > > drag = new OpenLayers.Control.DragFeature(layer); > map.addControl(drag); drag.activate(); > > click = new OpenLayers.Control.SelectFeature( [layer], { clickout: > true, toggle: false, multiple: false, hover: false, toggleKey: > "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" > // shift key adds to selection } ); map.addControl(click); > layer.events.on({ "featureselected": function(e) { alert('selected'); > }, "featureunselected": function(e) { alert('unselected'); } }); > click.activate(); > > ftr = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(1, > 2)); // an icon layer.addFeatures([ftr]); > > > ----- Original Message ----- From: ahocevar@opengeo.org To: > christoph@lingg.eu Date: 25.02.2010 14:36:48 Subject: Re: > [OpenLayers-Users] Click on OpenLayers.Feature.Vector > > >> Hi, >> >> you need to create an OpenLayers.Control.SelectFeature instance, >> configure it with your vector layer, and add it to the map. You can >> then listen for the layer's "featureselected" event. >> >> See the [1] example if you need a code snippet. The example does >> exactly the same, but on two different layers instead of just one. >> >> Regards, Andreas. >> >> [1] >> http://openlayers.org/dev/examples/select-feature-multilayer.html >> >> Christoph Lingg wrote: >>> Hello! >>> >>> I changed from GoogleMap to OpenLayers, and although I enjoy to >>> use the opensource equivalent, sometimes I feel lost in the OL >>> documentation ;-) >>> >>> Would anyone be so kind and could give me hint how to achieve >>> this very low level problem: I have a Vector Layer (I can't use >>> marker class as I use the dragging feature as well) to which I >>> add some Feature Vector, that are displayed on the map. What I >>> need now is triggering an event when a feature was clicked. Very >>> basically my code looks like this: >>>> layer = new OpenLayers.Layer.Vector("layer"); >>>> map.addLayers([layer]); ftr = new OpenLayers.Feature.Vector(new >>>> OpenLayers.Geometry.Point(lon, lat), null, styleMarker); // an >>>> icon layer.addFeatures([ftr]); >>> I tried different approaches that never worked out! What is the >>> right way to go? >>> >>> Thank you in advance for any help! >>> >>> Christoph >>> >>> >>> >>> _______________________________________________ Users mailing >>> list Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >> >> -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service >> straight from the developers. >> > > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From christoph at lingg.eu Thu Feb 25 15:00:19 2010 From: christoph at lingg.eu (Christoph Lingg) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Click on OpenLayers.Feature.Vector In-Reply-To: <4B86D175.4000106@opengeo.org> References: <20100225180022.4F0261819B082@dd19100.kasserver.com> <4B86D175.4000106@opengeo.org> Message-ID: <4BFAA21E-5592-4342-B758-2E425CA42832@lingg.eu> Hi Andreas, thank you very much for your help! Now it works but I am still not totally satisfied by the solution: I think it is not the most intuitive way for endusers to first click a feature to be able to drag it then. It might cause some irritation and the impression that dragging works not properly. Does somebody know an alternative way to achieve the desired behavior? Is this a conceptional problem of OpenLayers or is there any chance trying to patch this annoyance? Regards, Christoph Am 25.02.2010 um 20:37 schrieb Andreas Hocevar: > Christoph Lingg wrote: >> Hi Andreas, >> thank you for your help! >> I have alreade tried to use the SelectFeature class. But a strange >> behaviour appears when combing it with the DragFeature: i can click >> the feature only once. If i don't use the DragFeature the >> SelectFeature works like expected. I created a working example of >> that phenomena, see at the bottom. If you disable the dragFeature the >> selectFeature works like expected, maybe this is even a bug...? > > Not necessarily a bug, but an annoyance that has to do with the way OpenLayers controls work. > > One proper way to deal with this would be to have the DragFeature control deactivated by default, and activate it in the featureselected handler. In the onComplete callback of the DragFeature control, you can deactivate the DragFeature control and re-activate the SelectFeature control. > > Regards, > Andreas. > >> Cheers, Christoph >> layer = new OpenLayers.Layer.Vector("layer"); map.addLayers([layer]); >> drag = new OpenLayers.Control.DragFeature(layer); map.addControl(drag); drag.activate(); >> click = new OpenLayers.Control.SelectFeature( [layer], { clickout: >> true, toggle: false, multiple: false, hover: false, toggleKey: >> "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" >> // shift key adds to selection } ); map.addControl(click); layer.events.on({ "featureselected": function(e) { alert('selected'); >> }, "featureunselected": function(e) { alert('unselected'); } }); click.activate(); >> ftr = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(1, >> 2)); // an icon layer.addFeatures([ftr]); >> ----- Original Message ----- From: ahocevar@opengeo.org To: >> christoph@lingg.eu Date: 25.02.2010 14:36:48 Subject: Re: >> [OpenLayers-Users] Click on OpenLayers.Feature.Vector >>> Hi, >>> you need to create an OpenLayers.Control.SelectFeature instance, configure it with your vector layer, and add it to the map. You can >>> then listen for the layer's "featureselected" event. >>> See the [1] example if you need a code snippet. The example does >>> exactly the same, but on two different layers instead of just one. >>> Regards, Andreas. >>> [1] >>> http://openlayers.org/dev/examples/select-feature-multilayer.html >>> Christoph Lingg wrote: >>>> Hello! >>>> I changed from GoogleMap to OpenLayers, and although I enjoy to >>>> use the opensource equivalent, sometimes I feel lost in the OL >>>> documentation ;-) >>>> Would anyone be so kind and could give me hint how to achieve >>>> this very low level problem: I have a Vector Layer (I can't use >>>> marker class as I use the dragging feature as well) to which I >>>> add some Feature Vector, that are displayed on the map. What I >>>> need now is triggering an event when a feature was clicked. Very >>>> basically my code looks like this: >>>>> layer = new OpenLayers.Layer.Vector("layer"); map.addLayers([layer]); ftr = new OpenLayers.Feature.Vector(new >>>>> OpenLayers.Geometry.Point(lon, lat), null, styleMarker); // an >>>>> icon layer.addFeatures([ftr]); >>>> I tried different approaches that never worked out! What is the >>>> right way to go? >>>> Thank you in advance for any help! >>>> Christoph >>>> _______________________________________________ Users mailing >>>> list Users@openlayers.org http://openlayers.org/mailman/listinfo/users >>> -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service >>> straight from the developers. > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. From christoph at lingg.eu Thu Feb 25 15:01:42 2010 From: christoph at lingg.eu (Christoph Lingg) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Click on OpenLayers.Feature.Vector In-Reply-To: <4B86D175.4000106@opengeo.org> References: <20100225180022.4F0261819B082@dd19100.kasserver.com> <4B86D175.4000106@opengeo.org> Message-ID: <518EEC2E-FE2E-4F61-A6CC-3BE9BB3F1BAB@lingg.eu> btw. here is the adapted code example for anyone who might be interested in it: layer = new OpenLayers.Layer.Vector("layer"); map.addLayers([layer]); drag = new OpenLayers.Control.DragFeature(layer); map.addControl(drag); //drag.activate(); drag.onComplete = function(f) { drag.deactivate(); click.activate(); }; click = new OpenLayers.Control.SelectFeature( [layer], { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" // shift key adds to selection } ); map.addControl(click); layer.events.on({ "featureselected": function(e) { drag.activate(); alert('selected'); }, "featureunselected": function(e) { alert('unselected'); } }); click.activate(); ftr = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(1, 2)); // an icon layer.addFeatures([ftr]); Am 25.02.2010 um 20:37 schrieb Andreas Hocevar: > Christoph Lingg wrote: >> Hi Andreas, >> thank you for your help! >> I have alreade tried to use the SelectFeature class. But a strange >> behaviour appears when combing it with the DragFeature: i can click >> the feature only once. If i don't use the DragFeature the >> SelectFeature works like expected. I created a working example of >> that phenomena, see at the bottom. If you disable the dragFeature the >> selectFeature works like expected, maybe this is even a bug...? > > Not necessarily a bug, but an annoyance that has to do with the way OpenLayers controls work. > > One proper way to deal with this would be to have the DragFeature control deactivated by default, and activate it in the featureselected handler. In the onComplete callback of the DragFeature control, you can deactivate the DragFeature control and re-activate the SelectFeature control. > > Regards, > Andreas. > >> Cheers, Christoph >> layer = new OpenLayers.Layer.Vector("layer"); map.addLayers([layer]); >> drag = new OpenLayers.Control.DragFeature(layer); map.addControl(drag); drag.activate(); >> click = new OpenLayers.Control.SelectFeature( [layer], { clickout: >> true, toggle: false, multiple: false, hover: false, toggleKey: >> "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" >> // shift key adds to selection } ); map.addControl(click); layer.events.on({ "featureselected": function(e) { alert('selected'); >> }, "featureunselected": function(e) { alert('unselected'); } }); click.activate(); >> ftr = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(1, >> 2)); // an icon layer.addFeatures([ftr]); >> ----- Original Message ----- From: ahocevar@opengeo.org To: >> christoph@lingg.eu Date: 25.02.2010 14:36:48 Subject: Re: >> [OpenLayers-Users] Click on OpenLayers.Feature.Vector >>> Hi, >>> you need to create an OpenLayers.Control.SelectFeature instance, configure it with your vector layer, and add it to the map. You can >>> then listen for the layer's "featureselected" event. >>> See the [1] example if you need a code snippet. The example does >>> exactly the same, but on two different layers instead of just one. >>> Regards, Andreas. >>> [1] >>> http://openlayers.org/dev/examples/select-feature-multilayer.html >>> Christoph Lingg wrote: >>>> Hello! >>>> I changed from GoogleMap to OpenLayers, and although I enjoy to >>>> use the opensource equivalent, sometimes I feel lost in the OL >>>> documentation ;-) >>>> Would anyone be so kind and could give me hint how to achieve >>>> this very low level problem: I have a Vector Layer (I can't use >>>> marker class as I use the dragging feature as well) to which I >>>> add some Feature Vector, that are displayed on the map. What I >>>> need now is triggering an event when a feature was clicked. Very >>>> basically my code looks like this: >>>>> layer = new OpenLayers.Layer.Vector("layer"); map.addLayers([layer]); ftr = new OpenLayers.Feature.Vector(new >>>>> OpenLayers.Geometry.Point(lon, lat), null, styleMarker); // an >>>>> icon layer.addFeatures([ftr]); >>>> I tried different approaches that never worked out! What is the >>>> right way to go? >>>> Thank you in advance for any help! >>>> Christoph >>>> _______________________________________________ Users mailing >>>> list Users@openlayers.org http://openlayers.org/mailman/listinfo/users >>> -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service >>> straight from the developers. > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. From kguardado at gmail.com Thu Feb 25 15:39:27 2010 From: kguardado at gmail.com (Karina Guardado) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] zoommapextent question Message-ID: <4a92b0c31002251239j77160de1mbd899ff71b7fe4aa@mail.gmail.com> Hi, I'm working with mapfish and openlayers and my problem is that when I use the option Zoom to maximum Map Extent I always go the whole world extent even when I define my box as follows var options = { projection: "EPSG:4326", units: "degrees", maxResolution: "auto", maxExtent: new OpenLayers.Bounds(-90.23209, 12.80045, -87.46078, 14.62967) }; where is my problem? any help thanks in advance. karina El Salvador -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/d9fe4d49/attachment.html From brian.stempin at gmail.com Thu Feb 25 16:24:39 2010 From: brian.stempin at gmail.com (Brian Stempin) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] WFS Not loading In-Reply-To: <3ddca5671002251314h4d56cc9ei8cf27ceffb6a2f09@mail.gmail.com> References: <3ddca5671002090909h3a2b25e9v4d1ac109a99d84e1@mail.gmail.com> <3ddca5671002120658s5c02819cv91c4e92b9b846d4d@mail.gmail.com> <20100212151542.GW24279@metacarta.com> <351785351002120746l357089c4t1cba4a62f1551a18@mail.gmail.com> <3ddca5671002251314h4d56cc9ei8cf27ceffb6a2f09@mail.gmail.com> Message-ID: <351785351002251324t2f1ce1d0q7f1d995e13aeb2b5@mail.gmail.com> Lewis, Can you elaborate on what a "positive response" means? Did you get an HTTP 200 OK, or did you use something like Firebug to look inside of your request and found actual data returned? I'm asking because you can get an empty 200OK. I had a rewrite issue that prevented my proxied requests from working correctly (it always returned with a 200OK). IIRC, it can also happen if you're having projection issues (eg, because of srs mismatches, your WFS server doesn't find any features and returns an empty response). Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/87808baf/attachment.html From brian.stempin at gmail.com Thu Feb 25 16:40:26 2010 From: brian.stempin at gmail.com (Brian Stempin) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] WFS Not loading In-Reply-To: <3ddca5671002251332k275bb845kdfaaed7b3e532fe4@mail.gmail.com> References: <3ddca5671002090909h3a2b25e9v4d1ac109a99d84e1@mail.gmail.com> <3ddca5671002120658s5c02819cv91c4e92b9b846d4d@mail.gmail.com> <20100212151542.GW24279@metacarta.com> <351785351002120746l357089c4t1cba4a62f1551a18@mail.gmail.com> <3ddca5671002251314h4d56cc9ei8cf27ceffb6a2f09@mail.gmail.com> <351785351002251324t2f1ce1d0q7f1d995e13aeb2b5@mail.gmail.com> <3ddca5671002251332p2e044afdm7a41689ea019942d@mail.gmail.com> <3ddca5671002251332k275bb845kdfaaed7b3e532fe4@mail.gmail.com> Message-ID: <351785351002251340q60d34d4dm1f6ba8516c81ad12@mail.gmail.com> Sorry for the top posting, the last response was not sent to the list. Lewis, Could you post your current code and the response message into your favorite pastebin site and then send us a link? Brian On Thu, Feb 25, 2010 at 4:32 PM, Lewis Oaten wrote: > Hi Brian, > > Thanks for your prompt response. > > I use Chrome development tools and can see data which is returned. > > Regards, > > Lewis Oaten > web: lewisoaten.com > twit: twitter.com/lewisoaten > key: pk.caecus.co.uk > cal: tgl.me/LewisOaten > > Sent on the move. > > On 25 Feb 2010 21:24, "Brian Stempin" wrote: > > Lewis, > Can you elaborate on what a "positive response" means? Did you get an HTTP > 200 OK, or did you use something like Firebug to look inside of your request > and found actual data returned? > > I'm asking because you can get an empty 200OK. I had a rewrite issue that > prevented my proxied requests from working correctly (it always returned > with a 200OK). IIRC, it can also happen if you're having projection issues > (eg, because of srs mismatches, your WFS server doesn't find any features > and returns an empty response). > > Brian > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/1dbd788e/attachment.html From ahocevar at opengeo.org Thu Feb 25 16:56:06 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Click on OpenLayers.Feature.Vector In-Reply-To: <4BFAA21E-5592-4342-B758-2E425CA42832@lingg.eu> References: <20100225180022.4F0261819B082@dd19100.kasserver.com> <4B86D175.4000106@opengeo.org> <4BFAA21E-5592-4342-B758-2E425CA42832@lingg.eu> Message-ID: <4B86F1F6.3050808@opengeo.org> Christoph Lingg wrote: > Hi Andreas, > > thank you very much for your help! > > Now it works but I am still not totally satisfied by the solution: I > think it is not the most intuitive way for endusers to first click a > feature to be able to drag it then. It might cause some irritation > and the impression that dragging works not properly. Does somebody > know an alternative way to achieve the desired behavior? Is this a > conceptional problem of OpenLayers or is there any chance trying to > patch this annoyance? It's conceptual in the way that handlers are not shared among controls. But it should be easy to write a combined SelectFeature-DragFeature control, by just adding a Drag handler to a SelectFeature control. There has also been ongoing work on a FeatureAgent (you should find it in the archive, and there's also some working code available), which would make things like this much easier. Regards, Andreas. > > Regards, Christoph > > Am 25.02.2010 um 20:37 schrieb Andreas Hocevar: > >> Christoph Lingg wrote: >>> Hi Andreas, thank you for your help! I have alreade tried to use >>> the SelectFeature class. But a strange behaviour appears when >>> combing it with the DragFeature: i can click the feature only >>> once. If i don't use the DragFeature the SelectFeature works like >>> expected. I created a working example of that phenomena, see at >>> the bottom. If you disable the dragFeature the selectFeature >>> works like expected, maybe this is even a bug...? >> Not necessarily a bug, but an annoyance that has to do with the way >> OpenLayers controls work. >> >> One proper way to deal with this would be to have the DragFeature >> control deactivated by default, and activate it in the >> featureselected handler. In the onComplete callback of the >> DragFeature control, you can deactivate the DragFeature control and >> re-activate the SelectFeature control. >> >> Regards, Andreas. >> >>> Cheers, Christoph layer = new OpenLayers.Layer.Vector("layer"); >>> map.addLayers([layer]); drag = new >>> OpenLayers.Control.DragFeature(layer); map.addControl(drag); >>> drag.activate(); click = new OpenLayers.Control.SelectFeature( >>> [layer], { clickout: true, toggle: false, multiple: false, hover: >>> false, toggleKey: "ctrlKey", // ctrl key removes from selection >>> multipleKey: "shiftKey" // shift key adds to selection } ); >>> map.addControl(click); layer.events.on({ "featureselected": >>> function(e) { alert('selected'); }, "featureunselected": >>> function(e) { alert('unselected'); } }); click.activate(); ftr = >>> new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(1, >>> 2)); // an icon layer.addFeatures([ftr]); ----- Original Message >>> ----- From: ahocevar@opengeo.org To: christoph@lingg.eu Date: >>> 25.02.2010 14:36:48 Subject: Re: [OpenLayers-Users] Click on >>> OpenLayers.Feature.Vector >>>> Hi, you need to create an OpenLayers.Control.SelectFeature >>>> instance, configure it with your vector layer, and add it to >>>> the map. You can then listen for the layer's "featureselected" >>>> event. See the [1] example if you need a code snippet. The >>>> example does exactly the same, but on two different layers >>>> instead of just one. Regards, Andreas. [1] >>>> http://openlayers.org/dev/examples/select-feature-multilayer.html >>>> Christoph Lingg wrote: >>>>> Hello! I changed from GoogleMap to OpenLayers, and although I >>>>> enjoy to use the opensource equivalent, sometimes I feel lost >>>>> in the OL documentation ;-) Would anyone be so kind and could >>>>> give me hint how to achieve this very low level problem: I >>>>> have a Vector Layer (I can't use marker class as I use the >>>>> dragging feature as well) to which I add some Feature Vector, >>>>> that are displayed on the map. What I need now is triggering >>>>> an event when a feature was clicked. Very basically my code >>>>> looks like this: >>>>>> layer = new OpenLayers.Layer.Vector("layer"); >>>>>> map.addLayers([layer]); ftr = new >>>>>> OpenLayers.Feature.Vector(new >>>>>> OpenLayers.Geometry.Point(lon, lat), null, styleMarker); // >>>>>> an icon layer.addFeatures([ftr]); >>>>> I tried different approaches that never worked out! What is >>>>> the right way to go? Thank you in advance for any help! >>>>> Christoph _______________________________________________ >>>>> Users mailing list Users@openlayers.org >>>>> http://openlayers.org/mailman/listinfo/users >>>> -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service >>>> straight from the developers. >> >> -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service >> straight from the developers. > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From jon at gina.alaska.edu Thu Feb 25 19:48:22 2010 From: jon at gina.alaska.edu (Jonathan Sawyer) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Markers (circle, triangle, x, cross, etc) to be rendered in custom div? Message-ID: <5cab99fd1002251648y5b7a9560y7ba149378725f084@mail.gmail.com> Good afternoon OpenLayers community! I have a question regarding the rendering of various build in graphic styles (names). Can I render, say, a circle marker into a custom
        ? For example: Using these graphic names: http://openlayers.org/dev/examples/graphic-name.html I would like to be able to, as well as adding a feature to a layer using that graphic name as its representation, store that exact graphic, as rendered on the map, in a div element as a "key". I am building a user interface that puts layers that have been added to the map into one portion of the window. I want to identify the layer with its layer on the map via the style its using. I hope this makes sense. Thank you in advance! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/3f19694b/attachment.html From info.ethio at gmail.com Thu Feb 25 21:12:11 2010 From: info.ethio at gmail.com (ethio info) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Beginner issue In-Reply-To: References: <561c16701002231251g482c1a25g6c55a5ec718da598@mail.gmail.com> Message-ID: <561c16701002251812x46574837v62b60926db2e40dd@mail.gmail.com> Arnd, Thanks a lot, It works. You helpled a lot and I appreciate it. On Wed, Feb 24, 2010 at 1:21 PM, Arnd Wippermann wrote: > Hi, > > 1. you have to reproject your vector data (with EPSG:900913 and EPSG:4326 > it is possible without proj4js) > > 2. you have to add your vector layer to your map > > 3. you have to center the map > > //! set projections for transformation your vectors (before wkt_f.read) > wkt_f.internalProjection = new OpenLayers.Projection("EPSG:900913"); > wkt_f.externalProjection = new OpenLayers.Projection("EPSG:4326"); > //! add vector layer > index_map.addLayer(hood_vector); > //! set MouseDefaults for navigation > index_map.addControl(new OpenLayers.Control.MouseDefaults()); > //! center map > index_map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); > that should show your map. > > Arnd > > ------------------------------ > *Von:* users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > *Im Auftrag von *ethio info > *Gesendet:* Dienstag, 23. Februar 2010 21:51 > *An:* users@openlayers.org > *Betreff:* Re: [OpenLayers-Users] Beginner issue > > Sorry to keep pestering you, but does anyone know what I am doing wrong? > if anyone can make this work, and tell me how to fix it, I would be very > grateful. > > thanks > > On Sun, Feb 21, 2010 at 3:23 PM, ethio info wrote: > >> I understand what you are saying but my previous request was rejected >> because it was over the size limit. >> Here it is: >> >> > http://www.w3.org/TR/html4/loose.dtd"> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>

        Woreda's

        >>
        > style="margin-right:20px;">
        >> >>

        Select one of the 583 >> woreda's

        >> >>
        >> >> >> >> >> On Sun, Feb 21, 2010 at 10:40 AM, Nicholas Efremov-Kendall < >> n.e.kendall@gmail.com> wrote: >> >>> you really need to post more code than that for someone to be able to >>> help you. Are you using proj4.js to change your projection? OL only uses a >>> few projections/coordinate systems natively. >>> >>> On Sun, Feb 21, 2010 at 2:39 AM, ethio info wrote: >>> >>>> Hi, Please take a look at this site: >>>> http://projects.latimes.com/mapping-la/neighborhoods/. >>>> I have copied the source and cleaned it up of ads and so forth and have >>>> put in my data and I just can not see the overlay on the Google map. >>>> I will include the changes I made below. The only thing I can think of >>>> that is blocking my overlay is the bounds. Basically, I want the country of >>>> Ethiopia. >>>> Just to complicate things further, my overlay was showing when I did not >>>> use a spherical mercator projection but the overlay matched what is in >>>> Google maps ONLY when I zoomed in. >>>> so after reading some of the issues some people had, I figured I should >>>> use what is in the Mapping LA w/minor changes. >>>> Can someone suggest a solution? BTW, the overlay switch works and gives >>>> my overlay as a check box option to click on but it is not displayed on the >>>> Google map >>>> Here are my changes to the Mapping LA Neighborhood source: >>>> >>>> var max_extent = new OpenLayers.Bounds(860986,-4383204,5870363,3600489); >>>> index_map.addControl(new OpenLayers.Control.LayerSwitcher()); >>>> >>>> var hood_polygon_371 = wkt_f.read('MULTIPOLYGON (((39.2968382026 >>>> 8.8274792477, 39.3135039775 8.748488041, 39.3016324666 8.742095689, >>>> 39.3036871512 8.7357033371, 39.269899005 8.6920983646, >>>> 39.2315448931 8.6608214995, 39.2265223308 8.645982111, >>>> 39.2479823696 8.6108241751, 39.2249242428 8.589135838, >>>> 39.2221846634 8.5756662392, 39.2306316999 8.5656211146, >>>> 39.257114301 8.5601419558, 39.2502653525 8.5464440587, >>>> 39.2139659251 8.5220161421, 39.1744703218 8.4606039034, >>>> 39.0858905871 8.385037171, 39.0758454626 8.3950822956, >>>> 39.0381762455 8.399419963, 39.0363498593 8.5128842107, >>>> 39.0671701278 8.5432478827, 39.0655720398 8.5562608849, >>>> 39.0872603769 8.5968979797, 39.0874886751 8.6528310595, 39.10415445 >>>> 8.6825098366, 39.0982186945 8.6939247509, 39.1075789242 8.7101339291, >>>> 39.1603158281 8.742095689, 39.1840588498 8.7877553461, >>>> 39.1767533046 8.8019098398, 39.2014095194 8.8146945437, >>>> 39.2057471869 8.8039645243, 39.2199016805 8.8012249449, >>>> 39.2461559833 8.8299905288, 39.2710404964 8.8224566854, >>>> 39.2968382026 8.8274792477 )))'); >>>> hood_polygon_371.data = {'slug':' 371', 'name': '371'}; >>>> >>>> var hood_polygon_260 = wkt_f.read('MULTIPOLYGON (((39.506872625 >>>> 9.3384108099, 39.5290175587 9.3116999105, 39.510068801 9.2838475198, >>>> 39.522853505 9.2751721849, 39.4963709039 9.2509725667, >>>> 39.5105253976 9.2502876718, 39.5089273096 9.2354482833, >>>> 39.5290175587 9.2133033496, 39.5598378272 9.2203805965, >>>> 39.5456833335 9.1938979954, 39.5376928935 9.1470968469, >>>> 39.5771884968 9.0621698849, 39.5447701403 9.0523530586, >>>> 39.4872389725 9.0171951227, 39.461212968 9.0137706484, >>>> 39.4299361029 9.0452758117, 39.4004856241 9.0596586037, >>>> 39.3701219522 9.1025786813, 39.3758294093 9.126321703, >>>> 39.3498034048 9.1690134823, 39.2920439386 9.1770039223, >>>> 39.281085621 9.1865924503, 39.2514068439 9.2676383415, >>>> 39.2509502473 9.3203752454, 39.2584840907 9.3308769665, >>>> 39.266702829 9.3265392991, 39.3011758701 9.2909247666, >>>> 39.3253754883 9.3107867174, 39.3824500596 9.293664346, 39.434045472 >>>> 9.3477710396, 39.4589299851 9.3511955139, 39.506872625 9.3384108099 >>>> )))'); >>>> hood_polygon_260.data = {'slug':' 260', 'name': '260'}; >>>> var hood_vector = new OpenLayers.Layer.Vector("Wereda"); >>>> (hood_vector.addFeatures([hood_polygon_260,hood_polygon_371); >>>> var lon = 4387103; >>>> var lat = 1007363; >>>> var zoom = 0; >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>> >>> >>> -- >>> Nicholas Efremov-Kendall >>> Fulbright Student 2009-2010, Ukraine >>> nefremov@artsci.wustl.edu >>> c/o Halyna Yerko >>> Balzaka 92a, Kv 27 >>> 02232 >>> Kyiv, Ukraine >>> (mob) +380963576524 >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/a70ecd78/attachment.html From tschaub at opengeo.org Thu Feb 25 21:47:27 2010 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Markers (circle, triangle, x, cross, etc) to be rendered in custom div? In-Reply-To: <5cab99fd1002251648y5b7a9560y7ba149378725f084@mail.gmail.com> References: <5cab99fd1002251648y5b7a9560y7ba149378725f084@mail.gmail.com> Message-ID: <4B87363F.6010002@opengeo.org> Jonathan Sawyer wrote: > Good afternoon OpenLayers community! > > I have a question regarding the rendering of various build in graphic > styles (names). Can I render, say, a circle marker into a custom
        ? > For vector symbols rendered client side, we use a different renderer depending on the browser. So your circle might be rendered using SVG, VML, or Canvas. In order to display the same symbol in another element on the page, you can use the same renderer that the vector layer does. This takes a bit of fiddling to get right (assuming you want rules in a vector layer's style to be applied). I've put together a sandbox in GeoExt that does this with a VectorLegend component. If you are not using Ext but would like to do the same, you could follow the same approach. http://dev.geoext.org/sandbox/opengeo/style/geoext/examples/vector-legend.html In short, it isn't trivial. Tim > For example: > > Using these graphic names: > http://openlayers.org/dev/examples/graphic-name.html > I would like to be able to, as well as adding a feature to a layer using > that graphic name as its representation, store that exact graphic, as > rendered on the map, in a div element as a "key". I am building a user > interface that puts layers that have been added to the map into one > portion of the window. I want to identify the layer with its layer on > the map via the style its using. > > I hope this makes sense. Thank you in advance! > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From p.scadden at gns.cri.nz Thu Feb 25 22:20:00 2010 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:33 2010 Subject: [OpenLayers-Users] Problems switching baselayers - centre undefined when baselayer really small cf extent. In-Reply-To: <4B87363F.6010002@opengeo.org> References: <5cab99fd1002251648y5b7a9560y7ba149378725f084@mail.gmail.com> <4B87363F.6010002@opengeo.org> Message-ID: <4B873DE0.9050002@gns.cri.nz> I've been having trouble with behaviour when switching base layers. I start with a large area, and I have images covering some much smaller parts of the whole area that I would like to switch in. At moment, if I change the base layer to one of these I get odd results certainly dont see the layer. I switched to simple example to investigate. I find an issue when debugging through. Code below... The image layer is much smaller the fullbounds (as it will in my main application). When goto map.zoomtoExtext(fullBounds), then in the moveto procedure, we have the following setup. The centre of fullBounds is NOT inside the image extents. In MoveTo, it tries to get a new centre with if (!this.center && !this.isValidLonLat(lonlat)) { lonlat = this.maxExtent.getCenterLonLat(); } However, since CentreLonLat is defined (but outside the image area), this does nothing but return the existing centrelonlat. map.centre remains undefined and eventually fires an error. I can work around (I think) by changing maxExtent before switching to the other base layer?? The smaller image ALSO has different srs to the map srs specified in options when map created. I understand that map switches to this srs but when do I change the maxExtent and with what srs do I put it into? I am quietly getting lost here. Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From Atle.Frenvik.Sveen at geomatikk.no Fri Feb 26 05:08:01 2010 From: Atle.Frenvik.Sveen at geomatikk.no (Sveen Atle Frenvik (Geomatikk IKT)) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Mouse Move in OL In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D675D@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D675D@CORRIOL.icc.local> Message-ID: <02656758FFFCDF4D9CC79BC33EBC55F880E44B@TD-VIRT-EX-01.geomatikk.ad> sorry, something mis-formatted my mail, take a look at http://dl.dropbox.com/u/860041/mousestop.js -atle On 02/26/2010 10:47 AM, Vidal, Antoni wrote: Hello, I've read your response in the list but is not so clear. Can you send me the attached code directly? Thank's a lot. Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogr?fic de Catalunya Parc de Montju?c, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat -- Atle Frenvik Sveen GIS Konsulent Geomatikk IKT AS tlf: 45 27 86 89 atle.frenvik.sveen@geomatikk.no -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100226/84ee8c78/attachment.html From Atle.Frenvik.Sveen at geomatikk.no Fri Feb 26 05:45:03 2010 From: Atle.Frenvik.Sveen at geomatikk.no (Sveen Atle Frenvik (Geomatikk IKT)) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Mouse Move in OL In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D6760@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D675D@CORRIOL.icc.local> <02656758FFFCDF4D9CC79BC33EBC55F880E44B@TD-VIRT-EX-01.geomatikk.ad> <784FAC631C0CB14CAE68764151D5DA41081D6760@CORRIOL.icc.local> Message-ID: <02656758FFFCDF4D9CC79BC33EBC55F880E44D@TD-VIRT-EX-01.geomatikk.ad> Oh, the code i sent was part of a larger class i had written, so i just stripped out unnessecarry things, but i think you can initialize it by var map = new OpenLayers.Map("map"); new MouseOver(map); (or you can edit the class to f.ex GeoIKT.MouseOver = OpenLayers.Class({...code..}); and initialize by new GeoIKT.MouseOver(map); ) And you will of course have to extend the class in some way to handle the event. I guess i probably should have written this class as an OpenLayers.Event class, but this soultion worked for me, as i needed the functionality as part of a custom control. Hope this helps, at least the basic idea of capturing mouse stops is outlined here. -atle On 02/26/2010 11:37 AM, Vidal, Antoni wrote: Hello again, May I ask a litle question? When or how initialize your class?. I.e. var px = new OpenLayers.Size(128, 123);, but in the case of your class there isn't an object ! Antoni Vidal Unitat d'Aplicacions SIG-WEB Ext. 3228 De: Sveen Atle Frenvik (Geomatikk IKT) [mailto:Atle.Frenvik.Sveen@geomatikk.no] Enviat: viernes, 26 de febrero de 2010 11:08 Per a: Vidal, Antoni A/c: users@openlayers.org Tema: Re: Mouse Move in OL sorry, something mis-formatted my mail, take a look at http://dl.dropbox.com/u/860041/mousestop.js -atle On 02/26/2010 10:47 AM, Vidal, Antoni wrote: Hello, I've read your response in the list but is not so clear. Can you send me the attached code directly? Thank's a lot. Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogr?fic de Catalunya Parc de Montju?c, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat -- Atle Frenvik Sveen GIS Konsulent Geomatikk IKT AS tlf: 45 27 86 89 atle.frenvik.sveen@geomatikk.no -- Atle Frenvik Sveen GIS Konsulent Geomatikk IKT AS tlf: 45 27 86 89 atle.frenvik.sveen@geomatikk.no -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100226/0b62469d/attachment.html From eoinyp at yahoo.com Fri Feb 26 06:39:48 2010 From: eoinyp at yahoo.com (eoinyp) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Partial Layer Selection Message-ID: <1267184388935-4638515.post@n2.nabble.com> Hi list, I would like to represent part of a postgis table as a WMS layer in Geoserver. Is this possible? It seems really basic, until now I have never had to do this, and now that I need to, I am stumped! For example I have a postgis table of point objects. I would like to create: A first geoserver layer of all point objects where type = 1 as blue dots another geoserver layer of all point objects where type = 2 as red dots, another where type = 3 as black dots etc. As far as I can see it seems to be one layer per postgis table. Is there a better way of doing this? I could make the layers WFS instead if that offers a better solution. I am using Geoserver 2.0 Thanks, Eoin -- View this message in context: http://n2.nabble.com/Partial-Layer-Selection-tp4638515p4638515.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Fri Feb 26 06:42:47 2010 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Partial Layer Selection In-Reply-To: <1267184388935-4638515.post@n2.nabble.com> References: <1267184388935-4638515.post@n2.nabble.com> Message-ID: <46917.145.50.39.11.1267184567.squirrel@webmail.hostingdiscounter.nl> Wrong list? https://lists.sourceforge.net/lists/listinfo/geoserver-users Best regards, Bart > > Hi list, > I would like to represent part of a postgis table as a WMS layer in > Geoserver. Is this possible? It seems really basic, until now I have never > had to do this, and now that I need to, I am stumped! > For example I have a postgis table of point objects. > I would like to create: > A first geoserver layer of all point objects where type = 1 as blue dots > another geoserver layer of all point objects where type = 2 as red dots, > another where type = 3 as black dots etc. > > As far as I can see it seems to be one layer per postgis table. Is there a > better way of doing this? > I could make the layers WFS instead if that offers a better solution. > I am using Geoserver 2.0 > Thanks, > > Eoin > -- > View this message in context: > http://n2.nabble.com/Partial-Layer-Selection-tp4638515p4638515.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From chris.green at ibstv.co.uk Fri Feb 26 06:48:24 2010 From: chris.green at ibstv.co.uk (Chris Green) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Selectfeature not firing In-Reply-To: <4B85A048.4060102@mapgears.com> References: <008801cab557$e5e20ea0$b1a62be0$@green@ibstv.co.uk> <4B8549FF.6040903@mapgears.com> <00e201cab588$fa8faca0$efaf05e0$@green@ibstv.co.uk> <4B85A048.4060102@mapgears.com> Message-ID: <000001cab6d9$9a62dfd0$cf289f70$@green@ibstv.co.uk> Hi Alex I finally figured out what seems to be happening. When I create a vector layer and populate it with features as follows... var wfs = new OpenLayers.Layer.Vector("Countries WFS", { styleMap: styleMap2, strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url:"http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/OLFurtherTest/htdocs/wfsVectorGetFeature.map", featureType: "France", featureNS: "http://mapserver.gis.umn.edu/mapserver"}) }); map.addLayer(wfs) ....then any features which are added are not selectable by SelectFeature. If on the other hand I create a blank vector layer and add features to it by making a separate WFS call and using Vector.addFeatures(WFSfeatures); then those features can be selected by the SelectFeature control. I can make my map using this second method but it seems more cumbersome and I wonder if I am missing something in the first method....it seems that when I create a vector layer with in-built WFS call as above then the resulting layer is not editable. Does this make sense and do you have any suggestions? Best regards, Chris -----Original Message----- From: Alexandre Dube [mailto:adube@mapgears.com] Sent: 24 February 2010 21:55 To: chris.green@ibstv.co.uk Cc: Users@openlayers.org Subject: Re: [OpenLayers-Users] Selectfeature not firing Chris, What you're describing is a normal behavior when the Navigation and SelectFeature control are both activated, yes. To resolve this, you could : * have a toolbar with your controls as buttons and only one is active at a time * have your SelectFeature control clicks work only while pressing a specific key (ctrl for example). This could be done by defining a 'keymask' to the Handler.Feature object of your SF control. * make the "select" on "hover" instead of "click", see an example [1] Hope this helps, Alexandre [1] http://openlayers.org/dev/examples/highlight-feature.html Chris Green wrote: > Alex > > Can't really offer much more except that I observe that if I comment out > selectCtrl.activate(); then I can drag the map to a new position when the > cursor is over the feature on the vector layer delivered by WFS, but if the > selectctrl is activated then dragging the map does not work when the cursor > is in that position (but it does work if the cursor is anywhere else on the > map). So there seems to be some kind of conflict caused by this control. > Does this help? > > > Regards, > > > > Chris > > > -----Original Message----- > From: Alexandre Dube [mailto:adube@mapgears.com] > Sent: 24 February 2010 15:47 > To: chris.green@ibstv.co.uk > Cc: Users@openlayers.org > Subject: Re: [OpenLayers-Users] Selectfeature not firing > > Chris, > > Could you share a live example or more code demonstrating your problem ? > The code you pasted below doesn't seem to have any issue. > > Kind regards, > > Alexandre > > > Chris Green wrote: > >> Hello all >> >> Hope someone can help with what is probably a simple problem that I >> don?t seem to be able to solve. I have created a vector layer which >> has features taken from a wms layer: >> >> var wfs = new OpenLayers.Layer.Vector("Countries WFS", { >> >> styleMap: styleMap2, >> >> strategies: [new OpenLayers.Strategy.BBOX()], >> >> protocol: new OpenLayers.Protocol.WFS({ >> >> url: >> >> > "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/OLFurtherTest/htdocs/ > wfsVectorGetFeature.map", > >> featureType: "France", >> >> featureNS: "http://mapserver.gis.umn.edu/mapserver" >> >> }) >> >> }); >> >> map.addLayer(wfs); >> >> This works OK, but I want to be able to click to select an individual >> feature so I added: >> >> var selectCtrl = new OpenLayers.Control.SelectFeature(wfs, >> >> {clickout: true} >> >> ); >> >> map.addControl(selectCtrl); >> >> selectCtrl.activate(); >> >> However the selectfeature control does not fire in response to any map >> clicks. Can anyone suggest what I am missing? >> >> Chris >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Fri Feb 26 08:24:45 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Selectfeature not firing In-Reply-To: <000001cab6d9$9a62dfd0$cf289f70$@green@ibstv.co.uk> References: <008801cab557$e5e20ea0$b1a62be0$@green@ibstv.co.uk> <4B8549FF.6040903@mapgears.com> <00e201cab588$fa8faca0$efaf05e0$@green@ibstv.co.uk> <4B85A048.4060102@mapgears.com> <000001cab6d9$9a62dfd0$cf289f70$@green@ibstv.co.uk> Message-ID: <4B87CB9D.5070503@mapgears.com> Hey Chris, Chris Green wrote: > I can make my map using this second method but it seems more cumbersome and I wonder if I am missing something in the first method....it seems that when I create a vector layer with in-built WFS call as above then the resulting layer is not editable. This shouldn't be the case. There might be an other issue or a bug. Have you tried with trunk ? In order to help you find the issue / bug, you may need to minimize your code. Please, read the following article which will tell you how to do it : http://docs.openlayers.org/help/minimize.html Kind regards, -- Alexandre Dub? Mapgears www.mapgears.com From bmcbride at cha-llp.com Fri Feb 26 10:06:46 2010 From: bmcbride at cha-llp.com (Mapmaker) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Using cookies to remember the map state Message-ID: <1267196806763-4639597.post@n2.nabble.com> Hi all, I recently ported the following Google Maps API tutorial (using cookies to remember the map state when the user leaves the page and comes back) to OpenLayers. http://econym.org.uk/gmap/cookies.htm http://econym.org.uk/gmap/cookies.htm Here's the code..

        WMS Example

        -- View this message in context: http://n2.nabble.com/Using-cookies-to-remember-the-map-state-tp4639597p4639597.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From plablo09 at gmail.com Fri Feb 26 10:20:43 2010 From: plablo09 at gmail.com (pablo lopez) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Newbie questions In-Reply-To: <2f6614521002241954o30174c9cy1f49fd04cdcc6931@mail.gmail.com> References: <1266778535164-4608007.post@n2.nabble.com> <1266799464682-4609543.post@n2.nabble.com> <1266808951449-4610023.post@n2.nabble.com> <2f6614521002241954o30174c9cy1f49fd04cdcc6931@mail.gmail.com> Message-ID: Hi Joe, I think something like this shoul do it: info = new OpenLayers.Control. WMSGetFeatureInfo({ url: 'http://tobagoborn.com:8080/geoserver/wms', title: 'Identify features by clicking', layers: [layer1, layer2,...], <---Here you provide an array of layer objects. These are the layers you are querying eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } }); map.addControl(info); info.activate(); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100226/860039a0/attachment.html From alessio.dilorenzo at gmail.com Fri Feb 26 10:23:33 2010 From: alessio.dilorenzo at gmail.com (AlessioDL) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Custom navigation history buttons on toolbar Message-ID: <1267197813849-4639719.post@n2.nabble.com> Hi, i'm doing some experiments with OL and jQuery UI. I created a toolbar like http://www.filamentgroup.com/examples/buttonFrameworkCSS/ this and I added some functions associated with the correspondent buttons. Now I'd like to add navigation history buttons to my toolbar, but I have had not success for now. function initMap() { ... ... nav = new OpenLayers.Control.NavigationHistory(); map.addControl(nav); nav.activate(); ... ... } then, in HTML file I added this: [a href="#" class="fg-button ui-state-default fg-button-icon-solo ui-corner-all" onclick="nav.previous.trigger"][span class="ui-icon prev"][/span] Vista precedente[/a] [a href="#" class="fg-button ui-state-default fg-button-icon-solo ui-corner-all" onclick="nav.next.trigger"][span class="ui-icon next"][/span] Vista successiva[/a] It doesn't work, but I have no firebug errors... How can I get it working? PS [] in html stands for <> -- View this message in context: http://n2.nabble.com/Custom-navigation-history-buttons-on-toolbar-tp4639719p4639719.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bmcbride at cha-llp.com Fri Feb 26 10:32:51 2010 From: bmcbride at cha-llp.com (Mapmaker) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] mysql database In-Reply-To: <1267101567473-4632210.post@n2.nabble.com> References: <1267101567473-4632210.post@n2.nabble.com> Message-ID: <1267198371523-4639795.post@n2.nabble.com> You'll probably have to use something like PHP, ASP, or Java to query your database and return the results in an OL friendly format- KML, Json etc. Point to the script as the source for your layer. Best of Luck! -- View this message in context: http://n2.nabble.com/mysql-database-tp4632210p4639795.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alessio.dilorenzo at gmail.com Fri Feb 26 10:50:43 2010 From: alessio.dilorenzo at gmail.com (AlessioDL) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] mysql database In-Reply-To: <1267101567473-4632210.post@n2.nabble.com> References: <1267101567473-4632210.post@n2.nabble.com> Message-ID: <1267199443054-4639901.post@n2.nabble.com> Hi, if you have UMN-Mapserver installed, you can use it to generate WMS (or WFS) layers. Then you can easily add the points to your map. http://mapserver.org/input/vector/mysql.html ciao -- View this message in context: http://n2.nabble.com/mysql-database-tp4632210p4639901.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.petazzoni at sipartech.com Fri Feb 26 13:04:27 2010 From: jerome.petazzoni at sipartech.com (=?ISO-8859-15?Q?J=E9r=F4me_Petazzoni?=) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Best strategy to implement show/hide for large sets of features ? In-Reply-To: <4B869989.8070201@sipartech.com> References: <4B869989.8070201@sipartech.com> Message-ID: <4B880D2B.1090804@sipartech.com> J?r?me Petazzoni wrote: > I think that my current implementation is a bit naive, since each time I > check/uncheck a folder, I : > - create a new StyleMap, > - apply the KML styles, > - apply a dynamic "foldervisibility" map (containing, for each folder, a > {display:'none'} if the folder should be hidden), > - redraw the layer. > This approach worked well enough at first (displaying 150 linestrings > with ~10 points per linestring), but when I added the "points" layer > with 250 point features, it started to be really slow. > Actually, after using Firebug's excellent profiler module, I discovered that my browser was spending most of its time evaluating style rules. Investigating a bit more, I discovered that my KML file had more than 1000 styles, but only ~50 of them were used. But my code was stupidly creating 1000 style rules anyway, and running thru all those style rules for *each* feature at *each* pan/zoom was painfully slow. I added some code to discard the unused styles, and the application is now fast and smooth again. So I guess I won't have to try other approaches (yet) ; and I will definitely (ab)use the profiler when I have performance problems instead of asking silly questions ! :-) Regards, From asufsc at gmail.com Fri Feb 26 13:37:58 2010 From: asufsc at gmail.com (And.) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] GWt + Openlayers - problem:GOOGLE layer appears in left corner In-Reply-To: <1267080470233-4630934.post@n2.nabble.com> References: <1266940063239-4619582.post@n2.nabble.com> <1266947019950-4620546.post@n2.nabble.com> <1267080470233-4630934.post@n2.nabble.com> Message-ID: <1267209478903-4640966.post@n2.nabble.com> paweluz wrote: > > Hi And! > > Thanks for your help. I do not have any method updateSize() on my map... > Below is my code...I hope you could help me... I removed the WMS layer > from the code, because with or without it I still got the same problem... > > > > > private void initializeGooglLayer(){ > GoogleOptions googleLayeroptions= new GoogleOptions(); > googleLayeroptions.setIsBaseLayer(true); > googleLayeroptions.setSphericalMercator(true); > googleLayeroptions.setDisplayInLayerSwitcher(true); > googleLayeroptions.setDisplayOutsideMaxExtent(true); > GMapType gmapType = GMapType.G_NORMAL_MAP; > googleLayeroptions.setType(gmapType); > googleLayer = new Google("Goole Layer",googleLayeroptions); > } > > private void initializeMap(){ > MapOptions mapOptions = new MapOptions(); > mapOptions.setControls(new JObjectArray(new JSObject[] {})); > mapOptions.setNumZoomLevels(17); > mapOptions.setMaxResolution((float) 156543.0339); > Bounds myBounds = new Bounds(-20037508, -20037508,20037508, > 20037508); > mapOptions.setMaxExtent(myBounds); > Projection myProjection = new Projection("EPSG:900913"); > mapOptions.setProjection("EPSG:900913"); > mapOptions.setDisplayProjection(myProjection); > mapWidget = new MapWidget("750px", "600px", mapOptions); > myMap = mapWidget.getMap(); > > this.initializeGooglLayer(); // initialize Google layer > > myMap.addLayers(new Layer[] {googleLayer}); > myMap.addControl(new PanZoomBar()); > myMap.addControl(new MousePosition()); > myMap.addControl(new LayerSwitcher()); > myMap.addControl(new Navigation()); > LonLat center = new LonLat(1722814.18028, 6792060.56768); > myMap.setCenter(center, 14); > } > > public void onModuleLoad() { > this.initializeMap(); > openlayersPanel.add(mapWidget,DockPanel.CENTER); > addPanel.add(openlayersPanel); > mainPanel.add(addPanel); > RootPanel.get("mainDiv").add(mainPanel); > } > > > > Regards, > Poul > Then create it. public static native void updateSize(JSObject map)/*-{ map.updateSize(); }-*/; You just need pass as parameter to this method the object map.getJSObject(); . -- View this message in context: http://n2.nabble.com/GWt-Openlayers-problem-GOOGLE-layer-appears-in-left-corner-tp4619582p4640966.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jmpmcmanus at gmail.com Fri Feb 26 15:52:07 2010 From: jmpmcmanus at gmail.com (James McManus) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Clustering Message-ID: <8203a1261002261252s235037c8o64f1d38eb51b878b@mail.gmail.com> Hi - I'm using the cluster strategy, witch is great! However, I have problems with the time it takes to render clusters for large data sets at high resolution. Web browsers produce a busy or stopped responding message. Is there a way I can limit the number of clusters calculated in a similar way to buffering, so they will just be calculated for the display area? Thanks Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100226/7831e58a/attachment.html From adube at mapgears.com Fri Feb 26 16:09:13 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Clustering In-Reply-To: <8203a1261002261252s235037c8o64f1d38eb51b878b@mail.gmail.com> References: <8203a1261002261252s235037c8o64f1d38eb51b878b@mail.gmail.com> Message-ID: <4B883879.9040608@mapgears.com> James, Have you tried the bbox strategy ? http://openlayers.org/dev/examples/strategy-bbox.html Alexandre James McManus wrote: > Hi - I'm using the cluster strategy, witch is great! However, I have > problems with the time it takes to render clusters for large data sets > at high resolution. Web browsers produce a busy or stopped responding > message. Is there a way I can limit the number of clusters calculated > in a similar way to buffering, so they will just be calculated for the > display area? > > Thanks > Jim > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From joepub1962 at gmail.com Fri Feb 26 17:09:19 2010 From: joepub1962 at gmail.com (Joe public) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Newbie questions In-Reply-To: References: <1266778535164-4608007.post@n2.nabble.com> <1266799464682-4609543.post@n2.nabble.com> <1266808951449-4610023.post@n2.nabble.com> <2f6614521002241954o30174c9cy1f49fd04cdcc6931@mail.gmail.com> Message-ID: <2f6614521002261409o4f855d2dt1ed6338ef0584fa2@mail.gmail.com> Pablo: Before I got you reply which I'll try,,, I found and tried the following: QUERY_LAYERS: map.layers[2].params.LAYERS, But it didn't have the effect I wanted..... What I really want is the pop up to show ONLY data for the active layer.... Right now it is show data for the active layer plus the layer(s) underneath Is this possible? On Fri, Feb 26, 2010 at 10:20 AM, pablo lopez wrote: > > > Hi Joe, I think something like this shoul do it: > > info = new OpenLayers.Control. > WMSGetFeatureInfo({ > url: 'http://tobagoborn.com:8080/geoserver/wms', > title: 'Identify features by clicking', > layers: [layer1, layer2,...], <---Here you provide an array of > layer objects. These are the layers you are querying > eventListeners: { > getfeatureinfo: function(event) { > map.addPopup(new OpenLayers.Popup.FramedCloud( > "chicken", > map.getLonLatFromPixel(event.xy), > null, > event.text, > null, > true > )); > } > } > }); > map.addControl(info); > info.activate(); > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100226/ed03a6e0/attachment.html From jmpmcmanus at gmail.com Fri Feb 26 17:20:17 2010 From: jmpmcmanus at gmail.com (James McManus) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Clustering In-Reply-To: <4B883879.9040608@mapgears.com> References: <8203a1261002261252s235037c8o64f1d38eb51b878b@mail.gmail.com> <4B883879.9040608@mapgears.com> Message-ID: <8203a1261002261420t4c66b7e0uc3fd67933a9bbda1@mail.gmail.com> I was using Fixed, but BBOX did not seem to help. I'm going to take a look at setting the threshold property higher, displaying the actual features sooner. I was not even using the actual features, because I did not like the way they looked. The data is a KML file which I do not have control over, so I've been using cluster to create the actual feature. Thanks for the suggestion. Jim On Fri, Feb 26, 2010 at 4:09 PM, Alexandre Dube wrote: > James, > > Have you tried the bbox strategy ? > > http://openlayers.org/dev/examples/strategy-bbox.html > > Alexandre > > > James McManus wrote: > >> Hi - I'm using the cluster strategy, witch is great! However, I have >> problems with the time it takes to render clusters for large data sets at >> high resolution. Web browsers produce a busy or stopped responding message. >> Is there a way I can limit the number of clusters calculated in a similar >> way to buffering, so they will just be calculated for the display area? >> >> Thanks >> Jim >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100226/e12fae39/attachment.html From richard.greenwood at gmail.com Fri Feb 26 20:19:32 2010 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] How to recenter the map when drawing In-Reply-To: <1266580719847-4597434.post@n2.nabble.com> References: <1266336688585-4581070.post@n2.nabble.com> <4B7AC80B.2080803@swoodbridge.com> <1266338857052-4581324.post@n2.nabble.com> <20100216164938.GE21714@metacarta.com> <1266339384568-4581371.post@n2.nabble.com> <20100216170508.GF21714@metacarta.com> <1266580719847-4597434.post@n2.nabble.com> Message-ID: Steve, This is not exactly what you are looking for, but you could watch sketchmodified and when the mouse was within a few pixels of any edge of the current map, you would pan the map a few pixels in that direction. This would mimic the behavior of MapInfo's "edge panning" (and probably other software) and it would provide the opportunity for the user to pan beyond the current map extents to place a new vertex. And you don't have to detect a 'click' or 'vertex added' event, which apparently doesn't exist. Regards, Rich On Fri, Feb 19, 2010 at 4:58 AM, smartini wrote: > > > Christopher Schmidt-2 wrote: >> >> On Tue, Feb 16, 2010 at 08:56:24AM -0800, smartini wrote: >>> >>> Christopher, >>> sketchmodified appears to fire constantly while you are drawing and the >>> mouse is moving. I hooked this in to setCenter() for a laugh as the map >>> constantly recentered as I moved the mouse. This event appears to offer a >>> little more than I require. >>> >>> I console logged all the events just to see if there was anything >>> suitable >>> but alas, there was not, hence my cry for help. >> >> Makes sense. A quick look at the code doesn't show anything obvious that >> would be better. >> >> -- Chris >> > > So, would you or anybody else in the community have any suggestions as to > how to go about handling such an event? > I offer as an example a site which manages to accomplish this: > http://www.sanoodi.com/routes/create/ ? (after registering/logging in) > though I have as yet been unable to reverse engineer the approach used here. > > Regards, > Steve > > -- > View this message in context: http://n2.nabble.com/How-to-recenter-the-map-when-drawing-tp4581070p4597434.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From sphyrz at gmail.com Sat Feb 27 07:16:11 2010 From: sphyrz at gmail.com (Lewis Oaten) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] WFS Not loading In-Reply-To: <351785351002251340q60d34d4dm1f6ba8516c81ad12@mail.gmail.com> References: <3ddca5671002090909h3a2b25e9v4d1ac109a99d84e1@mail.gmail.com> <3ddca5671002120658s5c02819cv91c4e92b9b846d4d@mail.gmail.com> <20100212151542.GW24279@metacarta.com> <351785351002120746l357089c4t1cba4a62f1551a18@mail.gmail.com> <3ddca5671002251314h4d56cc9ei8cf27ceffb6a2f09@mail.gmail.com> <351785351002251324t2f1ce1d0q7f1d995e13aeb2b5@mail.gmail.com> <3ddca5671002251332p2e044afdm7a41689ea019942d@mail.gmail.com> <3ddca5671002251332k275bb845kdfaaed7b3e532fe4@mail.gmail.com> <351785351002251340q60d34d4dm1f6ba8516c81ad12@mail.gmail.com> Message-ID: <3ddca5671002270416x695df073s7b02a47b42b1f371@mail.gmail.com> Hi Brian, Apologise for forgetting to "Reply to all" whilst on my Android. The code is: http://pastebin.com/A5DnFuSi The response headers and data are: http://pastebin.com/bkhMGXaX Thank you very much for your help. Regards, Lewis Oaten web: lewisoaten.com twit: twitter.com/lewisoaten key: pk.caecus.co.uk cal: tgl.me/LewisOaten On Thu, Feb 25, 2010 at 9:40 PM, Brian Stempin wrote: > Sorry for the top posting, the last response was not sent to the list. > > Lewis, > Could you post your current code and the response message into your favorite > pastebin site and then send us a link? > > Brian > > On Thu, Feb 25, 2010 at 4:32 PM, Lewis Oaten wrote: >> >> Hi Brian, >> >> Thanks for your prompt response. >> >> I use Chrome development tools and can see data which is returned. >> >> Regards, >> >> Lewis Oaten >> web: lewisoaten.com >> twit: twitter.com/lewisoaten >> key: pk.caecus.co.uk >> cal: tgl.me/LewisOaten >> >> Sent on the move. >> >> On 25 Feb 2010 21:24, "Brian Stempin" wrote: >> >> Lewis, >> Can you elaborate on what a "positive response" means?? Did you get an >> HTTP 200 OK, or did you use something like Firebug to look inside of your >> request and found actual data returned? >> >> I'm asking because you can get an empty 200OK.? I had a rewrite issue that >> prevented my proxied requests from working correctly (it always returned >> with a 200OK).? IIRC, it can also happen if you're having projection issues >> (eg, because of srs mismatches, your WFS server doesn't find any features >> and returns an empty response). >> >> Brian > > From alessio.dilorenzo at gmail.com Sat Feb 27 11:33:55 2010 From: alessio.dilorenzo at gmail.com (AlessioDL) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Custom navigation history buttons on toolbar In-Reply-To: <1267197813849-4639719.post@n2.nabble.com> References: <1267197813849-4639719.post@n2.nabble.com> Message-ID: <1267288435682-4645640.post@n2.nabble.com> I solved by using OpenLayers.Contro.Panel in my buttons... -- View this message in context: http://n2.nabble.com/Custom-navigation-history-buttons-on-toolbar-tp4639719p4645640.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From joepub1962 at gmail.com Sun Feb 28 12:51:35 2010 From: joepub1962 at gmail.com (Joe public) Date: Wed Sep 1 17:18:34 2010 Subject: [OpenLayers-Users] Newbie questions In-Reply-To: <2f6614521002261409o4f855d2dt1ed6338ef0584fa2@mail.gmail.com> References: <1266778535164-4608007.post@n2.nabble.com> <1266799464682-4609543.post@n2.nabble.com> <1266808951449-4610023.post@n2.nabble.com> <2f6614521002241954o30174c9cy1f49fd04cdcc6931@mail.gmail.com> <2f6614521002261409o4f855d2dt1ed6338ef0584fa2@mail.gmail.com> Message-ID: <2f6614521002280951h4bc34fd6u209de7cacd23bab9@mail.gmail.com> Pablo: Thanks for the help!! I have a good idea as to how the popup works and that the feature info got the layers that active and so far I have not found a way to display only the info for the topmost layer I'll keep digging... In the meantime... I have another question..... When I click anywhere outside of the map I get a empty popup box/cloud I add the following if statement but still get the empty popup... getfeatureinfo: function(event) { if (event.text.indexOf() == -1) Any suggestions as to how to prevent the pop in places that there should not be any Thanks map.addLayers([pwms,rwms,iwms]); info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://tobagoborn.com:8080/geoserver/wms', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { if (event.text.indexOf() == -1) <-- ADDED THIS IF STATMENT { map.addPopup(new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } } }); map.addControl(info); info.activate(); On Fri, Feb 26, 2010 at 5:09 PM, Joe public wrote: > Pablo: > Before I got you reply which I'll try,,, I found and tried the following: > > QUERY_LAYERS: map.layers[2].params.LAYERS, > > But it didn't have the effect I wanted..... > > What I really want is the pop up to show ONLY data for the active layer.... > Right now it is show data for the active layer plus the layer(s) underneath > Is this possible? > > > > On Fri, Feb 26, 2010 at 10:20 AM, pablo lopez wrote: > >> >> >> Hi Joe, I think something like this shoul do it: >> >> info = new OpenLayers.Control. >> WMSGetFeatureInfo({ >> url: 'http://tobagoborn.com:8080/geoserver/wms', >> title: 'Identify features by clicking', >> layers: [layer1, layer2,...], <---Here you provide an array of >> layer objects. These are the layers you are querying >> eventListeners: { >> getfeatureinfo: function(event) { >> map.addPopup(new OpenLayers.Popup.FramedCloud( >> "chicken", >> map.getLonLatFromPixel(event.xy), >> null, >> event.text, >> null, >> true >> )); >> } >> } >> }); >> map.addControl(info); >> info.activate(); >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100228/ebf292a0/attachment.html