From rahn at zhaw.ch Tue Dec 1 01:33:01 2009 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Change the style of scaletext Message-ID: <3F643797A078EB4FB02880080968098401A63AE9@langouste.zhaw.ch> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/bmp Size: 6658 bytes Desc: =?iso-8859-1?Q?Bild_=28Ger=E4teunabh=E4ngige_Bitmap=29?= Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091201/e9bd0506/attachment.bmp From andreas.hocevar at gmail.com Tue Dec 1 03:26:44 2009 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Change the style of scaletext In-Reply-To: <3F643797A078EB4FB02880080968098401A63AE9@langouste.zhaw.ch> References: <3F643797A078EB4FB02880080968098401A63AE9@langouste.zhaw.ch> Message-ID: <4B14D344.5060503@gmail.com> It is possible, but not very elegant: var scaleControl = map.addControl(new OpenLayers.Control.Scale(null, { updateScale: function() { var scale = scaleControl.map.getScale(); if (scale) { scaleControl.element.innerHTML = "1 : " + OpenLayers.Number.format(Math.round(scale), 0, "."); } } })); Regards, Andreas. Rahn Hanno (rahn) wrote: > > Hello list, > > Today I have another short question to you. In my map I use a scalebar > and a scaletext. > It looks like this: > > Bild (Ger?teunabh?ngige Bitmap) > > But now I want to have a text like this: 1:500.000 > Is there any possibility to change the scale text to this with some 0 > and without the "K". Perhaps it is possible too to change the text. I > think it is enough to write 1:500.000 without the "k" and without the > "scale =" > > For your help a lot of thanks. > > 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 frederic.junod at camptocamp.com Tue Dec 1 05:05:18 2009 From: frederic.junod at camptocamp.com (Frederic Junod) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Broken image for no tile, on Chrome In-Reply-To: <4AFB2C8D.8040507@lisasoft.com> References: <4AF9486E.5080304@opengeo.org> <4AFB2C8D.8040507@lisasoft.com> Message-ID: <21c3d1f40912010205sab631b9medab8b3fb8ad23d8@mail.gmail.com> Hi all, I've created a small test case for this issue: http://dev.camptocamp.com/~fredj/image-load-error.html The WMS layer always returns a 404 error so all the tiles are broken; they all should have a green background. With Chrome (on linux), some of the tiles do not have the olImageLoadError css class. fredj On Wed, Nov 11, 2009 at 10:28 PM, Roald de Wit wrote: > Hi Warren, > > Warren Vick wrote: >> Hi Andreas, >> >> I was on 2.7, but have just updated to 2.8. >> >> I already had this line in my code, but unfortunately missing tiles still show as broken on Chrome. >> OpenLayers.Util.onImageLoadErrorColor = "transparent"; >> >> I tried the CSS too, but still no joy. I've also found that the problem also shows in Safari (Mac). >> >> > > Does the problem go away if you use the SVN (trunk) version [1] of > OpenLayers (and set the background-color using CSS as Andreas > explained)? That might be your best bet. > > [1] http://openlayers.org/dev/OpenLayers.js > > Regards, Roald > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Fr?d?ric Junod Camptocamp SA From Sarah_flip at yahoo.de Tue Dec 1 05:40:01 2009 From: Sarah_flip at yahoo.de (Sarah_S) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Postgis layer srs 2908 supported? Message-ID: <1259664001696-4092947.post@n2.nabble.com> Hi list, I new to OL and want to use a multipolygon layer from postgis (within mapfish). layer has srs 2908 but is not displayed. I use this code: new OpenLayers.Layer.Vector("nyc_buildings", {protocol: new mapfish.Protocol.MapFish ({url: "nyc_buildings"}), strategies: [new OpenLayers.Strategy.BBOX()], isBaseLayer: true, visibility: true , styleMap: new OpenLayers.StyleMap({default: new OpenLayers.Style({strokeColor: "00FF00", strokeWidth: 3, fillColor: "00CC00"})}) },{projection: "EPSG:2908"}) but don?t know if I have to transform/reproject this layer via proj4js or I have simply an error of my code. If I select this layer at layer tree I get an error "Operation on two geometries with different srids" (pgadmin3 says that my layer has srid 2908) and a blank page- I think that Ol (or mapfish) has problems with epsg: 90019 and mine. Tried to change new OpenLayers.Projection and displayProjection to 2908 but that did not change anything. I?m using win server 2003. Any hints are welcome. Thanks best regards Sarah -- View this message in context: http://n2.nabble.com/Postgis-layer-srs-2908-supported-tp4092947p4092947.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From fsalas at geocuba.cu Tue Dec 1 09:30:21 2009 From: fsalas at geocuba.cu (fsalas) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] How Print openlayer Maps into pdf documents References: <000401ca2be7$c891f990$ed0110ac@deltha><4A9E8F2F.6090400@mapgears.com> <001e01ca2cc3$acf4f520$ec0110ac@deltha> Message-ID: <0b5801ca7292$e91db3b0$3998a8c0@deltha> Kris, I continue with this problems, I make one function for a print to pdf but, the map is not similar ,for example the point icons that show in pdf is poi style Instead my style , and also the resolution in pdf document is very low. ? How resolve this problems? This is my function function Imprimir() { var ext = map.getExtent(); var minx = ext.left; var miny = ext.bottom; var maxx = ext.right; var maxy = ext.top; var Cadena = "http://urano:3128/geoserver/wms?bbox="+minx+","+miny+","+maxx+","+maxy+"&styles=&Format=application/pdf&request=GetMap&version=1.1.1&layers="; for(var i = 0; i < map.layers.length; i++) {if(i < map.layers.length - 1) Cadena += map.layers[i].params.LAYERS+","; else Cadena += map.layers[i].params.LAYERS; }Cadena += "&width=400&height=300&srs=EPSG:4267"; window.open(Cadena); } thanks , Regards , Salas ----- Original Message ----- From: "fsalas" To: "Kris Geusebroek" ; Sent: Thursday, September 03, 2009 12:22 PM Subject: Re: [OpenLayers-Users] How Print openlayer Maps into pdf documents Thanks, Cheers Francisco Salas ----- Original Message ----- From: "Kris Geusebroek" To: "Alexandre Dube" ; "fsalas" Cc: Sent: Wednesday, September 02, 2009 3:34 PM Subject: RE: [OpenLayers-Users] How Print openlayer Maps into pdf documents Hi, If you are using geoserver you can create a wms request with format application/pdf et volia! Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Alexandre Dube Sent: Wednesday, September 02, 2009 5:29 PM To: fsalas Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] How Print openlayer Maps into pdf documents Hi, Did you read http://trac.openlayers.org/wiki/Printing ? About eh ezpdf class extension, are you talking about this : http://www.ros.co.nz/pdf/ ? If so, that's the lib I used with phpMapScript to accomplish some printing, but it supports WMS only and I use Ext to make my form. So take this example as a proof of concept only. See at : http://dev4.mapgears.com/wmsprint/ MapFish has a much more better printing tool and it supports Vector features printing. Best of luck, Alexandre fsalas wrote: > Hi all, > > I'm trying to print the current image maps into pdf documents > using the *EZPDF Class Extension,* but don?t work. > > some body know how i cant implement this. > > Thanks , > > 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 > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___________________________________ Direcci?n de Comunicaciones Grupo Empresarial GEOCUBA Este mensaje esta libre de virus. Revisado por Kaspersky Antivirus ---------------------------------------------------------------------- Definition count: 2492726 Definition date: 9/3/2009 SecurityPlus version: 3.0.5 _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___________________________________ Direcci?n de Comunicaciones Grupo Empresarial GEOCUBA Este mensaje esta libre de virus. Revisado por Kaspersky Antivirus ---------------------------------------------------------------------- Definition count: 2492726 Definition date: 9/3/2009 SecurityPlus version: 3.0.5 From rifins at gmail.com Tue Dec 1 10:03:04 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] WFS called with xmlhttprequest in different domain Message-ID: Hi, I have a web app served by IIS that calls WFS in geoserver. I've read that a proxy is needed to do this, but everything that I'm finding is for Apache.. To resolve this, I create a page called test.aspx that acts as a ProxyHost (test.aspx?url=) which is called and loads the URL passed as querystring. This works with GET and POST, but my problem is that when the result is returned to the client, after the XML there are the html tags appended. To call the GeoServer WFS I do the next code in test.aspx.vb: Dim wsResponse As XmlDocument = New XmlDocument() Dim url As String = Request.QueryString("url") wsResponse.Load(url) Dim XMLDocument As String = wsResponse.InnerXml Response.Clear() Response.ContentType = "text/xml" Response.Write(XMLDocument) And the result in client side is: [...]
Is there any way to avoid the adding of html tags and return only the XML? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091201/369a91fd/attachment.html From kgeusebroek at xebia.com Tue Dec 1 10:15:28 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] How Print openlayer Maps into pdf documents In-Reply-To: <0b5801ca7292$e91db3b0$3998a8c0@deltha> References: <000401ca2be7$c891f990$ed0110ac@deltha><4A9E8F2F.6090400@mapgears.com> <001e01ca2cc3$acf4f520$ec0110ac@deltha> <0b5801ca7292$e91db3b0$3998a8c0@deltha> Message-ID: Hi, Well the style could be because you don't provide a style in the url, this way geoserver uses the default style specified in the layer configuration. So you might want to add the layer style also And the resolution might be because of the width and height setting wich I think is smaller then the openlayers client width etc. Cheers Kris -----Original Message----- From: fsalas [mailto:fsalas@geocuba.cu] Sent: Tuesday, December 01, 2009 3:30 PM To: Kris Geusebroek Cc: users@openlayers.org Subject: [OpenLayers-Users] How Print openlayer Maps into pdf documents Kris, I continue with this problems, I make one function for a print to pdf but, the map is not similar ,for example the point icons that show in pdf is poi style Instead my style , and also the resolution in pdf document is very low. ? How resolve this problems? This is my function function Imprimir() { var ext = map.getExtent(); var minx = ext.left; var miny = ext.bottom; var maxx = ext.right; var maxy = ext.top; var Cadena = "http://urano:3128/geoserver/wms?bbox="+minx+","+miny+","+maxx+","+maxy+"&styles=&Format=application/pdf&request=GetMap&version=1.1.1&layers="; for(var i = 0; i < map.layers.length; i++) {if(i < map.layers.length - 1) Cadena += map.layers[i].params.LAYERS+","; else Cadena += map.layers[i].params.LAYERS; }Cadena += "&width=400&height=300&srs=EPSG:4267"; window.open(Cadena); } thanks , Regards , Salas ----- Original Message ----- From: "fsalas" To: "Kris Geusebroek" ; Sent: Thursday, September 03, 2009 12:22 PM Subject: Re: [OpenLayers-Users] How Print openlayer Maps into pdf documents Thanks, Cheers Francisco Salas ----- Original Message ----- From: "Kris Geusebroek" To: "Alexandre Dube" ; "fsalas" Cc: Sent: Wednesday, September 02, 2009 3:34 PM Subject: RE: [OpenLayers-Users] How Print openlayer Maps into pdf documents Hi, If you are using geoserver you can create a wms request with format application/pdf et volia! Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Alexandre Dube Sent: Wednesday, September 02, 2009 5:29 PM To: fsalas Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] How Print openlayer Maps into pdf documents Hi, Did you read http://trac.openlayers.org/wiki/Printing ? About eh ezpdf class extension, are you talking about this : http://www.ros.co.nz/pdf/ ? If so, that's the lib I used with phpMapScript to accomplish some printing, but it supports WMS only and I use Ext to make my form. So take this example as a proof of concept only. See at : http://dev4.mapgears.com/wmsprint/ MapFish has a much more better printing tool and it supports Vector features printing. Best of luck, Alexandre fsalas wrote: > Hi all, > > I'm trying to print the current image maps into pdf documents > using the *EZPDF Class Extension,* but don?t work. > > some body know how i cant implement this. > > Thanks , > > 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 > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___________________________________ Direcci?n de Comunicaciones Grupo Empresarial GEOCUBA Este mensaje esta libre de virus. Revisado por Kaspersky Antivirus ---------------------------------------------------------------------- Definition count: 2492726 Definition date: 9/3/2009 SecurityPlus version: 3.0.5 _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___________________________________ Direcci?n de Comunicaciones Grupo Empresarial GEOCUBA Este mensaje esta libre de virus. Revisado por Kaspersky Antivirus ---------------------------------------------------------------------- Definition count: 2492726 Definition date: 9/3/2009 SecurityPlus version: 3.0.5 From jgolinowski at codematix.de Tue Dec 1 11:13:30 2009 From: jgolinowski at codematix.de (Jana Golinowski) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] WFS called with xmlhttprequest in different domain In-Reply-To: References: Message-ID: <4B1540AA.3000207@codematix.de> Hi, > I have a web app served by IIS that calls WFS in geoserver. I've read > that a proxy is needed to do this, but everything that I'm finding is > for Apache.. I don't think there is no information about setting up a Reverse Proxy with IIS. Using Google you can find more than 2 million results for "iis proxy" and about 100000 results for "iis reverse proxy". I have never used IIS but nearly every link on the first pages seems to be helpful. You could try Managed Fusion URL Rewriter for example or Microsoft's ISA Server. Greetings, Jana. From eric.lemoine at camptocamp.com Tue Dec 1 11:30:27 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Broken image for no tile, on Chrome In-Reply-To: <21c3d1f40912010205sab631b9medab8b3fb8ad23d8@mail.gmail.com> References: <4AF9486E.5080304@opengeo.org> <4AFB2C8D.8040507@lisasoft.com> <21c3d1f40912010205sab631b9medab8b3fb8ad23d8@mail.gmail.com> Message-ID: On Tuesday, December 1, 2009, Frederic Junod wrote: > Hi all, > > I've created a small test case for this issue: > http://dev.camptocamp.com/~fredj/image-load-error.html > The WMS layer always returns a 404 error so all the tiles are broken; > they all should have a green background. > > With Chrome (on linux), some of the tiles do not have the > olImageLoadError css class. Hi fredj Is there a ticket for that issue? If not we should create one and mark it for 2.9. 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 truong_pham_minh at yahoo.com Tue Dec 1 13:01:06 2009 From: truong_pham_minh at yahoo.com (truongpm) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Is that possible if user download map from webgis application??? Message-ID: <1259690466248-4095166.post@n2.nabble.com> Hi all, I'm have been working with mapserver and openlayers for three month. So i don't know is that possible to allow user download my map to his machine??? (If i used mapserver and openlayers) My requirement is allow user draw the rectangle on map and download this frame to his machine. After that, he can use some software (ex: quantum gis ) to working with map which he just download. I had spent a lot of time to fine solution on web but had no information. Please help me. Thank for your attention add sorry about my english skill. -- View this message in context: http://n2.nabble.com/Is-that-possible-if-user-download-map-from-webgis-application-tp4095166p4095166.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dragan.podvezanec at gmail.com Tue Dec 1 14:28:33 2009 From: dragan.podvezanec at gmail.com (Dragan Podvezanec) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] How to fetch polygon color from SLD ? Message-ID: <1259695713518-4095731.post@n2.nabble.com> Hi all. I'm trying to make custom layer switcher, with legend, because I have thematic map. It contains few polygon WMS layers from Geoserver. Those layers are same layer on GS, but filtered by attributes, so I can switch them on or off. What intterests me, how can I make small PNG with layer color from SLD, based on attributes? I tried to use GetLegendGraphic WMS request, but as I see, this request doesn't accept OGCFilter, so I cannot fetch color for single layer created with filter. I get PNG's for all layers. Is there any other workaround how to achieve this, or I will have to write my own SLD parser? :( -- View this message in context: http://n2.nabble.com/How-to-fetch-polygon-color-from-SLD-tp4095731p4095731.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jsolanu at gmail.com Tue Dec 1 15:16:51 2009 From: jsolanu at gmail.com (Jon Solanu) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Openlayers with Google Fusion Message-ID: <1259698611581-4096007.post@n2.nabble.com> Can OpenLayers display data from a Google Fusion server? I haven't been able to find any documentation on if its supported or not. -- View this message in context: http://n2.nabble.com/Openlayers-with-Google-Fusion-tp4096007p4096007.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Tue Dec 1 17:24:36 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Openlayers with Google Fusion In-Reply-To: <1259698611581-4096007.post@n2.nabble.com> References: <1259698611581-4096007.post@n2.nabble.com> Message-ID: <20091201222436.GE4421@metacarta.com> On Tue, Dec 01, 2009 at 12:16:51PM -0800, Jon Solanu wrote: > > Can OpenLayers display data from a Google Fusion server? > > I haven't been able to find any documentation on if its supported or not. I've seen it done, however, OpenLayers developers don't have one to test with, so there is a chance that things will work incorrectly, differently, etc. Regards, -- Christopher Schmidt MetaCarta From jsolanu at gmail.com Tue Dec 1 17:38:53 2009 From: jsolanu at gmail.com (Jon Solanu) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Openlayers with Google Fusion In-Reply-To: <20091201222436.GE4421@metacarta.com> References: <1259698611581-4096007.post@n2.nabble.com> <20091201222436.GE4421@metacarta.com> Message-ID: <1259707133151-4096788.post@n2.nabble.com> Any chance you know which Layer class was used or if something custom was done? Christopher Schmidt-2 wrote: > > On Tue, Dec 01, 2009 at 12:16:51PM -0800, Jon Solanu wrote: >> >> Can OpenLayers display data from a Google Fusion server? >> >> I haven't been able to find any documentation on if its supported or not. > > I've seen it done, however, OpenLayers developers don't have one to test > with, so there is a chance that things will work incorrectly, differently, > etc. > > 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/Openlayers-with-Google-Fusion-tp4096007p4096788.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From yapingluo2002 at yahoo.com Tue Dec 1 17:46:53 2009 From: yapingluo2002 at yahoo.com (Yaping Luo) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] would you mind take me off the mailing list: yapingluo2002@yahoo.com Message-ID: <496812.29646.qm@web31502.mail.mud.yahoo.com> Thanks __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091201/f3165495/attachment.html From jimlug at co.clackamas.or.us Tue Dec 1 18:59:40 2009 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] PopUp Boxes Message-ID: <1259711980309-4097151.post@n2.nabble.com> Hey folks, I am struggling to understand why my popup boxes are not displaying. I've read multiple articles and browsed the Users area extensively without any success. My ultimate goal is to create a popup for a marker. The error I'm receiving is px is null. Here is my code: // Create new marker and add to map var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(markers); // Set properties for marker var size = new OpenLayers.Size(20,20); var offset = new OpenLayers.Pixel(-(size.w/2), -size.h); var icon = new OpenLayers.Icon("http://www.clackamas.us/jimlug/images/purple-pushpin.png", size, offset); markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-13640608.09925, 5680799.94136), icon)); // Create Popup for marker var testPopup = new OpenLayers.Popup.AnchoredBubble("test popup", new OpenLayers.LonLat(-13640608.09925, 5680799.94136), new OpenLayers.Size(200,200), "test popup", new OpenLayers.Icon("http://www.clackamas.us/jimlug/images/purple-pushpin.png", size, offset), true); map.addPopup(testPopup); Any suggestions would be greatly appreciated. Thanks. -- View this message in context: http://n2.nabble.com/PopUp-Boxes-tp4097151p4097151.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From p.scadden at gns.cri.nz Tue Dec 1 21:38:15 2009 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] WFS geometry problem from openlayers after moving to Geoserver 2.0 Message-ID: <4B15D317.7050903@gns.cri.nz> Issues here. filter: new OpenLayers.Filter.Spatial({ property: "SHAPE", type: OpenLayers.Filter.Spatial.DWITHIN, distance: map.getExtent().getHeight() / 10000000, distanceUnits: "degree", value: e.feature.geometry }), I set up a filter on a layer, (SDE now coming from Geoserver 2.0). It generates a POST of |||the_geom19372200.445898 -4657155||.25871090.46082355604312003 note the property name of "the_geom". This gets a wfs response of: | | || || || Illegal property name: the_geom || || Quite correct - because the geometry is in SHAPE not in the_geom. What am I doing wrong or has an incompatibility developed with geoserver? | -- Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232 Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From igrcic at gmail.com Wed Dec 2 01:56:12 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] How to fetch polygon color from SLD ? In-Reply-To: <1259695713518-4095731.post@n2.nabble.com> References: <1259695713518-4095731.post@n2.nabble.com> Message-ID: Hi, this is more for Geoserver user list... but try with this params: &LEGEND_OPTIONS=forceLabels:off&RULE=Rule 2a LEGEND_OPTIONS is a geoserver spesific so it probably wont work with other wms servers, while RULE is SLD standard si it should work with any comliant server. http://geoserver.org/display/GEOSDOC/GetLegendGraphic+Improvements cheers On Tue, Dec 1, 2009 at 8:28 PM, Dragan Podvezanec wrote: > > Hi all. > > I'm trying to make custom layer switcher, with legend, because I have > thematic map. It contains few polygon WMS layers from Geoserver. Those > layers are same layer on GS, but filtered by attributes, so I can switch > them on or off. > > What intterests me, how can I make small PNG with layer color from SLD, > based on attributes? I tried to use GetLegendGraphic WMS request, but as I > see, this request doesn't accept OGCFilter, so I cannot fetch color for > single layer created with filter. I get PNG's for all layers. > > Is there any other workaround how to achieve this, or I will have to write > my own SLD parser? :( > > > -- > View this message in context: http://n2.nabble.com/How-to-fetch-polygon-color-from-SLD-tp4095731p4095731.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 dragan.podvezanec at gmail.com Wed Dec 2 02:33:42 2009 From: dragan.podvezanec at gmail.com (Dragan Podvezanec) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] How to fetch polygon color from SLD ? In-Reply-To: References: <1259695713518-4095731.post@n2.nabble.com> Message-ID: <1259739222819-4098420.post@n2.nabble.com> Ivan Grcic-2 wrote: > > Hi, > > this is more for Geoserver user list... but try with this params: > > &LEGEND_OPTIONS=forceLabels:off&RULE=Rule 2a > > LEGEND_OPTIONS is a geoserver spesific so it probably wont work with > other wms servers, while RULE is SLD standard si it should work with > any comliant server. > http://geoserver.org/display/GEOSDOC/GetLegendGraphic+Improvements > > cheers > > That's it! Thank you very much! -- View this message in context: http://n2.nabble.com/How-to-fetch-polygon-color-from-SLD-tp4095731p4098420.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From frederic.junod at camptocamp.com Wed Dec 2 03:22:24 2009 From: frederic.junod at camptocamp.com (Frederic Junod) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Broken image for no tile, on Chrome In-Reply-To: References: <4AF9486E.5080304@opengeo.org> <4AFB2C8D.8040507@lisasoft.com> <21c3d1f40912010205sab631b9medab8b3fb8ad23d8@mail.gmail.com> Message-ID: <21c3d1f40912020022i456530c8uf78c5297bc98c4e3@mail.gmail.com> Hi, http://trac.openlayers.org/ticket/2371 I'm searching the webkit bugzilla (https://bugs.webkit.org/) but I've not found any related bug yet. fredj On Tue, Dec 1, 2009 at 5:30 PM, Eric Lemoine wrote: > On Tuesday, December 1, 2009, Frederic Junod > wrote: >> Hi all, >> >> I've created a small test case for this issue: >> http://dev.camptocamp.com/~fredj/image-load-error.html >> The WMS layer always returns a 404 error so all the tiles are broken; >> they all should have a green background. >> >> With Chrome (on linux), some of the tiles do not have the >> olImageLoadError css class. > > Hi fredj > > Is there a ticket for that issue? If not we should create one and mark > it for 2.9. > > 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 > -- Fr?d?ric Junod Camptocamp SA From steffen.schwarz85 at googlemail.com Wed Dec 2 03:23:47 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Adding filters to a OpenLayers.Filter.Logical Message-ID: <1259742227340-4098568.post@n2.nabble.com> Hello, The name of my subject is maybe a bit confusing but nevertheless I describe my problem in detail. I have some filters which are combined with a 'logical filter' with type 'and' here is my code: var my_filter = new OpenLayers.Filter.Logical ({ type: OpenLayers.Filter.Logical.AND, filters: [filter_1, filter_2, filter_3, filter_4] }); My problem is now, that some of this 4 filters are undefined sometimes. And when one filter is undefined the code doesn't work. But it can be, that all 4 filters are defined and therefore I have to combine the filters like that. Now my question: Is there any other possibility to add the filters like I did it above. The best would be to add every filter not until I have checked them if they are defined or not. I didn't found a my_filter.add or something like that in the class documentation. What can I do to solve this problem. Thanks for the help. Regards stash -- View this message in context: http://n2.nabble.com/Adding-filters-to-a-OpenLayers-Filter-Logical-tp4098568p4098568.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From yuanrong303 at yeah.net Wed Dec 2 03:24:06 2009 From: yuanrong303 at yeah.net (zsuRuby) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] TileCache problem in IE6/7 when using Map.setCenter Message-ID: <1259742246681-4098569.post@n2.nabble.com> hi: everyone,I got a problem when using Map.setCenter to changing my map's center; i extend Map.js as follows: /** * @class CNavMap * a class to create base map for developing. * * @extends OpenLayers.Map * @param{ * div - container for map images. * option - additional configuration for map. * } * * case: * var option = { * * } * var style=new CNavMap($('mapdiv'),option); * * @see OpenLayers.Map.js */ CNavMap = OpenLayers.Class(OpenLayers.Map,{ /** * @Description * @See OpenLayers.Layer.Vector */ dynamicVectorLayer:null, /** * @Description * @See OpenLayers.Layer.Vector */ staticVectorLayer:null, /** * */ dynamicMarkerLayer:null, /** * */ staticMarkerLayer:null, initialize: function (div, options){ var option=options; if(!option) option={}; OpenLayers.Util.extend(option,{ controls:[ new OpenLayers.Control.Navigation(), new OpenLayers.Control.ArgParser(), new OpenLayers.Control.Attribution() ] } ); OpenLayers.Map.prototype.initialize.apply(this ,[div,option]); this.projection=new OpenLayers.Projection("EPSG:900913"); this.displayProjection=new OpenLayers.Projection("EPSG:4326"); this.units="m"; this.numZoomLevels=15; this.maxResolution=19567.8792375; this.maxExtent=new OpenLayers.Bounds(-20037508, -20037508,20037508*2,20037508); this.restrictedExtent=new OpenLayers.Bounds(-20037508, -20037508,20037508*2,13358338.667); this.addLayer(new CNavTileCache("baseMap",TILE_PIV_URL,{isBaseLayer:true})); this.div.oncontextmenu = function () { return false;}; if(CENTER_LONLAT){ this.zoomToLonLat(new OpenLayers.LonLat(CENTER_LONLAT[0],CENTER_LONLAT[1]),DEFAULT_ZOOM); } this._initLayer(); }, _initLayer:function(){ var layer=[ this.dynamicVectorLayer=new OpenLayers.Layer.Vector("featureLayer"), this.dynamicMarkerLayer=new CNavDynamicMarkerLayer("dynamicMarkerLayer"), this.staticMarkerLayer=new OpenLayers.Layer.Markers("staticMarkerLayer") ] this.addLayers(layer); }, /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /** * method:zoomToLonLat * * @param { * lonlat - {LonLat} * zoom - {int} * } * @return */ zoomToLonLat: function(lonlat,zoom){ var p=CNavUtil._toMerc(lonlat);//"EPSG:4326"->"EPSG:900913" this.setCenter(p,zoom,false,true); }, CLASS_NAME:"CNavMap" }); CNavTileCache class is a class extends OpenLayers.Layer.TileCache.js every works fine when CNavMap initialize;it show tiles correctly; but when i click: <\a href="javascript:;" onclick="zoomToLonLat();">zoomToLonLat function zoomToLonLat(){ map.zoomToLonLat(new LonLat(113.2663,23.1489),8); } magic happens: it works in firefox but IE6/7 ;it seems IE8 works too; In Ie6/7 : tiles are not show on map; when i use fillder2 to see the requests ,it seems the requests response 200 Ok; when i check the DOM the tiles seem had add to the container with displsy:none; and the Previous Tiles also in the container too. does anybody can see wha's happening? -- View this message in context: http://n2.nabble.com/TileCache-problem-in-IE6-7-when-using-Map-setCenter-tp4098569p4098569.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Wed Dec 2 03:30:09 2009 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Adding filters to a OpenLayers.Filter.Logical In-Reply-To: <1259742227340-4098568.post@n2.nabble.com> References: <1259742227340-4098568.post@n2.nabble.com> Message-ID: Hi, why not use something like: var my_filter = new OpenLayers.Filter.Logical({type: OpenLayers.Filter.Logical.AND}); // loop over your filters here and only add if not undefined if (filter !== undefined) { my_filter.filters.push(filter); } Best regards, Bart On Dec 2, 2009, at 9:23 AM, stash wrote: > > Hello, > The name of my subject is maybe a bit confusing but nevertheless I describe > my problem in detail. > > I have some filters which are combined with a 'logical filter' with type > 'and' > > here is my code: > > var my_filter = new OpenLayers.Filter.Logical > ({ > type: OpenLayers.Filter.Logical.AND, > filters: [filter_1, filter_2, filter_3, filter_4] > }); > > My problem is now, that some of this 4 filters are undefined sometimes. And > when one filter is undefined the code doesn't work. But it can be, that all > 4 filters are defined and therefore I have to combine the filters like that. > > Now my question: > Is there any other possibility to add the filters like I did it above. The > best would be to add every filter not until I have checked them if they are > defined or not. > > I didn't found a my_filter.add or something like that in the class > documentation. > > What can I do to solve this problem. > > Thanks for the help. > > Regards > stash > > > -- > View this message in context: http://n2.nabble.com/Adding-filters-to-a-OpenLayers-Filter-Logical-tp4098568p4098568.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 adrian_gh.popa at romtelecom.ro Wed Dec 2 05:10:08 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] on window size change - zoom the map instead of enlarging the extent Message-ID: <4B163D00.6040205@romtelecom.ro> Hello everyone, I would like to change the behavior of OpenLayers like this: Now, when the user resizes the browser window, the map remains centered on the previous view, the zoom remains the same, and the edges of the map are downloaded. I would like on window resize, to keep the current view in the visible part on the map and just do a zoom to extent (for my current extent). The change should thus be in the zoom used. I want to know if this is possible (and if I can change a on-window-resize handler action), or if I need to build some ugly hack around it. A pointer to the relevant documentation or an example is highly appreciated. Thanks, -- --- 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 kgeusebroek at xebia.com Wed Dec 2 05:58:35 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Array of url's not working with WFS protocol Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2217 bytes Desc: image001.jpg Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091202/90eb0a71/attachment.jpe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 8056 bytes Desc: image002.png Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091202/90eb0a71/attachment.png From bartvde at osgis.nl Wed Dec 2 06:45:44 2009 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Array of url's not working with WFS protocol In-Reply-To: References: Message-ID: Hi Kris, your assumption is right. Best regards, Bart On Dec 2, 2009, at 11:58 AM, Kris Geusebroek wrote: > Am i right that supplying a array of urls to a wfs protocol is not working like with a layer? > > If so I will try tomorrow to create a patch to provide this functionality > > Cheers Kris > > Met vriendelijke groet, Kind regards, > > Kristiaan Geusebroek > Consultant > > > > > Email: kgeusebroek@xebia.com > Tel: +31 (0)35 538 1921 > Fax: +31 (0)35 538 1922 > Mobiel: +31 (0)6 3069 7223 > > Utrechtseweg 49 > 1213 TL Hilversum > The Netherlands > http://www.xebia.com > > Xebia Blog: http://blog.xebia.com/ > Xebia Podcast: http://podcast.xebia.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/20091202/e31b4707/attachment.html From steffen.schwarz85 at googlemail.com Wed Dec 2 07:06:16 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Adding filters to a OpenLayers.Filter.Logical In-Reply-To: References: <1259742227340-4098568.post@n2.nabble.com> Message-ID: <1259755576899-4099500.post@n2.nabble.com> bartvde wrote: > > > my_filter.filters.push(filter); > } > Hi, thank you, that's exactly what I need. Regards stash -- View this message in context: http://n2.nabble.com/Adding-filters-to-a-OpenLayers-Filter-Logical-afterwards-tp4098568p4099500.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Dec 2 09:17:18 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Openlayers with Google Fusion In-Reply-To: <1259707133151-4096788.post@n2.nabble.com> References: <1259698611581-4096007.post@n2.nabble.com> <20091201222436.GE4421@metacarta.com> <1259707133151-4096788.post@n2.nabble.com> Message-ID: <20091202141718.GF4421@metacarta.com> On Tue, Dec 01, 2009 at 02:38:53PM -0800, Jon Solanu wrote: > > Any chance you know which Layer class was used or if something custom was > done? The Google Layer. -- Chris > > > Christopher Schmidt-2 wrote: > > > > On Tue, Dec 01, 2009 at 12:16:51PM -0800, Jon Solanu wrote: > >> > >> Can OpenLayers display data from a Google Fusion server? > >> > >> I haven't been able to find any documentation on if its supported or not. > > > > I've seen it done, however, OpenLayers developers don't have one to test > > with, so there is a chance that things will work incorrectly, differently, > > etc. > > > > 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/Openlayers-with-Google-Fusion-tp4096007p4096788.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 digitalmedia5 at gmail.com Wed Dec 2 11:03:22 2009 From: digitalmedia5 at gmail.com (digitalmedia5@gmail.com) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] dynamic map coordinated and popups Message-ID: I have maps set up with polygons over a few specific areas. when a user clicks on an area the pop-up displays a small amount of information about that area. This does work, but I would like to display a different map with different information based on information from a mysql database. I can't seem to figure out how to add multiple polygons to the map based on information in my mysql database and show the popup information. I am trying to store this information in a mysql database (coordinates for the polygons, and popup information). how can I get the data from my database into the map? Any Ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091202/85ecb18b/attachment.html From bitner at gyttja.org Wed Dec 2 11:24:48 2009 From: bitner at gyttja.org (David William Bitner) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Openlayers with Google Fusion In-Reply-To: <20091202141718.GF4421@metacarta.com> References: <1259698611581-4096007.post@n2.nabble.com> <20091201222436.GE4421@metacarta.com> <1259707133151-4096788.post@n2.nabble.com> <20091202141718.GF4421@metacarta.com> Message-ID: Yes, I have done this. You can extend the Google Layer minimally and get a connection against a Fusion Layer going --- however -- there are still lots of bugs and things that work *almost* the same but not quite enough that it doesn't mess some things up. I have been trying to work with the Google Enterprise folks to get something to test against (and some better documentation about the differences between the Fusion API and the Maps API) but have not heard anything back from them yet. David On Wed, Dec 2, 2009 at 8:17 AM, Christopher Schmidt wrote: > On Tue, Dec 01, 2009 at 02:38:53PM -0800, Jon Solanu wrote: > > > > Any chance you know which Layer class was used or if something custom was > > done? > > The Google Layer. > > -- Chris > > > > > > > Christopher Schmidt-2 wrote: > > > > > > On Tue, Dec 01, 2009 at 12:16:51PM -0800, Jon Solanu wrote: > > >> > > >> Can OpenLayers display data from a Google Fusion server? > > >> > > >> I haven't been able to find any documentation on if its supported or > not. > > > > > > I've seen it done, however, OpenLayers developers don't have one to > test > > > with, so there is a chance that things will work incorrectly, > differently, > > > etc. > > > > > > 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/Openlayers-with-Google-Fusion-tp4096007p4096788.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 > -- ************************************ David William Bitner -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091202/15c3d4de/attachment.html From eric.lemoine at camptocamp.com Wed Dec 2 12:06:26 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] on window size change - zoom the map instead of enlarging the extent In-Reply-To: <4B163D00.6040205@romtelecom.ro> References: <4B163D00.6040205@romtelecom.ro> Message-ID: On Wed, Dec 2, 2009 at 11:10 AM, Adrian Popa wrote: > Hello everyone, > > I would like to change the behavior of OpenLayers like this: > > Now, when the user resizes the browser window, the map ?remains centered > on the previous view, the zoom remains the same, and the edges of the > map are downloaded. > > I would like on window resize, to keep the current view in the visible > part on the map and just do a zoom to extent (for my current extent). > The change should thus be in the zoom used. > > I want to know if this is possible (and if I can change a > on-window-resize handler action), or if I need to build some ugly hack > around it. A pointer to the relevant documentation or an example is > highly appreciated. You may want to try to override the Map's updateSize method. You can do that either by overriding the updateSize method in your map instance: var map = new OpenLayers.Map("div", { updateSize: function() { } }); or by creating a custom Map class: CustomMap = OpenLayers.Class(OpenLayers.Map, { updateSize: function() { } }); I'd recommend you look at the Map.resizeMap method to understand what it does first. 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 rburghol at vt.edu Wed Dec 2 17:44:37 2009 From: rburghol at vt.edu (Robert Burgholzer) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Customizing Pop-up Text on EditingToolbar shape Message-ID: <3582cd9b0912021444h15dbc2abg724fb1b1ea108d45@mail.gmail.com> Hello, I would like to be able to put a custom text (a data entry form) on the pop-up of a point or polygon added using the editingToolbar. My vision is that I would either: - add a point/polygon using the editingToolbar, and trigger the pop-up to come up automatically (on mouse release), this popup would have an HTML form for adding data relevant to the new point/polygon - Or, open the same HTML form in a div outside of the map (not in the pop-up), still triggered by the mouse release Honestly, though, I am a cookbook hack OL programmer, just cutting and pasting from the example pages, and I can't for the life of me figure out how to tell the editingToolbar what the pop-up text should be when a shape is created, nor do I really have any clue as to how the even listeners are passed in and inherited. I have a lot to learn but have not succeeded reviewing the Wiki. Any help (examples, or pointers to relevant docs) would be awesome, r.b. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091202/6e4872f4/attachment.html From carina_palanca at forcorp.com Wed Dec 2 18:36:27 2009 From: carina_palanca at forcorp.com (cgp) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Is there a way to get the absolute bounding box of a feature in a layer? Message-ID: <1259796987424-4103130.post@n2.nabble.com> Please see image attached. http://n2.nabble.com/file/n4103130/feature.png My goal is to zoom in to a feature when I click on a button. My code would be essentially like this (assuming all required declarations are made): $("#zoomToFeatureButton").click(function(){ var feature_id = $("#input_feat_id").val(); var bounds = getFeatureBounds(feature_id ); //get bounds of feature zoomToFeature(bounds ); } function zoomToFeature(data) { var bounds = data.split("^"); //bounds passed in var min_x = bounds[0]; var min_y = bounds[1]; var max_x = bounds[2]; var max_y = bounds[3]; var feature_bounds = new OpenLayers.Bounds(min_x, min_y, max_x, max_y); map.zoomToExtent(feature_bounds,true); } My problem is within getFeatureBounds(feature_id ). I can't seem to find anything that would allow me to get the bounding box of a feature. If I can get the min x, min y, max x and max y of a feature, will that let me create a Bounds object and use that for zooming? Thanks. -- View this message in context: http://n2.nabble.com/Is-there-a-way-to-get-the-absolute-bounding-box-of-a-feature-in-a-layer-tp4103130p4103130.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From brad at cubewerx.com.au Wed Dec 2 18:59:30 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Is there a way to get the absolute bounding box of a feature in a layer? In-Reply-To: <1259796987424-4103130.post@n2.nabble.com> References: <1259796987424-4103130.post@n2.nabble.com> Message-ID: <000001ca73ab$7dfc5090$79f4f1b0$@com.au> I do this in two ways so if there is a better way then I'd like to know. 1) When I load all my data into my repository I pre-process the data and build a BBox attribute or every polygon in the load set (layer). Then I just do either a getFeature or a getfeatureinfo to pick off the BBox attribute. 2) If the layer was created before I started adding BBoxes for each feature - I can determine this from a return of a getFeature request - I then parse the GML geometry to generate a BBox. These can be done either at the client or on the server (I use PHP). Cheers, Brad... -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of cgp Sent: Thursday, December 03, 2009 10:36 AM To: users@openlayers.org Subject: [OpenLayers-Users] Is there a way to get the absolute bounding box of a feature in a layer? Please see image attached. http://n2.nabble.com/file/n4103130/feature.png My goal is to zoom in to a feature when I click on a button. My code would be essentially like this (assuming all required declarations are made): $("#zoomToFeatureButton").click(function(){ var feature_id = $("#input_feat_id").val(); var bounds = getFeatureBounds(feature_id ); //get bounds of feature zoomToFeature(bounds ); } function zoomToFeature(data) { var bounds = data.split("^"); //bounds passed in var min_x = bounds[0]; var min_y = bounds[1]; var max_x = bounds[2]; var max_y = bounds[3]; var feature_bounds = new OpenLayers.Bounds(min_x, min_y, max_x, max_y); map.zoomToExtent(feature_bounds,true); } My problem is within getFeatureBounds(feature_id ). I can't seem to find anything that would allow me to get the bounding box of a feature. If I can get the min x, min y, max x and max y of a feature, will that let me create a Bounds object and use that for zooming? Thanks. -- View this message in context: http://n2.nabble.com/Is-there-a-way-to-get-the-absolute-bounding-box-of-a-fe ature-in-a-layer-tp4103130p4103130.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 Wed Dec 2 22:44:51 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Is there a way to get the absolute bounding box of a feature in a layer? In-Reply-To: <1259796987424-4103130.post@n2.nabble.com> References: <1259796987424-4103130.post@n2.nabble.com> Message-ID: var feature_bounds= layer.getFeatureById(feature_id).geometry.getBounds(); http://dev.openlayers.org/docs/files/OpenLayers/Geometry-js.html#OpenLayers.Geometry.getBounds map.zoomToExtent(feature_bounds,true); cheers On Thu, Dec 3, 2009 at 12:36 AM, cgp wrote: > > Please see image attached. ?http://n2.nabble.com/file/n4103130/feature.png > > My goal is to zoom in to a feature when I click on a button. > > My code would be essentially like this (assuming all required declarations > are made): > > $("#zoomToFeatureButton").click(function(){ > ? ? var feature_id = $("#input_feat_id").val(); > ? ? var bounds = ?getFeatureBounds(feature_id ); ? ? ? //get bounds of > feature > ? ? zoomToFeature(bounds ); > } > > ? ? ? ?function zoomToFeature(data) { > ? ? ? ? ? ? ? ?var bounds = data.split("^"); //bounds passed in > > ? ? ? ? ? ? ? ?var min_x = bounds[0]; > ? ? ? ? ? ? ? ?var min_y = bounds[1]; > ? ? ? ? ? ? ? ?var max_x = bounds[2]; > ? ? ? ? ? ? ? ?var max_y = bounds[3]; > > ? ? ? ? ? ? ? ?var feature_bounds = new OpenLayers.Bounds(min_x, min_y, max_x, max_y); > > ? ? ? ? ? ? ? ?map.zoomToExtent(feature_bounds,true); > ? ? ? ?} > > > > My problem is within getFeatureBounds(feature_id ). I can't seem to find > anything that would allow me to get the bounding box of a feature. If I can > get the min x, min y, max x and max y of a feature, will that let me create > a Bounds object and use that for zooming? > > Thanks. > > -- > View this message in context: http://n2.nabble.com/Is-there-a-way-to-get-the-absolute-bounding-box-of-a-feature-in-a-layer-tp4103130p4103130.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 regio-gis at ec.europa.eu Thu Dec 3 03:39:10 2009 From: regio-gis at ec.europa.eu (regioGIS) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] How to preset a parameter into a callback function? In-Reply-To: <5e3c00490911301016s33c6076eua2fad3820c384c8f@mail.gmail.com> References: <5e3c00490911300953i11b11666we2a8290fe50d9802@mail.gmail.com> <5e3c00490911301016s33c6076eua2fad3820c384c8f@mail.gmail.com> Message-ID: <1259829550259-4104800.post@n2.nabble.com> Hello Pedro, Would you mind sharing the code on how you finally implemented this ? I need to do the same thing, but always thought it was not possible ... Thanks in advance. RegioGIS Pedro Baracho wrote: > > OpenLayers.Function.bind is exactly what I am looking for. At least if it > is > the same as the Prototype one. > Sorry for disturbing you guys before trying it out. > > -- View this message in context: http://n2.nabble.com/How-to-preset-a-parameter-into-a-callback-function-tp4089001p4104800.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu Dec 3 03:49:32 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Is that possible if user download map from webgis application??? In-Reply-To: <1259690466248-4095166.post@n2.nabble.com> References: <1259690466248-4095166.post@n2.nabble.com> Message-ID: <4B177B9C.3080608@opengeo.org> Hi, this depends on what format you expect do download. In GeoServer, you can use outputformat "shape-zip" to download a shapefile from a WFS request. For Mapserver I don't know, others may have a better answer here. The general answer is: to do this, you need to issue a WFS request with your rectangle as BBOX filter: var control = new OpenLayers.Control(); control.handler = new OpenLayers.Handler.Box(control, { done: function(pos) { if(pos instanceof OpenLayers.Bounds) { window.open("http://path/to/your/wfs?[...]&request=GetFeature&typename=[your_layer_here]&bbox=" + pos.toBBOX()); } } }); control.activate(); I guess you get the picture. Regards, Andreas. var downloadURL truongpm wrote: > Hi all, > I'm have been working with mapserver and openlayers for three month. So i > don't know is that possible to allow user download my map to his machine??? > (If i used mapserver and openlayers) > My requirement is allow user draw the rectangle on map and download this > frame to his machine. After that, he can use some software (ex: quantum gis > ) to working with map which he just download. > I had spent a lot of time to fine solution on web but had no information. > Please help me. > Thank for your attention add sorry about my english skill. > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Thu Dec 3 04:14:50 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] WFS geometry problem from openlayers after moving to Geoserver 2.0 In-Reply-To: <4B15D317.7050903@gns.cri.nz> References: <4B15D317.7050903@gns.cri.nz> Message-ID: <4B17818A.6030805@opengeo.org> Hey, have you set the geometryName option of your protocol (or format if you don't use a protocol) to "SHAPE"? Regards, Andreas. Phil Scadden wrote: > Issues here. > filter: new > OpenLayers.Filter.Spatial({ > property: "SHAPE", > type: > OpenLayers.Filter.Spatial.DWITHIN, > distance: > map.getExtent().getHeight() / 10000000, > distanceUnits: "degree", > value: e.feature.geometry > }), > I set up a filter on a layer, (SDE now coming from Geoserver 2.0). > It generates a POST of > > |||the_geom19372200.445898 -4657155||.25871090.46082355604312003 > > note the property name of "the_geom". > > This gets a wfs response of: > | > > | > || || xsi:schemaLocation="http://www.opengis.net/ows http://maps.gns.cri.nz:80/geoserver/schemas/ows/1.0||.0/owsExceptionReport.xsd" > || xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows"> > || > || Illegal property name: the_geom > || > || > > Quite correct - because the geometry is in SHAPE not in the_geom. > > What am I doing wrong or has an incompatibility developed with geoserver? > > | > > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From steffen.schwarz85 at googlemail.com Thu Dec 3 04:38:33 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Remove StyleMap from openlayers.layer.vector after Zooming Message-ID: <1259833113026-4105050.post@n2.nabble.com> Hello, I have a wfs displayed in openlayers as a openlayers.layer.vector. This wfs has a stylemap. Now I have a problem. When I zoom in I want to reach, that my wfs is shown without my defined stylemap anymore at a certain zoom level. I already have a function, which is opened, when I zoom in or zoom out (zoomend), but I didn't get it, that my wfs is shown without the stylemap. Here is my function, which is called, when I zoom in or zoom out. var callBack = function(zoomLevel) { get_map_zoom = map.getZoom(); if (get_map_zoom < 5) { if (typeof (oStyleMap) != "undefined") { my_layer.removeFeatures(styleMap); } } } I get always an error when I try to run this. What am I doing wrong? Thanks for the help. Regards stash -- View this message in context: http://n2.nabble.com/Remove-StyleMap-from-openlayers-layer-vector-after-Zooming-tp4105050p4105050.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From sandor.csaba at viamap.hu Thu Dec 3 05:02:04 2009 From: sandor.csaba at viamap.hu (Sandor Csaba) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] freelance developer help wanted Message-ID: <6d3cc55a0912030202r7e77f0acqe44f7ccf09446533@mail.gmail.com> Hi List, Being a startup GIS company in Hungary, we have several mapping projects involving OpenLayers, MapFish and therefore ExtJS on the client side and Intergraph software on the server side. We are looking for developers who can help us in the project by developing certain functionality requested by the customers and consulting in solving problems with other developers. The ideal candidate is an independent developer (or one seeking a second job) who has experience with these frameworks above. You should be able to tele-work independently on certain assigned tasks. We highly appreciate creative problem solving, initiative and new ideas. If interested (and have free resources till the end of the year and onwards) please apply in email with reference project(s), short cv and your hourly rate in euros sent to sandor.csaba@viamap.hu Best regards, Csaba -- S?ndor Csaba szolg?ltat?si vezet? ViaMap Kft. Sz?khely: 1132 Budapest, V?ci ?t 60-62. Iroda: 1114 Budapest, Bocskai ?t 13. Tel: +3630/9605853 Fax: +3670/9003234 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091203/c89a6c9e/attachment.html From steffen.schwarz85 at googlemail.com Thu Dec 3 06:41:18 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Remove StyleMap from openlayers.layer.vector after Zooming In-Reply-To: <1259833113026-4105050.post@n2.nabble.com> References: <1259833113026-4105050.post@n2.nabble.com> Message-ID: <1259840478977-4105530.post@n2.nabble.com> Hi, I solved it now. I simply made a new stylemap, set this new stylemap for the layer and made a refresh of the layer. my_layer.styleMap = the_new_stylemap; my_layer.refresh({ force: true }); regards -- View this message in context: http://n2.nabble.com/Remove-StyleMap-from-openlayers-layer-vector-after-Zooming-tp4105050p4105530.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jimmy.aumard at gmail.com Thu Dec 3 10:40:11 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Right click on geometry Message-ID: Hi, I want to know if it's possible to put a menu on 'right click' on a vector feature. Thanks -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091203/4fe58ab1/attachment.html From osm at tappenbeck.net Thu Dec 3 10:47:06 2009 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] formate the letters in a cloud Message-ID: <4B17DD7A.4@tappenbeck.net> hi ! did anybody had an example for the possiblity of change the outfit of the letters in a cloud ?? regards Jan :-) From jimlug at co.clackamas.or.us Thu Dec 3 12:15:51 2009 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] PopUp Boxes In-Reply-To: <1259711980309-4097151.post@n2.nabble.com> References: <1259711980309-4097151.post@n2.nabble.com> Message-ID: <1259860551378-4107350.post@n2.nabble.com> Yes, I'm replying to my own thread. I've finally figure it out. All the examples are a bit overwhelming but with some persistance everything works now. For those of you struggling, try the examples in the Popup Mayhem. 3 more hours and I'm off to the beer festival:drunk: Dash wrote: > > Hey folks, > > I am struggling to understand why my popup boxes are not displaying. I've > read multiple articles and browsed the Users area extensively without any > success. My ultimate goal is to create a popup for a marker. The error > I'm receiving is px is null. Here is my code: > > // Create new marker and add to map > var markers = new OpenLayers.Layer.Markers("Markers"); > map.addLayer(markers); > // Set properties for marker > var size = new OpenLayers.Size(20,20); > var offset = new OpenLayers.Pixel(-(size.w/2), -size.h); > var icon = new > OpenLayers.Icon("http://www.clackamas.us/jimlug/images/purple-pushpin.png", > size, offset); > markers.addMarker(new OpenLayers.Marker(new > OpenLayers.LonLat(-13640608.09925, 5680799.94136), icon)); > > // Create Popup for marker > var testPopup = new OpenLayers.Popup.AnchoredBubble("test popup", > new OpenLayers.LonLat(-13640608.09925, 5680799.94136), > new OpenLayers.Size(200,200), > "test popup", > new > OpenLayers.Icon("http://www.clackamas.us/jimlug/images/purple-pushpin.png", > size, offset), > true); > > map.addPopup(testPopup); > > Any suggestions would be greatly appreciated. > Thanks. > -- View this message in context: http://n2.nabble.com/PopUp-Boxes-tp4097151p4107350.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From winwaed at gmail.com Thu Dec 3 22:48:51 2009 From: winwaed at gmail.com (Richard Marsden) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Problems applying different clipping bounds to a layer Message-ID: Hopefully someone can help me... I'm currently using OpenLayers to display maps using a range of azimuthal projections. The base map displays MapServer-derived WMS tiles using the MapServer layer. I am then trying to display one or more GML (KML file) or GeoRSS layers on top of this. Of course these use a geographic coordinate system rather than a true projection. I have all of the above working fine. The problem comes because I want to clip the KML or GeoRSS layers to one hemisphere (for simplicity, the Northern Hemisphere). The basemap tiles are already clipped to the northern hemisphere using "hard clipping" of the actual data. The KML / GeoRSS is going to be supplied by third parties so it has to be clipped at runtime. Simple clipping to vertices would be fine - as it is, most of the data will be point markers. There isn't an obvious way of doing this in the documentation, but I have found the Strategy and BBOX Strategy classes. Both are poorly documented, but it looks like Strategy might be the right approach? BBOX looks like it only uses the current map view bounds. I've made a copy and tried to amend this so it uses bounds set as the northern hemisphere in geographic coords ( new OpenLayers.Bounds(-180,0,180,90) ). However, it didn't work. Has anyone tried this kind of thing before? (applying an input data clip on a layer using that layer's coordinate system) If not, how would you approach it? Best regards, Richard Marsden http://www.winwaed.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091203/cd2c05c7/attachment.html From kiki__fiat at hotmail.com Fri Dec 4 02:17:41 2009 From: kiki__fiat at hotmail.com (sylvie fiat) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Problem with namespace param in vector strategy In-Reply-To: References: Message-ID: Hi, I am having an issue configuring my Vector strategy, I use: function getVectorLayerWithBounds(bounds) { var filter = getBBOXFilter(bounds); return new OpenLayers.Layer.Vector(layerName, { strategies : [ new OpenLayers.Strategy.Fixed() ], protocol :new OpenLayers.Protocol.HTTP( { url :geoserverUrlWfs, params : { format :SERVICE_WFS, service :SERVICE_WFS, request :REQUEST_WFS, srs :defaultProjection, VERSION :VERSION, typename :Layer, namespace=xmlns(topp=http://www.openplans.org/topp) filter: filter }, format :new OpenLayers.Format.GML() }) }); } If I add the namespace parameters my Layer won't be displayed, I still have the WFS flux but no feature is displayed on the map. If I don't add namespace everything is ok. I need the namespace parameter in order to use deegree owsproxy. Do you know what could be the problem ? I only got warnings 4 d?c. 2009 18:14:41 org.apache.tomcat.util.http.Parameters processParameters ATTENTION: Parameters: Invalid chunk ignored. 04 d?c. 18:14:42 WARN [geotools.xml] - org.geoserver.security.decorators.ReadOnlyFeatureCollection@1997837 (org.geoserver.security.decorators.ReadOnlyFeatureCollection) is not of type [Lorg.opengis.feature.simple.SimpleFeature; But I read it was not an important warning ? Best regards Sylvie _________________________________________________________________ Nouveau?! Tout Windows Live d?barque dans votre t?l?phone. Voir les Windows phone http://clk.atdmt.com/FRM/go/175819071/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/3297c214/attachment.html From lalahei at gmail.com Fri Dec 4 04:41:52 2009 From: lalahei at gmail.com (RT90) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] GetFeatureInfo works in IE, not FF, beginner wonders why. Message-ID: <1259919712635-4111448.post@n2.nabble.com> Helo, I'm very much a newcomer to OpenLayers, and really any sort of web programming. With the help of various OL examples, I've tried creating a simple viewer for some of my GeoServers WMS layers. The issue is the GetFeatureInfo request. Now, I've seen this referred to before in this forum, but always when the viewer pages have been hosted on some webserver. Currently, mine is not published anywhere, it's just sitting in a file on the same machine as the GeoServer is running on. The relevant code should be this: (copied from http://openlayers.org/dev/examples/getfeatureinfo.html ) map.events.register('click', map, function (e) { OpenLayers.Util.getElement('nodeList').innerHTML = "F?rs?ker h?mta attribut.."; var url = sv_vagar.getFullRequestString({ REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: sv_vagar.map.getExtent().toBBOX(), X: e.xy.x, Y: e.xy.y, INFO_FORMAT: 'text/html', QUERY_LAYERS: sv_vagar.params.LAYERS, WIDTH: sv_vagar.map.size.w, HEIGHT: sv_vagar.map.size.h}); OpenLayers.loadURL(url, '', this, setHTML); OpenLayers.Event.stop(e); }); function setHTML(response) { document.getElementById('nodeList').innerHTML = response.responseText; } and then css stolen from GeoServers OL preview pages: Now, this works in IE6 but not in FF. FF 3.0.15's error console reports (roughly translated) : "Security fault: contents of file (path to the local html-file) isn't allowed to fetch data from http://localhost:8080/geoserver/wms?LAYERS=sweden_ways&FORMAT=image%2Fpng&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A3006&BBOX=106524.93608%2C6533250.45206%2C1087113.063921%2C7268691.54794&X=723&Y=385&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=sweden_ways&WIDTH=900&HEIGHT=675." and the 'loading' message in the div remains forever. It should be mentioned that the http://openlayers.org/dev/examples/getfeatureinfo.html works in FF if I run it from the page it's on, but FF shows the same security error if I attempt to run it from my machine (after changing it so it points to the publically hosted OpenLayers.js and removing its reference to a css file). So somehow this is a browser as well as a "from where are you running this bit of HTML/js" issue? Any tips would be very welcome, Yours truly, Lost in the ether, RT90. -- View this message in context: http://n2.nabble.com/GetFeatureInfo-works-in-IE-not-FF-beginner-wonders-why-tp4111448p4111448.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From osm at tappenbeck.net Fri Dec 4 05:10:18 2009 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Problems with ajax.js Message-ID: <4B18E00A.2030309@tappenbeck.net> hallo ! now i want to open one of my maps [1] - ol based - and nothing will show. my search show that following massage will show when i click on the url http://www.openlayers.org/api/ajax.js: 404 Not Found

Not Found

The requested URL /api/Ajax.js was not found on this server.


Apache/2.2.3 (Debian) DAV/2 SVN/1.6.1 mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch15 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_wsgi/2.3 Server at www.openlayers.org Port 80
did anybody know anything about this problem and can help me ? did anybody know a possiblity to show a message when the connections makes problems to show a message for the users? regards Jan :-) [1] http://www.tappenbeck.net/osm/maps/deu/maps4osm.php?id=13 From jgolinowski at codematix.de Fri Dec 4 05:58:23 2009 From: jgolinowski at codematix.de (Jana Golinowski) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] GetFeatureInfo works in IE, not FF, beginner wonders why. In-Reply-To: <1259919712635-4111448.post@n2.nabble.com> References: <1259919712635-4111448.post@n2.nabble.com> Message-ID: <4B18EB4F.10000@codematix.de> Hi, > The issue is the GetFeatureInfo request. Now, I've seen this referred to > before in this forum, but always when the viewer pages have been hosted on > some webserver. Currently, mine is not published anywhere, it's just sitting > in a file on the same machine as the GeoServer is running on. > FF 3.0.15's error console reports (roughly translated) : "Security fault: > contents of file (path to the local html-file) isn't allowed to fetch data > from > http://localhost:8080/geoserver/wms?LAYERS=sweden_ways&FORMAT=image%2Fpng&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A3006&BBOX=106524.93608%2C6533250.45206%2C1087113.063921%2C7268691.54794&X=723&Y=385&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=sweden_ways&WIDTH=900&HEIGHT=675." > and the 'loading' message in the div remains forever. That sounds like you are not using any webserver (except for your GeoServer). Those security restrictions apply to local files also. You will have to deploy your local file to your webserver running on localhost:8080. Greetings, Jana. From sarah_flip at yahoo.de Fri Dec 4 06:38:26 2009 From: sarah_flip at yahoo.de (Sarah Schuessler) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Postgis layer srs 2908 supported? In-Reply-To: <1259664001696-4092947.post@n2.nabble.com> References: <1259664001696-4092947.post@n2.nabble.com> Message-ID: <458528.91497.qm@web26506.mail.ukl.yahoo.com> I have solved this: new OpenLayers.Layer.Vector("N.Y.C", {protocol: new mapfish.Protocol.MapFish ({url: "nyc_buildings"}), strategies: [new OpenLayers.Strategy.BBOX({ratio: 1})], isBaseLayer: true, visibility: true , styleMap: new OpenLayers.StyleMap(OpenLayers.Util.applyDefaults({fillColor: "green", fillOpacity: 1, strokeColor: "black"},OpenLayers.Feature.Vector.style["default"]))}), but it took about a minute before I can see my vector layer. I think it has to do with heap space from java because I got a warning that (translated): a script is too busy or is not answered anymore. You could stop it or go ahead with it seeing if it ends. http://localhost:5000/mfbase/openlayers/lib/OpenLayers/Util.js:869 Can anybody say what I can do to avoid this? Thanks. best regards Sarah ________________________________ Von: Sarah_S An: users@openlayers.org Gesendet: Dienstag, den 1. Dezember 2009, 11:40:01 Uhr Betreff: [OpenLayers-Users] Postgis layer srs 2908 supported? Hi list, I new to OL and want to use a multipolygon layer from postgis (within mapfish). layer has srs 2908 but is not displayed. I use this code: new OpenLayers.Layer.Vector("nyc_buildings", {protocol: new mapfish.Protocol.MapFish ({url: "nyc_buildings"}), strategies: [new OpenLayers.Strategy.BBOX()], isBaseLayer: true, visibility: true , styleMap: new OpenLayers.StyleMap({default: new OpenLayers.Style({strokeColor: "00FF00", strokeWidth: 3, fillColor: "00CC00"})}) },{projection: "EPSG:2908"}) but don?t know if I have to transform/reproject this layer via proj4js or I have simply an error of my code. If I select this layer at layer tree I get an error "Operation on two geometries with different srids" (pgadmin3 says that my layer has srid 2908) and a blank page- I think that Ol (or mapfish) has problems with epsg: 90019 and mine. Tried to change new OpenLayers.Projection and displayProjection to 2908 but that did not change anything. I?m using win server 2003. Any hints are welcome. Thanks best regards Sarah -- View this message in context: http://n2.nabble.com/Postgis-layer-srs-2908-supported-tp4092947p4092947.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/20baf054/attachment.html From sarah_flip at yahoo.de Fri Dec 4 06:45:01 2009 From: sarah_flip at yahoo.de (Sarah Schuessler) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] ArcIMS/WMS layers Message-ID: <759609.46524.qm@web26508.mail.ukl.yahoo.com> Hi all, I want to add a ArcIMS/WMS layer to my map. I use this code: new OpenLayers.Layer.ArcIMS("ArcIMS", "http://myserver/wmsconnector/com.esri.wms.Esrimap", { service: "GIS-layer",layers: [{id: "0", visible: true}]}), new OpenLayers.Layer.WMS("WMS", "http://myserver/wmsconnector/com.esri.wms.Esrimap/GIS_layer?", {layers: '0', format: "image/png", transparent: true }, {projection: "EPSG:4326", isBaseLayer: true} ) but both are not working. I don?t even get a output picture from ArcIMS so I think there are no connection. myserver is at our intranet. I use win server 2003. What?s wrong? Thanks. best regards Sarah __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/95efb806/attachment.html From igrcic at gmail.com Fri Dec 4 06:53:53 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Postgis layer srs 2908 supported? In-Reply-To: <458528.91497.qm@web26506.mail.ukl.yahoo.com> References: <1259664001696-4092947.post@n2.nabble.com> <458528.91497.qm@web26506.mail.ukl.yahoo.com> Message-ID: Hi Sarah, how many feature do you have? On Fri, Dec 4, 2009 at 12:38 PM, Sarah Schuessler wrote: > I have solved this: > new OpenLayers.Layer.Vector("N.Y.C",? {protocol: new > mapfish.Protocol.MapFish > ??? ??? ({url: "nyc_buildings"}), > ??? ??? strategies: [new OpenLayers.Strategy.BBOX({ratio: 1})], isBaseLayer: > true, visibility: true , > ??? ??? styleMap: new > OpenLayers.StyleMap(OpenLayers.Util.applyDefaults({fillColor: "green", > fillOpacity: 1, strokeColor: > "black"},OpenLayers.Feature.Vector.style["default"]))}), > > but it took about a minute before I can see my vector layer. I think it has > to do with heap space from java because I got a warning that (translated): > a script is too busy or is not answered anymore. You could stop it or go > ahead with it seeing if it ends. > http://localhost:5000/mfbase/openlayers/lib/OpenLayers/Util.js:869 > > Can anybody say what I can do to avoid this? > > Thanks. > best regards > Sarah > > ________________________________ > Von: Sarah_S > An: users@openlayers.org > Gesendet: Dienstag, den 1. Dezember 2009, 11:40:01 Uhr > Betreff: [OpenLayers-Users] Postgis layer srs 2908 supported? > > > Hi list, > > I new to OL and want to use a multipolygon layer from postgis (within > mapfish). layer has srs 2908 but is not displayed. > I use this code: > new OpenLayers.Layer.Vector("nyc_buildings",? {protocol: new > mapfish.Protocol.MapFish > ? ? ? ? ({url: "nyc_buildings"}), > ? ? ? ? strategies: [new OpenLayers.Strategy.BBOX()], isBaseLayer: true, > visibility: true , > ? ? ? ? styleMap: new OpenLayers.StyleMap({default: new > OpenLayers.Style({strokeColor: "00FF00", strokeWidth: 3, fillColor: > "00CC00"})}) > ? ? ? ? },{projection: "EPSG:2908"}) > > but don?t know if I have to transform/reproject this layer via proj4js or I > have simply an error of my code. > > If I select this layer at layer tree I get an error "Operation on two > geometries with different srids" (pgadmin3 says that my layer has srid 2908) > and a blank page- I think that Ol (or mapfish) has problems with epsg: 90019 > and mine. > Tried to change new OpenLayers.Projection and displayProjection to 2908 but > that did not change anything. > > I?m using win server 2003. > > Any hints are welcome. > > Thanks > best regards > Sarah > -- > View this message in context: > http://n2.nabble.com/Postgis-layer-srs-2908-supported-tp4092947p4092947.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz > gegen Massenmails. > http://mail.yahoo.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From igrcic at gmail.com Fri Dec 4 06:55:00 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Postgis layer srs 2908 supported? In-Reply-To: References: <1259664001696-4092947.post@n2.nabble.com> <458528.91497.qm@web26506.mail.ukl.yahoo.com> Message-ID: Hi Sarah, How many features in your vector layer do you have? On Fri, Dec 4, 2009 at 12:53 PM, Ivan Grcic wrote: > Hi Sarah, > > how many feature do you have? > > On Fri, Dec 4, 2009 at 12:38 PM, Sarah Schuessler wrote: >> I have solved this: >> new OpenLayers.Layer.Vector("N.Y.C",? {protocol: new >> mapfish.Protocol.MapFish >> ??? ??? ({url: "nyc_buildings"}), >> ??? ??? strategies: [new OpenLayers.Strategy.BBOX({ratio: 1})], isBaseLayer: >> true, visibility: true , >> ??? ??? styleMap: new >> OpenLayers.StyleMap(OpenLayers.Util.applyDefaults({fillColor: "green", >> fillOpacity: 1, strokeColor: >> "black"},OpenLayers.Feature.Vector.style["default"]))}), >> >> but it took about a minute before I can see my vector layer. I think it has >> to do with heap space from java because I got a warning that (translated): >> a script is too busy or is not answered anymore. You could stop it or go >> ahead with it seeing if it ends. >> http://localhost:5000/mfbase/openlayers/lib/OpenLayers/Util.js:869 >> >> Can anybody say what I can do to avoid this? >> >> Thanks. >> best regards >> Sarah >> >> ________________________________ >> Von: Sarah_S >> An: users@openlayers.org >> Gesendet: Dienstag, den 1. Dezember 2009, 11:40:01 Uhr >> Betreff: [OpenLayers-Users] Postgis layer srs 2908 supported? >> >> >> Hi list, >> >> I new to OL and want to use a multipolygon layer from postgis (within >> mapfish). layer has srs 2908 but is not displayed. >> I use this code: >> new OpenLayers.Layer.Vector("nyc_buildings",? {protocol: new >> mapfish.Protocol.MapFish >> ? ? ? ? ({url: "nyc_buildings"}), >> ? ? ? ? strategies: [new OpenLayers.Strategy.BBOX()], isBaseLayer: true, >> visibility: true , >> ? ? ? ? styleMap: new OpenLayers.StyleMap({default: new >> OpenLayers.Style({strokeColor: "00FF00", strokeWidth: 3, fillColor: >> "00CC00"})}) >> ? ? ? ? },{projection: "EPSG:2908"}) >> >> but don?t know if I have to transform/reproject this layer via proj4js or I >> have simply an error of my code. >> >> If I select this layer at layer tree I get an error "Operation on two >> geometries with different srids" (pgadmin3 says that my layer has srid 2908) >> and a blank page- I think that Ol (or mapfish) has problems with epsg: 90019 >> and mine. >> Tried to change new OpenLayers.Projection and displayProjection to 2908 but >> that did not change anything. >> >> I?m using win server 2003. >> >> Any hints are welcome. >> >> Thanks >> best regards >> Sarah >> -- >> View this message in context: >> http://n2.nabble.com/Postgis-layer-srs-2908-supported-tp4092947p4092947.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> __________________________________________________ >> Do You Yahoo!? >> Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz >> gegen Massenmails. >> http://mail.yahoo.com >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- > Ivan Grcic > -- Ivan Grcic From sarah_flip at yahoo.de Fri Dec 4 07:01:16 2009 From: sarah_flip at yahoo.de (Sarah Schuessler) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Postgis layer srs 2908 supported? In-Reply-To: References: <1259664001696-4092947.post@n2.nabble.com> <458528.91497.qm@web26506.mail.ukl.yahoo.com> Message-ID: <886784.54706.qm@web26508.mail.ukl.yahoo.com> Hi Ivan, I have about 6500 features (multipolygon). best regards Sarah ________________________________ Von: Ivan Grcic An: Sarah Schuessler CC: users@openlayers.org Gesendet: Freitag, den 4. Dezember 2009, 12:53:53 Uhr Betreff: Re: [OpenLayers-Users] Postgis layer srs 2908 supported? Hi Sarah, how many feature do you have? On Fri, Dec 4, 2009 at 12:38 PM, Sarah Schuessler wrote: > I have solved this: > new OpenLayers.Layer.Vector("N.Y.C",? {protocol: new > mapfish.Protocol.MapFish > ??? ??? ({url: "nyc_buildings"}), > ??? ??? strategies: [new OpenLayers.Strategy.BBOX({ratio: 1})], isBaseLayer: > true, visibility: true , > ??? ??? styleMap: new > OpenLayers.StyleMap(OpenLayers.Util.applyDefaults({fillColor: "green", > fillOpacity: 1, strokeColor: > "black"},OpenLayers.Feature.Vector.style["default"]))}), > > but it took about a minute before I can see my vector layer. I think it has > to do with heap space from java because I got a warning that (translated): > a script is too busy or is not answered anymore. You could stop it or go > ahead with it seeing if it ends. > http://localhost:5000/mfbase/openlayers/lib/OpenLayers/Util.js:869 > > Can anybody say what I can do to avoid this? > > Thanks. > best regards > Sarah > > ________________________________ > Von: Sarah_S > An: users@openlayers.org > Gesendet: Dienstag, den 1. Dezember 2009, 11:40:01 Uhr > Betreff: [OpenLayers-Users] Postgis layer srs 2908 supported? > > > Hi list, > > I new to OL and want to use a multipolygon layer from postgis (within > mapfish). layer has srs 2908 but is not displayed. > I use this code: > new OpenLayers.Layer.Vector("nyc_buildings",? {protocol: new > mapfish.Protocol.MapFish > ? ? ? ? ({url: "nyc_buildings"}), > ? ? ? ? strategies: [new OpenLayers.Strategy.BBOX()], isBaseLayer: true, > visibility: true , > ? ? ? ? styleMap: new OpenLayers.StyleMap({default: new > OpenLayers.Style({strokeColor: "00FF00", strokeWidth: 3, fillColor: > "00CC00"})}) > ? ? ? ? },{projection: "EPSG:2908"}) > > but don?t know if I have to transform/reproject this layer via proj4js or I > have simply an error of my code. > > If I select this layer at layer tree I get an error "Operation on two > geometries with different srids" (pgadmin3 says that my layer has srid 2908) > and a blank page- I think that Ol (or mapfish) has problems with epsg: 90019 > and mine. > Tried to change new OpenLayers.Projection and displayProjection to 2908 but > that did not change anything. > > I?m using win server 2003. > > Any hints are welcome. > > Thanks > best regards > Sarah > -- > View this message in context: > http://n2.nabble.com/Postgis-layer-srs-2908-supported-tp4092947p4092947.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz > gegen Massenmails. > http://mail.yahoo.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/597848ba/attachment.html From crschmidt at metacarta.com Fri Dec 4 07:25:06 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Problem with namespace param in vector strategy In-Reply-To: References: Message-ID: <20091204122506.GH4421@metacarta.com> On Fri, Dec 04, 2009 at 07:17:41AM +0000, sylvie fiat wrote: > > Hi, > > I am having an issue configuring my Vector strategy, I use: > > function getVectorLayerWithBounds(bounds) { > var filter = getBBOXFilter(bounds); > return new OpenLayers.Layer.Vector(layerName, { > strategies : [ > new OpenLayers.Strategy.Fixed() > ], > protocol :new OpenLayers.Protocol.HTTP( { > url :geoserverUrlWfs, > params : { > format :SERVICE_WFS, > service :SERVICE_WFS, > request :REQUEST_WFS, > srs :defaultProjection, > VERSION :VERSION, > typename :Layer, > namespace=xmlns(topp=http://www.openplans.org/topp) ^^ This is not valid Javascript. -- Chris > filter: filter > }, > format :new OpenLayers.Format.GML() > }) > }); > } > > If I add the namespace parameters my Layer won't be displayed, I still have the WFS flux but no feature is displayed on the map. > If I don't add namespace everything is ok. > > I need the namespace parameter in order to use deegree owsproxy. > > Do you know what could be the problem ? I only got warnings > > 4 d?c. 2009 18:14:41 org.apache.tomcat.util.http.Parameters processParameters > ATTENTION: Parameters: Invalid chunk ignored. > 04 d?c. 18:14:42 WARN [geotools.xml] - org.geoserver.security.decorators.ReadOnlyFeatureCollection@1997837 (org.geoserver.security.decorators.ReadOnlyFeatureCollection) is not of type [Lorg.opengis.feature.simple.SimpleFeature; > > But I read it was not an important warning ? > Best regards > Sylvie > > > _________________________________________________________________ > Nouveau?! Tout Windows Live d?barque dans votre t?l?phone. Voir les Windows phone > http://clk.atdmt.com/FRM/go/175819071/direct/01/ > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From igrcic at gmail.com Fri Dec 4 07:54:14 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Postgis layer srs 2908 supported? In-Reply-To: <886784.54706.qm@web26508.mail.ukl.yahoo.com> References: <1259664001696-4092947.post@n2.nabble.com> <458528.91497.qm@web26506.mail.ukl.yahoo.com> <886784.54706.qm@web26508.mail.ukl.yahoo.com> Message-ID: Well browsers start to choke with more then 200-300 features, that is max. nr of features one should ever load in vector layer. Now, you can imagine what happens with 6500 features :) On Fri, Dec 4, 2009 at 1:01 PM, Sarah Schuessler wrote: > Hi Ivan, > > I have about 6500 features (multipolygon). > best regards > Sarah > ________________________________ > Von: Ivan Grcic > An: Sarah Schuessler > CC: users@openlayers.org > Gesendet: Freitag, den 4. Dezember 2009, 12:53:53 Uhr > Betreff: Re: [OpenLayers-Users] Postgis layer srs 2908 supported? > > Hi Sarah, > > how many feature do you have? > > On Fri, Dec 4, 2009 at 12:38 PM, Sarah Schuessler > wrote: >> I have solved this: >> new OpenLayers.Layer.Vector("N.Y.C",? {protocol: new >> mapfish.Protocol.MapFish >> ??? ??? ({url: "nyc_buildings"}), >> ??? ??? strategies: [new OpenLayers.Strategy.BBOX({ratio: 1})], >> isBaseLayer: >> true, visibility: true , >> ??? ??? styleMap: new >> OpenLayers.StyleMap(OpenLayers.Util.applyDefaults({fillColor: "green", >> fillOpacity: 1, strokeColor: >> "black"},OpenLayers.Feature.Vector.style["default"]))}), >> >> but it took about a minute before I can see my vector layer. I think it >> has >> to do with heap space from java because I got a warning that (translated): >> a script is too busy or is not answered anymore. You could stop it or go >> ahead with it seeing if it ends. >> http://localhost:5000/mfbase/openlayers/lib/OpenLayers/Util.js:869 >> >> Can anybody say what I can do to avoid this? >> >> Thanks. >> best regards >> Sarah >> >> ________________________________ >> Von: Sarah_S >> An: users@openlayers.org >> Gesendet: Dienstag, den 1. Dezember 2009, 11:40:01 Uhr >> Betreff: [OpenLayers-Users] Postgis layer srs 2908 supported? >> >> >> Hi list, >> >> I new to OL and want to use a multipolygon layer from postgis (within >> mapfish). layer has srs 2908 but is not displayed. >> I use this code: >> new OpenLayers.Layer.Vector("nyc_buildings",? {protocol: new >> mapfish.Protocol.MapFish >> ? ? ? ? ({url: "nyc_buildings"}), >> ? ? ? ? strategies: [new OpenLayers.Strategy.BBOX()], isBaseLayer: true, >> visibility: true , >> ? ? ? ? styleMap: new OpenLayers.StyleMap({default: new >> OpenLayers.Style({strokeColor: "00FF00", strokeWidth: 3, fillColor: >> "00CC00"})}) >> ? ? ? ? },{projection: "EPSG:2908"}) >> >> but don?t know if I have to transform/reproject this layer via proj4js or >> I >> have simply an error of my code. >> >> If I select this layer at layer tree I get an error "Operation on two >> geometries with different srids" (pgadmin3 says that my layer has srid >> 2908) >> and a blank page- I think that Ol (or mapfish) has problems with epsg: >> 90019 >> and mine. >> Tried to change new OpenLayers.Projection and displayProjection to 2908 >> but >> that did not change anything. >> >> I?m using win server 2003. >> >> Any hints are welcome. >> >> Thanks >> best regards >> Sarah >> -- >> View this message in context: >> >> http://n2.nabble.com/Postgis-layer-srs-2908-supported-tp4092947p4092947.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> __________________________________________________ >> Do You Yahoo!? >> Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz >> gegen Massenmails. >> http://mail.yahoo.com >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- > Ivan Grcic > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz > gegen Massenmails. > http://mail.yahoo.com -- Ivan Grcic From igrcic at gmail.com Fri Dec 4 07:59:29 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Postgis layer srs 2908 supported? In-Reply-To: References: <1259664001696-4092947.post@n2.nabble.com> <458528.91497.qm@web26506.mail.ukl.yahoo.com> <886784.54706.qm@web26508.mail.ukl.yahoo.com> Message-ID: Check out last post on : http://n2.nabble.com/WFS-T-td4065193.html CHeers On Fri, Dec 4, 2009 at 1:54 PM, Ivan Grcic wrote: > Well browsers start to choke with more then 200-300 features, that is > max. nr of features one should ever load in vector layer. Now, you can > imagine what happens with 6500 features :) > > On Fri, Dec 4, 2009 at 1:01 PM, Sarah Schuessler wrote: >> Hi Ivan, >> >> I have about 6500 features (multipolygon). >> best regards >> Sarah >> ________________________________ >> Von: Ivan Grcic >> An: Sarah Schuessler >> CC: users@openlayers.org >> Gesendet: Freitag, den 4. Dezember 2009, 12:53:53 Uhr >> Betreff: Re: [OpenLayers-Users] Postgis layer srs 2908 supported? >> >> Hi Sarah, >> >> how many feature do you have? >> >> On Fri, Dec 4, 2009 at 12:38 PM, Sarah Schuessler >> wrote: >>> I have solved this: >>> new OpenLayers.Layer.Vector("N.Y.C",? {protocol: new >>> mapfish.Protocol.MapFish >>> ??? ??? ({url: "nyc_buildings"}), >>> ??? ??? strategies: [new OpenLayers.Strategy.BBOX({ratio: 1})], >>> isBaseLayer: >>> true, visibility: true , >>> ??? ??? styleMap: new >>> OpenLayers.StyleMap(OpenLayers.Util.applyDefaults({fillColor: "green", >>> fillOpacity: 1, strokeColor: >>> "black"},OpenLayers.Feature.Vector.style["default"]))}), >>> >>> but it took about a minute before I can see my vector layer. I think it >>> has >>> to do with heap space from java because I got a warning that (translated): >>> a script is too busy or is not answered anymore. You could stop it or go >>> ahead with it seeing if it ends. >>> http://localhost:5000/mfbase/openlayers/lib/OpenLayers/Util.js:869 >>> >>> Can anybody say what I can do to avoid this? >>> >>> Thanks. >>> best regards >>> Sarah >>> >>> ________________________________ >>> Von: Sarah_S >>> An: users@openlayers.org >>> Gesendet: Dienstag, den 1. Dezember 2009, 11:40:01 Uhr >>> Betreff: [OpenLayers-Users] Postgis layer srs 2908 supported? >>> >>> >>> Hi list, >>> >>> I new to OL and want to use a multipolygon layer from postgis (within >>> mapfish). layer has srs 2908 but is not displayed. >>> I use this code: >>> new OpenLayers.Layer.Vector("nyc_buildings",? {protocol: new >>> mapfish.Protocol.MapFish >>> ? ? ? ? ({url: "nyc_buildings"}), >>> ? ? ? ? strategies: [new OpenLayers.Strategy.BBOX()], isBaseLayer: true, >>> visibility: true , >>> ? ? ? ? styleMap: new OpenLayers.StyleMap({default: new >>> OpenLayers.Style({strokeColor: "00FF00", strokeWidth: 3, fillColor: >>> "00CC00"})}) >>> ? ? ? ? },{projection: "EPSG:2908"}) >>> >>> but don?t know if I have to transform/reproject this layer via proj4js or >>> I >>> have simply an error of my code. >>> >>> If I select this layer at layer tree I get an error "Operation on two >>> geometries with different srids" (pgadmin3 says that my layer has srid >>> 2908) >>> and a blank page- I think that Ol (or mapfish) has problems with epsg: >>> 90019 >>> and mine. >>> Tried to change new OpenLayers.Projection and displayProjection to 2908 >>> but >>> that did not change anything. >>> >>> I?m using win server 2003. >>> >>> Any hints are welcome. >>> >>> Thanks >>> best regards >>> Sarah >>> -- >>> View this message in context: >>> >>> http://n2.nabble.com/Postgis-layer-srs-2908-supported-tp4092947p4092947.html >>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> __________________________________________________ >>> Do You Yahoo!? >>> Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz >>> gegen Massenmails. >>> http://mail.yahoo.com >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> >> -- >> Ivan Grcic >> >> __________________________________________________ >> Do You Yahoo!? >> Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz >> gegen Massenmails. >> http://mail.yahoo.com > > > > -- > Ivan Grcic > -- Ivan Grcic From sarah_flip at yahoo.de Fri Dec 4 08:15:06 2009 From: sarah_flip at yahoo.de (Sarah Schuessler) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Postgis layer srs 2908 supported? In-Reply-To: References: <1259664001696-4092947.post@n2.nabble.com> <458528.91497.qm@web26506.mail.ukl.yahoo.com> <886784.54706.qm@web26508.mail.ukl.yahoo.com> Message-ID: <560571.75353.qm@web26505.mail.ukl.yahoo.com> Thanks Ivan! I will investigate on this. best regards Sarah ________________________________ Von: Ivan Grcic An: Sarah Schuessler CC: users@openlayers.org Gesendet: Freitag, den 4. Dezember 2009, 13:59:29 Uhr Betreff: Re: [OpenLayers-Users] Postgis layer srs 2908 supported? Check out last post on : http://n2.nabble.com/WFS-T-td4065193.html CHeers On Fri, Dec 4, 2009 at 1:54 PM, Ivan Grcic wrote: > Well browsers start to choke with more then 200-300 features, that is > max. nr of features one should ever load in vector layer. Now, you can > imagine what happens with 6500 features :) > > On Fri, Dec 4, 2009 at 1:01 PM, Sarah Schuessler wrote: >> Hi Ivan, >> >> I have about 6500 features (multipolygon). >> best regards >> Sarah >> ________________________________ >> Von: Ivan Grcic >> An: Sarah Schuessler >> CC: users@openlayers.org >> Gesendet: Freitag, den 4. Dezember 2009, 12:53:53 Uhr >> Betreff: Re: [OpenLayers-Users] Postgis layer srs 2908 supported? >> >> Hi Sarah, >> >> how many feature do you have? >> >> On Fri, Dec 4, 2009 at 12:38 PM, Sarah Schuessler >> wrote: >>> I have solved this: >>> new OpenLayers.Layer.Vector("N.Y.C",? {protocol: new >>> mapfish.Protocol.MapFish >>> ??? ??? ({url: "nyc_buildings"}), >>> ??? ??? strategies: [new OpenLayers.Strategy.BBOX({ratio: 1})], >>> isBaseLayer: >>> true, visibility: true , >>> ??? ??? styleMap: new >>> OpenLayers.StyleMap(OpenLayers.Util.applyDefaults({fillColor: "green", >>> fillOpacity: 1, strokeColor: >>> "black"},OpenLayers.Feature.Vector.style["default"]))}), >>> >>> but it took about a minute before I can see my vector layer. I think it >>> has >>> to do with heap space from java because I got a warning that (translated): >>> a script is too busy or is not answered anymore. You could stop it or go >>> ahead with it seeing if it ends. >>> http://localhost:5000/mfbase/openlayers/lib/OpenLayers/Util.js:869 >>> >>> Can anybody say what I can do to avoid this? >>> >>> Thanks. >>> best regards >>> Sarah >>> >>> ________________________________ >>> Von: Sarah_S >>> An: users@openlayers.org >>> Gesendet: Dienstag, den 1. Dezember 2009, 11:40:01 Uhr >>> Betreff: [OpenLayers-Users] Postgis layer srs 2908 supported? >>> >>> >>> Hi list, >>> >>> I new to OL and want to use a multipolygon layer from postgis (within >>> mapfish). layer has srs 2908 but is not displayed. >>> I use this code: >>> new OpenLayers.Layer.Vector("nyc_buildings",? {protocol: new >>> mapfish.Protocol.MapFish >>> ? ? ? ? ({url: "nyc_buildings"}), >>> ? ? ? ? strategies: [new OpenLayers.Strategy.BBOX()], isBaseLayer: true, >>> visibility: true , >>> ? ? ? ? styleMap: new OpenLayers.StyleMap({default: new >>> OpenLayers.Style({strokeColor: "00FF00", strokeWidth: 3, fillColor: >>> "00CC00"})}) >>> ? ? ? ? },{projection: "EPSG:2908"}) >>> >>> but don?t know if I have to transform/reproject this layer via proj4js or >>> I >>> have simply an error of my code. >>> >>> If I select this layer at layer tree I get an error "Operation on two >>> geometries with different srids" (pgadmin3 says that my layer has srid >>> 2908) >>> and a blank page- I think that Ol (or mapfish) has problems with epsg: >>> 90019 >>> and mine. >>> Tried to change new OpenLayers.Projection and displayProjection to 2908 >>> but >>> that did not change anything. >>> >>> I?m using win server 2003. >>> >>> Any hints are welcome. >>> >>> Thanks >>> best regards >>> Sarah >>> -- >>> View this message in context: >>> >>> http://n2.nabble.com/Postgis-layer-srs-2908-supported-tp4092947p4092947.html >>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> __________________________________________________ >>> Do You Yahoo!? >>> Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz >>> gegen Massenmails. >>> http://mail.yahoo.com >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> >> -- >> Ivan Grcic >> >> __________________________________________________ >> Do You Yahoo!? >> Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz >> gegen Massenmails. >> http://mail.yahoo.com > > > > -- > Ivan Grcic > -- Ivan Grcic __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/a285a2b1/attachment.html From valemunoz at gmail.com Fri Dec 4 08:40:30 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] number of tiles Message-ID: <4b56aefe0912040540v17c81139w96b94a1bb7ecb72d@mail.gmail.com> Hi I'm trying to optimize my map and for this I need to know if we can limit the number of tiles to load. For example the map I'm carrying on a
500 x 400, but the tile belongs to 10000x8000, when should upload 4 images of 256x256 and not 50 pictures of 256x256. I somehow limit the amount of pictures to upload? RG -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/bd3026ea/attachment.html From dragospenet at yahoo.com Fri Dec 4 08:45:48 2009 From: dragospenet at yahoo.com (Dragos Ion) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Problem setting the correct resolution with a grid layer Message-ID: <966536.78259.qm@web56505.mail.re3.yahoo.com> Hi, I want to use OpenLayers Api for displaying a custom map of objects (like a grid over the entire map, so over all map tiles), taking the functionality of zooming and panning; I'll need three custom zoom levels, using 256x256 px tile size, with the full map size of: zoom level 0: SIZE zoom level 1: SIZE * 5 zoom level 2: SIZE * 10 The SIZE is actually dynamic over time, so I'll cache the slices for a fixed amount of time. Now, the grid like objects I want to draw on each slice will have 1px, 5px and respectively 10px (both on width and height), corresponding to each of the zoom levels. Now, I have the following JavaScript code to initialize & draw the map: var map, layer, layer0, layer1, layer2; OpenLayers.Layer.TMS.prototype.getURL = function ( bounds ) { ??? bounds=this.adjustBounds(bounds); ??? var res=this.map.getResolution(); ??? var x=Math.round((bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w)); ??? var y=Math.round((bounds.bottom-this.tileOrigin.lat)/(res*this.tileSize.h)); ??? var z=this.map.getZoom(); ??? var path='slice.php?layer='+this.layer+'&x='+x+'&y='+y+'&z='+z; ??? var url=this.url; ??? if(url instanceof Array) ??????????? url=this.selectUrl(path,url); ??? return url+path; }; function init() { ??? map = new OpenLayers.Map('map', {units:'m'}); ??? layer = new OpenLayers.Layer.TMS("3 Zoom Levels", "http://local.server/", {layer: -1,??? resolutions: [1,2,10], ??? maxExtent: new OpenLayers.Bounds(0, 0, Math.ceil($x*10/256)*256, Math.ceil($y*10/256)*256), ??? tileSize: new OpenLayers.Size(256,256), buffer:0}); ??? /* for testing > ??? layer0 = new OpenLayers.Layer.TMS("Zoom 0 Like", "http://local.server/", {layer: 0,??? resolutions: [1], ??? maxExtent: new OpenLayers.Bounds(0, 0, Math.ceil(x*1/256)*256, Math.ceil(y*1/256)*256), ??? tileSize: new OpenLayers.Size(256,256), buffer:0}); ??? layer1 = new OpenLayers.Layer.TMS("Zoom 1 like", "http://local.server/", {layer: 1,??? resolutions: [1], ??? maxExtent: new OpenLayers.Bounds(0, 0, Math.ceil(x*5/256)*256, Math.ceil(y*5/256)*256), ??? tileSize: new OpenLayers.Size(256,256), buffer:0}); ??? layer2 = new OpenLayers.Layer.TMS("Zoom 2 like", "http://local.server/", {layer: 2,??? resolutions: [1], ??? maxExtent: new OpenLayers.Bounds(0, 0, Math.ceil(x*10/256)*256, Math.ceil(y*10/256)*256), ??? tileSize: new OpenLayers.Size(256,256), buffer:0}); ??? */ < for testing ??? map.addLayer(layer); ?? ??? map.addControl(new OpenLayers.Control.LayerSwitcher()); ??? map.zoomToMaxExtent(); } init(); With the [Math.ceil(x*5/256)*256] and [Math.ceil(y*5/256)*256)] (for example) I get the exact number of slices I need for a zoom level (here for the zoom level #1 as I multiply with #5) x and y are the maximum number of grid objects on the entire map (horizontal and vertical) so for level 0, when each object have 1px (on the slice) we'll have: Math.ceil(x*1/256)*256, Math.ceil(y*1/256)*256) as the maxExtent for zoom level 2: Math.ceil(x*10/256)*256, Math.ceil(y*10/256)*256) as the maxExtent Now, the problem I have is that I don't know why the map it's not ok (some offsets for the zoom level 0, it is not centered..) and also the x (slice number on x) going into the request on the server (path='slice.php?layer='+this.layer+'&x='+x+'&y='+y+'&z='+z;) differs between the zoom levels with 1 (one). If I run the code from [for testing] with each layer corresponding to a zoom level, I get the right map, with all slices correctly shown on the map (including centered for zoom level 0). If I got it right, "resolutions" (on the map) must be set so that it represents how much of the map units are on one pixel. I have 10 map units / pixel for zoom level 0 (object grid on slice at 1 pixel), 2 map units / pixel for zoom level 1 (object grid on slice at 5 pixels) and 1 map unit / pixel for zoom level 2 (object grid on slice at 10 pixels). But this seem to be not ok, where I'm mistaken? Dragos. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/2b4001cc/attachment.html From igrcic at gmail.com Fri Dec 4 09:05:11 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] number of tiles In-Reply-To: <4b56aefe0912040540v17c81139w96b94a1bb7ecb72d@mail.gmail.com> References: <4b56aefe0912040540v17c81139w96b94a1bb7ecb72d@mail.gmail.com> Message-ID: Hola Valeria, set buffer: 0 in your layer options. http://openlayers.org/dev/examples/buffer.html Chau On Fri, Dec 4, 2009 at 2:40 PM, Valeria Mu?oz wrote: > Hi > > I'm trying to optimize my map and for this I need to know if we can limit > the number of tiles to load. For example the map I'm carrying on a
500 > x 400, but the tile belongs to 10000x8000, when should upload 4 images of > 256x256 and not 50 pictures of 256x256. I somehow limit the amount of > pictures to upload? > > RG > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From valemunoz at gmail.com Fri Dec 4 09:20:31 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] number of tiles In-Reply-To: References: <4b56aefe0912040540v17c81139w96b94a1bb7ecb72d@mail.gmail.com> Message-ID: <4b56aefe0912040620qfdefff8kadbf615e05fb0209@mail.gmail.com> gracias gracias gracias muchas gracias.. funciono perfecto!. thanks, worked perfect Saludos 2009/12/4 Ivan Grcic > Hola Valeria, > > set buffer: 0 in your layer options. > > http://openlayers.org/dev/examples/buffer.html > > Chau > > On Fri, Dec 4, 2009 at 2:40 PM, Valeria Mu?oz wrote: > > Hi > > > > I'm trying to optimize my map and for this I need to know if we can limit > > the number of tiles to load. For example the map I'm carrying on a
> 500 > > x 400, but the tile belongs to 10000x8000, when should upload 4 images of > > 256x256 and not 50 pictures of 256x256. I somehow limit the amount of > > pictures to upload? > > > > RG > > _______________________________________________ > > 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/20091204/cbcc02e5/attachment.html From valemunoz at gmail.com Fri Dec 4 09:24:48 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js Message-ID: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> I download openlayer in my server, i use openlayers.js(696 kb) but is so heavy for the aplication... can i compress the JS or exist some compress version? RG -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/8ffbe150/attachment.html From igrcic at gmail.com Fri Dec 4 09:31:10 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js In-Reply-To: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> Message-ID: http://docs.openlayers.org/library/deploying.html http://trac.openlayers.org/wiki/Profiles http://geowebguru.com/articles/212-optimizing-openlayers And after you build your custom OL, you can make your server to gzip files http://httpd.apache.org/docs/2.0/mod/mod_deflate.html It should come to around 150 I think. cheers On Fri, Dec 4, 2009 at 3:24 PM, Valeria Mu?oz wrote: > I download openlayer in my server, i use openlayers.js(696 kb) but is so > heavy for the aplication... can i compress the JS or exist some compress > version? > > RG > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From truong_pham_minh at yahoo.com Fri Dec 4 09:39:25 2009 From: truong_pham_minh at yahoo.com (truongpm) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Is that possible if user download map from webgis application??? In-Reply-To: <4B177B9C.3080608@opengeo.org> References: <1259690466248-4095166.post@n2.nabble.com> <4B177B9C.3080608@opengeo.org> Message-ID: <1259937565834-4112772.post@n2.nabble.com> Thanks Andreas Hocevar-2 for your help. I still find solution with this problem because of less knowledge about Geoserver. -- View this message in context: http://n2.nabble.com/Is-that-possible-if-user-download-map-from-webgis-application-tp4095166p4112772.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Fri Dec 4 09:38:36 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Array of url's not working with WFS protocol In-Reply-To: References: Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2217 bytes Desc: image001.jpg Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/d037b954/attachment.jpe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 8056 bytes Desc: image002.png Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/d037b954/attachment.png From valemunoz at gmail.com Fri Dec 4 09:47:29 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js In-Reply-To: References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> Message-ID: <4b56aefe0912040647q1332a220i22d69b549397e4af@mail.gmail.com> Hi Ivan thanks, i did that(lite.cfg) , but when i change it (.js) returned me errors . :( RG 2009/12/4 Ivan Grcic > http://docs.openlayers.org/library/deploying.html > http://trac.openlayers.org/wiki/Profiles > http://geowebguru.com/articles/212-optimizing-openlayers > > > And after you build your custom OL, you can make your server to gzip files > http://httpd.apache.org/docs/2.0/mod/mod_deflate.html > > It should come to around 150 I think. > > cheers > > > > On Fri, Dec 4, 2009 at 3:24 PM, Valeria Mu?oz wrote: > > I download openlayer in my server, i use openlayers.js(696 kb) but is so > > heavy for the aplication... can i compress the JS or exist some compress > > version? > > > > RG > > _______________________________________________ > > 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/20091204/ea93c0e0/attachment.html From no-reply at neogeo-online.net Fri Dec 4 09:56:17 2009 From: no-reply at neogeo-online.net (Guillaume Sueur) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js In-Reply-To: <4b56aefe0912040647q1332a220i22d69b549397e4af@mail.gmail.com> References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> <4b56aefe0912040647q1332a220i22d69b549397e4af@mail.gmail.com> Message-ID: <1259938577.10369.78.camel@guillaume-desktop> Hi Valeria, Lite is maybe too lite for your needs, depending on which controls/formats... you use in your client. You should try to define your own build. Regards, Guillaume Le vendredi 04 d?cembre 2009 ? 11:47 -0300, Valeria Mu?oz a ?crit : > Hi Ivan > > thanks, i did that(lite.cfg) , but when i change it (.js) returned me > errors . :( > RG > > 2009/12/4 Ivan Grcic > http://docs.openlayers.org/library/deploying.html > http://trac.openlayers.org/wiki/Profiles > http://geowebguru.com/articles/212-optimizing-openlayers > > > And after you build your custom OL, you can make your server > to gzip files > http://httpd.apache.org/docs/2.0/mod/mod_deflate.html > > It should come to around 150 I think. > > cheers > > > > > On Fri, Dec 4, 2009 at 3:24 PM, Valeria Mu?oz > wrote: > > I download openlayer in my server, i use openlayers.js(696 > kb) but is so > > heavy for the aplication... can i compress the JS or exist > some compress > > version? > > > > RG > > > _______________________________________________ > > 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 From crschmidt at metacarta.com Fri Dec 4 10:54:19 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Array of url's not working with WFS protocol In-Reply-To: References: Message-ID: <20091204155419.GI4421@metacarta.com> On Fri, Dec 04, 2009 at 03:38:36PM +0100, Kris Geusebroek wrote: > I tried to create a patch but it isn't working. > > > > I patched Request.js to select a url out of an Array (just like the > httpRequest class) but I'm running into crossdomain issue with XHR > > Even on only a subdomain difference, IE and firefox throw an exception Different subdomains are still violations of the Same Origin Policy. The browser can not request data from different subdomains (and I can't imagine a way in which this is useful other than that; using a proxy just makes the local proxy your bottleneck.) -- Chris > > > Any hints on how to overcome this or is it impossible > > > > Cheers KRis > > > > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Kris Geusebroek > Sent: Wednesday, December 02, 2009 11:59 AM > To: users@openlayers.org > Subject: [OpenLayers-Users] Array of url's not working with WFS protocol > > > > Am i right that supplying a array of urls to a wfs protocol is not > working like with a layer? > > > > If so I will try tomorrow to create a patch to provide this > functionality > > > > Cheers Kris > > > > Met vriendelijke groet, Kind regards, > > > > Kristiaan Geusebroek > > Consultant > > > > > > > > > > Email: kgeusebroek@xebia.com > > Tel: +31 (0)35 538 1921 > > Fax: +31 (0)35 538 1922 > > Mobiel: +31 (0)6 3069 7223 > > > > Utrechtseweg 49 > > 1213 TL Hilversum > > The Netherlands > > http://www.xebia.com > > > > Xebia Blog: http://blog.xebia.com/ > > Xebia Podcast: http://podcast.xebia.com/ > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From igrcic at gmail.com Fri Dec 4 11:47:04 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Array of url's not working with WFS protocol In-Reply-To: <20091204155419.GI4421@metacarta.com> References: <20091204155419.GI4421@metacarta.com> Message-ID: Hi, may I just add that adding an layer-array for vector layers isnt so important as it is for wms tiles, where lots of request are issued and we can 'cheat' the browser to load more tiles at once. We usually dont request so many WFS request as we do with WMS. Also, making layer array for WFS protocol would be somehow strange, since we usually use wfs protocol to change features (make WFS transactions), so If we have multiple sources that means we would have multiple datasources to keep in sync... I only see advantage of making this for servers that are under heavy load, and where we only read features (no WFS-T involved). But because of the proxy, maybe its just easier to make some kind of server load balancing then? ( mod_proxy_balancer or simliar if we talk about Apache) Just my thoughts... cheers On Fri, Dec 4, 2009 at 4:54 PM, Christopher Schmidt wrote: > On Fri, Dec 04, 2009 at 03:38:36PM +0100, Kris Geusebroek wrote: >> I tried to create a patch but it isn't working. >> >> >> >> I patched Request.js to select a url out of an Array (just like the >> httpRequest class) but I'm running into crossdomain issue with XHR >> >> Even on only a subdomain difference, IE and firefox throw an exception > > Different subdomains are still violations of the Same Origin Policy. > The browser can not request data from different subdomains (and I can't > imagine a way in which this is useful other than that; using a proxy just > makes the local proxy your bottleneck.) > > -- Chris > >> >> >> Any hints on how to overcome this or is it impossible >> >> >> >> Cheers KRis >> >> >> >> From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] >> On Behalf Of Kris Geusebroek >> Sent: Wednesday, December 02, 2009 11:59 AM >> To: users@openlayers.org >> Subject: [OpenLayers-Users] Array of url's not working with WFS protocol >> >> >> >> Am i right that supplying a array of urls to ?a wfs protocol is not >> working like with a layer? >> >> >> >> If so I will try tomorrow to create a patch to provide this >> functionality >> >> >> >> Cheers Kris >> >> >> >> Met vriendelijke groet, Kind regards, >> >> >> >> Kristiaan Geusebroek >> >> Consultant >> >> >> >> >> >> >> >> >> >> Email: kgeusebroek@xebia.com >> >> Tel: +31 (0)35 538 1921 >> >> Fax: +31 (0)35 538 1922 >> >> Mobiel: +31 (0)6 3069 7223 >> >> >> >> Utrechtseweg 49 >> >> 1213 TL Hilversum >> >> The Netherlands >> >> http://www.xebia.com >> >> >> >> Xebia Blog: http://blog.xebia.com/ >> >> Xebia Podcast: http://podcast.xebia.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 > -- Ivan Grcic From igrcic at gmail.com Fri Dec 4 12:42:51 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js In-Reply-To: <1259938577.10369.78.camel@guillaume-desktop> References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> <4b56aefe0912040647q1332a220i22d69b549397e4af@mail.gmail.com> <1259938577.10369.78.camel@guillaume-desktop> Message-ID: Mira, talvez te ayuda, pa OL 2.8. Tiene ke modificarla un pokito y ya :) Suerte On Fri, Dec 4, 2009 at 3:56 PM, Guillaume Sueur wrote: > Hi Valeria, > > Lite is maybe too lite for your needs, depending on which > controls/formats... you use in your client. You should try to define > your own build. > > Regards, > > Guillaume > > Le vendredi 04 d?cembre 2009 ? 11:47 -0300, Valeria Mu?oz a ?crit : >> Hi Ivan >> >> thanks, i did that(lite.cfg) , but when i change it (.js) returned me >> errors . :( >> RG >> >> 2009/12/4 Ivan Grcic >> ? ? ? ? http://docs.openlayers.org/library/deploying.html >> ? ? ? ? http://trac.openlayers.org/wiki/Profiles >> ? ? ? ? http://geowebguru.com/articles/212-optimizing-openlayers >> >> >> ? ? ? ? And after you build your custom OL, you can make your server >> ? ? ? ? to gzip files >> ? ? ? ? http://httpd.apache.org/docs/2.0/mod/mod_deflate.html >> >> ? ? ? ? It should come to around 150 I think. >> >> ? ? ? ? cheers >> >> >> >> >> ? ? ? ? On Fri, Dec 4, 2009 at 3:24 PM, Valeria Mu?oz >> ? ? ? ? wrote: >> ? ? ? ? > I download openlayer in my server, i use openlayers.js(696 >> ? ? ? ? kb) but is so >> ? ? ? ? > heavy for the aplication... can i compress the JS or exist >> ? ? ? ? some compress >> ? ? ? ? > version? >> ? ? ? ? > >> ? ? ? ? > RG >> >> ? ? ? ? > _______________________________________________ >> ? ? ? ? > 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 > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic -------------- next part -------------- A non-text attachment was scrubbed... Name: custom.cfg Type: application/octet-stream Size: 5991 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091204/a2083d0c/custom.obj From valemunoz at gmail.com Fri Dec 4 12:49:10 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js In-Reply-To: References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> <4b56aefe0912040647q1332a220i22d69b549397e4af@mail.gmail.com> <1259938577.10369.78.camel@guillaume-desktop> Message-ID: <4b56aefe0912040949y4f8c5cd4nad021c9b1250dbe3@mail.gmail.com> me sirvio!! muchas gracias Saludos 2009/12/4 Ivan Grcic > Mira, talvez te ayuda, pa OL 2.8. Tiene ke modificarla un pokito y ya :) > Suerte > > > > > > On Fri, Dec 4, 2009 at 3:56 PM, Guillaume Sueur > wrote: > > Hi Valeria, > > > > Lite is maybe too lite for your needs, depending on which > > controls/formats... you use in your client. You should try to define > > your own build. > > > > Regards, > > > > Guillaume > > > > Le vendredi 04 d?cembre 2009 ? 11:47 -0300, Valeria Mu?oz a ?crit : > >> Hi Ivan > >> > >> thanks, i did that(lite.cfg) , but when i change it (.js) returned me > >> errors . :( > >> RG > >> > >> 2009/12/4 Ivan Grcic > >> http://docs.openlayers.org/library/deploying.html > >> http://trac.openlayers.org/wiki/Profiles > >> http://geowebguru.com/articles/212-optimizing-openlayers > >> > >> > >> And after you build your custom OL, you can make your server > >> to gzip files > >> http://httpd.apache.org/docs/2.0/mod/mod_deflate.html > >> > >> It should come to around 150 I think. > >> > >> cheers > >> > >> > >> > >> > >> On Fri, Dec 4, 2009 at 3:24 PM, Valeria Mu?oz > >> wrote: > >> > I download openlayer in my server, i use openlayers.js(696 > >> kb) but is so > >> > heavy for the aplication... can i compress the JS or exist > >> some compress > >> > version? > >> > > >> > RG > >> > >> > _______________________________________________ > >> > 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 > > > > > > _______________________________________________ > > 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/20091204/098a5919/attachment.html From valemunoz at gmail.com Fri Dec 4 15:01:59 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js In-Reply-To: <4b56aefe0912040949y4f8c5cd4nad021c9b1250dbe3@mail.gmail.com> References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> <4b56aefe0912040647q1332a220i22d69b549397e4af@mail.gmail.com> <1259938577.10369.78.camel@guillaume-desktop> <4b56aefe0912040949y4f8c5cd4nad021c9b1250dbe3@mail.gmail.com> Message-ID: <4b56aefe0912041201m31604ca0p4d8a2a2e5b4c7168@mail.gmail.com> Do you know wich one is the .js who permit display icons of zoom in zoo out ..etc?, i use the custum.cfg but i can not see the icons. RG 2009/12/4 Valeria Mu?oz > me sirvio!! muchas gracias > > Saludos > > 2009/12/4 Ivan Grcic > >> Mira, talvez te ayuda, pa OL 2.8. Tiene ke modificarla un pokito y ya :) >> Suerte >> >> >> >> >> >> On Fri, Dec 4, 2009 at 3:56 PM, Guillaume Sueur >> wrote: >> > Hi Valeria, >> > >> > Lite is maybe too lite for your needs, depending on which >> > controls/formats... you use in your client. You should try to define >> > your own build. >> > >> > Regards, >> > >> > Guillaume >> > >> > Le vendredi 04 d?cembre 2009 ? 11:47 -0300, Valeria Mu?oz a ?crit : >> >> Hi Ivan >> >> >> >> thanks, i did that(lite.cfg) , but when i change it (.js) returned me >> >> errors . :( >> >> RG >> >> >> >> 2009/12/4 Ivan Grcic >> >> http://docs.openlayers.org/library/deploying.html >> >> http://trac.openlayers.org/wiki/Profiles >> >> http://geowebguru.com/articles/212-optimizing-openlayers >> >> >> >> >> >> And after you build your custom OL, you can make your server >> >> to gzip files >> >> http://httpd.apache.org/docs/2.0/mod/mod_deflate.html >> >> >> >> It should come to around 150 I think. >> >> >> >> cheers >> >> >> >> >> >> >> >> >> >> On Fri, Dec 4, 2009 at 3:24 PM, Valeria Mu?oz >> >> wrote: >> >> > I download openlayer in my server, i use openlayers.js(696 >> >> kb) but is so >> >> > heavy for the aplication... can i compress the JS or exist >> >> some compress >> >> > version? >> >> > >> >> > RG >> >> >> >> > _______________________________________________ >> >> > 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 >> > >> > >> > _______________________________________________ >> > 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/20091204/01bedd8c/attachment.html From carina_palanca at forcorp.com Fri Dec 4 15:53:34 2009 From: carina_palanca at forcorp.com (cgp) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Changing the Panzoombar position Message-ID: <1259960014497-4114865.post@n2.nabble.com> I want to put the OpenLayers.Control.PanZoomBar() a different position on the map (or screen). I've tried changing the default CSS style but that didn't work. I have also used PanZoomBar.position = new OpenLayers.Pixel((window_width/2)-25,30); But it doesn't move to the correct position when resizing the window. (some issue with the onresize() event triggering three times in a row) Thanks for your help. -- View this message in context: http://n2.nabble.com/Changing-the-Panzoombar-position-tp4114865p4114865.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From carina_palanca at forcorp.com Fri Dec 4 16:19:21 2009 From: carina_palanca at forcorp.com (cgp) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Changing the Panzoombar position In-Reply-To: <1259960014497-4114865.post@n2.nabble.com> References: <1259960014497-4114865.post@n2.nabble.com> Message-ID: <1259961561865-4115025.post@n2.nabble.com> Nevermind. I only had to dynamically assign a css style so that it kicks in after all the HTML has been loaded: $(".olControlPanZoomBar").css({"top":"55px"}); -- View this message in context: http://n2.nabble.com/Changing-the-Panzoombar-position-tp4114865p4115025.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jennifer at greeninfo.org Fri Dec 4 17:14:28 2009 From: jennifer at greeninfo.org (Jennifer Strahan) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Help Society for Conservation GIS WIN the DARPA $40, 000 Contest December 5th!!! Message-ID: <4B1989C4.2090502@greeninfo.org> Hi Everyone, I'm helping to spread the word about the Society for Conservation GIS team effort to win the DARPA red balloon contest. Please see the below message for an opportunity to help raise $40K for SCGIS. The basic idea: keep your eyes peeled tomorrow for big red weather balloons! They will be distributed throughout the U.S., so please pass this message along to anyone who may be willing to help out. I apologize for the off-topic post, but thought this email list would reach an enthusiastic audience willing to help! Regards, Jennifer -------- Original Message -------- Subject: Re: Help SCGIS WIN the DARPA $40,000 Contest November 5th!!! Date: Fri, 4 Dec 2009 12:37:13 -0800 From: Lisa Pierce Reply-To: l.pierce@VERIZON.NET To: SCGIS@LISTSERV.URI.EDU Help SCGIS WIN the DARPA $40,000 Contest December 5th!!! http://www.edc.uri.edu/scgis/ http://www.scgis.org Help the Society for Conservation GIS win $40,000 for our international scholarship program and improve our SCGIS networking efforts! Help the SCGIS Team locate 10 RED Weather Balloons THIS Saturday Dec 05, 2009. This is a one day event and all we need are your eyes...We do NOT need individuals to drive all over the country side, we need increased numbers of observers. if you forward this email to ALL individuals on your contact list we have a greater chance of winning. The only way we can possible win this challenge is to have thousands of eyes looking for these red weather balloons located throughout the United States. You do NOT have to be a "geocacher" or own a GPS to participate, we need all eyes. This money will be used to help conservationists world-wide to gain the skills they need to conserve the environment, indigenous tribes, local communities.. DARPA Network Challenge Celebrating 40th Anniversary of the Internet Saturday, 05 December 2009 https://networkchallenge.darpa.mil/default.aspx DARPA (Defense Advanced Research Projects Agency) has offered this prize to highlight social networking skills. Please, forward this request to your contacts via LinkedIN, Facebook, Twitter, etc and extend the knowledge about the SCGIS efforts. Community, Knowledge, Support, Conservation The Society for Conservation GIS (SCGIS) works to build community, provide knowledge, and support individuals using Geographic Information Systems (GIS) and science for the conservation of natural resources and cultural heritage. The SCGIS assists conservationists worldwide in using GIS through communication, networking, scholarships, and training. Membership is open to any individual seeking assistance in the achievement of personal or organizational conservation goals. Learn more about the Society and how to get involved www.scgis.org Rules/information of Challenge: . Balloons will go up at 10:00am (ET) (7:00am PT) and be taken down at 4:00 pm local time - yes this means they will be visible for 6 hrs on the east coast and 9 hrs on the west coast. . All balloon locations will be visible from a roadway and all areas will be accessible to the public by pedestrian access. Officials will be stationed with the balloons and participants should ask officials for the balloon number and to verify that it is a DARPA Challenge balloon. . Balloons will be visible on 05 Dec ONLY, but we have until noon on 14 Dec to collect the information from our participants. . Federal government employees are restricted from entering the challenge BUT NOT participating, in other words, they can provide us with the information. . The balloons coordinates should be collected in degree-minute-second (DD-MM-SS) format (latitude/longitude). IF you do not have a GPS unit, we have staff available to convert available information (street intersections,...nearby lakes) for you..gather as much information as possible, and be as detailed as possible. See below form Reporting procedures are described in full on the project web site www.edc.uri.edu/scgis. Email submissions should be sent to the SCGIS at l.pierce@verizon.net Phone, text, or web submissions are described on the web site. * Anyone reporting a balloon should provide us with the below information: Participants Info: Participants Name: Telephone Number: Email Address: Participants State: Participants County: Participants Town/City: KEY Info: Balloon Number (Balloon number is available from the DARPA staff at the balloon site): Street Intersection and City of sighting. Lat/Long of the Balloon (If feasible but not necessary) How the coordinate was derived A photo (if possible) Brief (few sentences) of the setting of the balloon (any details are valuable) Brief summary of who they heard about this contest from (their network lineage) *** All money will be granted to SCGIS' International Scholarship Fund. No moneys will be granted to participants or any other entities. Our participation in this event is strictly for fund-raising purposes. ******************************************************* SCGIS:The LISTSERV for the Society for Conservation GIS www.scgis.org To unsubscribe send the following email message to LISTSERV@LISTSERV.URI.EDU: SIGNOFF SCGIS ******************************************************** -- -- Rhonda Friberg, GIS Specialist, GreenInfo Network 564 Market Street, Suite 510 San Francisco, California 94104 PH: 415.979.0343 x315 | FX: 415.979.0371 Web: www.greeninfo.org | www.mapsportal.org Subscribe to MapLines, our e-newsletter at www.greeninfo.org -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jennifer Strahan, GIS Specialist GreenInfo Network, St Paul, MN Field Office 1541 Laurel Ave, Saint Paul, Minnesota, 55104 phone: 651.917.0191 fax: 651.917.0191 www.greeninfo.org | www.mapsportal.org Subscribe to MapLines, our e-enewsletter at www.GreenInfo.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GreenInfo Network, San Francisco 564 Market Street, Suite 510, San Francisco, California 94104 phone: 415.979.0343 fax: 415.797.0371 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From harshad.rj at gmail.com Sat Dec 5 01:41:28 2009 From: harshad.rj at gmail.com (Harshad) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> Message-ID: I used the openlayers.js (696 kb) and compressed it with YUICompressor, and it went down to 573 kb! Probably openlayers.js packagers ought to use YUICompressor instead of jsmin. Valeria Mu?oz wrote: > I download openlayer in my server, i use openlayers.js(696 kb) but is so > heavy for the aplication... can i compress the JS or exist some compress > version? > > RG From igrcic at gmail.com Sat Dec 5 06:25:41 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js In-Reply-To: <4b56aefe0912041201m31604ca0p4d8a2a2e5b4c7168@mail.gmail.com> References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> <4b56aefe0912040647q1332a220i22d69b549397e4af@mail.gmail.com> <1259938577.10369.78.camel@guillaume-desktop> <4b56aefe0912040949y4f8c5cd4nad021c9b1250dbe3@mail.gmail.com> <4b56aefe0912041201m31604ca0p4d8a2a2e5b4c7168@mail.gmail.com> Message-ID: You still have to include theme and img folders, which contains css and image files. Cheers On Fri, Dec 4, 2009 at 9:01 PM, Valeria Mu?oz wrote: > Do you know wich one is the .js who permit display icons of zoom in zoo out > ..etc?, i use the custum.cfg but i can not see the icons. > > RG > > 2009/12/4 Valeria Mu?oz >> >> me sirvio!! muchas gracias >> >> Saludos >> >> 2009/12/4 Ivan Grcic >>> >>> Mira, talvez te ayuda, pa OL 2.8. Tiene ke modificarla un pokito y ya :) >>> Suerte >>> >>> >>> >>> >>> >>> On Fri, Dec 4, 2009 at 3:56 PM, Guillaume Sueur >>> wrote: >>> > Hi Valeria, >>> > >>> > Lite is maybe too lite for your needs, depending on which >>> > controls/formats... you use in your client. You should try to define >>> > your own build. >>> > >>> > Regards, >>> > >>> > Guillaume >>> > >>> > Le vendredi 04 d?cembre 2009 ? 11:47 -0300, Valeria Mu?oz a ?crit : >>> >> Hi Ivan >>> >> >>> >> thanks, i did that(lite.cfg) , but when i change it (.js) returned me >>> >> errors . :( >>> >> RG >>> >> >>> >> 2009/12/4 Ivan Grcic >>> >> ? ? ? ? http://docs.openlayers.org/library/deploying.html >>> >> ? ? ? ? http://trac.openlayers.org/wiki/Profiles >>> >> ? ? ? ? http://geowebguru.com/articles/212-optimizing-openlayers >>> >> >>> >> >>> >> ? ? ? ? And after you build your custom OL, you can make your server >>> >> ? ? ? ? to gzip files >>> >> ? ? ? ? http://httpd.apache.org/docs/2.0/mod/mod_deflate.html >>> >> >>> >> ? ? ? ? It should come to around 150 I think. >>> >> >>> >> ? ? ? ? cheers >>> >> >>> >> >>> >> >>> >> >>> >> ? ? ? ? On Fri, Dec 4, 2009 at 3:24 PM, Valeria Mu?oz >>> >> ? ? ? ? wrote: >>> >> ? ? ? ? > I download openlayer in my server, i use openlayers.js(696 >>> >> ? ? ? ? kb) but is so >>> >> ? ? ? ? > heavy for the aplication... can i compress the JS or exist >>> >> ? ? ? ? some compress >>> >> ? ? ? ? > version? >>> >> ? ? ? ? > >>> >> ? ? ? ? > RG >>> >> >>> >> ? ? ? ? > _______________________________________________ >>> >> ? ? ? ? > 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 >>> > >>> > >>> > _______________________________________________ >>> > Users mailing list >>> > Users@openlayers.org >>> > http://openlayers.org/mailman/listinfo/users >>> > >>> >>> >>> >>> -- >>> Ivan Grcic >> > > -- Ivan Grcic From osm at tappenbeck.net Sat Dec 5 10:21:19 2009 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Problems with ajax.js - STOPPPP!!! In-Reply-To: <4B18E00A.2030309@tappenbeck.net> References: <4B18E00A.2030309@tappenbeck.net> Message-ID: Mistake found !!! reagards Jan :-) Jan Tappenbeck schrieb: > hallo ! > > now i want to open one of my maps [1] - ol based - and nothing will show. > > my search show that following massage will show when i click on the url http://www.openlayers.org/api/ajax.js: > > > > 404 Not Found > >

Not Found

>

The requested URL /api/Ajax.js was not found on this server.

>
>
Apache/2.2.3 (Debian) DAV/2 SVN/1.6.1 mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch15 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_wsgi/2.3 Server at www.openlayers.org Port 80
> > > did anybody know anything about this problem and can help me ? > > did anybody know a possiblity to show a message when the connections makes problems to show a message for the users? > > regards Jan :-) > > > > [1] http://www.tappenbeck.net/osm/maps/deu/maps4osm.php?id=13 From osm at tappenbeck.net Sat Dec 5 10:24:16 2009 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] (un)select all etries in the layer-panel Message-ID: <4B1A7B20.40501@tappenbeck.net> Hi ! is there a posiblilty to (un)select all checkboxes in the layer-panel with one click ??? regards Jan :-) From dragospenet at yahoo.com Sun Dec 6 08:37:32 2009 From: dragospenet at yahoo.com (Dragos Ion) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] OverviewMap - a layer with the same slices but smaller size Message-ID: <848694.2997.qm@web56505.mail.re3.yahoo.com> Hi, just wondering if it's possible to use the same slices of the map but with a smaller size for the OverviewMap (meaning the tag to have let's say 1/4 from the normal map size). If so, I should be able to use the same slices for the OverviewMap. I want this because the zoom level 0 it's big enough to not be 100% in view of the map and thus the OverviewMap shows only a small part of the map. I tested if it's possible to have a smaller slice than the actual size of the slice's image and it's working for the main layer of the map (zooming and panning are all ok) but once I set OverviewMap to use a layer with this setup, the OverviewMap stop working, it displays the samller map but it does not respond to the map panning and zooming anymore. It's there a problem having a smaller size for the layer (maxExtent and the slices) on the OverviewMap (1/4 of the map itself in my case)? Dragos. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091206/ca5517ba/attachment.html From dragospenet at yahoo.com Sun Dec 6 09:24:30 2009 From: dragospenet at yahoo.com (Dragos Ion) Date: Wed Sep 1 17:18:17 2010 Subject: [OpenLayers-Users] Problem setting the correct resolution with a grid layer In-Reply-To: <966536.78259.qm@web56505.mail.re3.yahoo.com> Message-ID: <88125.74215.qm@web56508.mail.re3.yahoo.com> Hmm, I got it. It was a computation problem of the resolution values beacause the maxExtent was not exacly equal with SIZE * 1, SIZE * 5 and SIZE * 10 vs. 256 px slice size. (instead it is something like 1, 1.923, 8.333) Also I changed my coordinate function to be similar with the one at http://trac.openlayers.org/wiki/UsingCustomTiles and that fixed my zoom offset problem. Dragos. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091206/dd326b56/attachment.html From kiki__fiat at hotmail.com Sun Dec 6 17:04:19 2009 From: kiki__fiat at hotmail.com (sylvie fiat) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Problem with namespace param in vector strategy In-Reply-To: <20091204122506.GH4421@metacarta.com> References: , <20091204122506.GH4421@metacarta.com> Message-ID: Ok I am sorry it was just a problem of copy/paste... I wouldn't have had any answer with that request... namespace:'xmlns(topp=http://www.openplans.org/topp)', is my real javascript, as I said I have an answer (with the correct features inside) but cannot managed to have any display on the map. I have tried without style and nothing changed. Regards, Sylvie > Date: Fri, 4 Dec 2009 07:25:06 -0500 > To: kiki__fiat@hotmail.com > CC: users@openlayers.org > Subject: Re: [OpenLayers-Users] Problem with namespace param in vector strategy > From: crschmidt@metacarta.com > > On Fri, Dec 04, 2009 at 07:17:41AM +0000, sylvie fiat wrote: > > > > Hi, > > > > I am having an issue configuring my Vector strategy, I use: > > > > function getVectorLayerWithBounds(bounds) { > > var filter = getBBOXFilter(bounds); > > return new OpenLayers.Layer.Vector(layerName, { > > strategies : [ > > new OpenLayers.Strategy.Fixed() > > ], > > protocol :new OpenLayers.Protocol.HTTP( { > > url :geoserverUrlWfs, > > params : { > > format :SERVICE_WFS, > > service :SERVICE_WFS, > > request :REQUEST_WFS, > > srs :defaultProjection, > > VERSION :VERSION, > > typename :Layer, > > namespace=xmlns(topp=http://www.openplans.org/topp) > > ^^ This is not valid Javascript. > > -- Chris > > > filter: filter > > }, > > format :new OpenLayers.Format.GML() > > }) > > }); > > } > > > > If I add the namespace parameters my Layer won't be displayed, I still have the WFS flux but no feature is displayed on the map. > > If I don't add namespace everything is ok. > > > > I need the namespace parameter in order to use deegree owsproxy. > > > > Do you know what could be the problem ? I only got warnings > > > > 4 d?c. 2009 18:14:41 org.apache.tomcat.util.http.Parameters processParameters > > ATTENTION: Parameters: Invalid chunk ignored. > > 04 d?c. 18:14:42 WARN [geotools.xml] - org.geoserver.security.decorators.ReadOnlyFeatureCollection@1997837 (org.geoserver.security.decorators.ReadOnlyFeatureCollection) is not of type [Lorg.opengis.feature.simple.SimpleFeature; > > > > But I read it was not an important warning ? > > Best regards > > Sylvie > > > > > > _________________________________________________________________ > > Nouveau ! Tout Windows Live d?barque dans votre t?l?phone. Voir les Windows phone > > http://clk.atdmt.com/FRM/go/175819071/direct/01/ > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta _________________________________________________________________ Nouveau?! Tout Windows Live d?barque dans votre t?l?phone. Voir les Windows phone http://clk.atdmt.com/FRM/go/175819071/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091206/800e7d23/attachment.html From kgeusebroek at xebia.com Mon Dec 7 02:45:34 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Array of url's not working with WFS protocol In-Reply-To: <20091204155419.GI4421@metacarta.com> References: <20091204155419.GI4421@metacarta.com> Message-ID: Hi, Just to inform you the reason why I need this: I use multiple vector layer with WMS protocol to track vehicles around the country. I refresh the layers every 5 seconds so I generate a lot of requests to the same domain. Since internet explorer only fires 2 requests to the same domain in parallel I wanted to configure my DNS to have multiple domain names for the same ip address so I could trick IE into doing more then 2 requests at a time. But since the subdomains are not allowed in XHR I'm kind of stuck right now. Anyone have a suggestion for me? Cheers Kris -----Original Message----- From: Christopher Schmidt [mailto:crschmidt@metacarta.com] Sent: Friday, December 04, 2009 4:54 PM To: Kris Geusebroek Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Array of url's not working with WFS protocol On Fri, Dec 04, 2009 at 03:38:36PM +0100, Kris Geusebroek wrote: > I tried to create a patch but it isn't working. > > > > I patched Request.js to select a url out of an Array (just like the > httpRequest class) but I'm running into crossdomain issue with XHR > > Even on only a subdomain difference, IE and firefox throw an exception Different subdomains are still violations of the Same Origin Policy. The browser can not request data from different subdomains (and I can't imagine a way in which this is useful other than that; using a proxy just makes the local proxy your bottleneck.) -- Chris > > > Any hints on how to overcome this or is it impossible > > > > Cheers KRis > > > > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Kris Geusebroek > Sent: Wednesday, December 02, 2009 11:59 AM > To: users@openlayers.org > Subject: [OpenLayers-Users] Array of url's not working with WFS protocol > > > > Am i right that supplying a array of urls to a wfs protocol is not > working like with a layer? > > > > If so I will try tomorrow to create a patch to provide this > functionality > > > > Cheers Kris > > > > Met vriendelijke groet, Kind regards, > > > > Kristiaan Geusebroek > > Consultant > > > > > > > > > > Email: kgeusebroek@xebia.com > > Tel: +31 (0)35 538 1921 > > Fax: +31 (0)35 538 1922 > > Mobiel: +31 (0)6 3069 7223 > > > > Utrechtseweg 49 > > 1213 TL Hilversum > > The Netherlands > > http://www.xebia.com > > > > Xebia Blog: http://blog.xebia.com/ > > Xebia Podcast: http://podcast.xebia.com/ > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From kiki__fiat at hotmail.com Mon Dec 7 02:58:49 2009 From: kiki__fiat at hotmail.com (sylvie fiat) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Problem with namespace param in vector strategy In-Reply-To: References: , , , <20091204122506.GH4421@metacarta.com>, Message-ID: Hi, I figure out that my problem wasn't from namespace option but from WFS version. I just started using WFS 1.1.0 and my old filters where not working anymore, I think it wasn't diplaying anything because I was using HTTP protocol, so I started using WFS protocol and then it was not using my filter, just displaying every features of the layer. I found a patch http://trac.openlayers.org/attachment/ticket/2292/patch_ticket2292_r9686_A3.patch which I might not hav correctly integrated to my openLayers 2.8, so I tried the SVN and now it is working! ...But just for my BBOX filter. When I try a featureId filter or a Comparaison.EQUAL_TO filter, I have different issues (I use a fonction to pass filter to my vector layer so it should theoritically have the same behavour) featureId filter: filter = new OpenLayers.Filter.FeatureId({ fids: tstation.ST102 }); I have in my result which means nothing... and I am sure my feature exist, not sure the way to call fids behave the same ? Do I still need featureType.featureId ? Comparaison filter: filter = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: property, value: value }); I have a java.lang.RuntimeException: Parsing failed for PropertyName: java.lang.NullPointerException Parsing failed for PropertyName: java.lang.NullPointerException null but my request do have the topp:idespece I don't really know what it might be Thanks again, Sylvie From: kiki__fiat@hotmail.com To: crschmidt@metacarta.com Date: Sun, 6 Dec 2009 22:04:19 +0000 CC: users@openlayers.org Subject: Re: [OpenLayers-Users] Problem with namespace param in vector strategy Ok I am sorry it was just a problem of copy/paste... I wouldn't have had any answer with that request... namespace:'xmlns(topp=http://www.openplans.org/topp)', is my real javascript, as I said I have an answer (with the correct features inside) but cannot managed to have any display on the map. I have tried without style and nothing changed. Regards, Sylvie > Date: Fri, 4 Dec 2009 07:25:06 -0500 > To: kiki__fiat@hotmail.com > CC: users@openlayers.org > Subject: Re: [OpenLayers-Users] Problem with namespace param in vector strategy > From: crschmidt@metacarta.com > > On Fri, Dec 04, 2009 at 07:17:41AM +0000, sylvie fiat wrote: > > > > Hi, > > > > I am having an issue configuring my Vector strategy, I use: > > > > function getVectorLayerWithBounds(bounds) { > > var filter = getBBOXFilter(bounds); > > return new OpenLayers.Layer.Vector(layerName, { > > strategies : [ > > new OpenLayers.Strategy.Fixed() > > ], > > protocol :new OpenLayers.Protocol.HTTP( { > > url :geoserverUrlWfs, > > params : { > > format :SERVICE_WFS, > > service :SERVICE_WFS, > > request :REQUEST_WFS, > > srs :defaultProjection, > > VERSION :VERSION, > > typename :Layer, > > namespace=xmlns(topp=http://www.openplans.org/topp) > > ^^ This is not valid Javascript. > > -- Chris > > > filter: filter > > }, > > format :new OpenLayers.Format.GML() > > }) > > }); > > } > > > > If I add the namespace parameters my Layer won't be displayed, I still have the WFS flux but no feature is displayed on the map. > > If I don't add namespace everything is ok. > > > > I need the namespace parameter in order to use deegree owsproxy. > > > > Do you know what could be the problem ? I only got warnings > > > > 4 d?c. 2009 18:14:41 org.apache.tomcat.util.http.Parameters processParameters > > ATTENTION: Parameters: Invalid chunk ignored. > > 04 d?c. 18:14:42 WARN [geotools.xml] - org.geoserver.security.decorators.ReadOnlyFeatureCollection@1997837 (org.geoserver.security.decorators.ReadOnlyFeatureCollection) is not of type [Lorg.opengis.feature.simple.SimpleFeature; > > > > But I read it was not an important warning ? > > Best regards > > Sylvie > > > > > > _________________________________________________________________ > > Nouveau ! Tout Windows Live d?barque dans votre t?l?phone. Voir les Windows phone > > http://clk.atdmt.com/FRM/go/175819071/direct/01/ > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta PC, t?l?phones portables, souris hi-tech. ? gagner gr?ce ? Hotmail ! C'est ici ! _________________________________________________________________ T?l?chargez Internet Explorer 8 et surfez sans laisser de trace ! http://clk.atdmt.com/FRM/go/182932252/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/7283082a/attachment.html From Tommy.Niittula at nethouse.se Mon Dec 7 03:44:44 2009 From: Tommy.Niittula at nethouse.se (Tommy Niittula) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Adding Legends in OpenLayers Message-ID: <878F01A1C710FB41900EEB3443F4ED16011C20E531@SRV139.nethouse.local> Hi, I have legends for different WMS-layers as images, and I would like to show (and hide) the legend images like the LayerSwitcher or Minimap. Is that possible and if so how do I start implementing this? /Tommy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/9dce515d/attachment.html From rahn at zhaw.ch Mon Dec 7 04:41:20 2009 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Adding Legends in OpenLayers In-Reply-To: <878F01A1C710FB41900EEB3443F4ED16011C20E531@SRV139.nethouse.local> References: <878F01A1C710FB41900EEB3443F4ED16011C20E531@SRV139.nethouse.local> Message-ID: <3F643797A078EB4FB02880080968098401A63FB0@langouste.zhaw.ch> hello, I made it like this. First I define a function: function toggleMe(a){ var e=document.getElementById(a); if(!e)return true; if(e.style.display=="none"){ e.style.display="block" } else { e.style.display="none" } return true; } Then you must create a div object where you would show the legend image. This div you can show or hide with tho onclick event. For example like this:
You can use the function with every object and the object id. Hope it will help you. 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 ________________________________ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Tommy Niittula Gesendet: Montag, 7. Dezember 2009 09:45 An: users@openlayers.org Betreff: [OpenLayers-Users] Adding Legends in OpenLayers Hi, I have legends for different WMS-layers as images, and I would like to show (and hide) the legend images like the LayerSwitcher or Minimap. Is that possible and if so how do I start implementing this? /Tommy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/57b9a642/attachment.html From lalahei at gmail.com Mon Dec 7 05:04:05 2009 From: lalahei at gmail.com (RT90) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] GetFeatureInfo works in IE, not FF, beginner wonders why. In-Reply-To: <4B18EB4F.10000@codematix.de> References: <1259919712635-4111448.post@n2.nabble.com> <4B18EB4F.10000@codematix.de> Message-ID: <1260180245106-4125164.post@n2.nabble.com> Hi, ah. I shall not mind IE6 anymore and do as you advice, Thanks. Jana Golinowski wrote: > > Hi, > >> The issue is the GetFeatureInfo request. Now, I've seen this referred to >> before in this forum, but always when the viewer pages have been hosted >> on >> some webserver. Currently, mine is not published anywhere, it's just >> sitting >> in a file on the same machine as the GeoServer is running on. > >> FF 3.0.15's error console reports (roughly translated) : "Security fault: >> contents of file (path to the local html-file) isn't allowed to fetch >> data >> from >> http://localhost:8080/geoserver/wms?LAYERS=sweden_ways&FORMAT=image%2Fpng&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A3006&BBOX=106524.93608%2C6533250.45206%2C1087113.063921%2C7268691.54794&X=723&Y=385&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=sweden_ways&WIDTH=900&HEIGHT=675." >> and the 'loading' message in the div remains forever. > > That sounds like you are not using any webserver (except for your > GeoServer). Those security restrictions apply to local files also. > > You will have to deploy your local file to your webserver running on > localhost:8080. > > > Greetings, Jana. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/GetFeatureInfo-works-in-IE-not-FF-beginner-wonders-why-tp4111448p4125164.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Mon Dec 7 05:51:24 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Get Coordinates after moving mouse Message-ID: <1260183084999-4125336.post@n2.nabble.com> Hello, I have a question, which is not so difficult but I can't solve it. I have mousemove event like this: map.events.register('mousemove', map, callthis); now i want to get in my callthis function the coordinates of the position of my mouse (the coordinates which are displayed in the lower right corner of the openlayers map). How do I get them. can someone help me? regards stash -- View this message in context: http://n2.nabble.com/Get-Coordinates-after-moving-mouse-tp4125336p4125336.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From cbo at le34.dk Mon Dec 7 05:56:30 2009 From: cbo at le34.dk (=?iso-8859-1?Q?Casper_B=F8rgesen?=) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Get Coordinates after moving mouse In-Reply-To: <1260183084999-4125336.post@n2.nabble.com> References: <1260183084999-4125336.post@n2.nabble.com> Message-ID: I have previously used the following: map.events.register("mousemove", map, function(e) { var position = this.events.getMousePosition(e); var lonlat = map.getLonLatFromPixel(position); // A mysterious error is causing OpenLayers to return a non-varying fraction after a zoom has been made. // This is removed by toFixed(). OpenLayers.Util.getElement("Easting").innerHTML = lonlat.lon.toFixed(0) + "m"; OpenLayers.Util.getElement("Northing").innerHTML = lonlat.lat.toFixed(0) + "m"; }); Regards, Casper -----Oprindelig meddelelse----- Fra: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] P? vegne af stash Sendt: 7. december 2009 11:51 Til: users@openlayers.org Emne: [OpenLayers-Users] Get Coordinates after moving mouse Hello, I have a question, which is not so difficult but I can't solve it. I have mousemove event like this: map.events.register('mousemove', map, callthis); now i want to get in my callthis function the coordinates of the position of my mouse (the coordinates which are displayed in the lower right corner of the openlayers map). How do I get them. can someone help me? regards stash -- View this message in context: http://n2.nabble.com/Get-Coordinates-after-moving-mouse-tp4125336p4125336.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 steffen.schwarz85 at googlemail.com Mon Dec 7 06:14:45 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Get Coordinates after moving mouse In-Reply-To: References: <1260183084999-4125336.post@n2.nabble.com> Message-ID: <1260184485191-4125411.post@n2.nabble.com> hi, that works. thanks for the hint. -- View this message in context: http://n2.nabble.com/Get-Coordinates-after-moving-mouse-tp4125336p4125411.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From valemunoz at gmail.com Mon Dec 7 07:37:37 2009 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] optimization 2: openlayers.js In-Reply-To: References: <4b56aefe0912040624t1bd5ba8l8a5ab1da62f1099a@mail.gmail.com> <4b56aefe0912040647q1332a220i22d69b549397e4af@mail.gmail.com> <1259938577.10369.78.camel@guillaume-desktop> <4b56aefe0912040949y4f8c5cd4nad021c9b1250dbe3@mail.gmail.com> <4b56aefe0912041201m31604ca0p4d8a2a2e5b4c7168@mail.gmail.com> Message-ID: <4b56aefe0912070437t202f4dc3kebe2d5b787d82a4@mail.gmail.com> ok that is new for me :)... how can i do that?... the css have to have a specific name and path? RG 2009/12/5 Ivan Grcic > You still have to include theme and img folders, which contains css > and image files. > > Cheers > > > On Fri, Dec 4, 2009 at 9:01 PM, Valeria Mu?oz wrote: > > Do you know wich one is the .js who permit display icons of zoom in zoo > out > > ..etc?, i use the custum.cfg but i can not see the icons. > > > > RG > > > > 2009/12/4 Valeria Mu?oz > >> > >> me sirvio!! muchas gracias > >> > >> Saludos > >> > >> 2009/12/4 Ivan Grcic > >>> > >>> Mira, talvez te ayuda, pa OL 2.8. Tiene ke modificarla un pokito y ya > :) > >>> Suerte > >>> > >>> > >>> > >>> > >>> > >>> On Fri, Dec 4, 2009 at 3:56 PM, Guillaume Sueur > >>> wrote: > >>> > Hi Valeria, > >>> > > >>> > Lite is maybe too lite for your needs, depending on which > >>> > controls/formats... you use in your client. You should try to define > >>> > your own build. > >>> > > >>> > Regards, > >>> > > >>> > Guillaume > >>> > > >>> > Le vendredi 04 d?cembre 2009 ? 11:47 -0300, Valeria Mu?oz a ?crit : > >>> >> Hi Ivan > >>> >> > >>> >> thanks, i did that(lite.cfg) , but when i change it (.js) returned > me > >>> >> errors . :( > >>> >> RG > >>> >> > >>> >> 2009/12/4 Ivan Grcic > >>> >> http://docs.openlayers.org/library/deploying.html > >>> >> http://trac.openlayers.org/wiki/Profiles > >>> >> http://geowebguru.com/articles/212-optimizing-openlayers > >>> >> > >>> >> > >>> >> And after you build your custom OL, you can make your server > >>> >> to gzip files > >>> >> http://httpd.apache.org/docs/2.0/mod/mod_deflate.html > >>> >> > >>> >> It should come to around 150 I think. > >>> >> > >>> >> cheers > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> On Fri, Dec 4, 2009 at 3:24 PM, Valeria Mu?oz > >>> >> wrote: > >>> >> > I download openlayer in my server, i use openlayers.js(696 > >>> >> kb) but is so > >>> >> > heavy for the aplication... can i compress the JS or exist > >>> >> some compress > >>> >> > version? > >>> >> > > >>> >> > RG > >>> >> > >>> >> > _______________________________________________ > >>> >> > 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 > >>> > > >>> > > >>> > _______________________________________________ > >>> > Users mailing list > >>> > Users@openlayers.org > >>> > http://openlayers.org/mailman/listinfo/users > >>> > > >>> > >>> > >>> > >>> -- > >>> Ivan Grcic > >> > > > > > > > > -- > Ivan Grcic > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/a3e0cc82/attachment.html From woodbri at swoodbridge.com Mon Dec 7 08:49:02 2009 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Array of url's not working with WFS protocol In-Reply-To: References: <20091204155419.GI4421@metacarta.com> Message-ID: <4B1D07CE.4000806@swoodbridge.com> Well, one idea might be to only make one XHR request and get all the data for all the layers, then have the request handler load the data into the appropriate layers so they all get updated. This assumes that you can tag the data returned with some key that allows you to tie it to a specific layer. Or that you can change your application so all devices are on a single layer. -Steve W Kris Geusebroek wrote: > Hi, > > Just to inform you the reason why I need this: > > I use multiple vector layer with WMS protocol to track vehicles around > the country. I refresh the layers every 5 seconds so I generate a lot of > requests to the same domain. > Since internet explorer only fires 2 requests to the same domain in > parallel I wanted to configure my DNS to have multiple domain names for > the same ip address so I could trick IE into doing more then 2 requests > at a time. > > But since the subdomains are not allowed in XHR I'm kind of stuck right > now. > > Anyone have a suggestion for me? > > Cheers Kris > > -----Original Message----- > From: Christopher Schmidt [mailto:crschmidt@metacarta.com] > Sent: Friday, December 04, 2009 4:54 PM > To: Kris Geusebroek > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Array of url's not working with WFS > protocol > > On Fri, Dec 04, 2009 at 03:38:36PM +0100, Kris Geusebroek wrote: >> I tried to create a patch but it isn't working. >> >> >> >> I patched Request.js to select a url out of an Array (just like the >> httpRequest class) but I'm running into crossdomain issue with XHR >> >> Even on only a subdomain difference, IE and firefox throw an exception > > Different subdomains are still violations of the Same Origin Policy. > The browser can not request data from different subdomains (and I can't > imagine a way in which this is useful other than that; using a proxy > just > makes the local proxy your bottleneck.) > > -- Chris > >> >> >> Any hints on how to overcome this or is it impossible >> >> >> >> Cheers KRis >> >> >> >> From: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] >> On Behalf Of Kris Geusebroek >> Sent: Wednesday, December 02, 2009 11:59 AM >> To: users@openlayers.org >> Subject: [OpenLayers-Users] Array of url's not working with WFS > protocol >> >> >> Am i right that supplying a array of urls to a wfs protocol is not >> working like with a layer? >> >> >> >> If so I will try tomorrow to create a patch to provide this >> functionality >> >> >> >> Cheers Kris >> >> >> >> Met vriendelijke groet, Kind regards, >> >> >> >> Kristiaan Geusebroek >> >> Consultant >> >> >> >> >> >> >> >> >> >> Email: kgeusebroek@xebia.com >> >> Tel: +31 (0)35 538 1921 >> >> Fax: +31 (0)35 538 1922 >> >> Mobiel: +31 (0)6 3069 7223 >> >> >> >> Utrechtseweg 49 >> >> 1213 TL Hilversum >> >> The Netherlands >> >> http://www.xebia.com >> >> >> >> Xebia Blog: http://blog.xebia.com/ >> >> Xebia Podcast: http://podcast.xebia.com/ >> >> >> > > > > >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > From bartvde at osgis.nl Mon Dec 7 08:53:51 2009 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Array of url's not working with WFS protocol In-Reply-To: References: <20091204155419.GI4421@metacarta.com> Message-ID: <408D105E-1797-493C-8499-F5868ADD4E5A@osgis.nl> Hi Kris, that actually slipped my mind when I said patches welcome :-) The only way I see is to use an iframe hack instead of real XHR. The reason I also have been wanting to look into this is some security issues in IE with ActiveX, not all of my customers had ActiveX enabled, or somehow the XMLHttp one was treated as an untrusted ActiveX. Best regards, Bart On Dec 7, 2009, at 8:45 AM, Kris Geusebroek wrote: > Hi, > > Just to inform you the reason why I need this: > > I use multiple vector layer with WMS protocol to track vehicles around > the country. I refresh the layers every 5 seconds so I generate a lot of > requests to the same domain. > Since internet explorer only fires 2 requests to the same domain in > parallel I wanted to configure my DNS to have multiple domain names for > the same ip address so I could trick IE into doing more then 2 requests > at a time. > > But since the subdomains are not allowed in XHR I'm kind of stuck right > now. > > Anyone have a suggestion for me? > > Cheers Kris > > -----Original Message----- > From: Christopher Schmidt [mailto:crschmidt@metacarta.com] > Sent: Friday, December 04, 2009 4:54 PM > To: Kris Geusebroek > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Array of url's not working with WFS > protocol > > On Fri, Dec 04, 2009 at 03:38:36PM +0100, Kris Geusebroek wrote: >> I tried to create a patch but it isn't working. >> >> >> >> I patched Request.js to select a url out of an Array (just like the >> httpRequest class) but I'm running into crossdomain issue with XHR >> >> Even on only a subdomain difference, IE and firefox throw an exception > > Different subdomains are still violations of the Same Origin Policy. > The browser can not request data from different subdomains (and I can't > imagine a way in which this is useful other than that; using a proxy > just > makes the local proxy your bottleneck.) > > -- Chris > >> >> >> Any hints on how to overcome this or is it impossible >> >> >> >> Cheers KRis >> >> >> >> From: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] >> On Behalf Of Kris Geusebroek >> Sent: Wednesday, December 02, 2009 11:59 AM >> To: users@openlayers.org >> Subject: [OpenLayers-Users] Array of url's not working with WFS > protocol >> >> >> >> Am i right that supplying a array of urls to a wfs protocol is not >> working like with a layer? >> >> >> >> If so I will try tomorrow to create a patch to provide this >> functionality >> >> >> >> Cheers Kris >> >> >> >> Met vriendelijke groet, Kind regards, >> >> >> >> Kristiaan Geusebroek >> >> Consultant >> >> >> >> >> >> >> >> >> >> Email: kgeusebroek@xebia.com >> >> Tel: +31 (0)35 538 1921 >> >> Fax: +31 (0)35 538 1922 >> >> Mobiel: +31 (0)6 3069 7223 >> >> >> >> Utrechtseweg 49 >> >> 1213 TL Hilversum >> >> The Netherlands >> >> http://www.xebia.com >> >> >> >> Xebia Blog: http://blog.xebia.com/ >> >> Xebia Podcast: http://podcast.xebia.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 > From rifins at gmail.com Mon Dec 7 09:37:20 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] maxFeatures and BBOX.. Message-ID: Hi, I'm trying to create a vector layer from a WFS, and limiting to 150 features, in this way: wfs = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", featureType: "test_points", featureNS: "http://www.mapmap.org/g4wd", extractAttributes: false, maxFeatures: "150" }), styleMap: myStyles }); And the 150 features are displayed ok. The best way to refresh the features when zooming or moving, is to catch each event and call to the refresh method of the vector layer? Or is there any way to make an automatic refresh? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/f70628aa/attachment.html From eric.lemoine at camptocamp.com Mon Dec 7 09:58:26 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] maxFeatures and BBOX.. In-Reply-To: References: Message-ID: On Mon, Dec 7, 2009 at 3:37 PM, JuKiM wrote: > Hi, > I'm trying to create ?a vector layer from a WFS, and limiting to 150 > features, in this way: > wfs = new OpenLayers.Layer.Vector("WFS", { > ?? ?strategies: [new OpenLayers.Strategy.BBOX()], > ?? ? ? ?protocol: new OpenLayers.Protocol.WFS({ > ?? ? ? ? ? ?url: "http://localhost:8080/geoserver/wfs", > ?? ? ? ? ? ?featureType: "test_points", > ?? ? ? ? ? ?featureNS: "http://www.mapmap.org/g4wd", > ?? ? ? ? ? ?extractAttributes: false, > ?? ? ? ? ? ?maxFeatures: "150" > ?? ? ? ?}), > ?? ? ? ?styleMap: myStyles > ?? ?}); > And the 150 features are displayed ok. The best way to refresh the features > when zooming or moving, is to catch each event and call to the refresh > method of the vector layer? Or is there any way to make an automatic the BBOX strategy should handle this for you. Use resFactor:1 in the BBOX strategy options if you want the strategy to fetch new features also when zooming in. 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 lalahei at gmail.com Mon Dec 7 11:10:30 2009 From: lalahei at gmail.com (RT90) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] GetFeatureInfo works in IE, not FF, beginner wonders why. In-Reply-To: <1260180245106-4125164.post@n2.nabble.com> References: <1259919712635-4111448.post@n2.nabble.com> <4B18EB4F.10000@codematix.de> <1260180245106-4125164.post@n2.nabble.com> Message-ID: <1260202230600-4126790.post@n2.nabble.com> Hmm, well, I installed Apache and let it run on localhost:8080, and let it host my OL html page. As long as GeoServer is running that port however, the Apache-hosted html is unreachable, which I guess is logical :p Same port = collision, different ports = browser policy breach. I think http://faq.openlayers.org/proxyhost/all/ would help, but I'm unsure how to employ it: Download script, put into /apache/cgi-bin; edit OL html page = add "OpenLayers.ProxyHost = "/../cgi-bin/proxy.cgi?url=";" as seemingly instructed, attempt to access http://yourdomain.example.com/cgi-bin/proxy.cgi - 404. I'll ponder this for a bit, for surely they must run on different ports to begin with? RT90 wrote: > > Hi, > ah. I shall not mind IE6 anymore and do as you advice, > Thanks. > > > Jana Golinowski wrote: >> >> Hi, >> >>> The issue is the GetFeatureInfo request. Now, I've seen this referred to >>> before in this forum, but always when the viewer pages have been hosted >>> on >>> some webserver. Currently, mine is not published anywhere, it's just >>> sitting >>> in a file on the same machine as the GeoServer is running on. >> >>> FF 3.0.15's error console reports (roughly translated) : "Security >>> fault: >>> contents of file (path to the local html-file) isn't allowed to fetch >>> data >>> from >>> http://localhost:8080/geoserver/wms?LAYERS=sweden_ways&FORMAT=image%2Fpng&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A3006&BBOX=106524.93608%2C6533250.45206%2C1087113.063921%2C7268691.54794&X=723&Y=385&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=sweden_ways&WIDTH=900&HEIGHT=675." >>> and the 'loading' message in the div remains forever. >> >> That sounds like you are not using any webserver (except for your >> GeoServer). Those security restrictions apply to local files also. >> >> You will have to deploy your local file to your webserver running on >> localhost:8080. >> >> >> Greetings, Jana. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- View this message in context: http://n2.nabble.com/GetFeatureInfo-works-in-IE-not-FF-beginner-wonders-why-tp4111448p4126790.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From minika.bjorge at statkart.no Mon Dec 7 13:15:15 2009 From: minika.bjorge at statkart.no (mbjorge) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] KML GML layer - feature.attributes.description displays undefined textror Message-ID: <1260209715835-4127545.post@n2.nabble.com> I am a newbie to OpenLayers and I have followed the KML example. I have spent hours searching through previous posts for an answer. I have 2 problems: 1. The pop up displays differently on Firefox, IE and Opera. On FireFox and Opera, the description text does not show. It displays "undefined" while in IE7, the "name" and "description text appears. See: http://www.sjokart.no/admin/filestore/Sjkartverket/kml/test/testKMLPopGML.html KML: http://www.sjokart.no/admin/filestore/Sjkartverket/kml/vannstandstasjoner2.kml 2. How do I control the size of the popup box on IE. I have tried using popup.autoSize=true but this does not work. Any help would be appreciated.:-( Thanks -- View this message in context: http://n2.nabble.com/KML-GML-layer-feature-attributes-description-displays-undefined-textror-tp4127545p4127545.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/20091207/97122a8f/attachment.html From javamike9 at yahoo.com Mon Dec 7 13:35:08 2009 From: javamike9 at yahoo.com (Michael Hampton) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Textfield Event Handling in a Custom Control Message-ID: <428686.93381.qm@web36106.mail.mud.yahoo.com> How can I enable default event handling for a textfield input in a custom control? When I place a textfield into a control on the map, it does not receive mouse events or keyboard events. How can I make the textfield receive these events and handle them as it normally would? Any help greatly appreciated. This is example of what I am talking about: http://sites.google.com/site/javamike9/javascript/test5.html?attredirects=0&d=1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/c8294d39/attachment.html From pascal.martin at boreal-is.com Mon Dec 7 13:47:33 2009 From: pascal.martin at boreal-is.com (Pascal Martin) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] fix for NS_ERROR_NOT_INITIALIZED Message-ID: <4B1D4DC5.1010703@boreal-is.com> An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/740b4657/attachment.html -------------- next part -------------- Index: XMLHttpRequest.js =================================================================== --- XMLHttpRequest.js (révision 9859) +++ XMLHttpRequest.js (copie de travail) @@ -197,7 +197,8 @@ this._object.setRequestHeader("Content-Type", "application/xml"); } - this._object.send(vData); + if (!this._aborted)this._object.send(vData); + this._object.send(vData); // BUGFIX: Gecko - missing readystatechange calls in synchronous requests if (bGecko && !this._async) { From bartvde at osgis.nl Mon Dec 7 13:55:27 2009 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] fix for NS_ERROR_NOT_INITIALIZED In-Reply-To: <4B1D4DC5.1010703@boreal-is.com> References: <4B1D4DC5.1010703@boreal-is.com> Message-ID: <1C45CD70-03CA-49A9-9B0B-F2669B8DF490@osgis.nl> Hi Pascal, can you please open a ticket in the OpenLayers Trac and attach your patch there? This seems similar to the error on read which already has a ticket, but your case involves write: http://trac.openlayers.org/ticket/2065 Best regards, Bart On Dec 7, 2009, at 7:47 PM, Pascal Martin wrote: > Hi y receive this error in FireBug > > uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: http://192.168.5.168:8081/gp/lib/MF-r3260_OL-r9850_GeoEXT-r1537/MF_OL_GeoEXT.js :: anonymous :: line 1469" data: no] > > Y fix the error by replace "this._object.send(vData);" with "if (!this._aborted)this._object.send(vData);" in openlayers-trunk\lib\OpenLayers\Request\XMLHttpRequest.js > > Can you put this fix in truck ? > > > > Index: XMLHttpRequest.js > =================================================================== > --- XMLHttpRequest.js (r?vision 9859) > +++ XMLHttpRequest.js (copie de travail) > @@ -197,7 +197,8 @@ > this._object.setRequestHeader("Content-Type", "application/xml"); > } > > - this._object.send(vData); > + if (!this._aborted)this._object.send(vData); > + this._object.send(vData); > > // BUGFIX: Gecko - missing readystatechange calls in synchronous requests > if (bGecko && !this._async) { > _______________________________________________ > 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/20091207/727349dc/attachment.html From pascal.martin at boreal-is.com Mon Dec 7 14:13:11 2009 From: pascal.martin at boreal-is.com (Pascal Martin) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] fix for NS_ERROR_NOT_INITIALIZED In-Reply-To: <1C45CD70-03CA-49A9-9B0B-F2669B8DF490@osgis.nl> References: <4B1D4DC5.1010703@boreal-is.com> <1C45CD70-03CA-49A9-9B0B-F2669B8DF490@osgis.nl> Message-ID: <4B1D53C7.2060703@boreal-is.com> An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/b7924df8/attachment.html From haftish21 at gmail.com Mon Dec 7 15:49:54 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display Message-ID: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> I'm trying to add a vector layer into my map. No error message. I can see the layer name listed in my layer switcher, but nothing is displaying on my map. Here is my code... ethRoads = new OpenLayers.Layer.Vector("Roads WFS-T", { strategies: [new OpenLayers.Strategy.Save()], protocol: new OpenLayers.Protocol.WFS({ version: "1.0.0", url: " http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map", featureType: "ethroads", srsName: "EPSG:4326", featureNS: "http://www.opengis.net/ethroads", geometryName: "roadgeom", schema: " http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map&service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=ethroads " }) }); oMap.addLayer(ethRoads); What is going wrong??? Can anyone out there help...Thanks in advance!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091207/bcae4c16/attachment.html From chove at crans.org Mon Dec 7 15:53:16 2009 From: chove at crans.org (=?ISO-8859-1?Q?Etienne_Chov=E9?=) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Control display Message-ID: <4B1D6B3C.2070500@crans.org> Hi, I've two question about controls: 1. How to move control to botom left 2. How to remove blank line between Attribution and Mouse position http://osmose.openstreetmap.fr/clc/cgi-bin/index.py Thanks Etienne From igrcic at gmail.com Mon Dec 7 16:47:58 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> Message-ID: Hi, you need at least one strategy that will fetch data, Fixed or BBOX. Check out examples! Cheers On Mon, Dec 7, 2009 at 9:49 PM, Haftish 21 wrote: > I'm trying to add a vector layer into my map. No error message. I can see > the layer name listed in my layer switcher, but nothing is displaying on my > map. Here is my code... > > ethRoads = new OpenLayers.Layer.Vector("Roads WFS-T", { > ??????????? strategies: [new OpenLayers.Strategy.Save()], > ??????????? protocol: new OpenLayers.Protocol.WFS({ > ??????????????? version:?????? "1.0.0", > ??????????????? url: > "http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map", > ??????????????? featureType:?? "ethroads", > ??????????????? srsName:?????? "EPSG:4326", > ??????????????? featureNS:???? "http://www.opengis.net/ethroads", > ??????????????? geometryName:? "roadgeom", > ??????????????? schema: > "http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map&service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=ethroads" > ??????????? }) > ??????? }); > > ??? ??? oMap.addLayer(ethRoads); > > ?What is going wrong??? Can anyone out there help...Thanks in advance!!! > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From dave.potts at pinan.co.uk Tue Dec 8 00:57:01 2009 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Firebug and Opnlayers In-Reply-To: References: <1259331630271-4075933.post@n2.nabble.com> <1259571573270-4086390.post@n2.nabble.com> <4B138CFB.1030104@opengeo.org> Message-ID: <4B1DEAAD.9000900@pinan.co.uk> Hi I have had problems with getting the support console interface to work, the current version of firebug and firebug lite seem to include extra features. I wondering if it might be useful to change the current interface so that openlayers can use either the current version of openlayers console or the firebug version by saying something like (function() { /** * If Firebug Lite is included (before this script), re-route all * OpenLayers.Console calls to the console object. */ var scripts = document.getElementsByTagName("script"); for(var i=0, len=scripts.length; i= 0 || scripts[i].src.indexOf("firebug-lite.js") >= 0 || scripts[i].src.indexOf("firebug-lite.compressed.js") >= 0 ) { if(console) { OpenLayers.Util.extend(OpenLayers.Console, console); break; } } } })(); This way you leave up to the user as to which version of firebug is used! If a user supples firebug-lite, then its used. Dave. From dave.potts at pinan.co.uk Tue Dec 8 03:29:33 2009 From: dave.potts at pinan.co.uk (David Potts) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] event model and event propagation In-Reply-To: <4B1DEAAD.9000900@pinan.co.uk> References: <1259331630271-4075933.post@n2.nabble.com> <1259571573270-4086390.post@n2.nabble.com> <4B138CFB.1030104@opengeo.org> <4B1DEAAD.9000900@pinan.co.uk> Message-ID: <49637.193.123.16.70.1260260973.squirrel@dp2642.force9.co.uk> I have a map image with a WMSGetFeatureInfo control and OpenLayers. Marker.Box object with a click handle registered on it. The WMSGetFeature control is added first, the box object does not inserect any feature on the WMS layer. when ever I click on the map, the wms control is in invoked, the click handler on the box feature never gets invoked. Q. Is this the expected behaivour? I had expected that events would be routed through to the click handler on the box object instead the wms control seems to "eat all" the events. Dave. -- Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Pinan Software From kenny at xarex.com Tue Dec 8 03:42:17 2009 From: kenny at xarex.com (Kenny France) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] dynamic map coordinated and popups In-Reply-To: References: Message-ID: <000901ca77e2$59669610$0c33c230$@com> Hi, I am trying to do exactly the same thing L Have you had any luck with this yet? I am saving the data as WKT ie: Id = "1"; Name = "test"; Description = "this is a test"; Coor = " POLYGON((27.0754999939 -25.63199999445, 26.9090999926 -26.33173333325, 27.1437666611 -26.54506666825, 27.5661666644 -26.64320000235, 27.600299998 -26.27626666615, 28.0141666679 -26.36586666685, 27.9800333343 -26.07573333125, 27.7197666656 -25.73439999525, 28.0995000019 -25.52959999365, 27.7496333325 -25.36746665905, 27.1522999945 -25.32906665875, 26.8365666587 -25.24799999145, 26.960299993 -25.63626666115, 26.6232333237 -25.62773332775, 26.6445666572 -25.84533332945, 26.7213666578 -26.02453333085, 27.0754999939 -25.63199999445))"; I am trying to display this on a map and on click display a small popup with the name of the polygon Please point us in the right direction Thanks K- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of digitalmedia5@gmail.com Sent: 02 December 2009 06:03 PM To: users@openlayers.org Subject: [OpenLayers-Users] dynamic map coordinated and popups I have maps set up with polygons over a few specific areas. when a user clicks on an area the pop-up displays a small amount of information about that area. This does work, but I would like to display a different map with different information based on information from a mysql database. I can't seem to figure out how to add multiple polygons to the map based on information in my mysql database and show the popup information. I am trying to store this information in a mysql database (coordinates for the polygons, and popup information). how can I get the data from my database into the map? Any Ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091208/990c0a7f/attachment.html From minika.bjorge at statkart.no Tue Dec 8 03:52:53 2009 From: minika.bjorge at statkart.no (mbjorge) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Firefox - popup feature attribute "undefined" Message-ID: <1260262373046-4131261.post@n2.nabble.com> I am a newbie to OpenLayers and I have followed the KML example. I have spent hours searching through previous posts for an answer. Firefox and Opera: The pop up works on Firefox but only displays the name. The description displays "undefined".
IE :both the "name" and "description text appears. You can see it here http://www.sjokart.no/admin/filestore/Sjkartverket/kml/test/testKMLPopGML.html my kml test Here's my code: var lon = 11.8; var lat = 64.5; var zoom = 5; var map, layer, gmap, kmlLayer, selectControl; function init(){ map = new OpenLayers.Map('map'); layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {isBaseLayer: true}); map.addLayer(layer); map.addControl(new OpenLayers.Control.LayerSwitcher()); kmlLayer = new OpenLayers.Layer.GML("KML", "http://www.sjokart.no/admin/filestore/Sjkartverket/kml/vannstandstasjoner2.kml", { format: OpenLayers.Format.KML, formatOptions: { extractStyles: true, extractAttributes: true, maxDepth: 2 } }); map.addLayer(kmlLayer); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); selectControl = new OpenLayers.Control.SelectFeature(kmlLayer); kmlLayer.events.on({ "featureselected": onFeatureSelect, "featureunselected": onFeatureUnselect }); map.addControl(selectControl); selectControl.activate(); function onPopupClose(evt) { selectControl.unselectAll(); } function onFeatureSelect(event) { var feature = event.feature; var detail = feature.attributes['description']; var content = "
"+ feature.attributes.name + "
" + detail + "
"; popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), new OpenLayers.Size(100,100), content, null, true, onPopupClose); popup.border = '1px solid black'; popup.opacity = .7; popup.panMapIfOutOfView = true; 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; } } } This is my kml code: Vannstandsmålere 1 Andenes Lokalitet:
Breddegrad: 69°19' N.
Lengdegrad: 16°09' E.

Vannstandsmåleren er plassert på trafikk- og allmenningskai, ikke langt fra Andøy Havnevesen (Hamnegata 71).

http://vannweb/joomla/index.php?option=com_content&view=article&Itemid=73&id=88%3Avannstandsmalere-andenes Les mer

]]>
#both 16.133909,69.326158
Bergen Lokalitet:
Breddegrad: 60°24' N.
Lengdegrad: 05°18' E.

Vannstandsmåleren er plassert mellom Bradbenken og Dreggekaien i Vågen i Bergen sentrum.

http://vannweb/joomla/index.php?option=com_content&view=article&Itemid=73&id=87%3Avannstandsmalere-bergen Les mer

]]>
#neither 5.320493,60.398053
Any help would be appreciated.:-( Thanks -- View this message in context: http://n2.nabble.com/Firefox-popup-feature-attribute-undefined-tp4131261p4131261.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jgolinowski at codematix.de Tue Dec 8 04:01:20 2009 From: jgolinowski at codematix.de (Jana Golinowski) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] GetFeatureInfo works in IE, not FF, beginner wonders why. In-Reply-To: <1260202230600-4126790.post@n2.nabble.com> References: <1259919712635-4111448.post@n2.nabble.com> <4B18EB4F.10000@codematix.de> <1260180245106-4125164.post@n2.nabble.com> <1260202230600-4126790.post@n2.nabble.com> Message-ID: <4B1E15E0.50607@codematix.de> > Hmm, well, I installed Apache and let it run on localhost:8080, and let it > host my OL html page. > As long as GeoServer is running that port however, the Apache-hosted html is > unreachable, which I guess is logical :p Same port = collision, different > ports = browser policy breach. > > I think http://faq.openlayers.org/proxyhost/all/ would help, but I'm unsure > how to employ it: Download script, put into /apache/cgi-bin; edit OL html > page = add "OpenLayers.ProxyHost = "/../cgi-bin/proxy.cgi?url=";" as > seemingly instructed, attempt to access > http://yourdomain.example.com/cgi-bin/proxy.cgi - 404. > > I'll ponder this for a bit, for surely they must run on different ports to > begin with? Run your Apache on port 80 and take a look at Apache's mod_jk. That way you can make Apache redirect the requests to your Tomcat. Greetings, Jana. From igrcic at gmail.com Tue Dec 8 04:25:43 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> <52cf5e870912071430q66da6e37t22e847df9139aa00@mail.gmail.com> <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> Message-ID: What does your firebug say? On Tue, Dec 8, 2009 at 10:24 AM, Haftish 21 wrote: > Thanks for your quick replies ivan... > > Well, this also doesn't seem to change anything. I think this @least should > show me up sth. but, when I check the layer on & off, nothing seems to > respond. What other reason could cause this problem??? > >> >> var saveStrategy = new OpenLayers.Strategy.Save(); >> ethRoads = new OpenLayers.Layer.Vector("Roads WFS-T", { >> >> strategies: [new OpenLayers.Strategy.BBOX()], > > >> >> protocol: new OpenLayers.Protocol.WFS({ >> version:?????? "1.0.0", >> ? url: >> "http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map", >> featureType:?? "ethroads", >> srsName:?????? "EPSG:4326", >> featureNS:???? "http://www.opengis.net/ethroads", >> geometryName:? "roadgeom", >> ?schema: >> >> "http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map&service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=ethroads" >> ? }) >> }); >> >> oMap.addLayer(ethRoads); >> >> >> >> >> >> -- >> Ivan Grcic > > > > -- > > ?`'?.?(?`'?.?*????*?.?'??)?.?' ??) > ?(?`'?.?(?`'?.?*??*?.?'??)?.?' ??)? > ??(?`'?.?(?`'?.?**?.?'??)?.?'? ?)?? > ----==--12hsitfaHaftish21--==---- > (_?.?'?(_?.?'?*????*`'?.?_)`'? .?_) > ?(_?.?'?(_?.?'?*??*`'?.?_)`'?. ?_)? > ??(_?.?'?(_?.?'?**`'?.?_)`'?.? _)?? > -- Ivan Grcic From igrcic at gmail.com Tue Dec 8 04:58:16 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: <52cf5e870912080137w166d852aw41e59d7f88fa0e8d@mail.gmail.com> References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> <52cf5e870912071430q66da6e37t22e847df9139aa00@mail.gmail.com> <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> <52cf5e870912080137w166d852aw41e59d7f88fa0e8d@mail.gmail.com> Message-ID: Oh yeah, I remember my Vector layer hasnt worked also until I put readFormat&outputFormat params in protocol. Can you try that? Be sure you are using svn trunk version of OL protocol: new OpenLayers.Protocol.WFS({ readFormat: new OpenLayers.Format.GML(), outputFormat: "GML2", Please reply to all not only me Cheers On Tue, Dec 8, 2009 at 10:37 AM, Haftish 21 wrote: > > At first the request doesn't appear @all, but when I switch the layer on/off > once, an incomplete request (the url that only locates the config.map file) > appends at the end of all my requests sent to the server...This one > > http://localhost:8000/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map > > The server is not getting the complete request, though it's responding 200 > OK. I also saw the error log, no error is reported. Strange!!! Could that > give some clue ab the problem > -- Ivan Grcic From haftish21 at gmail.com Tue Dec 8 05:50:47 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> <52cf5e870912071430q66da6e37t22e847df9139aa00@mail.gmail.com> <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> <52cf5e870912080137w166d852aw41e59d7f88fa0e8d@mail.gmail.com> Message-ID: <52cf5e870912080250sb89f357g3e2e8b60e3d4e0c@mail.gmail.com> I'm using the latest OL version from http://openlayers.org/api/OpenLayers.js. BTW, the request the server is getting is: POST http://localhost:8000/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map if I edit sth, it changes to: GET http://openlayers.org/dev/lib/Firebug/firebug.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091208/fc156ca7/attachment.html From igrcic at gmail.com Tue Dec 8 06:37:15 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: <52cf5e870912080250sb89f357g3e2e8b60e3d4e0c@mail.gmail.com> References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> <52cf5e870912071430q66da6e37t22e847df9139aa00@mail.gmail.com> <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> <52cf5e870912080137w166d852aw41e59d7f88fa0e8d@mail.gmail.com> <52cf5e870912080250sb89f357g3e2e8b60e3d4e0c@mail.gmail.com> Message-ID: Try taking trunk http://openlayers.org/dev/OpenLayers.js (or nightly http://dev.openlayers.org/nightly/OpenLayers.js) BTW you have proxy working right? On Tue, Dec 8, 2009 at 11:50 AM, Haftish 21 wrote: > > I'm using the latest OL version from > http://openlayers.org/api/OpenLayers.js. BTW, the request the server is > getting is: > > POST > http://localhost:8000/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Eth/config.map > if I edit sth, it changes to: > GET http://openlayers.org/dev/lib/Firebug/firebug.html > -- Ivan Grcic From haftish21 at gmail.com Tue Dec 8 06:45:21 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> <52cf5e870912071430q66da6e37t22e847df9139aa00@mail.gmail.com> <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> <52cf5e870912080137w166d852aw41e59d7f88fa0e8d@mail.gmail.com> <52cf5e870912080250sb89f357g3e2e8b60e3d4e0c@mail.gmail.com> Message-ID: <52cf5e870912080345n61a82d47vd5f843f1a0ce861f@mail.gmail.com> Dear Ivan, I'm getting the similar stuff with Trunk/nightly too... Yeha! I've already a working proxy. My OpenLayers.Layer.WFS, OpenLayers.Layer.WMS & OpenLayers.Layer.Mapserver codes are working well, for example. On Tue, Dec 8, 2009 at 12:37 PM, Ivan Grcic wrote: > Try taking trunk http://openlayers.org/dev/OpenLayers.js (or nightly > http://dev.openlayers.org/nightly/OpenLayers.js) > > BTW you have proxy working right? > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091208/ccf8f7e9/attachment.html From haftish21 at gmail.com Tue Dec 8 06:51:20 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: <52cf5e870912080345n61a82d47vd5f843f1a0ce861f@mail.gmail.com> References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> <52cf5e870912071430q66da6e37t22e847df9139aa00@mail.gmail.com> <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> <52cf5e870912080137w166d852aw41e59d7f88fa0e8d@mail.gmail.com> <52cf5e870912080250sb89f357g3e2e8b60e3d4e0c@mail.gmail.com> <52cf5e870912080345n61a82d47vd5f843f1a0ce861f@mail.gmail.com> Message-ID: <52cf5e870912080351vee12774lf7af8340aea19fd7@mail.gmail.com> Lately, the server is getting GET http://openlayers.org/dev/lib/Firebug/firebug.html request from openlayers.org instead, which doesn't have any content in it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091208/cf7b27a8/attachment.html From haftish21 at gmail.com Tue Dec 8 07:09:41 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: <52cf5e870912080351vee12774lf7af8340aea19fd7@mail.gmail.com> References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> <52cf5e870912080137w166d852aw41e59d7f88fa0e8d@mail.gmail.com> <52cf5e870912080250sb89f357g3e2e8b60e3d4e0c@mail.gmail.com> <52cf5e870912080345n61a82d47vd5f843f1a0ce861f@mail.gmail.com> <52cf5e870912080351vee12774lf7af8340aea19fd7@mail.gmail.com> Message-ID: <52cf5e870912080409i694bfc78wed22ef02e526dbb8@mail.gmail.com> OMG, thanks ivan for you patience...You know what? I should have added a single slash at the end of my NS, like: featureNS: "http://www.opengis.net/ethroads/" Everything is now working well. Is that a must to add this slash or what??? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091208/c652b5dd/attachment.html From bartvde at osgis.nl Tue Dec 8 07:20:59 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] my vector layer doesn't display In-Reply-To: <52cf5e870912080409i694bfc78wed22ef02e526dbb8@mail.gmail.com> References: <52cf5e870912071249n328260d4ycd4688f0100cabb3@mail.gmail.com> <52cf5e870912080124r45902dddld2f615c5ac66ffae@mail.gmail.com> <52cf5e870912080137w166d852aw41e59d7f88fa0e8d@mail.gmail.com> <52cf5e870912080250sb89f357g3e2e8b60e3d4e0c@mail.gmail.com> <52cf5e870912080345n61a82d47vd5f843f1a0ce861f@mail.gmail.com> <52cf5e870912080351vee12774lf7af8340aea19fd7@mail.gmail.com> <52cf5e870912080409i694bfc78wed22ef02e526dbb8@mail.gmail.com> Message-ID: <41797.145.50.39.11.1260274859.squirrel@webmail.hostingdiscounter.nl> Whether or not it's a must, depends on what your WFS server advertizes in the xmlns part (on the root element) of the GML response. It must match exactly. Best regards, Bart > OMG, thanks ivan for you patience...You know what? I should have added a > single slash at the end of my NS, like: > > featureNS: "http://www.opengis.net/ethroads/" > > Everything is now working well. Is that a must to add this slash or > what??? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From hbadenhorst at hotmail.com Tue Dec 8 10:27:23 2009 From: hbadenhorst at hotmail.com (Herman Badenhorst) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Select multiple features Message-ID: Hi there. I would like to select multiple features out of the wms layer when i click or click and drag a rectangle on the map. The results/attributes must display in a popup table or somewhere on the page with a radio button where the user then can select the correct feature and submit to another page. How would i go about doing this? Regards, Herman From yves.moisan at boreal-is.com Tue Dec 8 11:33:43 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events Message-ID: <1260290023.4337.26.camel@yves-laptop> Hi List, I'm trying to wrap my head around OpenLayers events. Here's code that works if I uncomment the first line (alert) : // alert("Highlight on") function selectFeature(layer, fid) { for(var i = 0; i 0) { var bounds = oFeatures[0].geometry.getBounds(); // next line works if alert is "on" // selectFeature(layers[0],oFeatures[0].fid); // how do I register an event to wait until layer ends loading ? Tried variations of the following commands : // MyMap.events.register("zoomend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); // layer.events.register("loadend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); ... Problem is if I don't leave enough time for the layer to load, my selectFeature function doesn't work. I've seen there are different event types on different OL objects, so I tried registering events on the map and the layer objects (e.g. above), but obviously I do not understand how the event mechanism works. Any tutorial on events that could help me understand events ? TIA, Yves From jrubiando at gmail.com Tue Dec 8 12:22:54 2009 From: jrubiando at gmail.com (Lammie Jonson) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] styling related question Message-ID: <1f161f9d0912080922n7c58364akad28ddf9c657544f@mail.gmail.com> I have some functionality where the user clicks on some shapes displayed through WFS. The click then propogates to the server and it sends back info to the client on how to makes those shapes appear as highlighted by simply displaying them in a different set of layers. These layers have been styled with blue, red, or green colors. I worked out this from some examples, but the question is if there was a better way to do this. For one thing, do I need a background layer to style an object or can that object style itself ? The functions below are in the init() function and when the data comes back from the server it will get passed to highlight_tiles() farther below. I did not have much luck styling the WFS object either as I wanted to see if I could get it to display some other color besides the default yellow. I didn't put the WFS code in here to see however .. //-------------------------------------- function get_style(color,opacity,sel_color) { if (sel_color == null){ sel_color = "#0000FF"; } var sty = new OpenLayers.StyleMap({ 'default' : new OpenLayers.Style({ fillColor: color ,fillOpacity: opacity ,pointRadius: 4 ,strokeColor: color ,strokeWidth: 2 }) ,'select': new OpenLayers.Style({ fillColor: sel_color ,fillOpacity: 0.4 ,strokeColor: sel_color })}); return(sty); } sel_vectors = new Array(); var sel_vecstyles = new Array(); vec_colors = ['BLUE','GREEN','RED']; for (var i = 0; i < vec_colors.length; i++) { var vstyle = get_style(vec_colors[i],1.0); var vec = new OpenLayers.Layer.Vector(vec_colors[i] + " Vector", { styleMap: vstyle } ); sel_vectors[i] = vec; map.addLayer(sel_vectors[i]); } // ---------------------------------- function highlight_tiles(geo_ar) { for (var i=0;i Hello list, I was trying to get map data stored in GeoServer 2.0 to my web page using WFS layer. Actually I was trying to top a WFS layer on a google map layer. How can I achieve that? Please help me. Regards, damith -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091208/cf1e3e29/attachment.html From scott.lewis at nsidc.org Tue Dec 8 12:52:49 2009 From: scott.lewis at nsidc.org (Scott Lewis) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: <1260290023.4337.26.camel@yves-laptop> References: <1260290023.4337.26.camel@yves-laptop> Message-ID: <4B1E9271.5000709@nsidc.org> Can you provide the code where the layer is created and added to the map? I think from there, I can help show you how to add a listener to the layer to call a method when it's done loading. Yves Moisan wrote: > Hi List, > > I'm trying to wrap my head around OpenLayers events. Here's code that > works if I uncomment the first line (alert) : > > // alert("Highlight on") > > function selectFeature(layer, fid) > { > for(var i = 0; i { > if (layer.features[i].fid == fid) > { > FeatureSelectControl.select(layer.features[i]); > break; > } > } > } > > FeatureSelectControl = new OpenLayers.Control.SelectFeature( layers[0], {}); > MyMap.addControl(FeatureSelectControl); > > FeatureSelectControl.activate(); > > if(oFeatures && oFeatures.length > 0) > > { > var bounds = oFeatures[0].geometry.getBounds(); > > // next line works if alert is "on" > // selectFeature(layers[0],oFeatures[0].fid); > > // how do I register an event to wait until layer ends loading ? Tried variations of the following commands : > > // MyMap.events.register("zoomend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); > // layer.events.register("loadend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); > > ... > > Problem is if I don't leave enough time for the layer to load, my > selectFeature function doesn't work. > > I've seen there are different event types on different OL objects, so I > tried registering events on the map and the layer objects (e.g. above), > but obviously I do not understand how the event mechanism works. Any > tutorial on events that could help me understand events ? > > TIA, > > Yves > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From yves.moisan at boreal-is.com Tue Dec 8 14:03:52 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: <4B1E9271.5000709@nsidc.org> References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> Message-ID: <1260299032.4337.52.camel@yves-laptop> > Can you provide the code where the layer is created and added to the > map? Hi Scott, There isn't much more to it other than : objOptions = {}; objOptions['projection'] = new OpenLayers.Projection("EPSG:900913"); objOptions['isBaseLayer'] =false; objOptions["protocol"] = new mapfish.Protocol.MapFish({ url: mapfish.Util.formatURL(strURL), params: {format: "GeoJSON"}, format: new OpenLayers.Format.GeoJSON() }); objOptions["styleMap"] = ... strLayerName = "SomeName"; objOLLayer = new OpenLayers.Layer.Vector(strLayerName, objOptions ); oMap.addLayer(objOLLayer); > I think from there, I can help show you how to add a listener to the layer to call a method when it's done loading. I thought MyMap.events.register("loadend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); was effectively adding the selectFeature function as a listener to the loadend event ? Maybe one thing that makes things more complex is that the JS is generated from an XSLT template. Here's the generated code : function zoomInitialViewCallback(response) { var oFormat = new OpenLayers.Format.GeoJSON(); var oFeatures = oFormat.read(response.responseText); var layers = objGPWidgetDefaultMap.getLayersByResource("Resource_Dumping_Site","featureserver"); //alert("Highlight on") function selectFeature(layer, fid) { for(var i = 0; i 0) { var bounds = oFeatures[0].geometry.getBounds(); selectFeature(layers[0],oFeatures[0].fid); for(var i = 1; i 0) { var strSeparator = (strURL.indexOf('?') > -1) ? '&' : '?'; strURL += strSeparator + strParams; } OpenLayers.loadURL(strURL, '', null, zoomInitialViewCallback); } //end zoomInitialViewOnFeature zoomInitialViewOnFeature("1"); So it's the zoomInitialViewOnFeature that is called which then calls zoomInitialViewCallback. Should the listener be defined on zoomInitialViewCallback from within zoomInitialViewOnFeature ? TIA, Yves > > Yves Moisan wrote: > > Hi List, > > > > I'm trying to wrap my head around OpenLayers events. Here's code that > > works if I uncomment the first line (alert) : > > > > // alert("Highlight on") > > > > function selectFeature(layer, fid) > > { > > for(var i = 0; i > { > > if (layer.features[i].fid == fid) > > { > > FeatureSelectControl.select(layer.features[i]); > > break; > > } > > } > > } > > > > FeatureSelectControl = new OpenLayers.Control.SelectFeature( layers[0], {}); > > MyMap.addControl(FeatureSelectControl); > > > > FeatureSelectControl.activate(); > > > > if(oFeatures && oFeatures.length > 0) > > > > { > > var bounds = oFeatures[0].geometry.getBounds(); > > > > // next line works if alert is "on" > > // selectFeature(layers[0],oFeatures[0].fid); > > > > // how do I register an event to wait until layer ends loading ? Tried variations of the following commands : > > > > // MyMap.events.register("zoomend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); > > // layer.events.register("loadend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); > > > > ... > > > > Problem is if I don't leave enough time for the layer to load, my > > selectFeature function doesn't work. > > > > I've seen there are different event types on different OL objects, so I > > tried registering events on the map and the layer objects (e.g. above), > > but obviously I do not understand how the event mechanism works. Any > > tutorial on events that could help me understand events ? > > > > TIA, > > > > Yves > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users From jrubiando at gmail.com Tue Dec 8 15:32:09 2009 From: jrubiando at gmail.com (Lammie Jonson) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Cannot see WFS layer Message-ID: <1f161f9d0912081232v52dc3c40k94792a952c66f0ab@mail.gmail.com> // Here's is how I did this. // You need to use the openlayers proxy: OpenLayers.ProxyHost="proxy.cgi?url="; // WFS layer points to geoserver or your host state_layer = new OpenLayers.Layer.WFS( "States WFS", "http://yourhost:8080/geoserver/wfs", { typename: 'topp:states'} ); =============== I'm using rails, so I create a sort of fake proxy in config/routes.rb map.connect '/proxy.cgi', :controller => 'wfs', :action => 'myproxy' Then inside the myproxy() action: if url =~ /geoserver/ # geo server WFS data uri = URI.parse(url) resp = Net::HTTP.get_response(uri) send_data(resp.body, :type => 'text/xml') end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091208/22ffbd19/attachment.html From igrcic at gmail.com Tue Dec 8 15:55:54 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Select multiple features In-Reply-To: References: Message-ID: http://openlayers.org/dev/examples/getfeature-wfs.html On Tue, Dec 8, 2009 at 4:27 PM, Herman Badenhorst wrote: > Hi there. I would like to select multiple features out of the wms > layer when i click or click and drag a rectangle on the map. The > results/attributes must display in a popup table or somewhere on the > page with a radio button where the user then can select the correct > feature and submit to another page. > > How would i go about doing this? > > Regards, > Herman > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From yves.moisan at boreal-is.com Tue Dec 8 16:09:21 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: <1260299032.4337.52.camel@yves-laptop> References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> Message-ID: <1260306561.4337.63.camel@yves-laptop> > I thought > > MyMap.events.register("loadend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); > I at least learned that a loadend is only registerable on a layer, so : layers[0].events.register("loadend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); It still does not show anything though. However, just to test that I did get a loadend event, I tried : layers[0].events.register("loadend", layers[0], function() {alert("Highlight on"); }); And I got the alert, so it means the loadend event is triggered. Why my function call does not work is beyond me. TIA, Yves From woodbri at swoodbridge.com Tue Dec 8 16:37:56 2009 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: <1260306561.4337.63.camel@yves-laptop> References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> Message-ID: <4B1EC734.9000700@swoodbridge.com> Yves Moisan wrote: >> I thought >> >> MyMap.events.register("loadend", layers[0], selectFeature(layers[0],oFeatures[0].fid)); >> > > I at least learned that a loadend is only registerable on a layer, so : > > layers[0].events.register("loadend", layers[0], > selectFeature(layers[0],oFeatures[0].fid)); > > It still does not show anything though. However, just to test that I > did get a loadend event, I tried : > > layers[0].events.register("loadend", layers[0], function() > {alert("Highlight on"); }); > > And I got the alert, so it means the loadend event is triggered. Why my > function call does not work is beyond me. Try calling your select function using a timer delay from loadend event. I have found that sometimes events fire but the thread adding stuff to the DOM or something like that has not completed yet and adding a 30-50ms delay before calling my code solved the problem. Yeah, I know it ugly, but give it a try and see if it helps. -Steve W From yves.moisan at boreal-is.com Tue Dec 8 17:03:05 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: <4B1EC734.9000700@swoodbridge.com> References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> Message-ID: <1260309785.4337.87.camel@yves-laptop> > > Try calling your select function using a timer delay from loadend event. I tried looking for examples. I saw the obvious controls for which a delay makes sense (hover, WMSGetFeatureInfo) but I didn't find a way to set a delay in some arbitrary location in the code. setTimer, timer ? However, it pretty much defeats the purpose of waiting for loadend if one adds a delay on top of it. Thanx, Yves > I have found that sometimes events fire but the thread adding stuff to > the DOM or something like that has not completed yet and adding a > 30-50ms delay before calling my code solved the problem. > > Yeah, I know it ugly, but give it a try and see if it helps. > > -Steve W From tspradley at snoogems.com Tue Dec 8 17:24:44 2009 From: tspradley at snoogems.com (Ted Spradley) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers vs Mapserver layer rendering order Message-ID: <1260311084407-4135864.post@n2.nabble.com> Hi all! My OL map layer renders my MapServer layers not in the (expected) order of the map file. The MapServer layer that I would like 'last' or 'on top' is 'zip_codes'. I have placed it first, various places in the middle, and last in the OpenLayer addLayers call and it doesn't seem to make a difference. The MS layers 'tl_edges_..' are always drawn on top of 'zip_codes'. In my map file, 'zip_codes' is last and drawn last when rendered directly from MapServer. How does the OpenLayers rendering of layer order differ from calling MapServer directly in the url? Thanks in advance! Ted S. /* Openlayers Layer */ var tl_us_county_48201 = new OpenLayers.Layer.WMS( "Counties", "http://url.com/cgi-bin/mapserv?", { map: "/path/to/cad.map", maxExtent: new OpenLayers.Bounds(2928849.796040,13748390.427723,3269286.273267,13992542.754455), numZoomLevels: 20, isBaseLayer: "true", projection: new OpenLayers.Projection("EPSG:2278"), maxResolution: "auto", maxScale: 70000, units: "ft", 'layers': "zip_codes,countries,tl_edges_3,tl_edges_2,tl_edges_1,tl_edges_0,tl_edges_00,parcels,row_annotation"} ); -- View this message in context: http://n2.nabble.com/OpenLayers-vs-Mapserver-layer-rendering-order-tp4135864p4135864.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From woodbri at swoodbridge.com Tue Dec 8 17:26:26 2009 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: <1260309785.4337.87.camel@yves-laptop> References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> <1260309785.4337.87.camel@yves-laptop> Message-ID: <4B1ED292.6070804@swoodbridge.com> Yves Moisan wrote: >> Try calling your select function using a timer delay from loadend event. > > I tried looking for examples. I saw the obvious controls for which a > delay makes sense (hover, WMSGetFeatureInfo) but I didn't find a way to > set a delay in some arbitrary location in the code. setTimer, timer ? Wrap your selectFeature() in a setTimer() > However, it pretty much defeats the purpose of waiting for loadend if > one adds a delay on top of it. Yes and no, it gets you closer to the time that you need so there less likely going to be a problem with you setting a delay, that may get impacted by a garbage collection of some other thing making the sensitivity of when you can fire the selectFeature. Maybe is doesn't help, but try it and see if it solves the problem. Maybe someone needs to file a bug against the loadend event. I don't like the answer, but if is works you have another data point that might lead someone to fix the problem once and for all. ;) -Steve > Thanx, > > Yves > >> I have found that sometimes events fire but the thread adding stuff to >> the DOM or something like that has not completed yet and adding a >> 30-50ms delay before calling my code solved the problem. >> >> Yeah, I know it ugly, but give it a try and see if it helps. >> >> -Steve W > From igrcic at gmail.com Tue Dec 8 18:06:34 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: <4B1ED292.6070804@swoodbridge.com> References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> <1260309785.4337.87.camel@yves-laptop> <4B1ED292.6070804@swoodbridge.com> Message-ID: Hi, On Tue, Dec 8, 2009 at 11:26 PM, Stephen Woodbridge wrote: > Yves Moisan wrote: >>> Try calling your select function using a timer delay from loadend event. >> >> I tried looking for examples. ?I saw the obvious controls for which a >> delay makes sense (hover, WMSGetFeatureInfo) but I didn't find a way to >> set a delay in some arbitrary location in the code. ?setTimer, timer ? > > Wrap your selectFeature() in a setTimer() > Using delay is very wrong thing to do with events. Never use that. Wrap your function in anonymous instead. BTW map doesnt have loadend event but on vector layer http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.EVENT_TYPES http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.EVENT_TYPES layers[0].events.register("loadend", layers[0], function(evt){ //do what you have to do here... selectFeature(layers[0],oFeatures[0].fid)); }); Cheers >> However, it pretty much defeats the purpose of waiting for loadend if >> one adds a delay on top of it. > > Yes and no, it gets you closer to the time that you need so there less > likely going to be a problem with you setting a delay, that may get > impacted by a garbage collection of some other thing making the > sensitivity of when you can fire the selectFeature. > > Maybe is doesn't help, but try it and see if it solves the problem. > Maybe someone needs to file a bug against the loadend event. > > I don't like the answer, but if is works you have another data point > that might lead someone to fix the problem once and for all. ;) > > -Steve > >> Thanx, >> >> Yves >> >>> I have found that sometimes events fire but the thread adding stuff to >>> the DOM or something like that has not completed yet and adding a >>> 30-50ms delay before calling my code solved the problem. >>> >>> Yeah, I know it ugly, but give it a try and see if it helps. >>> >>> -Steve W >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From woodbri at swoodbridge.com Tue Dec 8 20:49:17 2009 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> <1260309785.4337.87.camel@yves-laptop> <4B1ED292.6070804@swoodbridge.com> Message-ID: <4B1F021D.7080805@swoodbridge.com> Ivan Grcic wrote: > Hi, > > On Tue, Dec 8, 2009 at 11:26 PM, Stephen Woodbridge > wrote: >> Yves Moisan wrote: >>>> Try calling your select function using a timer delay from loadend event. >>> I tried looking for examples. I saw the obvious controls for which a >>> delay makes sense (hover, WMSGetFeatureInfo) but I didn't find a way to >>> set a delay in some arbitrary location in the code. setTimer, timer ? >> Wrap your selectFeature() in a setTimer() >> > Using delay is very wrong thing to do with events. Never use that. > Wrap your function in anonymous instead. > > BTW map doesnt have loadend event but on vector layer > http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.EVENT_TYPES > http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.EVENT_TYPES Yves, Is oFeatures a global var? What happens if your add: > layers[0].events.register("loadend", layers[0], function(evt){ > //do what you have to do here... alert(Features[0].fid); > selectFeature(layers[0],oFeatures[0].fid)); > }); Does this show the variable? does it highlight after you close the alert box? -Steve > Cheers >>> However, it pretty much defeats the purpose of waiting for loadend if >>> one adds a delay on top of it. >> Yes and no, it gets you closer to the time that you need so there less >> likely going to be a problem with you setting a delay, that may get >> impacted by a garbage collection of some other thing making the >> sensitivity of when you can fire the selectFeature. >> >> Maybe is doesn't help, but try it and see if it solves the problem. >> Maybe someone needs to file a bug against the loadend event. >> >> I don't like the answer, but if is works you have another data point >> that might lead someone to fix the problem once and for all. ;) >> >> -Steve >> >>> Thanx, >>> >>> Yves >>> >>>> I have found that sometimes events fire but the thread adding stuff to >>>> the DOM or something like that has not completed yet and adding a >>>> 30-50ms delay before calling my code solved the problem. >>>> >>>> Yeah, I know it ugly, but give it a try and see if it helps. >>>> >>>> -Steve W >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > From mynature at gmail.com Wed Dec 9 02:20:26 2009 From: mynature at gmail.com (Adorian Ardelean) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] registering featuremodified In-Reply-To: References: Message-ID: <4B1F4FBA.3090804@gmail.com> Hi, I am trying to register a "featuremodified" event to a vector layers containing a feature built from a GeoJSON file. For registering event, I have used both methods below: trails.events.register('featuremodified', '',serialize); or trails.events.on({featuremodified: function(feature){alert(feature.id)}}); serialize = function (feature) { alert(feature.id); } In both cases I receive an "undefined" in message box. Could somebody guide me on how this event should be registered so that I can get access to feature data? Best regards, Adorian From eric.lemoine at camptocamp.com Wed Dec 9 02:35:45 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] event model and event propagation In-Reply-To: <49637.193.123.16.70.1260260973.squirrel@dp2642.force9.co.uk> References: <1259331630271-4075933.post@n2.nabble.com> <1259571573270-4086390.post@n2.nabble.com> <4B138CFB.1030104@opengeo.org> <4B1DEAAD.9000900@pinan.co.uk> <49637.193.123.16.70.1260260973.squirrel@dp2642.force9.co.uk> Message-ID: On Tue, Dec 8, 2009 at 9:29 AM, David Potts wrote: > > > I have a map image with a WMSGetFeatureInfo control and > > OpenLayers. Marker.Box object with a click handle registered on it. > > The WMSGetFeature control is added first, the box object does not inserect > any feature on the WMS layer. > > when ever I click on the map, the wms control is in invoked, the click > handler on the box feature never gets invoked. > > Q. ?Is this the expected behaivour? > > I had expected that events would be routed through to the click handler on > the box object instead the wms control seems to "eat all" the events. Hi. Have you made sure that clicks on the box do work when the WMSGetFeatureInfo control isn't activated? -- 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 Dec 9 02:39:20 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] registering featuremodified In-Reply-To: <4B1F4FBA.3090804@gmail.com> References: <4B1F4FBA.3090804@gmail.com> Message-ID: On Wed, Dec 9, 2009 at 8:20 AM, Adorian Ardelean wrote: > Hi, > > I am trying to register a "featuremodified" event to a vector layers > containing a feature built from a GeoJSON file. > > For registering event, I have used both methods below: > > trails.events.register('featuremodified', '',serialize); > or > trails.events.on({featuremodified: > function(feature){alert(feature.id)}}); > > > serialize = function (feature) > { > ? ?alert(feature.id); > } > > In both cases I receive an "undefined" in message box. > > Could somebody guide me on how this event should be registered so that I > can get access to feature data? try: var serialize = function(e) { alert(e.feature.id); }; 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 mynature at gmail.com Wed Dec 9 03:15:41 2009 From: mynature at gmail.com (Adorian Ardelean) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] registering featuremodified In-Reply-To: References: <4B1F4FBA.3090804@gmail.com> Message-ID: it worked! thanks! Cheers, Adorian http://mybiosis.info On Wed, Dec 9, 2009 at 9:39 AM, Eric Lemoine wrote: > On Wed, Dec 9, 2009 at 8:20 AM, Adorian Ardelean > wrote: > > Hi, > > > > I am trying to register a "featuremodified" event to a vector layers > > containing a feature built from a GeoJSON file. > > > > For registering event, I have used both methods below: > > > > trails.events.register('featuremodified', '',serialize); > > or > > trails.events.on({featuremodified: > > function(feature){alert(feature.id)}}); > > > > > > serialize = function (feature) > > { > > alert(feature.id); > > } > > > > In both cases I receive an "undefined" in message box. > > > > Could somebody guide me on how this event should be registered so that I > > can get access to feature data? > > try: > > var serialize = function(e) { > alert(e.feature.id); > }; > > 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/20091209/4ce7a05d/attachment.html From eric.lemoine at camptocamp.com Wed Dec 9 03:33:12 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] registering featuremodified In-Reply-To: References: <4B1F4FBA.3090804@gmail.com> Message-ID: On Wed, Dec 9, 2009 at 9:15 AM, Adorian Ardelean wrote: > it worked! thanks! for the record, here's what the API doc says: "Listeners will receive an object with a feature property referencing the selected feature." 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 amarasenadamith at gmail.com Wed Dec 9 04:04:55 2009 From: amarasenadamith at gmail.com (Damith Amarasena) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Cannot see WFS layer In-Reply-To: <1f161f9d0912081232v52dc3c40k94792a952c66f0ab@mail.gmail.com> References: <1f161f9d0912081232v52dc3c40k94792a952c66f0ab@mail.gmail.com> Message-ID: <412506e70912090104i3ed2b86cj71ffb2daa2056d0@mail.gmail.com> Hi Lammie, Thanks for your reply. You have mentioned about a proxy here. Does that mean I have to use one? Sorry if you feel this as a dumb question, but I'm new to openlayers and whole GIS stuff. Please guide me on this. Regards, damith On Wed, Dec 9, 2009 at 2:02 AM, Lammie Jonson wrote: > // Here's is how I did this. > > // You need to use the openlayers proxy: > > OpenLayers.ProxyHost="proxy.cgi?url="; > > // WFS layer points to geoserver or your host > > state_layer = new OpenLayers.Layer.WFS( "States WFS", > "http://yourhost:8080/geoserver/wfs", > { typename: 'topp:states'} ); > > =============== > > I'm using rails, so I create a sort of fake proxy in config/routes.rb > > map.connect '/proxy.cgi', > :controller => 'wfs', > :action => 'myproxy' > > Then inside the myproxy() action: > > if url =~ /geoserver/ > # geo server WFS data > uri = URI.parse(url) > resp = Net::HTTP.get_response(uri) > send_data(resp.body, :type => 'text/xml') > end > > _______________________________________________ > 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/20091209/e707d589/attachment.html From chove at crans.org Wed Dec 9 07:14:14 2009 From: chove at crans.org (=?ISO-8859-1?Q?Etienne_Chov=E9?=) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Control display In-Reply-To: <4B1D6B3C.2070500@crans.org> References: <4B1D6B3C.2070500@crans.org> Message-ID: <4B1F9496.9040308@crans.org> Etienne Chov? a ?crit : > Hi, > > I've two question about controls: > 1. How to move control to botom left I'd like to move only attribution control > 2. How to remove blank line between Attribution and Mouse position > > http://osmose.openstreetmap.fr/clc/cgi-bin/index.py > > Thanks No idea ? -- Etienne From rifins at gmail.com Wed Dec 9 07:24:53 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Draw line vector, with points.. Message-ID: Hi, What is the best way to draw a line with WFS Vector, which is stored in WKT POINT instead of LINESTRING? It draws separate points, what is the best way to draw a line between each point? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091209/fb89ff82/attachment.html From bartvde at osgis.nl Wed Dec 9 08:02:08 2009 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Trac spam? Message-ID: <2E70A79A-C84F-4F98-AEE7-D1DE86AD547A@osgis.nl> Hmm some of our content has been hacked: http://faq.openlayers.org/svn/how-do-i-create-my-own-sandbox-in-the-svn-repository/ hPwA3f pzltdllggoef, [url=http://rhryrkmskufo.com/]rhryrkmskufo[/url], [link=http://cepqljnizumv.com/]cepqljnizumv[/link], http://hgtylxudcrjt.com/ 0 out of 0 people found the above answer helpful. Did you find it helpful? Yes or No Best regards, Bart -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091209/06f35f8c/attachment.html From ahocevar at opengeo.org Wed Dec 9 08:20:06 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] FAQ hacked! (was: Trac spam?) In-Reply-To: <2E70A79A-C84F-4F98-AEE7-D1DE86AD547A@osgis.nl> References: <2E70A79A-C84F-4F98-AEE7-D1DE86AD547A@osgis.nl> Message-ID: <4B1FA406.3090702@opengeo.org> There are even more, and unfortunately the FAQ does not seem to have a history of edits: http://faq.openlayers.org/map/how-do-i-edit-the-wiki-or-a-ticket/ http://faq.openlayers.org/map/iow-can-i-setcenter-only-if-there-is-no-permalink-in-url/ http://faq.openlayers.org/markers/why-is-my-map-sluggish-when-i-add-500-markers/ http://faq.openlayers.org/svn/how-do-update-my-sandbox-from-trunk/ http://faq.openlayers.org/vector-related-questions/why-cant-i-drag-the-map-when-my-mouse-is-over-a-vector-feature/ http://faq.openlayers.org/wms/openlayerswms/ Chris, I think editing access to the FAQ should be restricted. Regards, Andreas. Bart van den Eijnden wrote: > Hmm some of our content has been hacked: > > http://faq.openlayers.org/svn/how-do-i-create-my-own-sandbox-in-the-svn-repository/ > > hPwA3f pzltdllggoef, > [url=http://rhryrkmskufo.com/]rhryrkmskufo[/url > ], > [link=http://cepqljnizumv.com/]cepqljnizumv[/link > ], http://hgtylxudcrjt.com/ > > 0 out of 0 people found the above answer helpful. Did you find it > helpful? Yes > or No > > > > Best regards, > Bart > ------------------------------------------------------------------------ > > _______________________________________________ > 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 mickey at netfreaks.org Wed Dec 9 08:28:32 2009 From: mickey at netfreaks.org (mickey) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] =?utf-8?q?Map_in_nested_div_with_floating_heig?= =?utf-8?b?aHQ/?= Message-ID: Hello, I would like to place an openlayers map inside a nested div and it should have a floating height. My css is learned from several examples and it works as expected until the openlayers script comes in place. A simplyfied example:
I really appreciate any help! Best Regards, Mickey From chove at crans.org Wed Dec 9 09:13:30 2009 From: chove at crans.org (=?ISO-8859-1?Q?Etienne_Chov=E9?=) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Control display In-Reply-To: <4B1F9496.9040308@crans.org> References: <4B1D6B3C.2070500@crans.org> <4B1F9496.9040308@crans.org> Message-ID: <4B1FB08A.7030301@crans.org> solved... using theme parameter. -- Etienne From yves.moisan at boreal-is.com Wed Dec 9 09:19:04 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> <1260309785.4337.87.camel@yves-laptop> <4B1ED292.6070804@swoodbridge.com> Message-ID: <1260368344.4699.22.camel@yves-laptop> > Wrap your function in anonymous instead. > > BTW map doesnt have loadend event but on vector layer > http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.EVENT_TYPES > http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.EVENT_TYPES Yes, I noticed that after thank you. > > layers[0].events.register("loadend", layers[0], function(evt){ > //do what you have to do here... > selectFeature(layers[0],oFeatures[0].fid)); > }); layers[0].events.register("loadend", layers[0], function(){ //do what you have to do here... selectFeature(layers[0],oFeatures[0].fid);}); Works fine thanx ! I'll have to find pointers as to why putting no argument or a dummy argument in the anonymous function doesn't matter. Thanx ! And thanx Stephen too ! Yves From yves.moisan at boreal-is.com Wed Dec 9 10:13:15 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> <1260309785.4337.87.camel@yves-laptop> <4B1ED292.6070804@swoodbridge.com> Message-ID: <1260371595.4699.50.camel@yves-laptop> > Wrap your function in anonymous instead. > layers[0].events.register("loadend", layers[0], function(evt){ > //do what you have to do here... > selectFeature(layers[0],oFeatures[0].fid)); > }); > Well, the use case is a bit more complicated. I calculate initial bounds for a feature then select that feature. Then if my feature array has more than one element I iterate through it and then features don't get selected : if(oFeatures && oFeatures.length > 0) { var bounds = oFeatures[0].geometry.getBounds(); layers[0].events.register("loadend", layers[0], function(){ selectFeature(layers[0],oFeatures[0].fid); }); for(var i = 1; i References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> <1260309785.4337.87.camel@yves-laptop> <4B1ED292.6070804@swoodbridge.com> <1260371595.4699.50.camel@yves-laptop> Message-ID: On Wed, Dec 9, 2009 at 4:13 PM, Yves Moisan wrote: > >> Wrap your function in anonymous instead. > >> layers[0].events.register("loadend", layers[0], function(evt){ >> ? //do what you have to do here... >> ? ?selectFeature(layers[0],oFeatures[0].fid)); >> }); >> > > Well, the use case is a bit more complicated. ?I calculate initial > bounds for a feature then select that feature. ?Then if my feature array > has more than one element I iterate through it and then features don't > get selected : > > if(oFeatures && oFeatures.length > 0) > > { > ? ? var bounds = oFeatures[0].geometry.getBounds(); > ? ? ? ?layers[0].events.register("loadend", layers[0], function(){ > ? ? ? ?selectFeature(layers[0],oFeatures[0].fid); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }); > > ? ? ? ?for(var i = 1; i ? ? ? ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ? ? ?bounds.extend(oFeatures[i].geometry.getBounds()); > > ? ? ? ? ? ? ? ? ? ? ? ?layers[0].events.register("loadend", layers[0], function(){ > ? ? ? ? ? ? ? ? ? ? ? ? ? selectFeature(layers[0],oFeatures[i].fid);}); > > > > I guess the event is triggered only once so iterating makes no sense ? > I thought it was the case so I just called the function directly in the > for like > > selectFeature(layers[0],oFeatures[i].fid); > > but that didn't work either probably because the code gets executed > before the loadend was fired. ?Do I have to set up an explicit delay > here or somehow bubble the event ? I'm not sure I get it. Why don't you do the whole thing once the layer is loaded? layer.events.on({ scope: layer, loadend: function() { // "this" references the layer var features = this.features; // do what you need with the features // ... } }); the loadend listener need not be anonymous, you can also go with: function onLoadend() { var features = this.features; } layer.events.on({ scope: layer, loadend: onLoadend // you don't call the function here but just provide a reference to it }); Hope this makes sense, -- 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.jaenicke at gmx.de Wed Dec 9 12:07:41 2009 From: stefan.jaenicke at gmx.de (=?iso-8859-1?Q?=22Stefan_J=E4nicke=22?=) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Making WFS GetFeature Example (GeoServer) Run Message-ID: <20091209170741.72250@gmx.net> Hello everybody, I'm new in OpenLayers and I want to use the functionality that is presented in the WFS GetFeature Example (GeoServer): http://openlayers.org/dev/examples/getfeature-wfs.html How can I make this example run, when I copy the source-code in a local file on my computer? Can somebody tell me what to do? Thanks, Stefan. -- Preisknaller: GMX DSL Flatrate f?r nur 16,99 Euro/mtl.! http://portal.gmx.net/de/go/dsl02 From ahocevar at opengeo.org Wed Dec 9 12:24:21 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Making WFS GetFeature Example (GeoServer) Run In-Reply-To: <20091209170741.72250@gmx.net> References: <20091209170741.72250@gmx.net> Message-ID: <4B1FDD45.4020302@opengeo.org> 1) You need a webserver on your computer (no file:/// urls supported). 2) You need a proxy to access the demo geoserver instance, otherwise your access gets denied due to the same origin policy. Regards, Andreas. Stefan J?nicke wrote: > Hello everybody, > > I'm new in OpenLayers and I want to use the functionality that > is presented in the WFS GetFeature Example (GeoServer): > > http://openlayers.org/dev/examples/getfeature-wfs.html > > How can I make this example run, when I copy the source-code in a > local file on my computer? Can somebody tell me what to do? > > Thanks, > Stefan. > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From tspradley at snoogems.com Wed Dec 9 12:30:32 2009 From: tspradley at snoogems.com (Ted Spradley) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers vs Mapserver layer rendering order In-Reply-To: <1260311084407-4135864.post@n2.nabble.com> References: <1260311084407-4135864.post@n2.nabble.com> Message-ID: <1260379832582-4140768.post@n2.nabble.com> Ted Spradley wrote: > > > My OL map layer renders my MapServer layers not in the (expected) order of > the map file. > > The MapServer layer that I would like 'last' or 'on top' is 'zip_codes'. > I have placed it first, various places in the middle, and last in the > OpenLayer addLayers call and it doesn't seem to make a difference. The MS > layers 'tl_edges_..' are always drawn on top of 'zip_codes'. In my map > file, 'zip_codes' is last and drawn last when rendered directly from > MapServer. > > How does the OpenLayers rendering of layer order differ from calling > MapServer directly in the url? > > /* Openlayers Layer */ > > 'layers': > "zip_codes,countries,tl_edges_3,tl_edges_2,tl_edges_1,tl_edges_0,tl_edges_00,parcels,row_annotation" > > Found the answer I think. The WMS spec does state 'A WMS shall render the requested layers by drawing the leftmost in the list bottommost, the next one over that, and so on.' However, observed MapServer behavior responding to the WMS call is that if the layer STATUS is DEFAULT, then layer those layers are rendered first, in their mapfile order, then layers listed in the LAYERS parameter of the WMS call are rendered per the specification. So, the solution in my case was to change to layer STATUS ON, and the map was rendered as expected. Ted S. Ted S. -- View this message in context: http://n2.nabble.com/OpenLayers-vs-Mapserver-layer-rendering-order-tp4135864p4140768.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jimlug at co.clackamas.or.us Wed Dec 9 12:59:13 2009 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers.loadURL not working In-Reply-To: <1257938267299-3985757.post@n2.nabble.com> References: <1247222181294-3236300.post@n2.nabble.com> <4A5720DE.1000905@terrestris.de> <1247316779872-3242326.post@n2.nabble.com> <1257938267299-3985757.post@n2.nabble.com> Message-ID: <1260381553740-4140933.post@n2.nabble.com> I'm in the same boat. Has anyone figured this out yet? -- View this message in context: http://n2.nabble.com/OpenLayers-loadURL-not-working-tp3236300p4140933.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From apt94jesse at gmail.com Thu Dec 10 00:48:06 2009 From: apt94jesse at gmail.com (Jesse Bushkar) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] help with containspoint, or opposite Message-ID: Hello, I'm looking for a little help with a point moving inside and outside of a polygon. Currently I'm using the following code: -- for(var i = 0; i < OL.maps[map.id].map.layers[1].features.length; i++) { if(locationSwitch == false && OL.maps[map.id].map.layers[1].features[i].geometry.containsPoint && OL.maps[map.id].map.layers[1].features[i].geometry.containsPoint(p)) { var yourlocation = OL.maps[map.id ].map.layers[1].features[i].data.node_title; alert('now youre inside the polygon'); locationSwitchInner = true; } if(locationSwitchInner == true){ locationSwitch = true; } if(locationSwitch == true && !OL.maps[map.id].map.layers[1].features[i].geometry.containsPoint(p)) { locationSwitchInner = false; alert('you are now leaving the polygon'); } if(locationSwitchInner == false){ locationSwitch = false; } } }; -------------------------------------- Basically what I'm doing is tracking a point on a map that contains polygons. I may not have included all of the code above but the necessary items should be there. I am displaying an alert when I enter a polygon, which is working just fine. The code checks my point across (currently) 4 polygons and alerts me when I enter into one. Once I'm in one, I want to send another alert when I exit the polygon. However the code above doesn't work because in the if statement that checks if I'm not in a polygon, it checks all 4 polygons so of course 3 of them will validate because none of the polygons intersect. I guess my question is this: how can I check if my point is exiting ONLY the polygon that I'm currently in (once I'm in the polygon of course)? I am thinking that the [i] could be included in the 'if' statement looking for the exit point since it's still inside the 'for' statement, however, I'm pretty bad with my for loop understanding. Any help is greatly appreciated. Thanks in advance. Jesse -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/eceb5572/attachment.html From igrcic at gmail.com Thu Dec 10 03:31:03 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers.loadURL not working In-Reply-To: <1247316779872-3242326.post@n2.nabble.com> References: <1247222181294-3236300.post@n2.nabble.com> <4A5720DE.1000905@terrestris.de> <1247316779872-3242326.post@n2.nabble.com> Message-ID: On Sat, Jul 11, 2009 at 1:52 PM, Simo D wrote: > > Hi, the server is the same but on another port. I think it should work in > this way. Nope, it wont. You need a proxy. Cheers I use firebug and I inspected all the code with brakepoints but I > get no errors. In the page that I build is also present ext.js but I don't > use id to do the ajax request. On the server side the application runs under > django but also this shouldn't be an issue. Analysing the server response I > see that is correct (200 status code) but empty. > It's strange because on other applications it works fine. > > Thanks. > Simone. > > > Till Adams wrote: >> >> Simo, >> >> is the WMS you are requesting from another server? >> >> In this case, you should use the OL proxy-host to prevent from >> cross-scriptuing errors, >> >> Till >>> Hi list, I'm using this function "OpenLayers.loadURL(url, '', this, >>> setResponse, setResponse);" to make an getFeatureInfo on geoserver. my >>> url >>> variable is: >>> "var url = ?map.layers[2].getFullRequestString( >>> ? ? ? ? ? ? ? ? ? ? ?{ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?REQUEST: "GetFeatureInfo", >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?EXCEPTIONS: "application/vnd.ogc.se_xml", >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?BBOX: map.getExtent().toBBOX(), >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?X: e.xy.x, >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Y: e.xy.y, >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?INFO_FORMAT: 'text/plain', >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?QUERY_LAYERS: map.layers[2].params.LAYERS, >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?FEATURE_COUNT: 1, >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?srs: 'EPSG:900913', >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?layers: 'layer', >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?styles: '', >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?WIDTH: map.size.w, >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?HEIGHT: map.size.h >>> ? ? ? ? ? ? ? ? ? ? ?}, >>> " >>> >>> The query returns an empty response (looking through firebug) but if I >>> copy >>> che address in the browser bar, the response is ok. >>> >>> Have you got any ideas? >>> Thanks in avdance. >>> Simone. >>> >> >> >> -- >> ---------------------------------------------------------- >> terrestris GmbH & Co. KG >> Irmintrudisstrasse 17 >> 53111 Bonn >> Germany >> >> Till Adams >> Gesch?ftsf?hrung >> >> Tel: +49 (0)228 / 962 899-52 >> Fax: +49 (0)228 / 962 899-57 >> adams@terrestris.de http://www.terrestris.de >> Amtsgericht Bonn, HRA 6835 >> --------------------------------------------------------- >> >> Komplement?rin: >> >> terrestris Verwaltungs GmbH >> >> vertreten durch: >> Hinrich Paulsen, Till Adams >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > View this message in context: http://n2.nabble.com/OpenLayers.loadURL-not-working-tp3236300p3242326.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 jimmy.aumard at gmail.com Thu Dec 10 05:37:47 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OverviewMap with google layer possible? Message-ID: Hi, I try to put an overviewmap with google layer but when my map is under "france" the overviewmap is under the turkey :( This is my map: var bounds = new OpenLayers.Bounds(-2.003750834E7, -2.003750834E7, 2.003750834E7, 2.003750834E7); var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", maxResolution: 156543.03390625, numZoomLevels: 19, maxExtent: bounds, controls: [/*new OpenLayers.Control.KeyboardDefaults()*/] }; map = new OpenLayers.Map($('olmap'), options); And this is my overviewmap: var gphyMini = new OpenLayers.Layer.Google("Google Hybrid mini", { type: G_HYBRID_MAP, sphericalMercator: true }); var controlOptions = { mapOptions: { projection: new OpenLayers.Projection("EPSG:900913"), units: "m", maxResolution: 156543.03390625, maxExtent: new OpenLayers.Bounds(-2.003750834E7, -2.003750834E7, 2.003750834E7, 2.003750834E7) }, layers: [gphyMini] } var overview1 = new OpenLayers.Control.OverviewMap(controlOptions); map.addControl(overview1); If anyone have ideas to resolve the problem that great ! Thanks! -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/c914a6ed/attachment.html From gstopar at gmail.com Thu Dec 10 06:34:23 2009 From: gstopar at gmail.com (_greg_) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers.Feature.Vector hover + click event Message-ID: <1260444863853-4144872.post@n2.nabble.com> Hi all Is possible to recive click events and have hover turned on with OpenLayers.Control.SelectFeature ? I have two vector layers. One for draggable features and another for not draggable. I want to be able to select features from both layers (I'm using OL-2.8). Feature hover works fine and also featureselected events are ok. But I do not get click events. My code is : ... var vector1 = new OpenLayers.Layer.Vector("NotDraggableMarkers",{ isBaseLayer : false, rendererOptions : { yOrdering : true }, styleMap : this.getMarkerStyleMap() }); var vector2 = new OpenLayers.Layer.Vector("DraggableMarkers",{ isBaseLayer : false, rendererOptions : { yOrdering : true }, styleMap : this.getMarkerStyleMap() }); this.map.addLayers([vector1,vector2]); var dragFeature = new OpenLayers.Control.DragFeature(vector2); this.map.addControl(dragFeature); dragFeature.activate(); var select = new OpenLayers.Control.SelectFeature([vector1,vector2],{ hover : true, highlightOnly : false }); this.map.addControl(select); select.events.on({ "featurehighlighted" : this.high, "click" : this.click }); ... Is there any way to do this ? Any ideas ? Thanks. -- View this message in context: http://n2.nabble.com/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4144872.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dalda at ikt.es Thu Dec 10 07:13:15 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Problems displaying WMS raster layer via TileCache.py and OpenLayers Message-ID: <224DBDAF88A6AC47BD22432815351BE0079D036E@nekaposta1> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 790 bytes Desc: logo.gif Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/582080e6/attachment.gif From igrcic at gmail.com Thu Dec 10 07:18:11 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers.Feature.Vector hover + click event In-Reply-To: <1260444863853-4144872.post@n2.nabble.com> References: <1260444863853-4144872.post@n2.nabble.com> Message-ID: Hi, selectFeature doesnt have click event: http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Control/SelectFeature-js.html#OpenLayers.Control.SelectFeature.EVENT_TYPES Defining callback for click should work though OpenLayers.Control.SelectFeature([vector1,vector2],{ hover : true, highlightOnly : false, callbacks: { click : function (feat){ // do what you want here } } }); ); Cheers On Thu, Dec 10, 2009 at 12:34 PM, _greg_ wrote: > > Hi all > > Is possible to recive click events and have hover turned on with > OpenLayers.Control.SelectFeature ? > I have two vector layers. One for draggable features and another for not > draggable. > I want to be able to select features from both layers (I'm using OL-2.8). > Feature hover works fine and ?also featureselected events are ok. But I do > not get click events. > > My code is : > ... > var vector1 = new OpenLayers.Layer.Vector("NotDraggableMarkers",{ > ? ? ? ? ? ?isBaseLayer : false, > ? ? ? ? ? ?rendererOptions : { > ? ? ? ? ? ? ? ?yOrdering : true > ? ? ? ? ? ?}, > ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() > > > ? ? ? ?}); > ? ? ? ?var vector2 = new OpenLayers.Layer.Vector("DraggableMarkers",{ > ? ? ? ? ? ?isBaseLayer : false, > ? ? ? ? ? ?rendererOptions : { > ? ? ? ? ? ? ? ?yOrdering : true > ? ? ? ? ? ?}, > ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() > > ? ? ? ?}); > > ? ? ? ?this.map.addLayers([vector1,vector2]); > > > ? ? ? ?var dragFeature = new OpenLayers.Control.DragFeature(vector2); > ? ? ? ?this.map.addControl(dragFeature); > ? ? ? ?dragFeature.activate(); > > > ? ? ? ?var select = new > OpenLayers.Control.SelectFeature([vector1,vector2],{ > ? ? ? ? ? ?hover : true, > ? ? ? ? ? ?highlightOnly : false > > ? ? ? ?}); > > ? ? ? ?this.map.addControl(select); > ? ? ? ?select.events.on({ > ? ? ? ? ? ?"featurehighlighted" : this.high, > ? ? ? ? ? ?"click" : this.click > ? ? ? ?}); > ... > > Is there any way to do this ? Any ideas ? > Thanks. > -- > View this message in context: http://n2.nabble.com/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4144872.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 gstopar at gmail.com Thu Dec 10 07:30:49 2009 From: gstopar at gmail.com (_greg_) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers.Feature.Vector hover + click event In-Reply-To: References: <1260444863853-4144872.post@n2.nabble.com> Message-ID: <1260448249126-4145073.post@n2.nabble.com> Hi, Thanks for your answer. Yes. I've tried this and here is what happens: 1. I click first on draggable feature => click event occurs => cool 2. Click on second not draggable feature => click event occurs => cool 3. Click again on first feature => click event is not dispatched. Any ideas ? Ivan Grcic-2 wrote: > > Hi, > selectFeature doesnt have click event: > http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Control/SelectFeature-js.html#OpenLayers.Control.SelectFeature.EVENT_TYPES > > Defining callback for click should work though > > > OpenLayers.Control.SelectFeature([vector1,vector2],{ > hover : true, > highlightOnly : false, > callbacks: { > click : function (feat){ > // do what you want here > } > } > }); > ); > > Cheers > > On Thu, Dec 10, 2009 at 12:34 PM, _greg_ wrote: >> >> Hi all >> >> Is possible to recive click events and have hover turned on with >> OpenLayers.Control.SelectFeature ? >> I have two vector layers. One for draggable features and another for not >> draggable. >> I want to be able to select features from both layers (I'm using OL-2.8). >> Feature hover works fine and ?also featureselected events are ok. But I >> do >> not get click events. >> >> My code is : >> ... >> var vector1 = new OpenLayers.Layer.Vector("NotDraggableMarkers",{ >> ? ? ? ? ? ?isBaseLayer : false, >> ? ? ? ? ? ?rendererOptions : { >> ? ? ? ? ? ? ? ?yOrdering : true >> ? ? ? ? ? ?}, >> ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() >> >> >> ? ? ? ?}); >> ? ? ? ?var vector2 = new OpenLayers.Layer.Vector("DraggableMarkers",{ >> ? ? ? ? ? ?isBaseLayer : false, >> ? ? ? ? ? ?rendererOptions : { >> ? ? ? ? ? ? ? ?yOrdering : true >> ? ? ? ? ? ?}, >> ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() >> >> ? ? ? ?}); >> >> ? ? ? ?this.map.addLayers([vector1,vector2]); >> >> >> ? ? ? ?var dragFeature = new OpenLayers.Control.DragFeature(vector2); >> ? ? ? ?this.map.addControl(dragFeature); >> ? ? ? ?dragFeature.activate(); >> >> >> ? ? ? ?var select = new >> OpenLayers.Control.SelectFeature([vector1,vector2],{ >> ? ? ? ? ? ?hover : true, >> ? ? ? ? ? ?highlightOnly : false >> >> ? ? ? ?}); >> >> ? ? ? ?this.map.addControl(select); >> ? ? ? ?select.events.on({ >> ? ? ? ? ? ?"featurehighlighted" : this.high, >> ? ? ? ? ? ?"click" : this.click >> ? ? ? ?}); >> ... >> >> Is there any way to do this ? Any ideas ? >> Thanks. >> -- >> View this message in context: >> http://n2.nabble.com/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4144872.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/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4145073.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ivan.grcic at geofoto.hr Thu Dec 10 08:10:07 2009 From: ivan.grcic at geofoto.hr (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Help to create FeatureId filter & OpenLayers.Filter.Logical.NOT Message-ID: Hi, I need to make a filter that combines Layers.Filter.Logical.NOT with FeatureId. Filter structure should be like: ... ... I tried creating one like this: var filter_1_1 = new OpenLayers.Format.Filter({version: "1.1.0"}); var xml = new OpenLayers.Format.XML(); var featIdsFilter = []; //iterate trough features and make arrays of filters for(var i=0, len=wfsLayer.features.length; i References: <1260444863853-4144872.post@n2.nabble.com> <1260448249126-4145073.post@n2.nabble.com> Message-ID: Hi, so your first feature is allready selected when you click on it second time? On Thu, Dec 10, 2009 at 1:30 PM, _greg_ wrote: > > Hi, > Thanks for your answer. > Yes. I've tried this and here is what happens: > 1. I click first on draggable feature => click event occurs => cool > 2. Click on second not draggable feature => click event occurs => cool > 3. Click again on first feature => click event is not dispatched. > > Any ideas ? > > > > > Ivan Grcic-2 wrote: >> >> Hi, >> selectFeature doesnt have click event: >> http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Control/SelectFeature-js.html#OpenLayers.Control.SelectFeature.EVENT_TYPES >> >> Defining callback for click should work though >> >> >> OpenLayers.Control.SelectFeature([vector1,vector2],{ >> ? ? ? ? ? ?hover : true, >> ? ? ? ? ? ?highlightOnly : false, >> ? ? ? ? ? ? callbacks: { >> ? ? ? ? ? ? ? ? click : function (feat){ >> ? ? ? ? ? ? ? ? ? ? ?// do what you want here >> ? ? ? ? ? ? ? ? } >> ? ? ? ? ? ? } >> ? ? ? ?}); >> ? ? ); >> >> Cheers >> >> On Thu, Dec 10, 2009 at 12:34 PM, _greg_ wrote: >>> >>> Hi all >>> >>> Is possible to recive click events and have hover turned on with >>> OpenLayers.Control.SelectFeature ? >>> I have two vector layers. One for draggable features and another for not >>> draggable. >>> I want to be able to select features from both layers (I'm using OL-2.8). >>> Feature hover works fine and ?also featureselected events are ok. But I >>> do >>> not get click events. >>> >>> My code is : >>> ... >>> var vector1 = new OpenLayers.Layer.Vector("NotDraggableMarkers",{ >>> ? ? ? ? ? ?isBaseLayer : false, >>> ? ? ? ? ? ?rendererOptions : { >>> ? ? ? ? ? ? ? ?yOrdering : true >>> ? ? ? ? ? ?}, >>> ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() >>> >>> >>> ? ? ? ?}); >>> ? ? ? ?var vector2 = new OpenLayers.Layer.Vector("DraggableMarkers",{ >>> ? ? ? ? ? ?isBaseLayer : false, >>> ? ? ? ? ? ?rendererOptions : { >>> ? ? ? ? ? ? ? ?yOrdering : true >>> ? ? ? ? ? ?}, >>> ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() >>> >>> ? ? ? ?}); >>> >>> ? ? ? ?this.map.addLayers([vector1,vector2]); >>> >>> >>> ? ? ? ?var dragFeature = new OpenLayers.Control.DragFeature(vector2); >>> ? ? ? ?this.map.addControl(dragFeature); >>> ? ? ? ?dragFeature.activate(); >>> >>> >>> ? ? ? ?var select = new >>> OpenLayers.Control.SelectFeature([vector1,vector2],{ >>> ? ? ? ? ? ?hover : true, >>> ? ? ? ? ? ?highlightOnly : false >>> >>> ? ? ? ?}); >>> >>> ? ? ? ?this.map.addControl(select); >>> ? ? ? ?select.events.on({ >>> ? ? ? ? ? ?"featurehighlighted" : this.high, >>> ? ? ? ? ? ?"click" : this.click >>> ? ? ? ?}); >>> ... >>> >>> Is there any way to do this ? Any ideas ? >>> Thanks. >>> -- >>> View this message in context: >>> http://n2.nabble.com/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4144872.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/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4145073.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 igrcic at gmail.com Thu Dec 10 08:45:33 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers.Feature.Vector hover + click event In-Reply-To: References: <1260444863853-4144872.post@n2.nabble.com> <1260448249126-4145073.post@n2.nabble.com> Message-ID: BTW you might also investigate this a little bit: http://dev.openlayers.org/sandbox/tschaub/select/examples/feature-events.html On Thu, Dec 10, 2009 at 2:41 PM, Ivan Grcic wrote: > Hi, so your first feature is allready selected when you click on it second time? > > On Thu, Dec 10, 2009 at 1:30 PM, _greg_ wrote: >> >> Hi, >> Thanks for your answer. >> Yes. I've tried this and here is what happens: >> 1. I click first on draggable feature => click event occurs => cool >> 2. Click on second not draggable feature => click event occurs => cool >> 3. Click again on first feature => click event is not dispatched. >> >> Any ideas ? >> >> >> >> >> Ivan Grcic-2 wrote: >>> >>> Hi, >>> selectFeature doesnt have click event: >>> http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Control/SelectFeature-js.html#OpenLayers.Control.SelectFeature.EVENT_TYPES >>> >>> Defining callback for click should work though >>> >>> >>> OpenLayers.Control.SelectFeature([vector1,vector2],{ >>> ? ? ? ? ? ?hover : true, >>> ? ? ? ? ? ?highlightOnly : false, >>> ? ? ? ? ? ? callbacks: { >>> ? ? ? ? ? ? ? ? click : function (feat){ >>> ? ? ? ? ? ? ? ? ? ? ?// do what you want here >>> ? ? ? ? ? ? ? ? } >>> ? ? ? ? ? ? } >>> ? ? ? ?}); >>> ? ? ); >>> >>> Cheers >>> >>> On Thu, Dec 10, 2009 at 12:34 PM, _greg_ wrote: >>>> >>>> Hi all >>>> >>>> Is possible to recive click events and have hover turned on with >>>> OpenLayers.Control.SelectFeature ? >>>> I have two vector layers. One for draggable features and another for not >>>> draggable. >>>> I want to be able to select features from both layers (I'm using OL-2.8). >>>> Feature hover works fine and ?also featureselected events are ok. But I >>>> do >>>> not get click events. >>>> >>>> My code is : >>>> ... >>>> var vector1 = new OpenLayers.Layer.Vector("NotDraggableMarkers",{ >>>> ? ? ? ? ? ?isBaseLayer : false, >>>> ? ? ? ? ? ?rendererOptions : { >>>> ? ? ? ? ? ? ? ?yOrdering : true >>>> ? ? ? ? ? ?}, >>>> ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() >>>> >>>> >>>> ? ? ? ?}); >>>> ? ? ? ?var vector2 = new OpenLayers.Layer.Vector("DraggableMarkers",{ >>>> ? ? ? ? ? ?isBaseLayer : false, >>>> ? ? ? ? ? ?rendererOptions : { >>>> ? ? ? ? ? ? ? ?yOrdering : true >>>> ? ? ? ? ? ?}, >>>> ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() >>>> >>>> ? ? ? ?}); >>>> >>>> ? ? ? ?this.map.addLayers([vector1,vector2]); >>>> >>>> >>>> ? ? ? ?var dragFeature = new OpenLayers.Control.DragFeature(vector2); >>>> ? ? ? ?this.map.addControl(dragFeature); >>>> ? ? ? ?dragFeature.activate(); >>>> >>>> >>>> ? ? ? ?var select = new >>>> OpenLayers.Control.SelectFeature([vector1,vector2],{ >>>> ? ? ? ? ? ?hover : true, >>>> ? ? ? ? ? ?highlightOnly : false >>>> >>>> ? ? ? ?}); >>>> >>>> ? ? ? ?this.map.addControl(select); >>>> ? ? ? ?select.events.on({ >>>> ? ? ? ? ? ?"featurehighlighted" : this.high, >>>> ? ? ? ? ? ?"click" : this.click >>>> ? ? ? ?}); >>>> ... >>>> >>>> Is there any way to do this ? Any ideas ? >>>> Thanks. >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4144872.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/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4145073.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 > -- Ivan Grcic From yves.moisan at boreal-is.com Thu Dec 10 08:55:34 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: References: <1260290023.4337.26.camel@yves-laptop> <4B1E9271.5000709@nsidc.org> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> <1260309785.4337.87.camel@yves-laptop> <4B1ED292.6070804@swoodbridge.com> <1260371595.4699.50.camel@yves-laptop> Message-ID: <1260453334.4304.20.camel@yves-laptop> > > I'm not sure I get it. Why don't you do the whole thing once the layer > is loaded? > > layer.events.on({ > scope: layer, > loadend: function() { > // "this" references the layer > var features = this.features; > // do what you need with the features > // ... > } > }); Yes I ended up doing something like this indeed. > > the loadend listener need not be anonymous, you can also go with: > > function onLoadend() { > var features = this.features; > } > layer.events.on({ > scope: layer, > loadend: onLoadend // you don't call the function here but just > provide a reference to it > }); > > Hope this makes sense, Are those equivalent : layer.events.on({ scope: layer, loadend: onLoadend }); and layers.events.register("loadend", layer, onLoadend) Thanx ! Yves From bouiaw at gmail.com Thu Dec 10 09:16:35 2009 From: bouiaw at gmail.com (Bouiaw) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenScales 1.1 Message-ID: <37ea40c80912100616k2e1f0535oae4e677a112dce87@mail.gmail.com> Hi, We have been working from the beginning of the year on a Open Source (LGPL) mapping framework based on ActionScript 3 and Flex : OpenScales. It is designed for building Rich Internet Mapping Applications easily. Today we have released OpenScales 1.1, you can test the demo on http://openscales.org/ I think the news could interest some OpenLayers users because OpenScales API have been designed to be quite close of OpenLayers one. Since the beginning, the codebase has been extensively modified and improved. Nevertheless, even if OpenScales API is not strictly equivalent to OpenLayers one, if you have ever developed on OpenLayers, you will find OpenScales API quite easy to understand. Last but not least, OpenScales have been designed to run on all kind of devices : - Mobile (ActionScript 3) : tested on a Flash 10.1 player unreleased version running on Palm Pre. First OpenScales ready devices are expected for 2010 Q1. - Web (Flex) : OpenScales 1.1 run on Flash 9 and Flash 10 players, targeting 98% of current web browsers under Windows, Mac and Linux - Desktop (AIR) : desktop mapping application based on OpenScales and AIR could be useful to manage offline mode, open local files like shapefiles, etc. Any feedback from is welcomed. Regards, Bouiaw From eric.lemoine at camptocamp.com Thu Dec 10 09:17:26 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] Understanding events In-Reply-To: <1260453334.4304.20.camel@yves-laptop> References: <1260290023.4337.26.camel@yves-laptop> <1260299032.4337.52.camel@yves-laptop> <1260306561.4337.63.camel@yves-laptop> <4B1EC734.9000700@swoodbridge.com> <1260309785.4337.87.camel@yves-laptop> <4B1ED292.6070804@swoodbridge.com> <1260371595.4699.50.camel@yves-laptop> <1260453334.4304.20.camel@yves-laptop> Message-ID: On Thu, Dec 10, 2009 at 2:55 PM, Yves Moisan wrote: > Are those equivalent : > > layer.events.on({ > ? ?scope: layer, > ? ?loadend: onLoadend > }); > > and > > layers.events.register("loadend", layer, onLoadend) Yes Mr. -- 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 gstopar at gmail.com Thu Dec 10 09:24:41 2009 From: gstopar at gmail.com (_greg_) Date: Wed Sep 1 17:18:18 2010 Subject: [OpenLayers-Users] OpenLayers.Feature.Vector hover + click event In-Reply-To: References: <1260444863853-4144872.post@n2.nabble.com> <1260448249126-4145073.post@n2.nabble.com> Message-ID: <1260455081681-4145602.post@n2.nabble.com> I think the "problem" is in this method inside OpenLayers.Handler.Feature: triggerCallback: function(type, mode, args) { var key = this.EVENTMAP[type][mode]; if(key) { if(type == 'click' && this.up && this.down) { // for click/clickout, only trigger callback if tolerance is met var dpx = Math.sqrt( Math.pow(this.up.x - this.down.x, 2) + Math.pow(this.up.y - this.down.y, 2) ); if(dpx <= this.clickTolerance) { this.callback(key, args); } } else { this.callback(key, args); } } } First time click on draggable feature I have this.down = null, so bottom this.callback gets executed. At second click this.down is not null - dpx is calculated and it is always larger than this.clickTolerance (default value = 4). So, I set it up to some large value and seems ok - don't know for side effects. I guess the problem is in this.down value. Ivan Grcic-2 wrote: > > BTW you might also investigate this a little bit: > http://dev.openlayers.org/sandbox/tschaub/select/examples/feature-events.html > > On Thu, Dec 10, 2009 at 2:41 PM, Ivan Grcic wrote: >> Hi, so your first feature is allready selected when you click on it >> second time? >> >> On Thu, Dec 10, 2009 at 1:30 PM, _greg_ wrote: >>> >>> Hi, >>> Thanks for your answer. >>> Yes. I've tried this and here is what happens: >>> 1. I click first on draggable feature => click event occurs => cool >>> 2. Click on second not draggable feature => click event occurs => cool >>> 3. Click again on first feature => click event is not dispatched. >>> >>> Any ideas ? >>> >>> >>> >>> >>> Ivan Grcic-2 wrote: >>>> >>>> Hi, >>>> selectFeature doesnt have click event: >>>> http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Control/SelectFeature-js.html#OpenLayers.Control.SelectFeature.EVENT_TYPES >>>> >>>> Defining callback for click should work though >>>> >>>> >>>> OpenLayers.Control.SelectFeature([vector1,vector2],{ >>>> ? ? ? ? ? ?hover : true, >>>> ? ? ? ? ? ?highlightOnly : false, >>>> ? ? ? ? ? ? callbacks: { >>>> ? ? ? ? ? ? ? ? click : function (feat){ >>>> ? ? ? ? ? ? ? ? ? ? ?// do what you want here >>>> ? ? ? ? ? ? ? ? } >>>> ? ? ? ? ? ? } >>>> ? ? ? ?}); >>>> ? ? ); >>>> >>>> Cheers >>>> >>>> On Thu, Dec 10, 2009 at 12:34 PM, _greg_ wrote: >>>>> >>>>> Hi all >>>>> >>>>> Is possible to recive click events and have hover turned on with >>>>> OpenLayers.Control.SelectFeature ? >>>>> I have two vector layers. One for draggable features and another for >>>>> not >>>>> draggable. >>>>> I want to be able to select features from both layers (I'm using >>>>> OL-2.8). >>>>> Feature hover works fine and ?also featureselected events are ok. But >>>>> I >>>>> do >>>>> not get click events. >>>>> >>>>> My code is : >>>>> ... >>>>> var vector1 = new OpenLayers.Layer.Vector("NotDraggableMarkers",{ >>>>> ? ? ? ? ? ?isBaseLayer : false, >>>>> ? ? ? ? ? ?rendererOptions : { >>>>> ? ? ? ? ? ? ? ?yOrdering : true >>>>> ? ? ? ? ? ?}, >>>>> ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() >>>>> >>>>> >>>>> ? ? ? ?}); >>>>> ? ? ? ?var vector2 = new OpenLayers.Layer.Vector("DraggableMarkers",{ >>>>> ? ? ? ? ? ?isBaseLayer : false, >>>>> ? ? ? ? ? ?rendererOptions : { >>>>> ? ? ? ? ? ? ? ?yOrdering : true >>>>> ? ? ? ? ? ?}, >>>>> ? ? ? ? ? ?styleMap : this.getMarkerStyleMap() >>>>> >>>>> ? ? ? ?}); >>>>> >>>>> ? ? ? ?this.map.addLayers([vector1,vector2]); >>>>> >>>>> >>>>> ? ? ? ?var dragFeature = new OpenLayers.Control.DragFeature(vector2); >>>>> ? ? ? ?this.map.addControl(dragFeature); >>>>> ? ? ? ?dragFeature.activate(); >>>>> >>>>> >>>>> ? ? ? ?var select = new >>>>> OpenLayers.Control.SelectFeature([vector1,vector2],{ >>>>> ? ? ? ? ? ?hover : true, >>>>> ? ? ? ? ? ?highlightOnly : false >>>>> >>>>> ? ? ? ?}); >>>>> >>>>> ? ? ? ?this.map.addControl(select); >>>>> ? ? ? ?select.events.on({ >>>>> ? ? ? ? ? ?"featurehighlighted" : this.high, >>>>> ? ? ? ? ? ?"click" : this.click >>>>> ? ? ? ?}); >>>>> ... >>>>> >>>>> Is there any way to do this ? Any ideas ? >>>>> Thanks. >>>>> -- >>>>> View this message in context: >>>>> http://n2.nabble.com/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4144872.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/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4145073.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 >> > > > > -- > Ivan Grcic > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/OpenLayers-Feature-Vector-hover-click-event-tp4144872p4145602.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jbloc1878 at googlemail.com Thu Dec 10 10:06:43 2009 From: jbloc1878 at googlemail.com (James Bloc) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Externally Accessible Website Message-ID: <2120b1f30912100706l7122f5e8j805d2b9766d52489@mail.gmail.com> Hi, I have set up a mapping project locally using OSGB Web Map Tools project and Open Layers on my machine and all works fine however i wish to make the map accessible to other computers within my network. I have set up TomCat to use port 80 and can access the basicmap.html from another computer using the url; /IPAddress:80/OSGBWebMapTools/BasicMap.html The html page loads however the map window/viewer does not and is empty. "Open Space is not defined" is displayed wiithin the error console of firefox. Any help much appreciated Cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/17e0af62/attachment.html From emmexx at tiscalinet.it Thu Dec 10 10:10:16 2009 From: emmexx at tiscalinet.it (emmexx) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Context is undefined and missing part of feature Message-ID: <4B210F58.1040104@tiscalinet.it> I'm having some trouble using a Vector layer and the addUniqueValueRules() function. I create an array of vector layers and define a lookup rule to style some feature (lines). var myStyles = new OpenLayers.StyleMap({ "default": new OpenLayers.Style(null, { rules: [ new OpenLayers.Rule({ symbolizer: { "Point": { pointRadius: 5, graphicName: "square", fillColor: "white", fillOpacity: 0.25, strokeWidth: 1, strokeOpacity: 1, strokeColor: '#' + color, }, "Line": { strokeDashstyle: ol_dash, strokeWidth: 5, strokeOpacity: 1, fillColor: "white", strokeColor: '#' + color, label: mylabel, labelAlign: "rm", fontSize: "12px", fontWeight: "bold", fontColor: '#' + label } } }) ] }) }); myStyles.addUniqueValueRules("default", "attr1", attr1); myStyles.addUniqueValueRules("default", "attr2", attr2); In another layer I load a gpx file: vlayer2= new OpenLayers.Layer.GML("gps", path, { format: filetype formatOptions: { extractAttributes: false, extractStyles: false, maxDepth: 2, extractTracks: true, extractRoutes: false, extractWaypoints: false }, 'styleMap': styleMap, projection: map.displayProjection }); If gpx line is outside the visible map I drag the map but the line is not "refreshed" and the previously hidden part is not visible. I have to, for example, zoom in and out to get the line visible. If I comment out the 2 addUniqueValueRules lines the problem disappear. No problem also if I debug the code in Firebug and put a breakpoint on one of those 2 lines. After dragging the map in ff error console I find: context is undefined .../Openlayers-2.8/Openlayers.js Line 1423. Any suggestion? Thank you maxx p.s. I cut the unnecessary code From rifins at gmail.com Thu Dec 10 10:39:58 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw line vector, with points.. In-Reply-To: References: Message-ID: Hi, I don't know if maybe this question is out of interest in this list, or if it is an obvious thing that I can't see.. But, I would like to know if it is possible to draw a line making a WFS request, to a data source in which the geometry is POINT. If the geometry of the datasource is POINT it draws points, and if the geometry is LINESTRING then it draws a line... But, how to draw a line when the source is a couple of POINT? I'm creating the vector layer like this: wfs = new OpenLayers.Layer.Vector("WFST-Vector", { strategies: [new OpenLayers.Strategy.BBOX(), oSaveStrategy], protocol: new OpenLayers.Protocol.WFS({ version: "1.0.0", url: "http://localhost:8080/geoserver/wfs", featureType: "pointsDS", srsName: "EPSG:23031", featureNS: "http://www.mapmap.org/g4wd", geometryName: "the_geom", schema: " http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=G4WD:pointsDS " }) }); And the G4WD:pointsDS' datasource is a postgis table, where the geometry field is POINT. Thanks.. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/fbe90fb1/attachment.html From david.fawcett at gmail.com Thu Dec 10 10:56:39 2009 From: david.fawcett at gmail.com (David Fawcett) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw line vector, with points.. In-Reply-To: References: Message-ID: I am sure that in the context of WFS-T it is more complicated, but would it work if you used a linestring layer and modified your PostGIS SQL to wrap your points in something like a ST_MakeLine() function? On Thu, Dec 10, 2009 at 9:39 AM, JuKiM wrote: > > Hi, > I don't know if maybe this question is out of interest in this list, or if > it is an obvious thing that I can't see.. > But, I would like to know if it is possible to draw a line making a WFS > request, to a data source in which the geometry is POINT. > If the geometry of the datasource is POINT it draws points, and if the > geometry is LINESTRING then it draws a line... ?But, how to draw a line when > the source is a couple of POINT? > I'm creating the vector layer like this: > wfs = new OpenLayers.Layer.Vector("WFST-Vector", { > ?? ? ? ?strategies: [new OpenLayers.Strategy.BBOX(), oSaveStrategy], > ?? ? ? ?protocol: new OpenLayers.Protocol.WFS({ > ?? ? ? ? ? ?version: "1.0.0", > ?? ? ? ? ? ?url: "http://localhost:8080/geoserver/wfs", > ?? ? ? ? ? ?featureType: "pointsDS", > ?? ? ? ? ? ?srsName: "EPSG:23031", > ?? ? ? ? ? ?featureNS: "http://www.mapmap.org/g4wd", > ?? ? ? ? ? ?geometryName: "the_geom", > ?? ? ? ? ? ?schema: > "http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=G4WD:pointsDS" > ?? ? ? ?}) > ?? ?}); > And the G4WD:pointsDS' datasource is a postgis table, where the geometry > field is POINT. > Thanks.. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From jrubiando at gmail.com Thu Dec 10 11:17:16 2009 From: jrubiando at gmail.com (Lammie Jonson) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Cannot see WFS layer In-Reply-To: <412506e70912090104i3ed2b86cj71ffb2daa2056d0@mail.gmail.com> References: <1f161f9d0912081232v52dc3c40k94792a952c66f0ab@mail.gmail.com> <412506e70912090104i3ed2b86cj71ffb2daa2056d0@mail.gmail.com> Message-ID: <1f161f9d0912100817i476d5763gf7b65463b18445c4@mail.gmail.com> I think you have to use a proxy because that's how WFS works, that will end up making any request you use through openlayers go through a proxy also. I am sort of new to openlayers as well and just figure stuff out from their examples and experimentation. I just plug in urls in openlayers to my rails server and then see what kinds of requests openlayers sends out that come out in the console or log and try to figure out how to handle them etc. They have some examples on the proxy. I think they have a perl cgi example. What is your web server ? Are you use PHP, Java, etc ? On Wed, Dec 9, 2009 at 4:04 AM, Damith Amarasena wrote: > Hi Lammie, > > Thanks for your reply. You have mentioned about a proxy here. Does that > mean I have to use one? Sorry if you feel this as a dumb question, but I'm > new to openlayers and whole GIS stuff. Please guide me on this. > > Regards, > damith > > On Wed, Dec 9, 2009 at 2:02 AM, Lammie Jonson wrote: > >> // Here's is how I did this. >> >> // You need to use the openlayers proxy: >> >> OpenLayers.ProxyHost="proxy.cgi?url="; >> >> // WFS layer points to geoserver or your host >> >> state_layer = new OpenLayers.Layer.WFS( "States WFS", >> "http://yourhost:8080/geoserver/wfs", >> { typename: 'topp:states'} ); >> >> =============== >> >> I'm using rails, so I create a sort of fake proxy in config/routes.rb >> >> map.connect '/proxy.cgi', >> :controller => 'wfs', >> :action => 'myproxy' >> >> Then inside the myproxy() action: >> >> if url =~ /geoserver/ >> # geo server WFS data >> uri = URI.parse(url) >> resp = Net::HTTP.get_response(uri) >> send_data(resp.body, :type => 'text/xml') >> end >> >> _______________________________________________ >> 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/20091210/3fdbb36e/attachment.html From stelaanders at gmail.com Thu Dec 10 11:35:40 2009 From: stelaanders at gmail.com (stela anders) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] How to create a Mapserver Layer with several SubLayers... Message-ID: Hello all! I?d like to create a Mapserver Layer (OpenLayers.Layer.MapServer) that have several SubLayers... So I can Turn on off each sublayer, but JUST one is draw ... Thanks Stella -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/02f125c2/attachment.html From mc.prins at gmail.com Thu Dec 10 11:43:52 2009 From: mc.prins at gmail.com (=?UTF-8?B?IE3CqsKuaw==?=) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] OpenScales 1.1 In-Reply-To: <37ea40c80912100616k2e1f0535oae4e677a112dce87@mail.gmail.com> References: <37ea40c80912100616k2e1f0535oae4e677a112dce87@mail.gmail.com> Message-ID: 2009/12/10 Bouiaw : > > Any feedback from is welcomed. > Unfortunately Adobe Flash is not an open standard or standards based environment, so on some computers it will be very impressive on while on others it will fail miserably; open standards will allow you to be impressive on any platform. This is not to say that you haven't done a great job, but I haven't got the faintest wish to lock myself in with Adobe. From haftish21 at gmail.com Thu Dec 10 12:08:56 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] comprehensive ol lib??? Message-ID: <52cf5e870912100908w34bc0bd9u77724515eb428edd@mail.gmail.com> http://dev.openlayers.org/sandbox/adube/openlayers/lib/OpenLayers.js http://dev.openlayers.org/nightly/OpenLayers.js http://openlayers.org/dev/OpenLayers.js I just tried three of these libraries. What works with one library fails to work with the other one. I mean, for example, my vector layer loads if only I use the first one, but the control HighlightFeature fails, and the other way round. Could any one direct me to any comprehensive openlayers library that encompasses all the needed functionality whatsoever. Cheers!!! -- ?`'?.?(?`'?.?*????*?.?'??)?.?' ??) ?(?`'?.?(?`'?.?*??*?.?'??)?.?' ??)? ??(?`'?.?(?`'?.?**?.?'??)?.?'? ?)?? ----==--12hsitfaHaftish21--==---- (_?.?'?(_?.?'?*????*`'?.?_)`'? .?_) ?(_?.?'?(_?.?'?*??*`'?.?_)`'?. ?_)? ??(_?.?'?(_?.?'?**`'?.?_)`'?.? _)?? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/0a93088d/attachment.html From ahocevar at opengeo.org Thu Dec 10 14:59:34 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] How to create a Mapserver Layer with several SubLayers... In-Reply-To: References: Message-ID: <4B215326.2080400@opengeo.org> On 2009-12-10 17:35, stela anders wrote: > Hello all! > > I?d like to create a Mapserver Layer (OpenLayers.Layer.MapServer) that > have several SubLayers... > So I can Turn on off each sublayer, but JUST one is draw ... You have to do that programmatically in OpenLayers. But you could give http://geoext.org a try. It builds upon OpenLayers and Ext JS, and provides layer tree components, among which there is a LayerParamLoader, which does exactly what you need. See http://dev.geoext.org/trunk/geoext/examples/tree.html and play around with the "Tasmania (Group Layer)" layer. Regards, Andreas. > > > Thanks > > Stella > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/262d5747/attachment.html From bouiaw at gmail.com Fri Dec 11 04:25:56 2009 From: bouiaw at gmail.com (Bouiaw) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] OpenScales 1.1 In-Reply-To: References: <37ea40c80912100616k2e1f0535oae4e677a112dce87@mail.gmail.com> Message-ID: <37ea40c80912110125t5f5360c0wa2b894a890136613@mail.gmail.com> I understand your point of view, standards and getting Flash platform more open is important for us too. Flash Player is the most important piece of Flash platform, and getting it open source is a key point, but we must also admit that Adobe have opened a lot of other pieces of its platform. Typically, we can develop OpenScales framework and OpenScales applications with a complete open source stack. On our dev platform, we use Linux, OpenJdk, Hudson, Flex SDK, AMF3 protocol, Maven, Subversion, Flex Unit. All these are really open source. This is not enough, but that's a good starting point. Flash platform is not as closed as it was a few years ago. You talk about standards, we take care about standards too. One main reason for OpenScales creation was the browser hell when we developed some OpenLayers based projects, dealing with different browser implementation, cutting off some functionalities because our users want their mapping application work the same on all browser. We can't accept anymore to use only raster data because vector rendering is too slow on some browser. Standards are great, and we develop most of softwares with HTML/CSS/JS technologies. But when time come to do a real graphical application like in GIS software and not just website, I think the ActionScript 3 may be more "standard" than all these custom browser HTML/CSS/JS implementations. Another point is that since Javascript is not really Object oriented, every framework or application reimplement this in a not standard way by definition. I also think that Adobe position about open sourcing player will change in the next months. Adobe guys are clever, they have seen Sun story with Java. They have no choice, there will be a time where they will be forced to Open Source Flash, because they are a company that is drived by money. There business is to sell Photoshop, Illustrator and server stuff. There will be a time when not open sourcing Flash will cost money to Adobe if other technologies like Silverlight or HTML5 will challenge it enough. I think Adobe technically and legally can't open source current Flash player code (9 or 10) like Sun was not able to opensource all JDK sources a few years ago because there were some patent encumbered code. Last year, Adobe started to rewrite ALL the Flash player in order to allow it to run with the same quality and speed on all platforms including mobile devices. In January when we started OpenScales with mobile in mind, a lot of people didn't think this was possible. Few weeks ago I meet Adobe guys and test OpenScales on a Palm Pre, it run at the same speed than on my computer. Adobe have employed a lot (close to 900 I think) of its engineers to develop Flash 10.1 in the context of the Open Screen Project (http://www.openscreenproject.org). Mobile was not their only goal, Flash 10.1 will allow Adobe to build a Flash player with exactly the quality for all the platforms easily. All platforms include your mobile, your TV, etc. It is just a thought, but I am convinced another goal of this huge rewrite is to be able (technically and legally) to Open Source Adobe player if they need to. I don't say they will, but I really think this is a possibility. To conclude, there is a more and more powerful Open Source community behind a lot of ActionScript 3 and Flex project that put the pressure on Adobe to continue their Open Source move. Anyway, we are pragmatic programers and we have pragmatic users, so our choice make sense for us and, I think, for a lot of other people too. On Thu, Dec 10, 2009 at 5:43 PM, M??k wrote: > 2009/12/10 Bouiaw : >> >> Any feedback from is welcomed. >> > > Unfortunately Adobe Flash is not an open standard or standards based > environment, so on some computers it will be very impressive on while > on others it will fail miserably; open standards will allow you to be > impressive on any platform. > This is not to say that you haven't done a great job, but I haven't > got the faintest wish to lock myself in with Adobe. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From sarah_flip at yahoo.de Fri Dec 11 05:22:16 2009 From: sarah_flip at yahoo.de (Sarah Schuessler) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Projection issue Message-ID: <153317.11338.qm@web26508.mail.ukl.yahoo.com> Hi list, I`m using mapfish and I want to load WMS/ArcIMS layer. But I see that my coordinates from bbox are wrong: I get something like 9.5,48.5,90409.5,90448.5. WMS epsg is 4326. projection: new OpenLayers.Projection("EPSG:4326"), //default displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", numZoomLevels: 12, maxResolution: 5650, maxExtent: new OpenLayers.Bounds(9.5,48.5,9.6,48.6), new OpenLayers.Layer.WMS("INFOGIS_WMS", "http://myserver/wmsconnector/com.esri.wms.Esrimap/GIS_layer?", {layers: '0', format: "image/png", transparent: false, BGCOLOR: '0xCC00CC' }, {projection: "EPSG:4326", isBaseLayer: true}), How can I solve this? Any hints are welcome. best regards Sarah __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/9658a1bd/attachment.html From bartvde at osgis.nl Fri Dec 11 05:28:36 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Projection issue In-Reply-To: <153317.11338.qm@web26508.mail.ukl.yahoo.com> References: <153317.11338.qm@web26508.mail.ukl.yahoo.com> Message-ID: <20849.145.50.39.11.1260527316.squirrel@webmail.hostingdiscounter.nl> Hi, units are not meters for EPSG:4326, but deegrees (units: 'dd'). Best regards, Bart > Hi list, > > I`m using mapfish and I want to load WMS/ArcIMS layer. But I see that my > coordinates from bbox are wrong: > I get something like 9.5,48.5,90409.5,90448.5. WMS epsg is 4326. > projection: new OpenLayers.Projection("EPSG:4326"), //default > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: "m", > numZoomLevels: 12, > maxResolution: 5650, > maxExtent: new OpenLayers.Bounds(9.5,48.5,9.6,48.6), > > new OpenLayers.Layer.WMS("INFOGIS_WMS", > "http://myserver/wmsconnector/com.esri.wms.Esrimap/GIS_layer?", > {layers: '0', format: "image/png", transparent: false, BGCOLOR: > '0xCC00CC' }, {projection: "EPSG:4326", isBaseLayer: true}), > > How can I solve this? Any hints are welcome. > > best regards > Sarah > > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz > gegen Massenmails. > http://mail.yahoo.com _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From m.sirin07 at googlemail.com Fri Dec 11 05:33:08 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] WFS Features not displayed Message-ID: <55744b1c0912110233k2498982fy6c189b9d2124551d@mail.gmail.com> Hi, does anybody know why requested wfs features are not displayed after removing and re-adding them by recalling the function? They only appear after changing the zoom level. take a look at our code: function createWFS(response){ ... var hotel = new OpenLayers.Layer.WFS( "Hotels", "http://localhost/cgi-bin/mapserv?map=/home/test.map", {typename: 'hotel'},{extractAttributes:true, displayInLayerSwitcher:true, projection:new OpenLayers.Projection("EPSG:4326"), styleMap: myStyleHotel}); hotel.events.on({ "featureselected": onFeatureSelect, "featureunselected": onPopupClose }); // alert(map.getLayersByName("Hotels")); if (map.getLayersByName("Hotels").length!=0){ map.removeLayer(hotel,false); } map.addLayer(hotel); selectControl = new OpenLayers.Control.SelectFeature([hotel]); map.addControl(selectControl); selectControl.activate(); } Thank you! regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/a6eea044/attachment.html From sarah_flip at yahoo.de Fri Dec 11 05:41:34 2009 From: sarah_flip at yahoo.de (Sarah Schuessler) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Projection issue In-Reply-To: <20849.145.50.39.11.1260527316.squirrel@webmail.hostingdiscounter.nl> References: <153317.11338.qm@web26508.mail.ukl.yahoo.com> <20849.145.50.39.11.1260527316.squirrel@webmail.hostingdiscounter.nl> Message-ID: <716232.57817.qm@web26506.mail.ukl.yahoo.com> Hi, thanks. But that did not change anything. best regards Sarah ________________________________ Hi, units are not meters for EPSG:4326, but deegrees (units: 'dd'). Best regards, Bart > Hi list, > > I`m using mapfish and I want to load WMS/ArcIMS layer. But I see that my > coordinates from bbox are wrong: > I get something like 9.5,48.5,90409.5,90448.5. WMS epsg is 4326. > projection: new OpenLayers.Projection("EPSG:4326"), //default > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: "m", > numZoomLevels: 12, > maxResolution: 5650, > maxExtent: new OpenLayers.Bounds(9.5,48.5,9.6,48.6), > >? new OpenLayers.Layer.WMS("INFOGIS_WMS", > "http://myserver/wmsconnector/com.esri.wms.Esrimap/GIS_layer?", >? ? ? ? {layers: '0', format: "image/png", transparent: false, BGCOLOR: > '0xCC00CC'? }, {projection: "EPSG:4326", isBaseLayer: true}), > > How can I solve this? Any hints are welcome. > > best regards > Sarah > > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz > gegen Massenmails. > http://mail.yahoo.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 __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/7d9f02a3/attachment.html From ahocevar at opengeo.org Fri Dec 11 06:10:14 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Projection issue In-Reply-To: <153317.11338.qm@web26508.mail.ukl.yahoo.com> References: <153317.11338.qm@web26508.mail.ukl.yahoo.com> Message-ID: <4B222896.9010401@opengeo.org> Hi, your maxResolution is a bit weird. Are you sure that you want to have at least 5650 map units (decimal degrees!) in one map pixel? The values you get for the top-right corner are logical, given this maxResolution value. Try to remove the maxResolution property, or choose something near 1 to see the difference. Regards, Andreas. On 2009-12-11 11:22, Sarah Schuessler wrote: > Hi list, > > I`m using mapfish and I want to load WMS/ArcIMS layer. But I see that > my coordinates from bbox are wrong: > I get something like 9.5,48.5,90409.5,90448.5. WMS epsg is 4326. > projection: new OpenLayers.Projection("EPSG:4326"), //default > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: "m", > numZoomLevels: 12, > maxResolution: 5650, > maxExtent: new OpenLayers.Bounds(9.5,48.5,9.6,48.6), > > new OpenLayers.Layer.WMS("INFOGIS_WMS", > "http://myserver/wmsconnector/com.esri.wms.Esrimap/GIS_layer?", > {layers: '0', format: "image/png", transparent: false, > BGCOLOR: '0xCC00CC' }, {projection: "EPSG:4326", isBaseLayer: true}), > > How can I solve this? Any hints are welcome. > > best regards > Sarah > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden > Schutz gegen Massenmails. > http://mail.yahoo.com > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/6cae9291/attachment.html From sarah_flip at yahoo.de Fri Dec 11 06:51:52 2009 From: sarah_flip at yahoo.de (Sarah Schuessler) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Projection issue In-Reply-To: <4B222896.9010401@opengeo.org> References: <153317.11338.qm@web26508.mail.ukl.yahoo.com> <4B222896.9010401@opengeo.org> Message-ID: <134766.48283.qm@web26503.mail.ukl.yahoo.com> ? Hi, thanks for your hint. That solved my problem almost. I only have to check for a?matched maxResolution for my WMS. best regards sarah ________________________________ Von: Andreas Hocevar An: users@openlayers.org Gesendet: Freitag, den 11. Dezember 2009, 12:10:14 Uhr Betreff: Re: [OpenLayers-Users] Projection issue Hi, your maxResolution is a bit weird. Are you sure that you want to have at least 5650 map units (decimal degrees!) in one map pixel? The values you get for the top-right corner are logical, given this maxResolution value. Try to remove the maxResolution property, or choose something near 1 to see the difference. Regards, Andreas. On 2009-12-11 11:22, Sarah Schuessler wrote: Hi list, > >I`m using mapfish and I want to load WMS/ArcIMS layer. But I see that my coordinates from bbox are wrong: >I get something like 9.5,48.5,90409.5,90448.5. WMS epsg is 4326. >projection: new OpenLayers.Projection("EPSG:4326"), //default >displayProjection: new OpenLayers.Projection("EPSG:4326"), >units: "m", >numZoomLevels: 12, >maxResolution: 5650, >maxExtent: new OpenLayers.Bounds(9.5,48.5,9.6,48.6), ? > >?new OpenLayers.Layer.WMS("INFOGIS_WMS", "http://myserver/wmsconnector/com.esri.wms.Esrimap/GIS_layer?", >??? ??? {layers: '0', format: "image/png", transparent: false, BGCOLOR: '0xCC00CC'? }, {projection: "EPSG:4326", isBaseLayer: true}), > >How can I solve this? Any hints are welcome. > >best regards >Sarah > >__________________________________________________ >Do You Yahoo!? >Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. >http://mail.yahoo.com > >_______________________________________________ >Users mailing list >Users@openlayers.org >http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/5789bc47/attachment.html From haftish21 at gmail.com Fri Dec 11 06:52:14 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] my road styleMap not working Message-ID: <52cf5e870912110352t50532e4cw7385d8481c8995a5@mail.gmail.com> Trying to define a styleMap of my road layer based on rdlnstattx attribute, I defined a rule based on type as follows: var rStyle = new OpenLayers.StyleMap(); var rType = new Array(); rType = { FUN: { text: 'Functioning', strokeColor:"#ff0000", strokeWidth: 7 }, SCH: { text: 'Schematic road', strokeColor:"#0aa989", strokeWidth: 4 }, COM: { text: 'Compiled road connector', strokeColor:"#f4a427", strokeWidth: 3 } }; rStyle.addUniqueValueRules("default", 'rdlnstattx', rType); But, nothing seems working. My styleMap on polygon layer is working well. Where did I miss sth? Any clue??? Thank you in advance!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/90c63053/attachment.html From gentuser at gmail.com Fri Dec 11 08:00:36 2009 From: gentuser at gmail.com (carlofrancesco) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Start edge and end edge from Popup Message-ID: <1260536436443-4151122.post@n2.nabble.com> Hi all. I'm new to this beautiful openLayer. What I am doing i simple: using openlayer + pgrouting. My question is this: I want to set over the map a Start Point and an End Point to pass to pgrouting from a popup. I'll explain better. I'm using the code shown here : http://pgrouting.postlbs.org/wiki/Workshop-RoutingRequest In detail i?ll focus on: var SinglePoint = OpenLayers.Class.create(); SinglePoint.prototype = OpenLayers.Class.inherit(OpenLayers.Handler.Point, { createFeature: function(evt) { this.control.layer.removeFeatures(this.control.layer.features); OpenLayers.Handler.Point.prototype.createFeature.apply(this, arguments); } }); // controls controls = { start: new OpenLayers.Control.DrawFeature(start, SinglePoint), stop: new OpenLayers.Control.DrawFeature(stop, SinglePoint) } for (var key in controls) { map.addControl(controls[key]); } } function toggleControl(element) { for (key in controls) { if (element.value == key && element.checked) { controls[key].activate(); } else { controls[key].deactivate(); } } } This code works very well, i put start point and end point, i click on compute and it trace the path. All perfect. But now i want to create a search form like google map, clicking on one result and create a popup that show me name of the street and "start from here" , and "arrive here", same of google map. So i wrote this code: function displayViaOnMap(response){ if (response && response.responseXML) { via_selezionata.removeFeatures(via_selezionata.features); // parse the features edges = response.responseXML.getElementsByTagName('edge'); var features = []; for (var i = 0; i < edges.length; i++) { var gid,street,fromleft, toleft, fromright, toright; gid=edges[i].getElementsByTagName('id')[0].textContent; street=edges[i].getElementsByTagName('street')[0].textContent; comune=edges[i].getElementsByTagName('comune')[0].textContent; /*fromleft=edges[i].getElementsByTagName('fromleft')[0].textContent; toleft=edges[i].getElementsByTagName('toleft')[0].textContent; fromright=edges[i].getElementsByTagName('fromright')[0].textContent; toright=edges[i].getElementsByTagName('toright')[0].textContent; */ var g = parser.read(edges[i].getElementsByTagName('wkt')[0].textContent); // non va bene features.push(new OpenLayers.Feature.Vector(g)); features.push(g); } //questo inserisce all'interno del vettore via le features appena trovate via_selezionata.addFeatures(features); createPopup(features[0],street,comune); } } function createPopup(feature,street,comune) { //rimuovo gli altri popup if(map.popups.length>0){rimuoviPopups();} var center= feature.geometry.getBounds().getCenterLonLat(); var popup_info = "" + street + "
Comune: " + comune + "
a href='javascript:setStart("+center+")' >Parti da qui /a" + "
a href='javascript:setStop("+center+")' >Arriva qui /a" + ""; popup = new OpenLayers.Popup.AnchoredBubble("ViaInfo", center, new OpenLayers.Size(200,100), popup_info, null, true); popup.setBackgroundColor("#bcd2ee"); popup.setOpacity(.85); map.addPopup(popup); //mi centro la mappa sulla mia nuvolletta map.setCenter(center, zoomz+1); } function rimuoviPopups() { while( map.popups.length ) { map.removePopup(map.popups[0]); } } function setStart(x,y){ } function setStop(x,y){ } Now i need an help to create function setStart and setStop point. How i can Initialize SinglePoint defined as an Handler Point to a Point on the map like var point = new OpenLayers.Geometry.Point(x,y); where x,y is coordinate of feature.geometry.getBounds().getCenterLonLat(); Thanks for any advice !! -- View this message in context: http://n2.nabble.com/Start-edge-and-end-edge-from-Popup-tp4151122p4151122.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Fri Dec 11 10:01:50 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Filtering WFS Linestring results Message-ID: Hello, is there any way to apply a filter to a WFS Layer which source are Linestrings? I have a large route (about 1500 positions), and I would like to be able to drag some posicions to adjust them.. But it is not possible with all these points in the map.. Is there any strategy that could fit that? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/1c689d6f/attachment.html From hagen1113 at yahoo.com Fri Dec 11 13:56:56 2009 From: hagen1113 at yahoo.com (Raul David Orozco) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draggable box aspect ratio Message-ID: <533445.77934.qm@web51402.mail.re2.yahoo.com> Hi everyone. I've been this using this example http://www.openlayers.org/dev/examples/custom-control.html which does exactly what I need, except that I need to maintain the box's aspect ratio constant, I mean keep it square. Does anyone know how can I do that?? Thanks 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/20091211/03deff9c/attachment.html From arnd.wippermann at web.de Fri Dec 11 17:18:19 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] my road styleMap not working In-Reply-To: <52cf5e870912110352t50532e4cw7385d8481c8995a5@mail.gmail.com> Message-ID: Hi, perhaps this works var rType = {}; //new Object() Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Haftish 21 Gesendet: Freitag, 11. Dezember 2009 12:52 An: users@openlayers.org Betreff: [OpenLayers-Users] my road styleMap not working Trying to define a styleMap of my road layer based on rdlnstattx attribute, I defined a rule based on type as follows: var rStyle = new OpenLayers.StyleMap(); var rType = new Array(); rType = { FUN: { text: 'Functioning', strokeColor:"#ff0000", strokeWidth: 7 }, SCH: { text: 'Schematic road', strokeColor:"#0aa989", strokeWidth: 4 }, COM: { text: 'Compiled road connector', strokeColor:"#f4a427", strokeWidth: 3 } }; rStyle.addUniqueValueRules("default", 'rdlnstattx', rType); But, nothing seems working. My styleMap on polygon layer is working well. Where did I miss sth? Any clue??? Thank you in advance!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091211/e9710bd8/attachment.html From haftish21 at gmail.com Fri Dec 11 18:26:55 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] my road styleMap not working In-Reply-To: References: <52cf5e870912110352t50532e4cw7385d8481c8995a5@mail.gmail.com> Message-ID: <52cf5e870912111526u7cec2e89t6183fba932847a83@mail.gmail.com> Thank you Arnd for the reply. But this neither is changing the style of my roads @all. What other suggestions u might have??? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091212/f387de17/attachment.html From haftish21 at gmail.com Fri Dec 11 19:00:15 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] my road styleMap not working In-Reply-To: <52cf5e870912111526u7cec2e89t6183fba932847a83@mail.gmail.com> References: <52cf5e870912110352t50532e4cw7385d8481c8995a5@mail.gmail.com> <52cf5e870912111526u7cec2e89t6183fba932847a83@mail.gmail.com> Message-ID: <52cf5e870912111600x5538d2bane6a5c311440d8e@mail.gmail.com> Lately, rType = { 'Functioning': { strokeColor:"#0aa989", strokeWidth: 7 }, 'Schematic road': { strokeColor:"#ff0000", strokeWidth: 4 }, 'Compiled road connector': { strokeColor:"#f4a427", strokeWidth: 3 } }; Is working even without first declaring the variable rType. I'm really interested in the abbreviated version of the road types as in the non-working code above. I'm founding myself on the example @>>> http://dev4.mapgears.com/bdga/bdgaWFS-T.html. Cheers!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091212/67461f4e/attachment.html From eric.lemoine at camptocamp.com Sat Dec 12 08:34:09 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] my road styleMap not working In-Reply-To: <52cf5e870912111600x5538d2bane6a5c311440d8e@mail.gmail.com> References: <52cf5e870912110352t50532e4cw7385d8481c8995a5@mail.gmail.com> <52cf5e870912111526u7cec2e89t6183fba932847a83@mail.gmail.com> <52cf5e870912111600x5538d2bane6a5c311440d8e@mail.gmail.com> Message-ID: On Saturday, December 12, 2009, Haftish 21 wrote: > > > Lately, > > rType = { > ??? ??? 'Functioning': { strokeColor:"#0aa989", strokeWidth: 7 }, > ??? ??? 'Schematic road': { strokeColor:"#ff0000", strokeWidth: 4 }, > ??? ??? 'Compiled road connector': { strokeColor:"#f4a427", strokeWidth: 3 } > ??? ??? }; > > Is working even without first declaring the variable rType. I'm really interested in the abbreviated version of the road types as in the non-working code above. the keys in your rType object must correspond to the values found in the "rdlnstattx" attribute of the features (feature.attributes.rdlnstattx). 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 bamerbalazs at gmail.com Sat Dec 12 11:52:42 2009 From: bamerbalazs at gmail.com (=?UTF-8?B?QmFsw6F6cyBCw6FtZXI=?=) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] How to issue custom WFS request in 2.8 Message-ID: HI All, I try to issue custom WFS 1.0.0 GetFeature request (could be also 1.1.0, doesn't matter). Goal is to count some attributes (or list them later). However, there is always some error, now "An attempt was made to create or change an object in a way which is incorrect with regard to namespaces" code: "14 [Break on this error] node.setAttributeNS(uri, name, value);\n" What is the correct way to do this in OpenLayers 2.8? Something similar worked in 2.7 but I need 2.8. thank you in advance, best regards: Bal?zs B?mer I do the following: filter=new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "bloaz", value: kerespanel.findById('bloazid').value }); format = new OpenLayers.Format.WFST.v1_0_0({ featureNS: 'blokknezegeto', featurePrefix: 'blokknezegeto', namespaces: { "wfs": "http://www.opengis.net/wfs", "ogc": "http://www.opengis.net/ogc" } }); wfs = new OpenLayers.Protocol.WFS.v1_0_0({ url: "http://att-it.homelinux.net:22080/cgi-bin/ms-5.4.2/blokknez.fcgi", params: { filter: filter, maxFeatures: 200, srsName: "EPSG:23700", typeName: "blokk2009" }, format: format, typename: "blokk2009", featureType: "blokk2009", featureNS: "blokknezegeto", feturePrefix: "blokknezegeto", geometryName: "bgeom" }); wfs.read({ callback: function(result) { var gml = result.features; n=0; for(i in gml) { egyik=gml[i]; document.getElementById("eredmeny").innerHTML="Blokk azonosito: "+egyik.attributes.BLOAZ+"
terulet (ha): "+egyik.attributes.BPTERHA; n++; } alert("ennyit talaltam: "+n); }/*, scope: this*/ }); From ahocevar at opengeo.org Sat Dec 12 13:59:33 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] How to issue custom WFS request in 2.8 In-Reply-To: References: Message-ID: <4B23E815.9000408@opengeo.org> Hi, your WFS returns invalid XML: http://att-it.homelinux.net:22080/cgi-bin/ms-5.4.2/blokknez.fcgi?service=wfs&version=1.0.0&request=getfeature&maxfeatures=1&typename=blokknezegeto:blokk2009 It returns features with a blokknezegeto namespace prefix, but no namespace uri is assigned to this prefix Regards, Andreas. Bal?zs B?mer wrote: > HI All, > > I try to issue custom WFS 1.0.0 GetFeature request (could be also > 1.1.0, doesn't matter). Goal is to count some attributes (or list them > later). However, there is always some error, now > > "An attempt was made to create or change an object in a way which is > incorrect with regard to namespaces" code: "14 > [Break on this error] node.setAttributeNS(uri, name, value);\n" > > What is the correct way to do this in OpenLayers 2.8? Something > similar worked in 2.7 but I need 2.8. > > thank you in advance, best regards: Bal?zs B?mer > > I do the following: > > > filter=new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.EQUAL_TO, > property: "bloaz", > value: kerespanel.findById('bloazid').value > }); > format = new OpenLayers.Format.WFST.v1_0_0({ > featureNS: 'blokknezegeto', > featurePrefix: 'blokknezegeto', > namespaces: { > "wfs": "http://www.opengis.net/wfs", > "ogc": "http://www.opengis.net/ogc" > } > }); > wfs = new OpenLayers.Protocol.WFS.v1_0_0({ > url: > "http://att-it.homelinux.net:22080/cgi-bin/ms-5.4.2/blokknez.fcgi", > params: { > filter: filter, > maxFeatures: 200, > srsName: "EPSG:23700", > typeName: "blokk2009" > }, > format: format, > typename: "blokk2009", > featureType: "blokk2009", > featureNS: "blokknezegeto", > feturePrefix: "blokknezegeto", > geometryName: "bgeom" > }); > wfs.read({ > callback: function(result) { > var gml = result.features; > n=0; > for(i in gml) { > egyik=gml[i]; > > document.getElementById("eredmeny").innerHTML="Blokk azonosito: > "+egyik.attributes.BLOAZ+"
terulet (ha): > "+egyik.attributes.BPTERHA; > n++; > } > alert("ennyit talaltam: "+n); > }/*, > scope: this*/ > }); > _______________________________________________ > 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 dragospenet at yahoo.com Sat Dec 12 14:16:19 2009 From: dragospenet at yahoo.com (Dragos Ion) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Different X/Y scale? Message-ID: <281760.88604.qm@web56505.mail.re3.yahoo.com> It is possible to have different scales (resolutions) for each X and Y (between zoom levels)? I use a custom grid map setup and I'd like for the biggest zoom level to have something like 1:0.9 (width over height) size. The other zoom levels are scaled "normally" (same amount for X and Y) ... there is only one value not a value pair in the [resolutions] array. Is this possible? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091212/36efecad/attachment.html From asle.benoni at gmail.com Sun Dec 13 10:41:36 2009 From: asle.benoni at gmail.com (Asle Benoni) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Styling problems of popup In-Reply-To: <27b07930910121058y198abc70u7a890a3f02334d84@mail.gmail.com> References: <27b07930910121058y198abc70u7a890a3f02334d84@mail.gmail.com> Message-ID: <27b07930912130741k7d17301g7c55244c047f6f9e@mail.gmail.com> Hello, I am still unable to get rid of the big space in the bottom of the framedCloud. Does anyone have a better solutions to styling the popups? Thanks. /asle 2009/10/12 Asle Benoni > Hello, > I have a MapFish app but I think this is a OpenLayers issue. > I have am putting info from a "OpenLayers.Control.WMSGetFeatureInfo" and > using this code for popups > > popup = new OpenLayers.Popup.FramedCloud( > "chicken", > map.getLonLatFromPixel(event.xy), > new OpenLayers.Size(200,200), > contentHtml, > null, > true > ); > map.addPopup(popup); > > This works fine but I get a very big padding or margin in the bottom of the popup. It seems that the more markers showing info, the bigger the bottom space. I have tried with all kinds of styling. I am able to style the inner content of #chicken but not the space below. I will try to attach two images to show. Anyone been there before? > > Thanks for any input! > > /asle > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091213/b01f8fd7/attachment.html From steffen.schwarz85 at googlemail.com Mon Dec 14 04:04:35 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw a RegularPolygon automatically by defining the coordinates Message-ID: <1260781475519-4163028.post@n2.nabble.com> Hello, in my app I can draw a polygon by setting up a openlayers.handler.regularpolygon on my map. This is working really fine and looks like this. boxControl = new OpenLayers.Control(); OpenLayers.Util.extend(boxControl, { draw: function() { this.box = new OpenLayers.Handler.RegularPolygon(boxControl, { "done": this.notice }, { sides: 4, irregular: true, persist: true }); this.box.activate(); }, notice: function(geom) { } But now it would be great if the polygon will be drawn by openlayers automatically. That means that I only want to define the coordinates and then the polygon will be shown on my map. Is this possible? Because with my code for the regularpolygon it is only possible to draw a polygon by myself. Is it possible to do this automatically by defining the coordinates? Thanks for the help. Regards stash -- View this message in context: http://n2.nabble.com/Draw-a-RegularPolygon-automatically-by-defining-the-coordinates-tp4163028p4163028.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Mon Dec 14 04:29:55 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw a RegularPolygon automatically by defining the coordinates In-Reply-To: <1260781475519-4163028.post@n2.nabble.com> References: <1260781475519-4163028.post@n2.nabble.com> Message-ID: Hi check out: http://dev.openlayers.org/docs/files/OpenLayers/Geometry/Polygon-js.html#OpenLayers.Geometry.Polygon.createRegularPolygon On Mon, Dec 14, 2009 at 10:04 AM, stash wrote: > > Hello, > in my app I can draw a polygon by setting up a > openlayers.handler.regularpolygon on my map. This is working really fine and > looks like this. > > boxControl = new OpenLayers.Control(); > ? ? ? OpenLayers.Util.extend(boxControl, { > ? ? ? ? ? draw: function() { > ? ? ? ? ? ? ? this.box = new OpenLayers.Handler.RegularPolygon(boxControl, > { "done": this.notice }, { sides: 4, irregular: true, persist: true }); > ? ? ? ? ? ? ? this.box.activate(); > ? ? ? ? ? }, > > ? ? ? ? ? notice: function(geom) > ? ? ? ? ? { ? ?} > > > But now it would be great if the polygon will be drawn by openlayers > automatically. That means that I only want to define the coordinates and > then the polygon will be shown on my map. Is this possible? Because with my > code for the regularpolygon it is only possible to draw a polygon by myself. > > Is it possible to do this automatically by defining the coordinates? > > Thanks for the help. > > Regards > stash > -- > View this message in context: http://n2.nabble.com/Draw-a-RegularPolygon-automatically-by-defining-the-coordinates-tp4163028p4163028.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 gentuser at gmail.com Mon Dec 14 04:44:49 2009 From: gentuser at gmail.com (carlofrancesco) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Start edge and end edge from Popup In-Reply-To: <1260536436443-4151122.post@n2.nabble.com> References: <1260536436443-4151122.post@n2.nabble.com> Message-ID: <1260783889019-4163191.post@n2.nabble.com> carlofrancesco wrote: > > Hi all. I'm new to this beautiful openLayer. What I am doing i simple: > using openlayer + pgrouting. > My question is this: I want to set over the map a Start Point and an End > Point to pass to pgrouting from a popup. I'll explain better. > I'm using the code shown here : > http://pgrouting.postlbs.org/wiki/Workshop-RoutingRequest > > In detail i?ll focus on: > > var SinglePoint = OpenLayers.Class.create(); > SinglePoint.prototype = > OpenLayers.Class.inherit(OpenLayers.Handler.Point, { > createFeature: function(evt) { > > this.control.layer.removeFeatures(this.control.layer.features); > > OpenLayers.Handler.Point.prototype.createFeature.apply(this, arguments); > } > }); > > // controls > controls = { > start: new OpenLayers.Control.DrawFeature(start, > SinglePoint), > stop: new OpenLayers.Control.DrawFeature(stop, SinglePoint) > } > for (var key in controls) { > map.addControl(controls[key]); > } > } > > function toggleControl(element) { > for (key in controls) { > if (element.value == key && element.checked) { > controls[key].activate(); > } else { > controls[key].deactivate(); > } > } > } > > > > This code works very well, i put start point and end point, i click on > compute and it trace the path. All perfect. > > But now i want to create a search form like google map, clicking on one > result and create a popup that show me name of the street and "start from > here" , and "arrive here", same of google map. > > So i wrote this code: > > function displayViaOnMap(response){ > if (response && response.responseXML) { > via_selezionata.removeFeatures(via_selezionata.features); > // parse the features > edges = response.responseXML.getElementsByTagName('edge'); > var features = []; > > for (var i = 0; i < edges.length; i++) { > var gid,street,fromleft, toleft, fromright, toright; > > gid=edges[i].getElementsByTagName('id')[0].textContent; > > street=edges[i].getElementsByTagName('street')[0].textContent; > > comune=edges[i].getElementsByTagName('comune')[0].textContent; > > /*fromleft=edges[i].getElementsByTagName('fromleft')[0].textContent; > > toleft=edges[i].getElementsByTagName('toleft')[0].textContent; > > fromright=edges[i].getElementsByTagName('fromright')[0].textContent; > > toright=edges[i].getElementsByTagName('toright')[0].textContent; */ > var g = > parser.read(edges[i].getElementsByTagName('wkt')[0].textContent); > > // non va bene features.push(new > OpenLayers.Feature.Vector(g)); > features.push(g); > } > //questo inserisce all'interno del vettore via le features appena > trovate > via_selezionata.addFeatures(features); > createPopup(features[0],street,comune); > > } > } > > function createPopup(feature,street,comune) { > > //rimuovo gli altri popup > if(map.popups.length>0){rimuoviPopups();} > var center= feature.geometry.getBounds().getCenterLonLat(); > var popup_info = "" + street + > "
Comune: " + comune + > "
a href='javascript:setStart("+center+")' > >Parti da qui /a" + > "
a href='javascript:setStop("+center+")' > >Arriva qui /a" + > ""; > > popup = new OpenLayers.Popup.AnchoredBubble("ViaInfo", > center, > new OpenLayers.Size(200,100), > popup_info, > null, > true); > > popup.setBackgroundColor("#bcd2ee"); > popup.setOpacity(.85); > map.addPopup(popup); > //mi centro la mappa sulla mia nuvolletta > map.setCenter(center, zoomz+1); > > } > > > function rimuoviPopups() { > while( map.popups.length ) { > map.removePopup(map.popups[0]); > } > > } > function setStart(x,y){ > > } > function setStop(x,y){ > > } > > > Now i need an help to create function setStart and setStop point. How i > can Initialize SinglePoint defined as an Handler Point to a Point on the > map like > > var point = new OpenLayers.Geometry.Point(x,y); > where x,y is coordinate of > feature.geometry.getBounds().getCenterLonLat(); > Thanks for any advice !! > Up, no suggestion? Thanks again -- View this message in context: http://n2.nabble.com/Start-edge-and-end-edge-from-Popup-tp4151122p4163191.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Mon Dec 14 05:27:47 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw a RegularPolygon automatically by defining the coordinates In-Reply-To: References: <1260781475519-4163028.post@n2.nabble.com> Message-ID: <1260786467074-4163357.post@n2.nabble.com> Ivan Grcic-2 wrote: > > Hi check out: > http://dev.openlayers.org/docs/files/OpenLayers/Geometry/Polygon-js.html#OpenLayers.Geometry.Polygon.createRegularPolygon > > thanks. exactly what i need -- View this message in context: http://n2.nabble.com/Draw-a-RegularPolygon-automatically-by-defining-the-coordinates-tp4163028p4163357.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gentuser at gmail.com Mon Dec 14 08:20:18 2009 From: gentuser at gmail.com (carlofrancesco) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Start edge and end edge from Popup [solution] In-Reply-To: <1260783889019-4163191.post@n2.nabble.com> References: <1260536436443-4151122.post@n2.nabble.com> <1260783889019-4163191.post@n2.nabble.com> Message-ID: <1260796818419-4164032.post@n2.nabble.com> Hi found a solution: function setStart(x,y){ var feature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x,y)); start.removeFeatures(start.features); start.addFeatures(feature); start.drawFeature(start.features, start_style); } function setStop(x,y){ var feature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x,y)); stop.removeFeatures(start.features); stop.addFeatures(feature); stop.drawFeature(stop.features, start_style); } Anyway thanks, bye ! carlofrancesco wrote: > > > > carlofrancesco wrote: >> >> Hi all. I'm new to this beautiful openLayer. What I am doing i simple: >> using openlayer + pgrouting. >> My question is this: I want to set over the map a Start Point and an End >> Point to pass to pgrouting from a popup. I'll explain better. >> I'm using the code shown here : >> http://pgrouting.postlbs.org/wiki/Workshop-RoutingRequest >> >> In detail i?ll focus on: >> >> var SinglePoint = OpenLayers.Class.create(); >> SinglePoint.prototype = >> OpenLayers.Class.inherit(OpenLayers.Handler.Point, { >> createFeature: function(evt) { >> >> this.control.layer.removeFeatures(this.control.layer.features); >> >> OpenLayers.Handler.Point.prototype.createFeature.apply(this, arguments); >> } >> }); >> >> // controls >> controls = { >> start: new OpenLayers.Control.DrawFeature(start, >> SinglePoint), >> stop: new OpenLayers.Control.DrawFeature(stop, SinglePoint) >> } >> for (var key in controls) { >> map.addControl(controls[key]); >> } >> } >> >> function toggleControl(element) { >> for (key in controls) { >> if (element.value == key && element.checked) { >> controls[key].activate(); >> } else { >> controls[key].deactivate(); >> } >> } >> } >> >> >> >> This code works very well, i put start point and end point, i click on >> compute and it trace the path. All perfect. >> >> But now i want to create a search form like google map, clicking on one >> result and create a popup that show me name of the street and "start from >> here" , and "arrive here", same of google map. >> >> So i wrote this code: >> >> function displayViaOnMap(response){ >> if (response && response.responseXML) { >> via_selezionata.removeFeatures(via_selezionata.features); >> // parse the features >> edges = >> response.responseXML.getElementsByTagName('edge'); >> var features = []; >> >> for (var i = 0; i < edges.length; i++) { >> var gid,street,fromleft, toleft, fromright, toright; >> >> gid=edges[i].getElementsByTagName('id')[0].textContent; >> >> street=edges[i].getElementsByTagName('street')[0].textContent; >> >> comune=edges[i].getElementsByTagName('comune')[0].textContent; >> >> /*fromleft=edges[i].getElementsByTagName('fromleft')[0].textContent; >> >> toleft=edges[i].getElementsByTagName('toleft')[0].textContent; >> >> fromright=edges[i].getElementsByTagName('fromright')[0].textContent; >> >> toright=edges[i].getElementsByTagName('toright')[0].textContent; */ >> var g = >> parser.read(edges[i].getElementsByTagName('wkt')[0].textContent); >> >> // non va bene features.push(new >> OpenLayers.Feature.Vector(g)); >> features.push(g); >> } >> //questo inserisce all'interno del vettore via le features appena >> trovate >> via_selezionata.addFeatures(features); >> createPopup(features[0],street,comune); >> >> } >> } >> >> function createPopup(feature,street,comune) { >> >> //rimuovo gli altri popup >> if(map.popups.length>0){rimuoviPopups();} >> var center= feature.geometry.getBounds().getCenterLonLat(); >> var popup_info = "" + street + >> "
Comune: " + comune + >> "
a href='javascript:setStart("+center+")' >> >Parti da qui /a" + >> "
a href='javascript:setStop("+center+")' >> >Arriva qui /a" + >> ""; >> >> popup = new OpenLayers.Popup.AnchoredBubble("ViaInfo", >> center, >> new OpenLayers.Size(200,100), >> popup_info, >> null, >> true); >> >> popup.setBackgroundColor("#bcd2ee"); >> popup.setOpacity(.85); >> map.addPopup(popup); >> //mi centro la mappa sulla mia nuvolletta >> map.setCenter(center, zoomz+1); >> >> } >> >> >> function rimuoviPopups() { >> while( map.popups.length ) { >> map.removePopup(map.popups[0]); >> } >> >> } >> function setStart(x,y){ >> >> } >> function setStop(x,y){ >> >> } >> >> >> Now i need an help to create function setStart and setStop point. How i >> can Initialize SinglePoint defined as an Handler Point to a Point on the >> map like >> >> var point = new OpenLayers.Geometry.Point(x,y); >> where x,y is coordinate of >> feature.geometry.getBounds().getCenterLonLat(); >> Thanks for any advice !! >> > > Up, no suggestion? Thanks again > -- View this message in context: http://n2.nabble.com/Start-edge-and-end-edge-from-Popup-tp4151122p4164032.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From madagu at gmail.com Mon Dec 14 09:02:57 2009 From: madagu at gmail.com (MadAGu) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] insert spatial data into mysql Message-ID: <1260799377919-4164235.post@n2.nabble.com> well i have little experience about all this stuff and i need some help... I created a vector layer in my web page, and i want any drawn polygon to be inserted into mysql using GeoJSON. How can i do that? Thank you for your answers :) -- View this message in context: http://n2.nabble.com/insert-spatial-data-into-mysql-tp4164235p4164235.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Mon Dec 14 10:39:36 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Loading asynchronous data Message-ID: Hi, I'm looking how to add new points to the map calling a local webservice when a user does a concrete action, and I would like to know what are differences between OpenLayers.Request, OpenLayers.LoadURL or doing an XMLHttpRequest, or if there is any example that can help to clear the doubt. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091214/d74f34f4/attachment.html From crschmidt at metacarta.com Mon Dec 14 10:50:52 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Loading asynchronous data In-Reply-To: References: Message-ID: <20091214155052.GE5224@metacarta.com> On Mon, Dec 14, 2009 at 04:39:36PM +0100, JuKiM wrote: > Hi, > > I'm looking how to add new points to the map calling a local webservice when > a user does a concrete action, and I would like to know what are differences > between OpenLayers.Request, OpenLayers.LoadURL or doing an XMLHttpRequest, OpenLayers.Request: New Hotness OpenLayers.loadUrl: Old stuff XMLHttpRequest: Not cross-browser friendly, OpenLayers.REquest is a wrapper around this. -- Chris > or if there is any example that can help to clear the doubt. > > Thanks! > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From gentuser at gmail.com Mon Dec 14 10:56:22 2009 From: gentuser at gmail.com (Carlo Francesco Romano) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Loading asynchronous data In-Reply-To: References: Message-ID: Hi try this OpenLayers.loadURL("url", GetParameter, null (for unhandled not ok callback function) , Function); refernces here http://dev.openlayers.org/docs/files/OpenLayers/Ajax-js.html#OpenLayers.loadURL 2009/12/14 JuKiM > Hi, > > I'm looking how to add new points to the map calling a local webservice > when a user does a concrete action, and I would like to know what are > differences between OpenLayers.Request, OpenLayers.LoadURL or doing an > XMLHttpRequest, or if there is any example that can help to clear the doubt. > > Thanks! > > _______________________________________________ > 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/20091214/a8c67fc3/attachment.html From rifins at gmail.com Mon Dec 14 11:04:56 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Loading asynchronous data In-Reply-To: References: Message-ID: Wop, I think I'll try to advance with the OpenLayers.Request.. Thanks! 2009/12/14 Carlo Francesco Romano > Hi try this > > OpenLayers.loadURL("url", > GetParameter, > null (for unhandled not ok callback function) , > > Function); > > refernces here http://dev.openlayers.org/docs/files/OpenLayers/Ajax-js.html#OpenLayers.loadURL > > > 2009/12/14 JuKiM > >> Hi, >> >> I'm looking how to add new points to the map calling a local webservice >> when a user does a concrete action, and I would like to know what are >> differences between OpenLayers.Request, OpenLayers.LoadURL or doing an >> XMLHttpRequest, or if there is any example that can help to clear the doubt. >> >> Thanks! >> >> _______________________________________________ >> 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/20091214/e8f61ed2/attachment.html From martijnsendenspam at gmail.com Mon Dec 14 11:29:57 2009 From: martijnsendenspam at gmail.com (sendeman) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Split a line feature with a MultiLineString Message-ID: <1260808197473-4165167.post@n2.nabble.com> Hi All, I have an OpenLayers application that in which I have an XYZ-subsurface model residing in a MySQL database table. The model has a record for each voxel that has an X, Y and Z value and a value that indicates the soil type (e.g. 1 for clay, 2 for loam, etcetera). Using php, jQuery and OpenLayers I am able to retrieve all the relevant records for a location when a user clicks on the map. The php script returns a column with all the soillayers. Now what I also want to do is create the possibility for a user to draw a section line on the map and then get a vertical cross-section from the XYZ-model. To do this I mean to let the user draw a line and using the featureadded event I want to split the drawn line at every intersection with the grid of the XYZ model. I thought this should be possible with the http://dev.openlayers.org/docs/files/OpenLayers/Geometry/MultiLineString-js.html#OpenLayers.Geometry.MultiLineString.split split function for the MultiLineString . I built a WKT-string to create a MultiLineString for the grid. I have added the cell size as a variable to the script, so it will be reusable for models with different cell sizes. I want to intersect the drawn line with the created grid. This doesn't work. I get an error in Firebug: SectionGridFeature.split is not a function http://localhost/geoviewer/javascript/crosssection.js Line 75 ed. This would be the line stating: 'SectionGridFeature.split(varSections.features[0]);' For the script I made, see below. This doesn't include the entire openlayers script I built, but just the section I'm using for the creation of the cross-section. My question is: how can I make the split function work? I fear something may be wrong with the MultiLineString... Best regards, Martijn Senden. // JavaScript Document for drawing profile lines that are used for drawing // cross-sections through the Rockworks XYZ-model in the MWH Geoviewer // V. 1.0 By Martijn Senden, MWH B.V., The Netherlands // Project parameters var CellSize = 10; //Size of the grid cells in the XYZ-model // Stylemap for Cross-section line function initCrossSection() { var StyleCustomCrossSectionLine = new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ strokeColor: "#ffff00", strokeWidth: 2.5 }) }); var StyleCustomGrid = new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ strokeColor: "#ffff00", fillColor: "#ffbb00", strokeWidth: 2.5 }) }); // Addition of cross-section layer to map and enter drawing mode var varSections = new OpenLayers.Layer.Vector("Section Line", { visibility: true, styleMap: StyleCustomCrossSectionLine}); map.addLayer(varSections); var varSection = new OpenLayers.Control.DrawFeature( varSections, OpenLayers.Handler.Path, {displayClass: 'olControlDrawFeaturePolygon'} ); varSections.events.on({ //Delete previous line before new feature is added "beforefeatureadded": function(evt) { var i, len, toDestroy = [] for(i=0,len=varSections.features.length; i I am going to try this again, and include the relevant code this time in the post. How can I enable default event handling for a textfield input in a custom control? When I place a textfield into a control on the map, it does not receive mouse events or keyboard events. How can I make the textfield receive these events and handle them as it normally would? Any help greatly appreciated. This is example of what I am talking about: http://javamike9.webs.com/oltextControl.htm Here is the (very simple) javascript portion of the problem: OpenLayers.Control.TextFieldControl = OpenLayers.Class(OpenLayers.Control, { draw: function() { OpenLayers.Control.prototype.draw.apply(this, arguments); var element = document.createElement('div'); element.className = this.displayClass + 'Element'; var inputElement = document.createElement('input'); inputElement.type='text'; inputElement.value='test'; element.appendChild(inputElement); //element.innerHTML = ""; this.div.appendChild(element); return this.div; }, CLASS_NAME: 'OpenLayers.Control.TextFieldControl' }); function init() { var map = new OpenLayers.Map( 'map' ); var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); map.addLayer(layer); var myCustomControl = new OpenLayers.Control.TextFieldControl(); map.addControl(myCustomControl); map.zoomToMaxExtent(); } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091214/d02e1f46/attachment.html From bamerbalazs at gmail.com Mon Dec 14 16:06:11 2009 From: bamerbalazs at gmail.com (=?UTF-8?B?QmFsw6F6cyBCw6FtZXI=?=) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] WFS transaction example not working Message-ID: Hi All, I try to reverse-engineer some examples to be used for my custom WFS GetFeature (and later other) calls. I've copied the example http://dev.openlayers.org/releases/OpenLayers-2.8/examples/wfs-protocol-transactions.html to my server to be able to play with it. I extracted the JS code into separate .js file, and changed pathes, everything else is original. I use many-file OpenLayers 2.8 with it. However, the page http://att-it.homelinux.net:22080/ment/ complains about this.createFeatureXML not being a function in OpenLayers/Format/GML:595 (write function) while "this" is of type OpanLayers.Format.WFST.v1_1_0 Is the OpenLayers library used in examples definitely the same as the one to be downloaded? thank you in advance, best regards: Bal?zs From steffen.schwarz85 at googlemail.com Tue Dec 15 02:28:53 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw a RegularPolygon automatically by defining the coordinates In-Reply-To: <1260786467074-4163357.post@n2.nabble.com> References: <1260781475519-4163028.post@n2.nabble.com> <1260786467074-4163357.post@n2.nabble.com> Message-ID: <1260862133587-4168655.post@n2.nabble.com> Hi, I have another question concerning the createRegularPolygon. I didn't find out until now how to draw a rectangle (with different lenghts of the sides). every time i do the createRegularPolygon command I get a square with equal length of the sides. Is it possible to draw a rectangle with createRegularPolygon? regards stash -- View this message in context: http://n2.nabble.com/Draw-a-RegularPolygon-automatically-by-defining-the-coordinates-tp4163028p4168655.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From martijnsendenspam at gmail.com Tue Dec 15 03:37:06 2009 From: martijnsendenspam at gmail.com (sendeman) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw a RegularPolygon automatically by defining the coordinates In-Reply-To: <1260862133587-4168655.post@n2.nabble.com> References: <1260781475519-4163028.post@n2.nabble.com> <1260786467074-4163357.post@n2.nabble.com> <1260862133587-4168655.post@n2.nabble.com> Message-ID: <1260866226651-4168838.post@n2.nabble.com> stash wrote: > > Is it possible to draw a rectangle with createRegularPolygon? > I think not. A rectangle with irregular sides wouldn't be regular. createRegularePolygon can only create polygons with equal length sides. Regards, Martijn. -- View this message in context: http://n2.nabble.com/Draw-a-RegularPolygon-automatically-by-defining-the-coordinates-tp4163028p4168838.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Tue Dec 15 03:44:48 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw a RegularPolygon automatically by defining the coordinates In-Reply-To: <1260866226651-4168838.post@n2.nabble.com> References: <1260781475519-4163028.post@n2.nabble.com> <1260786467074-4163357.post@n2.nabble.com> <1260862133587-4168655.post@n2.nabble.com> <1260866226651-4168838.post@n2.nabble.com> Message-ID: http://dev.openlayers.org/docs/files/OpenLayers/Geometry/Rectangle-js.html says: This class is not supported, and probably isn?t what you?re looking for. Instead, most users probably want something like: var poly = new OpenLayers.Bounds(0,0,10,10).toGeometry(); This will create a rectangular Polygon geometry. Use docs more often ;) cheers On Tue, Dec 15, 2009 at 9:37 AM, sendeman wrote: > > > stash wrote: >> >> Is it possible to draw a rectangle with createRegularPolygon? >> > > I think not. A rectangle with irregular sides wouldn't be regular. > createRegularePolygon can only create polygons with equal length sides. > > Regards, Martijn. > -- > View this message in context: http://n2.nabble.com/Draw-a-RegularPolygon-automatically-by-defining-the-coordinates-tp4163028p4168838.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 ibrahimsaricicek at gmail.com Tue Dec 15 04:03:19 2009 From: ibrahimsaricicek at gmail.com (ibrahimsaricicek) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Wfs character set Message-ID: <1260867799972-4168922.post@n2.nabble.com> Hi all; I'm using Postgis tables in Latin5 character encoding. Does Openlayers need Utf-8 characterset? Some of the characters on my pop-ups can't be seen originally. How can i prevent this situation? Thanks all.. -- View this message in context: http://n2.nabble.com/Wfs-character-set-tp4168922p4168922.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Tue Dec 15 04:42:26 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw a RegularPolygon automatically by defining the coordinates In-Reply-To: References: <1260781475519-4163028.post@n2.nabble.com> <1260786467074-4163357.post@n2.nabble.com> <1260862133587-4168655.post@n2.nabble.com> <1260866226651-4168838.post@n2.nabble.com> Message-ID: <1260870146964-4169076.post@n2.nabble.com> Ivan Grcic-2 wrote: > > http://dev.openlayers.org/docs/files/OpenLayers/Geometry/Rectangle-js.html > > thanks for the help. now it works regards -- View this message in context: http://n2.nabble.com/Draw-a-RegularPolygon-automatically-by-defining-the-coordinates-tp4163028p4169076.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Tue Dec 15 05:54:45 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Drawing WFS removes all previous features Message-ID: Hi list, I have a vector layer with some points, and when I create a new point, it is added to the vector layer and saved correctly in the datasource. But, if I do a zoom in, the only feature I can see is the last new one, the other aren't displayed anymore. After debuging the code, I've seen that when the success event of the save strategy is raised, there is only the last feature in the layer.. And of course, only that one is drawn. When I reload the page, all the new faeatures are loaded and displayed ok in the map. I do the following to load and create points: function init(){ oSaveStrategyPoint = new OpenLayers.Strategy.Save(); oSaveStrategyPoint.events.register('success', '', getSaveResult); oSaveStrategyPoint.events.register('fail', '', getSaveResult); wfsPoints = new OpenLayers.Layer.Vector("WFS Points", { strategies: [new OpenLayers.Strategy.BBOX(), new OpenLayers.Strategy.Cluster({ distance: 20, threshold: 10 }), oSaveStrategyPoint], protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", featureType: "points", srsName: "EPSG:23031", featureNS: "http://www.mapmap.org/g4wd", geometryName: "the_geom", extractAttributes: false }), styleMap: myPointStyle, displayInLayerSwitcher: false }); map.addLayer(wfsPoints); controls = { drawPoint:new OpenLayers.Control.DrawFeature(wfsPoints, OpenLayers.Handler.Point, { displayClass: 'olControlDrawFeaturePoint' }), selectPoint:new OpenLayers.Control.SelectFeature(wfsPoints, { onSelect: onSelectFeat, onUnselect: onUnselectFeat }), modifyPoint: new OpenLayers.Control.ModifyFeature(wfsPoints) } controls.drawPoint.featureAdded = function(feature) { controls.drawPoint.layer.eraseFeatures([feature]); selectedFeature = feature; onSelectFeat(feature); controls.drawPoint.layer.drawFeature(feature); } for (var key in controls) { map.addControl(controls[key]); } } function onSelectFeat(feature) { var szPopupContent; selectedFeature = feature; feature.state = OpenLayers.State.UPDATE; szPopupContent = "
" + "" + "
" + "Element:" + feature.id + "
" + "
" + "Position:" + feature.geometry.getBounds().getCenterLonLat() + "
" + "
" + "att_1:
" + "
" + "att_2:
" + "
" + "" + "
"; popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), null, szPopupContent, null, true, onPopupClose); map.addPopup(popup); } function SaveFeatures() { if (controls["drawPoint"].active) { selectedFeature.state = OpenLayers.State.INSERT; } else { selectedFeature.state = OpenLayers.State.UPDATE; } selectedFeature.attributes.att_1 = document.getElementById("txtAttribute1").value; selectedFeature.attributes.att_2 = document.getElementById("txtAttribute2").value; oSaveStrategyPoint.save(); } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091215/5f70bdbe/attachment.html From rifins at gmail.com Tue Dec 15 06:16:13 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Drawing WFS removes all previous features In-Reply-To: References: Message-ID: It is possible, that my problem begin with the cluster strategy? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091215/d6396183/attachment.html From igrcic at gmail.com Tue Dec 15 07:50:00 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Drawing WFS removes all previous features In-Reply-To: References: Message-ID: Hi, yes probably its something like that. Try removing cluster strategy and check out if everything comes out ok On Tue, Dec 15, 2009 at 12:16 PM, JuKiM wrote: > It is possible, that my problem begin with the cluster strategy? > Thanks! > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From rifins at gmail.com Tue Dec 15 08:59:33 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Drawing WFS removes all previous features In-Reply-To: References: Message-ID: Yes, It was the cluster strategy... I've removed it, and now everything seems to be ok. In order to load the cluster, I'll have to make it another way.. Thanks! 2009/12/15 Ivan Grcic > Hi, > > yes probably its something like that. Try removing cluster strategy > and check out if everything comes out ok > > On Tue, Dec 15, 2009 at 12:16 PM, JuKiM wrote: > > It is possible, that my problem begin with the cluster strategy? > > Thanks! > > _______________________________________________ > > 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/20091215/6292a9a0/attachment.html From jimmy.aumard at gmail.com Tue Dec 15 11:13:29 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] OpenLayers.Control.ScaleLine give different measure than OpenLayers.Control.Measure Message-ID: Hi, I want to know if it's possible to configure OpenLayers.Control.ScaleLine to use "geodesic" because I use OpenLayers.Control.Measure with geodesic=true (because geodesic=false give me wrong distance) and the scale line give me another measure. Thanks Jim -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091215/32affe4c/attachment.html From rifins at gmail.com Wed Dec 16 03:28:35 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Draw line vector, with points.. In-Reply-To: References: Message-ID: Hi, And how can I modify the PostGIS SQL? I don't know how/where I can do it.. Thanks! 2009/12/10 David Fawcett > I am sure that in the context of WFS-T it is more complicated, but > would it work if you used a linestring layer and modified your PostGIS > SQL to wrap your points in something like a ST_MakeLine() function? > > On Thu, Dec 10, 2009 at 9:39 AM, JuKiM wrote: > > > > Hi, > > I don't know if maybe this question is out of interest in this list, or > if > > it is an obvious thing that I can't see.. > > But, I would like to know if it is possible to draw a line making a WFS > > request, to a data source in which the geometry is POINT. > > If the geometry of the datasource is POINT it draws points, and if the > > geometry is LINESTRING then it draws a line... But, how to draw a line > when > > the source is a couple of POINT? > > I'm creating the vector layer like this: > > wfs = new OpenLayers.Layer.Vector("WFST-Vector", { > > strategies: [new OpenLayers.Strategy.BBOX(), oSaveStrategy], > > protocol: new OpenLayers.Protocol.WFS({ > > version: "1.0.0", > > url: "http://localhost:8080/geoserver/wfs", > > featureType: "pointsDS", > > srsName: "EPSG:23031", > > featureNS: "http://www.mapmap.org/g4wd", > > geometryName: "the_geom", > > schema: > > " > http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&TypeName=G4WD:pointsDS > " > > }) > > }); > > And the G4WD:pointsDS' datasource is a postgis table, where the geometry > > field is POINT. > > Thanks.. > > _______________________________________________ > > 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/20091216/74f43d72/attachment.html From haftish21 at gmail.com Wed Dec 16 04:13:25 2009 From: haftish21 at gmail.com (Haftish 21) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] modification with polygon style Message-ID: <52cf5e870912160113h766f2937q32468a3dce44c9a2@mail.gmail.com> I got a WFS-T that operates on a polygon feature. Without a style rule everything goes right. But, with style defined for it, the nodes to modify the geometry don't show up. Any clue?? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091216/d4dda82a/attachment.html From ibrahimsaricicek at gmail.com Wed Dec 16 04:16:41 2009 From: ibrahimsaricicek at gmail.com (ibrahimsaricicek) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Wfs character set In-Reply-To: <1260867799972-4168922.post@n2.nabble.com> References: <1260867799972-4168922.post@n2.nabble.com> Message-ID: <1260955001185-4174500.post@n2.nabble.com> Hi; I have two different databases. and some of my wfs objects come from a utf8 and and others latin5 databases. is it possible to show true type characters in this situation??? ibrahimsaricicek wrote: > > Hi all; > > I'm using Postgis tables in Latin5 character encoding. > Does Openlayers need Utf-8 characterset? > Some of the characters on my pop-ups can't be seen originally. > How can i prevent this situation? > > Thanks all.. > -- View this message in context: http://n2.nabble.com/Wfs-character-set-tp4168922p4174500.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kwonghu at hotmail.com Wed Dec 16 08:10:29 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] WMS layer: Limit on lat/long Message-ID: Hi, I would like to prevent Openlayers from requesting WMS data when it goes pass certain range(lat,long). That means stop asking WMS servers for map data. Is there a way i can do that? Currently, my server cannot generate wms data once it reaches a certain range. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091216/88ac55d7/attachment.html From igrcic at gmail.com Wed Dec 16 08:38:13 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] WMS layer: Limit on lat/long In-Reply-To: References: Message-ID: Hi, define maxExtent(bounds) for you layer, and make sure displayOutsideMaxExtent:true is set (default value) cheers On Wed, Dec 16, 2009 at 2:10 PM, Kwong Hu Kiu wrote: > Hi, > > I would like to prevent Openlayers from requesting WMS data when it goes > pass certain range(lat,long). > That means stop asking WMS servers for map data. > > Is there a way i can do that? > > Currently, my server cannot generate wms data once it reaches a certain > range. > > Thanks > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From ahocevar at opengeo.org Wed Dec 16 08:53:54 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Wfs character set In-Reply-To: <1260955001185-4174500.post@n2.nabble.com> References: <1260867799972-4168922.post@n2.nabble.com> <1260955001185-4174500.post@n2.nabble.com> Message-ID: <4B28E672.5020102@opengeo.org> On 2009-12-16 10:16, ibrahimsaricicek wrote: > I have two different databases. and some of my wfs objects come from a utf8 > and and others latin5 databases. > is it possible to show true type characters in this situation??? > I don't see how character encoding and true type are related. But one hint I can give you is to handle character encoding on the server side, and send communicate with the client using just one encoding (e.g. utf-8). Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Wed Dec 16 08:56:24 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] modification with polygon style In-Reply-To: <52cf5e870912160113h766f2937q32468a3dce44c9a2@mail.gmail.com> References: <52cf5e870912160113h766f2937q32468a3dce44c9a2@mail.gmail.com> Message-ID: <4B28E708.8010006@opengeo.org> Most likely your styles don't have a pointRadius property. It is always best to extend one of the default styles in OpenLayers.Feature.Vector.style to avoid such problems. Regards, Andreas. On 2009-12-16 10:13, Haftish 21 wrote: > > I got a WFS-T that operates on a polygon feature. Without a style rule > everything goes right. But, with style defined for it, the nodes to > modify the geometry don't show up. Any clue?? > > > _______________________________________________ > 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 Wed Dec 16 09:10:08 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] ModifyFeatureControl - vertices styling Message-ID: <4B28EA40.3010601@mapgears.com> Hi, Is there a simple way (without changing the code) to have a specific style for the vertices when modifying a feature with the ModifyFeatureControl ? There's such a possibility for the virtualVertices already, but doesn't seem to have any for the normal ones : they always have the 'default' style applied. Is there a recipe for this ? Many thanks, -- Alexandre Dub? Mapgears www.mapgears.com From shawn at niagarafalls.ca Wed Dec 16 09:31:55 2009 From: shawn at niagarafalls.ca (soatley) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] ModifyFeatureControl - vertices styling In-Reply-To: <4B28EA40.3010601@mapgears.com> References: <4B28EA40.3010601@mapgears.com> Message-ID: <1260973915975-4175770.post@n2.nabble.com> I just went through this myself. In my case, I was already taking advantage of using vector styling context (similar to this example: http://www.openlayers.org/dev/examples/styles-context.html http://www.openlayers.org/dev/examples/styles-context.html ) I found that the points that are used for the vertices have a property called _sketch. This allowed me to pick out those particular points and style them accordingly. This solution may be overkill for what you are looking for though.... /* styling for the vector layers */ /* different styles to apply depending on the type of vector */ vectorTypeLookup["normal"] = { fillColor: '#ee9900', fillOpacity: 0.4, strokeWidth: 1.0, strokeColor: '#ee9900', pointRadius: 6 }; vectorTypeLookup["polygon"] = { fillColor: '#ee9900', fillOpacity: 0.4, strokeWidth: 1.0, strokeColor: '#ee9900', pointRadius: 6 }; vectorTypeLookup["point"] = { fillColor: '#ee9900', fillOpacity: 0.4, strokeWidth: 2.0, strokeColor: '#ee9900', pointRadius: 8 }; vectorTypeLookup["line"] = { fillColor: '#ee9900', fillOpacity: 0.4, strokeWidth: 3.0, strokeColor: '#ee9900', pointRadius: 6 }; vectorTypeLookup["label"] = { fillColor: '#ee9900', fillOpacity: 0.4, strokeWidth: 1.0, strokeColor: '#ee9900', pointRadius: 3, labelAlign: "tr", fontSize: "12px", fontColor: "#005596", fontWeight: "bold", labelSelect: true }; vectorTypeLookup["sketch"] = { fillColor: '#005596', fillOpacity: 0.4, strokeWidth: 3.0, strokeColor: '#005596', pointRadius: 6 }; /* create a template that will use the functions to get the appropriate colour */ var vectorTemplate = { fillColor: "${getFillColour}", fillOpacity: "${getFillOpacity}", strokeWidth: "${getStrokeWidth}", strokeColor: "${getStrokeColour}", pointRadius: "${getPointRadius}", labelAlign: "${getLabelAlign}", fontSize: "${getFontSize}", fontColor: "${getFontColour}", fontWeight: "${getFontWeight}", labelSelect: "${getLabelSelect}", label: "${getLabel}" }; /* the style will use the context when determining the appropriate style - see the vectorStyle declaration - ex. drawing a polygon on the drawLayer. 1) drawLayer is assigned the vectorStyleMap to detrmine the style 2) The vectorStyleMap uses the vectorStyle rule to know what style properties are available 3) The vectorStyle refers to vectorTemplate to configure the different properties (fillColor, strokeWidth). The vectorContext is used to evaluate the ${...} items 4) Each function in vectorContext returns the appropriate property value */ var vectorContext = { getVectorType: function(feature) { try { if (typeof (feature._sketch) !== "undefined") { return vectorTypeLookup["sketch"]; /* used when modifying items */ } else if (feature.geometry.CLASS_NAME.search(/polygon$/i) >= 0) { return vectorTypeLookup["polygon"]; } else if (feature.geometry.CLASS_NAME.search(/point$/i) >= 0 && typeof (feature.attributes.label) !== "undefined") { /* labels are point vectors */ return vectorTypeLookup["label"]; } else if (feature.geometry.CLASS_NAME.search(/point$/i) >= 0) { return vectorTypeLookup["point"]; } else if (feature.geometry.CLASS_NAME.search(/linestring$/i) >= 0) { return vectorTypeLookup["line"]; } else { /*who knows.... */ return vectorTypeLookup["normal"]; } } catch (e) { return vectorTypeLookup["normal"]; } }, getFillColour: function(feature) { return vectorContext.getVectorType(feature).fillColor; }, getFillOpacity: function(feature) { return vectorContext.getVectorType(feature).fillOpacity; }, getStrokeWidth: function(feature) { return vectorContext.getVectorType(feature).strokeWidth; }, getStrokeColour: function(feature) { return vectorContext.getVectorType(feature).strokeColor; }, getPointRadius: function(feature) { return vectorContext.getVectorType(feature).pointRadius; }, getLabel: function(feature) { if (typeof (feature.attributes.label) != "undefined") { /* return the label */ return feature.attributes.label; } else { return ""; /* nothing */ } }, getLabelAlign: function(feature) { try { return vectorContext.getVectorType(feature).labelAlign; } catch (e) { return ""; } }, getFontSize: function(feature) { try { return vectorContext.getVectorType(feature).fontSize; } catch (e) { return ""; } }, getFontColour: function(feature) { try { return vectorContext.getVectorType(feature).fontColor; } catch (e) { return ""; } }, getFontWeight: function(feature) { try { return vectorContext.getVectorType(feature).fontWeight; } catch (e) { return ""; } }, getLabelSelect: function(feature) { try { return vectorContext.getVectorType(feature).labelSelect; } catch (e) { return false; } } }; var vectorStyle = new OpenLayers.Style(vectorTemplate, { context: vectorContext }); var vectorSelected = new OpenLayers.Style({ fillColor: "#ff0000", fillOpacity: "0.4", strokeWidth: "2.0", strokeColor: "#ff0000", pointRadius: "8" }); vectorStyleMap = new OpenLayers.StyleMap({ "default": vectorStyle, "select": vectorSelected }); drawLayer = new OpenLayers.Layer.Vector("Drawing", { protocol: gearsProtocol, visibility: false, styleMap: vectorStyleMap }); That is the code that styles all my vectors. Depending on the vector type, I style it differently. You can see how in the getVectorType it checks to see if _sketch is not undefined (meaning it is assigned) and if so, it must be a modify vertex. Hope that helps! Shawn Alexandre Dube wrote: > > Hi, > > Is there a simple way (without changing the code) to have a specific > style for the vertices when modifying a feature with the > ModifyFeatureControl ? There's such a possibility for the > virtualVertices already, but doesn't seem to have any for the normal > ones : they always have the 'default' style applied. > > Is there a recipe for this ? > > Many thanks, > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/ModifyFeatureControl-vertices-styling-tp4175625p4175770.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Wed Dec 16 09:56:56 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] ModifyFeatureControl - vertices styling In-Reply-To: <1260973915975-4175770.post@n2.nabble.com> References: <4B28EA40.3010601@mapgears.com> <1260973915975-4175770.post@n2.nabble.com> Message-ID: <4B28F538.4020500@mapgears.com> soatley wrote: > That is the code that styles all my vectors. Depending on the vector type, > I style it differently. You can see how in the getVectorType it checks to > see if _sketch is not undefined (meaning it is assigned) and if so, it must > be a modify vertex. > > Hope that helps! > Yep, that helps a lot indeed. That's what I was looking for. Thanks, -- Alexandre Dub? Mapgears www.mapgears.com From jimmy.aumard at gmail.com Wed Dec 16 10:42:21 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] save Filter Message-ID: Hello, I use filter like that: var filter= new OpenLayers.Filter.FeatureId({ fids: ["franchises.5"] }); var filter_1_1 = new OpenLayers.Format.Filter({version: "1.1.0"}); var xml = new OpenLayers.Format.XML(); xml.write(filter_1_1.write(filter)); This give me :"" I save this in my database. It's possible to change strings to filter? How can save filters? Cheers -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091216/f88eb854/attachment.html From zaza1851983ml at googlemail.com Wed Dec 16 11:50:54 2009 From: zaza1851983ml at googlemail.com (Moataz Elmasry) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Examples are down Message-ID: <4B290FEE.9040102@googlemail.com> Hello List Running the examples on http://openlayers.org/dev/examples/ I get a js error that the OpenLayers.(anything) is not defined, I didn't go through all the examples, but maybe a path has been changed recently? Thnx alot, regards Moataz From stefano.piazza at univr.it Wed Dec 16 11:56:40 2009 From: stefano.piazza at univr.it (Stefano Piazza) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Superimpose an image layer to another layer Message-ID: <58646c030912160856v741097c7rb75319f7ee69fed1@mail.gmail.com> Hello guys, I'm trying to enhance the information of a Layer.Google element with an Image Layer. The goal is to display the project of a building over the google layer. I thought the best way to do it was using a Layer.Image, but AFAICS when the image is visible all the space left free from the image is filled with a white opaque color instead of being transparent, so the google layer behind is not visible. I checked the examples and documentation but I cannot find a solution. Do you have any idea? Or maybe Openlayers API provide a better way to do what I want? Here is the code, thank you: --------------------------------------------------------------------------- CODE var options = { ??projection: new OpenLayers.Projection("EPSG:900913"), ??displayProjection: new OpenLayers.Projection("EPSG:4326"), ??units: "m", ??numZoomLevels: 18, ??maxResolution: 156543.0339, ??visibility: true, ??maxExtent: new OpenLayers.Bounds(10, 10, -10, -10) }; map = new OpenLayers.Map('map'); // creating layers var customImage = new OpenLayers.Layer.Image('Map', 'image.jpg', new OpenLayers.Bounds(10 ,10, -10, -10 ? ),?new OpenLayers.Size(437, 300), this.options); var gmap = new OpenLayers.Layer.Google("Google Streets", {'sphericalMercator': true}); //adding to map map.addLayers([gmap, customImage]); map.addControl(new OpenLayers.Control.LayerSwitcher()); if (!map.getCenter()) { ?? ?map.zoomToMaxExtent() } From ahocevar at opengeo.org Wed Dec 16 13:39:19 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: <4B292957.6000406@opengeo.org> On 2009-12-16 16:42, Jimmy Aumard wrote: > I use filter like that: > > var filter= new OpenLayers.Filter.FeatureId({ > fids: ["franchises.5"] > }); > > var filter_1_1 = new OpenLayers.Format.Filter({version: "1.1.0"}); > var xml = new OpenLayers.Format.XML(); > xml.write(filter_1_1.write(filter)); > > This give me :" xmlns:ogc="http://www.opengis.net/ogc"> fid="franchises.5"/>" > > I save this in my database. > > It's possible to change strings to filter? var filter_1_1 = new OpenLayers.Format.Filter({version: "1.1.0"}); var filter = filter_1_1.read(filterString); > How can save filters? e.g. as part of a Rule in an SLD document if you use the filter for WMS rendering. But although I wouldn't do it, you can of course also save it as XML snippet in a database field. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Wed Dec 16 13:47:02 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Superimpose an image layer to another layer In-Reply-To: <58646c030912160856v741097c7rb75319f7ee69fed1@mail.gmail.com> References: <58646c030912160856v741097c7rb75319f7ee69fed1@mail.gmail.com> Message-ID: <4B292B26.3090800@opengeo.org> Hi, jpeg images do not support transparency. Use gif or png instead, and make sure that the background of your image is really transparent. Regards, Andreas. On 2009-12-16 17:56, Stefano Piazza wrote: > Hello guys, > > I'm trying to enhance the information of a Layer.Google element with > an Image Layer. > The goal is to display the project of a building over the google layer. > I thought the best way to do it was using a Layer.Image, but AFAICS > when the image is visible all the space left free from the image is > filled with a white opaque color instead of being transparent, so the > google layer behind is not visible. > I checked the examples and documentation but I cannot find a solution. > Do you have any idea? > Or maybe Openlayers API provide a better way to do what I want? > Here is the code, thank you: > > --------------------------------------------------------------------------- CODE > var options = { > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: "m", > numZoomLevels: 18, > maxResolution: 156543.0339, > visibility: true, > maxExtent: new OpenLayers.Bounds(10, 10, -10, -10) > }; > > map = new OpenLayers.Map('map'); > > // creating layers > var customImage = new OpenLayers.Layer.Image('Map', 'image.jpg', new > OpenLayers.Bounds(10 ,10, -10, -10 ), new OpenLayers.Size(437, 300), > this.options); > var gmap = new OpenLayers.Layer.Google("Google Streets", > {'sphericalMercator': true}); > > //adding to map > map.addLayers([gmap, customImage]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > if (!map.getCenter()) { > map.zoomToMaxExtent() > } > _______________________________________________ > 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 m.sirin07 at googlemail.com Thu Dec 17 04:34:03 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Buffering and resizing a point Message-ID: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> hi, since there isn't a buffer function integrated in openlayers i have to find other ways to simulate buffering a point and displaying it: function pointBuffer(lat, lon, radius,color){ polygonLayer.removeFeatures(polygonLayer.features); var style = { fillColor: '#ff0000', strokeWidth: 1, pointRadius: radius, // in pixels }; var point = new OpenLayers.Geometry.Point(lat, lon); var feature = new OpenLayers.Feature.Vector(point,null, style); polygonLayer.addFeatures([feature]); polygonLayer.setOpacity(0.5); } --------------------------------------------------------------------------------------------------------------- ... var lonlat1=new OpenLayers.LonLat(parseInt(radius),0); var lonlat2=new OpenLayers.LonLat(parseInt(radius*2),0); var pixel1=map.getLayerPxFromLonLat(lonlat1); var pixel2=map.getLayerPxFromLonLat(lonlat2); var dist= Math.abs(parseInt(pixel2.x)-parseInt(pixel1.x)); createCircle(x,y,dist); -------------------------------------------------------------------------------------------------------------- It works fine, but now the problem: When zooming in or out the point feature won't resize -that means it does not changes. the pixel size/radius is the same in every zoom level. for solving this, i thought of creating a linearring and then a polygon, of which i know that will automatically resize with zooming. i tried: var linearRing = new OpenLayers.Geometry.LinearRing(point); //just one point var polygonFeature = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Polygon([linearRing]),null, style); but seems not to work.. anybody can help? regards m.sirin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091217/05ed8f5d/attachment.html From igrcic at gmail.com Thu Dec 17 05:10:18 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Buffering and resizing a point In-Reply-To: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> References: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> Message-ID: Hi, cant you make something like this: http://openlayers.org/dev/examples/styles-context.html On Thu, Dec 17, 2009 at 10:34 AM, Mehmet Sirin wrote: > hi, > since there isn't a buffer function integrated in openlayers i have to find > other ways to simulate buffering a point and displaying it: > > ?function pointBuffer(lat, lon, radius,color){ > ?? ? ? ? ? polygonLayer.removeFeatures(polygonLayer.features); > ?? ? ? ? ? ? ? ?var style = { > ?? ? ? ? ? ? ? ? ? ?fillColor: '#ff0000', > ?? ? ? ? ? ? ? ? ? ?strokeWidth: 1, > ?? ? ? ? ? ? ? ? ? ?pointRadius: radius, ?// in pixels > > ?? ? ? ? ? ? ? ?}; > > > ?? ? ? ? ? ? ? ?var point = new OpenLayers.Geometry.Point(lat, lon); > ?? ? ? ? ? ? ? ?var feature = new OpenLayers.Feature.Vector(point,null, > style); > > ?? ? ? ? ? ? ? ?polygonLayer.addFeatures([feature]); > ?? ? ? ? ? ? ? ?polygonLayer.setOpacity(0.5); > > ?? ? ? ? ? ?} > > --------------------------------------------------------------------------------------------------------------- > ... > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? var lonlat1=new > OpenLayers.LonLat(parseInt(radius),0); > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? var lonlat2=new > OpenLayers.LonLat(parseInt(radius*2),0); > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? var > pixel1=map.getLayerPxFromLonLat(lonlat1); > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? var > pixel2=map.getLayerPxFromLonLat(lonlat2); > > > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? var dist= > Math.abs(parseInt(pixel2.x)-parseInt(pixel1.x)); > > > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? createCircle(x,y,dist); > > -------------------------------------------------------------------------------------------------------------- > It works fine, but now the problem: > When zooming in or out the point feature won't resize -that means it does > not changes. the pixel size/radius is the same in every zoom level. > for solving this, i thought of creating a linearring and then a polygon, of > which i know that will automatically resize with zooming. > i tried: > var linearRing = new OpenLayers.Geometry.LinearRing(point); //just one point > var polygonFeature = new OpenLayers.Feature.Vector( > ?new OpenLayers.Geometry.Polygon([linearRing]),null, style); > but seems not to work.. > > > anybody can help? > > regards > m.sirin > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From m.sirin07 at googlemail.com Thu Dec 17 05:15:07 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Buffering and resizing a point In-Reply-To: References: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> Message-ID: <55744b1c0912170215i1194ba73id817e04d49d37a06@mail.gmail.com> hi, there you have the same problem: point-vectors stays as they are -without stretching/resizing. i just find the solution: function createCircle(lat, lon, radius){ polygonLayer.removeFeatures(polygonLayer.features); var style = { fillColor: '#ff0000', strokeWidth: 1, pointRadius: radius, // in map coordinates }; var point = new OpenLayers.Geometry.Point(lat, lon); var polygonFeature = OpenLayers.Geometry.Polygon.createRegularPolygon(point,radius,30,0); var feature = new OpenLayers.Feature.Vector(polygonFeature,null, style); polygonLayer.addFeatures([feature]); polygonLayer.setOpacity(0.5); } 2009/12/17 Ivan Grcic > Hi, cant you make something like this: > http://openlayers.org/dev/examples/styles-context.html > > On Thu, Dec 17, 2009 at 10:34 AM, Mehmet Sirin > wrote: > > hi, > > since there isn't a buffer function integrated in openlayers i have to > find > > other ways to simulate buffering a point and displaying it: > > > > function pointBuffer(lat, lon, radius,color){ > > polygonLayer.removeFeatures(polygonLayer.features); > > var style = { > > fillColor: '#ff0000', > > strokeWidth: 1, > > pointRadius: radius, // in pixels > > > > }; > > > > > > var point = new OpenLayers.Geometry.Point(lat, lon); > > var feature = new OpenLayers.Feature.Vector(point,null, > > style); > > > > polygonLayer.addFeatures([feature]); > > polygonLayer.setOpacity(0.5); > > > > } > > > > > --------------------------------------------------------------------------------------------------------------- > > ... > > var lonlat1=new > > OpenLayers.LonLat(parseInt(radius),0); > > var lonlat2=new > > OpenLayers.LonLat(parseInt(radius*2),0); > > var > > pixel1=map.getLayerPxFromLonLat(lonlat1); > > var > > pixel2=map.getLayerPxFromLonLat(lonlat2); > > > > > > var dist= > > Math.abs(parseInt(pixel2.x)-parseInt(pixel1.x)); > > > > > > createCircle(x,y,dist); > > > > > -------------------------------------------------------------------------------------------------------------- > > It works fine, but now the problem: > > When zooming in or out the point feature won't resize -that means it does > > not changes. the pixel size/radius is the same in every zoom level. > > for solving this, i thought of creating a linearring and then a polygon, > of > > which i know that will automatically resize with zooming. > > i tried: > > var linearRing = new OpenLayers.Geometry.LinearRing(point); //just one > point > > var polygonFeature = new OpenLayers.Feature.Vector( > > new OpenLayers.Geometry.Polygon([linearRing]),null, style); > > but seems not to work.. > > > > > > anybody can help? > > > > regards > > m.sirin > > _______________________________________________ > > 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/20091217/1f44ba91/attachment.html From ahocevar at opengeo.org Thu Dec 17 05:44:22 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Buffering and resizing a point In-Reply-To: <55744b1c0912170215i1194ba73id817e04d49d37a06@mail.gmail.com> References: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> <55744b1c0912170215i1194ba73id817e04d49d37a06@mail.gmail.com> Message-ID: <4B2A0B86.4000706@opengeo.org> Hi, why so complicated? Ivan pointed you to the right way to do it. If you look at it, you see a context with a getType function. In this function, you can return the desired point radius. If you have your radius in map units, just do the following: return radiusInMapUnits / map.getResolution(); Regards, Andreas. On 2009-12-17 11:15, Mehmet Sirin wrote: > hi, there you have the same problem: point-vectors stays as they are > -without stretching/resizing. > > i just find the solution: > > function createCircle(lat, lon, radius){ > polygonLayer.removeFeatures(polygonLayer.features); > var style = { > fillColor: '#ff0000', > strokeWidth: 1, > pointRadius: radius, // in map coordinates > > }; > > > var point = new OpenLayers.Geometry.Point(lat, lon); > var polygonFeature = > OpenLayers.Geometry.Polygon.createRegularPolygon(point,radius,30,0); > var feature = new > OpenLayers.Feature.Vector(polygonFeature,null, style); > > > polygonLayer.addFeatures([feature]); > polygonLayer.setOpacity(0.5); > > > } > > 2009/12/17 Ivan Grcic > > > Hi, cant you make something like this: > http://openlayers.org/dev/examples/styles-context.html > > On Thu, Dec 17, 2009 at 10:34 AM, Mehmet Sirin > > wrote: > > hi, > > since there isn't a buffer function integrated in openlayers i > have to find > > other ways to simulate buffering a point and displaying it: > > > > function pointBuffer(lat, lon, radius,color){ > > polygonLayer.removeFeatures(polygonLayer.features); > > var style = { > > fillColor: '#ff0000', > > strokeWidth: 1, > > pointRadius: radius, // in pixels > > > > }; > > > > > > var point = new OpenLayers.Geometry.Point(lat, lon); > > var feature = new > OpenLayers.Feature.Vector(point,null, > > style); > > > > polygonLayer.addFeatures([feature]); > > polygonLayer.setOpacity(0.5); > > > > } > > > > > --------------------------------------------------------------------------------------------------------------- > > ... > > var lonlat1=new > > OpenLayers.LonLat(parseInt(radius),0); > > var lonlat2=new > > OpenLayers.LonLat(parseInt(radius*2),0); > > var > > pixel1=map.getLayerPxFromLonLat(lonlat1); > > var > > pixel2=map.getLayerPxFromLonLat(lonlat2); > > > > > > var dist= > > Math.abs(parseInt(pixel2.x)-parseInt(pixel1.x)); > > > > > > createCircle(x,y,dist); > > > > > -------------------------------------------------------------------------------------------------------------- > > It works fine, but now the problem: > > When zooming in or out the point feature won't resize -that > means it does > > not changes. the pixel size/radius is the same in every zoom level. > > for solving this, i thought of creating a linearring and then a > polygon, of > > which i know that will automatically resize with zooming. > > i tried: > > var linearRing = new OpenLayers.Geometry.LinearRing(point); > //just one point > > var polygonFeature = new OpenLayers.Feature.Vector( > > new OpenLayers.Geometry.Polygon([linearRing]),null, style); > > but seems not to work.. > > > > > > anybody can help? > > > > regards > > m.sirin > > _______________________________________________ > > 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 > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From mail at marco-scheuble.de Thu Dec 17 05:44:53 2009 From: mail at marco-scheuble.de (Marco Scheuble) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] saving multiple layers In-Reply-To: <55744b1c0912170215i1194ba73id817e04d49d37a06@mail.gmail.com> References: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> <55744b1c0912170215i1194ba73id817e04d49d37a06@mail.gmail.com> Message-ID: <4B2A0BA5.2010509@marco-scheuble.de> Hi list, I have a problem with saving multiple editable VectorLayers. I have three layers: point, line, poly that are editable. For each layer I first tried to take one saveStrategie for all layers, but that didn't work. It only saved the changes of the last defined layer. Then I tried it with three different Strategies, but it didn't work too. So what do I have to do? Cheers, Marco ----------------------------- savepoint = new OpenLayers.Strategy.Save(); saveline = new OpenLayers.Strategy.Save(); savepoly = new OpenLayers.Strategy.Save(); var poly = new OpenLayers.Layer.Vector( 'Fl?chen', { strategies: [new OpenLayers.Strategy.BBOX(), savepoly ], ... }); var line = new OpenLayers.Layer.Vector( 'Linie', { strategies: [new OpenLayers.Strategy.BBOX(), saveline ], ... }); var point = new OpenLayers.Layer.Vector( 'Punkt', { strategies: [new OpenLayers.Strategy.BBOX(), savepoint ], ... }); function save(){ switch (drawMod){ case "point": savepoint.save(); break; case "line": saveline.save(); break; case "poly": savepoly.save(); break; } } -------------------------- From igrcic at gmail.com Thu Dec 17 06:00:07 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] Buffering and resizing a point In-Reply-To: <4B2A0B86.4000706@opengeo.org> References: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> <55744b1c0912170215i1194ba73id817e04d49d37a06@mail.gmail.com> <4B2A0B86.4000706@opengeo.org> Message-ID: In this way when you zoom in the map, your features will be huge. Except that is the behaviour you want to achieve... cheers On Thu, Dec 17, 2009 at 11:44 AM, Andreas Hocevar wrote: > Hi, > > why so complicated? > > Ivan pointed you to the right way to do it. If you look at it, you see a > context with a getType function. In this function, you can return the > desired point radius. If you have your radius in map units, just do the > following: > > return radiusInMapUnits / map.getResolution(); > > Regards, > Andreas. > > > On 2009-12-17 11:15, Mehmet Sirin wrote: >> hi, there you have the same problem: point-vectors stays as they are >> -without stretching/resizing. >> >> i just find the solution: >> >> ? ? ? ? ? function createCircle(lat, lon, radius){ >> ? ? ? ? ? ?polygonLayer.removeFeatures(polygonLayer.features); >> ? ? ? ? ? ? ? ? var style = { >> ? ? ? ? ? ? ? ? ? ? fillColor: '#ff0000', >> ? ? ? ? ? ? ? ? ? ? strokeWidth: 1, >> ? ? ? ? ? ? ? ? ? ? pointRadius: radius, ?// in map coordinates >> >> ? ? ? ? ? ? ? ? }; >> >> >> ? ? ? ? ? ? ? ?var point = new OpenLayers.Geometry.Point(lat, lon); >> ? ? ? ? ? ? ? ?var polygonFeature = >> OpenLayers.Geometry.Polygon.createRegularPolygon(point,radius,30,0); >> ? ? ? ? ? ? ? ?var feature = new >> OpenLayers.Feature.Vector(polygonFeature,null, style); >> >> >> ? ? ? ? ? ? ? ? polygonLayer.addFeatures([feature]); >> ? ? ? ? ? ? ? ? polygonLayer.setOpacity(0.5); >> >> >> ? ? ? ? ? ? } >> >> 2009/12/17 Ivan Grcic > >> >> ? ? Hi, cant you make something like this: >> ? ? http://openlayers.org/dev/examples/styles-context.html >> >> ? ? On Thu, Dec 17, 2009 at 10:34 AM, Mehmet Sirin >> ? ? > wrote: >> ? ? > hi, >> ? ? > since there isn't a buffer function integrated in openlayers i >> ? ? have to find >> ? ? > other ways to simulate buffering a point and displaying it: >> ? ? > >> ? ? > ?function pointBuffer(lat, lon, radius,color){ >> ? ? > ? ? ? ? ? ?polygonLayer.removeFeatures(polygonLayer.features); >> ? ? > ? ? ? ? ? ? ? ? var style = { >> ? ? > ? ? ? ? ? ? ? ? ? ? fillColor: '#ff0000', >> ? ? > ? ? ? ? ? ? ? ? ? ? strokeWidth: 1, >> ? ? > ? ? ? ? ? ? ? ? ? ? pointRadius: radius, ?// in pixels >> ? ? > >> ? ? > ? ? ? ? ? ? ? ? }; >> ? ? > >> ? ? > >> ? ? > ? ? ? ? ? ? ? ? var point = new OpenLayers.Geometry.Point(lat, lon); >> ? ? > ? ? ? ? ? ? ? ? var feature = new >> ? ? OpenLayers.Feature.Vector(point,null, >> ? ? > style); >> ? ? > >> ? ? > ? ? ? ? ? ? ? ? polygonLayer.addFeatures([feature]); >> ? ? > ? ? ? ? ? ? ? ? polygonLayer.setOpacity(0.5); >> ? ? > >> ? ? > ? ? ? ? ? ? } >> ? ? > >> ? ? > >> ? ? --------------------------------------------------------------------------------------------------------------- >> ? ? > ... >> ? ? > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?var lonlat1=new >> ? ? > OpenLayers.LonLat(parseInt(radius),0); >> ? ? > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?var lonlat2=new >> ? ? > OpenLayers.LonLat(parseInt(radius*2),0); >> ? ? > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?var >> ? ? > pixel1=map.getLayerPxFromLonLat(lonlat1); >> ? ? > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?var >> ? ? > pixel2=map.getLayerPxFromLonLat(lonlat2); >> ? ? > >> ? ? > >> ? ? > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?var dist= >> ? ? > Math.abs(parseInt(pixel2.x)-parseInt(pixel1.x)); >> ? ? > >> ? ? > >> ? ? > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?createCircle(x,y,dist); >> ? ? > >> ? ? > >> ? ? -------------------------------------------------------------------------------------------------------------- >> ? ? > It works fine, but now the problem: >> ? ? > When zooming in or out the point feature won't resize -that >> ? ? means it does >> ? ? > not changes. the pixel size/radius is the same in every zoom level. >> ? ? > for solving this, i thought of creating a linearring and then a >> ? ? polygon, of >> ? ? > which i know that will automatically resize with zooming. >> ? ? > i tried: >> ? ? > var linearRing = new OpenLayers.Geometry.LinearRing(point); >> ? ? //just one point >> ? ? > var polygonFeature = new OpenLayers.Feature.Vector( >> ? ? > ?new OpenLayers.Geometry.Polygon([linearRing]),null, style); >> ? ? > but seems not to work.. >> ? ? > >> ? ? > >> ? ? > anybody can help? >> ? ? > >> ? ? > regards >> ? ? > m.sirin >> ? ? > _______________________________________________ >> ? ? > 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 >> > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From kgeusebroek at xebia.com Thu Dec 17 07:31:46 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] saving multiple layers In-Reply-To: <4B2A0BA5.2010509@marco-scheuble.de> References: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> <55744b1c0912170215i1194ba73id817e04d49d37a06@mail.gmail.com> <4B2A0BA5.2010509@marco-scheuble.de> Message-ID: Hi I do it like this and it seems to work ;-) point.strategies[1].save(); line.strategies[1].save(); poly.strategies[1].save(); so I don't need a variable to hold the strategy and I can just create the layer with a new save strategy Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Marco Scheuble Sent: Thursday, December 17, 2009 11:45 AM To: users@openlayers.org Subject: [OpenLayers-Users] saving multiple layers Hi list, I have a problem with saving multiple editable VectorLayers. I have three layers: point, line, poly that are editable. For each layer I first tried to take one saveStrategie for all layers, but that didn't work. It only saved the changes of the last defined layer. Then I tried it with three different Strategies, but it didn't work too. So what do I have to do? Cheers, Marco ----------------------------- savepoint = new OpenLayers.Strategy.Save(); saveline = new OpenLayers.Strategy.Save(); savepoly = new OpenLayers.Strategy.Save(); var poly = new OpenLayers.Layer.Vector( 'Fl?chen', { strategies: [new OpenLayers.Strategy.BBOX(), savepoly ], ... }); var line = new OpenLayers.Layer.Vector( 'Linie', { strategies: [new OpenLayers.Strategy.BBOX(), saveline ], ... }); var point = new OpenLayers.Layer.Vector( 'Punkt', { strategies: [new OpenLayers.Strategy.BBOX(), savepoint ], ... }); function save(){ switch (drawMod){ case "point": savepoint.save(); break; case "line": saveline.save(); break; case "poly": savepoly.save(); break; } } -------------------------- _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From mail at marco-scheuble.de Thu Dec 17 08:37:13 2009 From: mail at marco-scheuble.de (Marco Scheuble) Date: Wed Sep 1 17:18:19 2010 Subject: [OpenLayers-Users] saving multiple layers In-Reply-To: References: <55744b1c0912170134v719c469bu1b850d94cf95db29@mail.gmail.com> <55744b1c0912170215i1194ba73id817e04d49d37a06@mail.gmail.com> <4B2A0BA5.2010509@marco-scheuble.de> Message-ID: <4B2A3409.90306@marco-scheuble.de> Hi Kris, cool, thank you! works perfect :-) Am 17.12.2009 13:31, schrieb Kris Geusebroek: > Hi > > I do it like this and it seems to work ;-) > > point.strategies[1].save(); > line.strategies[1].save(); > poly.strategies[1].save(); > > so I don't need a variable to hold the strategy and I can just create the layer with a new save strategy > > Cheers Kris > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Marco Scheuble > Sent: Thursday, December 17, 2009 11:45 AM > To: users@openlayers.org > Subject: [OpenLayers-Users] saving multiple layers > > Hi list, > > I have a problem with saving multiple editable VectorLayers. > > I have three layers: point, line, poly that are editable. > For each layer I first tried to take one saveStrategie for all layers, > but that didn't work. > It only saved the changes of the last defined layer. > > Then I tried it with three different Strategies, but it didn't work too. > So what do I have to do? > > Cheers, Marco > > ----------------------------- > savepoint = new OpenLayers.Strategy.Save(); > saveline = new OpenLayers.Strategy.Save(); > savepoly = new OpenLayers.Strategy.Save(); > > var poly = new OpenLayers.Layer.Vector( 'Fl?chen', { > strategies: [new OpenLayers.Strategy.BBOX(), savepoly ], > ... > }); > > var line = new OpenLayers.Layer.Vector( 'Linie', { > strategies: [new OpenLayers.Strategy.BBOX(), saveline ], > ... > }); > > var point = new OpenLayers.Layer.Vector( 'Punkt', { > strategies: [new OpenLayers.Strategy.BBOX(), savepoint ], > ... > }); > > function save(){ > switch (drawMod){ > case "point": > savepoint.save(); > break; > case "line": > saveline.save(); > break; > case "poly": > savepoly.save(); > break; > } > } > -------------------------- > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From jimmy.aumard at gmail.com Thu Dec 17 09:12:09 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: Thanks for answer Andreas, My problem is little more complicated :s I propose to users to make own styles, I would like to save styles (with filters, rules, symbolizers...) in my database in sld format. I try this: var frmt = new OpenLayers.Format.SLD(); var sld= frmt.write(my_layer.styleMap); But it's doesn't work After I have to load slds on layers (I try to follow this example http://www.openlayers.org/dev/examples/sld.html) but I have to transform StyleMap -> SLD first. If you have ideas for helping me. Cheers -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091217/c44a205e/attachment.html From ahocevar at opengeo.org Thu Dec 17 09:20:22 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: <4B2A3E26.1080702@opengeo.org> On 2009-12-17 15:12, Jimmy Aumard wrote: > Thanks for answer Andreas, > > My problem is little more complicated :s > I propose to users to make own styles, I would like to save styles > (with filters, rules, symbolizers...) in my database in sld format. > > I try this: > var frmt = new OpenLayers.Format.SLD(); > var sld= frmt.write(my_layer.styleMap); > > But it's doesn't work > > After I have to load slds on layers (I try to follow this example > http://www.openlayers.org/dev/examples/sld.html) but I have to > transform StyleMap -> SLD first. The StyleMap is no 1:1 representation of an SLD document. So you would e.g. have to do the following: var rule = new OpenLayers.Rule({ filter: yourFilter }); rule.symbolizer[yourGeometryType(point|line|polygon)] = yourSymbolizer; var style = new OpenLayers.Style("", {rules: [rule]}); var sld = new OpenLayers.Format.SLD().write({ namedLayers: [{ name: yourLayer.name, userStyles: [style] }] }); Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From jrubiando at gmail.com Thu Dec 17 16:32:35 2009 From: jrubiando at gmail.com (Lammie Jonson) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] rendering WFS and vectors based on zoom levels Message-ID: <1f161f9d0912171332i557e6cc4j7c88823a5cbd72e4@mail.gmail.com> I figured out how to render WFS from my website using a proxy. The browser will send a request like this to the server: Parameters: {"url"=>" http://mysite.com?typename=topp%3Astates&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=-570.9375,-457.646484375,819.84375,380.478515625 "} Suppose I only want the content rendered through WFS to only be visible at lower zoom levels, is there a way to indicate this in openlayers in the constructor for the WFS layer ? I would like to also be able to do that for any other vector data as well. I could do this in a variety of ways using session data through a cookie or by somehow checking the map zoom level whenever the map moves. In the case of WFS, maybe I could somehow figure out the zoom level from the bounding box, but if there is a more transparent way to do that I would like to do it that way or whatever is the preferred cleaner approach, etc. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091217/a1dd8dad/attachment.html From carina_palanca at forcorp.com Thu Dec 17 17:21:09 2009 From: carina_palanca at forcorp.com (cgp) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Is there a way to dynamically get the feature id of a feature from a WMS layer? Message-ID: <1261088469590-4183834.post@n2.nabble.com> I've been trying this for about a week now but I can't find anything. Maybe I'm missing something? It seems that the "feature id" and the "fid" are different. I can get the "fid" dynamically (from getfeatureinfo on a WMS layer) but not the "Feature_id". -- View this message in context: http://n2.nabble.com/Is-there-a-way-to-dynamically-get-the-feature-id-of-a-feature-from-a-WMS-layer-tp4183834p4183834.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From woodbri at swoodbridge.com Thu Dec 17 17:30:13 2009 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Is there a way to dynamically get the feature id of a feature from a WMS layer? In-Reply-To: <1261088469590-4183834.post@n2.nabble.com> References: <1261088469590-4183834.post@n2.nabble.com> Message-ID: <4B2AB0F5.5050400@swoodbridge.com> cgp wrote: > I've been trying this for about a week now but I can't find anything. Maybe > I'm missing something? > > It seems that the "feature id" and the "fid" are different. I can get the > "fid" dynamically (from getfeatureinfo on a WMS layer) but not the > "Feature_id". I think a little more info is needed. Where is "Feature_id" defined? What is the layer definition? Is if common from mapserver? Show us the mapfile LAYER definition. What have you tried so far? -Steve W From m.sirin07 at googlemail.com Thu Dec 17 19:57:06 2009 From: m.sirin07 at googlemail.com (mehmet) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] combining drag and select layers on one map - drag not working In-Reply-To: References: <49D77149.6020800@gmail.com> Message-ID: <1261097826111-4184443.post@n2.nabble.com> hi, I intend to do the same and experienced too that this is not possible. Is there really no solution to this issue? No one has an idea to solve this problem? I need to do this, because on layer1 i got some draggable marker and on layer2 wfs-features with pop-ups. regards m.sirin Eric Lemoine-2-2 wrote: > > Hi > > As you've noticed, since recently, you can have a select feature > control work with multiple vector layers. Yet, Andreas or others will > correct me if I'm wrong, your use case isn't covered - you cannot have > a drag control, working on one layer, and a select control working, on > another layer, activated at the same time. Only the layer(s) of the > control activated last will be interactive. > > Eric > > 2009/4/4, Charlie DeTar : >> Hi, >> >> I'm trying to construct a map that contains a draggable marker in >> addition to features that, when clicked, produce a popup. Reading the >> docs and examples, it seemed that the way to do this is to use a vector >> layer with a DragFeature control, and an additional vector layer with a >> SelectFeature control to handle popups. However, I'm finding that once >> the SelectFeature control has been activated, the DragFeature no longer >> works -- dragging only pans the map. I'm testing this using Firefox 3.0 >> under Linux with stable OpenLayers (2.7). >> >> I've been trying to figure out if this has something to do with event >> propagation, and have tried setting stopUp and stopDown to false for >> both the dragFeature and selectFeature handlers to no effect. Calling >> dragFeature.handlers.feature.moveLayerToTop() makes the drag handler >> work, but kills the selectFeature, regardless of what order the layers >> are added. Though I would like both layers working simultaneously, I >> did find that disabling the selectable layer using the LayerSwitcher >> made the drag control work again in stable 2.7, but in the latest SVN >> R9190 dragging still doesn't work after disabling the selectable layer. >> >> Any suggestions for how I might be able to get a draggable layer and >> separate popup-producing layer working simultaneously on one map? >> >> Here are routines I'm using to construct the layers: >> >> var map; >> function init() { >> map = new OpenLayers.Map('map'); >> map.addControl(new OpenLayers.Control.LayerSwitcher()); >> map.addLayer( >> new OpenLayers.Layer.WMS("OpenLayers WMS", >> "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ) >> ); >> >> map.setCenter(new OpenLayers.Geometry.Point(0, 0), 4); >> >> add_draggable(); >> add_selectable(); >> } >> function add_draggable() { >> var draggable = new OpenLayers.Layer.Vector( >> "Draggable", >> { >> styleMap: new OpenLayers.StyleMap({ >> externalGraphic: >> "http://openlayers.org/dev/img/marker-gold.png", >> pointRadius: 10 >> }), >> } >> ); >> map.addLayer(draggable) >> draggable.addFeatures([ >> new OpenLayers.Feature.Vector( >> new OpenLayers.Geometry.Point(0, 0) >> ) >> ]); >> >> var dragFeature = new OpenLayers.Control.DragFeature(draggable); >> map.addControl(dragFeature); >> dragFeature.activate(); >> } >> function add_selectable() { >> var selectable = new OpenLayers.Layer.Vector("Selectable"); >> selectable.addFeatures([ >> new OpenLayers.Feature.Vector( >> new OpenLayers.Geometry.Point(5, 5)), >> new OpenLayers.Feature.Vector( >> new OpenLayers.Geometry.Point(-5, -5)), >> ]); >> map.addLayer(selectable); >> >> var selectControl = new >> OpenLayers.Control.SelectFeature(selectable); >> map.addControl(selectControl); >> selectControl.activate(); >> } >> >> cheers, >> Charlie >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Envoy? avec mon mobile > > 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/combining-drag-and-select-layers-on-one-map-drag-not-working-tp2585226p4184443.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Fri Dec 18 03:13:58 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] combining drag and select layers on one map - drag not working In-Reply-To: <1261097826111-4184443.post@n2.nabble.com> References: <49D77149.6020800@gmail.com> <1261097826111-4184443.post@n2.nabble.com> Message-ID: Hi, selectControl.handlers['feature'].stopDown = false; selectControl.handlers['feature'].stopUp = false; is not working, right? On Fri, Dec 18, 2009 at 1:57 AM, mehmet wrote: > > hi, > I intend to do the same and experienced too that this is not possible. > Is there really no solution to this issue? No one has an idea to solve this > problem? > > I need to do this, because on layer1 i got some draggable marker and on > layer2 wfs-features with pop-ups. > > > regards > m.sirin > > > Eric Lemoine-2-2 wrote: >> >> Hi >> >> As you've noticed, since recently, you can have a select feature >> control work with multiple vector layers. Yet, Andreas or others will >> correct me if I'm wrong, your use case isn't covered - you cannot have >> a drag control, working on one layer, and a select control working, on >> another layer, activated at the same time. Only the layer(s) of the >> control activated last will be interactive. >> >> Eric >> >> 2009/4/4, Charlie DeTar : >>> Hi, >>> >>> I'm trying to construct a map that contains a draggable marker in >>> addition to features that, when clicked, produce a popup. ?Reading the >>> docs and examples, it seemed that the way to do this is to use a vector >>> layer with a DragFeature control, and an additional vector layer with a >>> SelectFeature control to handle popups. ?However, I'm finding that once >>> the SelectFeature control has been activated, the DragFeature no longer >>> works -- dragging only pans the map. ?I'm testing this using Firefox 3.0 >>> under Linux with stable OpenLayers (2.7). >>> >>> I've been trying to figure out if this has something to do with event >>> propagation, and have tried setting stopUp and stopDown to false for >>> both the dragFeature and selectFeature handlers to no effect. ?Calling >>> dragFeature.handlers.feature.moveLayerToTop() makes the drag handler >>> work, but kills the selectFeature, regardless of what order the layers >>> are added. ?Though I would like both layers working simultaneously, I >>> did find that disabling the selectable layer using the LayerSwitcher >>> made the drag control work again in stable 2.7, but in the latest SVN >>> R9190 dragging still doesn't work after disabling the selectable layer. >>> >>> Any suggestions for how I might be able to get a draggable layer and >>> separate popup-producing layer working simultaneously on one map? >>> >>> Here are routines I'm using to construct the layers: >>> >>> var map; >>> function init() { >>> ? ? map = new OpenLayers.Map('map'); >>> ? ? map.addControl(new OpenLayers.Control.LayerSwitcher()); >>> ? ? map.addLayer( >>> ? ? ? ?new OpenLayers.Layer.WMS("OpenLayers WMS", >>> ? ? ? ? ? ? "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ) >>> ? ? ); >>> >>> ? ? map.setCenter(new OpenLayers.Geometry.Point(0, 0), 4); >>> >>> ? ? add_draggable(); >>> ? ? add_selectable(); >>> } >>> function add_draggable() { >>> ? ? var draggable = new OpenLayers.Layer.Vector( >>> ? ? ? ? ? ? "Draggable", >>> ? ? ? ? ? ? { >>> ? ? ? ? ? ? ? ? styleMap: new OpenLayers.StyleMap({ >>> ? ? ? ? ? ? ? ? ? ? externalGraphic: >>> ? ? ? ? ? ? ? ? ? ? ? ? "http://openlayers.org/dev/img/marker-gold.png", >>> ? ? ? ? ? ? ? ? ? ? pointRadius: 10 >>> ? ? ? ? ? ? ? ? }), >>> ? ? ? ? ? ? } >>> ? ? ); >>> ? ? map.addLayer(draggable) >>> ? ? draggable.addFeatures([ >>> ? ? ? ? new OpenLayers.Feature.Vector( >>> ? ? ? ? ? ?new OpenLayers.Geometry.Point(0, 0) >>> ? ? ? ? ) >>> ? ? ]); >>> >>> ? ? var dragFeature = new OpenLayers.Control.DragFeature(draggable); >>> ? ? map.addControl(dragFeature); >>> ? ? dragFeature.activate(); >>> } >>> function add_selectable() { >>> ? ? var selectable = new OpenLayers.Layer.Vector("Selectable"); >>> ? ? selectable.addFeatures([ >>> ? ? ? ? new OpenLayers.Feature.Vector( >>> ? ? ? ? ? ? ?new OpenLayers.Geometry.Point(5, 5)), >>> ? ? ? ? new OpenLayers.Feature.Vector( >>> ? ? ? ? ? ? ?new OpenLayers.Geometry.Point(-5, -5)), >>> ? ? ]); >>> ? ? map.addLayer(selectable); >>> >>> ? ? var selectControl = new >>> ? ? ? ? ?OpenLayers.Control.SelectFeature(selectable); >>> ? ? map.addControl(selectControl); >>> ? ? selectControl.activate(); >>> } >>> >>> cheers, >>> Charlie >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> >> -- >> Envoy? avec mon mobile >> >> 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/combining-drag-and-select-layers-on-one-map-drag-not-working-tp2585226p4184443.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 stefanie at weykam.net Fri Dec 18 04:38:58 2009 From: stefanie at weykam.net (Stefanie Weykam) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] GetFeatureInfo and GML response Message-ID: <4B2B4DB2.6030402@weykam.net> Dear list members, I need to send GetFeatureInfo requests and parse the response. Mi question is how to proceed... The layers have different onlineResources and info_formats. Most of them support application/vnd.ogc.gml, others application/vnd.ogc.wms_xml, text/xml , text/html or text/plain. I haven?t decided yet if the query will be processed on all visible layers or if the user shall select the layers one by one from a selection list. Anyway, the variables ?url? and ?info_format? for all queryable layers are stored in an array. Output will be displayed in a div. So far I have tried with loadUrl and with WMSGetFeatureInfo control but I am having problems with the gml and xml responses. Which is the appropriate parser for gml/xml responses? And by the way, how do I change the WMSGetFeatureInfo control options at runtime? Thanks in advance for your advice, Stefanie From jimmy.aumard at gmail.com Fri Dec 18 04:55:58 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter Message-ID: It's work I make this: function createSLD(layer){ var rules=[]; for(var i=0;i References: Message-ID: <4B2B556C.1090909@opengeo.org> On 2009-12-18 10:55, Jimmy Aumard wrote: > > Just a little problem : I use externalGraphics for Point and size is > by default to 6? How can I specify the size of externalGraphics? > You have to use pointRadius. graphicWidth and graphicHeight is not supported by SLD. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From m.sirin07 at googlemail.com Fri Dec 18 05:26:00 2009 From: m.sirin07 at googlemail.com (mehmet) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] combining drag and select layers on one map - drag not working In-Reply-To: References: <49D77149.6020800@gmail.com> <1261097826111-4184443.post@n2.nabble.com> Message-ID: <1261131960857-4185867.post@n2.nabble.com> hi, no it's not working. No effect on anything. Ivan Grcic-2 wrote: > > Hi, > > selectControl.handlers['feature'].stopDown = false; > selectControl.handlers['feature'].stopUp = false; > > is not working, right? > > On Fri, Dec 18, 2009 at 1:57 AM, mehmet wrote: >> >> hi, >> I intend to do the same and experienced too that this is not possible. >> Is there really no solution to this issue? No one has an idea to solve >> this >> problem? >> >> I need to do this, because on layer1 i got some draggable marker and on >> layer2 wfs-features with pop-ups. >> >> >> regards >> m.sirin >> >> >> Eric Lemoine-2-2 wrote: >>> >>> Hi >>> >>> As you've noticed, since recently, you can have a select feature >>> control work with multiple vector layers. Yet, Andreas or others will >>> correct me if I'm wrong, your use case isn't covered - you cannot have >>> a drag control, working on one layer, and a select control working, on >>> another layer, activated at the same time. Only the layer(s) of the >>> control activated last will be interactive. >>> >>> Eric >>> > -- View this message in context: http://n2.nabble.com/combining-drag-and-select-layers-on-one-map-drag-not-working-tp2585226p4185867.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jimmy.aumard at gmail.com Fri Dec 18 05:34:39 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: Thanks Andreas it's works, Do you have a solution for graphicsOffset? I know is not supported by SLD. Cheers Jim -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091218/cf3b0c08/attachment.html From ahocevar at opengeo.org Fri Dec 18 06:57:47 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: <4B2B6E3B.6030502@opengeo.org> On 2009-12-18 11:34, Jimmy Aumard wrote: > Do you have a solution for graphicsOffset? I know is not supported by > SLD. Use symbols that have the hot spot in the center of the image. This may involve e.g. transparent space at the bottom of the symbol graphic: --------------- | ***** | | ******* | | ***** | | *** | | * | | | | | | | | | --------------- Regards, Andreas. > > Cheers > > Jim > > -- > Aumard Jimmy > D?veloppeur - http://www.kinaxia.fr > > > _______________________________________________ > 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 jimmy.aumard at gmail.com Fri Dec 18 10:41:31 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: Ok I have to modify my image... I have another little problem with line style, with openLayers I propose "dash","solid" or "dot" (for strokeDashStyle attribute of symbolizer) but it's not save on the SLD. SLD doesn't support that? Thanks for help Jim -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091218/79e4e44c/attachment.html From ahocevar at opengeo.org Fri Dec 18 11:44:05 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: <4B2BB155.4070205@opengeo.org> Hi, On 2009-12-18 16:41, Jimmy Aumard wrote: > I have another little problem with line style, with openLayers I > propose "dash","solid" or "dot" (for strokeDashStyle attribute of > symbolizer) but it's not save on the SLD. > SLD doesn't support that? SLD has a stroke-dasharray, which OpenLayers also supports. You can e.g. use the following mapping: dot: "1 4" dash: "4 4" dashdot: "4 4 1 4" longdash: "8 4" longdashdot: "8 4 1 4" Regards, Andreas. > > Thanks for help > > Jim > -- > Aumard Jimmy > D?veloppeur - http://www.kinaxia.fr > > > _______________________________________________ > 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 jimmy.aumard at gmail.com Fri Dec 18 11:58:10 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: If I understand I have to make that: symbolizer={my_params.., strokeDashstyle:"4 4"}; or symbolizer={my_params.., dash:"4 4"}; I have test both and nothing work, the fist work in openlayers but it's not save and the second doesn't work. I thinks I don't understand what you say. Do you have a little example please.? :$ Thanks, Jim -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091218/b8dc86e7/attachment.html From Steve.Toutant at inspq.qc.ca Fri Dec 18 11:46:19 2009 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Save Context In-Reply-To: Message-ID: Hi, I would like to add a control that save/open a context. So the user can quit the application, come back later and open the application in the same "status" or context. By context I mean the zoom level, map's center and the layer loaded on the map. Any tips or approaches to do that please? thanks Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091218/af797c3a/attachment.html From ahocevar at opengeo.org Fri Dec 18 12:56:22 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: <4B2BC246.1080507@opengeo.org> On 2009-12-18 17:58, Jimmy Aumard wrote: > If I understand I have to make that: > > symbolizer={my_params.., strokeDashstyle:"4 4"}; That should be it. > or > symbolizer={my_params.., dash:"4 4"}; Nope. > I have test both and nothing work, the fist work in openlayers but > it's not save Are you sure? This is covered by the unit tests, and it definitely works. Look for 4 4 in the resulting SLD. > and the second doesn't work. > > I thinks I don't understand what you say. Do you have a little example > please.? :$ No, sorry. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From osm at tappenbeck.net Fri Dec 18 12:57:15 2009 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] problem with pan-function Message-ID: <4B2BC27B.707@tappenbeck.net> hi ! i have two ol based maps a: http://www.tappenbeck.net/osm/poi_maps/index.php?id=3 b: http://www.tappenbeck.net/osm/mv/index.php?id=1 (b) is a copy of (a) with other data and some word change - but no code-change. the problem of (b) is in use of the middle mouse-button - when press the button the map paned - when you unpress the button pan will not stop. first after a new click of middle mouse-button pan stops. did anybody had a idea ?? regards Jan :-) From arnd.wippermann at web.de Fri Dec 18 15:37:19 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] rendering WFS and vectors based on zoom levels In-Reply-To: <1f161f9d0912171332i557e6cc4j7c88823a5cbd72e4@mail.gmail.com> Message-ID: minScale and maxScale or minResolution and maxResolution should do the trick. function layerGML_BW(title, url, projection) { var lyr = new OpenLayers.Layer.Vector(title , { minScale : 4000, maxScale : 50, projection: projection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: url, format: new OpenLayers.Format.GML({ extractAttributes: true }) }) }); return(lyr); } from http://gis.ibbeck.de/ginfo/apps/planwerk/planwerk_nordbahntrasse.asp if you zoom into the small recangles, a layer with labels will show up. Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Lammie Jonson Gesendet: Donnerstag, 17. Dezember 2009 22:33 An: users@openlayers.org Betreff: [OpenLayers-Users] rendering WFS and vectors based on zoom levels I figured out how to render WFS from my website using a proxy. The browser will send a request like this to the server: Parameters: {"url"=>"http://mysite.com?typename=topp%3Astates &SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=-570.9375 ,-457.646484375,819.84375,380.478515625"} Suppose I only want the content rendered through WFS to only be visible at lower zoom levels, is there a way to indicate this in openlayers in the constructor for the WFS layer ? I would like to also be able to do that for any other vector data as well. I could do this in a variety of ways using session data through a cookie or by somehow checking the map zoom level whenever the map moves. In the case of WFS, maybe I could somehow figure out the zoom level from the bounding box, but if there is a more transparent way to do that I would like to do it that way or whatever is the preferred cleaner approach, etc. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091218/2893539c/attachment.html From carina_palanca at forcorp.com Fri Dec 18 17:29:09 2009 From: carina_palanca at forcorp.com (cgp) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Trouble with accessing vector/WFS layer features Message-ID: <1261175349673-4189252.post@n2.nabble.com> When I start up my application, I add all the WFS layers and do setVisibility(false). Right after start up I attempt to access the WFS layer features with wfs_layer.features but it returns null. However, when I run setVisibility(true) and then setVisibility(false) right away, wfs_layer.features now returns all the features. I don't completely understand how OpenLayers works, but does this mean that the WFS layers are not actually loaded onto the map if onstartup I call setVisibility(false)? My goal is to access the features without having to display the WFS layer. On my previous post http://n2.nabble.com/Is-there-a-way-to-dynamically-get-the-feature-id-of-a-feature-from-a-WMS-layer-td4183834.html#a4183834 here , I am doing this because I need to get the ID of a particular feature. (Unless someone else has a more efficient way of doing this, please let me know). Thanks for your help. -- View this message in context: http://n2.nabble.com/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4189252.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From carina_palanca at forcorp.com Fri Dec 18 17:29:45 2009 From: carina_palanca at forcorp.com (cgp) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Is there a way to dynamically get the feature id of a feature from a WMS layer? In-Reply-To: <4B2AB0F5.5050400@swoodbridge.com> References: <1261088469590-4183834.post@n2.nabble.com> <4B2AB0F5.5050400@swoodbridge.com> Message-ID: <1261175385393-4189257.post@n2.nabble.com> Sorry, I got my variable names wrong and I didn't explain that very well. But anyway, I figured it out. You can access the following from any vector layer: The "fid" with vector_layer.feature.fid, which should look something like "layer_prefix.layer_name.n", where n is an integer. The "id" with vector_layer.feature.id, which should look something like "OpenLayers.Feature.Vector_n", where n is an integer. My problem was trying to get the "id" so I can use the function vector_layer.getFeatureById(id). I don't know the "id" in advance, but I can get the "fid" from a WMS layer. All I did was have a for-loop that will look for the feature with the particular "fid" and get the "id" from there: var feature_id = layer_prefix.layer_name.n; <-- here is the FID var layer_features = vector_layer.features; for (var i=0; i > cgp wrote: >> I've been trying this for about a week now but I can't find anything. >> Maybe >> I'm missing something? >> >> It seems that the "feature id" and the "fid" are different. I can get the >> "fid" dynamically (from getfeatureinfo on a WMS layer) but not the >> "Feature_id". > > I think a little more info is needed. > > Where is "Feature_id" defined? > What is the layer definition? > Is if common from mapserver? Show us the mapfile LAYER definition. > What have you tried so far? > > -Steve W > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Is-there-a-way-to-dynamically-get-the-feature-id-of-a-feature-from-a-WMS-layer-tp4183834p4189257.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Sat Dec 19 14:11:04 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Trouble with accessing vector/WFS layer features In-Reply-To: <1261175349673-4189252.post@n2.nabble.com> References: <1261175349673-4189252.post@n2.nabble.com> Message-ID: Hi, vector layer doesnt load features if it is not visible. What strategy&protocol are you using? On Fri, Dec 18, 2009 at 11:29 PM, cgp wrote: > > When I start up my application, I add all the WFS layers and do > setVisibility(false). Right after start up I attempt to access the WFS layer > features with wfs_layer.features but it returns null. However, when I run > setVisibility(true) and then setVisibility(false) right away, > wfs_layer.features now returns all the features. > > I don't completely understand how OpenLayers works, but does this mean that > the WFS layers are not actually loaded onto the map if onstartup I call > setVisibility(false)? > > My goal is to access the features without having to display the WFS layer. > On my previous post > http://n2.nabble.com/Is-there-a-way-to-dynamically-get-the-feature-id-of-a-feature-from-a-WMS-layer-td4183834.html#a4183834 > here , I am doing this because I need to get the ID of a particular feature. > (Unless someone else has a more efficient way of doing this, please let me > know). > > Thanks for your help. > -- > View this message in context: http://n2.nabble.com/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4189252.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 brad at cubewerx.com.au Sun Dec 20 17:40:01 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Drag control deactivation Message-ID: <000601ca81c5$5f332c10$1d998430$@com.au> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 18227 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091221/feefd730/attachment.png From jimmy.aumard at gmail.com Mon Dec 21 03:35:13 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: I have look for 4 4 But I don't have that in my SLD. I feel when OpenLayers create SLD he doesn't look the* strokeDashstyle * attribute. I use OpenLayers 2.8. This is my SLD : polygonesdefault1default#0033FF0.5#00000012polygones.2#EB09090.62#09DCEB2selectdefault#8888880.5#00000012 Maybe my version of OpenLayers is not compatible? Thanks for helping me. Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091221/9aed2862/attachment.html From ahocevar at opengeo.org Mon Dec 21 03:47:35 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: Message-ID: <4B2F3627.6050203@opengeo.org> Hi, OpenLayers 2.8. indeed does not support writing out stroke-dashstyle yet. This was introduced 3 months ago (http://trac.openlayers.org/ticket/2270). So please use OpenLayers trunk, or at least apply the patch from the above ticket. Regards, Andreas. Jimmy Aumard wrote: > I have look for > > 4 4 > > But I don't have that in my SLD. > I feel when OpenLayers create SLD he doesn't look the// > strokeDashstyle //attribute. > I use OpenLayers 2.8. > > This is my SLD : > > version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld > http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">polygonesdefault1default name="fill">#0033FF name="fill-opacity">0.5 name="stroke">#000000 name="stroke-opacity">1 name="stroke-width">2polygones.2 xmlns:ogc="http://www.opengis.net/ogc"> fid="polygones.2"/> name="fill">#EB0909 name="fill-opacity">0.62 name="stroke">#09DCEB name="stroke-width">2selectdefault name="fill">#888888 name="fill-opacity">0.5 name="stroke">#000000 name="stroke-opacity">1 name="stroke-width">2 > > Maybe my version of OpenLayers is not compatible? > > Thanks for helping me. > > Aumard Jimmy > D?veloppeur - http://www.kinaxia.fr > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Mon Dec 21 04:18:13 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: <4B2F3627.6050203@opengeo.org> Message-ID: <4B2F3D55.3060208@opengeo.org> Jimmy Aumard wrote: > I have a last question for you: It's possible to give a different style > to point when I draw a polygon? Because the point take the external > graphic when I draw a polygon or line. I would like to put a circle. I think this was discussed on the list just a few days ago. You may want to check the archives. Regards, Andreas. From Peter.Sykora at ooe.gv.at Mon Dec 21 05:46:06 2009 From: Peter.Sykora at ooe.gv.at (Peter.Sykora@ooe.gv.at) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] How to access style properties of features? Message-ID: <05C80D686FDA0D4B811E25DFA72430D0041C2EE4@msli01-012.res01.ads.ooe.local> The following code creates a Vector layer using a styleMap where I set the style properties within some functions: ... var template = { fillOpacity: "${getOpacity}", externalGraphic: "${getChartURL}", graphicWidth: "${getSizeW}", graphicHeight: "${getSizeH}", strokeWidth: 0, graphicXOffset: "${getXOffset}", graphicYOffset: "${getYOffset}" }; style = new OpenLayers.Style(template, {context: context}); styleMap = new OpenLayers.StyleMap({'default': style, 'select': {fillOpacity: 0.7}}); ... ergebnisL = new OpenLayers.Layer.Vector('Suchergebnis', { styleMap: styleMap }); I?d like to calculate the graphicXOffset manually within the function getXOffset. Therefore I would need to access some style properties like graphicWidth of my current feature. I thought that it should work using something like gW=feature.Vector.style.graphicWidth but feature.Vector is empty ... Thanks for any help Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091221/68e67b81/attachment.html From dalda at ikt.es Mon Dec 21 06:18:35 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Drag control deactivation Message-ID: <224DBDAF88A6AC47BD22432815351BE007A37CB9@nekaposta1> Hi Brad, I had a similar problem. I wanted to deactivate navigation controls for a while and I tried this: for (var i = 0; i< map.controls.length; i++) { if (map.controls[i].displayClass == "olControlNavigation") { map.controls[i].deactivate(); } } This worked for me. I hope it helps. Regards. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? ________________________________ De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Brad Spencer Enviado el: domingo, 20 de diciembre de 2009 23:40 Para: openlayers users Asunto: [OpenLayers-Users] Drag control deactivation I have a checkbox control that the user uses to activate and deactivate feature dragging within a vector layer. This works for activating the drag control but I can't seem to get it to work when deactivating the control: I setup the drag control after I load the vector layer as follows: dragItControl = { drag: new OpenLayers.Control.DragFeature ( userMarkers, { 'onComplete': onCompleteMove } ) }; map.addControl(dragItControl['drag']); dragItControl['drag'].activate(); When trying to deactivate the control, I have tried all of the following separately and collectively with no luck: dragItControl['drag'].destroy(); dragItControl['drag'].deactivate(); map.removeControl(dragItControl); dragItControl = null; The only way I can deactivate the control is to reload the data again and I would prefer not to have to do this. Any ideas? Cheers, Merry Xmas Brad Spencer From ahocevar at opengeo.org Mon Dec 21 06:28:30 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] How to access style properties of features? In-Reply-To: <05C80D686FDA0D4B811E25DFA72430D0041C2EE4@msli01-012.res01.ads.ooe.local> References: <05C80D686FDA0D4B811E25DFA72430D0041C2EE4@msli01-012.res01.ads.ooe.local> Message-ID: <4B2F5BDE.1030808@opengeo.org> Hi, Peter.Sykora@ooe.gv.at wrote: > The following code creates a Vector layer using a styleMap where I set > the style properties within some functions: > > > style = new OpenLayers.Style(template, {context: context}); > styleMap = new OpenLayers.StyleMap({'default': style, 'select': > {fillOpacity: 0.7}}); > > ... > ergebnisL = new OpenLayers.Layer.Vector('Suchergebnis', { > styleMap: styleMap > }); > > I?d like to calculate the graphicXOffset manually within the function > getXOffset. Therefore I would need to access some style properties > like graphicWidth of my current feature. I thought that it should work > using something like gW=feature.Vector.style.graphicWidth but > feature.Vector is empty ... Try feature.style.graphicWidth instead of feature.Vector.style.graphicWidth. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From Peter.Sykora at ooe.gv.at Mon Dec 21 07:02:02 2009 From: Peter.Sykora at ooe.gv.at (Peter.Sykora@ooe.gv.at) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] How to access style properties of features? In-Reply-To: <4B2F5BDE.1030808@opengeo.org> References: <05C80D686FDA0D4B811E25DFA72430D0041C2EE4@msli01-012.res01.ads.ooe.local> <4B2F5BDE.1030808@opengeo.org> Message-ID: <05C80D686FDA0D4B811E25DFA72430D0041C2EE5@msli01-012.res01.ads.ooe.local> Hi Andreas, > >Try feature.style.graphicWidth instead of >feature.Vector.style.graphicWidth. I tried that, and several other things as well but I didn?t get any results so far. Just to be sure that the problem is not the code of the rest of my project I added the following line alert (features[0].style.graphicWidth); to the styleMap Example (http://www.openlayers.org/dev/examples/stylemap.html) Again, features[0].style is null. I just wonder why there is a "style" property in OpenLayers.Feature.Vector but not in OpenLayers.Feature Cheers, Peter From ahocevar at opengeo.org Mon Dec 21 07:48:32 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] How to access style properties of features? In-Reply-To: <05C80D686FDA0D4B811E25DFA72430D0041C2EE5@msli01-012.res01.ads.ooe.local> References: <05C80D686FDA0D4B811E25DFA72430D0041C2EE4@msli01-012.res01.ads.ooe.local> <4B2F5BDE.1030808@opengeo.org> <05C80D686FDA0D4B811E25DFA72430D0041C2EE5@msli01-012.res01.ads.ooe.local> Message-ID: <4B2F6EA0.4090706@opengeo.org> Hi, Peter.Sykora@ooe.gv.at wrote: >> Try feature.style.graphicWidth instead of >> feature.Vector.style.graphicWidth. >> > > I tried that, and several other things as well but I didn?t get any results so far. > > Just to be sure that the problem is not the code of the rest of my project I added the following line > > alert (features[0].style.graphicWidth); > > to the styleMap Example (http://www.openlayers.org/dev/examples/stylemap.html) > Again, features[0].style is null. > Ok, I thought your features come e.g. from a Layer.KML, which sets a style property on the feature. Where do your feature styles come from, or what makes you think your features have a style property (because by default they don't, unless you set it)? I think that you have a graphicWidth attribute in your features, not a style. So you would use feature.attributes.graphicWidth to access that. > I just wonder why there is a "style" property in OpenLayers.Feature.Vector but not in OpenLayers.Feature > Because OpenLayers.Feature is for Markers layers, and Markers layers don't have the concept of a style. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From m.sirin07 at googlemail.com Mon Dec 21 08:15:28 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Easy solution for combining SelectFeature and DragFeature on multiple layers Message-ID: <55744b1c0912210515r507734dfm53abb4cd5ab38fd7@mail.gmail.com> Hi, i don't know if this solution was already known, but i found nothing related on the internet. you want to use both the SelectFeature Control and the DragFeature Control on multiple layers on one map ? then always just add the DragFeature-Layer to the selectfeature controller: selectControl = new OpenLayers.Control.SelectFeature([dragLayer,selectLayer]); Now there should be no problem using combined select and drag. Example: http://igf-project.igf.uos.de/~bhempen/select-feature-multilayer.html But I don't know why it works this way :D Anybody can explain? regards mehmet sirin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091221/8e0e7311/attachment.html From ahocevar at opengeo.org Mon Dec 21 08:46:19 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] save Filter In-Reply-To: References: <4B2F3627.6050203@opengeo.org> <4B2F3D55.3060208@opengeo.org> Message-ID: <4B2F7C2B.5030803@opengeo.org> http://openlayers.org/pipermail/users/2009-December/015425.html Jimmy Aumard wrote: > He search on archives of december and november but I doesn't find the > thread about point style on other geometry. > Maybe the thread have a subjective name :s > > Regards > > Jim > > 2009/12/21 Andreas Hocevar > > > Jimmy Aumard wrote: > > I have a last question for you: It's possible to give a > different style to point when I draw a polygon? Because the > point take the external graphic when I draw a polygon or line. I > would like to put a circle. > > > I think this was discussed on the list just a few days ago. You may > want to check the archives. > > Regards, > Andreas. > > > > > -- > Aumard Jimmy > D?veloppeur - http://www.kinaxia.fr -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From Peter.Sykora at ooe.gv.at Mon Dec 21 09:00:53 2009 From: Peter.Sykora at ooe.gv.at (Peter.Sykora@ooe.gv.at) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] How to access style properties of features? In-Reply-To: <4B2F6EA0.4090706@opengeo.org> References: <05C80D686FDA0D4B811E25DFA72430D0041C2EE4@msli01-012.res01.ads.ooe.local> <4B2F5BDE.1030808@opengeo.org> <05C80D686FDA0D4B811E25DFA72430D0041C2EE5@msli01-012.res01.ads.ooe.local> <4B2F6EA0.4090706@opengeo.org> Message-ID: <05C80D686FDA0D4B811E25DFA72430D0041C2EE6@msli01-012.res01.ads.ooe.local> Hi, >Ok, I thought your features come e.g. from a Layer.KML, which >sets a style property on the feature. Where do your feature >styles come from, or what makes you think your features have a >style property (because by default they don't, unless you set >it)? I use a styleMap that contains a user style, so I thought that this style should be accessible. The strange thing for me is that with my custom functions e.g.: getChartURL or getSizeH I am able to set and influence the styling prameters but afterwards I?m not able to access their values. var template = { fillOpacity: "${getOpacity}", externalGraphic: "${getChartURL}", graphicWidth: "${getSizeW}", graphicHeight: "${getSizeH}", strokeWidth: 0, graphicXOffset: "${getXOffset}", graphicYOffset: "${getYOffset}" }; style = new OpenLayers.Style(template, {context: context}); styleMap = new OpenLayers.StyleMap({'default': style, 'select': {fillOpacity: 0.7}}); With this style template I define the functions that calculate the styling parameters. E.g. the getSizeH function looks something like this: getSizeH: function(feature) { setDefaultValues(feature); var Sum = getSum(feature); var size = calcSize(feature,Sum); // Size for pin icons if (Sum==1) { if (feature.attributes.hover==1) {size=48} else {size=32} } return size; } This function works fine and sets the graphicHeight to the needed value. Somehow internally in OpenLayers this information must be stored, otherwise the features couldn?t be drawn correctly, but how can I access this information? I thought this should be in my user style ... Maybe my problem is that the features themselfs never get a style assigned in my code. They seem to get their styling information from the layers styleMap. But again the information about each individual symbols size in the map must be stored somewhere, but where?? >I think that you have a graphicWidth attribute in your >features, not a style. So you would use >feature.attributes.graphicWidth to access that. As you can see in the above function I don?t set any attribute values. I just return the size value. >Because OpenLayers.Feature is for Markers layers, and Markers >layers don't have the concept of a style. Ok, thanks for the clarification. Regards, Peter From ahocevar at opengeo.org Mon Dec 21 09:35:53 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] How to access style properties of features? In-Reply-To: <05C80D686FDA0D4B811E25DFA72430D0041C2EE6@msli01-012.res01.ads.ooe.local> References: <05C80D686FDA0D4B811E25DFA72430D0041C2EE4@msli01-012.res01.ads.ooe.local> <4B2F5BDE.1030808@opengeo.org> <05C80D686FDA0D4B811E25DFA72430D0041C2EE5@msli01-012.res01.ads.ooe.local> <4B2F6EA0.4090706@opengeo.org> <05C80D686FDA0D4B811E25DFA72430D0041C2EE6@msli01-012.res01.ads.ooe.local> Message-ID: <4B2F87C9.9030000@opengeo.org> Hi, Peter.Sykora@ooe.gv.at wrote: > I use a styleMap that contains a user style, so I thought that this style should be accessible. > Ah, I see. This is not the case. The styleMap does not write style properties on the feature. > The strange thing for me is that with my custom functions e.g.: getChartURL or getSizeH I am able to set and influence the styling prameters but afterwards I?m not able to access their values. > This is expected behavior. > var template = { > fillOpacity: "${getOpacity}", > externalGraphic: "${getChartURL}", > graphicWidth: "${getSizeW}", > graphicHeight: "${getSizeH}", > strokeWidth: 0, > graphicXOffset: "${getXOffset}", > graphicYOffset: "${getYOffset}" > }; > style = new OpenLayers.Style(template, {context: context}); > styleMap = new OpenLayers.StyleMap({'default': style, 'select': {fillOpacity: 0.7}}); > > With this style template I define the functions that calculate the styling parameters. E.g. the getSizeH function looks something like this: > > getSizeH: function(feature) { > setDefaultValues(feature); > var Sum = getSum(feature); > var size = calcSize(feature,Sum); > // Size for pin icons > if (Sum==1) { > if (feature.attributes.hover==1) {size=48} else {size=32} > } > return size; > } > > This function works fine and sets the graphicHeight to the needed value. Somehow internally in OpenLayers this information must be stored, otherwise the features couldn?t be drawn correctly, but how can I access this information? I thought this should be in my user style This information is stored in the DOM of the renderer and not meant to be accessed. > Maybe my problem is that the features themselfs never get a style assigned in my code. Exactly. > They seem to get their styling information from the layers styleMap. But again the information about each individual symbols size in the map must be stored somewhere, but where?? > It is calculated from the styleMap when drawing the layer. You can access these properties like this. Let's say "layer" is your layer, and "feature" a feature you are interested in: var symbolizer = layer.styleMap.createSymbolizer(feature, feature.renderIntent); Now if you want to know your graphicWidth, you can access symbolizer.graphicWidth Note that createSymbolizer also takes the current scale into account for calculating the symbolizer. And don't expect this technique to help if you have a graphicHeight and want to know the graphicWidth. Some renderers do not need the other value, and some calculate it before rendering the feature, based on the size of the externalGraphic image. Does this help? Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From Peter.Sykora at ooe.gv.at Mon Dec 21 09:59:44 2009 From: Peter.Sykora at ooe.gv.at (Peter.Sykora@ooe.gv.at) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] How to access style properties of features? In-Reply-To: <4B2F87C9.9030000@opengeo.org> References: <05C80D686FDA0D4B811E25DFA72430D0041C2EE4@msli01-012.res01.ads.ooe.local> <4B2F5BDE.1030808@opengeo.org> <05C80D686FDA0D4B811E25DFA72430D0041C2EE5@msli01-012.res01.ads.ooe.local> <4B2F6EA0.4090706@opengeo.org> <05C80D686FDA0D4B811E25DFA72430D0041C2EE6@msli01-012.res01.ads.ooe.local> <4B2F87C9.9030000@opengeo.org> Message-ID: <05C80D686FDA0D4B811E25DFA72430D0041C2EE7@msli01-012.res01.ads.ooe.local> Hi, >It is calculated from the styleMap when drawing the layer. You >can access these properties like this. Let's say "layer" is >your layer, and "feature" a feature you are interested in: > >var symbolizer = layer.styleMap.createSymbolizer(feature, >feature.renderIntent); > >Now if you want to know your graphicWidth, you can access > >symbolizer.graphicWidth Yes, it works fine when I use the code released eg. by an onclick event. When I use it within one of my style functions, I then get a "too many recursions" error. Anyhow, thanks to your earlier post I found a workaround that works fine for me. Whenever I set a new style property that I need for further calculations, I store the value in a feature attribute. This way I can access the value later on without a need for a direct access to a style or whatever property. Thanks a lot for your hints! Peter From beppenapo at gmail.com Mon Dec 21 10:22:42 2009 From: beppenapo at gmail.com (beppe) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] some questions about popup extent & hyperlink Message-ID: <1261408962.6805.33.camel@beppe> Hi, I'm an italian OL's newbie, I come from a mapserver world and I'm very happy to discover every day something about OpenLayers! I've this code [1] and this mapfile [2], the geographic elements are stored in a postgis table. The code works but in the popup window, info are displayed like this: "GetFeatureInfo results: Layer 'ut' Feature 78: paese = 'Coredo' localita = 'S. Barbara'" Obviously I don't want info about "GetFeatureInfo", "Layer" and "Feature", but only about "paese" and "localita". The info, then, are print like a "text string". I'd want print the info in table style...but I don't know how !!! Question 2. I'd like to have in popup an hyperlink to a page in wich print a map with the extent of the selected feature, but: 1. my feature are point 2. I don't know how write the code!!! Any ideas, example or tutorial? thanks -beppe- [1] OpenLayers.ProxyHost = "http://localhost/cgi-bin/proxy.cgi?url="; var map; var info; // pink tile avoidance OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5; // make OL compute scale according to WMS spec OpenLayers.DOTS_PER_INCH = 25.4 / 0.28; function init(){ var format = 'image/png'; var bounds = new OpenLayers.Bounds( 653890.824038, 5121367.412500, 673982.300962, 5139410.087500 ); var options = { controls: [], maxExtent: bounds, maxResolution: 40.83535156249854, projection: "EPSG:3003", units: 'm' }; map = new OpenLayers.Map('map', options); // setup comuni var comuni = new OpenLayers.Layer.WMS( "comuni", "http://localhost/cgi-bin/mapserv?map=/var/www/vervo/config/default/pmapper_demo.map&", {layers: 'confini_com', tiled: 'true', tilesOrigin : "657732.15,5120937.825", },{buffer: 0} ); map.addLayer(comuni); var ctr = new OpenLayers.Layer.WMS("ctr", "http://localhost/cgi-bin/mapserv?map=/var/www/vervo/config/default/pmapper_demo.map&", {layers: 'ctr', srs: 'EPSG:3003', tiled: 'true', transparent: 'true', format: format}); map.addLayer(ctr); // setup ut var ut = new OpenLayers.Layer.WMS( "ut", "http://localhost/cgi-bin/mapserv?map=/var/www/vervo/config/default/pmapper_demo.map&", {srs: 'EPSG:3003', layers: 'ut', styles: '', format: format, tiled: 'true', tilesOrigin : "658390.746875,5121279.4", transparent: 'true' }, {buffer: 0} ); map.addLayer(ut); // build up all controls map.addControl(new OpenLayers.Control.PanZoomBar({ position: new OpenLayers.Pixel(2, 15) })); map.addControl(new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.Scale($('scale'))); map.addControl(new OpenLayers.Control.MousePosition({element: $('location')})); map.zoomToExtent(bounds); //Crea pop-up info var createPopup = function(response) { var lonlat = map.getLonLatFromViewPortPx(this.xy); var popup = new OpenLayers.Popup.FramedCloud( "chicken",lonlat, null,response.responseText,null,true); popup.setBackgroundColor("#c1cdc1"); popup.setOpacity(0.7); map.addPopup(popup, true /* exclusive */); function onFeatureUnselect(event) { var feature = event.feature; if(feature.popup) { map.removePopup(feature.popup); feature.popup.destroy(); delete feature.popup; } } }; // support GetFeatureInfo map.events.register('click', map, function (e) { var params = ut.getFullRequestString ({ REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: map.getExtent().toBBOX(), X: e.xy.x, Y: e.xy.y, INFO_FORMAT: 'text/plain', //QUERY_LAYERS: ut.params.LAYERS, QUERY_LAYERS: ut, FEATURE_COUNT: 50, RADIUS: 5, Srs: 'EPSG:3003', Layers: 'ut', //Layers: 'topp:unita\'_territoriali', //Styles: '', WIDTH: map.size.w, HEIGHT: map.size.h, format: format}, "http://localhost/cgi-bin/mapserv?map=/var/www/vervo/config/default/pmapper_demo.map&SERVICE=WMS&VERSION=1.1.1&QUERY_LAYERS=ut" ); // updateFeatureInfoFilters(params); OpenLayers.loadURL(params, '', e, createPopup); OpenLayers.Event.stop(e); }); } ------------------------------------------------- [2] LAYER NAME 'ut' TYPE POINT CONNECTIONTYPE postgis CONNECTION "dbname='mydb' host=localhost port=5432 user='myuser' password='mypwd'" DATA 'ut_geo FROM public.ut using unique "id_ut" using SRID=3003' PROJECTION "init=epsg:3003" END TOLERANCEUNITS pixels TOLERANCE 10 DUMP TRUE TEMPLATE void METADATA "RESULT_FIELDS" "paese,localita" "RESULT_HEADERS" "Paese, Localita'" "wfs_title" "ut" "wfs_featureid" "ut" "wms_include_items" "paese,localita" "ows_include_items" "paese, localita" END CLASS NAME "Unita' territoriali" STYLE SYMBOL 'circle' SIZE 8 OUTLINECOLOR 0 0 0 COLOR 222 255 22 END END END From punk.kish at gmail.com Mon Dec 21 10:31:59 2009 From: punk.kish at gmail.com (P Kishor) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] some questions about popup extent & hyperlink In-Reply-To: <1261408962.6805.33.camel@beppe> References: <1261408962.6805.33.camel@beppe> Message-ID: On Mon, Dec 21, 2009 at 9:22 AM, beppe wrote: > Hi, > I'm an italian OL's newbie, I come from a mapserver world and I'm very > happy to discover every day something about OpenLayers! > I've this code [1] and this mapfile [2], the geographic elements are > stored in a postgis table. > The code works but in the popup window, info are displayed like this: > "GetFeatureInfo results: Layer 'ut' Feature 78: paese = 'Coredo' > localita = 'S. Barbara'" > Obviously I don't want info about "GetFeatureInfo", "Layer" and > "Feature", but only about "paese" and "localita". > The info, then, are print like a "text string". I'd want print the info > in table style...but I don't know how !!! > You don't have a TEMPLATE in your mapfile... (it says TEMPLATE void). Define a TEMPLATE, and in that template (an HTML file), create your table like so
Paese[paese]
Localita[localita]
> Question 2. > I'd like to have in popup an hyperlink to a page in wich print a map > with the extent of the selected feature, but: > 1. my feature are point > 2. I don't know how write the code!!! > > Any ideas, example or tutorial? > thanks > > -beppe- > > [1] > OpenLayers.ProxyHost = "http://localhost/cgi-bin/proxy.cgi?url="; > > var map; > var info; > // pink tile avoidance > OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5; > // make OL compute scale according to WMS spec > OpenLayers.DOTS_PER_INCH = 25.4 / 0.28; > > function init(){ > ?var format = 'image/png'; > ?var bounds = new OpenLayers.Bounds( > ?653890.824038, 5121367.412500, 673982.300962, 5139410.087500 > ? ); > var options = { > ? ? ?controls: [], > ? ? ?maxExtent: bounds, > ? ? ?maxResolution: 40.83535156249854, > ? ? ?projection: "EPSG:3003", > ? ? ?units: 'm' > ? ?}; > > map = new OpenLayers.Map('map', options); > > // setup comuni > var comuni = new OpenLayers.Layer.WMS( > ? ? ? ? ? ? ? ? ? ?"comuni", > "http://localhost/cgi-bin/mapserv?map=/var/www/vervo/config/default/pmapper_demo.map&", > ? ? ? ? ? ? ? ? ? ?{layers: 'confini_com', > ? ? ? ? ? ? ? ? ? ? tiled: 'true', > ? ? ? ? ? ? ? ? ? ? tilesOrigin : "657732.15,5120937.825", > ? ? ? ? ? ? ? ? ? },{buffer: 0} > ? ? ? ? ? ? ? ?); > map.addLayer(comuni); > > > var ctr = new OpenLayers.Layer.WMS("ctr", > "http://localhost/cgi-bin/mapserv?map=/var/www/vervo/config/default/pmapper_demo.map&", > ? ? ? ? ? ? {layers: 'ctr', > ? ? ? ? ? ? srs: 'EPSG:3003', > ? ? ? ? ? ? tiled: 'true', > ? ? ? ? ? ? transparent: 'true', > ? ? ? ? ? ? format: format}); > map.addLayer(ctr); > > // setup ut > var ut = new OpenLayers.Layer.WMS( > ? ? ? ? ? ? ? ? ? ? ? ?"ut", > "http://localhost/cgi-bin/mapserv?map=/var/www/vervo/config/default/pmapper_demo.map&", > ? ? ? ? ? ? ? ? ? ?{srs: 'EPSG:3003', > ? ? ? ? ? ? ? ? ? ? layers: 'ut', > ? ? ? ? ? ? ? ? ? ? styles: '', > ? ? ? ? ? ? ? ? ? ? format: format, > ? ? ? ? ? ? ? ? ? ? tiled: 'true', > ? ? ? ? ? ? ? ? ? ? tilesOrigin : "658390.746875,5121279.4", > ? ? ? ? ? ? ? ? ? ? transparent: 'true' > ? ? ? ? ? ? ? ? ? ?}, > ? ? ? ? ? ? ? ? ? ?{buffer: 0} > ? ? ? ? ? ? ? ?); > map.addLayer(ut); > > // build up all controls > map.addControl(new OpenLayers.Control.PanZoomBar({ > ? ? ? ?position: new OpenLayers.Pixel(2, 15) > ? ? ? ? ? ? ? ?})); > map.addControl(new OpenLayers.Control.Navigation()); > map.addControl(new OpenLayers.Control.Scale($('scale'))); > map.addControl(new OpenLayers.Control.MousePosition({element: > $('location')})); > map.zoomToExtent(bounds); > > //Crea pop-up info > var createPopup = function(response) { > ? ? ? ?var lonlat = map.getLonLatFromViewPortPx(this.xy); > ? ? ? ?var popup = new OpenLayers.Popup.FramedCloud( > ? ? ? ? ? ? "chicken",lonlat, null,response.responseText,null,true); > ? ? ? ? ? ? popup.setBackgroundColor("#c1cdc1"); > ? ? ? ? ? ? popup.setOpacity(0.7); > map.addPopup(popup, true /* exclusive */); > > function onFeatureUnselect(event) { > ? ? ? ?var feature = event.feature; > ? ? ? ?if(feature.popup) { > ? ? ? ? ? ? ? ? map.removePopup(feature.popup); > ? ? ? ? ? ? ? ? feature.popup.destroy(); > ? ? ? ? ? ? ? ? delete feature.popup; > ? ? ? ? ? ? ? ?} > ? ? ? ? ?} > ? ? ? ?}; > > ? ? ? ? ? ? ? ?// support GetFeatureInfo > ? ? ? ? ? ? ? ?map.events.register('click', map, function (e) { > ? ? ? ? ? ? ? ? ? ?var params = ut.getFullRequestString ({ > ? ? ? ? ? ? ? ? ? ? ? ?REQUEST: "GetFeatureInfo", > ? ? ? ? ? ? ? ? ? ? ? ?EXCEPTIONS: "application/vnd.ogc.se_xml", > ? ? ? ? ? ? ? ? ? ? ? ?BBOX: map.getExtent().toBBOX(), > ? ? ? ? ? ? ? ? ? ? ? ?X: e.xy.x, > ? ? ? ? ? ? ? ? ? ? ? ?Y: e.xy.y, > ? ? ? ? ? ? ? ? ? ? ? ?INFO_FORMAT: 'text/plain', > ? ? ? ? ? ? ? ? ? ? ? ?//QUERY_LAYERS: ut.params.LAYERS, > ? ? ? ? ? ? ? ? ? ? ? ?QUERY_LAYERS: ut, > ? ? ? ? ? ? ? ? ? ? ? ?FEATURE_COUNT: 50, > ? ? ? ? ? ? ? ? ? ? ? ?RADIUS: 5, > ? ? ? ? ? ? ? ? ? ? ? ?Srs: 'EPSG:3003', > ? ? ? ? ? ? ? ? ? ? ? ?Layers: 'ut', > ? ? ? ? ? ? ? ? ? ? ? ?//Layers: 'topp:unita\'_territoriali', > ? ? ? ? ? ? ? ? ? ? ? ?//Styles: '', > ? ? ? ? ? ? ? ? ? ? ? ?WIDTH: map.size.w, > ? ? ? ? ? ? ? ? ? ? ? ?HEIGHT: map.size.h, > ? ? ? ? ? ? ? ? ? ? ? ?format: format}, > "http://localhost/cgi-bin/mapserv?map=/var/www/vervo/config/default/pmapper_demo.map&SERVICE=WMS&VERSION=1.1.1&QUERY_LAYERS=ut" > ? ? ? ? ? ? ? ? ? ? ? ?); > ? ? ? ? ? ? ? ? ? // updateFeatureInfoFilters(params); > ? ? ? ? ? ? ? ? ? ?OpenLayers.loadURL(params, '', e, createPopup); > ? ? ? ? ? ? ? ? ? ?OpenLayers.Event.stop(e); > ? ? ? ? ? ? ? ?}); > ? ? ? ? ? ?} > ------------------------------------------------- > [2] > LAYER > ? ?NAME 'ut' > ? ?TYPE POINT > ? ?CONNECTIONTYPE postgis > ? ?CONNECTION "dbname='mydb' host=localhost port=5432 user='myuser' > password='mypwd'" > ? ?DATA 'ut_geo FROM public.ut using unique "id_ut" using SRID=3003' > ?PROJECTION > ? ?"init=epsg:3003" > ?END > ?TOLERANCEUNITS pixels > ?TOLERANCE 10 > ?DUMP TRUE > ?TEMPLATE void > ?METADATA > ? ?"RESULT_FIELDS" "paese,localita" > ? ?"RESULT_HEADERS" "Paese, Localita'" > ? ?"wfs_title" "ut" > ? ?"wfs_featureid" "ut" > ? ?"wms_include_items" "paese,localita" > ? ?"ows_include_items" "paese, localita" > ?END > ?CLASS > ? ? ? NAME "Unita' territoriali" > ? ? ? STYLE > ? ? ? ? SYMBOL 'circle' > ? ? ? ? SIZE 8 > ? ? ? ? OUTLINECOLOR 0 0 0 > ? ? ? ? COLOR 222 255 22 > ? ? ? END > ? ?END > END > From cbo at le34.dk Mon Dec 21 10:36:26 2009 From: cbo at le34.dk (=?iso-8859-1?Q?Casper_B=F8rgesen?=) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] StyleMap, Style and Rules not working Message-ID: Looking at various examples of how to use styles in OpenLayers, we have built the following: var Layer_AddressWebService_1 = new OpenLayers.Layer.Vector( "AddressWebService_1", { styleMap: new OpenLayers.StyleMap( { "default": new OpenLayers.Style( { rules: [ new OpenLayers.Rule( { symbolizer: { "Point": { pointRadius: 4, graphicName: 'square', fillColor: 'blue', fillOpacity: 1, strokeWidth: 1, strokeOpacity: 1, strokeColor: '#0000FF' } } }) ] }) }) }, { displayInLayerSwitcher: false, isBaseLayer: false } ); We think this should resemble and hopefully be functionally identical to: var awsSymbolizer = { "Point": { pointRadius: 4, graphicName: "square", fillColor: "blue", fillOpacity: 1, strokeWidth: 1, strokeOpacity: 1, strokeColor: "#0000FF" } }; var awsStyle = new OpenLayers.Style(); awsStyle.addRules([new OpenLayers.Rule({symbolizer: awsSymbolizer})]); var awsStyleMap = new OpenLayers.StyleMap({"default": awsStyle}); var Layer_AddressWebService_1 = new OpenLayers.Layer.Vector("AddressWebService_1", { styleMap: awsStyleMap }, { displayInLayerSwitcher: false, isBaseLayer: false }); But it is not. When using the latter, points are visualised fine, but using the first part, results in nothing. The problem lies around the rules. Can anyone tell me what the major difference is? Regards Casper -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091221/37f6bc9a/attachment.html From carina_palanca at forcorp.com Mon Dec 21 10:44:34 2009 From: carina_palanca at forcorp.com (cgp) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Trouble with accessing vector/WFS layer features In-Reply-To: References: <1261175349673-4189252.post@n2.nabble.com> Message-ID: <1261410274342-4199050.post@n2.nabble.com> I am adding the layer like this: var wfs_layer3 = new OpenLayers.Layer.Vector("WFS Layer 3", { strategies: [ new OpenLayers.Strategy.BBOX(), saveStrategy], protocol: new OpenLayers.Protocol.WFS({ url: "/geoserver/wfs", featureType: "user_layer.layer_name", featureNS: "http://geoserver.sf.net", featurePrefix: "sde", srsName: "EPSG:900913", version: "1.1.0", geometryName:"SHAPE" }) }); map.addLayers([wfs_layer3]); Ivan Grcic-2 wrote: > > Hi, > > vector layer doesnt load features if it is not visible. What > strategy&protocol are you using? > > On Fri, Dec 18, 2009 at 11:29 PM, cgp wrote: >> >> When I start up my application, I add all the WFS layers and do >> setVisibility(false). Right after start up I attempt to access the WFS >> layer >> features with wfs_layer.features but it returns null. However, when I run >> setVisibility(true) and then setVisibility(false) right away, >> wfs_layer.features now returns all the features. >> >> I don't completely understand how OpenLayers works, but does this mean >> that >> the WFS layers are not actually loaded onto the map if onstartup I call >> setVisibility(false)? >> >> My goal is to access the features without having to display the WFS >> layer. >> On my previous post >> http://n2.nabble.com/Is-there-a-way-to-dynamically-get-the-feature-id-of-a-feature-from-a-WMS-layer-td4183834.html#a4183834 >> here , I am doing this because I need to get the ID of a particular >> feature. >> (Unless someone else has a more efficient way of doing this, please let >> me >> know). >> >> Thanks for your help. >> -- >> View this message in context: >> http://n2.nabble.com/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4189252.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/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4199050.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From yves.moisan at boreal-is.com Mon Dec 21 12:13:12 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Modify features with user specified coordinates Message-ID: <1261415592.4287.28.camel@yves-laptop> Hi All, I was asked to provide users with text boxes so that they can enter coordinates they want a vertex or point moved to in RESHAPE mode. I thought of a "MANUAL_RESHAPE" option, but looking at ModifyFeature.js shows that all values on the byte are taken : OpenLayers.Control.ModifyFeature.RESHAPE = 1 (RESIZE = 2, ROTATE = 4 and DRAG = 8) plus all combinations of mode. Has anyone implemented such a functionality in OL ? I could modify the behaviour of RESHAPE so that it pops text boxes upon clicking on a point or vertex, but I would rather have it as another editing option mode. Ideally, people would be allowed to toggle "default" RESHAPE (that is drag points or vertices with the mouse) and manual reshape. Ideas ? TIA, Yves From cusaro at gmail.com Mon Dec 21 12:25:33 2009 From: cusaro at gmail.com (cusaro) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] open a maker pop-up from outside the maparea Message-ID: <1261416333454-4199498.post@n2.nabble.com> hello, how is it possible to open a maker pop-up from outside of the map area? i try to send a click to the marker id but that doesn't work. thank you cusaro -- View this message in context: http://n2.nabble.com/open-a-maker-pop-up-from-outside-the-maparea-tp4199498p4199498.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Mon Dec 21 12:35:16 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Trouble with accessing vector/WFS layer features In-Reply-To: <1261410274342-4199050.post@n2.nabble.com> References: <1261175349673-4189252.post@n2.nabble.com> <1261410274342-4199050.post@n2.nabble.com> Message-ID: Well, layer.refresh({force:true}) wont do because this method is checking layer visibility refresh: function(obj) { if(this.calculateInRange() && this.visibility) { this.events.triggerEvent("refresh", obj); } }, but I think calling trigger read on BBOX strategy should do: layer.strategies[0].triggerRead() Cheers On Mon, Dec 21, 2009 at 4:44 PM, cgp wrote: > > I am adding the layer like this: > > ? ? ? ? ? ? ? ?var wfs_layer3 = new OpenLayers.Layer.Vector("WFS Layer 3", { > ? ? ? ? ? ? ? ? ? ? ? ?strategies: [ new OpenLayers.Strategy.BBOX(), saveStrategy], > ? ? ? ? ? ? ? ? ? ? ? ?protocol: new OpenLayers.Protocol.WFS({ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?url: ?"/geoserver/wfs", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?featureType: "user_layer.layer_name", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?featureNS: "http://geoserver.sf.net", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?featurePrefix: "sde", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?srsName: "EPSG:900913", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?version: "1.1.0", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?geometryName:"SHAPE" > ? ? ? ? ? ? ? ? ? ? ? ?}) > ? ? ? ? ? ? ? ?}); > ? ? ? ? ? ? ? ? map.addLayers([wfs_layer3]); > > > Ivan Grcic-2 wrote: >> >> Hi, >> >> vector layer doesnt load features if it is not visible. What >> strategy&protocol are you using? >> >> On Fri, Dec 18, 2009 at 11:29 PM, cgp wrote: >>> >>> When I start up my application, I add all the WFS layers and do >>> setVisibility(false). Right after start up I attempt to access the WFS >>> layer >>> features with wfs_layer.features but it returns null. However, when I run >>> setVisibility(true) and then setVisibility(false) right away, >>> wfs_layer.features now returns all the features. >>> >>> I don't completely understand how OpenLayers works, but does this mean >>> that >>> the WFS layers are not actually loaded onto the map if onstartup I call >>> setVisibility(false)? >>> >>> My goal is to access the features without having to display the WFS >>> layer. >>> On my previous post >>> http://n2.nabble.com/Is-there-a-way-to-dynamically-get-the-feature-id-of-a-feature-from-a-WMS-layer-td4183834.html#a4183834 >>> here , I am doing this because I need to get the ID of a particular >>> feature. >>> (Unless someone else has a more efficient way of doing this, please let >>> me >>> know). >>> >>> Thanks for your help. >>> -- >>> View this message in context: >>> http://n2.nabble.com/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4189252.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/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4199050.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 robhyx at gmail.com Mon Dec 21 14:57:03 2009 From: robhyx at gmail.com (Robert Hicks) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Get lat/lon from user click? Message-ID: Hey all, is there a way to get the coordinates of a point on the map that a user has just clicked on? I see Mouse-position displays the coordinates at the bottom of the screen, and I also see you can register muliple mouse events to te map, but I need to store coordinates in a javascript var to send in a request to my server. Thanks! -- web http://www.hyxspace.com aim hyx1138 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091221/24f9a282/attachment.html From tobias.wendorff at uni-dortmund.de Mon Dec 21 15:08:22 2009 From: tobias.wendorff at uni-dortmund.de (Tobias Wendorff) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Get lat/lon from user click? In-Reply-To: References: Message-ID: <4B2FD5B6.8070703@uni-dortmund.de> Hi Robert, Robert Hicks schrieb: > Hey all, is there a way to get the coordinates of a point on the map > that a user has just clicked on? I see Mouse-position displays the > coordinates at the bottom of the screen, and I also see you can register > muliple mouse events to te map, but I need to store coordinates in a > javascript var to send in a request to my server. my code might help you - zoom as far as possible ;-) http://81.89.102.117/openstreetmap/reverse-geocoder/index.html Best regards, Tobias From tobias.wendorff at uni-dortmund.de Mon Dec 21 15:08:49 2009 From: tobias.wendorff at uni-dortmund.de (Tobias Wendorff) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Get lat/lon from user click? In-Reply-To: References: Message-ID: <4B2FD5D1.5060304@uni-dortmund.de> wooops ... "as near as possible" of course ;-)) From SansonR at asurequality.com Mon Dec 21 15:01:20 2009 From: SansonR at asurequality.com (Robert Sanson) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Get lat/lon from user click? In-Reply-To: References: Message-ID: <4B308ADF.379F.0037.0@asurequality.com> Hi Robert map.events.register('click', map, function (e) { var xys = map.getLonLatFromViewPortPx(e.xy); var easting = xys.lon; var northing = xys.lat; Event.stop(e); }); Cheers, Robert >>> Robert Hicks 22/12/2009 8:57 a.m. >>> Hey all, is there a way to get the coordinates of a point on the map that a user has just clicked on? I see Mouse-position displays the coordinates at the bottom of the screen, and I also see you can register muliple mouse events to te map, but I need to store coordinates in a javascript var to send in a request to my server. Thanks! -- web http://www.hyxspace.com aim hyx1138 Click here ( https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg== ) to report this email as spam. ------------------------------------------------------------------ The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message. ------------------------------------------------------------------ This message has been scanned for malware by SurfControl plc. www.surfcontrol.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091222/1135710d/attachment.html From madagu at gmail.com Mon Dec 21 15:11:56 2009 From: madagu at gmail.com (MadAGu) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] insert spatial data into mysql In-Reply-To: <1260799377919-4164235.post@n2.nabble.com> References: <1260799377919-4164235.post@n2.nabble.com> Message-ID: <1261426316960-4200314.post@n2.nabble.com> well anyone? -- View this message in context: http://n2.nabble.com/insert-spatial-data-into-mysql-tp4164235p4200314.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Mon Dec 21 17:12:36 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] insert spatial data into mysql In-Reply-To: <1261426316960-4200314.post@n2.nabble.com> Message-ID: Hi, If you not want to use WFS-T, you can manuell add your polygons to your db with a server script. I do this task by looping through the features of a vector layer, to get the attributes and geometry of these features and and post them to a server script. The script uses ODBC to insert the features geometry into my db. var aspODBC = "..."; //server script to insert data into a MS Access MDB via ODBC var KATEGORIE = "AREAS"; var TABLE = "POLYGONS"; function SaveGeometry(vlayer) { var featuresCount = vlayer.features.length; for(var i=0;i References: <1261175349673-4189252.post@n2.nabble.com> <1261410274342-4199050.post@n2.nabble.com> Message-ID: <1261434456833-4200963.post@n2.nabble.com> Thank you for your response Ivan. I tried your suggestion but I'm not sure when I should call it. Do I call it just before I add it to the map, or just before I try to access a layer's feature? I tried calling it just after I added it like this: var wfs_layer = new OpenLayers.Layer.Vector("WFS Layer", { strategies: [ new OpenLayers.Strategy.BBOX(), saveStrategy], protocol: new OpenLayers.Protocol.WFS({ url: "/geoserver/wfs", featureType: "user_layer.layer_name", featureNS: "http://geoserver.sf.net", featurePrefix: "sde", srsName: "EPSG:900913", version: "1.1.0", geometryName:"SHAPE" }) }); wfs_layer.setVisibility(false); wfs_layer.strategies[0].triggerRead(); <---calling it right here map.addLayers([wfs_layer]); Or var wfs_layer = map.getLayersByName("WFS Layer")[0]; wfs_layer.strategies[0].triggerRead(); var layer_features = wfs_layer.features; But as soon as I try to access the layer with wfs_layer3.features, it gives a "bounds is null" error. Then, I tried initializing the layer with a bounds object with new OpenLayers.Strategy.BBOX({bounds:map_bounds}) so that bounds is not null. But when I do that it makes the browser crash instead. Any other ideas? -- View this message in context: http://n2.nabble.com/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4200963.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From robhyx at gmail.com Mon Dec 21 17:31:08 2009 From: robhyx at gmail.com (Robert Hicks) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] Get lat/lon from user click? In-Reply-To: <8d7fcad40912211243l7c92ecb0p38264d3a8b29c2af@mail.gmail.com> References: <8d7fcad40912211243l7c92ecb0p38264d3a8b29c2af@mail.gmail.com> Message-ID: Great, thanks everyone! I got what I needed and it works great! On Mon, Dec 21, 2009 at 3:43 PM, Rodolfo Barriga wrote: > you can create a custom openlayer control ... something like this > > > > OpenLayers.Control. > ClickLayerInfo = OpenLayers.Class(OpenLayers.Control, { > defaultHandlerOptions: { > 'single': true, > 'double': false, > 'pixelTolerance': 0, //tolarance > 'stopSingle': false, > 'stopDouble': false > }, > initialize: function(options) { > this.handlerOptions = OpenLayers.Util.extend( > {}, this.defaultHandlerOptions > ); > OpenLayers.Control.prototype.initialize.apply( > this, arguments > ); > this.handler = new OpenLayers.Handler.Click( > this, { > 'click': this.trigger > }, this.handlerOptions > ); > }, > trigger: function(e) { > var lonLat = you_map.getLonLatFromViewPortPx(e.xy); > > // you cant transform you lat and lon > // you can def a pixel buffer with the map resolution > // you can do a asyn call > } > }); > > its work for me !! :-) > gretting Rodolfo B. > > > 2009/12/21 Robert Hicks > >> Hey all, is there a way to get the coordinates of a point on the map that >> a user has just clicked on? I see Mouse-position displays the coordinates at >> the bottom of the screen, and I also see you can register muliple mouse >> events to te map, but I need to store coordinates in a javascript var to >> send in a request to my server. >> >> Thanks! >> >> -- >> web http://www.hyxspace.com >> aim hyx1138 >> >> _______________________________________________ >> Dev mailing list >> Dev@openlayers.org >> http://openlayers.org/mailman/listinfo/dev >> >> > -- web http://www.hyxspace.com aim hyx1138 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091221/eb0166d7/attachment.html From igrcic at gmail.com Tue Dec 22 02:27:32 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Trouble with accessing vector/WFS layer features In-Reply-To: <1261434456833-4200963.post@n2.nabble.com> References: <1261175349673-4189252.post@n2.nabble.com> <1261410274342-4199050.post@n2.nabble.com> <1261434456833-4200963.post@n2.nabble.com> Message-ID: On Mon, Dec 21, 2009 at 11:27 PM, cgp wrote: > > Thank you for your response Ivan. I tried your suggestion but I'm not sure > when I should call it. Do I call it just before I add it to the map, or just > before I try to access a layer's feature? > > I tried calling it just after I added it like this: > > ? ? ? ? ? ? ? ?var wfs_layer = new OpenLayers.Layer.Vector("WFS Layer", { > ? ? ? ? ? ? ? ? ? ? ? ?strategies: [ new OpenLayers.Strategy.BBOX(), > saveStrategy], > ? ? ? ? ? ? ? ? ? ? ? ?protocol: new OpenLayers.Protocol.WFS({ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?url: ?"/geoserver/wfs", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?featureType: "user_layer.layer_name", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?featureNS: "http://geoserver.sf.net", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?featurePrefix: "sde", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?srsName: "EPSG:900913", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?version: "1.1.0", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?geometryName:"SHAPE" > ? ? ? ? ? ? ? ? ? ? ? ?}) > ? ? ? ? ? ? ? ?}); > ? ? ? ? ? ? ? ?wfs_layer.setVisibility(false); > ? ? ? ? ? ? ? ?wfs_layer.strategies[0].triggerRead(); <---calling it right > here > ? ? ? ? ? ? ? ? map.addLayers([wfs_layer]); > > Or > > ? ? ? ? ? ? ? ?var wfs_layer = map.getLayersByName("WFS Layer")[0]; > ? ? ? ? ? ? ? ?wfs_layer.strategies[0].triggerRead(); > wfs_layer.events.on({ featuresadded: function(){ var layer_features = wfs_layer.features; ... ... } }) cheers > > > But as soon as I try to access the layer with wfs_layer3.features, it gives > a "bounds is null" error. Then, I tried initializing the layer with a bounds > object with new OpenLayers.Strategy.BBOX({bounds:map_bounds}) so that bounds > is not null. But when I do that it makes the browser crash instead. > > Any other ideas? > > > -- > View this message in context: http://n2.nabble.com/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4200963.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 jimmy.aumard at gmail.com Tue Dec 22 04:04:13 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] change z-index of feature Message-ID: Hi, I have point, line and polygon on the same vector layer and when a polygon is drawn above a point I can't access to my point. I would like to know if it's possible to change z-index (like layer but for feature if exist) or I search how can access to my point. Sorry for my English Regards Jim -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091222/8b5bc1d6/attachment.html From igrcic at gmail.com Tue Dec 22 04:09:38 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] change z-index of feature In-Reply-To: References: Message-ID: Hi, I think this would be the right way to do it: http://dev.openlayers.org/sandbox/tschaub/select/examples/feature-events.html On Tue, Dec 22, 2009 at 10:04 AM, Jimmy Aumard wrote: > Hi, > > I have point, line and polygon on the same vector layer and when a polygon > is drawn above a point I can't access to my point. > I would like to know if it's possible to change z-index (like layer but for > feature if exist) or I search how can access to my point. > > Sorry for my English > > Regards > > Jim > > -- > Aumard Jimmy > D?veloppeur - http://www.kinaxia.fr > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From osm at tappenbeck.net Tue Dec 22 04:59:56 2009 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] new OpenLayers.Layer.Text with autosize Message-ID: <4B30989C.4020907@tappenbeck.net> Hi ! i used in [1] following command: var caravan = new OpenLayers.Layer.Text( "Caravan", { location:"data/data_camping_mv/caravan.txt", projection: new OpenLayers.Projection("EPSG:4326")} ); map.addLayer(caravan); is there a possiblity to autosize this popup ?? i only found informations about the addmarker-function. regards Jan :-) [1] http://www.tappenbeck.net/osm/mv1/index.php?id=1 From maimaj at gmail.com Tue Dec 22 06:05:59 2009 From: maimaj at gmail.com (maimaj) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Overridden Cookie Problem Message-ID: <1261479959222-4202992.post@n2.nabble.com> Hi, I am using OL 2.8 with Geoserver 2.0. However, I do not send requests directly to Geoserver due to some security reasons. Instead, OL sends requests to a servlet dispatcher which dispatches the request to Geoserver after some security checking. Using the HttpDebugger, I found that OL uses a cookie different from document.cookie while sending requests. So when I copy the request string in the address bar, my servlet dispatcher works fine. When OL sends requests, the dispatcher cannot recognize that the request is sent by the same user; thus throws exception. Is there any way to force OL to use document.cookie for sending HttpXMLRequests? Thanks in advance, Majid -- View this message in context: http://n2.nabble.com/Overridden-Cookie-Problem-tp4202992p4202992.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zaza1851983ml at googlemail.com Tue Dec 22 07:39:55 2009 From: zaza1851983ml at googlemail.com (Moataz Elmasry) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Add new Parameter to options Message-ID: <4B30BE1B.4050801@googlemail.com> Hello List I've created a custom toolbar as follows: OpenLayers.Control.CustomNavToolbar = OpenLayers.Class(OpenLayers.Control.Panel, { Map : null, initialize : function(options) {console.log(Map);} }); Now I want to add the parameter Map to to the constructor: var nav = OpenLayers.Control.CustomNavToolbar({Map:map}) On the console.log(Map) I get that object Map is not defined. When I call on the other hand console.log(options.Map) I get the actual object. How can I define the parameter so that I can directly use "Map" instead of options.Map? Thank you very much in advance From jansen at terrestris.de Tue Dec 22 08:05:03 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] new OpenLayers.Layer.Text with autosize In-Reply-To: <4B30989C.4020907@tappenbeck.net> References: <4B30989C.4020907@tappenbeck.net> Message-ID: <4B30C3FF.8080600@terrestris.de> Hi Jan, you should be able to override the popup generation function (I didn't test it, though): OpenLayers.Feature.prototype.createPopup = function (closeBox) { if (this.lonlat != null) { var id = this.id + "_popup"; var anchor = this.marker ? this.marker.icon : null; if (!this.popup) { this.popup = new (this.popupClass)(id, this.lonlat, this.data.popupSize, this.data.popupContentHTML, anchor, closeBox); // the next line is different from the current implementation this.popup.autoSize = true; } if (this.data.overflow != null) { this.popup.contentDiv.style.overflow = this.data.overflow; } this.popup.feature = this; } return this.popup; }*; * (I only added the "this.popup.autoSize = true"-line) Include the above JavaScript right after loading the OpenLayers-library, this is an application wide change. Regards, Marc * * Jan Tappenbeck wrote: > Hi ! > > i used in [1] following command: > > var caravan = new OpenLayers.Layer.Text( "Caravan", { > location:"data/data_camping_mv/caravan.txt", projection: new > OpenLayers.Projection("EPSG:4326")} ); map.addLayer(caravan); > is there a possiblity to autosize this popup ?? > > i only found informations about the addmarker-function. > > regards Jan :-) > > [1] http://www.tappenbeck.net/osm/mv1/index.php?id=1 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From jimmy.aumard at gmail.com Tue Dec 22 08:33:24 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] change z-index of feature In-Reply-To: References: Message-ID: 2009/12/22 Jimmy Aumard > Hi Ivan, > > I can't use this because I use a custom "rightclick" with selectFeature for > a context menu on feature and if I use your example I can't use my > rightclick. > I test it and both doesn't work. > If it's possible I would like to change the z-index of a specific feature. > It's possible ? > > Thanks for help. > > Jim > > 2009/12/22 Ivan Grcic > > Hi, I think this would be the right way to do it: >> >> http://dev.openlayers.org/sandbox/tschaub/select/examples/feature-events.html >> >> On Tue, Dec 22, 2009 at 10:04 AM, Jimmy Aumard >> wrote: >> > Hi, >> > >> > I have point, line and polygon on the same vector layer and when a >> polygon >> > is drawn above a point I can't access to my point. >> > I would like to know if it's possible to change z-index (like layer but >> for >> > feature if exist) or I search how can access to my point. >> > >> > Sorry for my English >> > >> > Regards >> > >> > Jim >> > >> > -- >> > Aumard Jimmy >> > D?veloppeur - http://www.kinaxia.fr >> > >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> > >> >> >> >> -- >> Ivan Grcic >> > > > > -- > Aumard Jimmy > D?veloppeur - http://www.kinaxia.fr > -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091222/849e1f27/attachment.html From rauch at rvr-online.de Tue Dec 22 11:32:18 2009 From: rauch at rvr-online.de (Rauch, Barbara) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Problem with WFS/Popups in Firefox Message-ID: <1BE75F43949267478A3315EBE7E2D6310A85324C@w2k-ex02.VERBAND.LOCAL> Hello, I successfully implemented WFS-Layers with individual symbols by creating an OpenLayers feature class for each layer. These symbols are clickable via clickevent that opens a Popup which is filled with informations by a GetFeatureRequest. In Internet Explorer everything works fine but in Firefox I have the following problem with the popup: After panning the map, some of the popups do no longer open on the symbol but are displaced and open with an offset away from the symbol - that does not occur always to the same WFS but changes. The problem is, that the popups then also don't get the informations and there is no error-message in firefox (I'm working with version 3.0). You can see a live-demo here: http://services.metropoleruhr.de/ol_print/ol_viewer.html Does anybody know how to fix this problem? Thanks for your help and greetings from Marleen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091222/ff7f0a73/attachment.html From rauch at rvr-online.de Wed Dec 23 03:06:12 2009 From: rauch at rvr-online.de (Rauch, Barbara) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Problem with WFS/Popups in Firefox Message-ID: <1BE75F43949267478A3315EBE7E2D6310A85324E@w2k-ex02.VERBAND.LOCAL> Hello again, I'm working with Openlayers 2.7, but also tried version 2.8, but the problem with the popup-displacing after panning in Firefox remains. I also tried FramedCloud-Popup instead of AnchoredBubble - still the same problem in Firefox. Can anaybody help? Greetings Marleen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091223/63f80ac6/attachment.html From jimmy.aumard at gmail.com Wed Dec 23 03:29:56 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Filters doesn't work with features attributes Message-ID: Hi, I have problems with filters. I try to create filter dynamically to select many feature on my layer. Some test code : var layer=map.getLayersBy('name','franch')[0]; var filter= new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LIKE, property: "Nom", value: "test" }); for(i=0;i References: Message-ID: Rectification My feature have feature.attributes.Nom but not feature.Nom. It's possible to filter under an attributes? Cheers Jim 2009/12/23 Jimmy Aumard > Hi, > > I have problems with filters. I try to create filter dynamically to select > many feature on my layer. > > Some test code : > > var layer=map.getLayersBy('name','franch')[0]; > var filter= new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.LIKE, > property: "Nom", > value: "test" > }); > for(i=0;i var feature=layer.features[i]; > alert(feature.attributes.Nom); > if(filter.evaluate(feature)){ > alert('ee'); > } > } > > I have features with an attribute "Nom" = "test" but the filter return > alway false. > > What I'm doing wrong? > > Regards, > > Jim > > -- > Aumard Jimmy > D?veloppeur - http://www.kinaxia.fr > -- Aumard Jimmy D?veloppeur - http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091223/f95de887/attachment.html From jamesmikedupont at googlemail.com Wed Dec 23 05:17:28 2009 From: jamesmikedupont at googlemail.com (jamesmikedupont@googlemail.com) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog Message-ID: Hi there, I have attempted to embed openlayers in a blog post, and am failing! Any help would be appreciated. using osm data hosted OSM data on archive.org http://osmopenlayers.blogspot.com/2009/12/test-embed.html here is get a octet bytestream because archive org does not say the right filetype. http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this returns a 206 partial content and fails. in a pastebin file that is delivered as text: http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html Date Wed, 23 Dec 2009 10:15:43 GMT Server Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4 PHP/4.3.10-22 mod_perl/1.29 X-Powered-By PHP/4.3.10-22 Content-Disposition attachment; filename="f28514ba0.txt" Keep-Alive timeout=15, max=100 Connection Keep-Alive Transfer-Encoding chunked Content-Type text/plain; charset=iso-8859-1 So the problem might be the attachment... and that data from osm directly again on pastebin, http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a 200 ok. It returns an : text/plain; charset=iso-8859-1 but does not render. But there is still nothing there from osm directly http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html firebug says :no element found And my last try was to put the code from osm on the page directly, also not rendering but the xml is loading. http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html but nothing is working would appreciate any tips and help thanks mike From jansen at terrestris.de Wed Dec 23 07:28:49 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Problem with WFS/Popups in Firefox In-Reply-To: <1BE75F43949267478A3315EBE7E2D6310A85324E@w2k-ex02.VERBAND.LOCAL> References: <1BE75F43949267478A3315EBE7E2D6310A85324E@w2k-ex02.VERBAND.LOCAL> Message-ID: <4B320D01.9000603@terrestris.de> Hi Marleen, I actually opened the URL you provided yesterday but could not reproduce the described behavior. Could you give detailled information about what to do to see the displaced popups? Regards, Marc Rauch, Barbara wrote: > > Hello again, > > I?m working with Openlayers 2.7, but also tried version 2.8, but the > problem with the popup-displacing after panning in Firefox remains. I > also tried FramedCloud-Popup instead of AnchoredBubble ? still the > same problem in Firefox. > > Can anaybody help? > > Greetings > > Marleen > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From jansen at terrestris.de Wed Dec 23 07:37:46 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: References: Message-ID: <4B320F1A.4090001@terrestris.de> Hi Mike, I am pretty sure that you aren't allowed to acces datasources via XHR/AJAX from other servers than the one the original page is served from. see: http://en.wikipedia.org/wiki/Same_origin_policy Just a quick guess, though. regards, Marc jamesmikedupont@googlemail.com wrote: > Hi there, > I have attempted to embed openlayers in a blog post, > and am failing! Any help would be appreciated. > > using osm data hosted OSM data on archive.org > http://osmopenlayers.blogspot.com/2009/12/test-embed.html > > here is get a octet bytestream because archive org does not say the > right filetype. > http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this > returns a 206 partial content and fails. > > in a pastebin file that is delivered as text: > http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html > Date Wed, 23 Dec 2009 10:15:43 GMT > Server Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4 > PHP/4.3.10-22 mod_perl/1.29 > X-Powered-By PHP/4.3.10-22 > Content-Disposition attachment; filename="f28514ba0.txt" > Keep-Alive timeout=15, max=100 > Connection Keep-Alive > Transfer-Encoding chunked > Content-Type text/plain; charset=iso-8859-1 > > So the problem might be the attachment... > > and that data from osm directly again on pastebin, > http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html > data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a 200 ok. > It returns an : text/plain; charset=iso-8859-1 but does not render. > But there is still nothing there > > from osm directly > http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html > firebug says :no element found > > And my last try was to put the code from osm on the page directly, > also not rendering but the xml is loading. > http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html > > but nothing is working > > would appreciate any tips and help > thanks > mike > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Dipl.-Geogr. 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://www.terrestris.de Amtsgericht Bonn, HRA 6835 Komplement?rin: terrestris Verwaltungsgesellschaft mbH vertreten durch: Hinrich Paulsen, Till Adams From julien.jeudy at magellium.fr Wed Dec 23 08:37:15 2009 From: julien.jeudy at magellium.fr (Julien Jeudy) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Format GML 3 issue? Message-ID: <005501ca83d5$0a86ce80$1f946b80$@jeudy@magellium.fr> Dear all, I have a doubt on a GML 3 OpenLayers format issue (from a WFS 1.1.0). In GML there are two ways to list polygons points: 1. a unique posList element: the following geom is correctly transform from GML3 to OpenLayers geometry - 8427711.443672495 4658480.583807316 -8428116.646618983 4671596.358484082 -8429661.427192722 4697373.995504196 -8432776.70314257 . 2. a list of pos elements: But this geom is not correctly transform 3944245.09999984 3978948.409156078 3944282.8999998407 3978974.7107042107 . I think it's due to this part of code (from trunk - OpenLayers.Format.GML.v3.js). Because on each iteration of gml pos the points array is erased. "pos": function(node, obj) { var str = this.getChildValue(node).replace( this.regExes.trimSpace, "" ); var coords = str.split(this.regExes.splitSpace); var point; if(this.xy) { point = new OpenLayers.Geometry.Point( coords[0], coords[1], coords[2] ); } else { point = new OpenLayers.Geometry.Point( coords[1], coords[0], coords[2] ); } obj.points = [point]; }, Does anyone know whether the GML is not conform or if it's possible to propose a patch? If it's not a GML conformity issue, I think that the following patch can solve the problem but i'm not sure it's the best way: "pos": function(node, obj) { ... if(obj.points) { obj.points.push(point); } else { obj.points = [point]; } } But i'm not sure it's the best way to do this. thanks, Julien From jtrsmith at gmail.com Wed Dec 23 08:52:05 2009 From: jtrsmith at gmail.com (jtrsmith@gmail.com) Date: Wed Sep 1 17:18:20 2010 Subject: [OpenLayers-Users] Mapping areas from database Message-ID: <96723350-6FFE-4448-8D7F-09D421489AEE@gmail.com> I am new to openlayers, so please excuse my lack of knowledge here. I have set up a map of my college campus in openlayers and would like to add some functionality to it. What I am looking to do is have locations ( prefferably rectangular polygon areas ) set up that when clicked will open a popup and show a photograph of the location. I have a database set up in SQL with the names, locations, and photographs. I am just not sure how to get the information to show on my map. I did look at the examples, some of them help, but I am still unsure how I can use the database information on my map. I have added a popup to my map using the example in select-feature-openpopup, however I am unable to add multiple locations with different information. Should I be using an XML document to populate my map? How would I set up openlayers to get that information? Sorry for the long post, can anyone point me in the right direction? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091223/e344f1b5/attachment.html From jamesmikedupont at googlemail.com Wed Dec 23 09:38:32 2009 From: jamesmikedupont at googlemail.com (jamesmikedupont@googlemail.com) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: <4B320F1A.4090001@terrestris.de> References: <4B320F1A.4090001@terrestris.de> Message-ID: Thanks for your advice. That is interesting. I never did anything like this, and I feed pretty stupid right now! But it will be possible to host the webpages on archive.org as well and work without the blog itself. It just would be nice to separate the display and the data storage. That effectively reduces the usage of openlayers to people who have control of domains, right? It will not be possible to people to just create maps with any data they want without a server to proxy the data. Now, this example, it displays an openstreetmap map http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html but the fetch to : http://www.openstreetmap.org/api/0.6/way/24315294/full that fails, or never returns. But the same one to use open layer to load the data from osm fails : http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html It calles get on this url http://www.openstreetmap.org/api/0.6/way/24315294 in the request XMLHttpRequest.js (line 200) the other thing is that I dont get any error message about security problems I found this document here: http://docs.openlayers.org/library/request.html So, realistically it is not possible to host open layers on a blog? mike On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen wrote: > Hi Mike, > > I am pretty sure that you aren't allowed to acces datasources via XHR/AJAX > from other servers than the one the original page is served from. > > see: http://en.wikipedia.org/wiki/Same_origin_policy > > Just a quick guess, though. > > regards, > Marc > > > jamesmikedupont@googlemail.com wrote: >> >> Hi there, >> I have attempted to embed openlayers in a blog post, >> and am failing! Any help would be appreciated. >> >> using osm data hosted OSM data on archive.org >> http://osmopenlayers.blogspot.com/2009/12/test-embed.html >> >> here is get a octet bytestream because archive org does not say the >> right filetype. >> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this >> returns a 206 partial content and fails. >> >> in a pastebin file that is delivered as text: >> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html >> Date ? ?Wed, 23 Dec 2009 10:15:43 GMT >> Server ?Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4 >> PHP/4.3.10-22 mod_perl/1.29 >> X-Powered-By ? ?PHP/4.3.10-22 >> Content-Disposition ? ? attachment; filename="f28514ba0.txt" >> Keep-Alive ? ? ?timeout=15, max=100 >> Connection ? ? ?Keep-Alive >> Transfer-Encoding ? ? ? chunked >> Content-Type ? ?text/plain; charset=iso-8859-1 >> >> So the problem might be the attachment... >> >> and that data from osm directly again on pastebin, >> >> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html >> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a >> 200 ok. >> It returns an : text/plain; charset=iso-8859-1 but does not render. >> But there is still nothing there >> >> from osm directly >> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >> firebug says :no element found >> >> And my last try was to put the code from osm on the page directly, >> also not rendering but the xml is loading. >> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >> >> but nothing is working >> >> would appreciate any tips and help >> thanks >> mike >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > > > ?Dipl.-Geogr. 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://www.terrestris.de > > ?Amtsgericht Bonn, HRA 6835 > ?Komplement?rin: ?terrestris Verwaltungsgesellschaft mbH > ?vertreten durch: Hinrich Paulsen, Till Adams > > From jansen at terrestris.de Wed Dec 23 09:29:22 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problem with WFS/Popups in Firefox In-Reply-To: <4B320D01.9000603@terrestris.de> References: <1BE75F43949267478A3315EBE7E2D6310A85324E@w2k-ex02.VERBAND.LOCAL> <4B320D01.9000603@terrestris.de> Message-ID: <4B322942.70004@terrestris.de> Hi Marleen, At least now I could confirm the behaviour once or twice. Just guessing (most of my brain is of for holidays): * In the cases I had no popup content, the wfs-request had an incorrect BBOX and therefore returned no result. * Seems as if you are asking a wfs for a feature with a bounding box of ? 250m in all directions, right? How do you obtain the clicked coordinate? * Are you sure that your projection is set correctly? Did you include a pro4.js-definition for 31466? Proj4js.defs["EPSG:31466"] = "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"; Regards, Marc PS: please reply to the list next time :-) Marc Jansen wrote: > Hi Marleen, > > I actually opened the URL you provided yesterday but could not reproduce > the described behavior. Could you give detailled information about what > to do to see the displaced popups? > > Regards, > Marc > > > Rauch, Barbara wrote: > >> Hello again, >> >> I?m working with Openlayers 2.7, but also tried version 2.8, but the >> problem with the popup-displacing after panning in Firefox remains. I >> also tried FramedCloud-Popup instead of AnchoredBubble ? still the >> same problem in Firefox. >> >> Can anaybody help? >> >> Greetings >> >> Marleen >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Dipl.-Geogr. 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://www.terrestris.de Amtsgericht Bonn, HRA 6835 Komplement?rin: terrestris Verwaltungsgesellschaft mbH vertreten durch: Hinrich Paulsen, Till Adams From jansen at terrestris.de Wed Dec 23 10:29:20 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: References: <4B320F1A.4090001@terrestris.de> Message-ID: <4B323750.6050208@terrestris.de> Hi Mike, as for OpenLayers, it shouldn't be a problem to get it hosted nearly everywhere since it is only JavaScript. Obviously you cannot use any datasource, though. Maybe you can set up a proxy that handles the requests, but I'd doubt that it is possible for your current *.blogspot.com-adress. Regards, Marc jamesmikedupont@googlemail.com wrote: > Thanks for your advice. That is interesting. > I never did anything like this, and I feed pretty stupid right now! > > But it will be possible to host the webpages on archive.org as well > and work without the blog itself. It just would be nice to separate > the display and the data storage. That effectively reduces the usage > of openlayers to people who have control of domains, right? It will > not be possible to people to just create maps with any data they want > without a server to proxy the data. > > Now, this example, it displays an openstreetmap map > http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html > > but the fetch to : > http://www.openstreetmap.org/api/0.6/way/24315294/full > that fails, or never returns. > > But the same one to use open layer to load the data from osm fails : > http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html > > It calles get on this url http://www.openstreetmap.org/api/0.6/way/24315294 > in the request XMLHttpRequest.js (line 200) > > the other thing is that I dont get any error message about security problems > > I found this document here: > http://docs.openlayers.org/library/request.html > > So, realistically it is not possible to host open layers on a blog? > > > mike > > On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen wrote: > >> Hi Mike, >> >> I am pretty sure that you aren't allowed to acces datasources via XHR/AJAX >> from other servers than the one the original page is served from. >> >> see: http://en.wikipedia.org/wiki/Same_origin_policy >> >> Just a quick guess, though. >> >> regards, >> Marc >> >> >> jamesmikedupont@googlemail.com wrote: >> >>> Hi there, >>> I have attempted to embed openlayers in a blog post, >>> and am failing! Any help would be appreciated. >>> >>> using osm data hosted OSM data on archive.org >>> http://osmopenlayers.blogspot.com/2009/12/test-embed.html >>> >>> here is get a octet bytestream because archive org does not say the >>> right filetype. >>> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this >>> returns a 206 partial content and fails. >>> >>> in a pastebin file that is delivered as text: >>> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html >>> Date Wed, 23 Dec 2009 10:15:43 GMT >>> Server Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4 >>> PHP/4.3.10-22 mod_perl/1.29 >>> X-Powered-By PHP/4.3.10-22 >>> Content-Disposition attachment; filename="f28514ba0.txt" >>> Keep-Alive timeout=15, max=100 >>> Connection Keep-Alive >>> Transfer-Encoding chunked >>> Content-Type text/plain; charset=iso-8859-1 >>> >>> So the problem might be the attachment... >>> >>> and that data from osm directly again on pastebin, >>> >>> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html >>> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a >>> 200 ok. >>> It returns an : text/plain; charset=iso-8859-1 but does not render. >>> But there is still nothing there >>> >>> from osm directly >>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>> firebug says :no element found >>> >>> And my last try was to put the code from osm on the page directly, >>> also not rendering but the xml is loading. >>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>> >>> but nothing is working >>> >>> would appreciate any tips and help >>> thanks >>> mike >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> From jamesmikedupont at googlemail.com Wed Dec 23 11:16:09 2009 From: jamesmikedupont at googlemail.com (jamesmikedupont@googlemail.com) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: <4B323750.6050208@terrestris.de> References: <4B320F1A.4090001@terrestris.de> <4B323750.6050208@terrestris.de> Message-ID: Yes exactly, but if I host the page on archive.org then I can access the data on the same domain. I had a misconception about this whole thing, obviously mashups are going to create a lot more server sided traffic. mike On Wed, Dec 23, 2009 at 4:29 PM, Marc Jansen wrote: > Hi Mike, > > as for OpenLayers, it shouldn't be a problem to get it hosted nearly > everywhere since it is only JavaScript. Obviously you cannot use any > datasource, though. Maybe you can set up a proxy that handles the requests, > but I'd doubt that it is possible for your current *.blogspot.com-adress. > > Regards, > Marc > > > > jamesmikedupont@googlemail.com wrote: >> >> Thanks for your advice. That is interesting. >> I never did anything like this, and I feed pretty stupid right now! >> >> But it will be possible to host the webpages on archive.org as well >> and work without the blog itself. It just would be nice to separate >> the display and the data storage. That effectively reduces the usage >> of openlayers to people who have control of domains, right? It will >> not be possible to people to just create maps with any data they want >> without a server to proxy the data. >> >> Now, this example, it displays an openstreetmap map >> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >> >> but the fetch to : >> http://www.openstreetmap.org/api/0.6/way/24315294/full >> that fails, or never returns. >> >> But the same one to use open layer to load the data from osm fails : >> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >> >> It calles get on this url >> http://www.openstreetmap.org/api/0.6/way/24315294 >> in the request ?XMLHttpRequest.js (line 200) >> >> the other thing is that I dont get any error message about security >> problems >> >> I found this document here: >> http://docs.openlayers.org/library/request.html >> >> So, realistically it is not possible to host open layers on a blog? >> >> >> mike >> >> On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen wrote: >> >>> >>> Hi Mike, >>> >>> I am pretty sure that you aren't allowed to acces datasources via >>> XHR/AJAX >>> from other servers than the one the original page is served from. >>> >>> see: http://en.wikipedia.org/wiki/Same_origin_policy >>> >>> Just a quick guess, though. >>> >>> regards, >>> Marc >>> >>> >>> jamesmikedupont@googlemail.com wrote: >>> >>>> >>>> Hi there, >>>> I have attempted to embed openlayers in a blog post, >>>> and am failing! Any help would be appreciated. >>>> >>>> using osm data hosted OSM data on archive.org >>>> http://osmopenlayers.blogspot.com/2009/12/test-embed.html >>>> >>>> here is get a octet bytestream because archive org does not say the >>>> right filetype. >>>> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this >>>> returns a 206 partial content and fails. >>>> >>>> in a pastebin file that is delivered as text: >>>> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html >>>> Date ? ?Wed, 23 Dec 2009 10:15:43 GMT >>>> Server ?Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4 >>>> PHP/4.3.10-22 mod_perl/1.29 >>>> X-Powered-By ? ?PHP/4.3.10-22 >>>> Content-Disposition ? ? attachment; filename="f28514ba0.txt" >>>> Keep-Alive ? ? ?timeout=15, max=100 >>>> Connection ? ? ?Keep-Alive >>>> Transfer-Encoding ? ? ? chunked >>>> Content-Type ? ?text/plain; charset=iso-8859-1 >>>> >>>> So the problem might be the attachment... >>>> >>>> and that data from osm directly again on pastebin, >>>> >>>> >>>> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html >>>> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a >>>> 200 ok. >>>> It returns an : text/plain; charset=iso-8859-1 but does not render. >>>> But there is still nothing there >>>> >>>> from osm directly >>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>>> firebug says :no element found >>>> >>>> And my last try was to put the code from osm on the page directly, >>>> also not rendering but the xml is loading. >>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>>> >>>> but nothing is working >>>> >>>> would appreciate any tips and help >>>> thanks >>>> mike >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>>> > > From jamesmikedupont at googlemail.com Wed Dec 23 11:56:58 2009 From: jamesmikedupont at googlemail.com (jamesmikedupont@googlemail.com) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: References: <4B320F1A.4090001@terrestris.de> <4B323750.6050208@terrestris.de> Message-ID: I am looking at this example, http://trac.openlayers.org/browser/trunk/openlayers/examples/osm-layer.html It is using GML instead of OSM, and it is also loading from the openstreetmap.org domain. How can this example work if you cannot load map data from another domain? mike On Wed, Dec 23, 2009 at 5:16 PM, jamesmikedupont@googlemail.com wrote: > Yes exactly, > but if I host the page on archive.org then I can access the data on > the same domain. > I had a misconception about this whole thing, obviously mashups are > going to create a lot more server sided traffic. > mike > > On Wed, Dec 23, 2009 at 4:29 PM, Marc Jansen wrote: >> Hi Mike, >> >> as for OpenLayers, it shouldn't be a problem to get it hosted nearly >> everywhere since it is only JavaScript. Obviously you cannot use any >> datasource, though. Maybe you can set up a proxy that handles the requests, >> but I'd doubt that it is possible for your current *.blogspot.com-adress. >> >> Regards, >> Marc >> >> >> >> jamesmikedupont@googlemail.com wrote: >>> >>> Thanks for your advice. That is interesting. >>> I never did anything like this, and I feed pretty stupid right now! >>> >>> But it will be possible to host the webpages on archive.org as well >>> and work without the blog itself. It just would be nice to separate >>> the display and the data storage. That effectively reduces the usage >>> of openlayers to people who have control of domains, right? It will >>> not be possible to people to just create maps with any data they want >>> without a server to proxy the data. >>> >>> Now, this example, it displays an openstreetmap map >>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>> >>> but the fetch to : >>> http://www.openstreetmap.org/api/0.6/way/24315294/full >>> that fails, or never returns. >>> >>> But the same one to use open layer to load the data from osm fails : >>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>> >>> It calles get on this url >>> http://www.openstreetmap.org/api/0.6/way/24315294 >>> in the request ?XMLHttpRequest.js (line 200) >>> >>> the other thing is that I dont get any error message about security >>> problems >>> >>> I found this document here: >>> http://docs.openlayers.org/library/request.html >>> >>> So, realistically it is not possible to host open layers on a blog? >>> >>> >>> mike >>> >>> On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen wrote: >>> >>>> >>>> Hi Mike, >>>> >>>> I am pretty sure that you aren't allowed to acces datasources via >>>> XHR/AJAX >>>> from other servers than the one the original page is served from. >>>> >>>> see: http://en.wikipedia.org/wiki/Same_origin_policy >>>> >>>> Just a quick guess, though. >>>> >>>> regards, >>>> Marc >>>> >>>> >>>> jamesmikedupont@googlemail.com wrote: >>>> >>>>> >>>>> Hi there, >>>>> I have attempted to embed openlayers in a blog post, >>>>> and am failing! Any help would be appreciated. >>>>> >>>>> using osm data hosted OSM data on archive.org >>>>> http://osmopenlayers.blogspot.com/2009/12/test-embed.html >>>>> >>>>> here is get a octet bytestream because archive org does not say the >>>>> right filetype. >>>>> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this >>>>> returns a 206 partial content and fails. >>>>> >>>>> in a pastebin file that is delivered as text: >>>>> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html >>>>> Date ? ?Wed, 23 Dec 2009 10:15:43 GMT >>>>> Server ?Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4 >>>>> PHP/4.3.10-22 mod_perl/1.29 >>>>> X-Powered-By ? ?PHP/4.3.10-22 >>>>> Content-Disposition ? ? attachment; filename="f28514ba0.txt" >>>>> Keep-Alive ? ? ?timeout=15, max=100 >>>>> Connection ? ? ?Keep-Alive >>>>> Transfer-Encoding ? ? ? chunked >>>>> Content-Type ? ?text/plain; charset=iso-8859-1 >>>>> >>>>> So the problem might be the attachment... >>>>> >>>>> and that data from osm directly again on pastebin, >>>>> >>>>> >>>>> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html >>>>> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a >>>>> 200 ok. >>>>> It returns an : text/plain; charset=iso-8859-1 but does not render. >>>>> But there is still nothing there >>>>> >>>>> from osm directly >>>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>>>> firebug says :no element found >>>>> >>>>> And my last try was to put the code from osm on the page directly, >>>>> also not rendering but the xml is loading. >>>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>>>> >>>>> but nothing is working >>>>> >>>>> would appreciate any tips and help >>>>> thanks >>>>> mike >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users@openlayers.org >>>>> http://openlayers.org/mailman/listinfo/users >>>>> >>>>> >>>>> >> >> > From jamesmikedupont at googlemail.com Wed Dec 23 12:17:46 2009 From: jamesmikedupont at googlemail.com (jamesmikedupont@googlemail.com) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: References: <4B320F1A.4090001@terrestris.de> <4B323750.6050208@terrestris.de> Message-ID: Ahh, it seems that the tiles are being loaded, but no data. That would explain something. Of course loading the tiles based on the current scrolling position would not be a security issue. Ok, well I will have to spend some more time to read about this, can you please explain on thing : what is the difference between : new OpenLayers.Layer.GML("OSM", "file.osm", {format: OpenLayers.Format.OSM}); and what I was trying to do that did not work : new OpenLayers.Layer.Vector("Lines", { strategies: [new OpenLayers.Strategy.Fixed()], minZoomLevel: 1, maxZoomLevel: 6 , numZoomLevels: 5, protocol: new OpenLayers.Protocol.HTTP({ url: "test-embed_files/testway.xml", format: new OpenLayers.Format.OSM(), }) }); Thanks, mike On Wed, Dec 23, 2009 at 5:56 PM, jamesmikedupont@googlemail.com wrote: > I am looking at this example, > http://trac.openlayers.org/browser/trunk/openlayers/examples/osm-layer.html > > It is using GML instead of OSM, and it is also loading from the > openstreetmap.org domain. > > How can this example work if you cannot load map data from another domain? > > mike > > On Wed, Dec 23, 2009 at 5:16 PM, jamesmikedupont@googlemail.com > wrote: >> Yes exactly, >> but if I host the page on archive.org then I can access the data on >> the same domain. >> I had a misconception about this whole thing, obviously mashups are >> going to create a lot more server sided traffic. >> mike >> >> On Wed, Dec 23, 2009 at 4:29 PM, Marc Jansen wrote: >>> Hi Mike, >>> >>> as for OpenLayers, it shouldn't be a problem to get it hosted nearly >>> everywhere since it is only JavaScript. Obviously you cannot use any >>> datasource, though. Maybe you can set up a proxy that handles the requests, >>> but I'd doubt that it is possible for your current *.blogspot.com-adress. >>> >>> Regards, >>> Marc >>> >>> >>> >>> jamesmikedupont@googlemail.com wrote: >>>> >>>> Thanks for your advice. That is interesting. >>>> I never did anything like this, and I feed pretty stupid right now! >>>> >>>> But it will be possible to host the webpages on archive.org as well >>>> and work without the blog itself. It just would be nice to separate >>>> the display and the data storage. That effectively reduces the usage >>>> of openlayers to people who have control of domains, right? It will >>>> not be possible to people to just create maps with any data they want >>>> without a server to proxy the data. >>>> >>>> Now, this example, it displays an openstreetmap map >>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>>> >>>> but the fetch to : >>>> http://www.openstreetmap.org/api/0.6/way/24315294/full >>>> that fails, or never returns. >>>> >>>> But the same one to use open layer to load the data from osm fails : >>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>>> >>>> It calles get on this url >>>> http://www.openstreetmap.org/api/0.6/way/24315294 >>>> in the request ?XMLHttpRequest.js (line 200) >>>> >>>> the other thing is that I dont get any error message about security >>>> problems >>>> >>>> I found this document here: >>>> http://docs.openlayers.org/library/request.html >>>> >>>> So, realistically it is not possible to host open layers on a blog? >>>> >>>> >>>> mike >>>> >>>> On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen wrote: >>>> >>>>> >>>>> Hi Mike, >>>>> >>>>> I am pretty sure that you aren't allowed to acces datasources via >>>>> XHR/AJAX >>>>> from other servers than the one the original page is served from. >>>>> >>>>> see: http://en.wikipedia.org/wiki/Same_origin_policy >>>>> >>>>> Just a quick guess, though. >>>>> >>>>> regards, >>>>> Marc >>>>> >>>>> >>>>> jamesmikedupont@googlemail.com wrote: >>>>> >>>>>> >>>>>> Hi there, >>>>>> I have attempted to embed openlayers in a blog post, >>>>>> and am failing! Any help would be appreciated. >>>>>> >>>>>> using osm data hosted OSM data on archive.org >>>>>> http://osmopenlayers.blogspot.com/2009/12/test-embed.html >>>>>> >>>>>> here is get a octet bytestream because archive org does not say the >>>>>> right filetype. >>>>>> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this >>>>>> returns a 206 partial content and fails. >>>>>> >>>>>> in a pastebin file that is delivered as text: >>>>>> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html >>>>>> Date ? ?Wed, 23 Dec 2009 10:15:43 GMT >>>>>> Server ?Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4 >>>>>> PHP/4.3.10-22 mod_perl/1.29 >>>>>> X-Powered-By ? ?PHP/4.3.10-22 >>>>>> Content-Disposition ? ? attachment; filename="f28514ba0.txt" >>>>>> Keep-Alive ? ? ?timeout=15, max=100 >>>>>> Connection ? ? ?Keep-Alive >>>>>> Transfer-Encoding ? ? ? chunked >>>>>> Content-Type ? ?text/plain; charset=iso-8859-1 >>>>>> >>>>>> So the problem might be the attachment... >>>>>> >>>>>> and that data from osm directly again on pastebin, >>>>>> >>>>>> >>>>>> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html >>>>>> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a >>>>>> 200 ok. >>>>>> It returns an : text/plain; charset=iso-8859-1 but does not render. >>>>>> But there is still nothing there >>>>>> >>>>>> from osm directly >>>>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>>>>> firebug says :no element found >>>>>> >>>>>> And my last try was to put the code from osm on the page directly, >>>>>> also not rendering but the xml is loading. >>>>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>>>>> >>>>>> but nothing is working >>>>>> >>>>>> would appreciate any tips and help >>>>>> thanks >>>>>> mike >>>>>> _______________________________________________ >>>>>> Users mailing list >>>>>> Users@openlayers.org >>>>>> http://openlayers.org/mailman/listinfo/users >>>>>> >>>>>> >>>>>> >>> >>> >> > From adam at prema.co.nz Wed Dec 23 13:52:09 2009 From: adam at prema.co.nz (Adam Ratcliffe) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: References: <4B320F1A.4090001@terrestris.de> <4B323750.6050208@terrestris.de> Message-ID: <33AD4B64-E2C6-4446-80A5-421207CE38D8@prema.co.nz> Images are not subject to the same-origin policy that applies to data loaded via XHR which is why the map tiles load fine. One way to circumvent the browser's same-origin policy when loading data from another domain is by dynamically inserting a script tag in the DOM and using it to load the data as JSON, this technique is described in more detail here: http://ajaxpatterns.org/On-Demand_Javascript I haven't used this technique with OpenLayers, presumably you would need to implement a custom protocol to integrate with the Vector layer. Cheers Adam On 24/12/2009, at 6:17 AM, jamesmikedupont@googlemail.com wrote: > Ahh, > it seems that the tiles are being loaded, but no data. That would > explain something. > Of course loading the tiles based on the current scrolling position > would not be a security issue. > > Ok, well I will have to spend some more time to read about this, can > you please explain on thing : > > what is the difference between : > > > new OpenLayers.Layer.GML("OSM", "file.osm", {format: > OpenLayers.Format.OSM}); > > and what I was trying to do that did not work : > > new OpenLayers.Layer.Vector("Lines", { > strategies: [new OpenLayers.Strategy.Fixed()], > minZoomLevel: 1, > maxZoomLevel: 6 , > numZoomLevels: 5, > protocol: new OpenLayers.Protocol.HTTP({ > url: "test-embed_files/testway.xml", > format: new OpenLayers.Format.OSM(), > }) > }); > > Thanks, > mike > > > On Wed, Dec 23, 2009 at 5:56 PM, jamesmikedupont@googlemail.com > wrote: >> I am looking at this example, >> http://trac.openlayers.org/browser/trunk/openlayers/examples/osm-layer.html >> >> It is using GML instead of OSM, and it is also loading from the >> openstreetmap.org domain. >> >> How can this example work if you cannot load map data from another >> domain? >> >> mike >> >> On Wed, Dec 23, 2009 at 5:16 PM, jamesmikedupont@googlemail.com >> wrote: >>> Yes exactly, >>> but if I host the page on archive.org then I can access the data on >>> the same domain. >>> I had a misconception about this whole thing, obviously mashups are >>> going to create a lot more server sided traffic. >>> mike >>> >>> On Wed, Dec 23, 2009 at 4:29 PM, Marc Jansen >>> wrote: >>>> Hi Mike, >>>> >>>> as for OpenLayers, it shouldn't be a problem to get it hosted >>>> nearly >>>> everywhere since it is only JavaScript. Obviously you cannot use >>>> any >>>> datasource, though. Maybe you can set up a proxy that handles the >>>> requests, >>>> but I'd doubt that it is possible for your current *.blogspot.com- >>>> adress. >>>> >>>> Regards, >>>> Marc >>>> >>>> >>>> >>>> jamesmikedupont@googlemail.com wrote: >>>>> >>>>> Thanks for your advice. That is interesting. >>>>> I never did anything like this, and I feed pretty stupid right >>>>> now! >>>>> >>>>> But it will be possible to host the webpages on archive.org as >>>>> well >>>>> and work without the blog itself. It just would be nice to >>>>> separate >>>>> the display and the data storage. That effectively reduces the >>>>> usage >>>>> of openlayers to people who have control of domains, right? It >>>>> will >>>>> not be possible to people to just create maps with any data they >>>>> want >>>>> without a server to proxy the data. >>>>> >>>>> Now, this example, it displays an openstreetmap map >>>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>>>> >>>>> but the fetch to : >>>>> http://www.openstreetmap.org/api/0.6/way/24315294/full >>>>> that fails, or never returns. >>>>> >>>>> But the same one to use open layer to load the data from osm >>>>> fails : >>>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>>>> >>>>> It calles get on this url >>>>> http://www.openstreetmap.org/api/0.6/way/24315294 >>>>> in the request XMLHttpRequest.js (line 200) >>>>> >>>>> the other thing is that I dont get any error message about >>>>> security >>>>> problems >>>>> >>>>> I found this document here: >>>>> http://docs.openlayers.org/library/request.html >>>>> >>>>> So, realistically it is not possible to host open layers on a >>>>> blog? >>>>> >>>>> >>>>> mike >>>>> >>>>> On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen >>>>> wrote: >>>>> >>>>>> >>>>>> Hi Mike, >>>>>> >>>>>> I am pretty sure that you aren't allowed to acces datasources via >>>>>> XHR/AJAX >>>>>> from other servers than the one the original page is served from. >>>>>> >>>>>> see: http://en.wikipedia.org/wiki/Same_origin_policy >>>>>> >>>>>> Just a quick guess, though. >>>>>> >>>>>> regards, >>>>>> Marc >>>>>> >>>>>> >>>>>> jamesmikedupont@googlemail.com wrote: >>>>>> >>>>>>> >>>>>>> Hi there, >>>>>>> I have attempted to embed openlayers in a blog post, >>>>>>> and am failing! Any help would be appreciated. >>>>>>> >>>>>>> using osm data hosted OSM data on archive.org >>>>>>> http://osmopenlayers.blogspot.com/2009/12/test-embed.html >>>>>>> >>>>>>> here is get a octet bytestream because archive org does not >>>>>>> say the >>>>>>> right filetype. >>>>>>> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm >>>>>>> this >>>>>>> returns a 206 partial content and fails. >>>>>>> >>>>>>> in a pastebin file that is delivered as text: >>>>>>> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html >>>>>>> Date Wed, 23 Dec 2009 10:15:43 GMT >>>>>>> Server Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 >>>>>>> Python/2.3.4 >>>>>>> PHP/4.3.10-22 mod_perl/1.29 >>>>>>> X-Powered-By PHP/4.3.10-22 >>>>>>> Content-Disposition attachment; filename="f28514ba0.txt" >>>>>>> Keep-Alive timeout=15, max=100 >>>>>>> Connection Keep-Alive >>>>>>> Transfer-Encoding chunked >>>>>>> Content-Type text/plain; charset=iso-8859-1 >>>>>>> >>>>>>> So the problem might be the attachment... >>>>>>> >>>>>>> and that data from osm directly again on pastebin, >>>>>>> >>>>>>> >>>>>>> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html >>>>>>> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it >>>>>>> returns a >>>>>>> 200 ok. >>>>>>> It returns an : text/plain; charset=iso-8859-1 but does not >>>>>>> render. >>>>>>> But there is still nothing there >>>>>>> >>>>>>> from osm directly >>>>>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>>>>>> firebug says :no element found >>>>>>> >>>>>>> And my last try was to put the code from osm on the page >>>>>>> directly, >>>>>>> also not rendering but the xml is loading. >>>>>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm- >>>>>>> server.html >>>>>>> >>>>>>> but nothing is working >>>>>>> >>>>>>> would appreciate any tips and help >>>>>>> thanks >>>>>>> mike >>>>>>> _______________________________________________ >>>>>>> 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 jamesmikedupont at googlemail.com Wed Dec 23 14:37:53 2009 From: jamesmikedupont at googlemail.com (jamesmikedupont@googlemail.com) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: <33AD4B64-E2C6-4446-80A5-421207CE38D8@prema.co.nz> References: <4B320F1A.4090001@terrestris.de> <4B323750.6050208@terrestris.de> <33AD4B64-E2C6-4446-80A5-421207CE38D8@prema.co.nz> Message-ID: It would be possible to produce json files in the archive, read to load. That would not be a big security risk, they are parsed and the data is public. So, yes basically it would be like data tiles being selected and loaded instead on png tiles. That would be optimal, because we could do things : 1. we could check some version control system if there is any newer version of the file checked in so that we could get updates. 2. we could load the files on demand. It seems that this is a good way to go for now, I will read up more into it. The other problem with using archive.org, is that even if I host my html page there, it will get split out to one of the many http servers and I get an absolute address. That means that between those servers, it is a different domain, or maybe i understood this wrong. I will look into this after I finish some other work, thank you very much for your advice. It is a new subject for me, and I hope that my N00bness is not too annoying. mike On Wed, Dec 23, 2009 at 7:52 PM, Adam Ratcliffe wrote: > Images are not subject to the same-origin policy that applies to data loaded > via XHR which is why the map tiles load fine. > > One way to circumvent the browser's same-origin policy when loading data > from another domain is by dynamically inserting a script tag in the DOM and > using it to load the data as JSON, this technique is described in more > detail here: http://ajaxpatterns.org/On-Demand_Javascript > > I haven't used this technique with OpenLayers, presumably you would need to > implement a custom protocol to integrate with the Vector layer. > > Cheers > Adam > > On 24/12/2009, at 6:17 AM, jamesmikedupont@googlemail.com wrote: > >> Ahh, >> it seems that the tiles are being loaded, but no data. That would >> explain something. >> Of course loading the tiles based on the current scrolling position >> would not be a security issue. >> >> Ok, well I will have to spend some more time to read about this, can >> you please explain on thing : >> >> what is the difference between : >> >> >> new OpenLayers.Layer.GML("OSM", "file.osm", {format: >> OpenLayers.Format.OSM}); >> >> and what I was trying to do that did not work : >> >> new OpenLayers.Layer.Vector("Lines", { >> ? ? ? ? ? ? ? ? ? strategies: [new OpenLayers.Strategy.Fixed()], >> ? ? ? ? ? ? ? ? ? ?minZoomLevel: 1, >> ? ? ? ? ? ? ? ? ? ?maxZoomLevel: 6 , >> ? ? ? ? ? ? ? ? ? ?numZoomLevels: 5, >> ? ? ? ? ? ? ? ? ? protocol: new OpenLayers.Protocol.HTTP({ >> ? ? ? ? ? ? ? ? ? ?url: "test-embed_files/testway.xml", >> ? ? ? ? ? ? ? ? ? ?format: new OpenLayers.Format.OSM(), >> ? ? ? ? ? ? ? ? ? }) >> ? ? ? ? ? ? ? }); >> >> Thanks, >> mike >> >> >> On Wed, Dec 23, 2009 at 5:56 PM, jamesmikedupont@googlemail.com >> wrote: >>> >>> I am looking at this example, >>> >>> http://trac.openlayers.org/browser/trunk/openlayers/examples/osm-layer.html >>> >>> It is using GML instead of OSM, and it is also loading from the >>> openstreetmap.org domain. >>> >>> How can this example work if you cannot load map data from another >>> domain? >>> >>> mike >>> >>> On Wed, Dec 23, 2009 at 5:16 PM, jamesmikedupont@googlemail.com >>> wrote: >>>> >>>> Yes exactly, >>>> but if I host the page on archive.org then I can access the data on >>>> the same domain. >>>> I had a misconception about this whole thing, obviously mashups are >>>> going to create a lot more server sided traffic. >>>> mike >>>> >>>> On Wed, Dec 23, 2009 at 4:29 PM, Marc Jansen >>>> wrote: >>>>> >>>>> Hi Mike, >>>>> >>>>> as for OpenLayers, it shouldn't be a problem to get it hosted nearly >>>>> everywhere since it is only JavaScript. Obviously you cannot use any >>>>> datasource, though. Maybe you can set up a proxy that handles the >>>>> requests, >>>>> but I'd doubt that it is possible for your current >>>>> *.blogspot.com-adress. >>>>> >>>>> Regards, >>>>> Marc >>>>> >>>>> >>>>> >>>>> jamesmikedupont@googlemail.com wrote: >>>>>> >>>>>> Thanks for your advice. That is interesting. >>>>>> I never did anything like this, and I feed pretty stupid right now! >>>>>> >>>>>> But it will be possible to host the webpages on archive.org as well >>>>>> and work without the blog itself. It just would be nice to separate >>>>>> the display and the data storage. That effectively reduces the usage >>>>>> of openlayers to people who have control of domains, right? It will >>>>>> not be possible to people to just create maps with any data they want >>>>>> without a server to proxy the data. >>>>>> >>>>>> Now, this example, it displays an openstreetmap map >>>>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>>>>> >>>>>> but the fetch to : >>>>>> http://www.openstreetmap.org/api/0.6/way/24315294/full >>>>>> that fails, or never returns. >>>>>> >>>>>> But the same one to use open layer to load the data from osm fails : >>>>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>>>>> >>>>>> It calles get on this url >>>>>> http://www.openstreetmap.org/api/0.6/way/24315294 >>>>>> in the request ?XMLHttpRequest.js (line 200) >>>>>> >>>>>> the other thing is that I dont get any error message about security >>>>>> problems >>>>>> >>>>>> I found this document here: >>>>>> http://docs.openlayers.org/library/request.html >>>>>> >>>>>> So, realistically it is not possible to host open layers on a blog? >>>>>> >>>>>> >>>>>> mike >>>>>> >>>>>> On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen >>>>>> wrote: >>>>>> >>>>>>> >>>>>>> Hi Mike, >>>>>>> >>>>>>> I am pretty sure that you aren't allowed to acces datasources via >>>>>>> XHR/AJAX >>>>>>> from other servers than the one the original page is served from. >>>>>>> >>>>>>> see: http://en.wikipedia.org/wiki/Same_origin_policy >>>>>>> >>>>>>> Just a quick guess, though. >>>>>>> >>>>>>> regards, >>>>>>> Marc >>>>>>> >>>>>>> >>>>>>> jamesmikedupont@googlemail.com wrote: >>>>>>> >>>>>>>> >>>>>>>> Hi there, >>>>>>>> I have attempted to embed openlayers in a blog post, >>>>>>>> and am failing! Any help would be appreciated. >>>>>>>> >>>>>>>> using osm data hosted OSM data on archive.org >>>>>>>> http://osmopenlayers.blogspot.com/2009/12/test-embed.html >>>>>>>> >>>>>>>> here is get a octet bytestream because archive org does not say the >>>>>>>> right filetype. >>>>>>>> >>>>>>>> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm?this >>>>>>>> returns a 206 partial content and fails. >>>>>>>> >>>>>>>> in a pastebin file that is delivered as text: >>>>>>>> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html >>>>>>>> Date ? ?Wed, 23 Dec 2009 10:15:43 GMT >>>>>>>> Server ?Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 >>>>>>>> Python/2.3.4 >>>>>>>> PHP/4.3.10-22 mod_perl/1.29 >>>>>>>> X-Powered-By ? ?PHP/4.3.10-22 >>>>>>>> Content-Disposition ? ? attachment; filename="f28514ba0.txt" >>>>>>>> Keep-Alive ? ? ?timeout=15, max=100 >>>>>>>> Connection ? ? ?Keep-Alive >>>>>>>> Transfer-Encoding ? ? ? chunked >>>>>>>> Content-Type ? ?text/plain; charset=iso-8859-1 >>>>>>>> >>>>>>>> So the problem might be the attachment... >>>>>>>> >>>>>>>> and that data from osm directly again on pastebin, >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html >>>>>>>> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it >>>>>>>> returns a >>>>>>>> 200 ok. >>>>>>>> It returns an : text/plain; charset=iso-8859-1 but does not render. >>>>>>>> But there is still nothing there >>>>>>>> >>>>>>>> from osm directly >>>>>>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html >>>>>>>> firebug says :no element found >>>>>>>> >>>>>>>> And my last try was to put the code from osm on the page directly, >>>>>>>> also not rendering but the xml is loading. >>>>>>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html >>>>>>>> >>>>>>>> but nothing is working >>>>>>>> >>>>>>>> would appreciate any tips and help >>>>>>>> thanks >>>>>>>> mike >>>>>>>> _______________________________________________ >>>>>>>> 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 afrozk at gmail.com Thu Dec 24 02:53:57 2009 From: afrozk at gmail.com (afrozk) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problem in openlayers when migrating from Mapserver 5.0 to 5.2 Message-ID: <1261641237133-4212330.post@n2.nabble.com> I have a WMS worldmap layer which was working fine in mapserver 5.0 with openlayers 2.8 Now when I migrated to mapserver 5.2, the worldmap layer in repeating as tiles. Below is my code, Only copied the relevant part. //Variables var country_options = {displayInLayerSwitcher: true,opacity: 0.7}; var extent = new OpenLayers.Bounds(-57,-55,175,80); var map_options = {'maxExtent': extent,numZoomLevels:6,restrictedExtent: extent} // Inside the init function. map = new OpenLayers.Map( 'map', map_options); countrylayer = new OpenLayers.Layer.WMS( "Country Outline", "http://" + server + "/cgi-bin/mapserv.exe?", {map:'../htdocs/ms/stats.map',mode:'map',layers: 'cntry98', format: "image/png"}, country_options); // Map File MAP IMAGETYPE PNG24 EXTENT -45 -55 175 75 SIZE 980 700 SHAPEPATH "./data" IMAGECOLOR 217 236 255 #255 230 255 FONTSET "./fonts/fonts.list" SYMBOLSET "./fonts/vectors.sym" PROJECTION "init=epsg:4326" #2163 4326 26915 END WEB IMAGEPATH "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" IMAGEURL "/ms/tmp/" LOG "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" END # Start of LAYER DEFINITIONS --------------------------------------------- LAYER # Country polygon layer begins here NAME cntry98 DATA cntry98 STATUS OFF TYPE POLYGON PROJECTION "init=epsg:4326" # 4326 26915 END TRANSPARENCY 80 CLASSITEM "CNTRY_NAME" CLASS NAME "COUNTRY" STYLE COLOR 255 255 232 OUTLINECOLOR 0 0 0 END END END # Country polygon layer ends here END The map works fine if I change OpenLayers.Layer.WMS to OpenLayers.Layer.MapServer, but I cant use that option at it would affect the code in other places. Any help would be highly appreciated. Thanks in advance -- View this message in context: http://n2.nabble.com/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212330.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Thu Dec 24 02:59:34 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problem in openlayers when migrating from Mapserver 5.0 to 5.2 In-Reply-To: <1261641237133-4212330.post@n2.nabble.com> References: <1261641237133-4212330.post@n2.nabble.com> Message-ID: <63145.145.50.39.11.1261641574.squirrel@webmail.hostingdiscounter.nl> What do you mean with repeating as tiles? Can you show an example, a screendump of what is wrong? Also, your WMS layer should not get the parameters mode and layers, remove them from your Layer.WMS definition. Best regards, Bart > > I have a WMS worldmap layer which was working fine in mapserver 5.0 with > openlayers 2.8 > Now when I migrated to mapserver 5.2, the worldmap layer in repeating as > tiles. > > Below is my code, Only copied the relevant part. > > > //Variables > > var country_options = {displayInLayerSwitcher: true,opacity: 0.7}; > var extent = new OpenLayers.Bounds(-57,-55,175,80); > var map_options = {'maxExtent': extent,numZoomLevels:6,restrictedExtent: > extent} > > // Inside the init function. > map = new OpenLayers.Map( 'map', map_options); > countrylayer = new OpenLayers.Layer.WMS( "Country Outline", > "http://" + server + "/cgi-bin/mapserv.exe?", > {map:'../htdocs/ms/stats.map',mode:'map',layers: 'cntry98', format: > "image/png"}, > country_options); > > > // Map File > > MAP > IMAGETYPE PNG24 > EXTENT -45 -55 175 75 > SIZE 980 700 > SHAPEPATH "./data" > IMAGECOLOR 217 236 255 #255 230 255 > FONTSET "./fonts/fonts.list" > SYMBOLSET "./fonts/vectors.sym" > > > PROJECTION > "init=epsg:4326" #2163 4326 26915 > END > > WEB > IMAGEPATH "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" > IMAGEURL "/ms/tmp/" > LOG "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" > END > > # Start of LAYER DEFINITIONS > --------------------------------------------- > LAYER # Country polygon layer begins here > NAME cntry98 > DATA cntry98 > STATUS OFF > TYPE POLYGON > > PROJECTION > "init=epsg:4326" # 4326 26915 > END > TRANSPARENCY 80 > CLASSITEM "CNTRY_NAME" > CLASS > NAME "COUNTRY" > STYLE > COLOR 255 255 232 > OUTLINECOLOR 0 0 0 > END > END > END # Country polygon layer ends here > END > > The map works fine if I change OpenLayers.Layer.WMS to > OpenLayers.Layer.MapServer, but I cant use that option at it would affect > the code in other places. > > Any help would be highly appreciated. > Thanks in advance > -- > View this message in context: > http://n2.nabble.com/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212330.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 afrozk at gmail.com Thu Dec 24 03:14:54 2009 From: afrozk at gmail.com (afrozk) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problem in openlayers when migrating from Mapserver 5.0 to 5.2 In-Reply-To: <63145.145.50.39.11.1261641574.squirrel@webmail.hostingdiscounter.nl> References: <1261641237133-4212330.post@n2.nabble.com> <63145.145.50.39.11.1261641574.squirrel@webmail.hostingdiscounter.nl> Message-ID: <1261642494361-4212380.post@n2.nabble.com> Thankyou Bart for your quick reply. Please find attached the screenshot. Thanks Afroz Bart van den Eijnden wrote: > > What do you mean with repeating as tiles? Can you show an example, a > screendump of what is wrong? > > Also, your WMS layer should not get the parameters mode and layers, remove > them from your Layer.WMS definition. > > Best regards, > Bart > >> >> I have a WMS worldmap layer which was working fine in mapserver 5.0 with >> openlayers 2.8 >> Now when I migrated to mapserver 5.2, the worldmap layer in repeating as >> tiles. >> >> Below is my code, Only copied the relevant part. >> >> >> //Variables >> >> var country_options = {displayInLayerSwitcher: true,opacity: 0.7}; >> var extent = new OpenLayers.Bounds(-57,-55,175,80); >> var map_options = {'maxExtent': extent,numZoomLevels:6,restrictedExtent: >> extent} >> >> // Inside the init function. >> map = new OpenLayers.Map( 'map', map_options); >> countrylayer = new OpenLayers.Layer.WMS( "Country Outline", >> "http://" + server + "/cgi-bin/mapserv.exe?", >> {map:'../htdocs/ms/stats.map',mode:'map',layers: 'cntry98', format: >> "image/png"}, >> country_options); >> >> >> // Map File >> >> MAP >> IMAGETYPE PNG24 >> EXTENT -45 -55 175 75 >> SIZE 980 700 >> SHAPEPATH "./data" >> IMAGECOLOR 217 236 255 #255 230 255 >> FONTSET "./fonts/fonts.list" >> SYMBOLSET "./fonts/vectors.sym" >> >> >> PROJECTION >> "init=epsg:4326" #2163 4326 26915 >> END >> >> WEB >> IMAGEPATH "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" >> IMAGEURL "/ms/tmp/" >> LOG "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" >> END >> >> # Start of LAYER DEFINITIONS >> --------------------------------------------- >> LAYER # Country polygon layer begins here >> NAME cntry98 >> DATA cntry98 >> STATUS OFF >> TYPE POLYGON >> >> PROJECTION >> "init=epsg:4326" # 4326 26915 >> END >> TRANSPARENCY 80 >> CLASSITEM "CNTRY_NAME" >> CLASS >> NAME "COUNTRY" >> STYLE >> COLOR 255 255 232 >> OUTLINECOLOR 0 0 0 >> END >> END >> END # Country polygon layer ends here >> END >> >> The map works fine if I change OpenLayers.Layer.WMS to >> OpenLayers.Layer.MapServer, but I cant use that option at it would affect >> the code in other places. >> >> Any help would be highly appreciated. >> Thanks in advance >> -- >> View this message in context: >> http://n2.nabble.com/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212330.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 > > http://n2.nabble.com/file/n4212380/ss.jpg -- View this message in context: http://n2.nabble.com/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212380.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Thu Dec 24 03:20:22 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problem in openlayers when migrating from Mapserver 5.0 to 5.2 In-Reply-To: <1261642494361-4212380.post@n2.nabble.com> References: <1261641237133-4212330.post@n2.nabble.com> <63145.145.50.39.11.1261641574.squirrel@webmail.hostingdiscounter.nl> <1261642494361-4212380.post@n2.nabble.com> Message-ID: <31906.145.50.39.11.1261642822.squirrel@webmail.hostingdiscounter.nl> Hi, did you try and leave out the parameter mode like I said in my first e-mail? It looks like every tile retrieves a full map, because you use mode=map in your parameter list. Remove it, so use: countrylayer = new OpenLayers.Layer.WMS( "Country Outline", "http://" + server + "/cgi-bin/mapserv.exe?", {map:'../htdocs/ms/stats.map', layers: 'cntry98', format: "image/png"}, country_options); Best regards, Bart > > Thankyou Bart for your quick reply. > Please find attached the screenshot. > > Thanks > Afroz > > Bart van den Eijnden wrote: >> >> What do you mean with repeating as tiles? Can you show an example, a >> screendump of what is wrong? >> >> Also, your WMS layer should not get the parameters mode and layers, >> remove >> them from your Layer.WMS definition. >> >> Best regards, >> Bart >> >>> >>> I have a WMS worldmap layer which was working fine in mapserver 5.0 >>> with >>> openlayers 2.8 >>> Now when I migrated to mapserver 5.2, the worldmap layer in repeating >>> as >>> tiles. >>> >>> Below is my code, Only copied the relevant part. >>> >>> >>> //Variables >>> >>> var country_options = {displayInLayerSwitcher: true,opacity: 0.7}; >>> var extent = new OpenLayers.Bounds(-57,-55,175,80); >>> var map_options = {'maxExtent': >>> extent,numZoomLevels:6,restrictedExtent: >>> extent} >>> >>> // Inside the init function. >>> map = new OpenLayers.Map( 'map', map_options); >>> countrylayer = new OpenLayers.Layer.WMS( "Country Outline", >>> "http://" + server + "/cgi-bin/mapserv.exe?", >>> {map:'../htdocs/ms/stats.map',mode:'map',layers: 'cntry98', format: >>> "image/png"}, >>> country_options); >>> >>> >>> // Map File >>> >>> MAP >>> IMAGETYPE PNG24 >>> EXTENT -45 -55 175 75 >>> SIZE 980 700 >>> SHAPEPATH "./data" >>> IMAGECOLOR 217 236 255 #255 230 255 >>> FONTSET "./fonts/fonts.list" >>> SYMBOLSET "./fonts/vectors.sym" >>> >>> >>> PROJECTION >>> "init=epsg:4326" #2163 4326 26915 >>> END >>> >>> WEB >>> IMAGEPATH "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" >>> IMAGEURL "/ms/tmp/" >>> LOG "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" >>> END >>> >>> # Start of LAYER DEFINITIONS >>> --------------------------------------------- >>> LAYER # Country polygon layer begins here >>> NAME cntry98 >>> DATA cntry98 >>> STATUS OFF >>> TYPE POLYGON >>> >>> PROJECTION >>> "init=epsg:4326" # 4326 26915 >>> END >>> TRANSPARENCY 80 >>> CLASSITEM "CNTRY_NAME" >>> CLASS >>> NAME "COUNTRY" >>> STYLE >>> COLOR 255 255 232 >>> OUTLINECOLOR 0 0 0 >>> END >>> END >>> END # Country polygon layer ends here >>> END >>> >>> The map works fine if I change OpenLayers.Layer.WMS to >>> OpenLayers.Layer.MapServer, but I cant use that option at it would >>> affect >>> the code in other places. >>> >>> Any help would be highly appreciated. >>> Thanks in advance >>> -- >>> View this message in context: >>> http://n2.nabble.com/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212330.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 >> >> > http://n2.nabble.com/file/n4212380/ss.jpg > -- > View this message in context: > http://n2.nabble.com/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212380.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 afrozk at gmail.com Thu Dec 24 04:06:40 2009 From: afrozk at gmail.com (afrozk) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problem in openlayers when migrating from Mapserver 5.0 to 5.2 In-Reply-To: <31906.145.50.39.11.1261642822.squirrel@webmail.hostingdiscounter.nl> References: <1261641237133-4212330.post@n2.nabble.com> <63145.145.50.39.11.1261641574.squirrel@webmail.hostingdiscounter.nl> <1261642494361-4212380.post@n2.nabble.com> <31906.145.50.39.11.1261642822.squirrel@webmail.hostingdiscounter.nl> Message-ID: <1261645600285-4212502.post@n2.nabble.com> Hi, It works fine now when I removed the mode=map option. I did not remove the layers option. Please tell me where else do I specify the layers option if it is removed from there, just to know it . Thanks a lot Afroz Bart van den Eijnden wrote: > > Hi, > > did you try and leave out the parameter mode like I said in my first > e-mail? > > It looks like every tile retrieves a full map, because you use mode=map in > your parameter list. Remove it, so use: > > countrylayer = new OpenLayers.Layer.WMS( "Country Outline", > "http://" + server + "/cgi-bin/mapserv.exe?", > {map:'../htdocs/ms/stats.map', layers: 'cntry98', format: "image/png"}, > country_options); > > Best regards, > Bart > >> >> Thankyou Bart for your quick reply. >> Please find attached the screenshot. >> >> Thanks >> Afroz >> >> Bart van den Eijnden wrote: >>> >>> What do you mean with repeating as tiles? Can you show an example, a >>> screendump of what is wrong? >>> >>> Also, your WMS layer should not get the parameters mode and layers, >>> remove >>> them from your Layer.WMS definition. >>> >>> Best regards, >>> Bart >>> >>>> >>>> I have a WMS worldmap layer which was working fine in mapserver 5.0 >>>> with >>>> openlayers 2.8 >>>> Now when I migrated to mapserver 5.2, the worldmap layer in repeating >>>> as >>>> tiles. >>>> >>>> Below is my code, Only copied the relevant part. >>>> >>>> >>>> //Variables >>>> >>>> var country_options = {displayInLayerSwitcher: true,opacity: 0.7}; >>>> var extent = new OpenLayers.Bounds(-57,-55,175,80); >>>> var map_options = {'maxExtent': >>>> extent,numZoomLevels:6,restrictedExtent: >>>> extent} >>>> >>>> // Inside the init function. >>>> map = new OpenLayers.Map( 'map', map_options); >>>> countrylayer = new OpenLayers.Layer.WMS( "Country Outline", >>>> "http://" + server + "/cgi-bin/mapserv.exe?", >>>> {map:'../htdocs/ms/stats.map',mode:'map',layers: 'cntry98', format: >>>> "image/png"}, >>>> country_options); >>>> >>>> >>>> // Map File >>>> >>>> MAP >>>> IMAGETYPE PNG24 >>>> EXTENT -45 -55 175 75 >>>> SIZE 980 700 >>>> SHAPEPATH "./data" >>>> IMAGECOLOR 217 236 255 #255 230 255 >>>> FONTSET "./fonts/fonts.list" >>>> SYMBOLSET "./fonts/vectors.sym" >>>> >>>> >>>> PROJECTION >>>> "init=epsg:4326" #2163 4326 26915 >>>> END >>>> >>>> WEB >>>> IMAGEPATH "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" >>>> IMAGEURL "/ms/tmp/" >>>> LOG "C:/Programs/ms4w/Apache/htdocs/ms/tmp/" >>>> END >>>> >>>> # Start of LAYER DEFINITIONS >>>> --------------------------------------------- >>>> LAYER # Country polygon layer begins here >>>> NAME cntry98 >>>> DATA cntry98 >>>> STATUS OFF >>>> TYPE POLYGON >>>> >>>> PROJECTION >>>> "init=epsg:4326" # 4326 26915 >>>> END >>>> TRANSPARENCY 80 >>>> CLASSITEM "CNTRY_NAME" >>>> CLASS >>>> NAME "COUNTRY" >>>> STYLE >>>> COLOR 255 255 232 >>>> OUTLINECOLOR 0 0 0 >>>> END >>>> END >>>> END # Country polygon layer ends here >>>> END >>>> >>>> The map works fine if I change OpenLayers.Layer.WMS to >>>> OpenLayers.Layer.MapServer, but I cant use that option at it would >>>> affect >>>> the code in other places. >>>> >>>> Any help would be highly appreciated. >>>> Thanks in advance >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212330.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 >>> >>> >> http://n2.nabble.com/file/n4212380/ss.jpg >> -- >> View this message in context: >> http://n2.nabble.com/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212380.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/Problem-in-openlayers-when-migrating-from-Mapserver-5-0-to-5-2-tp4212330p4212502.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From beppenapo at gmail.com Thu Dec 24 10:41:18 2009 From: beppenapo at gmail.com (beppe) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] some questions about popup extent & hyperlink In-Reply-To: References: Message-ID: <1261669278.6574.186.camel@beppe> Il giorno lun, 21/12/2009 alle 10.32 -0500, users-request@openlayers.org ha scritto: > > On Mon, Dec 21, 2009 at 9:22 AM, beppe wrote: > > Hi, > > I'm an italian OL's newbie, I come from a mapserver world and I'm > very > > happy to discover every day something about OpenLayers! > > I've this code [1] and this mapfile [2], the geographic elements are > > stored in a postgis table. > > The code works but in the popup window, info are displayed like > this: > > "GetFeatureInfo results: Layer 'ut' Feature 78: paese = 'Coredo' > > localita = 'S. Barbara'" > > Obviously I don't want info about "GetFeatureInfo", "Layer" and > > "Feature", but only about "paese" and "localita". > > The info, then, are print like a "text string". I'd want print the > info > > in table style...but I don't know how !!! > > > > > You don't have a TEMPLATE in your mapfile... (it says TEMPLATE void). > Define a TEMPLATE, and in that template (an HTML file), create your > table like so > > > > >
Paese[paese]
Localita[localita]
> > Wow, thank you!!! Now works, but I've another problem... ...when I've many records from the spatial query, more than height of popup, the sidebar does not appear. I don't understand what is wrong in this code: var createPopup = function(response) { var lonlat = map.getLonLatFromViewPortPx(this.xy); var popup = new OpenLayers.Popup.FramedCloud( "chicken",lonlat, null,response.responseText,null,true); popup.setBackgroundColor("#c1cdc1"); popup.setOpacity(0.7); map.addPopup(popup, true); function onFeatureUnselect(event) { var feature = event.feature; if(feature.popup) { map.removePopup(feature.popup); feature.popup.destroy(); delete feature.popup; } } }; > > > Question 2. > > I'd like to have in popup an hyperlink to a page in wich print a map > > with the extent of the selected feature, but: > > 1. my feature are point > > 2. I don't know how write the code!!! > > > > Any ideas, example or tutorial? > > thanks In the template file I've created an hyperlink in this way [1], but I don't understand how to extract the right extent... ...maybe with a spatial query, something like: #$id=$_GET['id']; #$query=("select BOX(the_geom) from table where id = '$id';") #$result = pg_query($connection, $query); #$bounds = pg_result($result, $i, "BOX"); //I'm not sure that's works and then create a variable in this way: #var bounds = new OpenLayers.Bounds($bounds); I don't know if is better to make a query with minx(), miny(), maxx(), maxy(), instead of box()... thanks a lot -beppe- [1] # # # # # # # # # # # #
Paese Localit?
# [paese] # [localita]
From richard.greenwood at gmail.com Thu Dec 24 11:44:31 2009 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Control background-image Message-ID: I have two OpenLayers.Control.DrawFeature controls in my panel. One draws a Polygon, the other a regular polygon. So I want to have different button background-images for the two buttons, but they both are getting the background-image defined by the .olControlDrawFeatureItemInactive class. I (think) I have assigned a unique id to the two controls: new OpenLayers.Control.DrawFeature(lyrVectors, OpenLayers.Handler.RegularPolygon, {handlerOptions: {sides: 24}, title: 'Draw a circle.', id: 'drawEllipse'}), new OpenLayers.Control.DrawFeature(lyrVectors, OpenLayers.Handler.Polygon, {title: 'Draw a polygon. Double click when done.', id: 'drawPoly'}), and in my .css I am attempting to use the id to assign a unique background-image: div#drawPoly { background-image: url("../graphics/polygon.gif"); } I may be going about this in completely the wrong way. Any help is appreciated. Thanks, Rich -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From ibrahimsaricicek at gmail.com Fri Dec 25 07:39:54 2009 From: ibrahimsaricicek at gmail.com (ibrahimsaricicek) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] problem with map.setCenter and zoom In-Reply-To: References: Message-ID: <1261744794460-4215879.post@n2.nabble.com> Hi all,, I have a similar problem; map.setCenter(userExtentCenterLonLat,userExtentZoom, false, true); On Google It shows the whole world, but it should be a placemark in Turkey. A zoom in and out solves the problem. But if the basemap is wms (Mapserver) there is no problem, sets the center where we want... Any commend?? Steve.Toutant wrote: > > Hello, > My app uses google Map as a baseMap. On some computers (not clear yet if > it is the browser version or computer...) my app loads with Google MAp > zoomed at his max resolution (zoom=19 in this case). Sometimes it loads at > zoom = 2 as specified. > Perhaps there is something wrong on the way I create the map. Here is the > code I use. Is it the appropriate way to do it? > Thank you for your help, > Steve > > var mapOptions = > { > projection: "EPSG:900913", > displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour > afficher les coord lat long > units: "m", > maxExtent: new OpenLayers.Bounds(-9239517, 5465442, -5565974, > 9349764), > maxResolution: "auto", > controls: [], > numZoomLevels: 20 > }; > map = new OpenLayers.Map('mapDiv', mapOptions); > > // create Google Mercator layers > var googleM = new OpenLayers.Layer.Google( "Google Map", { minZoomLevel: > 5, type: G_NORMAL_MAP, 'sphericalMercator': true} ); > //Empty baseMap > var aucunContexte = new OpenLayers.Layer("AucunContexte",{isBaseLayer: > true}); > > map.addLayers([aucunContexte, googleM]); > > var myzoom = 2; //Means zoom = 7 since minzoomlevel = 5 > var lonCenter = -73.696289; > var latCenter = 47.606163; > > point = new OpenLayers.Geometry.Point(lonCenter, latCenter); > OpenLayers.Projection.transform(point, map.displayProjection, > map.getProjectionObject()); > map.setCenter(new OpenLayers.LonLat(point.x, point.y), myzoom); > > > 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 > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/problem-with-map-setCenter-and-zoom-tp3264159p4215879.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Fri Dec 25 09:05:38 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problems embedding OpenLayers in a Blog In-Reply-To: References: <4B320F1A.4090001@terrestris.de> <4B323750.6050208@terrestris.de> Message-ID: <20091225140538.GC5692@metacarta.com> On Wed, Dec 23, 2009 at 06:17:46PM +0100, jamesmikedupont@googlemail.com wrote: > Ahh, > it seems that the tiles are being loaded, but no data. That would > explain something. > Of course loading the tiles based on the current scrolling position > would not be a security issue. > > Ok, well I will have to spend some more time to read about this, can > you please explain on thing : > > what is the difference between : > > > new OpenLayers.Layer.GML("OSM", "file.osm", {format: OpenLayers.Format.OSM}); > > and what I was trying to do that did not work : > > new OpenLayers.Layer.Vector("Lines", { > strategies: [new OpenLayers.Strategy.Fixed()], > minZoomLevel: 1, > maxZoomLevel: 6 , > numZoomLevels: 5, > protocol: new OpenLayers.Protocol.HTTP({ > url: "test-embed_files/testway.xml", > format: new OpenLayers.Format.OSM(), > }) > }); There shouldn't be. This URL is relative, so you shouldn't be running into the same origin policy. So if this isn't working for you, it's for some reason other than the same origin policy. -- chris > Thanks, > mike > > > On Wed, Dec 23, 2009 at 5:56 PM, jamesmikedupont@googlemail.com > wrote: > > I am looking at this example, > > http://trac.openlayers.org/browser/trunk/openlayers/examples/osm-layer.html > > > > It is using GML instead of OSM, and it is also loading from the > > openstreetmap.org domain. > > > > How can this example work if you cannot load map data from another domain? > > > > mike > > > > On Wed, Dec 23, 2009 at 5:16 PM, jamesmikedupont@googlemail.com > > wrote: > >> Yes exactly, > >> but if I host the page on archive.org then I can access the data on > >> the same domain. > >> I had a misconception about this whole thing, obviously mashups are > >> going to create a lot more server sided traffic. > >> mike > >> > >> On Wed, Dec 23, 2009 at 4:29 PM, Marc Jansen wrote: > >>> Hi Mike, > >>> > >>> as for OpenLayers, it shouldn't be a problem to get it hosted nearly > >>> everywhere since it is only JavaScript. Obviously you cannot use any > >>> datasource, though. Maybe you can set up a proxy that handles the requests, > >>> but I'd doubt that it is possible for your current *.blogspot.com-adress. > >>> > >>> Regards, > >>> Marc > >>> > >>> > >>> > >>> jamesmikedupont@googlemail.com wrote: > >>>> > >>>> Thanks for your advice. That is interesting. > >>>> I never did anything like this, and I feed pretty stupid right now! > >>>> > >>>> But it will be possible to host the webpages on archive.org as well > >>>> and work without the blog itself. It just would be nice to separate > >>>> the display and the data storage. That effectively reduces the usage > >>>> of openlayers to people who have control of domains, right? It will > >>>> not be possible to people to just create maps with any data they want > >>>> without a server to proxy the data. > >>>> > >>>> Now, this example, it displays an openstreetmap map > >>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html > >>>> > >>>> but the fetch to : > >>>> http://www.openstreetmap.org/api/0.6/way/24315294/full > >>>> that fails, or never returns. > >>>> > >>>> But the same one to use open layer to load the data from osm fails : > >>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html > >>>> > >>>> It calles get on this url > >>>> http://www.openstreetmap.org/api/0.6/way/24315294 > >>>> in the request ?XMLHttpRequest.js (line 200) > >>>> > >>>> the other thing is that I dont get any error message about security > >>>> problems > >>>> > >>>> I found this document here: > >>>> http://docs.openlayers.org/library/request.html > >>>> > >>>> So, realistically it is not possible to host open layers on a blog? > >>>> > >>>> > >>>> mike > >>>> > >>>> On Wed, Dec 23, 2009 at 1:37 PM, Marc Jansen wrote: > >>>> > >>>>> > >>>>> Hi Mike, > >>>>> > >>>>> I am pretty sure that you aren't allowed to acces datasources via > >>>>> XHR/AJAX > >>>>> from other servers than the one the original page is served from. > >>>>> > >>>>> see: http://en.wikipedia.org/wiki/Same_origin_policy > >>>>> > >>>>> Just a quick guess, though. > >>>>> > >>>>> regards, > >>>>> Marc > >>>>> > >>>>> > >>>>> jamesmikedupont@googlemail.com wrote: > >>>>> > >>>>>> > >>>>>> Hi there, > >>>>>> I have attempted to embed openlayers in a blog post, > >>>>>> and am failing! Any help would be appreciated. > >>>>>> > >>>>>> using osm data hosted OSM data on archive.org > >>>>>> http://osmopenlayers.blogspot.com/2009/12/test-embed.html > >>>>>> > >>>>>> here is get a octet bytestream because archive org does not say the > >>>>>> right filetype. > >>>>>> http://ia341335.us.archive.org/2/items/ZCTA_NJ/zip_07003.poly.osm this > >>>>>> returns a 206 partial content and fails. > >>>>>> > >>>>>> in a pastebin file that is delivered as text: > >>>>>> http://osmopenlayers.blogspot.com/2009/12/hosting-on-pastebin.html > >>>>>> Date ? ?Wed, 23 Dec 2009 10:15:43 GMT > >>>>>> Server ?Apache/1.3.33 (Debian GNU/Linux) mod_python/2.7.10 Python/2.3.4 > >>>>>> PHP/4.3.10-22 mod_perl/1.29 > >>>>>> X-Powered-By ? ?PHP/4.3.10-22 > >>>>>> Content-Disposition ? ? attachment; filename="f28514ba0.txt" > >>>>>> Keep-Alive ? ? ?timeout=15, max=100 > >>>>>> Connection ? ? ?Keep-Alive > >>>>>> Transfer-Encoding ? ? ? chunked > >>>>>> Content-Type ? ?text/plain; charset=iso-8859-1 > >>>>>> > >>>>>> So the problem might be the attachment... > >>>>>> > >>>>>> and that data from osm directly again on pastebin, > >>>>>> > >>>>>> > >>>>>> http://osmopenlayers.blogspot.com/2009/12/osm-data-from-xml-output-on-pastebin.html > >>>>>> data is here :http://pastebin.com/pastebin.php?dl=f290d5ea6 it returns a > >>>>>> 200 ok. > >>>>>> It returns an : text/plain; charset=iso-8859-1 but does not render. > >>>>>> But there is still nothing there > >>>>>> > >>>>>> from osm directly > >>>>>> http://osmopenlayers.blogspot.com/2009/12/get-osm-data-directly.html > >>>>>> firebug says :no element found > >>>>>> > >>>>>> And my last try was to put the code from osm on the page directly, > >>>>>> also not rendering but the xml is loading. > >>>>>> http://osmopenlayers.blogspot.com/2009/12/test-of-osm-server.html > >>>>>> > >>>>>> but nothing is working > >>>>>> > >>>>>> would appreciate any tips and help > >>>>>> thanks > >>>>>> mike > >>>>>> _______________________________________________ > >>>>>> Users mailing list > >>>>>> Users@openlayers.org > >>>>>> http://openlayers.org/mailman/listinfo/users > >>>>>> > >>>>>> > >>>>>> > >>> > >>> > >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From richard.greenwood at gmail.com Fri Dec 25 10:46:42 2009 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Control background-image In-Reply-To: References: Message-ID: Answering my own question - you would use displayClass to override the image as documented at: http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Control/Button-js.html Happy holidays! Rich On Thu, Dec 24, 2009 at 9:44 AM, Richard Greenwood wrote: > I have two OpenLayers.Control.DrawFeature controls in my panel. One > draws a Polygon, the other a regular polygon. So I want to have > different button background-images for the two buttons, but they both > are getting the background-image defined by the > .olControlDrawFeatureItemInactive class. > > I (think) I have assigned a unique id to the two controls: > > ? ? ?new OpenLayers.Control.DrawFeature(lyrVectors, > ? ? ? ? ? ?OpenLayers.Handler.RegularPolygon, > ? ? ? ? ? ?{handlerOptions: {sides: 24}, title: 'Draw a circle.', id: > 'drawEllipse'}), > ? ? ?new OpenLayers.Control.DrawFeature(lyrVectors, > ? ? ? ? ? ?OpenLayers.Handler.Polygon, > ? ? ? ? ? ?{title: 'Draw a polygon. Double click when done.', id: 'drawPoly'}), > > and in my .css I am attempting to use the id to assign a unique > background-image: > > ? ?div#drawPoly { > ? ? ? background-image: url("../graphics/polygon.gif"); > ? ?} > > I may be going about this in completely the wrong way. Any help is appreciated. > > Thanks, > Rich > > -- > Richard Greenwood > richard.greenwood@gmail.com > www.greenwoodmap.com > -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From alexandre.saunier at camptocamp.com Fri Dec 25 12:50:12 2009 From: alexandre.saunier at camptocamp.com (Alexandre Saunier) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Duplicated Google Maps copyright controls Message-ID: <2885dee30912250950r5314972et78039636a08ec857@mail.gmail.com> Hello all, I don't know if the topic has already been discussed but I notice a strange behaviour with some OL maps using Google layers: for instance when viewing http://openlayers.org/dev/examples/spherical-mercator.html with Firefox and switching the base layer to "Google satellite" (or hybrid), one may notice that the Google copyright in the bottom left corner is duplicated (pan the map a little bit to have a non-white background). Then it's ok when switching to an other baselayer. I observe the same issue in one of my OL applications. Is there a way to avoid it? Thank you for your help (and happy holidays), alex From eric.lemoine at camptocamp.com Sat Dec 26 11:08:47 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Duplicated Google Maps copyright controls In-Reply-To: <2885dee30912250950r5314972et78039636a08ec857@mail.gmail.com> References: <2885dee30912250950r5314972et78039636a08ec857@mail.gmail.com> Message-ID: On Friday, December 25, 2009, Alexandre Saunier wrote: > Hello all, > > I don't know if the topic has already been discussed but I notice a > strange behaviour with some OL maps using Google layers: for instance > when viewing http://openlayers.org/dev/examples/spherical-mercator.html > with Firefox and switching the base layer to "Google satellite" (or > hybrid), one may notice that the Google copyright in the bottom left > corner is duplicated ?(pan the map a little bit to have a non-white > background). Then it's ok when switching to an other baselayer. > > I observe the same issue in one of my OL applications. Is there a way > to avoid it? > > Thank you for your help (and happy holidays), Hi Alex. Do you OL trunk in your app? Patches addressing duplicate attributions were committed recently, see #2266 and #2300. 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 Sat Dec 26 15:18:09 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] problem with map.setCenter and zoom In-Reply-To: <1261744794460-4215879.post@n2.nabble.com> References: <1261744794460-4215879.post@n2.nabble.com> Message-ID: On Friday, December 25, 2009, ibrahimsaricicek wrote: > > Hi all,, > > I have a similar problem; > > map.setCenter(userExtentCenterLonLat,userExtentZoom, false, true); > > On Google It shows the whole world, but it should be a placemark in Turkey. > A zoom in and out solves the problem. > > But if the basemap is wms (Mapserver) there is no problem, sets the center > where we want... > Any commend?? Hi. Do you also use GeoExt.MapPanel or mapfish.widgets.MapComponent? If not this is a different issue. I'd recommend you provide a small example showing your problem. 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 Sat Dec 26 15:30:56 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Problem in openlayers when migrating from Mapserver 5.0 to 5.2 In-Reply-To: <1261645600285-4212502.post@n2.nabble.com> References: <1261641237133-4212330.post@n2.nabble.com> <63145.145.50.39.11.1261641574.squirrel@webmail.hostingdiscounter.nl> <1261642494361-4212380.post@n2.nabble.com> <31906.145.50.39.11.1261642822.squirrel@webmail.hostingdiscounter.nl> <1261645600285-4212502.post@n2.nabble.com> Message-ID: On Thursday, December 24, 2009, afrozk wrote: > > Hi, > ? ?It works fine now when I removed the mode=map option. > > I did not remove the ?layers option. Please tell me where else do I specify > the > layers option if it is removed from there, just to know it . I think the "layers" param is fine. 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 Sat Dec 26 16:29:47 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Add new Parameter to options In-Reply-To: <4B30BE1B.4050801@googlemail.com> References: <4B30BE1B.4050801@googlemail.com> Message-ID: On Tuesday, December 22, 2009, Moataz Elmasry wrote: > Hello List > > I've created a custom toolbar as follows: > > OpenLayers.Control.CustomNavToolbar = > OpenLayers.Class(OpenLayers.Control.Panel, { > ? ? Map : null, > ? ? initialize : function(options) {console.log(Map);} > }); > > Now I want to add the parameter Map to to the constructor: > var nav = OpenLayers.Control.CustomNavToolbar({Map:map}) > > On the console.log(Map) I get that object Map is not defined. When I > call on the other hand console.log(options.Map) I get the actual object. > > How can I define the parameter so that I can directly use "Map" instead > of options.Map? Hi. I don't know if that answers your question but you can use OpenLayers.Util.extend in the "initialize" method to set the options passed to the constructor in the instance: initialize: function(options) { OpenLayers.Util.extend(this, options); } You can then use this.Map from any method of the class. 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 alexandre.saunier at camptocamp.com Sat Dec 26 17:15:55 2009 From: alexandre.saunier at camptocamp.com (Alexandre Saunier) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Duplicated Google Maps copyright controls In-Reply-To: References: <2885dee30912250950r5314972et78039636a08ec857@mail.gmail.com> Message-ID: <2885dee30912261415h7ab22a1qae446c87c28836bc@mail.gmail.com> Hey Eric, thanks for replying! Yes I use OL trunk and so does the example that illustrates the problem: http://openlayers.org/dev/examples/spherical-mercator.html I now realize that my previous mail subject was confusing. The Google Maps "attribution" control is not duplicated because of two layers displayed at the same time. The problem is rather that the GM "attribution" link/text of the previously selected base layer is still displayed (in some cases) even when another base layer has been selected in the meantime. In the case study provided in my first message, you can see that two GM "attributions" are stacked when switching from "Google streets" to "Google Satellite" or "Google Hybrid" for the first time. It also occurs when switching to some other base layer like VE or OSM. In fact it seems that the first GM base layer attribution control is not cleared (deactivated?) when the base layer changes. alex 2009/12/26 Eric Lemoine : > On Friday, December 25, 2009, Alexandre Saunier > wrote: >> Hello all, >> >> I don't know if the topic has already been discussed but I notice a >> strange behaviour with some OL maps using Google layers: for instance >> when viewing http://openlayers.org/dev/examples/spherical-mercator.html >> with Firefox and switching the base layer to "Google satellite" (or >> hybrid), one may notice that the Google copyright in the bottom left >> corner is duplicated ?(pan the map a little bit to have a non-white >> background). Then it's ok when switching to an other baselayer. >> >> I observe the same issue in one of my OL applications. Is there a way >> to avoid it? >> >> Thank you for your help (and happy holidays), > > Hi Alex. Do you OL trunk in your app? Patches addressing duplicate > attributions were committed recently, see #2266 and #2300. > > 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 Sun Dec 27 04:15:46 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Format GML 3 issue? In-Reply-To: <4391132472157544038@unknownmsgid> References: <4391132472157544038@unknownmsgid> Message-ID: On Wednesday, December 23, 2009, Julien Jeudy wrote: > Dear all, > > I have a doubt on a GML 3 OpenLayers format issue (from a WFS 1.1.0). > > In GML there are two ways to list polygons points: > > 1. a unique posList element: the following geom is correctly transform from > GML3 to OpenLayers geometry > - > 8427711.443672495 4658480.583807316 -8428116.646618983 4671596.358484082 > -8429661.427192722 4697373.995504196 -8432776.70314257 > . > > 2. a list of pos elements: But this geom is not correctly transform > srsName="EPSG:900913"> arRing srsName="EPSG:900913"> > ? ? ? ? ? ? ? ?3944245.09999984 3978948.409156078 > ? ? ? ? ? ? ? ?3944282.8999998407 3978974.7107042107 > . > > I think it's due to this part of code (from trunk - > OpenLayers.Format.GML.v3.js). Because on each iteration of gml pos the > points array is erased. > ? ? ? ? ? ? ? ?"pos": function(node, obj) { > ? ? ? ? ? ? ? ?var str = this.getChildValue(node).replace( > ? ? ? ? ? ? ? ? ? ?this.regExes.trimSpace, "" > ? ? ? ? ? ? ? ?); > ? ? ? ? ? ? ? ?var coords = str.split(this.regExes.splitSpace); > ? ? ? ? ? ? ? ?var point; > ? ? ? ? ? ? ? ?if(this.xy) { > ? ? ? ? ? ? ? ? ? ?point = new OpenLayers.Geometry.Point( > ? ? ? ? ? ? ? ? ? ? ? ?coords[0], coords[1], coords[2] > ? ? ? ? ? ? ? ? ? ?); > ? ? ? ? ? ? ? ?} else { > ? ? ? ? ? ? ? ? ? ?point = new OpenLayers.Geometry.Point( > ? ? ? ? ? ? ? ? ? ? ? ?coords[1], coords[0], coords[2] > ? ? ? ? ? ? ? ? ? ?); > ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?obj.points = [point]; > ? ? ? ? ? ?}, > > Does anyone know whether the GML is not conform or if it's possible to > propose a patch? > If it's not a GML conformity issue, I think that the following patch can > solve the problem but i'm not sure it's the best way: > ? ? ? ?"pos": function(node, obj) { > ? ? ? ? ? ? ? ?... > ? ? ? ? ? ? ? ?if(obj.points) { > ? ? ? ? ? ? ? ? ? ? ? ?obj.points.push(point); > ? ? ? ? ? ?} else { > ? ? ? ? ? ? ? ? ? ? ? ?obj.points = [point]; > ? ? ? ? ? ?} > ? ? ? ?} > > But i'm not sure it's the best way to do this. I'm not familiar enough with GML to answer your question, sorry. I'd just recommend that you ask the question again on dev@ if you don't get answers here. Also, if you think this is a bug feel free to create a ticket, and possibly attach a patch. See . Thanks, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Sun Dec 27 04:56:22 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Filters doesn't work with features attributes In-Reply-To: References: Message-ID: On Wednesday, December 23, 2009, Jimmy Aumard wrote: > Hi, > > I have problems with filters. I try to create filter dynamically to select many feature on my layer. > > Some test code : > > var layer=map.getLayersBy('name','franch')[0]; > var filter= new OpenLayers.Filter.Comparison({ > ??????????? type: OpenLayers.Filter.Comparison.LIKE, > ??????????? property: "Nom", > ??????????? value: "test" > ??????? }); > for(i=0;i ??? var feature=layer.features[i]; > ??????? alert(feature.attributes.Nom); > ??? if(filter.evaluate(feature)){ > ??? alert('ee'); > } > } > > I have features with an attribute "Nom" = "test" but the filter return alway false. > > What I'm doing wrong? Have you tried passing feature.attributes to the evaluate function? 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 Sun Dec 27 06:02:51 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Duplicated Google Maps copyright controls In-Reply-To: <2885dee30912261415h7ab22a1qae446c87c28836bc@mail.gmail.com> References: <2885dee30912250950r5314972et78039636a08ec857@mail.gmail.com> <2885dee30912261415h7ab22a1qae446c87c28836bc@mail.gmail.com> Message-ID: On Sat, Dec 26, 2009 at 11:15 PM, Alexandre Saunier wrote: > Hey Eric, > thanks for replying! > > Yes I use OL trunk and so does the example that illustrates the problem: > http://openlayers.org/dev/examples/spherical-mercator.html > > I now realize that my previous mail subject was confusing. The Google > Maps "attribution" control is not duplicated because of two layers > displayed at the same time. The problem is rather that the GM > "attribution" link/text of the previously selected base layer is still > displayed (in some cases) even when another base layer has been > selected in the meantime. > > In the case study provided in my first message, you can see that two > GM "attributions" are stacked when switching from "Google streets" to > "Google Satellite" or "Google Hybrid" for the first time. It also > occurs when switching to some other base layer like VE or OSM. In fact > it seems that the first GM base layer attribution control is not > cleared (deactivated?) when the base layer changes. Hi Alexandre. Your initial post was clear, I'd just misread it. I think you found a bug. The problem is, I think, unrelated to Control.Attribution, as the "terms of use" and "powered by" links/logos are handled in a specific way for Google layers. So I guess you create a ticket; if you attach a patch I'll review it. Thanks, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Sun Dec 27 08:03:19 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Modify features with user specified coordinates In-Reply-To: <1261415592.4287.28.camel@yves-laptop> References: <1261415592.4287.28.camel@yves-laptop> Message-ID: On Monday, December 21, 2009, Yves Moisan wrote: > Hi All, Hi Yves > I was asked to provide users with text boxes so that they can enter > coordinates they want a vertex or point moved to in RESHAPE mode. ?I > thought of a "MANUAL_RESHAPE" option, but looking at ModifyFeature.js > shows that all values on the byte are taken : > > OpenLayers.Control.ModifyFeature.RESHAPE = 1 (RESIZE = 2, ROTATE = 4 and > DRAG = 8) plus all combinations of mode. You could use 16, as long as it's a power of 2. > > Has anyone implemented such a functionality in OL ? ?I could modify the > behaviour of RESHAPE so that it pops text boxes upon clicking on a point > or vertex, but I would rather have it as another editing option mode. > Ideally, people would be allowed to toggle "default" RESHAPE (that is > drag points or vertices with the mouse) and manual reshape. ?Ideas ? If I had to do that I'd try to manually call the modify feature control's dragStart, dragVertex and dragComplete methods. 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 Sun Dec 27 10:18:10 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] StyleMap, Style and Rules not working In-Reply-To: References: Message-ID: On Mon, Dec 21, 2009 at 4:36 PM, Casper B?rgesen wrote: > Looking at various examples of how to use styles in OpenLayers, we have > built the following: > > var Layer_AddressWebService_1 = new OpenLayers.Layer.Vector( > ??? "AddressWebService_1", > ??? { > ??????? styleMap: new OpenLayers.StyleMap( > ??????? { > ??????????? "default": new OpenLayers.Style( > ??????????? { > ??????????????? rules: > ??????????????? [ > ??????????????????? new OpenLayers.Rule( > ??????????????????? { > ??????????????????????? symbolizer: > ??????????????????????? { > ??????????????????????????? "Point": > ??????????????????????????? { > ??????????????????????????????? pointRadius: 4, > ??????????????????????????????? graphicName: 'square', > ??????????????????????????????? fillColor: 'blue', > ??????????????????????????????? fillOpacity: 1, > ??????????????????????????????? strokeWidth: 1, > ??????????????????????????????? strokeOpacity: 1, > ??????????????????????????????? strokeColor: '#0000FF' > ??????????????????????????? } > ??????????????????????? } > ??????????????????? }) > ??????????????? ] > ??????????? }) > ??????? }) > ??? }, { > ??????? displayInLayerSwitcher: false, > ??????? isBaseLayer: false > ??? } > ); > > We think this should resemble and hopefully be functionally identical to: > > var awsSymbolizer = { > ??? "Point": { > ??????? pointRadius: 4, > ????? ??graphicName: "square", > ????? ??fillColor: "blue", > ????????fillOpacity: 1, > ????? ??strokeWidth: 1, > ????? ??strokeOpacity: 1, > ????? ??strokeColor: "#0000FF" > ??? ?} > }; > > var awsStyle = new OpenLayers.Style(); > awsStyle.addRules([new OpenLayers.Rule({symbolizer: awsSymbolizer})]); > var awsStyleMap = new OpenLayers.StyleMap({"default": awsStyle}); > var Layer_AddressWebService_1?= new > OpenLayers.Layer.Vector("AddressWebService_1", > { > ??? styleMap: awsStyleMap > }, { > ??? displayInLayerSwitcher: false, > ??? isBaseLayer: false > }); > But it is not. When using the latter, points are visualised fine, but using > the first part, results in nothing.?The problem lies around the rules. Can > anyone tell me what the major difference is? try new OpenLayers.Style(null, {rules: [ /* */ ]}); ^^^^ 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 ngerber999 at gmail.com Sun Dec 27 10:32:00 2009 From: ngerber999 at gmail.com (Nathan Gerber) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Fwd: Problem in openlayers when migrating from Mapserver 5.0 to 5.2 In-Reply-To: References: <1261641237133-4212330.post@n2.nabble.com> <63145.145.50.39.11.1261641574.squirrel@webmail.hostingdiscounter.nl> <1261642494361-4212380.post@n2.nabble.com> <31906.145.50.39.11.1261642822.squirrel@webmail.hostingdiscounter.nl> <1261645600285-4212502.post@n2.nabble.com> Message-ID: Sorry Eric, forgot reply-all on this... I can confirm what Eric said, the layers parameter works just fine with MapServer 5.2 and is required depending upon how you setup your mapfiles (layers on by default or not). -- Nathan Gerber On Sat, Dec 26, 2009 at 3:30 PM, Eric Lemoine wrote: > On Thursday, December 24, 2009, afrozk wrote: > > > > Hi, > > It works fine now when I removed the mode=map option. > > > > I did not remove the layers option. Please tell me where else do I > specify > > the > > layers option if it is removed from there, just to know it . > > I think the "layers" param is fine. > > 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 > _______________________________________________ > 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/20091227/c5678ea5/attachment.html From jamiller at usgs.gov Mon Dec 28 10:02:04 2009 From: jamiller at usgs.gov (Joseph Miller) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] do tile layers load all tiles for a given zoom layer all at once? Message-ID: Hey All, I am doing a deep dive into the openlayers code in an attempt to further understand how tile loading is implemented in order to fix some issues I am having with a custom implementation. One thing that I am having trouble figuring out is whether all of the tiles are loaded for each zoom level right away when the zoom happens of if there is a way to get OpenLayers to only load the visible portion of the tiles plus a buffer (with further loading being triggered when the user pans into the buffer). From what I can tell tile loading (addTile) is only called by initGriddedTiles, and only when the forceReTile boolean is triggered by a zoom or by a pan that goes completely outside of the layer boundaries? Thanks, Joe Miller -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091228/7177a633/attachment.html From alexandre.saunier at camptocamp.com Tue Dec 29 09:06:08 2009 From: alexandre.saunier at camptocamp.com (Alexandre Saunier) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Duplicated Google Maps copyright controls In-Reply-To: References: <2885dee30912250950r5314972et78039636a08ec857@mail.gmail.com> <2885dee30912261415h7ab22a1qae446c87c28836bc@mail.gmail.com> Message-ID: <2885dee30912290606l79e28c9ekf8db7f0cbb871569@mail.gmail.com> > bug. The problem is, I think, unrelated to Control.Attribution, as the > "terms of use" and "powered by" links/logos are handled in a specific > way for Google layers. So I guess you create a ticket; if you attach a > patch I'll review it. In fact a ticket is already referencing the problem: http://trac.openlayers.org/ticket/2328 I have not succeeded in finding a fix but have added some extra comments in the ticket. 2009/12/27 Eric Lemoine : > On Sat, Dec 26, 2009 at 11:15 PM, Alexandre Saunier > wrote: >> Hey Eric, >> thanks for replying! >> >> Yes I use OL trunk and so does the example that illustrates the problem: >> http://openlayers.org/dev/examples/spherical-mercator.html >> >> I now realize that my previous mail subject was confusing. The Google >> Maps "attribution" control is not duplicated because of two layers >> displayed at the same time. The problem is rather that the GM >> "attribution" link/text of the previously selected base layer is still >> displayed (in some cases) even when another base layer has been >> selected in the meantime. >> >> In the case study provided in my first message, you can see that two >> GM "attributions" are stacked when switching from "Google streets" to >> "Google Satellite" or "Google Hybrid" for the first time. It also >> occurs when switching to some other base layer like VE or OSM. In fact >> it seems that the first GM base layer attribution control is not >> cleared (deactivated?) when the base layer changes. > > Hi Alexandre. > > Your initial post was clear, I'd just misread it. I think you found a > bug. The problem is, I think, unrelated to Control.Attribution, as the > "terms of use" and "powered by" links/logos are handled in a specific > way for Google layers. So I guess you create a ticket; if you attach a > patch I'll review it. > > Thanks, > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > From mak.kolybabi at telenium.ca Tue Dec 29 11:19:16 2009 From: mak.kolybabi at telenium.ca (Mak Kolybabi) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Zoom-based feature styling Message-ID: <20091229161916.GA29554@throckmorton> I expect that there's an easy way to do this, but it so far eludes me. I have an OpenLayers.Layer.Vector object called "icons". Each feature in this layer has two attributes that I need to worry about: type and zoom. There are fifty different types, and five different zooms, so far. I already have type-based styling using: new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "type", value: "type_1" }), symbolizer: { externalGraphic: "/path/to/images/1.png", graphicHeight: 25, graphicWidth: 25, graphicOpacity: 1.0 } })); I realize I could use max/minScaleDenominator to restrict zooms, but 5x50 rules is excessive. What I'm looking for is something like: new OpenLayers.Rule({ filter: new OpenLayers.Filter.Logical({ filters: [ new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "type", value: "type_1" }), new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO, property: "zoom", value: map.zoom }) ], type: OpenLayers.Filter.Logical.AND }), symbolizer: { externalGraphic: "/path/to/images/1.png", graphicHeight: 25, graphicWidth: 25, graphicOpacity: 1.0 } })); Except where map.zoom is dynamically evaluated, instead of it being evaluated only when the style is created. Any ideas or suggestions are appreciated. -- 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/20091229/54d88f1c/attachment.bin From arnd.wippermann at web.de Tue Dec 29 15:50:44 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Zoom-based feature styling In-Reply-To: <20091229161916.GA29554@throckmorton> Message-ID: Hi, Have a look at this example http://openlayers.org/dev/examples/styles-context.html The context option of an OpenLayers.Style object offers the possibility to style features by own declared functions. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Mak Kolybabi Gesendet: Dienstag, 29. Dezember 2009 17:19 An: users@openlayers.org Betreff: [OpenLayers-Users] Zoom-based feature styling I expect that there's an easy way to do this, but it so far eludes me. I have an OpenLayers.Layer.Vector object called "icons". Each feature in this layer has two attributes that I need to worry about: type and zoom. There are fifty different types, and five different zooms, so far. I already have type-based styling using: new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "type", value: "type_1" }), symbolizer: { externalGraphic: "/path/to/images/1.png", graphicHeight: 25, graphicWidth: 25, graphicOpacity: 1.0 } })); I realize I could use max/minScaleDenominator to restrict zooms, but 5x50 rules is excessive. What I'm looking for is something like: new OpenLayers.Rule({ filter: new OpenLayers.Filter.Logical({ filters: [ new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "type", value: "type_1" }), new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO, property: "zoom", value: map.zoom }) ], type: OpenLayers.Filter.Logical.AND }), symbolizer: { externalGraphic: "/path/to/images/1.png", graphicHeight: 25, graphicWidth: 25, graphicOpacity: 1.0 } })); Except where map.zoom is dynamically evaluated, instead of it being evaluated only when the style is created. Any ideas or suggestions are appreciated. -- Mak Kolybabi Programmer Telenium Inc. 204-957-2821 From jimlug at co.clackamas.or.us Tue Dec 29 20:02:18 2009 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Mapping areas from database In-Reply-To: <96723350-6FFE-4448-8D7F-09D421489AEE@gmail.com> References: <96723350-6FFE-4448-8D7F-09D421489AEE@gmail.com> Message-ID: <1262134938178-4230350.post@n2.nabble.com> Here is a good document that helped me populate popup boxes using a wms. My data sites in a PostgreSQL database. http://trac.openlayers.org/wiki/GetFeatureInfo Hope this helps... jtrsmith wrote: > > I am new to openlayers, so please excuse my lack of knowledge here. > > I have set up a map of my college campus in openlayers and would like > to add some functionality to it. > > What I am looking to do is have locations ( prefferably rectangular > polygon areas ) set up that when clicked will open a popup and show a > photograph of the location. I have a database set up in SQL with the > names, locations, and photographs. I am just not sure how to get the > information to show on my map. > > I did look at the examples, some of them help, but I am still unsure > how I can use the database information on my map. I have added a popup > to my map using the example in select-feature-openpopup, however I am > unable to add multiple locations with different information. Should I > be using an XML document to populate my map? How would I set up > openlayers to get that information? > > Sorry for the long post, can anyone point me in the right direction? > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Mapping-areas-from-database-tp4208682p4230350.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jimlug at co.clackamas.or.us Tue Dec 29 20:07:29 2009 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] icons partially displaying Message-ID: <1262135249292-4230370.post@n2.nabble.com> Aloha folks, I am having some issues with my marker symbols. I'm using some basic icons (.png) to represent schools and addresses. However, sometimes my markers only partially display. I am clueless to what is going on. Really, there is nothing out of the ordinary. Has anyone else experienced this problem? Thanks... -- View this message in context: http://n2.nabble.com/icons-partially-displaying-tp4230370p4230370.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From brad at cubewerx.com.au Tue Dec 29 21:07:58 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] icons partially displaying In-Reply-To: <1262135249292-4230370.post@n2.nabble.com> References: <1262135249292-4230370.post@n2.nabble.com> Message-ID: <003801ca88f4$e9fe8610$bdfb9230$@com.au> Are you accessing this layer via a tiled request? If these are point symbols you might try an Untiled request. Cheers, Brad... -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Dash Sent: Wednesday, December 30, 2009 12:07 PM To: users@openlayers.org Subject: [OpenLayers-Users] icons partially displaying Aloha folks, I am having some issues with my marker symbols. I'm using some basic icons (.png) to represent schools and addresses. However, sometimes my markers only partially display. I am clueless to what is going on. Really, there is nothing out of the ordinary. Has anyone else experienced this problem? Thanks... -- View this message in context: http://n2.nabble.com/icons-partially-displaying-tp4230370p4230370.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 ken at rockies.ca Wed Dec 30 01:12:29 2009 From: ken at rockies.ca (Ken Sanderson) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] IE with google data and hidden map borders Message-ID: <4B3AEF4D.2050007@rockies.ca> When I have an openlayers application using google base data the image seems shifted slightly, so that the border of my map ends up under the image on the bottom and right sides. I skimmed through the examples and it happens for me there as well, so pretty sure it is not my setup. Works fine in Firefox. Anyone else experience this and find a work around? Thanks, Ken -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From 06.rajput at gmail.com Thu Dec 31 09:01:41 2009 From: 06.rajput at gmail.com (Gaurav Thakur) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] how can use google map as base layer and overlay Shapefile using mapserver/mapfile Message-ID: <988690ed0912310601w33acb7f4h2109efd3d56ed50@mail.gmail.com> Hi all, first of all i wish to say happy new year to all of you... i m new with openlayers. and my problem is to use google maps as base layer and overlaye my shapefiles on it using Ms4w mapserver/mapfile. can anyone help me to solve this problem. thanks in advance waiting for your response -- ------ with Regards Gaurav thakur =====-----=====-----===== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091231/c41a0f10/attachment.html From Bob.Bistrais at maine.gov Thu Dec 31 14:17:56 2009 From: Bob.Bistrais at maine.gov (Bistrais, Bob) Date: Wed Sep 1 17:18:21 2010 Subject: [OpenLayers-Users] Trouble getting feature info Message-ID: <4EFF8BB964547748A07CA32961810C0415F32BD1@SOM-TEAQASMAIL1.som.w2k.state.me.us> I am building a small application using a couple of WMS layers. I want to include a feature info tool. I copied much of the code from the example page, http://openlayers.org/dev/examples/getfeatureinfo-control.html . Without the line of code, infoControls.click.activate(); the map will display. But if I include that line the map won't load. In Firebug the following error occurs: ActiveXObject is not defined 225var factory=null;if(typeof GearsFactory!='undefined'){factory=new GearsFactory();}else{try{factory=new ActiveXObject('Gears.Factory'); ...(more follows, but it says the object is null). One thing I'm not too sure of is if I have the proxy server correctly configured. If it helps, here is the code, minus the inline styles... OpenLayers test

OpenLayers Test Map

-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091231/592ffcd9/attachment.html