Re: [OpenLayers-Users] how to limit to 1 the number of points of a vector layer
Hi, you could do something like: 1) use sketchstarted event to limit the number of features to 1 2) use the featureadded event to set your form field Example code (just for reference, copy/paste from another project): new OpenLayers.Layer.Vector(Sketch, { displayInLayerSwitcher: false, eventListeners: { sketchstarted: function(evt) { // make sure there is only 1 feature at a time vector.destroyFeatures(); }, featureadded: setFormValues, scope: this } }); var setFormValues = function(evt) { var geometry = evt.feature.geometry; var form = document.forms[this.formid]; var toProjection = new OpenLayers.Projection(form.elements[epsg].value); geometry = geometry.clone().transform(map.getProjectionObject(), toProjection); var points = geometry.getVertices(); var x = points[0].x; var y = points[0].y; form.elements[x].value = x.toFixed(2); form.elements[y].value = y.toFixed(2); form.elements[directionAngle].value = this.calculateAngle(geometry); } Best regards, Bart hi all, starting from the Drag-feature example ( http://openlayers.org/dev/examples/drag-feature.html) I need to limit to 1 the number of points which can be added to the vector layer if the user, after having added one point, clicks again, the first point is deleted and only the newly created remains. I need this for localization purpose: i.e. Dear User, tell me where THAT_THING is so the position must be unique. I also need to extract coordinates from the point (document.getElementById(x_coord).value = ???) Can anyone help me? thank you in advance! alberto ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Busy Status on Map
Please read this Wiki page again. You need to add css as well, like it says on the page. Bart Hi Pavel, I downloaded LoadingPanel.js and added script tag to my html file. Added new OpenLayers.Control.LoadingPanel() to my map object. But, I didn't see any Image on my map. It just the same as before adding these things. Is there something else I may be missing ?? Cheers, Kalyan On Tue, Aug 24, 2010 at 9:40 PM, Pavel Iacovlev iacovlev.pa...@gmail.comwrote: http://trac.openlayers.org/wiki/Addins/LoadingPanel On Tue, Aug 24, 2010 at 2:36 PM, Kalyan Kamepalli kalyan.kamepa...@gmail.com wrote: Hello everyone, Currently, the OpenLayers is not showing any busy status while loading map data. This is a bit inconvenient for the user. I would like to notify user of the progress.So, Is there a way to add a busy cursor or a progress bar kind of thing on the map div ?? Thanks, Kalyan ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- http://iap.md, The future is open ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Busy Status on Map
Did you put the image in your theme dir? Bart Bart, I did add the CSS from that wiki page. I just copied it from there and added LoaadingPanel control to map. But, I can't get it work. On Tue, Aug 24, 2010 at 10:26 PM, Bart van den Eijnden (OSGIS) bart...@osgis.nl wrote: Please read this Wiki page again. You need to add css as well, like it says on the page. Bart Hi Pavel, I downloaded LoadingPanel.js and added script tag to my html file. Added new OpenLayers.Control.LoadingPanel() to my map object. But, I didn't see any Image on my map. It just the same as before adding these things. Is there something else I may be missing ?? Cheers, Kalyan On Tue, Aug 24, 2010 at 9:40 PM, Pavel Iacovlev iacovlev.pa...@gmail.comwrote: http://trac.openlayers.org/wiki/Addins/LoadingPanel On Tue, Aug 24, 2010 at 2:36 PM, Kalyan Kamepalli kalyan.kamepa...@gmail.com wrote: Hello everyone, Currently, the OpenLayers is not showing any busy status while loading map data. This is a bit inconvenient for the user. I would like to notify user of the progress.So, Is there a way to add a busy cursor or a progress bar kind of thing on the map div ?? Thanks, Kalyan ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- http://iap.md, The future is open ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Busy Status on Map
Do you add the control before adding your layers? Does it work when you zoomin? What do you see with Firebug? Bart .olControlLoadingPanel { background-image: url( ./img/loading.png); position: relative; width: 195px; height: 11px; background-position: center; background-repeat: no-repeat; display: none; } This is how my CSS looks. I placed my loading.png in img folder. Does it make any difference ?? On Tue, Aug 24, 2010 at 10:33 PM, Bart van den Eijnden (OSGIS) bart...@osgis.nl wrote: Did you put the image in your theme dir? Bart Bart, I did add the CSS from that wiki page. I just copied it from there and added LoaadingPanel control to map. But, I can't get it work. On Tue, Aug 24, 2010 at 10:26 PM, Bart van den Eijnden (OSGIS) bart...@osgis.nl wrote: Please read this Wiki page again. You need to add css as well, like it says on the page. Bart Hi Pavel, I downloaded LoadingPanel.js and added script tag to my html file. Added new OpenLayers.Control.LoadingPanel() to my map object. But, I didn't see any Image on my map. It just the same as before adding these things. Is there something else I may be missing ?? Cheers, Kalyan On Tue, Aug 24, 2010 at 9:40 PM, Pavel Iacovlev iacovlev.pa...@gmail.comwrote: http://trac.openlayers.org/wiki/Addins/LoadingPanel On Tue, Aug 24, 2010 at 2:36 PM, Kalyan Kamepalli kalyan.kamepa...@gmail.com wrote: Hello everyone, Currently, the OpenLayers is not showing any busy status while loading map data. This is a bit inconvenient for the user. I would like to notify user of the progress.So, Is there a way to add a busy cursor or a progress bar kind of thing on the map div ?? Thanks, Kalyan ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- http://iap.md, The future is open ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Is it possible to show a subsection (sprite) of an image as a marker?
Hi Matt, not out of the box unfortunately. This would either require changes to the current renderers (SVG and VML), or implementing your own custom renderer. I did something like this a while ago, see: http://osgisjs.blogspot.com/2010/06/anchor-renderer.html Best regards, Bart My application has 100 marker images that I want to display on the Map. I don't want to force to user to download 100 images. A technique that has worked for other graphic intensive sites, is to send all the markers down as sprites in a single image (http://www.alistapart.com/articles/sprites), and use CSS to control which part of the image is shown for every marker. Does OpenLayers have support for these sorts of techniques in the Vector Layer? If not, is it possible to use custom html as a marker instead of a graphic? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Is-it-possible-to-show-a-subsection-sprite-of-an-image-as-a-marker-tp5435420p5435420.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Markers with dymamically changing appearance
Hi, have you considered using a vector layer with an externalGraphic instead? It should be fairly easy to change the appearance of that through the asscioated styles and redraw the features. Best regards, Bart New to Openlayers. Great project, many thanks to all who put so much work into creating and documenting it! What would be the idiomatic way to have the markers on my map with part of their appearance being dynamically generated and changeable? This is to display relative temporal information on the markers: as the user changes their location in time instead of space, using controls outside of the map itself, I need my markers to change their appearance in a dynamically-generated (ie local javascript) fashion. It would be possible to have a fixed set of graphics that they switch between, but there would be a largish number of these, so it would be preferable to just generate them locally via Javascript. Best of all possible worlds would probably be to fetch a base marker and then copy it, add the custom graphic as a layer on top of it, drop it on the map, then be able to get at it and just change its custom layer with javascript drawing commands (I'm okay with having to use HTML5 for this, but I'd prefer not to). The graphic I want to draw on top of the marker isn't complicated two or three lines at right angles, so I should be able to dynamically update even a fair number of markers assuming there isn't a massive drawing overhead. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Markers with dymamically changing appearance
Hi, please always cc the list, since I don't know all the answers and people with similar issues can find it in the e-mail archives later on. Your first question: I don't know. Redrawing can be done using: feature.layer.drawFeature(feature); http://dev.openlayers.org/docs/files/OpenLayers/Layer/Vector-js.html#OpenLayers.Layer.Vector.drawFeature Best regards, Bart On Aug 11, 2010, at 0:16 , Bart van den Eijnden (OSGIS) wrote: please check out: http://docs.openlayers.org/library/feature_styling.html Labels can be drawn as well with vector features, see e.g.: http://openlayers.org/dev/examples/vector-features-with-text.html Thanks. Two more questions: - how do I draw in screen coordinates (I need to draw a polygon starting from a latlong, then draw 2em up and to the right etc), and have it stay the same size on-screen when the user zooms (ie make markers)? - how do I redraw these things? Just erase them and draw new ones, or do I replace their graphics properties? -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Implementing a layer for a proprietary WMS-like service
It does not seem an ideal design to me. Is there no way to provide caching (maybe by setting the correct http headers) so that the backbuffer tile will come from the browser's cache? Or are your async requests using POST and not GET? Best regards, Bart I dropped my plans of extending ImageLayer...the getUrlAsync approach leads to the same problem than with GridLayer (multiple image requests during zoom/pan animation). However I have a new idea: what if I manage the layer through a control? It could perform the map request, parse out the map image bounds and url and then add an ImageLayer with the requested image to the map. If the image layer gets moved, it would trigger a map request through the control. When the map response arrives, the control removes the current layer and adds a new layer to the map. Any thoughts on that? Franz 2010/8/3 Franz Buchinger fbuchin...@gmail.com In my case, creating the single-tiled map is rather expensive - because the map image is generated on-the-fly. Therefore, I want my layer to anticipate the map action (zoom, pan), just like the ImageLayer does. I actually had a well working implementation of my map viewer based on ImageLayers, but all the logic (requesting new map etc) happened outside the layer and caused side-effects with other layers. I'm wondering if it would be better to derive my ProprietaryMapLayer from ImageLayer. I could extend it with a getUrlAsync method that fetches the map image url based on the new extent after a map action was performed. Would that work? Franz 2010/8/3 christopher.schm...@nokia.com On Aug 3, 2010, at 9:42 AM, ext Franz Buchinger wrote: Hi Bart, yes, I've set these options. I noticed that these multiple requests only happen when I set transitionEffect: 'resize'. This is basically expected. The transition effect creates multiple tiles, and since creating images is generally considered to be 'cheap' in OpenLayers -- since images should be served from cache -- we just create more tiles, rather than copying existing ones in any way. So this is by design; if you don't like the design, you'll need to do some more coding to fix it :) -- Chris I'm using OpenLayers 2.9.1. Franz 2010/8/3 Bart van den Eijnden (OSGIS) bart...@osgis.nl Hi Franz, and have you verified you only have a single tile? Do you have singleTile: true, ratio: 1 and buffer: 0 in your layer options? Best regards, Bart Hi Bart, I'm almost done with my layer implementation. The only problem: my getURLasync() Method gets triggered far too often (about 3x per pan/zoom action). How can I make sure that getURLasync is only triggered once per map action? Franz 2010/8/3 Bart van den Eijnden (OSGIS) bart...@osgis.nl Hi Franz, check out OpenLayers.Tile.Image. Best regards, Bart Hi Bart, thanks for the fast and helpful response! One question though: which class actually invokes the methods OpenLayers.Layer.ArcIMS.getUrl and OpenLayers.Layer.getUrlAsync? They seem to be overriden methods, but i couldn't find them in OpenLayers.Layer.Grid or OpenLayers.Layer.HTTPRequest. kind regards, Franz 2010/8/3 Bart van den Eijnden (OSGIS) bart...@osgis.nl Hi, I would advise you to look at OpenLayers.Layer.ArcIMS which uses a similar approach. Best regards, Bart Hi, I'm a frontend developer and was programming a web viewer for a proprietary, WMS-like map service. I discovered Openlayers one month ago and I'm really fascinated by its awesome capabilities, so I decided to integrate our map service in OpenLayers. Here is a short description how the map service works: The client sends an AJAX request containing the current map bounds, the map id and the pixel size of the map. map=22px=1720py=833left=2504400right=2544000top=5699500bottom=5669500type=0 The server responds with the generated map image (url) and the corrected bounds: MapProperties mapLeft2493227.6110444176/mapLeft mapTop5699500/mapTop mapRight2555172.3889555824/mapRight mapBottom5669500/mapBottom mapType0/mapType overviewMap22/overviewMap url http://localhost/cgmCache/41600065-c3d2-4934-9feb-78a32f6668c8.png /url /MapProperties The maps are always single-tiled. My first approach was to write a ProprietaryMapLayer, that executes the map request and creates an ImageLayer with the result url and its bounds. When the ImageLayer is moved, a new request is performed, the current ImageLayer is destroyed and a new one generated. The disadvantage: there are now 2 layers representing one map, which leads to confusion in the layer
Re: [OpenLayers-Users] changelayer event
Hi, use e.layer instead. It will contain the modified layer. Best regards, Bart Hello everyone. I am listening the changelayer event on map.events like this: ctx.map.events.on({ changelayer: function(e) { if(e.property === visibility) { alert(e.object.baseLayer.name); } } }); the problem here is, when i check the the baseLayer.name via console.log(e) I see the newly selected layer's name but when I use alert() I get the previously selected layer's name. my goal here is to get the newly selected layer's name and index from the layer switcher. any help or direction is appreciated. thanks in advance. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/changelayer-event-tp5372564p5372564.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] changelayer event
Maybe check for the changebaselayer event and then use event.layer? Best regards, Bart Hello Bart, Thanks for the reply. I have tried e.layer.name and e.layer.map.baseLayer.name and both provides me the previously selected layer's name. Is there events that I should listen instead of map's changelayer event? Maybe there's something for LayerSwitcher? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/changelayer-event-tp5372564p5372665.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Layer.setName() error
Not really an OpenLayers question but I think you need to use: clone.get(layer).setName(pmpm); Best regards, Bart Hi all, I am just beginning adding layers to my map and experimenting with CQL filters. When calling the function Layer.setName, to change the name of a layer, Firebug gives the error clone.setName is not a function (where clone is the variable holding the layer). Could anyone point me in the right direction please? Many thanks, Eoin I am using OpenLayers 2.9.1 The following is my code: var clone = record.clone(); clone.get(layer).mergeNewParams({ format: image/png, transparent: true, cql_filter:'population400' }); clone.setName(pmpm); -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Layer-setName-error-tp5367399p5367399.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Implementing a layer for a proprietary WMS-like service
Hi, I would advise you to look at OpenLayers.Layer.ArcIMS which uses a similar approach. Best regards, Bart Hi, I'm a frontend developer and was programming a web viewer for a proprietary, WMS-like map service. I discovered Openlayers one month ago and I'm really fascinated by its awesome capabilities, so I decided to integrate our map service in OpenLayers. Here is a short description how the map service works: The client sends an AJAX request containing the current map bounds, the map id and the pixel size of the map. map=22px=1720py=833left=2504400right=2544000top=5699500bottom=5669500type=0 The server responds with the generated map image (url) and the corrected bounds: MapProperties mapLeft2493227.6110444176/mapLeft mapTop5699500/mapTop mapRight2555172.3889555824/mapRight mapBottom5669500/mapBottom mapType0/mapType overviewMap22/overviewMap urlhttp://localhost/cgmCache/41600065-c3d2-4934-9feb-78a32f6668c8.png /url /MapProperties The maps are always single-tiled. My first approach was to write a ProprietaryMapLayer, that executes the map request and creates an ImageLayer with the result url and its bounds. When the ImageLayer is moved, a new request is performed, the current ImageLayer is destroyed and a new one generated. The disadvantage: there are now 2 layers representing one map, which leads to confusion in the layer switcher control. I read over the code of Layer.WMS, which inherits from Layer.Grid and also makes use of Tile.Image, but it's difficult to derive a solution from it, since all the request/response handling is already integrated into the layer. Furthermore, WMS simply responds with tile images, whereas I have to deal with an xml response. Any ideas how I could implement my layer? kind regards, Franz ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Implementing a layer for a proprietary WMS-like service
Hi Franz, check out OpenLayers.Tile.Image. Best regards, Bart Hi Bart, thanks for the fast and helpful response! One question though: which class actually invokes the methods OpenLayers.Layer.ArcIMS.getUrl and OpenLayers.Layer.getUrlAsync? They seem to be overriden methods, but i couldn't find them in OpenLayers.Layer.Grid or OpenLayers.Layer.HTTPRequest. kind regards, Franz 2010/8/3 Bart van den Eijnden (OSGIS) bart...@osgis.nl Hi, I would advise you to look at OpenLayers.Layer.ArcIMS which uses a similar approach. Best regards, Bart Hi, I'm a frontend developer and was programming a web viewer for a proprietary, WMS-like map service. I discovered Openlayers one month ago and I'm really fascinated by its awesome capabilities, so I decided to integrate our map service in OpenLayers. Here is a short description how the map service works: The client sends an AJAX request containing the current map bounds, the map id and the pixel size of the map. map=22px=1720py=833left=2504400right=2544000top=5699500bottom=5669500type=0 The server responds with the generated map image (url) and the corrected bounds: MapProperties mapLeft2493227.6110444176/mapLeft mapTop5699500/mapTop mapRight2555172.3889555824/mapRight mapBottom5669500/mapBottom mapType0/mapType overviewMap22/overviewMap url http://localhost/cgmCache/41600065-c3d2-4934-9feb-78a32f6668c8.png /url /MapProperties The maps are always single-tiled. My first approach was to write a ProprietaryMapLayer, that executes the map request and creates an ImageLayer with the result url and its bounds. When the ImageLayer is moved, a new request is performed, the current ImageLayer is destroyed and a new one generated. The disadvantage: there are now 2 layers representing one map, which leads to confusion in the layer switcher control. I read over the code of Layer.WMS, which inherits from Layer.Grid and also makes use of Tile.Image, but it's difficult to derive a solution from it, since all the request/response handling is already integrated into the layer. Furthermore, WMS simply responds with tile images, whereas I have to deal with an xml response. Any ideas how I could implement my layer? kind regards, Franz ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Implementing a layer for a proprietary WMS-like service
Hi Franz, and have you verified you only have a single tile? Do you have singleTile: true, ratio: 1 and buffer: 0 in your layer options? Best regards, Bart Hi Bart, I'm almost done with my layer implementation. The only problem: my getURLasync() Method gets triggered far too often (about 3x per pan/zoom action). How can I make sure that getURLasync is only triggered once per map action? Franz 2010/8/3 Bart van den Eijnden (OSGIS) bart...@osgis.nl Hi Franz, check out OpenLayers.Tile.Image. Best regards, Bart Hi Bart, thanks for the fast and helpful response! One question though: which class actually invokes the methods OpenLayers.Layer.ArcIMS.getUrl and OpenLayers.Layer.getUrlAsync? They seem to be overriden methods, but i couldn't find them in OpenLayers.Layer.Grid or OpenLayers.Layer.HTTPRequest. kind regards, Franz 2010/8/3 Bart van den Eijnden (OSGIS) bart...@osgis.nl Hi, I would advise you to look at OpenLayers.Layer.ArcIMS which uses a similar approach. Best regards, Bart Hi, I'm a frontend developer and was programming a web viewer for a proprietary, WMS-like map service. I discovered Openlayers one month ago and I'm really fascinated by its awesome capabilities, so I decided to integrate our map service in OpenLayers. Here is a short description how the map service works: The client sends an AJAX request containing the current map bounds, the map id and the pixel size of the map. map=22px=1720py=833left=2504400right=2544000top=5699500bottom=5669500type=0 The server responds with the generated map image (url) and the corrected bounds: MapProperties mapLeft2493227.6110444176/mapLeft mapTop5699500/mapTop mapRight2555172.3889555824/mapRight mapBottom5669500/mapBottom mapType0/mapType overviewMap22/overviewMap url http://localhost/cgmCache/41600065-c3d2-4934-9feb-78a32f6668c8.png /url /MapProperties The maps are always single-tiled. My first approach was to write a ProprietaryMapLayer, that executes the map request and creates an ImageLayer with the result url and its bounds. When the ImageLayer is moved, a new request is performed, the current ImageLayer is destroyed and a new one generated. The disadvantage: there are now 2 layers representing one map, which leads to confusion in the layer switcher control. I read over the code of Layer.WMS, which inherits from Layer.Grid and also makes use of Tile.Image, but it's difficult to derive a solution from it, since all the request/response handling is already integrated into the layer. Furthermore, WMS simply responds with tile images, whereas I have to deal with an xml response. Any ideas how I could implement my layer? kind regards, Franz ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] How to use control OpenLayers.Control.Measure
Check examples/measure.html in the OpenLayers examples directory. Best regards, Bart Hi all, I add OpenLayers.Control.Measure to the map, but I can't see any button which allows to measure. var measure=new OpenLayers.Control.Measure(); map.addControl(measure); measure.activate(); Have you ever used OpenLayers.Control.Measure? Any suggestion? ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Remove feature control needed
Hi, check out: http://trac.openlayers.org/ticket/1882 Best regards, Bart Hi list, I need a remove feature control to delete and remove a point, line or polygon drawn by user. Anybody has some code with this goal? Thank's in advance. Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogràfic de Catalunya http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20CatalunyaXYADDRESS=429486:4580392 Parc de Montjuïc, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat http://www.icc.cat/ ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] SphericalMercator and SRS aliases epsg:900913, epsg:3857, epsg:3785, epsg:102113
Hi Anne, in trunk this has been addressed, see: http://trac.openlayers.org/ticket/2665 Best regards, Bart Hello list, OpenStreetMap and also some popular commercial mapservices (google, bing, yahoo) are using the so called sphericalmercator projection. OpenLayers has built-in support for this type of layer, inherited from OpenLayers.Layer.SphericalMercator. If you use a sphericalmercator layer as a baselayer, you may want to combine this with other layers. By default, the openlayers sphericalmercator baselayer uses SRS projection-code 'EPSG:900913' . So, if you try to open an overlay, the overlay layer will be called with parameter SRS=EPSG:900913. EPSG Code 900913 happens to be a bogus code, based on the word 'google'. Perhaps due to the resemblance of '900913' and 'google' or due to other reasons, there are now several other codes in use for the same projection: EPSG:3857 EPSG:3785 = maybe because of a typo by someone somewhere? EPSG:102113 Some map-services have stopped supporting SRS=EPSG:900913 and this raises a problem for openlayers sphericalmercator users. Instead of displaying a map, these mapservices will respond with something like 'no support for EPSG:900913'. The problem of overlaying sphericalmercator layers that do not support epsg:900913 can be (partly) solved as follows: Override the default srs code for sphericalmercator layers by explicitly resetting the projection before adding the layer to a map: var osmLayer = new OpenLayers.Layer.OSM(OpenStreetMap); // osmlayer is now sphericalmercator with default epsg:900913 osmLayer.projection = new OpenLayers.Projection (EPSG:3857); // osmlayer is now sphericalmercator with epsg:3857 map.addLayers ([osmLayer]); Overlay layers will now be requested with SRS=ESPG:3857 However, resetting the code for the baselayer projection, causes trouble for the controls for MousePosition and MeasureControl: distances and coordinates are no longer presented in the correct projection. I solved this by adding the following lines of code to file lib\OpenLayers\Layer\SphericalMercator.js OpenLayers.Projection.addTransform(EPSG:4326, EPSG:3857, OpenLayers.Layer.SphericalMercator.projectForward); OpenLayers.Projection.addTransform(EPSG:4326, EPSG:102113, OpenLayers.Layer.SphericalMercator.projectForward); OpenLayers.Projection.addTransform(EPSG:4326, EPSG:3785, OpenLayers.Layer.SphericalMercator.projectForward); OpenLayers.Projection.addTransform(EPSG:3857, EPSG:4326, OpenLayers.Layer.SphericalMercator.projectInverse); OpenLayers.Projection.addTransform(EPSG:102113, EPSG:4326, OpenLayers.Layer.SphericalMercator.projectInverse); OpenLayers.Projection.addTransform(EPSG:3785, EPSG:4326, OpenLayers.Layer.SphericalMercator.projectInverse); Questions: - is this the way to support aliases for 900913 and support MousePosition and MeasureControl at the same time? - if yes, shouldn't the above lines be part of the standard OpenLayers distribution? Anne Blankert ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] SphericalMercator and SRS aliases epsg:900913, epsg:3857, epsg:3785, epsg:102113
Hi Anne, check the example (first couple of lines in comments): http://trac.openlayers.org/browser/trunk/openlayers/examples/web-mercator.js?rev=10384 So that's up to the application to provide (at least for now). But I can also see that's not really easy for end-users. What do other people think about providing the EPSG aliases by default in the OL library? Best regards, Bart Hello Bart, I am not sure if http://trac.openlayers.org/ticket/2665 takes care of the side effect that Control.Measure and MousePosition are no longer working properly after resetting the projection code? Anne On 7/19/2010 12:29 PM, Bart van den Eijnden (OSGIS) wrote: Hi Anne, in trunk this has been addressed, see: http://trac.openlayers.org/ticket/2665 Best regards, Bart Hello list, OpenStreetMap and also some popular commercial mapservices (google, bing, yahoo) are using the so called sphericalmercator projection. OpenLayers has built-in support for this type of layer, inherited from OpenLayers.Layer.SphericalMercator. If you use a sphericalmercator layer as a baselayer, you may want to combine this with other layers. By default, the openlayers sphericalmercator baselayer uses SRS projection-code 'EPSG:900913' . So, if you try to open an overlay, the overlay layer will be called with parameter SRS=EPSG:900913. EPSG Code 900913 happens to be a bogus code, based on the word 'google'. Perhaps due to the resemblance of '900913' and 'google' or due to other reasons, there are now several other codes in use for the same projection: EPSG:3857 EPSG:3785= maybe because of a typo by someone somewhere? EPSG:102113 Some map-services have stopped supporting SRS=EPSG:900913 and this raises a problem for openlayers sphericalmercator users. Instead of displaying a map, these mapservices will respond with something like 'no support for EPSG:900913'. The problem of overlaying sphericalmercator layers that do not support epsg:900913 can be (partly) solved as follows: Override the default srs code for sphericalmercator layers by explicitly resetting the projection before adding the layer to a map: var osmLayer = new OpenLayers.Layer.OSM(OpenStreetMap); // osmlayer is now sphericalmercator with default epsg:900913 osmLayer.projection = new OpenLayers.Projection (EPSG:3857); // osmlayer is now sphericalmercator with epsg:3857 map.addLayers ([osmLayer]); Overlay layers will now be requested with SRS=ESPG:3857 However, resetting the code for the baselayer projection, causes trouble for the controls for MousePosition and MeasureControl: distances and coordinates are no longer presented in the correct projection. I solved this by adding the following lines of code to file lib\OpenLayers\Layer\SphericalMercator.js OpenLayers.Projection.addTransform(EPSG:4326, EPSG:3857, OpenLayers.Layer.SphericalMercator.projectForward); OpenLayers.Projection.addTransform(EPSG:4326, EPSG:102113, OpenLayers.Layer.SphericalMercator.projectForward); OpenLayers.Projection.addTransform(EPSG:4326, EPSG:3785, OpenLayers.Layer.SphericalMercator.projectForward); OpenLayers.Projection.addTransform(EPSG:3857, EPSG:4326, OpenLayers.Layer.SphericalMercator.projectInverse); OpenLayers.Projection.addTransform(EPSG:102113, EPSG:4326, OpenLayers.Layer.SphericalMercator.projectInverse); OpenLayers.Projection.addTransform(EPSG:3785, EPSG:4326, OpenLayers.Layer.SphericalMercator.projectInverse); Questions: - is this the way to support aliases for 900913 and support MousePosition and MeasureControl at the same time? - if yes, shouldn't the above lines be part of the standard OpenLayers distribution? Anne Blankert ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Moving LayerSwitcher position from top-right corner to bottom-left corner
Please read up on css. It is all controlled with css. Best regards, Bart No ideas on this one? Is it difficult to implement or nobody has tried it until now? On 07/14/2010 02:20 PM, Adrian Popa wrote: Hello, I'm trying to move the layer switcher button from the top-right corner of the map to the bottom-left corner. I have done this before with 2.8, but I ended up making changes in the openlayers API, but I can see now that 2.9.1 seems to have made changes in the LayerSwitcher's definition. I'm trying to override just some CSS rules to move the button where I want it, and also, make changes to display the minimize button on the left side of the expanded div (instead of having it on the right side). Before I show you my hacked-up code, I'd like to ask: has anyone moved it and can I get some sample code? Thanks, Adrian ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] MapFish vs OpenLayers
If you are only interested in the client-side, I would suggest looking at GeoExt: http://www.geoext.org Best regards, Bart Hello Bart and Hugo, I'm new with MapFish, I've just installed and done some basic tests. First of all, I don't understand how it works pylons virtual environment. Anyway, I'm interested in client side of MapFish to build a Rich web mappinng application. Now We use OL over an apache server and it's a clear and tipical structure of files and data. When We need to create a new component, we extends OL classes creating new js files. Server side components are created using servlets or php and client comunicates with them using ajax. I don't understand how the same can be do it with MapFish. I think there are a great dependency with python server environment. Antoni Vidal www.icc.cat http://www.icc.cat/ De: Bart van den Eijnden [mailto:bart...@osgis.nl] Enviat: jueves, 15 de julio de 2010 15:05 Per a: Vidal, Antoni A/c: users@openlayers.org Tema: Re: [OpenLayers-Users] MapFish vs OpenLayers Hi, I think you need to differentiate between MapFish and GeoExt. GeoExt adds a nice looking GUI to OpenLayers, it's all still javascript. GeoExt is also used by MapFish. What is complex in your opinion? MapFish is more than just a client webmapping package, it's a full web-mapping solution, so server-side + client-side. Also read: http://erilem.wordpress.com/2009/04/19/mapfish-and-geoext/ Best regards, Bart On Jul 15, 2010, at 3:00 PM, Vidal, Antoni wrote: Hello list, We use OpenLayers since 4 years and the results are very satisfactory. Nowadays, We are planning to make a step foreward using MapFIsh. Somebody has experience with this framework? What's your opinion versus OL? In my first sight, I think MapFish too complex. What do you think? Thanks in advance. Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogràfic de Catalunya http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20CatalunyaXYADDRESS=429486:4580392 Parc de Montjuïc, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat http://www.icc.cat/ ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] How to get get the WMS-layer's parameters
Hi Piero, just check the Net tab of Firebug. Best regards, Bart Hi Tim, ok so you can get the HTTP WMS request URL of a certain layer with that: var request = layer.getURL(map.getExtent()); where you input the BBOX. But whether I want to test which was the actual BBOX I requested when I did the HTTP request? How do I get the HTTP WMS GetMap request I did when I downloaded the layer? Firebug does not track it in the console. Any clue? Thank you guys. Piero -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-get-get-the-WMS-layer-s-parameters-tp1824749p5301378.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Working with Openlayers.Layer.Vector and WFS
Without seeing your actual WFS it is hard to help. But here it goes: 1) featureType should be MonkeyIsland 2) check if your featureNS does not end with / in the XML returned by your WFS, this would also break the parser. So maybe http://www.mapinfo.com/wfs/ instead of http://www.mapinfo.com/wfs Best regards, Bart Hello I'm having a real hard time changing my OpenLayers.Layer.WFS request to the OpenLayers.Layer.Vector with OpenLayers.Protocol.WFS. I've been reading and experimenting all available examples that I was able to find and the API documentation (wich, by the way, didn't help very much) for 2 days now and couldn't get it to work. So, please, can someone tell why this old fashion request has a successfull response: var wfs = new OpenLayers.Layer.WFS(Guybrush Threepwood, http://localhost:2006/GetFeature.ashx;, { typename: miwfs:MonkeyIsland }, { 'projection': new OpenLayers.Projection(EPSG:4326) , 'displayProjection': new OpenLayers.Projection(EPSG:4326) , 'maxExtent': new OpenLayers.Bounds(-9.517034, 36.961718, -6.189968, 42.15434) , 'maxResolution': 156543.0339 , 'numZoomLevels': 21 , 'minZoomLevel': 1 , 'maxZoomLevel': 21 , 'units': dd , 'encodeBBOX': true , 'displayOutsideMaxExtent': true , 'styleMap': layerStyle , 'extractAttributes': true } ); map.addLayer(wfs); But this one, that I found somewhere in the examples or forums, doesn't: var layer = new OpenLayers.Layer.Vector(Guybrush Threepwood, { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ version: 1.1.0, url: http://localhost:2006/GetFeature.ashx;, featureType: miwfs:MonkeyIsland, featureNS: http://www.mapinfo.com/wfs;, geometryName: VL_GMTR, srsName: EPSG:4326 }), projection: new OpenLayers.Projection(EPSG:4326) }); map.addLayer(wfs); If helps, my map object is: var map = new OpenLayers.Map(map, { projection: new OpenLayers.Projection(EPSG:900913), units: m, maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), numZoomLevels: 21 }); and my baseMap is: var myBaseLayer = new OpenLayers.Layer.Google(Google, { 'sphericalMercator': true , 'numZoomLevels': 21 , 'minZoomLevel': 1 , 'maxZoomLevel': 21 }); map.addLayer(myBaseLayer); Sorry for the long post. Edu -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Working-with-Openlayers-Layer-Vector-and-WFS-tp5301971p5301971.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Working with Openlayers.Layer.Vector and WFS
@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Set Bbox of WMS request
If you want the BBOX to be exactly the visible part, use ratio 1 and buffer 0 in the layer options. So: var layer = new OpenLayers.Layer.WMS(null, url, {layers: 'foo'}, {singleTile:true, buffer:0, ratio:1}); Best regards, Bart Ok Ian, right. (Thanks) So you mean that you would download also data outside the viewport in certain cases? But, especially if the BBOX is small, this wouldn't be a huge problem. Or am I missing something? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Set-Bbox-of-WMS-request-tp1824068p5302319.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Set Bbox of WMS request
Then use an image layer? Best regards, Bart Good point Bart, but I'd like to select a small portion of the map instead. Putting a ratio1 the layer would be reduced indeed, but centered with respect to the viewport. I'd rather specify where exactly to extract the data. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Set-Bbox-of-WMS-request-tp1824068p5302366.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] MapFish vs OpenLayers
Hi Gilberto, can I correct one point you made? ExtJS is *not* called Sencha. The product name is unchanged. The company behind the product has changed its name, that's all. Best regards, Bart Mapfish client = GeoExt + Openlayers GeoExt = ExtJS + Openlayers I use Mapfish just as client! It has very nice widgets that would safe you a couple of hours coding.. The result is the same you would obtain coding with GeoExt because both use ExtJS (BTW, now http://www.sencha.com/blog/2010/06/14/ext-js-jqtouch-raphael-sencha/ Sencha ). I think you have already looked at the http://demo.mapfish.org/mapfishsample/1.2/ Mapfish examples but here's the link anyway. It is not complex at all! Just download the client and enjoy! =) http://www.mapfish.org/downloads/ Mapfish Client download link Cheers, Gilberto Ramos - For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. For God sent not his Son into the world to condemn the world; but that the world through him might be saved. He that believeth on him is not condemned: but he that believeth not is condemned already, because he hath not believed in the name of the only begotten Son of God. John 3:16-18 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/MapFish-vs-OpenLayers-tp5297238p5302413.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMS Map request
Hi, use singleTile: true and ratio: 1 in your layer options. Best regards, Bart Hi Group, I am trying to configure my WMS service with OpenLayers. My script looks below script type=text/javascript //var map = new OpenLayers.Map('map',{maxResolution: 1000} ); var map = new OpenLayers.Map('map', { maxExtent: new OpenLayers.Bounds( -638480920.244,-188017611.367,665489491.580,1019789790.73), maxResolution: 500 } ); var wmsURL = http://localhost:8080/gss/ogc?version=1.3.0crs=sw:nsw_trans_mercator_mm;; var myLayer = new OpenLayers.Layer.WMS( 'CE SL' , wmsURL , { layers: 'background', styles: 'Default' } , { buffer: 1 , isBaseLayer: true } ); map.addLayer( myLayer ); map.zoomToMaxExtent(); /script It should actually send only one WMS request for the first time and then act according to uses operations like Pan , Zoom. But, that is not how it's working. Everytime when I open this html file, it's sending 48 WMS requests and creating 48 image files in the resources folder and none of these images are turned up on the browser. Also, surprisingly all those 48 images are empty with just white background. Does any one what the problem is ? Thanks, Kalyan ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] hardcoded gml:featureMemeber of WFS layer in openlayers ?
Hi, basically this requires writing your own format, which can extend OpenLayers.Format.GML.v3. OpenLayers only supports the GML 3.1.1 Simple Features profile out of the box: http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd It should not be too hard to write the format. Make sure you add wfsos to the namespaces array and add a reader function where necessary. Btw, in your code below you are using the old GML parser. Best regards, Bart hi everyone, I have a problem adding a WFS request as overlay on the openlayers map. Is there a way to tell it to search for other featureProperty elements then the basic gml:featureMember ? Is it realy hard-coded into the parser source that the featureProperty name shall be gml:featureMember ? The WFS service is set up with a GML Application Profile which defines its FeaturePropertyType as a restriction of the generic gml:FeaturePropertyType (and similar for the FeatureCollectionType). This means that the structure of the GML returned from the WFS request is: wfsos:featureCollection xmlns:wfsos=http://cweb.ksat.no/cweb/schema/geoweb/oil; ... schemaLocation=http://cweb.ksat.no/cweb/schema/geoweb/oil ... wfsos:featureMember wfsos:feature wfsos:oilSpill gml:Polygon srsName=EPSG:4326 It seems that the featureCollection level is ignored (as well as the schema location - since the schema is not loaded), so that one is not the problem. I can set the name space prefix, and element name for the feature level and the geometry, but can't find any way to do this for the featureMember level! If I run this from a file, and change the wfsos:featureMember into gml:featureMember it works fine (even if it violates the schema). To repeat the question: Is there any way to instruct openlayers to look for wfsos:featureMember instead ? PS: Here is the code for the WFS request linkage: wfs_ksat = new OpenLayers.Layer.Vector(id, { strategies: [new OpenLayers.Strategy.BBOX()], projection: new OpenLayers.Projection(EPSG:4326), protocol: new OpenLayers.Protocol.WFS.v1_0_0({ url: ksatWFSuri, featureType: feature, featureNS: http://cweb.ksat.no/cweb/schema/geoweb/oil;, featurePrefix: wfsos, geometryName: oilSpill, srsName: EPSG:4326, readFormat: new OpenLayers.Format.GML(), outputFormat: GML2 }), styleMap: styleMap }); ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Load GML layer from text field?
Check out the vector-formats.html example. Best regards, Bart Hi! I want to show a GML polygon that I get from a web service on the map. All the examples of showing GML makes me load an XML file as in the gml-layer.html example: map.addLayer(new OpenLayers.Layer.GML(GML, gml/polygon.xml)); I don't know how to load GML on the fly without a prepared file. Is it possible to draw a GML string I put in a hidden text field or a hidden div on the page instead? Thanks! /Matti -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Load-GML-layer-from-text-field-tp5260132p5260132.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
Re: [OpenLayers-Users] How to SetUp Open Layers for an XML/WMS Service
Hi, the closest code is probably the ArcIMS layer, since this also uses XML for the communication. It probably means writing a Format, just like Format.ArcXML for the ArcIMS layer, and writing a layer type. Unless you just want to use WMS, which comes out of the box. Best regards, Bart Hello Everyone, I am new to Java Script and thus Open Layers. I have an application server that provides a map service and many other services like select, zoom in zoom out.I wanted to map them on to Open layers and finally embed open layers on to a website. The map service is an XML based and it generates an XML response.I also have WMS services that respond in WMS format. Could someone share me the procedure to make the above process to work please. I know a bit of Java Script. Like how it works and how to code in it and the function,Object structure of it. But, I never worked on it. Regards, Kalyan ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] SelectFeature working at the same time in two different overlays?
Use 1 SelectFeature Control and initialize it with an array of layers. /** * Constructor: OpenLayers.Control.SelectFeature * Create a new control for selecting features. * * Parameters: * layers - {OpenLayers.Layer.Vector}, or an array of vector layers. The * layer(s) this control will select features from. * options - {Object} */ Best regards, Bart Hi, I've two overlays, one is a Vector layers of markers built from a kml file, the other is a GML geometric layer from an xml file. I've added a SelectFeature for each layer, but if I add first layer1 then layer2 only selectFeature for layer2 work. On otherwise if I add layer2 then layer1 only selectFeature for layer1 work, there is a way to make working both layers? Here the code: var layer1 = new OpenLayers.Layer.Vector(Segnalazioni, { 'displayInLayerSwitcher':false, styleMap: new OpenLayers.StyleMap(style), projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: file.kml, format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true }) }) }); var layer2 = new OpenLayers.Layer.GML( GML, file.xml, { projection: map.displayProjection, styleMap: myStyleMap, 'displayInLayerSwitcher':false, 'isBaseLayer':false } ); selectControl = new OpenLayers.Control.SelectFeature( layer2, { clickout: true, toggle: true, multiple: false, hover: true } ); layer2.events.on( { featureselected: function(e) { alert(Selected.); }, featureunselected: function(e) { alert(Unselected.); } } ); map.addControl(selectControl); selectControl.activate(); select = new OpenLayers.Control.SelectFeature(layer1); layer1.events.on( { featureselected: onFeatureSelect, featureunselected: onFeatureUnselect } ); map.addControl(select); select.activate(); ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] loading panel question
Hi Chris, if you do it this way, you need to add an entry to your OpenLayers.js: if(!singleFile) { var jsfiles = new Array( .. OpenLayers/Control.js, OpenLayers/Control/LoadingPanel.js, .. Best regards, Bart Hi list I have been trying to make the loading panel work, as per http://trac.openlayers.org/wiki/Addins/LoadingPanel but can't seem to make it work. I am using OL 2.8 (also tried 2.9 - same problem) which is referenced in my code as: script src=../OpenLayers-2.8/lib/OpenLayers.js/script. I downloaded LoadingPanel.js and put it in the directory OpenLayers-2.8/lib/OpenLayers/Control. Then when creating a map I have: map = new OpenLayers.Map('map', options); var loadingpanel = new OpenLayers.Control.LoadingPanel() map.addControl(loadingpanel); This throws an error in Firefox: OpenLayers.Control.LoadingPanel is not a constructor The loading panel instructions talk about creating a single file build which I have not done - is this my problem, or should I be able to make this work with the OL 2.8 development libraries? Chris ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] loading panel question
Hi Chris, only add the line wrt to the LoadingPanel.js, not an extra line for Control.js. Install Firebug in Firefox and see if the file actually gets loaded in the scripts tab. Best regards, Bart Hi Bart Thanks for the help. I found if(!singleFile) {var jsfiles = new Array(. in OpenLayers.js and added OpenLayers/Control.js, OpenLayers/Control/LoadingPanel.js, at the end of the (very long) list of controls. Unfortunately I still get the same result: OpenLayers.Control.LoadingPanel is not a constructor Did I do it wrong? Chris -Original Message- From: Bart van den Eijnden (OSGIS) [mailto:bart...@osgis.nl] Sent: 21 May 2010 09:05 To: chris.gr...@ibstv.co.uk Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] loading panel question Hi Chris, if you do it this way, you need to add an entry to your OpenLayers.js: if(!singleFile) { var jsfiles = new Array( .. OpenLayers/Control.js, OpenLayers/Control/LoadingPanel.js, .. Best regards, Bart Hi list I have been trying to make the loading panel work, as per http://trac.openlayers.org/wiki/Addins/LoadingPanel but can't seem to make it work. I am using OL 2.8 (also tried 2.9 - same problem) which is referenced in my code as: script src=../OpenLayers-2.8/lib/OpenLayers.js/script. I downloaded LoadingPanel.js and put it in the directory OpenLayers-2.8/lib/OpenLayers/Control. Then when creating a map I have: map = new OpenLayers.Map('map', options); var loadingpanel = new OpenLayers.Control.LoadingPanel() map.addControl(loadingpanel); This throws an error in Firefox: OpenLayers.Control.LoadingPanel is not a constructor The loading panel instructions talk about creating a single file build which I have not done - is this my problem, or should I be able to make this work with the OL 2.8 development libraries? Chris ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Dynamically adding Strategies to Layer ?
I think using setLayer and then activating the strategy, at least that what I did in my SOS Layer: http://trac.openlayers.org/attachment/ticket/2565/2565.patch Best regards, Bart Is there any standard way to add a Strategy to a Layer after the layer was created and placed on the map ? --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] this.div.appendChild is not a function OpenLayers.js (line 897)
Hi, can you show us a *minimal* example to reproduce your issue? Best regards, Bart Using OL 2.9.1 did not solve it. On Thu, May 20, 2010 at 2:30 PM, Jan Henrik Øverland janhenrik.overl...@gmail.com wrote: Hi, Firebug reports: this.div.appendChild is not a function OpenLayers.js (line 897) - this.div.appendChild(this.element); By using alerts I can see that this happens when the overviewmap control is added to the map: MAP.addControl(new OpenLayers.Control.OverviewMap({ div: $('overviewmap'), size: new OpenLayers.Size(188, 97), minRectSize: 0 })); The mouse position control has stopped working as well (I comment out the overviewmap and get no errors). This has worked perfectly for a long time, and I didn't change any libs recently. Still using OL 2.8. What could cause this error? ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] MinZoomLevel with WMS layer
Hi, use minResolution or minScale instead. Best regards, Bart Hello everyone, I've been using the MinZoomLevel option on WFS layers to set the minimum resolution beyond which a layer can be rendered (useful for when there are lots of features). Today I'm trying to the same with a WMS layer, but in that case the MinZoomLevel option is ignored. Should it be working? If not how can i be done for WMS layers? I'm using OpenLayers 2.9. Thank you, Luís ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format - get bounds
Eric, are you referring to: http://trac.openlayers.org/ticket/2255 ? I think that's a different issue since it deals with the new GML parser, while the GetFeatureInfo format uses the old GML parser. Best regards, Bart Eric Lemoine wrote: On Thursday, October 29, 2009, Alexandre Dube ad...@mapgears.com wrote: Hi Bart, bart...@osgis.nl wrote: Hi Alexandre, so you only have the boundedBy element and not the actual geometry in the output? Yep, no geom is needed for my case. The bbox is enough. If so, I don't think this is currently possible, can you please file an enhancement bug in Trac? Done : http://trac.openlayers.org/ticket/2329 Hi. I think there already is a ticket for this. IIRC we had some discussion about this a while ago, it was initiated by François Vanderbiest. I'm interested in discussing this again. Sorry I can't look up the ticket and the discussion at the moment. Cheers, -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Event/Msg when all LayerPics are loaded?
Hi, I'll see if I can find some time in Sydney to rewrite the loading panel so that it is not blocking. Best regards, Bart Bytechanger wrote: Hi, thanks, but when the LoadingPanel-Layer is shown, then I can´t select a marker (Popup) on an other layer... Greetings Byte bartvde wrote: There is the loadend event on a per layer basis. There is also the addin called LoadingPanel which automates this for you. http://trac.openlayers.org/wiki/Addins/LoadingPanel Best regards, Bart Hi, I load a map from a WMS-Server or local png data. Is there a event or something else, wich tells me, that all pics are loaded??? (Sometimes it takes very long...) Greetings Byte -- View this message in context: http://n2.nabble.com/Event-Msg-when-all-LayerPics-are-loaded-tp3828940p3828940.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 -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Tokens for secure ArcGIS Server layers
Does adding it to the params object not work? { LAYERS: 'show:0', IMAGESR: '900913', BBOXSR: '4326', FORMAT: 'png', TRANSPARENT: true, TOKEN: mytokenvalue } Best regards, Bart David Wright wrote: Hello users, Has anyone found a way to pass the token value associated with secured ESRI ArcGIS Server Dynamic* *Map service layer in OpenLayers 2.8? Its always passed in as a parameter “token=mytokenvalue…” var agsDaynamicLayer = new OpenLayers.Layer.AgsDynamic( i3 Nightlights (Dynamic), http://myArcGISServer/ArcGIS/rest/services/myDynamicService/MapServer/Export?;, { LAYERS: 'show:0', IMAGESR: '900913', BBOXSR: '4326', FORMAT: 'png', TRANSPARENT: true, }, { isBaseLayer: false, singleTile: true } ); Many thanks, -Dave ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] zoomToExtent and ExtJS Grid
Hi, try using OpenLayers.Bounds.fromString. It takes a string as an argument and returns a bounds. Best regards, Bart AlessioDL wrote: Hi all, I'm having a strange issue with zoomToExtent(bounds) when the bounds values come from and ExtJS GridPanel. This is my code // create the data store var store = new Ext.data.JsonStore({ url: 'resultSetJson.php', fields: [ {name: 'sent_id', type:'int'}, {name: 'denominazione'}, {name:'tempo_perc'}, {name:'estensionegm'} ] }); // load data from the url ( data.php ) store.load(); // create the Grid var grid = new Ext.grid.GridPanel({ store: store, columns: [ {id:'sent_id',header: 'ID', width: 30, sortable: true, dataIndex: 'sent_id'}, {header: 'Denominazione', width: 430, sortable: true, dataIndex: 'denominazione'}, {header: 'Tempo', width: 50, sortable: true, dataIndex: 'tempo_perc'} {header: 'Estensione', width: 50, sortable: true, dataIndex: 'estensionegm'} ], stripeRows: true, border:false, height:250, width:500, autoScroll:true, listeners:{ rowclick:function(grid,rowIndex,e) { //alert(rowIndex); //alert(grid.getStore().getAt(rowIndex).get('estensionegm')); var sentExtent = grid.getStore().getAt(rowIndex).get('estensionegm'); alert(sentExtent); alert(new OpenLayers.Bounds(sentExtent).toBBOX()); map.zoomToExtent(new OpenLayers.Bounds(sentExtent)); } } }); // render grid grid.render('sentieri-grid'); I populate my grid thanks to a postgis query that encodes the results as Json with php. In the estensionegm column I put the geometry bbox (calculated by postgis), then I put values in the sentExtent var (as you can see in the code). the sentExtent alert return the correct values, for example (in spherical mercator): 1567540.36063275,5196100.3682006,1567671.48470329,5196716.04655338 but when I use the sentExtent var in the new OpenLayers.Bounds(sentExtent).toBBOX(); it returns only the first value (xmin) and three zeros: 1567540.360633,0,0,0 so, the map.zoomToExtent(new OpenLayers.Bounds(sentExtent)); can't work! What I can do? Thanks, alessio -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Control.GetFeature implementation
Hi Carlos, please open up a Trac ticket with a patch attached. Also, we would need an ICLA or CCLA from you. See: http://trac.openlayers.org/wiki/HowToContribute Best regards, Bart Carlos Lacerda wrote: Hi all, I use OpenLayers with GeoServer in a big project and i implement a simple modification in Control.GetFeature class to suport others filters in request not only BBOX filter for performance issues. Where i post this modification for OpenLayers Developers validation of sugestions ? Thanks. -- Sds, Carlos Lacerda Sun Authorized Instructor Brazil ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Problem with a WFS request
Arthur, did you setup the Python proxy in between? http://faq.openlayers.org/proxyhost/all/ Best regards, Bart Arthur Delorme wrote: Hi Bart, When the webpage is loading or when I play with the layer switcher, I don't have anything displaying in the console tab (XMLhttp is on). So I made the test with all the files on the second computer (the one with mapserver) and it works ! Do you have any idea for this network problem ? I can work on the second computer also so it's not really a problem but I would like to understand what's happening. Maybe it's just because I am working with a local server, not a true one ? Thank you very much for your help and patience ! Best regards, Arthur bart...@osgis.nl a écrit : Hi Arthur, check out the console tab of Firebug, and make sure XMLHttp requests are on (check out options on the right in Firebug). It's because OpenLayers uses POST by default for WFS, so that's why you don't see any parameters. You will see the POST body though in Firebug. Best regards, Bart I have no attributes because I use gml_exclude_items all (for now I only need the vectors to display so I thought it was good to minimize the request because it's a huge file). But I tried without, with gml_include_items all and with the inclusion of the ID attribute only, I can see all these results in the XML flow but still not my vectors in OpenLayers. I hope I am looking at the right place in Firebug : I am looking at the Network tab and I see the WFS request. I am working with two computers : one is the WFS server and the other is my working computer, with OpenLayers and the webpage (I am working on a local server: MAMP on this computer). The two computers are in a local network so I don't think there is any problem with this (no proxy). So I have two requests in Firebug : - one is a request to the local server (MAMP) called http://localhost:/test_WFS/test_WFS.php; - the other is a request to the second computer : http://IP/cgi-bin/mapserv_5.4.1?map=/var/www/html/WFS_server/test.map; Is this normal that there is no options after the address of the mapfile ? When I look at the URL request I did for testing I see the SERVICE, TYPENAME, BBOX, etc. Also there is no data download. Best regards, Arthur bart...@osgis.nl a écrit : Your GML looks okay to me. You don't have any attributes (next to the geometry), but that should be no problem. Can you see the request go off with Firebug at all when adding the vector layer to your map? Are you using a proxy in between or is the traffic local? Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Simple Layer Visibility Problem...
Hi, check out Firebug and you'll see the error: visible is not defined http://www.brianjamesbaldwin.com/Map/ Line 56 Try something like: function Lakeview() { parisoaks.setVisibility(document.forms[0].Lakeview.checked); } Best regards, Bart BrianJ wrote: Hi Everyone, I'm really excited to have started working with OpenLayers and all the frustrations I'm sure to experience. I have a real beginner problem here... I'm simply trying to turn a layer on or off with a form check button, and it's not working, searched the forum and can't seem to solve the problem... Thanks The full code is located here: http://www.brianjamesbaldwin.com/Map/ or... var parisoaks = new OpenLayers.Layer.GML(KML, kml/PO.kml, { format: OpenLayers.Format.KML }) map.addLayers([parisoaks]); parisoaks.setVisibility(false); } function Lakeview() { if (visible === true) { parisoaks.setVisibility(true); } else { parisoaks.setVisibility(false); } label input name=Lakeview type=checkbox id=Lakeview value=visible onclick=Lakeview() / Lakeview/label -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Problems upgrading between 2.7 and 2.8...
Steve, it seems like you did not copy the theme directory, so a bit of css is missing? Yes indeed, the measure interface has changed, please check examples/measure.html for hints on how to fix that. If you can't get it to work, please report back. Best regards, Bart Steve Lime wrote: Hi all: Just trying 2.8 with an app developed with 2.7 and have a problem where the zoom box (shift-drag) and overview map rect aren't displaying (zoom works though). Figure it's a z-index issue. Any idea what might have changed between versions? App is: http://maps.dnr.state.mn.us/compass_test/compass_full.html (2.8) and http://maps.dnr.state.mn.us/compass_test/compass_full_2.7.html (2.7) I've also noticed the measureControl doesn't seem invoke callbacks in the same way as 2.7. This is most noticeable when scribbling (shift-drag). Steve ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Disable Zoom wheel
Hi, when creating your map pass an array of controls with the right settings, so: var map = new OpenLayers.Map(mydiv, {controls: [ new OpenLayers.Control.Navigation({zoomWheelEnabled: false}), new OpenLayers.Control.PanZoom(), new OpenLayers.Control.ArgParser(), new OpenLayers.Control.Attribution() ]}); Best regards, Bart Admin TrouveTonGull.info wrote: Hello, i try var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false}); movemap.disableZoomWheel(); controls = map.getControlsByClass('OpenLayers.Control.Navigation'); for(var I = 0; icontrols.length; ++i) controls.disableZoomWheel(); but don't work :( what is the correct way to disable zoom wheel? ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] OpenLayers.Handler.Box
Hi, check the SelectFeature Control [1] for an example on how to use the Box Handler. Basically you create the handler with a callback function (done), the callback function will get the bounds of the box drawn. Best regards, Bart [1] http://dev.openlayers.org/releases/OpenLayers-2.8/lib/OpenLayers/Control/SelectFeature.js 莹莹 李 wrote: hi!list i want to draw a box and get coordinates of the box's four points.i know i can draw box with OpenLayers.Handler.Box,but i don't know how to get coordinates.please help me! give me a exmple about this! thank you! Ying Lee 好玩贺卡等你发,邮箱贺卡全新上线! http://cn.rd.yahoo.com/mail_cn/tagline/card/*http://card.mail.cn.yahoo.com/ ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Support for Cursors?
Hi Bill, not sure, can you check the css class which has been set on the map viewport div when you activate a tool? They should have those values. Maybe there is another class which is preventing the cursors from showing up. Best regards, Bart Bill Thoen wrote: Thanks Bart, but for some reason this changes the cursor only over the tool buttons on the control panel. How do I make it extend over my map window when I change tools? bart...@osgis.nl wrote: Hi Bill, yes it's in 2.8. You need to add css classes depending on the displayClass + Active of a control, e.g. this is what I have: .olControlDragPanActive { cursor: url(lib/openlayers/theme/default/img/pan.cur) 16 16, url(../geoservices2.2/lib/openlayers/theme/default/img/pan.cur), auto; } .olControlZoomBoxActive { cursor: url(lib/openlayers/theme/default/img/zoomin.cur) 9 9, url(../geoservices2.2/lib/openlayers/theme/default/img/zoomin.cur), auto; } .zoomoutActive { cursor: url(lib/openlayers/theme/default/img/zoomout.cur) 9 9, url(../geoservices2.2/lib/openlayers/theme/default/img/zoomout.cur), auto; } .olControlDragPanActive.olDragDown { cursor: url(lib/openlayers/theme/default/img/pandown.cur) 16 16, url(../geoservices2.2/lib/openlayers/theme/default/img/pandown.cur), auto; } .GeoServicesControlSLDSelectActive { cursor: default; } .GeoServicesControlFeatureInfoActive { cursor: pointer; } .olControlMeasureActive { cursor: crosshair; } .olControlDrawFeaturePolygonActive { cursor: crosshair; } .olControlDrawFeaturePointActive { cursor: crosshair; } .olControlDrawFeaturePathActive { cursor: crosshair; } .olControlDrawFeaturePointActive { cursor: crosshair; } .olControlDrawFeaturePathActive { cursor: crosshair; } .olControlDrawFeaturePolygonActive { cursor: crosshair; } Hope this helps. Best regards, Bart Was support for using different cursor icons (pointer, text, wait, etc.) built into version 2.8? I didn't see anything about cursors in the release notes but I thought there had been some work done on this. If not, can someone tell me the best place to set the cursor icon for tool buttons? Is there an on activate event I can listen for, or is there a better way to do this? Thx, - Bill Thoen ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Support for Cursors?
Hi Bill, please try: .olControlPanel .olInfoItemActive { background-image: url(../img/info-on.png); } .olInfoItemActive { cursor: pointer; } Best regards, Bart Bill Thoen wrote: I'm not sure either. Here's how I'm setting display classes for the info tool (as an example). This shows the pointer cursor , but only when you hover over the tool icon on the control panel: .olControlPanel .olInfoItemActive { background-image: url(../img/info-on.png); cursor: pointer; } And I add the array of tools to the panel like so: // Info Tool toolButtons[9] = new OpenLayers.Control.FeatureInfo( {title:Get feature information, displayClass: olInfo, showMarker : false}; // Add the control panel var toolArray = []; for( var i=0; itoolz.length; i++) { toolArray[i] = toolButtons[toolz[i]]; } var panel = new OpenLayers.Control.Panel({ div : tool_div }); panel.addControls( toolArray ); this.map.addControl( panel ); (the integer array toolz[] that indexs the array of tool objects (toolsArray) is just a device that allows me to work with a subset of the tools that I have and also put them in a particular order. I don't think this has anything to do with it, but I explain it 'cause it's a bit weird.) As far as I can tell, the map window's div displayClass is null. What should it be, or am I barking up the wrong tree? -Bill Bart van den Eijnden (OSGIS) wrote: Hi Bill, not sure, can you check the css class which has been set on the map viewport div when you activate a tool? They should have those values. Maybe there is another class which is preventing the cursors from showing up. Best regards, Bart Bill Thoen wrote: Thanks Bart, but for some reason this changes the cursor only over the tool buttons on the control panel. How do I make it extend over my map window when I change tools? bart...@osgis.nl wrote: Hi Bill, yes it's in 2.8. You need to add css classes depending on the displayClass + Active of a control, e.g. this is what I have: .olControlDragPanActive { cursor: url(lib/openlayers/theme/default/img/pan.cur) 16 16, url(../geoservices2.2/lib/openlayers/theme/default/img/pan.cur), auto; } .olControlZoomBoxActive { cursor: url(lib/openlayers/theme/default/img/zoomin.cur) 9 9, url(../geoservices2.2/lib/openlayers/theme/default/img/zoomin.cur), auto; } .zoomoutActive { cursor: url(lib/openlayers/theme/default/img/zoomout.cur) 9 9, url(../geoservices2.2/lib/openlayers/theme/default/img/zoomout.cur), auto; } .olControlDragPanActive.olDragDown { cursor: url(lib/openlayers/theme/default/img/pandown.cur) 16 16, url(../geoservices2.2/lib/openlayers/theme/default/img/pandown.cur), auto; } .GeoServicesControlSLDSelectActive { cursor: default; } .GeoServicesControlFeatureInfoActive { cursor: pointer; } .olControlMeasureActive { cursor: crosshair; } .olControlDrawFeaturePolygonActive { cursor: crosshair; } .olControlDrawFeaturePointActive { cursor: crosshair; } .olControlDrawFeaturePathActive { cursor: crosshair; } .olControlDrawFeaturePointActive { cursor: crosshair; } .olControlDrawFeaturePathActive { cursor: crosshair; } .olControlDrawFeaturePolygonActive { cursor: crosshair; } Hope this helps. Best regards, Bart Was support for using different cursor icons (pointer, text, wait, etc.) built into version 2.8? I didn't see anything about cursors in the release notes but I thought there had been some work done on this. If not, can someone tell me the best place to set the cursor icon for tool buttons? Is there an on activate event I can listen for, or is there a better way to do this? Thx, - Bill Thoen ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] not all clicks registered
To answer my own question for future reference, increasing the pixelTolerance value of the click handler solved this problem. Best regards, Bart bart...@osgis.nl wrote: Hi list, my problem is the following: using the Click Handler not every click is registered/propagated. I am not sure if this could be a browser issue, a hardware issue or an OpenLayers issue Does anybody else experience this and does anybody know of a solution/workaround? TIA. Best regards, Bart ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Loading Panel issue with IE
Hi, do you have an example which I can use to reproduce the issue? Best regards, Bart Alessio Di Lorenzo wrote: Hi all, I have a problem with the loading panel in my webmapping application when using microsoft IE. I have Google maps layers for base and some WMS overlays via tilecache. The loading panel works very well in Firefox but in IE it does not disappear even if all my layers are loaded... I use OpenLayers-2.7 What can I do to fix this problem? Thanks in advance, alessio -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Tiff file Calculation.
Not sure if this is what you mean, but: topleft point - map.getExtent().top and map.getExtent().left width - map.getSize().w Best regards, Bart Kwong Hu Kiu wrote: I need this urgently. No one has any idea ? Cheers. From: kwon...@hotmail.com To: users@openlayers.org Date: Sat, 2 May 2009 11:36:13 +0800 Subject: [OpenLayers-Users] Tiff file Calculation. Hi, If anyone knows if Openlayers has any function to calculate the Tiff file ? double pixelHeight = (topLeftPoint.Y - lowerRightPoint.Y) / imageSize.Height; double pixelWidth = (lowerRightPoint.X - topLeftPoint.X) / imageSize.Width; I have done it before in c#. So openlayers has any utility that allow me to get the topleft point and image's width ? (Or) Someone must have already written a control for it and i just need to download from the trunk area. Cheers. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] vector layer with WFS protocol: load wheninvisible?
Okay, I finally found some time (and energy) to track this one down, I've opened up: http://trac.openlayers.org/ticket/2072#preview for further discussion. Best regards, Bart bart...@osgis.nl wrote: Could this have to do something with allOverlays: true which I am using? I've changed back the sequence of layers (should be up in 5 minutes) so it's reproduceable in the following example (the GNIS population is the WFS layer), switch it off and zoom to max extent you'll see the WFS request for the whole world going off. http://dev.openlayers.org/sandbox/bartvde/owscontext/openlayers/examples/owscontext.html Best regards, Bart It only happens if the WFS layer is the first one in the layers stack, so map.layers[0]. I'll try and investigate further. Best regards, Bart Hey Kris, thanks for your reply. Strangely enough I cannot reproduce it anymore, my sandbox was created off trunk 2 days ago. http://dev.openlayers.org/sandbox/bartvde/owscontext/openlayers/examples/owscontext.html Best regards, Bart Hi Bart, I have the same setup but when layer is created with visibility: false no requests are made until visibility is changed. Are you sure you use the last trunk version. I believe there has been some changes to activate protocol later than originally was done. Cheers Kris -Original Message- From: users-boun...@openlayers.org [mailto:users-boun...@openlayers.org] On Behalf Of bart...@osgis.nl Sent: Wednesday, April 29, 2009 2:26 PM To: users@openlayers.org Subject: [OpenLayers-Users] vector layer with WFS protocol: load wheninvisible? Hi list, using trunk I see that a vector layer with a BBOX strategy and a WFS protocol does request data even if it is not visible in the map. Is this intentional / by design? Best regards, Bart ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Change Layer Vis outside of LayerSwitcher
Steve, this should be automatic since the LayerSwitcher control listens to the changelayer event and will redraw itself. Best regards, Bart Stephen Woodbridge wrote: Hi, If I change the visibility of a layer in JavaScript, How do I get that reflected in LayerSwitcher? Or maybe the question should be: How do tell LayerSwitcher in JavaScript that I want to change layers selected? Thanks, -Steve ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] GetFeatureInfo with loadURL
Hi, one way is to use i as your scope: OpenLayers.loadURL ( url, '', i, function ( response ) { setHTML ( response); }); function setHTML ( response) { alert ( this ); Best regards, Bart James Leveille wrote: Hi, I’m trying to send a getFeatureInfo to all queryable layers. In the “onComplete” function, I would like to be able to “know”, for each response, the index of the corresponding layer (the layer index for which the request was sent). But the “index” value in the “onComplete” function is always wrong (seems to be equal to “map.layers.length” value). How can I make sure the index is correctly passed ? Thanks a lot. function findLayerClick ( event ) { var url; var mouseLoc = map.getLonLatFromPixel ( event.xy ); for ( var i = 0; i map.layers.length; i++ ) { if ( map.layers[i].queryable ) { url = map.layers[i].getFullRequestString ({ REQUEST: GetFeatureInfo, EXCEPTIONS: application/vnd.ogc.se_xml, BBOX: map.getExtent().toBBOX(), X: event.xy.x, Y: event.xy.y, SRS: EPSG:32187, INFO_FORMAT: text/html; charset=ISO-8859-1, QUERY_LAYERS: map.layers[i].params.LAYERS, FEATURE_COUNT: 5, VERSION: 1.1.1, WIDTH: map.size.w, HEIGHT: map.size.h }, map.layers[i].url ); OpenLayers.loadURL ( url, '', this, function ( response ) { setHTML ( response, i ); }); } } OpenLayers.Event.stop(event); } function setHTML ( response, index ) { alert ( index ); ... ... ... // manipulate the result } James ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] GetFeatureInfo with loadURL
Hi James, yeah after I hit Send I thought just use the function name directly since there are no extra parameters necessary anymore. So option 1 is the way to go. No they are not equivalent, since the second option loses the scope down the line, and the scope becomes the window object. The only way to keep the scope would be to use an OpenLayers.Function.bind in between. Best regards, Bart James Leveille wrote: Hi Bart, First, thanks for the answer. Just to let you know that using i as my scope works fine with : OpenLayers.loadURL ( url, '', i, setHTML ); but not with : OpenLayers.loadURL ( url, '', i, function ( response ) { setHTML ( response ); }); where I get [object Window] instead of the actual value if i printed out (as I get with the first declaration). Aren't those two declarations equivalent ? Again, thanks for your help. James -Message d'origine- De : Bart van den Eijnden (OSGIS) [mailto:bart...@osgis.nl] Envoyé : 22 avril 2009 14:25 À : James Leveille Cc : users@openlayers.org Objet : Re: [OpenLayers-Users] GetFeatureInfo with loadURL Hi, one way is to use i as your scope: OpenLayers.loadURL ( url, '', i, function ( response ) { setHTML ( response); }); function setHTML ( response) { alert ( this ); Best regards, Bart James Leveille wrote: Hi, I'm trying to send a getFeatureInfo to all queryable layers. In the onComplete function, I would like to be able to know, for each response, the index of the corresponding layer (the layer index for which the request was sent). But the index value in the onComplete function is always wrong (seems to be equal to map.layers.length value). How can I make sure the index is correctly passed ? Thanks a lot. function findLayerClick ( event ) { var url; var mouseLoc = map.getLonLatFromPixel ( event.xy ); for ( var i = 0; i map.layers.length; i++ ) { if ( map.layers[i].queryable ) { url = map.layers[i].getFullRequestString ({ REQUEST: GetFeatureInfo, EXCEPTIONS: application/vnd.ogc.se_xml, BBOX: map.getExtent().toBBOX(), X: event.xy.x, Y: event.xy.y, SRS: EPSG:32187, INFO_FORMAT: text/html; charset=ISO-8859-1, QUERY_LAYERS: map.layers[i].params.LAYERS, FEATURE_COUNT: 5, VERSION: 1.1.1, WIDTH: map.size.w, HEIGHT: map.size.h }, map.layers[i].url ); OpenLayers.loadURL ( url, '', this, function ( response ) { setHTML ( response, i ); }); } } OpenLayers.Event.stop(event); } function setHTML ( response, index ) { alert ( index ); ... ... ... // manipulate the result } James ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSCapabilities
Hi Steve, this was not part of OpenLayers 2.7 which you are accessing there (API is last stable version so 2.7 currently). Instead you should use trunk which will become OpenLayers 2.8 soon. Best regards, Bart steve.tout...@inspq.qc.ca wrote: Hi, I got this error OpenLayers.Format.WMSCapabilities is not a constructor when trying this var capabilitiesFormat = new OpenLayers.Format.WMSCapabilities(); I included this script in my code script src=http://openlayers.org/api/OpenLayers.js;/script Should I include something else? Thanks Steve /Steve Toutant, M. Sc./ Analyste en géomatique Secteur environnement Direction des risques biologiques, environnementaux et occupationnels 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.tout...@inspq.qc.ca_ mailto:steve.tout...@inspq.qc.ca_ __http://www.inspq.qc.ca_ http://www.inspq.qc.ca/ ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] measure control...
Hi, you can find it here: http://dev.openlayers.org/docs/files/OpenLayers/Control/Measure-js.html Best regards, Bart David Hollema wrote: That worked, thanks. Where can I get a comprehensive list of all options for constructors, etc? I don't see it in the class documentation. David A. Hollema GIS Analyst United Power, Inc. -Original Message- From: users-boun...@openlayers.org [mailto:users-boun...@openlayers.org] On Behalf Of Bart van den Eijnden (OSGIS) Sent: Friday, April 03, 2009 10:47 AM To: David Hollema Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] measure control... Hi, try displaySystem: 'english' in the constructor options. Best regards, Bart David Hollema wrote: My map is in units of feet. My measure control returns units of meters. Is there a way to specify what units the measure control returns? I tried it in the constructor options below but it still returns units of meters. var measureControl = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, {title:'Measure height', units:'ft'}); measureControl.events.on({measure:handleMeasurements, measurepartial:handleMeasurements}); David A. Hollema GIS Analyst United Power, Inc. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] measure control...
Hi, try displaySystem: 'english' in the constructor options. Best regards, Bart David Hollema wrote: My map is in units of feet. My measure control returns units of meters. Is there a way to specify what units the measure control returns? I tried it in the constructor options below but it still returns units of meters. var measureControl = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, {title:'Measure height', units:'ft'}); measureControl.events.on({measure:handleMeasurements, measurepartial:handleMeasurements}); David A. Hollema GIS Analyst United Power, Inc. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] How to Set Up Layer Visibility by Scale
Indeed, minScale maxScale in OL. See: http://trac.openlayers.org/wiki/SettingZoomLevels Best regards, Bart Bill Thoen wrote: Thanks... I never would have guessed that. Is the sense of max and min backwards as well? In other words, does maxscale apply to the largest denominator or the largest scale (1/denominator)? To put it more explicitly, if I set maxscale to 10 does that mean that the layer is visible between 1:1 and 1:100,000 or that it is visible only at scales smaller than 1:100,000? Bart van den Eijnden (OSGIS) wrote: Hi, minScale and maxScale should be denominators, so use 10 and not 0.1. Best regards, Bart Bill Thoen wrote: I'm trying to get a WMS layer to appear only within a specific scale range , and I not having any luck setting minscale and maxscale properties when I load the layer onto the map. For example, I want one layer land parcels to show from 1:1 up to 1:100,000 scale, so I set minscale to 0.1, expecting that once I zoom out to say, 1:120,000, the land parcel layer should have its visibility property set to false and the layer should be invisible. But it continues to stay visible. Can somebody tell me what I'm doing wrong? (I'm using OpenLayers 2.7, in case that matters.) - Bill Thoen ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] this.callbacks is undefined error
Hi Bill, this was because the proxy wasn't overriding the OGC mimetype to text/xml. This is fixed now see: http://trac.openlayers.org/changeset/9109 http://trac.openlayers.org/changeset/9110 Best regards, Bart Bill Thoen wrote: bart...@osgis.nl wrote: Hi, first of all, please don't cross-post to dev and users if it is not necessary. Maybe you can check out the following for pointers: http://dev.openlayers.org/sandbox/bartvde/wmsgetfeatureinfo/openlayers/lib/OpenLayers/Control/FeatureInfo.js I think this has a bug in it that brings down IE7. In the returnResponse() function of FeatureInfo.js I had to check for IE7 returning an empty string object in response.responceXML, and set it explicitly to null. Because if I didn't do that IE7 dies horribly when the code gets into the read() function in WMSGetFeatureInfo.js at line 74-75. Under the same conditions FireFox sets the response.responseXML to null and has no problems. - Bill Thoen -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] How to Set Up Layer Visibility by Scale
Hi, minScale and maxScale should be denominators, so use 10 and not 0.1. Best regards, Bart Bill Thoen wrote: I'm trying to get a WMS layer to appear only within a specific scale range , and I not having any luck setting minscale and maxscale properties when I load the layer onto the map. For example, I want one layer land parcels to show from 1:1 up to 1:100,000 scale, so I set minscale to 0.1, expecting that once I zoom out to say, 1:120,000, the land parcel layer should have its visibility property set to false and the layer should be invisible. But it continues to stay visible. Can somebody tell me what I'm doing wrong? (I'm using OpenLayers 2.7, in case that matters.) - Bill Thoen ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSCapabilities
Hi, you need to override the OGC mimetype in the proxy.cgi script to text/xml for it to work in IE, see: http://openlayers.org/pipermail/dev/2007-December/002039.html Best regards, Bart James Leveille wrote: This time, with an appropriate title (sorry) ... Hi all, I've been struggling with de WMSCapabilities (as defined here http://trac.openlayers.org/ticket/1176 https://webmail.consulting-fujitsu.com/exchweb/bin/redir.asp?URL=http://trac.openlayers.org/ticket/1176). Works fine with FF, but not with IE(6). The capFormat.read seems to be the problem (Object required). Maybe related to XML with IE ... Is there a workaround ? Thanks a lot --- function handleResult () { if (oHttpRequest.readyState == 4) // COMPLETED { if (oHttpRequest.status == 200) { try { var xmlFormat = new OpenLayers.Format.XML(); var xml = xmlFormat.read(oHttpRequest.responseText); var cap = capFormat.read(xml); oTitle=cap.service.title; oLayersDispn=cap.capability.layers; } catch (err) { ... } } else ... } } James ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMC - Loading layers as 'not' baseLayers
Hi, use {layerOptions: {isBaseLayer: false}} in the constructor of Format.WMC. Best regards, Bart James Leveille wrote: Hi, I'm loading a context as follow : [...] var wmc = new OpenLayers.Format.WMC (); wmc.read ( oHttpRequest.responseText, {map: map}); [...] It works fine but all the layers are loaded as base layers. Since I dont want those to be base layers, I've tried : oMap.layers[xyz].setIsBaseLayer = false; oMap.events.triggerEvent(changebaselayer); But it's not working. How can I load those layers so they are not base layers ? Best regards. James Léveillé ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] measure control
Hi James, the first syntax is OL 2.6, the second is OL 2.7. I assume you are using a Polygon handler and want to retrieve both the area and the length? The event thrown by the Measure control only contains the area in the evt.measure property in this case, so you have to calculate the length using something like (untested): var a = map.getControlsByClass('OpenLayers.Control.Measure'); var ctrl = a[0]; var length = ctrl.getBestLength(evt.geometry)[0]; Hope this helps. Best regards, Bart James Leveille wrote: Hi, I'm using the OpenLayers.Control.Measure control. From the many examples found, the handler declaration can either be : 1) function handleMeasr(geometry, length, area, units) {} 2) function handleMeasr(event) {} Since I need the area the perimeter, the first one should be the one to use. BUT, it's not working : I get a length is undefined error when I try to access the length value (or the area) with that definition. On the other hand, if I use the second declaration, the event.measure.toFixed(3) works fine but I can't get the area (there is no event.area.xxx) ... Anything special to do to make sure the first declaration gets called so I can get the area ? Thanks a lot. ** *James Léveillé DMR, une division de Fujitsu Conseil (Canada) inc.* Bureau : 418.653.6882 #6911 Cellulaire : 418.265.5005 james_levei...@dmr.ca mailto:james_levei...@dmr.ca Ce courriel et ses pièces jointes peuvent contenir des renseignements confidentiels ouprivilégiés à l’intention du destinataire seulement. Toute revue, utilisation, distribution ou divulgation de ces renseignements par d’autres personnes est strictement interdite. Si vous n’êtes pas le destinataire de ce courriel, ou si vous n’êtes pas autorisé à recevoir ce courriel en son nom, vous n’avez pas le droit de l’examiner, de le copier ou de le distribuer. Veuillez communiquer avec l’expéditeur en lui répondant et supprimez toutes les copies de son message. P *Devez-vous vraiment imprimer ce courriel ? Pensons à l'environnement !* ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] buggy loadingPanel (vs Navigation/MouseDefaults) please help!
Can you share an example HTML demonstrating the problem (and a clear description of the problem). TIA. Best regards, Bart z_o_d_ wrote: I am having the same problem as BrainDrain. It may be of interest that I only get this problem when configured to view yahoo base layers (although the yahoo layer itself does not have to be on the map). That is to say, I only get the problem when projecting to EPSG:900913. Under the default projection, the loading pannel works fine. -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Problem with wfs examples
Hi, see: http://faq.openlayers.org/proxyhost/all/ Best regards, Bart Diego Ochoa Tocachi wrote: Hi list, I have this problem when I run the examples locally: - (wfs-reprojection.html) uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI) [Break on this error] this._object.open(sMethod, sUrl, bAsync, sUser, sPassword); XMLHttpRequest.js (ligne 177) - The same error happens when I try to access other wfs server using gwt-openlayers I'm trying to create WFS java classes as WMS java classes from that package: WFSLayerParams wfsLayerParams = new WFSLayerParams(); wfsLayerParams.setProjection(EPSG:4326); WFSParams wfsParams = new WFSParams(); wfsParams.setTypeName(idm:islas); wfsLayer = new WFS(WMS Layer, http://www.geoportaligm.gov.ec/nacional/wfs;, wfsParams, wfsLayerParams); I don't know if that's ok, I'm newbie in openlayers :) -- Diego Ochoa - darkbalder email: diego.och...@gmail.com mailto:diego.och...@gmail.com Luis Pasteur 2-30 y Copernico Telf: +593 7 2451 388 Fax: +593 7 2451 388 Movil: 593 95359807 Cuenca - Ecuador ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] buggy loadingPanel (vs Navigation/MouseDefaults) please help!
Hi, for me it works in the loadingpanel example: http://dev.openlayers.org/addins/loadingPanel/trunk/examples/loadingpanel.html It could have to do with the sequence in which you add the controls, take a good look at the example. Best regards, Bart BrainDrain wrote: I've found that loadingPanel addon doesn't work properly When I add some controls (including new OpenLayers.Control.LoadingPanel() new OpenLayers.Control.Navigation({ zoomWheelEnabled: true }) in my map (I'm using tiled mapserver layer) and when tiles loading - mouse wheel doesn't change zoom level in my map mouse wheel become working only after loading ends BUT with MouseDefaults control all works perfectly! After some digging I can see that problem in onWheelEvent (MouseWheel handler): var elem = OpenLayers.Event.element(e) - eveluates to {... , className=olControlLoadingPanel olControlNoSelect, ...} and then overLayerDiv evaluates to false - so this.wheelZoom(e) - is not called at all during loadingPanel is active (maximized) What is the best way to fix that? -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] buggy loadingPanel (vs Navigation/MouseDefaults) please help!
Hi, the div size is this big so that the loading panel can be centered in the map. Can you please post your complete example HTML to reproduce the problem? As I said mousewheel navigation works for me in the example when the loading panel is showing, so I don't get the problem. Best regards, Bart BrainDrain wrote: of course I know about this example I think problem is here (loadingPanel): maximizeControl: function(evt) { var viewSize = this.map.getSize(); var msgW = viewSize.w; var msgH = viewSize.h; this.div.style.width = msgW + px;//WHY? this.div.style.height = msgH + px;//WHY? this.div.style.display = block; this.maximized = true; if (evt != null) { OpenLayers.Event.stop(evt); } } div size is very large (div catching mouse wheel event addressed to layer's divs): it must be equals to size of background img! changing background-position (in css) to right top just moves background img (I use smaller one then in example, more sexy) to right top corner but div size is still big - overlapping map/layer's (tile's) divs I've change code to minimizeControl: function(evt) { this.div.style.display = none; //this.div.style.width = 0px; //this.div.style.height = 0px; this.maximized = false; if (evt != null) { OpenLayers.Event.stop(evt); } }, maximizeControl: function(evt) { //var viewSize = this.map.getSize(); //var msgW = viewSize.w; //var msgH = viewSize.h; //this.div.style.width = msgW + px; //this.div.style.height = msgH + px; this.div.style.display = block; this.maximized = true; if (evt != null) { OpenLayers.Event.stop(evt); } }, + css: .olControlLoadingPanel { background-image:url(~/images/default/open-layers/loading.gif); background-position:center; background-repeat:no-repeat; top: 5px; right: 5px; width: 16px; height: 16px; position: absolute; } and zoom wheel works good during tiles loading but I need to make this more correct (div hiding with resetting size) so I need to preserve populated from css div size before hiding (minimizing) and restore on maximize or I need to find a way to auto-size div by img content (without css) looking into layerswitcher code we can find this: maximizeControl: function(e) { //HACK HACK HACK - find a way to auto-size this layerswitcher this.div.style.width = 20em; this.div.style.height = ; ... ))) Now I'm going to try Sys.UI.DomElement.getBounds function from MS AJAX client lib. Bart van den Eijnden wrote: Hi, for me it works in the loadingpanel example: http://dev.openlayers.org/addins/loadingPanel/trunk/examples/loadingpanel.html It could have to do with the sequence in which you add the controls, take a good look at the example. Best regards, Bart BrainDrain wrote: I've found that loadingPanel addon doesn't work properly When I add some controls (including new OpenLayers.Control.LoadingPanel() new OpenLayers.Control.Navigation({ zoomWheelEnabled: true }) in my map (I'm using tiled mapserver layer) and when tiles loading - mouse wheel doesn't change zoom level in my map mouse wheel become working only after loading ends BUT with MouseDefaults control all works perfectly! After some digging I can see that problem in onWheelEvent (MouseWheel handler): var elem = OpenLayers.Event.element(e) - eveluates to {... , className=olControlLoadingPanel olControlNoSelect, ...} and then overLayerDiv evaluates to false - so this.wheelZoom(e) - is not called at all during loadingPanel is active (maximized) What is the best way to fix that? -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Query Tool?
Hi, maybe the following sandbox is informative: http://dev.openlayers.org/sandbox/bartvde/wmsgetfeatureinfo/openlayers/examples/featureinfo-control.html the proxy is not setup correctly in the sandbox so it won't actually work, but if you run it locally with a local proxy.cgi script it should do the job. Best regards, Bart Semantica wrote: Hi all, Does anyone have an example of adding a query button to a control panel? I want to add a button that when clicked toggles query mode (e.g. maps single-click event to a function that will do a getFeatureInfo). Clicking again will deactivate query mode. I have the getFeatureInfo working already but am unsure as to how to wire up the controls... Thank you in advance!!! -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Using TextSymbolizer with SLD question
The support is only for serializing and sending it to a WMS service. No client-side labels if that's what you're after. Best regards, Bart Christopher Schmidt wrote: On Fri, Dec 19, 2008 at 04:55:44PM +0100, Sven Axt wrote: Hi, I read about the support for TextSymbolizer in OL 2.7 and immediatly startet trying it. I am not aware of any support for TextSymbolizer in OpenLayers. I'm not sure where you read about it, but I think it was mistaken... Regards, -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Change mouse pointer for Zoombox control
This should happen automatically. Which OpenLayers version are you using? Which browser? Does it happen as well in the cursor example at: http://dev.openlayers.org/sandbox/bartvde/cursor/openlayers/examples/cursor.html Best regards, Bart Subha Ramakrishnan wrote: Hi , I did try out the changes made in the patch. Now, when i select the zoombox control, the mouse pointer changes to a zoombox cursor. But i am still facing the same problem.Once, i zoom in to an area using the control, the mouse pointer reverts back to the default pointer. Should i explicitly handle that event and set the mouse pointer ? Thanks for the help. Regards, Subha [EMAIL PROTECTED] wrote: Hi, see the patch at: http://trac.openlayers.org/ticket/1484 Best regards, Bart Hi, I have a question regarding mouse pointer for a zoom box control. Is it possible for me to change the mouse pointer to indicate that zoom box control is currently active. I did try setting the cursor using map.style.cursor and it does change when the zoom box control is selected, but when i zoom in to an area, the cursor goes back to the default mouse pointer. Does anyone know how to do is? Or is it available in Openlayers and i am missing it? Thanks for the help. Regards, Subha ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] OL-Based GeoEditor
http://openlayers.org/mailman/listinfo/users -- Mit freundlichen Grüßen / Yours faithfully Carsten Eider Dipl. Inf. (FH) Kompetenzzentrum für Innovative Informationssysteme c/o Fachhochschhule Bingen / University of applied sciences Bingen Berlinstraße 109 55411 Bingen Tel: +49 (0) 6721 / 409-179 Fax: +49 (0) 6721 / 409-158 email: [EMAIL PROTECTED] Internet: iis.fh-bingen.de ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Reopen ticket #1471: Wrong typename for WFS-T update and delete
Hi, that's right, but the new way for future releases is to use Protocol.WFS with a Layer.Vector, so not Layer.WFS anymore. But unfortunately this did not make it into 2.7. So you've got 2 options: 1) patch using #1471 and use Layer.WFS 2) try to use the new stuff from http://trac.openlayers.org/ticket/1648 Best regards, Bart Geoflo wrote: Hallo, I'm using OpenLayers 2.7 at the moment and it is not possible to use the update function of the wfs layer. The ticket (#1471) is already closed but the bug is still there. How can this happen? Regards, Florian -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] question about OpenLayers.Format.GML.v2
Hey Tim, a use case for us is for instance grouping of entities (e.g. water bodies), which can consist of points, polygons and lines. So we have a typename for points, one for polygons and one for lines. They are grouped as 1 WMS layer. When we want to display the attribute table of that layer, we need to display (features from) 3 typenames. And ofcourse it's a shame to use 3 separate WFS requests for that. Also to search for objects, we sometimes need to go over 15 separate typenames using the same Filter. If we want to display all the details of a certain feature, we also need to query a lot of typenames. Indeed I intend to use the Protocol.WFS separate of a vector layer in this case. I can imagine this is not the most common use case and I understand your concern about first getting the basics solid. I'll be looking into the whole Protocol.WFS stuff more next week (I started today), and hope I can come up with more testing and maybe some contributions. Thanks for all this great work btw! Best regards, Bart Tim Schaub wrote: Hey- [EMAIL PROTECTED] wrote: Hi list, the constructor of the new GML2 parser gets a featureType parameter. Does this mean that if a GML file contains multiple featureTypes, that I have to call read multiple times, and append the results myself? Will this be as efficient as doing the parsing in a single round? Yeah, this is because up until this point, vector formats have been used to read/write collections of features, and I think of collections of features as layers. I'd like to continue thinking that way (because I think it works). But I know there are people who are interested in making WFS requests for multiple feature types (which I like to think of as layers). I really want to get WFS working for the most common cases. And I want it to be solid (with good support for transactions and filtered queries). I've made a boatload of changes in the topp/wfs sandbox - including changes to the GML Filter code. My spare energy will be focussed on getting this code (the WFS protocol and related GML Filter changes) in to the trunk. Modifying the existing GML code is a bit at odds with that. I also know that it will make sense to have the protocol be used in the absence of a layer. And of course we want to support our OGC protocol power user(s). Bart, can you describe (perhaps again) where you want to make a single request for multiple feature types. I'm sure it is done all the time, I just usually see a way that I think it simpler, so I'm curious to hear more use cases. Tim Best regards, Bart ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] XML Parsing via OpenLayers?
You need to parse the XML in the loadSuccess function, check examples/GMLParser.html for an example. Best regards, Bart Maps-R-us wrote: Hi there, I would like to retrieve elements in an xml file based on tag name and populate an array. Here is a sample of the XML: users user fullnameTest/fullname ID3400/ID lat0.003926753994724706/lat lon0.00446319580078125/lon imagehttp://40.media.vimeo.com/d1/5/35/85/81/portrait-35858134.jpg/image floor3/floor /user /users My code fails on the getElementsByNameNS() var format = new OpenLayers.Format.XML(); var doc = null; var url = officedata.xml; OpenLayers.loadURL(url, null, null, loadSuccess, loadFailure); var attributeValue = []; var attributeValue[1] = format.getElementsByTagNameNS(doc, '*','fullname'); alert (attributeValue[1]); Any ideas? Thank you in advance, M -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] XML Parsing via OpenLayers?
Maybe you can try and create your own Format class, something like: /** * @requires OpenLayers/Format/XML.js * */ OpenLayers.Format.MyFormat = OpenLayers.Class( OpenLayers.Format.XML, { initialize: function(options) { OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); this.options = options; }, read: function(data) { if(typeof data == string) { data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); } // do your stuff here, it's just an example var root = data.documentElement; var children = root.childNodes; for(var i = 0; i children.length; ++i) { childNode = children[i]; var nodeName = childNode.nodeName; if (nodeName == 'Toolbar') { this.parseToolbar(childNode); } } // return your array here }, CLASS_NAME: OpenLayers.Format.MyFormat }); And then: OpenLayers.loadURL(myURL, , null, function(response) { var format = new OpenLayers.Format.MyFormat(); var myArray = format.read(response.responseXML || response.responseText); console.log(myArray); }); Best regards, Bart Maps-R-us wrote: Thank you Bart, I actually do this in my loadSuccess function: function loadSuccess(request) { updateStatus(loaded); if(!request.responseXML.documentElement) { doc = format.read(request.responseText); } else { doc = request.responseXML; } } Is this correct? M Bart van den Eijnden wrote: You need to parse the XML in the loadSuccess function, check examples/GMLParser.html for an example. Best regards, Bart Maps-R-us wrote: Hi there, I would like to retrieve elements in an xml file based on tag name and populate an array. Here is a sample of the XML: users user fullnameTest/fullname ID3400/ID lat0.003926753994724706/lat lon0.00446319580078125/lon imagehttp://40.media.vimeo.com/d1/5/35/85/81/portrait-35858134.jpg/image floor3/floor /user /users My code fails on the getElementsByNameNS() var format = new OpenLayers.Format.XML(); var doc = null; var url = officedata.xml; OpenLayers.loadURL(url, null, null, loadSuccess, loadFailure); var attributeValue = []; var attributeValue[1] = format.getElementsByTagNameNS(doc, '*','fullname'); alert (attributeValue[1]); Any ideas? Thank you in advance, M -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Loading Panel not always going away
Hi Linda, are you using 2.6? The following should have made sure this works correctly: http://trac.openlayers.org/ticket/842 Best regards, Bart Linda_Rawson wrote: I am again facing issues with the loading panel not going away. It seems when the tiles in question are an error, 404 not found or something like that, the count is not getting decremented so that the loadend event fires. Where did you call this from? realjax wrote: map.layers[0].events.triggerEvent(loadend); Thanks, Linda Rawson realjax wrote: Linda_Rawson wrote: Sometimes it does not go away after all layers are loaded. What can I do? The loading control is a cool one. ( thanks Bart!). I had some issues as well with events not being fired on some layers (layer.Markers for instance). So I did it manually: map.layers[0].events.triggerEvent(loadend); Works like a charm :-) -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] CQL queries with WFS
,{ styleMap: oStyleMap } ); From: Andreas Hocevar [mailto:[EMAIL PROTECTED] Sent: Wed 8/13/2008 7:11 AM To: Eric Lemoine Cc: Brenningmeyer, Todd; Openlayers Users List Subject: Re: [OpenLayers-Users] CQL queries with WFS Hi, On Wed, Aug 13, 2008 at 2:08 PM, Eric Lemoine [EMAIL PROTECTED] wrote: On Wed, Aug 13, 2008 at 11:49 AM, Andreas Hocevar [EMAIL PROTECTED] wrote: Hi, Since CQL_FILTER is not part to the WMS spec, the best way is to add the filter to the WMS url, e.g. var layer=new OpenLayers.Layer.WMS(cql, http://your-server/wms?CQL_FILTER=foo3, params, options); Todd's question related to WFS, but I guess the response is similar, isn't it? Should be, yes. Just s/WMS/WFS/gi. Regards, Andreas. No virus found in this incoming message. Checked by AVG - http://www.avg.com http://www.avg.com/ http://www.avg.com/ http://www.avg.com/ Version: 8.0.138 / Virus Database: 270.6.2/1609 - Release Date: 8/13/2008 6:43 AM ___ 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 -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Loading WMC layers at overlays?
Hi Arnd, you're absolute right. I didn't see that Joost was not merging the context with an existing map object, like I am doing, in which case you don't have that kind of control. Best regards, Bart Arnd Wippermann wrote: Why not loop over context.layers before adding the layers? Arnd Wippermann -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Bart van den Eijnden (OSGIS) Gesendet: Samstag, 9. August 2008 12:04 An: jvanulde Cc: users@openlayers.org Betreff: Re: [OpenLayers-Users] Loading WMC layers at overlays? Hi Joost, unfortunately there is no easy way to override this at the moment in OL, see also: http://trac.openlayers.org/ticket/1513 What you can do is loop over your layers and then set layer.params.TRANSPARENT to 'true', but it might be too late since the layer will have actually been drawn already. Otherwise change the default WMS parameters of OpenLayers, /** * Constant: DEFAULT_PARAMS * {Object} Hashtable of default parameter key/value pairs */ DEFAULT_PARAMS: { service: WMS, version: 1.1.1, request: GetMap, styles: , exceptions: application/vnd.ogc.se_inimage, format: image/jpeg }, to e.g. format image/png and transparent true. Best regards, Bart jvanulde wrote: Hi Bart, thanks for that as I think I am half way there now. The only issue now is that the layers are not transparent. They are coming from Mapserver as PNG's. Here is my code: OpenLayers.IMAGE_RELOAD_ATTEMPTS = 2; OpenLayers.Util.onImageLoadErrorColor = transparent; var layerOptions = { isBaseLayer: false, singleTile: true, buffer: 0, ratio: 1 }; var format = new OpenLayers.Format.WMC({'layerOptions': layerOptions}); var map, context; function initMap() { // parse wmc into context object var wmc = document.getElementById('%= hidWMC.ClientID %').value; context = format.read(wmc, {map: map}); // construct a map given the context var mapOptions = { maxExtent: context.bounds, projection: context.srs }; map = new OpenLayers.Map(map, mapOptions); var baseLayerOptions = { isBaseLayer: true, displayInLayerSwitcher: false }; var fake = new OpenLayers.Layer('fake', baseLayerOptions); map.addLayer(fake); map.addLayers(context.layers); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); } Is there a way to make the layers transparent now that I have loaded them? I think the problem is elsewhere but need some pointers on where to look. I have loaded the context in another viewer and the layers come in as expected. Bart van den Eijnden wrote: Hi Joost, you can pass layerOptions to the Format.WMC constructor in order to do this. Code example: mapfish.OGCUtil.readWMC = function(map, response, noZoom) { var format = new OpenLayers.Format.WMC({layerOptions: {isBaseLayer: false, singleTile: true, buffer: 0,ratio: 1}}); // remove all layers except the baselayer for (var i = map.layers.length-1; i = 0; i--) { if (!map.layers[i].isBaseLayer) { map.removeLayer(map.layers[i], false); } } map = format.read(response.responseText, {map: map}); ... } Best regards, Bart Thanks John, that works. Now I need to know how to convert all of the layers in my WMC to overlay's. Any ideas? -Original Message- From: John Pulles [mailto:[EMAIL PROTECTED] Sent: Wed 06/08/2008 2:49 PM To: Van Ulden, Joost Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Loading WMC layers at overlays? 2008/8/6 jvanulde [EMAIL PROTECTED] Is this possible? I want to add a fake base layer and load all the WMC layers as overlays. Any ideas on how one would go about doing this? You can add a fake base layer with map.addLayer(new OpenLayers.Layer('None', {isBaseLayer: true})); Regards, John -- View this message in context: http://www.nabble.com/Loading-WMC-layers-at-overlays--tp18859376p18 859376.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Loading WMC layers at overlays?
Hi Joost, unfortunately there is no easy way to override this at the moment in OL, see also: http://trac.openlayers.org/ticket/1513 What you can do is loop over your layers and then set layer.params.TRANSPARENT to 'true', but it might be too late since the layer will have actually been drawn already. Otherwise change the default WMS parameters of OpenLayers, /** * Constant: DEFAULT_PARAMS * {Object} Hashtable of default parameter key/value pairs */ DEFAULT_PARAMS: { service: WMS, version: 1.1.1, request: GetMap, styles: , exceptions: application/vnd.ogc.se_inimage, format: image/jpeg }, to e.g. format image/png and transparent true. Best regards, Bart jvanulde wrote: Hi Bart, thanks for that as I think I am half way there now. The only issue now is that the layers are not transparent. They are coming from Mapserver as PNG's. Here is my code: OpenLayers.IMAGE_RELOAD_ATTEMPTS = 2; OpenLayers.Util.onImageLoadErrorColor = transparent; var layerOptions = { isBaseLayer: false, singleTile: true, buffer: 0, ratio: 1 }; var format = new OpenLayers.Format.WMC({'layerOptions': layerOptions}); var map, context; function initMap() { // parse wmc into context object var wmc = document.getElementById('%= hidWMC.ClientID %').value; context = format.read(wmc, {map: map}); // construct a map given the context var mapOptions = { maxExtent: context.bounds, projection: context.srs }; map = new OpenLayers.Map(map, mapOptions); var baseLayerOptions = { isBaseLayer: true, displayInLayerSwitcher: false }; var fake = new OpenLayers.Layer('fake', baseLayerOptions); map.addLayer(fake); map.addLayers(context.layers); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); } Is there a way to make the layers transparent now that I have loaded them? I think the problem is elsewhere but need some pointers on where to look. I have loaded the context in another viewer and the layers come in as expected. Bart van den Eijnden wrote: Hi Joost, you can pass layerOptions to the Format.WMC constructor in order to do this. Code example: mapfish.OGCUtil.readWMC = function(map, response, noZoom) { var format = new OpenLayers.Format.WMC({layerOptions: {isBaseLayer: false, singleTile: true, buffer: 0,ratio: 1}}); // remove all layers except the baselayer for (var i = map.layers.length-1; i = 0; i--) { if (!map.layers[i].isBaseLayer) { map.removeLayer(map.layers[i], false); } } map = format.read(response.responseText, {map: map}); ... } Best regards, Bart Thanks John, that works. Now I need to know how to convert all of the layers in my WMC to overlay's. Any ideas? -Original Message- From: John Pulles [mailto:[EMAIL PROTECTED] Sent: Wed 06/08/2008 2:49 PM To: Van Ulden, Joost Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Loading WMC layers at overlays? 2008/8/6 jvanulde [EMAIL PROTECTED] Is this possible? I want to add a fake base layer and load all the WMC layers as overlays. Any ideas on how one would go about doing this? You can add a fake base layer with map.addLayer(new OpenLayers.Layer('None', {isBaseLayer: true})); Regards, John -- View this message in context: http://www.nabble.com/Loading-WMC-layers-at-overlays--tp18859376p18859376.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 ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Context Documents - WMC.html example
/ViewContext ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Loading Panel not always going away
Hi Linda, what type of layers do you have in the application? Can we see it in action somewhere in a reproduceable sense? Best regards, Bart Linda Rawson wrote: I have a loading panel loaded like the following: map.addControl( new OpenLayers.Control.LoadingPanel() ); Sometimes it does not go away after all layers are loaded. What can I do? -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] transitioneffect and black tiles?
Hi list, I am experimenting with transitioneffect resize and sometimes encounter a fully black tile (or backbuffer tile). Does that ring a bell for anyone? Using OL 2.6 and FF2. Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] transitioneffect and black tiles?
Some more info, this seems to only happen when using fractionalZoom on the map, but it's quite hard to make a reproduceable test case. Best regards, Bart Bart van den Eijnden (OSGIS) wrote: Hi list, I am experimenting with transitioneffect resize and sometimes encounter a fully black tile (or backbuffer tile). Does that ring a bell for anyone? Using OL 2.6 and FF2. Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] How can I donot let the map in the overview-map zoomed and moved?
Hi, use something like: isSuitableOverview: function() {return true;} in your overview map constructor. Example: var overviewmap = new OpenLayers.Control.OverviewMap( {layers: [overviewlayer], size: new OpenLayers.Size(225, 180), minRectSize: 10, div: overviewdiv, isSuitableOverview: function() {return true;}, mapOptions: options}); Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Yang Zhaohui [EMAIL PROTECTED] Naar: users users@openlayers.org Onderwerp: [OpenLayers-Users] How can I donot let the map in the overview-map zoomed and moved? Datum: 14/04/08 09:50 nbsp;Hello dear everyone, nbsp;nbsp;nbsp; I find when I zoom in,zoom outnbsp;or pan the map, the map in the overview-map is also zoomed in/out or moved. In my opinion,the overview map is called overview-map, becausenbsp;when I zoom-innbsp;the main map in a certain zoom-level and we do not know where the positon I am in the all map,nbsp;it can show us a overview. But now the overview map is zoomed and moved following the main map,how it can play the role of a oveview-map? I want to know is there a way to let the map in the overview-map do not beennbsp;movednbsp;and zoomed.Could you please give me some suggestions?Thank you very much! nbsp; nbsp; nbsp; Æ·ÖÊ´ò¶¯ÊÀ½ç£¬ÐǺÓÍåÈ«ÐÂÈýÆÚÈÈÏúÖÐVIP:8610-8551 ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Busy Cursor
Yes, it's not in the standard library, I am hoping it can be an addin soon. See also the Wiki: http://trac.openlayers.org/wiki/Addins/LoadingPanel You can add the following in a script tag after the OpenLayers.js script tag: http://dev.openlayers.org/sandbox/bartvde/loadingpanel/lib/OpenLayers/Control/LoadingPanel.js Or build your own OpenLayers.js. See also the Wiki page for details. You also need to use a bit of css to get the background-image. It's described in the Wiki page. Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Carlos Pinto [EMAIL PROTECTED] Naar: Bart van den Eijnden OSGIS [EMAIL PROTECTED] Cc: Linda Rawson [EMAIL PROTECTED], OpenLayers Users users@openlayers.org Onderwerp: Re: [OpenLayers-Users] Busy Cursor Datum: 09/04/08 09:41 Hi all, I am using the library quot;lt;scriptnbsp; src=quot;http://www.openlayers.org/dev/lib/OpenLayers.jsquot;gt;lt;/scriptgt;quot;but I have seen this post and I thought that is really a good idea to put a loading panel but when I had the line: map.addControl( new OpenLayers.Control.LoadingPanel({minSize: new OpenLayers.Size(600, 600)}) );the map don#39;t appear!!Is it because of the openlayers version I am using?ThanksCarlos On Wed, Apr 9, 2008 at 9:32 AM, Bart van den Eijnden (OSGIS) lt;[EMAIL PROTECTED]gt; wrote: Hi Linda, you could have a look at the LoadingPanel Control. Something similar could be done to change the map cursor. See: http://trac.openlayers.org/ticket/102 and: http://trac.openlayers.org/browser/sandbox/bartvde/loadingpanel/lib/OpenLayers/Control/LoadingPanel.js In maximizeControl you could set the busy mouse cursor on the map div, and in minimizeControl change the cursor back. example: http://dev.openlayers.org/sandbox/bartvde/loadingpanel/examples/loadingpanel.html Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Linda Rawson lt;[EMAIL PROTECTED]gt; Naar: OpenLayers Users lt;users@openlayers.orggt; Onderwerp: [OpenLayers-Users] Busy Cursor Datum: 09/04/08 01:05 gt; I have two layers that when I switch between them the performance is gt; so bad that there is a noticeable delay. nbsp;How would I implement an gt; hourglass cursor to indicate to the user that the application is gt; working and then put the cursor back to normal when the layer is gt; loaded. gt; gt; -- gt; Linda Rawson gt; ___ gt; Users mailing list gt; Users@openlayers.org gt; http://openlayers.org/mailman/listinfo/users gt; gt; ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] RC1 issue? with themes and styles
Hi Stephen, you can also try using !important in the stylesheet you want to prevail, so you don't need to change the css class names, example: .olXXX { width: 200px !important; height: 200px !important; } Best regards, Bart Stephen Woodbridge wrote: Christopher Schmidt wrote: On Thu, Apr 03, 2008 at 04:07:06PM -0500, Stephen Woodbridge wrote: Stephen Woodbridge wrote: OK, as a work around, if I change all occurrences olControlEditingToolbar to olControlMyEditingToolbar in my code and override style.css it displays the right thing. But I think some of the override theme stuff is broken 2.6rc1. I've just checked: This code works exactly the same in 2.5. So regardless of how broken it is, it does not appear to be a regression, unless you can offer evidence otherwise. (I downloaded broken.php, pointed the CSS to your files, and then changed the OpenLayers file to reference 2.5 via /api/OpenLayers.js.) Christopher, Thank you for taking a look at this. I will accept your good judgement on this and try to dig into this a little more for my own education. The one thing I noticed while poking at this in FireBug and Inspecting the DOM, was that the missing icons had the CSS from the 2.6rc1 style.css while all the others had the CSS applied from my override CSS. So by changing the CSS class to olControlMyEditingToolbar I seem to have avoided that conflict. I guess I'm not sure how the CSS rules get applied in this case when you have two stylesheets both with the same class names. Thank you again for your effort and assistance. -Steve ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Which JavaScript Obfuscator does OpenLayers use?
jsmin, see: tools/jsmin.py Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Bellenger, Jim [EMAIL PROTECTED] Naar: users@openlayers.org users@openlayers.org Onderwerp: [OpenLayers-Users] Which JavaScript Obfuscator does OpenLayers use? Datum: 02/04/08 12:08 Which JavaScript Obfuscator does OpenLayers use? I was wondering which JavaScript Obfuscator does OpenLayers use to crunch down the scripts? Jim Bellenger Imagery and Geospatial Scientist NGA/II-GIAT 314-263-4924/4728, DSN 693-4924/4728 Secure 577-3543 ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] popups
Hi list, just upgraded to trunk and have some trouble with my popups. They are created using feature.createPopup(true). Problems I have: -closebox image is no longer visible -there is a bigger white rim around the popup now, on the right and bottom Are there any pointers as to what needs to be changed to solve this? TIA. Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] popups
Hi Chris, I was using a different close.gif, so I had to copy the new lines of css for the olPopupCloseBox class into my css file to get the closebox. But as you say, it's now outside of the popup content, which is a bit unexpected for me. The old situation: http://www.rijkswaterstaat.nl/apps/geoservices/mapviewer2/ The new situation: http://www.rijkswaterstaat.nl/apps/geoservices/mapviewer2/index_oltrunk.html Use the fifth tool in the toolbar (the one that looks like i) and click in the map to get the popup. TIA. Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Christopher Schmidt [EMAIL PROTECTED] Naar: Bart van den Eijnden OSGIS [EMAIL PROTECTED] Cc: users@openlayers.org Onderwerp: Re: [OpenLayers-Users] popups Datum: 31/03/08 09:51 On Mon, Mar 31, 2008 at 01:19:17PM +0200, Bart van den Eijnden (OSGIS) wrote: gt; Hi list, gt; gt; just upgraded to trunk and have some trouble with my popups. They are gt; created using feature.createPopup(true). gt; gt; Problems I have: gt; -closebox image is no longer visible I'm assuming you have a different ImgPath or something than the OpenLayers default? We were just discussing that in #1472: have you customized the close.gif at all, or were you just using the default one in a different place? (This is now committed, so 'svn up' should help you here.) gt; -there is a bigger white rim around the popup now, on the right and bottom I'm surprised by the 'bottom' part of this: the 'right' part is somewhat expected, since we now ensure that the closebox isn't covering the content. I'm guessing you feel that this is a regression. Can you link a copy of the current code? Perhaps even one that is using the older code as well? Thanks, -- Christopher Schmidt MetaCarta ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] popups
Hi Chris, I am fine with that. Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Christopher Schmidt [EMAIL PROTECTED] Naar: Bart van den Eijnden OSGIS [EMAIL PROTECTED] Cc: users@openlayers.org Onderwerp: Re: [OpenLayers-Users] popups Datum: 31/03/08 10:55 On Mon, Mar 31, 2008 at 02:13:24PM +0200, Bart van den Eijnden (OSGIS) wrote: gt; Hi Chris, gt; gt; I was using a different close.gif, so I had to copy the new lines of css for gt; the olPopupCloseBox class into my css file to get the closebox. But as you gt; say, it's now outside of the popup content, which is a bit unexpected for gt; me. Although I understand why this is a problem, I believe that your popups are a somewhat special case. Since you've got it working now, I'm going to treat this as a 'caution' that we can offer to users going forward, but not a blocker on RC1, unless you feel there is further action neccesary on our part. Regards, -- Christopher Schmidt MetaCarta ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Measuring tool
See also: http://trac.openlayers.org/ticket/1241 Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Gérald Quintana [EMAIL PROTECTED] Naar: users@openlayers.org users@openlayers.org Onderwerp: [OpenLayers-Users] Measuring tool Datum: 19/03/08 05:44 Hi, Once I saw an example of Control to measure the length of a path (rubber), but I can't find it anymore. Where is it? I managed to do my own using the DrawFeature control and the Curve.getLength() method but I miss the conversion factor to get the distance in meters or kilometers, how can I do it? Thanks for your help, Gérald ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Transparent pink tile?
Set: OpenLayers.Util.onImageLoadErrorColor = transparent; Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: David R Robison [EMAIL PROTECTED] Naar: users@openlayers.org users@openlayers.org Onderwerp: [OpenLayers-Users] Transparent pink tile? Datum: 18/03/08 10:32 We have a map layer that overlays the base map and comes from a different server than the base map. If the second server is down, then the layer shows a pink tile which hides the entire base map. Is there a way to have the layer generate a transparent pink tile or no tile at all? TNX David -- David R Robison Open Roads Consulting, Inc. 708 S. Battlefield Blvd., Chesapeake, VA 23322 phone: (757) 546-3401 e-mail: [EMAIL PROTECTED] web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/book_detail.php?id=2579 ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] mousewheel: center on point or not?
Hi list, I thought the mousewheel used to center on the mouse cursor, but it does not do this anymore in trunk. Or maybe my mind is playing tricks on me :-) Questions: -is this intentional? -if so, could it not become a property of the Navigation Control so people can control this behaviour themselves? I commented the following in Navigation.js (deltaX * newRes etc.) to get it to zoom centered on the mouse position again: wheelChange: function(evt, deltaZ) { var newZoom = this.map.getZoom() + deltaZ; if (!this.map.isValidZoomLevel(newZoom)) { return; } var size= this.map.getSize(); var deltaX = size.w/2 - evt.xy.x; var deltaY = evt.xy.y - size.h/2; var newRes = this.map.baseLayer.getResolutionForZoom(newZoom); var zoomPoint = this.map.getLonLatFromPixel(evt.xy); var newCenter = new OpenLayers.LonLat( zoomPoint.lon /*+ deltaX * newRes*/, zoomPoint.lat /*+ deltaY * newRes*/ ); this.map.setCenter( newCenter, newZoom ); }, Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] flickering of singleTile layers
Hi list, mostly a question for Paul Spencer probably, but is there already a way to prevent the flickering of singleTile layers using trunk? If so, is this out of the box or do we need to specify a secret setting somewhere? TIA. Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Invalid Argument error in IE when leaving a page
I think quite some work has been done in trunk to prevent these types of errors. Are you able to check trunk? Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: David R Robison [EMAIL PROTECTED] Naar: users@openlayers.org users@openlayers.org Onderwerp: [OpenLayers-Users] Invalid Argument error in IE when leaving a page Datum: 11/03/08 12:22 When I navigate off a page (in IE7) that has a map, I get a popup showing an Invalid Argument error. I am using OpenLayers 2.5. This error does not occur with FireFox. Any ideas how to prevent this error? The error seems to be when it is trying to remove layers from the map. Thanks in advance, David -- David R Robison Open Roads Consulting, Inc. 708 S. Battlefield Blvd., Chesapeake, VA 23322 phone: (757) 546-3401 e-mail: [EMAIL PROTECTED] web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/book_detail.php?id=2579 ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] OpenLayers.Format.WFS question/issue
Hi Steve, namespace prefixes (please note the *prefix*, not the namespace itself) can be anything, that's perfectly valid and up to the implementation. I think any implementation that assumes a fixed namespace prefix is bound to fail somewhere Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Stephen Woodbridge [EMAIL PROTECTED] Naar: openlayers user list users@openlayers.org Onderwerp: [OpenLayers-Users] OpenLayers.Format.WFS question/issue Datum: 10/03/08 13:38 Hi all, I admit up front that this inquiry might partly be my ignorance on the subject, but when OpenLayers.Format.WFS serializes a polygon insert request it looks like: lt;wfs:Insertgt; lt;feature:Geofence xmlns:feature=quot;http://mapserver.gis.umn.edu/mapserverquot;gt; lt;feature:the_geomgt; lt;gml:MultiPolygon xmlns:gml=quot;http://www.opengis.net/gmlquot;gt; lt;gml:polygonMembergt; lt;gml:Polygongt; lt;gml:outerBoundaryIsgt; lt;gml:LinearRinggt; lt;gml:coordinates decimal=quot;.quot; cs=quot;,quot; ts=quot; quot;gt;-105.662109375,40.1591796875 -107.068359375,38.2255859375 -103.640625,37.7861328125 -105.662109375,40.1591796875lt;/gml:coordinatesgt; lt;/gml:LinearRinggt; lt;/gml:outerBoundaryIsgt; lt;/gml:Polygongt; lt;/gml:polygonMembergt; lt;/gml:MultiPolygongt; lt;/feature:the_geomgt; lt;/feature:Geofencegt; lt;/wfs:Insertgt; This appears to be getting done by OpenLayers.Format.WFS.createFeatureXML(feature) and the namespace is hardcoded to quot;feature:...quot; My question is why this namespace and not the wfs namespace and XML something more like: lt;wfs:Insert typeName=quot;Geofencequot;gt; lt;wfs:Propertygt; lt;wfs:Namegt;the_geomlt;/wfs:Namegt; lt;wfs:Valuegt; lt;gml:MultiPolygon xmlns:gml=quot;http://www.opengis.net/gmlquot;gt; lt;gml:polygonMembergt; lt;gml:Polygongt; lt;gml:outerBoundaryIsgt; lt;gml:LinearRinggt; lt;gml:coordinates decimal=quot;.quot; cs=quot;,quot; ts=quot; quot;gt;-105.662109375,40.1591796875 -107.068359375,38.2255859375 -103.640625,37.7861328125 -105.662109375,40.1591796875lt;/gml:coordinatesgt; lt;/gml:LinearRinggt; lt;/gml:outerBoundaryIsgt; lt;/gml:Polygongt; lt;/gml:polygonMembergt; lt;/gml:MultiPolygongt; lt;/wfs:Valuegt; lt;/wfs:Propertygt; lt;wfs:Propertygt; lt;wfs:Namegt;namelt;/wfs:Namegt; lt;wfs:Valuegt;nonamelt;/wfs:Valuegt; lt;/wfs:Propertygt; lt;/wfs:Insertgt; This would more closely follow the lt;wfs:Modifygt; format and namespace. So why should anyone care? mostly the later is much easier to parse as the tags are predetermined by the wfs namespace and not consturcted from the arbitrary attributes used in the layer definition. I am interested in the quot;why of thisquot; so I better understand how all this works. Reading the code, it looks like this change can be done by overloading createFeatureXML with code that generates the later XML above, so I could make the change myself outside of the OL code base for testing and review. If I did that would it be an appropriate change to svn? A change to svn, would probably break any existing services that depend on the existing format for lt;wfs:Insertgt;. Thanks in advance for any thoughts on this. -Steve W ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] Google endlessly loading with LoadingPanel addin
The Google Layer does not implement the loadstart and loadend events on which the LoadingPanel depends. Btw, I've no idea if this can be implemented in the Google Layer. Best regards, Bart Maria Panagou schreef: hi all, i added to my ol app the loading panel specified in http://trac.openlayers.org/ticket/102 it all works fine, until I have Google as baselayer. Then the loading never seems to stop and user can practically do nothing on the map. Is this a problem of Google or the loading panel? you can check this problem in http://gaia.dbnet.ece.ntua.gr/mpanagou/ol_start_m.htm google appears when someone zooms in to the map and is not shown as a base layer right from the start. Thanks a lot in advance, Maria Panagou -- Bart van den Eijnden OSGIS, Open Source GIS [EMAIL PROTECTED] http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] layer always on top
Right, that's the ticket I was looking for, thanks Pierre. But I see the patch never came. Mixing up CampToCamp people (there are so many capable ones), it's a sin, and I apologize sincerly ... :-) Best regards, Bart -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl - Oorspronkelijk bericht Van: Pierre GIRAUD [EMAIL PROTECTED] Naar: Bart van den Eijnden OSGIS [EMAIL PROTECTED] Cc: users@openlayers.org Onderwerp: Re: [OpenLayers-Users] layer always on top Datum: 29/02/08 10:40 I think you are mixing up. This is something Eric worked on. http://trac.openlayers.org/ticket/1096 Pierre On Fri, Feb 29, 2008 at 8:59 AM, Bart van den Eijnden (OSGIS) lt;[EMAIL PROTECTED]gt; wrote: gt; Hi list, gt; gt; I vaguely remember seeing a ticket or e-mail from fredj talking about an gt; option for a layer to be always on top. gt; gt; But I am unable to find it gt; gt; Has this been implemented by any chance in trunk? Other tricks to force a gt; layer to remain on top? gt; gt; Best regards, gt; Bart gt; gt; -- gt; Bart van den Eijnden gt; OSGIS, Open Source GIS gt; http://www.osgis.nl gt; gt; gt; gt; gt; gt; ___ gt; Users mailing list gt; Users@openlayers.org gt; http://openlayers.org/mailman/listinfo/users gt; ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] OL trunk: WFS transparency in IE
I've got the same problem with trunk, the vector features are semi-transparent in Firefox, but in IE they are totally opaque. My style is defined as: this.style = {}; this.style.fillOpacity = 0.3; this.style.strokeOpacity = 0.3; this.style.strokeColor = blue; this.style.fillColor = blue; Any pointers? Best regards, Bart Hi. What do you mean by the wfs layer is opaque? It means you don't see the layers below the wfs layer ? Could you show us a screen shot or something ? Thx. Eric 2008/2/6, David E. Reksten der at dod.no: Just downloaded OL trunk for testing purposes. Built it with full.cfg, but notice that my WFS layers are now opaque in IE7, rather than semi-transparent as in FireFox2. Have I missed a (build) setting, or is this a bug? If this is a confirmed bug, I'd be happy to make an entry in Trac. .david ___ Users mailing list Users at openlayers.org http://openlayers.org/mailman/listinfo/users -- Bart van den Eijnden OSGIS, Open Source GIS http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users