From joel.tremblet at openflyers.com Sat Aug 1 09:06:44 2009 From: joel.tremblet at openflyers.com (Joel Tremblet) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] [OL2.8]onPopupClose multiple layers Message-ID: <20090801150644.7fbadextkw4wc8kw@webmail.openflyers.com> Hi Function to close a popup by clicking on closeBox seem to not working on multiple layers [CODE] var selectControl = new OpenLayers.Control.SelectFeature([layer1, layer2]); layer.events.on({ "featureselected" : onFeatureSelect, "featureunselected" : onFeatureUnselect }); map.addControl(selectControl); selectControl.activate(); function onPopupClose(evt) { selectControl.unselect(selectedFeature); } function onFeatureSelect(event) { var feature = event.feature; var selectedFeature = feature; var popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), new OpenLayers.Size(100,100), "

"+feature.attributes.name + "

" + feature.attributes.description, null, true, onPopupClose ); feature.popup = popup; map.addPopup(popup); } function onFeatureUnselect(event) { var feature = event.feature; if(feature.popup) { map.removePopup(feature.popup); feature.popup.destroy(); delete feature.popup; } [/CODE] Ticket 2197 opened http://trac.openlayers.org/ticket/2197 Is it confirmed? -- Jo?l -|- ----O---- | | From n.e.kendall at gmail.com Sat Aug 1 11:12:36 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] since I'm a little dense... Message-ID: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com> Hi all, I'm still trying to make a dynamic POI, or marker, or points layer, whatever you want to call it, that changes the points in the map in response to user's searches. I can't use mapserver or a pre-programmed server-side option, so I'm forced to write my own gml or wkt. I'm still not quite sure how to get this GML to OL and then replace it by the next search. I think there are two options. One of which would be to send data to a markers layer and have JS write the markers out. The other would be to have php re-write the gml file on the server and theoretically, this should create a new set of points each time the search is submitted. Not sure what the best/easiest option would be with respect to coding (either on the browser or server-side) or from a performance perspective. Does anyone have any recommendations? I'm basically copying a php/mysql kml tutorial and adapting it to GML (for largely ideological reasons). I've just re-read the GML documentation, and it states that the GML is meant to only be loaded once, so should I be focusing on a dynamic marker layer or what? In effect, all I really want is a simple ajax function to load the POI/markers that correspond to search criteria, such that every search produces a unique (within a limited span of variation of course). The maps centering won't really change, just the make up of the sites displayed in the map. I can write the gml server side, and I can send the request, but I'm not sure what to do with the call-back or how to feed that info to OL. Thank you in advance for any advice/help. (incidentally, I'd be willing to consider contracting someone to do this) best, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090801/729156db/attachment.html From n.e.kendall at gmail.com Sat Aug 1 12:27:40 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] data displays in wrong position, after switch to Layer.Vector Message-ID: <33fd44f90908010927k6a343475n6a17ccd33abcf081@mail.gmail.com> Hi all, I tried switching my application over from Layer.GML to Layer.Vector. here's the original code which displayed in the correct place: var sites = new OpenLayers.Layer.GML ( "Archaeological Sites", "data/siteswatr.gml", { style: {pointRadius: 2.5}, projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML, } ); Here's the modified code which displays in the S. Atlantic ocean. var sites = new OpenLayers.Layer.Vector ( "Archaeological Sites", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "data/siteswatr.gml", style: {pointRadius: 2.5}, projection: new OpenLayers.Projection("EPSG:4326"), format: new OpenLayers.Format.GML(), }) }); map.addLayer(sites); I'm sure I messed something up, but what did I do wrong? thanks, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090801/90693006/attachment.html From eric.lemoine at camptocamp.com Sat Aug 1 16:04:20 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] data displays in wrong position, after switch to Layer.Vector In-Reply-To: <33fd44f90908010927k6a343475n6a17ccd33abcf081@mail.gmail.com> References: <33fd44f90908010927k6a343475n6a17ccd33abcf081@mail.gmail.com> Message-ID: On Saturday, August 1, 2009, Nicholas Efremov-Kendall wrote: > Hi all, > I tried switching my application over from Layer.GML to Layer.Vector. > here's the original code which displayed in the correct place: > var sites = new OpenLayers.Layer.GML ( > "Archaeological Sites", "data/siteswatr.gml", { style: {pointRadius: 2.5}, > projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML, > } );Here's the modified code which displays in the S. Atlantic ocean. > > var sites = new OpenLayers.Layer.Vector ( "Archaeological Sites", { > ?? ? ? ? ? ? ? ? ? ?strategies: [new OpenLayers.Strategy.Fixed()],?? ? ? ? ? ? ? ? ? ?protocol: new OpenLayers.Protocol.HTTP({?? ? ? ? ? ? ? ? ? ? ? ?url: "data/siteswatr.gml", > style: {pointRadius: 2.5},? projection: new OpenLayers.Projection("EPSG:4326"), > ?? ? ? ? ? ? ? ? ? ? ? ?format: new OpenLayers.Format.GML(), })?? ? ? ? ? ? ? ?}); map.addLayer(sites); > > I'm sure I messed something up, but what did I do wrong?thanks,Nick Hi. The projection should be set in the layer not in the protocol. Cheers, > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From fmatz at nexgo.de Sun Aug 2 13:26:47 2009 From: fmatz at nexgo.de (fmatz) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] World Wind tiles of GeoCover 2000 - not success In-Reply-To: <1249045594139-3362489.post@n2.nabble.com> References: <1249045594139-3362489.post@n2.nabble.com> Message-ID: <1249234007168-3373311.post@n2.nabble.com> Hello, I think it was not so wrong, after playing with the zoom it works now : var mapOptions = { maxResolution: 0.0703125, numZoomLevels: 12}; map = new OpenLayers.Map('map', mapOptions); var ww2000 = new OpenLayers.Layer.WorldWind2( "GeoCover 2000", "http://worldwind25.arc.nasa.gov/tile/tile.aspx?", 2.25, 6, {T:"geocover2000"}, { tileSize: new OpenLayers.Size(512,512) }); map.addLayers([ww2000]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.setCenter(new OpenLayers.LonLat( 14.374237060546875, 51.56848802548128 ), 7); Best greetings Friedhold -- View this message in context: http://n2.nabble.com/World-Wind-tiles-of-GeoCover-2000---not-success-tp3362489p3373311.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From janmartin3 at googlemail.com Sun Aug 2 14:37:05 2009 From: janmartin3 at googlemail.com (Jan Martin) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] Popups for waypoints? Message-ID: <4432d5020908021137n5b0d9646n92f41522028801f@mail.gmail.com> Hello, the file in this mail displays waypoints from a gpx file. * *Special features: - auto-zoom - auto-center What do I need to change to get a popup when clicking a waypoint? * *The popup should show "name" and "desc". Thanks, Jan Waypoints look like this: 170.555686 00000001 00000001 00000001 Page: I want popups!
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090802/533f0f54/attachment.html From k_karo at web.de Sun Aug 2 15:26:38 2009 From: k_karo at web.de (moony) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] resizable div Message-ID: <1249241198130-3373808.post@n2.nabble.com> Hello, The div element for the map object is resizable. I am updating the size with map.updateSize(). But when I change the size of the div and the layer are reloading, I got the error message "Requested Image is too big and can not be created". How can I fix this problem? Thanks! -- View this message in context: http://n2.nabble.com/resizable-div-tp3373808p3373808.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Sun Aug 2 15:38:35 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] resizable div In-Reply-To: <1249241198130-3373808.post@n2.nabble.com> References: <1249241198130-3373808.post@n2.nabble.com> Message-ID: On Sun, Aug 2, 2009 at 9:26 PM, moony wrote: > > Hello, > > The div element for the map object is resizable. I am updating the size with > map.updateSize(). > But when I change the size of the div and the layer are reloading, I got the > error message "Requested Image is too big and can not be created". > > How can I fix this problem? Hi. As I understand it this isn't a message from OpenLayers, but rather from the map server. If you have control over this map server you may want to check its configuration. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From petedawn at gmail.com Mon Aug 3 00:24:56 2009 From: petedawn at gmail.com (Peter Dawn) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] GetFeatureInfo does not display animated gif icon in IE6 Message-ID: <5dd88dab0908022124n85e6194v246fd16e2b243ed7@mail.gmail.com> Hi everyone, I am working on a Geoserver/OpenLayer web application. I need to test it in IE6. Now I have a GetFeatureInfo function, where the user clicks on the map and I do a GetFeatureInfo call and I display the results on the screen. The function is working well. However I want to display a animated GIF wait icon, while its retrieving data. So I have the following, icon = new OpenLayers.Icon("images/loader.gif",size,null,myOffset); This displays the icon, but it does not animate. I am unable to figure out why. Can somebody tell me what I need to get it to work. It works fine in FF. Thanks. From adrian_gh.popa at romtelecom.ro Mon Aug 3 02:50:46 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] since I'm a little dense... In-Reply-To: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com> References: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com> Message-ID: <4A7688C6.1030200@romtelecom.ro> Hello, I had a similar task - of showing dynamic POIs and I chose to implement it like this: - a Vector layer with KML data. - the path to the KML file is actually a path to a serverside script wich generates KMLs. - on searchbox submit a javascript creates new parameters for the serverside script - I force a layer refresh It works great - but it tends to crash Internet Explorer after a while - because IE keeps deleted markers in memory (silly behaviour). You can get around this by refreshing the whole page, but it's nasty. Let me know if you need some code examples. Regards, Adrian Nicholas Efremov-Kendall wrote: > Hi all, > > I'm still trying to make a dynamic POI, or marker, or points layer, > whatever you want to call it, that changes the points in the map in > response to user's searches. I can't use mapserver or a pre-programmed > server-side option, so I'm forced to write my own gml or wkt. I'm > still not quite sure how to get this GML to OL and then replace it by > the next search. > > I think there are two options. One of which would be to send data to a > markers layer and have JS write the markers out. The other would be to > have php re-write the gml file on the server and theoretically, this > should create a new set of points each time the search is submitted. > Not sure what the best/easiest option would be with respect to coding > (either on the browser or server-side) or from a performance > perspective. Does anyone have any recommendations? I'm basically > copying a php/mysql kml tutorial and adapting it to GML (for largely > ideological reasons). I've just re-read the GML documentation, and it > states that the GML is meant to only be loaded once, so should I be > focusing on a dynamic marker layer or what? > > In effect, all I really want is a simple ajax function to load the > POI/markers that correspond to search criteria, such that every search > produces a unique (within a limited span of variation of course). The > maps centering won't really change, just the make up of the sites > displayed in the map. I can write the gml server side, and I can send > the request, but I'm not sure what to do with the call-back or how to > feed that info to OL.? > > Thank you in advance for any advice/help. > (incidentally, I'd be willing to consider contracting someone to do this) > > best, > Nick > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/5e647131/attachment.html From adrian_gh.popa at romtelecom.ro Mon Aug 3 03:29:48 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] since I'm a little dense... In-Reply-To: <05EC2644-0297-4807-BE5E-16974E51172F@gmail.com> References: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com> <4A7688C6.1030200@romtelecom.ro> <05EC2644-0297-4807-BE5E-16974E51172F@gmail.com> Message-ID: <4A7691EC.7010909@romtelecom.ro> Hello Nick, Here's some code - it's not complete - because it mostly lacks variable definitions which should be globals. However, they should be easy to add: //layer definition markers = new OpenLayers.Layer.Vector("Alarms", { projection: map.displayProjection, strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml_alarms.pl", format: new OpenLayers.Format.KML({ extractStyles: true, extractAttributes: true })})}); map.addLayer(markers); //if you want to select the markers later, you will need to add the necessary functions. select = new OpenLayers.Control.SelectFeature(markers, {toggle:true}); markers.events.on({ "featureselected": onMarkerSelect, "featureunselected": onMarkerUnselect, "visibilitychanged": onMarkerToggle }); map.addControl(select); select.activate(); //......... // onSubmit: - layer is the layer variable, options are the options packed as a JSON/javascript object. Call refreshLayer like: refreshLayer(markers, options); function refreshLayer(layer, options){ if(options == null){ layer.refresh({force: true}); } else{ if(layer.CLASS_NAME == "OpenLayers.Layer.Vector"){ layer.protocol.options.params = options; //override the parameters sent to kml_alarms.pl layer.refresh({force: true}); } } } If you're using KML format, make sure your serverside script outputs content-type application/vnd.google-earth.kml+xml. Something similar should exist for GML. From this code you're missing a function to pack the search form into the "options" object. The object should look like: options[name] = value; options[name2] = value2; Good luck! Adrian. P.S. If you intent your application to run for hours and to automatically refresh your POIs, you should consider doing a full page reload from time to time so that IE won't eat all available memory... Nick Kendall wrote: > Adrian, I'd love some code examples. I was toting with the idea of a > gml writing php function that re-writes a gml file on the server, and > reloading the pages on submit, thus changing the static resource but > your way sounds more elegant > > Nicholas Efremov-Kendall > (917) 399-6939 > Sent from my mobile device > > On Aug 3, 2009, at 9:50 AM, Adrian Popa > wrote: > >> Hello, >> >> I had a similar task - of showing dynamic POIs and I chose to >> implement it like this: >> - a Vector layer with KML data. >> - the path to the KML file is actually a path to a serverside script >> wich generates KMLs. >> - on searchbox submit a javascript creates new parameters for the >> serverside script >> - I force a layer refresh >> >> It works great - but it tends to crash Internet Explorer after a >> while - because IE keeps deleted markers in memory (silly behaviour). >> You can get around this by refreshing the whole page, but it's nasty. >> >> Let me know if you need some code examples. >> Regards, >> Adrian >> >> Nicholas Efremov-Kendall wrote: >>> Hi all, >>> >>> I'm still trying to make a dynamic POI, or marker, or points layer, >>> whatever you want to call it, that changes the points in the map in >>> response to user's searches. I can't use mapserver or a >>> pre-programmed server-side option, so I'm forced to write my own gml >>> or wkt. I'm still not quite sure how to get this GML to OL and then >>> replace it by the next search. >>> >>> I think there are two options. One of which would be to send data to >>> a markers layer and have JS write the markers out. The other would >>> be to have php re-write the gml file on the server and >>> theoretically, this should create a new set of points each time the >>> search is submitted. Not sure what the best/easiest option would be >>> with respect to coding (either on the browser or server-side) or >>> from a performance perspective. Does anyone have any >>> recommendations? I'm basically copying a php/mysql kml tutorial and >>> adapting it to GML (for largely ideological reasons). I've just >>> re-read the GML documentation, and it states that the GML is meant >>> to only be loaded once, so should I be focusing on a dynamic marker >>> layer or what? >>> >>> In effect, all I really want is a simple ajax function to load the >>> POI/markers that correspond to search criteria, such that every >>> search produces a unique (within a limited span of variation of >>> course). The maps centering won't really change, just the make up of >>> the sites displayed in the map. I can write the gml server side, and >>> I can send the request, but I'm not sure what to do with the >>> call-back or how to feed that info to OL.? >>> >>> Thank you in advance for any advice/help. >>> (incidentally, I'd be willing to consider contracting someone to do >>> this) >>> >>> best, >>> Nick >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> >> -- --- Adrian Popa NOC Division Network Engineer Divizia Centrul National de Operare Retea Departament Transport IP & Metro Compartiment IP Core & Backbone Phone: +40 21 400 3099 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/648f7243/attachment.html From eric.lemoine at camptocamp.com Mon Aug 3 03:42:06 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] GetFeatureInfo does not display animated gif icon in IE6 In-Reply-To: <5dd88dab0908022124n85e6194v246fd16e2b243ed7@mail.gmail.com> References: <5dd88dab0908022124n85e6194v246fd16e2b243ed7@mail.gmail.com> Message-ID: On Mon, Aug 3, 2009 at 6:24 AM, Peter Dawn wrote: > Hi everyone, > > I am working on a Geoserver/OpenLayer web application. I need to test it in IE6. > > Now I have a GetFeatureInfo function, where the user clicks on the map > and I do a GetFeatureInfo call and I display the results on the > screen. > > The function is working well. However I want to display a animated GIF > wait icon, while its retrieving data. So I have the following, > icon = new OpenLayers.Icon("images/loader.gif",size,null,myOffset); > > This displays the icon, but it does not animate. I am unable to figure > out why. Can somebody tell me what I need to get it to work. It works > fine in FF. Hi. Just guessing... It may be that IE is busy parsing the GFI response. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From adrian_gh.popa at romtelecom.ro Mon Aug 3 03:54:08 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a different popup on click. Message-ID: <4A7697A0.5030901@romtelecom.ro> Hello everyone, This is sort of a repeat message of "Re: [OpenLayers-Users] Labels/Tooltips on mouse over a Vector layer" - but with a slightly different idea. Problem: I want to display a small div/popup with the marker's name when the user hovers his mouse over the location, and I want to display a bigger popup when the user actually clicks on the location. Current status: * I can use {hover: true} to register featureselected/featureunselected when I hover over a marker instead on when I click on the maker. * I haven't found any events that could differentiate between hover and click I'm thinking I could register my select control with hover: true and allow featureselected to execute the same function for both when I click on the makrer as well as when I hover over the marker. I would like to know if there's any way to find out in the event inside the function if the user clicked or not his mouse. Depending on this, I would show one popup or the other. Something like: select = new OpenLayers.Control.SelectFeature(markers, {clickout:true, hover:true}); markers.events.on({ "featureselected": onMarkerSelect, "featureunselected": onMarkerUnselect, "visibilitychanged": onMarkerToggle }); map.addControl(select); select.activate(); function onMarkerSelect(event){ var feature = event.feature; //find out if the user clicked or not var clicked = event.*findAWayToSeeIfTheUserClicked()*; if(clicked){ //show larger popup } else{ //show smaller popup } } Suggestions are welcome. Thanks, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/1e68bd67/attachment.html From rohan at quintemri.com Mon Aug 3 04:00:32 2009 From: rohan at quintemri.com (maelstrom666) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] KML Message-ID: <1249286432205-3376405.post@n2.nabble.com> Hi I am very new to OL and I am having some issues with kml and markers. When I go to http://openlayers.org/dev/examples/sundials-spherical-mercator.html , the sundials show up fine. In the zip file I downloaded from the main website, this example was included. However I do not see the sundials on the example stored on my machine. The code is exactly the same, the files are all in the right folders.. I am not sure why it isnt working. Do I need to install kml on my machine or something? Also, I need some help with markers. I am currently using a google streets layer on my map. When I add markers to it, no matter what lonlat I specify, it will always show up at 0,0. Thanks in advance, Rohan Patel -- View this message in context: http://n2.nabble.com/KML-tp3376405p3376405.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adrian_gh.popa at romtelecom.ro Mon Aug 3 05:06:50 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] Overriding some default CSS values Message-ID: <4A76A8AA.5030703@romtelecom.ro> Hello, I'm trying to change the transparency of the "FramedCloud" popup in openlayers - to make it 90% opaque. Also, I'd like to change the font color for the MousePosition control. I want to make these changes as much as 'unintrusive' as possible - meaning I'd rather change these values in my code instead of the original OpenLayers code, so that I may upgrade openlayers in the future, without losing changes. Any ideas on how I can do this? Thanks, Adrian From petedawn at gmail.com Mon Aug 3 05:26:46 2009 From: petedawn at gmail.com (Peter Dawn) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] GetFeatureInfo does not display animated gif icon in IE6 In-Reply-To: References: <5dd88dab0908022124n85e6194v246fd16e2b243ed7@mail.gmail.com> Message-ID: <5dd88dab0908030226gebd3e06g177ed4504414dc75@mail.gmail.com> Hi Eric, You are probably right. Do you know of a workaround this. Why does IE not render a GIF while processing the getfeatureinfo request. Perhaps I can display text 'Please wait'. Cheers. On Mon, Aug 3, 2009 at 5:42 PM, Eric Lemoine wrote: > On Mon, Aug 3, 2009 at 6:24 AM, Peter Dawn wrote: >> Hi everyone, >> >> I am working on a Geoserver/OpenLayer web application. I need to test it in IE6. >> >> Now I have a GetFeatureInfo function, where the user clicks on the map >> and I do a GetFeatureInfo call and I display the results on the >> screen. >> >> The function is working well. However I want to display a animated GIF >> wait icon, while its retrieving data. So I have the following, >> icon = new OpenLayers.Icon("images/loader.gif",size,null,myOffset); >> >> This displays the icon, but it does not animate. I am unable to figure >> out why. Can somebody tell me what I need to get it to work. It works >> fine in FF. > > Hi. > > Just guessing... It may be that IE is busy parsing the GFI response. > > Cheers, > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > From jansen at terrestris.de Mon Aug 3 06:30:37 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:42 2010 Subject: [OpenLayers-Users] Overriding some default CSS values In-Reply-To: <4A76A8AA.5030703@romtelecom.ro> References: <4A76A8AA.5030703@romtelecom.ro> Message-ID: <4A76BC4D.3090001@terrestris.de> Hi Adrian, to change the color of the mousecoordinates div, simply override the css like: (tested) to set the opacity of one popup you could use: popup.setOpacity(0.7); (tested) If you generally want to have another opacity issue: OpenLayers.Popup.FramedCloud.prototype.opacity = 0.1; (untested!) before you instantiate your popups. Regards, Marc Adrian Popa schrieb: > Hello, > > I'm trying to change the transparency of the "FramedCloud" popup in > openlayers - to make it 90% opaque. Also, I'd like to change the font > color for the MousePosition control. I want to make these changes as > much as 'unintrusive' as possible - meaning I'd rather change these > values in my code instead of the original OpenLayers code, so that I may > upgrade openlayers in the future, without losing changes. > > Any ideas on how I can do this? > > Thanks, > Adrian > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From adube at mapgears.com Mon Aug 3 08:12:04 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a different popup on click. In-Reply-To: <4A7697A0.5030901@romtelecom.ro> References: <4A7697A0.5030901@romtelecom.ro> Message-ID: <4A76D414.805@mapgears.com> Hi Adrian, Take a look at this example (1). You can use 2 SelectFeature controls for what you need, one with hover:true and highlightOnly:true, the other with hover false. The first one won't actually select the feature and you can register 3 kinds of "highlight" events (see the source) to display your small div/popup. Hope this helps, Alexandre (1) http://openlayers.org/dev/examples/highlight-feature.html Adrian Popa wrote: > Hello everyone, > > This is sort of a repeat message of "Re: [OpenLayers-Users] > Labels/Tooltips on mouse over a Vector layer" - but with a slightly > different idea. > > Problem: I want to display a small div/popup with the marker's name > when the user hovers his mouse over the location, and I want to > display a bigger popup when the user actually clicks on the location. > > Current status: > * I can use {hover: true} to register > featureselected/featureunselected when I hover over a marker instead > on when I click on the maker. > * I haven't found any events that could differentiate between hover > and click > > I'm thinking I could register my select control with hover: true and > allow featureselected to execute the same function for both when I > click on the makrer as well as when I hover over the marker. I would > like to know if there's any way to find out in the event inside the > function if the user clicked or not his mouse. Depending on this, I > would show one popup or the other. > > Something like: > > select = new OpenLayers.Control.SelectFeature(markers, {clickout:true, > hover:true}); > markers.events.on({ "featureselected": onMarkerSelect, > "featureunselected": onMarkerUnselect, "visibilitychanged": > onMarkerToggle }); > map.addControl(select); > select.activate(); > > function onMarkerSelect(event){ > var feature = event.feature; > //find out if the user clicked or not > var clicked = event.*findAWayToSeeIfTheUserClicked()*; > if(clicked){ > //show larger popup > } > else{ > //show smaller popup > } > } > > Suggestions are welcome. > > Thanks, > Adrian > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From adrian_gh.popa at romtelecom.ro Mon Aug 3 08:18:43 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Overriding some default CSS values In-Reply-To: <4A76BC4D.3090001@terrestris.de> References: <4A76A8AA.5030703@romtelecom.ro> <4A76BC4D.3090001@terrestris.de> Message-ID: <4A76D5A3.70900@romtelecom.ro> Hello Marc, Your example for the mouse coordinates worked beautifully, thanks. However, the "setOpacity" example didn't work (the opacity attribute didn't change in Firebug). I've tried setting popup.opacity = 0.7 - and although I've seen the change in firebug, my popup doesn't seem to honor it. I'm running firefox 3.0.12. I will do further tests to see what the problem might be. Thanks, Adrian Marc Jansen wrote: > Hi Adrian, > > to change the color of the mousecoordinates div, simply override the > css like: > > > > (tested) > > > to set the opacity of one popup you could use: > > popup.setOpacity(0.7); > > (tested) > > > If you generally want to have another opacity issue: > > OpenLayers.Popup.FramedCloud.prototype.opacity = 0.1; > (untested!) > > before you instantiate your popups. > > Regards, > Marc > > > Adrian Popa schrieb: >> Hello, >> >> I'm trying to change the transparency of the "FramedCloud" popup in >> openlayers - to make it 90% opaque. Also, I'd like to change the font >> color for the MousePosition control. I want to make these changes as >> much as 'unintrusive' as possible - meaning I'd rather change these >> values in my code instead of the original OpenLayers code, so that I >> may upgrade openlayers in the future, without losing changes. >> >> Any ideas on how I can do this? >> >> Thanks, >> Adrian >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > From adrian_gh.popa at romtelecom.ro Mon Aug 3 08:19:44 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a different popup on click. In-Reply-To: <4A76D414.805@mapgears.com> References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com> Message-ID: <4A76D5E0.8090807@romtelecom.ro> Thank you for your suggestion - I will try it and let you know how it works! Regards, Adrian Alexandre Dube wrote: > Hi Adrian, > > Take a look at this example (1). You can use 2 SelectFeature > controls for what you need, one with hover:true and > highlightOnly:true, the other with hover false. The first one won't > actually select the feature and you can register 3 kinds of > "highlight" events (see the source) to display your small div/popup. > > Hope this helps, > > Alexandre > > (1) http://openlayers.org/dev/examples/highlight-feature.html > > Adrian Popa wrote: >> Hello everyone, >> >> This is sort of a repeat message of "Re: [OpenLayers-Users] >> Labels/Tooltips on mouse over a Vector layer" - but with a slightly >> different idea. >> >> Problem: I want to display a small div/popup with the marker's name >> when the user hovers his mouse over the location, and I want to >> display a bigger popup when the user actually clicks on the location. >> >> Current status: >> * I can use {hover: true} to register >> featureselected/featureunselected when I hover over a marker instead >> on when I click on the maker. >> * I haven't found any events that could differentiate between hover >> and click >> >> I'm thinking I could register my select control with hover: true and >> allow featureselected to execute the same function for both when I >> click on the makrer as well as when I hover over the marker. I would >> like to know if there's any way to find out in the event inside the >> function if the user clicked or not his mouse. Depending on this, I >> would show one popup or the other. >> >> Something like: >> >> select = new OpenLayers.Control.SelectFeature(markers, >> {clickout:true, hover:true}); >> markers.events.on({ "featureselected": onMarkerSelect, >> "featureunselected": onMarkerUnselect, "visibilitychanged": >> onMarkerToggle }); >> map.addControl(select); >> select.activate(); >> >> function onMarkerSelect(event){ >> var feature = event.feature; >> //find out if the user clicked or not >> var clicked = event.*findAWayToSeeIfTheUserClicked()*; >> if(clicked){ >> //show larger popup >> } >> else{ >> //show smaller popup >> } >> } >> >> Suggestions are welcome. >> >> Thanks, >> Adrian >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > From crschmidt at metacarta.com Mon Aug 3 10:01:22 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] KML In-Reply-To: <1249286432205-3376405.post@n2.nabble.com> References: <1249286432205-3376405.post@n2.nabble.com> Message-ID: <20090803140121.GA11258@metacarta.com> On Mon, Aug 03, 2009 at 01:00:32AM -0700, maelstrom666 wrote: > > Hi I am very new to OL and I am having some issues with kml and markers. > When I go to > http://openlayers.org/dev/examples/sundials-spherical-mercator.html , the > sundials show up fine. > In the zip file I downloaded from the main website, this example was > included. > However I do not see the sundials on the example stored on my machine. > The code is exactly the same, the files are all in the right folders.. I am > not sure why it isnt working. > Do I need to install kml on my machine or something? Most likely: * You're using a recent web browser, which does not support loading files from the local filesystem. * You havent' installed the examples on a webserver. > Also, I need some help with markers. I am currently using a google streets > layer on my map. When I add markers to it, no matter what lonlat I specify, > it will always show up at 0,0. Near 0,0, more likely. I recommend http://docs.openlayers.org/library/spherical_mercator.html . Regards, -- Christopher Schmidt MetaCarta From Steve.Toutant at inspq.qc.ca Mon Aug 3 10:44:10 2009 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Measure control problem In-Reply-To: <4A718A57.8060107@mapgears.com> Message-ID: Hello, I created a measure control based on the measure.js example My measure control doesn't display the good distance. The distance is longer than expected. I tried with these coordinates # : lat, long Point 1 : 46.81509864093307, -71.22436522446064 Point 2 : 45.54483148742626, -73.63037108350094 The control gives 336.824 km It should be around 233 km Do you have an idea on what could be the cause of this error? Here is my code //the mapOptions of OL are projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher les coord lat long units: "m", var mesureControl = new OpenLayers.Control.Measure( OpenLayers.Handler.Path, { persist: true, geodesic: false, handlerOptions: { // layerOptions: {styleMap: styleMap} } } ); mesureControl.events.on ({ "measure": handleMeasurements, "measurepartial": handleMeasurements }); map.addControl(mesureControl); function handleMeasurements(event) { var geometry = event.geometry; var units = event.units; var measure = event.measure; alert( measure.toFixed(3) + " " + units, "" ); } //geoExt toolbar action = new GeoExt.Action({ control: mesureControl, map: map, toggleGroup: "map", iconCls: 'measure', tooltip: 'Mesure lin?aire' }); toolbar.push(action); Thanks for your help, 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.toutant@inspq.qc.ca http://www.inspq.qc.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/41764730/attachment.html From kwonghu at hotmail.com Mon Aug 3 10:47:52 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Measure control problem In-Reply-To: References: <4A718A57.8060107@mapgears.com> Message-ID: I think you are looking for the Vincenty distance formula. It's included in the examples as well. To: users@openlayers.org From: Steve.Toutant@inspq.qc.ca Date: Mon, 3 Aug 2009 10:44:10 -0400 Subject: [OpenLayers-Users] Measure control problem Hello, I created a measure control based on the measure.js example My measure control doesn't display the good distance. The distance is longer than expected. I tried with these coordinates # : lat, long Point 1 : 46.81509864093307, -71.22436522446064 Point 2 : 45.54483148742626, -73.63037108350094 The control gives 336.824 km It should be around 233 km Do you have an idea on what could be the cause of this error? Here is my code //the mapOptions of OL are projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher les coord lat long units: "m", var mesureControl = new OpenLayers.Control.Measure( OpenLayers.Handler.Path, { persist: true, geodesic: false, handlerOptions: { // layerOptions: {styleMap: styleMap} } } ); mesureControl.events.on ({ "measure": handleMeasurements, "measurepartial": handleMeasurements }); map.addControl(mesureControl); function handleMeasurements(event) { var geometry = event.geometry; var units = event.units; var measure = event.measure; alert( measure.toFixed(3) + " " + units, "" ); } //geoExt toolbar action = new GeoExt.Action({ control: mesureControl, map: map, toggleGroup: "map", iconCls: 'measure', tooltip: 'Mesure lin?aire' }); toolbar.push(action); Thanks for your help, 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.toutant@inspq.qc.ca http://www.inspq.qc.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/c9db9c3c/attachment.html From Steve.Toutant at inspq.qc.ca Mon Aug 3 11:01:20 2009 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Measure control problem In-Reply-To: Message-ID: No, I need planar distance since my map is in Mercator projection. I provided The coordinates of point 1 and point 2 in lat/long just for test purpose. Sorry for the confusion. 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.toutant@inspq.qc.ca http://www.inspq.qc.ca Kwong Hu Kiu 03/08/2009 10:47 AM A , cc Objet RE: [OpenLayers-Users] Measure control problem I think you are looking for the Vincenty distance formula. It's included in the examples as well. To: users@openlayers.org From: Steve.Toutant@inspq.qc.ca Date: Mon, 3 Aug 2009 10:44:10 -0400 Subject: [OpenLayers-Users] Measure control problem Hello, I created a measure control based on the measure.js example My measure control doesn't display the good distance. The distance is longer than expected. I tried with these coordinates # : lat, long Point 1 : 46.81509864093307, -71.22436522446064 Point 2 : 45.54483148742626, -73.63037108350094 The control gives 336.824 km It should be around 233 km Do you have an idea on what could be the cause of this error? Here is my code //the mapOptions of OL are projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher les coord lat long units: "m", var mesureControl = new OpenLayers.Control.Measure( OpenLayers.Handler.Path, { persist: true, geodesic: false, handlerOptions: { // layerOptions: {styleMap: styleMap} } } ); mesureControl.events.on ({ "measure": handleMeasurements, "measurepartial": handleMeasurements }); map.addControl(mesureControl); function handleMeasurements(event) { var geometry = event.geometry; var units = event.units; var measure = event.measure; alert( measure.toFixed(3) + " " + units, "" ); } //geoExt toolbar action = new GeoExt.Action({ control: mesureControl, map: map, toggleGroup: "map", iconCls: 'measure', tooltip: 'Mesure lin?aire' }); toolbar.push(action); Thanks for your help, 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.toutant@inspq.qc.ca http://www.inspq.qc.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/4e7ef749/attachment.html From Steve.Toutant at inspq.qc.ca Mon Aug 3 11:53:51 2009 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Measure control problem (SOLVED) In-Reply-To: Message-ID: Setting geodesic: true fixed it. I misunderstood this property. 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.toutant@inspq.qc.ca http://www.inspq.qc.ca Steve Toutant/INSPQ/SSSS 03/08/2009 11:01 AM A Kwong Hu Kiu cc users@openlayers.org Objet RE: [OpenLayers-Users] Measure control problem No, I need planar distance since my map is in Mercator projection. I provided The coordinates of point 1 and point 2 in lat/long just for test purpose. Sorry for the confusion. 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.toutant@inspq.qc.ca http://www.inspq.qc.ca Kwong Hu Kiu 03/08/2009 10:47 AM A , cc Objet RE: [OpenLayers-Users] Measure control problem I think you are looking for the Vincenty distance formula. It's included in the examples as well. To: users@openlayers.org From: Steve.Toutant@inspq.qc.ca Date: Mon, 3 Aug 2009 10:44:10 -0400 Subject: [OpenLayers-Users] Measure control problem Hello, I created a measure control based on the measure.js example My measure control doesn't display the good distance. The distance is longer than expected. I tried with these coordinates # : lat, long Point 1 : 46.81509864093307, -71.22436522446064 Point 2 : 45.54483148742626, -73.63037108350094 The control gives 336.824 km It should be around 233 km Do you have an idea on what could be the cause of this error? Here is my code //the mapOptions of OL are projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher les coord lat long units: "m", var mesureControl = new OpenLayers.Control.Measure( OpenLayers.Handler.Path, { persist: true, geodesic: false, handlerOptions: { // layerOptions: {styleMap: styleMap} } } ); mesureControl.events.on ({ "measure": handleMeasurements, "measurepartial": handleMeasurements }); map.addControl(mesureControl); function handleMeasurements(event) { var geometry = event.geometry; var units = event.units; var measure = event.measure; alert( measure.toFixed(3) + " " + units, "" ); } //geoExt toolbar action = new GeoExt.Action({ control: mesureControl, map: map, toggleGroup: "map", iconCls: 'measure', tooltip: 'Mesure lin?aire' }); toolbar.push(action); Thanks for your help, 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.toutant@inspq.qc.ca http://www.inspq.qc.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/44a716b6/attachment.html From n.e.kendall at gmail.com Mon Aug 3 12:54:31 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] since I'm a little dense... In-Reply-To: <4A7691EC.7010909@romtelecom.ro> References: <33fd44f90908010812t42aa058m82116ee16dc69f62@mail.gmail.com> <4A7688C6.1030200@romtelecom.ro> <05EC2644-0297-4807-BE5E-16974E51172F@gmail.com> <4A7691EC.7010909@romtelecom.ro> Message-ID: <33fd44f90908030954p4a3d2053yeb98720a25256b1e@mail.gmail.com> Adrian, Thanks a lot! (you've also inadvertently answered another question of mine). I was considering trying to implement something similar, but with having php-reload the page on submit, thus changing the static GML resource when the page refreshed. I think the javascript option is a little bit more elegant and will probably work better with my page structure (I'm switching the body html with a php array). Essentially, I'm re-writing one of the KML export tutorials off of the web, I've fudged it for now with 'Content-type: application/opengis.net/gml+xml' which I'm sure is wrong (I'm going to test it today), so if someone has any experience with writing their own gml, or manipulating it I'd also be very grateful for any suggestions on how to structure this bit here. No, essentially, I don't expect particularly high-volume or prolonged use (I also don't have tons of features). On Mon, Aug 3, 2009 at 10:29 AM, Adrian Popa wrote: > Hello Nick, > > Here's some code - it's not complete - because it mostly lacks variable > definitions which should be globals. However, they should be easy to add: > > //layer definition > markers = new OpenLayers.Layer.Vector("Alarms", { > projection: map.displayProjection, strategies: [new > OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.HTTP({ url: > "kml_alarms.pl", format: new OpenLayers.Format.KML({ extractStyles: true, > extractAttributes: true })})}); > map.addLayer(markers); > > //if you want to select the markers later, you will need to add the > necessary functions. > select = new OpenLayers.Control.SelectFeature(markers, > {toggle:true}); > markers.events.on({ "featureselected": onMarkerSelect, > "featureunselected": onMarkerUnselect, "visibilitychanged": onMarkerToggle > }); > map.addControl(select); > select.activate(); > > //......... > // onSubmit: - layer is the layer variable, options are the options packed > as a JSON/javascript object. Call refreshLayer like: refreshLayer(markers, > options); > > function refreshLayer(layer, options){ > > if(options == null){ > layer.refresh({force: true}); > } > else{ > if(layer.CLASS_NAME == "OpenLayers.Layer.Vector"){ > layer.protocol.options.params = options; //override the > parameters sent to kml_alarms.pl > layer.refresh({force: true}); > } > } > } > > If you're using KML format, make sure your serverside script outputs > content-type application/vnd.google-earth.kml+xml. Something similar should > exist for GML. > From this code you're missing a function to pack the search form into the > "options" object. The object should look like: > options[name] = value; > options[name2] = value2; > > > Good luck! > Adrian. > > P.S. If you intent your application to run for hours and to automatically > refresh your POIs, you should consider doing a full page reload from time to > time so that IE won't eat all available memory... > > > > Nick Kendall wrote: > > Adrian, I'd love some code examples. I was toting with the idea of a gml > writing php function that re-writes a gml file on the server, and reloading > the pages on submit, thus changing the static resource but your way sounds > more elegant > > Nicholas Efremov-Kendall (917) 399-6939 > Sent from my mobile device > > On Aug 3, 2009, at 9:50 AM, Adrian Popa > wrote: > > Hello, > > I had a similar task - of showing dynamic POIs and I chose to implement it > like this: > - a Vector layer with KML data. > - the path to the KML file is actually a path to a serverside script wich > generates KMLs. > - on searchbox submit a javascript creates new parameters for the > serverside script > - I force a layer refresh > > It works great - but it tends to crash Internet Explorer after a while - > because IE keeps deleted markers in memory (silly behaviour). You can get > around this by refreshing the whole page, but it's nasty. > > Let me know if you need some code examples. > Regards, > Adrian > > Nicholas Efremov-Kendall wrote: > > Hi all, > > I'm still trying to make a dynamic POI, or marker, or points layer, > whatever you want to call it, that changes the points in the map in response > to user's searches. I can't use mapserver or a pre-programmed server-side > option, so I'm forced to write my own gml or wkt. I'm still not quite sure > how to get this GML to OL and then replace it by the next search. > > I think there are two options. One of which would be to send data to a > markers layer and have JS write the markers out. The other would be to have > php re-write the gml file on the server and theoretically, this should > create a new set of points each time the search is submitted. Not sure what > the best/easiest option would be with respect to coding (either on the > browser or server-side) or from a performance perspective. Does anyone have > any recommendations? I'm basically copying a php/mysql kml tutorial and > adapting it to GML (for largely ideological reasons). I've just re-read the > GML documentation, and it states that the GML is meant to only be loaded > once, so should I be focusing on a dynamic marker layer or what? > > In effect, all I really want is a simple ajax function to load the > POI/markers that correspond to search criteria, such that every search > produces a unique (within a limited span of variation of course). The maps > centering won't really change, just the make up of the sites displayed in > the map. I can write the gml server side, and I can send the request, but > I'm not sure what to do with the call-back or how to feed that info to OL.? > > Thank you in advance for any advice/help. > (incidentally, I'd be willing to consider contracting someone to do this) > > best, > Nick > > ------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > > > -- > --- > Adrian Popa > NOC Division > Network Engineer > Divizia Centrul National de Operare Retea > Departament Transport IP & Metro > Compartiment IP Core & Backbone > Phone: +40 21 400 3099 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/76085198/attachment.html From n.e.kendall at gmail.com Mon Aug 3 13:13:50 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Problem with Layer.vector Message-ID: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com> Hi all, I've been trying to implement my gml as a layer.vector, as opposed to a layer.gml. I'm loading both into the browser with the different methods, and I can from firebug that the file is getting loaded, but it's not being displayed. Thus, if I re-sent my auto-center to sites2.events, it doesn't center at all. I'm not sure what going wrong here, I thought I'd followed the examples pretty closely. Thanks (again) in advance. //loads fine var sites = new OpenLayers.Layer.GML ( "Archaeological Sites", "data/siteswatr.gml", { style: {pointRadius: 2.5}, projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML, } ); map.addLayer(sites); // loads into browser but not displayed. var sites2 = new OpenLayers.Layer.Vector ( "sites2", {projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})}); map.addLayer(sites2); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/955b5127/attachment.html From n.e.kendall at gmail.com Mon Aug 3 13:35:10 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] also strange vector behavior (obviously I've messed up) Message-ID: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com> Hi all, Not sure what's going on here, and what/why I'm doing wrong. I'm loading successfully a gml layer which isn't displaying in the right place var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", { style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, } ); when I add projection and format criteria, it doesn't display at all, let alone in the wrong place, and the auto map.setCenter function doesn't work. var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", { style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML, } ); Is there anything really obvious that I'm missing? thanks again, in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/441f0e05/attachment.html From crschmidt at metacarta.com Mon Aug 3 13:54:32 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] also strange vector behavior (obviously I've messed up) In-Reply-To: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com> References: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com> Message-ID: <20090803175432.GD11258@metacarta.com> On Mon, Aug 03, 2009 at 08:35:10PM +0300, Nicholas Efremov-Kendall wrote: > Hi all, > Not sure what's going on here, and what/why I'm doing wrong. > I'm loading successfully a gml layer which isn't displaying in the right > place > var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", > { > style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, > } > ); > > when I add projection and format criteria, it doesn't display at all, let > alone in the wrong place, and the auto map.setCenter function doesn't work. > var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", > { > style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, > projection: new OpenLayers.Projection("EPSG:4326"), > format: OpenLayers.Format.GML, > } > ); > > Is there anything really obvious that I'm missing? thanks again, in advance Are you using IE? If so, the trailing ',' after format will fail. Do you have a debugger/error reporting turned on? Check these things first for errors. Otherwise: http://docs.openlayers.org/help/minimize.html Regards, -- Christopher Schmidt MetaCarta From n.e.kendall at gmail.com Mon Aug 3 13:56:51 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] also strange vector behavior (obviously I've messed up) In-Reply-To: <20090803175432.GD11258@metacarta.com> References: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com> <20090803175432.GD11258@metacarta.com> Message-ID: <33fd44f90908031056w7006b447u6e9773d262917749@mail.gmail.com> Firebug doesn't pick anything up. On Mon, Aug 3, 2009 at 8:54 PM, Christopher Schmidt wrote: > On Mon, Aug 03, 2009 at 08:35:10PM +0300, Nicholas Efremov-Kendall wrote: > > Hi all, > > Not sure what's going on here, and what/why I'm doing wrong. > > I'm loading successfully a gml layer which isn't displaying in the right > > place > > var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", > > { > > style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, > > } > > ); > > > > when I add projection and format criteria, it doesn't display at all, let > > alone in the wrong place, and the auto map.setCenter function doesn't > work. > > var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", > > { > > style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, > > projection: new OpenLayers.Projection("EPSG:4326"), > > format: OpenLayers.Format.GML, > > } > > ); > > > > Is there anything really obvious that I'm missing? thanks again, in > advance > > Are you using IE? If so, the trailing ',' after format will fail. > Do you have a debugger/error reporting turned on? Check these things first > for errors. > > Otherwise: > http://docs.openlayers.org/help/minimize.html > > Regards, > -- > Christopher Schmidt > MetaCarta > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/aed5baa9/attachment.html From hagen1113 at yahoo.com Mon Aug 3 17:41:51 2009 From: hagen1113 at yahoo.com (Raul David Orozco) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Zoom Level and Base Layer problem Message-ID: <183064.49106.qm@web51412.mail.re2.yahoo.com> Hi. I?m dealing with an issue? and I'm out of ideas right now. I've a layer created in my own WMS server, this layer is built with data from some part of my city of residence, but when I load the layer with OL, the zoom level is very far away, because of that my map looks like a tiny black dot, so I have to do zoom a lot of times to actually see something. I need to know how to set the initial zoom level. Here's the code I'm using to create the Layer. ?Layer = new OpenLayers.Layer.WMS( layer.name, ??????????????????????????????????????????? "http://192.168.1.5:9090/smms/wms.php", ??????????????????????????????????????????? {'layers': layer.name, format: "image/png"}, ??????????????????????????????????????????? { MinExtent: new OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273), ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? MaxExtent: new OpenLayers.Bounds(-180,-90,180,90), ???????????????????????????????????????????? maxResolution: "auto"}); "This coordinates (-75.69927, -4.79079, -75.67719, 4.81273) contain inside all the graphic I want to show in the initial zoom level ".? I used ZoomtoMaExtent but I get an error of "bounds is null". Thanks. ____________________________________________________________________________________ ?Obt?n la mejor experiencia en la web! Descarga gratis el nuevo Internet Explorer 8. http://downloads.yahoo.com/ieak8/?l=e1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/3fc42b0d/attachment.html From jansen at terrestris.de Mon Aug 3 17:58:27 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Zoom Level and Base Layer problem In-Reply-To: <183064.49106.qm@web51412.mail.re2.yahoo.com> References: <183064.49106.qm@web51412.mail.re2.yahoo.com> Message-ID: <4A775D83.8000500@terrestris.de> Hi Raul, just a guess: JavaScript / OpenLayers is case sensitive, so first you would need to write: minExtent: new OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273), maxExtent: new OpenLayers.Bounds(-180,-90,180,90) Then you could set min- and max extent on the map-object as well, e.g.: var map = new OpenLayers.Map('map', { minExtent: new OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273), maxExtent: new OpenLayers.Bounds(-180,-90,180,90) }); Afterwards you could issue: map.zoomToExtent( map.getMinExtent() ); To zoom to a specific zoom level use map.zoomTo( yourZoomLevel ); maybe you only need to set the center of the map and an appropriate zoomleve like so: map.setCenter(lonlatObj, zoomlevel); BTW a map.zoomToMaxExtent would zoom to the extent of whole world. Regards, Marc Jansen Raul David Orozco schrieb: > Hi. I?m dealing with an issue and I'm out of ideas right now. > > I've a layer created in my own WMS server, this layer is built with > data from some part of my city of residence, but when I load the layer > with OL, the zoom level is very far away, because of that my map looks > like a tiny black dot, so I have to do zoom a lot of times to actually > see something. I need to know how to set the initial zoom level. > Here's the code I'm using to create the Layer. > > Layer = new OpenLayers.Layer.WMS( layer.name, > > "http://192.168.1.5:9090/smms/wms.php", > {'layers': layer.name, > format: "image/png"}, > { MinExtent: new > OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273), > MaxExtent: new > OpenLayers.Bounds(-180,-90,180,90), > maxResolution: "auto"}); > > "This coordinates (-75.69927, -4.79079, -75.67719, 4.81273) contain > inside all the graphic I want to show in the initial zoom level ". I > used ZoomtoMaExtent but I get an error of "bounds is null". Thanks. > > > ------------------------------------------------------------------------ > > ?Obt?n la mejor experiencia en la web! > Descarga gratis el nuevo Internet Explorer 8 > http://downloads.yahoo.com/ieak8/?l=e1 > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From n.e.kendall at gmail.com Mon Aug 3 18:03:28 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Zoom Level and Base Layer problem In-Reply-To: <183064.49106.qm@web51412.mail.re2.yahoo.com> References: <183064.49106.qm@web51412.mail.re2.yahoo.com> Message-ID: <33fd44f90908031503w1635fed8o36f2d9af11df91d@mail.gmail.com> Hi, You can either specify the zoom level in your map options and drop the zoomtomaxextent, or once you've loaded data, you a map.centerfunction set on whatever data you load. best, N e.g. if( ! map.getCenter() ){ sites2.events.register('loadend', sites2, function(){map.zoomToExtent(sites2.getDataExtent())}); map.setCenter(null, null); }; } or map = new OpenLayers.Map ("map", { controls:[ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.Attribution()], sphericalMercator: true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxResolution: 156543.0399, numZoomLevels: 19, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), and then specify a specific lon-lat for your map center, and a zoom level in your variables (e.g var zoom = 2, var lat=x var lon=y) and then map.setCenter(lon, lat, zoom) On Tue, Aug 4, 2009 at 12:41 AM, Raul David Orozco wrote: > Hi. I?m dealing with an issue and I'm out of ideas right now. > > I've a layer created in my own WMS server, this layer is built with data > from some part of my city of residence, but when I load the layer with OL, > the zoom level is very far away, because of that my map looks like a tiny > black dot, so I have to do zoom a lot of times to actually see something. I > need to know how to set the initial zoom level. Here's the code I'm using to > create the Layer. > > Layer = new OpenLayers.Layer.WMS( layer.name, > " > http://192.168.1.5:9090/smms/wms.php", > {'layers': layer.name, format: > "image/png"}, > { MinExtent: new > OpenLayers.Bounds(-75.69927, -4.79079, -75.67719, 4.81273), > MaxExtent: new > OpenLayers.Bounds(-180,-90,180,90), > maxResolution: "auto"}); > > "This coordinates (-75.69927, -4.79079, -75.67719, 4.81273) contain inside > all the graphic I want to show in the initial zoom level ". I used > ZoomtoMaExtent but I get an error of "bounds is null". Thanks. > > ------------------------------ > > ?Obt?n la mejor experiencia en la web! > Descarga gratis el nuevo Internet Explorer 8 > http://downloads.yahoo.com/ieak8/?l=e1 > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/6e76f3cf/attachment.html From n.e.kendall at gmail.com Mon Aug 3 23:16:45 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Issues with layers Message-ID: <33fd44f90908032016j737fbb83lc1e9d3b1ce2933cc@mail.gmail.com> Hi all, As before I'm having some problems with some of my GML layers. In particular, I'm trying to display three vector overlays, one of which is meant to be a dynamic POI, but that's another story. The issue is this: Only one of my layers "sites" is displaying correctly. The topo layer only displays at all, and in the wrong place if I specify only the style option. If I specify the projection or format option with the same syntax as I do for the points layer, I can see in firebug that the layer get's loaded into the browser but if I set the map.getCenter function on the layer, it doesn't center at all, and zooms to what I assume is the max extent. e.g. //works var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", { style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, } ); //doesn't var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", { style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML } ); I've stripped out the select controls and popups, and the script works, centers, and displays the one layer (sites) over wms baselayers correctly. Additionally, I've been trying to implement the layer.vector for the same layer as sites (sites2), which also get's loaded into the browser, but doesn't center if targeted by the map.getCenter function. Essentially, the same behavior as the quirky GML layers (i.e. get's loaded into the browser, but doesn't display or if it is displayed is not responsive to the map.getCenter function). I've tested each of these GML layers in ArcGIS and they display in the correct alignment. Additionally, the (sites) layer displays as Black seemingly without my having specified a color. Here is the bare minimum code of the script. I know this is kind of long, but I've added line breaks for clarity. As always, any help is greatly appreciated best, N // function init() { map = new OpenLayers.Map ("map", { controls:[ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.Attribution()], sphericalMercator: true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxResolution: 156543.0399, numZoomLevels: 19, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), } ); var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", { projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML}); map.addLayer(topo); var sites = new OpenLayers.Layer.GML ( "Archaeological Sites", "data/siteswatr.gml", { style: {pointRadius: 2.5}, projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML } ); map.addLayer(sites); var sites2 = new OpenLayers.Layer.Vector ( "sites2", {projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})}); map.addLayer(sites2); if( ! map.getCenter() ){ sites.events.register('loadend', sites, function(){map.zoomToExtent(sites.getDataExtent())}); map.setCenter(null, null); }; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/aaac1245/attachment.html From eric.lemoine at camptocamp.com Tue Aug 4 00:37:01 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] also strange vector behavior (obviously I've messed up) In-Reply-To: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com> References: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com> Message-ID: On Monday, August 3, 2009, Nicholas Efremov-Kendall wrote: > Hi all, > Not sure what's going on here, and what/why I'm doing wrong.I'm loading successfully a gml layer which isn't displaying in the right placevar topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", > ? { > ? style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, > ? } > ? ); > > when I add projection and format criteria, it doesn't display at all, let alone in the wrong place, and the auto map.setCenter function doesn't work. > ?var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", > ? { > ? style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, > ? projection: new OpenLayers.Projection("EPSG:4326"), > ? format: OpenLayers.Format.GML, > ? } > ? ); > > Is there anything really obvious that I'm missing? thanks again, in advance Hi What's the coordinates system of your data? The fact that it does display when you don't set "projection" to 4326 makes me think your data is not 4326. > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Tue Aug 4 00:47:47 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Problem with Layer.vector In-Reply-To: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com> References: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com> Message-ID: On Monday, August 3, 2009, Nicholas Efremov-Kendall wrote: > Hi all,I've been trying to implement my gml as a layer.vector, as opposed to a layer.gml. I'm loading both into the browser with the different methods, and I can from firebug that the file is getting loaded, but it's not being displayed. Thus, if I re-sent my auto-center to sites2.events, it doesn't center at all. I'm not sure what going wrong here, I thought I'd followed the examples pretty closely. Thanks (again) in advance. > //loads fine?var sites = new OpenLayers.Layer.GML ( > ? "Archaeological Sites", "data/siteswatr.gml", > ? { > ? style: {pointRadius: 2.5}, > ? projection: new OpenLayers.Projection("EPSG:4326"), > ? format: OpenLayers.Format.GML, > ? } > ? ); > ? map.addLayer(sites); > ?// loads into browser but not displayed. > ? var sites2 = new OpenLayers.Layer.Vector ( > ? "sites2", {projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})}); > ? map.addLayer(sites2); Your code looks correct to me. The Fixed strategy empties the layer before adding features into it, which could explain why you see one set of features only. I'd recommend adding a break point in the fixed strategy's merge() method to understand what's going on. > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From n.e.kendall at gmail.com Tue Aug 4 04:41:23 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] also strange vector behavior (obviously I've messed up) In-Reply-To: References: <33fd44f90908031035y524ae370gaedf5ab1c3762c6c@mail.gmail.com> Message-ID: <33fd44f90908040141j150516e7y3355db4b0516d20f@mail.gmail.com> Hi Eric, It displays, but incorrorectly (offset by some factor I haven't checked, down and to the left by a country or so). I manually reprojected the data using GDAL from a shapefile originally collected in UTM. I've checked the GML it does say it's in 4326. Regardless of the projection, why doesn't the map.getCenter function work on that file? do you think it has to do with the GML itself? On Tue, Aug 4, 2009 at 7:37 AM, Eric Lemoine wrote: > On Monday, August 3, 2009, Nicholas Efremov-Kendall > wrote: > > Hi all, > > Not sure what's going on here, and what/why I'm doing wrong.I'm loading > successfully a gml layer which isn't displaying in the right placevar topo = > new OpenLayers.Layer.GML ("Topography", "data/topo.gml", > > { > > style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, > > } > > ); > > > > when I add projection and format criteria, it doesn't display at all, let > alone in the wrong place, and the auto map.setCenter function doesn't work. > > var topo = new OpenLayers.Layer.GML ("Topography", "data/topo.gml", > > { > > style: {strokeWidth: 1, strokeColor:"#CCCCCC"}, > > projection: new OpenLayers.Projection("EPSG:4326"), > > format: OpenLayers.Format.GML, > > } > > ); > > > > Is there anything really obvious that I'm missing? thanks again, in > advance > > Hi > > What's the coordinates system of your data? The fact that it does > display when you don't set "projection" to 4326 makes me think your > data is not 4326. > > > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/07f8dced/attachment.html From adrian_gh.popa at romtelecom.ro Tue Aug 4 06:32:27 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Using a more readable OpenLayers.js Message-ID: <4A780E3B.2020905@romtelecom.ro> Hello, I'm running into a problem where firebug says "element doesn't exist" somewhere in OpenLayers code. I'm having trouble debugging this issue, because my Openlayers code is pretty compact. What should I include in to have OpenLayers with a more readable code? Is there an intermediary file with formatting preserved which I could use temporarly? Thanks, Adrian From adrian_gh.popa at romtelecom.ro Tue Aug 4 06:52:05 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Using a more readable OpenLayers.js In-Reply-To: <4A780FB2.6050201@terrestris.de> References: <4A780E3B.2020905@romtelecom.ro> <4A780FB2.6050201@terrestris.de> Message-ID: <4A7812D5.8080500@romtelecom.ro> Thanks, I hadn't noticed that copy. :) Marc Jansen wrote: > Hi Adrian, > > assuming you are using a local copy of OpenLayers, you could use > > OpenLayers-Folder/lib/OpenLayers.js > > instead of > > OpenLayers-Folder/OpenLayers.js > > which would load lots of uncompressed/non-minimized js-files. > > Regards, > Marc > > > Adrian Popa schrieb: >> Hello, >> >> I'm running into a problem where firebug says "element doesn't exist" >> somewhere in OpenLayers code. I'm having trouble debugging this >> issue, because my Openlayers code is pretty compact. What should I >> include in to have OpenLayers with a more readable code? Is there an >> intermediary file with formatting preserved which I could use >> temporarly? >> >> Thanks, >> Adrian >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > From adrian_gh.popa at romtelecom.ro Tue Aug 4 06:57:56 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Using a more readable OpenLayers.js In-Reply-To: <4A780FB2.6050201@terrestris.de> References: <4A780E3B.2020905@romtelecom.ro> <4A780FB2.6050201@terrestris.de> Message-ID: <4A781434.5050102@romtelecom.ro> Hello Marc, I spoke too soon. If I use that file, I get ~34 errors in Firebug all complaining that "OpenLayers.Layer is undefined" in various js files. It seems something doesn't load properly. I'm using OpenLayers 2.8, stored in /var/www/html/map/openlayers/ directory on my web server. My page loads it like: Any ideas? Adrian Marc Jansen wrote: > Hi Adrian, > > assuming you are using a local copy of OpenLayers, you could use > > OpenLayers-Folder/lib/OpenLayers.js > > instead of > > OpenLayers-Folder/OpenLayers.js > > which would load lots of uncompressed/non-minimized js-files. > > Regards, > Marc > > > Adrian Popa schrieb: >> Hello, >> >> I'm running into a problem where firebug says "element doesn't exist" >> somewhere in OpenLayers code. I'm having trouble debugging this >> issue, because my Openlayers code is pretty compact. What should I >> include in to have OpenLayers with a more readable code? Is there an >> intermediary file with formatting preserved which I could use >> temporarly? >> >> Thanks, >> Adrian >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > From richard.wiesinger at gmail.com Tue Aug 4 07:08:44 2009 From: richard.wiesinger at gmail.com (Richard Wiesinger) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] right mouse click not working in chrome & safari Message-ID: Hi, I defined a callback function for right mouse clicks like this: map.controls.Navigation.handlers.click.callbacks.rightclick = function(evt) { alert('right mouse click'); } This works perfectly for FF and IE, but in Chrome and Safari nothing happens. Am I doing something wrong? Is there a way to support these browsers? Kind regards, richard -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/bf1a049b/attachment.html From lorenzetti at gis3w.it Tue Aug 4 07:36:37 2009 From: lorenzetti at gis3w.it (Walter Lorenzetti) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Select feature for destroy a function Message-ID: <4A781D45.6020504@gis3w.it> Hi All, for delete(destroy) a feature I use a SelectFeature Control where onSelect event I destroy the feature...: OpenLayers.Control.SelectFeature(IG.layers.editing_layer,{onSelect:IG.actions.confRemoveFeat}); on IG.actions.confRemoveFeat I use a confirm dialog box for feature deleting... on 'Yes' option I destroy the feature but on 'No' option I've a problem. The problem is that the feature is highlighted again.. so for to unhighlight the feature I've to click outside it... I didn't find a method to unselect the feature by a method... on 'No' Someone can help me? Sorry for my bad english Thanks in advance Walter -- Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021 Viale Giuseppe Verdi n. 24, 51016 Montecatini Terme,Pistoia P.IVA 01686280478 Italy From adube at mapgears.com Tue Aug 4 08:09:17 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Select feature for destroy a function In-Reply-To: <4A781D45.6020504@gis3w.it> References: <4A781D45.6020504@gis3w.it> Message-ID: <4A7824ED.1090501@mapgears.com> Hi Walter, I don't know the answer to your question, but I have an alternative. A while ago, I developed a small DeleteFeature control that could resolve your problem. Take a look at this ticket (1), in the lastest patch. I don't think this control will someday make it in the OpenLayers API since it's too simple, but it's still handy anyway. You need to register events (those in the control itself) to actually destroy/commit your features. Regards, Alexandre (1) http://trac.openlayers.org/ticket/1882 Walter Lorenzetti wrote: > Hi All, > > for delete(destroy) a feature I use a SelectFeature Control where > onSelect event I destroy the feature...: > > OpenLayers.Control.SelectFeature(IG.layers.editing_layer,{onSelect:IG.actions.confRemoveFeat}); > > on IG.actions.confRemoveFeat I use a confirm dialog box for feature > deleting... > on 'Yes' option I destroy the feature but on 'No' option I've a problem. > The problem is that the feature is highlighted again.. so for to > unhighlight the feature I've to click outside it... > > I didn't find a method to unselect the feature by a method... on 'No' > > Someone can help me? > > Sorry for my bad english > > Thanks in advance > Walter > > -- Alexandre Dub? Mapgears www.mapgears.com From jansen at terrestris.de Tue Aug 4 08:35:49 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Using a more readable OpenLayers.js In-Reply-To: <4A781434.5050102@romtelecom.ro> References: <4A780E3B.2020905@romtelecom.ro> <4A780FB2.6050201@terrestris.de> <4A781434.5050102@romtelecom.ro> Message-ID: <4A782B25.7090607@terrestris.de> Hi Adrian, have you either * edited the lib/OpenLayers.js file? * or deleted / renamed ressources in any of the folders below lib? * Double check for "lib/OpenLayers/Layer.js" Is Firebug showing any 404's in the Net(?)-tab? Usually this works just fine. Regards, Marc Adrian Popa schrieb: > Hello Marc, > > I spoke too soon. If I use that file, I get ~34 errors in Firebug all > complaining that "OpenLayers.Layer is undefined" in various js files. > It seems something doesn't load properly. > > I'm using OpenLayers 2.8, stored in /var/www/html/map/openlayers/ > directory on my web server. My page loads it like: > > > Any ideas? > Adrian > > Marc Jansen wrote: >> Hi Adrian, >> >> assuming you are using a local copy of OpenLayers, you could use >> >> OpenLayers-Folder/lib/OpenLayers.js >> >> instead of >> >> OpenLayers-Folder/OpenLayers.js >> >> which would load lots of uncompressed/non-minimized js-files. >> >> Regards, >> Marc >> >> >> Adrian Popa schrieb: >>> Hello, >>> >>> I'm running into a problem where firebug says "element doesn't >>> exist" somewhere in OpenLayers code. I'm having trouble debugging >>> this issue, because my Openlayers code is pretty compact. What >>> should I include in to have OpenLayers with a more readable code? Is >>> there an intermediary file with formatting preserved which I could >>> use temporarly? >>> >>> Thanks, >>> Adrian >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> > > -- Diplom-Geograph Marc Jansen - Anwendungsentwickler - terrestris GmbH & Co. KG Irmintrudisstra?e 17 53111 Bonn Tel: ++49 (0)228 / 96 28 99 -53 Fax: ++49 (0)228 / 96 28 99 -57 Email: jansen@terrestris.de Web: http://terrestris.de Amtsgericht Bonn, HRA 6835 Komplement?rin: terrestris Verwaltungsgesellschaft mbH vertreten durch: Hinrich Paulsen, Till Adams From eric.lemoine at camptocamp.com Tue Aug 4 08:45:28 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Select feature for destroy a function In-Reply-To: <4A781D45.6020504@gis3w.it> References: <4A781D45.6020504@gis3w.it> Message-ID: On Tue, Aug 4, 2009 at 1:36 PM, Walter Lorenzetti wrote: > Hi All, > > for delete(destroy) a feature I use a SelectFeature Control where > onSelect event I destroy the feature...: > > OpenLayers.Control.SelectFeature(IG.layers.editing_layer,{onSelect:IG.actions.confRemoveFeat}); > > on IG.actions.confRemoveFeat I use a confirm dialog box for feature > deleting... > on 'Yes' option I destroy the feature but on 'No' option I've a problem. > The problem is that the feature is highlighted again.. so for to > unhighlight the feature I've to click outside it... > > I didn't find a ?method to unselect the feature by a method... on 'No' > > Someone can help me? Hi. What if you call control.unselect(feature) where control is the select feature control? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From adrian_gh.popa at romtelecom.ro Tue Aug 4 08:53:12 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Using a more readable OpenLayers.js In-Reply-To: <4A782B25.7090607@terrestris.de> References: <4A780E3B.2020905@romtelecom.ro> <4A780FB2.6050201@terrestris.de> <4A781434.5050102@romtelecom.ro> <4A782B25.7090607@terrestris.de> Message-ID: <4A782F38.4040302@romtelecom.ro> Hello Marc, My answer is inline: Marc Jansen wrote: > Hi Adrian, > > have you either > > * edited the lib/OpenLayers.js file? No, it is the original version - as far as I know > * or deleted / renamed ressources in any of the folders below lib? No. > * Double check for "lib/OpenLayers/Layer.js" File is there and get loaded just fine. > > Is Firebug showing any 404's in the Net(?)-tab? No, I checked - all js get loaded. The funny thing is - even if in Firefox with firebug this doesn't work (also flushed the cache), in all other browsers it works - even in firefox without Firebug. Maybe it's a firebug issue... Thanks anyway for the help - I managed to track down the problem the hard way... Regards, Adrian > > Usually this works just fine. > > Regards, > Marc > > > > > Adrian Popa schrieb: >> Hello Marc, >> >> I spoke too soon. If I use that file, I get ~34 errors in Firebug all >> complaining that "OpenLayers.Layer is undefined" in various js files. >> It seems something doesn't load properly. >> >> I'm using OpenLayers 2.8, stored in /var/www/html/map/openlayers/ >> directory on my web server. My page loads it like: >> >> >> Any ideas? >> Adrian >> >> Marc Jansen wrote: >>> Hi Adrian, >>> >>> assuming you are using a local copy of OpenLayers, you could use >>> >>> OpenLayers-Folder/lib/OpenLayers.js >>> >>> instead of >>> >>> OpenLayers-Folder/OpenLayers.js >>> >>> which would load lots of uncompressed/non-minimized js-files. >>> >>> Regards, >>> Marc >>> >>> >>> Adrian Popa schrieb: >>>> Hello, >>>> >>>> I'm running into a problem where firebug says "element doesn't >>>> exist" somewhere in OpenLayers code. I'm having trouble debugging >>>> this issue, because my Openlayers code is pretty compact. What >>>> should I include in to have OpenLayers with a more readable code? >>>> Is there an intermediary file with formatting preserved which I >>>> could use temporarly? >>>> >>>> Thanks, >>>> Adrian >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>> >>> >> >> > > From adrian_gh.popa at romtelecom.ro Tue Aug 4 09:03:25 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] "element is null" error in Openlayers Message-ID: <4A78319D.8030608@romtelecom.ro> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: element_is_null.patch Type: text/x-patch Size: 779 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/b837e031/element_is_null.bin From lorenzetti at gis3w.it Tue Aug 4 09:13:05 2009 From: lorenzetti at gis3w.it (Walter Lorenzetti) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Select feature for destroy a function In-Reply-To: References: <4A781D45.6020504@gis3w.it> Message-ID: <4A7833E1.6060906@gis3w.it> Eric Lemoine ha scritto: > > > Hi. What if you call control.unselect(feature) where control is the > select feature control? > > > > Hi Eric, hi Alexandre, Thank you very much... The Eric reply works... fine I don't find the unselect method on OL API documentation... I remember me to watch the code :) I watch at deleteFeature control example and I find It a good new contro dot add to OL main code... At the momente for may application is not neccessary but... is possible tha I'll can use it in the future.. Thanks again tooo Bye Walter -- Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021 Viale Giuseppe Verdi n. 24, 51016 Montecatini Terme,Pistoia P.IVA 01686280478 Italy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/04445f97/attachment.html From tommytomorow at msn.com Tue Aug 4 10:02:30 2009 From: tommytomorow at msn.com (tommy408) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Changing mouse click Message-ID: <1249394550937-3384702.post@n2.nabble.com> What should I be looking if I want to change to panning with the right mouse button? And still selecting features with left mouse? -- View this message in context: http://n2.nabble.com/Changing-mouse-click-tp3384702p3384702.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From acant at alumni.uwaterloo.ca Tue Aug 4 11:38:08 2009 From: acant at alumni.uwaterloo.ca (Andrew Sullivan Cant) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Using a more readable OpenLayers.js Message-ID: <1249400288.3546.2.camel@Nokia-N810-36-5> Adrian, I saw a similar error when I was attempting to integrate OL into Drupal. I was only experimenting at the time so I have not followed up. I would be really interested to hear what you find. And I will go back to my own work and see whatelse I can report on the problem that I was seeing. Andrew ----- Original message ----- > Hello Marc, > > I spoke too soon. If I use that file, I get ~34 errors in Firebug all > complaining that "OpenLayers.Layer is undefined" in various js files. It > seems something doesn't load properly. > > I'm using OpenLayers 2.8, stored in /var/www/html/map/openlayers/ > directory on my web server. My page loads it like: > > > Any ideas? > Adrian > > Marc Jansen wrote: > > Hi Adrian, > > > > assuming you are using a local copy of OpenLayers, you could use > > > > OpenLayers-Folder/lib/OpenLayers.js > > > > instead of > > > > OpenLayers-Folder/OpenLayers.js > > > > which would load lots of uncompressed/non-minimized js-files. > > > > Regards, > > Marc > > > > > > Adrian Popa schrieb: > > > Hello, > > > > > > I'm running into a problem where firebug says "element doesn't exist" > > > somewhere in OpenLayers code. I'm having trouble debugging this > > > issue, because my Openlayers code is pretty compact. What should I > > > include in to have OpenLayers with a more readable code? Is there an > > > intermediary file with formatting preserved which I could use > > > temporarly? > > > > > > 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 From lorenzetti at gis3w.it Tue Aug 4 12:24:13 2009 From: lorenzetti at gis3w.it (Walter Lorenzetti) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Right click on selected feature Message-ID: <4A7860AD.3050006@gis3w.it> Hi list, is possible to trig a Rightclick event on a selected feature? Thanks in advance Walter -- Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021 Viale Giuseppe Verdi n. 24, 51016 Montecatini Terme,Pistoia P.IVA 01686280478 Italy From n.e.kendall at gmail.com Tue Aug 4 13:29:23 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Problem with Layer.vector In-Reply-To: References: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com> Message-ID: <33fd44f90908041029u5eae144ap733a5fdf97213cff@mail.gmail.com> Hi Eric, I'm still new to Jscript, can you clarify this a little? or point me in the right direction? best, Nick On Tue, Aug 4, 2009 at 7:47 AM, Eric Lemoine wrote: > On Monday, August 3, 2009, Nicholas Efremov-Kendall > wrote: > > Hi all,I've been trying to implement my gml as a layer.vector, as opposed > to a layer.gml. I'm loading both into the browser with the different > methods, and I can from firebug that the file is getting loaded, but it's > not being displayed. Thus, if I re-sent my auto-center to sites2.events, it > doesn't center at all. I'm not sure what going wrong here, I thought I'd > followed the examples pretty closely. Thanks (again) in advance. > > //loads fine var sites = new OpenLayers.Layer.GML ( > > "Archaeological Sites", "data/siteswatr.gml", > > { > > style: {pointRadius: 2.5}, > > projection: new OpenLayers.Projection("EPSG:4326"), > > format: OpenLayers.Format.GML, > > } > > ); > > map.addLayer(sites); > > // loads into browser but not displayed. > > var sites2 = new OpenLayers.Layer.Vector ( > > "sites2", {projection: map.displayProjection, strategies: > [new OpenLayers.Strategy.Fixed()], protocol: new > OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new > OpenLayers.Format.GML()]})}); > > map.addLayer(sites2); > > Your code looks correct to me. The Fixed strategy empties the layer > before adding features into it, which could explain why you see one > set of features only. I'd recommend adding a break point in the fixed > strategy's merge() method to understand what's going on. > > > > > > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/1773a232/attachment.html From eric.lemoine at camptocamp.com Tue Aug 4 15:29:30 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Problem with Layer.vector In-Reply-To: <33fd44f90908041029u5eae144ap733a5fdf97213cff@mail.gmail.com> References: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com> <33fd44f90908041029u5eae144ap733a5fdf97213cff@mail.gmail.com> Message-ID: On Tuesday, August 4, 2009, Nicholas Efremov-Kendall wrote: > Hi Eric, > I'm still new to Jscript, can you clarify this a little? or point me in the right direction? Hi. I meant install the FireBug extension in FireFox and use it to add breakpoints in the code and watch variables. Hope this clarifies things... best,Nick > On Tue, Aug 4, 2009 at 7:47 AM, Eric Lemoine wrote: > On Monday, August 3, 2009, Nicholas Efremov-Kendall > wrote: >> Hi all,I've been trying to implement my gml as a layer.vector, as opposed to a layer.gml. I'm loading both into the browser with the different methods, and I can from firebug that the file is getting loaded, but it's not being displayed. Thus, if I re-sent my auto-center to sites2.events, it doesn't center at all. I'm not sure what going wrong here, I thought I'd followed the examples pretty closely. Thanks (again) in advance. >> //loads fine?var ? ? ?sites = new OpenLayers.Layer.GML ( >> ? ? ? ? ? ? ? "Archaeological Sites", "data/siteswatr.gml", >> ? ? ? ? ? ? ? { >> ? ? ? ? ? ? ? style: {pointRadius: 2.5}, >> ? ? ? ? ? ? ? projection: new OpenLayers.Projection("EPSG:4326"), >> ? ? ? ? ? ? ? format: OpenLayers.Format.GML, >> ? ? ? ? ? ? ? } >> ? ? ? ? ? ? ? ); >> ? ? ? map.addLayer(sites); >> ?// loads into browser but not displayed. >> ? ? ? ? ? ? ? var sites2 = new OpenLayers.Layer.Vector ( >> ? ? ? ? ? ? ? "sites2", {projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})}); >> ? ? ? ? ? ? ? map.addLayer(sites2); > > Your code looks correct to me. The Fixed strategy empties the layer > before adding features into it, which could explain why you see one > set of features only. I'd recommend adding a break point in the fixed > strategy's merge() method to understand what's going on. > >> >> >> > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From n.e.kendall at gmail.com Tue Aug 4 15:37:00 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Problem with Layer.vector In-Reply-To: References: <33fd44f90908031013g787eede0w6240020358daea08@mail.gmail.com> <33fd44f90908041029u5eae144ap733a5fdf97213cff@mail.gmail.com> Message-ID: <33fd44f90908041237m7eda71a2pb8822590677f270e@mail.gmail.com> Hi Eric, Yes, somewhat. On Tue, Aug 4, 2009 at 10:29 PM, Eric Lemoine wrote: > On Tuesday, August 4, 2009, Nicholas Efremov-Kendall > wrote: > > Hi Eric, > > I'm still new to Jscript, can you clarify this a little? or point me in > the right direction? > > Hi. I meant install the FireBug extension in FireFox and use it to add > breakpoints in the code and watch variables. Hope this clarifies > things... > > > > best,Nick > > On Tue, Aug 4, 2009 at 7:47 AM, Eric Lemoine < > eric.lemoine@camptocamp.com> wrote: > > On Monday, August 3, 2009, Nicholas Efremov-Kendall > > wrote: > >> Hi all,I've been trying to implement my gml as a layer.vector, as > opposed to a layer.gml. I'm loading both into the browser with the different > methods, and I can from firebug that the file is getting loaded, but it's > not being displayed. Thus, if I re-sent my auto-center to sites2.events, it > doesn't center at all. I'm not sure what going wrong here, I thought I'd > followed the examples pretty closely. Thanks (again) in advance. > >> //loads fine var sites = new OpenLayers.Layer.GML ( > >> "Archaeological Sites", "data/siteswatr.gml", > >> { > >> style: {pointRadius: 2.5}, > >> projection: new OpenLayers.Projection("EPSG:4326"), > >> format: OpenLayers.Format.GML, > >> } > >> ); > >> map.addLayer(sites); > >> // loads into browser but not displayed. > >> var sites2 = new OpenLayers.Layer.Vector ( > >> "sites2", {projection: map.displayProjection, strategies: > [new OpenLayers.Strategy.Fixed()], protocol: new > OpenLayers.Protocol.HTTP({url: "data/siteswatr.gml", format: [new > OpenLayers.Format.GML()]})}); > >> map.addLayer(sites2); > > > > Your code looks correct to me. The Fixed strategy empties the layer > > before adding features into it, which could explain why you see one > > set of features only. I'd recommend adding a break point in the fixed > > strategy's merge() method to understand what's going on. > > > >> > >> > >> > > > > -- > > Eric Lemoine > > > > Camptocamp France SAS > > Savoie Technolac, BP 352 > > 73377 Le Bourget du Lac, Cedex > > > > Tel : 00 33 4 79 44 44 96 > > Mail : eric.lemoine@camptocamp.com > > http://www.camptocamp.com > > > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/d7ca39da/attachment.html From hagen1113 at yahoo.com Tue Aug 4 19:08:12 2009 From: hagen1113 at yahoo.com (Raul David Orozco) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Select layer style Message-ID: <763790.76715.qm@web51412.mail.re2.yahoo.com> I'm here again asking for help. I need to create somekind of style selector for my layers, I've an style associated for each layer and I want to make possible associate more than one style to a layer, but I don't know if with OL I can send some tag in GetMap request to indicate to the WMS server which style to use with the layer. Thanks a lot again to anyone who can help me. ____________________________________________________________________________________ ?Obt?n la mejor experiencia en la web! Descarga gratis el nuevo Internet Explorer 8. http://downloads.yahoo.com/ieak8/?l=e1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/93a4e781/attachment.html From petedawn at gmail.com Tue Aug 4 21:43:32 2009 From: petedawn at gmail.com (Peter Dawn) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] KML write custom attribute Message-ID: <5dd88dab0908041843y4ea93d3ahed06e479789fee6@mail.gmail.com> Hi everyone, I am using open layers to write to kml. I am able to successfully write to a 'Description' attribute as its already in KML. But if I need to introduce a new attribute like 'Info', I am unable to write to it using open layer. I would expected, since KML is just XML it would allow me to create a custom attribute. So if I use, kmlFormater.write(features); This writes to just description attribute. If I create my own then it doesn't. Does anybody know if there is a work around this. Thanks. From eric.lemoine at camptocamp.com Wed Aug 5 00:38:32 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Select layer style In-Reply-To: <763790.76715.qm@web51412.mail.re2.yahoo.com> References: <763790.76715.qm@web51412.mail.re2.yahoo.com> Message-ID: On Wednesday, August 5, 2009, Raul David Orozco wrote: > I'm here again asking for help. > I need to create somekind of style selector for my layers, I've an style associated for each layer and I want to make possible associate more than one style to a layer, but I don't know if with OL I can send some tag in GetMap request to indicate to the WMS server which style to use with the layer. Thanks a lot again to anyone who can help me. Hi. Yoy can provide (named) styles the same way you provide layers: new OpenLayers.Layer.WMS("name", url, { layers: "layername", styles: "stylename" }); Hope this helps, > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Wed Aug 5 00:41:44 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Select layer style In-Reply-To: References: <763790.76715.qm@web51412.mail.re2.yahoo.com> Message-ID: On Wednesday, August 5, 2009, Eric Lemoine wrote: > On Wednesday, August 5, 2009, Raul David Orozco wrote: >> I'm here again asking for help. >> I need to create somekind of style selector for my layers, I've an style associated for each layer and I want to make possible associate more than one style to a layer, but I don't know if with OL I can send some tag in GetMap request to indicate to the WMS server which style to use with the layer. Thanks a lot again to anyone who can help me. > > Hi. Yoy can provide (named) styles the same way you provide layers: > > new OpenLayers.Layer.WMS("name", url, { > ? ?layers: "layername", styles: "stylename" > }); And if you want to change style afterwards do layer.mergeNewParams({styles: "newstylename"}); -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From bicphuongonline at yahoo.com Wed Aug 5 00:58:03 2009 From: bicphuongonline at yahoo.com (Mr. Bic Phuong) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Map not show in Overviewmap Message-ID: <18058.89990.qm@web35101.mail.mud.yahoo.com> Dear OpenLayers members and developers, I hope you can help me to solve this problem of overviewmap: This is my map: ________________________________________________ var mainMapOptions = { ??? ??? ??? maxExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090), ??? ??? ??? maxResolution: 585, ??? ??? ??? projection:"EPSG:4756", ??? ??? ??? units: "m", ??? ??? ??? tilesize: new OpenLayers.Size(256,256), ??? ??? ??? numZoomLevels: 11, ??? ??? ??? controls:[] ??? ??? }; ??? ??? map = new OpenLayers.Map(document.getElementById('map'),mainMapOptions); ??????? var base = new OpenLayers.Layer("Lop nen",{isBaseLayer: true, displayInLayerSwitcher: false}); ???? ?? map.addLayer(base); ??????? alayer = new OpenLayers.Layer.WMS("base layer", wms_host1,{layers:'stmstest',format: 'image/png', transparent: true}); __________________________________________ and this is my overviewmap: __________________________________________ var overviewOptions = { ??? ??? ?? maxExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090), ?????????? restrictedExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090), ?????????? maxResolution: 585, ??? ??? ?? units: 'm', ??? ??? ?? layers: [alayer], ??? ??? ?? tilesize: new OpenLayers.Size(256,256), ?????????? projection: "EPSG:4756", ?????????? numZoomLevels: 11}; ??? ??? var ovv = new OpenLayers.Control.OverviewMap({mapOptions: overviewOptions}) ??? ??? map.addControl(ovv); __________________________________________ The problem is: no map in overviewmap control. I read many posts but none of them help me. This link: http://n2.nabble.com/Problems-with-Overviewmap-td2861501.html#a2861501 is good news but no information for details Thanks for your attention! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090804/11e81ead/attachment.html From e.leoni at gmail.com Wed Aug 5 01:27:36 2009 From: e.leoni at gmail.com (Eduardo Leoni) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] simple maps Message-ID: Hello - I wonder if anyone here knows of a wms service with simple maps (e.g. political boundaries and place names only.) The http://labs.metacarta.com/wms service looks fine when zoomed out, but has too many features (such as rivers and lakes) when zoomed in. Thanks! This is great software, and I am having a blast. -Eduardo From eric.lemoine at camptocamp.com Wed Aug 5 02:13:40 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Map not show in Overviewmap In-Reply-To: <18058.89990.qm@web35101.mail.mud.yahoo.com> References: <18058.89990.qm@web35101.mail.mud.yahoo.com> Message-ID: Hi. Try to give the overview map a clone of aLayer (aLayer.clone()). Hope this helps, On Wednesday, August 5, 2009, Mr. Bic Phuong wrote: > > Dear OpenLayers members and developers, > > I hope you can help me to solve this problem of overviewmap: > > This is my map: > ________________________________________________ > var mainMapOptions = { > ??? ??? ??? maxExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090), > ??? ??? ??? maxResolution: 585, > ??? ??? ??? projection:"EPSG:4756", > ??? ??? ??? units: "m", > ??? ??? ??? tilesize: new OpenLayers.Size(256,256), > ??? ??? ??? numZoomLevels: 11, > ??? ??? ??? controls:[] > ??? }; > ??? ??? map = new OpenLayers.Map(document.getElementById('map'),mainMapOptions); > ??????? var base = new OpenLayers.Layer("Lop nen",{isBaseLayer: true, displayInLayerSwitcher: false}); > ???? ?? map.addLayer(base); > ??????? alayer = new OpenLayers.Layer.WMS("base layer", wms_host1,{layers:'stmstest',format: 'image/png', transparent: true}); > __________________________________________ > > and this is my overviewmap: > > __________________________________________ > var overviewOptions = > { > ??? ??? ?? maxExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090), > ?????????? restrictedExtent: new OpenLayers.Bounds(565954.632,1143573.7,643612.041,1236513.090), > ?????????? maxResolution: 585, > ??? ??? ?? units: 'm', > ??? ??? ?? layers: [alayer], > ??? ??? ?? tilesize: new OpenLayers.Size(256,256), > ?????????? projection: "EPSG:4756", > ?????????? numZoomLevels: 11}; > ??? ??? var ovv = new OpenLayers.Control.OverviewMap({mapOptions: overviewOptions}) > map.addControl(ovv); > __________________________________________ > > The problem is: no map in overviewmap control. > > I read many posts but none of them help me. This link: > > http://n2.nabble.com/Problems-with-Overviewmap-td2861501.html#a2861501 > > is good news but no information for details > > Thanks for your attention! > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From bicphuongonline at yahoo.com Wed Aug 5 03:37:00 2009 From: bicphuongonline at yahoo.com (Mr. Bic Phuong) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Map not show in Overviewmap Message-ID: <430359.20969.qm@web35105.mail.mud.yahoo.com> Merci Eric, But that's not working. Please help me ! --- On Wed, 8/5/09, Eric Lemoine wrote: From: Eric Lemoine Subject: Re: [OpenLayers-Users] Map not show in Overviewmap To: "Mr. Bic Phuong" Cc: users@openlayers.org Date: Wednesday, August 5, 2009, 1:13 PM Hi. Try to give the overview map a clone of aLayer (aLayer.clone()). Hope this helps, Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090805/d0775e65/attachment.html From bicphuongonline at yahoo.com Wed Aug 5 03:56:07 2009 From: bicphuongonline at yahoo.com (Mr. Bic Phuong) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Map not show in Overviewmap In-Reply-To: Message-ID: <809893.74793.qm@web35103.mail.mud.yahoo.com> Merci Eric, But that's not working. Please help me ! --- On Wed, 8/5/09, Eric Lemoine wrote: From: Eric Lemoine Subject: Re: [OpenLayers-Users] Map not show in Overviewmap To: "Mr. Bic Phuong" Cc: users@openlayers.org Date: Wednesday, August 5, 2009, 1:13 PM Hi. Try to give the overview map a clone of aLayer (aLayer.clone()). Hope this helps, Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090805/74c5cce9/attachment.html From adrian_gh.popa at romtelecom.ro Wed Aug 5 04:00:07 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a different popup on click. [SOLVED] In-Reply-To: <4A76D414.805@mapgears.com> References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com> Message-ID: <4A793C07.9060105@romtelecom.ro> Following Alexandre's suggestion, here's what I did: ... //in init() map.addLayer(markers); //add the main select (for regular popups) select = new OpenLayers.Control.SelectFeature(markers, {toggle:true, clickout: true}); markers.events.on({ "featureselected": onMarkerSelect, "featureunselected": onMarkerUnselect}); //add the second select for tooltips: var highlightCtrl = new OpenLayers.Control.SelectFeature(markers, { hover: true, highlightOnly: true, renderIntent: "temporary", eventListeners: { featurehighlighted: tooltipSelect, featureunhighlighted: tooltipUnselect } }); //the order in which you add these lines seems to matter! map.addControl(highlightCtrl); map.addControl(select); highlightCtrl.activate(); select.activate(); ...//support functions var lastFeature = null; var tooltipPopup = null; function tooltipSelect(event){ var feature = event.feature; var selectedFeature = feature; //if there is already an opened details window, don\'t draw the tooltip if(feature.popup != null){ return; } //if there are other tooltips active, destroy them if(tooltipPopup != null){ map.removePopup(tooltipPopup); tooltipPopup.destroy(); if(lastFeature != null){ delete lastFeature.popup; tooltipPopup = null; } } lastFeature = feature; var tooltipPopup = new OpenLayers.Popup("activetooltip", feature.geometry.getBounds().getCenterLonLat(), new OpenLayers.Size(80,12), " "+feature.attributes.name, true ); //this is messy, but I'm not a CSS guru tooltipPopup.contentDiv.style.backgroundColor='ffffcb'; tooltipPopup.closeDiv.style.backgroundColor='ffffcb'; tooltipPopup.contentDiv.style.overflow='hidden'; tooltipPopup.contentDiv.style.padding='3px'; tooltipPopup.contentDiv.style.margin='0'; tooltipPopup.closeOnMove = true; tooltipPopup.autoSize = true; feature.popup = tooltipPopup; map.addPopup(tooltipPopup); } function tooltipUnselect(event){ var feature = event.feature; if(feature != null && feature.popup != null){ map.removePopup(feature.popup); feature.popup.destroy(); delete feature.popup; tooltipPopup = null; lastFeature = null; } } function onMarkerSelect(event) { //unselect any previous selections tooltipUnselect(event); var feature = event.feature; var selectedFeature = feature; var popup = new OpenLayers.Popup.FramedCloud("activeAlarm", feature.geometry.getBounds().getCenterLonLat(), new OpenLayers.Size(100,100), "Loading...", null, true, onMarkerPopupClose ); feature.popup = popup; popup.setOpacity(0.7); map.addPopup(popup); //call ajax to get the data loadDetails(feature.attributes.description); } function onMarkerUnselect(event) { var feature = event.feature; if(feature.popup) { map.removePopup(feature.popup); feature.popup.destroy(); delete feature.popup; } } function onMarkerPopupClose(evt) { select.unselectAll(); } I hope this helps others trying to add this feature. Thanks again for your help. Regards, Adrian Alexandre Dube wrote: > Hi Adrian, > > Take a look at this example (1). You can use 2 SelectFeature > controls for what you need, one with hover:true and > highlightOnly:true, the other with hover false. The first one won't > actually select the feature and you can register 3 kinds of > "highlight" events (see the source) to display your small div/popup. > > Hope this helps, > > Alexandre > > (1) http://openlayers.org/dev/examples/highlight-feature.html > > Adrian Popa wrote: >> Hello everyone, >> >> This is sort of a repeat message of "Re: [OpenLayers-Users] >> Labels/Tooltips on mouse over a Vector layer" - but with a slightly >> different idea. >> >> Problem: I want to display a small div/popup with the marker's name >> when the user hovers his mouse over the location, and I want to >> display a bigger popup when the user actually clicks on the location. >> >> Current status: >> * I can use {hover: true} to register >> featureselected/featureunselected when I hover over a marker instead >> on when I click on the maker. >> * I haven't found any events that could differentiate between hover >> and click >> >> I'm thinking I could register my select control with hover: true and >> allow featureselected to execute the same function for both when I >> click on the makrer as well as when I hover over the marker. I would >> like to know if there's any way to find out in the event inside the >> function if the user clicked or not his mouse. Depending on this, I >> would show one popup or the other. >> >> Something like: >> >> select = new OpenLayers.Control.SelectFeature(markers, >> {clickout:true, hover:true}); >> markers.events.on({ "featureselected": onMarkerSelect, >> "featureunselected": onMarkerUnselect, "visibilitychanged": >> onMarkerToggle }); >> map.addControl(select); >> select.activate(); >> >> function onMarkerSelect(event){ >> var feature = event.feature; >> //find out if the user clicked or not >> var clicked = event.*findAWayToSeeIfTheUserClicked()*; >> if(clicked){ >> //show larger popup >> } >> else{ >> //show smaller popup >> } >> } >> >> Suggestions are welcome. >> >> Thanks, >> Adrian >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- --- Adrian Popa NOC Division Network Engineer Divizia Centrul National de Operare Retea Departament Transport IP & Metro Compartiment IP Core & Backbone Phone: +40 21 400 3099 From arbolito at gmail.com Wed Aug 5 05:14:12 2009 From: arbolito at gmail.com (Albert) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Generate image Message-ID: <1249463652.13144.8.camel@pirimpompito-laptop> Hi! I'm trying to generate an image of a map that has a WMS layer and an OpenLayers.Layer.Vector of features that are markers. I followed the "Tile stitching" method in http://trac.openlayers.org/wiki/Printing. The problem is that i can generate an image of the WMS layer, but the markers are not showing as they belong to a layer that is not tiled. Anyone has any idea of how to do this? Thanks! Albert Batiste. From bartvde at osgis.nl Wed Aug 5 05:16:51 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Generate image In-Reply-To: <1249463652.13144.8.camel@pirimpompito-laptop> References: <1249463652.13144.8.camel@pirimpompito-laptop> Message-ID: <59033.145.50.39.11.1249463811.squirrel@webmail.hostingdiscounter.nl> Try out the MapFish print service. Best regards, Bart > Hi! I'm trying to generate an image of a map that has a WMS layer and an > OpenLayers.Layer.Vector of features that are markers. I followed the > "Tile stitching" method in http://trac.openlayers.org/wiki/Printing. The > problem is that i can generate an image of the WMS layer, but the > markers are not showing as they belong to a layer that is not tiled. > Anyone has any idea of how to do this? > Thanks! > Albert Batiste. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From bartvde at osgis.nl Wed Aug 5 05:33:49 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Generate image In-Reply-To: <1249464495.13144.10.camel@pirimpompito-laptop> References: <1249463652.13144.8.camel@pirimpompito-laptop> <59033.145.50.39.11.1249463811.squirrel@webmail.hostingdiscounter.nl> <1249464495.13144.10.camel@pirimpompito-laptop> Message-ID: <19597.145.50.39.11.1249464829.squirrel@webmail.hostingdiscounter.nl> Hi, the print service can be used without MapFish client, it is fed by JSON. The MapFish PrintProtocol is the communication layer you can use. But it is not required. Best regards, Bart > But in that case i would have to change all my application to MapFish, > wouldn't I? > Thanks, > Albert Batiste. > > El mi??, 05-08-2009 a las 11:16 +0200, bartvde@osgis.nl escribi??: >> Try out the MapFish print service. >> >> Best regards, >> Bart >> >> > Hi! I'm trying to generate an image of a map that has a WMS layer and >> an >> > OpenLayers.Layer.Vector of features that are markers. I followed the >> > "Tile stitching" method in http://trac.openlayers.org/wiki/Printing. >> The >> > problem is that i can generate an image of the WMS layer, but the >> > markers are not showing as they belong to a layer that is not tiled. >> > Anyone has any idea of how to do this? >> > Thanks! >> > Albert Batiste. >> > >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> >> > > From patzke at geoinformationsdienst.de Wed Aug 5 07:15:21 2009 From: patzke at geoinformationsdienst.de (Fabian Patzke) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Adding Feature to WFS in Vector Layer / Copying Features Message-ID: Hi list, I try to build a copy function so that a user can select some features from a WFS and copy them to another. My WFS are not normal WFS Layers they are build in Vector Layers wfsLayer [layerArray[j].name] = new OpenLayers.Layer.Vector ( ... { strategies: [ new OpenLayers.Strategy.Fixed({preload:false}), new OpenLayers.Strategy.Save({ ... ], projection: new OpenLayers.Projection("EPSG:31467"), protocol: new OpenLayers.Protocol.WFS({...}) }, ... ); I made a function to select features from a WFS, these features are temporarily stored in a normal Vector layer ("select"). This function is build after: http://www.openlayers.org/dev/examples/getfeature-wfs.html Another function is called after the end of selecting features, the user has to end selecting manually. This should be the copy function. The function should take all features from the "select" layer and copy them over to the wfsLayer from above. That is all I have so far: function copySelectedFeatures (wfsLayer){ features = select.features; for (i=0;i Message-ID: Fabian Patzke writes: If it helps this is the POST request made to my WFS: And the Response: A working Transaction POST request (after drawing a new feature): So there must something wrong with commiting the newly added feature, I guess :) 3477069.1826687,5883961.3605044 3476363.6274941,5883961.3605044 3522224.7138402,5827516.9465399 3559619.1380917,5892428.0225991 3477069.1826687,5883961.3605044 And working response: From kenny at xarex.com Wed Aug 5 08:04:33 2009 From: kenny at xarex.com (Kenny France) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] multiple layers Message-ID: <01aa01ca15c4$e5675c10$b0361430$@com> Hi guys, I have 3 layers; marker layer 1 marker layer 2 vector layer Now for some reason, if I use the drawing toolbar on the vector layer, then my markers on the marker layer cant be clicked anymore L Is there a way i can make the marker layer active again i think this is the problem Thanks K- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090805/2db6e77b/attachment.html From adube at mapgears.com Wed Aug 5 08:05:33 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] KML write custom attribute In-Reply-To: <5dd88dab0908041843y4ea93d3ahed06e479789fee6@mail.gmail.com> References: <5dd88dab0908041843y4ea93d3ahed06e479789fee6@mail.gmail.com> Message-ID: <4A79758D.1080901@mapgears.com> Hi Peter, How do you add your new 'Info' attribute to your feature ? Please, share some of your code. Regards, Alexandre Peter Dawn wrote: > Hi everyone, > > I am using open layers to write to kml. I am able to successfully > write to a 'Description' attribute as its already in KML. > > But if I need to introduce a new attribute like 'Info', I am unable to > write to it using open layer. I would expected, since KML is just XML > it would allow me to create a custom attribute. > > So if I use, > kmlFormater.write(features); > This writes to just description attribute. > > If I create my own then it doesn't. Does anybody know if there is a > work around this. > > Thanks. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From jlacroix at mapgears.com Wed Aug 5 09:19:14 2009 From: jlacroix at mapgears.com (Julien-Samuel Lacroix) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Right click on selected feature In-Reply-To: <4A7860AD.3050006@gis3w.it> References: <4A7860AD.3050006@gis3w.it> Message-ID: <4A7986D2.2080807@mapgears.com> The Click handler in OpenLayers support the right click, but the SelectFeature control don't integrate this functionality. IMHO, you can modify the SelectFeature control to add this quite easily if you want to add that. Check the Navigation control for examples. Julien Walter Lorenzetti wrote: > Hi list, > > is possible to trig a Rightclick event on a selected feature? > > Thanks in advance > Walter > -- Julien-Samuel Lacroix Mapgears http://www.mapgears.com/ From mlernout at gmail.com Wed Aug 5 12:38:22 2009 From: mlernout at gmail.com (MattL) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Navigation + SelectFeature Message-ID: <1249490302391-3393324.post@n2.nabble.com> Hi, I would like to use SelectFeature as my map's default tool, but it appears to only allow mouse wheel zoom navigation. How can I get it to support DragPanning as well? Thanks, Matt -- View this message in context: http://n2.nabble.com/Navigation-%2B-SelectFeature-tp3393324p3393324.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mlernout at gmail.com Wed Aug 5 12:50:07 2009 From: mlernout at gmail.com (MattL) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Navigation + SelectFeature In-Reply-To: <1249490302391-3393324.post@n2.nabble.com> References: <1249490302391-3393324.post@n2.nabble.com> Message-ID: <1249491007682-3393416.post@n2.nabble.com> Silly me, I had set the box property to true. All's well now. MattL wrote: > > Hi, > > I would like to use SelectFeature as my map's default tool, but it appears > to only allow mouse wheel zoom navigation. How can I get it to support > DragPanning as well? > > Thanks, > Matt > -- View this message in context: http://n2.nabble.com/Navigation-%2B-SelectFeature-tp3393324p3393416.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Wed Aug 5 13:10:47 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Navigation + SelectFeature In-Reply-To: <1249491007682-3393416.post@n2.nabble.com> References: <1249490302391-3393324.post@n2.nabble.com> <1249491007682-3393416.post@n2.nabble.com> Message-ID: On Wednesday, August 5, 2009, MattL wrote: > > Silly me, I had set the box property to true. All's well now. Hi. FYI I've recently noticed that order matters, I bet the select control doesn't work if you do var s = new OpenLayers.Control.SelecFeature(...); var n = new OpenLayers.Control.Navigation(); map.addControl(s); s.activate(); map.addControl(n); This is because the navigation control's drag handler stops mousedown (stopDown is true). This is problematic if one has a toolbar with the nav control in a toggle group and wants the select control to be always activated. If you confirm that the select control does not work with the order used in the above code snippet I'll create a ticket. Cheers, > > > MattL wrote: >> >> Hi, >> >> I would like to use SelectFeature as my map's default tool, but it appears >> to only allow mouse wheel zoom navigation. How can I get it to support >> DragPanning as well? >> >> Thanks, >> Matt >> > > -- > View this message in context: http://n2.nabble.com/Navigation-%2B-SelectFeature-tp3393324p3393416.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From gregcorradini at gmail.com Wed Aug 5 15:21:23 2009 From: gregcorradini at gmail.com (Greg Corradini) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] point.transform FAIL Message-ID: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com> Hello, The following code works with other EPSG mercator projections. But I can't get it to transform my LonLat point into EPSG:26915. This made me think I didn't set up the proj4 file correctly -- maybe when I call "new OpenLayers.Projection("EPSG:26915")" it can't find it. However, my displayProjection is set using the same function to EPSG:26915 and all my WMS layers show up correctly. Any ideas? FireBug confirms that the function point.transform returns the exact same LonLat I passed in -- I end up south of Ghana in the ocean. Oh No! Thanks for your thoughts From ivan.grcic at geofoto.hr Wed Aug 5 16:58:15 2009 From: ivan.grcic at geofoto.hr (Ivan Grcic) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] multiple layers In-Reply-To: <01aa01ca15c4$e5675c10$b0361430$@com> References: <01aa01ca15c4$e5675c10$b0361430$@com> Message-ID: Hi, i guess draw control brings your vector layer to the top so it could be drawn on. you could register a function on draw control deactivate event, that would bring your marker layer back to top. drawControl.events.register('deactivate', drawControl, function(){ //here you can move your desired layer to top... //maybe this will do?? map.resetLayersZIndex(); //and activate selectControl again.. selectcontrol.activate(); }) hope it helps, cheers On 8/5/09, Kenny France wrote: > Hi guys, > > > > I have 3 layers; > > > > marker layer 1 > > marker layer 2 > > vector layer > > > > Now for some reason, if I use the drawing toolbar on the vector layer, then > my markers on the marker layer cant be clicked anymore L > > > > Is there a way i can make the marker layer active again i think this is the > problem > > > > Thanks > > > > K- > > -- Ivan Grcic From ivan.grcic at geofoto.hr Wed Aug 5 16:59:06 2009 From: ivan.grcic at geofoto.hr (Ivan Grcic) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] point.transform FAIL In-Reply-To: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com> References: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com> Message-ID: hi, you included proj4js right? On 8/5/09, Greg Corradini wrote: > Hello, > The following code works with other EPSG mercator projections. But I > can't get it to transform my LonLat point into EPSG:26915. This made > me think I didn't set up the proj4 file correctly -- maybe when I call > "new OpenLayers.Projection("EPSG:26915")" it can't find it. However, > my displayProjection is set using the same function to EPSG:26915 and > all my WMS layers show up correctly. Any ideas? FireBug confirms that > the function point.transform returns the exact same LonLat I passed in > -- I end up south of Ghana in the ocean. Oh No! > > Thanks for your thoughts > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From ivan.grcic at geofoto.hr Wed Aug 5 17:05:13 2009 From: ivan.grcic at geofoto.hr (Ivan Grcic) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] point.transform FAIL In-Reply-To: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com> References: <429320790908051221y4e0b2859yeb4b6b994369332@mail.gmail.com> Message-ID: hi, i remembered i had some little problems with proj4js.. i just remember i had to include EPSG:26915 definition in seperate file in proj4js\lib\defs dir, or in the code like: Proj4js.defs["EPSG:32632"]="+title=UTM 32N +proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs "; and then call new Proj4js.Proj('EPSG:32632'); before using it. and it worked fine then hope it helps, cheers On 8/5/09, Greg Corradini wrote: > Hello, > The following code works with other EPSG mercator projections. But I > can't get it to transform my LonLat point into EPSG:26915. This made > me think I didn't set up the proj4 file correctly -- maybe when I call > "new OpenLayers.Projection("EPSG:26915")" it can't find it. However, > my displayProjection is set using the same function to EPSG:26915 and > all my WMS layers show up correctly. Any ideas? FireBug confirms that > the function point.transform returns the exact same LonLat I passed in > -- I end up south of Ghana in the ocean. Oh No! > > Thanks for your thoughts > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From petedawn at gmail.com Wed Aug 5 21:18:09 2009 From: petedawn at gmail.com (Peter Dawn) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] OpenLayer SLD does not display labels Message-ID: <5dd88dab0908051818q5681a4b5t110a74f926a82952@mail.gmail.com> Hi all, I am trying to display labels on my map. But when I turn on the labels, all labels do not show up. When I zoom in further labels start showing up. What I need to do is, display all labels at the default scale, even if it looks all cluttered. There is a MinScaleDenominator and MaxScaleDenominator flag and I tried to tweak them. Even if I set the max scale to really high, all labels do not show up. Can somebody tell me if there is a way to do display all labels irrespective of the scale. Thanks. From bicphuongonline at yahoo.com Wed Aug 5 21:44:35 2009 From: bicphuongonline at yahoo.com (Mr. Bic Phuong) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] How to make web map faster Message-ID: <241626.39069.qm@web35108.mail.mud.yahoo.com> Dear OpenLayers Developers and Users, Currently I'm using MapServer and OpenLayers for my web map which has: - 1 tilecache layer (base map) - 17 WMS layer So there are 2 big problems: - There are 17 connections to ArcSDE Oracle in the map file. How can I use 01 connection for all layers ? - It's too slow to load when visitors turn on more than 2 WMS layers, the tilecache layer is ok but WMS layers is two slow. I'm wondering whether there is any way to load a part of layer or something similar to make it faster? Thanks for your attention and your help is highly appreciated! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090805/4ab4062b/attachment.html From rahn at zhaw.ch Thu Aug 6 02:05:07 2009 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Scale text outside the map Message-ID: <3F643797A078EB4FB028800809680984016ED5D6@langouste.zhaw.ch> Hello list, I have another question. Perhaps somebody can help me. I try to realise a Sclae text. It should be something like this 1:25000. For this I use the Scale Control. var scale = new OpenLayers.Control.Scale({ div: document.getElementById("kartenElemente") }); map.addControl(scale); I want to place the Scaletext outside the map. For this I use the div Option. But it doesn't work. Can somebody please help me? Is there a possibility to place the control outside the map in an extra div? Thank you a lot for your help. Greetings Hanno Rahn ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090806/ae3b51a1/attachment.html From jansen at terrestris.de Thu Aug 6 03:11:33 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Scale text outside the map In-Reply-To: <3F643797A078EB4FB028800809680984016ED5D6@langouste.zhaw.ch> References: <3F643797A078EB4FB028800809680984016ED5D6@langouste.zhaw.ch> Message-ID: <4A7A8225.7010808@terrestris.de> Hi Hanno, you need to pass in two parameters to the constructor of OpenLayers.Control.Scale: 1. the div 2. the options-object In your case this should work: var scale = new OpenLayers.Control.Scale( document.getElementById("kartenElemente"), { // other options } ); map.addControl(scale); Regards, Marc Rahn Hanno (rahn) schrieb: > > Hello list, > > I have another question. Perhaps somebody can help me. > > I try to realise a Sclae text. It should be something like this > 1:25000. For this I use the Scale Control. > > var scale = new OpenLayers.Control.Scale({ > > div: document.getElementById("kartenElemente") > > }); > > map.addControl(scale); > > I want to place the Scaletext outside the map. For this I use the div > Option. But it doesn?t work. Can somebody please help me? Is there a > possibility to place the control outside the map in an extra div? > > Thank you a lot for your help. > > Greetings > > Hanno Rahn > > ------------------------------------------ > > Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik > > ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und > Nat?rliche Ressourcen > > Fachstelle Geoinformatik > > Gr?ental, Postfach CH-8820 W?denswil > > Tel +41 (0)58 934 5592 > > Fax +41 (0)58 934 5580 > > hanno.rahn@zhaw.ch > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From a.ratas at traffic-tim.de Thu Aug 6 03:12:58 2009 From: a.ratas at traffic-tim.de (Andris Ratas) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Scale text outside the map In-Reply-To: <3F643797A078EB4FB028800809680984016ED5D6@langouste.zhaw.ch> Message-ID: <8B525634-2C14-45D0-A0E3-0656FF08415B@traffic-tim.de> You don't even need a scale control for that. Just register with "zoomend" event of your map object and add the scale to any div element you need. map.events.register("zoomend", map, function () { document.getElementById('scale_div').innerHTML = map.getScale().toFixed(0); }); Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Rahn Hanno (rahn) Gesendet: Donnerstag, 6. August 2009 08:05 An: users@openlayers.org Betreff: [OpenLayers-Users] Scale text outside the map Hello list, I have another question. Perhaps somebody can help me. I try to realise a Sclae text. It should be something like this 1:25000. For this I use the Scale Control. var scale = new OpenLayers.Control.Scale({ div: document.getElementById("kartenElemente") }); map.addControl(scale); I want to place the Scaletext outside the map. For this I use the div Option. But it doesn't work. Can somebody please help me? Is there a possibility to place the control outside the map in an extra div? Thank you a lot for your help. Greetings Hanno Rahn ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090806/e4c0d7a8/attachment.html From jansen at terrestris.de Thu Aug 6 03:14:49 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] How to make web map faster In-Reply-To: <241626.39069.qm@web35108.mail.mud.yahoo.com> References: <241626.39069.qm@web35108.mail.mud.yahoo.com> Message-ID: <4A7A82E9.1070906@terrestris.de> Hi, the first question should be asked at the MapServer Userlist. as for the second, I cannot think of a way of preloading to gain speed, but maybe I am missing a point here. Regards, Marc Mr. Bic Phuong schrieb: > > > Dear OpenLayers Developers and Users, > > Currently I'm using MapServer and OpenLayers for my web map which has: > - 1 tilecache layer (base map) > - 17 WMS layer > > So there are 2 big problems: > > - There are 17 connections to ArcSDE Oracle in the map file. How can I > use 01 connection for all layers ? > > - It's too slow to load when visitors turn on more than 2 WMS layers, > the tilecache layer is ok but WMS layers is two slow. I'm wondering > whether there is any way to load a part of layer or something similar > to make it faster? > > Thanks for your attention and your help is highly appreciated! > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Diplom-Geograph Marc Jansen - Anwendungsentwickler - terrestris GmbH & Co. KG Irmintrudisstra?e 17 53111 Bonn Tel: ++49 (0)228 / 96 28 99 -53 Fax: ++49 (0)228 / 96 28 99 -57 Email: jansen@terrestris.de Web: http://terrestris.de Amtsgericht Bonn, HRA 6835 Komplement?rin: terrestris Verwaltungsgesellschaft mbH vertreten durch: Hinrich Paulsen, Till Adams From max.weidemann at freenet.de Thu Aug 6 04:26:39 2009 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] geometry collection Message-ID: <1249547199882-3396966.post@n2.nabble.com> Dear openlayers users and developers, I want to know if it is possible to show an geometry collection in an vector layer? If it is possible could anyone help me please with my code or tell me what is the right way for using the geometrycollection?? >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> OpenLayers Boxes Example

Boxes Example

Demonstrate marker and box type annotations on a map.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> The map is shown and the layer boxes is added, but there are no geometries shown. -- View this message in context: http://n2.nabble.com/geometry-collection-tp3396966p3396966.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jansen at terrestris.de Thu Aug 6 05:20:58 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] geometry collection In-Reply-To: <1249547199882-3396966.post@n2.nabble.com> References: <1249547199882-3396966.post@n2.nabble.com> Message-ID: <4A7AA07A.6020207@terrestris.de> Hi Max, It is possible to add Geometry Collections to Vectorlayers: var gc_geometry = new OpenLayers.Geometry.Collection( [ new OpenLayers.Geometry.Point( ... ), new OpenLayers.Geometry.LineString( ... ), new OpenLayers.Geometry.Polygon( ... ) // etc. ] ); var gc_feature = new OpenLayers.Feature.Vector( gc_geometry ); var vectorLayer = new OpenLayers.Layer.Vector( ... ) vectorLayer.addFeatures( [ gc_feature ] ); Regards, Marc Max Weidemann schrieb: > Dear openlayers users and developers, > > I want to know if it is possible to show an geometry collection in an vector > layer? > If it is possible could anyone help me please with my code or tell me what > is the right way for using the geometrycollection?? > > > > > OpenLayers Boxes Example > type="text/css" /> > > > > > > >

Boxes Example

> >
>
> >

> Demonstrate marker and box type annotations on a map. >

> >
> >
> > > > > > The map is shown and the layer boxes is added, but there are no geometries > shown. > -- Diplom-Geograph Marc Jansen - Anwendungsentwickler - terrestris GmbH & Co. KG Irmintrudisstra?e 17 53111 Bonn Tel: ++49 (0)228 / 96 28 99 -53 Fax: ++49 (0)228 / 96 28 99 -57 Email: jansen@terrestris.de Web: http://terrestris.de Amtsgericht Bonn, HRA 6835 Komplement?rin: terrestris Verwaltungsgesellschaft mbH vertreten durch: Hinrich Paulsen, Till Adams From max.weidemann at freenet.de Thu Aug 6 05:35:01 2009 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] geometry collection In-Reply-To: <4A7AA07A.6020207@terrestris.de> References: <1249547199882-3396966.post@n2.nabble.com> <4A7AA07A.6020207@terrestris.de> Message-ID: <1249551301773-3397253.post@n2.nabble.com> Marc Jansen-2 wrote: > > Hi Max, > > It is possible to add Geometry Collections to Vectorlayers: > > > var gc_geometry = new OpenLayers.Geometry.Collection( > [ > new OpenLayers.Geometry.Point( ... ), > new OpenLayers.Geometry.LineString( ... ), > new OpenLayers.Geometry.Polygon( ... ) > // etc. > ] > ); > > var gc_feature = new OpenLayers.Feature.Vector( gc_geometry ); > > var vectorLayer = new OpenLayers.Layer.Vector( ... ) > > vectorLayer.addFeatures( [ gc_feature ] ); > > Regards, > > Marc > Thanks Marc for that quick and very very helpfull answer. cheers Max -- View this message in context: http://n2.nabble.com/How-to-use-geometry-collection-tp3396966p3397253.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.freyre at hispeed.ch Thu Aug 6 05:53:38 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update Message-ID: <1249552418351-3397344.post@n2.nabble.com> Hi List! I have some datas in a PostgreSQL database. I recover datas trough geoserver via a vector layer with WFS protocol like it seems to be recommended. I can easily (after some efforts :D ) add or delete somes features but I am unable to update a feature... A xml sample that is posted to my geoserver : the_geom 538698.2299984342 182479.15984712465 puissance 125 rue COIN DE TERRE, Rue du num_apic 3974 id_comb 48/6 id_apic 141776 And the response (I put geoserver in verbose mode) : update error Details: org.geoserver.wfs.WFSException: update error at org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionResponse.java:49) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) My wfs declaration : var wfsLayer = new OpenLayers.Layer.Vector( 'lumin', { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy ], projection: new OpenLayers.Projection("EPSG:21781"), protocol: new OpenLayers.Protocol.WFS({ version: '1.1.0', srsName: 'EPSG:21781', url: 'http://localhost:8080/geoserver/wfs?strict=true', featureNS : 'http://www.openplans.org/topp', featureType: 'lumin', geometryName: 'the_geom', extractAttribute:true}) }); And when I modify some feature attributes, I am doing this: modifiedFeature.state = OpenLayers.State.UPDATE; Am I doing something wrong? -- View this message in context: http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3397344p3397344.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gary_wales at hotmail.com Thu Aug 6 06:37:26 2009 From: gary_wales at hotmail.com (gwales) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Help with getExtents() Message-ID: <1249555046491-3397508.post@n2.nabble.com> I am using Openlayers and OSM to show a GPX tracklog file and all loads well with the viewport updating to a best fit of the GPX data. I now need to get the extents of the map/layer in Lat/Lon to allow me to query a point layer via ajax and load local content as vector points. I can see I need the current bounds with a transform to get the four extents. I can't get past stage one, map.getExtents() or layer.getExtents() always return null and throw an error. Can anyone help? -- View this message in context: http://n2.nabble.com/Help-with-getExtents%28%29-tp3397508p3397508.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Thu Aug 6 06:42:49 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update In-Reply-To: <1249552418351-3397344.post@n2.nabble.com> References: <1249552418351-3397344.post@n2.nabble.com> Message-ID: Hi Jerome, Could it be the data? The invalidParameterValue exception in combination with the value 48/6 in the id_comb column looks a bit tricky to me. Perhaps the / needs to be encoded or escaped or so? Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Jerome Freyre Sent: Thursday, August 06, 2009 11:54 AM To: users@openlayers.org Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update Hi List! I have some datas in a PostgreSQL database. I recover datas trough geoserver via a vector layer with WFS protocol like it seems to be recommended. I can easily (after some efforts :D ) add or delete somes features but I am unable to update a feature... A xml sample that is posted to my geoserver : the_geom 538698.2299984342 182479.15984712465 puissance 125 rue COIN DE TERRE, Rue du num_apic 3974 id_comb 48/6 id_apic 141776 And the response (I put geoserver in verbose mode) : update error Details: org.geoserver.wfs.WFSException: update error at org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionR esponse.java:49) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abs tractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handl e(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS ervlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe rvlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor kServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet .java:511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan dler.java:1093) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharac terEncodingFilter.java:108) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan dler.java:1084) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt erChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterS ecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(Filte rSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt erChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTransl ationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt erChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter (AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt erChainProxy.java:275) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProce ssingFilter.java:174) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt erChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(H ttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt erChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:1 49) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java :98) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan dler.java:1084) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan dler.java:1084) at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.jav a:163) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan dler.java:1084) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan dler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:2 16) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav a:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j ava:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja va:450) My wfs declaration : var wfsLayer = new OpenLayers.Layer.Vector( 'lumin', { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy ], projection: new OpenLayers.Projection("EPSG:21781"), protocol: new OpenLayers.Protocol.WFS({ version: '1.1.0', srsName: 'EPSG:21781', url: 'http://localhost:8080/geoserver/wfs?strict=true', featureNS : 'http://www.openplans.org/topp', featureType: 'lumin', geometryName: 'the_geom', extractAttribute:true}) }); And when I modify some feature attributes, I am doing this: modifiedFeature.state = OpenLayers.State.UPDATE; Am I doing something wrong? -- View this message in context: http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3 397344p3397344.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From igrcic at gmail.com Thu Aug 6 08:09:04 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] OpenLayer SLD does not display labels In-Reply-To: <5dd88dab0908051818q5681a4b5t110a74f926a82952@mail.gmail.com> References: <5dd88dab0908051818q5681a4b5t110a74f926a82952@mail.gmail.com> Message-ID: hi, we are talking about WMS layer here right? If it is the case, then OpenLayers doesnt have anything to do with it, but your server (Geoserver or whatever youre using) that generates images, so you could find more info there http://geoserver.org/display/GEOSDOC/LabelingOptions and check: 10 cheers On Thu, Aug 6, 2009 at 3:18 AM, Peter Dawn wrote: > Hi all, > > I am trying to display labels on my map. But when I turn on the > labels, all labels do not show up. When I zoom in further labels start > showing up. > > What I need to do is, display all labels at the default scale, even if > it looks all cluttered. There is a MinScaleDenominator and > MaxScaleDenominator flag and I tried to tweak them. Even if I set the > max scale to really high, all labels do not show up. > > Can somebody tell me if there is a way to do display all labels > irrespective of the scale. > > Thanks. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From jerome.freyre at hispeed.ch Thu Aug 6 09:50:02 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update In-Reply-To: References: <1249552418351-3397344.post@n2.nabble.com> Message-ID: <1249566602523-3398368.post@n2.nabble.com> Hi Kris, It seems you are right... I tried to update only one column at time. It works for all column except those one: the_geom 538698.2299984342 182479.15984712465 EXCEPTION: org.xml.sax.SAXParseException: The prefix "gml" for element "gml:Point" is not bound. The prefix "gml" for element "gml:Point" is not bound. rue COIN DE TERRE, Rue du EXCEPTION: org.geoserver.wfs.WFSException: update error at org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionResponse.java:49) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) ..... Do you have an idea for those exception? Kris Geusebroek wrote: > > Hi Jerome, > > Could it be the data? The invalidParameterValue exception in combination > with the value 48/6 in the id_comb column looks a bit tricky to me. > Perhaps the / needs to be encoded or escaped or so? > > Cheers Kris > > > -- View this message in context: http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3397344p3398368.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gary_wales at hotmail.com Thu Aug 6 09:51:45 2009 From: gary_wales at hotmail.com (gwales) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Help with getExtents() In-Reply-To: <1249555046491-3397508.post@n2.nabble.com> References: <1249555046491-3397508.post@n2.nabble.com> Message-ID: <1249566705555-3398377.post@n2.nabble.com> gwales wrote: > > I can't get past stage one, map.getExtents() or layer.getExtents() always > return null and throw an error. > I Needed to wait for OSM layer to load so put a loadend event handler to catch the Extents. -- View this message in context: http://n2.nabble.com/Help-with-getExtents%28%29-tp3397508p3398377.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From taviroquai at gmail.com Thu Aug 6 10:32:12 2009 From: taviroquai at gmail.com (taviroquai) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] Vectors layer over Google Message-ID: <1249569132508-3398605.post@n2.nabble.com> Hi all! I'm using the sphericalMercator has recomended in http://trac.openlayers.org/wiki/SphericalMercator What am i doing wrong? It should be simple like this: map = new OpenLayers.Map('map'); map.addControl(new OpenLayers.Control.LayerSwitcher()); var base = new OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP, numZoomLevels: 20, sphericalMercator: true} ); var wvect = new OpenLayers.Layer.GML("World Borders", "doc.kml", { format: OpenLayers.Format.KML, formatOptions: { extractStyles: true, extractAttributes: true, maxDepth: 20 } }); map.addLayers([base, wvect]); map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 3); The doc.kml i got from http://bbs.keyhole.com/ubb/ubbthreads.php?ubb=showflat&Number=300541&page=all I would like to click on a contry and pop up information from the doc.kml. Thanks in advance. Marco -- View this message in context: http://n2.nabble.com/Vectors-layer-over-Google-tp3398605p3398605.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From aaime at opengeo.org Thu Aug 6 10:40:28 2009 From: aaime at opengeo.org (Andrea Aime) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update In-Reply-To: <1249566602523-3398368.post@n2.nabble.com> References: <1249552418351-3397344.post@n2.nabble.com> <1249566602523-3398368.post@n2.nabble.com> Message-ID: <4A7AEB5C.607@opengeo.org> Jerome Freyre ha scritto: > Hi Kris, > > It seems you are right... I tried to update only one column at time. > > It works for all column except those one: > > the_geom > > > 538698.2299984342 182479.15984712465 > > > > EXCEPTION: > org.xml.sax.SAXParseException: The prefix "gml" for element > "gml:Point" is not bound. > The prefix "gml" for element "gml:Point" is not bound. > > > rue > COIN DE TERRE, Rue du > > EXCEPTION: > org.geoserver.wfs.WFSException: update error > at > org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionResponse.java:49) > at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712) > at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216) > at > org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) > at > org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) > at > org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) > at > org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) > ..... > > Do you have an idea for those exception? It would seem the gml prefix has no declaration in the document? In fact: the_geom 538698.2299984342 182479.15984712465 does not contain xmlns:gml="http://www.opengis.net/gml". Yet, I guess it should be imported via the WFS declaration. Btw, which version of GeoServer and OpenLayers are you using? Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. From jerome.freyre at hispeed.ch Thu Aug 6 10:47:32 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:43 2010 Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update In-Reply-To: <4A7AEB5C.607@opengeo.org> References: <1249552418351-3397344.post@n2.nabble.com> <1249566602523-3398368.post@n2.nabble.com> <4A7AEB5C.607@opengeo.org> Message-ID: <1249570052514-3398711.post@n2.nabble.com> Hi Andrea, I am using GeoServer 1.7.5 (for Mac) and OL 2.8 So I juste have to had the declaration xmlns:gml="http://www.opengis.net/gml" in the tag? aaime wrote: > > It would seem the gml prefix has no declaration in the document? > > In fact: > > version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > the_geom > > srsName="http://www.opengis.net/gml/srs/epsg.xml#EPSG:21781"> > 538698.2299984342 182479.15984712465 > > > > does not contain xmlns:gml="http://www.opengis.net/gml". > > Yet, I guess it should be imported via the WFS declaration. > Btw, which version of GeoServer and OpenLayers are you using? > > Cheers > Andrea > > -- > Andrea Aime > OpenGeo - http://opengeo.org > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3397344p3398711.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From aaime at opengeo.org Thu Aug 6 11:05:42 2009 From: aaime at opengeo.org (Andrea Aime) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update In-Reply-To: <1249570052514-3398711.post@n2.nabble.com> References: <1249552418351-3397344.post@n2.nabble.com> <1249566602523-3398368.post@n2.nabble.com> <4A7AEB5C.607@opengeo.org> <1249570052514-3398711.post@n2.nabble.com> Message-ID: <4A7AF146.5070400@opengeo.org> Jerome Freyre ha scritto: > Hi Andrea, > > I am using GeoServer 1.7.5 (for Mac) and OL 2.8 > > So I juste have to had the declaration > xmlns:gml="http://www.opengis.net/gml" in the tag? The error message seems to point there, and in fact the GeoServer sample transaction calls do have that declaration. Try it, eventually just modify manually the request and submit it before trying to find your way into the OL code. Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. From Steve.Toutant at inspq.qc.ca Thu Aug 6 11:11:57 2009 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Scale line accuracy In-Reply-To: <4A718A57.8060107@mapgears.com> Message-ID: Hi, The projection of my OL map is in epsg:900913 and displayProjection is epsg:4326. It seems that scaleLine control and measure control do not return good values. The scaleline value and the measure are always higher than expected. For the measure control I set geodesic: true and now the results are good. But I don't understand why I should specify geodesic: true if my map is projected? For the scaleLine I can't figure out why the scale is not good. Ideas or extra info on these controls would be appreciated. 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.toutant@inspq.qc.ca http://www.inspq.qc.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090806/c4b8ab04/attachment.html From CHRISTOPHER.M.HEIDT at saic.com Thu Aug 6 13:32:59 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Vectors layer over Google References: <1249569132508-3398605.post@n2.nabble.com> Message-ID: <1053B20F24D85F41B57F168351684E22039DF6FE@0015-its-exmb04.us.saic.com> http://docs.openlayers.org/library/spherical_mercator.html read this over paying special notice to the projection transformation sections. -----Original Message----- From: users-bounces@openlayers.org on behalf of taviroquai Sent: Thu 8/6/2009 10:32 AM To: users@openlayers.org Subject: [OpenLayers-Users] Vectors layer over Google Hi all! I'm using the sphericalMercator has recomended in http://trac.openlayers.org/wiki/SphericalMercator What am i doing wrong? It should be simple like this: map = new OpenLayers.Map('map'); map.addControl(new OpenLayers.Control.LayerSwitcher()); var base = new OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP, numZoomLevels: 20, sphericalMercator: true} ); var wvect = new OpenLayers.Layer.GML("World Borders", "doc.kml", { format: OpenLayers.Format.KML, formatOptions: { extractStyles: true, extractAttributes: true, maxDepth: 20 } }); map.addLayers([base, wvect]); map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 3); The doc.kml i got from http://bbs.keyhole.com/ubb/ubbthreads.php?ubb=showflat&Number=300541&page=all I would like to click on a contry and pop up information from the doc.kml. Thanks in advance. Marco -- View this message in context: http://n2.nabble.com/Vectors-layer-over-Google-tp3398605p3398605.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090806/e65f9181/attachment.html From arevaco90 at yahoo.es Thu Aug 6 14:44:45 2009 From: arevaco90 at yahoo.es (=?Cp1252?Q?Juan_Ar=E9valo?=) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] CGI and Tomcat Message-ID: <1249584285317-3400100.post@n2.nabble.com> Hi all, I am making some progress setting up a WFS-T, it seems that my code works since I don??t get any error, but the layer doesn't display in the map. I have read that this problem can be solved by setting the Proxy Host, however I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for Apache but not for Tomcat) Does anyone have any ideas on how to solve it? I??ve solved my previous problem with the WFS constructor. Thanks Pierre and Eric for your help!! Cheers! Juan -- View this message in context: http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3400100.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tommytomorow at msn.com Thu Aug 6 18:31:15 2009 From: tommytomorow at msn.com (tommy408) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Overlay layer jump durring pan Message-ID: <1249597875535-3401129.post@n2.nabble.com> My overlay layer keeps jumping around when I pan the map. It only does it on Firefox. I've tried 2.6, 2.7 and 2.8. All of them do it. Anyone know how I can fix it? It's probably somewhere in Image.js base_layer = new OpenLayers.Layer.WMS( "Geoserver layers - Tiled", "http://localhost:8080/geoserver/wms", { height: '479', width: '800', layers: 'topp:custom', styles: '', srs: 'EPSG:4326', format: format, tiled: 'true', tilesOrigin : "0,0" }, {transitionEffect: 'resize'} ); overlay_layer = new OpenLayers.Layer.WMS( "Geoserver layers - Untiled", "http://localhost:8080/geoserver/wms", { height: '479', width: '800', layers: 'topp:points', styles: '', srs: 'EPSG:4326', format: format, transparent: "true", tilesOrigin : "0,0" }, {singleTile: true, ratio: 1,transitionEffect: 'resize'} ); map.addLayers([untiled,tiled]); -- View this message in context: http://n2.nabble.com/Overlay-layer-jump-durring-pan-tp3401129p3401129.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From patzke at geoinformationsdienst.de Fri Aug 7 04:06:19 2009 From: patzke at geoinformationsdienst.de (Fabian Patzke) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] =?utf-8?q?Adding_Feature_to_WFS_in_Vector_Laye?= =?utf-8?q?r_/_Copying=09Features?= References: Message-ID: I moved a bit further with my efforts. My transaction is getting more and more complete. But the Coordinates are still missing. If anybody has an idea it would be great ;) Before I try to commit a newly added feature I print out FID an geometry of the last features of the layer I added to. As you can see below, I get the last feature that has been in the layer before the add (FID: bla.203) and the newly added (FID: null). So I do not get the reason why no geometry is in the transaction. FID: bla.203 #202: MULTIPOLYGON(((3440276.57 5791250.12,3440243.1 5791360.32,3440244.73 5791414.19,3440263.51 5791485.21,3440359.01 5791523.57,3440515.73 5791495.82,3440598.82 5791494.96,3440609.43 5791557.01,3440700.07 5791522.72,3440704.15 5791588.86,3440841.91 5791548.07,3440823.94 5791481.1,3440917.87 5791429.64,3440917.87 5791415.75,3440753.7 5791349.59,3440813.05 5791255.64,3440910.28 5791228.67,3440902.11 5791175.56,3440840.83 5791161.67,3440837.56 5791179.65,3440797.52 5791174.75,3440737.06 5791121.64,3440659.11 5791106.1,3440650.94 5791142.88,3440556.13 5791270.38,3440455.76 5791170.57,3440434.5 5791204.92,3440467.21 5791245.82,3440447.58 5791284.26,3440392.79 5791288.35,3440289.74 5791259.72, 3440276.57 5791250.12))) FID: null #203: MULTIPOLYGON(((3302091.4993788 5913241.9002485, 3287274.8407132 5864558.5932041,3334547.0374084 5856797.486284, 3360652.578867 5906891.9036775,3302091.4993788 5913241.9002485))) Any help would be nice. Greetings, Fabian From michogar at gmail.com Fri Aug 7 04:30:58 2009 From: michogar at gmail.com (Micho Gar) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] CGI and Tomcat In-Reply-To: <1249584285317-3400100.post@n2.nabble.com> References: <1249584285317-3400100.post@n2.nabble.com> Message-ID: <5b9547fb0908070130p5d5ad0d8i6e239f58c1351a10@mail.gmail.com> Hola Arevalo, tienes esta tutorial que segu? yo para utilizar el proxy cgi en tomcat. http://codigoaldescubierto.wordpress.com/2008/02/24/cgis-en-tomcat-bajo-windows/ Saludos. El 6 de agosto de 2009 20:44, Juan Ar?valo escribi?: > > Hi all, > > I am making some progress setting up a WFS-T, it seems that my code works > since I don??t get any error, but the layer doesn't display in the map. I > have read that this problem can be solved by setting the Proxy Host, > however > I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and > OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for Apache > but not for Tomcat) > > Does anyone have any ideas on how to solve it? > > I??ve solved my previous problem with the WFS constructor. > Thanks Pierre and Eric for your help!! > > Cheers! > > Juan > -- > View this message in context: > http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3400100.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- # michogar # Analista Programador SIG # GNU/Linux Counter 462666 # http://www.openstreetmap.org/user/michogar Una visi?n personal: http://michogar.blogspot.com El d?a a d?a: http://twitter.com/michogar Sent from Madrid, Spain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090807/dc5cb9bf/attachment.html From adrian_gh.popa at romtelecom.ro Fri Aug 7 05:01:44 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] What is the relationship between zoom level and longitude/latitude Message-ID: <4A7BED78.1060907@romtelecom.ro> Hello everybody. I'm trying to zoom to view an area for which I have the minimum and maximum longitude/latitude. Basically I would like to zoom in to see a rectangle with known coordinates. I already calculated the center of this rectangle - so that's not a problem - the map centers beautifully to that. The problem is: I have to find out which minimum zoom setting would allow my area to be fully visible - so I need to choose a zoom setting. There must be a relationship between the difference in longitude (or latitude) to a zoom level. I wonder if anyone knows this relationship - or should I determine it empirically. Thank you. By the way, my map is using spherical mercator projection, but my coordinates are in longitude/latitude (although there is no problem in converting them...). -- --- Adrian Popa NOC Division Network Engineer Divizia Centrul National de Operare Retea Departament Transport IP & Metro Compartiment IP Core & Backbone Phone: +40 21 400 3099 From igrcic at gmail.com Fri Aug 7 06:31:22 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Overlay layer jump durring pan In-Reply-To: <1249597875535-3401129.post@n2.nabble.com> References: <1249597875535-3401129.post@n2.nabble.com> Message-ID: Hi, you should put ratio in untiled layer to some bigger value, at least 1.4 or so. And what excalty does it mean 'jumping' ? :) On Fri, Aug 7, 2009 at 12:31 AM, tommy408 wrote: > > My overlay layer keeps jumping around when I pan the map. ?It only does it on > Firefox. ?I've tried 2.6, 2.7 and 2.8. ?All of them do it. ?Anyone know how > I can fix it? ?It's probably somewhere in ?Image.js > > > ? ? ? ? ? ? ? ?base_layer = new OpenLayers.Layer.WMS( > ? ? ? ? ? ? ? ? ? ?"Geoserver layers - Tiled", > "http://localhost:8080/geoserver/wms", > ? ? ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ? ? ?height: '479', > ? ? ? ? ? ? ? ? ? ? ? ?width: '800', > ? ? ? ? ? ? ? ? ? ? ? ?layers: 'topp:custom', > ? ? ? ? ? ? ? ? ? ? ? ?styles: '', > ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:4326', > ? ? ? ? ? ? ? ? ? ? ? ?format: format, > ? ? ? ? ? ? ? ? ? ? ? ?tiled: 'true', > ? ? ? ? ? ? ? ? ? ? ? ?tilesOrigin : "0,0" > ? ? ? ? ? ? ? ? ? ?}, > ? ? ? ? ? ? ? ? ? ?{transitionEffect: 'resize'} > ? ? ? ? ? ? ? ?); > > > ? ? ? ? ? ? ? ?overlay_layer = new OpenLayers.Layer.WMS( > ? ? ? ? ? ? ? ? ? ?"Geoserver layers - Untiled", > "http://localhost:8080/geoserver/wms", > ? ? ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ? ? ?height: '479', > ? ? ? ? ? ? ? ? ? ? ? ?width: '800', > ? ? ? ? ? ? ? ? ? ? ? ?layers: 'topp:points', > ? ? ? ? ? ? ? ? ? ? ? ?styles: '', > ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:4326', > ? ? ? ? ? ? ? ? ? ? ? ?format: format, > ? ? ? ? ? ? ? ? ? ? ? ?transparent: "true", > ? ? ? ? ? ? ? ? ? ? ? ?tilesOrigin : "0,0" > ? ? ? ? ? ? ? ? ? ?}, > ? ? ? ? ? ? ? ? ? ?{singleTile: true, ratio: 1,transitionEffect: 'resize'} > ? ? ? ? ? ? ? ?); > > ? ? ? ? ? ? ? ?map.addLayers([untiled,tiled]); > > -- > View this message in context: http://n2.nabble.com/Overlay-layer-jump-durring-pan-tp3401129p3401129.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From patzke at geoinformationsdienst.de Fri Aug 7 06:32:55 2009 From: patzke at geoinformationsdienst.de (Fabian Patzke) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] =?utf-8?q?What_is_the_relationship_between_zoo?= =?utf-8?q?m_level_and=09longitude/latitude?= References: <4A7BED78.1060907@romtelecom.ro> Message-ID: Adrian Popa writes: > > Hello everybody. > > I'm trying to zoom to view an area for which I have the minimum and > maximum longitude/latitude. Basically I would like to zoom in to see a > rectangle with known coordinates. I already calculated the center of > this rectangle - so that's not a problem - the map centers beautifully > to that. Don't try it the hard way :) Take the zoomToExtent() function an var zoomExtent = new OpenLayers.Bounds(left, bottom, right, top); map.zoomToExtent(zoomExtent); maybe you need to transform zommExtent first. I hope that helps. Greetings, Fabian From tommytomorow at msn.com Fri Aug 7 06:40:32 2009 From: tommytomorow at msn.com (tommy408) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Overlay layer jump durring pan In-Reply-To: References: <1249597875535-3401129.post@n2.nabble.com> Message-ID: <1249641632440-3403584.post@n2.nabble.com> Oh thanks a lot Ivan. I put 2.0 ratio earlier and it fixed it. I just didn't understand why. By jumping I meant the overlay layer shifts for a split second to a different spot before adjusting to the correct spot. Ivan Grcic-2 wrote: > > Hi, you should put ratio in untiled layer to some bigger value, at > least 1.4 or so. > > And what excalty does it mean 'jumping' ? :) > > On Fri, Aug 7, 2009 at 12:31 AM, tommy408 wrote: >> >> My overlay layer keeps jumping around when I pan the map. ?It only does >> it on >> Firefox. ?I've tried 2.6, 2.7 and 2.8. ?All of them do it. ?Anyone know >> how >> I can fix it? ?It's probably somewhere in ?Image.js >> >> >> ? ? ? ? ? ? ? ?base_layer = new OpenLayers.Layer.WMS( >> ? ? ? ? ? ? ? ? ? ?"Geoserver layers - Tiled", >> "http://localhost:8080/geoserver/wms", >> ? ? ? ? ? ? ? ? ? ?{ >> ? ? ? ? ? ? ? ? ? ? ? ?height: '479', >> ? ? ? ? ? ? ? ? ? ? ? ?width: '800', >> ? ? ? ? ? ? ? ? ? ? ? ?layers: 'topp:custom', >> ? ? ? ? ? ? ? ? ? ? ? ?styles: '', >> ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:4326', >> ? ? ? ? ? ? ? ? ? ? ? ?format: format, >> ? ? ? ? ? ? ? ? ? ? ? ?tiled: 'true', >> ? ? ? ? ? ? ? ? ? ? ? ?tilesOrigin : "0,0" >> ? ? ? ? ? ? ? ? ? ?}, >> ? ? ? ? ? ? ? ? ? ?{transitionEffect: 'resize'} >> ? ? ? ? ? ? ? ?); >> >> >> ? ? ? ? ? ? ? ?overlay_layer = new OpenLayers.Layer.WMS( >> ? ? ? ? ? ? ? ? ? ?"Geoserver layers - Untiled", >> "http://localhost:8080/geoserver/wms", >> ? ? ? ? ? ? ? ? ? ?{ >> ? ? ? ? ? ? ? ? ? ? ? ?height: '479', >> ? ? ? ? ? ? ? ? ? ? ? ?width: '800', >> ? ? ? ? ? ? ? ? ? ? ? ?layers: 'topp:points', >> ? ? ? ? ? ? ? ? ? ? ? ?styles: '', >> ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:4326', >> ? ? ? ? ? ? ? ? ? ? ? ?format: format, >> ? ? ? ? ? ? ? ? ? ? ? ?transparent: "true", >> ? ? ? ? ? ? ? ? ? ? ? ?tilesOrigin : "0,0" >> ? ? ? ? ? ? ? ? ? ?}, >> ? ? ? ? ? ? ? ? ? ?{singleTile: true, ratio: 1,transitionEffect: >> 'resize'} >> ? ? ? ? ? ? ? ?); >> >> ? ? ? ? ? ? ? ?map.addLayers([untiled,tiled]); >> >> -- >> View this message in context: >> http://n2.nabble.com/Overlay-layer-jump-durring-pan-tp3401129p3401129.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Ivan Grcic > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Overlay-layer-jump-durring-pan-tp3401129p3403584.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ks at geograf.dk Fri Aug 7 07:24:51 2009 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] What is the relationship between zoom level and longitude/latitude In-Reply-To: <4A7BED78.1060907@romtelecom.ro> References: <4A7BED78.1060907@romtelecom.ro> Message-ID: <4A7C0F03.1060406@geograf.dk> There is a function just for that: http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent If you need the value, you can call this: http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getZoomForExtent You can examine the code if you are interested in the inner workings of calculating a zoom level from a rectangle. Regards, Kenneth Skovhede, GEOGRAF A/S Adrian Popa skrev: > Hello everybody. > > I'm trying to zoom to view an area for which I have the minimum and > maximum longitude/latitude. Basically I would like to zoom in to see a > rectangle with known coordinates. I already calculated the center of > this rectangle - so that's not a problem - the map centers beautifully > to that. > > The problem is: I have to find out which minimum zoom setting would > allow my area to be fully visible - so I need to choose a zoom setting. > There must be a relationship between the difference in longitude (or > latitude) to a zoom level. > > I wonder if anyone knows this relationship - or should I determine it > empirically. > > Thank you. > > By the way, my map is using spherical mercator projection, but my > coordinates are in longitude/latitude (although there is no problem in > converting them...). > > From adrian_gh.popa at romtelecom.ro Fri Aug 7 07:57:11 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] What is the relationship between zoom level and longitude/latitude In-Reply-To: <4A7C0F03.1060406@geograf.dk> References: <4A7BED78.1060907@romtelecom.ro> <4A7C0F03.1060406@geograf.dk> Message-ID: <4A7C1697.4010402@romtelecom.ro> Thank you all for your help, I used zoomToExtent and it worked great... Kenneth Skovhede, GEOGRAF A/S wrote: > There is a function just for that: > http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent > > > If you need the value, you can call this: > http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getZoomForExtent > > > You can examine the code if you are interested in the inner workings > of calculating a zoom level from a rectangle. > > Regards, Kenneth Skovhede, GEOGRAF A/S > > > > > Adrian Popa skrev: >> Hello everybody. >> >> I'm trying to zoom to view an area for which I have the minimum and >> maximum longitude/latitude. Basically I would like to zoom in to see >> a rectangle with known coordinates. I already calculated the center >> of this rectangle - so that's not a problem - the map centers >> beautifully to that. >> >> The problem is: I have to find out which minimum zoom setting would >> allow my area to be fully visible - so I need to choose a zoom >> setting. There must be a relationship between the difference in >> longitude (or latitude) to a zoom level. >> >> I wonder if anyone knows this relationship - or should I determine it >> empirically. >> >> Thank you. >> >> By the way, my map is using spherical mercator projection, but my >> coordinates are in longitude/latitude (although there is no problem >> in converting them...). >> >> > From Brian at neworleansgis.com Fri Aug 7 12:01:10 2009 From: Brian at neworleansgis.com (BrianJ) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Simple Layer Visibility Problem... Message-ID: <1249660870078-3405211.post@n2.nabble.com> 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); } -- View this message in context: http://n2.nabble.com/Simple-Layer-Visibility-Problem...-tp3405211p3405211.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Fri Aug 7 12:11:26 2009 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Simple Layer Visibility Problem... In-Reply-To: <1249660870078-3405211.post@n2.nabble.com> References: <1249660870078-3405211.post@n2.nabble.com> Message-ID: <4A7C522E.2020402@osgis.nl> 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); > } > > > > > -- Bart van den Eijnden OSGIS, Open Source GIS bartvde@osgis.nl http://www.osgis.nl From valemunoz at gmail.com Fri Aug 7 12:25:52 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] LayerSwitcher and OverviewMap Message-ID: <4b56aefe0908070925t7584a546hb19afb6339b775ad@mail.gmail.com> HI when the map will be charge, can the LayerSwitcher and OverviewMap be open? RG -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090807/7e839981/attachment.html From bartvde at osgis.nl Fri Aug 7 12:35:43 2009 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] LayerSwitcher and OverviewMap In-Reply-To: <4b56aefe0908070925t7584a546hb19afb6339b775ad@mail.gmail.com> References: <4b56aefe0908070925t7584a546hb19afb6339b775ad@mail.gmail.com> Message-ID: <4A7C57DF.1070902@osgis.nl> Hi, please check out: http://openlayers.org/pipermail/users/2007-October/003405.html Best regards, Bart Valeria Mu?oz wrote: > HI > > when the map will be charge, can the LayerSwitcher and OverviewMap > be open? > > RG > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Bart van den Eijnden OSGIS, Open Source GIS bartvde@osgis.nl http://www.osgis.nl From valemunoz at gmail.com Fri Aug 7 12:39:02 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] LayerSwitcher and OverviewMap In-Reply-To: <4A7C57DF.1070902@osgis.nl> References: <4b56aefe0908070925t7584a546hb19afb6339b775ad@mail.gmail.com> <4A7C57DF.1070902@osgis.nl> Message-ID: <4b56aefe0908070939y2d9bb0efs8fdf6a2983ab097@mail.gmail.com> thanks!! RG 2009/8/7 Bart van den Eijnden (OSGIS) > Hi, > > please check out: > > http://openlayers.org/pipermail/users/2007-October/003405.html > > Best regards, > Bart > > Valeria Mu?oz wrote: > >> HI >> when the map will be charge, can the LayerSwitcher and OverviewMap be >> open? >> RG >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > Bart van den Eijnden > OSGIS, Open Source GIS > bartvde@osgis.nl > http://www.osgis.nl > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090807/63ce6de6/attachment.html From joao.c.duarte at co.sapo.pt Fri Aug 7 14:29:32 2009 From: joao.c.duarte at co.sapo.pt (Joao Duarte) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Label position on vector features Message-ID: <005501ca178d$0234c200$069e4600$@c.duarte@co.sapo.pt> Hi list, Is there any way to position the label of a vector feature besides the labelAlign property? I have a vector feature which is a point having an externalGraphic and what I really would like to do is to specify an offset the label should have relative to the feature centroid. I checked the drawText method in the Renderers (VML and SVG) and they determine the position of the label by the feature centroid. But don?t let the user specify a custom offset. Has anyone thought about this? A simple patch on the drawText method would do this: var x = (location.x / resolution + this.left + style.labelOffsetX); var y = (location.y / resolution - this.top - style.labelOffsetY); Am I right? Jo?o Duarte -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090807/2b2b9955/attachment.html From dresel at gmx.at Fri Aug 7 16:08:51 2009 From: dresel at gmx.at (Dresel) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] ClusterStrategy Problem Message-ID: <1249675731433-3406487.post@n2.nabble.com> Hi, i want to use ClusterStrategy with VectorLayer. My Layer is generated like this: OpenLayers Example
This works, points are drawn. Now i add a stylemap and the ClusterStrategy (from the ClusterExample): OpenLayers Example
This doesn't show any points at all. What did i do wrong? Thanks for help, Dresel -- View this message in context: http://n2.nabble.com/ClusterStrategy-Problem-tp3406487p3406487.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Fri Aug 7 16:14:43 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] CGI and Tomcat In-Reply-To: <1249584285317-3400100.post@n2.nabble.com> References: <1249584285317-3400100.post@n2.nabble.com> Message-ID: On Thursday, August 6, 2009, Juan Ar?valo wrote: > > Hi all, > > I am making some progress setting up a WFS-T, it seems that my code works > since I don??t get any error, but the layer doesn't display in the map. I > have read that this problem can be solved by setting the Proxy Host, however > I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and > OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for Apache > but not for Tomcat) > > Does anyone have any ideas on how to solve it? Hi. If your Tomcat instance serves both the HTML page and the WFS then you don't need a proxy. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From rodolfoamoreno at gmail.com Fri Aug 7 18:35:05 2009 From: rodolfoamoreno at gmail.com (Rodolfo Moreno) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Bug in Google with overaly example Message-ID: <1249684505845-3407076.post@n2.nabble.com> Hi all, The google with overlay example from "http://openlayers.org/dev/examples/" is working incorrectly. The bug is not only because the worldmap is not loaded correctly but also because this is covering whole the map and thus the google layer is not showed, just the worldmap is showed. if you turn off the worldmap layer then it's possible to view the google layer. I realized about it because I have a similar example overlaping google maps with mapguide layers and 3 months ago this sample worked appropriately (in that moment the last release was 2.6 version) and now I got the same bug, it means that mapguide layers covers whole map that don't enable to view the google layers. has anyone run into with this? Regards, ----- Rodolfo Moreno CivilEng -- View this message in context: http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3407076.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From emckenna at phase2technology.com Fri Aug 7 20:02:16 2009 From: emckenna at phase2technology.com (Eric Mckenna) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] centerLayerContainer is setting pixel center to 0, 0 Message-ID: <14007067.1491249689731847.JavaMail.eric@emacbook.local> I've been through this for two days now and can't get this figured out. I can see why it's happening, but everything I see online about calling Gmap.checkResize() doesn't fix this particular problem. This bug happens about 90% of the time, the other 10% the map renders correctly and gets the correct center. For my popup, I'm using the JS Tools overlay. What my popup and map look like. http://skitch.com/emackn/b4ue9/offcentermap Here's my debug output. http://skitch.com/emackn/b4ues/centerlayercontainer-debug Here's how I call centerLayerContainer: =============================================== function hotspotsLaunchDetails(anchor) { $.getJSON($(anchor).attr("href"), function(data) { $('#hotspot-overlay-map').html(''); hotspotsRenderDetailMap("hotspot-overlay-map", data.hotspot); var map = Drupal.hotspotsMap['hotspot-overlay-map']; var lat = Number(data.hotspot.latitude); var lon = Number(data.hotspot.longitude); var hotspot = new OpenLayers.LonLat(lon, lat); debugger; // I added this here since the map should always be available after rendering. map.centerLayerContainer(hotspot); //map.updateSize(); } ); Drupal.hotspotOverlay.load(); return false; } and where I set up my map. =============================================== function hotspotsRenderDetailMap(id, config) { var lat = Number(config.latitude); var lon = Number(config.longitude); var zoom = Number(config.zoom); var image = config.marker; var hotspot = new OpenLayers.LonLat(lon, lat); OpenLayers.ImgPath = config.imgpath; var map = new OpenLayers.Map(id, { controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.ScaleLine(), new OpenLayers.Control.LayerSwitcher() ], }); // In case something needs to get at this later if (!Drupal.hotspotsMap) { Drupal.hotspotsMap = []; } Drupal.hotspotsMap[id] = map; var google = new OpenLayers.Layer.Google( "Google Hybrid", { type: G_HYBRID_MAP, numZoomLevels: 18, } ); map.addLayer(google); //google.setMapObjectCenter(hotspot, zoom); if (!map.getCenter()) { //var epsg4326 = new OpenLayers.Projection("EPSG:4326"); var epsg3785 = new OpenLayers.Projection("EPSG:3785"); //hotspot.transform(epsg4326, map.getProjectionObject()); hotspot.transform(epsg3785, map.getProjectionObject()); map.setCenter(hotspot, zoom); //google.setMapObjectCenter(hotspot, zoom); } // MARKERS AND KML ... map.setLayerIndex(markers, 100); map.centerLayerContainer(hotspot); map.updateSize(); } -- Eric Mckenna Software Engineer Phase2 Technology direct: 703.548.6050,110 emckenna@phase2technology.com www.phase2technology.com Web solutions that fit your business. From arnd.wippermann at web.de Sat Aug 8 05:30:29 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Label position on vector features In-Reply-To: <005501ca178d$0234c200$069e4600$@c.duarte@co.sapo.pt> Message-ID: Hi, i do exactly the same to get the labels positioned. Otherwise the labels would hide the symbols for my point features. I would also like this patch, but I'm not sure, if it is compatible with SLD. Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Joao Duarte Gesendet: Freitag, 7. August 2009 20:30 An: users@openlayers.org Betreff: [OpenLayers-Users] Label position on vector features Hi list, Is there any way to position the label of a vector feature besides the labelAlign property? I have a vector feature which is a point having an externalGraphic and what I really would like to do is to specify an offset the label should have relative to the feature centroid. I checked the drawText method in the Renderers (VML and SVG) and they determine the position of the label by the feature centroid. But don?t let the user specify a custom offset. Has anyone thought about this? A simple patch on the drawText method would do this: var x = (location.x / resolution + this.left + style.labelOffsetX); var y = (location.y / resolution - this.top - style.labelOffsetY); Am I right? Jo?o Duarte -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090808/3c2e54db/attachment.html From vedsur at yahoo.com Sat Aug 8 23:49:06 2009 From: vedsur at yahoo.com (Suresh) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Blank Postgis Mapserver layer Message-ID: <1249789746708-3411407.post@n2.nabble.com> Hi! I am trying a simple example to draw a postgis layer using Mapserver 5.4(MS4W) and Openlayers 2.7. I am not getting the usual pink screen. When I right click and select 'View Image', there is no mapserver error. Hence, I am assuming that the image is drawn. However, there is no object in the image. I am reproducing mapfile and the HTML file below. Mapfile ------- NAME "mumbai" UNITS DD EXTENT 72.777 18.901034910 73.046 19.308258 SIZE 640 480 IMAGECOLOR 189 202 222 IMAGETYPE PNG # Web Object WEB TEMPLATE "/ms4w/apache/htdocs/vedsur/postgis.php" IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END # PostGIS layer LAYER CONNECTIONTYPE postgis NAME "Roads" CONNECTION "user=suresh password=suresh dbname=ios host=localhost" DATA "stretch_geom from stretch" STATUS ON TYPE LINE CLASS color 255 0 255 END END # Layer END # Mapfile HTML Template -------------- var lon = 72.90; var lat = 19.11; var zoom = 10; var map, layer; function init(){ map = new OpenLayers.Map( 'map' ); var Layer = new OpenLayers.Layer.MapServer( "Circle", "http://localhost/cgi-bin/mapserv.exe", {map: '/ms4w/apache/htdocs/vedsur/MumbaiPG.map'}, {gutter: 15}); map.addLayer(Layer); map.setCenter( new OpenLayers.LonLat(lon, lat), zoom); map.addControl( new OpenLayers.Control.LayerSwitcher() ); map.addControl( new OpenLayers.Control.MousePosition() ); body onload="init()" div id="map" class="smallmap" /div ------------------------------------------------------------ I have tried googling (and this forum) for two days before putting this post. Any help is welcome. Thanks Suresh -- View this message in context: http://n2.nabble.com/Blank-Postgis-Mapserver-layer-tp3411407p3411407.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090808/04181c7f/attachment.html From vedsur at yahoo.com Sun Aug 9 09:41:34 2009 From: vedsur at yahoo.com (Suresh Nimbalkar) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Blank PostGIS Layer with Openlayers Message-ID: <430928.8780.qm@web94908.mail.in2.yahoo.com> I am trying to display a simple postgis road layer with Mapserver 5 and Openlayers. I am not getting the PINK screen, suggesting success in layer drawing. However, the map is blank. I know that the postgis is installed properly since I do a bit of GIS computations with the data stored in it with PHP.. The important parts of map files are provided belowLAYER ??? NAME??? ??? ??? ??? "Roads" ??? CONNECTIONTYPE??? POSTGIS ??? CONNECTION??? ??? "user=suresh password=suresh dbname=sitedatabase host=localhost port=5432" ??? DATA??? ??? ??? ??? "stretch_geom from stretch" ??? STATUS??? ??? ??? ON ??? TYPE??? ??? ??? ??? LINE ??? CLASS ??? ??? color ??? ??? 255 0 255 ??? END END # Layer The HTML template is a standard one with the following line in init() function ??? ?? ??? map = new OpenLayers.Map( 'map' ); ??? ?? ??? var layer1 = new OpenLayers.Layer.MapServer( "Circle", "http://localhost/cgi-bin/mapserv", {map: '/var/www/vedsur/MumbaiPG.map'}, {gutter: 15}); ??? ?? ??? map.addLayer(layer1); Have been struggline with this problem for a while. Please help. Thanks and regards, Suresh See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090809/e70c7ee1/attachment.html From jansen at terrestris.de Sun Aug 9 09:52:35 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Blank PostGIS Layer with Openlayers In-Reply-To: <430928.8780.qm@web94908.mail.in2.yahoo.com> References: <430928.8780.qm@web94908.mail.in2.yahoo.com> Message-ID: <4A7ED4A3.4050007@terrestris.de> Hi Suresh, Have you tested the UMN Layer? (e.g. with shp2img) If it is not working, the mapserver userlist might help. If the layer works, provide an URL sent to Mapserver by OpenLayers. Firebug might help. Regards, Marc Suresh Nimbalkar schrieb: > I am trying to display a simple postgis road layer with Mapserver 5 > and Openlayers. I am not getting the PINK screen, suggesting success > in layer drawing. However, the map is blank. I know that the postgis > is installed properly since I do a bit of GIS computations with the > data stored in it with PHP. > > The important parts of map files are provided belowLAYER > NAME "Roads" > CONNECTIONTYPE POSTGIS > CONNECTION "user=suresh password=suresh dbname=sitedatabase > host=localhost port=5432" > DATA "stretch_geom from stretch" > STATUS ON > TYPE LINE > CLASS > color 255 0 255 > END > END # Layer > > The HTML template is a standard one with the following line in init() > function > > map = new OpenLayers.Map( 'map' ); > var layer1 = new OpenLayers.Layer.MapServer( "Circle", > "http://localhost/cgi-bin/mapserv", {map: > '/var/www/vedsur/MumbaiPG.map'}, {gutter: 15}); > map.addLayer(layer1); > > Have been struggline with this problem for a while. Please help. > > Thanks and regards, > Suresh > > > ------------------------------------------------------------------------ > Love Cricket? Check out live scores, photos, video highlights and > more. Click here > . > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From joao.c.duarte at co.sapo.pt Sun Aug 9 15:44:44 2009 From: joao.c.duarte at co.sapo.pt (=?iso-8859-1?Q?Jo=E3o_Duarte?=) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Label position on vector features Message-ID: <00e201ca1929$d85604f0$89020ed0$@c.duarte@co.sapo.pt> Hi, Can anyone say if such a patch would be incompatible with SLD? Jo?o Duarte De: Arnd Wippermann [mailto:arnd.wippermann@web.de] Enviada: s?bado, 8 de Agosto de 2009 10:30 Para: Joao Campos Duarte (PRIMEIT) Cc: users@openlayers.org Assunto: AW: [OpenLayers-Users] Label position on vector features Hi, i do exactly the same to get the labels positioned. Otherwise the labels would hide the symbols for my point features. I would also like this patch, but I'm not sure, if it is compatible with SLD. Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Joao Duarte Gesendet: Freitag, 7. August 2009 20:30 An: users@openlayers.org Betreff: [OpenLayers-Users] Label position on vector features Hi list, Is there any way to position the label of a vector feature besides the labelAlign property? I have a vector feature which is a point having an externalGraphic and what I really would like to do is to specify an offset the label should have relative to the feature centroid. I checked the drawText method in the Renderers (VML and SVG) and they determine the position of the label by the feature centroid. But don?t let the user specify a custom offset. Has anyone thought about this? A simple patch on the drawText method would do this: var x = (location.x / resolution + this.left + style.labelOffsetX); var y = (location.y / resolution - this.top - style.labelOffsetY); Am I right? Jo?o Duarte -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090809/a79e38e6/attachment.html From surya.tarigan at yahoo.com Sun Aug 9 23:41:52 2009 From: surya.tarigan at yahoo.com (Surya Tarigan) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] (no subject) Message-ID: <936918.87100.qm@web111920.mail.gq1.yahoo.com> dear list, ? I have wms layer with 100 different river names. I am looking script example, where?i can click certain river ?name from dropdown list and the cursor fly to the specified river. ? best regards, ? surya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090809/3d2d7892/attachment.html From redetin at gmail.com Mon Aug 10 06:08:51 2009 From: redetin at gmail.com (Jani Tiainen) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Modifying existing feature selecting it by code and then modify and save Message-ID: <4A7FF1B3.80402@gmail.com> I'm trying to achieve "select by code" and "start modify" functionality to my OL webapp. I've form that user selects on feature to be editable, clicks "edit" and then OL vector layer should be in "edit mode". When done editing changes are just saved with simply clicking "save" button on a same form. I haven't been succesful with modifying existing tools. It seems that they require always that feature is selected from vector layer (with mouse) before any modification happen and then modification ends by clicking outside of element. Is there simple way to achieve something I'm looking for or do I need to develop set of own tools to get wanted functionality? -- Jani Tiainen From disiron at ya.ru Mon Aug 10 06:12:11 2009 From: disiron at ya.ru (=?UTF-8?B?SdCvT04=?=) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Virtual Earth layer: Layers disagreement Message-ID: <136511249899131@webmail107.yandex.ru> Good day! I'm newbie in OpenLayers. I'm using VE layer to track some points. Conditions: 1. Draw some points & lines between them 2. Set zoom to min.value 3. Move map with dragging to extreme left position (for example) Results: 1. Base layer haven't moved at all (because map can be visible wholly with minimal zoom & there's no need to move it) 2. Markers have stayed on the correct positions with a map. 3. Lines have moved according to mouse offset. But it's wrong. They must stay with marker's and base layers. Could you please give me a hint, what can be wrong in my actions? I place my code below: map = new OpenLayers.Map("map", mapOptions); veLayer = new OpenLayers.Layer.VirtualEarth("Virtual Earth Raods", { 'type': VEMapStyle.Road, 'sphericalMercator': true, numZoomLevels: veMaxZoom }); layerLines = new OpenLayers.Layer.Vector("Lines"); .. // Get polylines for particular tracks function GetLines(groupedTracks) { .. $(groupItem.TrackData).each(function() { var point = new OpenLayers.Geometry.Point(this.lon, this.lat); OpenLayers.Projection.transform(point, new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()); layerPoints.push(point); }); lines.push(new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Collection(new OpenLayers.Geometry.LineString(layerPoints)), null, GetLineStyle(this))); }); return lines; } From ahocevar at opengeo.org Mon Aug 10 08:36:07 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Label position on vector features In-Reply-To: <00e201ca1929$d85604f0$89020ed0$@c.duarte@co.sapo.pt> References: <00e201ca1929$d85604f0$89020ed0$@c.duarte@co.sapo.pt> Message-ID: <4A801437.8020602@opengeo.org> Jo?o Duarte wrote: > > Hi, > > > > Can anyone say if such a patch would be incompatible with SLD? > To me it looks like this is exactly what the sld DisplacementX and DisplacementY properties do. If you want to have this in OpenLayers, please provide a patch (preferably with unit tests and sld reader/writer). See http://trac.openlayers.org/wiki/HowToContribute. Thanks! Andreas. > > > Jo?o Duarte > > > > *De:* Arnd Wippermann [mailto:arnd.wippermann@web.de] > *Enviada:* s?bado, 8 de Agosto de 2009 10:30 > *Para:* Joao Campos Duarte (PRIMEIT) > *Cc:* users@openlayers.org > *Assunto:* AW: [OpenLayers-Users] Label position on vector features > > > > Hi, > > > > i do exactly the same to get the labels positioned. Otherwise the > labels would hide the symbols for my point features. I would also like > this patch, but I'm not sure, if it is compatible with SLD. > > > > Arnd > > > > ------------------------------------------------------------------------ > > *Von:* users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] *Im Auftrag von *Joao Duarte > *Gesendet:* Freitag, 7. August 2009 20:30 > *An:* users@openlayers.org > *Betreff:* [OpenLayers-Users] Label position on vector features > > Hi list, > > > > Is there any way to position the label of a vector feature besides the > labelAlign property? > > > > I have a vector feature which is a point having an externalGraphic and > what I really would like to do is to specify an offset the label > should have relative to the feature centroid. > > > > I checked the drawText method in the Renderers (VML and SVG) and they > determine the position of the label by the feature centroid. But don?t > let the user specify a custom offset. > > > > Has anyone thought about this? A simple patch on the drawText method > would do this: > > > > var x = (location.x / resolution + this.left + style.labelOffsetX); > > var y = (location.y / resolution - this.top - style.labelOffsetY); > > > > Am I right? > > > > Jo?o Duarte > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From adube at mapgears.com Mon Aug 10 08:37:11 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] (no subject) In-Reply-To: <936918.87100.qm@web111920.mail.gq1.yahoo.com> References: <936918.87100.qm@web111920.mail.gq1.yahoo.com> Message-ID: <4A801477.1070905@mapgears.com> Hi, You could make your wms layer wfs compatible and make a getFeature request when your page loads. Then, for each returned feature, get the 'name' and 'bbox' of the feature's geometry and populate your combobox using DOM. I made something similar in the past (1). The only exception is that I found the getFeature resquest a bit heavy, so I made a small mapscript script that would only return the name + geom of features I needed. I made it the same format as OpenLayers.Format.Text (see what getCities.php returns in firebug). Or, you could also take a look at the Shortcuts and Recenter examples of MapFish (2) (if you're thinking of using ExtJS in your application). Shortcuts works "client-side" only and you need to manually set your data (like above). Recenter uses a server-side application to do the queries (mapfish-server). Regards, (1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html (click the 'house' button, code is in bdga.js) (2) http://demo.mapfish.org/mapfishsample/trunk/ Surya Tarigan wrote: > dear list, > > I have wms layer with 100 different river names. I am looking script > example, where i can click certain river name from dropdown list and > the cursor fly to the specified river. > > best regards, > > surya > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From ahocevar at opengeo.org Mon Aug 10 08:43:04 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Modifying existing feature selecting it by code and then modify and save In-Reply-To: <4A7FF1B3.80402@gmail.com> References: <4A7FF1B3.80402@gmail.com> Message-ID: <4A8015D8.8030805@opengeo.org> Jani Tiainen wrote: > I'm trying to achieve "select by code" and "start modify" functionality > to my OL webapp. > You may want to have a look at the new standalone option of the ModifyFeature control (in OpenLayers trunk). If set to true, you can just do modifyControl.selectFeature(yourFeature); and you can start editing the feature. Regards, Andreas. > I've form that user selects on feature to be editable, clicks "edit" and > then OL vector layer should be in "edit mode". When done editing changes > are just saved with simply clicking "save" button on a same form. > > I haven't been succesful with modifying existing tools. It seems that > they require always that feature is selected from vector layer (with > mouse) before any modification happen and then modification ends by > clicking outside of element. > > Is there simple way to achieve something I'm looking for or do I need to > develop set of own tools to get wanted functionality? > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From emckenna at phase2technology.com Mon Aug 10 10:03:45 2009 From: emckenna at phase2technology.com (emackn) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] centerLayerContainer is setting pixel center to 0, 0 In-Reply-To: <14007067.1491249689731847.JavaMail.eric@emacbook.local> References: <14007067.1491249689731847.JavaMail.eric@emacbook.local> Message-ID: <1249913025243-3417347.post@n2.nabble.com> Still drawing a blank on this. Nothing new to report really. Tried setting the map size on creation but that didnt' work. Also looked into some setTimeout function tricks but none of those worked out either. Wondering if the AJAX call is screwing me. -- View this message in context: http://n2.nabble.com/centerLayerContainer-is-setting-pixel-center-to-0%2C-0-tp3407397p3417347.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From taviroquai at gmail.com Mon Aug 10 11:17:56 2009 From: taviroquai at gmail.com (taviroquai) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Vectors layer over Google In-Reply-To: <1053B20F24D85F41B57F168351684E22039DF6FE@0015-its-exmb04.us.saic.com> References: <1249569132508-3398605.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E22039DF6FE@0015-its-exmb04.us.saic.com> Message-ID: <1249917476091-3417803.post@n2.nabble.com> Hi, Thanks for your hint. The problem was with the kml file... now its working. Cheers, Marco -- View this message in context: http://n2.nabble.com/Vectors-layer-over-Google-tp3398605p3417803.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Tue Aug 11 00:37:46 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Bug in Google with overaly example In-Reply-To: <1249684505845-3407076.post@n2.nabble.com> References: <1249684505845-3407076.post@n2.nabble.com> Message-ID: On Sat, Aug 8, 2009 at 12:35 AM, Rodolfo Moreno wrote: > > Hi all, > The google with overlay example from "http://openlayers.org/dev/examples/" > is working incorrectly. The bug is not only because the worldmap is not > loaded correctly but also because this is covering whole the map and thus > the google layer is not showed, just the worldmap is showed. if you turn off > the worldmap layer then it's possible to view the google layer. I realized > about it because I have a similar example overlaping google maps with > mapguide layers and 3 months ago this sample worked appropriately (in that > moment the last release was 2.6 version) and now I got the same bug, it > means that mapguide layers covers whole map that don't enable to view the > google layers. The layer you put on top of the google layer must be transparent. If your layer if a WMS layer (OpenLayers.Layer.WMS) use transparent:true in the layer params. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From milan.antonovic at gmail.com Tue Aug 11 05:56:33 2009 From: milan.antonovic at gmail.com (Milan Antonovic) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Vector StyleMap labels with HTML tags (is it possible?) Message-ID: Hi list, I would like some explanation about StyleMap with labels, before OL 2.8 I used to create popups with transparent background to create labels. But now I tried to use the new StyleMap - label option. During my tests I understand that I cannot do somthing like this: label : "

${value}


${name}", Is there an other way to format labels with html tags using the label option? My best regards Milan -- M. Antonovic Software Engineer Institute of Earth Sciences - SUPSI - http://www.ist.supsi.ch/ Division of Geomatics - http://istgeo.ist.supsi.ch/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090811/652e96a1/attachment.html From ahocevar at opengeo.org Tue Aug 11 09:17:31 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Vector StyleMap labels with HTML tags (is it possible?) In-Reply-To: References: Message-ID: <4A816F6B.7060606@opengeo.org> Hi, Milan Antonovic wrote: > I would like some explanation about StyleMap with labels, before OL > 2.8 I used to create popups with transparent background to create labels. > But now I tried to use the new StyleMap - label option. > > During my tests I understand that I cannot do somthing like this: > > label : "

${value}


${name}", > > Is there an other way to format labels with html tags using the label > option? Unfortunately not. The labels are rendered using SVG/VML/Canvas, and you cannot provide markup for the label text. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From milan.antonovic at gmail.com Tue Aug 11 10:00:31 2009 From: milan.antonovic at gmail.com (Milan Antonovic) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Vector StyleMap labels with HTML tags (is it possible?) In-Reply-To: <4A816F6B.7060606@opengeo.org> References: <4A816F6B.7060606@opengeo.org> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 100 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090811/4eba47e7/attachment.gif From growe at lancova.com Tue Aug 11 11:12:06 2009 From: growe at lancova.com (Glenn Rowe) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Trying to query a database with attribute obtained from a mouse click Message-ID: <4A818A46.7010502@lancova.com> I'm looking for the simplest possible solution to a problem I'm having with a mapping project. I'm still struggling to figure out OpenLayers, so bear with me. I have a map with 3 base layers and 2 transparent overlays, all generated from shapefiles that are produced and maintained in-house. This project is for a county government web site and the layers depict roads, parcels, town boundaries and such. I've been able to display the map on a web page using either OpenLayers.Layer.MapServer or OpenLayers.Layer.WMS (through the mapserv cgi). I can zoom in, zoom out, pan and I can switch layers on and off. In order to make this project functional for the intended end users, I need to be able to "grab" the value of a single attribute of the parcels layer by clicking on a particular parcel polygon, send that value to a MySQL database query to obtain additional parcel data and then return the results to another area of the web page. The parcels layer is one of the transparent overlays if that makes any difference. I've already got a database query that works by entering an owner name or parcel ID number into an HTML form, but I need to be able to get a parcel ID number from the map into the database query by clicking on the map. Like I said before, I'm looking for the simplest approach possible. Any help would be appreciated. -- Glenn D. Rowe Director of General Services Lancaster County, Virginia From michael.ocleirigh at rivulet.ca Tue Aug 11 12:01:37 2009 From: michael.ocleirigh at rivulet.ca (Michael O'Cleirigh) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Is there any way to avoid loading spatial data when using OpenLayers.Control.GetFeature? Message-ID: <4A8195E1.3030402@rivulet.ca> Hello, I have a WMS layer containing various polygons that are used to subdivide a map. The boundaries run along the street center line and rivers, etc. It is a transparent layer sitting on top of google maps. When the user clicks on the map I want to use WFS to get the zone number of the polygon that contains the clicked point. But the problem is that I don't need the geographic detail of the zone. I add the zone number into the WMS layer logical filter which toggles the polygon visibility. Because the performance is slow I want to avoid fetching the spatial data as part of the WFS request. In the browser I can add a 'propertyName' parameter and this will constrain the attributes returned to only include the zone number (i.e. to exclude the spatial column). But I can't figure out how to do this to a OpenLayers.Protocol.WFS object. Does anyone have an example of how I can do this? or do I need to craft a custom OpenLayers.Request call? Thanks for your help, Mike References: The control is registered as: control = new OpenLayers.Control.GetFeature( { protocol : OpenLayers.Protocol.WFS.fromWMSLayer(wmsLayer), box : false, hover : false, multiple : false, click : true, clickout : false, toggle : false, clickTolerance : 0, maxFeatures : 5 }); My click hander is: control.events.register("featureselected", this, function(e) { // get the zone number from the feature attributes returned through WFS var selectedZone = e.feature.attributes[this.zoneFilterName]; if (this.containsZone(selectedZone) == 1) { // this is a remove this.removeZoneFromFilter(selectedZone); } else { // this is an add this.addZoneToFilter(selectedZone); } // update the filters on this.wmsLayer this.update(); }); In Browser WFS request: If I run the WFS GET query in the browser I can add a propertyName parameter that will cause only that named value to be returned http://10.0.16.100:8081/geoserver/wfs?request=GetFeature&service=WFS&version=1.1.0&typeName=zone_boundary&srs=urn:x-ogc:def:crs:EPSG:900913&maxfeatures=1&propertyName=zoneNumber Response: 1 From jay.douillard at ubc.ca Tue Aug 11 14:26:34 2009 From: jay.douillard at ubc.ca (Jay Douillard) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Trying to query a database with attribute obtained from a mouse click In-Reply-To: <5843666.359631250015164909.JavaMail.root@verrazzano> Message-ID: <17084672.359651250015194212.JavaMail.root@verrazzano> Glenn, This should get you started: http://trac.openlayers.org/wiki/GetFeatureInfo Jay ----- Original Message ----- From: "Glenn Rowe" To: users@openlayers.org Sent: Tuesday, August 11, 2009 8:12:06 AM GMT -08:00 US/Canada Pacific Subject: [OpenLayers-Users] Trying to query a database with attribute obtained from a mouse click I'm looking for the simplest possible solution to a problem I'm having with a mapping project. I'm still struggling to figure out OpenLayers, so bear with me. I have a map with 3 base layers and 2 transparent overlays, all generated from shapefiles that are produced and maintained in-house. This project is for a county government web site and the layers depict roads, parcels, town boundaries and such. I've been able to display the map on a web page using either OpenLayers.Layer.MapServer or OpenLayers.Layer.WMS (through the mapserv cgi). I can zoom in, zoom out, pan and I can switch layers on and off. In order to make this project functional for the intended end users, I need to be able to "grab" the value of a single attribute of the parcels layer by clicking on a particular parcel polygon, send that value to a MySQL database query to obtain additional parcel data and then return the results to another area of the web page. The parcels layer is one of the transparent overlays if that makes any difference. I've already got a database query that works by entering an owner name or parcel ID number into an HTML form, but I need to be able to get a parcel ID number from the map into the database query by clicking on the map. Like I said before, I'm looking for the simplest approach possible. Any help would be appreciated. -- Glenn D. Rowe Director of General Services Lancaster County, Virginia _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From rodolfoamoreno at gmail.com Tue Aug 11 15:33:29 2009 From: rodolfoamoreno at gmail.com (Rodolfo Moreno) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Bug in Google with overaly example In-Reply-To: References: <1249684505845-3407076.post@n2.nabble.com> Message-ID: <1250019209158-3426344.post@n2.nabble.com> Thanks Eric for your answer. I am overlapping a mapguide layer. I did what you suggested but it's not working. var dynamicOverlayOptions = { buffer: 1, singleTile: true, isBaseLayer : false, visibility : true, transparent:true // This is the code added }; Is this property (transparent:true) new? I ask about it because my sample works fine 3 months ago. Thanks in advance Eric Lemoine-2-2 wrote: > > On Sat, Aug 8, 2009 at 12:35 AM, Rodolfo Moreno > wrote: >> >> Hi all, >> The google with overlay example from >> "http://openlayers.org/dev/examples/" >> is working incorrectly. The bug is not only because the worldmap is not >> loaded correctly but also because this is covering whole the map and thus >> the google layer is not showed, just the worldmap is showed. if you turn >> off >> the worldmap layer then it's possible to view the google layer. I >> realized >> about it because I have a similar example overlaping google maps with >> mapguide layers and 3 months ago this sample worked appropriately (in >> that >> moment the last release was 2.6 version) and now I got the same bug, it >> means that mapguide layers covers whole map that don't enable to view the >> google layers. > > The layer you put on top of the google layer must be transparent. If > your layer if a WMS layer (OpenLayers.Layer.WMS) use transparent:true > in the layer params. > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > ----- Rodolfo Moreno CivilEng -- View this message in context: http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3426344.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mak.kolybabi at telenium.ca Tue Aug 11 16:37:21 2009 From: mak.kolybabi at telenium.ca (Mak Kolybabi) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Fetching tiles from different sources based on zoom level Message-ID: <20090811203721.GA11398@throckmorton> For my current application, I need to simplify roads as much as possible. PostGIS provides the ST_Simplify function for this, and it works wonderfully. For obvious reasons, the closer I zoom into the layer, the simplifications that were fine when zoomed further out gradually become unacceptable. Is there a way to make OpenLayers query a different (TMS) source based on the zoom level? If this can be done, I'll be able to tune the ST_Simplify tolerance parameter for each zoom level. -- Mak Kolybabi Programmer Telenium Inc. 204-957-2821 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090811/960ffd69/attachment.bin From crschmidt at metacarta.com Tue Aug 11 16:49:23 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Fetching tiles from different sources based on zoom level In-Reply-To: <20090811203721.GA11398@throckmorton> References: <20090811203721.GA11398@throckmorton> Message-ID: <20090811204922.GB31194@metacarta.com> On Tue, Aug 11, 2009 at 03:37:21PM -0500, Mak Kolybabi wrote: > For my current application, I need to simplify roads as much as possible. PostGIS provides > the ST_Simplify function for this, and it works wonderfully. For obvious reasons, the > closer I zoom into the layer, the simplifications that were fine when zoomed further out > gradually become unacceptable. > > Is there a way to make OpenLayers query a different (TMS) source based on the zoom level? > If this can be done, I'll be able to tune the ST_Simplify tolerance parameter for each > zoom level. Why not use scale-dependant rendering on the backend to select a different datasource/layer when zoomed in vs. zoomed out? Regards, -- Christopher Schmidt MetaCarta From Gerhard.Duennebeil at chello.at Wed Aug 12 01:44:38 2009 From: Gerhard.Duennebeil at chello.at (=?ISO-8859-1?Q?Gerhard_D=FCnnebeil?=) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Problems with IE8 and GeoJSON Message-ID: <4A8256C6.7040804@chello.at> Hi everybody. Not sure this problem already got discussed, if yes.....please give me a pointer to it. Otherwise ..... I try to display a vector layer using a fixed strategy and GeoJSON. Things work fine under Firefox. When I test things with IE8, things fail. I run IE8 in default mode, no special headers or anything set on the web page that holds the map or elsewhere. I digged deeper into it and found the following strange behaviour: When the Layer is about to be drawn, data is fetched from the net and converted from JSON to java script. This happens in the read method (GEOjson.js/Line 64, see code excerpt below) A bit below (line 69) the conversion is done into the variable "obj". When you look at the "obj" variable at this point it holds an array named features *but* the feature array has *no* length property. Otherwise the array is correct with respect to the input data. In line 108 this feature array is iterated with a reference to the length property. When IE8 interprets this statement the feature array suddenly *has* a length property but it is wrong (too big, 3 instead of 2). As a follow-up error this causes the loop to break via the catch block when features[2] is accessed and gives back an empty result instead of the expected. Is this a known problem? How to work around it? thanks for any help and best regards Gerhard ------------------------------------------ Appendix 1, the code mentioned above) read: function(json, type, filter) { type = (type) ? type : "FeatureCollection"; var results = null; var obj = null; if (typeof json == "string") { line 69: obj = OpenLayers.Format.JSON.prototype.read.apply(this, [json, filter]); } else { obj = json; } if(!obj) { OpenLayers.Console.error("Bad JSON: " + json); } else if(typeof(obj.type) != "string") { OpenLayers.Console.error("Bad GeoJSON - no type: " + json); } else if(this.isValidType(obj, type)) { switch(type) { case "Geometry": try { results = this.parseGeometry(obj); } catch(err) { OpenLayers.Console.error(err); } break; case "Feature": try { results = this.parseFeature(obj); results.type = "Feature"; } catch(err) { OpenLayers.Console.error(err); } break; case "FeatureCollection": // for type FeatureCollection, we allow input to be any type results = []; switch(obj.type) { case "Feature": try { results.push(this.parseFeature(obj)); } catch(err) { results = null; OpenLayers.Console.error(err); } break; case "FeatureCollection": line 108: for(var i=0, len=obj.features.length; i References: <4A8195E1.3030402@rivulet.ca> Message-ID: On Tue, Aug 11, 2009 at 6:01 PM, Michael O'Cleirigh wrote: > Hello, > > I have a WMS layer containing various polygons that are used to > subdivide a map. ?The boundaries run along the street center line and > rivers, etc. It is a transparent layer sitting on top of google maps. > > When the user clicks on the map I want to use WFS to get the zone number > of the polygon that contains the clicked point. > > But the problem is that I don't need the geographic detail of the zone. > I add the zone number into the WMS layer logical filter which toggles > the polygon visibility. > > Because the performance is slow I want to avoid fetching the spatial > data as part of the WFS request. > > In the browser I can add a 'propertyName' parameter and this will > constrain the attributes returned to only include the zone number (i.e. > to exclude the spatial column). ?But I can't figure out how to do this > to a OpenLayers.Protocol.WFS object. > > Does anyone have an example of how I can do this? or do I need to craft > a custom OpenLayers.Request call? > > Thanks for your help, > > Mike > > References: > > The control is registered as: > > control = new OpenLayers.Control.GetFeature( { > ? ? ? ?protocol : OpenLayers.Protocol.WFS.fromWMSLayer(wmsLayer), You can try OpenLayers.Protocol.WFS.fromWMSLayer(wmsLayer, { formatOptions: { propertyNames: ["name1", "name2"] } }) I haven't tested it myself but that may work. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From francois.vanderbiest at camptocamp.com Wed Aug 12 02:43:34 2009 From: francois.vanderbiest at camptocamp.com (=?ISO-8859-1?Q?Fran=E7ois_Van_Der_Biest?=) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Is there any way to avoid loading spatial data when using OpenLayers.Control.GetFeature? In-Reply-To: <4A8195E1.3030402@rivulet.ca> References: <4A8195E1.3030402@rivulet.ca> Message-ID: Why not just use a WMS GetFeatureInfo request for that purpose ? You should be able to get only the attributes, and no geometry in the response. Cheers, F. On Tue, Aug 11, 2009 at 6:01 PM, Michael O'Cleirigh wrote: > Hello, > > I have a WMS layer containing various polygons that are used to > subdivide a map. ?The boundaries run along the street center line and > rivers, etc. It is a transparent layer sitting on top of google maps. > > When the user clicks on the map I want to use WFS to get the zone number > of the polygon that contains the clicked point. > > But the problem is that I don't need the geographic detail of the zone. > I add the zone number into the WMS layer logical filter which toggles > the polygon visibility. > > Because the performance is slow I want to avoid fetching the spatial > data as part of the WFS request. > > In the browser I can add a 'propertyName' parameter and this will > constrain the attributes returned to only include the zone number (i.e. > to exclude the spatial column). ?But I can't figure out how to do this > to a OpenLayers.Protocol.WFS object. > > Does anyone have an example of how I can do this? or do I need to craft > a custom OpenLayers.Request call? > > Thanks for your help, > > Mike > From igrcic at gmail.com Wed Aug 12 03:42:05 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Fetching tiles from different sources based on zoom level In-Reply-To: <20090811204922.GB31194@metacarta.com> References: <20090811203721.GA11398@throckmorton> <20090811204922.GB31194@metacarta.com> Message-ID: hi, maybe this could help: http://n2.nabble.com/A-kind-of-MultiLayer-container-td3379027.html#a3379027 and for vectors: http://openlayers.org/pipermail/users/2009-January/009666.html On Tue, Aug 11, 2009 at 10:49 PM, Christopher Schmidt wrote: > On Tue, Aug 11, 2009 at 03:37:21PM -0500, Mak Kolybabi wrote: >> For my current application, I need to simplify roads as much as possible. PostGIS provides >> the ST_Simplify function for this, and it works wonderfully. For obvious reasons, the >> closer I zoom into the layer, the simplifications that were fine when zoomed further out >> gradually become unacceptable. >> >> Is there a way to make OpenLayers query a different (TMS) source based on the zoom level? >> If this can be done, I'll be able to tune the ST_Simplify tolerance parameter for each >> zoom level. > > Why not use scale-dependant rendering on the backend to select a different > datasource/layer when zoomed in vs. zoomed out? > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From max.weidemann at freenet.de Wed Aug 12 07:18:35 2009 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] OpenLayers site it's down? 2009-08-12 Message-ID: <1250075915138-3430054.post@n2.nabble.com> Hi everybody I tried loading the openlayers.org sites for nearly 6 hours but the sites are not found. Is there a problem with the server?? Has anyone an information when the sites are on again?? Thanks Max -- View this message in context: http://n2.nabble.com/OpenLayers-site-it%27s-down--2009-08-12-tp3430054p3430054.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From patzke at geoinformationsdienst.de Wed Aug 12 08:04:50 2009 From: patzke at geoinformationsdienst.de (Fabian Patzke) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Switching projection on loaded map In-Reply-To: References: Message-ID: <1250078690214-3430249.post@n2.nabble.com> If anyone is interested how I solved my problem, see below. Fabian Patzke wrote: > > I want to build an option in my OL map app so that a user can switch the > used > projection of the map to another. > For example my map is in EPSG:4326. Than I add some layers to the map and > the > user can use the map. If one want it should be possible to switch to > EPSG:32632 > via a button and the map should be reloaded with the new projection. > > My problem is, that it is not possible to set the map.projection once a > layer > has been added. I've tried it and it can only be set with > map.setOptions(...) as > long no layer has been loaded. > > Is there an easy way to reload/redraw/recreate the map or do I have to > destroy > the map an build it up with a new projection by hand? > I took all necessary information out of the map map.getProjection(); map.getCenter().lon; map.getCenter().lat; map.getZoom(); Destroy the map an then restart it with the transform parameters an new Projection, new units, and a new resolutionsArray. No big deal but not everything is solved out of the box with this solution. For example when you want to have the same layers visible as before the switch. We do it with saving our visibility and such stuff in a database. I think for a small map with only a few layers you could simply make another array an save there state inside. -- View this message in context: http://n2.nabble.com/Switching-projection-on-loaded-map-tp3011928p3430249.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tobias.wendorff at uni-dortmund.de Wed Aug 12 10:12:20 2009 From: tobias.wendorff at uni-dortmund.de (Tobias Wendorff) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] openlayers.org down => maps down Message-ID: <4A82CDC4.5040508@uni-dortmund.de> Hi there, openlayers.org seems to be unreachable (down or DoS attact?). The result is that all maps, which are "hardcoded" to openlayers.js on openlayers.org don't work anymore. Nice :-) Best regards, Tobias From kgalligan at gmail.com Wed Aug 12 10:10:04 2009 From: kgalligan at gmail.com (Kevin Galligan) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] openlayers.org down => maps down In-Reply-To: <4A82CDC4.5040508@uni-dortmund.de> References: <4A82CDC4.5040508@uni-dortmund.de> Message-ID: Since the js is a static file, I'd suggest the obvious. Host it on your own site. Less dependencies is good. On Wed, Aug 12, 2009 at 10:12 AM, Tobias Wendorff wrote: > Hi there, > > openlayers.org seems to be unreachable (down or DoS attact?). > > The result is that all maps, which are "hardcoded" to openlayers.js > on openlayers.org don't work anymore. > > Nice :-) > > Best regards, > Tobias > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- -------------------- Kevin Galligan www.kagii.com From igrcic at gmail.com Wed Aug 12 10:10:27 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] openlayers.org down => maps down In-Reply-To: <4A82CDC4.5040508@uni-dortmund.de> References: <4A82CDC4.5040508@uni-dortmund.de> Message-ID: On Wed, Aug 12, 2009 at 4:12 PM, Tobias Wendorff wrote: > Hi there, > > openlayers.org seems to be unreachable (down or DoS attact?). > > The result is that all maps, which are "hardcoded" to openlayers.js > on openlayers.org don't work anymore. > > Nice :-) Hi, ther's no need for these kind of comments, im sure guys will solve the problem as soon as they can. Cheers > > Best regards, > Tobias > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From patzke at geoinformationsdienst.de Wed Aug 12 11:31:19 2009 From: patzke at geoinformationsdienst.de (Fabian Patzke) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Switch from one SLD to another In-Reply-To: <1250006293575-3424781.post@n2.nabble.com> References: <1250006293575-3424781.post@n2.nabble.com> Message-ID: <1250091079270-3431558.post@n2.nabble.com> TJMartin wrote: > > I have a shapefile loaded into GeoServer with 2 different SLDs to style > the data differently depending a customer requirement. > In OpenLayers i call the WMS with the various options (extents,projection > etc) > My map works but only with the SLD i attach to the data in geoserver. What > i want is a button on the client side to switch to the second SLD. > My openlayers code looks like this > > [...] > > and the two SLDs are > > simple.sld > newstyle.sld > You can merge a sld parameter to the layer with layer.mergeNewParams({SLD: sldURL}); i.e.: layer.mergeNewParams({SLD: "http://localhost/SLD/simple.sld"}); sldURL should be the URL of your desired SLD. So the SLD must be reachable for your geoserver via that URL. Maybe this helps you a bit. Greetings, Fabian -- View this message in context: http://n2.nabble.com/Switch-from-one-SLD-to-another-tp3424781p3431558.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Aug 12 12:00:43 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] OpenLayers site it's down? 2009-08-12 In-Reply-To: <1250075915138-3430054.post@n2.nabble.com> References: <1250075915138-3430054.post@n2.nabble.com> Message-ID: <20090812160041.GE31194@metacarta.com> On Wed, Aug 12, 2009 at 06:18:35AM -0500, Max Weidemann wrote: > > Hi everybody > > I tried loading the openlayers.org sites for nearly 6 hours but the sites > are not found. > Is there a problem with the server?? Sort of. > Has anyone an information when the sites are on again?? Now. :) Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Aug 12 12:01:44 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] openlayers.org down => maps down In-Reply-To: References: <4A82CDC4.5040508@uni-dortmund.de> Message-ID: <20090812160143.GF31194@metacarta.com> On Wed, Aug 12, 2009 at 10:10:04AM -0400, Kevin Galligan wrote: > Since the js is a static file, I'd suggest the obvious. Host it on > your own site. Less dependencies is good. Agreed. Host your own OL.js: First, you can build the one you need (saves bandwidth and time for your users), and second, you don't depend on me being around :) -- Chris > On Wed, Aug 12, 2009 at 10:12 AM, Tobias > Wendorff wrote: > > Hi there, > > > > openlayers.org seems to be unreachable (down or DoS attact?). > > > > The result is that all maps, which are "hardcoded" to openlayers.js > > on openlayers.org don't work anymore. > > > > Nice :-) > > > > Best regards, > > Tobias > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > -- > -------------------- > Kevin Galligan > www.kagii.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From Aaron_Gundel at sjwater.com Wed Aug 12 18:57:23 2009 From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling Message-ID: Hello, I am fairly new to the vector layers within openlayers and I had a question about their usage. I'm trying to use the gml layer to display data from a wfs. (If you're wondering why I'm not using the wfs layer, it's because I couldn't find a method to change the wfs url and reload the layer in the wfs layer -- whereas such a method exists within the gml layer, seturl). It's not working. I'm using geoserver for the wfs and getting a single feature which I want to display in the gml layer. I don't know if this is just some inherent incompatibility or if I'm not styling the gml layer properly (I've been experimenting with points that are being retrieved through the wfs.) var style = new OpenLayers.Style(); var rule = new OpenLayers.Rule( { symbolizer: {pointRadius: 10, fillColor: "green", fillOpacity: 0.5, strokeColor: "black"} }); style.addRules([rule]); var gmlLayer = new OpenLayers.Layer.GML("GML","http://mywfscall/wfs", {styleMap:new OpenLayers.StyleMap(style)}); return gmlLayer; Anyway, I've confirmed that my wfs call is definitely returning gml -- I just can't get it to display. Can anyone help me out here? Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090812/8b694413/attachment.html From crschmidt at metacarta.com Wed Aug 12 21:46:08 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling In-Reply-To: References: Message-ID: <20090813014608.GH31194@metacarta.com> On Wed, Aug 12, 2009 at 03:57:23PM -0700, Aaron_Gundel@sjwater.com wrote: > Hello, > > I am fairly new to the vector layers within openlayers and I had a > question about their usage. I'm trying to use the gml layer to display > data from a wfs. (If you're wondering why I'm not using the wfs layer, > it's because I couldn't find a method to change the wfs url and reload the > layer in the wfs layer -- whereas such a method exists within the gml > layer, seturl). It's not working. I'm using geoserver for the wfs and > getting a single feature which I want to display in the gml layer. I > don't know if this is just some inherent incompatibility or if I'm not > styling the gml layer properly (I've been experimenting with points that > are being retrieved through the wfs.) > > var style = new OpenLayers.Style(); > var rule = new OpenLayers.Rule( > { > symbolizer: {pointRadius: 10, fillColor: "green", fillOpacity: 0.5, > strokeColor: "black"} > }); > style.addRules([rule]); > var gmlLayer = new OpenLayers.Layer.GML("GML","http://mywfscall/wfs", > {styleMap:new OpenLayers.StyleMap(style)}); > return gmlLayer; > > Anyway, I've confirmed that my wfs call is definitely returning gml -- I > just can't get it to display. Can anyone help me out here? is your HTML page hosted at http://mywfscall/htmlpage.html? That is, does it share the same origin -- protocol (http), domain (mywfscall), port (80)? If not, then you are violating the same origin policy, and need to set up a proxy: http://faq.openlayers.org/proxyhost/all/ Regards, -- Christopher Schmidt MetaCarta From azxc_0000 at yahoo.com.cn Wed Aug 12 21:58:34 2009 From: azxc_0000 at yahoo.com.cn (=?utf-8?B?6I656I65IOadjg==?=) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] about Navigation and Box Control Message-ID: <133009.25562.qm@web15104.mail.cnb.yahoo.com> Hi: ????? I have a problem,i can't use Navigation Control(OpenLayers.Control.Navigation()) when i have used Box Control like this : ??? var control = new OpenLayers.Control(); ??????????????? OpenLayers.Util.extend(control, { ??????????????????? draw: function () { ??????????????????????? // this Handler.Box will intercept the shift-mousedown ??????????????????????? // before Control.MouseDefault gets to see it ??????????????????????? this.box = new OpenLayers.Handler.Box( control, ??????????????????????????? {"done": this.notice}, ??????????????????????????? {keyMask: OpenLayers.Handler.MOD_CTRL}); ??????????????????????? this.box.activate(); ??????????????????? }, ??????????????????? notice: function (bounds) { ??????????????????????? var ll = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom)); ??????????????????????? var ur = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top)); ??????????????????????? var rowlength = document.all("table1").rows.length; ??????????????????????? for(var i=1; ill.lon.toFixed(4)&&xll.lat.toFixed(4)&&y References: Message-ID: <1250147462778-3435995.post@n2.nabble.com> I made progress and it works now for me, but I stumbled over some weird behaviour further posting is an dev-list see: http://n2.nabble.com/Adding-Feature-to-WFS-in-Vector-Layer---Copying-Features-tp3416461p3435981.html Fabian Patzke wrote: > > I moved a bit further with my efforts. > My transaction is getting more and more > complete. But the Coordinates are still missing. > If anybody has an idea it would be great ;) > > xmlns:wfs="http://www.opengis.net/wfs" > service="WFS" > version="1.0.0" > xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd > http://www.FOO.BLA > http://FOO:8080/geoserver/wfs?Service=WFS&Request=DescribeFeatureType& > version=1.0.0&typename=foo:bla" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > xmlns:feature="http://FOO.BLA"> > > xmlns:gml="http://www.opengis.net/gml" > srsName="EPSG:31467"/> > > > > > > Before I try to commit a newly added feature I print out FID an geometry > of the > last features of the layer I added to. > As you can see below, I get the last > feature that has been in the layer before the add (FID: bla.203) and the > newly > added (FID: null). > So I do not get the reason why no geometry is in the transaction. > > FID: bla.203 #202: MULTIPOLYGON(((3440276.57 5791250.12,3440243.1 > 5791360.32,3440244.73 5791414.19,3440263.51 5791485.21,3440359.01 > 5791523.57,3440515.73 5791495.82,3440598.82 5791494.96,3440609.43 > 5791557.01,3440700.07 5791522.72,3440704.15 5791588.86,3440841.91 > 5791548.07,3440823.94 5791481.1,3440917.87 5791429.64,3440917.87 > 5791415.75,3440753.7 5791349.59,3440813.05 5791255.64,3440910.28 > 5791228.67,3440902.11 5791175.56,3440840.83 5791161.67,3440837.56 > 5791179.65,3440797.52 5791174.75,3440737.06 5791121.64,3440659.11 > 5791106.1,3440650.94 5791142.88,3440556.13 5791270.38,3440455.76 > 5791170.57,3440434.5 5791204.92,3440467.21 5791245.82,3440447.58 > 5791284.26,3440392.79 5791288.35,3440289.74 5791259.72, > 3440276.57 5791250.12))) > FID: null #203: MULTIPOLYGON(((3302091.4993788 5913241.9002485, > 3287274.8407132 5864558.5932041,3334547.0374084 5856797.486284, > 3360652.578867 5906891.9036775,3302091.4993788 5913241.9002485))) > > Any help would be nice. > > Greetings, > Fabian > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Adding-Feature-to-WFS-in-Vector-Layer---Copying-Features-tp3390769p3435995.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From surya.tarigan at yahoo.com Thu Aug 13 04:21:07 2009 From: surya.tarigan at yahoo.com (Surya Tarigan) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Automatic zooming to map points based on elements selected from drop-down lists Message-ID: <965178.82034.qm@web111919.mail.gq1.yahoo.com> Dear list, ? would somebody give hints or share javascript codes on how to automatically zooming to map points based on elements selected from drop-down lists.? ? best regards, ? surya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/e9c72351/attachment.html From thomas at buschhardt.de Thu Aug 13 05:50:22 2009 From: thomas at buschhardt.de (Thomas Buschhardt) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Using OpenLayers with a non WMS-Service Message-ID: <5FBFFE22-D24E-4F47-AA6E-C4ED05313702@buschhardt.de> Hallo, I want connect OpenLayers with a non WMS-map programm. I wrote a little php-Script as a bridge to this map-programm and Im able to request. I can zoom-in and pan in this map but Im unable to zoom-out. I think I dont understand the logic of the boundig-box of OpenLayers. I add a Image-Layer to OpenLayers and register an zoom/move-Event to this map to request the new coordinates. If the script get the event - it throws the function showmap (its al little bit Ajax) and I send this new coordinates to the map-server and get a array with picture-url and bbox-coordinates back. My problem is the understanding of layerExt and why I cant zoom-out. Thank You for help me out. Thomas Here is the code: function init(){ map = new OpenLayers.Map('map',{controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoom(), new OpenLayers.Control.MousePosition() ] }); //GIS-Karte Layer init - without picture var layerExt=new OpenLayers.Bounds(10.0,10.0,1000.0,1000.0); var layerSize=new OpenLayers.Size(500,500); layer=new OpenLayers.Layer.Image("GISDienstLayer","no- pic.jpg",layerExt,layerSize); map.addLayer(layer); map.events.register("moveend", this, function() { if (!noaction){ boundobj=this.map.getExtent(); bbox=boundobj.toArray(); lux=bbox[0]; luy=bbox[1]; rox=bbox[2]; roy=bbox[3]; noaction=true; showmap(); } } ); } function showmap(){ var anfrage=getXMLObject(); anfrage.open("POST","gismap.php",true); anfrage.onreadystatechange=function(){ if (anfrage.readyState==4){ if (anfrage.status==200){ var antwort=anfrage.responseText; pgAntwort=antwort.split("\t"); //destroy old layer map.removeLayer(layer); //Extent BBox of the actual Picture picurl=pgAntwort[0]; lux = parseFloat(pgAntwort[2]); luy = parseFloat(pgAntwort[3]); rox = parseFloat(pgAntwort[4]); roy = parseFloat(pgAntwort[5]); //maybe here is the problem var layerExt=new OpenLayers.Bounds(pgAntwort[2],pgAntwort[3],pgAntwort[4],pgAntwort[5]); var layerSize=new OpenLayers.Size(500,500); layer=new OpenLayers.Layer.Image("GISDienstLayer",picurl,layerExt,layerSize); map.addLayer(layer); //whats that? map.maxExtent= new OpenLayers.Bounds(4000000,5000000,5000000,6000000); map.zoomToMaxExtent(); noaction=false; } } } anfrage.setRequestHeader ("Content-Type", "application/x-www-form- urlencoded"); anfrage.send("cmd=getmap&lux="+escape(lux)+"&luy="+escape(luy) +"&rox="+escape(rox)+"&roy="+escape(roy)); } From rajeev.kumar.sharma at gmail.com Thu Aug 13 06:05:18 2009 From: rajeev.kumar.sharma at gmail.com (RajeevSharma) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Using Openlayers with Tile and Export Image doesnt "overlap" Message-ID: <1250157918424-3436851.post@n2.nabble.com> Hello, I am using Open Layers for the first time, and would like to display maps from multiple services. 1. A Tiled map service which forms the background. 2. One or more Dynamic map services which will be used to overlay on top of the first service. I am using the XYZ and ArcGIS93Rest respectively to do the same. The maps do display but their images arent synchronised. Meaning, the tiled layer image comes up on the top left part of the screen, and the export map from the Rest service comes up in the centre and larger than the tiled map. I tried tweaking around with the resolution param which didnt help much. The maps moved a bit closer until 4000 then they started moving apart. Setting this to "auto" didnt help either. The SRS is the same for both services. As are the map initial and final extents. Can any one please let me know if I am doing something wrong out here? Thanks, Rajeev -- View this message in context: http://n2.nabble.com/Using-Openlayers-with-Tile-and-Export-Image-doesnt-%22overlap%22-tp3436851p3436851.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From manuel.albela at gmail.com Thu Aug 13 06:12:00 2009 From: manuel.albela at gmail.com (Manuel Albela Miranda) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Selecting multiple features in the same point Message-ID: Hi everybody!, I have one GML layer where some of the points are in the same location, so I'm wondering if it's possible to get all the features that are at that location when you click on it by using the SelectFeature control or if there is another way to do that. Thank you very much in advance. Manu. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/89487cc0/attachment.html From igrcic at gmail.com Thu Aug 13 06:25:32 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Selecting multiple features in the same point In-Reply-To: References: Message-ID: Hi, cant you use box selection? Or it HAS to be click? On Thu, Aug 13, 2009 at 12:12 PM, Manuel Albela Miranda wrote: > Hi everybody!, > > I have one GML layer where some of the points are in the same location, so > I'm wondering if it's possible to get all the features that are at that > location when you click on it by using the SelectFeature control or if there > is another way to do that. > > Thank you very much in advance. > > Manu. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From manuel.albela at gmail.com Thu Aug 13 07:15:47 2009 From: manuel.albela at gmail.com (Manuel Albela Miranda) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Selecting multiple features in the same point In-Reply-To: References: Message-ID: Hi Ivan, I already have it working with the box selection, but for the user it will be easier to click on a point and get all the different features related to it. The selection box works perfect for multiple points, but when you need the precision of one point I think it will be more user friendly to use the click instead of the box. Thank you! Manu On Thu, Aug 13, 2009 at 12:25 PM, Ivan Grcic wrote: > Hi, cant you use box selection? Or it HAS to be click? > > On Thu, Aug 13, 2009 at 12:12 PM, Manuel Albela > Miranda wrote: > > Hi everybody!, > > > > I have one GML layer where some of the points are in the same location, > so > > I'm wondering if it's possible to get all the features that are at that > > location when you click on it by using the SelectFeature control or if > there > > is another way to do that. > > > > Thank you very much in advance. > > > > Manu. > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > > > -- > Ivan Grcic > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/f68e5a11/attachment.html From igrcic at gmail.com Thu Aug 13 07:35:42 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Selecting multiple features in the same point In-Reply-To: References: Message-ID: maybe faking selectBox after feature has been selected? onSelect : function(feature){ this.selectBox( /* calculate box from feature.geometry */) } On Thu, Aug 13, 2009 at 1:15 PM, Manuel Albela Miranda wrote: > Hi Ivan, > > I already have it working with the box selection, but for the user it will > be easier to click on a point and get all the different features related to > it. The selection box works perfect for multiple points, but when you need > the precision of one point I think it will be more user friendly to use the > click instead of the box. > > Thank you! > > Manu > > On Thu, Aug 13, 2009 at 12:25 PM, Ivan Grcic wrote: >> >> Hi, cant you use box selection? Or it HAS to be click? >> >> On Thu, Aug 13, 2009 at 12:12 PM, Manuel Albela >> Miranda wrote: >> > Hi everybody!, >> > >> > I have one GML layer where some of the points are in the same location, >> > so >> > I'm wondering if it's possible to get all the features that are at that >> > location when you click on it by using the SelectFeature control or if >> > there >> > is another way to do that. >> > >> > Thank you very much in advance. >> > >> > Manu. >> > >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> > >> >> >> >> -- >> Ivan Grcic > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From jerome.freyre at hispeed.ch Thu Aug 13 07:40:32 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Disappearing layers In-Reply-To: <1250158081909-3436866.post@n2.nabble.com> References: <1250158081909-3436866.post@n2.nabble.com> Message-ID: <1250163632706-3437329.post@n2.nabble.com> Hi Eoinyp, I watched your code. I think you made a mistake with the zoom level on the function map.setCenter(). Try to modify the line like that: map.setCenter(new OpenLayers.LonLat(17, 43), 12); It should work ;) Here is the copy of your code that I used and modify: map = new OpenLayers.Map("map"); map.addControl(new OpenLayers.Control.LayerSwitcher()); //create layer var velayer = new OpenLayers.Layer.VirtualEarth( "Roads Layer", { 'type': VEMapStyle.Road } ); var velayer2 = new OpenLayers.Layer.VirtualEarth( "Aerial Layer", { 'type': VEMapStyle.Aerial } ); map.addLayers([velayer, velayer2]); map.addControl(new OpenLayers.Control.PanZoomBar()); map.addControl(new OpenLayers.Control.ScaleLine()); map.addControl(new OpenLayers.Control.MousePosition()); map.setCenter(new OpenLayers.LonLat(17, 43), 12); Sincerly, J?rome eoinyp wrote: > > Im a newbie, having problem with my map layers. Which ever layer I add > first is visible when the map loads, but when I try to switch layers they > both disappear. I seem to be missing something fundamental, though I cant > figure out what!! > I am creating the layers and map as follows: > > init(){ > create layer 1 > create layer 2 > add([layer1,layer2]) > add[map controls] > } > > The map can be seen at: http://www.eoinmaca.com/maps/OpenLayers/mymap.htm > > Any help greatly appreciated, > Thanks, > > Eoinyp > -- View this message in context: http://n2.nabble.com/Disappearing-layers-tp3436866p3437329.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.freyre at hispeed.ch Thu Aug 13 07:43:21 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Selecting multiple features in the same point In-Reply-To: References: Message-ID: <1250163801347-3437344.post@n2.nabble.com> Hi Manuel, Another way should be the use of the cluster strategy. If you activate the strategy, all closest points are transform in one feature called cluster. And the cluster contains points so you can easily display informations about your points. http://openlayers.org/dev/examples/strategy-cluster.html Manuel Albela Miranda wrote: > > Hi everybody!, > > I have one GML layer where some of the points are in the same location, so > I'm wondering if it's possible to get all the features that are at that > location when you click on it by using the SelectFeature control or if > there > is another way to do that. > > Thank you very much in advance. > > Manu. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Selecting-multiple-features-in-the-same-point-tp3436892p3437344.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.freyre at hispeed.ch Thu Aug 13 07:49:57 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Automatic zooming to map points based on elements selected from drop-down lists In-Reply-To: <965178.82034.qm@web111919.mail.gq1.yahoo.com> References: <965178.82034.qm@web111919.mail.gq1.yahoo.com> Message-ID: <1250164197222-3437384.post@n2.nabble.com> Hi Surya, If you can recover coordinates of your elements in drop-down list, you can call the function : map.setCenter(new OpenLayers.LonLat(selectedElementLongitude, selectedElementLatitude)); And if there is multiple element selected, you have to create a bounding box and zoom to the extent: // Create a bounds bounds = new OpenLayers.Bounds(); // You can use a loop for for each selected eleement and assign their lon/lat bounds.extend(new OpenLayers.LonLat(4,5)); bounds.extend(new OpenLayers.LonLat(5,6)); // Zoom to the extent map.zoomToExtent(bounds); Sincerly, J?rome Surya Tarigan wrote: > > Dear list, > ? > would somebody give hints or share javascript codes on how to > automatically zooming to map points based on elements selected from > drop-down lists.? > ? > best regards, > ? > surya > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Automatic-zooming-to-map-points-based-on-elements-selected-from-drop-down-lists-tp3436326p3437384.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rahul_g_teni at yahoo.com Thu Aug 13 08:29:13 2009 From: rahul_g_teni at yahoo.com (Mr. Rahul Teni) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Fw: Projection issue Message-ID: <965524.94595.qm@web65616.mail.ac4.yahoo.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: india_states.map Type: application/octet-stream Size: 492 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/06e2a065/india_states.obj -------------- next part -------------- var options = { maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), maxResolution: 156543.0339, units: "m", projection: new OpenLayers.Projection("EPSG:900913")}; map = new OpenLayers.Map('map',options); map.events.on({"moveend": mapEvent}); var options = { projection: new OpenLayers.Projection("EPSG:900913"), units: "m", maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), TRANSPARENT: 'true', isBaseLayer:false }; var gphy = new OpenLayers.Layer.Google( " Physical", {'sphericalMercator': true,'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),type: G_PHYSICAL_MAP,numZoomLevels: 18,isBaseLayer: true} ); var gmap = new OpenLayers.Layer.Google( "Streets", // the default {'sphericalMercator': true,'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),numZoomLevels: 18,isBaseLayer : true} ); var ghyb = new OpenLayers.Layer.Google( "Hybrid", {'sphericalMercator': true,'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),type: G_HYBRID_MAP, numZoomLevels: 18,isBaseLayer: true} ); var gsat = new OpenLayers.Layer.Google( "Satellite", {'sphericalMercator':true,'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),type: G_SATELLITE_MAP, numZoomLevels:18,isBaseLayer:true} ); map.addLayers([gsat,gphy,gmap,ghyb]); indianStateBoundary = new OpenLayers.Layer.KaMap( "Indian State Boundary",tilePath, { map: "gmap", g: "__base__", i:"PNG", opacity:1, isBaseLayer:false, TRANSPARENT:'true' }, options ); map.addLayers([indianStateBoundary]); From crschmidt at metacarta.com Thu Aug 13 08:47:17 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Using Openlayers with Tile and Export Image doesnt "overlap" In-Reply-To: <1250157918424-3436851.post@n2.nabble.com> References: <1250157918424-3436851.post@n2.nabble.com> Message-ID: <20090813124710.GB14861@metacarta.com> On Thu, Aug 13, 2009 at 05:05:18AM -0500, RajeevSharma wrote: > > Hello, > I am using Open Layers for the first time, and would like to display maps > from multiple services. > > 1. A Tiled map service which forms the background. > 2. One or more Dynamic map services which will be used to overlay on top of > the first service. > > I am using the XYZ and ArcGIS93Rest respectively to do the same. The maps do > display but their images arent synchronised. Meaning, the tiled layer image > comes up on the top left part of the screen, and the export map from the > Rest service comes up in the centre and larger than the tiled map. > > I tried tweaking around with the resolution param which didnt help much. The > maps moved a bit closer until 4000 then they started moving apart. Setting > this to "auto" didnt help either. The SRS is the same for both services. As > are the map initial and final extents. > > Can any one please let me know if I am doing something wrong out here? the XYZ layer requires you to have correct maxExtent and maxResolution properties matchingthe grid set up in the tile cache creation configuration. Without this information, they will not line up. Your Tile Cache metadata may provide this information, or you may need to consult some othr resource to find it. Sharing a link to the tiles you are trying to use, as well as the code you are using to try to use thm, may be helpful. Best Regards, -- Christopher Schmidt MetaCarta From Kai-Behncke at gmx.de Thu Aug 13 08:52:26 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Defining WFS-filter dynamically Message-ID: <20090813125226.28820@gmx.net> Dear users, I try to set a WFS-filter dynamically. I set an array with: for(var i=0;i 1) { var filter = new OpenLayers.Filter.Logical({ type: OpenLayers.Filter.Logical.OR, filters: filter_array }); } else { var filter = filter_array[0]; } filter_body = xml.write(filter_1_0.write(filter)); ...but I always get an error: uncaught exception: Filter writing not supported for rule type: undefined Has anybody an idea what could be wrong? Thank you very much, Kai -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From eoinyp at yahoo.com Thu Aug 13 09:52:19 2009 From: eoinyp at yahoo.com (eoinyp) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Disappearing layers In-Reply-To: <1250163632706-3437329.post@n2.nabble.com> References: <1250158081909-3436866.post@n2.nabble.com> <1250163632706-3437329.post@n2.nabble.com> Message-ID: <1250171539753-3438091.post@n2.nabble.com> Perfect! :) Thank you Jerome. --- On Thu, 13/8/09, Jerome Freyre (via Nabble) wrote: From: Jerome Freyre (via Nabble) Subject: Re: [OpenLayers-Users] Disappearing layers To: "eoinyp" Date: Thursday, 13 August, 2009, 12:40 PM Hi Eoinyp, I watched your code. I think you made a mistake with the zoom level on the function map.setCenter(). Try to modify the line like that: map.setCenter(new OpenLayers.LonLat(17, 43), 12); It should work ;) Here is the copy of your code that I used and modify: ? ? ? ? ? ? ? ? map = new OpenLayers.Map("map"); ? ? ? ? ? ? ? ? map.addControl(new OpenLayers.Control.LayerSwitcher()); ? ? ? ? ? ? ? ? ? ? ? ? //create layer ? ? ? ? ? ? ? ? var ?velayer = new OpenLayers.Layer.VirtualEarth( ? ? ? ? ? ? ? ? ? ? ? ? "Roads Layer", ? ? ? ? ? ? ? ? ? ? ? ? { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'type': VEMapStyle.Road ? ? ? ? ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? ); ? ? ? ? ? ? ? ? ? ? ? ? var velayer2 = new OpenLayers.Layer.VirtualEarth( ? ? ? ? ? ? ? ? ? ? ? ? "Aerial Layer", ? ? ? ? ? ? ? ? ? ? ? ? { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'type': VEMapStyle.Aerial ? ? ? ? ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? ); ? ? ? ? ? ? ? ? map.addLayers([velayer, velayer2]); ? ? ? ? ? ? ? ? map.addControl(new OpenLayers.Control.PanZoomBar()); ? ? ? ? ? ? ? ? map.addControl(new OpenLayers.Control.ScaleLine()); ? ? ? ? ? ? ? ? map.addControl(new OpenLayers.Control.MousePosition()); ? ? ? ? ? ? ? ? map.setCenter(new OpenLayers.LonLat(17, 43), 12); Sincerly, J?rome eoinyp wrote: Im a newbie, having problem with my map layers. Which ever layer I add first is visible when the map loads, but when I try to switch layers they both disappear. I seem to be missing something fundamental, though I cant figure out what!! I am creating the layers and map as follows: ?init(){ create layer 1 create layer 2 add([layer1,layer2]) add[map controls] } The map can be seen at: http://www.eoinmaca.com/maps/OpenLayers/mymap.htm Any help greatly appreciated, Thanks, Eoinyp View message @ http://n2.nabble.com/Disappearing-layers-tp3436866p3437329.html To unsubscribe from Disappearing layers, click here. -- View this message in context: http://n2.nabble.com/Disappearing-layers-tp3436866p3438091.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/2a132934/attachment.html From jerome.freyre at hispeed.ch Thu Aug 13 09:56:54 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Disappearing layers In-Reply-To: <1250171539753-3438091.post@n2.nabble.com> References: <1250158081909-3436866.post@n2.nabble.com> <1250163632706-3437329.post@n2.nabble.com> <1250171539753-3438091.post@n2.nabble.com> Message-ID: <1250171814878-3438116.post@n2.nabble.com> You're welcome ;) Le 13 ao?t 09 ? 15:52, eoinyp (via Nabble) a ?crit : > Perfect! :) > Thank you Jerome. > > --- On Thu, 13/8/09, Jerome Freyre (via Nabble) <[hidden email]> > wrote: > > From: Jerome Freyre (via Nabble) <[hidden email]> > Subject: Re: [OpenLayers-Users] Disappearing layers > To: "eoinyp" <[hidden email]> > Date: Thursday, 13 August, 2009, 12:40 PM > > Hi Eoinyp, > > I watched your code. I think you made a mistake with the zoom level > on the function map.setCenter(). > > Try to modify the line like that: > map.setCenter(new OpenLayers.LonLat(17, 43), 12); > > It should work ;) > > Here is the copy of your code that I used and modify: > map = new OpenLayers.Map("map"); > map.addControl(new > OpenLayers.Control.LayerSwitcher()); > > //create layer > var velayer = new OpenLayers.Layer.VirtualEarth( > "Roads Layer", > { > 'type': VEMapStyle.Road > } > ); > > var velayer2 = new OpenLayers.Layer.VirtualEarth( > "Aerial Layer", > { > 'type': VEMapStyle.Aerial > } > ); > > map.addLayers([velayer, velayer2]); > > > map.addControl(new OpenLayers.Control.PanZoomBar()); > map.addControl(new OpenLayers.Control.ScaleLine()); > map.addControl(new > OpenLayers.Control.MousePosition()); > > > map.setCenter(new OpenLayers.LonLat(17, 43), 12); > > Sincerly, > J??rome > > > eoinyp wrote: > Im a newbie, having problem with my map layers. Which ever layer I > add first is visible when the map loads, but when I try to switch > layers they both disappear. I seem to be missing something > fundamental, though I cant figure out what!! > I am creating the layers and map as follows: > > init(){ > create layer 1 > create layer 2 > add([layer1,layer2]) > add[map controls] > } > > The map can be seen at: http://www.eoinmaca.com/maps/OpenLayers/mymap.htm > > Any help greatly appreciated, > Thanks, > > Eoinyp > > > View message @ http://n2.nabble.com/Disappearing-layers-tp3436866p3437329.html > To unsubscribe from Disappearing layers, click here. > > > > > View message @ http://n2.nabble.com/Disappearing-layers-tp3436866p3438091.html > To unsubscribe from Re: Disappearing layers, click here. > -- View this message in context: http://n2.nabble.com/Disappearing-layers-tp3436866p3438116.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/c7e23b6d/attachment.html From Aaron_Gundel at sjwater.com Thu Aug 13 12:44:32 2009 From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling In-Reply-To: <20090813014608.GH31194@metacarta.com> Message-ID: Sorry Christopher, I replied to you but I don't think I cc'd the list. Anyway... Yes, my html is hosted at a different origin. Yes, I am using a proxy. Yes, firebug is showing the file loading up. The URL does contain the requested data and the features are contained within the GML. Unfortunately no, there's no url to this right now as it's an intranet site. Poking around at this further, it looks to be some kind of namespace issue with what's coming out of geoserver not being read by openlayers. I know that the basic geometry is valid now, I swapped out some of the elements [for some I knew that worked, as per the gml example] and changed some namespace attributes and got it to work. But I can't serve this up from geoserver, hence the problem. Any idea how to work around this? Aaron Christopher Schmidt 08/12/2009 06:46 PM To Aaron_Gundel@sjwater.com cc users@openlayers.org Subject Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling On Wed, Aug 12, 2009 at 03:57:23PM -0700, Aaron_Gundel@sjwater.com wrote: > Hello, > > I am fairly new to the vector layers within openlayers and I had a > question about their usage. I'm trying to use the gml layer to display > data from a wfs. (If you're wondering why I'm not using the wfs layer, > it's because I couldn't find a method to change the wfs url and reload the > layer in the wfs layer -- whereas such a method exists within the gml > layer, seturl). It's not working. I'm using geoserver for the wfs and > getting a single feature which I want to display in the gml layer. I > don't know if this is just some inherent incompatibility or if I'm not > styling the gml layer properly (I've been experimenting with points that > are being retrieved through the wfs.) > > var style = new OpenLayers.Style(); > var rule = new OpenLayers.Rule( > { > symbolizer: {pointRadius: 10, fillColor: "green", fillOpacity: 0.5, > strokeColor: "black"} > }); > style.addRules([rule]); > var gmlLayer = new OpenLayers.Layer.GML("GML","http://mywfscall/wfs", > {styleMap:new OpenLayers.StyleMap(style)}); > return gmlLayer; > > Anyway, I've confirmed that my wfs call is definitely returning gml -- I > just can't get it to display. Can anyone help me out here? is your HTML page hosted at http://mywfscall/htmlpage.html? That is, does it share the same origin -- protocol (http), domain (mywfscall), port (80)? Does Firebug show the remote file getting loaded via XMLHttpRequest? Does the URL that is requestd contain data? Does the layer.features property have anything in it? Can you provide a link? If not, then you are violating the same origin policy, and need to set up a proxy: http://faq.openlayers.org/proxyhost/all/ Regards, -- Christopher Schmidt MetaCarta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/b322e845/attachment.html From crschmidt at metacarta.com Thu Aug 13 13:05:51 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling In-Reply-To: References: <20090813014608.GH31194@metacarta.com> Message-ID: <20090813170550.GF20270@metacarta.com> On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com wrote: > Sorry Christopher, I replied to you but I don't think I cc'd the list. > Anyway... > > Yes, my html is hosted at a different origin. Yes, I am using a proxy. > Yes, firebug is showing the file loading up. The URL does contain the > requested data and the features are contained within the GML. > Unfortunately no, there's no url to this right now as it's an intranet > site. > > Poking around at this further, it looks to be some kind of namespace issue > with what's coming out of geoserver not being read by openlayers. I know > that the basic geometry is valid now, I swapped out some of the elements > [for some I knew that worked, as per the gml example] and changed some > namespace attributes and got it to work. But I can't serve this up from > geoserver, hence the problem. Any idea how to work around this? It might be best to provide a minimal GML file that works and a minimal GML file that doesn't work, to show the differences, and perhaps help other people understand how to help you. Best Regards, -- Christopher Schmidt MetaCarta From esteban.olm at gmail.com Thu Aug 13 13:09:45 2009 From: esteban.olm at gmail.com (Esteban olm) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a different popup on click. [SOLVED] In-Reply-To: <4A793C07.9060105@romtelecom.ro> References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com> <4A793C07.9060105@romtelecom.ro> Message-ID: <1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com> Hi, I'm sorry, but I have a problem. When I implement this, I can "pan" the map, and when I go over a marker, A popup appears, and when I go out of the marker, the popup disappear. That's ok, but after the popup has appear an disappear, now I can not "pan" the map. Maybe the popup has deactivated something. Can anyone help me? Thanks Esteban Olm after a popup is how 2009/8/5 Adrian Popa > Following Alexandre's suggestion, here's what I did: > > ... //in init() > map.addLayer(markers); > //add the main select (for regular popups) > select = new OpenLayers.Control.SelectFeature(markers, {toggle:true, > clickout: true}); > markers.events.on({ "featureselected": onMarkerSelect, > "featureunselected": onMarkerUnselect}); > > //add the second select for tooltips: > var highlightCtrl = new OpenLayers.Control.SelectFeature(markers, { > hover: true, highlightOnly: true, renderIntent: "temporary", > eventListeners: { featurehighlighted: tooltipSelect, > featureunhighlighted: tooltipUnselect } }); > > //the order in which you add these lines seems to matter! > map.addControl(highlightCtrl); > map.addControl(select); > highlightCtrl.activate(); > select.activate(); > > ...//support functions > var lastFeature = null; > var tooltipPopup = null; > > function tooltipSelect(event){ > var feature = event.feature; > var selectedFeature = feature; > //if there is already an opened details window, don\'t draw the > tooltip > if(feature.popup != null){ > return; > } > //if there are other tooltips active, destroy them > if(tooltipPopup != null){ > map.removePopup(tooltipPopup); > tooltipPopup.destroy(); > if(lastFeature != null){ > delete lastFeature.popup; > tooltipPopup = null; > } > } > lastFeature = feature; > var tooltipPopup = new OpenLayers.Popup("activetooltip", > feature.geometry.getBounds().getCenterLonLat(), > new OpenLayers.Size(80,12), > " "+feature.attributes.name, > true ); > //this is messy, but I'm not a CSS guru > tooltipPopup.contentDiv.style.backgroundColor='ffffcb'; > tooltipPopup.closeDiv.style.backgroundColor='ffffcb'; > tooltipPopup.contentDiv.style.overflow='hidden'; > tooltipPopup.contentDiv.style.padding='3px'; > tooltipPopup.contentDiv.style.margin='0'; > tooltipPopup.closeOnMove = true; > tooltipPopup.autoSize = true; > feature.popup = tooltipPopup; > map.addPopup(tooltipPopup); > } > function tooltipUnselect(event){ > var feature = event.feature; > if(feature != null && feature.popup != null){ > map.removePopup(feature.popup); > feature.popup.destroy(); > delete feature.popup; > tooltipPopup = null; > lastFeature = null; > } > } > > function onMarkerSelect(event) { > //unselect any previous selections > tooltipUnselect(event); > var feature = event.feature; > var selectedFeature = feature; > var popup = new OpenLayers.Popup.FramedCloud("activeAlarm", > feature.geometry.getBounds().getCenterLonLat(), > new OpenLayers.Size(100,100), > "Loading... src='http://$server/map/symbols/ajax-loader.gif' border=0>", > null, true, onMarkerPopupClose ); > feature.popup = popup; > popup.setOpacity(0.7); > map.addPopup(popup); > //call ajax to get the data > loadDetails(feature.attributes.description); > } > function onMarkerUnselect(event) { > var feature = event.feature; > if(feature.popup) { > map.removePopup(feature.popup); > feature.popup.destroy(); > delete feature.popup; > } > } > function onMarkerPopupClose(evt) { > select.unselectAll(); > } > I hope this helps others trying to add this feature. > > Thanks again for your help. > > Regards, > Adrian > > Alexandre Dube wrote: > > Hi Adrian, > > > > Take a look at this example (1). You can use 2 SelectFeature > > controls for what you need, one with hover:true and > > highlightOnly:true, the other with hover false. The first one won't > > actually select the feature and you can register 3 kinds of > > "highlight" events (see the source) to display your small div/popup. > > > > Hope this helps, > > > > Alexandre > > > > (1) http://openlayers.org/dev/examples/highlight-feature.html > > > > Adrian Popa wrote: > >> Hello everyone, > >> > >> This is sort of a repeat message of "Re: [OpenLayers-Users] > >> Labels/Tooltips on mouse over a Vector layer" - but with a slightly > >> different idea. > >> > >> Problem: I want to display a small div/popup with the marker's name > >> when the user hovers his mouse over the location, and I want to > >> display a bigger popup when the user actually clicks on the location. > >> > >> Current status: > >> * I can use {hover: true} to register > >> featureselected/featureunselected when I hover over a marker instead > >> on when I click on the maker. > >> * I haven't found any events that could differentiate between hover > >> and click > >> > >> I'm thinking I could register my select control with hover: true and > >> allow featureselected to execute the same function for both when I > >> click on the makrer as well as when I hover over the marker. I would > >> like to know if there's any way to find out in the event inside the > >> function if the user clicked or not his mouse. Depending on this, I > >> would show one popup or the other. > >> > >> Something like: > >> > >> select = new OpenLayers.Control.SelectFeature(markers, > >> {clickout:true, hover:true}); > >> markers.events.on({ "featureselected": onMarkerSelect, > >> "featureunselected": onMarkerUnselect, "visibilitychanged": > >> onMarkerToggle }); > >> map.addControl(select); > >> select.activate(); > >> > >> function onMarkerSelect(event){ > >> var feature = event.feature; > >> //find out if the user clicked or not > >> var clicked = event.*findAWayToSeeIfTheUserClicked()*; > >> if(clicked){ > >> //show larger popup > >> } > >> else{ > >> //show smaller popup > >> } > >> } > >> > >> Suggestions are welcome. > >> > >> Thanks, > >> Adrian > >> ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > > > > > > > -- > --- > Adrian Popa > NOC Division > Network Engineer > Divizia Centrul National de Operare Retea > Departament Transport IP & Metro > Compartiment IP Core & Backbone > Phone: +40 21 400 3099 > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/c337c23a/attachment.html From Aaron_Gundel at sjwater.com Thu Aug 13 13:12:30 2009 From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling In-Reply-To: <20090813170550.GF20270@metacarta.com> Message-ID: Not a problem, Christopher... Here's the raw response I get back from geoserver (minus a couple of unrelated and superflouous elements)... -121.93380447,37.30239967 -121.93192514,37.30404022 -121.93380447,37.30239967 -121.93192514,37.30404022 -121.93192514,37.30239967 -121.93193417,37.30397591 -121.93193649,37.30398413 -121.93193987,37.30399212 -121.93194428,37.30399977 -121.93194967,37.30400702 -121.93195598,37.30401378 -121.93196313,37.30401997 -121.93197106,37.30402553 -121.93197967,37.3040304 -121.93198887,37.30403452 -121.93200793,37.30404022 -121.93227819,37.30402362 -121.93244372,37.30401651 -121.93260937,37.30401171 -121.9327751,37.30400922 -121.93380447,37.30399679 -121.93380408,37.30382777 -121.93380369,37.30366524 -121.93380331,37.30350359 -121.93380296,37.30335164 -121.93380258,37.30319194 -121.93380227,37.30305845 -121.93380187,37.30289095 -121.93380152,37.3027424 -121.93380111,37.30256592 -121.93380073,37.30240301 -121.93368572,37.30240281 -121.93346706,37.30240242 -121.93313702,37.30240183 -121.93279384,37.30240122 -121.93192514,37.30239967 If I modify this to fit into the mapserver namespace like so, It shows up correctly on the map. -121.93380447,37.30239967 -121.93192514,37.30404022 -121.93380447,37.30239967 -121.93192514,37.30404022 -121.93192514,37.30239967 -121.93193417,37.30397591 -121.93193649,37.30398413 -121.93193987,37.30399212 -121.93194428,37.30399977 -121.93194967,37.30400702 -121.93195598,37.30401378 -121.93196313,37.30401997 -121.93197106,37.30402553 -121.93197967,37.3040304 -121.93198887,37.30403452 -121.93200793,37.30404022 -121.93227819,37.30402362 -121.93244372,37.30401651 -121.93260937,37.30401171 -121.9327751,37.30400922 -121.93380447,37.30399679 -121.93380408,37.30382777 -121.93380369,37.30366524 -121.93380331,37.30350359 -121.93380296,37.30335164 -121.93380258,37.30319194 -121.93380227,37.30305845 -121.93380187,37.30289095 -121.93380152,37.3027424 -121.93380111,37.30256592 -121.93380073,37.30240301 -121.93368572,37.30240281 -121.93346706,37.30240242 -121.93313702,37.30240183 -121.93279384,37.30240122 -121.93192514,37.30239967 So I'm not sure what I can/should do about this. Obviously I can't modify the geoserver response, but I don't know if there's some vendor parameter that will correct the issue, or if I just can't use the gml layer at all. Thanks again... Christopher Schmidt 08/13/2009 10:05 AM To Aaron_Gundel@sjwater.com cc users@openlayers.org Subject Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com wrote: > Sorry Christopher, I replied to you but I don't think I cc'd the list. > Anyway... > > Yes, my html is hosted at a different origin. Yes, I am using a proxy. > Yes, firebug is showing the file loading up. The URL does contain the > requested data and the features are contained within the GML. > Unfortunately no, there's no url to this right now as it's an intranet > site. > > Poking around at this further, it looks to be some kind of namespace issue > with what's coming out of geoserver not being read by openlayers. I know > that the basic geometry is valid now, I swapped out some of the elements > [for some I knew that worked, as per the gml example] and changed some > namespace attributes and got it to work. But I can't serve this up from > geoserver, hence the problem. Any idea how to work around this? It might be best to provide a minimal GML file that works and a minimal GML file that doesn't work, to show the differences, and perhaps help other people understand how to help you. Best Regards, -- Christopher Schmidt MetaCarta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/454a066b/attachment.html From crschmidt at metacarta.com Thu Aug 13 13:19:04 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:44 2010 Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling In-Reply-To: References: <20090813170550.GF20270@metacarta.com> Message-ID: <20090813171903.GG20270@metacarta.com> On Thu, Aug 13, 2009 at 10:12:30AM -0700, Aaron_Gundel@sjwater.com wrote: > Not a problem, Christopher... > > Here's the raw response I get back from geoserver (minus a couple of > unrelated and superflouous elements)... > > ^^ Is this really the start of the file? Nothing else? This is clearly a problem, because there are no namespaces defined here, so this is invalid XML. It seems like something here is misconfigured on the server, so I'd take this to the GeoServer list and see if they have any ideas. I know that the GML support in OPenLayers was built entirely around GeoServer, so there's no reason to believe that it shouldn't/couldn't work. -- Chris > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > > > -121.93192514,37.30239967 -121.93193417,37.30397591 > -121.93193649,37.30398413 -121.93193987,37.30399212 > -121.93194428,37.30399977 -121.93194967,37.30400702 > -121.93195598,37.30401378 -121.93196313,37.30401997 > -121.93197106,37.30402553 -121.93197967,37.3040304 > -121.93198887,37.30403452 -121.93200793,37.30404022 > -121.93227819,37.30402362 -121.93244372,37.30401651 > -121.93260937,37.30401171 -121.9327751,37.30400922 > -121.93380447,37.30399679 -121.93380408,37.30382777 > -121.93380369,37.30366524 -121.93380331,37.30350359 > -121.93380296,37.30335164 -121.93380258,37.30319194 > -121.93380227,37.30305845 -121.93380187,37.30289095 > -121.93380152,37.3027424 -121.93380111,37.30256592 > -121.93380073,37.30240301 -121.93368572,37.30240281 > -121.93346706,37.30240242 -121.93313702,37.30240183 > -121.93279384,37.30240122 -121.93192514,37.30239967 > > > > > > > > > > > > If I modify this to fit into the mapserver namespace like so, It shows up > correctly on the map. > > > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:gml="http://www.opengis.net/gml" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > > > -121.93192514,37.30239967 -121.93193417,37.30397591 > -121.93193649,37.30398413 -121.93193987,37.30399212 > -121.93194428,37.30399977 -121.93194967,37.30400702 > -121.93195598,37.30401378 -121.93196313,37.30401997 > -121.93197106,37.30402553 -121.93197967,37.3040304 > -121.93198887,37.30403452 -121.93200793,37.30404022 > -121.93227819,37.30402362 -121.93244372,37.30401651 > -121.93260937,37.30401171 -121.9327751,37.30400922 > -121.93380447,37.30399679 -121.93380408,37.30382777 > -121.93380369,37.30366524 -121.93380331,37.30350359 > -121.93380296,37.30335164 -121.93380258,37.30319194 > -121.93380227,37.30305845 -121.93380187,37.30289095 > -121.93380152,37.3027424 -121.93380111,37.30256592 > -121.93380073,37.30240301 -121.93368572,37.30240281 > -121.93346706,37.30240242 -121.93313702,37.30240183 > -121.93279384,37.30240122 -121.93192514,37.30239967 > > > > > > > > > > > > So I'm not sure what I can/should do about this. Obviously I can't modify > the geoserver response, but I don't know if there's some vendor parameter > that will correct the issue, or if I just can't use the gml layer at all. > Thanks again... > > > > > Christopher Schmidt > 08/13/2009 10:05 AM > > To > Aaron_Gundel@sjwater.com > cc > users@openlayers.org > Subject > Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling > > > > > > > On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com wrote: > > Sorry Christopher, I replied to you but I don't think I cc'd the list. > > Anyway... > > > > Yes, my html is hosted at a different origin. Yes, I am using a proxy. > > Yes, firebug is showing the file loading up. The URL does contain the > > requested data and the features are contained within the GML. > > Unfortunately no, there's no url to this right now as it's an intranet > > site. > > > > Poking around at this further, it looks to be some kind of namespace > issue > > with what's coming out of geoserver not being read by openlayers. I > know > > that the basic geometry is valid now, I swapped out some of the elements > > > [for some I knew that worked, as per the gml example] and changed some > > namespace attributes and got it to work. But I can't serve this up from > > > geoserver, hence the problem. Any idea how to work around this? > > It might be best to provide a minimal GML file that works and a minimal > GML file that doesn't work, to show the differences, and perhaps help > other people understand how to help you. > > Best Regards, > -- > Christopher Schmidt > MetaCarta > -- Christopher Schmidt MetaCarta From Kai-Behncke at gmx.de Thu Aug 13 13:25:28 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Defining WFS-filter dynamically In-Reply-To: <20090813125226.28820@gmx.net> References: <20090813125226.28820@gmx.net> Message-ID: <20090813172528.39760@gmx.net> Dear users, > > I try to set a WFS-filter dynamically. I found a solution now. If I get e.g a list of comma-separated objekt_ids (4,20,56,.....) that shall be filtered in the wfs I do: suchobjekte = new String(suchobjekte); y=suchobjekte.split(","); var filter_body; var filter_header = '<'+'?xml version="1.0" encoding="ISO-8859-1"?>'; var filter_footer = ''; var filter_1_1 = new OpenLayers.Format.Filter({version: "1.1.0"}); var xml = new OpenLayers.Format.XML(); var wfs_url = "http://www.xyz.de/cgi-bin/mapserv?map=/............./ows.map"; if(y.length > 1) { filter_body_1=''; filter_body_2=""; filter_body_3=''; for(var i=0;i< y.length;i++){ alert (y[i]); filter_body_2= filter_body_2 +'objekt_id'+y[i]+''; } filter_body=filter_body_1 + filter_body_2 + filter_body_3; } else { var filter_body = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "objekt_id", value: y[0] }); filter_body = xml.write(filter_1_1.write(filter_body)); } var final_filter = filter_header+filter_body+filter_footer; req = new OpenLayers.Request.POST({ method: "POST", url: wfs_url, data: final_filter, callback: do_what_i_want }); ....with that it works. -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From Aaron_Gundel at sjwater.com Thu Aug 13 13:30:22 2009 From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling In-Reply-To: <20090813171903.GG20270@metacarta.com> Message-ID: You're correct, Christopher. I was mistaken. I copied and pasted out of Firefox's xml viewer, which for some reason strips out the namespace information. That is what's actually coming out, which I can see when I view the source or the responsexml. So I'm back to square one again. Trying to figure out why that which is showing up correctly when I do an abbreviated example (using the gml example page) isn't working when I try to set the url dynamically. Christopher Schmidt 08/13/2009 10:19 AM To Aaron_Gundel@sjwater.com cc users@openlayers.org Subject Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling On Thu, Aug 13, 2009 at 10:12:30AM -0700, Aaron_Gundel@sjwater.com wrote: > Not a problem, Christopher... > > Here's the raw response I get back from geoserver (minus a couple of > unrelated and superflouous elements)... > > ^^ Is this really the start of the file? Nothing else? This is clearly a problem, because there are no namespaces defined here, so this is invalid XML. It seems like something here is misconfigured on the server, so I'd take this to the GeoServer list and see if they have any ideas. I know that the GML support in OPenLayers was built entirely around GeoServer, so there's no reason to believe that it shouldn't/couldn't work. -- Chris > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > > > -121.93192514,37.30239967 -121.93193417,37.30397591 > -121.93193649,37.30398413 -121.93193987,37.30399212 > -121.93194428,37.30399977 -121.93194967,37.30400702 > -121.93195598,37.30401378 -121.93196313,37.30401997 > -121.93197106,37.30402553 -121.93197967,37.3040304 > -121.93198887,37.30403452 -121.93200793,37.30404022 > -121.93227819,37.30402362 -121.93244372,37.30401651 > -121.93260937,37.30401171 -121.9327751,37.30400922 > -121.93380447,37.30399679 -121.93380408,37.30382777 > -121.93380369,37.30366524 -121.93380331,37.30350359 > -121.93380296,37.30335164 -121.93380258,37.30319194 > -121.93380227,37.30305845 -121.93380187,37.30289095 > -121.93380152,37.3027424 -121.93380111,37.30256592 > -121.93380073,37.30240301 -121.93368572,37.30240281 > -121.93346706,37.30240242 -121.93313702,37.30240183 > -121.93279384,37.30240122 -121.93192514,37.30239967 > > > > > > > > > > > > If I modify this to fit into the mapserver namespace like so, It shows up > correctly on the map. > > > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:gml="http://www.opengis.net/gml" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > > > -121.93192514,37.30239967 -121.93193417,37.30397591 > -121.93193649,37.30398413 -121.93193987,37.30399212 > -121.93194428,37.30399977 -121.93194967,37.30400702 > -121.93195598,37.30401378 -121.93196313,37.30401997 > -121.93197106,37.30402553 -121.93197967,37.3040304 > -121.93198887,37.30403452 -121.93200793,37.30404022 > -121.93227819,37.30402362 -121.93244372,37.30401651 > -121.93260937,37.30401171 -121.9327751,37.30400922 > -121.93380447,37.30399679 -121.93380408,37.30382777 > -121.93380369,37.30366524 -121.93380331,37.30350359 > -121.93380296,37.30335164 -121.93380258,37.30319194 > -121.93380227,37.30305845 -121.93380187,37.30289095 > -121.93380152,37.3027424 -121.93380111,37.30256592 > -121.93380073,37.30240301 -121.93368572,37.30240281 > -121.93346706,37.30240242 -121.93313702,37.30240183 > -121.93279384,37.30240122 -121.93192514,37.30239967 > > > > > > > > > > > > So I'm not sure what I can/should do about this. Obviously I can't modify > the geoserver response, but I don't know if there's some vendor parameter > that will correct the issue, or if I just can't use the gml layer at all. > Thanks again... > > > > > Christopher Schmidt > 08/13/2009 10:05 AM > > To > Aaron_Gundel@sjwater.com > cc > users@openlayers.org > Subject > Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling > > > > > > > On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com wrote: > > Sorry Christopher, I replied to you but I don't think I cc'd the list. > > Anyway... > > > > Yes, my html is hosted at a different origin. Yes, I am using a proxy. > > Yes, firebug is showing the file loading up. The URL does contain the > > requested data and the features are contained within the GML. > > Unfortunately no, there's no url to this right now as it's an intranet > > site. > > > > Poking around at this further, it looks to be some kind of namespace > issue > > with what's coming out of geoserver not being read by openlayers. I > know > > that the basic geometry is valid now, I swapped out some of the elements > > > [for some I knew that worked, as per the gml example] and changed some > > namespace attributes and got it to work. But I can't serve this up from > > > geoserver, hence the problem. Any idea how to work around this? > > It might be best to provide a minimal GML file that works and a minimal > GML file that doesn't work, to show the differences, and perhaps help > other people understand how to help you. > > Best Regards, > -- > Christopher Schmidt > MetaCarta > -- Christopher Schmidt MetaCarta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/653c1fff/attachment.html From adube at mapgears.com Thu Aug 13 13:51:54 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a different popup on click. [SOLVED] In-Reply-To: <1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com> References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com> <4A793C07.9060105@romtelecom.ro> <1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com> Message-ID: <4A8452BA.7090002@mapgears.com> Hi, Esteban olm wrote: > Hi, > > I'm sorry, but I have a problem. > > When I implement this, I can "pan" the map, and when I go over a > marker, A popup appears, and when I go out of the marker, the popup > disappear. > > That's ok, but after the popup has appear an disappear, now I can not > "pan" the map. > Maybe the popup has deactivated something. Use firebug to check if your pan control is active or not, or you could also use the firebug "Inspect" button to see if there's an extra div over your map. Best of luck, Alexandre > Can anyone help me? > Thanks > Esteban Olm > > -- Alexandre Dub? Mapgears www.mapgears.com From CHRISTOPHER.M.HEIDT at saic.com Thu Aug 13 15:23:24 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Measure Control - hover label? In-Reply-To: <4A8452BA.7090002@mapgears.com> References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com> <4A793C07.9060105@romtelecom.ro><1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com> <4A8452BA.7090002@mapgears.com> Message-ID: <1053B20F24D85F41B57F168351684E2204B8B6B3@0015-its-exmb04.us.saic.com> I have a MeasureControl setup to draw a line, now I need it to show distance on hover. I've used graphicTitle to do this in the past, but I cant seem to figure out how to do the same when the feature is built with the control. I can listen for the measure event, but the vector doesn't appear to get passed with that event. Can I get to the feature via the measure event? Can I get to the measurement data via the feature? From arevaco90 at yahoo.es Thu Aug 13 15:27:32 2009 From: arevaco90 at yahoo.es (=?UTF-8?Q?Juan_Ar=C3=A9valo?=) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] CGI and Tomcat In-Reply-To: <5b9547fb0908070130p5d5ad0d8i6e239f58c1351a10@mail.gmail.com> References: <1249584285317-3400100.post@n2.nabble.com> <5b9547fb0908070130p5d5ad0d8i6e239f58c1351a10@mail.gmail.com> Message-ID: <1250191652219-3440233.post@n2.nabble.com> Hola, Seguimos teniendo problemas con la configuraci?n del proxy. Te cuento un poco los pasos que hemos seguido. Primero de todo nos hemos bajado el fichero proxy.cgi y instalado python 3.1. Luego hemos modificado la primera linea del proxy.cgi y hemos puesto: #!c:/python31/python.exe -u Despu?s hemos seguido los pasos de la p?gina que nos indicas sin nig?n problema hasta el paso n?mero 6, ya que no sabemos donde colocar el fichero proxy.cgi. En nuestro Tomcat tenemos instaladas las siguientes aplicaciones: geoserver y mapfish. Hemos estado haciendo diversas pruebas pero no conseguimos encontrar la configuraci?n adecuada. Tal y como estamos ahora no conseguimos visualizar las carreteras de este ejemplo de openlayers: http://openlayers.org/dev/examples/wfs-protocol.html Tampoco conseguimos que nos funcione haciendo llamadas a un WFS local. Alguna idea de por donde puede estar el error? Juan y Gerard michogar wrote: > > Hola Arevalo, > > tienes esta tutorial que segu? yo para utilizar el proxy cgi en tomcat. > > http://codigoaldescubierto.wordpress.com/2008/02/24/cgis-en-tomcat-bajo-windows/ > > Saludos. > > > > El 6 de agosto de 2009 20:44, Juan Ar?valo escribi?: > >> >> Hi all, >> >> I am making some progress setting up a WFS-T, it seems that my code works >> since I don??t get any error, but the layer doesn't display in the map. I >> have read that this problem can be solved by setting the Proxy Host, >> however >> I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and >> OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for >> Apache >> but not for Tomcat) >> >> Does anyone have any ideas on how to solve it? >> >> I??ve solved my previous problem with the WFS constructor. >> Thanks Pierre and Eric for your help!! >> >> Cheers! >> >> Juan >> -- >> View this message in context: >> http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3400100.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > # michogar > # Analista Programador SIG > # GNU/Linux Counter 462666 > # http://www.openstreetmap.org/user/michogar > > Una visi?n personal: > http://michogar.blogspot.com > > El d?a a d?a: > http://twitter.com/michogar > > > > Sent from Madrid, Spain > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3440233.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Aaron_Gundel at sjwater.com Thu Aug 13 17:24:36 2009 From: Aaron_Gundel at sjwater.com (Aaron_Gundel@sjwater.com) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Question about GML/WFS compatibility and Styling In-Reply-To: <20090813171903.GG20270@metacarta.com> Message-ID: Thanks for your help Christopher. I was able to get this working by switching my gml version out and reprojecting to my base map coordinate system. It is working well now. :) Aaron Christopher Schmidt 08/13/2009 10:19 AM To Aaron_Gundel@sjwater.com cc users@openlayers.org Subject Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling On Thu, Aug 13, 2009 at 10:12:30AM -0700, Aaron_Gundel@sjwater.com wrote: > Not a problem, Christopher... > > Here's the raw response I get back from geoserver (minus a couple of > unrelated and superflouous elements)... > > ^^ Is this really the start of the file? Nothing else? This is clearly a problem, because there are no namespaces defined here, so this is invalid XML. It seems like something here is misconfigured on the server, so I'd take this to the GeoServer list and see if they have any ideas. I know that the GML support in OPenLayers was built entirely around GeoServer, so there's no reason to believe that it shouldn't/couldn't work. -- Chris > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > > > -121.93192514,37.30239967 -121.93193417,37.30397591 > -121.93193649,37.30398413 -121.93193987,37.30399212 > -121.93194428,37.30399977 -121.93194967,37.30400702 > -121.93195598,37.30401378 -121.93196313,37.30401997 > -121.93197106,37.30402553 -121.93197967,37.3040304 > -121.93198887,37.30403452 -121.93200793,37.30404022 > -121.93227819,37.30402362 -121.93244372,37.30401651 > -121.93260937,37.30401171 -121.9327751,37.30400922 > -121.93380447,37.30399679 -121.93380408,37.30382777 > -121.93380369,37.30366524 -121.93380331,37.30350359 > -121.93380296,37.30335164 -121.93380258,37.30319194 > -121.93380227,37.30305845 -121.93380187,37.30289095 > -121.93380152,37.3027424 -121.93380111,37.30256592 > -121.93380073,37.30240301 -121.93368572,37.30240281 > -121.93346706,37.30240242 -121.93313702,37.30240183 > -121.93279384,37.30240122 -121.93192514,37.30239967 > > > > > > > > > > > > If I modify this to fit into the mapserver namespace like so, It shows up > correctly on the map. > > > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:gml="http://www.opengis.net/gml" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > -121.93380447,37.30239967 -121.93192514,37.30404022 > > > > > > > > > > > -121.93192514,37.30239967 -121.93193417,37.30397591 > -121.93193649,37.30398413 -121.93193987,37.30399212 > -121.93194428,37.30399977 -121.93194967,37.30400702 > -121.93195598,37.30401378 -121.93196313,37.30401997 > -121.93197106,37.30402553 -121.93197967,37.3040304 > -121.93198887,37.30403452 -121.93200793,37.30404022 > -121.93227819,37.30402362 -121.93244372,37.30401651 > -121.93260937,37.30401171 -121.9327751,37.30400922 > -121.93380447,37.30399679 -121.93380408,37.30382777 > -121.93380369,37.30366524 -121.93380331,37.30350359 > -121.93380296,37.30335164 -121.93380258,37.30319194 > -121.93380227,37.30305845 -121.93380187,37.30289095 > -121.93380152,37.3027424 -121.93380111,37.30256592 > -121.93380073,37.30240301 -121.93368572,37.30240281 > -121.93346706,37.30240242 -121.93313702,37.30240183 > -121.93279384,37.30240122 -121.93192514,37.30239967 > > > > > > > > > > > > So I'm not sure what I can/should do about this. Obviously I can't modify > the geoserver response, but I don't know if there's some vendor parameter > that will correct the issue, or if I just can't use the gml layer at all. > Thanks again... > > > > > Christopher Schmidt > 08/13/2009 10:05 AM > > To > Aaron_Gundel@sjwater.com > cc > users@openlayers.org > Subject > Re: [OpenLayers-Users] Question about GML/WFS compatibility and Styling > > > > > > > On Thu, Aug 13, 2009 at 09:44:32AM -0700, Aaron_Gundel@sjwater.com wrote: > > Sorry Christopher, I replied to you but I don't think I cc'd the list. > > Anyway... > > > > Yes, my html is hosted at a different origin. Yes, I am using a proxy. > > Yes, firebug is showing the file loading up. The URL does contain the > > requested data and the features are contained within the GML. > > Unfortunately no, there's no url to this right now as it's an intranet > > site. > > > > Poking around at this further, it looks to be some kind of namespace > issue > > with what's coming out of geoserver not being read by openlayers. I > know > > that the basic geometry is valid now, I swapped out some of the elements > > > [for some I knew that worked, as per the gml example] and changed some > > namespace attributes and got it to work. But I can't serve this up from > > > geoserver, hence the problem. Any idea how to work around this? > > It might be best to provide a minimal GML file that works and a minimal > GML file that doesn't work, to show the differences, and perhaps help > other people understand how to help you. > > Best Regards, > -- > Christopher Schmidt > MetaCarta > -- Christopher Schmidt MetaCarta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/f2428007/attachment.html From dwright at i3.com Thu Aug 13 18:14:36 2009 From: dwright at i3.com (David Wright) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] ArcGIS Tiled Map and tokens Message-ID: <00c601ca1c63$71a96f70$54fc4e50$@com> Hello Users, A couple of questions here. First, http://dev.openlayers.org/sandbox/august/documentation/agsControl_instructio ns.pdf provides a plugin for OpenLayers 2.6 that supports ArcGIS Server TiledMap service layers. I have been watching for this functionality in the 2.7 and 2.8 releases. I have seen dynamic ArcGISRest93 export (thanks!), but hoping to see the TiledMap services leveraged in a core release. Is this likely to happen? Second, has anyone found a way to access secured ArcGIS Server services in OpenLayers? In other API's I can pass a token value as parameter in my application, but I've not found a way to do this in OpenLayers without a proxy between OpenLayers and ArcGIS Server. Thanks for any updates or feedback, -Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090813/8b2d7030/attachment.html From john.c.cartwright at comcast.net Thu Aug 13 19:31:35 2009 From: john.c.cartwright at comcast.net (John Cartwright) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] beforefeatureadded event not firing on Layer Message-ID: <4A84A257.70301@comcast.net> Hello All, I have OpenLayers.Layer.Vector layer on which I've defined the "beforefeatureadded" and "beforefeaturesadded" events, e.g. vectors.events.on({"beforefeaturesadded": report, "beforefeatureadded": report}); Then I'm adding features to this layer using the OpenLayersControlDrawFeature control. Problem is that the above events don't seem to be firing as I add additional features to the layer. The "featureadded" event fires, but not the "beforefeatureadded". This is version 2.8. Can someone please point out what I'm doing wrong here? Thanks! --john From adrian_gh.popa at romtelecom.ro Fri Aug 14 01:32:07 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Displaying a popup on mouse over AND a different popup on click. [SOLVED] In-Reply-To: <1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com> References: <4A7697A0.5030901@romtelecom.ro> <4A76D414.805@mapgears.com> <4A793C07.9060105@romtelecom.ro> <1894fac30908131009s53f5269w3eb859558b1eff04@mail.gmail.com> Message-ID: <4A84F6D7.80302@romtelecom.ro> Hello Esteban, Most likely after the popup closes there is a javascript error in your page and navigation breaks (zooming in/out shouldn't work at this point). Use firebug to see if you get an error in the console. Esteban olm wrote: > Hi, > > I'm sorry, but I have a problem. > > When I implement this, I can "pan" the map, and when I go over a > marker, A popup appears, and when I go out of the marker, the popup > disappear. > > That's ok, but after the popup has appear an disappear, now I can not > "pan" the map. > Maybe the popup has deactivated something. > Can anyone help me? > Thanks > Esteban Olm > > > after a popup is how > > 2009/8/5 Adrian Popa > > > Following Alexandre's suggestion, here's what I did: > > ... //in init() > map.addLayer(markers); > //add the main select (for regular popups) > select = new OpenLayers.Control.SelectFeature(markers, {toggle:true, > clickout: true}); > markers.events.on({ "featureselected": onMarkerSelect, > "featureunselected": onMarkerUnselect}); > > //add the second select for tooltips: > var highlightCtrl = new OpenLayers.Control.SelectFeature(markers, { > hover: true, highlightOnly: true, renderIntent: "temporary", > eventListeners: { featurehighlighted: > tooltipSelect, > featureunhighlighted: tooltipUnselect } }); > > //the order in which you add these lines seems to matter! > map.addControl(highlightCtrl); > map.addControl(select); > highlightCtrl.activate(); > select.activate(); > > ...//support functions > var lastFeature = null; > var tooltipPopup = null; > > function tooltipSelect(event){ > var feature = event.feature; > var selectedFeature = feature; > //if there is already an opened details window, don\'t draw the > tooltip > if(feature.popup != null){ > return; > } > //if there are other tooltips active, destroy them > if(tooltipPopup != null){ > map.removePopup(tooltipPopup); > tooltipPopup.destroy(); > if(lastFeature != null){ > delete lastFeature.popup; > tooltipPopup = null; > } > } > lastFeature = feature; > var tooltipPopup = new OpenLayers.Popup("activetooltip", > feature.geometry.getBounds().getCenterLonLat(), > new OpenLayers.Size(80,12), > " "+feature.attributes.name > , > true ); > //this is messy, but I'm not a CSS guru > tooltipPopup.contentDiv.style.backgroundColor='ffffcb'; > tooltipPopup.closeDiv.style.backgroundColor='ffffcb'; > tooltipPopup.contentDiv.style.overflow='hidden'; > tooltipPopup.contentDiv.style.padding='3px'; > tooltipPopup.contentDiv.style.margin='0'; > tooltipPopup.closeOnMove = true; > tooltipPopup.autoSize = true; > feature.popup = tooltipPopup; > map.addPopup(tooltipPopup); > } > function tooltipUnselect(event){ > var feature = event.feature; > if(feature != null && feature.popup != null){ > map.removePopup(feature.popup); > feature.popup.destroy(); > delete feature.popup; > tooltipPopup = null; > lastFeature = null; > } > } > > function onMarkerSelect(event) { > //unselect any previous selections > tooltipUnselect(event); > var feature = event.feature; > var selectedFeature = feature; > var popup = new OpenLayers.Popup.FramedCloud("activeAlarm", > feature.geometry.getBounds().getCenterLonLat(), > new OpenLayers.Size(100,100), > "Loading... src='http://$server/map/symbols/ajax-loader.gif' border=0>", > null, true, onMarkerPopupClose ); > feature.popup = popup; > popup.setOpacity(0.7); > map.addPopup(popup); > //call ajax to get the data > loadDetails(feature.attributes.description); > } > function onMarkerUnselect(event) { > var feature = event.feature; > if(feature.popup) { > map.removePopup(feature.popup); > feature.popup.destroy(); > delete feature.popup; > } > } > function onMarkerPopupClose(evt) { > select.unselectAll(); > } > I hope this helps others trying to add this feature. > > Thanks again for your help. > > Regards, > Adrian > > Alexandre Dube wrote: > > Hi Adrian, > > > > Take a look at this example (1). You can use 2 SelectFeature > > controls for what you need, one with hover:true and > > highlightOnly:true, the other with hover false. The first one won't > > actually select the feature and you can register 3 kinds of > > "highlight" events (see the source) to display your small div/popup. > > > > Hope this helps, > > > > Alexandre > > > > (1) http://openlayers.org/dev/examples/highlight-feature.html > > > > Adrian Popa wrote: > >> Hello everyone, > >> > >> This is sort of a repeat message of "Re: [OpenLayers-Users] > >> Labels/Tooltips on mouse over a Vector layer" - but with a slightly > >> different idea. > >> > >> Problem: I want to display a small div/popup with the marker's name > >> when the user hovers his mouse over the location, and I want to > >> display a bigger popup when the user actually clicks on the > location. > >> > >> Current status: > >> * I can use {hover: true} to register > >> featureselected/featureunselected when I hover over a marker > instead > >> on when I click on the maker. > >> * I haven't found any events that could differentiate between hover > >> and click > >> > >> I'm thinking I could register my select control with hover: > true and > >> allow featureselected to execute the same function for both when I > >> click on the makrer as well as when I hover over the marker. I > would > >> like to know if there's any way to find out in the event inside the > >> function if the user clicked or not his mouse. Depending on this, I > >> would show one popup or the other. > >> > >> Something like: > >> > >> select = new OpenLayers.Control.SelectFeature(markers, > >> {clickout:true, hover:true}); > >> markers.events.on({ "featureselected": onMarkerSelect, > >> "featureunselected": onMarkerUnselect, "visibilitychanged": > >> onMarkerToggle }); > >> map.addControl(select); > >> select.activate(); > >> > >> function onMarkerSelect(event){ > >> var feature = event.feature; > >> //find out if the user clicked or not > >> var clicked = event.*findAWayToSeeIfTheUserClicked()*; > >> if(clicked){ > >> //show larger popup > >> } > >> else{ > >> //show smaller popup > >> } > >> } > >> > >> Suggestions are welcome. > >> > >> Thanks, > >> Adrian > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > > > > > > > -- > --- > Adrian Popa > NOC Division > Network Engineer > Divizia Centrul National de Operare Retea > Departament Transport IP & Metro > Compartiment IP Core & Backbone > Phone: +40 21 400 3099 > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/ba6c580d/attachment.html From manuel.albela at gmail.com Fri Aug 14 02:58:00 2009 From: manuel.albela at gmail.com (Manuel Albela Miranda) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Selecting multiple features in the same point In-Reply-To: <1250163801347-3437344.post@n2.nabble.com> References: <1250163801347-3437344.post@n2.nabble.com> Message-ID: Hi again! Thank you very much Ivan and Jerome for you help. Clusters work great!, just what I needed. Best regards, and thank you again! Manu On Thu, Aug 13, 2009 at 1:43 PM, Jerome Freyre wrote: > > Hi Manuel, > > Another way should be the use of the cluster strategy. > If you activate the strategy, all closest points are transform in one > feature called cluster. And the cluster contains points so you can easily > display informations about your points. > > http://openlayers.org/dev/examples/strategy-cluster.html > > > > > Manuel Albela Miranda wrote: > > > > Hi everybody!, > > > > I have one GML layer where some of the points are in the same location, > so > > I'm wondering if it's possible to get all the features that are at that > > location when you click on it by using the SelectFeature control or if > > there > > is another way to do that. > > > > Thank you very much in advance. > > > > Manu. > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > -- > View this message in context: > http://n2.nabble.com/Selecting-multiple-features-in-the-same-point-tp3436892p3437344.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/18c101b7/attachment.html From igrcic at gmail.com Fri Aug 14 03:08:02 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Selecting multiple features in the same point In-Reply-To: References: <1250163801347-3437344.post@n2.nabble.com> Message-ID: Yes, cluster is pretty nice feature to have. I advise to use it with BBOX strategy, especially if u have lots of features! Cheers On Fri, Aug 14, 2009 at 8:58 AM, Manuel Albela Miranda wrote: > Hi again! > > Thank you very much Ivan and Jerome for you help. Clusters work great!, just > what I needed. > > Best regards, and thank you again! > > Manu > > On Thu, Aug 13, 2009 at 1:43 PM, Jerome Freyre > wrote: >> >> Hi Manuel, >> >> Another way should be the use of the cluster strategy. >> If you activate the strategy, all closest points are transform in one >> feature called cluster. And the cluster contains points so you can easily >> display informations about your points. >> >> http://openlayers.org/dev/examples/strategy-cluster.html >> >> >> >> >> Manuel Albela Miranda wrote: >> > >> > Hi everybody!, >> > >> > I have one GML layer where some of the points are in the same location, >> > so >> > I'm wondering if it's possible to get all the features that are at that >> > location when you click on it by using the SelectFeature control or if >> > there >> > is another way to do that. >> > >> > Thank you very much in advance. >> > >> > Manu. >> > >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> > >> >> -- >> View this message in context: >> http://n2.nabble.com/Selecting-multiple-features-in-the-same-point-tp3436892p3437344.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 > > -- Ivan Grcic From eric.lemoine at camptocamp.com Fri Aug 14 03:35:00 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] beforefeatureadded event not firing on Layer In-Reply-To: <4A84A257.70301@comcast.net> References: <4A84A257.70301@comcast.net> Message-ID: On Friday, August 14, 2009, John Cartwright wrote: > Hello All, > > I have OpenLayers.Layer.Vector layer on which I've defined the > "beforefeatureadded" and "beforefeaturesadded" events, e.g. > > vectors.events.on({"beforefeaturesadded": report, "beforefeatureadded": > report}); > > Then I'm adding features to this layer using the > OpenLayersControlDrawFeature control. ?Problem is that the above events > don't seem to be firing as I add additional features to the layer. ?The > "featureadded" event fires, but not the "beforefeatureadded". > > This is version 2.8. ?Can someone please point out what I'm doing wrong > here? Hi. this is weird. Can you reproduce that in a minimal example with just a vector layer and a draw feature control? Cheers, > > Thanks! > > --john > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From xiaying4415139 at 163.com Fri Aug 14 03:42:54 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] about Navigation and Box Control In-Reply-To: <133009.25562.qm@web15104.mail.cnb.yahoo.com> References: <133009.25562.qm@web15104.mail.cnb.yahoo.com> Message-ID: <1250235774795-3443556.post@n2.nabble.com> I thought, you want to draw box and zoom. Do you notice that there is ZoomBox Control in OpenLayers? ?? ? wrote: > > Hi: > ????? I have a problem,i can't use Navigation > Control(OpenLayers.Control.Navigation()) when i have used Box Control like > this : > ??? var control = new OpenLayers.Control(); > ??????????????? OpenLayers.Util.extend(control, { > ??????????????????? draw: function () { > ??????????????????????? // this Handler.Box will intercept the > shift-mousedown > ??????????????????????? // before Control.MouseDefault gets to see it > ??????????????????????? this.box = new OpenLayers.Handler.Box( control, > ??????????????????????????? {"done": this.notice}, > ??????????????????????????? {keyMask: OpenLayers.Handler.MOD_CTRL}); > ??????????????????????? this.box.activate(); > ??????????????????? }, > > ??????????????????? notice: function (bounds) { > ??????????????????????? var ll = map.getLonLatFromPixel(new > OpenLayers.Pixel(bounds.left, bounds.bottom)); > ??????????????????????? var ur = map.getLonLatFromPixel(new > OpenLayers.Pixel(bounds.right, bounds.top)); > ??????????????????????? var rowlength = > document.all("table1").rows.length; > ??????????????????????? for(var i=1; i ??????????????????????? ??? > document.all("table1").rows[i].cells[1].bgColor = "#ffffff"; > ??????????????????????? ??? var x = > document.all("table1").rows[i].cells[4].innerText; > ??????????????????????? ??? var y = > document.all("table1").rows[i].cells[5].innerText; > ??????????????????????? ??? > if(x>ll.lon.toFixed(4)&&xll.lat.toFixed(4)&&y ??????????????????????? ??? //??? alert("sucess"); > ??????????????????????? ??? ??? > document.all("table1").rows[i].cells[1].bgColor = "#00FFFF"; > ??????????????????????? ??? } > ??????????????????????? } > ??????????????????????? alert(ll.lon.toFixed(4) + ", " + > ????????????????????????????? ll.lat.toFixed(4) + ", " + > ????????????????????????????? ur.lon.toFixed(4) + ", " + > ????????????????????????????? ur.lat.toFixed(4)); > ??????????????????? } > ??????????????? }); > ? i want them work together,how can i do ? thanks > > > > > ___________________________________________________________ > ????????????????? > http://card.mail.cn.yahoo.com/ > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/about-Navigation-and-Box-Control-tp3435061p3443556.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From xiaying4415139 at 163.com Fri Aug 14 03:52:56 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Animate effect like Virtual Earth? Message-ID: <1250236376983-3443597.post@n2.nabble.com> When I saw this Virtual Earth Example http://openlayers.org/dev/examples/ve-novibrate.html http://openlayers.org/dev/examples/ve-novibrate.html , Its zoom effect shocked me. I notice that there are two lines in the source code panMethod: OpenLayers.Easing.Linear.easeOut, panDuration: 10 I added them to my own map with WMS layer but it doesn't work. Is there some method can make WMS layer has the same animate zoom effect like Virtual Earth? I already know transitionEffect: 'resize', but I think it is not as fantastic as Virtual Earth. Thanks -- View this message in context: http://n2.nabble.com/Animate-effect-like-Virtual-Earth--tp3443597p3443597.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From derek at cmainfo.co.za Fri Aug 14 05:00:36 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] IE7 Error when adding vector layer Message-ID: <1250240436155-3443849.post@n2.nabble.com> I am having problems with IE7 when adding a vector layer to the map. I am using ASP.NET with a Master page and a custom build of OpenLayers 2.8. The begining of my Master page is as follows: <%@ Master Language="VB" CodeFile="CMAMaster.master.vb" Inherits="MasterPage" %> ... The OpenLayers.js is then included in the ScriptManagerProxy for the pages that require it. Everything works perfectly in IE8, Firefox and Safari with these settings. However IE7 usually (but not always) gives an "Unspecified error". If I remove the vector layer from the map it works fine in IE7. The code to add the vector layer is: ... var SPStyle = { strokeColor: 'red', strokeWidth: 2, fillColor: 'red', fillOpacity: '0.15', borderStyle: 'solid' } SPLayer = new OpenLayers.Layer.Vector("Subject Property"); SPLayer.displayInLayerSwitcher = false; SPLayer.style = SPStyle; map.addLayer(SPLayer); ... Any help on how to work around this issue would be greatly appreciated. -- View this message in context: http://n2.nabble.com/IE7-Error-when-adding-vector-layer-tp3443849p3443849.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rahul_g_teni at yahoo.com Fri Aug 14 08:08:13 2009 From: rahul_g_teni at yahoo.com (Mr. Rahul Teni) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Get bounding box. Message-ID: <649139.40669.qm@web65611.mail.ac4.yahoo.com> Dear List, I required following things to be implemented in OpenLayer. I want bounding box of tile of layer which is overlayed on google layers and? is generated with tileCache. I will then create request to regenerate tile. Does anybody have any pointers how to get bounding box of tile on which i have clicked with mouse or any pointers to calculation. Your help is highly appreciated. Thanks, Rahul G. Teni MS BITS,BE Comp 9822564489 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/66a69139/attachment.html From Kai-Behncke at gmx.de Fri Aug 14 08:28:35 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Starting function if layerstatus is changed Message-ID: <20090814122835.228450@gmx.net> Dear users, I would like to start a function if the layer is on/off. I tried e.g. if (this.map.events.triggerEvent("changelayer")){ alert ("here we go"); } and if (my_layer.display()){ alert ("here we go"); } ...but so far without success. Can anybody help please? Thank you very much, Kai -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From adube at mapgears.com Fri Aug 14 08:37:41 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Starting function if layerstatus is changed In-Reply-To: <20090814122835.228450@gmx.net> References: <20090814122835.228450@gmx.net> Message-ID: <4A855A95.3070806@mapgears.com> Hi Kai, Maybe the layer's event "visibilitychanged" could be what you need. Regards, Alexandre Kai Behncke wrote: > Dear users, > > > > > I would like to start a function if the layer is on/off. > > I tried e.g. > > > if (this.map.events.triggerEvent("changelayer")){ > alert ("here we go"); > } > > > and > > if (my_layer.display()){ > > alert ("here we go"); > } > > > ...but so far without success. > Can anybody help please? > > Thank you very much, Kai > -- Alexandre Dub? Mapgears www.mapgears.com From adrian_gh.popa at romtelecom.ro Fri Aug 14 08:37:30 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Starting function if layerstatus is changed In-Reply-To: <20090814122835.228450@gmx.net> References: <20090814122835.228450@gmx.net> Message-ID: <4A855A8A.9060803@romtelecom.ro> Hello Kai, Not sure if this is what you're looking for, but I registered my function to run when the layer changes visibility (is toggled on/off): markers.events.on({ "featureselected": onMarkerSelect, "featureunselected": onMarkerUnselect, *"visibilitychanged": onMarkerToggle* }); markers is a Vector layer, but the event should be available for every layer. You can check in your function to see if the layer has been toggled off or on by looking at markers.visibility: *function onMarkerToggle(event) { //do something if visibility becomes true if(markers.visibility == true){ alert("This layer just turned visible!"); } } * Regards, Adrian Kai Behncke wrote: > Dear users, > > > > > I would like to start a function if the layer is on/off. > > I tried e.g. > > > if (this.map.events.triggerEvent("changelayer")){ > alert ("here we go"); > } > > > and > > if (my_layer.display()){ > > alert ("here we go"); > } > > > ...but so far without success. > Can anybody help please? > > Thank you very much, Kai > -- --- Adrian Popa NOC Division Network Engineer Divizia Centrul National de Operare Retea Departament Transport IP & Metro Compartiment IP Core & Backbone Phone: +40 21 400 3099 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/25541e26/attachment.html From Kai-Behncke at gmx.de Fri Aug 14 09:02:14 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Starting function if layerstatus is changed In-Reply-To: <4A855A8A.9060803@romtelecom.ro> References: <20090814122835.228450@gmx.net> <4A855A8A.9060803@romtelecom.ro> Message-ID: <20090814130214.24140@gmx.net> Hi Adrian, Hi Alexandre, thank you for your hints, nevertheless I didn`t get it. With "my_layer.visibility" I will get easily the status (true/false), but the problem I have is that I don`t know how to get the function setVisibility() (that is called after activatin/deactivating a layer in Control.LayerSwitcher). I mean: I turn the layer on/off and the function obviously is called. But how can I do a request on that? Something like: if (setVisibility()) { alert ("change"); alert (my_layer.visibility); } of If this.map.events.triggerEvent("visibilitychanged")) { ... .... } Well, I will try on..... Best regards, Kai -------- Original-Nachricht -------- > Datum: Fri, 14 Aug 2009 15:37:30 +0300 > Von: Adrian Popa > An: Kai Behncke > CC: users@openlayers.org > Betreff: Re: [OpenLayers-Users] Starting function if layerstatus is changed > Hello Kai, > > Not sure if this is what you're looking for, but I registered my > function to run when the layer changes visibility (is toggled on/off): > > markers.events.on({ "featureselected": onMarkerSelect, > "featureunselected": onMarkerUnselect, *"visibilitychanged": > onMarkerToggle* }); > > markers is a Vector layer, but the event should be available for every > layer. You can check in your function to see if the layer has been > toggled off or on by looking at markers.visibility: > > *function onMarkerToggle(event) { > //do something if visibility becomes true > if(markers.visibility == true){ > alert("This layer just turned visible!"); > } > } > * > Regards, > Adrian > Kai Behncke wrote: > > Dear users, > > > > > > > > > > I would like to start a function if the layer is on/off. > > > > I tried e.g. > > > > > > if (this.map.events.triggerEvent("changelayer")){ > > alert ("here we go"); > > } > > > > > > and > > > > if (my_layer.display()){ > > > > alert ("here we go"); > > } > > > > > > ...but so far without success. > > Can anybody help please? > > > > Thank you very much, Kai > > > > > -- > --- > Adrian Popa > NOC Division > Network Engineer > Divizia Centrul National de Operare Retea > Departament Transport IP & Metro > Compartiment IP Core & Backbone > Phone: +40 21 400 3099 > -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From crschmidt at metacarta.com Fri Aug 14 09:03:39 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] IE7 Error when adding vector layer In-Reply-To: <1250240436155-3443849.post@n2.nabble.com> References: <1250240436155-3443849.post@n2.nabble.com> Message-ID: <20090814130339.GK20270@metacarta.com> On Fri, Aug 14, 2009 at 04:00:36AM -0500, Derek Watling wrote: > > I am having problems with IE7 when adding a vector layer to the map. > > I am using ASP.NET with a Master page and a custom build of OpenLayers 2.8. > The begining of my Master page is as follows: > > <%@ Master Language="VB" CodeFile="CMAMaster.master.vb" > Inherits="MasterPage" %> > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > > > ... > > The OpenLayers.js is then included in the ScriptManagerProxy for the pages > that require it. > > Everything works perfectly in IE8, Firefox and Safari with these settings. > However IE7 usually (but not always) gives an "Unspecified error". If I > remove the vector layer from the map it works fine in IE7. > > The code to add the vector layer is: > ... > var SPStyle = { > strokeColor: 'red', > strokeWidth: 2, > fillColor: 'red', > fillOpacity: '0.15', > borderStyle: 'solid' > } > > SPLayer = new OpenLayers.Layer.Vector("Subject Property"); > SPLayer.displayInLayerSwitcher = false; > SPLayer.style = SPStyle; > map.addLayer(SPLayer); > ... > > Any help on how to work around this issue would be greatly appreciated. Most likely, you are launching your code too early. Make sure you wait until the page's "onload" event to start your code. -- Christopher Schmidt MetaCarta From adrian_gh.popa at romtelecom.ro Fri Aug 14 09:15:11 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Starting function if layerstatus is changed In-Reply-To: <20090814130214.24140@gmx.net> References: <20090814122835.228450@gmx.net> <4A855A8A.9060803@romtelecom.ro> <20090814130214.24140@gmx.net> Message-ID: <4A85635F.6090606@romtelecom.ro> Hello Kai, Are you trying to turn the layer on/off from outside the Layer Switcher? Regards, Adrian Kai Behncke wrote: > Hi Adrian, Hi Alexandre, > > > thank you for your hints, nevertheless I didn`t get it. > > > With "my_layer.visibility" I will get easily the status (true/false), > but the problem I have is that I don`t know how to get the function setVisibility() (that is called after activatin/deactivating a layer in Control.LayerSwitcher). > > I mean: > I turn the layer on/off and the function obviously is called. > > But how can I do a request on that? > > > Something like: > > if (setVisibility()) { > alert ("change"); > alert (my_layer.visibility); > } > of > > If this.map.events.triggerEvent("visibilitychanged")) { > ... > .... > } > > Well, I will try on..... > > > Best regards, Kai > > > > > > > > > -------- Original-Nachricht -------- > >> Datum: Fri, 14 Aug 2009 15:37:30 +0300 >> Von: Adrian Popa >> An: Kai Behncke >> CC: users@openlayers.org >> Betreff: Re: [OpenLayers-Users] Starting function if layerstatus is changed >> > > >> Hello Kai, >> >> Not sure if this is what you're looking for, but I registered my >> function to run when the layer changes visibility (is toggled on/off): >> >> markers.events.on({ "featureselected": onMarkerSelect, >> "featureunselected": onMarkerUnselect, *"visibilitychanged": >> onMarkerToggle* }); >> >> markers is a Vector layer, but the event should be available for every >> layer. You can check in your function to see if the layer has been >> toggled off or on by looking at markers.visibility: >> >> *function onMarkerToggle(event) { >> //do something if visibility becomes true >> if(markers.visibility == true){ >> alert("This layer just turned visible!"); >> } >> } >> * >> Regards, >> Adrian >> Kai Behncke wrote: >> >>> Dear users, >>> >>> >>> >>> >>> I would like to start a function if the layer is on/off. >>> >>> I tried e.g. >>> >>> >>> if (this.map.events.triggerEvent("changelayer")){ >>> alert ("here we go"); >>> } >>> >>> >>> and >>> >>> if (my_layer.display()){ >>> >>> alert ("here we go"); >>> } >>> >>> >>> ...but so far without success. >>> Can anybody help please? >>> >>> Thank you very much, Kai >>> >>> >> -- >> --- >> Adrian Popa >> NOC Division >> Network Engineer >> Divizia Centrul National de Operare Retea >> Departament Transport IP & Metro >> Compartiment IP Core & Backbone >> Phone: +40 21 400 3099 >> >> > > -- --- Adrian Popa NOC Division Network Engineer Divizia Centrul National de Operare Retea Departament Transport IP & Metro Compartiment IP Core & Backbone Phone: +40 21 400 3099 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/7013c2d9/attachment.html From Kai-Behncke at gmx.de Fri Aug 14 09:20:07 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Starting function if layerstatus is changed In-Reply-To: <4A85635F.6090606@romtelecom.ro> References: <20090814122835.228450@gmx.net> <4A855A8A.9060803@romtelecom.ro> <20090814130214.24140@gmx.net> <4A85635F.6090606@romtelecom.ro> Message-ID: <20090814132007.24110@gmx.net> Dear users, problem solved. In .....openlayers/lib/OpenLayers/Layers.js an setVisibility: function(visibility) { //alert (ows.visibility); if (visibility != this.visibility) { this.visibility = visibility; this.display(visibility); this.redraw(); if (this.map != null) { this.map.events.triggerEvent("changelayer", { layer: this, property: "visibility" }); } this.events.triggerEvent("visibilitychanged"); if (my_layer.visibility!=true){ alert ("false"); ..... .......... } } ...does what I want. Best regards and Thank you, Kai -------- Original-Nachricht -------- > Datum: Fri, 14 Aug 2009 16:15:11 +0300 > Von: Adrian Popa > An: Kai Behncke > CC: users@openlayers.org > Betreff: Re: [OpenLayers-Users] Starting function if layerstatus is changed > Hello Kai, > > Are you trying to turn the layer on/off from outside the Layer Switcher? > > Regards, > Adrian > > Kai Behncke wrote: > > Hi Adrian, Hi Alexandre, > > > > > > thank you for your hints, nevertheless I didn`t get it. > > > > > > With "my_layer.visibility" I will get easily the status (true/false), > > but the problem I have is that I don`t know how to get the function > setVisibility() (that is called after activatin/deactivating a layer in > Control.LayerSwitcher). > > > > I mean: > > I turn the layer on/off and the function obviously is called. > > > > But how can I do a request on that? > > > > > > Something like: > > > > if (setVisibility()) { > > alert ("change"); > > alert (my_layer.visibility); > > } > > of > > > > If this.map.events.triggerEvent("visibilitychanged")) { > > ... > > .... > > } > > > > Well, I will try on..... > > > > > > Best regards, Kai > > > > > > > > > > > > > > > > > > -------- Original-Nachricht -------- > > > >> Datum: Fri, 14 Aug 2009 15:37:30 +0300 > >> Von: Adrian Popa > >> An: Kai Behncke > >> CC: users@openlayers.org > >> Betreff: Re: [OpenLayers-Users] Starting function if layerstatus is > changed > >> > > > > > >> Hello Kai, > >> > >> Not sure if this is what you're looking for, but I registered my > >> function to run when the layer changes visibility (is toggled on/off): > >> > >> markers.events.on({ "featureselected": onMarkerSelect, > >> "featureunselected": onMarkerUnselect, *"visibilitychanged": > >> onMarkerToggle* }); > >> > >> markers is a Vector layer, but the event should be available for every > >> layer. You can check in your function to see if the layer has been > >> toggled off or on by looking at markers.visibility: > >> > >> *function onMarkerToggle(event) { > >> //do something if visibility becomes true > >> if(markers.visibility == true){ > >> alert("This layer just turned visible!"); > >> } > >> } > >> * > >> Regards, > >> Adrian > >> Kai Behncke wrote: > >> > >>> Dear users, > >>> > >>> > >>> > >>> > >>> I would like to start a function if the layer is on/off. > >>> > >>> I tried e.g. > >>> > >>> > >>> if (this.map.events.triggerEvent("changelayer")){ > >>> alert ("here we go"); > >>> } > >>> > >>> > >>> and > >>> > >>> if (my_layer.display()){ > >>> > >>> alert ("here we go"); > >>> } > >>> > >>> > >>> ...but so far without success. > >>> Can anybody help please? > >>> > >>> Thank you very much, Kai > >>> > >>> > >> -- > >> --- > >> Adrian Popa > >> NOC Division > >> Network Engineer > >> Divizia Centrul National de Operare Retea > >> Departament Transport IP & Metro > >> Compartiment IP Core & Backbone > >> Phone: +40 21 400 3099 > >> > >> > > > > > > > -- > --- > Adrian Popa > NOC Division > Network Engineer > Divizia Centrul National de Operare Retea > Departament Transport IP & Metro > Compartiment IP Core & Backbone > Phone: +40 21 400 3099 > -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From derek at cmainfo.co.za Fri Aug 14 09:58:37 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] IE7 Error when adding vector layer In-Reply-To: <20090814130339.GK20270@metacarta.com> References: <1250240436155-3443849.post@n2.nabble.com> <20090814130339.GK20270@metacarta.com> Message-ID: <1250258317005-3445225.post@n2.nabble.com> Hi Christopher Thank you for your reply. I have a chain of functions/PageMethods that are called starting in the pageLoad() function as I need other information before the map is initialised. Each PageMethod waits for the results to be returned and handled before calling the next one. However, after much searching and examining information from Microsoft's forums I have made the following change which seems to have solved the problem: Seems like IE7 wasn't always getting this from the javascript. Christopher Schmidt-2 wrote: > > Most likely, you are launching your code too early. Make sure you wait > until the page's "onload" event to start your code. > > -- > Christopher Schmidt > MetaCarta > -- View this message in context: http://n2.nabble.com/IE7-Error-when-adding-vector-layer-tp3443849p3445225.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hagen1113 at yahoo.com Fri Aug 14 10:41:13 2009 From: hagen1113 at yahoo.com (Raul David Orozco) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Add extra parameters to getfeatureinfo request Message-ID: <79677.67433.qm@web51403.mail.re2.yahoo.com> Hi to everyone. I'm using this piece of code to make a getfeatureinfo request: info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'dir/smms/wms.php', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( "myagri", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } }); map.addControl(info); info.activate(); And it works fine, I get my info back as I need it, but I have to send some extra parameters with getfeatureinfo request for example ''REPORT":"YES" but I don't know how to do it. Any help will be appreciated, and if everyone can suggest me a better way to do the features request that would be great. Thanks in advance. ____________________________________________________________________________________ ?Obt?n la mejor experiencia en la web! Descarga gratis el nuevo Internet Explorer 8. http://downloads.yahoo.com/ieak8/?l=e1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/56ed1f6f/attachment.html From eric.lemoine at camptocamp.com Fri Aug 14 12:29:21 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Add extra parameters to getfeatureinfo request In-Reply-To: <79677.67433.qm@web51403.mail.re2.yahoo.com> References: <79677.67433.qm@web51403.mail.re2.yahoo.com> Message-ID: On Fri, Aug 14, 2009 at 4:41 PM, Raul David Orozco wrote: > Hi to everyone. I'm using this piece of code to make a getfeatureinfo > request: > info = new OpenLayers.Control.WMSGetFeatureInfo({ > ? url: 'dir/smms/wms.php', > ? title: 'Identify features by clicking', > ? queryVisible: true, > ? eventListeners: { > ? getfeatureinfo: function(event) { > ? map.addPopup(new OpenLayers.Popup.FramedCloud( > ? "myagri", > ? map.getLonLatFromPixel(event.xy), > ? null, > ? event.text, > ? null, > ? true > ? )); > ? } > ? } > ? }); > ? map.addControl(info); > ? info.activate(); > And it works fine, I get my info back as I need it, but I have to send some > extra parameters with getfeatureinfo request for example ''REPORT":"YES" but > I don't know how to do it. Any help will be appreciated, and if everyone can > suggest me a better way to do the features request that would be great. Add vendorParams: { "REPORT": "YES" } in the options passed to the control. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From hagen1113 at yahoo.com Fri Aug 14 13:02:35 2009 From: hagen1113 at yahoo.com (Raul David Orozco) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Set map initial center and zoom Message-ID: <971791.8289.qm@web51404.mail.re2.yahoo.com> I'm here again with mi newbie questions. I've been dealing with this issue for a long time and I can't fix it no matter how hard I try. I need to make OL set an initial coordinates and zoom so when I open the browser the map stars in some specific part of the world. I've done it perfectly with an example doing this: var options = { minResolution: "auto", minExtent: new OpenLayers.Bounds(-1, -1, 1, 1), maxResolution: "auto", maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90) }; map = new OpenLayers.Map( 'map' , options); layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(layer); map.setCenter(new OpenLayers.LonLat(-73, 3), 3); And it works just the way I want, but when I do this with my map: var options = { minResolution: "auto", minExtent: new OpenLayers.Bounds(-1, -1, 1, 1), maxResolution: "auto", maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90) }; var map = new OpenLayers.Map( 'map' , options); var request = OpenLayers.Request.GET( {url: "dir/smms/wms.php?VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS", success: function(response){ var XMLformat = new OpenLayers.Format.XML(); var xml = XMLformat.read(response.responseText); var CAPformat = new OpenLayers.Format.WMSCapabilities(); var cap = CAPformat.read(xml); for (var i=0; i References: <1249584285317-3400100.post@n2.nabble.com> Message-ID: <1250273345092-3446612.post@n2.nabble.com> Hi list, I am still having some difficulties to set up the proxy host in Tomcat. Here are the steps I followed: 1.- I modified the file: "web.xml" C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\conf\web.xml. I uncomented the following lines of code: cgi org.apache.catalina.servlets.CGIServlet debug 0 cgiPathPrefix WEB-INF/cgi 5 cgi /cgi-bin/* 2.- I renamed the file servlets-cgi.renametojar to servlets-cgi.jar under the folder: C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\lib 3.- I downloaded the "proxy.cgi" file from Openlayers: http://trac.openlayers.org/browser/trunk/openlayers/examples/proxy.cgi and copy the file in a folder called "cgi-bin" that I created under my directory: "Tomcat 5.5\webapps\MapFish-1.1\client\cgi-bin\proxy.cgi" 4.- In the proxy.cgi file I included my machine in the allowed hosts: allowedHosts = ['demo.mapfish.org', 'localhost:5000', 'localhost', '127.0.0.1'] and I also added this line: #!c:/python25/python.exe -u (I already had installed python in my PC) 5.- I included this piece of code in my map: OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; 6.- I restarted my Tomcat. I do not see the openlayers.org website when I typed: http://127.0.0.1:8080/MapFish-1.1/client/cgi-bin/proxy.cgi, I got the 404 error. Does anyone knows what I missing? Thanks again Eric and Michogar! Juan Eric Lemoine-2-2 wrote: > > On Thursday, August 6, 2009, Juan Ar?valo wrote: >> >> Hi all, >> >> I am making some progress setting up a WFS-T, it seems that my code works >> since I don??t get any error, but the layer doesn't display in the map. I >> have read that this problem can be solved by setting the Proxy Host, >> however >> I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and >> OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for >> Apache >> but not for Tomcat) >> >> Does anyone have any ideas on how to solve it? > > Hi. If your Tomcat instance serves both the HTML page and the WFS then > you don't need a proxy. > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3446612.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From john.c.cartwright at comcast.net Fri Aug 14 16:50:56 2009 From: john.c.cartwright at comcast.net (John Cartwright) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] beforefeatureadded event not firing on Layer In-Reply-To: References: <4A84A257.70301@comcast.net> Message-ID: <4A85CE30.8020600@comcast.net> Eric Lemoine wrote: > On Friday, August 14, 2009, John Cartwright > wrote: > >> Hello All, >> >> I have OpenLayers.Layer.Vector layer on which I've defined the >> "beforefeatureadded" and "beforefeaturesadded" events, e.g. >> >> vectors.events.on({"beforefeaturesadded": report, "beforefeatureadded": >> report}); >> >> Then I'm adding features to this layer using the >> OpenLayersControlDrawFeature control. Problem is that the above events >> don't seem to be firing as I add additional features to the layer. The >> "featureadded" event fires, but not the "beforefeatureadded". >> >> This is version 2.8. Can someone please point out what I'm doing wrong >> here? >> > > Hi. > > this is weird. Can you reproduce that in a minimal example with just a > vector layer and a draw feature control? > Sorry Eric, this was my fault. I was inadvertently redefining the handler function later in the code. --john From mike at spatialit.com Fri Aug 14 17:06:20 2009 From: mike at spatialit.com (Michael Anderson) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] programmatically select feature to modify - worked in 2.7 but doesn't in 2.8 Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090814/4ff39ff7/testSelect.html From john.c.cartwright at comcast.net Fri Aug 14 17:26:42 2009 From: john.c.cartwright at comcast.net (John Cartwright) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added Message-ID: <4A85D692.8010900@comcast.net> Hello All, I'm using OL 2.8 and trying to implement the behavior where the user can digitize points, lines, or polygons, but only the last created feature will be kept and displayed. I've attempted this via a handler on the Layer's "beforefeatureadded" event like: function clearPreviousFeatures(evt) { dojo.forEach(vectorLayer.features, function(f) { if (f.id != evt.feature.id) { vectorLayer.removeFeatures([f], {silent:true}); } }); vectorLayer.redraw(); } However, I find that the previous drawn features remain until the DrawFeature control is changed. Also as soon as the second feature is added, the code above complains that "f is undefined". Finally, any features added subsequent to the first do not display in the style defined for the layer. I feel like this should be a simple task and that I'm missing something fundamental here. Can someone show me what's wrong or suggest a better strategy for accomplishing this goal? Thanks! --john From jmcgrath at nippour.ca Fri Aug 14 17:27:14 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 37 Message-ID: <20090814212714.19349.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From n.e.kendall at gmail.com Sat Aug 15 00:33:33 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Anyway to set minimum bounding box? Message-ID: <33fd44f90908142133l5e4e1d33pdecc35668b7cc532@mail.gmail.com> Hi All, I'm happily using map.getCenter in a conditional statement if( ! map.getCenter() ){ sites.events.register('loadend', sites, function(){map.zoomToExtent(sites.getDataExtent())}); map.setCenter(null, null); }; which when my layer is loaded centers on the geometry in the map. This works great (thanks again, Jan!). The issue I have is when a single POI is loaded, the map zooms in all the way and I get the "Mose OSM coming soon" tiles which is not aesthetically pleasing. I'm going to switch over to a NASA Landsatt, or perhaps an image layer as the base, but I still think this will be an issue. Is there anyway to constrain this, or to specify a minimum bounding box or zoom level to prevent this from happening? The alternative would be to just set the function on one of my static GML files, but I like this feature. Any suggestions on how to approach this? -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090815/dd9e45f4/attachment.html From eric.lemoine at camptocamp.com Sat Aug 15 03:26:02 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added In-Reply-To: <4A85D692.8010900@comcast.net> References: <4A85D692.8010900@comcast.net> Message-ID: On Friday, August 14, 2009, John Cartwright wrote: > Hello All, > > I'm using OL 2.8 and trying to implement the behavior where the user can > digitize points, lines, or polygons, but only the last created feature > will be kept and displayed. ?I've attempted this via a handler on the > Layer's "beforefeatureadded" event like: > > function clearPreviousFeatures(evt) { > ? ?dojo.forEach(vectorLayer.features, function(f) { > ? ? ? if (http://f.id != http://evt.feature.id) { > ? ? ? ? ?vectorLayer.removeFeatures([f], {silent:true}); > ? ? ? } > ? ?}); > ? ?vectorLayer.redraw(); removing objects within a dojo.forEach loop may not be safe. why don't you have you beforefeatureadded listener destroy all features (with layer.destroyFeature)? Cheers, > } > > > However, ?I find that the previous drawn features remain until the > DrawFeature control is changed. ?Also as soon as the second feature is > added, the code above complains that "f is undefined". ?Finally, any > features added subsequent to the first do not display in the style > defined for the layer. > > I feel like this should be a simple task and that I'm missing something > fundamental here. ?Can someone show me what's wrong or suggest a better > strategy for accomplishing this goal? > > Thanks! > > --john > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From Jeremy.Husmann at critchlow.co.nz Sat Aug 15 04:15:42 2009 From: Jeremy.Husmann at critchlow.co.nz (Jeremy Husmann) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Vector file as base map Message-ID: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz> Hello everyone, Just a quick question. Im wanting to stand up a basic webpage using standard OpenLayers, but I want to be displaying a default KML or GML. But without any base map underneath - i.e. the vector file to be the base map. Is this possible? And if so how would you recommend starting this? Cheers, Jeremy JEREMY HUSMANN SOFTWARE ENGINEER Jeremy.Husmann@critchlow.co.nz CRITCHLOW LTD LEVEL 2, 22 THE TERRACE, PO BOX 4103 WELLINGTON, NEW ZEALAND FREE PHONE: 0800 627 746 DIRECT DIAL: +64 4 910 6208 TEL: +64 4 472 8244 FAX: +64 4 472 6695 KNOW WHERE | WWW.CRITCHLOW.CO.NZ WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL This email transmission (including any accompanying attachments) contains confidential information, which may be subject to legal privilege intended for the named addressee. If any other reader is not the intended recipient, you are hereby notified that any use, dissemination, distribution or reproduction of this email is prohibited. If you have received this email in error please contact us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090815/536adce8/attachment.html From jansen at terrestris.de Sat Aug 15 04:35:51 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Vector file as base map In-Reply-To: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz> References: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz> Message-ID: <4A867367.2040102@terrestris.de> Hi Jeremy, simply pass in isBaseLayer: true as a part of the options-Object when constructing your vector layer. Regards, Marc Jeremy Husmann schrieb: > > Hello everyone, > > Just a quick question. > > Im wanting to stand up a basic webpage using standard OpenLayers, but > I want to be displaying a default KML or GML. But without any base map > underneath ? i.e. the vector file to be the base map. Is this > possible? And if so how would you recommend starting this? > > Cheers, > > Jeremy > > *JEREMY HUSMANN*** > > SOFTWARE ENGINEER > > Jeremy.Husmann@critchlow.co.nz > > * * > > *CRITCHLOW LTD*** > > LEVEL 2, 22 THE TERRACE, PO BOX 4103 > > WELLINGTON, NEW ZEALAND > > FREE PHONE: 0800 627 746 > > DIRECT DIAL: +64 4 910 6208 > > TEL: +64 4 472 8244 > > FAX: +64 4 472 6695 > > _ _ > > *KNOW WHERE** | WWW.CRITCHLOW.CO.NZ > <../../../../Ian/Application%20Data/Microsoft/Signatures/WWW.CRITCHLOW.CO.NZ>* > > * * > > WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL > > This email transmission (including any accompanying attachments) > contains confidential information, which may be subject to legal > privilege intended for the named addressee. If any other reader is not > the intended recipient, you are hereby notified that any use, > > dissemination, distribution or reproduction of this email is > prohibited. If you have received this email in error please contact us > immediately. > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From jansen at terrestris.de Sat Aug 15 04:37:48 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Anyway to set minimum bounding box? In-Reply-To: <33fd44f90908142133l5e4e1d33pdecc35668b7cc532@mail.gmail.com> References: <33fd44f90908142133l5e4e1d33pdecc35668b7cc532@mail.gmail.com> Message-ID: <4A8673DC.4050108@terrestris.de> Hi Nicholas, have you set the minExtent and maxExtent properties on the map-Object? Regards, Marc Nicholas Efremov-Kendall schrieb: > Hi All, > > I'm happily using map.getCenter in a conditional statement > > if( ! map.getCenter() ){ > sites.events.register('loadend', sites, > function(){map.zoomToExtent(sites.getDataExtent())}); > map.setCenter(null, null); > }; > > which when my layer is loaded centers on the geometry in the map. This > works great (thanks again, Jan!). The issue I have is when a single > POI is loaded, the map zooms in all the way and I get the "Mose OSM > coming soon" tiles which is not aesthetically pleasing. > > I'm going to switch over to a NASA Landsatt, or perhaps an image layer > as the base, but I still think this will be an issue. Is there anyway > to constrain this, or to specify a minimum bounding box or zoom level > to prevent this from happening? The alternative would be to just set > the function on one of my static GML files, but I like this feature. > Any suggestions on how to approach this? > > > > -- > Nicholas Efremov-Kendall > Fulbright Student 2009-2010, Ukraine > nefremov@artsci.wustl.edu > c/o Halyna Yerko > Balzaka 92a, Kv 27 > 02232 > Kyiv, Ukraine > (mob) +380963576524 > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From bthoen at gisnet.com Sat Aug 15 07:59:47 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] What's the Best Way to Create Lengends with OL/MapServer? Message-ID: <4A86A333.8090701@gisnet.com> Greetings All, What's the best way to create legends in an OpenLayers interface over MapServer? Is there a way to use the MS HTML legends from a mapfile, or do I have to start with GetLegendGraphic calls anyway? What I'd like is a Legend / Layer Control from which I could show / hide layers and see their current styles -- something like the type 3 legends described in the MS docs here: http://www.mapserver.org/output/html_legend.html#sample-site-using-the-html-legend. But these templates seem to be usable only with MapServer; OpenLayers doesn't appear to read a mapfile to that level. In the long run, however, what I really want is a Layer Control; one that allows the user to change layer order, turn layers on and off, change their styles, mark a layer as selectable and/or editable,and group layers so that the groups can be moved up or down, made visible or hidden, etc. as a group. That, I suppose, is a job for JavaScript or something similar, which I can do if that's the best approach, but if there's something ready to use out there already, I'd rather not re-invent it. There always seems to be so many choices when you build your own that sometimes I hardly know where to start! Thanks, - Bill Thoen From jmcgrath at nippour.ca Sat Aug 15 08:01:11 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 38 Message-ID: <20090815120111.1795.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From eric.lemoine at camptocamp.com Sat Aug 15 08:59:59 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Vector file as base map In-Reply-To: <4A867367.2040102@terrestris.de> References: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz> <4A867367.2040102@terrestris.de> Message-ID: On Saturday, August 15, 2009, Marc Jansen wrote: > Hi Jeremy, > > simply pass in > > isBaseLayer: true if you have OL 2.8 you can also use allOverlays true in the map options. Cheers, > > as a part of the options-Object when constructing your vector layer. > > Regards, > Marc > > > Jeremy Husmann schrieb: >> >> Hello everyone, >> >> Just a quick question. >> >> Im wanting to stand up a basic webpage using standard OpenLayers, but >> I want to be displaying a default KML or GML. But without any base map >> underneath ? i.e. the vector file to be the base map. Is this >> possible? And if so how would you recommend starting this? >> >> Cheers, >> >> Jeremy >> >> *JEREMY HUSMANN*** >> >> SOFTWARE ENGINEER >> >> Jeremy.Husmann@critchlow.co.nz >> >> * * >> >> *CRITCHLOW LTD*** >> >> LEVEL 2, 22 THE TERRACE, PO BOX 4103 >> >> WELLINGTON, NEW ZEALAND >> >> FREE PHONE: 0800 627 746 >> >> DIRECT DIAL: +64 4 910 6208 >> >> TEL: +64 4 472 8244 >> >> FAX: +64 4 472 6695 >> >> _ _ >> >> *KNOW WHERE** | http://WWW.CRITCHLOW.CO.NZ >> <../../../../Ian/Application%20Data/Microsoft/Signatures/http://WWW.CRITCHLOW.CO.NZ>* >> >> * * >> >> WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL >> >> This email transmission (including any accompanying attachments) >> contains confidential information, which may be subject to legal >> privilege intended for the named addressee. If any other reader is not >> the intended recipient, you are hereby notified that any use, >> >> dissemination, distribution or reproduction of this email is >> prohibited. If you have received this email in error please contact us >> immediately. >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Sat Aug 15 09:03:52 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] What's the Best Way to Create Lengends with OL/MapServer? In-Reply-To: <4A86A333.8090701@gisnet.com> References: <4A86A333.8090701@gisnet.com> Message-ID: On Saturday, August 15, 2009, Bill Thoen wrote: > Greetings All, > > What's the best way to create legends in an OpenLayers interface over > MapServer? Is there a way to use the MS HTML legends from a mapfile, or > do I have to start with GetLegendGraphic calls anyway? What I'd like is > a Legend / Layer Control from which I could show / hide layers and see > their current styles -- something like the type 3 legends described in > the MS docs here: > http://www.mapserver.org/output/html_legend.html#sample-site-using-the-html-legend. > But these templates seem to be usable only with MapServer; OpenLayers > doesn't appear to read a mapfile to that level. > > In the long run, however, what I really want is a Layer Control; one > that allows the user to change layer order, turn layers on and off, > change their styles, mark a layer as selectable and/or ?editable,and > group layers so that the groups can be moved up or down, made visible or > hidden, etc. as a group. That, I suppose, is a job for JavaScript or > something similar, which I can do if that's the best approach, but if > there's something ready to use out there already, I'd rather not > re-invent it. > > There always seems to be so many choices when you build your own that > sometimes I hardly know where to start! Hi. what you're asking is beyond the scope of OpenLayers. I'd recommend you look at GeoExt (www.geoext.org), which features a layer tree and a legend panel (based on GetLegendGraphic for WMS layers). Hope this helps, > > > Thanks, > - Bill Thoen > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From richard.greenwood at gmail.com Sat Aug 15 09:04:25 2009 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] What's the Best Way to Create Lengends with OL/MapServer? In-Reply-To: <4A86A333.8090701@gisnet.com> References: <4A86A333.8090701@gisnet.com> Message-ID: I've been using dlegend from the Minnesota DNR. It is based on the Yahoo YUI. Here's an example: www2.tetonwyo.org/mapserver/map.php You can define the legend in the map file's metadata. Rich On Sat, Aug 15, 2009 at 5:59 AM, Bill Thoen wrote: > Greetings All, > > What's the best way to create legends in an OpenLayers interface over > MapServer? Is there a way to use the MS HTML legends from a mapfile, or > do I have to start with GetLegendGraphic calls anyway? What I'd like is > a Legend / Layer Control from which I could show / hide layers and see > their current styles -- something like the type 3 legends described in > the MS docs here: > http://www.mapserver.org/output/html_legend.html#sample-site-using-the-html-legend. > But these templates seem to be usable only with MapServer; OpenLayers > doesn't appear to read a mapfile to that level. > > In the long run, however, what I really want is a Layer Control; one > that allows the user to change layer order, turn layers on and off, > change their styles, mark a layer as selectable and/or ?editable,and > group layers so that the groups can be moved up or down, made visible or > hidden, etc. as a group. That, I suppose, is a job for JavaScript or > something similar, which I can do if that's the best approach, but if > there's something ready to use out there already, I'd rather not > re-invent it. > > There always seems to be so many choices when you build your own that > sometimes I hardly know where to start! > > > Thanks, > - Bill Thoen > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From jmcgrath at nippour.ca Sat Aug 15 12:00:12 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 39 Message-ID: <20090815160012.9072.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From john.c.cartwright at comcast.net Sat Aug 15 12:28:47 2009 From: john.c.cartwright at comcast.net (John Cartwright) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added In-Reply-To: References: <4A85D692.8010900@comcast.net> Message-ID: <7D63F257-76B2-4ACC-B5BD-B8D53F0B011B@comcast.net> Thanks for your suggestion Eric. That was the first thing I tried, but it doesn't clear the map, even with an explicit redraw() vectorLayer.events.on({ "featuremodified": mapUpdated, "beforefeatureadded": clearPreviousFeatures, "featureadded": mapUpdated }); function clearPreviousFeatures(evt) { vectorLayer.destroyFeatures(); vectorLayer.redraw(); } function mapUpdated(evt) { console.log('Vector layer has '+vectorLayer.features.length+' features'); dojo.publish('mapUpdated',[evt.feature.geometry]); } Setting it up this way also seems to clear the newly added feature as well - when the featureadded handler runs, it reports no features in the layer. Is this what you had in mind? I really appreciate your help with this. --john On Aug 15, 2009, at 1:26 AM, Eric Lemoine wrote: > On Friday, August 14, 2009, John Cartwright > wrote: >> Hello All, >> >> I'm using OL 2.8 and trying to implement the behavior where the >> user can >> digitize points, lines, or polygons, but only the last created >> feature >> will be kept and displayed. I've attempted this via a handler on the >> Layer's "beforefeatureadded" event like: >> >> function clearPreviousFeatures(evt) { >> dojo.forEach(vectorLayer.features, function(f) { >> if (http://f.id != http://evt.feature.id) { >> vectorLayer.removeFeatures([f], {silent:true}); >> } >> }); >> vectorLayer.redraw(); > > removing objects within a dojo.forEach loop may not be safe. > > why don't you have you beforefeatureadded listener destroy all > features (with layer.destroyFeature)? > > Cheers, > > >> } >> >> >> However, I find that the previous drawn features remain until the >> DrawFeature control is changed. Also as soon as the second feature >> is >> added, the code above complains that "f is undefined". Finally, any >> features added subsequent to the first do not display in the style >> defined for the layer. >> >> I feel like this should be a simple task and that I'm missing >> something >> fundamental here. Can someone show me what's wrong or suggest a >> better >> strategy for accomplishing this goal? >> >> Thanks! >> >> --john >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090815/d6f8eb29/attachment.html From crschmidt at metacarta.com Sat Aug 15 17:11:05 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Vector file as base map In-Reply-To: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz> References: <9436AA4D332D4F41A2C82CD50DB759F7722677@caexch01.ca1.critchlow.co.nz> Message-ID: <20090815211101.GA26464@metacarta.com> On Sat, Aug 15, 2009 at 08:15:42PM +1200, Jeremy Husmann wrote: > Hello everyone, > > > > Just a quick question. > > > > Im wanting to stand up a basic webpage using standard OpenLayers, but I > want to be displaying a default KML or GML. But without any base map > underneath - i.e. the vector file to be the base map. Is this possible? > And if so how would you recommend starting this? Yes. Just add an isBaseLayer: true option to the layer constructor. -- Chris > > > Cheers, > > Jeremy > > > > JEREMY HUSMANN > > SOFTWARE ENGINEER > > Jeremy.Husmann@critchlow.co.nz > > > > CRITCHLOW LTD > > LEVEL 2, 22 THE TERRACE, PO BOX 4103 > > WELLINGTON, NEW ZEALAND > > FREE PHONE: 0800 627 746 > > DIRECT DIAL: +64 4 910 6208 > > TEL: +64 4 472 8244 > > FAX: +64 4 472 6695 > > > > KNOW WHERE | WWW.CRITCHLOW.CO.NZ > > > > WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL > > This email transmission (including any accompanying attachments) > contains confidential information, which may be subject to legal > privilege intended for the named addressee. If any other reader is not > the intended recipient, you are hereby notified that any use, > > dissemination, distribution or reproduction of this email is prohibited. > If you have received this email in error please contact us immediately. > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From n.e.kendall at gmail.com Sat Aug 15 17:15:26 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Anyway to set minimum bounding box? In-Reply-To: <4A8673DC.4050108@terrestris.de> References: <33fd44f90908142133l5e4e1d33pdecc35668b7cc532@mail.gmail.com> <4A8673DC.4050108@terrestris.de> Message-ID: <33fd44f90908151415g7f62ce3cn4dce3cfaa1f2df43@mail.gmail.com> No, I haven't. Does anyone have a good rule of thumb for scaling these properties, or is it just sort of a feel it out kind of thing? Thanks, Marc. On Sat, Aug 15, 2009 at 11:37 AM, Marc Jansen wrote: > Hi Nicholas, > > have you set the minExtent and maxExtent properties on the map-Object? > > Regards, > > Marc > > Nicholas Efremov-Kendall schrieb: > >> Hi All, >> >> I'm happily using map.getCenter in a conditional statement >> if( ! map.getCenter() ){ >> sites.events.register('loadend', sites, >> function(){map.zoomToExtent(sites.getDataExtent())}); >> map.setCenter(null, null); >> }; >> >> which when my layer is loaded centers on the geometry in the map. This >> works great (thanks again, Jan!). The issue I have is when a single POI is >> loaded, the map zooms in all the way and I get the "Mose OSM coming soon" >> tiles which is not aesthetically pleasing. >> I'm going to switch over to a NASA Landsatt, or perhaps an image layer as >> the base, but I still think this will be an issue. Is there anyway to >> constrain this, or to specify a minimum bounding box or zoom level to >> prevent this from happening? The alternative would be to just set the >> function on one of my static GML files, but I like this feature. Any >> suggestions on how to approach this? >> >> >> >> -- >> Nicholas Efremov-Kendall >> Fulbright Student 2009-2010, Ukraine >> nefremov@artsci.wustl.edu >> c/o Halyna Yerko >> Balzaka 92a, Kv 27 >> 02232 >> Kyiv, Ukraine >> (mob) +380963576524 >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090816/a686f4b3/attachment.html From xiaying4415139 at 163.com Sun Aug 16 01:33:36 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] about Navigation and Box Control In-Reply-To: <133009.25562.qm@web15104.mail.cnb.yahoo.com> References: <133009.25562.qm@web15104.mail.cnb.yahoo.com> Message-ID: <1250400816745-3452557.post@n2.nabble.com> Use ZoomBox control is so easy, just like the common control. var ctl = new OpenLayers.Control.ZoomBox(); map.addControl(ctl); Please notice that, there are controls who exclude each other, navigation and zoombox are one of the example. So you should to use Button group for just active one of these exclusive controls. That means active navigation, deactive zoombox, active zoombox deactive navigation. If you are new openlayers user and want more help, you can add my QQ 642106069, be fine. ?? ? wrote: > > Hi: > ????? I have a problem,i can't use Navigation > Control(OpenLayers.Control.Navigation()) when i have used Box Control like > this : > ??? var control = new OpenLayers.Control(); > ??????????????? OpenLayers.Util.extend(control, { > ??????????????????? draw: function () { > ??????????????????????? // this Handler.Box will intercept the > shift-mousedown > ??????????????????????? // before Control.MouseDefault gets to see it > ??????????????????????? this.box = new OpenLayers.Handler.Box( control, > ??????????????????????????? {"done": this.notice}, > ??????????????????????????? {keyMask: OpenLayers.Handler.MOD_CTRL}); > ??????????????????????? this.box.activate(); > ??????????????????? }, > > ??????????????????? notice: function (bounds) { > ??????????????????????? var ll = map.getLonLatFromPixel(new > OpenLayers.Pixel(bounds.left, bounds.bottom)); > ??????????????????????? var ur = map.getLonLatFromPixel(new > OpenLayers.Pixel(bounds.right, bounds.top)); > ??????????????????????? var rowlength = > document.all("table1").rows.length; > ??????????????????????? for(var i=1; i ??????????????????????? ??? > document.all("table1").rows[i].cells[1].bgColor = "#ffffff"; > ??????????????????????? ??? var x = > document.all("table1").rows[i].cells[4].innerText; > ??????????????????????? ??? var y = > document.all("table1").rows[i].cells[5].innerText; > ??????????????????????? ??? > if(x>ll.lon.toFixed(4)&&xll.lat.toFixed(4)&&y ??????????????????????? ??? //??? alert("sucess"); > ??????????????????????? ??? ??? > document.all("table1").rows[i].cells[1].bgColor = "#00FFFF"; > ??????????????????????? ??? } > ??????????????????????? } > ??????????????????????? alert(ll.lon.toFixed(4) + ", " + > ????????????????????????????? ll.lat.toFixed(4) + ", " + > ????????????????????????????? ur.lon.toFixed(4) + ", " + > ????????????????????????????? ur.lat.toFixed(4)); > ??????????????????? } > ??????????????? }); > ? i want them work together,how can i do ? thanks > > > > > ___________________________________________________________ > ????????????????? > http://card.mail.cn.yahoo.com/ > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/about-Navigation-and-Box-Control-tp3435061p3452557.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jmcgrath at nippour.ca Sun Aug 16 01:33:43 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 40 Message-ID: <20090816053343.20192.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From Jeremy.Husmann at critchlow.co.nz Sun Aug 16 03:44:24 2009 From: Jeremy.Husmann at critchlow.co.nz (Jeremy Husmann) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Vector file as base map In-Reply-To: <4A867367.2040102@terrestris.de> Message-ID: <9436AA4D332D4F41A2C82CD50DB759F772268D@caexch01.ca1.critchlow.co.nz> Great, found that out about 20 minutes after sending the email. Thank you for your help Marc and Eric! Cheers guys, Jeremy JEREMY HUSMANN SOFTWARE ENGINEER Jeremy.Husmann@critchlow.co.nz CRITCHLOW LTD LEVEL 2, 22 THE TERRACE, PO BOX 4103 WELLINGTON, NEW ZEALAND FREE PHONE: 0800 627 746 DIRECT DIAL: +64 4 910 6208 TEL: +64 4 472 8244 FAX: +64 4 472 6695 KNOW WHERE | WWW.CRITCHLOW.CO.NZ WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL This email transmission (including any accompanying attachments) contains confidential information, which may be subject to legal privilege intended for the named addressee. If any other reader is not the intended recipient, you are hereby notified that any use, dissemination, distribution or reproduction of this email is prohibited. If you have received this email in error please contact us immediately. -----Original Message----- From: Marc Jansen [mailto:jansen@terrestris.de] Sent: Saturday, August 15, 2009 8:36 PM To: Jeremy Husmann Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Vector file as base map Hi Jeremy, simply pass in isBaseLayer: true as a part of the options-Object when constructing your vector layer. Regards, Marc Jeremy Husmann schrieb: > > Hello everyone, > > Just a quick question. > > Im wanting to stand up a basic webpage using standard OpenLayers, but > I want to be displaying a default KML or GML. But without any base map > underneath - i.e. the vector file to be the base map. Is this > possible? And if so how would you recommend starting this? > > Cheers, > > Jeremy > > *JEREMY HUSMANN*** > > SOFTWARE ENGINEER > > Jeremy.Husmann@critchlow.co.nz > > * * > > *CRITCHLOW LTD*** > > LEVEL 2, 22 THE TERRACE, PO BOX 4103 > > WELLINGTON, NEW ZEALAND > > FREE PHONE: 0800 627 746 > > DIRECT DIAL: +64 4 910 6208 > > TEL: +64 4 472 8244 > > FAX: +64 4 472 6695 > > _ _ > > *KNOW WHERE** | WWW.CRITCHLOW.CO.NZ > <../../../../Ian/Application%20Data/Microsoft/Signatures/WWW.CRITCHLOW.C O.NZ>* > > * * > > WARNING - THIS EMAIL TRANSMISSION IS CONFIDENTIAL > > This email transmission (including any accompanying attachments) > contains confidential information, which may be subject to legal > privilege intended for the named addressee. If any other reader is not > the intended recipient, you are hereby notified that any use, > > dissemination, distribution or reproduction of this email is > prohibited. If you have received this email in error please contact us > immediately. > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From Gerhard.Duennebeil at chello.at Sun Aug 16 05:39:39 2009 From: Gerhard.Duennebeil at chello.at (=?ISO-8859-1?Q?Gerhard_D=FCnnebeil?=) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Problems with IE8 and GeoJSON In-Reply-To: <4A8256C6.7040804@chello.at> References: <4A8256C6.7040804@chello.at> Message-ID: <4A87D3DB.3010208@chello.at> ok, finally found it myself. When working with JSON the Internet Explorer is more critical than firefox. Within the array brackets [] for the "features" array my JSON contained an extra "," at the end. Firefox ignores it, IE obviously does not. Fixing this problem made my code work Best regards Gerhard Gerhard D?nnebeil wrote: > Hi everybody. > > Not sure this problem already got discussed, if yes.....please give me a > pointer to it. Otherwise ..... > > > > I try to display a vector layer using a fixed strategy and GeoJSON. > Things work fine under Firefox. > > When I test things with IE8, things fail. I run IE8 in default mode, no > special headers or anything set on the web page that holds the map or > elsewhere. > > I digged deeper into it and found the following strange behaviour: > When the Layer is about to be drawn, data is fetched from the net and > converted from JSON to java script. This happens in the read method > (GEOjson.js/Line 64, see code excerpt below) > > A bit below (line 69) the conversion is done into the variable "obj". > When you look at the "obj" variable at this point it holds an array > named features *but* the feature array has *no* length property. > Otherwise the array is correct with respect to the input data. > > In line 108 this feature array is iterated with a reference to the > length property. When IE8 interprets this statement the feature array > suddenly *has* a length property but it is wrong (too big, 3 instead of 2). > As a follow-up error this causes the loop to break via the catch block > when features[2] is accessed and gives back an empty result instead of > the expected. > > Is this a known problem? > How to work around it? > > thanks for any help and > best regards > Gerhard > > ------------------------------------------ > Appendix 1, the code mentioned above) > > read: function(json, type, filter) { > type = (type) ? type : "FeatureCollection"; > var results = null; > var obj = null; > if (typeof json == "string") { > line 69: obj = OpenLayers.Format.JSON.prototype.read.apply(this, > [json, > filter]); > } else { > obj = json; > } > if(!obj) { > OpenLayers.Console.error("Bad JSON: " + json); > } else if(typeof(obj.type) != "string") { > OpenLayers.Console.error("Bad GeoJSON - no type: " + json); > } else if(this.isValidType(obj, type)) { > switch(type) { > case "Geometry": > try { > results = this.parseGeometry(obj); > } catch(err) { > OpenLayers.Console.error(err); > } > break; > case "Feature": > try { > results = this.parseFeature(obj); > results.type = "Feature"; > } catch(err) { > OpenLayers.Console.error(err); > } > break; > case "FeatureCollection": > // for type FeatureCollection, we allow input to be > any type > results = []; > switch(obj.type) { > case "Feature": > try { > results.push(this.parseFeature(obj)); > } catch(err) { > results = null; > OpenLayers.Console.error(err); > } > break; > case "FeatureCollection": > line 108: for(var i=0, > len=obj.features.length; i try { > > results.push(this.parseFeature(obj.features[i])); > } catch(err) { > results = null; > OpenLayers.Console.error(err); > } > } > break; > default: > try { > var geom = this.parseGeometry(obj); > results.push(new > OpenLayers.Feature.Vector(geom)); > } catch(err) { > results = null; > OpenLayers.Console.error(err); > } > } > break; > } > } > return results; > > ------------------------------------------------ > Appendix 2, the JSON data > > { "type" : "FeatureCollection", "features" : [ { "type" : "Feature" > ,"geometry": { "type": "Point", "coordinates": [291068,270013] } > ,"properties": { "img_url": "icons/green_dot.gif" } }, { "type" : > "Feature" ,"geometry": { "type": "Point", "coordinates": [291069,269967] > } ,"properties": { "img_url": "icons/red_dot.gif" } }, ] } > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From n.e.kendall at gmail.com Sun Aug 16 08:02:43 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Issues with some popups Message-ID: <33fd44f90908160502ub5067c4oc83ef33c5e744d53@mail.gmail.com> Hi all, I'm having some issues with my code, and I'm not sure where the problem lies. This code worked at one point, and I've been staring at it for too long to see the problem. Two firebug errors fire when I click on one of the POI's "feature.geometry is undefined" and "popup is undefined". Any suggestions? var map, layer, selectedFeature, selectControl, selectedFeature, sites; function onPopupClose(evt) { selectControl.unselect(selectedFeature); } function onFeatureSelect(feature) { selectedFeature = feature; popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), null, "
Site_ID: " + feature.attributes.title +"
Locality: " + feature.attributes.title+"
Description: " +feature.attributes+"
Feature ID: "+feature.id+"
Feature Type:"+feature.attributes.NEWSITE_ +"
", null, true, onPopupClose); feature.popup = popup; map.addPopup(popup); } function onFeatureUnselect(feature) { map.removePopup(feature.popup); feature.popup.destroy(); feature.popup = null; } function init() { map = new OpenLayers.Map ("map", { controls:[ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.Attribution()], sphericalMercator: true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxResolution: 156543.0399, numZoomLevels: 19, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), } ); var sites = new OpenLayers.Layer.GML ( "Archaeological Sites", "data/siteswatr.gml", { style: {pointRadius: 2.5}, projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.GML } ); map.addLayer(sites); sites.events.on({ 'featureselected': onFeatureSelect, 'featureunselected': onFeatureUnselect }); selectControl = new OpenLayers.Control.SelectFeature(sites, {clickout: true, toggle: false, hover: false, } ); map.addControl(selectControl); selectControl.activate(); if( ! map.getCenter() ){ sites.events.register('loadend', sites, function(){map.zoomToExtent(sites.getDataExtent())}); map.setCenter(null, null); }; } -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090816/b771e8f1/attachment.html From jdev at lucky-day.de Sun Aug 16 11:41:44 2009 From: jdev at lucky-day.de (jopix) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] can't get a right german map as an overlay working Message-ID: <1250437304196-3453890.post@n2.nabble.com> i am working on a project for information for german elections - try to get a map with several category layers working. Base should be an image: a map of germany (http://de.wikipedia.org/w/index.php?title=Datei:Bundestag_Wahlkreise_2009.svg&filetimestamp=20081010175633) All logic seems to be ok, can add layers with categories on top of the image - > but i can't get the right view (maybe projection?) of the map. It is allways a compressed view. There are only the image, xml-files - no mapserver, no backend. What's wrong with my code? Any Idea to let it look like the original image? Thank you. *******MAP******** // Map options: // start with no controls, restrict view to just Germany, allow 4 different zoom options var map_options = { controls: [], scales: [5000000, 4000000, 3000000, 2000000, 1300000], maxResolution: 30000/1024, projection:"EPSG:4326", maxExtend: new OpenLayers.Bounds(5.25075, 47.2441, 15.425, 55.0317) } // Generate the map map = new OpenLayers.Map('map', map_options); var graphic = new OpenLayers.Layer.Image( 'Deutschland', 'hts/g_election_districts_2005_02_v1.png', new OpenLayers.Bounds(5.25075, 47.2441, 15.425,55.0317), // Not sure exactly what Size controls new OpenLayers.Size(80, 110), {}); ********************* -- View this message in context: http://n2.nabble.com/can%27t-get-a-right-german-map-as-an-overlay-working-tp3453890p3453890.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jmcgrath at nippour.ca Sun Aug 16 12:00:05 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 41 Message-ID: <20090816160005.5890.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From eric.lemoine at camptocamp.com Sun Aug 16 13:00:16 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Issues with some popups In-Reply-To: <33fd44f90908160502ub5067c4oc83ef33c5e744d53@mail.gmail.com> References: <33fd44f90908160502ub5067c4oc83ef33c5e744d53@mail.gmail.com> Message-ID: On Sunday, August 16, 2009, Nicholas Efremov-Kendall wrote: > Hi all, > I'm having some issues with my code, and I'm not sure where the problem lies. This code worked at one point, and I've been staring at it for too long to see the problem. Two firebug errors fire when I click on one of the POI's "feature.geometry is undefined" and "popup is undefined". Any suggestions? > > > var map, layer, selectedFeature, selectControl, selectedFeature, sites;function onPopupClose(evt) {?? ? ? ? ? ?selectControl.unselect(selectedFeature);?? ? ? ?} > > function onFeatureSelect(feature) {?? ? ? ? ? ?selectedFeature = feature; "featureselected" listeners do not receive a feature but an object with a feature property referencing the selected feature. So your code should look like this: function onFeatureSelect(evt) { selectedFeature = evt.feature; ... } cheers, > popup = new OpenLayers.Popup.FramedCloud("chicken",??? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? feature.geometry.getBounds().getCenterLonLat(), > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? null,?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "
Site_ID: " + feature.attributes.title +"
Locality: " + feature.attributes.title+"
Description: " +feature.attributes+"
Feature ID: "+feature.id+"
Feature Type:"+feature.attributes.NEWSITE_ +"
", > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? null, true, onPopupClose);?? ? ? ? ? ?feature.popup = popup;?? ? ? ? ? ?map.addPopup(popup); ? ? ? ?} > ?function onFeatureUnselect(feature) {?? ? ? ? ? ?map.removePopup(feature.popup);?? ? ? ? ? ?feature.popup.destroy();?? ? ? ? ? ?feature.popup = null; > ?? ? ? ?} > function init() { map = new OpenLayers.Map ("map", > { controls:[ new OpenLayers.Control.Navigation(), > new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher(), > new OpenLayers.Control.Attribution()], sphericalMercator: true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), > maxResolution: 156543.0399, numZoomLevels: 19, units: 'm', > projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), > } ); > var sites = new OpenLayers.Layer.GML ( "Archaeological Sites", "data/siteswatr.gml", > { style: {pointRadius: 2.5},? projection: new OpenLayers.Projection("EPSG:4326"), > format: OpenLayers.Format.GML } ); > map.addLayer(sites); > sites.events.on({ 'featureselected': onFeatureSelect, > ?? ? 'featureunselected': onFeatureUnselect }); > > ?? ? ? ? ? ?selectControl = new OpenLayers.Control.SelectFeature(sites,?? ? ? ? ? ? ? ?{clickout: true, toggle: false, hover: false, > }?? ? ? ? ? ?);?? ? ? ? ? ?map.addControl(selectControl); > ?? ? ? ? ? ?selectControl.activate(); > if( ! map.getCenter() ){ sites.events.register('loadend', sites, function(){map.zoomToExtent(sites.getDataExtent())}); > map.setCenter(null, null); };} > -- > Nicholas Efremov-Kendall > Fulbright Student 2009-2010, Ukraine > nefremov@artsci.wustl.edu > c/o Halyna Yerko > Balzaka 92a, Kv 27 > 02232 > Kyiv, Ukraine > (mob) +380963576524 > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Sun Aug 16 13:03:59 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Problems with IE8 and GeoJSON In-Reply-To: <4A87D3DB.3010208@chello.at> References: <4A8256C6.7040804@chello.at> <4A87D3DB.3010208@chello.at> Message-ID: On Sunday, August 16, 2009, Gerhard D?nnebeil wrote: > ok, finally found it myself. > When working with JSON the Internet Explorer is more critical than firefox. > Within the array brackets [] for the "features" array my JSON contained > an extra "," at the end. > Firefox ignores it, IE obviously does not. > Fixing this problem made my code work Hi. I'm not sure extra comas are accepted by the JSON standard anyway. On a side note, I noticed that IE8 isn't sensitive to extra comas in JS objects and arrays as IE<8 is. Cheers, > Best regards > Gerhard > > > Gerhard D?nnebeil wrote: >> Hi everybody. >> >> Not sure this problem already got discussed, if yes.....please give me a >> pointer to it. Otherwise ?..... >> >> >> >> I try to display a vector layer using a fixed strategy and GeoJSON. >> Things work fine under Firefox. >> >> When I test things with IE8, things fail. I run IE8 in default mode, no >> special headers or anything set on the web page that holds the map or >> elsewhere. >> >> I digged deeper into it and found the following strange behaviour: >> When the Layer is about to be drawn, data is fetched from the net and >> converted from JSON to java script. This happens in the read method >> (GEOjson.js/Line 64, see code excerpt below) >> >> A bit below (line 69) the conversion is done into the variable "obj". >> When you look at the "obj" variable at this point it holds an array >> named features *but* the feature array has *no* length property. >> Otherwise the array is correct with respect to the input data. >> >> In line 108 this feature array is iterated with a reference to the >> length property. When IE8 interprets this statement the feature array >> suddenly *has* a length property but it is wrong (too big, 3 instead of 2). >> As a follow-up error this causes the loop to break via the catch block >> when features[2] is accessed and gives back an empty result instead of >> the expected. >> >> Is this a known problem? >> How to work around it? >> >> thanks for any help and >> best regards >> Gerhard >> >> ------------------------------------------ >> Appendix 1, the code mentioned above) >> >> read: function(json, type, filter) { >> ? ? ? ? type = (type) ? type : "FeatureCollection"; >> ? ? ? ? var results = null; >> ? ? ? ? var obj = null; >> ? ? ? ? if (typeof json == "string") { >> line 69: ? ? ? ? ? ?obj = OpenLayers.Format.JSON.prototype.read.apply(this, >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [json, >> filter]); >> ? ? ? ? } else { >> ? ? ? ? ? ? obj = json; >> ? ? ? ? } >> ? ? ? ? if(!obj) { >> ? ? ? ? ? ? OpenLayers.Console.error("Bad JSON: " + json); >> ? ? ? ? } else if(typeof(obj.type) != "string") { >> ? ? ? ? ? ? OpenLayers.Console.error("Bad GeoJSON - no type: " + json); >> ? ? ? ? } else if(this.isValidType(obj, type)) { >> ? ? ? ? ? ? switch(type) { >> ? ? ? ? ? ? ? ? case "Geometry": >> ? ? ? ? ? ? ? ? ? ? try { >> ? ? ? ? ? ? ? ? ? ? ? ? results = this.parseGeometry(obj); >> ? ? ? ? ? ? ? ? ? ? } catch(err) { >> ? ? ? ? ? ? ? ? ? ? ? ? OpenLayers.Console.error(err); >> ? ? ? ? ? ? ? ? ? ? } >> ? ? ? ? ? ? ? ? ? ? break; >> ? ? ? ? ? ? ? ? case "Feature": >> ? ? ? ? ? ? ? ? ? ? try { >> ? ? ? ? ? ? ? ? ? ? ? ? results = this.parseFeature(obj); >> ? ? ? ? ? ? ? ? ? ? ? ? results.type = "Feature"; >> ? ? ? ? ? ? ? ? ? ? } catch(err) { >> ? ? ? ? ? ? ? ? ? ? ? ? OpenLayers.Console.error(err); >> ? ? ? ? ? ? ? ? ? ? } >> ? ? ? ? ? ? ? ? ? ? break; >> ? ? ? ? ? ? ? ? case "FeatureCollection": >> ? ? ? ? ? ? ? ? ? ? // for type FeatureCollection, we allow input to be > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Sun Aug 16 13:49:25 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added In-Reply-To: <7D63F257-76B2-4ACC-B5BD-B8D53F0B011B@comcast.net> References: <4A85D692.8010900@comcast.net> <7D63F257-76B2-4ACC-B5BD-B8D53F0B011B@comcast.net> Message-ID: On Saturday, August 15, 2009, John Cartwright wrote: > Thanks for your suggestion Eric. ?That was the first thing I tried, but it doesn't clear the map, even with an explicit redraw() > ?? ? ? ?vectorLayer.events.on({ ? ? ? ? "featuremodified": mapUpdated, ? ? ? ? "beforefeatureadded": clearPreviousFeatures, ? ? ? ? "featureadded": mapUpdated?? ? ? ?}); > > function clearPreviousFeatures(evt) { vectorLayer.destroyFeatures(); vectorLayer.redraw(); } > function mapUpdated(evt) { console.log('Vector layer has '+vectorLayer.features.length+' features'); dojo.publish('mapUpdated',[evt.feature.geometry]); } > > Setting it up this way also seems to clear the newly added feature as well - when the featureadded handler runs, it reports no features in the layer. > Is this what you had in mind? Yes. I don't understand what's going on in your case. Maybe you should work on a minimal example, and possibly post it here for further guidance. Sorry for not being more helpful... > I really appreciate your help with this. > --john > > > On Aug 15, 2009, at 1:26 AM, Eric Lemoine wrote: > On Friday, August 14, 2009, John Cartwright > wrote: > Hello All, > > I'm using OL 2.8 and trying to implement the behavior where the user can > digitize points, lines, or polygons, but only the last created feature > will be kept and displayed. ?I've attempted this via a handler on the > Layer's "beforefeatureadded" event like: > > function clearPreviousFeatures(evt) { > ? ?dojo.forEach(vectorLayer.features, function(f) { > ? ? ? if (http://f.id != http://evt.feature.id) { > ? ? ? ? ?vectorLayer.removeFeatures([f], {silent:true}); > ? ? ? } > ? ?}); > ? ?vectorLayer.redraw(); > > removing objects within a dojo.forEach loop may not be safe. > > why don't you have you beforefeatureadded listener destroy all > features (with layer.destroyFeature)? > > Cheers, > > > } > > > However, ?I find that the previous drawn features remain until the > DrawFeature control is changed. ?Also as soon as the second feature is > added, the code above complains that "f is undefined". ?Finally, any > features added subsequent to the first do not display in the style > defined for the layer. > > I feel like this should be a simple task and that I'm missing something > fundamental here. ?Can someone show me what's wrong or suggest a better > strategy for accomplishing this goal? > > Thanks! > > --john > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From Kai-Behncke at gmx.de Sun Aug 16 15:20:29 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Starting function out of OpenLayers.Popup.FramedCloud Message-ID: <20090816192029.28790@gmx.net> Dear users, in an appilcation I use OpenLayers.Popup.FramedCloud. In these Popup I have set a link (by Click on the link a function shall be started): The function is correctly defined. The problem is: If I click on the link I always get the message: "do_this_and_that is not a function" I also tried e.g. : But it did not work. In which way can I all a function by clicking on a link out of a FramedCloud please? Thank you very much, Kai -- Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser From arevaco90 at yahoo.es Sun Aug 16 17:13:06 2009 From: arevaco90 at yahoo.es (=?UTF-8?Q?Juan_Ar=C3=A9valo?=) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] CGI and Tomcat In-Reply-To: <1250273345092-3446612.post@n2.nabble.com> References: <1249584285317-3400100.post@n2.nabble.com> <1250273345092-3446612.post@n2.nabble.com> Message-ID: <1250457186756-3454948.post@n2.nabble.com> Hi! I have finally managed to display my WFS example in the map! It is not so obvious to set up the proxy host in Tomcat! I would like to share with you all the steps I followed, in case that someone need it: 1.- I modified the file: "web.xml" C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\conf\web.xml. I uncomented the following lines of code: cgi org.apache.catalina.servlets.CGIServlet debug 0 cgiPathPrefix WEB-INF/cgi 5 cgi /cgi-bin/* You have also to add this piece of code: executable c:\python25\python.exe passShellEnvironment true 2.- I renamed the file servlets-cgi.renametojar to servlets-cgi.jar under the folder: C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\server\lib 3.- I downloaded the "proxy.cgi" file from Openlayers: http://trac.openlayers.org/browser/trunk/openlayers/examples/proxy.cgi and copy the file in a folder called "cgi-bin" that I created under my directory: "C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\client\WEB-INF\cgi\proxy.cgi" 4.- In the proxy.cgi file I included my machine in the allowed hosts: allowedHosts = ['demo.mapfish.org', 'localhost:5000', 'localhost', '127.0.0.1'] 5.- I included this piece of code in my map: OpenLayers.ProxyHost = "/client/cgi-bin/proxy.cgi?url="; 6.- I also included in our client folder the context.xml file: C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\webapps\client\META-INF\context.xml Make sure that the privileged is set to: "true": 7.- Restart Tomcat. Juan Juan Ar?valo wrote: > > Hi list, > > I am still having some difficulties to set up the proxy host in Tomcat. > Here are the steps I followed: > > 1.- I modified the file: "web.xml" C:\Archivos de programa\Apache Software > Foundation\Tomcat 5.5\conf\web.xml. I uncomented the following lines of > code: > > > cgi > > org.apache.catalina.servlets.CGIServlet > > debug > 0 > > > cgiPathPrefix > WEB-INF/cgi > > 5 > > > > cgi > /cgi-bin/* > > > 2.- I renamed the file servlets-cgi.renametojar to servlets-cgi.jar under > the folder: C:\Archivos de programa\Apache Software Foundation\Tomcat > 5.5\server\lib > > 3.- I downloaded the "proxy.cgi" file from Openlayers: > http://trac.openlayers.org/browser/trunk/openlayers/examples/proxy.cgi and > copy the file in a folder called "cgi-bin" that I created under my > directory: "Tomcat 5.5\webapps\MapFish-1.1\client\cgi-bin\proxy.cgi" > > 4.- In the proxy.cgi file I included my machine in the allowed hosts: > > allowedHosts = ['demo.mapfish.org', 'localhost:5000', 'localhost', > '127.0.0.1'] and I also added this line: > > #!c:/python25/python.exe -u (I already had installed python in my PC) > > 5.- I included this piece of code in my map: > > OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; > > > 6.- I restarted my Tomcat. > > I do not see the openlayers.org website when I typed: > http://127.0.0.1:8080/MapFish-1.1/client/cgi-bin/proxy.cgi, I got the 404 > error. > > Does anyone knows what I missing? > > > Thanks again Eric and Michogar! > > Juan > > > > Eric Lemoine-2-2 wrote: >> >> On Thursday, August 6, 2009, Juan Ar?valo wrote: >>> >>> Hi all, >>> >>> I am making some progress setting up a WFS-T, it seems that my code >>> works >>> since I don??t get any error, but the layer doesn't display in the map. >>> I >>> have read that this problem can be solved by setting the Proxy Host, >>> however >>> I was not able to set it up. I am using: Tomcat 5.5, Geoserver 1.5.3 and >>> OpenLayers 2.8 and MapFish 1.1.(I couldn??t only find the steps for >>> Apache >>> but not for Tomcat) >>> >>> Does anyone have any ideas on how to solve it? >> >> Hi. If your Tomcat instance serves both the HTML page and the WFS then >> you don't need a proxy. >> >> >> -- >> Eric Lemoine >> >> Camptocamp France SAS >> Savoie Technolac, BP 352 >> 73377 Le Bourget du Lac, Cedex >> >> Tel : 00 33 4 79 44 44 96 >> Mail : eric.lemoine@camptocamp.com >> http://www.camptocamp.com >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- View this message in context: http://n2.nabble.com/CGI-and-Tomcat-tp3400100p3454948.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arevaco90 at yahoo.es Sun Aug 16 18:56:57 2009 From: arevaco90 at yahoo.es (=?UTF-8?Q?Juan_Ar=C3=A9valo?=) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] WFS and PostGIS Message-ID: <1250463417090-3455383.post@n2.nabble.com> Hi all! I am working on a WFS-T using Geoserver 1.7.6, OpenLayers 2.8 and PostgreSQL with PostGIS. I am able to display the WFS examples from Geoserver such as Tasmania roads, however I am not able to do the same for one of my layers stored in the PostGIS DB (One layer with 385 points). I can display the layer using gvSIG but not in my Openlayers map. Here is my code that doesn?t show any error: var wfs2 = new OpenLayers.Layer.Vector("Water Point Same", { displayOutsideMaxExtent: true, strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", style: "point", featureType: "water_points_same", featureNS : 'http://www.openplans.org/topp', featurePrefix: 'topp', //srsName: "urn:x-ogc:def:crs:EPSG:4326", srsName: "EPSG:4326", version: "1.1.0", geometryName: 'the_geom', schema: "http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=water_points_same&outputformat=text/xml;%20subtype=gml/3.1.1" }) }); map.addLayer(wfs2); I added this piece of code to see if Openlayers can get the extent: map.zoomToExtent(wfs2.getDataExtent(), true); and I got the following error: "bounds is null" in Map.js Any ideas on how to solve the problem? Thanks for your help! Juan -- View this message in context: http://n2.nabble.com/WFS-and-PostGIS-tp3455383p3455383.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.freyre at hispeed.ch Mon Aug 17 01:46:20 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] WFS and PostGIS In-Reply-To: <1250463417090-3455383.post@n2.nabble.com> References: <1250463417090-3455383.post@n2.nabble.com> Message-ID: <1250487980786-3456708.post@n2.nabble.com> Hi Juan, Here is how I use WFS-T on my apps. I hope it will be useful. ====== var saveStrategy = new OpenLayers.Strategy.Save({ callback: function() { alert('feature saved'); } }); wfs = new OpenLayers.Layer.Vector( 'lumin', { strategies: [ new OpenLayers.Strategy.BBOX(), saveStrategy ], projection: new OpenLayers.Projection("EPSG:21781"), protocol: new OpenLayers.Protocol.WFS({ version: '1.1.0', srsName: 'EPSG:21781', url: 'http://localhost:8080/geoserver/wfs?strict=true', featureNS : 'http://www.openplans.org/topp', featureType: 'lumin', geometryName: 'the_geom', extractAttribute: true }), styleMap: styleMap }); ==== -- View this message in context: http://n2.nabble.com/WFS-and-PostGIS-tp3455383p3456708.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Mon Aug 17 01:52:19 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Set map initial center and zoom In-Reply-To: <971791.8289.qm@web51404.mail.re2.yahoo.com> References: <971791.8289.qm@web51404.mail.re2.yahoo.com> Message-ID: On Friday, August 14, 2009, Raul David Orozco wrote: > I'm here again with mi newbie questions. I've been dealing with this issue for a long time and I can't fix it no matter how hard I try.I need to make OL set an initial coordinates and zoom so when I open the browser the map stars in some specific part of the world. > I've done it perfectly with an example doing this:var options = { > ? minResolution: "auto", > ? minExtent: new OpenLayers.Bounds(-1, -1, 1, 1), > ? maxResolution: "auto", > ? maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90) > ? }; > > ? map = new OpenLayers.Map( 'map' , options); > > > ? layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", > ? "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); > ? map.addLayer(layer); > > ? map.setCenter(new OpenLayers.LonLat(-73, 3), 3);And it works just the way I want, but when I do this with my map:var options = { > ? minResolution: "auto", > ? minExtent: new OpenLayers.Bounds(-1, -1, 1, 1), > ? maxResolution: "auto", > ? maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90) > ? }; > > ? var map = new OpenLayers.Map( 'map' , options); > > > ? var request = OpenLayers.Request.GET( > ? {url: "dir/smms/wms.php?VERSION=1.1.1&REQUEST=GetCapabilities&SERVICE=WMS", > ? success: function(response){ > ? var XMLformat = new OpenLayers.Format.XML(); > var xml = XMLformat.read(response.responseText); > ? var CAPformat = new OpenLayers.Format.WMSCapabilities(); > ? var cap = CAPformat.read(xml); > ? > ? for (var i=0; i ? layer = cap.capability.layers[i]; > ? layers_array[i] = new OpenLayers.Layer.WMS( layer.name, > ? "dir/smms/wms.php", > ? {'layers': layer.name, format: "image/png"} > ? ); > ? > ? > ? map.addLayer(layers_array[i]); > ? } > ? }, > ? failure: function(response){ > ? alert(response.status); > ? alert("GetCapabilities failed"); > ? } > ? }); > ? > ? map.setCenter(new OpenLayers.LonLat(-73, 3), 3); > IT DOESN'T WORK, I get the error : > maxExtent is null. What can I do??? I hope somebody can help me. Hi you must call setCenter in the Ajax callback, else there's chance that there'sno layer in thw map at the time setCenter is called. > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Mon Aug 17 01:57:20 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Bug in Google with overaly example In-Reply-To: <1250019209158-3426344.post@n2.nabble.com> References: <1249684505845-3407076.post@n2.nabble.com> <1250019209158-3426344.post@n2.nabble.com> Message-ID: On Tuesday, August 11, 2009, Rodolfo Moreno wrote: > > Thanks Eric for your answer. I am overlapping a mapguide layer. I did what > you suggested but it's not working. > > var dynamicOverlayOptions = { > ? ? ? ? ? ? ?buffer: 1, > ? ? ? ? ? ? ?singleTile: true, > ? ? ? ?isBaseLayer : false, > ? ? ? ?visibility : true, > ? ? ? ?transparent:true // This is the code added > ? ? ? ? ? ? ? ? }; > > Is this property (transparent:true) new? > I ask about it because my sample works fine 3 months ago. transparent is a WMS param. It should go in the Layer.WMS params, not options. > > Thanks in advance > > > Eric Lemoine-2-2 wrote: >> >> On Sat, Aug 8, 2009 at 12:35 AM, Rodolfo Moreno >> wrote: >>> >>> Hi all, >>> The google with overlay example from >>> "http://openlayers.org/dev/examples/" >>> is working incorrectly. The bug is not only because the worldmap is not >>> loaded correctly but also because this is covering whole the map and thus >>> the google layer is not showed, just the worldmap is showed. if you turn >>> off >>> the worldmap layer then it's possible to view the google layer. I >>> realized >>> about it because I have a similar example overlaping google maps with >>> mapguide layers and 3 months ago this sample worked appropriately (in >>> that >>> moment the last release was 2.6 version) and now I got the same bug, it >>> means that mapguide layers covers whole map that don't enable to view the >>> google layers. >> >> The layer you put on top of the google layer must be transparent. If >> your layer if a WMS layer (OpenLayers.Layer.WMS) use transparent:true >> in the layer params. >> >> >> -- >> Eric Lemoine >> >> Camptocamp France SAS >> Savoie Technolac, BP 352 >> 73377 Le Bourget du Lac, Cedex >> >> Tel : 00 33 4 79 44 44 96 >> Mail : eric.lemoine@camptocamp.com >> http://www.camptocamp.com >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > ----- > Rodolfo Moreno > CivilEng > > -- > View this message in context: http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3426344.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From abdurrahmangul at yahoo.com Mon Aug 17 05:07:54 2009 From: abdurrahmangul at yahoo.com (agul) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Appliaction loads the first google tile and then gives up In-Reply-To: <4976733D.1070605@pinan.co.uk> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> <4976733D.1070605@pinan.co.uk> Message-ID: <1250500074097-3457374.post@n2.nabble.com> Hi David I faced the sama problem but I couldnt solve if you find a way please write... David Potts wrote: > > > Hi > > Am trying to load a google map via the gwt plug in and its not working. > > As far as I can tell openlayers is correctly requesting the map tiles > from google maps(I have traced the net connection via firefox and you > can see all the tiles being downloaded) > > When the program loads, a google map is shown in the left hand side of > the viewport, but its cliped to about a 3rd of the viewport. > > If you scroll to the left or the right, the next tile is loaded, the > image now takes up two thirds of the viewport. > > If you scroll to far to the right, the image drops back to left hand 1/3 > of the viewport. > > As far as I can make out I have zoomed to Extends of the map(I do this > after the map is loaded) > > I have the projection set to EPGS:900913 ie Sperical Mercator. > > The maxResolution is set. > > I have tried the program with displayOutsideMaxExtent set to both true > or false, it does not appear to effect the result. > > Setting a listener for a map loaded finshed loading event, never gets > called? > > If I chage to map, a wms server everything seems to work correctly > > Whap appears to be happening, is thats gives up after loading the first > tile, had any body seen anything like this before? > > > Dave. > > begin:vcard > fn:David Potts > n:Potts;David > x-mozilla-html:FALSE > version:2.1 > end:vcard > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/SelectFeature-control-and-click-event-on-marker-tp2186747p3457374.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rajeev.kumar.sharma at gmail.com Mon Aug 17 05:34:25 2009 From: rajeev.kumar.sharma at gmail.com (RajeevSharma) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Using Openlayers with Tile and Export Image doesnt "overlap" In-Reply-To: <20090813124710.GB14861@metacarta.com> References: <1250157918424-3436851.post@n2.nabble.com> <20090813124710.GB14861@metacarta.com> Message-ID: <1250501665436-3457473.post@n2.nabble.com> Many thanks for the response Christopher. I am sorry, since I am unable to share the map service as it is outside the public network. I am able to get the max extents easily, however, I am unable to find out which resolution value to take. As an example , say I have 3 layers which are cached. The images are 512 by 512 pixels. max Extents are (-180, -90, 180, 90). Layer 1 - Resolution 1058.33 Layer 2 - Resolution 529.16 Layer 3 - Resolution 132.29 I had read in the news group the max resolution should be something like (Max (Xmax - Xmin), (Ymax - Ymin))/512, is this correct? - Thanks in Advance, Rajeev Christopher Schmidt-2 wrote: > > On Thu, Aug 13, 2009 at 05:05:18AM -0500, RajeevSharma wrote: >> >> Hello, >> I am using Open Layers for the first time, and would like to display maps >> from multiple services. >> >> 1. A Tiled map service which forms the background. >> 2. One or more Dynamic map services which will be used to overlay on top >> of >> the first service. >> >> I am using the XYZ and ArcGIS93Rest respectively to do the same. The maps >> do >> display but their images arent synchronised. Meaning, the tiled layer >> image >> comes up on the top left part of the screen, and the export map from the >> Rest service comes up in the centre and larger than the tiled map. >> >> I tried tweaking around with the resolution param which didnt help much. >> The >> maps moved a bit closer until 4000 then they started moving apart. >> Setting >> this to "auto" didnt help either. The SRS is the same for both services. >> As >> are the map initial and final extents. >> >> Can any one please let me know if I am doing something wrong out here? > > the XYZ layer requires you to have correct maxExtent and maxResolution > properties matchingthe grid set up in the tile cache creation > configuration. > Without this information, they will not line up. Your Tile Cache metadata > may provide this information, or you may need to consult some othr > resource > to find it. Sharing a link to the tiles you are trying to use, as well as > the code you are using to try to use thm, may be helpful. > > Best Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Using-Openlayers-with-Tile-and-Export-Image-doesnt-%22overlap%22-tp3436851p3457473.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Kai-Behncke at gmx.de Mon Aug 17 05:42:36 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Starting function out of OpenLayers.Popup.FramedCloud In-Reply-To: <20090816192029.28790@gmx.net> References: <20090816192029.28790@gmx.net> Message-ID: <20090817094236.24120@gmx.net> Hi list, problem solved. I put the function in .......OpenLayers/Popup/FramedCloud.js and it works now. Best regards, Kai -------- Original-Nachricht -------- > Datum: Sun, 16 Aug 2009 21:20:29 +0200 > Von: "Kai Behncke" > An: users@openlayers.org > Betreff: [OpenLayers-Users] Starting function out of OpenLayers.Popup.FramedCloud > Dear users, > > > in an appilcation I use OpenLayers.Popup.FramedCloud. > > In these Popup I have set a link > (by Click on the link a function shall be started): > > > > > The function is correctly defined. > > The problem is: > If I click on the link I always get the message: > > "do_this_and_that is not a function" > > > I also tried e.g. : > > > > But it did not work. > > In which way can I all a function by clicking on a link out of a > FramedCloud please? > > Thank you very much, Kai > -- > Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 - > sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From youness.elmedraoui at somei.fr Mon Aug 17 09:55:24 2009 From: youness.elmedraoui at somei.fr (YOUNESS ELMEDRAOUI) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] strategy BBox Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090817/20dafe98/attachment.html From etienne.desgagne at roche.ca Mon Aug 17 11:19:13 2009 From: etienne.desgagne at roche.ca (Etides) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Overlaying Google map Fail with OL.Layer.TileCache but work with OL.Layer.WMS!? Message-ID: <1250522353376-3459714.post@n2.nabble.com> Hi, I use Tilecache (2.10) on Windows to generate tiles from a WMS service I created with the GIS Manifold (this GIS do not support the SphericMercator prj). I?m using Openlayers (2.8) to create a OpenLayers.Layer.WMS that call the tilecache.py script to generate the tiles that I overlay over 2 bases map (Google & Virtual Earth). Switching to any one of this 2 base map let me see correctly my tiles over the base map. So far so good? The problem is when I add a second layer of type OpenLayers.Layer.TileCache to reach directly the tiles from disk generated earlier with the WMS. In this case, ONLY the overlay with the Virtual Earth work, the tiles are not showing when switching to the Google base map (I got red crosses for each tiles). When looking for the properties of a tile in error, I got ../05/000/000/008/000/000/007.png as URL. I got ?04/000/000/008/000/000/007.png when looking for the same tile (that work) when overlaying Virtual Earth. Someone can explain me why the overlay of a Google base map do work with a WMS layer but do not work when accessing the same tiles but directly from disk? Why is it working with VE!?? Here is the code: function init() { map = new OpenLayers.Map('map'); var goo = new OpenLayers.Layer.Google("GMaps", {type: G_HYBRID_MAP }); var ve = new OpenLayers.Layer.VirtualEarth( "VE Aerial" ); map.addLayers([goo,ve]); // --- Tilecache layer WMS var tc_wms = new OpenLayers.Layer.WMS( "My layer WMS","tilecache.py?", { layers: 'Derechos Mineros', format: 'image/png'//, //maxExtent: new OpenLayers.Bounds(-82, -19, -68, 1)//, }, {isBaseLayer: false}); map.addLayer(tc_wms); // --- Tilecache layer... to get tiles directly from disk... var tc_cache = new OpenLayers.Layer.TileCache("My layer from disk",["http://PERCAN1/tilecache/Cache"], "Derechos Mineros", {'format':'image/png',transparent:'true',opacity: 0.5,'isBaseLayer': false}); map.addLayer(tc_cache); map.addControl( new OpenLayers.Control.LayerSwitcher() ); map.addControl( new OpenLayers.Control.MousePosition() ); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); if (!map.getCenter()) map.zoomToMaxExtent(); } The code from tilecache.cfg: [Derechos Mineros] type=WMS layers=Derechos Mineros url=http://PERCAN1/test_wms/wms.asp?transparent=true extension=png Thanks a lot Etienne -- View this message in context: http://n2.nabble.com/Overlaying-Google-map-Fail-with-OL.Layer.TileCache-but-work-with-OL.Layer.WMS%21--tp3459714p3459714.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jmcgrath at nippour.ca Mon Aug 17 11:19:30 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 43 Message-ID: <20090817151930.1899.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From jmcgrath at nippour.ca Mon Aug 17 12:00:15 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 44 Message-ID: <20090817160015.4189.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From eric.lemoine at camptocamp.com Mon Aug 17 12:21:18 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] strategy BBox In-Reply-To: References: Message-ID: On Monday, August 17, 2009, YOUNESS ELMEDRAOUI wrote: > Hi, > > plz, how can i use BBox strategy with a wfs layer d?fined in a mapfile? ? i tested?this script but it does not work: ? wfs = new OpenLayers.Layer.Vector("WFS", > ???? { > ????????? strategies: [ > ?????????????? new OpenLayers.Strategy.BBOX() > ????????? ], > ????????? protocol: new OpenLayers.Protocol.HTTP({ > ?????????????? url: " http://localhost:81/cgi-bin/mapserv.exe?map=C:/OLWebSite/App_Data/olvbmapfileOracleWFS.map &", > ?????????????? params: { > ??????????????????? format: "WFS", > ??????????????????? service: "WFS", > ??????????????????? request: "GetFeature", > ??????????????????? srs: "EPSG:27563", > ??????????????????? VERSION : "1.0.0", > ??????????????????? typename : 'EAU_TRONCON' > ?????????????? }, > ?????????????? format: new OpenLayers.Format.GML() > ????????? }) > ???? }, > ???? { > ????????? extractAttributes:true, > ????????? isBaseLayer:false, > ????????? displayInLayerSwitcher: true > ???? }); ? can any one help me plz? have you considered using OpenLayers.Protocol.WFS? This may prove easier. Cheers, > > when i tried to zoom, i had a message error on "node.getElementsByTagNameNS" statement. > > Best regards, > Youness?ELMEDRAOUI > Les informations figurant sur cet e-mail ont un caract?re strictement confidentiel et sont exclusivement adress?es au destinataire mentionn? ci-dessus.Tout usage, reproduction ou divulgation de cet e-mail est strictement interdit si vous n'en ?tes pas le destinataire.Dans ce cas, veuillez nous en avertir imm?diatement par la m?me voie et d?truire l'original. Merci > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From sumith.paul at gmail.com Mon Aug 17 13:17:31 2009 From: sumith.paul at gmail.com (runningcodez) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] TYPE_BUTTON events Message-ID: <1250529451143-3460690.post@n2.nabble.com> Hi all, The question I am going to raise has been already been discussed a couple of times,but unfortunately the replies were not greatly helpful for me as i am a novice...I have a control panel which has all the 3 kinds of buttons TYPE_BUTTON,TYPE_TOGGLE,TYPE_TOOL,of which the first one is the culprit for me . i tried the event register code looking like button.events.register('mousedown',button.div,function(){alert('mousedown')}); The button was not responding to any events,other than a click. All i wanted was to change its css while on mousedown,and change it back to its orginal state when on 'mouseup'..What I am I missing here?I know my concepts about the working of a control panel and buttons are crippled.it would be a great help if anyone can sort this out for me. A piece of working/pseudo code would be a great help.Thanks in advance rgds Sumith -- View this message in context: http://n2.nabble.com/TYPE_BUTTON-events-tp3460690p3460690.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jdev at lucky-day.de Mon Aug 17 13:58:29 2009 From: jdev at lucky-day.de (jopix) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] can't get a german map overlay working In-Reply-To: <1250437304196-3453890.post@n2.nabble.com> References: <1250437304196-3453890.post@n2.nabble.com> Message-ID: <1250531909935-3460951.post@n2.nabble.com> As a follow up to my ask for help on the proportion problem i add this example map: http://lucky-day.de/site/expl/map.html When i set the boundaries to a square-value (eg. 5,5,5,5) - image will show up right but naturally the markers wouldn't show up. Does anybody has a hint for me? jopix wrote: > > i am working on a project for information for german elections - try to > get a map with several category layers working. > Base should be an image: a map of germany > (http://de.wikipedia.org/w/index.php?title=Datei:Bundestag_Wahlkreise_2009.svg&filetimestamp=20081010175633) > All logic seems to be ok, can add layers with categories on top of the > image > - > but i can't get the right view (maybe projection?) of the map. > It is allways a compressed view. > There are only the image, xml-files - no mapserver, no backend. > > What's wrong with my code? > Any Idea to let it look like the original image? > > Thank you. > > > *******MAP******** > // Map options: > // start with no controls, restrict view to just Germany, allow > 4 different zoom options > var map_options = { > controls: [], > scales: [5000000, 4000000, 3000000, 2000000, > 1300000], > maxResolution: 30000/1024, > projection:"EPSG:4326", > maxExtend: new OpenLayers.Bounds(5.25075, 47.2441, 15.425, 55.0317) > } > > > // Generate the map > map = new OpenLayers.Map('map', map_options); > > var graphic = new OpenLayers.Layer.Image( > 'Deutschland', > > 'hts/g_election_districts_2005_02_v1.png', > new OpenLayers.Bounds(5.25075, > 47.2441, 15.425,55.0317), > // Not sure exactly what Size controls > new OpenLayers.Size(80, 110), > {}); > > ********************* > > > > > -- View this message in context: http://n2.nabble.com/can%27t-get-a-german-map-overlay-working-tp3453890p3460951.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Mon Aug 17 16:00:17 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] programmatically select feature to modify - worked in 2.7 but doesn't in 2.8 In-Reply-To: References: Message-ID: On Fri, Aug 14, 2009 at 11:06 PM, Michael Anderson wrote: > Hello, > > I have an app that works in 2.7 but not in 2.8. What I need to do is > programmatically select a feature and?select it for editing. Works fine in > 2.7. In 2.8 the feature is selected, but the vertices are not displayed and > it's not editable. > > When I initially got it working I sort of stumbled on to it and was a little > surprised it worked. I created both ModifyFeature and SelectFeature controls > on the same layer, and then if I activated the modify control and?selected > the feature with? the select control the feature was selected and editable. > I'm thinking?it wasn't supposed to work this way and was corrected in 2.8. > > I created a simplified example, which is attached to this message. The html > page is also available here in case the it doesn't come through: > http://128.118.7.3/testing/testSelect.html. To run it just hit the 'Select' > button in the upper left corner. > > The example is?using 2.7 from a server I control so it works. If you comment > out the javascript reference on line 4 and uncomment the one on line 3 it > will use the?hosted version of 2.8. Then it won't work. > > If I am correct that this shouldn't have worked before, is there a way I can > do the same think properly? Hi. I made a couple changes to your example and got it to work both with 2.7 and 2.8: - remove the select control - activate the modify control after it is added to the map - programmatically select the feature through the modify feature control's internal select feature control - add a hack to fool the select feature control's feature handler (related to ). Also note that ModifyFeature in trunk includes the property "standalone", which may just accommodate your case. See Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090817/7df5dca3/testSelect.html From joman at geoanalytics.com Mon Aug 17 17:32:42 2009 From: joman at geoanalytics.com (Josh Oman) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] Get All Feature Information in a Layer Message-ID: <8BA599C1D34CD94285B837070090CDD201690FC5@emailsvr.geowire.net> Hello Openlayers User, I am creating a simple search feature with OpenLayers, Geoserver, and postGIS in a "static" website. The process I am using is as follows: user submits a cql string, the cql string is used to create a filtered layer, the filtered layer is displayed on the map, OpenLayers is used to generate an html table that contains a row for each feature in the filtered layer. The result is a map displaying the filtered features, and next to the map is a table displaying some data for each of the filtered features. As I understand GetFeatureInfo it will not return information for all features in the filtered layer since it requires a click's X,Y coordinate. I am looking for an OpenLayers function to get an info table from GeoServer that is populated with data from every feature in the filtered layer. I just started working with open source gis, so there may be a better approach to searching/filtering that I am not aware of. Please direct me to a better approach, if you know of one. Thank you, Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090817/8db6563b/attachment.html From quyminhphan at gmail.com Mon Aug 17 17:58:12 2009 From: quyminhphan at gmail.com (phan) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] OSM + OpenLayers Help Please Message-ID: <1250546292368-3462377.post@n2.nabble.com> I downloaded California osm data from the open street map data, then I converted the data into postgis data via osm2pgsql where it is stored in my postgresql database, then I ran geoserver and tested my california map data, it worked, the california roads showed up, but when I try to call up on my geoserver map data( the california map ) from openlayer example file, the map showed up blank, no images of california roads at all, just a blank white picture, Just wondering what I did wrong... Here is a little snipplet of my code to call the geoserver call var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://localhost:8080/geoserver/wms", {layers: 'cali:planet_osm_roads',format:'image/png'}); I am trying to get the ali:planet_osm_roads to show up on my openlayer html page by calling my tomcat webserver, geoserver wms stuff. Am I doing something wrong? Am I missing anything from the code? But nothing is showing up, just a blank white image, Please help would be much appreciated, Thank you! -- View this message in context: http://n2.nabble.com/OSM-%2B-OpenLayers-Help-Please-tp3462377p3462377.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Jeremy.Husmann at critchlow.co.nz Mon Aug 17 20:18:23 2009 From: Jeremy.Husmann at critchlow.co.nz (Jeremy Husmann) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] KML reprojection? Message-ID: <9436AA4D332D4F41A2C82CD50DB759F772275F@caexch01.ca1.critchlow.co.nz> Hello everyone, I am in the process of adding a KML as a baselayer (I was quickly helped by Eric and Christopher by finding the constructor attribute need for this.). Now I seem to have stuck another in relation to projections. I have noticed that if I add the KML as the only base layer it comes out a bit squashed, when if I don't change any projection settings and just add a WMS layer as another base layer it seems to correct the KML. - Unsure if anything is going on behind the scenes (with my KML being reprojected?) or if im just missing something extremely obvious. - Any help would be appreciated. function mapInit() { var nzBounds = new OpenLayers.Bounds(165, -47, 180, -34.5).transform((new OpenLayers.Projection("EPSG:4326")), (new OpenLayers.Projection("EPSG:900913"))); var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", maxResolution: 16543.0339, maxExtent: nzBounds, numZoomLevels: 24, minZoomLevel: 6, maxZoomLevel:18, controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.LayerSwitcher({'ascending':false}), new OpenLayers.Control.PanZoomBar({zoomWorldIcon:true}) ] }; map = new OpenLayers.Map('map', options); map.addControl(new OpenLayers.Control.LayerSwitcher()); var mapnik = new OpenLayers.Layer.TMS( "OpenStreetMap (Mapnik)", "http://tile.openstreetmap.org/", { type: 'png', displayOutsideMaxExtent: true, attribution: 'OpenStreetMap' } ); mapnik.setVisibility(false); var time = new Date(); var secs = time.getSeconds(); postCodeKml = new OpenLayers.Layer.GML("CoverageTEST", "kml/coverage_1.kml?" + secs, { format: OpenLayers.Format.KML, projection:map.displayProjection, isBaseLayer:true, formatOptions: { extractStyles: true, extractAttributes: true } } ); map.addLayers([mapnik]); postCodeKml.setVisibility(true); map.addLayer(postCodeKml); postCodeKml.setOpacity(0.25); map.zoomToExtent(nzBounds); map.addControl(new OpenLayers.Control.MousePosition()); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090818/053dba70/attachment.html From lists at jpw.biz Mon Aug 17 23:05:48 2009 From: lists at jpw.biz (Mick Jagger) Date: Wed Sep 1 17:17:45 2010 Subject: [OpenLayers-Users] openlayers + mapserver + query parameters ?? Message-ID: <20090817230548.52f05d10.lists@jpw.biz> I wanted to ask if OpenLayers.Layer.MapServer supported the itemquerymap and itemnquerymap parameters that MapServer offers and if so, what params to use in the constructor? OpenLayers 2.8, MapServer 5.4.2 Thanks in advance. From bartvde at osgis.nl Tue Aug 18 01:09:44 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] openlayers + mapserver + query parameters ?? In-Reply-To: <20090817230548.52f05d10.lists@jpw.biz> References: <20090817230548.52f05d10.lists@jpw.biz> Message-ID: <17269.145.50.39.11.1250572184.squirrel@webmail.hostingdiscounter.nl> Hi, it should work, if you pass in the necessary additonal url parameters (check the Mapserver CGI interface for details), try something like: new OpenLayers.Layer.MapServer( "xxx", url, {layers: 'basic', mode: 'itemquery', anotherparam: 'bla'}, {singleTile: true} ); Best regards, Bart > I wanted to ask if OpenLayers.Layer.MapServer supported the itemquerymap > and itemnquerymap parameters that MapServer offers and if so, what params > to use in the constructor? OpenLayers 2.8, MapServer 5.4.2 Thanks in > advance. > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From john.c.cartwright at comcast.net Tue Aug 18 01:14:04 2009 From: john.c.cartwright at comcast.net (John Cartwright) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added In-Reply-To: References: <4A85D692.8010900@comcast.net> <7D63F257-76B2-4ACC-B5BD-B8D53F0B011B@comcast.net> Message-ID: <4FB149DA-7BDF-42C9-8ABD-52A46ED8CA65@comcast.net> On Aug 16, 2009, at 11:49 AM, Eric Lemoine wrote: > Yes. I don't understand what's going on in your case. Maybe you should > work on a minimal example, and possibly post it here for further > guidance. Sorry for not being more helpful... Hi Eric, Listed below is a example of the problem taken largely from the "Modify Feature" example at openlayers.org. Thanks! --john Modify Feature
From eric.lemoine at camptocamp.com Tue Aug 18 01:59:18 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] KML reprojection? In-Reply-To: <9436AA4D332D4F41A2C82CD50DB759F772275F@caexch01.ca1.critchlow.co.nz> References: <9436AA4D332D4F41A2C82CD50DB759F772275F@caexch01.ca1.critchlow.co.nz> Message-ID: On Tuesday, August 18, 2009, Jeremy Husmann wrote: > > > > > > > > > > > > > > Hello everyone, Hi > > > > I am in the process of adding a KML as a baselayer (I was > quickly helped by Eric and Christopher by finding the constructor attribute > need for this.). > > > > Now I seem to have stuck another in relation to projections. > > > > > I have noticed that if I add the KML as the only base layer > it comes out a bit squashed, when if I don?t change any projection > settings and just add a WMS layer as another base layer it seems to correct the > KML. ? Unsure if anything is going on behind the scenes (with my KML > being reprojected?) or if im just missing something extremely obvious. ? > Any help would be appreciated. What if you remove the TMS layer and have the vector layer as the only layer in the map? > > > > ??????? function > mapInit() > > ??????????? { > > ??????????????????????? var > nzBounds = new OpenLayers.Bounds(165, -47, 180, -34.5).transform((new > OpenLayers.Projection("EPSG:4326")), (new > OpenLayers.Projection("EPSG:900913"))); > > > > > ??????????????????????? var > options = > > ??????????????????????? { > > ??????????????????????????????????? projection: > new OpenLayers.Projection("EPSG:900913"), > > ??????????????????????????????????? displayProjection: > new OpenLayers.Projection("EPSG:4326"), > > ??????????????????????????????????? units: > "m", > > ??????????????????????????????????? maxResolution: > 16543.0339, > > > > ??????????????????????????????????? maxExtent: > nzBounds, > > ??????????????????????????????????? numZoomLevels: > 24, > > ??????????????????????????????????? minZoomLevel: > 6, > > ??????????????????????????????????? maxZoomLevel:18, > > ??????????? ??????????????????????? controls: > [ > > > new OpenLayers.Control.Navigation(), > > > new OpenLayers.Control.LayerSwitcher({'ascending':false}), > > ??????????????????????????????????? new > OpenLayers.Control.PanZoomBar({zoomWorldIcon:true}) > > ??????????????????????????????????? ] > > ??????????????????????? }; > > > > > > map = new OpenLayers.Map('map', options); > > ??????????????????????? map.addControl(new > OpenLayers.Control.LayerSwitcher()); > > > > > > > > > > > > var mapnik = new OpenLayers.Layer.TMS( > > > "OpenStreetMap (Mapnik)", > > > "http://tile.openstreetmap.org/", > > > { > > > type: 'png', > > > displayOutsideMaxExtent: true, > > > attribution: ' href="http://www.openstreetmap.org/">OpenStreetMap' > > > } > > > ); > > > > > > mapnik.setVisibility(false); > > > > > ??????????????????????? var > time = new Date(); > > ??????????????????????? var > secs = time.getSeconds(); > > ??????????????????????? postCodeKml > = new OpenLayers.Layer.GML("CoverageTEST", > "kml/coverage_1.kml?" + secs, > > ??????????????????????? { > > > format: OpenLayers.Format.KML, > > projection:map.displayProjection, > > > > > > > > > isBaseLayer:true, > > > formatOptions: { > > > extractStyles: true, > > > extractAttributes: true > > > } > > > } > > > ); > > > > > > map.addLayers([mapnik]); > > > > ??????????????????????? postCodeKml.setVisibility(true); > > ??????????????????????? map.addLayer(postCodeKml); > > ??????????????????????? postCodeKml.setOpacity(0.25); > > > > > ??????????????????????? map.zoomToExtent(nzBounds); > > > > map.addControl(new OpenLayers.Control.MousePosition()); > > > > > > > > > > > > > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ashley_c_mort at raytheon.com Tue Aug 18 02:22:53 2009 From: ashley_c_mort at raytheon.com (ashley_c_mort) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Google Layer example Message-ID: <001e01ca1fcc$51a97550$22099195@us.ray.com> Does anyone know how you can determine all the layers available on a Google server? We are trying to hook up to a Google server but the layers available are not known and are more numerous than the defaults below. How can we determine all of the available layer names from a Google box? Thanks! map = new OpenLayers.Map('map'); map.addControl(new OpenLayers.Control.LayerSwitcher()); var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP} ); var gmap = new OpenLayers.Layer.Google( "Google Streets", // the default {numZoomLevels: 20} ); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP, numZoomLevels: 20} ); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {type: G_SATELLITE_MAP, numZoomLevels: 20} ); map.addLayers([gphy, gmap, ghyb, gsat]); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090818/e31ad689/attachment.html From eric.lemoine at camptocamp.com Tue Aug 18 02:38:17 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added In-Reply-To: <4FB149DA-7BDF-42C9-8ABD-52A46ED8CA65@comcast.net> References: <4A85D692.8010900@comcast.net> <7D63F257-76B2-4ACC-B5BD-B8D53F0B011B@comcast.net> <4FB149DA-7BDF-42C9-8ABD-52A46ED8CA65@comcast.net> Message-ID: On Tue, Aug 18, 2009 at 7:14 AM, John Cartwright wrote: > On Aug 16, 2009, at 11:49 AM, Eric Lemoine wrote: > >> Yes. I don't understand what's going on in your case. Maybe you should >> work on a minimal example, and possibly post it here for further >> guidance. Sorry for not being more helpful... > > Hi Eric, Hi John > > Listed below is a example of the problem taken largely from the "Modify > Feature" example at openlayers.org. ?Thanks! Actually the to-be-added feature is already in the layer when beforefeatureadded triggers, so calling destroyFeatures() in a beforefeatureadded listener also destroys the to-be-added feature . This looks like a bug to me, so I think a ticket should be open for this. In the mean time you can do this: function clearPreviousFeatures(evt) { var i, len, toDestroy = [] for(i=0,len=vectors.features.length; i=0; i--) { toDestroy[i].destroy(); } } Hope this helps, PS: thanks for the example you provided. From Jeremy.Husmann at critchlow.co.nz Tue Aug 18 04:11:54 2009 From: Jeremy.Husmann at critchlow.co.nz (Jeremy Husmann) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] KML reprojection? In-Reply-To: Message-ID: <9436AA4D332D4F41A2C82CD50DB759F77227AB@caexch01.ca1.critchlow.co.nz> Hi Eric, Thanks for the reply. I have tried removing the TMS completely and this is when the projection issue comes into play. I have two examples up on our server http://webmapping.critchlow.co.nz/working/googlelayer.html http://webmapping.critchlow.co.nz/working/nogoogle.html With the 'googlelayer' link I have a second base layer that is straight KML(labeled CoverageTEST) and the country comes up fine and looks how it should. - only problem is that I only want the KML as the base map and want to remove Google all together. - if I do this I get the 'nogoogle' layer. With the nogoogle layer - this is the aim. But the country is all a bit squashed - which points me to the projections. The other option I did try was setting the KML file as the map default baselayer but this didn't seem to help either. Any ideas? Jeremy P.S. sorry about the links they may be a little slow to load. -----Original Message----- From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] Sent: Tuesday, August 18, 2009 5:59 PM To: Jeremy Husmann Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] KML reprojection? On Tuesday, August 18, 2009, Jeremy Husmann wrote: > > > > > > > > > > > > > > Hello everyone, Hi > > > > I am in the process of adding a KML as a baselayer (I was > quickly helped by Eric and Christopher by finding the constructor attribute > need for this.). > > > > Now I seem to have stuck another in relation to projections. > > > > > I have noticed that if I add the KML as the only base layer > it comes out a bit squashed, when if I don't change any projection > settings and just add a WMS layer as another base layer it seems to correct the > KML. - Unsure if anything is going on behind the scenes (with my KML > being reprojected?) or if im just missing something extremely obvious. - > Any help would be appreciated. What if you remove the TMS layer and have the vector layer as the only layer in the map? > > > > ??????? function > mapInit() > > ??????????? { > > ??????????????????????? var > nzBounds = new OpenLayers.Bounds(165, -47, 180, -34.5).transform((new > OpenLayers.Projection("EPSG:4326")), (new > OpenLayers.Projection("EPSG:900913"))); > > > > > ??????????????????????? var > options = > > ??????????????????????? { > > ??????????????????????????????????? projection: > new OpenLayers.Projection("EPSG:900913"), > > ??????????????????????????????????? displayProjection: > new OpenLayers.Projection("EPSG:4326"), > > ??????????????????????????????????? units: > "m", > > ??????????????????????????????????? maxResolution: > 16543.0339, > > > > ??????????????????????????????????? maxExtent: > nzBounds, > > ??????????????????????????????????? numZoomLevels: > 24, > > ??????????????????????????????????? minZoomLevel: > 6, > > ??????????????????????????????????? maxZoomLevel:18, > > ??????????? ??????????????????????? controls: > [ > > > new OpenLayers.Control.Navigation(), > > > new OpenLayers.Control.LayerSwitcher({'ascending':false}), > > ??????????????????????????????????? new > OpenLayers.Control.PanZoomBar({zoomWorldIcon:true}) > > ??????????????????????????????????? ] > > ??????????????????????? }; > > > > > > map = new OpenLayers.Map('map', options); > > ??????????????????????? map.addControl(new > OpenLayers.Control.LayerSwitcher()); > > > > > > > > > > > > var mapnik = new OpenLayers.Layer.TMS( > > > "OpenStreetMap (Mapnik)", > > > "http://tile.openstreetmap.org/", > > > { > > > type: 'png', > > > displayOutsideMaxExtent: true, > > > attribution: ' href="http://www.openstreetmap.org/">OpenStreetMap' > > > } > > > ); > > > > > > mapnik.setVisibility(false); > > > > > ??????????????????????? var > time = new Date(); > > ??????????????????????? var > secs = time.getSeconds(); > > ??????????????????????? postCodeKml > = new OpenLayers.Layer.GML("CoverageTEST", > "kml/coverage_1.kml?" + secs, > > ??????????????????????? { > > > format: OpenLayers.Format.KML, > > projection:map.displayProjection, > > > > > > > > > isBaseLayer:true, > > > formatOptions: { > > > extractStyles: true, > > > extractAttributes: true > > > } > > > } > > > ); > > > > > > map.addLayers([mapnik]); > > > > ??????????????????????? postCodeKml.setVisibility(true); > > ??????????????????????? map.addLayer(postCodeKml); > > ??????????????????????? postCodeKml.setOpacity(0.25); > > > > > ??????????????????????? map.zoomToExtent(nzBounds); > > > > map.addControl(new OpenLayers.Control.MousePosition()); > > > > > > > > > > > > > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From jmcgrath at nippour.ca Tue Aug 18 04:12:47 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 47 Message-ID: <20090818081247.22515.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From youness.elmedraoui at somei.fr Tue Aug 18 05:27:50 2009 From: youness.elmedraoui at somei.fr (YOUNESS ELMEDRAOUI) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] =?iso-8859-1?q?R=E9f=2E_=3A_Re=3A__strategy_BB?= =?iso-8859-1?q?ox?= In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090818/b7768903/attachment.html From mail at marco-scheuble.de Tue Aug 18 05:37:31 2009 From: mail at marco-scheuble.de (Marco Scheuble) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] wms-layer is shifted from the corresponding wfs-layer (EPSG:31467) Message-ID: <1250588251792-3464981.post@n2.nabble.com> Hi Everyone, My problem is the overlay of wms- and wfs-layers of the same data. the wms-layers are shifted 2m south and 0.5m east from the wfs-layers. -> http://tp-work.terragis.de:81/openlayers/ol_versatz.jpg See picture -> http://tp-work.terragis.de:81/openlayers/ol_versatz.html Here is the code Maybe anyone can help me?! Thanks, Marco -- View this message in context: http://n2.nabble.com/wms-layer-is-shifted-from-the-corresponding-wfs-layer-%28EPSG%3A31467%29-tp3464981p3464981.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mail at marco-scheuble.de Tue Aug 18 09:18:45 2009 From: mail at marco-scheuble.de (Marco Scheuble) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] wms-layer is shifted from the corresponding wfs-layer (EPSG:31467) In-Reply-To: <1250588251792-3464981.post@n2.nabble.com> References: <1250588251792-3464981.post@n2.nabble.com> Message-ID: <1250601525631-3465968.post@n2.nabble.com> I solved the problem, by changing the vectorLayer-definition! 1. changing the projectin from EPSG: 4326 to EPSG: 31467 2. put the attribute srsName:"EPSG:31467" into the wfs-protocol-definition var pet = new OpenLayers.Layer.Vector( 'WFS-Point', { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy ], projection: new OpenLayers.Projection("EPSG:31467"), styleMap: styles, protocol: new OpenLayers.Protocol.WFS({ version: '1.1.0', srsName: 'EPSG:31467', url: '/geoserver/wfs', featureNS : 'http://www.openplans.org/topp', featureType: 'pet', geometryName: 'the_geom'}) }); Marco Scheuble wrote: > > Hi Everyone, > > My problem is the overlay of wms- and wfs-layers of the same data. > the wms-layers are shifted 2m south and 0.5m east from the wfs-layers. > > -> http://tp-work.terragis.de:81/openlayers/ol_versatz.jpg See picture > -> http://tp-work.terragis.de:81/openlayers/ol_versatz.html Here is the > code > > Maybe anyone can help me?! > Thanks, > > Marco > > -- View this message in context: http://n2.nabble.com/wms-layer-is-shifted-from-the-corresponding-wfs-layer-%28EPSG%3A31467%29-tp3464981p3465968.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paulcurran9 at googlemail.com Tue Aug 18 09:43:00 2009 From: paulcurran9 at googlemail.com (Paul Curran) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] OL Zoom Issue - Zoomed in very close, cannot not zoom out Message-ID: Hi, Been struggling with this problem for a little while now any help appreciated. I can view my map of the UK fine via mapserver however when I view it via Openlayers I am zoomed in very close to the map (tree level). I am able to zoom in even closer (map becomes blurred) however i cannot zoom out. I only have one layer in the map file. For my bounds I am using the extent from my map file Here is my code *var zoom = 10;* var bounds = new OpenLayers.Bounds(0, 0, 660046, 1229782); var map, layer; function init(){ map = new OpenLayers.Map('map', { *maxExtent: bounds, numZoomlevels: 10* }); map.addControl(new OpenLayers.Control.PanZoomBar()); map.addControl(new OpenLayers.Control.OverviewMap()); map.addControl(new OpenLayers.Control.MousePosition()); layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://127.0.0.1/cgi-bin/mapserv.exe?", { layers: 'uk', map: '/ms4w/apps/openlayers-2.5/data/uk1.map' }, { gutter: 15 }); map.addLayer(layer); *map.zoomToExtent(bounds);* ** Can anyone see where I am going wrong or have any suggestions? Cheers, thanks for any help in advance Paul p.s. My mapfile is here MAP NAME UK1 PROJECTION "init=epsg:4326" END SIZE 1600 1200 IMAGECOLOR 153 204 255 IMAGETYPE JPEG SHAPEPATH "http://localhost/openlayers/data/" EXTENT 0 0 660046 1229782 UNITS DD WEB TEMPLATE "http://localhost/openlayers/examples/test.html" LOG "\ms4w\tmp\ms_tmp\log.txt" IMAGEPATH "\ms4w\tmp\ms_tmp\" IMAGEURL "/ms_tmp/" METADATA 'wms_title' "map" 'wms_onlineresource' "http://127.0.0.1./cgi-bin/mapserv?map=uk1.map " END END LAYER NAME "UK" METADATA 'wms_title' "wms_demo" END STATUS DEFAULT TYPE raster TILEINDEX "map" TILEITEM "Location" PROJECTION "init=epsg:4326" END CLASS STYLE COLOR 0 0 0 END LABEL COLOR 0 0 0 SIZE SMALL END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090818/a3271e09/attachment.html From mail at marco-scheuble.de Tue Aug 18 10:27:47 2009 From: mail at marco-scheuble.de (Marco Scheuble) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] OL Zoom Issue - Zoomed in very close, cannot not zoom out In-Reply-To: References: Message-ID: <1250605667500-3466369.post@n2.nabble.com> Hi Paul, for me your coordinates looks strange. If the projection is epsg: 4326, I think you have to take lat lon coords. Instead of using the function map.zoomToExtent(), maybe you can use map.zoomToMaxExtent() Marco Paul Curran-2 wrote: > > Hi, > > > > Been struggling with this problem for a little while now any help > appreciated. > > > > I can view my map of the UK fine via mapserver however when I view it via > Openlayers I am zoomed in very close to the map (tree level). I am able to > zoom in even closer (map becomes blurred) however i cannot zoom out. I > only > have one layer in the map file. > > > > For my bounds I am using the extent from my map file > > > > Here is my code > > > > *var zoom = 10;* > > var bounds = new OpenLayers.Bounds(0, 0, 660046, 1229782); > > var map, layer; > > > > > > function init(){ > > map = new OpenLayers.Map('map', { *maxExtent: bounds, numZoomlevels: > 10* }); > > map.addControl(new OpenLayers.Control.PanZoomBar()); > > map.addControl(new OpenLayers.Control.OverviewMap()); > > map.addControl(new OpenLayers.Control.MousePosition()); > > layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", > > "http://127.0.0.1/cgi-bin/mapserv.exe?", { layers: 'uk', map: > '/ms4w/apps/openlayers-2.5/data/uk1.map' }, > > { gutter: 15 }); > > map.addLayer(layer); > *map.zoomToExtent(bounds);* > ** > Can anyone see where I am going wrong or have any suggestions? > > > Cheers, thanks for any help in advance > > Paul > > p.s. My mapfile is here > > MAP > > NAME UK1 > PROJECTION > "init=epsg:4326" > END > SIZE 1600 1200 > IMAGECOLOR 153 204 255 > IMAGETYPE JPEG > SHAPEPATH "http://localhost/openlayers/data/" > EXTENT 0 0 660046 1229782 > UNITS DD > > > WEB > TEMPLATE "http://localhost/openlayers/examples/test.html" > LOG "\ms4w\tmp\ms_tmp\log.txt" > IMAGEPATH "\ms4w\tmp\ms_tmp\" > IMAGEURL "/ms_tmp/" > METADATA > 'wms_title' "map" > 'wms_onlineresource' > "http://127.0.0.1./cgi-bin/mapserv?map=uk1.map > " > END > END > LAYER > > NAME "UK" > METADATA > 'wms_title' "wms_demo" > END > STATUS DEFAULT > TYPE raster > TILEINDEX "map" > TILEITEM "Location" > PROJECTION > "init=epsg:4326" > END > CLASS > STYLE > COLOR 0 0 0 > END > LABEL > COLOR 0 0 0 > SIZE SMALL > END > > END > > END > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/OL-Zoom-Issue---Zoomed-in-very-close%2C-cannot-not-zoom-out-tp3466106p3466369.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rodolfoamoreno at gmail.com Tue Aug 18 11:22:25 2009 From: rodolfoamoreno at gmail.com (Rodolfo Moreno) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Bug in Google with overaly example In-Reply-To: References: <1249684505845-3407076.post@n2.nabble.com> <1250019209158-3426344.post@n2.nabble.com> Message-ID: <1250608945812-3466693.post@n2.nabble.com> Hi Eric, do you realize that the overlay examples in "http://openlayers.org/dev/examples/" is not working appropriately. Here is part of the example code for "google with overlay maps": function init(){ map = new OpenLayers.Map('map'); var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP} ); var wms = new OpenLayers.Layer.WMS( "World Map", "http://world.freemap.in/cgi-bin/mapserv", { map: '/www/freemap.in/world/map/factbooktrans.map', transparent: 'TRUE', layers: 'factbook' }, {'reproject': true} ); map.addLayers([satellite, wms]); map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5); map.addControl( new OpenLayers.Control.LayerSwitcher() ); } In this code I can see what you are saying(transparent: 'TRUE') but this sample is not working either. maybe it's an openlayers issue. Regards, Eric Lemoine-2-2 wrote: > > On Tuesday, August 11, 2009, Rodolfo Moreno > wrote: >> >> Thanks Eric for your answer. I am overlapping a mapguide layer. I did >> what >> you suggested but it's not working. >> >> var dynamicOverlayOptions = { >> ? ? ? ? ? ? ?buffer: 1, >> ? ? ? ? ? ? ?singleTile: true, >> ? ? ? ?isBaseLayer : false, >> ? ? ? ?visibility : true, >> ? ? ? ?transparent:true // This is the code added >> ? ? ? ? ? ? ? ? }; >> >> Is this property (transparent:true) new? >> I ask about it because my sample works fine 3 months ago. > > transparent is a WMS param. It should go in the Layer.WMS params, not > options. > > >> >> Thanks in advance >> >> >> Eric Lemoine-2-2 wrote: >>> >>> On Sat, Aug 8, 2009 at 12:35 AM, Rodolfo >>> Moreno >>> wrote: >>>> >>>> Hi all, >>>> The google with overlay example from >>>> "http://openlayers.org/dev/examples/" >>>> is working incorrectly. The bug is not only because the worldmap is not >>>> loaded correctly but also because this is covering whole the map and >>>> thus >>>> the google layer is not showed, just the worldmap is showed. if you >>>> turn >>>> off >>>> the worldmap layer then it's possible to view the google layer. I >>>> realized >>>> about it because I have a similar example overlaping google maps with >>>> mapguide layers and 3 months ago this sample worked appropriately (in >>>> that >>>> moment the last release was 2.6 version) and now I got the same bug, it >>>> means that mapguide layers covers whole map that don't enable to view >>>> the >>>> google layers. >>> >>> The layer you put on top of the google layer must be transparent. If >>> your layer if a WMS layer (OpenLayers.Layer.WMS) use transparent:true >>> in the layer params. >>> >>> >>> -- >>> Eric Lemoine >>> >>> Camptocamp France SAS >>> Savoie Technolac, BP 352 >>> 73377 Le Bourget du Lac, Cedex >>> >>> Tel : 00 33 4 79 44 44 96 >>> Mail : eric.lemoine@camptocamp.com >>> http://www.camptocamp.com >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> ----- >> Rodolfo Moreno >> CivilEng >> >> -- >> View this message in context: >> http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3426344.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > ----- Rodolfo Moreno CivilEng -- View this message in context: http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3466693.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jmcgrath at nippour.ca Tue Aug 18 11:22:32 2009 From: jmcgrath at nippour.ca (jmcgrath@nippour.ca) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Users Digest, Vol 35, Issue 48 Message-ID: <20090818152232.11155.qmail@plesk.nippour.ca> Prenez note que je serai en vacances du 15 au 30 ao?t. Je serai donc de retour le 31 ao?t. Vous pouvez communiquer avec Jean-Fran?ois Savard ? jfsavard@nippour.ca en cas d'urgence. Bonne journ?e From craig.mcilwee at openroadsconsulting.com Tue Aug 18 12:21:33 2009 From: craig.mcilwee at openroadsconsulting.com (Craig McIlwee) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Shifting markers and vectors in IE6 after pan In-Reply-To: <5A17578D-238F-4DF2-B713-C3F92152D8C7@openroadsconsulting.com> Message-ID: No suggestions? Looks like someone else posted a similar problem a couple of days later that also went unanswered: http://openlayers.org/pipermail/users/2009-July/012880.html craig -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Craig McIlwee Sent: Wednesday, July 22, 2009 11:58 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] Shifting markers and vectors in IE6 after pan Interesting... I read this email on my home computer this morning and tried it there, everything worked OK. I was using my work computer yesterday when I sent the first mail, IE version is 6.0.2900.2180.xpsp_sp2_qfe.080814-1242, at home I have 6.0.2900.2180.xpsp_sp2_qf2.070227-2300. What version are you using? This pages on the OpenLayers site I was testing against were vector-features.html and marker-shadow.html. I just tried the markers.html you mentioned and it works fine. Craig -----Original Message----- From: andreas.hocevar@gmail.com [mailto:andreas.hocevar@gmail.com] On Behalf Of Andreas Hocevar Sent: Wednesday, July 22, 2009 4:20 AM To: craig.mcilwee@openroadsconsulting.com Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Shifting markers and vectors in IE6 after pan Hi, the current version of OpenLayers is 2.8. But you are saying that you see the same behaviour on the OpenLayers examples site? I just tested on IE6, and I do not see it (neither in the vector-features.html nof in the markers.html example). Can you provide an example where this happens? Regards, Andreas. On Tue, Jul 21, 2009 at 10:04 PM, Craig McIlwee wrote: > Hello, > > > > I've recently updated one of our applications to OpenLayers 2.7.? Previously > we were using an OpenLayer.js file with revision 2106, which appears to have > been somewhere between 2.3 rc2 and rc3.? Now when I plot vector features on > a vector layer I am seeing strange behavior in IE6 that did not happen > before.? When I pan the map the vectors follow, but as soon as I release the > mouse they do a small jump in the direction that I panned.? So for example, > I drag the map so that I can see further East and as soon as I release my > mouse button the vector images jump a few pixels to the East instead of > staying at the correct location.? This also happens when using the > navigation arrows that are at the top left of the map.? I've tested this on > the OpenLayers example site (www.openlayers.org/dev/examples) and I am > seeing the same behavior with vectors and markers.? This only affects IE6 > though, FF2, FF3, and IE7 seem fine. > > > > So I'm curious if there is a workaround for this, other than removing all of > the vectors and replotting them if I detect a drag event.? Is there some > function that I can call that will fix vector positions?? I've tried > attaching to the 'moveend' events on both map and layer to call > layer.refresh() and layer.redraw() but this doesn't seem to help, and I'm > not sure but maybe these are already called on a move anyway.? Any other > suggestions? > > > > Thanks, > > Craig McIlwee > > Open Roads Consulting, Inc. > > 757-546-3401 > > http://www.openroadsconsulting.com > > > > This e-mail communication (including any attachments) may contain > confidential and/or privileged material intended solely for the individual > or entity to which it is addressed.? If you are not the intended recipient, > you should immediately stop reading this message and delete it from all > computers that it resides on. Any unauthorized reading, distribution, > copying or other use of this communication (or its attachments) is strictly > prohibited.? If you have received this communication in error, please notify > us immediately. > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Tue Aug 18 12:32:36 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] KML reprojection? In-Reply-To: <9436AA4D332D4F41A2C82CD50DB759F77227AB@caexch01.ca1.critchlow.co.nz> References: <9436AA4D332D4F41A2C82CD50DB759F77227AB@caexch01.ca1.critchlow.co.nz> Message-ID: <20090818163235.GF26464@metacarta.com> On Tue, Aug 18, 2009 at 08:11:54PM +1200, Jeremy Husmann wrote: > Hi Eric, > > Thanks for the reply. I have tried removing the TMS completely and this is when the projection issue comes into play. Yes, this is a problem. The reprojection support is relaly about 'from the data projection to the baselayer projection'; the baselayer being what actually controls the projection of the map. See: http://crschmidt.net/mapping/choropleth-mercator.html For an example of using a 'fake' baseLayer with a mercator projection, and reprojecting to it in the standard ay, as another solution. -- Chris > I have two examples up on our server > > http://webmapping.critchlow.co.nz/working/googlelayer.html > > http://webmapping.critchlow.co.nz/working/nogoogle.html > > > With the 'googlelayer' link I have a second base layer that is straight KML(labeled CoverageTEST) and the country comes up fine and looks how it should. - only problem is that I only want the KML as the base map and want to remove Google all together. - if I do this I get the 'nogoogle' layer. > > With the nogoogle layer - this is the aim. But the country is all a bit squashed - which points me to the projections. > > The other option I did try was setting the KML file as the map default baselayer but this didn't seem to help either. > > Any ideas? > > Jeremy > > P.S. sorry about the links they may be a little slow to load. > > -----Original Message----- > From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] > Sent: Tuesday, August 18, 2009 5:59 PM > To: Jeremy Husmann > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] KML reprojection? > > On Tuesday, August 18, 2009, Jeremy Husmann > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hello everyone, > > > Hi > > > > > > > > > > I am in the process of adding a KML as a baselayer (I was > > quickly helped by Eric and Christopher by finding the constructor attribute > > need for this.). > > > > > > > > Now I seem to have stuck another in relation to projections. > > > > > > > > > > I have noticed that if I add the KML as the only base layer > > it comes out a bit squashed, when if I don't change any projection > > settings and just add a WMS layer as another base layer it seems to correct the > > KML. - Unsure if anything is going on behind the scenes (with my KML > > being reprojected?) or if im just missing something extremely obvious. - > > Any help would be appreciated. > > What if you remove the TMS layer and have the vector layer as the only > layer in the map? > > > > > > > > > > ??????? function > > mapInit() > > > > ??????????? { > > > > ??????????????????????? var > > nzBounds = new OpenLayers.Bounds(165, -47, 180, -34.5).transform((new > > OpenLayers.Projection("EPSG:4326")), (new > > OpenLayers.Projection("EPSG:900913"))); > > > > > > > > > > ??????????????????????? var > > options = > > > > ??????????????????????? { > > > > ??????????????????????????????????? projection: > > new OpenLayers.Projection("EPSG:900913"), > > > > ??????????????????????????????????? displayProjection: > > new OpenLayers.Projection("EPSG:4326"), > > > > ??????????????????????????????????? units: > > "m", > > > > ??????????????????????????????????? maxResolution: > > 16543.0339, > > > > > > > > ??????????????????????????????????? maxExtent: > > nzBounds, > > > > ??????????????????????????????????? numZoomLevels: > > 24, > > > > ??????????????????????????????????? minZoomLevel: > > 6, > > > > ??????????????????????????????????? maxZoomLevel:18, > > > > ??????????? ??????????????????????? controls: > > [ > > > > > > new OpenLayers.Control.Navigation(), > > > > > > new OpenLayers.Control.LayerSwitcher({'ascending':false}), > > > > ??????????????????????????????????? new > > OpenLayers.Control.PanZoomBar({zoomWorldIcon:true}) > > > > ??????????????????????????????????? ] > > > > ??????????????????????? }; > > > > > > > > > > > > map = new OpenLayers.Map('map', options); > > > > ??????????????????????? map.addControl(new > > OpenLayers.Control.LayerSwitcher()); > > > > > > > > > > > > > > > > > > > > > > > > var mapnik = new OpenLayers.Layer.TMS( > > > > > > "OpenStreetMap (Mapnik)", > > > > > > "http://tile.openstreetmap.org/", > > > > > > { > > > > > > type: 'png', > > > > > > displayOutsideMaxExtent: true, > > > > > > attribution: ' > href="http://www.openstreetmap.org/">OpenStreetMap' > > > > > > } > > > > > > ); > > > > > > > > > > > > mapnik.setVisibility(false); > > > > > > > > > > ??????????????????????? var > > time = new Date(); > > > > ??????????????????????? var > > secs = time.getSeconds(); > > > > ??????????????????????? postCodeKml > > = new OpenLayers.Layer.GML("CoverageTEST", > > "kml/coverage_1.kml?" + secs, > > > > ??????????????????????? { > > > > > > format: OpenLayers.Format.KML, > > > > projection:map.displayProjection, > > > > > > > > > > > > > > > > > > isBaseLayer:true, > > > > > > formatOptions: { > > > > > > extractStyles: true, > > > > > > extractAttributes: true > > > > > > } > > > > > > } > > > > > > ); > > > > > > > > > > > > map.addLayers([mapnik]); > > > > > > > > ??????????????????????? postCodeKml.setVisibility(true); > > > > ??????????????????????? map.addLayer(postCodeKml); > > > > ??????????????????????? postCodeKml.setOpacity(0.25); > > > > > > > > > > ??????????????????????? map.zoomToExtent(nzBounds); > > > > > > > > map.addControl(new OpenLayers.Control.MousePosition()); > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Tue Aug 18 12:33:45 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Google Layer example In-Reply-To: <001e01ca1fcc$51a97550$22099195@us.ray.com> References: <001e01ca1fcc$51a97550$22099195@us.ray.com> Message-ID: <20090818163345.GG26464@metacarta.com> On Tue, Aug 18, 2009 at 02:22:53AM -0400, ashley_c_mort wrote: > Does anyone know how you can determine all the layers available on a > Google server? We are trying to hook up to a Google server but the layers > available are not known and are more numerous than the defaults below. How > can we determine all of the available layer names from a Google box? > Thanks! I'm assuming that you're using some kind of Fusion server; In my experiences with Fusion, I have not solved this problem. Your best bet may be to discuss this in a Fusion-specific forum, rather than OL, since OL doesn't provide that type of API to the Fusion data. -- Chris > > > map = new OpenLayers.Map('map'); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > > > var gphy = new OpenLayers.Layer.Google( > > "Google Physical", > > {type: G_PHYSICAL_MAP} > > ); > > var gmap = new OpenLayers.Layer.Google( > > "Google Streets", // the default > > {numZoomLevels: 20} > > ); > > var ghyb = new OpenLayers.Layer.Google( > > "Google Hybrid", > > {type: G_HYBRID_MAP, numZoomLevels: 20} > > ); > > var gsat = new OpenLayers.Layer.Google( > > "Google Satellite", > > {type: G_SATELLITE_MAP, numZoomLevels: 20} > > ); > > > > > > map.addLayers([gphy, gmap, ghyb, gsat]); > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Tue Aug 18 12:37:43 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] OL Zoom Issue - Zoomed in very close, cannot not zoom out In-Reply-To: References: Message-ID: <20090818163743.GH26464@metacarta.com> On Tue, Aug 18, 2009 at 02:43:00PM +0100, Paul Curran wrote: > Hi, > > > > Been struggling with this problem for a little while now any help > appreciated. > > > > I can view my map of the UK fine via mapserver however when I view it via > Openlayers I am zoomed in very close to the map (tree level). I am able to > zoom in even closer (map becomes blurred) however i cannot zoom out. I only > have one layer in the map file. > > For my bounds I am using the extent from my map file > > Here is my code > > > > *var zoom = 10;* > > var bounds = new OpenLayers.Bounds(0, 0, 660046, 1229782); > > var map, layer; > > > > > > function init(){ > > map = new OpenLayers.Map('map', { *maxExtent: bounds, numZoomlevels: > 10* }); http://faq.openlayers.org/map/how-do-i-set-a-different-projection-on-my-map/ """ There are three parameters in OpenLayers which are important to set if you wish to change projections: * maxExtent * maxResolution * projection maxExtent is the maximum bounds, in the units of your map, of the plane in which you want to display information. maxResolution is the number of mapunits per pixel at the highest zoom level, and the projection is used when issuing WMS or WFS requests to inform the server of the projection desired. """ You set one, but not the other two. The one that matters that you missed is maxResolution. > > map.addControl(new OpenLayers.Control.PanZoomBar()); > > map.addControl(new OpenLayers.Control.OverviewMap()); > > map.addControl(new OpenLayers.Control.MousePosition()); > > layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", > > "http://127.0.0.1/cgi-bin/mapserv.exe?", { layers: 'uk', map: > '/ms4w/apps/openlayers-2.5/data/uk1.map' }, > > { gutter: 15 }); > > map.addLayer(layer); > *map.zoomToExtent(bounds);* > ** > Can anyone see where I am going wrong or have any suggestions? > > > Cheers, thanks for any help in advance > > Paul > > p.s. My mapfile is here > > MAP > > NAME UK1 > PROJECTION > "init=epsg:4326" > END > SIZE 1600 1200 > IMAGECOLOR 153 204 255 > IMAGETYPE JPEG > SHAPEPATH "http://localhost/openlayers/data/" > EXTENT 0 0 660046 1229782 > UNITS DD > > > WEB > TEMPLATE "http://localhost/openlayers/examples/test.html" > LOG "\ms4w\tmp\ms_tmp\log.txt" > IMAGEPATH "\ms4w\tmp\ms_tmp\" > IMAGEURL "/ms_tmp/" > METADATA > 'wms_title' "map" > 'wms_onlineresource' "http://127.0.0.1./cgi-bin/mapserv?map=uk1.map > " > END > END > LAYER > > NAME "UK" > METADATA > 'wms_title' "wms_demo" > END > STATUS DEFAULT > TYPE raster > TILEINDEX "map" > TILEITEM "Location" > PROJECTION > "init=epsg:4326" > END > CLASS > STYLE > COLOR 0 0 0 > END > LABEL > COLOR 0 0 0 > SIZE SMALL > END > > END > > END > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Tue Aug 18 12:41:48 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Bug in Google with overaly example In-Reply-To: <1250608945812-3466693.post@n2.nabble.com> References: <1249684505845-3407076.post@n2.nabble.com> <1250019209158-3426344.post@n2.nabble.com> <1250608945812-3466693.post@n2.nabble.com> Message-ID: <20090818164148.GJ26464@metacarta.com> On Tue, Aug 18, 2009 at 10:22:25AM -0500, Rodolfo Moreno wrote: > > Hi Eric, do you realize that the overlay examples in > "http://openlayers.org/dev/examples/" is not working appropriately. Here is > part of the example code for "google with overlay maps": It's not working because 'world.freemap.in' is dead, kaput, etc. The code should certainly work; can you provide an example where the WMS server *does* exist and it doesn't work? -- Chris > function init(){ > map = new OpenLayers.Map('map'); > > var satellite = new OpenLayers.Layer.Google( > "Google Satellite" , {type: G_SATELLITE_MAP} > ); > > var wms = new OpenLayers.Layer.WMS( > "World Map", > "http://world.freemap.in/cgi-bin/mapserv", > { > map: '/www/freemap.in/world/map/factbooktrans.map', > transparent: 'TRUE', > layers: 'factbook' > }, > {'reproject': true} > ); > > map.addLayers([satellite, wms]); > > map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5); > map.addControl( new OpenLayers.Control.LayerSwitcher() ); > } > > In this code I can see what you are saying(transparent: 'TRUE') but this > sample is not working either. > maybe it's an openlayers issue. > > Regards, > > > Eric Lemoine-2-2 wrote: > > > > On Tuesday, August 11, 2009, Rodolfo Moreno > > wrote: > >> > >> Thanks Eric for your answer. I am overlapping a mapguide layer. I did > >> what > >> you suggested but it's not working. > >> > >> var dynamicOverlayOptions = { > >> ? ? ? ? ? ? ?buffer: 1, > >> ? ? ? ? ? ? ?singleTile: true, > >> ? ? ? ?isBaseLayer : false, > >> ? ? ? ?visibility : true, > >> ? ? ? ?transparent:true // This is the code added > >> ? ? ? ? ? ? ? ? }; > >> > >> Is this property (transparent:true) new? > >> I ask about it because my sample works fine 3 months ago. > > > > transparent is a WMS param. It should go in the Layer.WMS params, not > > options. > > > > > >> > >> Thanks in advance > >> > >> > >> Eric Lemoine-2-2 wrote: > >>> > >>> On Sat, Aug 8, 2009 at 12:35 AM, Rodolfo > >>> Moreno > >>> wrote: > >>>> > >>>> Hi all, > >>>> The google with overlay example from > >>>> "http://openlayers.org/dev/examples/" > >>>> is working incorrectly. The bug is not only because the worldmap is not > >>>> loaded correctly but also because this is covering whole the map and > >>>> thus > >>>> the google layer is not showed, just the worldmap is showed. if you > >>>> turn > >>>> off > >>>> the worldmap layer then it's possible to view the google layer. I > >>>> realized > >>>> about it because I have a similar example overlaping google maps with > >>>> mapguide layers and 3 months ago this sample worked appropriately (in > >>>> that > >>>> moment the last release was 2.6 version) and now I got the same bug, it > >>>> means that mapguide layers covers whole map that don't enable to view > >>>> the > >>>> google layers. > >>> > >>> The layer you put on top of the google layer must be transparent. If > >>> your layer if a WMS layer (OpenLayers.Layer.WMS) use transparent:true > >>> in the layer params. > >>> > >>> > >>> -- > >>> Eric Lemoine > >>> > >>> Camptocamp France SAS > >>> Savoie Technolac, BP 352 > >>> 73377 Le Bourget du Lac, Cedex > >>> > >>> Tel : 00 33 4 79 44 44 96 > >>> Mail : eric.lemoine@camptocamp.com > >>> http://www.camptocamp.com > >>> _______________________________________________ > >>> Users mailing list > >>> Users@openlayers.org > >>> http://openlayers.org/mailman/listinfo/users > >>> > >>> > >> > >> > >> ----- > >> Rodolfo Moreno > >> CivilEng > >> > >> -- > >> View this message in context: > >> http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3426344.html > >> Sent from the OpenLayers Users mailing list archive at Nabble.com. > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > > > > -- > > Eric Lemoine > > > > Camptocamp France SAS > > Savoie Technolac, BP 352 > > 73377 Le Bourget du Lac, Cedex > > > > Tel : 00 33 4 79 44 44 96 > > Mail : eric.lemoine@camptocamp.com > > http://www.camptocamp.com > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > > ----- > Rodolfo Moreno > CivilEng > > -- > View this message in context: http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3466693.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Tue Aug 18 12:47:58 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Get All Feature Information in a Layer In-Reply-To: <8BA599C1D34CD94285B837070090CDD201690FC5@emailsvr.geowire.net> References: <8BA599C1D34CD94285B837070090CDD201690FC5@emailsvr.geowire.net> Message-ID: <20090818164758.GL26464@metacarta.com> On Mon, Aug 17, 2009 at 04:32:42PM -0500, Josh Oman wrote: > Hello Openlayers User, > > I am creating a simple search feature with OpenLayers, Geoserver, and > postGIS in a "static" website. The process I am using is as follows: > user submits a cql string, the cql string is used to create a filtered > layer, the filtered layer is displayed on the map, OpenLayers is used to > generate an html table that contains a row for each feature in the > filtered layer. The result is a map displaying the filtered features, > and next to the map is a table displaying some data for each of the > filtered features. > > > As I understand GetFeatureInfo it will not return information for all > features in the filtered layer since it requires a click's X,Y > coordinate. I am looking for an OpenLayers function to get an info > table from GeoServer that is populated with data from every feature in > the filtered layer. Sounds like you want WFS, and the GetFeatures call. -- Chris > > > > I just started working with open source gis, so there may be a better > approach to searching/filtering that I am not aware of. Please direct > me to a better approach, if you know of one. > > > > > > Thank you, > > Josh > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Tue Aug 18 12:50:34 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] openlayers + mapserver + query parameters ?? In-Reply-To: <20090817230548.52f05d10.lists@jpw.biz> References: <20090817230548.52f05d10.lists@jpw.biz> Message-ID: <20090818165034.GM26464@metacarta.com> On Mon, Aug 17, 2009 at 11:05:48PM -0400, Mick Jagger wrote: > I wanted to ask if OpenLayers.Layer.MapServer supported the itemquerymap and itemnquerymap parameters that MapServer offers and if so, what params to use in the constructor? OpenLayers 2.8, MapServer 5.4.2 Thanks in advance. http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/MapServer-js.html#OpenLayers.Layer.MapServer.OpenLayers.Layer.MapServer """ OpenLayers.Layer.MapServer Create a new MapServer layer object Parameters name {String} A name for the layer url {String} Base url for the MapServer CGI (e.g. http://www2.dmsolutions.ca/cgi-bin/mapserv) **params {Object} An object with key/value pairs representing the request query string parameters and parameter values. ** options {Ojbect} Hashtable of extra options to tag onto the layer """ (Emphasis mine.) Regards, -- Christopher Schmidt MetaCarta From fsalas at geocuba.cu Tue Aug 18 15:02:34 2009 From: fsalas at geocuba.cu (fsalas) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] how show an objetcs tha only obey a determined condition Message-ID: <141201ca2037$060aed70$eb0110ac@deltha> Hi, I need to show in an alone layer objects that they obey a determined condition. How I can implement this. Best regards , salas ___________________________________ Direcci?n de Comunicaciones Grupo Empresarial GEOCUBA Este mensaje esta libre de virus. Revisado por Kaspersky Antivirus ---------------------------------------------------------------------- Definition count: 2365875 Definition date: 8/11/2009 SecurityPlus version: 3.0.5 From lists at jpw.biz Tue Aug 18 14:16:40 2009 From: lists at jpw.biz (Mick Jagger) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] openlayers + mapserver + query parameters ?? In-Reply-To: <20090818165034.GM26464@metacarta.com> References: <20090817230548.52f05d10.lists@jpw.biz> <20090818165034.GM26464@metacarta.com> Message-ID: <20090818141640.0b9b9a52.lists@jpw.biz> > **params {Object} An object with key/value pairs representing the request > query string parameters and parameter values. ** > options {Ojbect} Hashtable of extra options to tag onto the layer I've added the mapserver query values to the params object. Where I think I'm running into problems is projection. The map uses google as the base layer and the overlay data is in 4326. Using WMS it reprojects fine. But using the MapServer layer, its not. When you set the projection to be 4326 in the options hashtable, does OpenLayers reproject the query bounds to 4326 prior to passing on to MapServer? From mike at spatialit.com Tue Aug 18 14:25:41 2009 From: mike at spatialit.com (Michael Anderson) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] programmatically select feature to modify - worked in 2.7 but doesn't in 2.8 In-Reply-To: References: Message-ID: Thank you very much Eric. I modified the real application according to your suggestions and it works great. Mike ----- Original Message ----- From: "Eric Lemoine" To: "Michael Anderson" Cc: Sent: Monday, August 17, 2009 4:00 PM Subject: Re: [OpenLayers-Users] programmatically select feature to modify - worked in 2.7 but doesn't in 2.8 On Fri, Aug 14, 2009 at 11:06 PM, Michael Anderson wrote: > Hello, > > I have an app that works in 2.7 but not in 2.8. What I need to do is > programmatically select a feature and select it for editing. Works fine in > 2.7. In 2.8 the feature is selected, but the vertices are not displayed > and > it's not editable. > > When I initially got it working I sort of stumbled on to it and was a > little > surprised it worked. I created both ModifyFeature and SelectFeature > controls > on the same layer, and then if I activated the modify control and selected > the feature with the select control the feature was selected and editable. > I'm thinking it wasn't supposed to work this way and was corrected in 2.8. > > I created a simplified example, which is attached to this message. The > html > page is also available here in case the it doesn't come through: > http://128.118.7.3/testing/testSelect.html. To run it just hit the > 'Select' > button in the upper left corner. > > The example is using 2.7 from a server I control so it works. If you > comment > out the javascript reference on line 4 and uncomment the one on line 3 it > will use the hosted version of 2.8. Then it won't work. > > If I am correct that this shouldn't have worked before, is there a way I > can > do the same think properly? Hi. I made a couple changes to your example and got it to work both with 2.7 and 2.8: - remove the select control - activate the modify control after it is added to the map - programmatically select the feature through the modify feature control's internal select feature control - add a hack to fool the select feature control's feature handler (related to ). Also note that ModifyFeature in trunk includes the property "standalone", which may just accommodate your case. See Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From Jeremy.Husmann at critchlow.co.nz Tue Aug 18 15:44:46 2009 From: Jeremy.Husmann at critchlow.co.nz (Jeremy Husmann) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] KML reprojection? In-Reply-To: <20090818163235.GF26464@metacarta.com> Message-ID: <9436AA4D332D4F41A2C82CD50DB759F77227C1@caexch01.ca1.critchlow.co.nz> Chris, All I can say is your that man. Thanks heaps for the help guys. Jeremy -----Original Message----- From: Christopher Schmidt [mailto:crschmidt@metacarta.com] Sent: Wednesday, August 19, 2009 4:33 AM To: Jeremy Husmann Cc: Eric Lemoine; users@openlayers.org Subject: Re: [OpenLayers-Users] KML reprojection? On Tue, Aug 18, 2009 at 08:11:54PM +1200, Jeremy Husmann wrote: > Hi Eric, > > Thanks for the reply. I have tried removing the TMS completely and this is when the projection issue comes into play. Yes, this is a problem. The reprojection support is relaly about 'from the data projection to the baselayer projection'; the baselayer being what actually controls the projection of the map. See: http://crschmidt.net/mapping/choropleth-mercator.html For an example of using a 'fake' baseLayer with a mercator projection, and reprojecting to it in the standard ay, as another solution. -- Chris > I have two examples up on our server > > http://webmapping.critchlow.co.nz/working/googlelayer.html > > http://webmapping.critchlow.co.nz/working/nogoogle.html > > > With the 'googlelayer' link I have a second base layer that is straight KML(labeled CoverageTEST) and the country comes up fine and looks how it should. - only problem is that I only want the KML as the base map and want to remove Google all together. - if I do this I get the 'nogoogle' layer. > > With the nogoogle layer - this is the aim. But the country is all a bit squashed - which points me to the projections. > > The other option I did try was setting the KML file as the map default baselayer but this didn't seem to help either. > > Any ideas? > > Jeremy > > P.S. sorry about the links they may be a little slow to load. > > -----Original Message----- > From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] > Sent: Tuesday, August 18, 2009 5:59 PM > To: Jeremy Husmann > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] KML reprojection? > > On Tuesday, August 18, 2009, Jeremy Husmann > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hello everyone, > > > Hi > > > > > > > > > > I am in the process of adding a KML as a baselayer (I was > > quickly helped by Eric and Christopher by finding the constructor attribute > > need for this.). > > > > > > > > Now I seem to have stuck another in relation to projections. > > > > > > > > > > I have noticed that if I add the KML as the only base layer > > it comes out a bit squashed, when if I don't change any projection > > settings and just add a WMS layer as another base layer it seems to correct the > > KML. - Unsure if anything is going on behind the scenes (with my KML > > being reprojected?) or if im just missing something extremely obvious. - > > Any help would be appreciated. > > What if you remove the TMS layer and have the vector layer as the only > layer in the map? > > > > > > > > > > ??????? function > > mapInit() > > > > ??????????? { > > > > ??????????????????????? var > > nzBounds = new OpenLayers.Bounds(165, -47, 180, -34.5).transform((new > > OpenLayers.Projection("EPSG:4326")), (new > > OpenLayers.Projection("EPSG:900913"))); > > > > > > > > > > ??????????????????????? var > > options = > > > > ??????????????????????? { > > > > ??????????????????????????????????? projection: > > new OpenLayers.Projection("EPSG:900913"), > > > > ??????????????????????????????????? displayProjection: > > new OpenLayers.Projection("EPSG:4326"), > > > > ??????????????????????????????????? units: > > "m", > > > > ??????????????????????????????????? maxResolution: > > 16543.0339, > > > > > > > > ??????????????????????????????????? maxExtent: > > nzBounds, > > > > ??????????????????????????????????? numZoomLevels: > > 24, > > > > ??????????????????????????????????? minZoomLevel: > > 6, > > > > ??????????????????????????????????? maxZoomLevel:18, > > > > ??????????? ??????????????????????? controls: > > [ > > > > > > new OpenLayers.Control.Navigation(), > > > > > > new OpenLayers.Control.LayerSwitcher({'ascending':false}), > > > > ??????????????????????????????????? new > > OpenLayers.Control.PanZoomBar({zoomWorldIcon:true}) > > > > ??????????????????????????????????? ] > > > > ??????????????????????? }; > > > > > > > > > > > > map = new OpenLayers.Map('map', options); > > > > ??????????????????????? map.addControl(new > > OpenLayers.Control.LayerSwitcher()); > > > > > > > > > > > > > > > > > > > > > > > > var mapnik = new OpenLayers.Layer.TMS( > > > > > > "OpenStreetMap (Mapnik)", > > > > > > "http://tile.openstreetmap.org/", > > > > > > { > > > > > > type: 'png', > > > > > > displayOutsideMaxExtent: true, > > > > > > attribution: ' > href="http://www.openstreetmap.org/">OpenStreetMap' > > > > > > } > > > > > > ); > > > > > > > > > > > > mapnik.setVisibility(false); > > > > > > > > > > ??????????????????????? var > > time = new Date(); > > > > ??????????????????????? var > > secs = time.getSeconds(); > > > > ??????????????????????? postCodeKml > > = new OpenLayers.Layer.GML("CoverageTEST", > > "kml/coverage_1.kml?" + secs, > > > > ??????????????????????? { > > > > > > format: OpenLayers.Format.KML, > > > > projection:map.displayProjection, > > > > > > > > > > > > > > > > > > isBaseLayer:true, > > > > > > formatOptions: { > > > > > > extractStyles: true, > > > > > > extractAttributes: true > > > > > > } > > > > > > } > > > > > > ); > > > > > > > > > > > > map.addLayers([mapnik]); > > > > > > > > ??????????????????????? postCodeKml.setVisibility(true); > > > > ??????????????????????? map.addLayer(postCodeKml); > > > > ??????????????????????? postCodeKml.setOpacity(0.25); > > > > > > > > > > ??????????????????????? map.zoomToExtent(nzBounds); > > > > > > > > map.addControl(new OpenLayers.Control.MousePosition()); > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From rodolfoamoreno at gmail.com Tue Aug 18 16:40:22 2009 From: rodolfoamoreno at gmail.com (Rodolfo Moreno) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Bug in Google with overaly example In-Reply-To: <20090818164148.GJ26464@metacarta.com> References: <1249684505845-3407076.post@n2.nabble.com> <1250019209158-3426344.post@n2.nabble.com> <1250608945812-3466693.post@n2.nabble.com> <20090818164148.GJ26464@metacarta.com> Message-ID: <1250628022931-3468479.post@n2.nabble.com> Hi Cris, My issue is overlapping Google with MAPGUIDE layer and I think that is the same issue that shows up in the openlayers sample. unfortunally I don't have any public IP for showing my problem. However I have attached images in this post in order to see my problem. Also I am posting the code of my sample (ASPX part). This sample worked appropriately 3 months ago but now it does not. <%----%> MapGuide & OpenLayers <%----%> <%----%>

Lima Map


Best Regards, Christopher Schmidt-2 wrote: > > On Tue, Aug 18, 2009 at 10:22:25AM -0500, Rodolfo Moreno wrote: >> >> Hi Eric, do you realize that the overlay examples in >> "http://openlayers.org/dev/examples/" is not working appropriately. Here >> is >> part of the example code for "google with overlay maps": > > It's not working because 'world.freemap.in' is dead, kaput, etc. The > code should certainly work; can you provide an example where the > WMS server *does* exist and it doesn't work? > > -- Chris > >> function init(){ >> map = new OpenLayers.Map('map'); >> >> var satellite = new OpenLayers.Layer.Google( >> "Google Satellite" , {type: G_SATELLITE_MAP} >> ); >> >> var wms = new OpenLayers.Layer.WMS( >> "World Map", >> "http://world.freemap.in/cgi-bin/mapserv", >> { >> map: '/www/freemap.in/world/map/factbooktrans.map', >> transparent: 'TRUE', >> layers: 'factbook' >> }, >> {'reproject': true} >> ); >> >> map.addLayers([satellite, wms]); >> >> map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5); >> map.addControl( new OpenLayers.Control.LayerSwitcher() ); >> } >> >> In this code I can see what you are saying(transparent: 'TRUE') but this >> sample is not working either. >> maybe it's an openlayers issue. >> >> Regards, >> >> >> Eric Lemoine-2-2 wrote: >> > >> > On Tuesday, August 11, 2009, Rodolfo Moreno >> > wrote: >> >> >> >> Thanks Eric for your answer. I am overlapping a mapguide layer. I did >> >> what >> >> you suggested but it's not working. >> >> >> >> var dynamicOverlayOptions = { >> >> ? ? ? ? ? ? ?buffer: 1, >> >> ? ? ? ? ? ? ?singleTile: true, >> >> ? ? ? ?isBaseLayer : false, >> >> ? ? ? ?visibility : true, >> >> ? ? ? ?transparent:true // This is the code added >> >> ? ? ? ? ? ? ? ? }; >> >> >> >> Is this property (transparent:true) new? >> >> I ask about it because my sample works fine 3 months ago. >> > >> > transparent is a WMS param. It should go in the Layer.WMS params, not >> > options. >> > >> > >> >> >> >> Thanks in advance >> >> >> >> >> >> Eric Lemoine-2-2 wrote: >> >>> >> >>> On Sat, Aug 8, 2009 at 12:35 AM, Rodolfo >> >>> Moreno >> >>> wrote: >> >>>> >> >>>> Hi all, >> >>>> The google with overlay example from >> >>>> "http://openlayers.org/dev/examples/" >> >>>> is working incorrectly. The bug is not only because the worldmap is >> not >> >>>> loaded correctly but also because this is covering whole the map and >> >>>> thus >> >>>> the google layer is not showed, just the worldmap is showed. if you >> >>>> turn >> >>>> off >> >>>> the worldmap layer then it's possible to view the google layer. I >> >>>> realized >> >>>> about it because I have a similar example overlaping google maps >> with >> >>>> mapguide layers and 3 months ago this sample worked appropriately >> (in >> >>>> that >> >>>> moment the last release was 2.6 version) and now I got the same bug, >> it >> >>>> means that mapguide layers covers whole map that don't enable to >> view >> >>>> the >> >>>> google layers. >> >>> >> >>> The layer you put on top of the google layer must be transparent. If >> >>> your layer if a WMS layer (OpenLayers.Layer.WMS) use transparent:true >> >>> in the layer params. >> >>> >> >>> >> >>> -- >> >>> Eric Lemoine >> >>> >> >>> Camptocamp France SAS >> >>> Savoie Technolac, BP 352 >> >>> 73377 Le Bourget du Lac, Cedex >> >>> >> >>> Tel : 00 33 4 79 44 44 96 >> >>> Mail : eric.lemoine@camptocamp.com >> >>> http://www.camptocamp.com >> >>> _______________________________________________ >> >>> Users mailing list >> >>> Users@openlayers.org >> >>> http://openlayers.org/mailman/listinfo/users >> >>> >> >>> >> >> >> >> >> >> ----- >> >> Rodolfo Moreno >> >> CivilEng >> >> >> >> -- >> >> View this message in context: >> >> >> http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3426344.html >> >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> >> Users mailing list >> >> Users@openlayers.org >> >> http://openlayers.org/mailman/listinfo/users >> >> >> > >> > -- >> > Eric Lemoine >> > >> > Camptocamp France SAS >> > Savoie Technolac, BP 352 >> > 73377 Le Bourget du Lac, Cedex >> > >> > Tel : 00 33 4 79 44 44 96 >> > Mail : eric.lemoine@camptocamp.com >> > http://www.camptocamp.com >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> > >> >> >> ----- >> Rodolfo Moreno >> CivilEng >> >> -- >> View this message in context: >> http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3466693.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > http://n2.nabble.com/file/n3468479/OLforum2.jpg ----- Rodolfo Moreno CivilEng -- View this message in context: http://n2.nabble.com/Bug-in-Google-with-overaly-example-tp3407076p3468479.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From john.c.cartwright at comcast.net Wed Aug 19 00:52:04 2009 From: john.c.cartwright at comcast.net (John Cartwright) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added In-Reply-To: References: <4A85D692.8010900@comcast.net> <7D63F257-76B2-4ACC-B5BD-B8D53F0B011B@comcast.net> <4FB149DA-7BDF-42C9-8ABD-52A46ED8CA65@comcast.net> Message-ID: On Aug 18, 2009, at 12:38 AM, Eric Lemoine wrote: > Hi John > > Actually the to-be-added feature is already in the layer when > beforefeatureadded triggers, so calling destroyFeatures() in a > beforefeatureadded listener also destroys the to-be-added feature . > This looks like a bug to me, so I think a ticket should be open for > this. In the mean time you can do this: > > function clearPreviousFeatures(evt) { > var i, len, toDestroy = [] > for(i=0,len=vectors.features.length; i if(vectors.features[i] != evt.feature) { > toDestroy.push(vectors.features[i]); > } > } > vectors.removeFeatures(toDestroy); > for(i=toDestroy.length-1; i>=0; i--) { > toDestroy[i].destroy(); > } > } > > > Hope this helps, > > > PS: thanks for the example you provided. Thanks Eric, this works great! I notice that there doesn't seem to be any difference between this: vectors.removeFeatures(toDestroy); for(i=toDestroy.length-1; i>=0; i--) { toDestroy[i].destroy(); } and this: vectors.destroyFeatures(toDestroy); Is that what you'd expect? --john -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090818/cceaec36/attachment.html From eric.lemoine at camptocamp.com Wed Aug 19 01:22:33 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] limiting a Vector layer to the last feature added In-Reply-To: References: <4A85D692.8010900@comcast.net> <7D63F257-76B2-4ACC-B5BD-B8D53F0B011B@comcast.net> <4FB149DA-7BDF-42C9-8ABD-52A46ED8CA65@comcast.net> Message-ID: On Wednesday, August 19, 2009, John Cartwright wrote: > > On Aug 18, 2009, at 12:38 AM, Eric Lemoine wrote: > Hi John > > Actually the to-be-added feature is already in the layer when > beforefeatureadded triggers, so calling destroyFeatures() in a > beforefeatureadded listener also destroys the to-be-added feature . > This looks like a bug to me, so I think a ticket should be open for > this. In the mean time you can do this: > > ??????function clearPreviousFeatures(evt) { > ??????????????var i, len, toDestroy = [] > ??????????????for(i=0,len=vectors.features.length; i ??????????????????if(vectors.features[i] != evt.feature) { > ??????????????????????toDestroy.push(vectors.features[i]); > ??????????????????} > ??????????????} > ??????????????vectors.removeFeatures(toDestroy); > ??????????????for(i=toDestroy.length-1; i>=0; i--) { > ??????????????????toDestroy[i].destroy(); > ??????????????} > ??????} > > > Hope this helps, > > > PS: thanks for the example you provided. > > Thanks Eric, this works great! > I notice that there doesn't seem to be any difference between this: vectors.removeFeatures(toDestroy); for(i=toDestroy.length-1; i>=0; i--) { toDestroy[i].destroy(); } > and this: > vectors.destroyFeatures(toDestroy); > Is that what you'd expect? You are correct. And using destroyFeatures is better IMO - less code on the application side. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From xiaying4415139 at 163.com Wed Aug 19 02:04:54 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Animate effect like Virtual Earth? In-Reply-To: <1250236376983-3443597.post@n2.nabble.com> References: <1250236376983-3443597.post@n2.nabble.com> Message-ID: <1250661894717-3470578.post@n2.nabble.com> up to the top by myself and want to be answered if anyone knows, thanks. shane_china wrote: > > When I saw this Virtual Earth Example > http://openlayers.org/dev/examples/ve-novibrate.html > http://openlayers.org/dev/examples/ve-novibrate.html , Its zoom effect > shocked me. I notice that there are two lines in the source code > panMethod: OpenLayers.Easing.Linear.easeOut, > panDuration: 10 > I added them to my own map with WMS layer but it doesn't work. Is there > some method can make WMS layer has the same animate zoom effect like > Virtual Earth? I already know transitionEffect: 'resize', but I think it > is not as fantastic as Virtual Earth. > > Thanks > > -- View this message in context: http://n2.nabble.com/Animate-effect-like-Virtual-Earth--tp3443597p3470578.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tommytomorow at msn.com Wed Aug 19 04:24:51 2009 From: tommytomorow at msn.com (tommy408) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Animate effect like Virtual Earth? In-Reply-To: <1250661894717-3470578.post@n2.nabble.com> References: <1250236376983-3443597.post@n2.nabble.com> <1250661894717-3470578.post@n2.nabble.com> Message-ID: <1250670291588-3471030.post@n2.nabble.com> Hiya shane. I'm dying to know too. At the end of my project I'll spend huge amount of time to get it to work if no one else know. shane_china wrote: > > up to the top by myself and want to be answered if anyone knows, thanks. > > > shane_china wrote: >> >> When I saw this Virtual Earth Example >> http://openlayers.org/dev/examples/ve-novibrate.html >> http://openlayers.org/dev/examples/ve-novibrate.html , Its zoom effect >> shocked me. I notice that there are two lines in the source code >> panMethod: OpenLayers.Easing.Linear.easeOut, >> panDuration: 10 >> I added them to my own map with WMS layer but it doesn't work. Is there >> some method can make WMS layer has the same animate zoom effect like >> Virtual Earth? I already know transitionEffect: 'resize', but I think it >> is not as fantastic as Virtual Earth. >> >> Thanks >> >> > > -- View this message in context: http://n2.nabble.com/Animate-effect-like-Virtual-Earth--tp3443597p3471030.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From asseltine1 at hotmail.com Wed Aug 19 09:18:29 2009 From: asseltine1 at hotmail.com (kennyken) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Zoom to feature and highlight it Message-ID: <1250687909723-3472183.post@n2.nabble.com> Here is what I?m trying to do. I have google maps as my base layer. Then I have a polygon layer on top of that. What I?m trying to do is link to a particular polygon and highlight it via a hyperlink somewhere on my website. For example I would have a link similar to http://mywebsite/map.html/polygonIDNumber/ That would then open the map and zoom to and highlight the polygon that is identified in the URL. I?ve look at several example and I can?t find what I?m looking for. Any help would be appreciated. -- View this message in context: http://n2.nabble.com/Zoom-to-feature-and-highlight-it-tp3472183p3472183.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mike at spatialit.com Wed Aug 19 09:56:12 2009 From: mike at spatialit.com (Michael Anderson) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem labeling vector features - vertices being labeled too In-Reply-To: References: Message-ID: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> Hello, I'm having a problem with labeling vector features. It works fine until I select a feature with a ModifyFeature control. Then it labels all the vertices as well as the feature itself. And they are all labeled 'undefined' because the vertices don't have the attributes needed for the label. I have a stylemap set up with 'default' and 'select' styles. Only the default style has a label defined. At first I had a label set up for the select style too so it would be labeled when selected. Then when the vertices were labeled I removed the label from the style, but the vertices are still labeled. Is there a way to label a feature while it's vertices are visible and not have the vertices labeled too? And I expected the select style to replace the default one when the feature was selected. But it seems like they are being combined since a selected feature has labels even when the select style doesn't define one. I've attached a simplified example. When it loads you will see the feature with a label "1". Click on it to select it and the vertices will be labeled with "undefined". The page is also available here: http://128.118.7.3/testing/testlabel.html Mike From mike at spatialit.com Wed Aug 19 09:58:25 2009 From: mike at spatialit.com (Michael Anderson) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem labeling vector features - vertices being labeled too - forgot attachment In-Reply-To: References: Message-ID: Sorry, forgot the attachment for the previous post. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090819/055f1b19/testLabel.html From crschmidt at metacarta.com Wed Aug 19 10:06:12 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem labeling vector features - vertices being labeled too In-Reply-To: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> Message-ID: <20090819140612.GQ26464@metacarta.com> On Wed, Aug 19, 2009 at 09:56:12AM -0400, Michael Anderson wrote: > Hello, > > I'm having a problem with labeling vector features. It works fine until I > select a feature with a ModifyFeature control. Then it labels all the > vertices as well as the feature itself. And they are all labeled 'undefined' > because the vertices don't have the attributes needed for the label. > > I have a stylemap set up with 'default' and 'select' styles. Only the > default style has a label defined. At first I had a label set up for the > select style too so it would be labeled when selected. Then when the > vertices were labeled I removed the label from the style, but the vertices > are still labeled. "The ?default? intent has a special role: if the extendDefault property of the StyleMap is set to true (default), symbolizers calculated for other render intents will extend the symbolizer calcualated for the ?default? intent. So if we want selected features just to have a different size or color, we only have to set a single property (in this example: pointRadius)." -- http://docs.openlayers.org/library/feature_styling.html#stylemap So, if you have (in your select style) the 'label' set to '' -- an empty string -- I think this should solve your problem. > Is there a way to label a feature while it's vertices are visible and not > have the vertices labeled too? Vertices are features too, but I think the above solution should solve your problem, based on your description. Regards, -- Christopher Schmidt MetaCarta From seileef at gmail.com Wed Aug 19 10:35:44 2009 From: seileef at gmail.com (Tom B) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Interface for associating SLD styles with feature types Message-ID: <1250692544227-3472658.post@n2.nabble.com> Hi all, I've asked this on the GeoServer forum, but haven't gotten any responses, so I thought I might try it here. It's not exactly OpenLayers-specific, but it concerns matters that other OL users may be familiar with/interested in. We're using GeoServer to serve up a large set of features, each of which belong to a feature type. We're hoping to build an interface for attaching specific style rules to each feature type. The styling will be done via SLD (the features are shown using WMS in OpenLayers). We have hundreds of feature types, so a single style rule will likely be associated with multiple feature types. The plan we are thinking of using is this: 1. Make a style rules table, with fields like "stroke width", "stroke color", "fill color", "point image icon", etc. 2. Make a CRUD interface for editing the style rules table. 3. Add a field to our feature types table called something like style_rule_id, and have a drop-down menu that lets you assign a style rule to a feature type. 4. Set up GeoServer so that, when a feature is requested, the style rule fields (e.g. "stroke width") of its feature type are served. The SLD then uses these fields' values to style the feature (probably by using ). Does this sound like a reasonable setup? I'm new to this, so if anyone has any pointers or better methods of achieving this, that'd be great. Thanks, Tom -- View this message in context: http://n2.nabble.com/Interface-for-associating-SLD-styles-with-feature-types-tp3472658p3472658.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mike at spatialit.com Wed Aug 19 10:42:57 2009 From: mike at spatialit.com (Michael Anderson) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem labeling vector features - vertices being labeled too In-Reply-To: <20090819140612.GQ26464@metacarta.com> References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> Message-ID: <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> In the real app I'd tried setting the select style's label to an empty string, but it didn't work so I didn't include it in my example. I added it to the example (http://128.118.7.3/testing/testlabel.html). It makes the label for the polygon go away, but still labels the vertices with 'undefined'. Mike ----- Original Message ----- From: "Christopher Schmidt" To: "Michael Anderson" Cc: Sent: Wednesday, August 19, 2009 10:06 AM Subject: SPAM-LOW: Re: [OpenLayers-Users] problem labeling vector features - vertices being labeled too On Wed, Aug 19, 2009 at 09:56:12AM -0400, Michael Anderson wrote: > Hello, > > I'm having a problem with labeling vector features. It works fine until I > select a feature with a ModifyFeature control. Then it labels all the > vertices as well as the feature itself. And they are all labeled > 'undefined' > because the vertices don't have the attributes needed for the label. > > I have a stylemap set up with 'default' and 'select' styles. Only the > default style has a label defined. At first I had a label set up for the > select style too so it would be labeled when selected. Then when the > vertices were labeled I removed the label from the style, but the vertices > are still labeled. "The ?default? intent has a special role: if the extendDefault property of the StyleMap is set to true (default), symbolizers calculated for other render intents will extend the symbolizer calcualated for the ?default? intent. So if we want selected features just to have a different size or color, we only have to set a single property (in this example: pointRadius)." -- http://docs.openlayers.org/library/feature_styling.html#stylemap So, if you have (in your select style) the 'label' set to '' -- an empty string -- I think this should solve your problem. > Is there a way to label a feature while it's vertices are visible and not > have the vertices labeled too? Vertices are features too, but I think the above solution should solve your problem, based on your description. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Aug 19 10:59:26 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem labeling vector features - vertices being labeled too In-Reply-To: <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> Message-ID: <20090819145925.GR26464@metacarta.com> On Wed, Aug 19, 2009 at 10:42:57AM -0400, Michael Anderson wrote: > In the real app I'd tried setting the select style's label to an empty > string, but it didn't work so I didn't include it in my example. I added > it to the example (http://128.118.7.3/testing/testlabel.html). It makes > the label for the polygon go away, but still labels the vertices with > 'undefined'. Sorry; I forgot that for the modifyFeature, the style name used is 'temporary'; I think that if you change 'select' to 'temporary' it might help. -- Chris > Mike > > ----- Original Message ----- From: "Christopher Schmidt" > > To: "Michael Anderson" > Cc: > Sent: Wednesday, August 19, 2009 10:06 AM > Subject: SPAM-LOW: Re: [OpenLayers-Users] problem labeling vector > features - vertices being labeled too > > > On Wed, Aug 19, 2009 at 09:56:12AM -0400, Michael Anderson wrote: >> Hello, >> >> I'm having a problem with labeling vector features. It works fine until I >> select a feature with a ModifyFeature control. Then it labels all the >> vertices as well as the feature itself. And they are all labeled >> 'undefined' >> because the vertices don't have the attributes needed for the label. >> >> I have a stylemap set up with 'default' and 'select' styles. Only the >> default style has a label defined. At first I had a label set up for the >> select style too so it would be labeled when selected. Then when the >> vertices were labeled I removed the label from the style, but the vertices >> are still labeled. > > "The ?default? intent has a special role: if the extendDefault property > of the StyleMap is set to true (default), symbolizers calculated for > other render intents will extend the symbolizer calcualated for the > ?default? intent. So if we want selected features just to have a > different size or color, we only have to set a single property (in this > example: pointRadius)." > > -- http://docs.openlayers.org/library/feature_styling.html#stylemap > > So, if you have (in your select style) the 'label' set to '' -- an empty > string -- I think this should solve your problem. > > >> Is there a way to label a feature while it's vertices are visible and not >> have the vertices labeled too? > > Vertices are features too, but I think the above solution should solve > your problem, based on your description. > > Regards, > -- > Christopher Schmidt > MetaCarta > > > > -- Christopher Schmidt MetaCarta From eric.lemoine at camptocamp.com Wed Aug 19 12:12:21 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Zoom to feature and highlight it In-Reply-To: <1250687909723-3472183.post@n2.nabble.com> References: <1250687909723-3472183.post@n2.nabble.com> Message-ID: On Wednesday, August 19, 2009, kennyken wrote: > > Here is what I?m trying to do. > I have google maps as my base layer. ?Then I have a polygon layer on top of > that. > What I?m trying to do is link to a particular polygon and highlight it via a > hyperlink somewhere on my website. > > For example I would have a link similar to > http://mywebsite/map.html/polygonIDNumber/ > > That would then open the map and zoom to and highlight the polygon that is > identified in the URL. > I?ve look at several example and I can?t find what I?m looking for. Any help > would be appreciated. Hi. You might find the OpenLayers.Util.createUrlObject() function useful. Using this function you should be able to get the feature id from the page URL. Cheers, > > -- > View this message in context: http://n2.nabble.com/Zoom-to-feature-and-highlight-it-tp3472183p3472183.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From pj_maloney at hotmail.com Wed Aug 19 12:20:54 2009 From: pj_maloney at hotmail.com (PhilM) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Displaying text when hovering over Control Message-ID: <1250698854776-3473517.post@n2.nabble.com> I would like to display some information to assist users by dynamically displaying help text in an external div. The tooltip solution, using the "title" property, does not fit my requirements here. I have tried numerous ways to attach a "mouseover" event to the control but to no avail. Must be missing something obvious so any help appreciated! -- View this message in context: http://n2.nabble.com/Displaying-text-when-hovering-over-Control-tp3473517p3473517.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Wed Aug 19 12:20:57 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem labeling vector features - vertices being labeled too In-Reply-To: <20090819145925.GR26464@metacarta.com> References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> <20090819145925.GR26464@metacarta.com> Message-ID: On Wednesday, August 19, 2009, Christopher Schmidt wrote: > On Wed, Aug 19, 2009 at 10:42:57AM -0400, Michael Anderson wrote: >> In the real app I'd tried setting the select style's label to an empty >> string, but it didn't work so I didn't include it in my example. I added >> it to the example (http://128.118.7.3/testing/testlabel.html). It makes >> the label for the polygon go away, but still labels the vertices with >> 'undefined'. > > Sorry; I forgot that for the modifyFeature, the style name used is > 'temporary'; is it? The modify feature control uses a select feature control, whose default select style is "select" IIRC. Regards, > I think that if you change 'select' to 'temporary' it might > help. > > -- Chris > > >> Mike >> >> ----- Original Message ----- From: "Christopher Schmidt" >> >> To: "Michael Anderson" >> Cc: >> Sent: Wednesday, August 19, 2009 10:06 AM >> Subject: SPAM-LOW: Re: [OpenLayers-Users] problem labeling vector >> features - vertices being labeled too >> >> >> On Wed, Aug 19, 2009 at 09:56:12AM -0400, Michael Anderson wrote: >>> Hello, >>> >>> I'm having a problem with labeling vector features. It works fine until I >>> select a feature with a ModifyFeature control. Then it labels all the >>> vertices as well as the feature itself. And they are all labeled >>> 'undefined' >>> because the vertices don't have the attributes needed for the label. >>> >>> I have a stylemap set up with 'default' and 'select' styles. Only the >>> default style has a label defined. At first I had a label set up for the >>> select style too so it would be labeled when selected. Then when the >>> vertices were labeled I removed the label from the style, but the vertices >>> are still labeled. >> >> "The ?default? intent has a special role: if the extendDefault property >> of the StyleMap is set to true (default), symbolizers calculated for >> other render intents will extend the symbolizer calcualated for the >> ?default? intent. So if we want selected features just to have a >> different size or color, we only have to set a single property (in this >> example: pointRadius)." >> >> -- http://docs.openlayers.org/library/feature_styling.html#stylemap >> >> So, if you have (in your select style) the 'label' set to '' -- an empty >> string -- I think this should solve your problem. >> >> >>> Is there a way to label a feature while it's vertices are visible and not >>> have the vertices labeled too? >> >> Vertices are features too, but I think the above solution should solve >> your problem, based on your description. >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta >> >> >> >> > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From crschmidt at metacarta.com Wed Aug 19 12:24:37 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem labeling vector features - vertices being labeled too In-Reply-To: References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> <20090819145925.GR26464@metacarta.com> Message-ID: <20090819162437.GS26464@metacarta.com> On Wed, Aug 19, 2009 at 06:20:57PM +0200, Eric Lemoine wrote: > On Wednesday, August 19, 2009, Christopher Schmidt > wrote: > > On Wed, Aug 19, 2009 at 10:42:57AM -0400, Michael Anderson wrote: > >> In the real app I'd tried setting the select style's label to an empty > >> string, but it didn't work so I didn't include it in my example. I added > >> it to the example (http://128.118.7.3/testing/testlabel.html). It makes > >> the label for the polygon go away, but still labels the vertices with > >> 'undefined'. > > > > Sorry; I forgot that for the modifyFeature, the style name used is > > 'temporary'; > > is it? The modify feature control uses a select feature control, whose > default select style is "select" IIRC. Okay, grep failed me. So then what is the user doing wrong? -- Chris > Regards, > > > > > I think that if you change 'select' to 'temporary' it might > > help. > > > > -- Chris > > > > > >> Mike > >> > >> ----- Original Message ----- From: "Christopher Schmidt" > >> > >> To: "Michael Anderson" > >> Cc: > >> Sent: Wednesday, August 19, 2009 10:06 AM > >> Subject: SPAM-LOW: Re: [OpenLayers-Users] problem labeling vector > >> features - vertices being labeled too > >> > >> > >> On Wed, Aug 19, 2009 at 09:56:12AM -0400, Michael Anderson wrote: > >>> Hello, > >>> > >>> I'm having a problem with labeling vector features. It works fine until I > >>> select a feature with a ModifyFeature control. Then it labels all the > >>> vertices as well as the feature itself. And they are all labeled > >>> 'undefined' > >>> because the vertices don't have the attributes needed for the label. > >>> > >>> I have a stylemap set up with 'default' and 'select' styles. Only the > >>> default style has a label defined. At first I had a label set up for the > >>> select style too so it would be labeled when selected. Then when the > >>> vertices were labeled I removed the label from the style, but the vertices > >>> are still labeled. > >> > >> "The ?default? intent has a special role: if the extendDefault property > >> of the StyleMap is set to true (default), symbolizers calculated for > >> other render intents will extend the symbolizer calcualated for the > >> ?default? intent. So if we want selected features just to have a > >> different size or color, we only have to set a single property (in this > >> example: pointRadius)." > >> > >> -- http://docs.openlayers.org/library/feature_styling.html#stylemap > >> > >> So, if you have (in your select style) the 'label' set to '' -- an empty > >> string -- I think this should solve your problem. > >> > >> > >>> Is there a way to label a feature while it's vertices are visible and not > >>> have the vertices labeled too? > >> > >> Vertices are features too, but I think the above solution should solve > >> your problem, based on your description. > >> > >> Regards, > >> -- > >> Christopher Schmidt > >> MetaCarta > >> > >> > >> > >> > > > > -- > > Christopher Schmidt > > MetaCarta > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com -- Christopher Schmidt MetaCarta From mike at spatialit.com Wed Aug 19 12:39:36 2009 From: mike at spatialit.com (Michael Anderson) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] SPAM-LOW: Re: problem labeling vector features - vertices being labeled too In-Reply-To: <20090819162437.GS26464@metacarta.com> References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> <20090819145925.GR26464@metacarta.com> <20090819162437.GS26464@metacarta.com> Message-ID: <949BEF06885C42DF90B731541E1C7D0F@MIKETOSHIBA3> Eric is correct. The modifyFeature control is using the select style. Setting the select style's label to an empty string does remove the label on the polygon feature being edited. But the vertices are still labeled. So it is still trying to label the vertices with an attribute value (from the default style?) and putting the empty string from the select style on the polygon. Gives me an idea for a temporary hack though. I have a function that finds vertices. I can modify it to add the label attribute to the vertices and set them to empty strings. That should let me label the polygon while the vertices appear to not have labels. Should work as long as adding attributes to a vertex won't cause a problem I don't know about. Mike ----- Original Message ----- From: "Christopher Schmidt" To: "Eric Lemoine" Cc: "Michael Anderson" ; Sent: Wednesday, August 19, 2009 12:24 PM Subject: SPAM-LOW: Re: [OpenLayers-Users] problem labeling vector features - vertices being labeled too On Wed, Aug 19, 2009 at 06:20:57PM +0200, Eric Lemoine wrote: > On Wednesday, August 19, 2009, Christopher Schmidt > wrote: > > On Wed, Aug 19, 2009 at 10:42:57AM -0400, Michael Anderson wrote: > >> In the real app I'd tried setting the select style's label to an empty > >> string, but it didn't work so I didn't include it in my example. I > >> added > >> it to the example (http://128.118.7.3/testing/testlabel.html). It makes > >> the label for the polygon go away, but still labels the vertices with > >> 'undefined'. > > > > Sorry; I forgot that for the modifyFeature, the style name used is > > 'temporary'; > > is it? The modify feature control uses a select feature control, whose > default select style is "select" IIRC. Okay, grep failed me. So then what is the user doing wrong? -- Chris > Regards, > > > > > I think that if you change 'select' to 'temporary' it might > > help. > > > > -- Chris > > > > > >> Mike > >> > >> ----- Original Message ----- From: "Christopher Schmidt" > >> > >> To: "Michael Anderson" > >> Cc: > >> Sent: Wednesday, August 19, 2009 10:06 AM > >> Subject: SPAM-LOW: Re: [OpenLayers-Users] problem labeling vector > >> features - vertices being labeled too > >> > >> > >> On Wed, Aug 19, 2009 at 09:56:12AM -0400, Michael Anderson wrote: > >>> Hello, > >>> > >>> I'm having a problem with labeling vector features. It works fine > >>> until I > >>> select a feature with a ModifyFeature control. Then it labels all the > >>> vertices as well as the feature itself. And they are all labeled > >>> 'undefined' > >>> because the vertices don't have the attributes needed for the label. > >>> > >>> I have a stylemap set up with 'default' and 'select' styles. Only the > >>> default style has a label defined. At first I had a label set up for > >>> the > >>> select style too so it would be labeled when selected. Then when the > >>> vertices were labeled I removed the label from the style, but the > >>> vertices > >>> are still labeled. > >> > >> "The ?default? intent has a special role: if the extendDefault property > >> of the StyleMap is set to true (default), symbolizers calculated for > >> other render intents will extend the symbolizer calcualated for the > >> ?default? intent. So if we want selected features just to have a > >> different size or color, we only have to set a single property (in this > >> example: pointRadius)." > >> > >> -- http://docs.openlayers.org/library/feature_styling.html#stylemap > >> > >> So, if you have (in your select style) the 'label' set to '' -- an > >> empty > >> string -- I think this should solve your problem. > >> > >> > >>> Is there a way to label a feature while it's vertices are visible and > >>> not > >>> have the vertices labeled too? > >> > >> Vertices are features too, but I think the above solution should solve > >> your problem, based on your description. > >> > >> Regards, > >> -- > >> Christopher Schmidt > >> MetaCarta > >> > >> > >> > >> > > > > -- > > Christopher Schmidt > > MetaCarta > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com -- Christopher Schmidt MetaCarta From yangzhaozhao2008 at 163.com Wed Aug 19 13:59:15 2009 From: yangzhaozhao2008 at 163.com (Kevin Yang) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Leaving a polygon in the map which can't be removed in the Vector Layers Message-ID: <1250704755706-3474250.post@n2.nabble.com> Hi dear sir, When I using the draw feature function of OpenLayers, it sometimes leaves a geometry(such as a polygon) in the map which can't be removed in the Vector Layers, even after I close the draw control using "toggle('none')". How can I deal with this issue? best regards, Yang -- View this message in context: http://n2.nabble.com/Leaving-a--polygon-in-the-map-which-can%27t-be-removed-in-the-Vector-Layers-tp3474250p3474250.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From lee.meilleur at gis.leg.mn Wed Aug 19 14:52:33 2009 From: lee.meilleur at gis.leg.mn (Lee Meilleur) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Zoom to feature and highlight it In-Reply-To: <1250687909723-3472183.post@n2.nabble.com> Message-ID: Ken, I'm a newbie with openlayers, but below is a snippet of the javascript I'm working on. One problem is that I cannot control the zooming/panning after selecting and zooming to the feature. The options are basically frozen. That and it actually zooms in closer than the boundary of the selected feature. Does anyone have any thoughts on why this happening? Thanks, Lee -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of kennyken Sent: Wednesday, August 19, 2009 8:18 AM To: users@openlayers.org Subject: [OpenLayers-Users] Zoom to feature and highlight it Here is what I'm trying to do. I have google maps as my base layer. Then I have a polygon layer on top of that. What I'm trying to do is link to a particular polygon and highlight it via a hyperlink somewhere on my website. For example I would have a link similar to http://mywebsite/map.html/polygonIDNumber/ That would then open the map and zoom to and highlight the polygon that is identified in the URL. I've look at several example and I can't find what I'm looking for. Any help would be appreciated. -- View this message in context: http://n2.nabble.com/Zoom-to-feature-and-highlight-it-tp3472183p3472183.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From arevaco90 at yahoo.es Wed Aug 19 15:33:40 2009 From: arevaco90 at yahoo.es (=?UTF-8?Q?Juan_Ar=C3=A9valo?=) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Adding new features: WFS-T PostGIS Message-ID: <1250710420618-3474825.post@n2.nabble.com> Hi All, I am trying to set up a WFS-T using Geoserver 1.7.6 and PostGres 8.4. I have tried with the following code in order to insert new features: //WFS LAYER: wfs = new OpenLayers.Layer.WFS( "Cities", "http://localhost:8080/geoserver/wfs", {typename: 'cite:ciudades'}, {featureNS: 'http://www.opengeospatial.net/cite', srsName: 'EPSG:4326', version: "1.0.0", //schema: "http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=ciudades&outputformat=text/xml;%20subtype=gml/3.1.1", //schema: "http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=cite:ciudades", schema: "http://127.0.0.1:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=cite:ciudades", extractAttributes: true}); wfs.style = OpenLayers.Util.applyDefaults({strokeColor: "#0000ff"}, OpenLayers.Feature.Vector.style["default"]); //SAVE BUTTON: var save = new OpenLayers.Control.Button({ trigger: OpenLayers.Function.bind(wfs.commit, wfs), displayClass: "olControlSaveFeatures" }); When I click the save button I got this error: WFS Transaction: FAILED Feature type 'featureMember' is not available: The geoserver log is as follow: 2009-08-19 20:57:35,500 ERROR [geoserver.ows] - org.geoserver.wfs.WFSTransactionException: Feature type 'featureMember' is not available: at org.geoserver.wfs.Transaction.execute(Transaction.java:222) at org.geoserver.wfs.Transaction.transaction(Transaction.java:108) at org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:182) (...) Does anyone have any idea on how to solve this issue? It would be great if you can provide me with some working examples.. Thanks:)- Juan -- View this message in context: http://n2.nabble.com/Adding-new-features%3A-WFS-T-PostGIS-tp3474825p3474825.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ullasjos at gmail.com Wed Aug 19 17:38:31 2009 From: ullasjos at gmail.com (Ullas Joseph) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Pop is not closing while Zooming Message-ID: <3edecff80908191438o6b9b8c84g8a6ac51f05dc0a46@mail.gmail.com> Hello, I am using open layers cluster startegy in my map application and i am using data from kml. Everything is working fine except the popups. If one popup is open and then i zoom, and if i try to close that, i am getting a javascript error layer is null. If somebody came across the issue... please help. Thanks, Joseph -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090819/fb64e661/attachment.html From kgeusebroek at xebia.com Thu Aug 20 01:31:13 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Pop is not closing while Zooming In-Reply-To: <3edecff80908191438o6b9b8c84g8a6ac51f05dc0a46@mail.gmail.com> References: <3edecff80908191438o6b9b8c84g8a6ac51f05dc0a46@mail.gmail.com> Message-ID: Hi, You probably lose the connection with the feature. Popup is registered with the feature and if the feature is not there anymore .... Best way is to register a function that closes the popup at layer unload Cheers Kris From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Ullas Joseph Sent: Wednesday, August 19, 2009 11:39 PM To: users@openlayers.org Subject: [OpenLayers-Users] Pop is not closing while Zooming Hello, I am using open layers cluster startegy in my map application and i am using data from kml. Everything is working fine except the popups. If one popup is open and then i zoom, and if i try to close that, i am getting a javascript error layer is null. If somebody came across the issue... please help. Thanks, Joseph -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090820/e5af486b/attachment.html From eric.lemoine at camptocamp.com Thu Aug 20 01:45:24 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] SPAM-LOW: Re: problem labeling vector features - vertices being labeled too In-Reply-To: <949BEF06885C42DF90B731541E1C7D0F@MIKETOSHIBA3> References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> <20090819145925.GR26464@metacarta.com> <20090819162437.GS26464@metacarta.com> <949BEF06885C42DF90B731541E1C7D0F@MIKETOSHIBA3> Message-ID: On Wednesday, August 19, 2009, Michael Anderson wrote: > Eric is correct. The modifyFeature control is using the select style. Setting the select style's label to an empty string does remove the label on the polygon feature being edited. But the vertices are still labeled. So it is still trying to label the vertices with an attribute value (from the default style?) and putting the empty string from the select style on the polygon. Right. This is because the modify feature control uses the "default" render intent for drawing the vertices (and the rotation and drag handles). > > Gives me an idea for a temporary hack though. I have a function that finds vertices. I can modify it to add the label attribute to the vertices and set them to empty strings. That should let me label the polygon while the vertices appear to not have labels. Should work as long as adding attributes to a vertex won't cause a problem I don't know about. How about using a context, with something like that in your style map: ? ?"default": new OpenLayers.Style({ ? ? ? ? ? ?label: "${label}", // other symbolizer properties here ? ? ? ?}, { ? ? ? ? ? ?context: { label: function(f) { if(f.geometry.CLASS_NAME != "OpenLayers.Geometry.Point") { return f.attributes.label; } else { return ""; } } } ? ?}) Cheers, > > Mike > > > ----- Original Message ----- From: "Christopher Schmidt" > To: "Eric Lemoine" > Cc: "Michael Anderson" ; > Sent: Wednesday, August 19, 2009 12:24 PM > Subject: SPAM-LOW: Re: [OpenLayers-Users] problem labeling vector features - vertices being labeled too > > > On Wed, Aug 19, 2009 at 06:20:57PM +0200, Eric Lemoine wrote: > > On Wednesday, August 19, 2009, Christopher Schmidt > wrote: >> On Wed, Aug 19, 2009 at 10:42:57AM -0400, Michael Anderson wrote: >>> In the real app I'd tried setting the select style's label to an empty >>> string, but it didn't work so I didn't include it in my example. I >> added >>> it to the example (http://128.118.7.3/testing/testlabel.html). It makes >>> the label for the polygon go away, but still labels the vertices with >>> 'undefined'. >> >> Sorry; I forgot that for the modifyFeature, the style name used is >> 'temporary'; > > is it? The modify feature control uses a select feature control, whose > default select style is "select" IIRC. > > > Okay, grep failed me. So then what is the user doing wrong? > > -- Chris > > > Regards, > > > >> I think that if you change 'select' to 'temporary' it might >> help. >> >> -- Chris >> >> >>> Mike >>> >>> ----- Original Message ----- From: "Christopher Schmidt" >>> >>> To: "Michael Anderson" >>> Cc: >>> Sent: Wednesday, August 19, 2009 10:06 AM >>> Subject: SPAM-LOW: Re: [OpenLayers-Users] problem labeling vector >>> features - vertices being labeled too >>> >>> >>> On Wed, Aug 19, 2009 at 09:56:12AM -0400, Michael Anderson wrote: >>>> Hello, >>>> >>>> I'm having a problem with labeling vector features. It works fine >>> until I >>>> select a feature with a ModifyFeature control. Then it labels all the >>>> vertices as well as the feature itself. And they are all labeled >>>> 'undefined' >>>> because the vertices don't have the attributes needed for the label. >>>> >>>> I have a stylemap set up with 'default' and 'select' styles. Only the >>>> default style has a label defined. At first I had a label set up for >>> the >>>> select style too so it would be labeled when selected. Then when the >>>> vertices were labeled I removed the label from the style, but the >>> vertices >>>> are still labeled. >>> >>> "The ?default? intent has a special role: if the extendDefault property >>> of the StyleMap is set to true (default), symbolizers calculated for >>> other render intents will extend the symbolizer calcualated for the >>> ?default? intent. So if we want selected features just to have a >>> different size or color, we only have to set a single property (in this >>> example: pointRadius)." >>> >>> -- http://docs.openlayers.org/library/feature_styling.html#stylemap >>> >>> So, if you have (in your select style) the 'label' set to '' -- an >> empty >>> string -- I think this should solve your problem. >>> >>> >>>> Is there a way to label a feature while it's vertices are visible and >>> not >>>> have the vertices labeled too? >>> >>> Vertices are features too, but I think the above solution should solve >>> your problem, based on your description. >>> >>> Regards, >>> -- >>> Christopher Schmidt >>> MetaCarta >>> >>> >>> >>> >> >> -- >> Christopher Schmidt >> MetaCarta >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > > > -- > Christopher Schmidt > MetaCarta > > > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Thu Aug 20 02:22:01 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] SPAM-LOW: Re: problem labeling vector features - vertices being labeled too In-Reply-To: References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> <20090819145925.GR26464@metacarta.com> <20090819162437.GS26464@metacarta.com> <949BEF06885C42DF90B731541E1C7D0F@MIKETOSHIBA3> Message-ID: On Thursday, August 20, 2009, Eric Lemoine wrote: > On Wednesday, August 19, 2009, Michael Anderson wrote: >> Eric is correct. The modifyFeature control is using the select style. Setting the select style's label to an empty string does remove the label on the polygon feature being edited. But the vertices are still labeled. So it is still trying to label the vertices with an attribute value (from the default style?) and putting the empty string from the select style on the polygon. > > Right. This is because the modify feature control uses the "default" > render intent for drawing the vertices (and the rotation and drag > handles). > > >> >> Gives me an idea for a temporary hack though. I have a function that finds vertices. I can modify it to add the label attribute to the vertices and set them to empty strings. That should let me label the polygon while the vertices appear to not have labels. Should work as long as adding attributes to a vertex won't cause a problem I don't know about. > > How about using a context, with something like that in your style map: > > ?? ?"default": new OpenLayers.Style({ > ?? ? ? ? ? ?label: "${label}", > ? ? ? ? ? ?// other symbolizer properties here > ?? ? ? ?}, { > ?? ? ? ? ? ?context: { > ? ? ? ? ? ? ? ? label: function(f) { > ? ? ? ? ? ? ? ? ? ? if(f.geometry.CLASS_NAME != > ? ? ? ? ? ? ? ? ? ? ? ?"OpenLayers.Geometry.Point") { > ? ? ? ? ? ? ? ? ? ? ? ? ?return f.attributes.label; > ? ? ? ? ? ? ? ? ? ? } else { > ? ? ? ? ? ? ? ? ? ? ? ? ?return ""; > ? ? ? ? ? ? ? ? ? ? } > ? ? ? ? ? ? ? ? } > ? ? ? ? ? ?} > ?? ?}) > even better: have the context function check if the label attribute exists: context: { label: function(f) { return f.attributes.label != undefined ? f.attributes.label : ""; } } From igrcic at gmail.com Thu Aug 20 03:38:20 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Get bounding box. In-Reply-To: <649139.40669.qm@web65611.mail.ac4.yahoo.com> References: <649139.40669.qm@web65611.mail.ac4.yahoo.com> Message-ID: Hi, thers getTileBounds function inside OpenLayers. Layer.Grid. could be usefull. cheers On Fri, Aug 14, 2009 at 2:08 PM, Mr. Rahul Teni wrote: > Dear List, > > I required following things to be implemented in OpenLayer. > > I want bounding box of tile of layer which is overlayed on google layers > and? is generated with tileCache. I will then create request to regenerate > tile. > > Does anybody have any pointers how to get bounding box of tile on which i > have clicked with mouse or any pointers to calculation. > > Your help is highly appreciated. > > Thanks, > Rahul G. Teni > MS BITS,BE Comp > 9822564489 > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From n.e.kendall at gmail.com Thu Aug 20 03:57:44 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Issues with display of overview map in Chrome. Message-ID: <33fd44f90908200057l79905f94n85163c191601c2a6@mail.gmail.com> Hi all, More rookie problems. I've added an overview map control and it displays, but it appears that only the top left corner of the overview map div appears in the bottom right corner. This issue only happens in chrome -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090820/8f7802d7/attachment.html From n.e.kendall at gmail.com Thu Aug 20 04:07:49 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] setting overview extents Message-ID: <33fd44f90908200107h616646b0sb053b55847beb961@mail.gmail.com> Hi all, I've added the default overview map and I'm getting some strange behavior. First, it only targets the first baselayer (i.e. when I switch between a NASA layer, and the Metacarta WMS it stays on the NASA layer. Also, it appears to be very zoomed in and pixelated (Landsatt 7 layer), whereas I'd like it so simply show the bounding box of the current map's extents. Does anyone know why 1) it's only targeting the top-most baselayer, and 2) how to set the overview map to display the bounds of the map? Thanks in advance! code for the map is below map = new OpenLayers.Map ("map", { controls:[ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.OverviewMap()], sphericalMercator: true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxResolution: 156543.0399, numZoomLevels: 19, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326") } ); -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090820/569730a2/attachment.html From n.e.kendall at gmail.com Thu Aug 20 04:31:14 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Correction: setting overview extents Message-ID: <33fd44f90908200131y5bb95ef6k6364d6ed41ff60a9@mail.gmail.com> Hi all, I've added the default overview map and I'm getting some strange behavior. First, it only targets the first baselayer (i.e. when I switch between a NASA layer, and the Metacarta WMS it stays on the NASA layer and does not change when the maps zooms in or out. Also, it appears to be very zoomed in and pixelated (Landsatt 7 layer), whereas I'd like it so simply show the bounding box of the current map's extents. Does anyone know why 1) it's only targeting the top-most baselayer, and 2) how to set the overview map to display the bounds of the map? Thanks in advance! code for the map is below map = new OpenLayers.Map ("map", { controls:[ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.OverviewMap()], sphericalMercator: true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxResolution: 156543.0399, numZoomLevels: 19, units: 'm', projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326") } ); -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090820/288a8676/attachment.html From ashley_c_mort at raytheon.com Thu Aug 20 07:47:35 2009 From: ashley_c_mort at raytheon.com (ashley_c_mort) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Google Layer example In-Reply-To: <20090818163345.GG26464@metacarta.com> Message-ID: <004001ca218c$02c1bdf0$22099195@us.ray.com> All, I found the answer to my original question and have another question. I attached sample code of how we obtained the Google Fusion Server layers. The Google map/fusion sever here has 3 layers: 1) ImageryMaps1 2) VectorMapsRaster1 3) VectorMapsRaster2 Looking at fusionmapobj.js on the server, the vector layers get added to the GFusionMap object but it looks like it's erroring out if I try to do a showInitialFusionLayers() call as I don't think it can find that method (which should reside in the .js on the Google server). Any ideas on how to get the our VectorMapsRaster to show up on our GFusionMap? The ImageryMaps1 layer shows up and the other 2 layers are in there but the showInitialFusionLayers method seems to die on this.addOverlay(...) (GFusionMap.showInitialFusionLayers resides in fusionmapobj.js on the Google server) SOLUTION TO ORIGINAL QUESTION - modify Layer/Google.js and put this code at the top of loadMapObject() [note that we seem to need to use GFusionMap instead of GMap2 to get anything to show up from our server] this.mapObject = new GFusionMap( this.div ); var layerz=this.mapObject.map_layers; for(var x=0;x Does anyone know how you can determine all the layers available on > a Google server? We are trying to hook up to a Google server but the > layers available are not known and are more numerous than the defaults > below. How can we determine all of the available layer names from a Google box? > Thanks! I'm assuming that you're using some kind of Fusion server; In my experiences with Fusion, I have not solved this problem. Your best bet may be to discuss this in a Fusion-specific forum, rather than OL, since OL doesn't provide that type of API to the Fusion data. -- Chris > > > map = new OpenLayers.Map('map'); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > > > var gphy = new OpenLayers.Layer.Google( > > "Google Physical", > > {type: G_PHYSICAL_MAP} > > ); > > var gmap = new OpenLayers.Layer.Google( > > "Google Streets", // the default > > {numZoomLevels: 20} > > ); > > var ghyb = new OpenLayers.Layer.Google( > > "Google Hybrid", > > {type: G_HYBRID_MAP, numZoomLevels: 20} > > ); > > var gsat = new OpenLayers.Layer.Google( > > "Google Satellite", > > {type: G_SATELLITE_MAP, numZoomLevels: 20} > > ); > > > > > > map.addLayers([gphy, gmap, ghyb, gsat]); > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta The following line is added for your protection and will be used for analysis if this message is reported as spam: (Raytheon Analysis: IP=208.80.142.18; e-from=crschmidt@metacarta.com; from=crschmidt@metacarta.com; date=Aug 18, 2009 4:34:23 PM; subject=Re: [OpenLayers-Users] Google Layer example) From igrcic at gmail.com Thu Aug 20 08:20:25 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Pop is not closing while Zooming In-Reply-To: References: <3edecff80908191438o6b9b8c84g8a6ac51f05dc0a46@mail.gmail.com> Message-ID: On Thu, Aug 20, 2009 at 7:31 AM, Kris Geusebroek wrote: > Hi, > > > > You probably lose the connection with the feature. Popup is registered with > the feature and if the feature is not there anymore ?. > Yes, popup is "connected" with feature, and if you are using some strategy that fetches new data as map is moved, new features are loaded. Unfortunately if there are features that are selected, they dont get unselected before removing them from the layer. (i might open a ticket for this) Best way is to close popup (or deselect feature if you registered popup close onUnselect callback) before loading new features. Something like: WFSlayer.events.register('loadstart', WFSlayer, function (evt){ if(selectedFeature && selectedFeature.popup){ map.removePopup(selectedFeature.popup); selectedFeature.popup.destroy(); selectedFeature.popup = null; } }); hope it helps, cheers > Best way is to register a function that closes the popup at layer unload > > > > Cheers Kris > > > > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On > Behalf Of Ullas Joseph > Sent: Wednesday, August 19, 2009 11:39 PM > To: users@openlayers.org > Subject: [OpenLayers-Users] Pop is not closing while Zooming > > > > Hello, > > > > I am using open layers cluster startegy in my map application and i am using > data from kml. > > Everything is working fine except the popups. > > > > If one popup is open and then i zoom, and if i try to close that, i am > getting a javascript error layer is null. > > If somebody came across the issue... please help. > > > > Thanks, > > Joseph > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From x.zam at gmx.net Thu Aug 20 08:32:56 2009 From: x.zam at gmx.net (Max Stephan) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] =?utf-8?q?_Transforming_from_Gau=C3=9F-Kr?= =?utf-8?q?=C3=BCger_to_UTM?= Message-ID: <1250771576874-3478735.post@n2.nabble.com> Hi everyone! I?m having problems with transforming my coordinates which are Gau?-Kr?ger/Zone 4 (Germany). In order to add them to my map they should be EPSG:4326 or EPSG:900913 (the google-EPSG). I tried to convert them wire the method offered by OpenLayers (myCoords.transform(presentEPSG,targetEPSG). As present EPSG I use EPSG:31486 (I guess that should be the right one) and as targetEPSG I use EPSG:900913. The code looks like this: markerCoord.transform(new OpenLayers.Projection("EPSG:31468"),new OpenLayers.Projection("EPSG:900913")); The input coordinates are for example 4426360 E 5489583 N, the output to EPSG:900913 should be something in the area of 1220000 E 6360000 N. But when I try transforming it the result is always exactly the same as the input was. Any ideas how to solve this problem? Greets and thx in advance Max Stephan -- View this message in context: http://n2.nabble.com/Transforming-from-Gau-Kruger-to-UTM-tp3478735p3478735.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jansen at terrestris.de Thu Aug 20 08:49:12 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] =?utf-8?q?Transforming_from_Gau=C3=9F-Kr=C3=BC?= =?utf-8?q?ger_to_UTM?= In-Reply-To: <1250771576874-3478735.post@n2.nabble.com> References: <1250771576874-3478735.post@n2.nabble.com> Message-ID: <4A8D4648.7000906@terrestris.de> Are the respective proj.js files loaded? -- marc Max Stephan schrieb: > Hi everyone! > > I?m having problems with transforming my coordinates which are > Gau?-Kr?ger/Zone 4 (Germany). In order to add them to my map they should be > EPSG:4326 or EPSG:900913 (the google-EPSG). I tried to convert them wire the > method offered by OpenLayers (myCoords.transform(presentEPSG,targetEPSG). As > present EPSG I use EPSG:31486 (I guess that should be the right one) and as > targetEPSG I use EPSG:900913. > > The code looks like this: > markerCoord.transform(new OpenLayers.Projection("EPSG:31468"),new > OpenLayers.Projection("EPSG:900913")); > > The input coordinates are for example 4426360 E 5489583 N, the output to > EPSG:900913 should be something in the area of 1220000 E 6360000 N. But when > I try transforming it the result is always exactly the same as the input > was. > > Any ideas how to solve this problem? > > Greets and thx in advance > Max Stephan > > From mike at spatialit.com Thu Aug 20 09:06:51 2009 From: mike at spatialit.com (Michael Anderson) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] SPAM-LOW: Re: problem labeling vector features - vertices being labeled too In-Reply-To: References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> <20090819145925.GR26464@metacarta.com> <20090819162437.GS26464@metacarta.com> <949BEF06885C42DF90B731541E1C7D0F@MIKETOSHIBA3> Message-ID: <5DEF607BD32248CAA734562F637B07E7@MIKETOSHIBA3> Thanks again Eric. Haven't used a context before, but it sounds like exactly what I need. I'll give it a try later today. Mike ----- Original Message ----- From: "Eric Lemoine" To: "Michael Anderson" Cc: Sent: Thursday, August 20, 2009 2:22 AM Subject: Re: [OpenLayers-Users] SPAM-LOW: Re: problem labeling vector features - vertices being labeled too On Thursday, August 20, 2009, Eric Lemoine wrote: > On Wednesday, August 19, 2009, Michael Anderson > wrote: >> Eric is correct. The modifyFeature control is using the select style. >> Setting the select style's label to an empty string does remove the label >> on the polygon feature being edited. But the vertices are still labeled. >> So it is still trying to label the vertices with an attribute value (from >> the default style?) and putting the empty string from the select style on >> the polygon. > > Right. This is because the modify feature control uses the "default" > render intent for drawing the vertices (and the rotation and drag > handles). > > >> >> Gives me an idea for a temporary hack though. I have a function that >> finds vertices. I can modify it to add the label attribute to the >> vertices and set them to empty strings. That should let me label the >> polygon while the vertices appear to not have labels. Should work as long >> as adding attributes to a vertex won't cause a problem I don't know >> about. > > How about using a context, with something like that in your style map: > > "default": new OpenLayers.Style({ > label: "${label}", > // other symbolizer properties here > }, { > context: { > label: function(f) { > if(f.geometry.CLASS_NAME != > "OpenLayers.Geometry.Point") { > return f.attributes.label; > } else { > return ""; > } > } > } > }) > even better: have the context function check if the label attribute exists: context: { label: function(f) { return f.attributes.label != undefined ? f.attributes.label : ""; } } From x.zam at gmx.net Thu Aug 20 09:10:10 2009 From: x.zam at gmx.net (Max Stephan) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] =?utf-8?q?Transforming_from_Gau=C3=9F-Kr=C3=BC?= =?utf-8?q?ger_to_UTM?= In-Reply-To: <4A8D4648.7000906@terrestris.de> References: <1250771576874-3478735.post@n2.nabble.com> <4A8D4648.7000906@terrestris.de> Message-ID: <1250773810357-3478919.post@n2.nabble.com> Hi Marc, thank you for the hint. I had already loaded the proj.js files via . I also have added the definition for EPSG:31468 in the proj4js-folder. The one thing I forgot is to change the folder to where those files are located. Now that I?ve done that it works. so, thx again Max Stephan Marc Jansen-2 wrote: > > Are the respective proj.js files loaded? > > -- marc > > Max Stephan schrieb: >> Hi everyone! >> >> I?m having problems with transforming my coordinates which are >> Gau?-Kr?ger/Zone 4 (Germany). In order to add them to my map they should >> be >> EPSG:4326 or EPSG:900913 (the google-EPSG). I tried to convert them wire >> the >> method offered by OpenLayers (myCoords.transform(presentEPSG,targetEPSG). >> As >> present EPSG I use EPSG:31486 (I guess that should be the right one) and >> as >> targetEPSG I use EPSG:900913. >> >> The code looks like this: >> markerCoord.transform(new OpenLayers.Projection("EPSG:31468"),new >> OpenLayers.Projection("EPSG:900913")); >> >> The input coordinates are for example 4426360 E 5489583 N, the output to >> EPSG:900913 should be something in the area of 1220000 E 6360000 N. But >> when >> I try transforming it the result is always exactly the same as the input >> was. >> >> Any ideas how to solve this problem? >> >> Greets and thx in advance >> Max Stephan >> >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Transforming-from-Gau-Kruger-to-UTM-tp3478735p3478919.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bthoen at gisnet.com Thu Aug 20 09:40:09 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Issues with display of overview map in Chrome. In-Reply-To: <33fd44f90908200057l79905f94n85163c191601c2a6@mail.gmail.com> References: <33fd44f90908200057l79905f94n85163c191601c2a6@mail.gmail.com> Message-ID: <4A8D5239.1050300@gisnet.com> Nicholas Efremov-Kendall wrote: > More rookie problems. I've added an overview map control and it > displays, but it appears that only the top left corner of the overview > map div appears in the bottom right corner. This issue only happens in > chrome I ran into this recently and fixed it by using cloned layers on the overview. It seemed that if I used a layer on the overview that I was also using in the map window, I would see only the NW quarter of the map in the overview window. But when I used this sort of construct: ov_layer1 = map_layer1.clone() to create layers for the overview, it worked perfectly. - Bill Thoen From maren.kiehl at gmx.de Thu Aug 20 10:15:48 2009 From: maren.kiehl at gmx.de (Maren Kiehl) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] help with popup-properties Message-ID: <4A8D5A94.1020604@gmx.de> Hi everyone, I have a problem with the popup in my map: When I click a point a popup with some informations is shown. The problem is that it isn't in the current map size so I have to pan to the right position to be able to read it. In the documentation I found a property named "keepInMap {boolean}" but I don't know how to use it. This is my popup-constructor: popup = new OpenLayers.Popup("info", feature.geometry.getBounds().getCenterLonLat(), new OpenLayers.Size(350,200), "test test test test", false, onPopupClose); feature.popup = popup; map.addPopup(popup); Could anybody help me with using this property? And another question: Which value do I have to use in the constructor for showing the popup at the right border of the map? At the moment the upper left corner of the popup is located in the center of the point which was clicked. Thanks for helping me. Bye, Maren ------------------- Maren Kiehl mail: maren.kiehl@gmx.de (student bachelor of science geoinformatics) From asseltine1 at hotmail.com Thu Aug 20 10:15:55 2009 From: asseltine1 at hotmail.com (kennyken) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Zoom to feature and highlight it In-Reply-To: References: <1250687909723-3472183.post@n2.nabble.com> Message-ID: <1250777755045-3479210.post@n2.nabble.com> I'm going to clarify my problem a little bit. What I'm trying to do is take a parameter from the user (parameter is used to uniquely identify a property on the map), find the location of that property, and center the map on it. I figured the easiest way to do this would be to give each property an X and Y feature (which I did using http://www.youtube.com/watch?v=tWfLoqNu3Bo this tutorial ). I query GeoServer, get the X and Y coordinates that go with that property, and then use the map.setCenter() function to zoom in on it. Unfortunately, this isn't working for me. The map ends up centering somewhere completely wrong. It seems to be almost random where the map ends up. I'm not sure, but I think it might have something to do with the projection. I have Google maps as my base layer (EPSG:900913), and i believe my shapefile is EPSG:4326. Also, once I get my map centering on the property, I would like to have it highlight the property as well. Not sure where to even start for that one, so any guidance would be appreciated. -- View this message in context: http://n2.nabble.com/Zoom-to-feature-and-highlight-it-tp3472183p3479210.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From asseltine1 at hotmail.com Thu Aug 20 10:15:55 2009 From: asseltine1 at hotmail.com (kennyken) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Zoom to feature and highlight it In-Reply-To: References: <1250687909723-3472183.post@n2.nabble.com> Message-ID: <1250777755264-3479223.post@n2.nabble.com> I'm going to clarify my problem a little bit. What I'm trying to do is take a parameter from the user (parameter is used to uniquely identify a property on the map), find the location of that property, and center the map on it. I figured the easiest way to do this would be to give each property an X and Y feature (which I did using http://www.youtube.com/watch?v=tWfLoqNu3Bo this tutorial ). I query GeoServer, get the X and Y coordinates that go with that property, and then use the map.setCenter() function to zoom in on it. Unfortunately, this isn't working for me. The map ends up centering somewhere completely wrong. It seems to be almost random where the map ends up. I'm not sure, but I think it might have something to do with the projection. I have Google maps as my base layer (EPSG:900913), and i believe my shapefile is EPSG:4326. Also, once I get my map centering on the property, I would like to have it highlight the property as well. Not sure where to even start for that one, so any guidance would be appreciated. -- View this message in context: http://n2.nabble.com/Zoom-to-feature-and-highlight-it-tp3472183p3479223.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From asseltine1 at hotmail.com Thu Aug 20 10:15:55 2009 From: asseltine1 at hotmail.com (kennyken) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Zoom to feature and highlight it In-Reply-To: References: <1250687909723-3472183.post@n2.nabble.com> Message-ID: <1250777755607-3479228.post@n2.nabble.com> I'm going to clarify my problem a little bit. What I'm trying to do is take a parameter from the user (parameter is used to uniquely identify a property on the map), find the location of that property, and center the map on it. I figured the easiest way to do this would be to give each property an X and Y feature (which I did using http://www.youtube.com/watch?v=tWfLoqNu3Bo this tutorial ). I query GeoServer, get the X and Y coordinates that go with that property, and then use the map.setCenter() function to zoom in on it. Unfortunately, this isn't working for me. The map ends up centering somewhere completely wrong. It seems to be almost random where the map ends up. I'm not sure, but I think it might have something to do with the projection. I have Google maps as my base layer (EPSG:900913), and i believe my shapefile is EPSG:4326. Also, once I get my map centering on the property, I would like to have it highlight the property as well. Not sure where to even start for that one, so any guidance would be appreciated. -- View this message in context: http://n2.nabble.com/Zoom-to-feature-and-highlight-it-tp3472183p3479228.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From xiaying4415139 at 163.com Thu Aug 20 10:45:26 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Animate effect like Virtual Earth? In-Reply-To: <1250670291588-3471030.post@n2.nabble.com> References: <1250236376983-3443597.post@n2.nabble.com> <1250661894717-3470578.post@n2.nabble.com> <1250670291588-3471030.post@n2.nabble.com> Message-ID: <1250779526607-3479520.post@n2.nabble.com> Oh, when you get it work, please send me the solution, thank you. I done much effects but get nothing %-| tommy408 wrote: > > Hiya shane. I'm dying to know too. At the end of my project I'll spend > huge amount of time to get it to work if no one else know. > > > > shane_china wrote: >> >> up to the top by myself and want to be answered if anyone knows, thanks. >> >> >> shane_china wrote: >>> >>> When I saw this Virtual Earth Example >>> http://openlayers.org/dev/examples/ve-novibrate.html >>> http://openlayers.org/dev/examples/ve-novibrate.html , Its zoom effect >>> shocked me. I notice that there are two lines in the source code >>> panMethod: OpenLayers.Easing.Linear.easeOut, >>> panDuration: 10 >>> I added them to my own map with WMS layer but it doesn't work. Is there >>> some method can make WMS layer has the same animate zoom effect like >>> Virtual Earth? I already know transitionEffect: 'resize', but I think it >>> is not as fantastic as Virtual Earth. >>> >>> Thanks >>> >>> >> >> > > -- View this message in context: http://n2.nabble.com/Animate-effect-like-Virtual-Earth-tp3443597p3479520.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mike at spatialit.com Thu Aug 20 10:53:58 2009 From: mike at spatialit.com (Michael Anderson) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem labeling vector features - vertices being labeled too In-Reply-To: References: <989717FFED3743FDB34EDCC483626570@MIKETOSHIBA3> <20090819140612.GQ26464@metacarta.com> <414AA7009DA5440FB5848B8421C7BFAC@MIKETOSHIBA3> <20090819145925.GR26464@metacarta.com> <20090819162437.GS26464@metacarta.com> <949BEF06885C42DF90B731541E1C7D0F@MIKETOSHIBA3> Message-ID: Using a context is working great. And understanding them will be very useful in the future to control any aspect of a style. Thanks for pointing me the the right direction. Mike ----- Original Message ----- From: "Eric Lemoine" To: "Michael Anderson" Cc: Sent: Thursday, August 20, 2009 2:22 AM Subject: Re: [OpenLayers-Users] SPAM-LOW: Re: problem labeling vector features - vertices being labeled too On Thursday, August 20, 2009, Eric Lemoine wrote: > On Wednesday, August 19, 2009, Michael Anderson > wrote: >> Eric is correct. The modifyFeature control is using the select style. >> Setting the select style's label to an empty string does remove the label >> on the polygon feature being edited. But the vertices are still labeled. >> So it is still trying to label the vertices with an attribute value (from >> the default style?) and putting the empty string from the select style on >> the polygon. > > Right. This is because the modify feature control uses the "default" > render intent for drawing the vertices (and the rotation and drag > handles). > > >> >> Gives me an idea for a temporary hack though. I have a function that >> finds vertices. I can modify it to add the label attribute to the >> vertices and set them to empty strings. That should let me label the >> polygon while the vertices appear to not have labels. Should work as long >> as adding attributes to a vertex won't cause a problem I don't know >> about. > > How about using a context, with something like that in your style map: > > "default": new OpenLayers.Style({ > label: "${label}", > // other symbolizer properties here > }, { > context: { > label: function(f) { > if(f.geometry.CLASS_NAME != > "OpenLayers.Geometry.Point") { > return f.attributes.label; > } else { > return ""; > } > } > } > }) > even better: have the context function check if the label attribute exists: context: { label: function(f) { return f.attributes.label != undefined ? f.attributes.label : ""; } } From arevaco90 at yahoo.es Thu Aug 20 16:29:05 2009 From: arevaco90 at yahoo.es (=?UTF-8?Q?Juan_Ar=C3=A9valo?=) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] Adding new features: WFS-T PostGIS In-Reply-To: <1250710420618-3474825.post@n2.nabble.com> References: <1250710420618-3474825.post@n2.nabble.com> Message-ID: <1250800145704-3481528.post@n2.nabble.com> Hi all, In case that someone is stuck with the same problem that I had I attached the code that works for me. By the way, Can anyone point me to some examples using a web form to enter and modify attributes store in a PostGIS DB via WFS-T? Thanks for your help! //WFS Layer wfs3 = new OpenLayers.Layer.WFS( "Same Water Points", "http://localhost:8080/geoserver/wfs", {typename: 'cite:water_points'}, { typename: "water_points", featureNS: "http://www.opengeospatial.net/cite", extractAttributes: false, commitReport: function(str) { OpenLayers.Console.log(str); } } ); var saveStrategy = new OpenLayers.Strategy.Save({ callback: function() { alert('feature saved'); } }); map.addLayers([wfs3]); //BUTTONS: var panel = new OpenLayers.Control.Panel({ displayClass: "olControlEditingToolbar" }); var draw = new OpenLayers.Control.DrawFeature( wfs3, OpenLayers.Handler.Point, { handlerOptions: {freehand: false, multi: true}, displayClass: "olControlDrawFeaturePoint" } ); var modify = new OpenLayers.Control.ModifyFeature(wfs3, { title: "Modify Feature", displayClass: "olControlModifyFeature" }); var del = new DeleteFeature(wfs3, {title: "Delete Feature"}); var save = new OpenLayers.Control.Button({ trigger: OpenLayers.Function.bind(wfs3.commit, wfs3), displayClass: "olControlEditingToolbar", title: "Guardar" }); panel.addControls([ new OpenLayers.Control.Navigation(), save, del, modify, draw ]); map.addControl(panel); Juan Ar?valo wrote: > > Hi All, > I am trying to set up a WFS-T using Geoserver 1.7.6 and PostGres 8.4. I > have tried with the following code in order to insert new features: > > > > //WFS LAYER: > > wfs = new OpenLayers.Layer.WFS( > > "Cities", > "http://localhost:8080/geoserver/wfs", > {typename: 'cite:ciudades'}, > {featureNS: 'http://www.opengeospatial.net/cite', > srsName: 'EPSG:4326', > version: "1.0.0", > > //schema: > "http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=ciudades&outputformat=text/xml;%20subtype=gml/3.1.1", > //schema: > "http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=cite:ciudades", > schema: > "http://127.0.0.1:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=cite:ciudades", > extractAttributes: true}); > wfs.style = OpenLayers.Util.applyDefaults({strokeColor: "#0000ff"}, > > OpenLayers.Feature.Vector.style["default"]); > > //SAVE BUTTON: > > var save = new OpenLayers.Control.Button({ > trigger: OpenLayers.Function.bind(wfs.commit, wfs), > displayClass: "olControlSaveFeatures" > }); > > > > When I click the save button I got this error: > > > > WFS Transaction: FAILED > > > version="1.2.0" > > xmlns="http://www.opengis.net/ogc" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"> > > > > Feature type 'featureMember' is not available: > > > > > > The geoserver log is as follow: > > > > 2009-08-19 20:57:35,500 ERROR [geoserver.ows] - > org.geoserver.wfs.WFSTransactionException: Feature type 'featureMember' is > not available: > at org.geoserver.wfs.Transaction.execute(Transaction.java:222) > at org.geoserver.wfs.Transaction.transaction(Transaction.java:108) > at > org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:182) > (...) > > > > Does anyone have any idea on how to solve this issue? > > It would be great if you can provide me with some working examples.. > > Thanks:)- > > Juan > -- View this message in context: http://n2.nabble.com/Adding-new-features-WFS-T-PostGIS-tp3474825p3481528.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From maren.kiehl at gmx.de Thu Aug 20 17:11:23 2009 From: maren.kiehl at gmx.de (Maren Kiehl) Date: Wed Sep 1 17:17:46 2010 Subject: [OpenLayers-Users] problem with lightbox in openlayers Message-ID: <4A8DBBFB.4040601@gmx.de> Hi at all, I wrote an application in openlayers which shows popups whenever you click a point of my wfs in the map. Now I want that a thumbnail is in this popup and when you click it the picture will be shown in the original size in a lightbox. The thumbnail and the link to the picture are working perfectly but the browser doesn't show it in the lightbox but in a simple new browser-window. But why? I tried the lightbox in a simple html-file and there it works without a problem. Does openlayers disable it? Here is my code: MAP NAME UK1 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END SIZE 1600 1200 IMAGECOLOR 153 204 255 IMAGETYPE JPEG SHAPEPATH "http://localhost/openlayers/data/" #QGIS #EXTENT -837824 -111116 1677552 1232884 #Port Talbot #EXTENT 272000 187000 278000 193000 #UK EXTENT 0 0 660046 1229782 UNITS METERS WEB TEMPLATE "http://localhost/openlayers/examples/uktest.html" LOG "\ms4w\tmp\ms_tmp\log.txt" IMAGEPATH "\ms4w\tmp\ms_tmp\" IMAGEURL "/ms_tmp/" METADATA 'wms_title' "map" 'wms_onlineresource' "http://127.0.0.1./cgi-bin/mapserv?map=uk2.map " END END LAYER NAME "UK" METADATA 'wms_title' "wms_demo" END STATUS DEFAULT TYPE raster TILEINDEX "map" TILEITEM "Location" PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END CLASS STYLE COLOR 0 0 0 END LABEL COLOR 0 0 0 SIZE SMALL END END END LAYER NAME "250" METADATA 'wms_title' "wms_demo" END STATUS DEFAULT TYPE raster TILEINDEX "250K" TILEITEM "Location" PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END CLASS STYLE COLOR 0 0 0 END LABEL COLOR 0 0 0 SIZE SMALL END END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090824/19f020d9/attachment.html From adube at mapgears.com Mon Aug 24 10:05:05 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] zoom to different WMS layers In-Reply-To: References: Message-ID: <4A929E11.40203@mapgears.com> You're not using the setCenter method properly. See its documentation : http://dev.openlayers.org/releases/OpenLayers-2.5/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.setCenter I noticed you use OpenLayers 2.5. Just keep in mind that it's an old version and that some cool new functionalities are added with new releases. Current version is 2.8. Regards, Alexandre Paul Curran wrote: > > Hi, > > > > I wish to have a map of the UK with different layers being displayed > depending on how close I am zoomed into the map. > > > > Currently I can view a map of the UK which displays fine via > OpenLayers. However I can only view the first layer of my map ( a > 1:50000 scaled image of the UK). I wish to zoom in to the next layer > of the UK (a 1:250 000 scaled image of the UK) > > > > Is this possible with Openlayers? > > > > Any help greatly appreciated > > > > My code is below > > > > Cheers > > > > > > > > MAP > > > > NAME UK1 > > PROJECTION > > 'proj=longlat' > > 'ellps=WGS84' > > 'datum=WGS84' > > 'no_defs' > > '' > > END > > SIZE 1600 1200 > > IMAGECOLOR 153 204 255 > > IMAGETYPE JPEG > > SHAPEPATH "http://localhost/openlayers/data/" > > #QGIS > > #EXTENT -837824 -111116 1677552 1232884 > > #Port Talbot > > #EXTENT 272000 187000 278000 193000 > > #UK > > EXTENT 0 0 660046 1229782 > > UNITS METERS > > > > > > WEB > > TEMPLATE "http://localhost/openlayers/examples/uktest.html" > > LOG "\ms4w\tmp\ms_tmp\log.txt" > > IMAGEPATH "\ms4w\tmp\ms_tmp\" > > IMAGEURL "/ms_tmp/" > > METADATA > > 'wms_title' "map" > > 'wms_onlineresource' > "http://127.0.0.1./cgi-bin/mapserv?map=uk2.map" > > END > > > > END > > > > LAYER > > > > NAME "UK" > > METADATA > > 'wms_title' "wms_demo" > > END > > STATUS DEFAULT > > TYPE raster > > TILEINDEX "map" > > TILEITEM "Location" > > PROJECTION > > 'proj=longlat' > > 'ellps=WGS84' > > 'datum=WGS84' > > 'no_defs' > > '' > > END > > CLASS > > STYLE > > COLOR 0 0 0 > > END > > LABEL > > COLOR 0 0 0 > > SIZE SMALL > > END > > > > END > > > > > > END > > > > LAYER > > > > NAME "250" > > METADATA > > 'wms_title' "wms_demo" > > END > > STATUS DEFAULT > > TYPE raster > > TILEINDEX "250K" > > TILEITEM "Location" > > PROJECTION > > 'proj=longlat' > > 'ellps=WGS84' > > 'datum=WGS84' > > 'no_defs' > > '' > > END > > CLASS > > STYLE > > COLOR 0 0 0 > > END > > LABEL > > COLOR 0 0 0 > > SIZE SMALL > > END > > > > END > > > > > > END > > > > > > > > END > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From jim.pxie at gmail.com Mon Aug 24 10:45:22 2009 From: jim.pxie at gmail.com (www.gwtorm.com) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] rewrite 00-map-with-wms.html in GWT and org.gwtopenmaps.openlayers library Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090824/bf845374/00-map-with-wms.html -------------- next part -------------- A non-text attachment was scrubbed... Name: SpatialDbTips.java Type: application/octet-stream Size: 9545 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090824/bf845374/SpatialDbTips.obj From jimmy.aumard at gmail.com Mon Aug 24 11:21:55 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] How to make a drag and drop for markers? In-Reply-To: <4A928365.8060201@mapgears.com> References: <4A8EB40F.7040005@mapgears.com> <4A928365.8060201@mapgears.com> Message-ID: Thanks it's perfect for my application!!! I just have to develop that :s I have one question : It's possible to put an offset to the external graphic? Because images of markers (marker.png) are centered on the center of the image's marker and not on the bottom of the image's marker I'm not sure I'm clear but it's difficult to explain this in English for my... Sorry Cheers Jim 2009/8/24 Alexandre Dube > Jimmy Aumard wrote: > >> Hello, thanks for answers, >> >> My probl?me is I use markers and I put/update attributes on each in my >> database. I don't know how put or update attributes with vector layer (if >> you have an example I take it :D). >> > > You need a server that supports transactions : > > - GeoServer > - TinyOWS > see the example : > http://openlayers.org/dev/examples/wfs-protocol-transactions.html > > - FeatureServer (uses MapFish protocol) > see a demo : http://dev4.mapgears.com/bdga-fs/ > > The FS demo also shows a way to edit feature's attributes. > > I use vector layer for polygon with DragFeature. I know this solution but >> points representation is a point an I use icon, It's possible to put an icon >> to a point with a vector layer? >> > > Yes. Look at the following example and search the source for the > externalGraphic property. > http://openlayers.org/dev/examples/styles-unique.html > > Regards, > > Alexandre > > >> Sorry for my english :s >> >> Cheers >> >> Jim >> >> >> 2009/8/24 Eric Lemoine > eric.lemoine@camptocamp.com>> >> >> On Friday, August 21, 2009, Alexandre Dube > > wrote: >> > Hi, >> > >> > One way to accomplish this is to use a Vector layer instead of a >> > Marker layer and use a ModifyFeature control do move your points >> > (markers) around. >> >> The DragFeature control may be of interest as well. >> >> >> >> >> -- >> Eric Lemoine >> >> Camptocamp France SAS >> Savoie Technolac, BP 352 >> 73377 Le Bourget du Lac, Cedex >> >> Tel : 00 33 4 79 44 44 96 >> Mail : eric.lemoine@camptocamp.com >> >> http://www.camptocamp.com >> >> >> > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090824/d5c117cc/attachment.html From adube at mapgears.com Mon Aug 24 11:44:16 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] How to make a drag and drop for markers? In-Reply-To: References: <4A8EB40F.7040005@mapgears.com> <4A928365.8060201@mapgears.com> Message-ID: <4A92B550.2080501@mapgears.com> Hi, Jimmy Aumard wrote: > Thanks it's perfect for my application!!! > > I just have to develop that :s > > I have one question : It's possible to put an offset to the external > graphic? Because images of markers (marker.png) are centered on the > center of the image's marker and not on the bottom of the image's marker > check in lib/OpenLayers/Feature/Vector.js at the end. All properties are there, so check the following to do what you need : * graphicXOffset - {Number} Pixel offset along the positive x axis for displacing an external graphic. * graphicYOffset - {Number} Pixel offset along the positive y axis for displacing an external graphic. Never tried this, but I definitively will soon. Best regards, Alexandre > I'm not sure I'm clear but it's difficult to explain this in English > for my... Sorry > > > Cheers > > Jim > > 2009/8/24 Alexandre Dube > > > Jimmy Aumard wrote: > > Hello, thanks for answers, > > My probl?me is I use markers and I put/update attributes on > each in my database. I don't know how put or update attributes > with vector layer (if you have an example I take it :D). > > > You need a server that supports transactions : > > - GeoServer > - TinyOWS > see the example : > http://openlayers.org/dev/examples/wfs-protocol-transactions.html > > - FeatureServer (uses MapFish protocol) > see a demo : http://dev4.mapgears.com/bdga-fs/ > > The FS demo also shows a way to edit feature's attributes. > > > I use vector layer for polygon with DragFeature. I know this > solution but points representation is a point an I use icon, > It's possible to put an icon to a point with a vector layer? > > > Yes. Look at the following example and search the source for the > externalGraphic property. > http://openlayers.org/dev/examples/styles-unique.html > > Regards, > > Alexandre > > > Sorry for my english :s > > Cheers > > Jim > > > 2009/8/24 Eric Lemoine > >> > > > On Friday, August 21, 2009, Alexandre Dube > > >> wrote: > > Hi, > > > > One way to accomplish this is to use a Vector layer > instead of a > > Marker layer and use a ModifyFeature control do move your > points > > (markers) around. > > The DragFeature control may be of interest as well. > > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > > > > http://www.camptocamp.com > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -- Alexandre Dub? Mapgears www.mapgears.com From jimmy.aumard at gmail.com Mon Aug 24 12:15:06 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] How to make a drag and drop for markers? In-Reply-To: <4A92B550.2080501@mapgears.com> References: <4A8EB40F.7040005@mapgears.com> <4A928365.8060201@mapgears.com> <4A92B550.2080501@mapgears.com> Message-ID: Thanks for this informations!! It's work correctly with: graphicWidth: 20, graphicHeight: 34, graphicXOffset: -10, graphicYOffset: -34, externalGraphic: "../../images/marker.png" Cheers Jim 2009/8/24 Alexandre Dube > Hi, > > Jimmy Aumard wrote: > >> Thanks it's perfect for my application!!! >> >> I just have to develop that :s >> >> I have one question : It's possible to put an offset to the external >> graphic? Because images of markers (marker.png) are centered on the center >> of the image's marker and not on the bottom of the image's marker >> >> > check in lib/OpenLayers/Feature/Vector.js at the end. All properties are > there, so check the following to do what you need : > > * graphicXOffset - {Number} Pixel offset along the positive x axis for > displacing an external graphic. > * graphicYOffset - {Number} Pixel offset along the positive y axis for > displacing an external graphic. > > Never tried this, but I definitively will soon. > > Best regards, > > Alexandre > > I'm not sure I'm clear but it's difficult to explain this in English for >> my... Sorry >> >> >> Cheers >> >> Jim >> >> 2009/8/24 Alexandre Dube > >> >> >> Jimmy Aumard wrote: >> >> Hello, thanks for answers, >> >> My probl?me is I use markers and I put/update attributes on >> each in my database. I don't know how put or update attributes >> with vector layer (if you have an example I take it :D). >> >> >> You need a server that supports transactions : >> >> - GeoServer >> - TinyOWS >> see the example : >> http://openlayers.org/dev/examples/wfs-protocol-transactions.html >> >> - FeatureServer (uses MapFish protocol) >> see a demo : http://dev4.mapgears.com/bdga-fs/ >> >> The FS demo also shows a way to edit feature's attributes. >> >> >> I use vector layer for polygon with DragFeature. I know this >> solution but points representation is a point an I use icon, >> It's possible to put an icon to a point with a vector layer? >> >> >> Yes. Look at the following example and search the source for the >> externalGraphic property. >> http://openlayers.org/dev/examples/styles-unique.html >> >> Regards, >> >> Alexandre >> >> >> Sorry for my english :s >> >> Cheers >> >> Jim >> >> >> 2009/8/24 Eric Lemoine > >> > >> >> >> >> On Friday, August 21, 2009, Alexandre Dube >> >> >> wrote: >> > Hi, >> > >> > One way to accomplish this is to use a Vector layer >> instead of a >> > Marker layer and use a ModifyFeature control do move your >> points >> > (markers) around. >> >> The DragFeature control may be of interest as well. >> >> >> >> >> -- >> Eric Lemoine >> >> Camptocamp France SAS >> Savoie Technolac, BP 352 >> 73377 Le Bourget du Lac, Cedex >> >> Tel : 00 33 4 79 44 44 96 >> Mail : eric.lemoine@camptocamp.com >> >> > > >> http://www.camptocamp.com >> >> >> >> >> -- Alexandre Dub? >> Mapgears >> www.mapgears.com >> >> >> > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090824/1edc95fb/attachment.html From bartvde at osgis.nl Mon Aug 24 14:51:07 2009 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] Problem with a WFS request In-Reply-To: <4A924A93.9020005@gmail.com> References: <4A8E6471.6000606@gmail.com> <38969.145.50.39.11.1250847317.squirrel@webmail.hostingdiscounter.nl> <4A8E7CFF.6030805@gmail.com> <3450.145.50.39.11.1250852715.squirrel@webmail.hostingdiscounter.nl> <4A8E9E00.4000601@gmail.com> <23721.145.50.39.11.1250860727.squirrel@webmail.hostingdiscounter.nl> <4A8EA5EE.2030206@gmail.com> <60817.145.50.39.11.1250862848.squirrel@webmail.hostingdiscounter.nl> <4A8EAF99.1010008@gmail.com> <33279.145.50.39.11.1250865366.squirrel@webmail.hostingdiscounter.nl> <4A924A93.9020005@gmail.com> Message-ID: <4A92E11B.8020601@osgis.nl> 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 > > bartvde@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:8888/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 >>> >>> bartvde@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 bartvde@osgis.nl http://www.osgis.nl From eric.lemoine at camptocamp.com Mon Aug 24 15:14:35 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] Overriding map style causing major drift In-Reply-To: <614bc2680908211405y75322214of0392229a7613772@mail.gmail.com> References: <614bc2680908210658p48b86c36x310fce3b126addb4@mail.gmail.com> <614bc2680908210953h33635612x36639d3bdc95af57@mail.gmail.com> <614bc2680908211405y75322214of0392229a7613772@mail.gmail.com> Message-ID: On Fri, Aug 21, 2009 at 11:05 PM, Christopher Dale wrote: > Hey everyone, > > I'm running into another problem with this way of setting the vector > layer's style. It looks like the editing handles are inheriting the > styles from the vector layer as well, which makes for some nasty > looking handles. > > Anyone know of a way to directly target the vector features themselves > when setting the styles or else tell the editing toolbar layer not to > inherit the styles from the default style? > > Here's an example of what I'm getting > > http://yfrog.com/74openlayers4g I can't think of an easy way to achieve what you. I think we'd need to extend the modify feature control to make the render intent of the vertices configurable. In the mean time you can take a look at the attached patch to the modify-feature.html example. This is a kinda complex, but it works. Hope this helps, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com -------------- next part -------------- A non-text attachment was scrubbed... Name: modify-feature-example.patch Type: text/x-patch Size: 2522 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090824/1983636d/modify-feature-example.bin From arevaco90 at yahoo.es Mon Aug 24 18:41:18 2009 From: arevaco90 at yahoo.es (=?UTF-8?Q?Juan_Ar=C3=A9valo?=) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] Error-when-using-XMLHTTPRequest Message-ID: <1251153678596-3506570.post@n2.nabble.com> Hi all! All my WFS-T examples were working perfectly till today! However I am now getting an error when I try to modify my features and I cannot figure out where the problem is coming from. Here is the error: Error: uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: http://127.0.0.1:8080/client/mfbase/openlayers/lib/OpenLayers/Request/XMLHttpRequest.js :: anonymous :: line 200" data: no] I?ve read this post in the forum regarding this problem: http://n2.nabble.com/Error-when-using-XMLHTTPRequest-through-refreshing-a-wfs-layer-every-n-seconds-td2721982.html#a2740217 But to me it is not clear what needs to be done in order to solve this issue! My application was nearly finished so any help will be much appreciated! Thank you! Juan Ar?valo -- View this message in context: http://n2.nabble.com/Error-when-using-XMLHTTPRequest-tp3506570p3506570.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From invite+kjdmuikpi55_ at facebookmail.com Tue Aug 25 01:20:44 2009 From: invite+kjdmuikpi55_ at facebookmail.com (=?UTF-8?B?SsOhY2h5bSDEjGVwaWNrw70=?=) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] =?utf-8?q?Pod=C3=ADvejte_se_na_m=C5=AFj_Facebo?= =?utf-8?q?ok_profil?= Message-ID: <79c86c6d381740e8b3c65c755e392152@localhost.localdomain> Ahoj users@openlayers.org, Z??dil(a) jsem si Facebook profil, kde m??u zve?ejnit svoje fotky, videa a ud?losti, a chci si v?s p?idat mezi sv? p??tele, abyste se taky mohli pod?vat. Nejprve se ale mus?te p?idat k Facebooku. Jakmile se p?id?te, m??ete si tak? vytvo?it vlastn? profil. D?ky, J?chym K registraci do Facebooku n?sledujte tento odkaz: http://www.facebook.com/p.php?i=100000181984565&k=Z4G2ZYPY4X61UCD1QB65QVVRWPGD&r J?chym ?epick? pozval(a) users@openlayers.org na Facebook. Pokud ji? nechcete dost?vat tento typ emailu od Facebooku, pou?ijte n??e uveden? odkaz pro zru?en? zas?l?n?. http://www.facebook.com/o.php?k=04230b&u=100000202714547&mid=fd71daG5af31c8f6db3G0G8 Kancel??e Facebooku jsou um?st?ny v 1601 S. California Ave., Palo Alto, CA 94304. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090824/bf5bf05b/attachment.html From kgeusebroek at xebia.com Tue Aug 25 02:26:22 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] Error-when-using-XMLHTTPRequest In-Reply-To: <1251153678596-3506570.post@n2.nabble.com> References: <1251153678596-3506570.post@n2.nabble.com> Message-ID: Hi Juan, A few months ago i posted this solution to the list: http://n2.nabble.com/Re-OpenLayers-Users-Error-when-using-XMLHTTPRequest-throughrefreshing-a-wfs-layer-every-n-seconds-td2732129.html Also attach? the original email to this message. Hope this is of help to you Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Juan Ar?valo Sent: Tuesday, August 25, 2009 12:41 AM To: users@openlayers.org Subject: [OpenLayers-Users] Error-when-using-XMLHTTPRequest Hi all! All my WFS-T examples were working perfectly till today! However I am now getting an error when I try to modify my features and I cannot figure out where the problem is coming from. Here is the error: Error: uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: http://127.0.0.1:8080/client/mfbase/openlayers/lib/OpenLayers/Request/XMLHttpRequest.js :: anonymous :: line 200" data: no] I?ve read this post in the forum regarding this problem: http://n2.nabble.com/Error-when-using-XMLHTTPRequest-through-refreshing-a-wfs-layer-every-n-seconds-td2721982.html#a2740217 But to me it is not clear what needs to be done in order to solve this issue! My application was nearly finished so any help will be much appreciated! Thank you! Juan Ar?valo -- View this message in context: http://n2.nabble.com/Error-when-using-XMLHTTPRequest-tp3506570p3506570.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An embedded message was scrubbed... From: "Kris Geusebroek" Subject: Re: [OpenLayers-Dev] [OpenLayers-Users] Error when usingXMLHTTPRequest (throughrefreshing a wfs layer every n seconds) Date: Tue, 28 Apr 2009 10:20:10 +0200 Size: 34352 Url: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/a92fd3b4/attachment.mht From helensona at gmail.com Tue Aug 25 05:26:36 2009 From: helensona at gmail.com (Helen Sona) Date: Wed Sep 1 17:17:47 2010 Subject: [OpenLayers-Users] let me the know the insatallion on my system Message-ID: <10e8a2380908250226w1288377drae238996ea63f527@mail.gmail.com> Dear sirs, I dont know even install the entire software package.please kindly guide me to install on my system. so Iam requesting you to please let me have the installation brochure first. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/e4079972/attachment.html From jimmy.aumard at gmail.com Tue Aug 25 06:15:43 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Strategy.save() callback? Message-ID: Hi list, I want to know if Strategy.save() have a callback if the request is good or bad? Thanks Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/e31f5025/attachment.html From jimmy.aumard at gmail.com Tue Aug 25 06:23:47 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Problem WFS-T add new geometry (point) In-Reply-To: References: Message-ID: Hi list, I try to use WFS-T to add a new point on my layer, I use Openlayers, geoserver 1.7.6 and Postgis. This is my request: 757185 .20208755 5403792.1508966 This is the response: {http://www.openplans.org/topp}franchises is read-only Thanks for help. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/10bf4f13/attachment.html From kgeusebroek at xebia.com Tue Aug 25 06:55:04 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Strategy.save() callback? In-Reply-To: References: Message-ID: Hi Jimmy, You could use the onCommit function of the strategy to call your function var saveOptions = { onCommit: function(response) { if (response.success()) { var features=response.reqFeatures; // rest of the code originally in save strategy callYourOwnfunction(); } } }; Cheers kris From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Jimmy Aumard Sent: Tuesday, August 25, 2009 12:16 PM To: users@openlayers.org Subject: [OpenLayers-Users] Strategy.save() callback? Hi list, I want to know if Strategy.save() have a callback if the request is good or bad? Thanks Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/bb4192be/attachment.html From jimmy.aumard at gmail.com Tue Aug 25 07:09:56 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Strategy.save() callback? In-Reply-To: References: Message-ID: Thanks Kris it's work perfectly!! Jim 2009/8/25 Kris Geusebroek > Hi Jimmy, > > > > You could use the onCommit function of the strategy to call your function > > > > *var* saveOptions = { > > onCommit: *function*(response) { > > *if* (response.success()) { > > *var* features=response.reqFeatures; > > // rest of the code originally in save strategy > > callYourOwnfunction(); > > } > > } > > }; > > > > Cheers kris > > > > > > *From:* users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > *On Behalf Of *Jimmy Aumard > *Sent:* Tuesday, August 25, 2009 12:16 PM > *To:* users@openlayers.org > *Subject:* [OpenLayers-Users] Strategy.save() callback? > > > > Hi list, > > I want to know if Strategy.save() have a callback if the request is good or > bad? > > Thanks > > Jim > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/60f447e1/attachment.html From eoinyp at yahoo.com Tue Aug 25 08:04:58 2009 From: eoinyp at yahoo.com (eoinyp) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] map bounds or projection problem? Message-ID: <1251201898931-3509317.post@n2.nabble.com> Hi list, I am just getting started with openlayers and geoserver. I have two simple wms layers being served by geoserver: a layer of US states, and a layer of town boundaries in Massachusetts. Each of the layers display fine on their own. Showing the full extent of the mapped area. When I put them both together however, only a section of the States layer is shown, while the full Mass layer is shown. It is not possible to pan and see the rest of the States layer. I am not entirely sure what the problem is, so im not sure how to fix it! The map with the states and the Mass towns layers here: http://www.eoinmaca.com/maps/OpenLayers/mymap3.htm I think it is a problem with the extent of the bounds of the layers defined. What should it be set to? currently it is: var bounds = new OpenLayers.Bounds( 19012.0201171875, 768402.5875, 345695.3353515625, 968859.1625); The layers have different EPSGs - is this a problem? The problem is compounded when I add in a googleEarth baselayer. It shows the full extent of the google layer, but when I zoom in I cant pan to the Mass area. The pan functionality seems to be constrained to a small area. The map with the google base layer is available here: http://www.eoinmaca.com/maps/OpenLayers/mymap2.htm If the bounds is the problem, is there a simple way of figuring out what the bounds of my map need to be? Many thanks, Eoinyp -- View this message in context: http://n2.nabble.com/map-bounds-or-projection-problem-tp3509317p3509317.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.freyre at hispeed.ch Tue Aug 25 08:53:30 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Problem WFS-T add new geometry (point) In-Reply-To: References: Message-ID: <1251204810481-3509533.post@n2.nabble.com> Hi Jimmy, Can you show us your code? Personnally, I use WFS-T like that : var saveStrategy = new OpenLayers.Strategy.Save({ callback: function() { alert('feature saved'); } }); wfs2 = new OpenLayers.Layer.Vector( 'lumin', { strategies: [ new OpenLayers.Strategy.BBOX(), saveStrategy ], projection: new OpenLayers.Projection("EPSG:21781"), protocol: new OpenLayers.Protocol.WFS({ version: '1.1.0', srsName: 'EPSG:21781', url: 'http://localhost:8080/geoserver/wfs?strict=true', featureNS : 'http://www.openplans.org/topp', featureType: 'lumin', geometryName: 'the_geom', extractAttribute: true }), styleMap: styleMap }); Sincerly, J?rome Jimmy Aumard wrote: > > Hi list, > > I try to use WFS-T to add a new point on my layer, I use Openlayers, > geoserver 1.7.6 and Postgis. > > This is my request: > > version="1.1.0" xsi:schemaLocation > > ="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" > xmlns:xsi="http://www.w3.org > > /2001/XMLSchema-instance"> xmlns:feature="http://www.openplans.org/topp" >>757185 > > .20208755 > 5403792.1508966 > > > This is the response: > > > > xsi:schemaLocation="http://www.opengis.net/ows > http://192.168.40.136:8080/geoserver/schemas/ows/1.0 > > .0/owsExceptionReport.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:ows="http://www.opengis.net/ows"> > > > {http://www.openplans.org/topp}franchises > is > read-only > > > > > Thanks for help. > > Jim > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Problem-WFS-T-add-new-geometry-point-tp3508883p3509533.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From max.weidemann at freenet.de Tue Aug 25 09:00:02 2009 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] How to handle a GeometryCollection Feature Message-ID: <1251205202888-3509578.post@n2.nabble.com> Hi everybody my problem is that i dont know how i could at a new geometry to an GeometryCollection-Feature wich exists in an Vector layer. i have added the collection to the layer in a way like this: var gc_geometry = new OpenLayers.Geometry.Collection( [ new OpenLayers.Geometry.Point( 1379550.27259943, 6678794.95971749), new OpenLayers.Geometry.LineString( [p1,p2,p3] ), new OpenLayers.Geometry.Polygon([ new OpenLayers.Geometry.LinearRing([ new OpenLayers.Geometry.Point(1378491.75288927, 6678659.00305747), new OpenLayers.Geometry.Point(1378491.75288927, 6679154.27374754), new OpenLayers.Geometry.Point(1379161.82499937, 6679154.27374754), new OpenLayers.Geometry.Point(1379161.82499937, 6678659.00305747), new OpenLayers.Geometry.Point(1378491.75288927, 6678659.00305747)]) // etc. ]) ]); var gc_feature = new OpenLayers.Feature.Vector( gc_geometry ); vectorLayer.addFeatures( [ gc_feature ] ); >>> In other function i would like to add or remove some of the components i get the feature with code like this: var feature = layer.getFeatureById(id); At this Point i do not know what is the smartest way to add or remove some components to the geometrycollection?? Im no so good in JavaScript and thankfull for any help! cheers Max -- View this message in context: http://n2.nabble.com/How-to-handle-a-GeometryCollection-Feature-tp3509578p3509578.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rahn at zhaw.ch Tue Aug 25 09:39:11 2009 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] preload layers Message-ID: <3F643797A078EB4FB028800809680984017C07CA@langouste.zhaw.ch> Hello list, I have a little tricky question. Perhaps somebody can help me. I show a layer in my map. This layer shows polygons at a specific time. Now you can click a button and the next time will be shown in the map. You can change the time back of course, too. In my solution there are timestamps from the year 1980 up to 2009. This works fine, but I have a little performance problem. It is not very fast to load the different layers. If the layer is loaded, he is in the cache and load the next time faster. That's ok. I think now, perhaps it is possible to load the next timestamp-Layer in the browser cache while the user looks at the active layer. If the user then clicked at the button, the layer must only load out of the browser cache. I don't know if something like that is possible or not. Perhaps somebody can help me or somebody has already realise something like this. A lot of thanks to you for your help. Greetings Hanno ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/f1246f75/attachment.html From jimmy.aumard at gmail.com Tue Aug 25 11:09:37 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Problem wfs-t update (geoserver) Message-ID: Hi list, I try to update point on vector layer but it's doesn't work. My request: the_geom616388.1960058601 6310641.054345695nomtetadressaq Geoserver response: update error Details: org.geoserver.wfs.WFSException: update error at org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionResponse.java:49) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712) I don't find the "InvalidParameterValue". If I make an insert it's work. Do you have an idea? Thanks Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/22da8943/attachment.html From arnd.wippermann at web.de Tue Aug 25 11:09:32 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] map bounds or projection problem? In-Reply-To: <1251201898931-3509317.post@n2.nabble.com> Message-ID: Hi Eoinyp, You have no navigation control added to your map. map.addControl(new OpenLayers.Control.Navigation()); If you want use EPSG:26986, http://spatialreference.org/ref/epsg/26986/ shows the standard extent for that projection. You can't mix layers with different projections in one map. You declare a projection for your map and the layers will requested for this projection. OpenLayers can't reproject raster layers. In mymap2.html you should choose sphericalMercator (EPSG:900913) for the projection of the map. As you have choosen for the google layer. See the OL examples for the bounds of EPSG:900913 and resolution. You try to compound a map with three different projections. I think, the map projection is set to sphericalMercator by the google layer. Regards, Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von eoinyp Gesendet: Dienstag, 25. August 2009 14:05 An: users@openlayers.org Betreff: [OpenLayers-Users] map bounds or projection problem? Hi list, I am just getting started with openlayers and geoserver. I have two simple wms layers being served by geoserver: a layer of US states, and a layer of town boundaries in Massachusetts. Each of the layers display fine on their own. Showing the full extent of the mapped area. When I put them both together however, only a section of the States layer is shown, while the full Mass layer is shown. It is not possible to pan and see the rest of the States layer. I am not entirely sure what the problem is, so im not sure how to fix it! The map with the states and the Mass towns layers here: http://www.eoinmaca.com/maps/OpenLayers/mymap3.htm I think it is a problem with the extent of the bounds of the layers defined. What should it be set to? currently it is: var bounds = new OpenLayers.Bounds( 19012.0201171875, 768402.5875, 345695.3353515625, 968859.1625); The layers have different EPSGs - is this a problem? The problem is compounded when I add in a googleEarth baselayer. It shows the full extent of the google layer, but when I zoom in I cant pan to the Mass area. The pan functionality seems to be constrained to a small area. The map with the google base layer is available here: http://www.eoinmaca.com/maps/OpenLayers/mymap2.htm If the bounds is the problem, is there a simple way of figuring out what the bounds of my map need to be? Many thanks, Eoinyp -- View this message in context: http://n2.nabble.com/map-bounds-or-projection-problem-tp3509317p3509317.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From arnd.wippermann at web.de Tue Aug 25 11:15:48 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] preload layers In-Reply-To: <3F643797A078EB4FB028800809680984017C07CA@langouste.zhaw.ch> Message-ID: Hi Hanno, as a workaround you could load two layers with different timestamps. One layer you set opacity to 0 and shows it not in the layerswitcher. When you choose the next time, the tiles should be there and the tiles for the next time are loaded invisible. Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Rahn Hanno (rahn) Gesendet: Dienstag, 25. August 2009 15:39 An: users@openlayers.org Betreff: [OpenLayers-Users] preload layers Hello list, I have a little tricky question. Perhaps somebody can help me. I show a layer in my map. This layer shows polygons at a specific time. Now you can click a button and the next time will be shown in the map. You can change the time back of course, too. In my solution there are timestamps from the year 1980 up to 2009. This works fine, but I have a little performance problem. It is not very fast to load the different layers. If the layer is loaded, he is in the cache and load the next time faster. That?s ok. I think now, perhaps it is possible to load the next timestamp-Layer in the browser cache while the user looks at the active layer. If the user then clicked at the button, the layer must only load out of the browser cache. I don?t know if something like that is possible or not. Perhaps somebody can help me or somebody has already realise something like this. A lot of thanks to you for your help. Greetings Hanno ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/e4da657f/attachment.html From liste12A45q7 at gmx.de Tue Aug 25 12:03:47 2009 From: liste12A45q7 at gmx.de (Markus) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Scale on the map in nautical miles Message-ID: <4A940B63.3080009@gmx.de> Dear OL-Specialists, For www.OpenSeaMap.org I would like to have a map scale in nautical miles and kilometers (instead of kilometers and feet): Upper side: nautical miles and down to 0.001 nautical miles Lower side: kilometers and if less than 1 km meters. Where can I find a scale like this? If not: Who can help us and would like to script a such scale? Thanks a lot! Markus PS: 1 nm = 1.852 km From jim.pxie at gmail.com Tue Aug 25 12:24:20 2009 From: jim.pxie at gmail.com (www.gwtorm.com) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] rewrite 00-map-with-wms.html in GWT and org.gwtopenmaps.openlayers library In-Reply-To: References: Message-ID: Anybody uses GWT and org.gwtopenmaps library for Google maps. When I convert js version into GWT version, Google map just occurs in upper left of map widget instead of whole part of map widget. After I resize web browser and change zoom level, I can get the same look as original js version. Please help. Jim On Mon, Aug 24, 2009 at 10:45 AM, www.gwtorm.com wrote: > I am trying to rewrite 00-map-with-wms.html that is listed in > http://workshops.opengeo.org/postgis-spatialdbtips/map-with-wms.html in GWT > and org.gwtopenmaps.openlayers library. The original html is attached as > 00-map-with-wms.html and GWT Java code is attached as SpatialDbTips.java. > I have some problem in GWT version: > 1. I have to resize web browser first. > 2. I have to change zoom level then. > > After I did the above two steps, GWT version works the same as original > html version. > > > Thanks, > > Jim > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/288fc81f/attachment.html From eoinyp at yahoo.com Tue Aug 25 12:27:14 2009 From: eoinyp at yahoo.com (eoinyp) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] map bounds or projection problem? In-Reply-To: References: <1251201898931-3509317.post@n2.nabble.com> Message-ID: <1251217634963-3511181.post@n2.nabble.com> Thanks Arnd, I made some progress, but Im not quite there yet. Adding in the navigation control made a small difference. It works well when I have 2 layers (no google) see: http://www.eoinmaca.com/maps/OpenLayers/twolayers.htm However the bounds of the area shown is still constrained. There is data there for all US states so I think it is the line: var bounds = new OpenLayers.Bounds( 19012.0201171875, 768402.5875, 345695.3353515625, 968859.1625); that constrains the display of information. I just dont know how to figure out what the correct bounds should be! Again, this problem is compounded with the addition of the third layer see: http://www.eoinmaca.com/maps/OpenLayers/threelayers.htm I cannot zoom in on the area where the layers are overlaid on the google map, It always brings me to north Africa! :( Thanks for the help on the epsg. When I have only 2 layers I used EPSG:26986, the local projection, and when I add the google layer, I define the map projection to be EPSG:900913, google spherical mercator. Really puzzeled as to why it always zooms in on North africa and doesnt let me pan to the Northeren USA. Thanks again, Eoinyp Arnd Wippermann wrote: > > Hi Eoinyp, > > You have no navigation control added to your map. > > map.addControl(new OpenLayers.Control.Navigation()); > > If you want use EPSG:26986, http://spatialreference.org/ref/epsg/26986/ > shows the standard extent for that projection. > > You can't mix layers with different projections in one map. You declare a > projection for your map and the layers will requested for this projection. > OpenLayers can't reproject raster layers. > > In mymap2.html you should choose sphericalMercator (EPSG:900913) for the > projection of the map. As you have choosen for the google layer. See the > OL > examples for the bounds of EPSG:900913 and resolution. > > You try to compound a map with three different projections. I think, the > map > projection is set to sphericalMercator by the google layer. > > Regards, > Arnd > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von eoinyp > Gesendet: Dienstag, 25. August 2009 14:05 > An: users@openlayers.org > Betreff: [OpenLayers-Users] map bounds or projection problem? > > > Hi list, > I am just getting started with openlayers and geoserver. > I have two simple wms layers being served by geoserver: a layer of US > states, and a layer of town boundaries in Massachusetts. Each of the > layers > display fine on their own. Showing the full extent of the mapped area. > When > I put them both together however, only a section of the States layer is > shown, while the full Mass layer is shown. It is not possible to pan and > see > the rest of the States layer. > I am not entirely sure what the problem is, so im not sure how to fix it! > The map with the states and the Mass towns layers here: > http://www.eoinmaca.com/maps/OpenLayers/mymap3.htm > I think it is a problem with the extent of the bounds of the layers > defined. What should it be set to? > currently it is: > > var bounds = new OpenLayers.Bounds( > 19012.0201171875, 768402.5875, > 345695.3353515625, 968859.1625); > > The layers have different EPSGs - is this a problem? > > The problem is compounded when I add in a googleEarth baselayer. It shows > the full extent of the google layer, but when I zoom in I cant pan to the > Mass area. The pan functionality seems to be constrained to a small area. > The map with the google base layer is available here: > http://www.eoinmaca.com/maps/OpenLayers/mymap2.htm > > > If the bounds is the problem, is there a simple way of figuring out what > the > bounds of my map need to be? > > Many thanks, > > Eoinyp > > > -- > View this message in context: > http://n2.nabble.com/map-bounds-or-projection-problem-tp3509317p3509317.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 > > -- View this message in context: http://n2.nabble.com/map-bounds-or-projection-problem-tp3509317p3511181.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jlebear at gmail.com Tue Aug 25 12:54:16 2009 From: jlebear at gmail.com (jlebear) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] wfs request in Openlayer from Geoserver gives NullPointerException Message-ID: <1251219256083-3511346.post@n2.nabble.com> I'm running Windows Vista, Geoserver 2.0 RC1, Openlayers 2.8 I've published a layer in Geoserver maplelake:Trail displayed in the GetCapabilities file http://localhost:8080/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities ? maplelake:Trail Trails Sequin Trail Trail EPSG:EPSG:4269 This is my Openlayers statement WFSlayer = new OpenLayers.Layer.WFS( "Trail", "http://localhost:8080/geoserver/wfs", {typename:'maplelake:Trail'}, ); map.addLayer(WFSlayer); >From Firebug param urlhttp://localhost:8080/geoserver/wfs?typename=maplelake%3ATrail&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=-79.852788407898,45.35006894165,-79.722411592102,45.38955105835 >From Firebug response java.lang.NullPointerException null What am I doing wrong? Thanks for all replies Jack -- View this message in context: http://n2.nabble.com/wfs-request-in-Openlayer-from-Geoserver-gives-NullPointerException-tp3511346p3511346.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From CHRISTOPHER.M.HEIDT at saic.com Tue Aug 25 13:20:05 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] RegularPolygon Styling In-Reply-To: <1251219256083-3511346.post@n2.nabble.com> References: <1251219256083-3511346.post@n2.nabble.com> Message-ID: <1053B20F24D85F41B57F168351684E2204D2A499@0015-its-exmb04.us.saic.com> The "temporary" style that exists in the other shape handlers doesn't seem to work with RegularPolygon. How do I change the style of a RegularPolygon during the draw phase? From mauriciomarquezgoa at yahoo.com Tue Aug 25 13:28:30 2009 From: mauriciomarquezgoa at yahoo.com (Mauricio Marquez) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] alguien habla/escribe hispano??? In-Reply-To: Message-ID: <825576.57461.qm@web30608.mail.mud.yahoo.com> Mil Gracias Ivan, thank!!! Me funcion? perfectamente la opcion {visibility: false}, con ello resolv? lo que necesitaba, en cuanto al GetLegendGraphics haciendo el request al servidor si trae la leyenda del tem?tico, a ver como logro que se observe mediante una box dentro de la vista, en todo caso mil gracias, un fuerte abrazo, saludos... Traslate google: I worked perfectly the option (visibility: false), hence I decided I needed, in terms of making GetLegendGraphics request to the server if the theme brings the legend to see as an achievement that is observed by a box within the hearing in any case many thanks, a big hug, greetings ... Mauricio M?rquez --- El lun 24-ago-09, Ivan Grcic escribi?: De: Ivan Grcic Asunto: Re: [OpenLayers-Users] alguien habla/escribe hispano??? A: "Mauricio Marquez" Cc: users@openlayers.org Fecha: lunes, 24 agosto, 2009, 3:40 am Hola Mauricio, 2009/8/21 Mauricio Marquez : > Buenas tardes a todos, saludos desde Venezuela. > > Tengo la siguiente necesidad, deseo que cuando se cargue la vista desde el > explorador al menos una capa aparezca en modo inactivo, supongo que es algo > sencillo pero me considero un novato, no tengo m?s de 1 mes que comenc? a > adentrarme a openlayers y bueno, les paso una captura de pantalla > (http://img149.imageshack.us/img149/4875/planrevolucionariomapse.png) del > sistema que estoy desarrollando, saludos... > Espero k te entendi bien :) Mira eso: http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.visibility entonces: var layer= new OpenLayers.Layer.WMS(url, {......},{visibility: false,.....}) > Pd.: Si logran entenderme tambi?n estoy en la busqueda de agregar un panel > de control que muestre los valores del tem?tico, realmente he investigado > pero no hay mucha documentaci?n en habla hispana que permita ayudar. > Creo que no hai esa funcionalidad en OpenLayers, pero es facil a hacerlo con GetLegendGraphics request en tu WMS server... Chau > > > Mauricio M?rquez > > > > > ________________________________ > ?Obt?n la mejor experiencia en la web! > Descarga gratis el nuevo Internet Explorer 8 > http://downloads.yahoo.com/ieak8/?l=e1 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic ____________________________________________________________________________________ ?Obt?n la mejor experiencia en la web! Descarga gratis el nuevo Internet Explorer 8. http://downloads.yahoo.com/ieak8/?l=e1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/0212300b/attachment.html From madair at dmsolutions.ca Tue Aug 25 14:00:12 2009 From: madair at dmsolutions.ca (Mike Adair) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Scale on the map in nautical miles In-Reply-To: <4A940B63.3080009@gmx.de> References: <4A940B63.3080009@gmx.de> Message-ID: <4A9426AC.20005@dmsolutions.ca> Markus, Do you mean the scale line control? I have one working for Nautical miles and meters like so: map.addControl(new OpenLayers.Control.ScaleLine({topOutUnits: 'nmi', topInUnits: 'm'}) ); Mike Markus wrote: > Dear OL-Specialists, > > For www.OpenSeaMap.org I would like to have a map scale in nautical > miles and kilometers (instead of kilometers and feet): > > Upper side: nautical miles and down to 0.001 nautical miles > Lower side: kilometers and if less than 1 km meters. > > Where can I find a scale like this? > > If not: > Who can help us and would like to script a such scale? > > Thanks a lot! > Markus > > PS: 1 nm = 1.852 km > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Michael Adair Senior Software Architect DM Solutions Group Inc. Office: (613) 565-5056 x26 madair@dmsolutions.ca http://www.dmsolutions.ca http://research.dmsolutions.ca From bthoen at gisnet.com Tue Aug 25 14:43:41 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] How Do I Contribute to the User Examples? Message-ID: <4A9430DD.5050406@gisnet.com> I didn't get any response when I asked this last Sunday, so I thought I'd try again on a week day when everybody's less busy. I've recently put together a map demonstration and a short tutorial that explains a bit about creating and using custom and built-in cursors in OpenLayers that I'd like to contribute to the community. I know how to post the text part to the wiki, but how do I add the map that goes with it? Is there a procedure for uploading working demos, or should I just post the map code with the article? This demo map is styled after the ones in the Examples (at http://openlayers.org/dev/examples/), so it runs quick and takes up little space. So if someone could tell me how I should add my two or three grains of knowledge to the documentation, I'd appreciate it. Regards, - Bill Thoen From arevaco90 at yahoo.es Tue Aug 25 15:16:02 2009 From: arevaco90 at yahoo.es (=?UTF-8?Q?Juan_Ar=C3=A9valo?=) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Error-when-using-XMLHTTPRequest In-Reply-To: <1251153678596-3506570.post@n2.nabble.com> References: <1251153678596-3506570.post@n2.nabble.com> Message-ID: <1251227762096-3512002.post@n2.nabble.com> Hi! The problem it seems to be solved now..we couldn?t find the patch file that you mentioned in your post. Here is the link in case that someone need it: http://openlayers.org/pipermail/dev/attachments/20090428/30b57201/attachment-0001.obj Thanks for your help!! Juan Juan Ar?valo wrote: > > Hi all! > > All my WFS-T examples were working perfectly till today! However I am now > getting an error when I try to modify my features and I cannot figure out > where the problem is coming from. Here is the error: > > > Error: uncaught exception: [Exception... "Component returned failure code: > 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult: > "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: > http://127.0.0.1:8080/client/mfbase/openlayers/lib/OpenLayers/Request/XMLHttpRequest.js > :: anonymous :: line 200" data: no] > > I?ve read this post in the forum regarding this problem: > http://n2.nabble.com/Error-when-using-XMLHTTPRequest-through-refreshing-a-wfs-layer-every-n-seconds-td2721982.html#a2740217 > > But to me it is not clear what needs to be done in order to solve this > issue! > > My application was nearly finished so any help will be much appreciated! > > Thank you! > > Juan Ar?valo > -- View this message in context: http://n2.nabble.com/Error-when-using-XMLHTTPRequest-tp3506570p3512002.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From nomarcos at gmail.com Tue Aug 25 15:17:19 2009 From: nomarcos at gmail.com (Marcos Nogueira) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Popups doubt in example "Feature Info in Popup" Message-ID: <4afe21db0908251217m5990b7a3n5b55561f92e4405b@mail.gmail.com> Hi, I managed to use GetFeatureInfo perfectly in my application after checking the example "Feature Info in Popup". Every point that I click that has some information to be returned gets it returned. It's great. But the problem is, when I click in a place in the map that has no information, I mean, a point from my WMS layer that has no information about it in my source, it returns an empty popup. That behaviour also happens in the example. If you click in the white area, for example, it returns you an empty popup. The question I have is: how do I make for the popup to appear only when there's some information being returned ?? I'm using openlayers 2.8 Thanks for the attention guys Marcos -- "Saber o que ? certo e n?o faz?-lo ? a pior covardia." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/9fee445a/attachment.html From arnd.wippermann at web.de Tue Aug 25 17:09:52 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] map bounds or projection problem? In-Reply-To: <1251217634963-3511181.post@n2.nabble.com> Message-ID: Hi Eoinyp, if you want to see the whole USA, then your bounds are something like this: var bounds = new OpenLayers.Bounds(-6906850,-2055250,3160850,3805350); and maxResolution:10000 http://gis.ibbeck.de/ginfo/apps/OL27Client/OL27ClientGis.asp?WMC=./data/WMC/ EPSG_26986.wmc.xml if you use google layer with sphericalMercator, then you have to set the options for the map in the right way. You have taken the same as for EPSG:26986. Your extent describes something in Togo, Benin. try this: var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", numZoomLevels: 18, maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34) }; map = new OpenLayers.Map('map', options); http://gis.ibbeck.de/ginfo/apps/OL27Client/OL27ClientGis.asp?WMC=./data/WMC/ EPSG_900913_Mass.wmc.xml Good luck Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von eoinyp Gesendet: Dienstag, 25. August 2009 18:27 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] map bounds or projection problem? Thanks Arnd, I made some progress, but Im not quite there yet. Adding in the navigation control made a small difference. It works well when I have 2 layers (no google) see: http://www.eoinmaca.com/maps/OpenLayers/twolayers.htm However the bounds of the area shown is still constrained. There is data there for all US states so I think it is the line: var bounds = new OpenLayers.Bounds( 19012.0201171875, 768402.5875, 345695.3353515625, 968859.1625); that constrains the display of information. I just dont know how to figure out what the correct bounds should be! Again, this problem is compounded with the addition of the third layer see: http://www.eoinmaca.com/maps/OpenLayers/threelayers.htm I cannot zoom in on the area where the layers are overlaid on the google map, It always brings me to north Africa! :( Thanks for the help on the epsg. When I have only 2 layers I used EPSG:26986, the local projection, and when I add the google layer, I define the map projection to be EPSG:900913, google spherical mercator. Really puzzeled as to why it always zooms in on North africa and doesnt let me pan to the Northeren USA. Thanks again, Eoinyp From jlebear at gmail.com Tue Aug 25 17:36:00 2009 From: jlebear at gmail.com (Jack Gibb) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] wfs request in Openlayer from Geoserver gives NullPointerException In-Reply-To: <1251219256083-3511346.post@n2.nabble.com> References: <1251219256083-3511346.post@n2.nabble.com> Message-ID: <856722c80908251436j2e624fa1v323cca29454a9ff0@mail.gmail.com> I've found the problem and it's with Geoserver. WMS, KML all work except for for GML. Jack 2009/8/25 jlebear > > I'm running Windows Vista, Geoserver 2.0 RC1, Openlayers 2.8 > > I've published a layer in Geoserver > maplelake:Trail displayed in the GetCapabilities file > > http://localhost:8080/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities > > - > > maplelake:Trail > Trails > Sequin Trail > Trail > EPSG:EPSG:4269 > maxy="45.386"/> > > > This is my Openlayers statement > > WFSlayer = new OpenLayers.Layer.WFS( "Trail", > "http://localhost:8080/geoserver/wfs", > {typename:'maplelake:Trail'}, > ); > map.addLayer(WFSlayer); > > From Firebug param > > > urlhttp://localhost:8080/geoserver/wfs?typename=maplelake%3ATrail&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=-79.852788407898,45.35006894165,-79.722411592102,45.38955105835 > > From Firebug response > > > version="1.2.0" > xmlns="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ogc > http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"> > > java.lang.NullPointerException > null > > > What am I doing wrong? > Thanks for all replies > > Jack > > > -- > View this message in context: > http://n2.nabble.com/wfs-request-in-Openlayer-from-Geoserver-gives-NullPointerException-tp3511346p3511346.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090825/019c3290/attachment.html From eric.lemoine at camptocamp.com Wed Aug 26 01:11:32 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Popups doubt in example "Feature Info in Popup" In-Reply-To: <4afe21db0908251217m5990b7a3n5b55561f92e4405b@mail.gmail.com> References: <4afe21db0908251217m5990b7a3n5b55561f92e4405b@mail.gmail.com> Message-ID: On Tue, Aug 25, 2009 at 9:17 PM, Marcos Nogueira wrote: > > Hi, > > I managed to use GetFeatureInfo perfectly in my application after checking > the example "Feature Info in Popup". > > Every point that I click that has some information to be returned gets it > returned. It's great. > > But the problem is, when I click in a place in the map that has no > information, I mean, a point from my WMS layer that has no > information about it in my source, it returns an empty popup. > That behaviour also happens in the example. If you click in the white area, > for example, it returns you an empty popup. > > The question I have is: > how do I make for the popup to appear only when there's some information > being returned ?? > > I'm using openlayers 2.8 Hi. What example are you basing your code on? Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Wed Aug 26 01:21:16 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] RegularPolygon Styling In-Reply-To: <1053B20F24D85F41B57F168351684E2204D2A499@0015-its-exmb04.us.saic.com> References: <1251219256083-3511346.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2204D2A499@0015-its-exmb04.us.saic.com> Message-ID: On Tue, Aug 25, 2009 at 7:20 PM, Heidt, Christopher M. wrote: > The "temporary" style that exists in the other shape handlers > doesn't seem to work with RegularPolygon. > How do I change the style of a RegularPolygon during the draw phase? Hi. Either write a patch to Handler/RegularPolygon.js so it takes the layerOptions config option into account (as Handler/Point.js does), or provide a style property to the regular polygon handler through the handlerOptions config option passed to the draw feature control: new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.RegularPolygon, { handlerOptions: { style: OpenLayers.Feature.Vector.style['temporary'] } }); Hope this helps, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Wed Aug 26 01:24:45 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] How to handle a GeometryCollection Feature In-Reply-To: <1251205202888-3509578.post@n2.nabble.com> References: <1251205202888-3509578.post@n2.nabble.com> Message-ID: On Tue, Aug 25, 2009 at 3:00 PM, Max Weidemann wrote: > > Hi everybody > > my problem is that i dont know how i could at a new geometry to an > GeometryCollection-Feature wich exists in an Vector layer. > > i have added the collection to the layer in a way like this: > > var gc_geometry = new OpenLayers.Geometry.Collection( > ? ? ? ? ? ? ?[ > ? ? ? ? ? ? ? ?new OpenLayers.Geometry.Point( 1379550.27259943, > 6678794.95971749), > ? ? ? ? ? ? ? ?new OpenLayers.Geometry.LineString( [p1,p2,p3] ), > ? ? ? ? ? ? ? ?new OpenLayers.Geometry.Polygon([ > ? ? ? ? ? ? ? ? ? ? ? ? new OpenLayers.Geometry.LinearRing([ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?new > OpenLayers.Geometry.Point(1378491.75288927, 6678659.00305747), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?new > OpenLayers.Geometry.Point(1378491.75288927, 6679154.27374754), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?new > OpenLayers.Geometry.Point(1379161.82499937, 6679154.27374754), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?new > OpenLayers.Geometry.Point(1379161.82499937, 6678659.00305747), > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?new > OpenLayers.Geometry.Point(1378491.75288927, 6678659.00305747)]) > ? ? ? ? ? ? ? ?// etc. > ? ? ? ? ? ? ?]) > ? ? ? ? ? ?]); > > ? ? ? ? ? ?var gc_feature = new OpenLayers.Feature.Vector( gc_geometry ); > > ? ? ? ? ? ?vectorLayer.addFeatures( [ gc_feature ] ); > >>>> In other function i would like to add or remove some of the components > > i get the feature with code like this: > ? ? ? var feature = layer.getFeatureById(id); > > > At this Point i do not know what is the smartest way to add or remove some > components to the geometrycollection?? feature.geometry.addComponents([ new OpenLayers.Geometry.Point(...), new OpenLayers.Geometry.Polygon(...) ]); I think addComponents is documented in the API docs. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From Stefan.Ziegler at bd.so.ch Wed Aug 26 02:14:30 2009 From: Stefan.Ziegler at bd.so.ch (Ziegler Stefan) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Popups doubt in example "Feature Info in Popup" Message-ID: <2080836811.10761251267270002.JavaMail.root@srsofaioi13477.ktso.ch> Hi Marcos my - not very sophisticated - approach: function setHTML(response) { if (response.responseText.indexOf(' ') == -1) { // show popup.... } else { // do not show popup... } } It simply checks wether the returned html stuff consists only of two body tags. Probably you have to change the check string according to your wms server's empty response. regards Stefan ----- Originalnachricht ----- Von: Marcos Nogueira Gesendet: Die, 25.8.2009 21:17 An: users@openlayers.org Betreff: [OpenLayers-Users] Popups doubt in example "Feature Info in Popup" Hi, I managed to use GetFeatureInfo perfectly in my application after checking the example "Feature Info in Popup". Every point that I click that has some information to be returned gets it returned. It's great. But the problem is, when I click in a place in the map that has no information, I mean, a point from my WMS layer that has no information about it in my source, it returns an empty popup. That behaviour also happens in the example. If you click in the white area, for example, it returns you an empty popup. The question I have is: how do I make for the popup to appear only when there's some information being returned ?? I'm using openlayers 2.8 Thanks for the attention guys Marcos -- "Saber o que ? certo e n?o faz?-lo ? a pior covardia." _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From amit.bracha.andersen at atkinsglobal.com Wed Aug 26 03:44:34 2009 From: amit.bracha.andersen at atkinsglobal.com (Amit Andersen) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Create feature from sketch by imitating a bouble-click event In-Reply-To: <1251120576990-3503203.post@n2.nabble.com> References: <1251120576990-3503203.post@n2.nabble.com> Message-ID: <1251272674302-3514375.post@n2.nabble.com> Hi All I wonder if there is a good reason why my post is being ignored. Is it to hard or is the problem posted not clear enough? Mails with different problems have been streaming to my mailbox, and got an answer quite fast. Kan someone write back if my post is not answerable in some way.. :-) Thanks Amit Amit Andersen wrote: > > Hi > > This should be a simple question. > I'm working on limiting a path to one single line. What I did was to fire > a function on "Point" event. A global var is counting the points created. > In this function when the global var is 2, I have an alert which pops up > fine. > > What I want to do instead of the alert, is create the feature from the > line sketch on second single-click. Basically imitate a double-click event > on the second single-click. > > This is my DrawFeature control: > > ... > line: new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.Path, > {callbacks: { "point": this.TwoClickPath.bind(this) }}), > ... > > And this is the function that is being fired: > > TwoClickPath: function(e) { > this.TwoClickPathCount++; > if (this.TwoClickPathCount == 2) { > /* > Here I want to create the a feature out of the sketch (which > is a single line) > */ > // alert(""); fires ok > controls.line.deactivate(); > this.TwoClickPathCount = 0; > } > }, > > Thanks in advance for any reply. > Amit > -- View this message in context: http://n2.nabble.com/Create-feature-from-sketch-by-imitating-a-bouble-click-event-tp3503203p3514375.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jimmy.aumard at gmail.com Wed Aug 26 06:17:23 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] WFS layer prechargement with layer not visible possible? Message-ID: Hi list, I would like to know if it's possible to charge WFS layer at the beginning of the application but with the layer not visible. Sorry for my English. Cheers Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090826/83b4e469/attachment.html From kgeusebroek at xebia.com Wed Aug 26 06:25:31 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] WFS layer prechargement with layer not visiblepossible? In-Reply-To: References: Message-ID: Hi Jim, Not sure but you could try to make the layer visible but define a 'invisible' style. Then when you want to visualize the layer you set a 'visible' style Just my 2 cents Kris From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Jimmy Aumard Sent: Wednesday, August 26, 2009 12:17 PM To: users@openlayers.org Subject: [OpenLayers-Users] WFS layer prechargement with layer not visiblepossible? Hi list, I would like to know if it's possible to charge WFS layer at the beginning of the application but with the layer not visible. Sorry for my English. Cheers Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090826/f2d239a9/attachment.html From jimmy.aumard at gmail.com Wed Aug 26 06:52:34 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] WFS layer prechargement with layer not visiblepossible? In-Reply-To: References: Message-ID: Thanks Kris, My problem is : Users have possibility to search an address (geocoding google) and save this address(feature) on a vector layer (but maybe the layer is not charged). If layer was charged I have no problem but if layer was not charged the feature is not added on layer when layer was charged (feature erase). Cheers Jim 2009/8/26 Kris Geusebroek > Hi Jim, > > > > Not sure but you could try to make the layer visible but define a > ?invisible? style. Then when you want to visualize the layer you set a > ?visible? style > > > > Just my 2 cents > > > > Kris > > > > *From:* users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > *On Behalf Of *Jimmy Aumard > *Sent:* Wednesday, August 26, 2009 12:17 PM > *To:* users@openlayers.org > *Subject:* [OpenLayers-Users] WFS layer prechargement with layer not > visiblepossible? > > > > Hi list, > > I would like to know if it's possible to charge WFS layer at the beginning > of the application but with the layer not visible. > > Sorry for my English. > > Cheers > > Jim > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090826/9281405a/attachment.html From max.weidemann at freenet.de Wed Aug 26 06:55:26 2009 From: max.weidemann at freenet.de (Max Weidemann) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] How to handle a GeometryCollection Feature In-Reply-To: <1251205202888-3509578.post@n2.nabble.com> References: <1251205202888-3509578.post@n2.nabble.com> Message-ID: <1251284126216-3514702.post@n2.nabble.com> Hi everybody i have tested a little bit and have found an solution, but i dont know if it the best way! At first i got the geometrycollection feature wich i would like to add a geometry. Then i create a new geometrycollection with the geometry of the feature i had found. In this new geometry i'm able to add the new geometry. After that i remove the old collection from the layer and add the new to it. Is there a better way?? >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Also i got a new problem with Styling my GeometryCollections! I have an StyleMap for my Layer wich looks like this: var style = { "default" : new OpenLayers.Style(null, { rules : [ new OpenLayers.Rule( { symbolizer : { "Point" : { pointRadius : pointRadius, graphicName : graphicName, fillColor : fillColor, fillOpacity : fillOpacity, strokeWidth : strokeWidth, strokeOpacity : strokeOpacity, strokeColor : strokeColor, label : label, fontColor : fontColor, fontSize : fontSize, fontFamily : fontFamily, fontWeight : fontWeight, labelAlign : labelAlign }, "Line" : { strokeWidth : strokeWidth, strokeOpacity : strokeOpacity, strokeColor : strokeColor }, "Polygon" : { strokeWidth : strokeWidth, strokeOpacity : strokeOpacity, fillColor : fillColor, strokeColor : strokeColor }, } }) ] }), "select" : new OpenLayers.Style(null, { rules : [ new OpenLayers.Rule( { symbolizer : { "Point" : { pointRadius : 5, graphicName : "square", fillColor : "#0000ff", fillOpacity : 0.25, strokeWidth : 3, strokeOpacity : 1, strokeColor : "#0000ff" }, "Line" : { strokeWidth : 3, strokeOpacity : 1, strokeColor : "#0000ff" }, "Polygon" : { strokeWidth : 3, strokeOpacity : 1, fillColor : "#0000ff", strokeColor : "#0000ff" }, } }) ] }), "temporary" : new OpenLayers.Style(null, { rules : [ new OpenLayers.Rule( { symbolizer : { "Point" : { graphicName : "square", pointRadius : 5, fillColor : "white", fillOpacity : 0.25, strokeWidth : 2, strokeColor : "#ff0000" }, "Line" : { strokeWidth : 3, strokeOpacity : 1, strokeColor : "#ff0000" }, "Polygon" : { strokeWidth : 2, strokeOpacity : 1, strokeColor : "#ff0000", fillColor : "#ff0000" } } }) ] }) } If i use this Sytlemap the geometrycollection features are not affected by it only Point Lines and Poylgons are styled in the right way, because of the symbolizers. Are there more special symbolizer or is the only Solution to take one Style for every feature??? Thanks for any Help Max -- View this message in context: http://n2.nabble.com/How-to-handle-a-GeometryCollection-Feature-tp3509578p3514702.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From patzke at geoinformationsdienst.de Wed Aug 26 08:02:10 2009 From: patzke at geoinformationsdienst.de (Fabian Patzke) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Split Control aftersplit event Message-ID: <1251288130206-3514829.post@n2.nabble.com> Hi there, i want to use the split control on one of my Vector(WMS) Layers. So i set up a control based on the examples: http://www.openlayers.org/dev/examples/split-feature.html http://www.openlayers.org/dev/examples/wfs-snap-split.html my code is below. The control itself seems to work, if I use the active eventListener it will print out a message, but the aftersplit event doesn't seem to be triggered. Is there anyone who does have an idea on how to do this. I tried it with and without deferDelete. thanks in advance. greetings, Fabian the code: splitControl = new OpenLayers.Control.Split({ layer: layerVar, deferDelete: true, eventListeners: { // activate: function(event) { // window.alert("split activated."); // }, aftersplit: function(event) { window.alert("split has been finished."); } } }); -- View this message in context: http://n2.nabble.com/Split-Control-aftersplit-event-tp3514829p3514829.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kmalkowski at sourcepark.de Wed Aug 26 09:37:09 2009 From: kmalkowski at sourcepark.de (kmalk) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] failure on re-opening a popup Message-ID: <1251293829817-3514981.post@n2.nabble.com> Hi! I have a map with icons, which create a popup when mouseClicked on it. They close themselves, when a mouseClick is done on closeButton or the icon. With this.layer.map.addPopup(this.createPopup(true), true); I create the popup (1st para) and close (if existing) other popups (2nd para). everything works fine ..except one thing: after clicking many (different) icons, all opened popups will not pop up again.:-/ Has someone an idea how to change this behavior? -- View this message in context: http://n2.nabble.com/failure-on-re-opening-a-popup-tp3514981p3514981.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From patzke at geoinformationsdienst.de Wed Aug 26 10:45:53 2009 From: patzke at geoinformationsdienst.de (Fabian Patzke) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Split Control aftersplit event References: <1251288130206-3514829.post@n2.nabble.com> Message-ID: Fabian Patzke writes: > > > Hi there, > i want to use the split control on one of my Vector(WMS) Layers. So i set up > a control based on the examples: > http://www.openlayers.org/dev/examples/split-feature.html > http://www.openlayers.org/dev/examples/wfs-snap-split.html > my code is below. The control itself seems to work, if I use the active > eventListener it will print out a message, but the aftersplit event doesn't > seem to be triggered. Is there anyone who does have an idea on how to do > this. I tried it with and without deferDelete. > thanks in advance. It works, was my fault. I tried it on a polygon layer. I thought that it would work, but: http://doc.openlayers.org/library/controls/split.html#control-split-detail is leading me to the conclusion it only works with line layers. Maybe it would be good to mention this on the api site as well :) Greetings, Fabian From CHRISTOPHER.M.HEIDT at saic.com Wed Aug 26 14:31:44 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] DrawFeature: RegularPolygon Radius Message-ID: <1053B20F24D85F41B57F168351684E2204D73240@0015-its-exmb04.us.saic.com> Ok, i need to know what the radius of my Regular Polgon is AS IM DRAWING IT. My use case it that i know an event is going to happen at a certain location and id like to know if any of my sensor equipment is within 2 miles on it. I'd like to draw a circle at the event location and drag out to see if any equipment is within range. So, as I'm dragging the circle i'd like to see what the current radius is (it would be really cool if i could make it appear as a vector label). Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090826/350cb52a/attachment.html From nomarcos at gmail.com Wed Aug 26 14:53:26 2009 From: nomarcos at gmail.com (Marcos Nogueira) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Popups doubt in example "Feature Info in Popup" In-Reply-To: <2080836811.10761251267270002.JavaMail.root@srsofaioi13477.ktso.ch> References: <2080836811.10761251267270002.JavaMail.root@srsofaioi13477.ktso.ch> Message-ID: <4afe21db0908261153s2adbb2c6k4d145c1b1e0b9362@mail.gmail.com> @Eric Lemoine Eric, just go the examples page http://www.openlayers.org/dev/examples/ and type "feature info in popup". It's the first one that appears. @Ziegler Stefan Thanks for your suggestion. I ended up solving it in a similar way. Here's my previous code: var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: "http://127.0.0.1:8081/cgi-bin/mapserv.exe?map=c :\\maps\\wms_postgis.map", title: 'Identify features by clicking', queryVisible: true, vendorParams: { "FEATURE_COUNT": "1000"}, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } }); map.addControl(info); info.activate(); and here's how I solved it: var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: "http://127.0.0.1:8081/cgi-bin/mapserv.exe?map=c :\\maps\\wms_postgis.map", title: 'Identify features by clicking', queryVisible: true, vendorParams: { "FEATURE_COUNT": "1000"}, eventListeners: { getfeatureinfo: function(event) { if((event.text).length != 1) { map.addPopup(new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } } }); map.addControl(info); info.activate(); Just an "if" solved. Simpler than I expected :-P thank you two!! Marcos On Wed, Aug 26, 2009 at 3:14 AM, Ziegler Stefan wrote: > Hi Marcos > > my - not very sophisticated - approach: > > function setHTML(response) { > if (response.responseText.indexOf(' ') == -1) > { > // show popup.... > } > else { > // do not show popup... > } > } > It simply checks wether the returned html stuff consists only of two body > tags. Probably you have to change the check string according to your wms > server's empty response. > > regards > Stefan > > > > > > ----- Originalnachricht ----- > Von: Marcos Nogueira > Gesendet: Die, 25.8.2009 21:17 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Popups doubt in example "Feature Info in Popup" > > Hi, > > I managed to use GetFeatureInfo perfectly in my application after checking > the example "Feature Info in Popup". > > Every point that I click that has some information to be returned gets it > returned. It's great. > > > But the problem is, when I click in a place in the map that has no > information, I mean, a point from my WMS layer that has no > information about it in my source, it returns an empty popup. > That behaviour also happens in the example. If you click in the white area, > for example, it returns you an empty popup. > > > The question I have is: > how do I make for the popup to appear only when there's some information > being returned ?? > > I'm using openlayers 2.8 > > Thanks for the attention guys > > Marcos > > > > > > -- > "Saber o que ? certo e n?o faz?-lo ? a pior covardia." > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- "Saber o que ? certo e n?o faz?-lo ? a pior covardia." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090826/f729a7cf/attachment.html From brad at cubewerx.com.au Wed Aug 26 20:09:24 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] SelectFeature on click problem Message-ID: <00cb01ca26aa$a3bae1f0$eb30a5d0$@com.au> List, I have been struggling with a SelectFeature on a vector layer. I create the layers quite OK but am having trouble getting my popup to work on a mouse click on feature. My code snippet.. // pointFeature is the array of sorted point objects to be added as vector markers userMarkers.addFeatures(filteredPoints); map.addLayer(userMarkers); //Create a select feature control and add it to the map. selectControl = new OpenLayers.Control.SelectFeature(userMarkers, { //hover: true onSelect: onFeatureSelect ,onUnselect: onFeatureUnselect }); map.addControl(selectControl); selectControl.activate(); When I run this code it will NOT trigger the onFeatureSelect function but if I set hover: true it does launch the function. Can anyone see a problem with this - I am using 2.8 Cheers, Brad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090827/1c27f5cb/attachment.html From eric.lemoine at camptocamp.com Thu Aug 27 00:40:45 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] SelectFeature on click problem In-Reply-To: <00cb01ca26aa$a3bae1f0$eb30a5d0$@com.au> References: <00cb01ca26aa$a3bae1f0$eb30a5d0$@com.au> Message-ID: On Thursday, August 27, 2009, Brad Spencer wrote: > > > > > > > > > > > > > > List, > > > > I have been struggling with a SelectFeature on a vector > layer. I create the layers quite OK but am having trouble getting my popup to work > on a mouse click on feature. > > > > My code snippet?. > > > > // pointFeature is the array of sorted point objects to be > added as vector markers > > ??????????????? userMarkers.addFeatures(filteredPoints); > > ??????????????? map.addLayer(userMarkers); > > > > //Create a select feature control and add it to the map. > > ?? ???????????? ?selectControl = new > OpenLayers.Control.SelectFeature(userMarkers, > > ??????????????????????????????? { > > ??????????????????????????????????????????????? //hover: > true > > ??????????????????????????????????????????????? onSelect: > onFeatureSelect > > ??????????????????????????????????????????????? ,onUnselect: > onFeatureUnselect > > ??????????????????????????????? }); > > > > ??????????????? map.addControl(selectControl); > > ?? ???????????? selectControl.activate(); > > > > When I run this code it will NOT trigger the onFeatureSelect > function but if I set hover: true it does launch the function. > > > > Can anyone see a problem with this - I am using 2.8 Hi. The only thing I can think of is some other control activated after the select feature control. For example if the navigation control is activated after the select feature control the former (its drag handler actually) will prevent mousedown events from propagating to the select control. > > > > Cheers, Brad > > > > > > > > > > > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Thu Aug 27 00:49:36 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] WFS layer prechargement with layer not visible possible? Message-ID: On Wednesday, August 26, 2009, Jimmy Aumard wrote: > Thanks Kris, > > My problem is : > > Users have possibility to search an address (geocoding google) and save this address(feature) on a vector layer (but maybe the layer is not charged). If layer was charged I have no problem but if layer was not charged the feature is not added on layer when layer was charged (feature erase). Why don't you enable the geocoding function only once the layer is loaded? PS: does the Google "Terms Of Service" allow you to use their geocoder and display the results on something else that Google maps? > > Cheers > > Jim > > 2009/8/26 Kris Geusebroek > > > > > > > > > > > > > > > Hi Jim, > > > > Not sure but you could try to make the layer visible but define a > ?invisible? style. Then when you want to visualize the layer you set a ?visible? > style > > > > Just my 2 cents > > > > Kris > > > > > > From: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] On Behalf Of Jimmy Aumard > Sent: Wednesday, August 26, 2009 12:17 PM > To: users@openlayers.org > Subject: [OpenLayers-Users] WFS layer prechargement with layer not > visiblepossible? > > > > > > Hi list, > > I would like to know if it's possible to charge WFS layer at the beginning of > the application but with the layer not visible. > > Sorry for my English. > > Cheers > > Jim > > > > > > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From brad at cubewerx.com.au Thu Aug 27 03:28:30 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] SelectFeature on click problem In-Reply-To: References: <00cb01ca26aa$a3bae1f0$eb30a5d0$@com.au> Message-ID: <00ff01ca26e7$fb91fcf0$f2b5f6d0$@com.au> Eric, This did it. I had the following DragFeature control immediately after the SelectFeature control. controls = { drag: new OpenLayers.Control.DragFeature(userMarkers, {'onComplete': onCompleteMove} ) } map.addControl(controls['drag']); controls['drag'].activate(); So I put this DragFeature control before it and it at least triggered off the onFeatureSelect function. But I had to destroy and re-insert the SelectFeature control at end of the onCompleteMove function that I trigger in the DragFeature because it was then not working after a drag. Tricks for the unwary. But all seems to be OK now. Thanks. Cheers, Brad... -----Original Message----- From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] Sent: Thursday, August 27, 2009 2:41 PM To: Brad Spencer Cc: openlayers users Subject: Re: [OpenLayers-Users] SelectFeature on click problem On Thursday, August 27, 2009, Brad Spencer wrote: > > > > > > > > > > > > > > List, > > > > I have been struggling with a SelectFeature on a vector > layer. I create the layers quite OK but am having trouble getting my popup to work > on a mouse click on feature. > > > > My code snippet . > > > > // pointFeature is the array of sorted point objects to be > added as vector markers > > ??????????????? userMarkers.addFeatures(filteredPoints); > > ??????????????? map.addLayer(userMarkers); > > > > //Create a select feature control and add it to the map. > > ?? ???????????? ?selectControl = new > OpenLayers.Control.SelectFeature(userMarkers, > > ??????????????????????????????? { > > ??????????????????????????????????????????????? //hover: > true > > ??????????????????????????????????????????????? onSelect: > onFeatureSelect > > ??????????????????????????????????????????????? ,onUnselect: > onFeatureUnselect > > ??????????????????????????????? }); > > > > ??????????????? map.addControl(selectControl); > > ?? ???????????? selectControl.activate(); > > > > When I run this code it will NOT trigger the onFeatureSelect > function but if I set hover: true it does launch the function. > > > > Can anyone see a problem with this - I am using 2.8 Hi. The only thing I can think of is some other control activated after the select feature control. For example if the navigation control is activated after the select feature control the former (its drag handler actually) will prevent mousedown events from propagating to the select control. > > > > Cheers, Brad > > > > > > > > > > > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From jimmy.aumard at gmail.com Thu Aug 27 03:59:38 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] WFS layer prechargement with layer not visible possible? In-Reply-To: References: Message-ID: Hi Eric, How I know if the layer is loaded or not? And the user have possibility to save the point on layer (but not the same every time he have choice on hislayer). For the "Terms Of Service" I don't know but it's just a prototype for the moment, if it's not possible with Google I take another geocoder for the finale version. Thanks Jim 2009/8/27 Eric Lemoine > On Wednesday, August 26, 2009, Jimmy Aumard > wrote: > > Thanks Kris, > > > > My problem is : > > > > Users have possibility to search an address (geocoding google) and save > this address(feature) on a vector layer (but maybe the layer is not > charged). If layer was charged I have no problem but if layer was not > charged the feature is not added on layer when layer was charged (feature > erase). > > Why don't you enable the geocoding function only once the layer is loaded? > > PS: does the Google "Terms Of Service" allow you to use their geocoder > and display the results on something else that Google maps? > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090827/30ae830f/attachment.html From Jeremy.Husmann at critchlow.co.nz Thu Aug 27 04:16:06 2009 From: Jeremy.Husmann at critchlow.co.nz (Jeremy Husmann) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] DragPan and SelectControl on Vector layer Message-ID: <9436AA4D332D4F41A2C82CD50DB759F77672BE@caexch01.ca1.critchlow.co.nz> Hello everyone, Unsure if this is possible or not so I thought I might put the question out there incase someone had done this before. If you are adding a vector layer to a basemap you can pan across any polygons if you are zoomed right in on them. Bu as soon as you add a selectControl to the layer you loose this capability to pan. i.e. a click and hold wont pan but a full click will still select. Is there any way to accomplish both controls at once on a vector layer? I have tried adding the 'DragPan' control directly to the Vector layer but no luck. Any ideas? Thanks guys, Jeremy us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090827/79c07365/attachment.html From pj_maloney at hotmail.com Thu Aug 27 04:44:45 2009 From: pj_maloney at hotmail.com (PhilM) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] drawing shape gets offset when window expands In-Reply-To: <20080731152829.GB28248@metacarta.com> References: <6C097DA58429B743A67070F98BE73A3702B13E76@deqex01.deq.local> <6C097DA58429B743A67070F98BE73A3702B13E7D@deqex01.deq.local> <20080731152829.GB28248@metacarta.com> Message-ID: <1251362685501-3522766.post@n2.nabble.com> I am experiencing this problem with OL 2.8 in IE and FF. My map sits within a container DIV which scrolls when the window size is reduced. If the user scrolls the page, the mouse position is offset. I wondered if Ticket #388 addressed this particular issue, but it appears not. Does updateSize() still apply? Christopher Schmidt-2 wrote: > > On Thu, Jul 31, 2008 at 11:23:19AM -0400, Burgholzer,Robert wrote: >> Chris, >> Thanks for the response. I am using OL 2.6. The issue occurs not when >> the map window is resized (it stays the same), but when it's location is >> moved over on the page to accept a larger block of text in an adjacent >> table cell. > > Okay. calling map.updateSize() will still solve your problem. > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/drawing-shape-gets-offset-when-window-expands-tp1829763p3522766.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From CHRISTOPHER.M.HEIDT at saic.com Thu Aug 27 10:07:41 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] RegularPolygon Radius Message-ID: <1053B20F24D85F41B57F168351684E2204D7377F@0015-its-exmb04.us.saic.com> my users are going to want to supply a radius in a metric or english unit, but it looks like RegularPolygon is expecting degrees. So, my question is does OL have a builtin resource to convert my units? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090827/343cafb3/attachment.html From alessandro.ronchi at soasi.com Thu Aug 27 11:58:18 2009 From: alessandro.ronchi at soasi.com (Alessandro Ronchi) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Openstreetmap with 23032 srid json Message-ID: I need to show all my points I've stored on postgis together in a map. I'm able to show openstreetmap with my points, but they are out of their places. To make the point collection I use vectorformats (for django) that outputs a json. crs is empty. This is my html map: http://dpaste.com/86127/ I need to translate the 23032 (points) projection into wgs84 (openstreetmap) or do the inverse projection. How can I do that? Is it possible? -- Alessandro Ronchi SOASI Sviluppo Software e Sistemi Open Source http://www.soasi.com From CHRISTOPHER.M.HEIDT at saic.com Thu Aug 27 14:18:25 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] RegularPolygon Radius In-Reply-To: <1053B20F24D85F41B57F168351684E2204D7377F@0015-its-exmb04.us.saic.com> References: <1053B20F24D85F41B57F168351684E2204D7377F@0015-its-exmb04.us.saic.com> Message-ID: <1053B20F24D85F41B57F168351684E2204DC00C7@0015-its-exmb04.us.saic.com> Is it possible for OL to create a circle with a metric radius? Can i have a 100 meter circle around my target? ________________________________ From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Heidt, Christopher M. Sent: Thursday, August 27, 2009 10:08 AM To: users@openlayers.org Subject: [OpenLayers-Users] RegularPolygon Radius my users are going to want to supply a radius in a metric or english unit, but it looks like RegularPolygon is expecting degrees. So, my question is does OL have a builtin resource to convert my units? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090827/bb64a620/attachment.html From maren.kiehl at gmx.de Thu Aug 27 16:00:56 2009 From: maren.kiehl at gmx.de (Maren Kiehl) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] search feature to apposite attribute Message-ID: <4A96E5F8.1030707@gmx.de> Hi at all. I'm searching for a function which can identify a feature by searching an attribute-value. I have the name of a feature-attribute (feature.attributes.name) and wanna search the apposite feature. After that I wanna zoom to the center of this feature (map.setCenter(feature.geometry.getBounds().getCenterLonLat(), zoom);). I dont know how to set the feature by knowing the attribute. I get the attribute-value from a php-value in another page. By clicking a link on this page a window opens and shows a little map with the feature-point in the center of it. Everything works except for the last step. Does somebody know a function like this? Thanks for your support. Best regards, Maren From youness.elmedraoui at somei.fr Thu Aug 27 18:32:39 2009 From: youness.elmedraoui at somei.fr (YOUNESS ELMEDRAOUI) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] display date by scales Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/8a5251f4/attachment.html From florent.gravin at gmail.com Fri Aug 28 00:07:41 2009 From: florent.gravin at gmail.com (Florent Gravin) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] keep map displayed when loading on zoom Message-ID: Hi, Is there a way to keep the map displayed when you zoom (with bad resolution) until the new tiles with a better resolution are loaded. Like for exemple in Google Map where you NEVER have white map because data are loading.. i think we can't with opelayers... do you think we will soon ? what could be an alternative, keeping using OL. thks for advices Flo -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/745a4a96/attachment.html From arnd.wippermann at web.de Fri Aug 28 01:54:24 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] display date by scales In-Reply-To: Message-ID: perhaps minScale and maxScale will do. Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von YOUNESS ELMEDRAOUI Gesendet: Freitag, 28. August 2009 00:33 An: users@openlayers.org Betreff: [OpenLayers-Users] display date by scales Hi, i have a pblm with displaying data using scales. i tested a scales options in a layer definition, but it's not work. i'm using a cluster, fixed and bbox strategies: map = new OpenLayers.Map('map',{ maxExtent: bounds,maxResolution : "auto", units : "meters", projection : "epsg:27563" }); .... .... layer_wfs = new OpenLayers.Layer.Vector("WFS", { strategies: [ new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.Cluster(), new OpenLayers.Strategy.BBOX() ], protocol: new OpenLayers.Protocol.HTTP({ url: "http://localhost:81/cgi-bin/mapserv.exe?map=C:/OLWebSite/App_Data/olvbmapfi leOracleWFS.map&", params: { format: "WFS", service: "WFS", request: "GetFeature", srs: "epsg:27563", VERSION : "1.0.0", typename : 'EAU_EQUIP_PUBLIC' }, format: new OpenLayers.Format.GML() }), styleMap:new OpenLayers.StyleMap({ "default": WFSstyle, "select": { fillColor: "#8aeeef", strokeColor: "#32a8a9" } }) }, { extractAttributes:true, displayInLayerSwitcher: true, scales:[0,5000] }); anyone have an idea? thnks, Best regards, Youness ELMEDRAOUI Les informations figurant sur cet e-mail ont un caract?re strictement confidentiel et sont exclusivement adress?es au destinataire mentionn? ci-dessus.Tout usage, reproduction ou divulgation de cet e-mail est strictement interdit si vous n'en ?tes pas le destinataire.Dans ce cas, veuillez nous en avertir imm?diatement par la m?me voie et d?truire l'original. Merci -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/8d3cc654/attachment.html From arnd.wippermann at web.de Fri Aug 28 02:52:11 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Strange. Labels treated as numbers Message-ID: Hi, I want to label features by the attribute name ( label:"${name}" ). The labels should be 06.01, 06.10, 06.080 etc.. But displayed as labels are this: 6.01, 6.1, 6.08. Looking at the code I get no idea, where the place that cause this behaviour. Can someone help. Here is an example of this behaviour: http://gis.ibbeck.de/ginfo/apps/OL27Client/OL28ClientGis.asp?WMC=./data/WMC/ strange%20labels.wmc.xml The black and red labels comes from equal attributes. Only the point is changed with a comma. Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ From jimmy.aumard at gmail.com Fri Aug 28 03:28:59 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] StyleMap for point on polygon edition ? Message-ID: Hi list, When a polygon is in edition he as point for modify his form, I want to know if it's possible to put a style for this point and another style for "normal" point. Thanks and sorry for my English. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/822814e0/attachment.html From kmalkowski at sourcepark.de Fri Aug 28 03:35:58 2009 From: kmalkowski at sourcepark.de (kmalk) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] textlayer: popups with closebox In-Reply-To: <1234394961402-2312129.post@n2.nabble.com> References: <1234391155781-2311841.post@n2.nabble.com> <20090211224817.GM25534@metacarta.com> <1234394961402-2312129.post@n2.nabble.com> Message-ID: <1251444958400-3533136.post@n2.nabble.com> Matthias Woltering wrote: > > But when I try it, I get a strange z-index error. Also, with this method > it is not possible to deactivate one of the layers. > Hi! Although some time passed, I wanted to know: Did you find a workable solution? Thanks, Katarzyna -- View this message in context: http://n2.nabble.com/textlayer-popups-with-closebox-tp2311841p3533136.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From youness.elmedraoui at somei.fr Fri Aug 28 05:48:29 2009 From: youness.elmedraoui at somei.fr (YOUNESS ELMEDRAOUI) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] =?iso-8859-1?q?R=E9f=2E_=3A_AW=3A__display_dat?= =?iso-8859-1?q?e__by_scales?= In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/0f4aa9e2/attachment.html From x.zam at gmx.net Fri Aug 28 06:27:41 2009 From: x.zam at gmx.net (Max Stephan) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working Message-ID: <1251455261483-3533851.post@n2.nabble.com> Hi everybody, I`m having problems getting the cluster strategy to work. It simply makes no difference in terms of appearance if I add it to the VectorLayer or not. This is my code for the layer: vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ strategies: [ new OpenLayers.Strategy.Cluster({distance:20}) ], styleMap: vectorStyle2, maxResolution: 19}); The reason why I want to add it is that I have 480 Features alltogether on my map and even when zooming into some areas there are still around 150 features left in the bbox causing InternetExplorer to slow down (don?t know if it?s the same case with Firefox, but I gotta use IE to use ADODB-Connection to an Access Database in the Intranet). Those features are created and added step by step with an addVector-method I have implemented that reads out the coordinates and attributes of the database for a single feature and then jumps to the next entry and repeats the procedure till all features have been added. greets and thx in advance Max Stephan -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3533851.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kmalkowski at sourcepark.de Fri Aug 28 06:51:01 2009 From: kmalkowski at sourcepark.de (kmalk) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] textlayer: popups with closebox In-Reply-To: <1251444958400-3533136.post@n2.nabble.com> References: <1234391155781-2311841.post@n2.nabble.com> <20090211224817.GM25534@metacarta.com> <1234394961402-2312129.post@n2.nabble.com> <1251444958400-3533136.post@n2.nabble.com> Message-ID: <1251456661692-3533940.post@n2.nabble.com> By the way: If anyone wants the soultion for the post-question: add anchoredBubbleClass to textLayer for closeBehavior without changing html popup structure and showing only one popup at once OpenLayers.Feature.prototype.popupClass = OpenLayers.Popup.AnchoredBubble; OpenLayers.Layer.Text.prototype.markerClick = function(evt) { var sameMarkerClicked = (this == this.layer.selectedFeature); //does popups [OL array] exist AND was another marker clicked? if(this.popup==null && !sameMarkerClicked && this.layer.map.popups && this.layer.map.popups.length > 0){ for (var i=0; i < this.layer.map.popups.length; i++) { //yes - remove all popups [OL popup] this.layer.map.removePopup(this.layer.map.popups[i]); }//end for i }//end if popup(s) AND marker //does popup exist? if (this.popup) { this.popup.toggle(); //yes - toggle it } else { var myPopup = this.createPopup(true); //no - create one with closeButton this.layer.map.addPopup(myPopup); //and add it to map }//end if else this.popup this.layer.selectedFeature = (!sameMarkerClicked) ? this : null; OpenLayers.Event.stop(evt); }//end markerClick -- View this message in context: http://n2.nabble.com/textlayer-popups-with-closebox-tp2311841p3533940.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/1aa1a3d5/attachment.html From jerome.freyre at hispeed.ch Fri Aug 28 06:55:09 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working In-Reply-To: <1251455261483-3533851.post@n2.nabble.com> References: <1251455261483-3533851.post@n2.nabble.com> Message-ID: <1251456909300-3533951.post@n2.nabble.com> Hi Max, Personnally, when I use Cluster Strategy, I create separatly the strategy and the I activate it. var strat = new OpenLayers.Strategy.Cluster({distance:20}); vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ strategies: [ strategy ], styleMap: vectorStyle2, maxResolution: 19}); strat.activate(); Hope it will be usefull.... Sincerly, J?rome Max Stephan wrote: > > Hi everybody, > > I`m having problems getting the cluster strategy to work. It simply makes > no difference in terms of appearance if I add it to the VectorLayer or > not. > > This is my code for the layer: > vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ > strategies: [ > new OpenLayers.Strategy.Cluster({distance:20}) > ], > styleMap: vectorStyle2, maxResolution: 19}); > > The reason why I want to add it is that I have 480 Features alltogether on > my map and even when zooming into some areas there are still around 150 > features left in the bbox causing InternetExplorer to slow down (don?t > know if it?s the same case with Firefox, but I gotta use IE to use > ADODB-Connection to an Access Database in the Intranet). > > Those features are created and added step by step with an addVector-method > I have implemented that reads out the coordinates and attributes of the > database for a single feature and then jumps to the next entry and repeats > the procedure till all features have been added. > > greets and thx in advance > Max Stephan > > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3533951.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kmalkowski at sourcepark.de Fri Aug 28 07:06:52 2009 From: kmalkowski at sourcepark.de (kmalk) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] textlayer: popups with closebox In-Reply-To: <1251456661692-3533940.post@n2.nabble.com> References: <1234391155781-2311841.post@n2.nabble.com> <20090211224817.GM25534@metacarta.com> <1234394961402-2312129.post@n2.nabble.com> <1251444958400-3533136.post@n2.nabble.com> <1251456661692-3533940.post@n2.nabble.com> Message-ID: <1251457612280-3533985.post@n2.nabble.com> sry .. seems like I was a little to fast .. and my browser refreshing a bit to slow .. my solution is no solution :( .. gomen .. kmalk wrote: > > By the way: If anyone wants the soultion for the post-question .. > -- View this message in context: http://n2.nabble.com/textlayer-popups-with-closebox-tp2311841p3533985.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Fri Aug 28 08:01:36 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] StyleMap for point on polygon edition ? In-Reply-To: References: Message-ID: <4A97C720.1020306@mapgears.com> Hi Jimmy, Yes, it's possible. See the source code of this example, search for the 'styles' variable : http://openlayers.org/dev/examples/wfs-snap-split.html Regards, Alexandre Jimmy Aumard wrote: > Hi list, > > When a polygon is in edition he as point for modify his form, I want > to know if it's possible to put a style for this point and another > style for "normal" point. > > Thanks and sorry for my English. > > > Jim > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From x.zam at gmx.net Fri Aug 28 08:01:53 2009 From: x.zam at gmx.net (Max Stephan) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working In-Reply-To: <1251456909300-3533951.post@n2.nabble.com> References: <1251455261483-3533851.post@n2.nabble.com> <1251456909300-3533951.post@n2.nabble.com> Message-ID: <1251460913712-3534202.post@n2.nabble.com> Hi Jerome, thanks for your reply. I already tried that but it causes an error ("this.layer.events" is null or no object) and the map content isn?t shown. Any other ideas? Greets, Max Stephan Jerome Freyre wrote: > > Hi Max, > > Personnally, when I use Cluster Strategy, I create separatly the strategy > and the I activate it. > > > var strat = new OpenLayers.Strategy.Cluster({distance:20}); > vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ > strategies: [ > strategy > ], > styleMap: vectorStyle2, maxResolution: 19}); > strat.activate(); > > > Hope it will be usefull.... > > Sincerly, > J?rome > > > Max Stephan wrote: >> >> Hi everybody, >> >> I`m having problems getting the cluster strategy to work. It simply makes >> no difference in terms of appearance if I add it to the VectorLayer or >> not. >> >> This is my code for the layer: >> vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ >> strategies: [ >> new OpenLayers.Strategy.Cluster({distance:20}) >> ], >> styleMap: vectorStyle2, maxResolution: 19}); >> >> The reason why I want to add it is that I have 480 Features alltogether >> on my map and even when zooming into some areas there are still around >> 150 features left in the bbox causing InternetExplorer to slow down >> (don?t know if it?s the same case with Firefox, but I gotta use IE to use >> ADODB-Connection to an Access Database in the Intranet). >> >> Those features are created and added step by step with an >> addVector-method I have implemented that reads out the coordinates and >> attributes of the database for a single feature and then jumps to the >> next entry and repeats the procedure till all features have been added. >> >> greets and thx in advance >> Max Stephan >> >> >> > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534202.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.freyre at hispeed.ch Fri Aug 28 08:10:45 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working In-Reply-To: <1251460913712-3534202.post@n2.nabble.com> References: <1251455261483-3533851.post@n2.nabble.com> <1251456909300-3533951.post@n2.nabble.com> <1251460913712-3534202.post@n2.nabble.com> Message-ID: <1251461445321-3534250.post@n2.nabble.com> Can you also show us your method that parse and add the feature to the layer? I think another good way to explore is to use firefox and firebug. With firebug, you can add breakpoints and the go step-by-step... Whith that, you should put a breakpoint into your method that parse and add features to layer and another one into the cluster strategy (Think to not use the OpenLayers minimised but the complete source) to see if software run into the class correctly... Hope my english is quite understandable.... :) J?rome Le 28 ao?t 09 ? 14:01, Max Stephan (via Nabble) a ?crit : > Hi Jerome, > > thanks for your reply. I already tried that but it causes an error > ("this.layer.events" is null or no object) and the map content isn? > ?t shown. > > Any other ideas? > > Greets, > Max Stephan > Jerome Freyre wrote: > Hi Max, > > Personnally, when I use Cluster Strategy, I create separatly the > strategy and the I activate it. > > > var strat = new OpenLayers.Strategy.Cluster({distance:20}); > vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ > strategies: [ > strategy > ], > styleMap: vectorStyle2, maxResolution: 19}); > strat.activate(); > > > Hope it will be usefull.... > > Sincerly, > J??rome > > Max Stephan wrote: > Hi everybody, > > I`m having problems getting the cluster strategy to work. It simply > makes no difference in terms of appearance if I add it to the > VectorLayer or not. > > This is my code for the layer: > vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ > strategies: [ > new OpenLayers.Strategy.Cluster({distance:20}) > ], > styleMap: vectorStyle2, maxResolution: 19}); > > > The reason why I want to add it is that I have 480 Features > alltogether on my map and even when zooming into some areas there > are still around 150 features left in the bbox causing > InternetExplorer to slow down (don??t know if it??s the same case > with Firefox, but I gotta use IE to use ADODB-Connection to an > Access Database in the Intranet). > > Those features are created and added step by step with an addVector- > method I have implemented that reads out the coordinates and > attributes of the database for a single feature and then jumps to > the next entry and repeats the procedure till all features have been > added. > > greets and thx in advance > Max Stephan > > > View message @ http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534202.html > To unsubscribe from Re: Cluster strategy not working, click here. > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534250.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/241fe674/attachment.html From x.zam at gmx.net Fri Aug 28 08:23:59 2009 From: x.zam at gmx.net (Max Stephan) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working In-Reply-To: <1251461445321-3534250.post@n2.nabble.com> References: <1251455261483-3533851.post@n2.nabble.com> <1251456909300-3533951.post@n2.nabble.com> <1251460913712-3534202.post@n2.nabble.com> <1251461445321-3534250.post@n2.nabble.com> Message-ID: <1251462239368-3534315.post@n2.nabble.com> Hi Jerome, I?d be very happy if I could use Firebug in this case (very nice tool for debugging and for tracking the DOM in my opinion) but as I mentioned above: I?m using an ActiveX-Control for reading out the Access-Database and for sending further requests to it. And this method is only possible in Internet Explorer for which I haven?t found such a powerful debugging tool as firebug (firebug lite wasn?t useful). Ok, now here?s the loop, which is adding the vector-features to my vector-layer: for (var i=0; i > Can you also show us your method that parse and add the feature to the > layer? > > I think another good way to explore is to use firefox and firebug. > > With firebug, you can add breakpoints and the go step-by-step... > > > Whith that, you should put a breakpoint into your method that parse > and add features to layer and another one into the cluster strategy > (Think to not use the OpenLayers minimised but the complete source) to > see if software run into the class correctly... > > > Hope my english is quite understandable.... :) > > > > J?rome > > > > Le 28 ao?t 09 ? 14:01, Max Stephan (via Nabble) a ?crit : > >> Hi Jerome, >> >> thanks for your reply. I already tried that but it causes an error >> ("this.layer.events" is null or no object) and the map content isn? >> ?t shown. >> >> Any other ideas? >> >> Greets, >> Max Stephan >> Jerome Freyre wrote: >> Hi Max, >> >> Personnally, when I use Cluster Strategy, I create separatly the >> strategy and the I activate it. >> >> >> var strat = new OpenLayers.Strategy.Cluster({distance:20}); >> vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ >> strategies: [ >> strategy >> ], >> styleMap: vectorStyle2, maxResolution: 19}); >> strat.activate(); >> >> >> Hope it will be usefull.... >> >> Sincerly, >> J??rome >> >> Max Stephan wrote: >> Hi everybody, >> >> I`m having problems getting the cluster strategy to work. It simply >> makes no difference in terms of appearance if I add it to the >> VectorLayer or not. >> >> This is my code for the layer: >> vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ >> strategies: [ >> new OpenLayers.Strategy.Cluster({distance:20}) >> ], >> styleMap: vectorStyle2, maxResolution: 19}); >> >> >> The reason why I want to add it is that I have 480 Features >> alltogether on my map and even when zooming into some areas there >> are still around 150 features left in the bbox causing >> InternetExplorer to slow down (don??t know if it??s the same case >> with Firefox, but I gotta use IE to use ADODB-Connection to an >> Access Database in the Intranet). >> >> Those features are created and added step by step with an addVector- >> method I have implemented that reads out the coordinates and >> attributes of the database for a single feature and then jumps to >> the next entry and repeats the procedure till all features have been >> added. >> >> greets and thx in advance >> Max Stephan >> >> >> View message @ >> http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534202.html >> To unsubscribe from Re: Cluster strategy not working, click here. >> > > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534315.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jimmy.aumard at gmail.com Fri Aug 28 08:51:50 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] StyleMap for point on polygon edition ? In-Reply-To: <4A97C720.1020306@mapgears.com> References: <4A97C720.1020306@mapgears.com> Message-ID: Hi Alexandre, It's not what I want (I explain that very badly sorry) I have point with style (external graphic) and I have polygon. It's possible to modify polygons but when it is in modification he have point who take external graphic but I want who take a normal style point. I hope I'm more clear. Thanks Jim 2009/8/28 Alexandre Dube > Hi Jimmy, > > Yes, it's possible. See the source code of this example, search for the > 'styles' variable : > > http://openlayers.org/dev/examples/wfs-snap-split.html > > Regards, > > Alexandre > > Jimmy Aumard wrote: > >> Hi list, >> >> When a polygon is in edition he as point for modify his form, I want to >> know if it's possible to put a style for this point and another style for >> "normal" point. >> >> Thanks and sorry for my English. >> >> >> Jim >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/29da3504/attachment.html From shawn at niagarafalls.ca Fri Aug 28 09:26:45 2009 From: shawn at niagarafalls.ca (Shawn Oatley) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working Message-ID: <4A97A2D6020000160018C5B9@nfgw.niagarafalls.ca> I don't have any input regarding the code, but I have worked with IE 8. Not sure if that is an option, but if it is, they have a powerful script debugger that allows you to step through the code also. Shawn >>> Max Stephan 08/28/09 8:24 AM >>> Hi Jerome, I?d be very happy if I could use Firebug in this case (very nice tool for debugging and for tracking the DOM in my opinion) but as I mentioned above: I?m using an ActiveX-Control for reading out the Access-Database and for sending further requests to it. And this method is only possible in Internet Explorer for which I haven?t found such a powerful debugging tool as firebug (firebug lite wasn?t useful). Ok, now here?s the loop, which is adding the vector-features to my vector-layer: for (var i=0; i > Can you also show us your method that parse and add the feature to the > layer? > > I think another good way to explore is to use firefox and firebug. > > With firebug, you can add breakpoints and the go step-by-step... > > > Whith that, you should put a breakpoint into your method that parse > and add features to layer and another one into the cluster strategy > (Think to not use the OpenLayers minimised but the complete source) to > see if software run into the class correctly... > > > Hope my english is quite understandable.... :) > > > > J?rome > > > > Le 28 ao?t 09 ? 14:01, Max Stephan (via Nabble) a ?crit : > >> Hi Jerome, >> >> thanks for your reply. I already tried that but it causes an error >> ("this.layer.events" is null or no object) and the map content isn? >> ?t shown. >> >> Any other ideas? >> >> Greets, >> Max Stephan >> Jerome Freyre wrote: >> Hi Max, >> >> Personnally, when I use Cluster Strategy, I create separatly the >> strategy and the I activate it. >> >> >> var strat = new OpenLayers.Strategy.Cluster({distance:20}); >> vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ >> strategies: [ >> strategy >> ], >> styleMap: vectorStyle2, maxResolution: 19}); >> strat.activate(); >> >> >> Hope it will be usefull.... >> >> Sincerly, >> J??rome >> >> Max Stephan wrote: >> Hi everybody, >> >> I`m having problems getting the cluster strategy to work. It simply >> makes no difference in terms of appearance if I add it to the >> VectorLayer or not. >> >> This is my code for the layer: >> vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ >> strategies: [ >> new OpenLayers.Strategy.Cluster({distance:20}) >> ], >> styleMap: vectorStyle2, maxResolution: 19}); >> >> >> The reason why I want to add it is that I have 480 Features >> alltogether on my map and even when zooming into some areas there >> are still around 150 features left in the bbox causing >> InternetExplorer to slow down (don??t know if it??s the same case >> with Firefox, but I gotta use IE to use ADODB-Connection to an >> Access Database in the Intranet). >> >> Those features are created and added step by step with an addVector- >> method I have implemented that reads out the coordinates and >> attributes of the database for a single feature and then jumps to >> the next entry and repeats the procedure till all features have been >> added. >> >> greets and thx in advance >> Max Stephan >> >> >> View message @ >> http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534202.html >> To unsubscribe from Re: Cluster strategy not working, click here. >> > > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534315.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From adube at mapgears.com Fri Aug 28 09:33:32 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] StyleMap for point on polygon edition ? In-Reply-To: References: <4A97C720.1020306@mapgears.com> Message-ID: <4A97DCAC.4030506@mapgears.com> Now I understand. Take a look at the addUniqueValueRules function in the following example. This might help. http://openlayers.org/dev/examples/styles-unique.html Regards, Alexandre Jimmy Aumard wrote: > Hi Alexandre, > > It's not what I want (I explain that very badly sorry) I have point > with style (external graphic) and I have polygon. > > It's possible to modify polygons but when it is in modification he > have point who take external graphic but I want who take a normal > style point. > > I hope I'm more clear. > > Thanks > > Jim > > 2009/8/28 Alexandre Dube > > > Hi Jimmy, > > Yes, it's possible. See the source code of this example, search > for the 'styles' variable : > > http://openlayers.org/dev/examples/wfs-snap-split.html > > Regards, > > Alexandre > > Jimmy Aumard wrote: > > Hi list, > > When a polygon is in edition he as point for modify his form, > I want to know if it's possible to put a style for this point > and another style for "normal" point. > > Thanks and sorry for my English. > > > Jim > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -- Alexandre Dub? Mapgears www.mapgears.com From crschmidt at metacarta.com Fri Aug 28 09:43:32 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Strange. Labels treated as numbers In-Reply-To: References: Message-ID: <20090828134331.GB24820@metacarta.com> On Fri, Aug 28, 2009 at 08:52:11AM +0200, Arnd Wippermann wrote: > Hi, > > I want to label features by the attribute name ( label:"${name}" ). The > labels should be 06.01, 06.10, 06.080 etc.. But displayed as labels are > this: 6.01, 6.1, 6.08. > > Looking at the code I get no idea, where the place that cause this > behaviour. Can someone help. > > Here is an example of this behaviour: > http://gis.ibbeck.de/ginfo/apps/OL27Client/OL28ClientGis.asp?WMC=./data/WMC/ > strange%20labels.wmc.xml > > The black and red labels comes from equal attributes. Only the point is > changed with a comma. Looks like the text is being treated as a number at some point. Specifically: OpenLayers.Style.createLiteral = function(value, context, feature) { if (typeof value == "string" && value.indexOf("${") != -1) { value = OpenLayers.String.format(value, context, [feature]); value = (isNaN(value) || !value) ? value : parseFloat(value); } return value; }; Seems like that's slightly overzealous; not sure why we're parseFloating the value? (This comes down, to an extent, to OpenLayers not having strongly typed data parsing, so we don't know that something should or shouldn't be a number.) I'd be in favor of dropping the parseFloat entirely, but I'm not the one who put it there :) (Okay, literally speaking, I *did* put it there, with my commit in r5429, but I don't think I wrote that code myself.) Andreas, can you explain why this is here? And is it possible we could somehow make it optional? -- Christopher Schmidt MetaCarta From CHRISTOPHER.M.HEIDT at saic.com Fri Aug 28 09:54:32 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working References: <4A97A2D6020000160018C5B9@nfgw.niagarafalls.ca> Message-ID: <1053B20F24D85F41B57F168351684E22039DF709@0015-its-exmb04.us.saic.com> i believe you need to add all your features at once, so instead of looping the layer.addFeatures() call you need to build all your features into an array and then call layer.addFeatures() once. -----Original Message----- From: users-bounces@openlayers.org on behalf of Shawn Oatley Sent: Fri 8/28/2009 9:26 AM To: x.zam@gmx.net; users@openlayers.org Subject: Re: [OpenLayers-Users] Cluster strategy not working I don't have any input regarding the code, but I have worked with IE 8. Not sure if that is an option, but if it is, they have a powerful script debugger that allows you to step through the code also. Shawn >>> Max Stephan 08/28/09 8:24 AM >>> Hi Jerome, I?d be very happy if I could use Firebug in this case (very nice tool for debugging and for tracking the DOM in my opinion) but as I mentioned above: I?m using an ActiveX-Control for reading out the Access-Database and for sending further requests to it. And this method is only possible in Internet Explorer for which I haven?t found such a powerful debugging tool as firebug (firebug lite wasn?t useful). Ok, now here?s the loop, which is adding the vector-features to my vector-layer: for (var i=0; i > Can you also show us your method that parse and add the feature to the > layer? > > I think another good way to explore is to use firefox and firebug. > > With firebug, you can add breakpoints and the go step-by-step... > > > Whith that, you should put a breakpoint into your method that parse > and add features to layer and another one into the cluster strategy > (Think to not use the OpenLayers minimised but the complete source) to > see if software run into the class correctly... > > > Hope my english is quite understandable.... :) > > > > J?rome > > > > Le 28 ao?t 09 ? 14:01, Max Stephan (via Nabble) a ?crit : > >> Hi Jerome, >> >> thanks for your reply. I already tried that but it causes an error >> ("this.layer.events" is null or no object) and the map content isn? >> ?t shown. >> >> Any other ideas? >> >> Greets, >> Max Stephan >> Jerome Freyre wrote: >> Hi Max, >> >> Personnally, when I use Cluster Strategy, I create separatly the >> strategy and the I activate it. >> >> >> var strat = new OpenLayers.Strategy.Cluster({distance:20}); >> vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ >> strategies: [ >> strategy >> ], >> styleMap: vectorStyle2, maxResolution: 19}); >> strat.activate(); >> >> >> Hope it will be usefull.... >> >> Sincerly, >> J??rome >> >> Max Stephan wrote: >> Hi everybody, >> >> I`m having problems getting the cluster strategy to work. It simply >> makes no difference in terms of appearance if I add it to the >> VectorLayer or not. >> >> This is my code for the layer: >> vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ >> strategies: [ >> new OpenLayers.Strategy.Cluster({distance:20}) >> ], >> styleMap: vectorStyle2, maxResolution: 19}); >> >> >> The reason why I want to add it is that I have 480 Features >> alltogether on my map and even when zooming into some areas there >> are still around 150 features left in the bbox causing >> InternetExplorer to slow down (don??t know if it??s the same case >> with Firefox, but I gotta use IE to use ADODB-Connection to an >> Access Database in the Intranet). >> >> Those features are created and added step by step with an addVector- >> method I have implemented that reads out the coordinates and >> attributes of the database for a single feature and then jumps to >> the next entry and repeats the procedure till all features have been >> added. >> >> greets and thx in advance >> Max Stephan >> >> >> View message @ >> http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534202.html >> To unsubscribe from Re: Cluster strategy not working, click here. >> > > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534315.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/d58f16d8/attachment.html From alessandro.ronchi at soasi.com Fri Aug 28 10:09:22 2009 From: alessandro.ronchi at soasi.com (Alessandro Ronchi) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Openstreetmap with 23032 srid json In-Reply-To: References: Message-ID: It's not possible? 2009/8/27 Alessandro Ronchi > I need to show all my points I've stored on postgis together in a map. > I'm able to show openstreetmap with my points, but they are out of their > places. > > To make the point collection I use vectorformats (for django) that > outputs a json. > > crs is empty. > > This is my html map: > http://dpaste.com/86127/ > > I need to translate the 23032 (points) projection into wgs84 > (openstreetmap) or do the inverse projection. > > How can I do that? > Is it possible? > > > -- > Alessandro Ronchi > > SOASI > Sviluppo Software e Sistemi Open Source > http://www.soasi.com > -- Alessandro Ronchi SOASI Sviluppo Software e Sistemi Open Source http://www.soasi.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/36461510/attachment.html From jerome.freyre at hispeed.ch Fri Aug 28 10:19:18 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working In-Reply-To: <1053B20F24D85F41B57F168351684E22039DF709@0015-its-exmb04.us.saic.com> References: <1251455261483-3533851.post@n2.nabble.com> <4A97A2D6020000160018C5B9@nfgw.niagarafalls.ca> <1053B20F24D85F41B57F168351684E22039DF709@0015-its-exmb04.us.saic.com> Message-ID: <1251469158121-3534984.post@n2.nabble.com> Heidtmare is right and faster than me.... :D Here is a script working var map, wfs; var styleMap1 = new OpenLayers.StyleMap({ "default": new OpenLayers.Style( { fillColor: "#0000FF", strokeColor: "#0000FF", pointRadius: 6 } ) }); function init(){ map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); map.addLayer(wms); map.zoomToMaxExtent(); var strat = new OpenLayers.Strategy.Cluster({distance:20}); vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ strategies: [ strat ], styleMap: styleMap1, maxResolution: 19}); strat.activate(); map.addLayers([vectorLayer]); /** * Generate datas // Simulate your data access */ var dx = 3; var dy = 3; var px, py; featuresToBeClustered = []; for(var x=-45; x<=45; x+=dx) { for(var y=-22.5; y<=22.5; y+=dy) { px = x + (2 * dx * (Math.random() - 0.5)); py = y + (2 * dy * (Math.random() - 0.5)); featuresToBeClustered.push({ 'lonlat':new OpenLayers.LonLat(px,py), 'id':px+' '+py }); } } /** * Populate the array of feature */ var arrayOfFeatures = []; for (var i=0; i > i believe you need to add all your features at once, > so instead of looping the layer.addFeatures() call > you need to build all your features into an array and then call > layer.addFeatures() once. > > > -----Original Message----- > From: users-bounces@openlayers.org on behalf of Shawn Oatley > Sent: Fri 8/28/2009 9:26 AM > To: x.zam@gmx.net; users@openlayers.org > Subject: Re: [OpenLayers-Users] Cluster strategy not working > > I don't have any input regarding the code, but I have worked with IE 8. > Not sure if that is an option, but if it is, they have a powerful script > debugger that allows you to step through the code also. > > Shawn > >>>> Max Stephan 08/28/09 8:24 AM >>> > > Hi Jerome, > > I?d be very happy if I could use Firebug in this case (very nice tool > for > debugging and for tracking the DOM in my opinion) but as I mentioned > above: > I?m using an ActiveX-Control for reading out the Access-Database and for > sending further requests to it. And this method is only possible in > Internet > Explorer for which I haven?t found such a powerful debugging tool as > firebug > (firebug lite wasn?t useful). > > Ok, now here?s the loop, which is adding the vector-features to my > vector-layer: > for (var i=0; i addVector(vectorLayer, mestArray[i][1], mestArray[i][0]); > } > The first parameter is the target-layer, the second is a lonlat-object > and > the third is an attribute for the features. > > And here?s the addVector-function: > function addVector(layer, lonlat, mestId){ > var geometryObjekt = new > OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat); > var vectorObjekt = new OpenLayers.Feature.Vector(geometryObjekt); > vectorObjekt.attributes.mest = mestId; > layer.addFeatures([vectorObjekt]); > } > > And concerning your english: No need to be worried. I?m understanding > everything. > > Thx in advance > Max Stephan > > Jerome Freyre wrote: >> >> Can you also show us your method that parse and add the feature to the > >> layer? >> >> I think another good way to explore is to use firefox and firebug. >> >> With firebug, you can add breakpoints and the go step-by-step... >> >> >> Whith that, you should put a breakpoint into your method that parse >> and add features to layer and another one into the cluster strategy >> (Think to not use the OpenLayers minimised but the complete source) to > >> see if software run into the class correctly... >> >> >> Hope my english is quite understandable.... :) >> >> >> >> J?rome >> >> >> >> Le 28 ao?t 09 ? 14:01, Max Stephan (via Nabble) a ?crit : >> >>> Hi Jerome, >>> >>> thanks for your reply. I already tried that but it causes an error >>> ("this.layer.events" is null or no object) and the map content isn? >>> ?t shown. >>> >>> Any other ideas? >>> >>> Greets, >>> Max Stephan >>> Jerome Freyre wrote: >>> Hi Max, >>> >>> Personnally, when I use Cluster Strategy, I create separatly the >>> strategy and the I activate it. >>> >>> >>> var strat = new > OpenLayers.Strategy.Cluster({distance:20}); >>> vectorLayer = new > OpenLayers.Layer.Vector("Vektorlayer",{ >>> strategies: [ >>> strategy >>> ], >>> styleMap: vectorStyle2, maxResolution: 19}); >>> strat.activate(); >>> >>> >>> Hope it will be usefull.... >>> >>> Sincerly, >>> J??rome >>> >>> Max Stephan wrote: >>> Hi everybody, >>> >>> I`m having problems getting the cluster strategy to work. It simply >>> makes no difference in terms of appearance if I add it to the >>> VectorLayer or not. >>> >>> This is my code for the layer: >>> vectorLayer = new > OpenLayers.Layer.Vector("Vektorlayer",{ >>> strategies: [ >>> new > OpenLayers.Strategy.Cluster({distance:20}) >>> ], >>> styleMap: vectorStyle2, maxResolution: 19}); >>> >>> >>> The reason why I want to add it is that I have 480 Features >>> alltogether on my map and even when zooming into some areas there >>> are still around 150 features left in the bbox causing >>> InternetExplorer to slow down (don??t know if it??s the same case >>> with Firefox, but I gotta use IE to use ADODB-Connection to an >>> Access Database in the Intranet). >>> >>> Those features are created and added step by step with an addVector- >>> method I have implemented that reads out the coordinates and >>> attributes of the database for a single feature and then jumps to >>> the next entry and repeats the procedure till all features have been > >>> added. >>> >>> greets and thx in advance >>> Max Stephan >>> >>> >>> View message @ >>> > http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534202.html >>> To unsubscribe from Re: Cluster strategy not working, click here. >>> >> >> >> > > -- > View this message in context: > http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534315.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 > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3534984.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.freyre at hispeed.ch Fri Aug 28 10:23:13 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Cluster strategy not working In-Reply-To: <1251469158121-3534984.post@n2.nabble.com> References: <1251455261483-3533851.post@n2.nabble.com> <4A97A2D6020000160018C5B9@nfgw.niagarafalls.ca> <1053B20F24D85F41B57F168351684E22039DF709@0015-its-exmb04.us.saic.com> <1251469158121-3534984.post@n2.nabble.com> Message-ID: <1251469393074-3535010.post@n2.nabble.com> Heidtmare is right and faster than me.... :D Have a look to http://openlayers.org/dev/examples/strategy-cluster.html to modify the size of cluster depending of the number of feature they represent Here is a script that is working. And think that you can PS: Sorry for the "double post" I push the wrong button :) var map, wfs; var styleMap1 = new OpenLayers.StyleMap({ "default": new OpenLayers.Style( { fillColor: "#0000FF", strokeColor: "#0000FF", pointRadius: 6 } ) }); function init(){ map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); map.addLayer(wms); map.zoomToMaxExtent(); var strat = new OpenLayers.Strategy.Cluster({distance:20}); vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ strategies: [ strat ], styleMap: styleMap1, maxResolution: 19}); strat.activate(); map.addLayers([vectorLayer]); /** * Generate datas // Simulate your data access */ var dx = 3; var dy = 3; var px, py; featuresToBeClustered = []; for(var x=-45; x<=45; x+=dx) { for(var y=-22.5; y<=22.5; y+=dy) { px = x + (2 * dx * (Math.random() - 0.5)); py = y + (2 * dy * (Math.random() - 0.5)); featuresToBeClustered.push({ 'lonlat':new OpenLayers.LonLat(px,py), 'id':px+' '+py }); } } /** * Populate the array of feature */ var arrayOfFeatures = []; for (var i=0; i > i believe you need to add all your features at once, > so instead of looping the layer.addFeatures() call > you need to build all your features into an array and then call > layer.addFeatures() once. > > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3535010.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Fri Aug 28 10:23:20 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:48 2010 Subject: [OpenLayers-Users] Openstreetmap with 23032 srid json In-Reply-To: References: Message-ID: <20090828142320.GC24820@metacarta.com> On Fri, Aug 28, 2009 at 04:09:22PM +0200, Alessandro Ronchi wrote: > It's not possible? It is possible. -- Chris > 2009/8/27 Alessandro Ronchi > > > I need to show all my points I've stored on postgis together in a map. > > I'm able to show openstreetmap with my points, but they are out of their > > places. > > > > To make the point collection I use vectorformats (for django) that > > outputs a json. > > > > crs is empty. > > > > This is my html map: > > http://dpaste.com/86127/ > > > > How can I do that? > > Is it possible? > > > > > > -- > > Alessandro Ronchi > > > > SOASI > > Sviluppo Software e Sistemi Open Source > > http://www.soasi.com > > > > > > -- > Alessandro Ronchi > > SOASI > Sviluppo Software e Sistemi Open Source > http://www.soasi.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From carlos.lacerda at gmail.com Fri Aug 28 10:36:41 2009 From: carlos.lacerda at gmail.com (Carlos Lacerda) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Control.GetFeature implementation Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090828/4fd3c3e3/attachment.html From alessio.dilorenzo at gmail.com Fri Aug 28 11:49:04 2009 From: alessio.dilorenzo at gmail.com (AlessioDL) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Save Vector drawings in PostGIS Message-ID: <1251474544848-3535558.post@n2.nabble.com> Hi, I'm looking for a strategy to use OL as an editor to populate a polygon postgis layer. I can't use WFS-T because I have to work with UMN-Mapserver that doesn't support this specification. What I would like to do is this: (1) use the drawing tools to create my vector features on the map (2) capture the WKT string for these drawings in a form field (3) send an insert query to postgis via PHP The (1) and (3) are ok for me, but I need some help with the (2). Can you give me some suggestions? Is my "strategy" correct in your opinion? TIA, alessio -- View this message in context: http://n2.nabble.com/Save-Vector-drawings-in-PostGIS-tp3535558p3535558.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Fri Aug 28 12:19:26 2009 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Control.GetFeature implementation In-Reply-To: References: Message-ID: <4A98038E.6070702@osgis.nl> 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 bartvde@osgis.nl http://www.osgis.nl From iacovlev.pavel at gmail.com Fri Aug 28 12:27:39 2009 From: iacovlev.pavel at gmail.com (Pavel Iacovlev) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Save Vector drawings in PostGIS In-Reply-To: <1251474544848-3535558.post@n2.nabble.com> References: <1251474544848-3535558.post@n2.nabble.com> Message-ID: <2a37f67a0908280927g1ecc0a29v31fafc0f7c5efcf8@mail.gmail.com> No forms are needed use AXAJ. Here are some examples: http://pastie.org/597897 and a PHP WKT geometry validation class http://pastie.org/597898 On Fri, Aug 28, 2009 at 6:49 PM, AlessioDL wrote: > > Hi, > > I'm looking for a strategy to use OL as an editor to populate a polygon > postgis layer. > I can't use WFS-T because I have to work with UMN-Mapserver that doesn't > support this specification. > > What I would like to do is this: > > (1) use the drawing tools to create my vector features on the map > (2) capture the WKT string for these drawings in a form field > (3) send an insert query to postgis via PHP > > The (1) and (3) are ok for me, but I need some help with the (2). > Can you give me some suggestions? > Is my "strategy" correct in your opinion? > > TIA, alessio > -- > View this message in context: http://n2.nabble.com/Save-Vector-drawings-in-PostGIS-tp3535558p3535558.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- http://iap.md, The future is open From pagameba at gmail.com Fri Aug 28 13:16:21 2009 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Save Vector drawings in PostGIS In-Reply-To: <1251474544848-3535558.post@n2.nabble.com> References: <1251474544848-3535558.post@n2.nabble.com> Message-ID: <58B627D9-447F-457E-BA72-683FC42F3019@gmail.com> Try using tinyows, it is a lightweight c-based cgi that implements WFS with transaction support and is backed by a postgres/postgis database. The WFS protocol in OpenLayers seems to work perfectly with it, use the Save strategy to ensure every edit gets saved to the db and you can use mapserver to draw maps with features from the db. Cheers Paul On 2009-08-28, at 11:49 AM, AlessioDL wrote: > > Hi, > > I'm looking for a strategy to use OL as an editor to populate a > polygon > postgis layer. > I can't use WFS-T because I have to work with UMN-Mapserver that > doesn't > support this specification. > > What I would like to do is this: > > (1) use the drawing tools to create my vector features on the map > (2) capture the WKT string for these drawings in a form field > (3) send an insert query to postgis via PHP > > The (1) and (3) are ok for me, but I need some help with the (2). > Can you give me some suggestions? > Is my "strategy" correct in your opinion? > > TIA, alessio > -- > View this message in context: http://n2.nabble.com/Save-Vector-drawings-in-PostGIS-tp3535558p3535558.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From adube at mapgears.com Fri Aug 28 13:47:58 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Save Vector drawings in PostGIS In-Reply-To: <58B627D9-447F-457E-BA72-683FC42F3019@gmail.com> References: <1251474544848-3535558.post@n2.nabble.com> <58B627D9-447F-457E-BA72-683FC42F3019@gmail.com> Message-ID: <4A98184E.9040206@mapgears.com> Here's an old demo using OpenLayers + TinyOWS for WFS-T. This might give you some ideas. http://dev4.mapgears.com/bdga/bdgaWFS-T.html Alexandre Paul Spencer wrote: > Try using tinyows, it is a lightweight c-based cgi that implements WFS > with transaction support and is backed by a postgres/postgis > database. The WFS protocol in OpenLayers seems to work perfectly with > it, use the Save strategy to ensure every edit gets saved to the db > and you can use mapserver to draw maps with features from the db. > > Cheers > > Paul > > On 2009-08-28, at 11:49 AM, AlessioDL wrote: > > >> Hi, >> >> I'm looking for a strategy to use OL as an editor to populate a >> polygon >> postgis layer. >> I can't use WFS-T because I have to work with UMN-Mapserver that >> doesn't >> support this specification. >> >> What I would like to do is this: >> >> (1) use the drawing tools to create my vector features on the map >> (2) capture the WKT string for these drawings in a form field >> (3) send an insert query to postgis via PHP >> >> The (1) and (3) are ok for me, but I need some help with the (2). >> Can you give me some suggestions? >> Is my "strategy" correct in your opinion? >> >> TIA, alessio >> -- >> View this message in context: http://n2.nabble.com/Save-Vector-drawings-in-PostGIS-tp3535558p3535558.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 > -- Alexandre Dub? Mapgears www.mapgears.com From alessio.dilorenzo at gmail.com Fri Aug 28 14:42:08 2009 From: alessio.dilorenzo at gmail.com (AlessioDL) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Save Vector drawings in PostGIS In-Reply-To: <4A98184E.9040206@mapgears.com> References: <1251474544848-3535558.post@n2.nabble.com> <58B627D9-447F-457E-BA72-683FC42F3019@gmail.com> <4A98184E.9040206@mapgears.com> Message-ID: <1251484928809-3536621.post@n2.nabble.com> Thank you very much guys for your great and super-fast answers!!! Now I have a lot of example to study :-D -- View this message in context: http://n2.nabble.com/Save-Vector-drawings-in-PostGIS-tp3535558p3536621.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From asseltine1 at hotmail.com Fri Aug 28 15:52:29 2009 From: asseltine1 at hotmail.com (kennyken) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] How to find shapefile's projection? Message-ID: <1251489149166-3537078.post@n2.nabble.com> So, I have a shapefile. There's a .dbf, .prj, .sbn, .sbx, .shp, and a .shx file associated with it. Inside the .prj file, there's this. PROJCS["NAD_1983_UTM_Zone_17N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-81.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] Is it possible to take that, and figure out what the EPSG value would be? Any help is appreciated, thanks. -- View this message in context: http://n2.nabble.com/How-to-find-shapefile-s-projection-tp3537078p3537078.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tobias.wendorff at uni-dortmund.de Fri Aug 28 16:05:18 2009 From: tobias.wendorff at uni-dortmund.de (Tobias Wendorff) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] How to find shapefile's projection? In-Reply-To: <1251489149166-3537078.post@n2.nabble.com> References: <1251489149166-3537078.post@n2.nabble.com> Message-ID: <4A98387E.6020509@uni-dortmund.de> It's EPSG:26917. See: http://svn.osgeo.org/metacrs/proj/trunk/proj/nad/epsg kennyken schrieb: > So, I have a shapefile. There's a .dbf, .prj, .sbn, .sbx, .shp, and a .shx > file associated with it. Inside the .prj file, there's this. > > PROJCS["NAD_1983_UTM_Zone_17N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-81.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] > > Is it possible to take that, and figure out what the EPSG value would be? > Any help is appreciated, thanks. From ahayes at gcrc.carleton.ca Fri Aug 28 16:15:33 2009 From: ahayes at gcrc.carleton.ca (Amos Hayes) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] How to find shapefile's projection? In-Reply-To: <4A98387E.6020509@uni-dortmund.de> References: <1251489149166-3537078.post@n2.nabble.com> <4A98387E.6020509@uni-dortmund.de> Message-ID: You can also search the incredibly useful spatialreference.org for something like "NAD83 17N". Interestingly, searching for "NAD_1983_UTM_Zone_17N" doesn't turn up any results, despite being a string that exists in the PRJ file description you can download from that site for EPSG:26917. I'm guessing the various format outputs are all auto-generated and it's a bit tricky to search them all when they are built on the fly. Too bad since it would be handy to help identify EPSG codes from .PRJ files. P.S. Many thanks to cschmidt for helping to create that site. Very handy. -- Amos Hayes Geomatics and Cartographic Research Centre Carleton University ahayes@gcrc.carleton.ca +1.613.520.2600x8179 On 28-Aug-09, at 4:05 PM, Tobias Wendorff wrote: > It's EPSG:26917. > > See: > http://svn.osgeo.org/metacrs/proj/trunk/proj/nad/epsg > > > kennyken schrieb: >> So, I have a shapefile. There's a .dbf, .prj, .sbn, .sbx, .shp, and >> a .shx >> file associated with it. Inside the .prj file, there's this. >> >> PROJCS["NAD_1983_UTM_Zone_17N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-81.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] >> >> Is it possible to take that, and figure out what the EPSG value >> would be? >> Any help is appreciated, thanks. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Fri Aug 28 16:38:26 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] How to find shapefile's projection? In-Reply-To: References: <1251489149166-3537078.post@n2.nabble.com> <4A98387E.6020509@uni-dortmund.de> Message-ID: <20090828203826.GE24820@metacarta.com> On Fri, Aug 28, 2009 at 04:15:33PM -0400, Amos Hayes wrote: > > You can also search the incredibly useful spatialreference.org for > something like "NAD83 17N". > > Interestingly, searching for "NAD_1983_UTM_Zone_17N" doesn't turn up > any results, despite being a string that exists in the PRJ file > description you can download from that site for EPSG:26917. Fixed. > P.S. Many thanks to cschmidt for helping to create that site. Very > handy. Thanks should go to Howard Butler, Dane Springmeyer, and others as well. Regards, -- Christopher Schmidt MetaCarta From nolasco_gabriel at yahoo.com.br Fri Aug 28 18:39:37 2009 From: nolasco_gabriel at yahoo.com.br (Gabriel Nolasco) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Save Vector drawings in PostGIS In-Reply-To: Message-ID: <18203.33541.qm@web37104.mail.mud.yahoo.com> Hi, You can use the method toString from the class OpenLayers.Geometry which returns the Well-Known Text representation of a geometry. See: http://dev.openlayers.org/docs/files/OpenLayers/Geometry-js.html#OpenLayers.Geometry.toString An example: http://openlayers.org/dev/examples/vector-formats.html Best regards, Gabriel Nolasco > Hi, > > I'm looking for a strategy to use OL as an editor to > populate a polygon > postgis layer. > I can't use WFS-T because I have to work with UMN-Mapserver > that doesn't > support this specification. > > What I would like to do is this: > > (1) use the drawing tools to create my vector features on > the map > (2) capture the WKT string for these drawings in a form > field > (3) send an insert query to postgis via PHP > > The (1) and (3) are ok for me, but I need some help with > the (2). > Can you give me some suggestions? > Is my "strategy" correct in your opinion? > > TIA, alessio ____________________________________________________________________________________ Veja quais s?o os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com From maren.kiehl at gmx.de Sat Aug 29 03:34:44 2009 From: maren.kiehl at gmx.de (Maren Kiehl) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] search feature to attribute Message-ID: <4A98DA14.5040308@gmx.de> Hi at all. I'm searching for a function which can identify a feature by searching an attribute-value. I have the name of a feature-attribute (feature.attributes.name) and wanna search the apposite feature. After that I wanna zoom to the center of this feature(map.setCenter(feature.geometry.getBounds().getCenterLonLat(), zoom);). The problem ist: I dont know how to identify the feature by knowing the attribute. I get the attribute-value from a php-value in another page. By clicking a link on this page a window opens and shows a little map with the feature-point in the center of it. Everything (little map opens in a popup and shows the extent of all points) works except for the last step. Does somebody know how to get the feature? Does a function for this problem exist? Thanks for your support. Best regards, Maren From shai_mus at hotmail.com Sat Aug 29 05:36:51 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Ta not working on IE7 Message-ID: <1251538611271-3541060.post@n2.nabble.com> Dear All, Recently I just switch from openlayer2.7 to 2.8. Then I use this coding to get a tag beside my vehicle icon. The problem here is that it works fine in firefox and IE6. But in IE7 the tag is not appearing. Any solution for IE7? pointFeature.style = { externalGraphic: imageName, graphicWidth:34, graphicHeight:17, pointRadius: 10, rotation: vehicleDetail3[1], label : "test", fontColor: "black", fontSize: "20px", fontFamily: "Arial", fontWeight: "bold", labelAlign: "bt" }; Thank you in advance. -- View this message in context: http://n2.nabble.com/Ta-not-working-on-IE7-tp3541060p3541060.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From liste12A45q7 at gmx.de Sat Aug 29 08:14:56 2009 From: liste12A45q7 at gmx.de (Markus) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Scale on the map in nautical miles Message-ID: <4A991BC0.60608@gmx.de> Dear OL-Specialists, How can I make this (webbased): - window (for tools, dialogs) should be on top of the map every time - focus should be switchable on map or on tool-window (by cursor-click) - possibility to move and zoom the map /under/ the tool-windows - possibility to activate markers in the map, without disappearing tool-windows - possibility to move the tool-windows on the map (it works) - possibility to make inputs in the tool-window (it works) Now, if I click to the map, the tool-window disappears behind the map... Thanks a lot! Markus From osm at tappenbeck.net Sat Aug 29 13:21:19 2009 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] PopUp only show when one theme will show Message-ID: <4A99638F.9030000@tappenbeck.net> Hi ! i have a little map for poi about communication (postbox (called postkasten), telephone, postoffice etc.). for the blue post_boxes-icons there are information in a popup about collection_times. this popup's only will show when the post_box-layer is active standalone (firefox 3.5). can anybody tell me the reason why - and a alternative ??? regards Jan :-) From eric.lemoine at camptocamp.com Sat Aug 29 17:34:05 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] search feature to attribute In-Reply-To: <4A98DA14.5040308@gmx.de> References: <4A98DA14.5040308@gmx.de> Message-ID: On Saturday, August 29, 2009, Maren Kiehl wrote: > Hi at all. > > I'm searching for a function which can identify a feature by searching > an attribute-value. > I have the name of a feature-attribute (http://feature.attributes.name) and > wanna search the apposite feature. After that I wanna zoom to the center > of this feature(map.setCenter(feature.geometry.getBounds().getCenterLonLat(), zoom);). > The problem ist: I dont know how to identify the feature by knowing the attribute. I get the > attribute-value from a php-value in another page. By clicking a link on > this page a window opens and shows a little map with the feature-point > in the center of it. Everything (little map opens in a popup and shows the extent of all points) > works except for the last step. > Does somebody know how to get the feature? Does a function for this problem exist? Would something like the following work for you? (NAME is the attribute name, and VALUE the attribute value) function getFeatureByValue(layer) { var features = layer.features; for(var i=0; i > Thanks for your support. > Best regards, > Maren > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Sat Aug 29 17:43:54 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Save Vector drawings in PostGIS In-Reply-To: <1251474544848-3535558.post@n2.nabble.com> References: <1251474544848-3535558.post@n2.nabble.com> Message-ID: On Friday, August 28, 2009, AlessioDL wrote: > > Hi, > > I'm looking for a strategy to use OL as an editor to populate a polygon > postgis layer. > I can't use WFS-T because I have to work with UMN-Mapserver that doesn't > support this specification. > > What I would like to do is this: > > (1) use the drawing tools to create my vector features on the map > (2) capture the WKT string for these drawings in a form field > (3) send an insert query to postgis via PHP > > The (1) and (3) are ok for me, but I need some help with the (2). > Can you give me some suggestions? > Is my "strategy" correct in your opinion? Hi. FeatureServer and MapFish may suit you. If you're a PHP developer you may be interested in the MapFish plugin for Symfony (< http://www.symfony-project.org/plugins/sfMapFishPlugin>). I'd be happy to provide more details on MapFish if needed (on the MapFish mailing list). Cheers, > > TIA, alessio > -- > View this message in context: http://n2.nabble.com/Save-Vector-drawings-in-PostGIS-tp3535558p3535558.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From liste12A45q7 at gmx.de Sun Aug 30 05:37:15 2009 From: liste12A45q7 at gmx.de (Markus) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] window always on top of the map Message-ID: <4A9A484B.7060502@gmx.de> Dear OL-Specialists, How can I make this (webbased): - window (for tools, dialogs) should be always on top of the map - focus should be switchable on map or on tool-window (by cursor-click) - possibility to move and zoom the map /under/ the tool-windows - possibility to activate markers in the map, without disappearing tool-windows - possibility to move the tool-windows on the map (it works) - possibility to make inputs in the tool-window (it works) Now, if I click to the map, the tool-window disappears behind the map... Thanks a lot! Markus From maren.kiehl at gmx.de Sun Aug 30 05:43:13 2009 From: maren.kiehl at gmx.de (Maren Kiehl) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] search feature to attribute In-Reply-To: References: <4A98DA14.5040308@gmx.de> Message-ID: <4A9A49B1.9000608@gmx.de> Eric Lemoine schrieb: > On Saturday, August 29, 2009, Maren Kiehl wrote: > >> Hi at all. >> >> I'm searching for a function which can identify a feature by searching >> an attribute-value. >> I have the name of a feature-attribute (http://feature.attributes.name) and >> wanna search the apposite feature. After that I wanna zoom to the center >> of this feature(map.setCenter(feature.geometry.getBounds().getCenterLonLat(), zoom);). >> The problem ist: I dont know how to identify the feature by knowing the attribute. I get the >> attribute-value from a php-value in another page. By clicking a link on >> this page a window opens and shows a little map with the feature-point >> in the center of it. Everything (little map opens in a popup and shows the extent of all points) >> works except for the last step. >> Does somebody know how to get the feature? Does a function for this problem exist? >> > > Would something like the following work for you? > > (NAME is the attribute name, and VALUE the attribute value) > > function getFeatureByValue(layer) { > var features = layer.features; > for(var i=0; i var feature = features[i]; > if(feature.attributes[NAME] == VALUE) { > return feature; > } > } > } > > > >> Thanks for your support. >> Best regards, >> Maren >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > Sorry, but that doenst work. When I implement this an exception is thrown which says "layer is undefined". But I found another solution: Instead of the attribute-value "name" I took the value "the_geom" and transformed it into x and y coordinates. Now everything is fine. Thanks for your help! Maren From mario1982 at libero.it Sun Aug 30 08:20:13 2009 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] assign style to a feature Message-ID: Hi all, I need a help from you. How can I assign a style to featuresExpKml[i]? I've tried to do this: featuresExpKml[i].style.strokeColor = "yellow"; but it doesn't work because style is 'null' Here is my simple code: var gml3 = new OpenLayers.Format.GML.v2(gmlOptionsIn4); featuresExpKml = gml3.read(unescape(g.geometry)); for (var t=0; t Message-ID: Hi, It would think, that with click on the map the zIndex of the map get a higher value than your window. I use movable divs with a zIndex > 9000. http://gis.ibbeck.de/ginfo/apps/OL27Client/OL27ClientGis.asp?KARTE=k10000 Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Markus Gesendet: Sonntag, 30. August 2009 11:37 An: Users@openlayers.org Betreff: [OpenLayers-Users] window always on top of the map Dear OL-Specialists, How can I make this (webbased): - window (for tools, dialogs) should be always on top of the map - focus should be switchable on map or on tool-window (by cursor-click) - possibility to move and zoom the map /under/ the tool-windows - possibility to activate markers in the map, without disappearing tool-windows - possibility to move the tool-windows on the map (it works) - possibility to make inputs in the tool-window (it works) Now, if I click to the map, the tool-window disappears behind the map... Thanks a lot! Markus _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Sun Aug 30 11:22:44 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] search feature to attribute In-Reply-To: <4A98DA14.5040308@gmx.de> References: <4A98DA14.5040308@gmx.de> Message-ID: <20090830152244.GA10927@metacarta.com> On Sat, Aug 29, 2009 at 09:34:44AM +0200, Maren Kiehl wrote: > Hi at all. > > I'm searching for a function which can identify a feature by searching > an attribute-value. > I have the name of a feature-attribute (feature.attributes.name) and > wanna search the apposite feature. After that I wanna zoom to the center > of this feature(map.setCenter(feature.geometry.getBounds().getCenterLonLat(), zoom);). > The problem ist: I dont know how to identify the feature by knowing the attribute. I get the > attribute-value from a php-value in another page. By clicking a link on > this page a window opens and shows a little map with the feature-point > in the center of it. Everything (little map opens in a popup and shows the extent of all points) > works except for the last step. > Does somebody know how to get the feature? Does a function for this problem exist? var feat = null; for (var i=0; i< layer.features.length; i++) { feat = layer.features[i]; if (feat.attributes['name'] == value) { break; } } console.log(feat); -- Chris > Thanks for your support. > Best regards, > Maren > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From maren.kiehl at gmx.de Sun Aug 30 11:35:59 2009 From: maren.kiehl at gmx.de (Maren Kiehl) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Exception, but why? Message-ID: <4A9A9C5F.3090809@gmx.de> Hi at all. I programmed an application with a wfs-layer which opens a popup with some informations to a special point by clicking it. Everything works without a problem but in Mozilla the Firebug (1.4.2) throws the following exception: uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: http://localhost/openl/lib/OpenLayers/Request/XMLHttpRequest.js :: anonymous :: line 200" data: no] Whats wrong? And why does the programm throw it although everything is fine. Thanks for help. Best regards Maren From jansen at terrestris.de Sun Aug 30 14:07:34 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Exception, but why? In-Reply-To: <4A9A9C5F.3090809@gmx.de> References: <4A9A9C5F.3090809@gmx.de> Message-ID: <4A9ABFE6.7060401@terrestris.de> Hi Maren, it is very hard to guess the source of that behaviour since we do not see any code. Is there any chance you can post a minimal example that shows this behaviour? Have your tried the code with Firebug being disabled? Is the error console still showing the error? -- Marc Maren Kiehl schrieb: > Hi at all. > > I programmed an application with a wfs-layer which opens a popup with > some informations to a special point by clicking it. > Everything works without a problem but in Mozilla the Firebug (1.4.2) > throws the following exception: > > uncaught exception: [Exception... "Component returned failure code: > 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" > nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: > http://localhost/openl/lib/OpenLayers/Request/XMLHttpRequest.js :: > anonymous :: line 200" data: no] > > Whats wrong? And why does the programm throw it although everything is fine. > > Thanks for help. > Best regards > Maren > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From pbecker at itee.uq.edu.au Sun Aug 30 19:34:44 2009 From: pbecker at itee.uq.edu.au (Peter Becker) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Best way to implement hover/click highlighting of polygons Message-ID: <200908310934.44718.pbecker@itee.uq.edu.au> Hello all, I know it is a bit of a broad question, but after quite a few experiments I still feel a bit puzzled as to which way I want to set up a map in our application. The map displays certain areas (catchments, bay areas, etc.). The user should be able to click on those areas, which then shows detailed information in a side bar (div on the same level as the map's div). We are using a stack with PostGIS and GeoServer and I managed to get the basic functionality working in different ways, e.g. using GeoServer's map previews as example as well as http://openlayers.org/dev/examples/getfeature-wfs.html . But getting it to work is only one thing, I'd like to get some more understanding on the implications of different approaches. The two main concerns for me at the moment are the browser support and the number of roundtrips some approaches seem to take. I saw http://trac.openlayers.org/wiki/Browsers -- does that mean all OpenLayers features are fully supported in each of these? Can I e.g. use an all-vector approach for the overlays and expect them to work? And regarding the round trips: I would like the map view not to hit our server more than once per interaction -- mostly to keep the map snappy, but also to not but unnecessary burden on the server. The UI won't allow arbitrary zooming and panning, so bounds should get invalidated only as a result of some custom callback. I was thinking along the lines of loading all polygons as WFS layer -- is that the way to do it? Should I set a specific strategy? I can't find much documentation on strategies. Thanks for any hints/experiences you are willing to share. Cheers, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/2cf61167/attachment.html From stephane.poirier at usherbrooke.ca Sun Aug 30 21:50:29 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] switching default layer before initial map display Message-ID: <91F4403121E140F78EAF096F75BDB814@spoirierdell> Hi All, With the following code, I created a few google layers. Google streets gets to be the default. Now, how can I change the default layers to be, say, the google hybrid map? if(myepsg=="EPSG:900913") { googlestreetsLayer=new OpenLayers.Layer.Google("Google Streets",{"sphericalMercator": true,minZoomLevel: 2}); googlephysicalLayer=new OpenLayers.Layer.Google("Google Physical",{type: G_PHYSICAL_MAP, "sphericalMercator": true,minZoomLevel: 2}); googlesatelliteLayer=new OpenLayers.Layer.Google("Google Satellite",{type: G_SATELLITE_MAP, "sphericalMercator": true,minZoomLevel: 2}); googlehybridLayer = new OpenLayers.Layer.Google("Google Hybrid",{type: G_HYBRID_MAP, "sphericalMercator": true,minZoomLevel: 2}); } Stephane Poirier, M.Sc. Optic Physics Remote Sensing Application Software Developer Universit? de Sherbrooke 2500 Bd Universit?, Sherbrooke, Qc J1K 2R1 Canada www.usherbrooke.ca/cartel Stephane.Poirier@Usherbrooke.ca +1 (514) 509-8833 (actual work site telephone) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090830/571b7302/attachment.html From stephane.poirier at usherbrooke.ca Sun Aug 30 23:02:22 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] vector layers don't display in internet explore 8.0.6001 anymore Message-ID: <0CDA8FA3C5274F4596374392E19D5B25@spoirierdell> Hi All, My vector layers do display fine in Firefox, Chrome, Safari but don't display at all in IE 8.0.6001. I was using IE 8.0 compatibility view to have proper vector layer display until recently. But now, Ie 8.0 compatibility view does not seems to work or fix that issue anymore. Should I write specific code for IE 8.0? Or, is there a patch for IE 8.0? Stephane Poirier, M.Sc. Optic Physics Remote Sensing Application Software Developer Universit? de Sherbrooke 2500 Bd Universit?, Sherbrooke, Qc J1K 2R1 Canada www.usherbrooke.ca/cartel Stephane.Poirier@Usherbrooke.ca +1 (514) 509-8833 (actual work site telephone) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090830/c5e2fef3/attachment.html From eric.lemoine at camptocamp.com Mon Aug 31 00:52:20 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Best way to implement hover/click highlighting of polygons In-Reply-To: <200908310934.44718.pbecker@itee.uq.edu.au> References: <200908310934.44718.pbecker@itee.uq.edu.au> Message-ID: On Monday, August 31, 2009, Peter Becker wrote: > Hello all, Hi > > I know it is a bit of a broad question, but after quite a few experiments I still feel a bit puzzled as to which way I want to set up a map in our application. The map displays certain areas (catchments, bay areas, etc.). The user should be able to click on those areas, which then shows detailed information in a side bar (div on the same level as the map's div). > > We are using a stack with PostGIS and GeoServer and I managed to get the basic functionality working in different ways, e.g. using GeoServer's map previews as example as well as http://openlayers.org/dev/examples/getfeature-wfs.html . > > But getting it to work is only one thing, I'd like to get some more understanding on the implications of different approaches. The two main concerns for me at the moment are the browser support and the number of roundtrips some approaches seem to take. > > I saw http://trac.openlayers.org/wiki/Browsers -- does that mean all OpenLayers features are fully supported in each of these? Can I e.g. use an all-vector approach for the overlays and expect them to work? Yes, vector layers are supposed to work in every listed browser. But you will get different results in terms of performance from one browser to another. For example IE will require much more time than FF and Chrome to display geometries on vector layers. Depending on the number of geometries, display time may be so long so that it can become unacceptable. > > And regarding the round trips: I would like the map view not to hit our server more than once per interaction -- mostly to keep the map snappy, but also to not but unnecessary burden on the server. The UI won't allow arbitrary zooming and panning, so bounds should get invalidated only as a result of some custom callback. > > I was thinking along the lines of loading all polygons as WFS layer -- is that the way to do it? Possibly. Again it depends on the number of objects you need to display and the browsers you want to support. I'd recommend doing experiments with your dataset. > Should I set a specific strategy? You can use the BBOX strategy so that only features included in the current extent of the map are fetched and displayed. As the map is moved new features will be fetched from the server. Cheers, > I can't find much documentation on strategies. > > Thanks for any hints/experiences you are willing to share. > > Cheers, > Peter -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From rahn at zhaw.ch Mon Aug 31 01:31:31 2009 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Performance Message-ID: <3F643797A078EB4FB028800809680984017C0A71@langouste.zhaw.ch> Hello list, I have another question. I have a solution with 4 different maps. In this maps there will always be the same geometries (polygons) but the polygons will style with a sld file in different ways. Now my question. My solution is not very fast. Are there possibilities for upgrade the performance of the maps? I think you can do some things to get a higher performance, but I don't know what someone has to do for this. Are there some rules or tipps from you to get a better performance? My data comes from a postgreSQL/postgis database. You can see an example here: http://webgis.hsw.ch/GINES/Start.php Is it better to use tiles for this? Greetings Hanno Rahn ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/4df7e731/attachment.html From rahul_g_teni at yahoo.com Mon Aug 31 02:16:02 2009 From: rahul_g_teni at yahoo.com (Mr. Rahul Teni) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] switching default layer before initial map display In-Reply-To: Message-ID: <896353.97732.qm@web65602.mail.ac4.yahoo.com> Hi Stephane, >From your question what i understood is you want to switch between different google layers. Am i right? It can be achieved by creating all google layer as base layer and then you can switch between those. If you want sample code i can share that with you. Let me know if i am on correct path? Thanks, Rahul G. Teni Cynosure Software Solutions MS BITS,BE Comp --- On Mon, 8/31/09, users-request@openlayers.org wrote: From: users-request@openlayers.org Subject: Users Digest, Vol 35, Issue 90 To: users@openlayers.org Date: Monday, August 31, 2009, 10:22 AM Send Users mailing list submissions to ??? users@openlayers.org To subscribe or unsubscribe via the World Wide Web, visit ??? http://openlayers.org/mailman/listinfo/users or, via email, send a message with subject or body 'help' to ??? users-request@openlayers.org You can reach the person managing the list at ??? users-owner@openlayers.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Users digest..." Today's Topics: ???1. Re: Exception, but why? (Marc Jansen) ???2. Best way to implement hover/click highlighting??? of polygons ? ? ? (Peter Becker) ???3. switching default layer before initial map??? display ? ? ? (stephane.poirier@usherbrooke.ca) ???4. vector layers don't display in internet explore??? 8.0.6001 ? ? ? anymore (stephane.poirier@usherbrooke.ca) ???5. Re: Best way to implement hover/click??? highlighting of ? ? ? polygons (Eric Lemoine) ---------------------------------------------------------------------- Message: 1 Date: Sun, 30 Aug 2009 20:07:34 +0200 From: Marc Jansen Subject: Re: [OpenLayers-Users] Exception, but why? To: Maren Kiehl Cc: users@openlayers.org Message-ID: <4A9ABFE6.7060401@terrestris.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi Maren, it is very hard to guess the source of that behaviour since we do not see any code. Is there any chance you can post a minimal example that shows this behaviour? Have your tried the code with Firebug being disabled? Is the error console still showing the error? -- Marc Maren Kiehl schrieb: > Hi at all. > > I programmed an application with a wfs-layer which opens a popup with > some informations to a special point by clicking it. > Everything works without a problem but in Mozilla the Firebug (1.4.2) > throws the following exception: > > uncaught exception: [Exception... "Component returned failure code: > 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" > nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: > http://localhost/openl/lib/OpenLayers/Request/XMLHttpRequest.js :: > anonymous :: line 200" data: no] > > Whats wrong? And why does the programm throw it although everything is fine. > > Thanks for help. > Best regards > Maren > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > >??? ------------------------------ Message: 2 Date: Mon, 31 Aug 2009 09:34:44 +1000 From: Peter Becker Subject: [OpenLayers-Users] Best way to implement hover/click ??? highlighting??? of polygons To: users@openlayers.org Message-ID: <200908310934.44718.pbecker@itee.uq.edu.au> Content-Type: text/plain; charset="us-ascii" Hello all, I know it is a bit of a broad question, but after quite a few experiments I still feel a bit puzzled as to which way I want to set up a map in our application. The map displays certain areas (catchments, bay areas, etc.). The user should be able to click on those areas, which then shows detailed information in a side bar (div on the same level as the map's div). We are using a stack with PostGIS and GeoServer and I managed to get the basic functionality working in different ways, e.g. using GeoServer's map previews as example as well as http://openlayers.org/dev/examples/getfeature-wfs.html . But getting it to work is only one thing, I'd like to get some more understanding on the implications of different approaches. The two main concerns for me at the moment are the browser support and the number of roundtrips some approaches seem to take. I saw http://trac.openlayers.org/wiki/Browsers -- does that mean all OpenLayers features are fully supported in each of these? Can I e.g. use an all-vector approach for the overlays and expect them to work? And regarding the round trips: I would like the map view not to hit our server more than once per interaction -- mostly to keep the map snappy, but also to not but unnecessary burden on the server. The UI won't allow arbitrary zooming and panning, so bounds should get invalidated only as a result of some custom callback. I was thinking along the lines of loading all polygons as WFS layer -- is that the way to do it? Should I set a specific strategy? I can't find much documentation on strategies. Thanks for any hints/experiences you are willing to share. Cheers, ? Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/users/attachments/20090831/2cf61167/attachment-0001.htm ------------------------------ Message: 3 Date: Sun, 30 Aug 2009 21:50:29 -0400 From: Subject: [OpenLayers-Users] switching default layer before initial map ??? display To: Message-ID: <91F4403121E140F78EAF096F75BDB814@spoirierdell> Content-Type: text/plain; charset="iso-8859-1" Hi All, With the following code, I created a few google layers. Google streets gets to be the default. Now, how can I change the default layers to be, say, the google hybrid map? if(myepsg=="EPSG:900913") { ? ? googlestreetsLayer=new OpenLayers.Layer.Google("Google Streets",{"sphericalMercator": true,minZoomLevel: 2}); ? ? googlephysicalLayer=new OpenLayers.Layer.Google("Google Physical",{type: G_PHYSICAL_MAP, "sphericalMercator": true,minZoomLevel: 2}); ? ? googlesatelliteLayer=new OpenLayers.Layer.Google("Google Satellite",{type: G_SATELLITE_MAP, "sphericalMercator": true,minZoomLevel: 2}); ? ? googlehybridLayer = new OpenLayers.Layer.Google("Google Hybrid",{type: G_HYBRID_MAP, "sphericalMercator": true,minZoomLevel: 2}); } Stephane Poirier, M.Sc. Optic Physics Remote Sensing Application Software Developer Universit? de Sherbrooke 2500 Bd Universit?, Sherbrooke, Qc J1K 2R1 Canada www.usherbrooke.ca/cartel Stephane.Poirier@Usherbrooke.ca +1 (514) 509-8833 (actual work site telephone) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/users/attachments/20090830/571b7302/attachment-0001.htm ------------------------------ Message: 4 Date: Sun, 30 Aug 2009 23:02:22 -0400 From: Subject: [OpenLayers-Users] vector layers don't display in internet ??? explore??? 8.0.6001 anymore To: Message-ID: <0CDA8FA3C5274F4596374392E19D5B25@spoirierdell> Content-Type: text/plain; charset="iso-8859-1" Hi All, My vector layers do display fine in Firefox, Chrome, Safari but don't display at all in IE 8.0.6001. I was using IE 8.0 compatibility view to have proper vector layer display until recently. But now, Ie 8.0 compatibility view does not seems to work or fix that issue anymore. Should I write specific code for IE 8.0? Or, is there a patch for IE 8.0? Stephane Poirier, M.Sc. Optic Physics Remote Sensing Application Software Developer Universit? de Sherbrooke 2500 Bd Universit?, Sherbrooke, Qc J1K 2R1 Canada www.usherbrooke.ca/cartel Stephane.Poirier@Usherbrooke.ca +1 (514) 509-8833 (actual work site telephone) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/users/attachments/20090830/c5e2fef3/attachment-0001.htm ------------------------------ Message: 5 Date: Mon, 31 Aug 2009 06:52:20 +0200 From: Eric Lemoine Subject: Re: [OpenLayers-Users] Best way to implement hover/click ??? highlighting of polygons To: Peter Becker Cc: users@openlayers.org Message-ID: ??? Content-Type: text/plain; charset=ISO-8859-1 On Monday, August 31, 2009, Peter Becker wrote: > Hello all, Hi > > I know it is a bit of a broad question, but after quite a few experiments I still feel a bit puzzled as to which way I want to set up a map in our application. The map displays certain areas (catchments, bay areas, etc.). The user should be able to click on those areas, which then shows detailed information in a side bar (div on the same level as the map's div). > > We are using a stack with PostGIS and GeoServer and I managed to get the basic functionality working in different ways, e.g. using GeoServer's map previews as example as well as http://openlayers.org/dev/examples/getfeature-wfs.html . > > But getting it to work is only one thing, I'd like to get some more understanding on the implications of different approaches. The two main concerns for me at the moment are the browser support and the number of roundtrips some approaches seem to take. > > I saw http://trac.openlayers.org/wiki/Browsers -- does that mean all OpenLayers features are fully supported in each of these? Can I e.g. use an all-vector approach for the overlays and expect them to work? Yes, vector layers are supposed to work in every listed browser. But you will get different results in terms of performance from one browser to another. For example IE will require much more time than FF and Chrome to display geometries on vector layers. Depending on the number of geometries, display time may be so long so that it can become unacceptable. > > And regarding the round trips: I would like the map view not to hit our server more than once per interaction -- mostly to keep the map snappy, but also to not but unnecessary burden on the server. The UI won't allow arbitrary zooming and panning, so bounds should get invalidated only as a result of some custom callback. > > I was thinking along the lines of loading all polygons as WFS layer -- is that the way to do it? Possibly. Again it depends on the number of objects you need to display and the browsers you want to support. I'd recommend doing experiments with your dataset. > Should I set a specific strategy? You can use the BBOX strategy so that only features included in the current extent of the map are fetched and displayed. As the map is moved new features will be fetched from the server. Cheers, > I can't find much documentation on strategies. > > Thanks for any hints/experiences you are willing to share. > > Cheers, >???Peter -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com ------------------------------ _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users End of Users Digest, Vol 35, Issue 90 ************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090830/5fd078da/attachment.html From igrcic at gmail.com Mon Aug 31 03:24:02 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Performance In-Reply-To: <3F643797A078EB4FB028800809680984017C0A71@langouste.zhaw.ch> References: <3F643797A078EB4FB028800809680984017C0A71@langouste.zhaw.ch> Message-ID: HI, this is not so much related to OpenLayers, but to server components: db and mapserver that generate image, so you should try asking there (have you made spatial indexes in your database? ) cheers On Mon, Aug 31, 2009 at 7:31 AM, Rahn Hanno (rahn) wrote: > Hello list, > > > > I have another question. I have a solution with 4 different maps. In this > maps there will always be the same geometries (polygons) but the polygons > will style with a sld file in different ways. > > Now my question. My solution is not very fast. Are there possibilities for > upgrade the performance of the maps? I think you can do some things to get a > higher performance, but I don?t know what someone has to do for this. Are > there some rules or tipps from you to get a better performance? > > > > My data comes from a postgreSQL/postgis database. You can see an example > here: > > http://webgis.hsw.ch/GINES/Start.php > > > > Is it better to use tiles for this? > > > > Greetings > > Hanno Rahn > > > > ------------------------------------------ > > Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik > > ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche > Ressourcen > > Fachstelle Geoinformatik > > Gr?ental, Postfach CH-8820 W?denswil > > Tel +41 (0)58 934 5592 > > Fax +41 (0)58 934 5580 > > hanno.rahn@zhaw.ch > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/cbbbc324/attachment.html From x.zam at gmx.net Mon Aug 31 04:41:03 2009 From: x.zam at gmx.net (Max Stephan) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Cluster strategy not working In-Reply-To: <1251469393074-3535010.post@n2.nabble.com> References: <1251455261483-3533851.post@n2.nabble.com> <4A97A2D6020000160018C5B9@nfgw.niagarafalls.ca> <1053B20F24D85F41B57F168351684E22039DF709@0015-its-exmb04.us.saic.com> <1251469158121-3534984.post@n2.nabble.com> <1251469393074-3535010.post@n2.nabble.com> Message-ID: <1251708063717-3552202.post@n2.nabble.com> Hi Jerome and Heidtmare, I tried to add all vectorfeatures at once before because I saw that?s the case in the example-site as well. But it didn?t help. So I performed a little bit of "trial and error" and after changing my code to adding-all-features-at-once AND erasing the codeline clusterStrategy.activate() it works. If I don?t erase it I get the error " 'this.layer.map' is null or no object". Thx to all of you Max Stephan Jerome Freyre wrote: > > Heidtmare is right and faster than me.... :D > > Have a look to http://openlayers.org/dev/examples/strategy-cluster.html to > modify the size of cluster depending of the number of feature they > represent > > > > Here is a script that is working. And think that you can > > PS: Sorry for the "double post" I push the wrong button :) > > var map, wfs; > > var styleMap1 = new OpenLayers.StyleMap({ > "default": new OpenLayers.Style( > { > fillColor: "#0000FF", > strokeColor: "#0000FF", > pointRadius: 6 > } > ) > }); > > function init(){ > map = new OpenLayers.Map('map'); > var wms = new OpenLayers.Layer.WMS( > "OpenLayers WMS", > "http://labs.metacarta.com/wms/vmap0?", > {layers: 'basic'} > ); > map.addLayer(wms); > map.zoomToMaxExtent(); > > > var strat = new OpenLayers.Strategy.Cluster({distance:20}); > vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ > strategies: [ > strat > ], > styleMap: styleMap1, maxResolution: 19}); > strat.activate(); > > map.addLayers([vectorLayer]); > > /** > * Generate datas // Simulate your data access > */ > var dx = 3; > var dy = 3; > var px, py; > featuresToBeClustered = []; > for(var x=-45; x<=45; x+=dx) { > for(var y=-22.5; y<=22.5; y+=dy) { > px = x + (2 * dx * (Math.random() - 0.5)); > py = y + (2 * dy * (Math.random() - 0.5)); > featuresToBeClustered.push({ > 'lonlat':new OpenLayers.LonLat(px,py), > 'id':px+' '+py > }); > } > } > /** > * Populate the array of feature > */ > var arrayOfFeatures = []; > for (var i=0; i arrayOfFeatures.push(generateFeature(vectorLayer, > featuresToBeClustered[i].lonlat, featuresToBeClustered[i].id)); > } > > /** > * Add all features in one time > */ > vectorLayer.addFeatures(arrayOfFeatures); > > > > map.setCenter(new OpenLayers.LonLat(0, 0), 2); > > } > /** > * Modification of you function > */ > function generateFeature(layer, lonlat, mestId){ > var geometryObjekt = new > OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat); > var vectorObjekt = new OpenLayers.Feature.Vector(geometryObjekt); > vectorObjekt.attributes.mest = mestId; > return vectorObjekt; > } > > > > > Heidtmare wrote: >> >> i believe you need to add all your features at once, >> so instead of looping the layer.addFeatures() call >> you need to build all your features into an array and then call >> layer.addFeatures() once. >> >> >> > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3552202.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jerome.freyre at hispeed.ch Mon Aug 31 04:47:57 2009 From: jerome.freyre at hispeed.ch (Jerome Freyre) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] How to replace country color with image ? In-Reply-To: <1251700936987-3551757.post@n2.nabble.com> References: <1251700936987-3551757.post@n2.nabble.com> Message-ID: <1251708477548-3552244.post@n2.nabble.com> Hi Jan, maybe you can use the property externalGraphic : myStaticImage in the style definition Sincerly, J?rome Jan.S?rensen wrote: > > Hi, > > I'm pretty new to Open Layers, so probably I'm looking for something > obvious :) > > I want to fill country with instead of a color with a static image > Up to now I have a default style that upon mouse over I successfully > changes color of the country that mouse cursor is currently on. > > Anyone can give me a shot ? > > Cheers, > JS > > > -- View this message in context: http://n2.nabble.com/How-to-replace-country-color-with-image-tp3551757p3552244.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mario1982 at libero.it Mon Aug 31 05:00:55 2009 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] (no subject) Message-ID: Hi all, is it possible to export a KML layer? I Know that the "write(features)" function exports only the features. But is it possible to export the entire layer? Thanks for your help, Mario From mario1982 at libero.it Mon Aug 31 05:35:30 2009 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Fwd: (no subject) Message-ID: Hi all, is it possible to export a KML layer? I Know that the "write(features)" function exports only the features. But is it possible to export the entire layer? Thanks for your help, Mario _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From f.pennica at gmail.com Mon Aug 31 05:58:05 2009 From: f.pennica at gmail.com (Francesco Pennica) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] switching default layer before initial map display In-Reply-To: <91F4403121E140F78EAF096F75BDB814@spoirierdell> References: <91F4403121E140F78EAF096F75BDB814@spoirierdell> Message-ID: <27da8fdb0908310258x455f99a6o10dba4b591e5582d@mail.gmail.com> Hello, I think you just have to change the order when you add layers to map: map.addLayers([googlestreetsLayer,googlephysicalLayer,...]); to: map.addLayers([googlephysicalLayer,googlestreetsLayer,...]); 2009/8/31 > Hi All, > > With the following code, I created a few google layers. Google streets gets > to be the default. Now, how can I change the default layers to be, say, the > google hybrid map? > > *if* > (myepsg=="EPSG:900913") > { > googlestreetsLayer=*new* OpenLayers.Layer.Google("Google Streets",{ > "sphericalMercator": true,minZoomLevel: 2}); > googlephysicalLayer=*new* OpenLayers.Layer.Google("Google Physical",{ > type: G_PHYSICAL_MAP, "sphericalMercator": true,minZoomLevel: 2}); > googlesatelliteLayer=*new* OpenLayers.Layer.Google("Google Satellite" > ,{type: G_SATELLITE_MAP, "sphericalMercator": true,minZoomLevel: 2}); > googlehybridLayer = *new* OpenLayers.Layer.Google("Google Hybrid",{ > type: G_HYBRID_MAP, "sphericalMercator": true,minZoomLevel: 2}); > } > > Stephane Poirier, M.Sc. Optic Physics > Remote Sensing Application Software Developer > Universit? de Sherbrooke > 2500 Bd Universit?, Sherbrooke, Qc J1K 2R1 Canada > www.usherbrooke.ca/cartel > Stephane.Poirier@Usherbrooke.ca > +1 (514) 509-8833 (actual work site telephone) > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/ac7f4a6f/attachment.html From x.zam at gmx.net Mon Aug 31 05:58:44 2009 From: x.zam at gmx.net (Max Stephan) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Cluster strategy not working In-Reply-To: <1251708063717-3552202.post@n2.nabble.com> References: <1251455261483-3533851.post@n2.nabble.com> <4A97A2D6020000160018C5B9@nfgw.niagarafalls.ca> <1053B20F24D85F41B57F168351684E22039DF709@0015-its-exmb04.us.saic.com> <1251469158121-3534984.post@n2.nabble.com> <1251469393074-3535010.post@n2.nabble.com> <1251708063717-3552202.post@n2.nabble.com> Message-ID: <1251712724138-3552507.post@n2.nabble.com> I also noticed that it?s only working that I?ve added the VectorLayer to the map BEFORE I?m adding the features to the VectorLayer. Greets Max Stephan Max Stephan wrote: > > Hi Jerome and Heidtmare, > > I tried to add all vectorfeatures at once before because I saw that?s the > case in the example-site as well. But it didn?t help. So I performed a > little bit of "trial and error" and after changing my code to > adding-all-features-at-once AND erasing the codeline > clusterStrategy.activate() it works. If I don?t erase it I get the error " > 'this.layer.map' is null or no object". > > Thx to all of you > Max Stephan > > Jerome Freyre wrote: >> >> Heidtmare is right and faster than me.... :D >> >> Have a look to http://openlayers.org/dev/examples/strategy-cluster.html >> to modify the size of cluster depending of the number of feature they >> represent >> >> >> >> Here is a script that is working. And think that you can >> >> PS: Sorry for the "double post" I push the wrong button :) >> >> var map, wfs; >> >> var styleMap1 = new OpenLayers.StyleMap({ >> "default": new OpenLayers.Style( >> { >> fillColor: "#0000FF", >> strokeColor: "#0000FF", >> pointRadius: 6 >> } >> ) >> }); >> >> function init(){ >> map = new OpenLayers.Map('map'); >> var wms = new OpenLayers.Layer.WMS( >> "OpenLayers WMS", >> "http://labs.metacarta.com/wms/vmap0?", >> {layers: 'basic'} >> ); >> map.addLayer(wms); >> map.zoomToMaxExtent(); >> >> >> var strat = new OpenLayers.Strategy.Cluster({distance:20}); >> vectorLayer = new OpenLayers.Layer.Vector("Vektorlayer",{ >> strategies: [ >> strat >> ], >> styleMap: styleMap1, maxResolution: 19}); >> strat.activate(); >> >> map.addLayers([vectorLayer]); >> >> /** >> * Generate datas // Simulate your data access >> */ >> var dx = 3; >> var dy = 3; >> var px, py; >> featuresToBeClustered = []; >> for(var x=-45; x<=45; x+=dx) { >> for(var y=-22.5; y<=22.5; y+=dy) { >> px = x + (2 * dx * (Math.random() - 0.5)); >> py = y + (2 * dy * (Math.random() - 0.5)); >> featuresToBeClustered.push({ >> 'lonlat':new OpenLayers.LonLat(px,py), >> 'id':px+' '+py >> }); >> } >> } >> /** >> * Populate the array of feature >> */ >> var arrayOfFeatures = []; >> for (var i=0; i> arrayOfFeatures.push(generateFeature(vectorLayer, >> featuresToBeClustered[i].lonlat, featuresToBeClustered[i].id)); >> } >> >> /** >> * Add all features in one time >> */ >> vectorLayer.addFeatures(arrayOfFeatures); >> >> >> >> map.setCenter(new OpenLayers.LonLat(0, 0), 2); >> >> } >> /** >> * Modification of you function >> */ >> function generateFeature(layer, lonlat, mestId){ >> var geometryObjekt = new >> OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat); >> var vectorObjekt = new OpenLayers.Feature.Vector(geometryObjekt); >> vectorObjekt.attributes.mest = mestId; >> return vectorObjekt; >> } >> >> >> >> >> Heidtmare wrote: >>> >>> i believe you need to add all your features at once, >>> so instead of looping the layer.addFeatures() call >>> you need to build all your features into an array and then call >>> layer.addFeatures() once. >>> >>> >>> >> >> > > -- View this message in context: http://n2.nabble.com/Cluster-strategy-not-working-tp3533851p3552507.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From n.e.kendall at gmail.com Mon Aug 31 06:15:39 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] returning multiple geometry types from a search. Message-ID: <33fd44f90908310315i576417beg2c5a641517d25557@mail.gmail.com> Hi all, I have a (rather sloppy) ajax based jquery search (I know, I know) which dynamically returns POI's based on the user's search criteria. My question is this: is there somewhat of returning multiple geometry types (i.e. points and polygons) from the results of a query? One way to maybe do this would be to store the geometry as a blob in the database itself, keyed into a primary key or something, but this gets really clunky since I'm tied to using MySQL. Or can someone suggest a way of preloading several gml polygons that would appear/disappear based on the results of the ajax hit? Basically, the database that's being searched is returning points, for this particular query it would be heuristically useful to see the footprints of the POI's of interest. In general, does anyone have suggestions? -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/7567f6bb/attachment.html From jimmy.aumard at gmail.com Mon Aug 31 06:27:19 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] How put a fix image on the map? Message-ID: Hi list, I want to know how it's possible to put a fix image on the right bottom on the map? (like google logo) Thanks Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/04c92e9a/attachment.html From roselinda.ackermans at ec.europa.eu Mon Aug 31 07:35:15 2009 From: roselinda.ackermans at ec.europa.eu (Linde Ackermans) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] help with popup-location In-Reply-To: <4A914542.2070508@gmx.de> References: <4A914542.2070508@gmx.de> Message-ID: <1251718515361-3552848.post@n2.nabble.com> Hello, Try popup.keepInMap = true; Cheers Maren Kiehl wrote: > > Hi everyone, > > I have a problem with the popup in my map: When I click a point a popup > with some informations is shown. The problem is that it isn't in the > current map size so I have to pan to the right position to be able to > read it. > > -- View this message in context: http://n2.nabble.com/help-with-popup-location-tp3498613p3552848.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rahul_g_teni at yahoo.com Mon Aug 31 07:53:55 2009 From: rahul_g_teni at yahoo.com (Mr. Rahul Teni) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Performance In-Reply-To: Message-ID: <457621.65544.qm@web65606.mail.ac4.yahoo.com> Hi, Can you please let me know some more details about your configuration as we have done some tuning for performance. I would like to know how frequently you will be changing data and details like that. We are using tilecache with Openlayer, mapserver and fastCGI with lighttpd server. Thanks, Rahul G. Teni Cynosure Software Solutions MS BITS,BE Comp --- On Mon, 8/31/09, users-request@openlayers.org wrote: From: users-request@openlayers.org Subject: Users Digest, Vol 35, Issue 91 To: users@openlayers.org Date: Monday, August 31, 2009, 11:46 AM Send Users mailing list submissions to ??? users@openlayers.org To subscribe or unsubscribe via the World Wide Web, visit ??? http://openlayers.org/mailman/listinfo/users or, via email, send a message with subject or body 'help' to ??? users-request@openlayers.org You can reach the person managing the list at ??? users-owner@openlayers.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Users digest..." Today's Topics: ???1. Performance (Rahn Hanno (rahn)) ???2. Re: switching default layer before initial map??? display ? ? ? (Mr. Rahul Teni) ---------------------------------------------------------------------- Message: 1 Date: Mon, 31 Aug 2009 07:31:31 +0200 From: "Rahn Hanno (rahn)" Subject: [OpenLayers-Users] Performance To: Message-ID: ??? <3F643797A078EB4FB028800809680984017C0A71@langouste.zhaw.ch> Content-Type: text/plain; charset="iso-8859-1" Hello list, I have another question. I have a solution with 4 different maps. In this maps there will always be the same geometries (polygons) but the polygons will style with a sld file in different ways. Now my question. My solution is not very fast. Are there possibilities for upgrade the performance of the maps? I think you can do some things to get a higher performance, but I don't know what someone has to do for this. Are there some rules or tipps from you to get a better performance? My data comes from a postgreSQL/postgis database. You can see an example here: http://webgis.hsw.ch/GINES/Start.php Is it better to use tiles for this? Greetings Hanno Rahn ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/users/attachments/20090831/4df7e731/attachment-0001.htm ------------------------------ Message: 2 Date: Sun, 30 Aug 2009 23:16:02 -0700 (PDT) From: "Mr. Rahul Teni" Subject: Re: [OpenLayers-Users] switching default layer before initial ??? map??? display To: stephane.poirier@usherbrooke.ca Cc: users@openlayers.org Message-ID: <896353.97732.qm@web65602.mail.ac4.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" Hi Stephane, >From your question what i understood is you want to switch between different google layers. Am i right? It can be achieved by creating all google layer as base layer and then you can switch between those. If you want sample code i can share that with you. Let me know if i am on correct path? Thanks, Rahul G. Teni Cynosure Software Solutions MS BITS,BE Comp --- On Mon, 8/31/09, users-request@openlayers.org wrote: From: users-request@openlayers.org Subject: Users Digest, Vol 35, Issue 90 To: users@openlayers.org Date: Monday, August 31, 2009, 10:22 AM Send Users mailing list submissions to ??? users@openlayers.org To subscribe or unsubscribe via the World Wide Web, visit ??? http://openlayers.org/mailman/listinfo/users or, via email, send a message with subject or body 'help' to ??? users-request@openlayers.org You can reach the person managing the list at ??? users-owner@openlayers.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Users digest..." Today's Topics: ???1. Re: Exception, but why? (Marc Jansen) ???2. Best way to implement hover/click highlighting??? of polygons ? ? ? (Peter Becker) ???3. switching default layer before initial map??? display ? ? ? (stephane.poirier@usherbrooke.ca) ???4. vector layers don't display in internet explore??? 8.0.6001 ? ? ? anymore (stephane.poirier@usherbrooke.ca) ???5. Re: Best way to implement hover/click??? highlighting of ? ? ? polygons (Eric Lemoine) ---------------------------------------------------------------------- Message: 1 Date: Sun, 30 Aug 2009 20:07:34 +0200 From: Marc Jansen Subject: Re: [OpenLayers-Users] Exception, but why? To: Maren Kiehl Cc: users@openlayers.org Message-ID: <4A9ABFE6.7060401@terrestris.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi Maren, it is very hard to guess the source of that behaviour since we do not see any code. Is there any chance you can post a minimal example that shows this behaviour? Have your tried the code with Firebug being disabled? Is the error console still showing the error? -- Marc Maren Kiehl schrieb: > Hi at all. > > I programmed an application with a wfs-layer which opens a popup with > some informations to a special point by clicking it. > Everything works without a problem but in Mozilla the Firebug (1.4.2) > throws the following exception: > > uncaught exception: [Exception... "Component returned failure code: > 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" > nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: > http://localhost/openl/lib/OpenLayers/Request/XMLHttpRequest.js :: > anonymous :: line 200" data: no] > > Whats wrong? And why does the programm throw it although everything is fine. > > Thanks for help. > Best regards > Maren > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > >??? ------------------------------ Message: 2 Date: Mon, 31 Aug 2009 09:34:44 +1000 From: Peter Becker Subject: [OpenLayers-Users] Best way to implement hover/click ??? highlighting??? of polygons To: users@openlayers.org Message-ID: <200908310934.44718.pbecker@itee.uq.edu.au> Content-Type: text/plain; charset="us-ascii" Hello all, I know it is a bit of a broad question, but after quite a few experiments I still feel a bit puzzled as to which way I want to set up a map in our application. The map displays certain areas (catchments, bay areas, etc.). The user should be able to click on those areas, which then shows detailed information in a side bar (div on the same level as the map's div). We are using a stack with PostGIS and GeoServer and I managed to get the basic functionality working in different ways, e.g. using GeoServer's map previews as example as well as http://openlayers.org/dev/examples/getfeature-wfs.html . But getting it to work is only one thing, I'd like to get some more understanding on the implications of different approaches. The two main concerns for me at the moment are the browser support and the number of roundtrips some approaches seem to take. I saw http://trac.openlayers.org/wiki/Browsers -- does that mean all OpenLayers features are fully supported in each of these? Can I e.g. use an all-vector approach for the overlays and expect them to work? And regarding the round trips: I would like the map view not to hit our server more than once per interaction -- mostly to keep the map snappy, but also to not but unnecessary burden on the server. The UI won't allow arbitrary zooming and panning, so bounds should get invalidated only as a result of some custom callback. I was thinking along the lines of loading all polygons as WFS layer -- is that the way to do it? Should I set a specific strategy? I can't find much documentation on strategies. Thanks for any hints/experiences you are willing to share. Cheers, ? Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/users/attachments/20090831/2cf61167/attachment-0001.htm ------------------------------ Message: 3 Date: Sun, 30 Aug 2009 21:50:29 -0400 From: Subject: [OpenLayers-Users] switching default layer before initial map ??? display To: Message-ID: <91F4403121E140F78EAF096F75BDB814@spoirierdell> Content-Type: text/plain; charset="iso-8859-1" Hi All, With the following code, I created a few google layers. Google streets gets to be the default. Now, how can I change the default layers to be, say, the google hybrid map? if(myepsg=="EPSG:900913") { ? ? googlestreetsLayer=new OpenLayers.Layer.Google("Google Streets",{"sphericalMercator": true,minZoomLevel: 2}); ? ? googlephysicalLayer=new OpenLayers.Layer.Google("Google Physical",{type: G_PHYSICAL_MAP, "sphericalMercator": true,minZoomLevel: 2}); ? ? googlesatelliteLayer=new OpenLayers.Layer.Google("Google Satellite",{type: G_SATELLITE_MAP, "sphericalMercator": true,minZoomLevel: 2}); ? ? googlehybridLayer = new OpenLayers.Layer.Google("Google Hybrid",{type: G_HYBRID_MAP, "sphericalMercator": true,minZoomLevel: 2}); } Stephane Poirier, M.Sc. Optic Physics Remote Sensing Application Software Developer Universit? de Sherbrooke 2500 Bd Universit?, Sherbrooke, Qc J1K 2R1 Canada www.usherbrooke.ca/cartel Stephane.Poirier@Usherbrooke.ca +1 (514) 509-8833 (actual work site telephone) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/users/attachments/20090830/571b7302/attachment-0001.htm ------------------------------ Message: 4 Date: Sun, 30 Aug 2009 23:02:22 -0400 From: Subject: [OpenLayers-Users] vector layers don't display in internet ??? explore??? 8.0.6001 anymore To: Message-ID: <0CDA8FA3C5274F4596374392E19D5B25@spoirierdell> Content-Type: text/plain; charset="iso-8859-1" Hi All, My vector layers do display fine in Firefox, Chrome, Safari but don't display at all in IE 8.0.6001. I was using IE 8.0 compatibility view to have proper vector layer display until recently. But now, Ie 8.0 compatibility view does not seems to work or fix that issue anymore. Should I write specific code for IE 8.0? Or, is there a patch for IE 8.0? Stephane Poirier, M.Sc. Optic Physics Remote Sensing Application Software Developer Universit? de Sherbrooke 2500 Bd Universit?, Sherbrooke, Qc J1K 2R1 Canada www.usherbrooke.ca/cartel Stephane.Poirier@Usherbrooke.ca +1 (514) 509-8833 (actual work site telephone) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/users/attachments/20090830/c5e2fef3/attachment-0001.htm ------------------------------ Message: 5 Date: Mon, 31 Aug 2009 06:52:20 +0200 From: Eric Lemoine Subject: Re: [OpenLayers-Users] Best way to implement hover/click ??? highlighting of polygons To: Peter Becker Cc: users@openlayers.org Message-ID: ??? Content-Type: text/plain; charset=ISO-8859-1 On Monday, August 31, 2009, Peter Becker wrote: > Hello all, Hi > > I know it is a bit of a broad question, but after quite a few experiments I still feel a bit puzzled as to which way I want to set up a map in our application. The map displays certain areas (catchments, bay areas, etc.). The user should be able to click on those areas, which then shows detailed information in a side bar (div on the same level as the map's div). > > We are using a stack with PostGIS and GeoServer and I managed to get the basic functionality working in different ways, e.g. using GeoServer's map previews as example as well as http://openlayers.org/dev/examples/getfeature-wfs.html . > > But getting it to work is only one thing, I'd like to get some more understanding on the implications of different approaches. The two main concerns for me at the moment are the browser support and the number of roundtrips some approaches seem to take. > > I saw http://trac.openlayers.org/wiki/Browsers -- does that mean all OpenLayers features are fully supported in each of these? Can I e.g. use an all-vector approach for the overlays and expect them to work? Yes, vector layers are supposed to work in every listed browser. But you will get different results in terms of performance from one browser to another. For example IE will require much more time than FF and Chrome to display geometries on vector layers. Depending on the number of geometries, display time may be so long so that it can become unacceptable. > > And regarding the round trips: I would like the map view not to hit our server more than once per interaction -- mostly to keep the map snappy, but also to not but unnecessary burden on the server. The UI won't allow arbitrary zooming and panning, so bounds should get invalidated only as a result of some custom callback. > > I was thinking along the lines of loading all polygons as WFS layer -- is that the way to do it? Possibly. Again it depends on the number of objects you need to display and the browsers you want to support. I'd recommend doing experiments with your dataset. > Should I set a specific strategy? You can use the BBOX strategy so that only features included in the current extent of the map are fetched and displayed. As the map is moved new features will be fetched from the server. Cheers, > I can't find much documentation on strategies. > > Thanks for any hints/experiences you are willing to share. > > Cheers, >???Peter -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com ------------------------------ _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users End of Users Digest, Vol 35, Issue 90 ************************************* ? ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://openlayers.org/pipermail/users/attachments/20090830/5fd078da/attachment.htm ------------------------------ _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users End of Users Digest, Vol 35, Issue 91 ************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/158e8f23/attachment.html From felipeconter.cc at gmail.com Mon Aug 31 08:21:04 2009 From: felipeconter.cc at gmail.com (Felipe Conter) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Geo-Faces - Pros X Cons ?? Message-ID: <45dca36f0908310521v26d58704r8a1754531e2587f7@mail.gmail.com> First, the project page: http://code.google.com/p/geo-faces/ Anyone knows if this project is in any way promising? I use Java/JSF on my web apps, and have been writing pure javascript for the openlayers part os my app. Anyone knows if this project is gonna grow? is it a good idea to use openlayers that way, by a jsf tag? -- Felipe Pierre Conter felipeconter.cc@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/19a4264a/attachment.html From DeDuikertjes at xs4all.nl Mon Aug 31 09:41:42 2009 From: DeDuikertjes at xs4all.nl (DeDuikertjes) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] GeoRSS projection confusion: Message-ID: <4A9BD316.3090201@xs4all.nl> Dear List, I have a georss file (with should be by definition in EPSG:4326) with one point: 6.36844646999779 51.8855430932258 it gets reprojected without me asking for it. When I show that as simple as possible in openlayers with: (working example on: http://80.101.100.35/planhosting/testplannen/openlayers/showmap3c.html) var map = null; var rsslayerURL; function init(){ map = new OpenLayers.Map('map', { allOverlays: true, controls: [] }); rsslayerURL = "wkt/NL.IMRO.0999.BP2008000001-0005-2b.rss"; rssLayer = new OpenLayers.Layer.GeoRSS("Informatielaag",rsslayerURL, { }); map.addLayers([rssLayer]); map.zoomToMaxExtent(); map.addControl(new OpenLayers.Control.PanZoomBar()); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.MousePosition()); The point gets (according to the mouseposition) reprojected to about 52.38 11.25. Why is that? I've never asked for that. If I specify EPSG:4326 as layerprojection, mapprojection and displayprojection the same happens. (working example: http://80.101.100.35/planhosting/testplannen/openlayers/showmap3b.html). If I try to reproject it together with other data (Working example: http://80.101.100.35/planhosting/testplannen/openlayers/showmap3.html), the other data gets reprojected as should, but not the georss layer. What is happening ? Please help, I'd like to have the georss layer lined up with my data in epsg 28992. MArco From crschmidt at metacarta.com Mon Aug 31 10:26:32 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Fwd: (no subject) In-Reply-To: References: Message-ID: <20090831142631.GB10927@metacarta.com> On Mon, Aug 31, 2009 at 11:35:30AM +0200, mario1982@libero.it wrote: > Hi all, > is it possible to export a KML layer? > > I Know that the "write(features)" function exports only the features. > But is it possible to export the entire layer? What is the layer other than the features? Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Mon Aug 31 10:28:07 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] How put a fix image on the map? In-Reply-To: References: Message-ID: <20090831142807.GC10927@metacarta.com> On Mon, Aug 31, 2009 at 12:27:19PM +0200, Jimmy Aumard wrote: > Hi list, > > I want to know how it's possible to put a fix image on the right bottom on > the map? (like google logo) new OpenLayers.Layer.Vector("My Data", { 'attribution': "" }); Ensure that you have the OpenLayers.Control.Attribution in the map, and you should be good. (It's there by default, unless you're overriding the default controls.) Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Mon Aug 31 10:31:29 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] GeoRSS projection confusion: In-Reply-To: <4A9BD316.3090201@xs4all.nl> References: <4A9BD316.3090201@xs4all.nl> Message-ID: <20090831143129.GD10927@metacarta.com> On Mon, Aug 31, 2009 at 03:41:42PM +0200, DeDuikertjes wrote: > Dear List, > > I have a georss file (with should be by definition in EPSG:4326) with > one point: > 6.36844646999779 51.8855430932258 it gets reprojected > without me asking for it. > > When I show that as simple as possible in openlayers with: > (working example on: > http://80.101.100.35/planhosting/testplannen/openlayers/showmap3c.html) > var map = null; > var rsslayerURL; > > function init(){ > > map = new OpenLayers.Map('map', { > allOverlays: true, > controls: [] > }); > > rsslayerURL = "wkt/NL.IMRO.0999.BP2008000001-0005-2b.rss"; > rssLayer = new > OpenLayers.Layer.GeoRSS("Informatielaag",rsslayerURL, { > > }); > > map.addLayers([rssLayer]); > map.zoomToMaxExtent(); > > map.addControl(new OpenLayers.Control.PanZoomBar()); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new OpenLayers.Control.MousePosition()); > > The point gets (according to the mouseposition) reprojected to about > 52.38 11.25. Why is that? I've never asked for that. The Mouse position indicates the 'bottom' point of the marker is at the correct location. The problem is that you are assuming the 'dot' in the center of the OpenLayers Marker is the 'central' point for the marker -- it is not. (If you zoomed your map in, you wold see that the tail of the marker would remain on the point of interest, and the position of the marker 'dot' shifts significantly.) The marker is 'above' the point of the data, not centered on it. (Also, the central black dot in the marker isn't 'centered', anyway.) -- Chris > If I specify EPSG:4326 as layerprojection, mapprojection and > displayprojection the same happens. > (working example: > http://80.101.100.35/planhosting/testplannen/openlayers/showmap3b.html). > > If I try to reproject it together with other data (Working example: > http://80.101.100.35/planhosting/testplannen/openlayers/showmap3.html), > the other data gets reprojected as should, but not the georss layer. > > What is happening ? > Please help, I'd like to have the georss layer lined up with my data in > epsg 28992. > > MArco > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Mon Aug 31 10:33:22 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] vector layers don't display in internet explore 8.0.6001 anymore In-Reply-To: <0CDA8FA3C5274F4596374392E19D5B25@spoirierdell> References: <0CDA8FA3C5274F4596374392E19D5B25@spoirierdell> Message-ID: <20090831143322.GE10927@metacarta.com> On Sun, Aug 30, 2009 at 11:02:22PM -0400, stephane.poirier@usherbrooke.ca wrote: > Hi All, > > My vector layers do display fine in Firefox, Chrome, Safari but don't display at all in IE 8.0.6001. I was using IE 8.0 compatibility view to have proper vector layer display until recently. But now, Ie 8.0 compatibility view does not seems to work or fix that issue anymore. > > Should I write specific code for IE 8.0? Or, is there a patch for IE 8.0? Do the OpenLayers examples (http://openlayers.org/dev/examples/vector-features.html) work in IE 8? If they do, then you should explore why they don't work in your application. If they don't, I'd be interested in hearing about it. Regards, -- Christopher Schmidt MetaCarta From ahayes at gcrc.carleton.ca Mon Aug 31 10:49:39 2009 From: ahayes at gcrc.carleton.ca (Amos Hayes) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] vector layers don't display in internet explore 8.0.6001 anymore In-Reply-To: <20090831143322.GE10927@metacarta.com> References: <0CDA8FA3C5274F4596374392E19D5B25@spoirierdell> <20090831143322.GE10927@metacarta.com> Message-ID: On Sun, Aug 30, 2009 at 11:02:22PM -0400, stephane.poirier@usherbrooke.ca wrote: > Hi All, > > My vector layers do display fine in Firefox, Chrome, Safari but > don't display at all in IE 8.0.6001. I was using IE 8.0 > compatibility view to have proper vector layer display until > recently. But now, Ie 8.0 compatibility view does not seems to work > or fix that issue anymore. > > Should I write specific code for IE 8.0? Or, is there a patch for IE > 8.0? In my experience, you shouldn't need compatibility view in IE8 as of OpenLayers 2.8. I use standards mode and don't know anything about the IE7 compatibility mode breaking though, sorry. -- Amos Hayes Geomatics and Cartographic Research Centre Carleton University From no-reply at neogeo-online.net Mon Aug 31 10:55:01 2009 From: no-reply at neogeo-online.net (Guillaume Sueur) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] maxResolution for a WMS layer Message-ID: <4A9BE445.5020104@neogeo-online.net> Hi list, I'm using a WMS layer on the top of Google Maps. This layer is set with a MAXSCALE of 10000 in MapServer map file. I'd like to avoid OpenLayers sending requests on resolutions over 2.38865713348 which all return blank images. I've tried to set my layer with maxResolution:2.38865713348 but it doesnt' help. any hint ? Thanks Guillaume From stephane.poirier at usherbrooke.ca Mon Aug 31 11:11:04 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] switching default layer before initial map display In-Reply-To: <27da8fdb0908310258x455f99a6o10dba4b591e5582d@mail.gmail.com> References: <91F4403121E140F78EAF096F75BDB814@spoirierdell> <27da8fdb0908310258x455f99a6o10dba4b591e5582d@mail.gmail.com> Message-ID: <0B228AF18A214B9B8F9661D28CA96450@spoirierdell> Thanks Francesco, You got it! Only changing the order in which layer are added fixed it, the first added google layer being the default among the other google layers. SP. From: Francesco Pennica Sent: Monday, August 31, 2009 5:58 AM To: stephane.poirier@usherbrooke.ca Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] switching default layer before initial map display Hello, I think you just have to change the order when you add layers to map: map.addLayers([googlestreetsLayer,googlephysicalLayer,...]); to: map.addLayers([googlephysicalLayer,googlestreetsLayer,...]); 2009/8/31 Hi All, With the following code, I created a few google layers. Google streets gets to be the default. Now, how can I change the default layers to be, say, the google hybrid map? if (myepsg=="EPSG:900913") { googlestreetsLayer=new OpenLayers.Layer.Google("Google Streets",{"sphericalMercator": true,minZoomLevel: 2}); googlephysicalLayer=new OpenLayers.Layer.Google("Google Physical",{type: G_PHYSICAL_MAP, "sphericalMercator": true,minZoomLevel: 2}); googlesatelliteLayer=new OpenLayers.Layer.Google("Google Satellite",{type: G_SATELLITE_MAP, "sphericalMercator": true,minZoomLevel: 2}); googlehybridLayer = new OpenLayers.Layer.Google("Google Hybrid",{type: G_HYBRID_MAP, "sphericalMercator": true,minZoomLevel: 2}); } Stephane Poirier, M.Sc. Optic Physics Remote Sensing Application Software Developer Universit? de Sherbrooke 2500 Bd Universit?, Sherbrooke, Qc J1K 2R1 Canada www.usherbrooke.ca/cartel Stephane.Poirier@Usherbrooke.ca +1 (514) 509-8833 (actual work site telephone) _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/20359c71/attachment.html From stephane.poirier at usherbrooke.ca Mon Aug 31 11:44:18 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Fw: vector layers don't display in internetexplore 8.0.6001 anymore Message-ID: Nop Chris, the standard, by the book, vector layers demos do not work in my current IE80 install. I had this problem ever since the version 2.8rc2, but was working around using IE80 compatibility view to draw have everything draw perfectly. I also saw this problem occur when developing with 2.7 under IE70. I lost the vector layer drawing at some point (this for any demos of the large openlayers standard demos set - involving any vector layer, even selection tool does not draw). My IE70 problem disaper when I updated with IE80 provided using compatibility view. It is like if I should fix my IE install, but don`t know what to reset. In the recent days, with some ms-auto-update, the compatibility view mechanism is different, and does not seems to work anymore on my system. It is always using the new standard IE80 drawing and therefore I lost my capabilities of drawing vector layers. I have not reproduced this bug on other machines, but then again, I am pretty much always on my same developer machine (an XP Pro installed version 5.1.2600 service pack 3 Nu 2600 in french). My dxdiag directx diagnostic currently shows an non-optimal version of the d3d9d.dll (version 9.18.0944.0000 as opposed to my non-debug versions d3d9.dll and others being mostly stamped 5.03.2600.5512). I will also test under this sme computer`s WIN2K3 IE70 and IE80 install and let you know soon. But, I would really appreciate to find the fix for this WINXP PRO french install. SP. > -------------------------------------------------- > From: "Christopher Schmidt" > Sent: Monday, August 31, 2009 10:33 AM > To: > Cc: > Subject: Re: [OpenLayers-Users] vector layers don't display in > internetexplore 8.0.6001 anymore > >> On Sun, Aug 30, 2009 at 11:02:22PM -0400, stephane.poirier@usherbrooke.ca >> wrote: >>> Hi All, >>> >>> My vector layers do display fine in Firefox, Chrome, Safari but don't >>> display at all in IE 8.0.6001. I was using IE 8.0 compatibility view to >>> have proper vector layer display until recently. But now, Ie 8.0 >>> compatibility view does not seems to work or fix that issue anymore. >>> >>> Should I write specific code for IE 8.0? Or, is there a patch for IE >>> 8.0? >> >> Do the OpenLayers examples >> (http://openlayers.org/dev/examples/vector-features.html) work in IE 8? >> >> If they do, then you should explore why they don't work in your >> application. >> If they don't, I'd be interested in hearing about it. >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta >> >> From mario1982 at libero.it Mon Aug 31 12:01:03 2009 From: mario1982 at libero.it (mario1982@libero.it) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] (no subject) Message-ID: Hi all, I'm trying to export kml using 'write' function. The kml file is generated but it doesn't contains any style information (color, image etc.) and it's represented on Google Earth as a white line. How can I put the style information in the file? Here is just a part of my code: var gml3 = new OpenLayers.Format.GML.v2(gmlOptionsIn4); var provaLayerFeatures = new OpenLayers.Layer.Vector("provaLayerFeatures", { isBaseLayer: false }); featuresExpKml = gml3.read(unescape(g.geometry)); for (var t=0; t References: <4A9BE445.5020104@neogeo-online.net> Message-ID: On Monday, August 31, 2009, Guillaume Sueur wrote: > Hi list, > > I'm using a WMS layer on the top of Google Maps. This layer is set with > a MAXSCALE of 10000 in MapServer map file. > I'd like to avoid OpenLayers sending requests on resolutions over > 2.38865713348 which all return blank images. I've tried to set my layer > with maxResolution:2.38865713348 but it doesnt' help. > > any hint ? Hi Guillaume. Have you checked that the value of wmsLayer.maxResolution is what you expect after the WMS layer is added to the map? You can also set a breakpoint in the calculateInRange method to understand what's going on. > > Thanks > > Guillaume > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From no-reply at neogeo-online.net Mon Aug 31 12:24:22 2009 From: no-reply at neogeo-online.net (Guillaume Sueur) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] maxResolution for a WMS layer In-Reply-To: References: <4A9BE445.5020104@neogeo-online.net> Message-ID: <4A9BF936.6060402@neogeo-online.net> Hi Eric, Ok, I will hint for those. I just wanted to be sure that the expected behaviour could be obtained using maxResolution. Best regards ! Guillaume Eric Lemoine a ?crit : > On Monday, August 31, 2009, Guillaume Sueur wrote: >> Hi list, >> >> I'm using a WMS layer on the top of Google Maps. This layer is set with >> a MAXSCALE of 10000 in MapServer map file. >> I'd like to avoid OpenLayers sending requests on resolutions over >> 2.38865713348 which all return blank images. I've tried to set my layer >> with maxResolution:2.38865713348 but it doesnt' help. >> >> any hint ? > > Hi Guillaume. Have you checked that the value of > wmsLayer.maxResolution is what you expect after the WMS layer is added > to the map? You can also set a breakpoint in the calculateInRange > method to understand what's going on. >> Thanks >> >> Guillaume >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > From eric.lemoine at camptocamp.com Mon Aug 31 12:27:16 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] maxResolution for a WMS layer In-Reply-To: References: <4A9BE445.5020104@neogeo-online.net> Message-ID: On Monday, August 31, 2009, Eric Lemoine wrote: > On Monday, August 31, 2009, Guillaume Sueur wrote: >> Hi list, >> >> I'm using a WMS layer on the top of Google Maps. This layer is set with >> a MAXSCALE of 10000 in MapServer map file. >> I'd like to avoid OpenLayers sending requests on resolutions over >> 2.38865713348 which all return blank images. I've tried to set my layer >> with maxResolution:2.38865713348 but it doesnt' help. >> >> any hint ? > > Hi Guillaume. Have you checked that the value of > wmsLayer.maxResolution is what you expect after the WMS layer is added > to the map? You can also set a breakpoint in the calculateInRange > method to understand what's going on. also, wmsLayer.alwaysInRange should be false. >> >> Thanks >> >> Guillaume >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From crschmidt at metacarta.com Mon Aug 31 12:40:49 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] (no subject) In-Reply-To: References: Message-ID: <20090831164048.GG10927@metacarta.com> On Mon, Aug 31, 2009 at 06:01:03PM +0200, mario1982@libero.it wrote: > Hi all, > I'm trying to export kml using 'write' function. The kml file is generated but it doesn't contains any style information (color, image etc.) and it's represented on Google Earth as a white line. > How can I put the style information in the file? The Google Earth KML writer does not support writing style information at this time, to the best of my knowledge. You would need to extend the functionality of the KML Format to handle this. -- Chris > > > Here is just a part of my code: > > var gml3 = new OpenLayers.Format.GML.v2(gmlOptionsIn4); > > var provaLayerFeatures = new OpenLayers.Layer.Vector("provaLayerFeatures", { > isBaseLayer: false > }); > > featuresExpKml = gml3.read(unescape(g.geometry)); > > for (var t=0; t featuresExpKml[t].geometry.transform(srcProj, destProj); > provaLayerFeatures.addFeatures(featuresExpKml); > > g.geometryKml = escape(kmlout.write(provaLayerFeatures.features)); > > > > > > Thanks for your help, > Mario > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From chandu2708 at gmail.com Mon Aug 31 13:02:16 2009 From: chandu2708 at gmail.com (balachandra maddina) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] Where to get map servers that can be used by openlayers Message-ID: <8b587ae10908311002t2e6f6948s1276b4b1439f3da4@mail.gmail.com> Hi There, Im pretty new to maps(gis systems) and openlayers. i looked at some of the examples provided in openlayes documentation and saw few real time deployments using openlayers im trying to get a similar view like google maps but i dont want to use commercial data to display a map. i hard there are open servers available providing map data. bu im not sure where these are located. could any one point me to any such list please. any help would be appreciated. Thank you, bala. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090831/04d244db/attachment.html From no-reply at neogeo-online.net Mon Aug 31 13:49:57 2009 From: no-reply at neogeo-online.net (Guillaume Sueur) Date: Wed Sep 1 17:17:49 2010 Subject: [OpenLayers-Users] maxResolution for a WMS layer In-Reply-To: References: <4A9BE445.5020104@neogeo-online.net> Message-ID: <4A9C0D45.7070809@neogeo-online.net> Setting maxResolution after adding layer to the map did the trick. Thanks very much for your help which made me focused on the proper place. Hope it's going well for you and your team. Best regards, Guillaume Eric Lemoine a ?crit : > On Monday, August 31, 2009, Eric Lemoine wrote: >> On Monday, August 31, 2009, Guillaume Sueur wrote: >>> Hi list, >>> >>> I'm using a WMS layer on the top of Google Maps. This layer is set with >>> a MAXSCALE of 10000 in MapServer map file. >>> I'd like to avoid OpenLayers sending requests on resolutions over >>> 2.38865713348 which all return blank images. I've tried to set my layer >>> with maxResolution:2.38865713348 but it doesnt' help. >>> >>> any hint ? >> Hi Guillaume. Have you checked that the value of >> wmsLayer.maxResolution is what you expect after the WMS layer is added >> to the map? You can also set a breakpoint in the calculateInRange >> method to understand what's going on. > > also, wmsLayer.alwaysInRange should be false. > >>> Thanks >>> >>> Guillaume >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> -- >> Eric Lemoine >> >> Camptocamp France SAS >> Savoie Technolac, BP 352 >> 73377 Le Bourget du Lac, Cedex >> >> Tel : 00 33 4 79 44 44 96 >> Mail : eric.lemoine@camptocamp.com >> http://www.camptocamp.com >> >