From eric.lemoine at camptocamp.com Mon Nov 2 01:05:05 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:09 2010 Subject: [OpenLayers-Users] Problem with layer switcher In-Reply-To: <3F643797A078EB4FB028800809680984019B7964@langouste.zhaw.ch> References: <3F643797A078EB4FB028800809680984019B7964@langouste.zhaw.ch> Message-ID: On Friday, October 30, 2009, Rahn Hanno (rahn) wrote: > > > > > > > > > > > > > > Hello list, > > > > I have a problem with the Layerswitcher control. Perhaps > somebody can help me. > > > > I use two different maps with different layers in one > side. Now I will realise a Layerswitcher for both maps. But the layerswitcher > only works for one map. The second one shows my layers but I can?t switch > them. The control boxes can?t be activated. does the patch attached to fixes it? 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 st.sonstiges at web.de Mon Nov 2 03:09:43 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:09 2010 Subject: [OpenLayers-Users] WFS OpenLayers.ProxyHost Tomcat 5.5 Message-ID: <1257149383506-3930399.post@n2.nabble.com> Hello, I want so show my map with a OpenLayers.Layer.WFS. Therefore I did the same as in the openlayers examples to show data with a WFS. But in my case, it doesn't work. After some reading in the internet i found out, that I have to configure a OpenLayers.ProxyHost to show the data with a WFS. In the examples I always found this type of code: OpenLayers.ProxyHost="/proxy/?url="; What does that mean? Furthermore I found out, that I have to configure more, when I use Tomcat. In my case I use a Server with Tomcat 5.5 installed and Geoserver to connect to WFS http://IP:PORT/geoserver/wfs What do I have to configure that I can show my data on Map over WFS. (Sorry for my english, it is not the best) Regards stash -- View this message in context: http://n2.nabble.com/WFS-OpenLayers-ProxyHost-Tomcat-5-5-tp3930399p3930399.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jimmy.aumard at gmail.com Mon Nov 2 03:45:10 2009 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Geoserver wfs layers doesn't work Message-ID: Hi list, I try to make wfs request to geoserver with this: var saveStrategy = new OpenLayers.Strategy.Save(options); var wfs = new OpenLayers.Layer.Vector(_layer, { strategies: [new OpenLayers.Strategy.Fixed({ preload: false }), saveStrategy], projection: map.getProjection(), filter: filter, styleMap: style, protocol: new OpenLayers.Protocol.WFS({ srsName: map.getProjection(), url: urlwfs, featureType: _layer, featurePrefix:'topp', version: '1.1.0', featureNS: "http://www.openplans.org/topp" }) }); This request work but if I change the namespace of geoserver (but same layer) my request become: var saveStrategy = new OpenLayers.Strategy.Save(options); var wfs = new OpenLayers.Layer.Vector(_layer, { strategies: [new OpenLayers.Strategy.Fixed({ preload: false }), saveStrategy], projection: map.getProjection(), filter: filter, styleMap: style, protocol: new OpenLayers.Protocol.WFS({ srsName: map.getProjection(), url: urlwfs, featureType: _layer, featurePrefix:'inforisq', version: '1.1.0', featureNS:"http://my_uri.fr/inforisq" }) }); It's does'n work, I see in firebug geoserver send my layer but I have no geometry on my map Anyone have an idea? Cheers Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091102/b903a9f3/attachment.html From mario.nunez at atosresearch.eu Mon Nov 2 04:00:46 2009 From: mario.nunez at atosresearch.eu (=?utf-8?B?TWFyaW8gTnXDsWV6IEppbWVuZXo=?=) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] WFS OpenLayers.ProxyHost Tomcat 5.5 In-Reply-To: <1257149383506-3930399.post@n2.nabble.com> References: <1257149383506-3930399.post@n2.nabble.com> Message-ID: Hello, yes you need to configure a proxy. I have done it with Apache2 that supports cgi technology, but I don?t know how to do it with tomcat. OpenLayers.ProxyHost="/proxy/?url="; This code line is to locate the proxy.cgi so you have to put there the relative path to your proxy.cgi file. There is an example in OL website anyway you should use an example of proxy.cgi like this one: (notice that allowed hosts is a list of reachable servers where you have to include your WMS URL or simply your server URL) #!/usr/bin/env python """This is a blind proxy that we use to get around browser restrictions that prevent the Javascript from loading pages not on the same server as the Javascript. This has several problems: it's less efficient, it might break some sites, and it's a security risk because people can use this proxy to browse the web and possibly do bad stuff with it. It only loads pages via http and https, but it can load any content type. It supports GET and POST requests.""" import urllib2 import cgi import sys, os # Designed to prevent Open Proxy type stuff. allowedHosts = ['www.openlayers.org', 'openlayers.org', 'labs.metacarta.com', 'world.freemap.in', 'prototype.openmnnd.org', 'geo.openplans.org', 'sigma.openplans.org', 'demo.opengeo.org', 'www.openstreetmap.org', 'sample.avencia.com', 'http://view.atdmt.com', 'http://live.com'] method = os.environ["REQUEST_METHOD"] if method == "POST": qs = os.environ["QUERY_STRING"] d = cgi.parse_qs(qs) if d.has_key("url"): url = d["url"][0] else: url = "http://www.openlayers.org" else: fs = cgi.FieldStorage() url = fs.getvalue('url', "http://www.openlayers.org") try: host = url.split("/")[2] if allowedHosts and not host in allowedHosts: print "Status: 502 Bad Gateway" print "Content-Type: text/plain" print print "This proxy does not allow you to access that location (%s)." % (host,) print print os.environ elif url.startswith("http://") or url.startswith("https://"): if method == "POST": length = int(os.environ["CONTENT_LENGTH"]) headers = {"Content-Type": os.environ["CONTENT_TYPE"]} body = sys.stdin.read(length) r = urllib2.Request(url, body, headers) y = urllib2.urlopen(r) else: y = urllib2.urlopen(url) # print content type header i = y.info() if i.has_key("Content-Type"): print "Content-Type: %s" % (i["Content-Type"]) else: print "Content-Type: text/plain" print print y.read() y.close() else: print "Content-Type: text/plain" print print "Illegal request." except Exception, E: print "Status: 500 Unexpected Error" print "Content-Type: text/plain" print print "Some unexpected error occurred. Error text was:", E ------------------------------------------------------------------ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. Este mensaje y los ficheros adjuntos pueden contener informacion confidencial destinada solamente a la(s) persona(s) mencionadas anteriormente pueden estar protegidos por secreto profesional. Si usted recibe este correo electronico por error, gracias por informar inmediatamente al remitente y destruir el mensaje. Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin no se hace responsable por su contenido. Su contenido no constituye ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas partes. Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor no puede garantizar nada al respecto y no sera responsable de cualesquiera danos que puedan resultar de una transmision de virus. ------------------------------------------------------------------ From eric.lemoine at camptocamp.com Mon Nov 2 04:16:33 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] png images, vector layers, pop-ups, and IE In-Reply-To: <20091030143631.GA23048@cloud3.rho.net> References: <20091029203435.GA2403@cloud3.rho.net> <20091030143631.GA23048@cloud3.rho.net> Message-ID: On Fri, Oct 30, 2009 at 3:36 PM, Wendell Turner wrote: > On Fri, Oct 30, 2009 at 06:30:45AM +0100, Eric Lemoine wrote: >> On Thursday, October 29, 2009, Wendell Turner wrote: >> > >> > I can't get pop-ups to appear when using png images on a >> > vector layer in IE. ?I have a vector layer with points that >> > have .png images. ?The images show properly in both Firefox >> > and IE. ?The images have pop-ups enabled. >> > >> > It works fine in Firefox (pop-ups actually pop up), but in >> > IE the mouseover turns the cursor into an insert symbol, >> > similar to 'I'. ?There is no mouse capability on the symbol >> > in IE. >> > >> > Other vector layers with drawn polygons work fine in IE, and >> > pop-ups occur as normal. >> > >> > Is there a way to fix this so mouse-enabled pop-ups appear >> > when using png images in IE? >> >> >> Hi >> >> Are you using Control.SelectFeature? > > Yes. I modified the select-feature-openpopup.html so points with external graphics can be drawn and selected (see attached patch). The example works as expected in IE8. Can you modify the example yourself and reproduce 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: select-feature-openpopup.patch Type: text/x-patch Size: 1829 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091102/f1dbb9ff/select-feature-openpopup.bin From eric.lemoine at camptocamp.com Mon Nov 2 04:22:40 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Mouse Drag Coordinates In-Reply-To: <1256905657593-3918595.post@n2.nabble.com> References: <1256865794203-3916580.post@n2.nabble.com> <1256905657593-3918595.post@n2.nabble.com> Message-ID: On Fri, Oct 30, 2009 at 1:27 PM, Dave Thomas wrote: > > > > Eric Lemoine-2-2 wrote: >> >> implementing a specific control based on a Drag handler is what I'd go >> with. You can look at the DragPan control to know how to use the Drag >> handler - I tend to think that you could rely on the "move" and "done" >> callbacks only. Now regarding the conflict with the Navigation >> control: have you tried making sure your control is activated *before* >> the Navigation control? >> > > Thanks for the response Eric. Based on your suggestion we'll go with the > Drag handler method. > I actually deactivate the navigation on initialisation and only activate at > run time when a button is clicked. > > To be sure though, I removed it from the controls property object that was > being passed to the Map constructor via options and constructed it the same > was as the drag handler so I had this... > > ?var drag = new OpenLayers.Control.Drag(); > ? map.addControl(drag); > ? drag.activate(); > > ? var nav = new OpenLayers.Control.Navigation(); > ? map.addControl(nav); > ? nav.deactivate(); what if you activate your drag control *after* you activate the navigation control? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Mon Nov 2 05:05:02 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] WFS filter send using POST ? In-Reply-To: <1256063985508-3860477.post@n2.nabble.com> References: <1256063985508-3860477.post@n2.nabble.com> Message-ID: On Tue, Oct 20, 2009 at 7:39 PM, Pere Roca Ristol wrote: > > > ?hi, > > ?can I send this simple WFS filter via POST? (I want to add multiple > parameters in the filter and I'm afraid ? GET requests will not allow this > URL length). Where should it be specified? > > ?wfs = new OpenLayers.Layer.WFS( "myWFS", > "http://my_geoserver/wfs",{typename:"topp:layer",filter:my_filter}); use Layer.Vector with a Protocol.WFS, and the WFS GetFeature requests will be sent using POST. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Mon Nov 2 05:06:43 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] triggering the save-event is not working In-Reply-To: <1256046709702-3858752.post@n2.nabble.com> References: <1254741848525-3768194.post@n2.nabble.com> <1256046709702-3858752.post@n2.nabble.com> Message-ID: On Tue, Oct 20, 2009 at 2:51 PM, Marco Scheuble wrote: > > Hi Eric, > > thanks for your answer. > I don't use the trunk version of OL! Why? > Will there be savestrategy-events in upcoming versions? yes, it's in trunk. PS: sorry for the delayed response, I'm currently catching up with unread messages on the list. -- 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 bhimannah at gmail.com Mon Nov 2 05:19:40 2009 From: bhimannah at gmail.com (Bhimanna Halburgi) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] WFS filter send using POST ? In-Reply-To: References: <1256063985508-3860477.post@n2.nabble.com> Message-ID: <6d70748f0911020219y6f0f0df5w474b0070d973847e@mail.gmail.com> Hi, I want add a hyperlink in the map object (in some cases return by the server). Please how can I implement this one. Thanks Bhimanna On Mon, Nov 2, 2009 at 1:05 PM, Eric Lemoine wrote: > On Tue, Oct 20, 2009 at 7:39 PM, Pere Roca Ristol > wrote: > > > > > > hi, > > > > can I send this simple WFS filter via POST? (I want to add multiple > > parameters in the filter and I'm afraid GET requests will not allow > this > > URL length). Where should it be specified? > > > > wfs = new OpenLayers.Layer.WFS( "myWFS", > > "http://my_geoserver/wfs",{typename:"topp:layer",filter:my_filter}); > > use Layer.Vector with a Protocol.WFS, and the WFS GetFeature requests > will be sent using POST. > > > -- > 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/20091102/45b5b77a/attachment.html From ahocevar at opengeo.org Mon Nov 2 06:23:04 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] WFS OpenLayers.ProxyHost Tomcat 5.5 In-Reply-To: <1257149383506-3930399.post@n2.nabble.com> References: <1257149383506-3930399.post@n2.nabble.com> Message-ID: <4AEEC118.30506@opengeo.org> Hi, you could use the Proxy extension for GeoServer 2.0. For instructions and download link, go to http://geoserver.org/display/GEOS/GeoServer+Proxy+Extension. Regards, Andreas. stash wrote: > Hello, > I want so show my map with a OpenLayers.Layer.WFS. Therefore I did the same > as in the openlayers examples to show data with a WFS. But in my case, it > doesn't work. > > After some reading in the internet i found out, that I have to configure a > OpenLayers.ProxyHost to show the data with a WFS. > > In the examples I always found this type of code: > OpenLayers.ProxyHost="/proxy/?url="; > > What does that mean? Furthermore I found out, that I have to configure more, > when I use Tomcat. > > In my case I use a Server with Tomcat 5.5 installed and Geoserver to connect > to WFS > > http://IP:PORT/geoserver/wfs > > What do I have to configure that I can show my data on Map over WFS. > > (Sorry for my english, it is not the best) > > Regards > stash > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From rahn at zhaw.ch Mon Nov 2 06:43:51 2009 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Problem with LayerSwitcher Message-ID: <3F643797A078EB4FB028800809680984019B7A69@langouste.zhaw.ch> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 13448 bytes Desc: image001.jpg Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091102/14938b56/attachment.jpe From sajeertk15 at gmail.com Mon Nov 2 07:07:35 2009 From: sajeertk15 at gmail.com (Sajeer...) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Openlayers Support for WPS Message-ID: <43c3d3020911020407y6d516fc5nb08f807d7f4eea26@mail.gmail.com> Hi, Is Openlayers supporting WPS requests?. Regards Sajeer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091102/854c3c53/attachment.html From bartvde at osgis.nl Mon Nov 2 07:14:46 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Openlayers Support for WPS In-Reply-To: <43c3d3020911020407y6d516fc5nb08f807d7f4eea26@mail.gmail.com> References: <43c3d3020911020407y6d516fc5nb08f807d7f4eea26@mail.gmail.com> Message-ID: <31819.145.50.39.11.1257164086.squirrel@webmail.hostingdiscounter.nl> No, not at this time. Patches/contributions welcome ofcourse. Best regards, Bart > Hi, > > Is Openlayers supporting WPS requests?. > > > > > Regards > > Sajeer > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From lorenzetti at gis3w.it Mon Nov 2 09:27:27 2009 From: lorenzetti at gis3w.it (lorenzetti@gis3w.it) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] wms redraw layer Message-ID: <4aeeec4f.7a.3141.2071511424@webmaildh3.aruba.it> Hi list, I found a problem with my 2.8 OL.... I've to redraw a wms layer, I try with wmsl_layer.redraw() method but nothing happen.. Do I some mistakes? Is there another methods? Thanks in advance Walter Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021 Viale Giuseppe Verdi n. 24, 51016 Montecatini Terme,Pistoia P.IVA 01686280478 Italy From st.sonstiges at web.de Mon Nov 2 09:30:57 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results Message-ID: <1257172257358-3932043.post@n2.nabble.com> hello, I have the following code, which shows me featureinfo of a map: map.events.register('click', map, function(e) { var url = "http://...:8080/geoserver/wms" + "?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=topp_mylayer" + "&LAYERS=topp:topp_mylayer" + "&FEATURE_COUNT=50" + "&SRS=EPSG:4326" + "&STYLES=" + "&WIDTH=" + map.size.w + "&HEIGHT=" + map.size.h; window.open(url, "getfeatureinfo", "location=0,status=0,scrollbars=1,width=800,height=400"); This is working fine so far. But there is one thing I dont like. With this code I get every feature of the clicked entry on the map (every entry in my database like id, name, date, coordinates...). Is it possible, that I only get back a certain value like only the name of the clicked entry or only the coordinates? Furthermore is it possible, that i can store the getfeatureinfo request in a variable? Thanks for your help. Regards stash -- View this message in context: http://n2.nabble.com/split-WMS-GetFeatureInfo-results-tp3932043p3932043.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Mon Nov 2 09:41:51 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] wms redraw layer In-Reply-To: <4aeeec4f.7a.3141.2071511424@webmaildh3.aruba.it> References: <4aeeec4f.7a.3141.2071511424@webmaildh3.aruba.it> Message-ID: <4AEEEFAF.7000204@mapgears.com> Hi, Try wmsl_layer.redraw(true) to force your layer to be redrawn. Alexandre lorenzetti@gis3w.it wrote: > Hi list, > > I found a problem with my 2.8 OL.... > I've to redraw a wms layer, I try with wmsl_layer.redraw() > method but nothing happen.. > > Do I some mistakes? > Is there another methods? > > Thanks in advance > Walter > > Walter Lorenzetti > email: lorenzetti@gis3w.it > skype: aiki74 > Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021 > Viale Giuseppe Verdi n. 24, 51016 > Montecatini Terme,Pistoia > P.IVA 01686280478 > Italy > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From kobben at itc.nl Mon Nov 2 10:44:56 2009 From: kobben at itc.nl (=?iso-8859-1?Q?Barend_K=F6bben?=) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results In-Reply-To: <1257172257358-3932043.post@n2.nabble.com> Message-ID: That's probably more a question to ask the underlying WMS (in your case geoserver?) ; Eg. I know that when using Mapserver as a WMS, I would change the &INFO_FORMAT=text/plain To &INFO_FORMAT=text/html And then make sure I have HTML templates that provide only the attributes I want, layed out and styled like I want... -- Barend K?bben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede, The Netherlands +31 (0)53 4874253 On 02-11-09 15:30, "stash" wrote: > > > hello, > > I have the following code, which shows me featureinfo of a map: > > map.events.register('click', map, function(e) { > var url = "http://...:8080/geoserver/wms" + "?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=topp_mylayer" > + "&LAYERS=topp:topp_mylayer" > + "&FEATURE_COUNT=50" > + "&SRS=EPSG:4326" > + "&STYLES=" > + "&WIDTH=" + map.size.w > + "&HEIGHT=" + map.size.h; > > window.open(url, "getfeatureinfo", > "location=0,status=0,scrollbars=1,width=800,height=400"); > > This is working fine so far. But there is one thing I dont like. With this > code I get every feature of the clicked entry on the map (every entry in my > database like id, name, date, coordinates...). > > Is it possible, that I only get back a certain value like only the name of > the clicked entry or only the coordinates? > > Furthermore is it possible, that i can store the getfeatureinfo request in a > variable? > > Thanks for your help. > > Regards > stash > > -- > View this message in context: > http://n2.nabble.com/split-WMS-GetFeatureInfo-results-tp3932043p3932043.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. From lorenzetti at gis3w.it Mon Nov 2 11:40:28 2009 From: lorenzetti at gis3w.it (lorenzetti@gis3w.it) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] wms redraw layer Message-ID: <4aef0b7c.2c.29e5.477588753@webmaildh1.aruba.it> Works fine :) thanks a lot W ----- Original Message ----- Da : Alexandre Dube A : "lorenzetti@gis3w.it" Cc: users@openlayers.org Oggetto : Re: [OpenLayers-Users] wms redraw layer Data : Mon, 02 Nov 2009 09:41:51 -0500 > Hi, > > Try wmsl_layer.redraw(true) to force your layer to be > redrawn. > > Alexandre > > lorenzetti@gis3w.it wrote: > > Hi list, > > > > I found a problem with my 2.8 OL.... > > I've to redraw a wms layer, I try with > > wmsl_layer.redraw() method but nothing happen.. > > > > Do I some mistakes? > > Is there another methods? > > > > Thanks in advance > > Walter > > > > Walter Lorenzetti > > email: lorenzetti@gis3w.it > > skype: aiki74 > > Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021 > > Viale Giuseppe Verdi n. 24, 51016 > > Montecatini Terme,Pistoia > > P.IVA 01686280478 > > Italy > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub?? > Mapgears > www.mapgears.com > Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021 Viale Giuseppe Verdi n. 24, 51016 Montecatini Terme,Pistoia P.IVA 01686280478 Italy From adrian_gh.popa at romtelecom.ro Mon Nov 2 11:59:04 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Highlighting changes in the KML layer Message-ID: <4AEF0FD8.5060100@romtelecom.ro> Hello everyone, Sorry if this has already been discussed on the list (didn't really check), but I would like to know if there is a solution (or at least a plan to implement a feature) that "somehow" highlights (visually) the elements that have been loaded through KML - in contrast to the elements displayed previously. I am working at a view that displays alarms on top of the map, and if there is a large number of alarms, one more alarm coming every 2 minutes will not catch the attention of the operator... I need a mechanism to somehow color/animate symbols loaded through KML which were not previously on the map. Symbols which dissapear between layer refreshes are not important to me. At the next refresh cycle, the highlighted symbols would no longer be highlighted (because they already exist on the map). I have a way to load KMLs periodically, avoiding the cache, but I'm missing the "highlight" mechanism. Hope I have presented my request in an understandable manner, and hope there is a solution. Maybe a property on the KML layer indicating if an item is new or not... Regards, Adrian From emmexx at tiscalinet.it Mon Nov 2 12:56:28 2009 From: emmexx at tiscalinet.it (emmexx) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] gml lines in IExplorer In-Reply-To: <4AE097A0.9070100@tiscalinet.it> References: <4AE097A0.9070100@tiscalinet.it> Message-ID: <4AEF1D4C.5090905@tiscalinet.it> Il 22/10/2009 19:34, emmexx scrisse: > y=inobj.read(URLDecode(phptrack[key].Segment.gpstrack)); > vlayer.addFeatures(y); Fyi, the problem is in that URLDecode function, non in openlayers. bye maxx From joost at shaw.ca Mon Nov 2 14:39:18 2009 From: joost at shaw.ca (jvanulden) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Tween Example Message-ID: <1257190758238-3934163.post@n2.nabble.com> Does someone have an example of how to use tween??? Thank you in advance! -- View this message in context: http://n2.nabble.com/Tween-Example-tp3934163p3934163.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Tue Nov 3 01:28:33 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Tween Example In-Reply-To: <1257190758238-3934163.post@n2.nabble.com> References: <1257190758238-3934163.post@n2.nabble.com> Message-ID: On Monday, November 2, 2009, jvanulden wrote: > > Does someone have an example of how to use tween??? Thank you in advance! there's a manual test in the OpenLayers code base that you may find useful: tests/manual/tween.html 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 helmi03 at gmail.com Tue Nov 3 03:11:59 2009 From: helmi03 at gmail.com (helmi) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Highlighting changes in the KML layer In-Reply-To: <4AEF0FD8.5060100@romtelecom.ro> References: <4AEF0FD8.5060100@romtelecom.ro> Message-ID: <7f615c9f0911030011m26b65d5bjbc8393f1d5c5186d@mail.gmail.com> The idea from http://trac.openlayers.org/ticket/1259 {{{ You could create a selectStyle that could be passed to Control.SelectFeature quite easily: create a style object, read the "highlight" styles, create a FidFilter rule for every feature (or groups of features with the same style), use the according "highlight" style as symbolizer for the rule, and add the rule to the style object }}} helmi03.com On Tue, Nov 3, 2009 at 12:59 AM, Adrian Popa wrote: > Hello everyone, > > Sorry if this has already been discussed on the list (didn't really > check), but I would like to know if there is a solution (or at least a > plan to implement a feature) that "somehow" highlights (visually) the > elements that have been loaded through KML - in contrast to the > elements displayed previously. > > I am working at a view that displays alarms on top of the map, and if > there is a large number of alarms, one more alarm coming every 2 minutes > will not catch the attention of the operator... > > I need a mechanism to somehow color/animate symbols loaded through KML > which were not previously on the map. Symbols which dissapear between > layer refreshes are not important to me. At the next refresh cycle, the > highlighted symbols would no longer be highlighted (because they already > exist on the map). > > I have a way to load KMLs periodically, avoiding the cache, but I'm > missing the "highlight" mechanism. > > Hope I have presented my request in an understandable manner, and hope > there is a solution. Maybe a property on the KML layer indicating if an > item is new or not... > > Regards, > Adrian > > _______________________________________________ > 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/20091103/93ae5be3/attachment.html From tommaso.lavoro at gmail.com Tue Nov 3 06:08:07 2009 From: tommaso.lavoro at gmail.com (totom) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Trouble after upgrading to Geoserver 2.0 Message-ID: <1257246487828-3937791.post@n2.nabble.com> Hi evrybody, I have some problems after upgrading form Geoserver 1.7.3 to 2.0 I have a vector layer (i'm using vectro instead wfs to use custom filters instead of BBOX) so defined: var fixedStrategy = new OpenLayers.Strategy.Fixed(); poly = new OpenLayers.Layer.Vector ( 'Pippo', { strategies: [fixedStrategy,saveStrategy ], projection: new OpenLayers.Projection("EPSG:4326"), styleMap: stylemm, outputFormat:'json', protocol: new OpenLayers.Protocol.WFS.v1_1_0( { version: '1.1.0', srsName: 'EPSG:4326', url: 'http://$151.100.152.220/geoserver2/wfs', featureType: 'urbis_dev:data_crash_feature', geometryName: 'the_geom', extractAttribute: true }), getFeatureByFid: function(fid) { var layer = this; if (!layer) return null; var features = layer.features; if (!features)return null; for (var i = 0; i < features.length; ++i) if (features[i].fid == fid) return features[i]; return null; } } ); map.addLayer(poly); It used to work, but after upgrading Openlayers seems to not parse the geoserver response. The server will response with correct xml (i think gml3...possible?), but if I make poly.features.length, it will return 0 instead of 3 (i have 3 features) Has anybody any ideas? maybe I have to specify the format of the response? In case, where? Thanks in advance... ps: there is a $ in the url because the request is proxied by a script that replace it with the user credential for geoserver autentication.... -- View this message in context: http://n2.nabble.com/Trouble-after-upgrading-to-Geoserver-2-0-tp3937791p3937791.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adrian_gh.popa at romtelecom.ro Tue Nov 3 06:26:12 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Highlighting changes in the KML layer In-Reply-To: <7f615c9f0911030011m26b65d5bjbc8393f1d5c5186d@mail.gmail.com> References: <4AEF0FD8.5060100@romtelecom.ro> <7f615c9f0911030011m26b65d5bjbc8393f1d5c5186d@mail.gmail.com> Message-ID: <4AF01354.8080406@romtelecom.ro> Thank you for the hint. I suppose I shouldn't expect to see a working demo of what I need :) Do you know if the patches presented in ticket 1259 are already part of openlayers (since the latest version is from january last year?) Thanks, helmi wrote: > The idea from http://trac.openlayers.org/ticket/1259 > {{{ > You could create a selectStyle that could be passed to > Control.SelectFeature quite easily: create a style object, read the > "highlight" styles, create a FidFilter rule for every feature (or > groups of features with the same style), use the according "highlight" > style as symbolizer for the rule, and add the rule to the style object > }}} > > helmi03.com > > On Tue, Nov 3, 2009 at 12:59 AM, Adrian Popa > > > wrote: > > Hello everyone, > > Sorry if this has already been discussed on the list (didn't really > check), but I would like to know if there is a solution (or at least a > plan to implement a feature) that ?"somehow" highlights (visually) the > elements that have been loaded ?through KML - in contrast to the > elements displayed previously. > > I am working at a view that displays alarms on top of the map, and if > there is a large number of alarms, one more alarm coming every 2 > minutes > will not catch the attention of the operator... > > I need a mechanism to somehow color/animate symbols loaded through KML > which were not previously on the map. Symbols which dissapear between > layer refreshes are not important to me. At the next refresh > cycle, the > highlighted symbols would no longer be highlighted (because they > already > exist on the map). > > I have a way to load KMLs periodically, avoiding the cache, but I'm > missing the "highlight" mechanism. > > Hope I have presented my request in an understandable manner, and hope > there is a solution. Maybe a property on the KML layer indicating > if an > item is new or not... > > Regards, > Adrian > > _______________________________________________ > 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/20091103/144fe7a2/attachment.html From dalda at ikt.es Tue Nov 3 09:25:27 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Problems adding polygon data from GML Message-ID: <224DBDAF88A6AC47BD22432815351BE007877F40@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/20091103/8d51ee53/attachment.gif From nolasco_gabriel at yahoo.com.br Tue Nov 3 11:22:54 2009 From: nolasco_gabriel at yahoo.com.br (Gabriel Nolasco) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Problems adding polygon data from GML In-Reply-To: Message-ID: <623103.45713.qm@web37105.mail.mud.yahoo.com> Hello David! The problem is that your get feature output format is gml 3.1.1, so you will have to parse the response with OpenLayers.Format.GML.v3. To instantiate this class correctly you must specify the feature typeName (without prefix) and the feature namespace, something like: var format = new OpenLayers.Format.GML.v3({ featureType: "RecintosSigpac", featureNS: "http://mapserver.gis.umn.edu/mapserver" }); Best regards, Gabriel Nolasco > ------------------------------ > > Message: 7 > Date: Tue, 3 Nov 2009 15:25:27 +0100 > From: "David Alda Fernandez de Lezea" > Subject: [OpenLayers-Users] Problems adding polygon data > from GML > To: > Message-ID: > <224DBDAF88A6AC47BD22432815351BE007877F40@nekaposta1> > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I'm having some issues trying to add a feature to a vector > layer from an WFS response. I think that my response it's > well formed but I'm not sure. This is what I get from my WFS > server: > > > > ???xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > ???xmlns:gml="http://www.opengis.net/gml" > ???xmlns:wfs="http://www.opengis.net/wfs" > ???xmlns:ogc="http://www.opengis.net/ogc" > ???xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > ???xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=RecintosSigpac&OUTPUTFORMAT=text/xml; > subtype=gml/3.1.1? http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> > ? ? ? > ? ? ??? srsName="EPSG:23030"> > ? ? ? ? > 526447.763986 > 4758100.330520 > ? ? ? ? > 526591.710676 > 4758280.966702 > ? ? ??? > ? ? ? > ? ? > ? ? ? gml:id="RecintosSigpac.193303"> > ? ? ? ? > ? ? ? ??? srsName="EPSG:23030"> > ? ? ? ? ? > 526447.763986 > 4758100.330520 > ? ? ? ? ? > 526591.710676 > 4758280.966702 > ? ? ? > ??? > ? ? ? ? > ? ? ? ? > ? ? ? ? ? srsName="EPSG:23030"> > ? ? ? ? ? ? > > ? ? ? ? ? ? ? > > ? ? ? ? ? ? ? ? > 526484.432428 > 4758280.966702 526480.100971 4758268.076507 526475.463251 > 4758253.072136 526468.535947 4758229.169445 526447.763986 > 4758186.689696 526453.315125 4758154.550751 526455.754887 > 4758140.485935 526495.766666 4758112.547879 526500.834389 > 4758115.350669 526504.219488 4758116.685545 526506.649401 > 4758117.569927 526507.626820 4758117.573707 526510.130663 > 4758117.015581 526514.410883 4758114.891216 526521.314254 > 4758109.640088 526528.210404 4758104.491330 526533.302118 > 4758101.094873 526535.430830 4758100.330520 526540.534776 > 4758102.602904 526577.633954 4758119.082826 526591.710676 > 4758125.346099 526585.498394 4758151.543640 526579.035838 > 4758178.838603 526575.798470 4758190.535962 526564.481114 > 4758273.001370 526551.499563 4758266.407290 526537.298512 > 4758271.136785 526530.463481 4758272.897528 526516.551118 > 4758275.450028 526496.415011 4758279.002411 526484.432428 > 4758280.966702 > ? ? ? ? ? ? ? > > ? ? ? ? ? ? > > ? ? ? ? ? > ? ? ? ? > ? ? ? > ? ? > > > And I'm adding the feature by this way: > > var features = new > OpenLayers.Format.GML().read(response.responseText); > hilites.destroyFeatures(); > hilites.addFeatures(features); > hilites.setVisibility(true); > > where hilites is a Vector Layer. > > I'll show you too my GetFeature url: > > http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=RecintosSigpac&FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3EGID%3C/PropertyName%3E%3CLiteral%3E193303%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E > > Can someone help me, please? > > Thanks. > > > > Un saludo, > > > > ?????????????????????????????????????????????????????????????????????????????????? > > > David Alda Fern?ndez de Lezea > > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y > Biodiversidad > > > > IKT > > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95? ? ? ? ? > ? ? ? ? ? ? > ???Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es? > ? ? ? ? ? ? ? ? > ? ? ? ? ? ? ? web: > www.ikt.es > ?????????????????????????????????????????????????????????????????????????????????? ____________________________________________________________________________________ Veja quais s?o os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com From joost at shaw.ca Tue Nov 3 11:54:36 2009 From: joost at shaw.ca (Fubarred) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Tween Example In-Reply-To: References: <1257190758238-3934163.post@n2.nabble.com> Message-ID: <1257267276172-3939717.post@n2.nabble.com> Thanks Eric, I don't think that Tween is going to provide me with what I need. Perhaps you can guide me in the right direction. Basically, I was the same smooth transition that comes with panTo for zoomToExtent. Is there an easy way to do this? Also, is there a way to fade tiles in as opposed just having them pop up unexpectedly? Thank you in advance! Eric Lemoine-2-2 wrote: > > On Monday, November 2, 2009, jvanulden wrote: >> >> Does someone have an example of how to use tween??? Thank you in advance! > > > there's a manual test in the OpenLayers code base that you may find > useful: tests/manual/tween.html > > 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 > > -- View this message in context: http://n2.nabble.com/Tween-Example-tp3934163p3939717.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Tue Nov 3 12:49:36 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Tween Example In-Reply-To: <1257267276172-3939717.post@n2.nabble.com> References: <1257190758238-3934163.post@n2.nabble.com> <1257267276172-3939717.post@n2.nabble.com> Message-ID: On Tuesday, November 3, 2009, Fubarred wrote: > > Thanks Eric, > > I don't think that Tween is going to provide me with what I need. Perhaps > you can guide me in the right direction. Basically, I was the same smooth > transition that comes with panTo for zoomToExtent. Is there an easy way to > do this? panTo and pan just move the map without changing the zoom level. zoomToExtent can potentially change the zoom level, and, to my knowledge, OpenLayers provides no tween-type transition for that case. > Also, is there a way to fade tiles in as opposed just having them pop up > unexpectedly? I'm not sure this is fade in but have you looked at the transitionEffect layer option? See the transition.html example. 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 Tue Nov 3 15:45:34 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Problem with LayerSwitcher In-Reply-To: <3F643797A078EB4FB028800809680984019B7A69@langouste.zhaw.ch> References: <3F643797A078EB4FB028800809680984019B7A69@langouste.zhaw.ch> Message-ID: On Mon, Nov 2, 2009 at 12:43 PM, Rahn Hanno (rahn) wrote: > > Hello, > > > > I change the line in my LayerSwitcher.js, like the patch. Then I use the LayerSwitcher in my second map again. But it doesn't work. > > > > The first LayerSwitcher works fine but the second only shows my Layers (also the Layers I don't want to show with the displayInLayerSwitcher=false function). > > > > Have I made something wrong? > > > > > > The Layers Highlight and Seen2 should not be shown in the LayerSwitcher. For this I used ?displayInLayerSwitcher = false?. > > The Rest of the Layers where shown, but I can?t swicth the visbility. I can?t activate the Gemeinden2 radio button. > > > > Perhaps somebody has another idea and can help me. > > > > Greetings and a lot of thanks. Hi it'd be great if you could provide a small, stripped-down, example demonstrating the problem. 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 brad at cubewerx.com.au Wed Nov 4 00:45:54 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Point in polygon Message-ID: <001501ca5d12$1428e7a0$3c7ab6e0$@com.au> Guys, I have created a vector polygon as follows: var parcel01 = new OpenLayers.Geometry.LinearRing(pointList); polygonFeature = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Polygon([parcel01])); vectorLayer.addFeatures([polygonFeature]); I then am parsing a list of external points to include only those that are inside the polygon on the map as vector markers. I have tried the following with no success: If (polygonFeature.intersects(new OpenLayers.Geometry.Point(p[0], p[1]))) {// include code.} and If (polygonFeature.containsPoint(new OpenLayers.Geometry.Point(p[0], p[1]))) {// include code.} Where p[0] = x-coords in Sphericalmercator And p[1] = y-coord in SphericalMercator. The error returned is polygonFeature.intersects is not a function. I can verify that the polygon is being created. Is there something I am missing here? I am using OL version 2.8. Does anyone have a simple example of point-in-polygon working? Cheers, Brad Spencer General Manager NuMaps tel: 02 9481 7024 mob: 0404 841 131 www.numaps.com.au brad@numaps.com.au -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091104/7e352c7f/attachment.html From helmi03 at gmail.com Wed Nov 4 01:55:53 2009 From: helmi03 at gmail.com (helmi) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Point in polygon In-Reply-To: <001501ca5d12$1428e7a0$3c7ab6e0$@com.au> References: <001501ca5d12$1428e7a0$3c7ab6e0$@com.au> Message-ID: <7f615c9f0911032255r60e4e680j60fb960e3570c5dc@mail.gmail.com> >>The error returned is *polygonFeature.intersects* is not a function have you tried polygonFeature.geometry.intersects() instead? On Wed, Nov 4, 2009 at 1:45 PM, Brad Spencer wrote: > Guys, I have created a vector polygon as follows: > > > > var parcel01 = new OpenLayers.Geometry.LinearRing(pointList); > > polygonFeature = new OpenLayers.Feature.Vector( new > OpenLayers.Geometry.Polygon([parcel01])); > > vectorLayer.addFeatures([polygonFeature]); > > > > I then am parsing a list of external points to include only those that are > inside the polygon on the map as vector markers. > > > > I have tried the following with no success: > > > > If (polygonFeature.intersects(new OpenLayers.Geometry.Point(p[0], p[1]))) > {// include code?} > > and > > If (polygonFeature.containsPoint(new OpenLayers.Geometry.Point(p[0], > p[1]))) {// include code?} > > > > Where p[0] = x-coords in Sphericalmercator > > And p[1] = y-coord in SphericalMercator. > > > > The error returned is *polygonFeature.intersects* is not a function. I can > verify that the polygon is being created. > > > > Is there something I am missing here? I am using OL version 2.8. > > > > Does anyone have a simple example of point-in-polygon working? > > > > Cheers, > > > > > > *Brad Spencer* > > General Manager > > NuMaps > > tel: 02 9481 7024 > > mob: 0404 841 131 > > www.numaps.com.au > > brad@numaps.com.au > > > > > > _______________________________________________ > 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/20091104/8f04c406/attachment.html From eric.lemoine at camptocamp.com Wed Nov 4 01:57:28 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Point in polygon In-Reply-To: <001501ca5d12$1428e7a0$3c7ab6e0$@com.au> References: <001501ca5d12$1428e7a0$3c7ab6e0$@com.au> Message-ID: On Wednesday, November 4, 2009, Brad Spencer wrote: > > > > > > > > > > > > > > Guys, I have created a vector polygon as follows: > > > > var parcel01 = new > OpenLayers.Geometry.LinearRing(pointList); > > polygonFeature = new OpenLayers.Feature.Vector( new > OpenLayers.Geometry.Polygon([parcel01])); > > vectorLayer.addFeatures([polygonFeature]); > > > > I then am parsing a list of external points to include only > those that are inside the polygon on the map as vector markers. > > > > I have tried the following with no success: > > > > If (polygonFeature.intersects(new > OpenLayers.Geometry.Point(p[0], p[1]))) {// include code?} and polygonFeature.geometry.intersects()? 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 dalda at ikt.es Wed Nov 4 02:24:05 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Problems adding polygon data from GML Message-ID: <224DBDAF88A6AC47BD22432815351BE00787806A@nekaposta1> Hello, Thank you very much, that piece of code helped me a lot. But I've got a question for you. This 'fucntionallity' worked very well 2 weeks ago, but this week I reviewed it and I realized that it didn't work properly, suddenly the geometries were not selected, and 2 weeks ago they were selected.So I might have made some changes in my WFS server configuration because it worked and now I've had to add this piece of code. My WFS server is defined like this: MAP NAME "wfs_server" STATUS ON EXTENT 460000 4710000 610000 4820000 # Euskadi PROJECTION "init=epsg:23030" END SHAPEPATH "shapes/" FONTSET "misc/fonts/fonts.txt" SYMBOLSET "misc/symbols/symbols.sym" IMAGETYPE "image/png; mode=24bit" IMAGECOLOR 255 255 255 UNITS METERS DEBUG ON CONFIG "MS_ERRORFILE" "C:/ms4w/Apache/htdocs/MFD/tmp/ms_wfs.log" WEB IMAGEPATH "MFD/tmp/" IMAGEURL "tmp/" METADATA "wfs_title" "IKT WFS Server" ## REQUIRED "wfs_abstract" "Servicio de mapas WFS de IKT Nekazal Teknologia. Powered by Apache and UMN MapServer" ## REQUIRED "wfs_onlineresource" "http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&" ## Recommended "wfs_srs" "EPSG:23030" ## Recommended "wfs_keywordlist" "IKT,Euskadi,Mapas Euskadi" "wfs_fees" "none" "wfs_accessconstraints" "Ninguna" "ows_contactorganization" "http://www.ikt.es" "wfs_geometry_element_name" "MS_GEOMETRY" END END LAYER NAME "RecintosSigpac" PROJECTION "init=epsg:23030" END METADATA "wfs_title" "Recintos Sigpac 2009" ## REQUIRED "wfs_abstract" "Recintos" "wfs_name" "Recintos" "wfs_geometry_element_name" "MS_GEOMETRY" "wfs_request_method" "GET" "wfs_srs" "EPSG:23030" ## Recommended "wfs_extent" "460000 4710000 610000 4820000" "gml_featureid" "gid" ## REQUIRED "gml_exclude_items" "all" END TYPE POLYGON CONNECTIONTYPE oraclespatial CONNECTION "admcarto/admcarto@ORA10GDE" DATA "GEOMETRY FROM (SELECT * FROM GT_SIGPAC_RECINTOS) USING UNIQUE gid SRID 82337" #todo el sigpac DUMP TRUE ## REQUIRED CLASS NAME "Municipios_Gipuzkoa" STYLE OUTLINECOLOR 255 255 255 END TEMPLATE "ttt_query.html" END STATUS ON END # Layer LAYER NAME "municipios" PROJECTION "init=epsg:23030" END METADATA "wfs_title" "Municipios 96" ## REQUIRED "wfs_abstract" "municipios" "wfs_name" "municipios" "wfs_geometry_element_name" "MS_GEOMETRY" "wfs_srs" "EPSG:23030" ## Recommended "wfs_extent" "460000 4710000 610000 4820000" "gml_featureid" "gid" ## REQUIRED "gml_exclude_items" "all" END TYPE POLYGON CONNECTIONTYPE oraclespatial CONNECTION "admcarto/admcarto@ORA10GDE" DATA "GEOMETRY FROM (SELECT * FROM GT_MUNICIPIOS_96) USING UNIQUE gid SRID 82337" #todo el sigpac DUMP TRUE ## REQUIRED CLASS NAME "Municipios_Gipuzkoa" STYLE OUTLINECOLOR 255 255 255 END TEMPLATE "ttt_query.html" END STATUS ON END # Layer END # Map File Is there anything here that makes you know that the response of the WFS Service is in GML v3? How can you specify it in the map file? The getFeature request I use is this: http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&MAXFEATURES=1000&EXCEPTIONS=application/vnd.ogc.se_xml&TYPENAME=RecintosSigpac&FILTER=GID125 Thanks again. 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 ?????????????????????????????????????????????????????????????????????????????????? -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Gabriel Nolasco Enviado el: martes, 03 de noviembre de 2009 17:23 Para: users@openlayers.org Asunto: Re: [OpenLayers-Users] Problems adding polygon data from GML Hello David! The problem is that your get feature output format is gml 3.1.1, so you will have to parse the response with OpenLayers.Format.GML.v3. To instantiate this class correctly you must specify the feature typeName (without prefix) and the feature namespace, something like: var format = new OpenLayers.Format.GML.v3({ featureType: "RecintosSigpac", featureNS: "http://mapserver.gis.umn.edu/mapserver" }); Best regards, Gabriel Nolasco > ------------------------------ > > Message: 7 > Date: Tue, 3 Nov 2009 15:25:27 +0100 > From: "David Alda Fernandez de Lezea" > Subject: [OpenLayers-Users] Problems adding polygon data from GML > To: > Message-ID: > <224DBDAF88A6AC47BD22432815351BE007877F40@nekaposta1> > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > I'm having some issues trying to add a feature to a vector layer from > an WFS response. I think that my response it's well formed but I'm not > sure. This is what I get from my WFS > server: > > > ???xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > ???xmlns:gml="http://www.opengis.net/gml" > ???xmlns:wfs="http://www.opengis.net/wfs" > ???xmlns:ogc="http://www.opengis.net/ogc" > ???xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > ???xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver > http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs. > map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=Rec > intosSigpac&OUTPUTFORMAT=text/xml; > subtype=gml/3.1.1? http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> > ? ? ? > ? ? ??? srsName="EPSG:23030"> > ? ? ? ? > 526447.763986 > 4758100.330520 > ? ? ? ? > 526591.710676 > 4758280.966702 > ? ? ??? > ? ? ? > ? ? > ? ? ? gml:id="RecintosSigpac.193303"> > ? ? ? ? > ? ? ? ??? srsName="EPSG:23030"> > ? ? ? ? ? > 526447.763986 > 4758100.330520 > ? ? ? ? ? > 526591.710676 > 4758280.966702 > ? ? ? > ??? > ? ? ? ? > ? ? ? ? > ? ? ? ? ? srsName="EPSG:23030"> > ? ? ? ? ? ? > > ? ? ? ? ? ? ? > > ? ? ? ? ? ? ? ? > 526484.432428 > 4758280.966702 526480.100971 4758268.076507 526475.463251 > 4758253.072136 526468.535947 4758229.169445 526447.763986 > 4758186.689696 526453.315125 4758154.550751 526455.754887 > 4758140.485935 526495.766666 4758112.547879 526500.834389 > 4758115.350669 526504.219488 4758116.685545 526506.649401 > 4758117.569927 526507.626820 4758117.573707 526510.130663 > 4758117.015581 526514.410883 4758114.891216 526521.314254 > 4758109.640088 526528.210404 4758104.491330 526533.302118 > 4758101.094873 526535.430830 4758100.330520 526540.534776 > 4758102.602904 526577.633954 4758119.082826 526591.710676 > 4758125.346099 526585.498394 4758151.543640 526579.035838 > 4758178.838603 526575.798470 4758190.535962 526564.481114 > 4758273.001370 526551.499563 4758266.407290 526537.298512 > 4758271.136785 526530.463481 4758272.897528 526516.551118 > 4758275.450028 526496.415011 4758279.002411 526484.432428 > 4758280.966702 > ? ? ? ? ? ? ? > > ? ? ? ? ? ? > > ? ? ? ? ? > ? ? ? ? > ? ? ? > ? ? > > > And I'm adding the feature by this way: > > var features = new > OpenLayers.Format.GML().read(response.responseText); > hilites.destroyFeatures(); > hilites.addFeatures(features); > hilites.setVisibility(true); > > where hilites is a Vector Layer. > > I'll show you too my GetFeature url: > > http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs. > map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=RecintosSigp > ac&FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3EGID%3C/ > PropertyName%3E%3CLiteral%3E193303%3C/Literal%3E%3C/PropertyIsEqualTo% > 3E%3C/Filter%3E > > Can someone help me, please? > > Thanks. > > > > Un saludo, > > > > ?????????????????????????????????????????????????????????????????????????????????? > > > David Alda Fern?ndez de Lezea > > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y > Biodiversidad > > > > IKT > > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 > ? ? ? ? ? ? > ???Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es > ? ? ? ? ? ? ? ? > ? ? ? ? ? ? ? web: > www.ikt.es > ?????????????????????????????????????????????????????????????????????????????????? ____________________________________________________________________________________ Veja quais s?o os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From st.sonstiges at web.de Wed Nov 4 03:06:47 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results In-Reply-To: References: <1257172257358-3932043.post@n2.nabble.com> Message-ID: <1257322007699-3943680.post@n2.nabble.com> Barend Kobben wrote: > > That's probably more a question to ask the underlying WMS (in your case > geoserver?) ; Eg. I know that when using Mapserver as a WMS, I would > change > the > &INFO_FORMAT=text/plain > To > &INFO_FORMAT=text/html > > And then make sure I have HTML templates that provide only the attributes > I > want, layed out and styled like I want... > > > -- > Barend K?bben > International Institute for Geo-Information > Sciences and Earth Observation (ITC) > PO Box 6, 7500AA Enschede, The Netherlands > +31 (0)53 4874253 > > Hello, thanks for your answer. In fact, you can build templates in geoserver to show only the results you want with a getfeatureinfo request. Thanks for the hint. But now I have an other problem. Is it possible to define more templates for one layer? For example, if the user wants output1 --> template 1 will be used by geoserver to show the results if the user wants output2 --> template 2 will be used by geoserver to show the results Is this possible? Regards stash -- View this message in context: http://n2.nabble.com/split-WMS-GetFeatureInfo-results-tp3932043p3943680.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Wed Nov 4 03:20:53 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Highlighting changes in the KML layer In-Reply-To: <4AF01354.8080406@romtelecom.ro> References: <4AEF0FD8.5060100@romtelecom.ro> <7f615c9f0911030011m26b65d5bjbc8393f1d5c5186d@mail.gmail.com> <4AF01354.8080406@romtelecom.ro> Message-ID: <4AF13965.5010002@lisasoft.com> Hi Adrian, Adrian Popa wrote: > Thank you for the hint. I suppose I shouldn't expect to see a working > demo of what I need :) > Do you know if the patches presented in ticket 1259 are already part > of openlayers (since the latest version is from january last year?) The patches in that ticket are part of OpenLayers since version 2.6, so, yes! I'm not sure if you use styling coming from the KML file or style it all yourself. In your case I think you need to revert to the latter case. You will need to do some magic to find out what features are new and apply a different style to those items. There are few different ways of doing it. One of them might be marking it's 'newness' in an attribute of the new feature(s) and use a rule that checks that attribute in your style map. Regards, Roald > > Thanks, > > helmi wrote: >> The idea from http://trac.openlayers.org/ticket/1259 >> {{{ >> You could create a selectStyle that could be passed to >> Control.SelectFeature quite easily: create a style object, read the >> "highlight" styles, create a FidFilter rule for every feature (or >> groups of features with the same style), use the according >> "highlight" style as symbolizer for the rule, and add the rule to the >> style object >> }}} >> >> helmi03.com >> >> On Tue, Nov 3, 2009 at 12:59 AM, Adrian Popa >> > >> wrote: >> >> Hello everyone, >> >> Sorry if this has already been discussed on the list (didn't really >> check), but I would like to know if there is a solution (or at >> least a >> plan to implement a feature) that ?"somehow" highlights >> (visually) the >> elements that have been loaded ?through KML - in contrast to the >> elements displayed previously. >> >> I am working at a view that displays alarms on top of the map, and if >> there is a large number of alarms, one more alarm coming every 2 >> minutes >> will not catch the attention of the operator... >> >> I need a mechanism to somehow color/animate symbols loaded >> through KML >> which were not previously on the map. Symbols which dissapear between >> layer refreshes are not important to me. At the next refresh >> cycle, the >> highlighted symbols would no longer be highlighted (because they >> already >> exist on the map). >> >> I have a way to load KMLs periodically, avoiding the cache, but I'm >> missing the "highlight" mechanism. >> >> Hope I have presented my request in an understandable manner, and >> hope >> there is a solution. Maybe a property on the KML layer indicating >> if an >> item is new or not... >> >> Regards, >> Adrian >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > From roald.dewit at lisasoft.com Wed Nov 4 03:26:32 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results In-Reply-To: <1257322007699-3943680.post@n2.nabble.com> References: <1257172257358-3932043.post@n2.nabble.com> <1257322007699-3943680.post@n2.nabble.com> Message-ID: <4AF13AB8.6020903@lisasoft.com> Hi, If you want more control *and* if your WMS server supports WFS (like MapServer and GeoServer), you could also consider sending a WFS GetFeature request and tell the service exactly what attributes you want to have returned. You can retrieve them as GML or GeoJSON for example (or KML, etc) and display them in your application the way you want it. I use my own html templates with variables representing the attributes and have those replaced with their value for example. Regards, Roald stash wrote: > > Barend Kobben wrote: > >> That's probably more a question to ask the underlying WMS (in your case >> geoserver?) ; Eg. I know that when using Mapserver as a WMS, I would >> change >> the >> &INFO_FORMAT=text/plain >> To >> &INFO_FORMAT=text/html >> >> And then make sure I have HTML templates that provide only the attributes >> I >> want, layed out and styled like I want... >> >> >> -- >> Barend K?bben >> International Institute for Geo-Information >> Sciences and Earth Observation (ITC) >> PO Box 6, 7500AA Enschede, The Netherlands >> +31 (0)53 4874253 >> >> >> > > > Hello, > thanks for your answer. In fact, you can build templates in geoserver to > show only the results you want with a getfeatureinfo request. Thanks for the > hint. > > But now I have an other problem. Is it possible to define more templates for > one layer? > > For example, if the user wants output1 --> template 1 will be used by > geoserver to show the results > if the user wants output2 --> template 2 will be used by > geoserver to show the results > > Is this possible? > > Regards > stash > > > > From roald.dewit at lisasoft.com Wed Nov 4 03:31:59 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Problems adding polygon data from GML In-Reply-To: <224DBDAF88A6AC47BD22432815351BE00787806A@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE00787806A@nekaposta1> Message-ID: <4AF13BFF.5080907@lisasoft.com> Hi David, David Alda Fernandez de Lezea wrote: > Is there anything here that makes you know that the response of the WFS Service is in GML v3? > > How can you specify it in the map file? > > The getFeature request I use is this: > > http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&MAXFEATURES=1000&EXCEPTIONS=application/vnd.ogc.se_xml&TYPENAME=RecintosSigpac&FILTER=GID125 > Your WFS request has version 1.1.0. That implies that you receive GML v3 output. See this document: [1] for some differences between 1.0 and 1.1. If you were to specify your request to be 1.0, you would get GML v2 back! [1] https://www.e-education.psu.edu/geog585/l3_p9.html Regards, Roald From dalda at ikt.es Wed Nov 4 03:29:12 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] How to deactivate drag event in OpenLayers Map Message-ID: <224DBDAF88A6AC47BD22432815351BE0078780F7@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/20091104/b3cde561/attachment.gif From dalda at ikt.es Wed Nov 4 03:44:12 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Problems adding polygon data from GML Message-ID: <224DBDAF88A6AC47BD22432815351BE00787810A@nekaposta1> Thanks, at least I have a refutated information. Now I know it, and the next time I hope not to make the same mistake, but I still don't understand why two weeks ago worked, and yesterday it didn't. Anyway, from now on I'll follow the specifications more accuratelly. Thanks. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? -----Mensaje original----- De: Roald de Wit [mailto:roald.dewit@lisasoft.com] Enviado el: mi?rcoles, 04 de noviembre de 2009 9:32 Para: David Alda Fernandez de Lezea CC: users@openlayers.org Asunto: Re: [OpenLayers-Users] Problems adding polygon data from GML Hi David, David Alda Fernandez de Lezea wrote: > Is there anything here that makes you know that the response of the WFS Service is in GML v3? > > How can you specify it in the map file? > > The getFeature request I use is this: > > http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs. > map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&MAXFEATURES=1000&EXCE > PTIONS=application/vnd.ogc.se_xml&TYPENAME=RecintosSigpac&FILTER= er>GID125 teral> > Your WFS request has version 1.1.0. That implies that you receive GML v3 output. See this document: [1] for some differences between 1.0 and 1.1. If you were to specify your request to be 1.0, you would get GML v2 back! [1] https://www.e-education.psu.edu/geog585/l3_p9.html Regards, Roald From st.sonstiges at web.de Wed Nov 4 04:13:51 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results In-Reply-To: <4AF13AB8.6020903@lisasoft.com> References: <1257172257358-3932043.post@n2.nabble.com> <1257322007699-3943680.post@n2.nabble.com> <4AF13AB8.6020903@lisasoft.com> Message-ID: <1257326031618-3943912.post@n2.nabble.com> Roald de Wit-2 wrote: > > Hi, > > If you want more control *and* if your WMS server supports WFS (like > MapServer and GeoServer), you could also consider sending a WFS > GetFeature request and tell the service exactly what attributes you want > to have returned. You can retrieve them as GML or GeoJSON for example > (or KML, etc) and display them in your application the way you want it. > I use my own html templates with variables representing the attributes > and have those replaced with their value for example. > > Regards, > > Roald > > Hello, thanks for your answer. I use geoserver and therefore I could use WFS too. But with a WFS you get only a xml (gml) I thought and i want to display the featureinfo. is this possible with wfs, too? Could you show me an example of how to integrate such an wfs (getfeature) in openlayers to show the clicked value on my map. I know that I can use a filter with wfs, but I don't know how to use it with openlayers. I'm sorry, but I'm new in openlayers and unfortunately I'm not a pro with geoserver. Thanks for your help. Regards stash -- View this message in context: http://n2.nabble.com/split-WMS-GetFeatureInfo-results-tp3932043p3943912.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From nolasco_gabriel at yahoo.com.br Wed Nov 4 04:34:33 2009 From: nolasco_gabriel at yahoo.com.br (Gabriel Nolasco) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Problems adding polygon data from GML In-Reply-To: Message-ID: <529372.14440.qm@web37108.mail.mud.yahoo.com> Hi! I can see that the response is gml 3 because of elements like gml:Envelope, gml:posList,?, they belong to gml 3 specification [1]. Concerning your server configuration as I am not a MapServer user I can't answer you, but you can specify the output format in your request url like: '&outputformat=GML2' [2]. [1] http://www.opengeospatial.org/standards/gml [2] http://www.opengeospatial.org/standards/wfs Best regards, Gabriel Nolasco > ------------------------------ > > Message: 6 > Date: Wed, 4 Nov 2009 08:24:05 +0100 > From: "David Alda Fernandez de Lezea" > Subject: Re: [OpenLayers-Users] Problems adding polygon > data from GML > To: > Message-ID: > <224DBDAF88A6AC47BD22432815351BE00787806A@nekaposta1> > Content-Type: text/plain;??? > charset="iso-8859-1" > > > Hello, > > Thank you very much, that piece of code helped me a lot. > But I've got a question for you. This 'fucntionallity' > worked very well 2 weeks ago, but this week I reviewed it > and I realized that it didn't work properly, suddenly the > geometries were not selected, and 2 weeks ago they were > selected.So I might have made some changes in my WFS server > configuration because it worked and now I've had to add this > piece of code. My WFS server is defined like this: > > MAP > ??? ??? NAME "wfs_server" > ??? ??? STATUS ON > ??? ??? EXTENT 460000 4710000 > 610000 4820000 # Euskadi > ??? > ??? ??? PROJECTION > ??? ??? ??? > "init=epsg:23030" > ??? ??? END > ??? ??? > ??? ??? SHAPEPATH "shapes/" > ??? ??? FONTSET > "misc/fonts/fonts.txt" > ??? ??? SYMBOLSET > "misc/symbols/symbols.sym" > ??? > ??? ??? IMAGETYPE "image/png; > mode=24bit" > ??? ??? IMAGECOLOR 255 255 > 255 > ??? ??? UNITS METERS > ??? ??? > ??? ??? DEBUG ON > ??? ??? CONFIG "MS_ERRORFILE" > "C:/ms4w/Apache/htdocs/MFD/tmp/ms_wfs.log" > ??? ??? > ??? ??? WEB > ??? ??? ??? > IMAGEPATH "MFD/tmp/" > ??? ??? ??? > IMAGEURL "tmp/" > ??? ??? ??? > METADATA > ??? ??? ??? > ??? "wfs_title" "IKT WFS Server" ## REQUIRED > ??? ??? ??? > ??? "wfs_abstract" "Servicio de mapas WFS de > IKT Nekazal Teknologia. Powered by Apache and UMN MapServer" > ## REQUIRED > ??? ??? ??? > ??? "wfs_onlineresource" "http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&" > ## Recommended > ??? ??? ??? > ??? "wfs_srs" "EPSG:23030" ## Recommended > ??? ??? ??? > ??? "wfs_keywordlist"??? > ??? "IKT,Euskadi,Mapas Euskadi" > ??? ??? ??? > ??? "wfs_fees"??? > ??? "none" > ??? ??? ??? > ??? "wfs_accessconstraints"??? > ??? "Ninguna" > ??? ??? ??? > ??? > "ows_contactorganization"???"http://www.ikt.es" > ??? ??? ??? > ??? "wfs_geometry_element_name" > "MS_GEOMETRY" > ??? ??? ??? > END > ??? ??? END > ??? > ??? ??? LAYER > ??? ??? ??? > NAME "RecintosSigpac" > ??? ??? ??? > PROJECTION > ??? ??? ??? > ??? "init=epsg:23030" > ??? ??? ??? > END > ??? ??? ??? > METADATA > ??? ??? ??? > ??? "wfs_title" "Recintos Sigpac 2009" ## > REQUIRED > ??? ??? ??? > ??? "wfs_abstract" "Recintos" > ??? ??? ??? > ??? "wfs_name" "Recintos" > ??? ??? ??? > ??? "wfs_geometry_element_name" > "MS_GEOMETRY" > ??? ??? ??? > ??? "wfs_request_method"? ? ? > ? "GET" > ??? ??? ??? > ??? "wfs_srs" "EPSG:23030" ## Recommended > ??? ??? ??? > ??? "wfs_extent"? ? ? ? > ? "460000 4710000 610000 4820000" > ??? ??? ??? > ??? "gml_featureid" "gid" ## REQUIRED > ??? ??? ??? > ??? "gml_exclude_items"? ? ? > ???"all" > ??? ??? ??? > END > ??? ??? ??? > TYPE POLYGON > ??? ??? ??? > ??? ??? ??? > CONNECTIONTYPE oraclespatial > ??? ??? ??? > CONNECTION "admcarto/admcarto@ORA10GDE" > ??? ??? ??? > ??? ??? ??? > DATA "GEOMETRY FROM (SELECT * FROM GT_SIGPAC_RECINTOS) USING > UNIQUE gid SRID 82337" #todo el sigpac > ??? ??? ??? > ??? ??? ??? > DUMP TRUE ## REQUIRED > ??? ??? ??? > ??? ??? ??? > CLASS > ??? ??? ??? > ??? NAME "Municipios_Gipuzkoa" > ??? ??? ??? > ??? STYLE > ??? ??? ??? > ??? ??? OUTLINECOLOR 255 255 > 255 > ??? ??? ??? > ??? END > ??? ??? ??? > ??? TEMPLATE "ttt_query.html" > ??? ??? ??? > END > ??? ??? ??? > ??? ??? ??? > ??? ??? ??? > STATUS ON > ??? ??? END # Layer > ??? ??? > ??? ??? LAYER > ??? ??? ??? > NAME "municipios" > ??? ??? ??? > PROJECTION > ??? ??? ??? > ??? "init=epsg:23030" > ??? ??? ??? > END > ??? ??? ??? > METADATA > ??? ??? ??? > ??? "wfs_title" "Municipios 96" ## REQUIRED > ??? ??? ??? > ??? "wfs_abstract" "municipios" > ??? ??? ??? > ??? "wfs_name" "municipios" > ??? ??? ??? > ??? "wfs_geometry_element_name" > "MS_GEOMETRY" > ??? ??? ??? > ??? "wfs_srs" "EPSG:23030" ## Recommended > ??? ??? ??? > ??? "wfs_extent"? ? ? ? > ? "460000 4710000 610000 4820000" > ??? ??? ??? > ??? "gml_featureid" "gid" ## REQUIRED > ??? ??? ??? > ??? "gml_exclude_items"? ? ? > ???"all" > ??? ??? ??? > ??? > ??? ??? ??? > END > ??? ??? ??? > TYPE POLYGON > ??? ??? ??? > ??? ??? ??? > CONNECTIONTYPE oraclespatial > ??? ??? ??? > CONNECTION "admcarto/admcarto@ORA10GDE" > ??? ??? ??? > ??? ??? ??? > DATA "GEOMETRY FROM (SELECT * FROM GT_MUNICIPIOS_96) USING > UNIQUE gid SRID 82337" #todo el sigpac > ??? ??? ??? > ??? ??? ??? > DUMP TRUE ## REQUIRED > ??? ??? ??? > ??? ??? ??? > CLASS > ??? ??? ??? > ??? NAME "Municipios_Gipuzkoa" > ??? ??? ??? > ??? STYLE > ??? ??? ??? > ??? ??? OUTLINECOLOR 255 255 > 255 > ??? ??? ??? > ??? END > ??? ??? ??? > ??? TEMPLATE "ttt_query.html" > ??? ??? ??? > END > ??? ??? ??? > ??? ??? ??? > ??? ??? ??? > STATUS ON > ??? ??? END # Layer > ??? > ??? > END # Map File > > > Is there anything here that makes you know that the > response of the WFS Service is in GML v3? > > How can you specify it in the map file? > > The getFeature request I use is this: > > http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&MAXFEATURES=1000&EXCEPTIONS=application/vnd.ogc.se_xml&TYPENAME=RecintosSigpac&FILTER=GID125 > > Thanks again. > > > > 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 > ?????????????????????????????????????????????????????????????????????????????????? > > -----Mensaje original----- > De: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] > En nombre de Gabriel Nolasco > Enviado el: martes, 03 de noviembre de 2009 17:23 > Para: users@openlayers.org > Asunto: Re: [OpenLayers-Users] Problems adding polygon data > from GML > > Hello David! > > The problem is that your get feature output format is gml > 3.1.1, so you will have to parse the response with > OpenLayers.Format.GML.v3. > To instantiate this class correctly you must specify the > feature typeName (without prefix) and the feature namespace, > something like: > > var format = new OpenLayers.Format.GML.v3({ > featureType: "RecintosSigpac", > featureNS: "http://mapserver.gis.umn.edu/mapserver" > }); > > Best regards, > Gabriel Nolasco > > > ------------------------------ > > > > Message: 7 > > Date: Tue, 3 Nov 2009 15:25:27 +0100 > > From: "David Alda Fernandez de Lezea" > > Subject: [OpenLayers-Users] Problems adding polygon > data from GML > > To: > > Message-ID: > > > <224DBDAF88A6AC47BD22432815351BE007877F40@nekaposta1> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Hello, > >? > > I'm having some issues trying to add a feature to a > vector layer from > > an WFS response. I think that my response it's well > formed but I'm not > > sure. This is what I get from my WFS > > server: > >? > >? > > > > ???xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > > ???xmlns:gml="http://www.opengis.net/gml" > > ???xmlns:wfs="http://www.opengis.net/wfs" > > ???xmlns:ogc="http://www.opengis.net/ogc" > > ???xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > ???xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver > > http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs. > > > map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=Rec > > intosSigpac&OUTPUTFORMAT=text/xml; > > subtype=gml/3.1.1? http://www.opengis.net/wfs > > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> > > ? ? ? > > ? ? ??? > srsName="EPSG:23030"> > > ? ? ? ? > > 526447.763986 > > 4758100.330520 > > ? ? ? ? > > 526591.710676 > > 4758280.966702 > > ? ? ??? > > ? ? ? > > ? ? > > ? ? ? > gml:id="RecintosSigpac.193303"> > > ? ? ? ? > > ? ? ? ??? > srsName="EPSG:23030"> > > ? ? ? ? ? > > 526447.763986 > > 4758100.330520 > > ? ? ? ? ? > > 526591.710676 > > 4758280.966702 > > ? ? ? > > ??? > > ? ? ? ? > > ? ? ? ? > > ? ? ? ? ? > srsName="EPSG:23030"> > > ? ? ? ? ? ? > > > > ? ? ? ? ? ? ? > > > > ? ? ? ? ? ? ? ? > > 526484.432428 > > 4758280.966702 526480.100971 4758268.076507 > 526475.463251 > > 4758253.072136 526468.535947 4758229.169445 > 526447.763986 > > 4758186.689696 526453.315125 4758154.550751 > 526455.754887 > > 4758140.485935 526495.766666 4758112.547879 > 526500.834389 > > 4758115.350669 526504.219488 4758116.685545 > 526506.649401 > > 4758117.569927 526507.626820 4758117.573707 > 526510.130663 > > 4758117.015581 526514.410883 4758114.891216 > 526521.314254 > > 4758109.640088 526528.210404 4758104.491330 > 526533.302118 > > 4758101.094873 526535.430830 4758100.330520 > 526540.534776 > > 4758102.602904 526577.633954 4758119.082826 > 526591.710676 > > 4758125.346099 526585.498394 4758151.543640 > 526579.035838 > > 4758178.838603 526575.798470 4758190.535962 > 526564.481114 > > 4758273.001370 526551.499563 4758266.407290 > 526537.298512 > > 4758271.136785 526530.463481 4758272.897528 > 526516.551118 > > 4758275.450028 526496.415011 4758279.002411 > 526484.432428 > > 4758280.966702 > > ? ? ? ? ? ? ? > > > > ? ? ? ? ? ? > > > > ? ? ? ? ? > > ? ? ? ? > > ? ? ? > > ? ? > > > >? > > And I'm adding the feature by this way: > >? > > var features = new > > OpenLayers.Format.GML().read(response.responseText); > > hilites.destroyFeatures(); > > hilites.addFeatures(features); > > hilites.setVisibility(true); > >? > > where hilites is a Vector Layer. > >? > > I'll show you too my GetFeature url: > >? > > http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs. > > > map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=RecintosSigp > > > ac&FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3EGID%3C/ > > > PropertyName%3E%3CLiteral%3E193303%3C/Literal%3E%3C/PropertyIsEqualTo% > > 3E%3C/Filter%3E > >? > > Can someone help me, please? > >? > > Thanks. > > > >? > > > > Un saludo, > > > >? > > > > > ?????????????????????????????????????????????????????????????????????????????????? > > > > > > David Alda Fern?ndez de Lezea > > > > Lurralde eta Biodibertsitate Saila / Dpto. de > Territorio y > > Biodiversidad > > > >? > > > > IKT > > > > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > > > > > > ?????????????????????????????????????????????????????????????????????????????????? > > Tlfnos.: 945-00-32-95 > > ? ? ? ? ? ? > > ???Fax: 945-00.32.90 > > > ?????????????????????????????????????????????????????????????????????????????????? > > email: dalda@ikt.es > > ? ? ? ? ? ? ? ? > > ? ? ? ? ? ? ? web: > > www.ikt.es > > > ?????????????????????????????????????????????????????????????????????????????????? > > > ? ? ? > ____________________________________________________________________________________ Veja quais s?o os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com From roald.dewit at lisasoft.com Wed Nov 4 07:14:06 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results In-Reply-To: <1257326031618-3943912.post@n2.nabble.com> References: <1257172257358-3932043.post@n2.nabble.com> <1257322007699-3943680.post@n2.nabble.com> <4AF13AB8.6020903@lisasoft.com> <1257326031618-3943912.post@n2.nabble.com> Message-ID: <4AF1700E.5060302@lisasoft.com> Hi stash, stash wrote: > Hello, > thanks for your answer. I use geoserver and therefore I could use WFS too. > But with a WFS you get only a xml (gml) I thought and i want to display the > featureinfo. is this possible with wfs, too? > > Could you show me an example of how to integrate such an wfs (getfeature) in > openlayers to show the clicked value on my map. I know that I can use a > filter with wfs, but I don't know how to use it with openlayers. > I'm realising now that I answered a bit too quickly: you would need to perform some tricks to do a GetFeature request, including transforming the click coordinates to lon/lat values etc. As a punishment for myself I created an example [1] based on the standard getfeatureinfo.html example. It's not perfect, but it works :-) A few things to look out for: - use 'ows' in your url instead of 'wms' or 'wfs'. OWS captures both, you just need to specify the service explicitly - make sure that if your geoserver runs on another port or another machine that you have a proxy script - look at the 'propertyName' parameter. That one tells the WFS service what attributes to return. [1] http://pastebin.com/f10237f96 Good luck! Roald From roald.dewit at lisasoft.com Wed Nov 4 07:26:40 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results In-Reply-To: <4AF1700E.5060302@lisasoft.com> References: <1257172257358-3932043.post@n2.nabble.com> <1257322007699-3943680.post@n2.nabble.com> <4AF13AB8.6020903@lisasoft.com> <1257326031618-3943912.post@n2.nabble.com> <4AF1700E.5060302@lisasoft.com> Message-ID: <4AF17300.1070406@lisasoft.com> One more addition: you can also use a GetFeature control with the new OpenLayers.Protocol.WFS.fromWMSLayer protocol. That's probably a cleaner way, but you'd have to find out how to add extra paramaters like 'propertyName' and you'd still need to loop through the attributes and show them. Here is a standard GetFeature example using WFS: http://www.openlayers.org/dev/examples/getfeature-wfs.html Roald de Wit wrote: > Hi stash, > > stash wrote: > >> Hello, >> thanks for your answer. I use geoserver and therefore I could use WFS too. >> But with a WFS you get only a xml (gml) I thought and i want to display the >> featureinfo. is this possible with wfs, too? >> >> Could you show me an example of how to integrate such an wfs (getfeature) in >> openlayers to show the clicked value on my map. I know that I can use a >> filter with wfs, but I don't know how to use it with openlayers. >> >> > I'm realising now that I answered a bit too quickly: you would need to > perform some tricks to do a GetFeature request, including transforming > the click coordinates to lon/lat values etc. As a punishment for myself > I created an example [1] based on the standard getfeatureinfo.html > example. It's not perfect, but it works :-) > > A few things to look out for: > - use 'ows' in your url instead of 'wms' or 'wfs'. OWS captures both, > you just need to specify the service explicitly > - make sure that if your geoserver runs on another port or another > machine that you have a proxy script > - look at the 'propertyName' parameter. That one tells the WFS service > what attributes to return. > > [1] http://pastebin.com/f10237f96 > > Good luck! > > Roald > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From adrian_gh.popa at romtelecom.ro Wed Nov 4 07:46:53 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Highlighting changes in the KML layer In-Reply-To: <4AF13965.5010002@lisasoft.com> References: <4AEF0FD8.5060100@romtelecom.ro> <7f615c9f0911030011m26b65d5bjbc8393f1d5c5186d@mail.gmail.com> <4AF01354.8080406@romtelecom.ro> <4AF13965.5010002@lisasoft.com> Message-ID: <4AF177BD.8040204@romtelecom.ro> Hello Roald, I have a question about marking items as new - I guess they are not marked out of the box, right? When I do the layer refresh, I just do layer.refresh({force: true}); I'm not sure what this does internally, but perhaps I can't count on any attributes I set - to be preserved. Should I build the variable (hash) where I keep attributes as a different variable? Or should I keep it in a standalone object? Also, before I do the refresh - I suspect I need to copy the attributes of the current objects, issue a layer refresh and then (hoping the refresh is synchroneous) I should go through the new list and see if I have new items. If there are, mark them as new (and mark other items as 'old'). Supposing that I do that - what would I need to do to change the aspect (change color/make bigger) of the "new" items? I'm afraid this will consume some memory and resources - but I guess I will see when it's ready... How does my plan sound like? Regards, Adrian Roald de Wit wrote: > Hi Adrian, > > Adrian Popa wrote: >> Thank you for the hint. I suppose I shouldn't expect to see a working >> demo of what I need :) >> Do you know if the patches presented in ticket 1259 are already part >> of openlayers (since the latest version is from january last year?) > The patches in that ticket are part of OpenLayers since version 2.6, > so, yes! > > I'm not sure if you use styling coming from the KML file or style it > all yourself. In your case I think you need to revert to the latter > case. You will need to do some magic to find out what features are new > and apply a different style to those items. There are few different > ways of doing it. One of them might be marking it's 'newness' in an > attribute of the new feature(s) and use a rule that checks that > attribute in your style map. > > Regards, > > Roald > >> >> Thanks, >> >> helmi wrote: >>> The idea from http://trac.openlayers.org/ticket/1259 >>> {{{ >>> You could create a selectStyle that could be passed to >>> Control.SelectFeature quite easily: create a style object, read the >>> "highlight" styles, create a FidFilter rule for every feature (or >>> groups of features with the same style), use the according >>> "highlight" style as symbolizer for the rule, and add the rule to >>> the style object >>> }}} >>> >>> helmi03.com >>> >>> On Tue, Nov 3, 2009 at 12:59 AM, Adrian Popa >>> > >>> wrote: >>> >>> Hello everyone, >>> >>> Sorry if this has already been discussed on the list (didn't really >>> check), but I would like to know if there is a solution (or at >>> least a >>> plan to implement a feature) that ?"somehow" highlights >>> (visually) the >>> elements that have been loaded ?through KML - in contrast to the >>> elements displayed previously. >>> >>> I am working at a view that displays alarms on top of the map, >>> and if >>> there is a large number of alarms, one more alarm coming every 2 >>> minutes >>> will not catch the attention of the operator... >>> >>> I need a mechanism to somehow color/animate symbols loaded >>> through KML >>> which were not previously on the map. Symbols which dissapear >>> between >>> layer refreshes are not important to me. At the next refresh >>> cycle, the >>> highlighted symbols would no longer be highlighted (because they >>> already >>> exist on the map). >>> >>> I have a way to load KMLs periodically, avoiding the cache, but I'm >>> missing the "highlight" mechanism. >>> >>> Hope I have presented my request in an understandable manner, and >>> hope >>> there is a solution. Maybe a property on the KML layer indicating >>> if an >>> item is new or not... >>> >>> Regards, >>> Adrian >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> > > -- --- Adrian Popa NOC Division Network Engineer Divizia Centrul National de Operare Retea Departament Transport IP & Metro Compartiment IP Core & Backbone Phone: +40 21 400 3099 From daniel.degasperi at r3-gis.com Wed Nov 4 07:54:30 2009 From: daniel.degasperi at r3-gis.com (Daniel Degasperi) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] set default baselayer Message-ID: <4AF17986.7080307@r3-gis.com> Hi, I have several baseLayers in my OpenLayers-instance and would activate as default the second baseLayer added. Is this possible? Best regards Daniel -- Daniel Degasperi Software Developer daniel.degasperi@r3-gis.com --------------------------- R3 GIS Srl Via Johann Kravogl 2 I-39010 Merano - Sinigo (BZ) Tel. +39 0473 494949 Fax. +39 0473 069902 Web http://www.r3-gis.com ----------------------------- From daniel.degasperi at r3-gis.com Wed Nov 4 07:56:18 2009 From: daniel.degasperi at r3-gis.com (Daniel Degasperi) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Marker and projection Message-ID: <4AF179F2.6010102@r3-gis.com> Hi, is there any plan to integrate the reprojection in "Marker"? In this moment I've to transform my point ("EPSG:4326") manually to "EPSG:900913", create a LatLon-Object and pass it trough the constructor of the "Marker". Example: proj4326 = new OpenLayers.Projection("EPSG:4326"); proj900913 = new OpenLayers.Projection("EPSG:900913"); pt = new OpenLayers.Geometry.Point(11.3307484,46.4825565); pt = OpenLayers.Projection.transform(pt, proj4326, proj900913); var ll = new OpenLayers.LonLat(pt.x,pt.y); // marker info var icon = new OpenLayers.Icon('http://openlayers.org/dev/img/marker-gold.png', size); var data = {'icon': icon}; var feature = new OpenLayers.Feature(layer_marker, ll, data); Best regards Daniel -- Daniel Degasperi Software Developer daniel.degasperi@r3-gis.com --------------------------- R3 GIS Srl Via Johann Kravogl 2 I-39010 Merano - Sinigo (BZ) Tel. +39 0473 494949 Fax. +39 0473 069902 Web http://www.r3-gis.com ----------------------------- From micklesh at gmail.com Wed Nov 4 08:14:31 2009 From: micklesh at gmail.com (Michael Shishcu) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] set default baselayer In-Reply-To: <4AF17986.7080307@r3-gis.com> References: <4AF17986.7080307@r3-gis.com> Message-ID: Hi, Daniel there is setBaseLayer function of the OpenLayers.Map class regards, michael 2009/11/4 Daniel Degasperi > Hi, > I have several baseLayers in my OpenLayers-instance and would activate > as default the second baseLayer added. > Is this possible? > > Best regards > Daniel > > -- > Daniel Degasperi > Software Developer > daniel.degasperi@r3-gis.com > > --------------------------- > R3 GIS Srl > Via Johann Kravogl 2 > I-39010 Merano - Sinigo (BZ) > Tel. +39 0473 494949 > Fax. +39 0473 069902 > Web http://www.r3-gis.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/20091104/75539c57/attachment.html From st.sonstiges at web.de Wed Nov 4 08:40:03 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results In-Reply-To: <4AF17300.1070406@lisasoft.com> References: <1257172257358-3932043.post@n2.nabble.com> <1257322007699-3943680.post@n2.nabble.com> <4AF13AB8.6020903@lisasoft.com> <1257326031618-3943912.post@n2.nabble.com> <4AF1700E.5060302@lisasoft.com> <4AF17300.1070406@lisasoft.com> Message-ID: <1257342003850-3945191.post@n2.nabble.com> Hi, thanks for the example. But when I try to click on the map I get following error: Unhandled request return Not Found I'm nearly sure this is because of my proxyhost settings. I don't know what I'm doing wrong, but my proxyhost doesn't work. (I already downloaded the proxy.cgi and copied it on the server, ...) Nevertheless thanks for your example. If my proxyhost will work I can try it again. Regards stash -- View this message in context: http://n2.nabble.com/split-WMS-GetFeatureInfo-results-tp3932043p3945191.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Nov 4 09:27:19 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Marker and projection In-Reply-To: <4AF179F2.6010102@r3-gis.com> References: <4AF179F2.6010102@r3-gis.com> Message-ID: <20091104142718.GG21215@metacarta.com> On Wed, Nov 04, 2009 at 01:56:18PM +0100, Daniel Degasperi wrote: > Hi, > is there any plan to integrate the reprojection in "Marker"? Nope. -- Chris > In this moment I've to transform my point ("EPSG:4326") manually to > "EPSG:900913", > create a LatLon-Object and pass it trough the constructor of the "Marker". > > Example: > proj4326 = new OpenLayers.Projection("EPSG:4326"); > proj900913 = new OpenLayers.Projection("EPSG:900913"); > pt = new OpenLayers.Geometry.Point(11.3307484,46.4825565); > pt = OpenLayers.Projection.transform(pt, proj4326, proj900913); > var ll = new OpenLayers.LonLat(pt.x,pt.y); > > // marker info > var icon = new > OpenLayers.Icon('http://openlayers.org/dev/img/marker-gold.png', size); > var data = {'icon': icon}; > var feature = new OpenLayers.Feature(layer_marker, ll, data); > > Best regards > Daniel > > -- > Daniel Degasperi > Software Developer > daniel.degasperi@r3-gis.com > > --------------------------- > R3 GIS Srl > Via Johann Kravogl 2 > I-39010 Merano - Sinigo (BZ) > Tel. +39 0473 494949 > Fax. +39 0473 069902 > Web http://www.r3-gis.com > ----------------------------- > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From dalda at ikt.es Wed Nov 4 10:46:40 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] How to deactivate drag event in OpenLayers Map Message-ID: <224DBDAF88A6AC47BD22432815351BE0078783CE@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/20091104/ea7362f8/attachment.gif From diegorrborges at yahoo.com.br Wed Nov 4 11:33:01 2009 From: diegorrborges at yahoo.com.br (Diego Roberto) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Insert zoom controls and zoomToContextExtent off the map Message-ID: <404252.50966.qm@web58001.mail.re3.yahoo.com> Hello, I need to insert some controls outside the div OL map. Had success in working with the controls Feature Draw off the map. Since the controls to zoom in, zoom out and can not zoomToContextExtent put them off the map, someone could help me? I try to do more or less like this: var zoomBox = new OpenLayers.Control.ZoomBox({ title: "Zoom in box" }); // create the panel where the controls will be added var panel = new OpenLayers.Control.Panel({ defaultControl: zoomBox }); var zoomToContextExtent = new OpenLayers.Control.Button({ title: "zoom to map extent", displayClass: "olControlZoomToMaxExtent", trigger: function(){ map.zoomToExtent(context.bounds); } }); panel.addControls([ zoomBox, new OpenLayers.Control.ZoomBox({title:"Zoom out box", displayClass: 'olControlZoomOutBox', out: true}), new OpenLayers.Control.DragPan({title:'Drag map', displayClass: 'olControlPanMap'}), zoomToContextExtent, ]); From what I could see he uses these DISPLAYCLASS that I referred style that is always built on the map div. olControlPanMap. Sorry if 'm wrong. I'm looking to develop the following: Step control to be loaded and another div off the map I'm in control I clicking on I have the same function that enables the control over the less so. Example of controls: http://dev.openlayers.org/sandbox/jvanulden/openlayers/examples/extended-layersw\ itcher.html Through this example could not get the controls to zoom in, zoom out and zoom extent: http://www.openlayers.org/dev/examples/editingtoolbar-outside.html So I need off the map. Thank you for your attention. Thanks ____________________________________________________________________________________ Veja quais s?o os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091104/ce18ea0c/attachment.html From asufsc at gmail.com Wed Nov 4 14:25:21 2009 From: asufsc at gmail.com (And.) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] chrome vector layer problem In-Reply-To: <1256910691154-3919009.post@n2.nabble.com> References: <1256910691154-3919009.post@n2.nabble.com> Message-ID: <1257362721895-3947534.post@n2.nabble.com> I had the same problem. Apparently the pan move isn't firing the move's events (start,end..). It didn't happen if you click in the arrows to move the map. frknml wrote: > > > > Hi everyone; > > I have an elemantary problem.I have a google layer and on my google layer > i'm drawing a line dynamically there is no problem while drawing the line > .My problem is when i try to move the map, map moves but my vector layer > stays at the same position .it works on firefox and explorer perfectly but > don't works on chrome. > > I need your suggestions,please help me:) > > Faruk Naml? > -- View this message in context: http://n2.nabble.com/chrome-vector-layer-problem-tp3919009p3947534.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Wed Nov 4 16:10:07 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] split WMS GetFeatureInfo results In-Reply-To: <1257342003850-3945191.post@n2.nabble.com> References: <1257172257358-3932043.post@n2.nabble.com> <1257322007699-3943680.post@n2.nabble.com> <4AF13AB8.6020903@lisasoft.com> <1257326031618-3943912.post@n2.nabble.com> <4AF1700E.5060302@lisasoft.com> <4AF17300.1070406@lisasoft.com> <1257342003850-3945191.post@n2.nabble.com> Message-ID: <4AF1EDAF.2000104@lisasoft.com> Hi, Yes, your proxy script it probably not in the right location. Is it in the same directory as your example html? If not, change either the location of your proxy script or the path pointing to it in the example. You also need to make sure that your web server can run that script. Good luck, Roald stash wrote: > Hi, > thanks for the example. But when I try to click on the map I get following > error: > > Unhandled request return Not Found > > I'm nearly sure this is because of my proxyhost settings. I don't know what > I'm doing wrong, but my proxyhost doesn't work. (I already downloaded the > proxy.cgi and copied it on the server, ...) > > Nevertheless thanks for your example. If my proxyhost will work I can try it > again. > > Regards > stash > From roald.dewit at lisasoft.com Wed Nov 4 16:22:44 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Highlighting changes in the KML layer In-Reply-To: <4AF177BD.8040204@romtelecom.ro> References: <4AEF0FD8.5060100@romtelecom.ro> <7f615c9f0911030011m26b65d5bjbc8393f1d5c5186d@mail.gmail.com> <4AF01354.8080406@romtelecom.ro> <4AF13965.5010002@lisasoft.com> <4AF177BD.8040204@romtelecom.ro> Message-ID: <4AF1F0A4.7020605@lisasoft.com> Hi Adrian, When you refresh a layer (someone please correct me if I'm wrong here), all your features (items) will be replaced with the new ones, therefore you need to 'manually' keep track of your features. As you suggested, you could, just before a refresh, store all features (or feature.ids) in some array, then refresh and compare the new feature list with the old one. The refresh is usually not synchronous, but that does not need to be a problem: you can register for events ('beforefeaturesadded' for example) and call your compare function with the list of new features. You can then loop through them and mark the new ones as new (for example by saying: feature.attributes.isNew = true). Make sure that the compare function itself returns true. Have a look at what's possible with styling in OpenLayes (it's a bit of a read): http://docs.openlayers.org/library/feature_styling.html So, yes, your plan sounds good! Regards, Roald Adrian Popa wrote: > Hello Roald, > > I have a question about marking items as new - I guess they are not > marked out of the box, right? > When I do the layer refresh, I just do layer.refresh({force: true}); I'm > not sure what this does internally, but perhaps I can't count on any > attributes I set - to be preserved. > > Should I build the variable (hash) where I keep attributes as a > different variable? Or should I keep it in a standalone object? > > Also, before I do the refresh - I suspect I need to copy the attributes > of the current objects, issue a layer refresh and then (hoping the > refresh is synchroneous) I should go through the new list and see if I > have new items. If there are, mark them as new (and mark other items as > 'old'). > > Supposing that I do that - what would I need to do to change the aspect > (change color/make bigger) of the "new" items? > > I'm afraid this will consume some memory and resources - but I guess I > will see when it's ready... > > How does my plan sound like? > Regards, > Adrian > > Roald de Wit wrote: > >> Hi Adrian, >> >> Adrian Popa wrote: >> >>> Thank you for the hint. I suppose I shouldn't expect to see a working >>> demo of what I need :) >>> Do you know if the patches presented in ticket 1259 are already part >>> of openlayers (since the latest version is from january last year?) >>> >> The patches in that ticket are part of OpenLayers since version 2.6, >> so, yes! >> >> I'm not sure if you use styling coming from the KML file or style it >> all yourself. In your case I think you need to revert to the latter >> case. You will need to do some magic to find out what features are new >> and apply a different style to those items. There are few different >> ways of doing it. One of them might be marking it's 'newness' in an >> attribute of the new feature(s) and use a rule that checks that >> attribute in your style map. >> >> Regards, >> >> Roald >> >> >>> Thanks, >>> >>> helmi wrote: >>> >>>> The idea from http://trac.openlayers.org/ticket/1259 >>>> {{{ >>>> You could create a selectStyle that could be passed to >>>> Control.SelectFeature quite easily: create a style object, read the >>>> "highlight" styles, create a FidFilter rule for every feature (or >>>> groups of features with the same style), use the according >>>> "highlight" style as symbolizer for the rule, and add the rule to >>>> the style object >>>> }}} >>>> >>>> helmi03.com >>>> >>>> On Tue, Nov 3, 2009 at 12:59 AM, Adrian Popa >>>> > >>>> wrote: >>>> >>>> Hello everyone, >>>> >>>> Sorry if this has already been discussed on the list (didn't really >>>> check), but I would like to know if there is a solution (or at >>>> least a >>>> plan to implement a feature) that ?"somehow" highlights >>>> (visually) the >>>> elements that have been loaded ?through KML - in contrast to the >>>> elements displayed previously. >>>> >>>> I am working at a view that displays alarms on top of the map, >>>> and if >>>> there is a large number of alarms, one more alarm coming every 2 >>>> minutes >>>> will not catch the attention of the operator... >>>> >>>> I need a mechanism to somehow color/animate symbols loaded >>>> through KML >>>> which were not previously on the map. Symbols which dissapear >>>> between >>>> layer refreshes are not important to me. At the next refresh >>>> cycle, the >>>> highlighted symbols would no longer be highlighted (because they >>>> already >>>> exist on the map). >>>> >>>> I have a way to load KMLs periodically, avoiding the cache, but I'm >>>> missing the "highlight" mechanism. >>>> >>>> Hope I have presented my request in an understandable manner, and >>>> hope >>>> there is a solution. Maybe a property on the KML layer indicating >>>> if an >>>> item is new or not... >>>> >>>> Regards, >>>> Adrian >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>>> >> > > > From roald.dewit at lisasoft.com Wed Nov 4 16:27:05 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Marker and projection In-Reply-To: <4AF179F2.6010102@r3-gis.com> References: <4AF179F2.6010102@r3-gis.com> Message-ID: <4AF1F1A9.70901@lisasoft.com> Daniel, It is better to use Layer.Vector instead. You can style vector layers to have icons too. If you manually add points to a Vector layer, you'd still need to reproject yourself (IIRC). Regards, Roald Daniel Degasperi wrote: > Hi, > is there any plan to integrate the reprojection in "Marker"? > In this moment I've to transform my point ("EPSG:4326") manually to > "EPSG:900913", > create a LatLon-Object and pass it trough the constructor of the "Marker". > > Example: > proj4326 = new OpenLayers.Projection("EPSG:4326"); > proj900913 = new OpenLayers.Projection("EPSG:900913"); > pt = new OpenLayers.Geometry.Point(11.3307484,46.4825565); > pt = OpenLayers.Projection.transform(pt, proj4326, proj900913); > var ll = new OpenLayers.LonLat(pt.x,pt.y); > > // marker info > var icon = new > OpenLayers.Icon('http://openlayers.org/dev/img/marker-gold.png', size); > var data = {'icon': icon}; > var feature = new OpenLayers.Feature(layer_marker, ll, data); > > Best regards > Daniel > > From ajuarez at queretaro.gob.mx Wed Nov 4 19:20:53 2009 From: ajuarez at queretaro.gob.mx (Arturo =?ISO-8859-1?Q?Ju=E1rez?= Lima) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] geowebcache with EPSG:900913 Message-ID: <1257380453.8825.33.camel@localhost> Hi, I was try use a shape from geowebcache with EPSG:900913, but always send me the shape with EPSG:4326. this is my code: function add_capa_own_gwc(map,etiqueta,capa,format,base,visible) { l1 = new OpenLayers.Layer.WMS( etiqueta, "http://localhost:8080/geoserver/gwc/service/wms", {layers: capa, },{isBaseLayer: base}); l1.setVisibility(visible); map.addLayer(l1); } could you help me?? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091104/fc4b7040/attachment.html From dave.potts at pinan.co.uk Wed Nov 4 19:43:08 2009 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] GML2/GML3 functions no read function In-Reply-To: <1257380453.8825.33.camel@localhost> References: <1257380453.8825.33.camel@localhost> Message-ID: <4AF21F9C.8080804@pinan.co.uk> Currently I use the object type GML to read data in to a program, I was thinking about using GML2 or perhaps even a GML3 object, but it seems to lack a read function call. Have I overlooked something ? According to the documentation GML2 is derrived from GML.Base,derrived from XML , OpenLayers.Format.XML has a write function on it, but no read. Is this an error in the documentation or is there another way to read an XML tree. regards Dave. From roald.dewit at lisasoft.com Wed Nov 4 20:02:53 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] GML2/GML3 functions no read function In-Reply-To: <4AF21F9C.8080804@pinan.co.uk> References: <1257380453.8825.33.camel@localhost> <4AF21F9C.8080804@pinan.co.uk> Message-ID: <4AF2243D.1080504@lisasoft.com> Hi Dave, The OpenLayers.Format.GML [1] surely has a read method! Are you using it the right way? It needs to be something like this (not tested): var gmlReader = new OpenLayers.Format.GML() or if you insist on using GML3: var gmlReader = new OpenLayers.Format.GML.v3() Then you do the following: var features = gmlReader.read(data); Regards, Roald [1] http://dev.openlayers.org/apidocs/files/OpenLayers/Format/GML-js.html On 05/11/09 11:43, Dave Potts wrote: > Currently I use the object type GML to read data in to a program, I was > thinking about using GML2 or perhaps even a GML3 object, but it seems to > lack a read function call. Have I overlooked something ? > According to the documentation > GML2 is derrived from GML.Base,derrived from XML , OpenLayers.Format.XML > has a write function on it, but no read. Is this an error in the > documentation or is there another way to read an XML tree. > > regards > > > Dave. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. From eric.lemoine at camptocamp.com Thu Nov 5 01:25:38 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] geowebcache with EPSG:900913 In-Reply-To: <1257380453.8825.33.camel@localhost> References: <1257380453.8825.33.camel@localhost> Message-ID: On Thursday, November 5, 2009, Arturo Ju?rez Lima wrote: > > > > > > > > Hi, I was try use a shape from geowebcache with EPSG:900913, but always send me the shape with EPSG:4326. > > this is my code: > > function add_capa_own_gwc(map,etiqueta,capa,format,base,visible)? { > l1 = new OpenLayers.Layer.WMS( > ??????????????????? etiqueta, "http://localhost:8080/geoserver/gwc/service/wms", > ??????????????????? {layers: capa, > ??????????????????? },{isBaseLayer: base}); > l1.setVisibility(visible); > ??????? map.addLayer(l1); > ? } > > could you help me?? do you have "projection" set to "EPSG:900913" in the options passed to the map? I'd recommend looking at the spherical-mercator.html example. cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From adrian_gh.popa at romtelecom.ro Thu Nov 5 01:52:22 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Highlighting changes in the KML layer In-Reply-To: <4AF1F0A4.7020605@lisasoft.com> References: <4AEF0FD8.5060100@romtelecom.ro> <7f615c9f0911030011m26b65d5bjbc8393f1d5c5186d@mail.gmail.com> <4AF01354.8080406@romtelecom.ro> <4AF13965.5010002@lisasoft.com> <4AF177BD.8040204@romtelecom.ro> <4AF1F0A4.7020605@lisasoft.com> Message-ID: <4AF27626.7050203@romtelecom.ro> Thanks Roald, I will read on and give it a go. I will post my solution when it's ready (I estimate in about ~1month). Regards, Adrian Roald de Wit wrote: > Hi Adrian, > > When you refresh a layer (someone please correct me if I'm wrong > here), all your features (items) will be replaced with the new ones, > therefore you need to 'manually' keep track of your features. As you > suggested, you could, just before a refresh, store all features (or > feature.ids) in some array, then refresh and compare the new feature > list with the old one. > > The refresh is usually not synchronous, but that does not need to be a > problem: you can register for events ('beforefeaturesadded' for > example) and call your compare function with the list of new features. > You can then loop through them and mark the new ones as new (for > example by saying: feature.attributes.isNew = true). Make sure that > the compare function itself returns true. > > Have a look at what's possible with styling in OpenLayes (it's a bit > of a read): http://docs.openlayers.org/library/feature_styling.html > > So, yes, your plan sounds good! > > Regards, Roald > > > Adrian Popa wrote: >> Hello Roald, >> >> I have a question about marking items as new - I guess they are not >> marked out of the box, right? >> When I do the layer refresh, I just do layer.refresh({force: true}); >> I'm not sure what this does internally, but perhaps I can't count on >> any attributes I set - to be preserved. >> >> Should I build the variable (hash) where I keep attributes as a >> different variable? Or should I keep it in a standalone object? >> >> Also, before I do the refresh - I suspect I need to copy the >> attributes of the current objects, issue a layer refresh and then >> (hoping the refresh is synchroneous) I should go through the new list >> and see if I have new items. If there are, mark them as new (and mark >> other items as 'old'). >> >> Supposing that I do that - what would I need to do to change the >> aspect (change color/make bigger) of the "new" items? >> >> I'm afraid this will consume some memory and resources - but I guess >> I will see when it's ready... >> >> How does my plan sound like? >> Regards, >> Adrian >> >> Roald de Wit wrote: >> >>> Hi Adrian, >>> >>> Adrian Popa wrote: >>> >>>> Thank you for the hint. I suppose I shouldn't expect to see a >>>> working demo of what I need :) >>>> Do you know if the patches presented in ticket 1259 are already >>>> part of openlayers (since the latest version is from january last >>>> year?) >>>> >>> The patches in that ticket are part of OpenLayers since version 2.6, >>> so, yes! >>> >>> I'm not sure if you use styling coming from the KML file or style it >>> all yourself. In your case I think you need to revert to the latter >>> case. You will need to do some magic to find out what features are >>> new and apply a different style to those items. There are few >>> different ways of doing it. One of them might be marking it's >>> 'newness' in an attribute of the new feature(s) and use a rule that >>> checks that attribute in your style map. >>> >>> Regards, >>> >>> Roald >>> >>> >>>> Thanks, >>>> >>>> helmi wrote: >>>> >>>>> The idea from http://trac.openlayers.org/ticket/1259 >>>>> {{{ >>>>> You could create a selectStyle that could be passed to >>>>> Control.SelectFeature quite easily: create a style object, read >>>>> the "highlight" styles, create a FidFilter rule for every feature >>>>> (or groups of features with the same style), use the according >>>>> "highlight" style as symbolizer for the rule, and add the rule to >>>>> the style object >>>>> }}} >>>>> >>>>> helmi03.com >>>>> >>>>> On Tue, Nov 3, 2009 at 12:59 AM, Adrian Popa >>>>> >>>> > wrote: >>>>> >>>>> Hello everyone, >>>>> >>>>> Sorry if this has already been discussed on the list (didn't >>>>> really >>>>> check), but I would like to know if there is a solution (or at >>>>> least a >>>>> plan to implement a feature) that ?"somehow" highlights >>>>> (visually) the >>>>> elements that have been loaded ?through KML - in contrast to the >>>>> elements displayed previously. >>>>> >>>>> I am working at a view that displays alarms on top of the map, >>>>> and if >>>>> there is a large number of alarms, one more alarm coming every 2 >>>>> minutes >>>>> will not catch the attention of the operator... >>>>> >>>>> I need a mechanism to somehow color/animate symbols loaded >>>>> through KML >>>>> which were not previously on the map. Symbols which dissapear >>>>> between >>>>> layer refreshes are not important to me. At the next refresh >>>>> cycle, the >>>>> highlighted symbols would no longer be highlighted (because they >>>>> already >>>>> exist on the map). >>>>> >>>>> I have a way to load KMLs periodically, avoiding the cache, >>>>> but I'm >>>>> missing the "highlight" mechanism. >>>>> >>>>> Hope I have presented my request in an understandable manner, and >>>>> hope >>>>> there is a solution. Maybe a property on the KML layer indicating >>>>> if an >>>>> item is new or not... >>>>> >>>>> Regards, >>>>> Adrian >>>>> >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users@openlayers.org >>>>> http://openlayers.org/mailman/listinfo/users >>>>> >>>>> >>>>> >>> >> >> >> > > From st.sonstiges at web.de Thu Nov 5 03:24:08 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] SLD_BODY too many characters Message-ID: <1257409448740-3950862.post@n2.nabble.com> Hello, I have a Openlayers.layer.wms to show a map. Furthermore I have a sld_body to show not all features on the map. My big problem is, that my sld_body is very large (because of some filters i've added and various styles). I store my sld_body in a variable in javascript and add this variable with merge.newparams to my layer. And there is the problem. Thereby my sld_body contains so much characters, the variable doesn't contain the whole sld_body --> I get no features on my map. When I make my sld_body a bit shorter, everything is working. Then I try to add the sld_body direclty to the layer without mergenewparams later. The same problem. I'm sure that the variable can't store so much characters because I watched my javascript file in firebug and there, the variable didn't contain the whole sld_body. My question is now, if there is any possibility, that i can add my whole sld_body to my javascript. Are there variables, which can contain more characters in java script. (Maybe another solution would be to add 2 sld_bodys to my layer. Is this possible?) Please help me. Regards stash -- View this message in context: http://n2.nabble.com/SLD-BODY-too-many-characters-tp3950862p3950862.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Thu Nov 5 03:27:17 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] SLD_BODY too many characters In-Reply-To: <1257409448740-3950862.post@n2.nabble.com> References: <1257409448740-3950862.post@n2.nabble.com> Message-ID: <4AF28C65.6050300@lisasoft.com> Hi stash, If you dare to 'live on the edge', use the development version of OL, which has the following great addition: a WMS Post Layer [2] That should solve your problem! [1] http://dev.openlayers.org/nightly/OpenLayers.js [2] http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS/Post-js.html Regards, Roald stash wrote: > Hello, > I have a Openlayers.layer.wms to show a map. Furthermore I have a sld_body > to show not all features on the map. > > My big problem is, that my sld_body is very large (because of some filters > i've added and various styles). I store my sld_body in a variable in > javascript and add this variable with merge.newparams to my layer. And there > is the problem. > > Thereby my sld_body contains so much characters, the variable doesn't > contain the whole sld_body --> I get no features on my map. When I make my > sld_body a bit shorter, everything is working. Then I try to add the > sld_body direclty to the layer without mergenewparams later. The same > problem. > > I'm sure that the variable can't store so much characters because I watched > my javascript file in firebug and there, the variable didn't contain the > whole sld_body. > > My question is now, if there is any possibility, that i can add my whole > sld_body to my javascript. Are there variables, which can contain more > characters in java script. > > (Maybe another solution would be to add 2 sld_bodys to my layer. Is this > possible?) > > Please help me. > > Regards > stash > From bartvde at osgis.nl Thu Nov 5 03:28:38 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] SLD_BODY too many characters In-Reply-To: <1257409448740-3950862.post@n2.nabble.com> References: <1257409448740-3950862.post@n2.nabble.com> Message-ID: <26939.145.50.39.11.1257409718.squirrel@webmail.hostingdiscounter.nl> Hi, you are running into the limitation of the url length in the browser. Which WMS are you using? Maybe you can try Layer.WMS.POST (in trunk) if your WMS supports POST? Alternatively, post your string to a custom script on the server, and give back a url which you can use in the GetMap request using the SLD parameter instead. Best regards, Bart > > Hello, > I have a Openlayers.layer.wms to show a map. Furthermore I have a sld_body > to show not all features on the map. > > My big problem is, that my sld_body is very large (because of some filters > i've added and various styles). I store my sld_body in a variable in > javascript and add this variable with merge.newparams to my layer. And > there > is the problem. > > Thereby my sld_body contains so much characters, the variable doesn't > contain the whole sld_body --> I get no features on my map. When I make my > sld_body a bit shorter, everything is working. Then I try to add the > sld_body direclty to the layer without mergenewparams later. The same > problem. > > I'm sure that the variable can't store so much characters because I > watched > my javascript file in firebug and there, the variable didn't contain the > whole sld_body. > > My question is now, if there is any possibility, that i can add my whole > sld_body to my javascript. Are there variables, which can contain more > characters in java script. > > (Maybe another solution would be to add 2 sld_bodys to my layer. Is this > possible?) > > Please help me. > > Regards > stash > -- > View this message in context: > http://n2.nabble.com/SLD-BODY-too-many-characters-tp3950862p3950862.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 st.sonstiges at web.de Thu Nov 5 04:12:32 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] SLD_BODY too many characters In-Reply-To: <4AF28C65.6050300@lisasoft.com> References: <1257409448740-3950862.post@n2.nabble.com> <4AF28C65.6050300@lisasoft.com> Message-ID: <1257412352872-3951057.post@n2.nabble.com> Roald de Wit-2 wrote: > > Hi stash, > > If you dare to 'live on the edge', use the development version of OL, > which has the following great addition: a WMS Post Layer [2] > > That should solve your problem! > > [1] http://dev.openlayers.org/nightly/OpenLayers.js > [2] http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS/Post-js.html > > Regards, Roald > > Hi, thanks for your answer. I imported the new nightly version of openlayers and changed my wms in a wms.post. However, i get the same result. Apparently, my slb_body is to large (because everything works when i made my sld_body a bit shorter.) Do I have to change more (for example params or something else) when i use a wms.post? Because the only thing I changed when i declare my openlayers.layer.wms is that I changed it into wms.post. Regards stash -- View this message in context: http://n2.nabble.com/Problem-SLD-BODY-too-many-characters-tp3950862p3951057.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Thu Nov 5 04:16:34 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] SLD_BODY too many characters In-Reply-To: <1257412352872-3951057.post@n2.nabble.com> References: <1257409448740-3950862.post@n2.nabble.com> <4AF28C65.6050300@lisasoft.com> <1257412352872-3951057.post@n2.nabble.com> Message-ID: <4AF297F2.1060407@lisasoft.com> Hi, stash wrote: > Hi, > thanks for your answer. I imported the new nightly version of openlayers and > changed my wms in a wms.post. However, i get the same result. > > Apparently, my slb_body is to large (because everything works when i made my > sld_body a bit shorter.) > > Do I have to change more (for example params or something else) when i use a > wms.post? Because the only thing I changed when i declare my > openlayers.layer.wms is that I changed it into wms.post. > Have a look at the following example: http://www.openlayers.org/dev/examples/WMSPost.html I hope that helps. If not, you can always consider Bart's alternative solution. Regards, Roald From ahocevar at opengeo.org Thu Nov 5 04:25:10 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] SLD_BODY too many characters In-Reply-To: <1257412352872-3951057.post@n2.nabble.com> References: <1257409448740-3950862.post@n2.nabble.com> <4AF28C65.6050300@lisasoft.com> <1257412352872-3951057.post@n2.nabble.com> Message-ID: <4AF299F6.9040504@opengeo.org> Hi, a few questions: Which browser were you trying? The only browser that requires Layer.WMS.Post is Internet Explorer. Other browsers can handle long URLs in Get requests fine. Layer.WMS.Post uses Get by default in Opera and Firefox, unless you configure it with the usupportedBrowsers option set to []: var layer = new OpenLayers.Layer.WMS.Post("name", "url", { sld_body: "your sld body here" }, { unsupportedBrowsers: [] }); If it works after that change, then your server cannot handle long URLs. If it still does not work, then something is wrong with your SLD. Did you try if it validates? Or if it works when using SLD with a url reference instead of SLD_BODY? Regards, Andreas. stash wrote: > > Roald de Wit-2 wrote: > >> Hi stash, >> >> If you dare to 'live on the edge', use the development version of OL, >> which has the following great addition: a WMS Post Layer [2] >> >> That should solve your problem! >> >> [1] http://dev.openlayers.org/nightly/OpenLayers.js >> [2] http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS/Post-js.html >> >> Regards, Roald >> >> >> > > Hi, > thanks for your answer. I imported the new nightly version of openlayers and > changed my wms in a wms.post. However, i get the same result. > > Apparently, my slb_body is to large (because everything works when i made my > sld_body a bit shorter.) > > Do I have to change more (for example params or something else) when i use a > wms.post? Because the only thing I changed when i declare my > openlayers.layer.wms is that I changed it into wms.post. > > Regards > stash > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From st.sonstiges at web.de Thu Nov 5 04:42:12 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] SLD_BODY too many characters In-Reply-To: <4AF299F6.9040504@opengeo.org> References: <1257409448740-3950862.post@n2.nabble.com> <4AF28C65.6050300@lisasoft.com> <1257412352872-3951057.post@n2.nabble.com> <4AF299F6.9040504@opengeo.org> Message-ID: <1257414132418-3951163.post@n2.nabble.com> Hi, thanks for the very helpful answers. Now it's working. I'm using Firefox but when the wms.post is needed in internet explorer I will leave it in my code. Infact the line unsupportedBrowsers: [] is extremely important, otherwise it doesn't work. Can someone tell me, what this line means? Thanks for your answers. Now I'm happy :) Regards stash -- View this message in context: http://n2.nabble.com/Problem-SLD-BODY-too-many-characters-tp3950862p3951163.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From st.sonstiges at web.de Thu Nov 5 05:22:15 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] store getfeatureinfo results in variables Message-ID: <1257416535105-3951318.post@n2.nabble.com> Hello, with the following code, I get a wms getfeatureinfo request and the information are shown on a window. map.events.register('click', map, function(e) { var url = "http://...:8080/geoserver/wms" + "?REQUEST=GetFeatureInfo" + "&EXCEPTIONS=application/vnd.ogc.se_xml" + "&BBOX=" + map.getExtent().toBBOX() + "&X=" + e.xy.x + "&Y=" + e.xy.y + "&INFO_FORMAT=text/html" + "&QUERY_LAYERS=MY_LAYER" + "&LAYERS=MY_LAYER" + "&FEATURE_COUNT=50" + "&SRS=EPSG:4326" + "&STYLES=" + "&WIDTH=" + map.size.w + "&HEIGHT=" + map.size.h; window.open(url, "getfeatureinfo", "location=0,status=0,scrollbars=1,width=800,height=400"); This is working fine so far. But there is one thing, I don't like. I'm talking about the values I get back. Because every time I get a featureinfo I get some abbreviations (for example 'ger' instead of 'germany'). This is because of the values stored in the database. Because of this I would like to change the values before the window will show them. Is there any possibility to do this. I watched the code in firebug but the only thing i saw was the url (getfeatureinfo request). Can I store the values I get back in variables (to change it manually) and then show it in a window? Please help Regards stash -- View this message in context: http://n2.nabble.com/store-getfeatureinfo-results-in-variables-tp3951318p3951318.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Thu Nov 5 05:48:08 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] store getfeatureinfo results in variables In-Reply-To: <1257416535105-3951318.post@n2.nabble.com> References: <1257416535105-3951318.post@n2.nabble.com> Message-ID: <4AF2AD68.3010301@lisasoft.com> Hi, If you follow the path of WFS GetFeature (as suggested in a previous mail yesterday), you can manipulate the values any way you like, since they are stored as attributes in the features. WMS GetFEatureInfo generally only gives you plain text or HTML results. Getting XML back is sometimes possible too. You could then use the OL XML Format to parse that. Regards, Roald stash wrote: > Hello, > with the following code, I get a wms getfeatureinfo request and the > information are shown on a window. > > map.events.register('click', map, function(e) { > var url = "http://...:8080/geoserver/wms" + > "?REQUEST=GetFeatureInfo" + "&EXCEPTIONS=application/vnd.ogc.se_xml" > + "&BBOX=" + map.getExtent().toBBOX() > + "&X=" + e.xy.x > + "&Y=" + e.xy.y > + "&INFO_FORMAT=text/html" > + "&QUERY_LAYERS=MY_LAYER" > + "&LAYERS=MY_LAYER" > + "&FEATURE_COUNT=50" > + "&SRS=EPSG:4326" > + "&STYLES=" > + "&WIDTH=" + map.size.w > + "&HEIGHT=" + map.size.h; > > window.open(url, "getfeatureinfo", > "location=0,status=0,scrollbars=1,width=800,height=400"); > > This is working fine so far. But there is one thing, I don't like. I'm > talking about the values I get back. Because every time I get a featureinfo > I get some abbreviations (for example 'ger' instead of 'germany'). This is > because of the values stored in the database. > > Because of this I would like to change the values before the window will > show them. Is there any possibility to do this. I watched the code in > firebug but the only thing i saw was the url (getfeatureinfo request). > > Can I store the values I get back in variables (to change it manually) and > then show it in a window? > > Please help > > Regards > stash > > > From st.sonstiges at web.de Thu Nov 5 05:52:36 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] store getfeatureinfo results in variables In-Reply-To: <4AF2AD68.3010301@lisasoft.com> References: <1257416535105-3951318.post@n2.nabble.com> <4AF2AD68.3010301@lisasoft.com> Message-ID: <1257418356742-3951437.post@n2.nabble.com> Roald de Wit-2 wrote: > > Hi, > > If you follow the path of WFS GetFeature (as suggested in a previous > mail yesterday), you can manipulate the values any way you like, since > they are stored as attributes in the features. WMS GetFEatureInfo > generally only gives you plain text or HTML results. Getting XML back is > sometimes possible too. You could then use the OL XML Format to parse > that. > > Regards, Roald > > Hi Roald, thanks for your answer. I know it would be much easier if I used a wfs getfeature instead of a wms getfeatureinfo. But the problem is that my proxyhost doesn't work (I don't know why and I spent so much time in solving this problem), therefore I want to solve my problem with a wms. You wrote that it is sometimes possible to get a xml back even with wms. What do you mean by this? Regards stash -- View this message in context: http://n2.nabble.com/store-getfeatureinfo-results-in-variables-tp3951318p3951437.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Thu Nov 5 06:13:47 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] store getfeatureinfo results in variables In-Reply-To: <1257418356742-3951437.post@n2.nabble.com> References: <1257416535105-3951318.post@n2.nabble.com> <4AF2AD68.3010301@lisasoft.com> <1257418356742-3951437.post@n2.nabble.com> Message-ID: <4AF2B36B.1030400@lisasoft.com> Hi stash, stash wrote: > Hi Roald, > thanks for your answer. I know it would be much easier if I used a wfs > getfeature instead of a wms getfeatureinfo. But the problem is that my > proxyhost doesn't work (I don't know why and I spent so much time in solving > this problem), therefore I want to solve my problem with a wms. > > You wrote that it is sometimes possible to get a xml back even with wms. > What do you mean by this? > Different WMS servers have different output formats for GetFeaturInfo. IIRC you are using GeoServer. If that is correct, you can specify the INFO_FORMAT to be 'application/vnd.ogc.gml', then you could pass the output to the OL GML reader which looks a bit like this: var gmlReader = new OpenLayers.Format.GML(); var features = gmlReader.read(data); // assuming the result of the output is in the variable called data Then you can loop through the features and change the attribute information any way you like and visualise it any way you want. Regards, Roald From tommaso.lavoro at gmail.com Thu Nov 5 07:21:32 2009 From: tommaso.lavoro at gmail.com (totom) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Trouble after upgrading to Geoserver 2.0 In-Reply-To: <1257246487828-3937791.post@n2.nabble.com> References: <1257246487828-3937791.post@n2.nabble.com> Message-ID: <1257423692582-3951780.post@n2.nabble.com> I have 2 namespaces in geoserver, urbis_2 and urbis_dev With urbis_2 ns and prefix, openlayers parses the gml and i see the features on the map. If i use urbis_dev, geoserver replies with a (correct?) xml, but openlayers does not parse it. This is the js code poly = new OpenLayers.Layer.Vector ( 'Pippo', { strategies: [fixedStrategy,saveStrategy ], projection: new OpenLayers.Projection("EPSG:4326"), styleMap: stylemm, protocol: new OpenLayers.Protocol.WFS.v1_1_0( { version: '1.1.0', srsName: 'EPSG:4326', url: 'http://$151.100.152.220/geoserver2/wfs', featureType: 'pippo', featureNS : 'http://151.100.152.220/urbis_dev/', featurePrefix: 'urbis_dev', geometryName: 'the_geom', extractAttribute: true } ), getFeatureByFid: function(fid) { var layer = this; if (!layer) return null; var features = layer.features; if (!features)return null; for (var i = 0; i < features.length; ++i) if (features[i].fid == fid) return features[i]; return null; } } ); This is se response after requesting features in urbis_dev....where is the problem? rosso 1 1 n 589 pippo 1252857959 rosso 1252857959 1 0 0 12.467980384826 41.919139792195 bbbbbb658546 1 1 n 680 tommaso 1253631099 bbbbbb658546 1254063099 5 10 55 12.4915369 41.9045518 -- View this message in context: http://n2.nabble.com/Trouble-after-upgrading-to-Geoserver-2-0-tp3937791p3951780.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu Nov 5 07:23:10 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] SLD_BODY too many characters In-Reply-To: <1257414132418-3951163.post@n2.nabble.com> References: <1257409448740-3950862.post@n2.nabble.com> <4AF28C65.6050300@lisasoft.com> <1257412352872-3951057.post@n2.nabble.com> <4AF299F6.9040504@opengeo.org> <1257414132418-3951163.post@n2.nabble.com> Message-ID: <4AF2C3AE.70007@opengeo.org> Hi, stash wrote: > thanks for the very helpful answers. Now it's working. I'm using Firefox but > when the wms.post is needed in internet explorer I will leave it in my code. > > Infact the line unsupportedBrowsers: [] is extremely important, otherwise it > doesn't work. Can someone tell me, what this line means? > See http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS/Post-js.html#OpenLayers.Layer.WMS.Post.unsupportedBrowsers for an explanation. Basically Layer.WMS.Post can fall back to a Get request for browsers that do not support the iFrame-based approach to use Post requests well. If your requests only work when unsupportedBrowsers is set to an empty array ([]), this means that your server does not support long URLs in Get requests. Regards, Andreas. > Thanks for your answers. Now I'm happy :) > > Regards > stash > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From st.sonstiges at web.de Thu Nov 5 07:48:09 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] store getfeatureinfo results in variables In-Reply-To: <4AF2B36B.1030400@lisasoft.com> References: <1257416535105-3951318.post@n2.nabble.com> <4AF2AD68.3010301@lisasoft.com> <1257418356742-3951437.post@n2.nabble.com> <4AF2B36B.1030400@lisasoft.com> Message-ID: <1257425289470-3951905.post@n2.nabble.com> Roald de Wit-2 wrote: > > Hi stash, > > stash wrote: >> Hi Roald, >> thanks for your answer. I know it would be much easier if I used a wfs >> getfeature instead of a wms getfeatureinfo. But the problem is that my >> proxyhost doesn't work (I don't know why and I spent so much time in >> solving >> this problem), therefore I want to solve my problem with a wms. >> >> You wrote that it is sometimes possible to get a xml back even with wms. >> What do you mean by this? >> > Different WMS servers have different output formats for GetFeaturInfo. > IIRC you are using GeoServer. If that is correct, you can specify the > INFO_FORMAT to be 'application/vnd.ogc.gml', then you could pass the > output to the OL GML reader which looks a bit like this: > > var gmlReader = new OpenLayers.Format.GML(); > > var features = gmlReader.read(data); // assuming the result of the > output is in the variable called data > > Then you can loop through the features and change the attribute > information any way you like and visualise it any way you want. > > Regards, Roald > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > Thanks. That's a good advice. I tried it and I get back a gml with all the features .That's great. But unfortunately I can't read it with my gmlReader. What value do I have to insert at gmlreader.read(data) instead of data so that i can read my output. Thanks for the help. Regards stash -- View this message in context: http://n2.nabble.com/store-getfeatureinfo-results-in-variables-tp3951318p3951905.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From st.sonstiges at web.de Thu Nov 5 09:40:58 2009 From: st.sonstiges at web.de (stash) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] store getfeatureinfo results in variables In-Reply-To: <1257425289470-3951905.post@n2.nabble.com> References: <1257416535105-3951318.post@n2.nabble.com> <4AF2AD68.3010301@lisasoft.com> <1257418356742-3951437.post@n2.nabble.com> <4AF2B36B.1030400@lisasoft.com> <1257425289470-3951905.post@n2.nabble.com> Message-ID: <1257432058267-3952551.post@n2.nabble.com> Roald de Wit-2 wrote: > > > var features = gmlReader.read(data); // assuming the result of the > output is in the variable called data > > Hi, how do I get the result of my output in a variable just like in the example (data). I searched with firebug but I didn't find my gml (which is my info_format). Examples from openlayers work with an xmlhttprequest. This doesn't work in my case because of the not working proxy. Please help Regards stash -- View this message in context: http://n2.nabble.com/store-getfeatureinfo-results-in-variables-tp3951318p3952551.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tiffnay at gmail.com Thu Nov 5 13:22:53 2009 From: tiffnay at gmail.com (TiffL) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] KML data near Africa? Google Maps Projection Problem Repost Message-ID: <1257445373806-3954098.post@n2.nabble.com> Hi! Newbie here. In dire need of help! I really appreciate any comments/pointers. I am not sure why my coordinates, no matter what KML is being served by a webservice ( setDataSource) call, are all plotted near Africa after I put in the options for google projection due to kml data shifting positions after zooming in and out (http://trac.openlayers.org/wiki/SphericalMercator)... :-( //start here function init(){ var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", numZoomLevels: 18, maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508) }; map = new OpenLayers.Map('map', options); var gphy = new OpenLayers.Layer.Google( "Google Street", {'sphericalMercator':true}); var bglayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic', projection: new OpenLayers.Projection("EPSG:4326")}); map.addLayers([gphy, bglayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); OpenLayers.Console.log("initialized"); } function setDataSource() { OpenLayers.Console.log("Setting data source to " + OpenLayers.Util.getElement('loc').value); if (layer != undefined) {map.removeLayer(layer)}; if (selectControl != undefined) {map.removeControl(selectControl)}; // Encode the destination url as a parameter string. var params = OpenLayers.Util.getParameterString({url:OpenLayers.Util.getElement('loc').value}) // Make the http request to the transformer, with the destination url as a parameter. layer = new OpenLayers.Layer.GML("KML", transformerURL + params, { format: OpenLayers.Format.KML, formatOptions: { extractStyles: true, extractAttributes: true, maxDepth: 2, //tried the projection below, had no effect //projection: new OpenLayers.Projection("EPSG:4326"), } }); map.addLayer(layer); selectControl = new OpenLayers.Control.SelectFeature(layer, {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect}); map.addControl(selectControl); selectControl.activate(); } ----- =) -- View this message in context: http://n2.nabble.com/KML-data-near-Africa-Google-Maps-Projection-Problem-Repost-tp3954098p3954098.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Thu Nov 5 22:36:42 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] store getfeatureinfo results in variables In-Reply-To: <1257432058267-3952551.post@n2.nabble.com> References: <1257416535105-3951318.post@n2.nabble.com> <4AF2AD68.3010301@lisasoft.com> <1257418356742-3951437.post@n2.nabble.com> <4AF2B36B.1030400@lisasoft.com> <1257425289470-3951905.post@n2.nabble.com> <1257432058267-3952551.post@n2.nabble.com> Message-ID: <4AF399CA.40607@lisasoft.com> Hi, On 06/11/09 01:40, stash wrote: > Hi, > how do I get the result of my output in a variable just like in the example > (data). I searched with firebug but I didn't find my gml (which is my > info_format). > > Examples from openlayers work with an xmlhttprequest. This doesn't work in > my case because of the not working proxy. > Ah, yes, you open a window with a URL that gets HTML back. If you want the flexibility you were asking for, I think you'll stay stuck until you overcome the proxy hurdle. Where do you serve your HTML from? Apache on port 80? And your GeoServer is on port 8080? If you place your proxy.cgi in your cgi-bin directory, it should work (make sure its exececutable). Or otherwise, why not setup Apache to proxy pass all requests to /geoserver/* to http://localhost:8080/geoserver/*? Then you don't need a proxy script at all. Regards, Roald -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. From andre.steenveld at gmail.com Fri Nov 6 09:20:32 2009 From: andre.steenveld at gmail.com (Andre Steenveld) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Dojo and OpenLayers mashup Message-ID: <143ad7010911060620w65ab8d2btd819087f917ab84f@mail.gmail.com> Hello fellow JS programmers, I have been working on integrating openlayers into a dojo widget. This widget can be configured with an XML file and can act and behave like a dojo widget as well as an instance of OpenLayers.Map. I am planning to write some code that makes it possible to configure the widget declaratively or via JSON. This is all fine and well and works, with one very important exception. Panning does not work, more specific there are layers in which it doesn't work. Panning works in the Google layers because the drag and drop functionality is delegated to the Google layer. However for the "native" openlayers layers the events do fire but the map is not updated. Panning and then zooming in or out will cause the map to center on the correct point and so will panning and then resizing the window. It is not limited to a specific browser, I have tested FF3.5, IE8, IE7 emulation and Opera 10 all running on a windows XP box. My hypothesis is that there is a mix up with some events that are attached via dijit._Widget and OpenLayers.Map, but I can't find exactly where or how to fix it properly. If anyone has any suggestions at all I'd love to hear them. Any other feedback or suggestion are welcome as well. For a demo you can point the browser of your choice to http://bonsai.nmpo.nl/experiments/mapviewer.v2.html For a zip file with the source, http://bonsai.nmpo.nl/experiments/viewer.zip. If you want to see more layers you can uncomment the layers in the XML file, they all work and have the data needed to fill them is supplied in the zip as well. This message has been sent to the oplayers and dojo mailing lists. Best regards, Andre Steenveld -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091106/3be3afe8/attachment.html From grigoregeorge631980 at yahoo.co.uk Fri Nov 6 09:23:41 2009 From: grigoregeorge631980 at yahoo.co.uk (pericoltoxic) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Mozilla vs. IE8 Message-ID: <1257517421156-3959014.post@n2.nabble.com> I use GeoServer 2.0-RC1. In geoserver i run from layer preview, topp:tasmania_roads. I copy the source of this file in a html file. I run the html file in Mozilla 3.5.4 and IE8. In Mozilla the name of the layer it's not showed but in IE8 it's showed. What is the explanation??? The result of the code run in Mozilla http://n2.nabble.com/file/n3959014/mozilla.jpg IE8 http://n2.nabble.com/file/n3959014/ie8.jpg -- View this message in context: http://n2.nabble.com/Mozilla-vs-IE8-tp3959014p3959014.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/20091106/205772b8/attachment.html From crschmidt at metacarta.com Fri Nov 6 09:36:19 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Mozilla vs. IE8 In-Reply-To: <1257517421156-3959014.post@n2.nabble.com> References: <1257517421156-3959014.post@n2.nabble.com> Message-ID: <20091106143619.GR21215@metacarta.com> On Fri, Nov 06, 2009 at 06:23:41AM -0800, pericoltoxic wrote: > > I use GeoServer 2.0-RC1. > In geoserver i run from layer preview, topp:tasmania_roads. I copy the > source of this file in a html file. I run the html file in Mozilla 3.5.4 > and IE8. In Mozilla the name of the layer it's not showed but in IE8 it's > showed. > What is the explanation??? Are you running this file from a "file:///" location? I believe that code uses XMLHttpRequest; allowing requests from 'file' to GeoServer seems like a security hole that I can imagine mozilla would have fixed, but IE might allow in some security settings. -- Chris > > > > The result of the code run in Mozilla > > http://n2.nabble.com/file/n3959014/mozilla.jpg > > IE8 > > http://n2.nabble.com/file/n3959014/ie8.jpg > > -- > View this message in context: http://n2.nabble.com/Mozilla-vs-IE8-tp3959014p3959014.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Nov 6 09:40:15 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Dojo and OpenLayers mashup In-Reply-To: <143ad7010911060620w65ab8d2btd819087f917ab84f@mail.gmail.com> References: <143ad7010911060620w65ab8d2btd819087f917ab84f@mail.gmail.com> Message-ID: <20091106144015.GS21215@metacarta.com> On Fri, Nov 06, 2009 at 03:20:32PM +0100, Andre Steenveld wrote: > My hypothesis is that there is a mix up with some events that are attached > via dijit._Widget and OpenLayers.Map, but I can't find exactly where or how > to fix it properly. > > If anyone has any suggestions at all I'd love to hear them. Any other > feedback or suggestion are welcome as well. For a demo you can point the > browser of your choice to > http://bonsai.nmpo.nl/experiments/mapviewer.v2.html My guess is that you have not configured your max extent and maxresolution correctly. However, I can't test this, because I can't find where any of the code that initailizes this map is, or how I can access the OpenLayers.Map object from the console. -- Chris > For a zip file with the source, http://bonsai.nmpo.nl/experiments/viewer.zip. > If you want to see more layers you can uncomment the layers in the XML file, > they all work and have the data needed to fill them is supplied in the zip > as well. > > This message has been sent to the oplayers and dojo mailing lists. > > Best regards, Andre Steenveld > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From andre.steenveld at gmail.com Fri Nov 6 10:17:35 2009 From: andre.steenveld at gmail.com (Andre Steenveld) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Dojo and OpenLayers mashup In-Reply-To: <143ad7010911060715l714dac45j313dce3ccad3b02e@mail.gmail.com> References: <143ad7010911060620w65ab8d2btd819087f917ab84f@mail.gmail.com> <20091106144015.GS21215@metacarta.com> <143ad7010911060715l714dac45j313dce3ccad3b02e@mail.gmail.com> Message-ID: <143ad7010911060717r6cab8d66y2cb60098b20fa7b9@mail.gmail.com> > > My guess is that you have not configured your max extent and maxresolution > correctly. However, I can't test this, because I can't find where any > of the code that initailizes this map is, or how I can access the > OpenLayers.Map object from the console. > > -- Chris > > You can find the OL object via the following code "dijit.byId( "map" )" this will return you the widget object which inherits from the OpenLayers.Map class. The code for this class can be found in the zip file in ./nmpo/geo/MapViewer.js The actual configuring happens from line 120 to 155. The configuration class can be found in ./nmpo/geo/Config.js wich parses the XML file and produces the layers, controls, config object and an additional config object. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091106/4feb7954/attachment.html From crschmidt at metacarta.com Fri Nov 6 11:28:51 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Dojo and OpenLayers mashup In-Reply-To: <143ad7010911060717r6cab8d66y2cb60098b20fa7b9@mail.gmail.com> References: <143ad7010911060620w65ab8d2btd819087f917ab84f@mail.gmail.com> <20091106144015.GS21215@metacarta.com> <143ad7010911060715l714dac45j313dce3ccad3b02e@mail.gmail.com> <143ad7010911060717r6cab8d66y2cb60098b20fa7b9@mail.gmail.com> Message-ID: <20091106162851.GA24003@metacarta.com> On Fri, Nov 06, 2009 at 04:17:35PM +0100, Andre Steenveld wrote: > > > > My guess is that you have not configured your max extent and maxresolution > > correctly. However, I can't test this, because I can't find where any > > of the code that initailizes this map is, or how I can access the > > OpenLayers.Map object from the console. > > > > -- Chris > > > > > > You can find the OL object via the following code "dijit.byId( "map" )" this > will return you the widget object which inherits from the OpenLayers.Map > class. The code for this class can be found in the zip file in > ./nmpo/geo/MapViewer.js The actual configuring happens from line 120 to 155. > The configuration class can be found in ./nmpo/geo/Config.js wich parses the > XML file and produces the layers, controls, config object and an additional > config object. My theory was wrong. I don't have any other suggestions, sorry. -- CHris From diegomrsantos at gmail.com Fri Nov 6 13:19:00 2009 From: diegomrsantos at gmail.com (Diego Marin Santos) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] problem when constructing a filter Message-ID: <90a13c760911061019t54827887l90ae94d261bd0fd8@mail.gmail.com> I have a table A that has nongeographic fields and one geographic field that holds a spatial position. This table has a relationship with another table B that holds only nongeographic fields. I've constructed a vector layer using the feature A, but I need to construct a filter using a property of the table B. How can i accomplish this? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091106/f23f25cd/attachment.html From ryantxu at gmail.com Fri Nov 6 15:35:00 2009 From: ryantxu at gmail.com (Ryan McKinley) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Insert an higher level overview map on a WMS-C map? Message-ID: <176776ee0911061235l2efc8ed1g9a4f5e08a5ff6eb0@mail.gmail.com> Hi- I'm looking at tilecache and WMS-C, it looks really good except that I need to display a full world overview in a 300x300 box. For the WGS84 (EPSG:4326 ) map config, the top level is 2x(256px) big. Is there any clever way to insert an overview map as the top level of a cached map service? I can imagine something where I swap base layer definitions if you zoom out, but that seems like it would be nice to have something that worked transparently. Thanks for any pointers Ryan From crschmidt at metacarta.com Fri Nov 6 17:37:23 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Insert an higher level overview map on a WMS-C map? In-Reply-To: <176776ee0911061235l2efc8ed1g9a4f5e08a5ff6eb0@mail.gmail.com> References: <176776ee0911061235l2efc8ed1g9a4f5e08a5ff6eb0@mail.gmail.com> Message-ID: <20091106223723.GB24003@metacarta.com> On Fri, Nov 06, 2009 at 03:35:00PM -0500, Ryan McKinley wrote: > Hi- > > I'm looking at tilecache and WMS-C, it looks really good except that I > need to display a full world overview in a 300x300 box. > > For the WGS84 (EPSG:4326 ) map config, the top level is 2x(256px) big. You can use whatever tile size you want within OpenLayers and TileCache, you just won't match up to the tile profiles of everyone else if you do something unusual. > Is there any clever way to insert an overview map as the top level of > a cached map service? I can imagine something where I swap base layer > definitions if you zoom out, but that seems like it would be nice to > have something that worked transparently. > > Thanks for any pointers > Ryan > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From bavrik at mail.ru Sun Nov 8 16:29:25 2009 From: bavrik at mail.ru (Altair) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] How to convert feature position to browser coordinate ? Message-ID: <1257715765280-3969910.post@n2.nabble.com> hi list. I have feature on the vector layer, how to get feature position in browser coordinates(x,y) in pixel ? -- View this message in context: http://n2.nabble.com/How-to-convert-feature-position-to-browser-coordinate-tp3969910p3969910.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From contact at trouvetongull.info Mon Nov 9 05:53:33 2009 From: contact at trouvetongull.info (TrouveTonGull) Date: Wed Sep 1 17:18:10 2010 Subject: [OpenLayers-Users] Limit number of items they are displayed Message-ID: <4AF7F4AD.9070206@trouvetongull.info> Hello, When i read a XML with GeoRSS, i want to display only five items , how to limit that? Thanks, Fred From ahocevar at opengeo.org Mon Nov 9 07:08:51 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] How to convert feature position to browser coordinate ? In-Reply-To: <1257715765280-3969910.post@n2.nabble.com> References: <1257715765280-3969910.post@n2.nabble.com> Message-ID: <4AF80653.2000801@opengeo.org> Altair wrote: > hi list. > I have feature on the vector layer, how to get feature position in browser > coordinates(x,y) in pixel ? > var geom = feature.geometry; var vertices = geom.getVertices(); var v, ll; for(var i=0; i References: <4AF7F4AD.9070206@trouvetongull.info> Message-ID: <4AF806F5.5030202@opengeo.org> TrouveTonGull wrote: > Hello, > > When i read a XML with GeoRSS, i want to display only five items , how > to limit that? > How would you read a XML with GeoRSS? If you are doing WFS, you can use maxFeatures to limit the number of results. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From contact at trouvetongull.info Mon Nov 9 08:12:57 2009 From: contact at trouvetongull.info (TrouveTonGull) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Limit number of items they are displayed In-Reply-To: <4AF806F5.5030202@opengeo.org> References: <4AF7F4AD.9070206@trouvetongull.info> <4AF806F5.5030202@opengeo.org> Message-ID: <4AF81559.80702@trouvetongull.info> On 09.11.2009 13:11, Andreas Hocevar wrote: > > How would you read a XML with GeoRSS? If you are doing WFS, you can use > maxFeatures to limit the number of results. > > Regards, > Andreas. > Hi Andreas, i read a xml file like this: var yelp = new OpenLayers.Icon("radar.png", new OpenLayers.Size(35,35)); var newl1 = new OpenLayers.Layer.GeoRSS( 'Agenda', 'events.xml', {'icon':yelp}, maxfeatures: 10); map.addLayer(newl1, popupClass); I'm not sure that maxfeatures is at the correct place (don't works actually) :) The file event.xml have 100-200 items , so i want just show the first 10 items Thanks, Fred From bartvde at osgis.nl Mon Nov 9 08:15:01 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Limit number of items they are displayed In-Reply-To: <4AF81559.80702@trouvetongull.info> References: <4AF7F4AD.9070206@trouvetongull.info> <4AF806F5.5030202@opengeo.org> <4AF81559.80702@trouvetongull.info> Message-ID: <52819.145.50.39.11.1257772501.squirrel@webmail.hostingdiscounter.nl> Why not edit the XML file and ditch the other features? Best regards, Bart > On 09.11.2009 13:11, Andreas Hocevar wrote: >> >> How would you read a XML with GeoRSS? If you are doing WFS, you can use >> maxFeatures to limit the number of results. >> >> Regards, >> Andreas. >> > > Hi Andreas, > > i read a xml file like this: > > var yelp = new OpenLayers.Icon("radar.png", new > OpenLayers.Size(35,35)); > var newl1 = new OpenLayers.Layer.GeoRSS( 'Agenda', 'events.xml', > {'icon':yelp}, maxfeatures: 10); > map.addLayer(newl1, popupClass); > > > I'm not sure that maxfeatures is at the correct place (don't works > actually) :) > > The file event.xml have 100-200 items , so i want just show the first 10 > items > > Thanks, > > Fred > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From contact at trouvetongull.info Mon Nov 9 08:47:53 2009 From: contact at trouvetongull.info (TrouveTonGull) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Limit number of items they are displayed In-Reply-To: <52819.145.50.39.11.1257772501.squirrel@webmail.hostingdiscounter.nl> References: <4AF7F4AD.9070206@trouvetongull.info> <4AF806F5.5030202@opengeo.org> <4AF81559.80702@trouvetongull.info> <52819.145.50.39.11.1257772501.squirrel@webmail.hostingdiscounter.nl> Message-ID: <4AF81D89.8010705@trouvetongull.info> On 09.11.2009 14:15, bartvde@osgis.nl wrote: > Why not edit the XML file and ditch the other features? > > Best regards, > Bart > It's a external file, i can't edit it. From adrian_gh.popa at romtelecom.ro Mon Nov 9 09:26:30 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] What image types are supported as icons served through KML? Message-ID: <4AF82696.4060302@romtelecom.ro> Hello everyone, I just want to know - what image types are supported to be imported through KML? I would like to convert my icons from PNG to SVG (which looks better when scaled) - but I'm not sure if it will work. Is the limitation based only on browser type (and what it can render)? Or are there other limitations I should know about? Thanks, Adrian From crschmidt at metacarta.com Mon Nov 9 09:32:48 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] What image types are supported as icons served through KML? In-Reply-To: <4AF82696.4060302@romtelecom.ro> References: <4AF82696.4060302@romtelecom.ro> Message-ID: <20091109143248.GC12307@metacarta.com> On Mon, Nov 09, 2009 at 04:26:30PM +0200, Adrian Popa wrote: > Hello everyone, > > I just want to know - what image types are supported to be imported > through KML? I would like to convert my icons from PNG to SVG (which > looks better when scaled) - but I'm not sure if it will work. I don't believe KML, as a format, allows SVG markers... does it? In any case, OpenLayers would not be able to render anything other than a standard image (something you can put in an tag) as an externalGraphic, which is how KML files with icons are parsed. -- Chris > Is the limitation based only on browser type (and what it can render)? > Or are there other limitations I should know about? > > Thanks, > Adrian > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From dtoto at pdsg.com Mon Nov 9 14:11:41 2009 From: dtoto at pdsg.com (Drew Toto) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Graphic line stroking? Message-ID: <81E943E672D0C44EA9BFDCCC34B3B1C1D7070A@cfmail.corp.crossflo.com> Hi all- I've done a lot of research in the past week on trying to figure out a way to render lines using a repeating graphic or pattern for the stroke. >From what I can tell, it doesn't look like this feature is supported currently, as the underlying implementations (SVG, VML, Canvas) present problems and/or limitations. Does anyone have any ideas or advice for accomplishing this feat? I've considered a sloppy hack for repeating basic patterns... define a pattern and an offset, then at each offset on the line, calculate new points based on the pattern and insert them into the line's point collection. This would add a significant number of points to the line (especially with a complex pattern) and doesn't seem like a clean solution at all. Any comments are welcomed. Thanks. From pedropbaracho at gmail.com Mon Nov 9 14:15:43 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Vector Layer, WFS Protocol and BBOX strategy problem Message-ID: <5e3c00490911091115x6fe11590vdb9e8b1f1e60c180@mail.gmail.com> Hey guys, I spent the last two days trying to figure out how to solve this problem and I couldn't. I have Spherical Mercator tutorial on reprojecting vector data and I still can't figure out what I am doing wrong. I am trying to overlay on Google Layer some vector data using WFS Protocol. My problem is that whatever I do, OpenLayers request data from the server using BBOX Strategy with projection EPSG:900913 but my data is on projection EPSG:29193 and that gives me 2 problems: 1- The server gives a null response; or 2- The server gives back the xml with the data, but the projection is on 29193 and OpenLayers thinks it is on 900913, so it displays in the wrong place. Here is the code for the map options: var options = { maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), numZoomLevels:18, maxResolution:156543.0339, units:'m', projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326"), controls: [ new OpenLayers.Control.PanZoom(), new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.LayerSwitcher() ] }; And here is the code for the layer options: var layer = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy], protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", featureType: "Regional", featureNS: "http://prodabel1062.pbh:8080/avis", geometryName: "GEOLOC", srsName: "EPSG:29193" }), projection: new OpenLayers.Projection("EPSG:29193") }); As it is, I get null response from the server. And if I change the layer projection to "EPSG:900913", I get the response, but no drawing (as it will be in the wrong projection). I have seen a thread in this list from Jachym Cepicky where he defined a handler for preFeatureInsert event and reprojected his vector data "manually". As I understand (from http://docs.openlayers.org/library/spherical_mercator.html#reprojecting-vector-data) this shouldn't be necessary, but right now I feel that is my only option left. Would you guys mind sheding some light over my problem? Thanks, Pedro. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091109/197c7023/attachment.html From crschmidt at metacarta.com Mon Nov 9 14:56:38 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Graphic line stroking? In-Reply-To: <81E943E672D0C44EA9BFDCCC34B3B1C1D7070A@cfmail.corp.crossflo.com> References: <81E943E672D0C44EA9BFDCCC34B3B1C1D7070A@cfmail.corp.crossflo.com> Message-ID: <20091109195638.GF12307@metacarta.com> On Mon, Nov 09, 2009 at 11:11:41AM -0800, Drew Toto wrote: > Hi all- > > I've done a lot of research in the past week on trying to figure out a > way to render lines using a repeating graphic or pattern for the stroke. > From what I can tell, it doesn't look like this feature is supported > currently, as the underlying implementations (SVG, VML, Canvas) present > problems and/or limitations. Correct. (I don't have any advice on this, just wanted to confirm that OL doesn't support this at this time.) Regards, -- Christopher Schmidt MetaCarta From ahocevar at opengeo.org Mon Nov 9 15:40:26 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Vector Layer, WFS Protocol and BBOX strategy problem In-Reply-To: <5e3c00490911091115x6fe11590vdb9e8b1f1e60c180@mail.gmail.com> References: <5e3c00490911091115x6fe11590vdb9e8b1f1e60c180@mail.gmail.com> Message-ID: <4AF87E3A.8020404@opengeo.org> Hi, WFS 1.0.0 does not support on-the-fly reprojection. You have to use WFS 1.1.0, which is e.g. supported by GeoServer. And you have to specify the version on the protocol: Pedro Baracho wrote: > var layer = new OpenLayers.Layer.Vector("WFS", { > strategies: [new OpenLayers.Strategy.BBOX(), > saveStrategy], > protocol: new OpenLayers.Protocol.WFS({ version: "1.1.0", > url: "http://localhost:8080/geoserver/wfs", > featureType: "Regional", > featureNS: "http://prodabel1062.pbh:8080/avis", > geometryName: "GEOLOC", > srsName: "EPSG:29193" > }), > projection: new OpenLayers.Projection("EPSG:29193") > }); > Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From apestgas2 at yahoo.com.hk Mon Nov 9 19:51:04 2009 From: apestgas2 at yahoo.com.hk (Aypes2) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] ScaleLine color & Scalebar Message-ID: <1257814264908-3976972.post@n2.nabble.com> Dear all, I'd like to ask how to change to color of scaleline (OpenLayers.layer.ScaleLine)? It is displayed in black but my blackground color is also black in color. Apart from that, I found a example of using scalebar: http://dev.openlayers.org/addins/scalebar/trunk/examples/scalebar-custom.html The scalebar looks more attractive. But if I use it, how do I place the scalebar at the lower left corner of the map, and make it overlapping the map? Thanks, Aypes -- View this message in context: http://n2.nabble.com/ScaleLine-color-Scalebar-tp3976972p3976972.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adrian_gh.popa at romtelecom.ro Tue Nov 10 01:36:30 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] What image types are supported as icons served through KML? In-Reply-To: <20091109143248.GC12307@metacarta.com> References: <4AF82696.4060302@romtelecom.ro> <20091109143248.GC12307@metacarta.com> Message-ID: <4AF909EE.70008@romtelecom.ro> Thank you, Then, based on your experience can you recommend a file format for my markers that would make them look good if I use the scale parameter? I guess the img parameter uses just raster image types - not vector images... Right now I use png... If memory serves me well (usually it doesn't) there is a file format that allows the user to embed different sizes of a symbol in the same file (e.g. 16x16/32x32/48x48) and the rendering program can choose the size that fits best... Am I right? Or is this functionality actually done with multiple files? Thanks, Adrian Christopher Schmidt wrote: > On Mon, Nov 09, 2009 at 04:26:30PM +0200, Adrian Popa wrote: > >> Hello everyone, >> >> I just want to know - what image types are supported to be imported >> through KML? I would like to convert my icons from PNG to SVG (which >> looks better when scaled) - but I'm not sure if it will work. >> > > I don't believe KML, as a format, allows SVG markers... does it? > > In any case, OpenLayers would not be able to render anything other than > a standard image (something you can put in an tag) as an externalGraphic, > which is how KML files with icons are parsed. > > -- Chris > > >> Is the limitation based only on browser type (and what it can render)? >> Or are there other limitations I should know about? >> >> Thanks, >> Adrian >> >> _______________________________________________ >> 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/20091110/c5533730/attachment.html From alessandro.ronchi at soasi.com Tue Nov 10 03:21:14 2009 From: alessandro.ronchi at soasi.com (Alessandro Ronchi) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] White band inside maps Message-ID: Do you know what can cause those white bands on this openlayers app: http://ambiente.comune.forli.fc.it/antenne/mappa/ ? -- Alessandro Ronchi SOASI Sviluppo Software e Sistemi Open Source http://www.soasi.com http://www.linkedin.com/in/ronchialessandro From roald.dewit at lisasoft.com Tue Nov 10 03:49:12 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] White band inside maps In-Reply-To: References: Message-ID: <4AF92908.3030808@lisasoft.com> Alessandro Ronchi wrote: > Do you know what can cause those white bands on this openlayers app: > http://ambiente.comune.forli.fc.it/antenne/mappa/ > > ? > .content img { margin: ... } :-D Regards, Roald From wvick at europa.uk.com Tue Nov 10 05:31:08 2009 From: wvick at europa.uk.com (Warren Vick) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Broken image for no tile, on Chrome Message-ID: I've just noticed that Chrome has a different behaviour to other browsers when OL is using a TMS layer and there is no tile present. While IE and FF show nothing, Chrome shows an ugly broken image icon. Anyone know how this can be avoided? /Warren From wvick at europa.uk.com Tue Nov 10 05:37:18 2009 From: wvick at europa.uk.com (Warren Vick) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] OL on Win7 with touch i/f Message-ID: Now Windows 7 is out (like it or not), there seem to be even more touch screen all-in-one PCs available. I was playing with quite a nice Sony 24" model last night, although unfortunately it was not connect to the Internet. I know that certain actions are connected to mouse events. e.g. double tap = double click, touch-drag-release = click-drag-release, which I guess means that OL-based apps will run quite nicely. But, what about the two finger gestures for "in" and "out". Are these mapped to the scroll wheel? If not, can these gestures be picked up in JS so that OL can include zoom in/out support for them? /Warren From ahocevar at opengeo.org Tue Nov 10 06:03:10 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Broken image for no tile, on Chrome In-Reply-To: References: Message-ID: <4AF9486E.5080304@opengeo.org> Warren Vick wrote: > I've just noticed that Chrome has a different behaviour to other browsers when OL is using a TMS layer and there is no tile present. While IE and FF show nothing, Chrome shows an ugly broken image icon. Anyone know how this can be avoided? > For OpenLayers 2.8, set the following after the script tag that loads OpenLayers.js: OpenLayers.Util.onImageLoadErrorColor = "transparent"; For OpenLayers SVN (trunk), set the following as your last CSS definition, and after the script tag that loads OpenLayers.js: .olImageLoadError { background-color: transparent; } Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From pedropbaracho at gmail.com Tue Nov 10 07:22:08 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Vector Layer, WFS Protocol and BBOX strategy problem In-Reply-To: <4AF87E3A.8020404@opengeo.org> References: <5e3c00490911091115x6fe11590vdb9e8b1f1e60c180@mail.gmail.com> <4AF87E3A.8020404@opengeo.org> Message-ID: <5e3c00490911100422u40cd0c2evf2b1f4f9a83dc9ab@mail.gmail.com> Thanks for the reply. I changed to 1.1.0, but I am still having problems with projections. The BBOX filter of the request is being built with weird numbers on it: GEOLOC-4987936.2379319 -2307634.0730985-4797149.4153663 -2213769.4023813 Those numbers don't make any sense in EPSG:29193 ( http://spatialreference.org/ref/epsg/29193/) The bounds should be limited to: 166020.2387, 7087605.5418, 833979.7613, 10000000.0000, and I am seeing some negative numbers. I also changed the displayProjection on the map to EPSG:29193 and those weird numbers are confirmed by OpenLayers.Control.MousePosition. My guess is that there is some problem with the reprojection routine from 900913 to 29193. I am also guessing this may be because 29193 is limited to a region of the globe while 900913 is a world-wide projection. Does it make sense? I don't know much about cartography and projections and I didn't dig in OpenLayers code yet. Do you have any other hint for me? On Mon, Nov 9, 2009 at 6:40 PM, Andreas Hocevar wrote: > Hi, > > WFS 1.0.0 does not support on-the-fly reprojection. You have to use WFS > 1.1.0, which is e.g. supported by GeoServer. And you have to specify the > version on the protocol: > > Pedro Baracho wrote: > > var layer = new OpenLayers.Layer.Vector("WFS", { > > strategies: [new OpenLayers.Strategy.BBOX(), > > saveStrategy], > > protocol: new OpenLayers.Protocol.WFS({ > version: "1.1.0", > > url: "http://localhost:8080/geoserver/wfs", > > featureType: "Regional", > > featureNS: "http://prodabel1062.pbh:8080/avis", > > geometryName: "GEOLOC", > > srsName: "EPSG:29193" > > }), > > projection: new OpenLayers.Projection("EPSG:29193") > > }); > > > > > Regards, > Andreas. > > -- > 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/20091110/a5fa6996/attachment.html From ahocevar at opengeo.org Tue Nov 10 07:37:02 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Vector Layer, WFS Protocol and BBOX strategy problem In-Reply-To: <5e3c00490911100422u40cd0c2evf2b1f4f9a83dc9ab@mail.gmail.com> References: <5e3c00490911091115x6fe11590vdb9e8b1f1e60c180@mail.gmail.com> <4AF87E3A.8020404@opengeo.org> <5e3c00490911100422u40cd0c2evf2b1f4f9a83dc9ab@mail.gmail.com> Message-ID: <5b021dd0911100437mcdeccddoce2bc5203ba3d3d0@mail.gmail.com> Hi, do you have proj4js.js included in your html page? See http://trac.openlayers.org/wiki/Documentation/Dev/proj4js OpenLayers out of the box can only transform between EPSG:4326 and EPSG:900913. Regards, Andreas. On 11/10/09, Pedro Baracho wrote: > Thanks for the reply. > > I changed to 1.1.0, but I am still having problems with projections. > > The BBOX filter of the request is being built with weird numbers on it: > > GEOLOC xmlns:gml="http://www.opengis.net/gml" > srsName="EPSG:29193">-4987936.2379319 > -2307634.0730985-4797149.4153663 > -2213769.4023813 > > Those numbers don't make any sense in EPSG:29193 ( > http://spatialreference.org/ref/epsg/29193/) > The bounds should be limited to: 166020.2387, 7087605.5418, 833979.7613, > 10000000.0000, and I am seeing some negative numbers. > > I also changed the displayProjection on the map to EPSG:29193 and those > weird numbers are confirmed by OpenLayers.Control.MousePosition. > > My guess is that there is some problem with the reprojection routine from > 900913 to 29193. I am also guessing this may be because 29193 is limited to > a region of the globe while 900913 is a world-wide projection. Does it make > sense? I don't know much about cartography and projections and I didn't dig > in OpenLayers code yet. > > Do you have any other hint for me? > > On Mon, Nov 9, 2009 at 6:40 PM, Andreas Hocevar wrote: > >> Hi, >> >> WFS 1.0.0 does not support on-the-fly reprojection. You have to use WFS >> 1.1.0, which is e.g. supported by GeoServer. And you have to specify the >> version on the protocol: >> >> Pedro Baracho wrote: >> > var layer = new OpenLayers.Layer.Vector("WFS", { >> > strategies: [new OpenLayers.Strategy.BBOX(), >> > saveStrategy], >> > protocol: new OpenLayers.Protocol.WFS({ >> version: "1.1.0", >> > url: "http://localhost:8080/geoserver/wfs", >> > featureType: "Regional", >> > featureNS: "http://prodabel1062.pbh:8080/avis", >> > geometryName: "GEOLOC", >> > srsName: "EPSG:29193" >> > }), >> > projection: new OpenLayers.Projection("EPSG:29193") >> > }); >> > >> >> >> Regards, >> Andreas. >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From crschmidt at metacarta.com Tue Nov 10 07:44:22 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] OL on Win7 with touch i/f In-Reply-To: References: Message-ID: <20091110124422.GI12307@metacarta.com> On Tue, Nov 10, 2009 at 10:37:18AM +0000, Warren Vick wrote: > Now Windows 7 is out (like it or not), there seem to be even more touch > screen all-in-one PCs available. I was playing with quite a nice Sony 24" > model last night, although unfortunately it was not connect to the Internet. > I know that certain actions are connected to mouse events. e.g. double tap = > double click, touch-drag-release = click-drag-release, which I guess means > that OL-based apps will run quite nicely. But, what about the two finger > gestures for "in" and "out". Are these mapped to the scroll wheel? If not, > can these gestures be picked up in JS so that OL can include zoom in/out > support for them? It seems like your'e asking the OpenLayers mailing list how Windows 7 handles touch events. It seems like there are probably better forums for asking (and getting an answer to) that question... Regards, -- Christopher Schmidt MetaCarta From wvick at europa.uk.com Tue Nov 10 07:52:43 2009 From: wvick at europa.uk.com (Warren Vick) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Broken image for no tile, on Chrome In-Reply-To: <4AF9486E.5080304@opengeo.org> References: <4AF9486E.5080304@opengeo.org> Message-ID: 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). Regards, Warren -----Original Message----- From: Andreas Hocevar [mailto:ahocevar@opengeo.org] Sent: 10 November 2009 11:03 AM To: Warren Vick Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Broken image for no tile, on Chrome Warren Vick wrote: > I've just noticed that Chrome has a different behaviour to other browsers when OL is using a TMS layer and there is no tile present. While IE and FF show nothing, Chrome shows an ugly broken image icon. Anyone know how this can be avoided? > For OpenLayers 2.8, set the following after the script tag that loads OpenLayers.js: OpenLayers.Util.onImageLoadErrorColor = "transparent"; For OpenLayers SVN (trunk), set the following as your last CSS definition, and after the script tag that loads OpenLayers.js: .olImageLoadError { background-color: transparent; } Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From wvick at europa.uk.com Tue Nov 10 08:00:48 2009 From: wvick at europa.uk.com (Warren Vick) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] OL on Win7 with touch i/f In-Reply-To: <20091110124422.GI12307@metacarta.com> References: <20091110124422.GI12307@metacarta.com> Message-ID: Hello Christopher, My question was specific to Win7 gesture support on OL, and whether all gestures map to standard mouse functionality picked up by OL. I think there's a better chance that someone here as tried OL on Win7 here than in general Windows forums, but granted I'll also seek information on the zoom in/out gestures elsewhere too. If some additional dev is needed, I think it would be a worthy feature to commission. Regards, Warren -----Original Message----- From: Christopher Schmidt [mailto:crschmidt@metacarta.com] Sent: 10 November 2009 12:44 PM To: Warren Vick Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] OL on Win7 with touch i/f On Tue, Nov 10, 2009 at 10:37:18AM +0000, Warren Vick wrote: > Now Windows 7 is out (like it or not), there seem to be even more touch > screen all-in-one PCs available. I was playing with quite a nice Sony 24" > model last night, although unfortunately it was not connect to the Internet. > I know that certain actions are connected to mouse events. e.g. double tap = > double click, touch-drag-release = click-drag-release, which I guess means > that OL-based apps will run quite nicely. But, what about the two finger > gestures for "in" and "out". Are these mapped to the scroll wheel? If not, > can these gestures be picked up in JS so that OL can include zoom in/out > support for them? It seems like your'e asking the OpenLayers mailing list how Windows 7 handles touch events. It seems like there are probably better forums for asking (and getting an answer to) that question... Regards, -- Christopher Schmidt MetaCarta From pedropbaracho at gmail.com Tue Nov 10 08:06:38 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Vector Layer, WFS Protocol and BBOX strategy problem In-Reply-To: <5b021dd0911100437mcdeccddoce2bc5203ba3d3d0@mail.gmail.com> References: <5e3c00490911091115x6fe11590vdb9e8b1f1e60c180@mail.gmail.com> <4AF87E3A.8020404@opengeo.org> <5e3c00490911100422u40cd0c2evf2b1f4f9a83dc9ab@mail.gmail.com> <5b021dd0911100437mcdeccddoce2bc5203ba3d3d0@mail.gmail.com> Message-ID: <5e3c00490911100506m7dc3e75cq6bcd1011fbb72f92@mail.gmail.com> Hey again, thanks a lot for the help Andreas. I didn't have proj4js loaded. I thought it came along with OL. :P It is working great now. I just have a minor issue that is the first load of the page. On firebug, the BBOX filter of the first request doesn't get reprojected to 29193, but from the second request on, the BBOX gets reprojected and the data is drawn. This might have something to do with the request being sent before proj4js is completely loaded. I used the complete version with all EPSG projections on it, and it is a 70kb compressed js file. I will try removing all the other projections from it and initializing only EPSG:29193 using "Proj4js.defs" and see if that solves the problem. Do you have any suggestion regarding this? On Tue, Nov 10, 2009 at 10:37 AM, Andreas Hocevar wrote: > Hi, > > do you have proj4js.js included in your html page? See > http://trac.openlayers.org/wiki/Documentation/Dev/proj4js > > OpenLayers out of the box can only transform between EPSG:4326 and > EPSG:900913. > > Regards, > Andreas. > > On 11/10/09, Pedro Baracho wrote: > > Thanks for the reply. > > > > I changed to 1.1.0, but I am still having problems with projections. > > > > The BBOX filter of the request is being built with weird numbers on it: > > > > GEOLOC > xmlns:gml="http://www.opengis.net/gml" > > srsName="EPSG:29193">-4987936.2379319 > > -2307634.0730985-4797149.4153663 > > -2213769.4023813 > > > > Those numbers don't make any sense in EPSG:29193 ( > > http://spatialreference.org/ref/epsg/29193/) > > The bounds should be limited to: 166020.2387, 7087605.5418, 833979.7613, > > 10000000.0000, and I am seeing some negative numbers. > > > > I also changed the displayProjection on the map to EPSG:29193 and those > > weird numbers are confirmed by OpenLayers.Control.MousePosition. > > > > My guess is that there is some problem with the reprojection routine from > > 900913 to 29193. I am also guessing this may be because 29193 is limited > to > > a region of the globe while 900913 is a world-wide projection. Does it > make > > sense? I don't know much about cartography and projections and I didn't > dig > > in OpenLayers code yet. > > > > Do you have any other hint for me? > > > > On Mon, Nov 9, 2009 at 6:40 PM, Andreas Hocevar >wrote: > > > >> Hi, > >> > >> WFS 1.0.0 does not support on-the-fly reprojection. You have to use WFS > >> 1.1.0, which is e.g. supported by GeoServer. And you have to specify the > >> version on the protocol: > >> > >> Pedro Baracho wrote: > >> > var layer = new OpenLayers.Layer.Vector("WFS", { > >> > strategies: [new OpenLayers.Strategy.BBOX(), > >> > saveStrategy], > >> > protocol: new OpenLayers.Protocol.WFS({ > >> version: "1.1.0", > >> > url: "http://localhost:8080/geoserver/wfs", > >> > featureType: "Regional", > >> > featureNS: "http://prodabel1062.pbh:8080/avis > ", > >> > geometryName: "GEOLOC", > >> > srsName: "EPSG:29193" > >> > }), > >> > projection: new > OpenLayers.Projection("EPSG:29193") > >> > }); > >> > > >> > >> > >> Regards, > >> Andreas. > >> > >> -- > >> Andreas Hocevar > >> OpenGeo - http://opengeo.org/ > >> Expert service straight from the developers. > >> > >> > > > > > -- > 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/20091110/dcfad660/attachment.html From adrian_gh.popa at romtelecom.ro Tue Nov 10 08:34:49 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Forcing FramedCloud autoResize when using stylesheets Message-ID: <4AF96BF9.2020505@romtelecom.ro> Hello everyone, If this subject has been discussed before, please point me to the relevant thread. I have a FramedCloud popup which gets its content through an ajax call. Everything works ok (the popup is the same size as the content) if I don't change the size of the fonts in the popup. In some cases, I have to override the default font size and make it bigger. In these cases, the popup doesn't resize properly. For instance, if the content has 'font-size: 11px' it fits the popup, but if the content has 'font-size: 22px', the popup grows in height, but the width remains the same as the first case. By the way, my content is usually a table (which has applied the style='font-size: 22px;' attribute). My questions are: 1. Is this behavior a known problem or should autoResize work without problems? 2. I could call - as a workaround a function to autoRezise the popup after the ajax call completes. Question is - what is this function? (I haven't found anything in the api) 3. I could set maxSize/minSize - but I have no idea how to calculate the width/height of my content (in case there are no other workarounds I could *estimate* it based on number of characters per line + font size - but it's way too cumbersome to be a real solution) Thanks, Adrian. From wvick at europa.uk.com Tue Nov 10 08:57:25 2009 From: wvick at europa.uk.com (Warren Vick) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] OL on Win7 with touch i/f In-Reply-To: References: Message-ID: Link below kindly just sent to me. Zoom in and out gestures map to Ctrl+Scroll Wheel so OL apps should enjoy this functionality for mapping zoom control. Rotate and two-finger tap are the only gestures that don't have a default system action. https://upr4nq.bay.livefilestore.com/y1mYkIlARcM4QXjZj0EstYoh5mbRfLZphR_0y11lSnlbXVrv-jg56zFV3FwsEQPnpy-x3Z9i-qk5X1Nupc65OxpkDG9UzjZIVOmgpIr875fpAktxoCQ7CUU8gchzJvZ6Pl-wCU-xhB44lTqJ5zkJxRetA/Win7gestures%5B3%5D.jpg Regards, Warren -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Warren Vick Sent: 10 November 2009 10:37 AM To: users@openlayers.org Subject: [OpenLayers-Users] OL on Win7 with touch i/f Now Windows 7 is out (like it or not), there seem to be even more touch screen all-in-one PCs available. I was playing with quite a nice Sony 24" model last night, although unfortunately it was not connect to the Internet. I know that certain actions are connected to mouse events. e.g. double tap = double click, touch-drag-release = click-drag-release, which I guess means that OL-based apps will run quite nicely. But, what about the two finger gestures for "in" and "out". Are these mapped to the scroll wheel? If not, can these gestures be picked up in JS so that OL can include zoom in/out support for them? /Warren _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From kenny at xarex.com Tue Nov 10 09:06:53 2009 From: kenny at xarex.com (Kenny France) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] bounds Message-ID: <001b01ca620f$0e83a360$2b8aea20$@com> Hi All, I am trying to get the BBox of the current view by clicking a link The following works at requesting the file var layer = new OpenLayers.Layer.Vector("POIs", { strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1.1})], protocol: new OpenLayers.Protocol.HTTP({ url: "textfile.php", format: new OpenLayers.Format.Text() }) }) And it returns Textfile.php?bbox=0.502699952,-36.9792000164,49.654700048,-20.1855999836 I would like to somehow click a link and just alert this, Do you think it's possible? K- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091110/90e9a685/attachment.html From bartvde at osgis.nl Tue Nov 10 09:10:11 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] bounds In-Reply-To: <001b01ca620f$0e83a360$2b8aea20$@com> References: <001b01ca620f$0e83a360$2b8aea20$@com> Message-ID: <3060.145.50.39.11.1257862211.squirrel@webmail.hostingdiscounter.nl> You mean alert(map.getExtent().toString()); ? Best regards, Bart > Hi All, > > > > > > I am trying to get the BBox of the current view by clicking a link > > > > The following works at requesting the file > > > > var layer = new OpenLayers.Layer.Vector("POIs", { > > strategies: [new OpenLayers.Strategy.BBOX({resFactor: > 1.1})], > > protocol: new OpenLayers.Protocol.HTTP({ > > url: "textfile.php", > > format: new OpenLayers.Format.Text() > > }) > > }) > > > > And it returns > > > > Textfile.php?bbox=0.502699952,-36.9792000164,49.654700048,-20.1855999836 > > > > I would like to somehow click a link and just alert this, > > Do you think it's possible? > > > > K- > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From winwaed at gmail.com Tue Nov 10 11:57:36 2009 From: winwaed at gmail.com (Richard Marsden) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Clipping a vector layer before it is re-projected Message-ID: Hello, I am currently trying to plot third party (ie. external website) GeoRSS or KML data on a polar map. This is for a set of demos and articles for GeoWebGuru.com along the lines of the recent Equal Area Map articles (demos can be seen at http://www.equal-area-maps.com ). I'm currently using the +sterea projection for dev, but I shall be extending this to other polar projections. Data is limited to the northern hemisphere. This is because some of these projections are only valid for one hemisphere, and for the remaining projections (eg. sterea) the opposing hemisphere is generally too distorted for practical use. My base map is served by WMS, and it is relatively easy to limit this to one hemisphere because I host the data and can clip the data a priori (ie. during my data prep). These demos allow a user to plot external KML or GeoRSS data at run time (implemented using OpenLayers). That currently works well, but OpenLayers is currently plotting the entire data for both hemispheres. I need to clip the GeoRSS or KML data to the northern hemisphere. The projected hemisphere is a circle. Both types of data feed use geographic coordinates, so it is much easier to clip the data as it is read (ie. only accept data where latitude >0deg). How can I do this in OpenLayers? I can't see an obvious way. I tried setting the vector layer's maxExtents - not quite what I want, but worth a try. This didn't work. It looks like a custom Strategy implementation might be the way to go? Are there any examples or documentation as to how to write a custom Strategy? At the moment I'm planning a two part article on polar projections, but if a custom strategy is required, I could write a third article on how to do this. Another thought is that I could file a feature request: To clip vector layers to a shape (or bbox) before the vector layer is re-projected. This could have other applications. For example, an application may wish to let a user limit the display of input data to an area or country of interest. Anyway, I thought I should post something first in-case this was possible already and to avoid what could be an unnecessary feature request. Thanks in advance, Richard Marsden Winwaed Software Technology LLC http://www.winwaed.com http://www.mapping-tools.com http://www.geowebguru.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091110/c1b642f7/attachment.html From ahocevar at opengeo.org Tue Nov 10 13:17:52 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Vector Layer, WFS Protocol and BBOX strategy problem In-Reply-To: <5e3c00490911100506m7dc3e75cq6bcd1011fbb72f92@mail.gmail.com> References: <5e3c00490911091115x6fe11590vdb9e8b1f1e60c180@mail.gmail.com> <4AF87E3A.8020404@opengeo.org> <5e3c00490911100422u40cd0c2evf2b1f4f9a83dc9ab@mail.gmail.com> <5b021dd0911100437mcdeccddoce2bc5203ba3d3d0@mail.gmail.com> <5e3c00490911100506m7dc3e75cq6bcd1011fbb72f92@mail.gmail.com> Message-ID: <4AF9AE50.8060603@opengeo.org> Hi, Pedro Baracho wrote: > just have a minor issue that is the first load of the page. > On firebug, the BBOX filter of the first request doesn't get > reprojected to 29193, but from the second request on, the BBOX gets > reprojected and the data is drawn. > > This might have something to do with the request being sent before > proj4js is completely loaded. I used the complete version with all > EPSG projections on it, and it is a 70kb compressed js file. It does not contain all EPSG projections, just commonly used ones. So it will load EPSG:29193 dynamically, and this takes a while. > > I will try removing all the other projections from it and initializing > only EPSG:29193 using "Proj4js.defs" and see if that solves the problem. This will definitely solve the problem. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From grigoregeorge631980 at yahoo.co.uk Wed Nov 11 08:50:33 2009 From: grigoregeorge631980 at yahoo.co.uk (pericoltoxic) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] WFS Message-ID: <1257947433219-3986535.post@n2.nabble.com> What is the steps to render topp:tasmania_roads with WFS using vector (OpenLayers.Layer.Vector)? -- View this message in context: http://n2.nabble.com/WFS-tp3986535p3986535.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adrian_gh.popa at romtelecom.ro Wed Nov 11 08:57:53 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Forcing FramedCloud autoResize when using stylesheets In-Reply-To: <4AFABB0A.8060605@romtelecom.ro> References: <4AF96BF9.2020505@romtelecom.ro> <4AFABB0A.8060605@romtelecom.ro> Message-ID: <4AFAC2E1.7050809@romtelecom.ro> Update: - it seems I was partially wrong. The div settings for the decoration divs are correct - but it seems the popup background image doesn't get any larger... I will look into it. Adrian Popa wrote: > Hello everyone, > > I have done some more digging, and it seems the FramedCloud popup has > a default maximum width of 600px (or so it seems when I inspect items > with firebug). I tried to set max size to something larger > (popup.maxSize = new OpenLayers.Size(1300, 1000);) and it seems to > work (partially). > > The popup gets larger to accomodate content with width greater than > 600px, but not all the popup's decorations are streched. > > My popup's base id is "activeAlarm" - and from what I can tell the > following divs get resized: > * activeAlarm_contentDiv > * activeAlarm_GroupDiv > * activeAlarm > ... but the following divs don't get resized: > * activeAlarm_FrameDecorationDiv_1 > * activeAlarm_FrameDecorationDiv_2 > * activeAlarm_FrameDecorationDiv_3 > * activeAlarm_FrameDecorationDiv_4 > > I have attached an image that illustrates this. Note that also the > background of the popup isn't streched (remains transparent) (most > likely it's one of the decoration divs...). > > Is this a known bug, or am I doing something wrong? If it's a bug, is > there a quick workaround? I can think of setting the width parameter > for all the decoration divs, but I'm hoping it won't be necessary... > > Thanks, > Adrian > > Adrian Popa wrote: >> Hello everyone, >> >> If this subject has been discussed before, please point me to the >> relevant thread. >> >> I have a FramedCloud popup which gets its content through an ajax >> call. Everything works ok (the popup is the same size as the >> content) if I don't change the size of the fonts in the popup. In >> some cases, I have to override the default font size and make it >> bigger. In these cases, the popup doesn't resize properly. For >> instance, if the content has 'font-size: 11px' it fits the popup, but >> if the content has 'font-size: 22px', the popup grows in height, but >> the width remains the same as the first case. >> >> By the way, my content is usually a table (which has applied the >> style='font-size: 22px;' attribute). >> >> My questions are: >> 1. Is this behavior a known problem or should autoResize work without >> problems? >> 2. I could call - as a workaround a function to autoRezise the popup >> after the ajax call completes. Question is - what is this function? >> (I haven't found anything in the api) >> 3. I could set maxSize/minSize - but I have no idea how to calculate >> the width/height of my content (in case there are no other >> workarounds I could *estimate* it based on number of characters per >> line + font size - but it's way too cumbersome to be a real solution) >> >> Thanks, >> Adrian. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> From pedropbaracho at gmail.com Wed Nov 11 10:14:11 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] WFS In-Reply-To: <1257947433219-3986535.post@n2.nabble.com> References: <1257947433219-3986535.post@n2.nabble.com> Message-ID: <5e3c00490911110714r6c7e8563iaf455394ce25bb89@mail.gmail.com> I think there is an example that does exactly that on OL. Check this out: http://openlayers.org/dev/examples/wfs-protocol.html On Wed, Nov 11, 2009 at 11:50 AM, pericoltoxic < grigoregeorge631980@yahoo.co.uk> wrote: > > What is the steps to render topp:tasmania_roads with WFS using vector > (OpenLayers.Layer.Vector)? > -- > View this message in context: > http://n2.nabble.com/WFS-tp3986535p3986535.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091111/a7569a9f/attachment.html From mitchelljj98 at gmail.com Wed Nov 11 11:35:36 2009 From: mitchelljj98 at gmail.com (John Mitchell) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] When openlayers is connected via WMS to a layer within geowebcache I get the following errors for the returned tiles: Message-ID: When openlayers is connected via WMS to a layer within geowebcache I get the following errors for the returned tiles: 400: Resolution (0.28125) is not with 5.0% of the closest grid resolution (0.3515625) How can I fix this error so that the tiles are returned? Thanks, John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091111/58c0c528/attachment.html From rifins at gmail.com Wed Nov 11 12:48:41 2009 From: rifins at gmail.com (=?ISO-8859-1?Q?Quim_Rif=E0?=) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Map overview.. Message-ID: Hi, I'm new here.. So this is my first post to the list.. And I would like to know how can I put the overview map. Well, by now I'm adding an overviewmap, but the zoom of the overview is the maximum zoom of the map.. I mean the overview has more detail than the main map. This is my code: var map; var options; function init() { options = { 'projection': "EPSG:23031", 'SRS': "EPSG:23031", 'units':'meters', 'maxExtent': new OpenLayers.Bounds(258000, 4485000, 536000, 4752000) }; var lyrTest= new OpenLayers.Layer.WMS("mtc50", " http://shagrat.icc.es/lizardtech/iserv/ows?", { layers: 'mtc50m', 'service': "WMS", 'version': "1.1.1", 'srs': "EPSG:23031", 'request': "GetMap", 'exception': "INIMAGE", 'format': "image/png" }, { isBaseLayer: true }); map = new OpenLayers.Map('map', options); map.resolutions = [1100, 550, 275, 100, 50, 25, 10, 5, 2, 1, 0.5]; map.addLayer(lyrTest.clone()); map.zoomToMaxExtent(); map.addControl(new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.MousePosition()); map.addControl(new OpenLayers.Control.OverviewMap()); } Thanks!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091111/337d630b/attachment.html From grigoregeorge631980 at yahoo.co.uk Wed Nov 11 15:19:41 2009 From: grigoregeorge631980 at yahoo.co.uk (pericoltoxic) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] WFS In-Reply-To: <1257969392549-3988520.post@n2.nabble.com> References: <1257947433219-3986535.post@n2.nabble.com> <1257969392549-3988520.post@n2.nabble.com> Message-ID: <1257970781383-3988674.post@n2.nabble.com> Sige wrote: > > http://openlayers.org/dev/examples/wfs-protocol.html > > > pericoltoxic wrote: >> >> What is the steps to render topp:tasmania_roads with WFS using vector >> (OpenLayers.Layer.Vector)? >> > > Thank for your answer, but i have a problem with the example. I changed this code: var layer = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://demo.opengeo.org/geoserver/wfs", featureType: "tasmania_roads", featureNS: "http://www.openplans.org/topp" }) }); with my code: var layer = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", featureType: "tasmania_roads", featureNS: "http://www.openplans.org/topp" }) }); I read tasmania_roads from my GeoServer( localhost:8080 ), but the tasmania_roads not appear. Where is the mistake? -- View this message in context: http://n2.nabble.com/WFS-tp3986535p3988674.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Wed Nov 11 16:28:45 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Broken image for no tile, on Chrome In-Reply-To: References: <4AF9486E.5080304@opengeo.org> Message-ID: <4AFB2C8D.8040507@lisasoft.com> 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 From crschmidt at metacarta.com Wed Nov 11 18:05:59 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] test Message-ID: <20091111230559.GD12307@metacarta.com> test -- Christopher Schmidt MetaCarta From roald.dewit at lisasoft.com Wed Nov 11 19:07:34 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] WFS In-Reply-To: <1257970781383-3988674.post@n2.nabble.com> References: <1257947433219-3986535.post@n2.nabble.com> <1257969392549-3988520.post@n2.nabble.com> <1257970781383-3988674.post@n2.nabble.com> Message-ID: <4AFB51C6.2050504@lisasoft.com> Hi, On 12/11/09 07:19, pericoltoxic wrote: > Thank for your answer, but i have a problem with the example. > I changed this code: > > var layer = new OpenLayers.Layer.Vector("WFS", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://demo.opengeo.org/geoserver/wfs", > featureType: "tasmania_roads", > featureNS: "http://www.openplans.org/topp" > }) > }); > > with my code: > > var layer = new OpenLayers.Layer.Vector("WFS", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://localhost:8080/geoserver/wfs", > featureType: "tasmania_roads", > featureNS: "http://www.openplans.org/topp" > }) > }); > > I read tasmania_roads from my GeoServer( localhost:8080 ), but the > tasmania_roads not appear. Where is the mistake? > What if you add 'localhost:8080' to the list of allowedHosts in your proxy.cgi? Regards, Roald -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. From helmi03 at gmail.com Thu Nov 12 00:53:14 2009 From: helmi03 at gmail.com (helmi) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Map overview.. In-Reply-To: References: Message-ID: <7f615c9f0911112153s6c2ededbxf311c332e8325497@mail.gmail.com> Try play around with parameter values in your OverviewMap, example: var layer = new OpenLayers.Layer.WMS( "Malaysia", "/tc/tilecache.cgi?", {layers: 'basemap', format: 'image/png' } ); var ov = new OpenLayers.Control.OverviewMap({minRatio: 16, mapOptions: {maxResolution: 0.02197265625, minResolution: 0.0000858306884765625}, layers:[layer]}); 2009/11/12 Quim Rif? > Hi, > > I'm new here.. So this is my first post to the list.. And I would like to > know how can I put the overview map. Well, by now I'm adding an overviewmap, > but the zoom of the overview is the maximum zoom of the map.. I mean the > overview has more detail than the main map. > > This is my code: > > var map; > var options; > > function init() { > options = { > 'projection': "EPSG:23031", > 'SRS': "EPSG:23031", > 'units':'meters', > 'maxExtent': new OpenLayers.Bounds(258000, 4485000, 536000, > 4752000) > }; > > var lyrTest= new OpenLayers.Layer.WMS("mtc50", " > http://shagrat.icc.es/lizardtech/iserv/ows?", > { layers: 'mtc50m', > 'service': "WMS", > 'version': "1.1.1", > 'srs': "EPSG:23031", > 'request': "GetMap", > 'exception': "INIMAGE", > 'format': "image/png" > }, { isBaseLayer: true }); > > map = new OpenLayers.Map('map', options); > map.resolutions = [1100, 550, 275, 100, 50, 25, 10, 5, 2, 1, 0.5]; > map.addLayer(lyrTest.clone()); > map.zoomToMaxExtent(); > map.addControl(new OpenLayers.Control.Navigation()); > map.addControl(new OpenLayers.Control.MousePosition()); > map.addControl(new OpenLayers.Control.OverviewMap()); > } > > 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/20091112/c0409e7c/attachment.html From r.eichhorn at netbi.com.au Thu Nov 12 02:39:55 2009 From: r.eichhorn at netbi.com.au (Richard Eichhorn) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Displaying map in absolutely positioned div Message-ID: <2505d0830911112339i5f78fc20r8922b2efc94235da@mail.gmail.com> I have a map displayed in an absolutely positioned DIV which I can move about the screen. When I create an OpenLayers.Control. SelectFeature control and draw a rectangle by holding down the mouse button and dragging, it works fine. If I then move the DIV containing the map, and try it again the starting position of the rectangle is now relative to the original position of the DIV. If I then subsequently resize the browser window, it starts working again. I have tried experimenting with calling onMapResize() for each layer, but it makes no difference. Any ideas? Cheers, Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/b8823222/attachment.html From r.eichhorn at netbi.com.au Thu Nov 12 02:47:39 2009 From: r.eichhorn at netbi.com.au (Richard Eichhorn) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] OpenLayers.Control.SelectFeature and shift-click in Firefox Message-ID: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> I am using OpenLayers.Control.SelectFeature with features which are represented using an externalGraphic. When I use do a shift-click to multi-select features in Firefox, it opens up a new window with the icon of the feature I just clicked on. When writing non-openlayers javascript code I have just used preventDefault in firefox to stop the events propagating. How can I do it in Openlayers? Cheers, Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/86b14e8d/attachment.html From barbara.fiederer at web.de Thu Nov 12 03:15:03 2009 From: barbara.fiederer at web.de (Barbara Fiederer) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] request and parse GML Message-ID: <1240275582@web.de> Dear list, I've got problems with parsing a GML-Format. I do get two objects though from geoserver, as I filtered them. But I don't seem to be able to get the key:value-pairs either of the request or the parser (or both ;-)) set correctly. Can someone please help me use the namespace prefixes and tags correctly. var filter_header = ''; var filter_header = filter_header + ''; var filter_footer = ''; var filter_1_1 = new OpenLayers.Format.Filter({version: "1.1.0"}); var xml = new OpenLayers.Format.XML(); var filter_body = new OpenLayers.Filter.Logical({ type: OpenLayers.Filter.Logical.OR, filters: [ new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "infotext", value: "FS30117000000" }), new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "infotext", value: "FS50068000000" }) ] }); filter_body = xml.write(filter_1_1.write(filter_body)); var final_filter = filter_header + filter_body + filter_footer; var dbresponse = new OpenLayers.Request.POST({ url: "http://myDomain.com:8090/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=demo:flurst", featureNS: "http://myDomain.com/demo", featureNSPrefix:"gml", featureType: "flurst", data: final_filter, geometryName: "the_geom", schema:"http://myDomain.com:8090/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=demo:flurst", callback:function(dbresponse){ //console.log(dbresponse.responseText); var g = new OpenLayers.Format.GML( { featureType:'flurst', gmlns: 'http://myDomain.com/demo', featureNS:'http://myDomain.com/demo', featurePrefix:"wfs", featureName: 'flurst', geometryName: "the_geom", collectionName:"MultiSurface", extractAttributes: true, } ); //console.log(g); var vectorlayer = new OpenLayers.Layer.Vector("Vector"); var features = g.read(dbresponse.responseText); console.log(features); vectorlayer.addFeatures([features]); map.addLayer(vectorlayer); } }); This is the answer copied from FIREBUG/Console: FS30117000000 Musterstadt Musterfeld .. more attributes ... ... long list of coordinates .. . .. another feature .. I use Geoserver 1.7.4., OL 2.8 I hope, someone can help me. Thanks in advance from Babsi _____________________________________________________________ DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon f?r 16,99 Euro/mtl.!* Hier klicken: http://produkte.web.de/go/02/ From aca at ngi.be Thu Nov 12 03:34:55 2009 From: aca at ngi.be (acangi) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Invisible ZoomBox In-Reply-To: <1247738057211-3267845.post@n2.nabble.com> References: <1247738057211-3267845.post@n2.nabble.com> Message-ID: <1258014895962-3991402.post@n2.nabble.com> Problem finally solved : 1. The NavToolbar not appearing was due to the missing default style.css. 2. To make my own buttons, I prefered using directly ZoomBox and Navigation, but removing the controls from the map object to switch between both didn't work. I had to deactivate them instead of removing them. acangi wrote: > > Hi list, > > I'm trying to use the controls Navigation and ZoomBox separately : using > my other (non-openlayers) controls, I'd like to switch between Navigation > and ZoomBox, like it's done here : > http://openlayers.org/dev/examples/navtoolbar-alwaysZoom.html > http://openlayers.org/dev/examples/navtoolbar-alwaysZoom.html , but with > my own switchers. > > The problem is : I can't see the control switchers like on the example (to > select one or the other), I have to use SHIFT to create a zoombox, and I > can't see the zoombox I'm drawing. > > I copy/pasted the class CustomNavToolbar from the example, and this is my > map : > > function createMap(){ > var bounds = new OpenLayers.Bounds(500000, 500000, 810000, > 800000); > map = new OpenLayers.Map('map', { > controls: [new OpenLayers.Control.CustomNavToolbar(), > //new > OpenLayers.Control.ZoomBox({alwaysZoom:true}), > //new OpenLayers.Control.Navigation(), > new OpenLayers.Control.PanZoomBar()], > theme: null, > maxExtent: bounds, > maxResolution: 1210.9375, > numZoomLevels: 11, > projection: PROJECTION, > units: 'm' > }); > // Create an invisible and light layer to display before the user > chooses the baselayer > // Openlayers always needs one baselayer > var clearBaseLayer = new OpenLayers.Layer.Image( > "None", > "/PrintOnDemand/img/clear.gif", > bounds, > new OpenLayers.Size(8, 8), > {isBaseLayer: true} > ); > map.addLayer(clearBaseLayer); > map.baseLayer = clearBaseLayer; > } > > Also, there are several WMS layers, a vector layer and I'm adding a > DragFeature(vectorLayer) later on. > > How comes I don't see the switches to choose between Navigation and > ZoomBox ? The fact I don't see the box I'm drawing makes me think of a > z-index problem, but linking the panel to a div and changing that div's > z-index doesn't change anything. > > Any idea ? > > OpenLayers 2.7, Firefox 3.5 > -- View this message in context: http://n2.nabble.com/Invisible-ZoomBox-tp3267845p3991402.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Thu Nov 12 03:41:52 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Zoom in zoom out --> Points of Layer are wrong --> Redraw Layer? Message-ID: <1258015312530-3991438.post@n2.nabble.com> Hello, As I already said in my subject I have the following problem. I have a openlayers.map with a wms. When I launch my application, my points are displayed on my map at the right position. Until now, everything is fine. But when I zoom in or zoom out my map, the points still stay at the same position, so the positon of the points isn't right after zooming (for example I have some points in Denmark, then I zoom out two times, afterwards I zoom in two times, now my points are somewhere in the ocean) I don't know why this happens. Is there someting like a redraw map, that my points stay at the right position, even when i zoom in or zoom out? Or can I solve this problem an other way? Thanks for your answers. Regards stash -- View this message in context: http://n2.nabble.com/Zoom-in-zoom-out-Points-of-Layer-are-wrong-Redraw-Layer-tp3991438p3991438.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From grigoregeorge631980 at yahoo.co.uk Thu Nov 12 04:43:47 2009 From: grigoregeorge631980 at yahoo.co.uk (pericoltoxic) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] WFS In-Reply-To: <4AFB51C6.2050504@lisasoft.com> References: <1257947433219-3986535.post@n2.nabble.com> <1257969392549-3988520.post@n2.nabble.com> <1257970781383-3988674.post@n2.nabble.com> <4AFB51C6.2050504@lisasoft.com> Message-ID: <1258019027609-3991668.post@n2.nabble.com> What if you add 'localhost:8080' to the list of allowedHosts in your proxy.cgi? Who i do that? I use GeoServer. -- View this message in context: http://n2.nabble.com/WFS-tp3986535p3991668.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From strk at keybit.net Thu Nov 12 05:20:08 2009 From: strk at keybit.net (strk) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] WFS In-Reply-To: <1257970781383-3988674.post@n2.nabble.com> References: <1257947433219-3986535.post@n2.nabble.com> <1257969392549-3988520.post@n2.nabble.com> <1257970781383-3988674.post@n2.nabble.com> Message-ID: <20091112102008.GC92700@keybit.net> On Wed, Nov 11, 2009 at 12:19:41PM -0800, pericoltoxic wrote: > I changed this code: > > var layer = new OpenLayers.Layer.Vector("WFS", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://demo.opengeo.org/geoserver/wfs", > featureType: "tasmania_roads", > featureNS: "http://www.openplans.org/topp" > }) > }); > > with my code: > > var layer = new OpenLayers.Layer.Vector("WFS", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://localhost:8080/geoserver/wfs", > featureType: "tasmania_roads", > featureNS: "http://www.openplans.org/topp" > }) > }); > > I read tasmania_roads from my GeoServer( localhost:8080 ), but the > tasmania_roads not appear. Where is the mistake? Is the OpenLayers code served by http://localhost:8080 too ? If this is the case you may need to tweak 'featureNS' to match the namespace found in the WFS returned by geoserver. At least I had to change it to "http://mapserver.gis.umn.edu/mapserver" for that to work with mapserver. --strk; Free GIS & Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! From pedropbaracho at gmail.com Thu Nov 12 06:33:51 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] WFS In-Reply-To: <1258019027609-3991668.post@n2.nabble.com> References: <1257947433219-3986535.post@n2.nabble.com> <1257969392549-3988520.post@n2.nabble.com> <1257970781383-3988674.post@n2.nabble.com> <4AFB51C6.2050504@lisasoft.com> <1258019027609-3991668.post@n2.nabble.com> Message-ID: <5e3c00490911120333t78be0c2amf1076d12c779bbd0@mail.gmail.com> Follow these instructions to setup your proxyhost: http://faq.openlayers.org/proxyhost/how-do-i-set-up-a-proxyhost/ On Thu, Nov 12, 2009 at 7:43 AM, pericoltoxic < grigoregeorge631980@yahoo.co.uk> wrote: > > > What if you add 'localhost:8080' to the list of allowedHosts in your > proxy.cgi? > > Who i do that? I use GeoServer. > -- > View this message in context: > http://n2.nabble.com/WFS-tp3986535p3991668.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/a91ab3ad/attachment.html From anrapas at gmail.com Thu Nov 12 07:40:48 2009 From: anrapas at gmail.com (Toni Ramiro) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Layer not shown Message-ID: I'm new to this and I've encountered a problem. I defined the following code to load one layer with OpenLayers var opciones = { projection:"EPSG:4230", maxExtent:new OpenLayers.Bounds(-3,37,0,39) }; map = new OpenLayers.Map('map', opciones); var sigpac_layer = new OpenLayers.Layer.WMS( "PNOA", "http://www.idee.es/wms/PNOA/PNOA", { layers:"pnoa", version:"1.1.1", format:"image/png" }, { projection:"EPSG:4230", units:"m" }); map.addLayer(sigpac_layer); var mapserver_layer = new OpenLayers.Layer.WMS( 'Murcia', 'http://localhost/cgi-bin/mapserv.exe', { map:'D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map', layers:'arquetas_otros_planifrega', transparent:'true' }, { projection:"EPSG:4326", units:"m" }); map.addLayer(mapserver_layer); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.MouseToolbar()); map.addControl(new OpenLayers.Control.MousePosition()); map.zoomToMaxExtent(); My MapServer project is as follows: MAP NAME Murcia SIZE 800 600 UNITS METERS EXTENT 544061.905938 4135608.106250 720849.906562 4288074.143750 CONFIG PROJ_LIB "D:\Desarrollo\MapServer\proj\nad\" PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END IMAGECOLOR 192 192 192 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME png DRIVER 'GD/PNG' MIMETYPE 'image/png' EXTENSION 'png' END LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END WEB IMAGEPATH 'C:/Inetpub/tmp/' IMAGEURL '/tmp/' METADATA 'wms_title' 'Murcia' 'wms_onlineresource' ' http://localhost/cgi-bin/mapserv.exe?map=D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map& ' 'wms_srs' 'EPSG:4326' END END LAYER NAME 'arquetas_otros_planifrega' TYPE POINT DATA 'D:\Desarrollo\MapServer\datos\CapasDePrueba\arquetas_otros_planifrega.shp' METADATA 'wms_title' 'arquetas_otros_planifrega' END STATUS DEFAULT TRANSPARENCY 100 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END CLASS NAME 'arquetas_otros_planifrega' STYLE SYMBOL 'CIRCLE' SIZE 2 OUTLINECOLOR 0 0 0 COLOR 31 2 3 END END END SYMBOL NAME 'CIRCLE' TYPE ellipse FILLED true POINTS 1 1 END END END The result is that the OpenLayers 'Murcia' layer shows no data, and if left alone in the project only shows a gray background. I've tried the same using QGis WMS client to Mapserver and shows the data. ?Do anybody knows how to solve the problem? Thanks a lot. -- Saludos, Toni Ramiro -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/b4879ffb/attachment.html From adube at mapgears.com Thu Nov 12 08:28:10 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Layer not shown In-Reply-To: References: Message-ID: <4AFC0D6A.3080707@mapgears.com> Hi Toni, Your data projection is in meters, so you must set it in the OpenLayers.Map object as well. By default, it's in degrees [1]. Plus, the maxExtent should be in meters too (try using the one from your mapfile). If it's still not working, you can try watching the request built from OpenLayers in Firebug and see the response. There may more more clues there. Best of luck, Alexandre [1] http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.units Toni Ramiro wrote: > I'm new to this and I've encountered a problem. > > I defined the following code to load one layer with OpenLayers > > var opciones = { > projection:"EPSG:4230", > maxExtent:new OpenLayers.Bounds(-3,37,0,39) > }; > map = new OpenLayers.Map('map', opciones); > > var sigpac_layer = new OpenLayers.Layer.WMS( > "PNOA", > "http://www.idee.es/wms/PNOA/PNOA", > { > layers:"pnoa", > version:"1.1.1", > format:"image/png" > }, > { > projection:"EPSG:4230", > units:"m" > }); > map.addLayer(sigpac_layer); > > var mapserver_layer = new OpenLayers.Layer.WMS( > 'Murcia', > 'http://localhost/cgi-bin/mapserv.exe', > { > > map:'D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map', > layers:'arquetas_otros_planifrega', > transparent:'true' > }, > { > projection:"EPSG:4326", > units:"m" > }); > map.addLayer(mapserver_layer); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new OpenLayers.Control.MouseToolbar()); > map.addControl(new OpenLayers.Control.MousePosition()); > map.zoomToMaxExtent(); > > My MapServer project is as follows: > > MAP > NAME Murcia > SIZE 800 600 > UNITS METERS > > EXTENT 544061.905938 4135608.106250 720849.906562 4288074.143750 > > CONFIG PROJ_LIB "D:\Desarrollo\MapServer\proj\nad\" > > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > '' > END > > IMAGECOLOR 192 192 192 > IMAGEQUALITY 95 > IMAGETYPE png > OUTPUTFORMAT > NAME png > DRIVER 'GD/PNG' > MIMETYPE 'image/png' > EXTENSION 'png' > END > > LEGEND > IMAGECOLOR 255 255 255 > STATUS ON > KEYSIZE 18 12 > LABEL > TYPE BITMAP > SIZE MEDIUM > COLOR 0 0 89 > END > END > > WEB > IMAGEPATH 'C:/Inetpub/tmp/' > IMAGEURL '/tmp/' > > METADATA > 'wms_title' 'Murcia' > 'wms_onlineresource' > 'http://localhost/cgi-bin/mapserv.exe?map=D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map& > ' > 'wms_srs' 'EPSG:4326' > END > > END > LAYER > NAME 'arquetas_otros_planifrega' > TYPE POINT > DATA > 'D:\Desarrollo\MapServer\datos\CapasDePrueba\arquetas_otros_planifrega.shp' > METADATA > 'wms_title' 'arquetas_otros_planifrega' > END > STATUS DEFAULT > TRANSPARENCY 100 > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > '' > END > CLASS > NAME 'arquetas_otros_planifrega' > STYLE > SYMBOL 'CIRCLE' > SIZE 2 > OUTLINECOLOR 0 0 0 > COLOR 31 2 3 > END > END > END > > SYMBOL > NAME 'CIRCLE' > TYPE ellipse > FILLED true > POINTS > 1 1 > END > END > END > > The result is that the OpenLayers 'Murcia' layer shows no data, and if > left alone in the project only shows a gray background. > > I've tried the same using QGis WMS client to Mapserver and shows the data. > > ?Do anybody knows how to solve the problem? > > Thanks a lot. > > -- > Saludos, > Toni Ramiro > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From rahn at zhaw.ch Thu Nov 12 09:53:46 2009 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Save jpg from actual Mapview Message-ID: <3F643797A078EB4FB028800809680984019B8207@langouste.zhaw.ch> Hello list, I have another question to you. Perhaps you can help me. I will have a simple imgage (jpg, png, gif, ...) from my mapview. I will have a button on my side and if the user presses this button you can save the actual mapview with all shown layers in the shown scale and so on as an image. Like a screenshot from the map-div for example. The format is not so important. I don't know if it is possible. Perhaps this is not the right forum, but perhaps somebody can help me. A lot of thanks to you for your help. Greetings Hanno ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/08df5bdc/attachment.html From kgeusebroek at xebia.com Thu Nov 12 10:01:15 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Save jpg from actual Mapview In-Reply-To: <3F643797A078EB4FB028800809680984019B8207@langouste.zhaw.ch> References: <3F643797A078EB4FB028800809680984019B8207@langouste.zhaw.ch> Message-ID: Hi Hanno, This will be possible when I'm finished investigating the use of html5 canvas for openlayers. ;-) My plan is to show the layers inside a canvas which then is just a image which can be saved. If you can't wait for me to be finished you might want to experiment yourself a bit. It's easy to create a canvas element and add images to it so you might want to get the WMS requests from the layers and add them to a canvas for saving. Of course I'm assuming that your map consists of WMS layers only now. Hope this helps a bit Feel free to contact me if you need more info Cheers Kris From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Rahn Hanno (rahn) Sent: Thursday, November 12, 2009 3:54 PM To: users@openlayers.org Subject: [OpenLayers-Users] Save jpg from actual Mapview Hello list, I have another question to you. Perhaps you can help me. I will have a simple imgage (jpg, png, gif, ...) from my mapview. I will have a button on my side and if the user presses this button you can save the actual mapview with all shown layers in the shown scale and so on as an image. Like a screenshot from the map-div for example. The format is not so important. I don't know if it is possible. Perhaps this is not the right forum, but perhaps somebody can help me. A lot of thanks to you for your help. Greetings Hanno ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen Fachstelle Geoinformatik Gr?ental, Postfach CH-8820 W?denswil Tel +41 (0)58 934 5592 Fax +41 (0)58 934 5580 hanno.rahn@zhaw.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/1c1ad98e/attachment.html From crschmidt at metacarta.com Thu Nov 12 10:16:06 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:11 2010 Subject: [OpenLayers-Users] Save jpg from actual Mapview In-Reply-To: <3F643797A078EB4FB028800809680984019B8207@langouste.zhaw.ch> References: <3F643797A078EB4FB028800809680984019B8207@langouste.zhaw.ch> Message-ID: <20091112151606.GE12307@metacarta.com> On Thu, Nov 12, 2009 at 03:53:46PM +0100, Rahn Hanno (rahn) wrote: > Hello list, > > > > I have another question to you. Perhaps you can help me. I will have a simple > imgage (jpg, png, gif, ...) from my mapview. I will have a button on my side > and if the user presses this button you can save the actual mapview with all > shown layers in the shown scale and so on as an image. Like a screenshot from > the map-div for example. The format is not so important. I don't know if it > is possible. Perhaps this is not the right forum, but perhaps somebody can > help me. It is not possible to do this (universally) in the browser. You will need to serialize your data to a service that can generate an image for you; MapFish has a 'print' module which I believe accomplishes this task. -- Chris > > > > A lot of thanks to you for your help. > > Greetings > > Hanno > > > > ------------------------------------------ > > Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik > > ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen > > Fachstelle Geoinformatik > > Gr?ental, Postfach CH-8820 W?denswil > > Tel +41 (0)58 934 5592 > > Fax +41 (0)58 934 5580 > > hanno.rahn@zhaw.ch > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From pedropbaracho at gmail.com Thu Nov 12 12:56:08 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Vector Layer, WFS Protocol and BBOX strategy problem In-Reply-To: <4AF9AE50.8060603@opengeo.org> References: <5e3c00490911091115x6fe11590vdb9e8b1f1e60c180@mail.gmail.com> <4AF87E3A.8020404@opengeo.org> <5e3c00490911100422u40cd0c2evf2b1f4f9a83dc9ab@mail.gmail.com> <5b021dd0911100437mcdeccddoce2bc5203ba3d3d0@mail.gmail.com> <5e3c00490911100506m7dc3e75cq6bcd1011fbb72f92@mail.gmail.com> <4AF9AE50.8060603@opengeo.org> Message-ID: <5e3c00490911120956p661cd2dl88ec4a233d34a8dc@mail.gmail.com> just for the record... adding this line: Proj4js.defs["EPSG:29193"] = "+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs"; solved the problem of the first request. On Tue, Nov 10, 2009 at 4:17 PM, Andreas Hocevar wrote: > Hi, > > Pedro Baracho wrote: > > just have a minor issue that is the first load of the page. > > On firebug, the BBOX filter of the first request doesn't get > > reprojected to 29193, but from the second request on, the BBOX gets > > reprojected and the data is drawn. > > > > This might have something to do with the request being sent before > > proj4js is completely loaded. I used the complete version with all > > EPSG projections on it, and it is a 70kb compressed js file. > > It does not contain all EPSG projections, just commonly used ones. So it > will load EPSG:29193 dynamically, and this takes a while. > > > > > I will try removing all the other projections from it and initializing > > only EPSG:29193 using "Proj4js.defs" and see if that solves the problem. > > This will definitely solve the problem. > > Regards, > Andreas. > > -- > 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/20091112/a0304c50/attachment.html From pedropbaracho at gmail.com Thu Nov 12 13:01:28 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser Message-ID: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> Hello all, I have huge amount of data being retrieved on a Vector Layer and it is crashing the browser (lack of memory) when it tries rendering it. I am thinking of using MinResolution, MinExtent and doing some search on current strategies to crop the data, or show the layer only in a determinate level of zoom. Any suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/b703570a/attachment.html From pedropbaracho at gmail.com Thu Nov 12 13:04:40 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Zoom in zoom out --> Points of Layer are wrong --> Redraw Layer? In-Reply-To: <1258015312530-3991438.post@n2.nabble.com> References: <1258015312530-3991438.post@n2.nabble.com> Message-ID: <5e3c00490911121004u6f1496a0x73d5fe27efccd9ad@mail.gmail.com> I have seen some problems like that, but they were related to image caching on the browser. It was like some layers were being redrawn and others weren't. I don't know if that is what you are experiencing. Maybe double check your projections coordinates and events on zooming. On Thu, Nov 12, 2009 at 6:41 AM, stash wrote: > > Hello, > As I already said in my subject I have the following problem. I have a > openlayers.map with a wms. When I launch my application, my points are > displayed on my map at the right position. Until now, everything is fine. > > But when I zoom in or zoom out my map, the points still stay at the same > position, so the positon of the points isn't right after zooming (for > example I have some points in Denmark, then I zoom out two times, > afterwards > I zoom in two times, now my points are somewhere in the ocean) > > I don't know why this happens. > > Is there someting like a redraw map, that my points stay at the right > position, even when i zoom in or zoom out? > > Or can I solve this problem an other way? > > Thanks for your answers. > > Regards > stash > -- > View this message in context: > http://n2.nabble.com/Zoom-in-zoom-out-Points-of-Layer-are-wrong-Redraw-Layer-tp3991438p3991438.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/dab4e45b/attachment.html From pedropbaracho at gmail.com Thu Nov 12 13:06:28 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Save jpg from actual Mapview In-Reply-To: <20091112151606.GE12307@metacarta.com> References: <3F643797A078EB4FB028800809680984019B8207@langouste.zhaw.ch> <20091112151606.GE12307@metacarta.com> Message-ID: <5e3c00490911121006n3fb522fap69ca4edb797924b@mail.gmail.com> I know it is not the solution you are asking for, but I would simply alt+printscreen, winkey+R, "pbrush", enter, ctrl+v, crop the edges and ctrl+s... that is 10-20s long. :P On Thu, Nov 12, 2009 at 1:16 PM, Christopher Schmidt < crschmidt@metacarta.com> wrote: > On Thu, Nov 12, 2009 at 03:53:46PM +0100, Rahn Hanno (rahn) wrote: > > Hello list, > > > > > > > > I have another question to you. Perhaps you can help me. I will have a > simple > > imgage (jpg, png, gif, ...) from my mapview. I will have a button on my > side > > and if the user presses this button you can save the actual mapview with > all > > shown layers in the shown scale and so on as an image. Like a screenshot > from > > the map-div for example. The format is not so important. I don't know if > it > > is possible. Perhaps this is not the right forum, but perhaps somebody > can > > help me. > > It is not possible to do this (universally) in the browser. You will need > to serialize your data to a service that can generate an image for you; > MapFish has a 'print' module which I believe accomplishes this task. > > -- Chris > > > > > > > > > A lot of thanks to you for your help. > > > > Greetings > > > > Hanno > > > > > > > > ------------------------------------------ > > > > Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik > > > > ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und > Nat?rliche Ressourcen > > > > Fachstelle Geoinformatik > > > > Gr?ental, Postfach CH-8820 W?denswil > > > > Tel +41 (0)58 934 5592 > > > > Fax +41 (0)58 934 5580 > > > > hanno.rahn@zhaw.ch > > > > > > > > > > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091112/3255a9d7/attachment.html From pedropbaracho at gmail.com Thu Nov 12 13:10:35 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] request and parse GML In-Reply-To: <1240275582@web.de> References: <1240275582@web.de> Message-ID: <5e3c00490911121010g795cf5bdl7255035813bb5bc7@mail.gmail.com> I didn't really understand your problem. But as I see, your url property is wrong. You should use " http://myDomain.com:8090/geoserver/wfs" , On Thu, Nov 12, 2009 at 6:15 AM, Barbara Fiederer wrote: > Dear list, > > I've got problems with parsing a GML-Format. I do get two objects though > from geoserver, as I filtered them. > But I don't seem to be able to get the key:value-pairs either of the > request or the parser (or both ;-)) set correctly. > > Can someone please help me use the namespace prefixes and tags correctly. > > var filter_header = ' service="WFS" '; > var filter_header = filter_header + ' version="1.1.0" '; > var filter_header = filter_header + 'xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance">'; > var filter_header = filter_header + ' var filter_header = filter_header + 'xsi:schemaLocation=" > http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd '; > var filter_header = filter_header + ' > http://myDomain.com:8090/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=demo:flurst" > '; > var filter_header = filter_header + 'srsName="EPSG:31468" xmlns:feature=" > http://myDomain.com/demo">'; > > var filter_footer = ''; > > var filter_1_1 = new OpenLayers.Format.Filter({version: "1.1.0"}); > var xml = new OpenLayers.Format.XML(); > > var filter_body = new OpenLayers.Filter.Logical({ > type: OpenLayers.Filter.Logical.OR, > filters: [ > new OpenLayers.Filter.Comparison({ > type: > OpenLayers.Filter.Comparison.EQUAL_TO, > property: "infotext", > value: "FS30117000000" > }), > new OpenLayers.Filter.Comparison({ > type: > OpenLayers.Filter.Comparison.EQUAL_TO, > property: "infotext", > value: "FS50068000000" > }) > ] > }); > filter_body = xml.write(filter_1_1.write(filter_body)); > var final_filter = filter_header + filter_body + filter_footer; > > var dbresponse = new OpenLayers.Request.POST({ > url: " > http://myDomain.com:8090/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=demo:flurst > ", > featureNS: "http://myDomain.com/demo", > featureNSPrefix:"gml", > featureType: "flurst", > data: final_filter, > geometryName: "the_geom", > schema:" > http://myDomain.com:8090/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=demo:flurst > ", > callback:function(dbresponse){ > //console.log(dbresponse.responseText); > var g = new OpenLayers.Format.GML( > { > featureType:'flurst', > gmlns: 'http://myDomain.com/demo', > featureNS:'http://myDomain.com/demo > ', > featurePrefix:"wfs", > featureName: 'flurst', > geometryName: "the_geom", > collectionName:"MultiSurface", > extractAttributes: true, > } > ); > //console.log(g); > var vectorlayer = new > OpenLayers.Layer.Vector("Vector"); > var features = g.read(dbresponse.responseText); > console.log(features); > vectorlayer.addFeatures([features]); > map.addLayer(vectorlayer); > } > }); > > This is the answer copied from FIREBUG/Console: > > > timeStamp="2009-11-12T08:41:00.430+01:00" xsi:schemaLocation=" > http://www.opengis.net/wfs > http://myDomain.com:8090/geoserver/schemas/wfs/1.1.0/wfs.xsd > http://myDomain.com/demo > http://myDomain.com:8090/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=demo:flurst > " > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:demo="http://myDomain.com/demo" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:ows="http://www.opengis.net/ows" > xmlns:gml="http://www.opengis.net/gml" > xmlns:xlink="http://www.w3.org/1999/xlink"> > > > FS30117000000 > Musterstadt > Musterfeld > > .. more attributes ... > > > > > > > > ... long list of coordinates .. . > > > > > > > > > > > .. another feature .. > > > > > > > I use Geoserver 1.7.4., OL 2.8 > > I hope, someone can help me. > > Thanks in advance from Babsi > > _____________________________________________________________ > DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon f?r > 16,99 Euro/mtl.!* Hier klicken: http://produkte.web.de/go/02/ > > _______________________________________________ > 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/20091112/bff8a215/attachment.html From pedropbaracho at gmail.com Thu Nov 12 13:14:30 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] OpenLayers.Control.SelectFeature and shift-click in Firefox In-Reply-To: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> References: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> Message-ID: <5e3c00490911121014j7188223fy4b5e175bd66904c7@mail.gmail.com> I am not sure if that helps, but there is a function stop on Event class for stopping event propagation. http://dev.openlayers.org/docs/files/OpenLayers/Events-js.html#OpenLayers.Event.stop On Thu, Nov 12, 2009 at 5:47 AM, Richard Eichhorn wrote: > I am using OpenLayers.Control.SelectFeature with features which are > represented using an externalGraphic. When I use do a shift-click to > multi-select features in Firefox, it opens up a new window with the icon of > the feature I just clicked on. > > When writing non-openlayers javascript code I have just used preventDefault > in firefox to stop the events propagating. > > How can I do it in Openlayers? > > Cheers, > Richard > > > > _______________________________________________ > 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/20091112/5ac7bfe0/attachment.html From grigoregeorge631980 at yahoo.co.uk Thu Nov 12 14:25:12 2009 From: grigoregeorge631980 at yahoo.co.uk (pericoltoxic) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] How to add new layers in PostGis using WSF? Message-ID: <1258053912486-3995062.post@n2.nabble.com> I use OpenLayers, GeoServer, Postgres with PostGis. I copied the source of this file http://openlayers.org/dev/examples/wfs-protocol-transactions.html. I modified this code: wfs = new OpenLayers.Layer.Vector("Editable Features", { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy], projection: new OpenLayers.Projection("EPSG:4326"), protocol: new OpenLayers.Protocol.WFS({ version: "1.1.0", srsName: "EPSG:4326", url: "http://demo.opengeo.org/geoserver/wfs", featureNS : "http://opengeo.org", featureType: "restricted", geometryName: "the_geom", schema: "http://demo.opengeo.org/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=og:restricted" }) }); with my code: wfs = new OpenLayers.Layer.Vector( 'gtest2', { strategies: [ new OpenLayers.Strategy.BBOX(), saveStrategy ], projection: new OpenLayers.Projection("EPSG:31700"), protocol: new OpenLayers.Protocol.WFS({ version: '1.1.0', srsName: 'EPSG:31700', url: 'http://localhost:8080/geoserver/wfs', featureNS:"http://www.opengeospatial.net/cite", featureType: 'gtest2', geometryName: 'geom' }) }); gtest2 is a reference to a PostGis table, which have this structure gid int4 PRIMARY KEY name varchar(20) geom polygon I use WFS to add, modified, and delete the layers from gtest2. I have a problem when i add, modified, ch the layers, it's not work, when i refresh the file the, the file have the same layers at the begin. The delete work fine. -- View this message in context: http://n2.nabble.com/How-to-add-new-layers-in-PostGis-using-WSF-tp3995062p3995062.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From r.eichhorn at netbi.com.au Thu Nov 12 20:10:00 2009 From: r.eichhorn at netbi.com.au (Richard Eichhorn) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] OpenLayers.Control.SelectFeature and shift-click in Firefox In-Reply-To: <5e3c00490911121014j7188223fy4b5e175bd66904c7@mail.gmail.com> References: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> <5e3c00490911121014j7188223fy4b5e175bd66904c7@mail.gmail.com> Message-ID: <2505d0830911121710g75f05eeeq8aac65a697653a46@mail.gmail.com> Thanks for that. I did come across that, but I couldn't figure out how to use it in the context of OpenLayers.Control.SelectFeature. There is a handlers property but I can't figure out how to use it. Has anyone got an example of creating an OpenLayers.Control.SelectFeature with a handlers property defined? Cheers, Richard. 2009/11/13 Pedro Baracho > I am not sure if that helps, but there is a function stop on Event class > for stopping event propagation. > > http://dev.openlayers.org/docs/files/OpenLayers/Events-js.html#OpenLayers.Event.stop > > On Thu, Nov 12, 2009 at 5:47 AM, Richard Eichhorn > wrote: > >> I am using OpenLayers.Control.SelectFeature with features which are >> represented using an externalGraphic. When I use do a shift-click to >> multi-select features in Firefox, it opens up a new window with the icon of >> the feature I just clicked on. >> >> When writing non-openlayers javascript code I have just used >> preventDefault in firefox to stop the events propagating. >> >> How can I do it in Openlayers? >> >> Cheers, >> Richard >> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > -- (w) 07 3124 4034 (m) 0414 583 411 (e) r.eichhorn@netbi.com.au (w) www.netbi.com.au (a) level 1, 50 park road milton brisbane queensland australia 4064 (p) po box 1003 new farm brisbane queensland australia 4005 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091113/dd57f3de/attachment.html From ag at ads.aero Thu Nov 12 23:50:56 2009 From: ag at ads.aero (adsaero) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Using MapCruncher-produced tiles with OpenLayers Message-ID: <1258087856358-3997436.post@n2.nabble.com> Hello; I've been digging around all day trying to come up with some decent pointers as to the correct way to do this, but in short - I've got two tile sets I've created with MapCruncher. I'm able to use them with Google Maps and Bing Maps, but now I'd like to use them with OpenLayers. I've created the layers and I'm "sort of" able to get them to display on the map, but they don't seem to match up with other map layers that I have in OL. I'm almost certain it has to do with my projections, or "resolutions" settings, or something along those lines, but I don't have enough mapping experience to understand exactly where I'm going wrong. Does anyone have any examples of using MapCruncher-created tiles in OpenLayers - and is it even possible, given the output of MapCruncher? Are there specific scales or zoom levels or other specific settings I need to have configured properly in order to display these tiles in OL? Any help would be greatly appreciated...! -- View this message in context: http://n2.nabble.com/Using-MapCruncher-produced-tiles-with-OpenLayers-tp3997436p3997436.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From apestgas2 at yahoo.com.hk Fri Nov 13 02:23:56 2009 From: apestgas2 at yahoo.com.hk (Aypes2) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Query problem Message-ID: <1258097036622-3997793.post@n2.nabble.com> Dear all, I just got a query problem. I have several overlays, and I want them to be queryable when they are turned on (visible) only. But I found if I turn on two or more overlays, only 1 layer can be queried and other visible overlays give no result (empty template in mapfile). Here is my code: map.events.register('click', map, function (e) { var oplayers = new Array( alayer.visibility, blayer.visibility, clayer.visibility, dlayer.visibility, elayer.visibility, flayer.visibility); var mslayers = new Array("a","b","c","d","e","f"); var i=0; for (i=0; i < 7; i++) { if ( oplayers[i] == true ) { var url = "http://localhost/cgi-bin/mapserv.exe" + "?map=c:/ms4w/Apache/htdocs/mapfile.map" + "&REQUEST=GetFeatureInfo" + "&VERSION=1.1.1" + "&EXCEPTIONS=application/vnd.ogc.se_xml" + "&BBOX=" + map.getExtent().toBBOX() + "&X=" + e.xy.x + "&Y=" + e.xy.y + "&INFO_FORMAT=text/html" + "&QUERY_LAYERS=" + mslayers[i] + "&LAYERS=" + mslayers[i] + "&FEATURE_COUNT=1" + "&SRS=EPSG:4269" + "&STYLES=" + "&WIDTH=" + map.size.w + "&HEIGHT=" + map.size.h; window.open(url, "getfeatureinfo", "location=0,status=0,scrollbars=1,width=600,height=400" ); }; }; }); alayer,blayer,clayer,dlayer,elayer,flayer are names of layers defined in html. (var alayer = ......) a,b,c,d,e,f are the layer names of the mapfiles. The only querable layer is the 'highest' one. For example, if I turn on alayer and blayer, blayer can be queried but alayer cannot. If alayer, blayer and flayer are on, only flayer can be queried. I find that the layer with higher variable i ([ oplayer[i] ]) would be queried only. I know there is a function called WMSfeatureGetinfo but I don't know how to use it. I just know it has queryVisible which can filter the hidden layers, but error 'permission denied' always comes out when I click on the query layer. I prefer my method, and I think the logic of my code is okay but something is wrong. Can anyone get idea about that? Regards, Aypes2 -- View this message in context: http://n2.nabble.com/Query-problem-tp3997793p3997793.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adrian_gh.popa at romtelecom.ro Fri Nov 13 02:28:31 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Forcing FramedCloud autoResize when using stylesheets In-Reply-To: <4AFAC2E1.7050809@romtelecom.ro> References: <4AF96BF9.2020505@romtelecom.ro> <4AFABB0A.8060605@romtelecom.ro> <4AFAC2E1.7050809@romtelecom.ro> Message-ID: <4AFD0A9F.6070809@romtelecom.ro> I did some more digging and it seems the png image which has the elements (borders) of the framed cloud has rather small dimensions: # file cloud-popup-relative.png cloud-popup-relative.png: PNG image data, 676 x 736, 8-bit colormap, non-interlaced I edited the file and increased the width of the image to 1276. I "streched" the popup window to use the whole width. I looked into openlayers/lib/OpenLayers/Popup/FramedCloud.js and expanded the default sizes for the image and the popup to fit the new image size. If I test this setup, the popup extends ok around my content, but the right-most side of the popup loses its rounded corners. Also the "connector" (I guess it's called a stem) between the marker and the popup is sometimes distorted or blank. This has to do with the definitions of offsets in the positionBlocks. Eg: positionBlocks: { "tl": { 'offset': new OpenLayers.Pixel(44, 0), 'padding': new OpenLayers.Bounds(8, 40, 8, 9), 'blocks': [ { // top-left size: new OpenLayers.Size('auto', 'auto'), anchor: new OpenLayers.Bounds(0, 51, 22, 0), position: new OpenLayers.Pixel(0, 0) }, { //top-right size: new OpenLayers.Size(22, 'auto'), anchor: new OpenLayers.Bounds(null, 50, 0, 0), position: new OpenLayers.Pixel(-638, 0) }, { //bottom-left size: new OpenLayers.Size('auto', 19), anchor: new OpenLayers.Bounds(0, 32, 22, null), position: new OpenLayers.Pixel(0, -631) }, { //bottom-right size: new OpenLayers.Size(22, 18), anchor: new OpenLayers.Bounds(null, 32, 0, null), position: new OpenLayers.Pixel(-638, -632) }, { // stem size: new OpenLayers.Size(81, 35), anchor: new OpenLayers.Bounds(null, 0, 0, null), position: new OpenLayers.Pixel(0, -688) } ] }, ... Can somebody explain the following: 1. bottom-right, bottom-left, top-right, top-left are intended to "carve-out" the rounded popup corners? 2. what is "stem" supposed to be? 3. How is the position coordinates measured from the file? What do negative coordinates mean (are they measuring from right to left)? 4. Is there a more automated way to update these offsets from a file - or should they be imputed by hand - and trial and error? 5. Is anyone else interested in wider popups? Usualy you shouldn't need them on normal screens, but I need to display them on large 4000x4000 screens... If there are people interested, I will submit a patch... 6. Oh - is there a way to get wider popups without editing the image/offsets? I guess the background of the picture is not "streched" to fit the popup (current behavior). Thanks, Adrian Adrian Popa wrote: > Update: > - it seems I was partially wrong. The div settings for the decoration > divs are correct - but it seems the popup background image doesn't get > any larger... I will look into it. > > Adrian Popa wrote: > >> Hello everyone, >> >> I have done some more digging, and it seems the FramedCloud popup has >> a default maximum width of 600px (or so it seems when I inspect items >> with firebug). I tried to set max size to something larger >> (popup.maxSize = new OpenLayers.Size(1300, 1000);) and it seems to >> work (partially). >> >> The popup gets larger to accomodate content with width greater than >> 600px, but not all the popup's decorations are streched. >> >> My popup's base id is "activeAlarm" - and from what I can tell the >> following divs get resized: >> * activeAlarm_contentDiv >> * activeAlarm_GroupDiv >> * activeAlarm >> ... but the following divs don't get resized: >> * activeAlarm_FrameDecorationDiv_1 >> * activeAlarm_FrameDecorationDiv_2 >> * activeAlarm_FrameDecorationDiv_3 >> * activeAlarm_FrameDecorationDiv_4 >> >> I have attached an image that illustrates this. Note that also the >> background of the popup isn't streched (remains transparent) (most >> likely it's one of the decoration divs...). >> >> Is this a known bug, or am I doing something wrong? If it's a bug, is >> there a quick workaround? I can think of setting the width parameter >> for all the decoration divs, but I'm hoping it won't be necessary... >> >> Thanks, >> Adrian >> >> Adrian Popa wrote: >> >>> Hello everyone, >>> >>> If this subject has been discussed before, please point me to the >>> relevant thread. >>> >>> I have a FramedCloud popup which gets its content through an ajax >>> call. Everything works ok (the popup is the same size as the >>> content) if I don't change the size of the fonts in the popup. In >>> some cases, I have to override the default font size and make it >>> bigger. In these cases, the popup doesn't resize properly. For >>> instance, if the content has 'font-size: 11px' it fits the popup, but >>> if the content has 'font-size: 22px', the popup grows in height, but >>> the width remains the same as the first case. >>> >>> By the way, my content is usually a table (which has applied the >>> style='font-size: 22px;' attribute). >>> >>> My questions are: >>> 1. Is this behavior a known problem or should autoResize work without >>> problems? >>> 2. I could call - as a workaround a function to autoRezise the popup >>> after the ajax call completes. Question is - what is this function? >>> (I haven't found anything in the api) >>> 3. I could set maxSize/minSize - but I have no idea how to calculate >>> the width/height of my content (in case there are no other >>> workarounds I could *estimate* it based on number of characters per >>> line + font size - but it's way too cumbersome to be a real solution) >>> >>> Thanks, >>> Adrian. >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091113/6d489263/attachment.html From steffen.schwarz85 at googlemail.com Fri Nov 13 03:11:54 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Zoom in zoom out --> Points of Layer are wrong --> Redraw Layer? In-Reply-To: <5e3c00490911121004u6f1496a0x73d5fe27efccd9ad@mail.gmail.com> References: <1258015312530-3991438.post@n2.nabble.com> <5e3c00490911121004u6f1496a0x73d5fe27efccd9ad@mail.gmail.com> Message-ID: <1258099914540-3997915.post@n2.nabble.com> Pedro Baracho wrote: > > > Maybe double check your projections coordinates and events on zooming. > > Hello, thanks for your answer. But what do you mean, by double check your projections coordinates and events on zooming? I'm sorry but I haven't much experience with openlayers. regards stash -- View this message in context: http://n2.nabble.com/Zoom-in-zoom-out-Points-of-Layer-are-wrong-Redraw-Layer-tp3991438p3997915.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dalda at ikt.es Fri Nov 13 03:14:30 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] mergeNewParams not working Message-ID: <224DBDAF88A6AC47BD22432815351BE0078DD500@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/20091113/2ef59c04/attachment.gif From bartvde at osgis.nl Fri Nov 13 03:18:06 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] mergeNewParams not working In-Reply-To: <224DBDAF88A6AC47BD22432815351BE0078DD500@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE0078DD500@nekaposta1> Message-ID: <9529.145.50.39.11.1258100286.squirrel@webmail.hostingdiscounter.nl> Can you post the contents of your SLD XML? Best regards, Bart > Hello, > > I want to apply some SLD generated on the fly through SLD_BODY parameter > using the following code: > > var sld = getSLD("sld1.xsl","pilaXML.xml"); > var wms = map.getLayersByName("myLayerName")[0]; > wms.mergeNewParams({SLD_BODY: sld}); > > but I don't get any result. The image is refreshed in the browser but > there's no selection at all. I've got a debug file for my WMS server and I > don't seem to get any error: > > [Fri Nov 13 09:00:18 2009].346000 CGI Request 1 on process 5940 > > My SLD contains 2084 characters, it could be that the problem? Or maybe > I'm doing something wrong. Has anybody any idea of what's happening?? > > Thanks. > > > > > > > Un saludo, > > > > ?????????????????????????????????????????????????????????????????????????????????? > > > David Alda Fern?ndez de Lezea > > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad > > > > IKT > > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > > ?????????????????????????????????????????????????????????????????????????????????? > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From dalda at ikt.es Fri Nov 13 03:34:18 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] mergeNewParams not working Message-ID: <224DBDAF88A6AC47BD22432815351BE0078DD518@nekaposta1> Sure, here it is: RecintosSigpac Selecci?n de Recintos T?tulo Comentarios PROVINCIA 1 MUNICIPIO 1 POLIGONO 1 PARCELA 1 RECINTO 1 #FFCC66 0.5 #00FF00 3 One more question, I have 2 layers, both are taken from my WMS but one is a raster file, that acts as base layer, and the other one is polygon layer. In which of them do I have to apply the new params??. I've tried appliying them in my polygon layer. Thanks. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? -----Mensaje original----- De: bartvde@osgis.nl [mailto:bartvde@osgis.nl] Enviado el: viernes, 13 de noviembre de 2009 9:18 Para: David Alda Fernandez de Lezea CC: users@openlayers.org Asunto: Re: [OpenLayers-Users] mergeNewParams not working Can you post the contents of your SLD XML? Best regards, Bart > Hello, > > I want to apply some SLD generated on the fly through SLD_BODY > parameter using the following code: > > var sld = getSLD("sld1.xsl","pilaXML.xml"); var wms = > map.getLayersByName("myLayerName")[0]; > wms.mergeNewParams({SLD_BODY: sld}); > > but I don't get any result. The image is refreshed in the browser but > there's no selection at all. I've got a debug file for my WMS server > and I don't seem to get any error: > > [Fri Nov 13 09:00:18 2009].346000 CGI Request 1 on process 5940 > > My SLD contains 2084 characters, it could be that the problem? Or > maybe I'm doing something wrong. Has anybody any idea of what's happening?? > > Thanks. > > > > > > > Un saludo, > > > > ?????????????????????????????????????????????????????????????????????? > ???????????? > > > David Alda Fern?ndez de Lezea > > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y > Biodiversidad > > > > IKT > > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > > ?????????????????????????????????????????????????????????????????????? > ???????????? > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From bartvde at osgis.nl Fri Nov 13 03:39:38 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] mergeNewParams not working In-Reply-To: <224DBDAF88A6AC47BD22432815351BE0078DD518@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE0078DD518@nekaposta1> Message-ID: <50081.145.50.39.11.1258101578.squirrel@webmail.hostingdiscounter.nl> You should apply it to the polygon layer. What WMS are you using? Mapserver? Try to put your SLD XML on a webserver and reference it with the SLD parameter without the use of OpenLayers in between. If this does not work, you might have better luck asking on the mailing list of your server product. Have you tried without the xsl stuff embedded in your XML? Also, things like PropertyIsEqualTo etc need to be in the ogc prefix, not sure if this is the problem though (some WMS-s are quite permissive). Best regards, Bart > > Sure, here it is: > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > > > xsi:schemaLocation="http://www.opengis.net/sld > StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > RecintosSigpac > > Selecci?n de Recintos > T?tulo > Comentarios > > > > > > PROVINCIA > 1 > > > MUNICIPIO > 1 > > > POLIGONO > 1 > > > PARCELA > 1 > > > RECINTO > 1 > > > > > > #FFCC66 > 0.5 > > > #00FF00 > 3 > > > > > > > > > > > > One more question, I have 2 layers, both are taken from my WMS but one is > a raster file, that acts as base layer, and the other one is polygon > layer. In which of them do I have to apply the new params??. I've tried > appliying them in my polygon layer. > > Thanks. > > > Un saludo, > > ?????????????????????????????????????????????????????????????????????????????????? > > David Alda Fern?ndez de Lezea > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad > > IKT > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > ?????????????????????????????????????????????????????????????????????????????????? > > -----Mensaje original----- > De: bartvde@osgis.nl [mailto:bartvde@osgis.nl] > Enviado el: viernes, 13 de noviembre de 2009 9:18 > Para: David Alda Fernandez de Lezea > CC: users@openlayers.org > Asunto: Re: [OpenLayers-Users] mergeNewParams not working > > Can you post the contents of your SLD XML? > > Best regards, > Bart > >> Hello, >> >> I want to apply some SLD generated on the fly through SLD_BODY >> parameter using the following code: >> >> var sld = getSLD("sld1.xsl","pilaXML.xml"); var wms = >> map.getLayersByName("myLayerName")[0]; >> wms.mergeNewParams({SLD_BODY: sld}); >> >> but I don't get any result. The image is refreshed in the browser but >> there's no selection at all. I've got a debug file for my WMS server >> and I don't seem to get any error: >> >> [Fri Nov 13 09:00:18 2009].346000 CGI Request 1 on process 5940 >> >> My SLD contains 2084 characters, it could be that the problem? Or >> maybe I'm doing something wrong. Has anybody any idea of what's >> happening?? >> >> Thanks. >> >> >> >> >> >> >> Un saludo, >> >> >> >> ?????????????????????????????????????????????????????????????????????? >> ???????????? >> >> >> David Alda Fern?ndez de Lezea >> >> Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y >> Biodiversidad >> >> >> >> IKT >> >> Granja Modelo s/n ? 01192 ? Arkaute (Araba) >> >> >> ?????????????????????????????????????????????????????????????????????????????????? >> Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 >> ?????????????????????????????????????????????????????????????????????????????????? >> email: dalda@ikt.es web: www.ikt.es >> >> ?????????????????????????????????????????????????????????????????????? >> ???????????? >> >> _______________________________________________ >> 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 dalda at ikt.es Fri Nov 13 04:26:38 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] mergeNewParams not working Message-ID: <224DBDAF88A6AC47BD22432815351BE0078DD55C@nekaposta1> I'm using MapServer and I made some time ago a map viewer using only MapServer and an HTML page with PHP in which I was able to apply SLD's and I'm just copying them and try to make it work, so I'm almost 100% sure that MapServer can work with these SLD's. I've tried what you said, remove XSL tags and add SLD parameter to my layer: wms.mergeNewParams({SLD: "sld2.xml"}); But I get a lot of errors from MapServer. [Fri Nov 13 10:02:37 2009].770000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:37 2009].770000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ab_1624_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:36 2009].20000 CGI Request 1 on process 6124 [Fri Nov 13 10:02:38 2009].474000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:38 2009].474000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ac_17ec_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:36 2009].20000 CGI Request 1 on process 5144 [Fri Nov 13 10:02:38 2009].474000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:38 2009].474000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ac_1418_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:37 2009].786000 CGI Request 1 on process 4904 [Fri Nov 13 10:02:40 2009].505000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:40 2009].505000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ad_1328_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:38 2009].989000 CGI Request 1 on process 1444 [Fri Nov 13 10:02:41 2009].739000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:41 2009].739000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ae_5a4_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:40 2009].536000 CGI Request 1 on process 5968 [Fri Nov 13 10:02:43 2009].67000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:43 2009].67000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b0_1750_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:40 2009].520000 CGI Request 1 on process 3216 [Fri Nov 13 10:02:43 2009].83000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:43 2009].83000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b0_c90_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:41 2009].755000 CGI Request 1 on process 4736 [Fri Nov 13 10:02:44 2009].364000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:44 2009].364000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b1_1280_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:43 2009].98000 CGI Request 1 on process 5816 [Fri Nov 13 10:02:45 2009].645000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:45 2009].645000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b3_16b8_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:44 2009].380000 CGI Request 1 on process 2636 [Fri Nov 13 10:02:46 2009].942000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:46 2009].942000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b4_a4c_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:45 2009].661000 CGI Request 1 on process 4892 [Fri Nov 13 10:02:48 2009].20000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:48 2009].20000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b5_131c_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:46 2009].958000 CGI Request 1 on process 6092 [Fri Nov 13 10:02:49 2009].458000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:49 2009].458000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b6_17cc_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:48 2009].36000 CGI Request 1 on process 4768 [Fri Nov 13 10:02:50 2009].489000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:50 2009].489000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b8_12a0_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file This is the first time I see this error. What I want to really do is to get some data from an external service in a predefined structure and parse it using XSL and my predefined SLD, to get a final SLD xml file and apply it to the layer, that's the reason because I had those tags. You should apply it to the polygon layer. What WMS are you using? Mapserver? Try to put your SLD XML on a webserver and reference it with the SLD parameter without the use of OpenLayers in between. If this does not work, you might have better luck asking on the mailing list of your server product. Have you tried without the xsl stuff embedded in your XML? Also, things like PropertyIsEqualTo etc need to be in the ogc prefix, not sure if this is the problem though (some WMS-s are quite permissive). Best regards, Bart > > Sure, here it is: > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > > > xsi:schemaLocation="http://www.opengis.net/sld > StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > RecintosSigpac > > Selecci?n de Recintos > T?tulo > Comentarios > > > > > > PROVINCIA > 1 > > > MUNICIPIO > 1 > > > POLIGONO > 1 > > > PARCELA > 1 > > > RECINTO > 1 > > > > > > #FFCC66 > 0.5 > > > #00FF00 > 3 > > > > > > > > > > > > One more question, I have 2 layers, both are taken from my WMS but one is > a raster file, that acts as base layer, and the other one is polygon > layer. In which of them do I have to apply the new params??. I've tried > appliying them in my polygon layer. > > Thanks. > > > Un saludo, > > ?????????????????????????????????????????????????????????????????????????????????? > > David Alda Fern?ndez de Lezea > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad > > IKT > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > ?????????????????????????????????????????????????????????????????????????????????? > > -----Mensaje original----- > De: bartvde@osgis.nl [mailto:bartvde@osgis.nl] > Enviado el: viernes, 13 de noviembre de 2009 9:18 > Para: David Alda Fernandez de Lezea > CC: users@openlayers.org > Asunto: Re: [OpenLayers-Users] mergeNewParams not working > > Can you post the contents of your SLD XML? > > Best regards, > Bart > >> Hello, >> >> I want to apply some SLD generated on the fly through SLD_BODY >> parameter using the following code: >> >> var sld = getSLD("sld1.xsl","pilaXML.xml"); var wms = >> map.getLayersByName("myLayerName")[0]; >> wms.mergeNewParams({SLD_BODY: sld}); >> >> but I don't get any result. The image is refreshed in the browser but >> there's no selection at all. I've got a debug file for my WMS server >> and I don't seem to get any error: >> >> [Fri Nov 13 09:00:18 2009].346000 CGI Request 1 on process 5940 >> >> My SLD contains 2084 characters, it could be that the problem? Or >> maybe I'm doing something wrong. Has anybody any idea of what's >> happening?? >> >> Thanks. >> >> >> >> >> >> >> Un saludo, >> >> >> >> ?????????????????????????????????????????????????????????????????????? >> ???????????? >> >> >> David Alda Fern?ndez de Lezea >> >> Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y >> Biodiversidad >> >> >> >> IKT >> >> Granja Modelo s/n ? 01192 ? Arkaute (Araba) >> >> >> ?????????????????????????????????????????????????????????????????????????????????? >> Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 >> ?????????????????????????????????????????????????????????????????????????????????? >> email: dalda@ikt.es web: www.ikt.es >> >> ?????????????????????????????????????????????????????????????????????? >> ???????????? >> >> _______________________________________________ >> 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 arnd.wippermann at web.de Fri Nov 13 05:27:28 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Query problem In-Reply-To: <1258097036622-3997793.post@n2.nabble.com> Message-ID: Hi, It seems, that your loop creates the window for your first queryable layer and then the queryresult of your next queryable layers use the same window and overwrite the contents of the window "getfeatureinfo". The last wins. If you change the window name to "getfeatureinfo" + i, then you should get one window for every query. A second approach is to collect the visibible layers and do only one getfeatureinfo request with this layerlist. Then you get back from MapServer one result html for all the queried layers. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Aypes2 Gesendet: Freitag, 13. November 2009 08:24 An: users@openlayers.org Betreff: [OpenLayers-Users] Query problem Dear all, I just got a query problem. I have several overlays, and I want them to be queryable when they are turned on (visible) only. But I found if I turn on two or more overlays, only 1 layer can be queried and other visible overlays give no result (empty template in mapfile). Here is my code: map.events.register('click', map, function (e) { var oplayers = new Array( alayer.visibility, blayer.visibility, clayer.visibility, dlayer.visibility, elayer.visibility, flayer.visibility); var mslayers = new Array("a","b","c","d","e","f"); var i=0; for (i=0; i < 7; i++) { if ( oplayers[i] == true ) { var url = "http://localhost/cgi-bin/mapserv.exe" + "?map=c:/ms4w/Apache/htdocs/mapfile.map" + "&REQUEST=GetFeatureInfo" + "&VERSION=1.1.1" + "&EXCEPTIONS=application/vnd.ogc.se_xml" + "&BBOX=" + map.getExtent().toBBOX() + "&X=" + e.xy.x + "&Y=" + e.xy.y + "&INFO_FORMAT=text/html" + "&QUERY_LAYERS=" + mslayers[i] + "&LAYERS=" + mslayers[i] + "&FEATURE_COUNT=1" + "&SRS=EPSG:4269" + "&STYLES=" + "&WIDTH=" + map.size.w + "&HEIGHT=" + map.size.h; window.open(url, "getfeatureinfo", "location=0,status=0,scrollbars=1,width=600,height=400" ); }; }; }); alayer,blayer,clayer,dlayer,elayer,flayer are names of layers defined in html. (var alayer = ......) a,b,c,d,e,f are the layer names of the mapfiles. The only querable layer is the 'highest' one. For example, if I turn on alayer and blayer, blayer can be queried but alayer cannot. If alayer, blayer and flayer are on, only flayer can be queried. I find that the layer with higher variable i ([ oplayer[i] ]) would be queried only. I know there is a function called WMSfeatureGetinfo but I don't know how to use it. I just know it has queryVisible which can filter the hidden layers, but error 'permission denied' always comes out when I click on the query layer. I prefer my method, and I think the logic of my code is okay but something is wrong. Can anyone get idea about that? Regards, Aypes2 -- View this message in context: http://n2.nabble.com/Query-problem-tp3997793p3997793.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 bavrik at mail.ru Fri Nov 13 06:00:19 2009 From: bavrik at mail.ru (Altair) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Is it possible to change modifyFeature control ? Message-ID: <1258110019590-3998546.post@n2.nabble.com> Dear list! Is it possible to change modifyFeature control ? For example, I want to remove the point of the polygon do not click Del-button, but mouse double-click on the point. Or add a new point of the polygon by double clicking on the map. Thanks for advice. -- View this message in context: http://n2.nabble.com/Is-it-possible-to-change-modifyFeature-control-tp3998546p3998546.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From anrapas at gmail.com Fri Nov 13 06:05:45 2009 From: anrapas at gmail.com (Toni Ramiro) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Layer not shown In-Reply-To: <4AFC0D6A.3080707@mapgears.com> References: <4AFC0D6A.3080707@mapgears.com> Message-ID: Ok. I've modified the code this way (the red one): var opciones = { projection:"EPSG:4230", units:"dd", maxExtent:new OpenLayers.Bounds(-3,37,0,39) }; map = new OpenLayers.Map('map', opciones); var sigpac_layer = new OpenLayers.Layer.WMS( "PNOA", "http://www.idee.es/wms/PNOA/PNOA", { layers:"pnoa", version:"1.1.1", format:"image/png" }, { projection:"EPSG:4230" }); map.addLayer(sigpac_layer); var mapserver_layer = new OpenLayers.Layer.WMS( 'Murcia', 'http://localhost/cgi-bin/mapserv.exe', { map:'D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map', layers:'arquetas_otros_planifrega,regulacion_ext_planifrega,conducciones_planifrega,regulacion_int_planifrega,tomas_planifrega,balsas_planifrega,bombeos_planifrega' transparent:'true' }, { projection:"EPSG:4326", units:"m", maxExtent:new OpenLayers.Bounds(548757,4138136,716640,4282922) }); map.addLayer(mapserver_layer); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.MouseToolbar()); map.addControl(new OpenLayers.Control.MousePosition()); map.zoomToMaxExtent(); But I've recived the same result. Thanks. 2009/11/12 Alexandre Dube > Hi Toni, > > Your data projection is in meters, so you must set it in the > OpenLayers.Map object as well. By default, it's in degrees [1]. Plus, the > maxExtent should be in meters too (try using the one from your mapfile). > > If it's still not working, you can try watching the request built from > OpenLayers in Firebug and see the response. There may more more clues > there. > > Best of luck, > > Alexandre > > [1] > http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.units > > Toni Ramiro wrote: > >> I'm new to this and I've encountered a problem. >> >> I defined the following code to load one layer with OpenLayers >> >> var opciones = { >> projection:"EPSG:4230", >> maxExtent:new OpenLayers.Bounds(-3,37,0,39) >> }; >> map = new OpenLayers.Map('map', opciones); >> var sigpac_layer = new OpenLayers.Layer.WMS( >> "PNOA", "http://www.idee.es/wms/PNOA/PNOA", >> { >> layers:"pnoa", version:"1.1.1", >> format:"image/png" >> }, { >> projection:"EPSG:4230", >> units:"m" >> }); >> map.addLayer(sigpac_layer); >> >> var mapserver_layer = new OpenLayers.Layer.WMS( >> 'Murcia', >> 'http://localhost/cgi-bin/mapserv.exe', >> { >> >> map:'D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map', >> layers:'arquetas_otros_planifrega', >> transparent:'true' >> }, { >> projection:"EPSG:4326", >> units:"m" >> }); >> map.addLayer(mapserver_layer); >> >> map.addControl(new OpenLayers.Control.LayerSwitcher()); >> map.addControl(new OpenLayers.Control.MouseToolbar()); >> map.addControl(new OpenLayers.Control.MousePosition()); >> map.zoomToMaxExtent(); >> >> My MapServer project is as follows: >> >> MAP >> NAME Murcia >> SIZE 800 600 >> UNITS METERS >> >> EXTENT 544061.905938 4135608.106250 720849.906562 4288074.143750 >> CONFIG PROJ_LIB "D:\Desarrollo\MapServer\proj\nad\" >> PROJECTION >> 'proj=longlat' >> 'ellps=WGS84' >> 'datum=WGS84' >> 'no_defs' >> '' >> END >> >> IMAGECOLOR 192 192 192 >> IMAGEQUALITY 95 >> IMAGETYPE png >> OUTPUTFORMAT >> NAME png >> DRIVER 'GD/PNG' >> MIMETYPE 'image/png' >> EXTENSION 'png' >> END >> >> LEGEND >> IMAGECOLOR 255 255 255 >> STATUS ON >> KEYSIZE 18 12 >> LABEL >> TYPE BITMAP >> SIZE MEDIUM >> COLOR 0 0 89 >> END >> END >> >> WEB >> IMAGEPATH 'C:/Inetpub/tmp/' >> IMAGEURL '/tmp/' >> >> METADATA >> 'wms_title' 'Murcia' >> 'wms_onlineresource' ' >> http://localhost/cgi-bin/mapserv.exe?map=D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map&< >> http://localhost/cgi-bin/mapserv.exe?map=D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map& >> >' >> >> 'wms_srs' 'EPSG:4326' >> END >> >> END >> LAYER >> NAME 'arquetas_otros_planifrega' >> TYPE POINT >> DATA >> 'D:\Desarrollo\MapServer\datos\CapasDePrueba\arquetas_otros_planifrega.shp' >> METADATA >> 'wms_title' 'arquetas_otros_planifrega' >> END >> STATUS DEFAULT >> TRANSPARENCY 100 >> PROJECTION >> 'proj=longlat' >> 'ellps=WGS84' >> 'datum=WGS84' >> 'no_defs' >> '' >> END >> CLASS >> NAME 'arquetas_otros_planifrega' STYLE >> SYMBOL 'CIRCLE' SIZE 2 OUTLINECOLOR 0 0 0 >> COLOR 31 2 3 >> END >> END >> END >> >> SYMBOL >> NAME 'CIRCLE' >> TYPE ellipse >> FILLED true >> POINTS >> 1 1 >> END >> END END >> >> The result is that the OpenLayers 'Murcia' layer shows no data, and if >> left alone in the project only shows a gray background. >> >> I've tried the same using QGis WMS client to Mapserver and shows the data. >> >> ?Do anybody knows how to solve the problem? >> >> Thanks a lot. >> >> -- >> Saludos, >> Toni Ramiro >> > >> > >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -- Saludos, Toni Ramiro -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091113/5496f2de/attachment.html From dalda at ikt.es Fri Nov 13 06:33:43 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] mergeNewParams not working SOLVED Message-ID: <224DBDAF88A6AC47BD22432815351BE0078DD627@nekaposta1> Ok, definitely it was my mistake. The error that I posted before was because MapServer couldn't find the sld file. And now, I don't know why the code I posted the first time works. Maybe was some kind of syntax error or something like that. By the way, I create the SLD on the fly using XSL and in the resultant XML I maintain those XSL tags, and it works, just to let you know. Thanks for your help Bart. 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 ?????????????????????????????????????????????????????????????????????????????????? -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de David Alda Fernandez de Lezea Enviado el: viernes, 13 de noviembre de 2009 10:27 Para: users@openlayers.org Asunto: Re: [OpenLayers-Users] mergeNewParams not working I'm using MapServer and I made some time ago a map viewer using only MapServer and an HTML page with PHP in which I was able to apply SLD's and I'm just copying them and try to make it work, so I'm almost 100% sure that MapServer can work with these SLD's. I've tried what you said, remove XSL tags and add SLD parameter to my layer: wms.mergeNewParams({SLD: "sld2.xml"}); But I get a lot of errors from MapServer. [Fri Nov 13 10:02:37 2009].770000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:37 2009].770000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ab_1624_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:36 2009].20000 CGI Request 1 on process 6124 [Fri Nov 13 10:02:38 2009].474000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:38 2009].474000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ac_17ec_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:36 2009].20000 CGI Request 1 on process 5144 [Fri Nov 13 10:02:38 2009].474000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:38 2009].474000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ac_1418_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:37 2009].786000 CGI Request 1 on process 4904 [Fri Nov 13 10:02:40 2009].505000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:40 2009].505000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ad_1328_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:38 2009].989000 CGI Request 1 on process 1444 [Fri Nov 13 10:02:41 2009].739000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:41 2009].739000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20ae_5a4_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:40 2009].536000 CGI Request 1 on process 5968 [Fri Nov 13 10:02:43 2009].67000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:43 2009].67000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b0_1750_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:40 2009].520000 CGI Request 1 on process 3216 [Fri Nov 13 10:02:43 2009].83000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:43 2009].83000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b0_c90_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:41 2009].755000 CGI Request 1 on process 4736 [Fri Nov 13 10:02:44 2009].364000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:44 2009].364000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b1_1280_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:43 2009].98000 CGI Request 1 on process 5816 [Fri Nov 13 10:02:45 2009].645000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:45 2009].645000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b3_16b8_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:44 2009].380000 CGI Request 1 on process 2636 [Fri Nov 13 10:02:46 2009].942000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:46 2009].942000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b4_a4c_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:45 2009].661000 CGI Request 1 on process 4892 [Fri Nov 13 10:02:48 2009].20000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:48 2009].20000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b5_131c_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:46 2009].958000 CGI Request 1 on process 6092 [Fri Nov 13 10:02:49 2009].458000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:49 2009].458000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b6_17cc_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file [Fri Nov 13 10:02:48 2009].36000 CGI Request 1 on process 4768 [Fri Nov 13 10:02:50 2009].489000 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 () for sld2.xml [Fri Nov 13 10:02:50 2009].489000 msSLDApplySLDURL: WMS server error. Could not open SLD sld2.xml and save it in temporary file C:/ms4w/Apache/htdocs/MFD/tmp/4afd20b8_12a0_0.sld.xml. Please make sure that the sld url is valid and that imagepath and imageurl are set properly in the map file This is the first time I see this error. What I want to really do is to get some data from an external service in a predefined structure and parse it using XSL and my predefined SLD, to get a final SLD xml file and apply it to the layer, that's the reason because I had those tags. You should apply it to the polygon layer. What WMS are you using? Mapserver? Try to put your SLD XML on a webserver and reference it with the SLD parameter without the use of OpenLayers in between. If this does not work, you might have better luck asking on the mailing list of your server product. Have you tried without the xsl stuff embedded in your XML? Also, things like PropertyIsEqualTo etc need to be in the ogc prefix, not sure if this is the problem though (some WMS-s are quite permissive). Best regards, Bart > > Sure, here it is: > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > > > xsi:schemaLocation="http://www.opengis.net/sld > StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > RecintosSigpac > > Selecci?n de Recintos > T?tulo > Comentarios > > > > > > PROVINCIA > 1 > > > MUNICIPIO > 1 > > > POLIGONO > 1 > > > PARCELA > 1 > > > RECINTO > 1 > > > > > > #FFCC66 > 0.5 > > > #00FF00 > 3 > > > > > > > > > > > > One more question, I have 2 layers, both are taken from my WMS but one > is a raster file, that acts as base layer, and the other one is > polygon layer. In which of them do I have to apply the new params??. > I've tried appliying them in my polygon layer. > > Thanks. > > > Un saludo, > > ?????????????????????????????????????????????????????????????????????? > ???????????? > > David Alda Fern?ndez de Lezea > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y > Biodiversidad > > IKT > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es web: www.ikt.es > ?????????????????????????????????????????????????????????????????????? > ???????????? > > -----Mensaje original----- > De: bartvde@osgis.nl [mailto:bartvde@osgis.nl] Enviado el: viernes, 13 > de noviembre de 2009 9:18 > Para: David Alda Fernandez de Lezea > CC: users@openlayers.org > Asunto: Re: [OpenLayers-Users] mergeNewParams not working > > Can you post the contents of your SLD XML? > > Best regards, > Bart > >> Hello, >> >> I want to apply some SLD generated on the fly through SLD_BODY >> parameter using the following code: >> >> var sld = getSLD("sld1.xsl","pilaXML.xml"); var wms = >> map.getLayersByName("myLayerName")[0]; >> wms.mergeNewParams({SLD_BODY: sld}); >> >> but I don't get any result. The image is refreshed in the browser but >> there's no selection at all. I've got a debug file for my WMS server >> and I don't seem to get any error: >> >> [Fri Nov 13 09:00:18 2009].346000 CGI Request 1 on process 5940 >> >> My SLD contains 2084 characters, it could be that the problem? Or >> maybe I'm doing something wrong. Has anybody any idea of what's >> happening?? >> >> Thanks. >> >> >> >> >> >> >> Un saludo, >> >> >> >> ????????????????????????????????????????????????????????????????????? >> ? >> ???????????? >> >> >> David Alda Fern?ndez de Lezea >> >> Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y >> Biodiversidad >> >> >> >> IKT >> >> Granja Modelo s/n ? 01192 ? Arkaute (Araba) >> >> >> ?????????????????????????????????????????????????????????????????????????????????? >> Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 >> ?????????????????????????????????????????????????????????????????????????????????? >> email: dalda@ikt.es web: www.ikt.es >> >> ????????????????????????????????????????????????????????????????????? >> ? >> ???????????? >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From steffen.schwarz85 at googlemail.com Fri Nov 13 06:36:34 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] WFS OpenLayers.ProxyHost Tomcat 5.5 In-Reply-To: <4AEEC118.30506@opengeo.org> References: <1257149383506-3930399.post@n2.nabble.com> <4AEEC118.30506@opengeo.org> Message-ID: <1258112194238-3998655.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > you could use the Proxy extension for GeoServer 2.0. For instructions > and download link, go to > http://geoserver.org/display/GEOS/GeoServer+Proxy+Extension. > Hi, thanks for the hint. I just installed the proxy plugin and the example with google http://[your_geoserver_domain]/geoserver/rest/proxy?url=http://www.google.com works. so the proxy is working. Now my problem is, what for a hostname do I have to enter, that my application will run. Do I have to enter my IP, or the IP, where geoserver runs, or something else. I already entered some hostnames but my wfs getfeature request didn't send me an http request (firebug showed " ") Does anyone know what I have to enter at hostnames? Regards stash -- View this message in context: http://n2.nabble.com/WFS-OpenLayers-ProxyHost-Tomcat-5-5-tp3930399p3998655.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ml at lingner.eu Fri Nov 13 07:01:32 2009 From: ml at lingner.eu (Lars Lingner) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] howto fix overviewmap Message-ID: <4AFD4A9C.8030704@lingner.eu> Hello, in my application I defined an overviewmap like this: var ovmap = new OpenLayers.Layer.Image( "ovmap", "/img/ovmap.png", new OpenLayers.Bounds(485455.0625, 109856,512934.34375, 135514), new OpenLayers.Size(178,162) ); var ov_options = { layers: [ovmap], mapOptions: { numZoomLevels: 1, autoPan: false, // alwaysInRange: true, restrictedExtent: new OpenLayers.Bounds(485455.0625, 109856,512934.34375, 135514 ) }, size: new OpenLayers.Size(178, 162), }; and add ov_options to the control: new OpenLayers.Control.OverviewMap( ov_options ) The image is shown but if I zoom in, the overviewmap gets recenterd. What kind of mistake am I doing? Setting restrictedExtent also doesn't work. Should I resize my image to an more appropriate size or doesn't the size matter? Thanks in advance for any hints. Lars From steffen.schwarz85 at googlemail.com Fri Nov 13 07:38:52 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers Message-ID: <1258115932926-3998936.post@n2.nabble.com> Hello, I want to show some data with a wfs in openlayers. I already know, that i have to configure a proxy that I can do this. With geoserver you have the opportunity to install a plugin called ProxyExtension, to do exactly this. http://geoserver.org/display/GEOS/GeoServer+Proxy+Extension I installed the plugin and the example with the redirect to google works (http://[your_geoserver_domain]/geoserver/rest/proxy?url=http://www.google.com) --> the proxy is installed correctly. But now there are the next problems. 1. What for a hostname do i have to configure (Do i have to enter the ip of my pc, or the ip of the geoserver pc, ...?) 2. Do I have to set up a Openlayers.proxyhost in my program. How would this look like in my case? I hope someone can help me with this problem. I already tried so many different things, but nothing worked. (Either I get no response text in firebug or I get a bad request) Thanks for your answers. Regards stash -- View this message in context: http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p3998936.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Fri Nov 13 07:59:54 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Layer not shown In-Reply-To: References: <4AFC0D6A.3080707@mapgears.com> Message-ID: <4AFD584A.1010300@mapgears.com> Toni, Try putting all properties (layers and map) the same : units: "m", projection: "EPSG: 4230", maxExtent:new OpenLayers.Bounds(548757,4138136,716640,4282922) Here's an similar example : http://dev4.mapgears.com/bdga/simpleMap.html Regards, Alexandre Toni Ramiro wrote: > Ok. I've modified the code this way (the red one): > > var opciones = { > projection:"EPSG:4230", > units:"dd", > maxExtent:new OpenLayers.Bounds(-3,37,0,39) > }; > map = new OpenLayers.Map('map', opciones); > > var sigpac_layer = new OpenLayers.Layer.WMS( > "PNOA", > "http://www.idee.es/wms/PNOA/PNOA", > { > layers:"pnoa", > version:"1.1.1", > format:"image/png" > }, > { > projection:"EPSG:4230" > }); > map.addLayer(sigpac_layer); > > var mapserver_layer = new OpenLayers.Layer.WMS( > 'Murcia', > 'http://localhost/cgi-bin/mapserv.exe', > { > map:'D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map', > layers:'arquetas_otros_planifrega,regulacion_ext_planifrega,conducciones_planifrega,regulacion_int_planifrega,tomas_planifrega,balsas_planifrega,bombeos_planifrega' > transparent:'true' > }, > { > projection:"EPSG:4326", > units:"m", > maxExtent:new OpenLayers.Bounds(548757,4138136,716640,4282922) > }); > map.addLayer(mapserver_layer); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new OpenLayers.Control.MouseToolbar()); > map.addControl(new OpenLayers.Control.MousePosition()); > map.zoomToMaxExtent(); > > > But I've recived the same result. > > Thanks. > > > > 2009/11/12 Alexandre Dube > > > Hi Toni, > > Your data projection is in meters, so you must set it in the > OpenLayers.Map object as well. By default, it's in degrees [1]. > Plus, the maxExtent should be in meters too (try using the one > from your mapfile). > > If it's still not working, you can try watching the request built > from OpenLayers in Firebug and see the response. There may more > more clues there. > > Best of luck, > > Alexandre > > [1] > http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.units > > Toni Ramiro wrote: > > I'm new to this and I've encountered a problem. > > I defined the following code to load one layer with OpenLayers > > var opciones = { > projection:"EPSG:4230", > maxExtent:new OpenLayers.Bounds(-3,37,0,39) > }; > map = new OpenLayers.Map('map', opciones); > var sigpac_layer = new OpenLayers.Layer.WMS( > "PNOA", "http://www.idee.es/wms/PNOA/PNOA", { > layers:"pnoa", version:"1.1.1", > format:"image/png" > }, { > projection:"EPSG:4230", > units:"m" > }); > map.addLayer(sigpac_layer); > > var mapserver_layer = new OpenLayers.Layer.WMS( > 'Murcia', > 'http://localhost/cgi-bin/mapserv.exe', > { > map:'D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map', > layers:'arquetas_otros_planifrega', > transparent:'true' > }, { > projection:"EPSG:4326", > units:"m" > }); > map.addLayer(mapserver_layer); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new OpenLayers.Control.MouseToolbar()); > map.addControl(new OpenLayers.Control.MousePosition()); > map.zoomToMaxExtent(); > > My MapServer project is as follows: > > MAP > NAME Murcia > SIZE 800 600 > UNITS METERS > > EXTENT 544061.905938 4135608.106250 720849.906562 4288074.143750 > CONFIG PROJ_LIB "D:\Desarrollo\MapServer\proj\nad\" > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > '' > END > > IMAGECOLOR 192 192 192 > IMAGEQUALITY 95 > IMAGETYPE png > OUTPUTFORMAT > NAME png > DRIVER 'GD/PNG' > MIMETYPE 'image/png' > EXTENSION 'png' > END > > LEGEND > IMAGECOLOR 255 255 255 > STATUS ON > KEYSIZE 18 12 > LABEL > TYPE BITMAP > SIZE MEDIUM > COLOR 0 0 89 > END > END > > WEB > IMAGEPATH 'C:/Inetpub/tmp/' > IMAGEURL '/tmp/' > > METADATA > 'wms_title' 'Murcia' > 'wms_onlineresource' > 'http://localhost/cgi-bin/mapserv.exe?map=D:/Desarrollo/MapServer/datos/ms_murcia_qgis_shp.map& > > >' > > > 'wms_srs' 'EPSG:4326' > END > > END > LAYER > NAME 'arquetas_otros_planifrega' > TYPE POINT > DATA > 'D:\Desarrollo\MapServer\datos\CapasDePrueba\arquetas_otros_planifrega.shp' > METADATA > 'wms_title' 'arquetas_otros_planifrega' > END > STATUS DEFAULT > TRANSPARENCY 100 > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > '' > END > CLASS > NAME 'arquetas_otros_planifrega' STYLE > SYMBOL 'CIRCLE' SIZE 2 OUTLINECOLOR 0 0 0 > COLOR 31 2 3 > END > END > END > > SYMBOL > NAME 'CIRCLE' > TYPE ellipse > FILLED true > POINTS > 1 1 > END > END END > > The result is that the OpenLayers 'Murcia' layer shows no > data, and if left alone in the project only shows a gray > background. > > I've tried the same using QGis WMS client to Mapserver and > shows the data. > > ?Do anybody knows how to solve the problem? > > Thanks a lot. > > -- > Saludos, > Toni Ramiro > > >> > > >> > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > > > > -- > Saludos, > Toni Ramiro > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From Christopher.Jones at amlin.co.uk Fri Nov 13 08:04:49 2009 From: Christopher.Jones at amlin.co.uk (Jones, Christopher) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Add Point to Map Message-ID: <8A8A884BC27BED439849DAB50639D302A5AA87@gemini.amlin.com> Hi all, Im fairly new to OpenLayers and javascript for that matter as well. Having looked extensively through all the various examples and forums and blogs, and one or 2 tutorials, I am still struggling to add a point to a map (or a vector layer)! All I want, is to click on a map and adda a point. Heres my code, please feel free to point all the errors you want! Thanks in advance! Chris (Sorry if this has been sent twice) var myStyles = new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ fillColor: "#ffcc66", strokeColor: "#ff9933", strokeWidth: 10 }) }); function initialiseMap(){ map = new OpenLayers.Map('map'); map.addControl(new OpenLayers.Control.LayerSwitcher()); var gphy = new OpenLayers.Layer.Google( "Google Physical", { type: G_PHYSICAL_MAP } ); var gmap = new OpenLayers.Layer.Google( "Google Streets", {numZoomLevels: 20 } ); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", { type: G_HYBRID_MAP, numZoomLevels: 20 } ); var gsat = new OpenLayers.Layer.Google( "Google Satellite", { type: G_SATELLITE_MAP, numZoomLevels: 20 } ); map.addLayers([gphy, gmap, ghyb, gsat]); map.setCenter(new OpenLayers.LonLat(-74.0094, 40.7048), 5); map.addControl(new OpenLayers.Control.PanZoomBar()); map.addControl(new OpenLayers.Control.MousePosition()); } function singleClickButton() { document.getElementById("map").childNodes[0].style.cursor = "crosshair"; map.events.register('click', '', singleClickEvent); } function singleClickEvent (e) { var lonlat = map.getLonLatFromViewPortPx(e.xy); var lon = lonlat.lon var lat = lonlat.lat var pointLayer = new OpenLayers.Layer.Vector('Points', { styleMap: myStyles }); map.addLayers([pointLayer]); var bPoint = new OpenLayers.Geometry.Point(lon , lat) newpoint = new OpenLayers.Feature.Vector(bPoint); pointLayer.addFeatures(newpoint); } IMPORTANT - This email and the information that it contains may be confidential, legally privileged and protected by law. Access by the intended recipient only is authorised. Any liability (in negligence or otherwise) arising from any third party acting, or refraining from acting, on any information contained in this email is hereby excluded. If you are not the intended recipient, please notify AmlinCommunications@amlin.co.uk immediately then delete it and do not disclose the contents to any other person, use it for any purpose or store or copy the information in any medium. Copyright in this email and attachments created by us belong to Amlin plc and/or one or more of its subsidiaries (Amlin Group). The author also asserts the right to be identified as such and object to any misuse. The Amlin Group prohibits and takes steps to prevent its email systems from being used to view, store or transmit offensive, obscene or discriminatory material. If this message contains inappropriate material please report it immediately to AmlinCommunications@amlin.co.uk. The Amlin Group records, monitors and may inspect messages that use its telecoms systems in order to protect its information, interests and reputation. Any message sent by you to or within the Amlin Group may therefore be viewed and may be acted upon. Of the companies within the Amlin Group, Amlin Underwriting Limited, Amlin Underwriting Services Limited, Amlin UK Limited and Amlin Plus Limited are authorised and regulated by the Financial Services Authority. This email has been sent by a member of staff of one or more of the following Amlin Group companies: Amlin plc. Registered in England and Wales no. 2854310 Amlin Underwriting Limited. Registered in England and Wales no. 2323018 Amlin Underwriting Services Limited. Registered in England and Wales no. 422615 Amlin UK Limited. Registered in England and Wales no. 2739220 Amlin Plus Limited. Registered in England and Wales no. 4729659 Registered Offices: St Helen's, 1 Undershaft, London EC3A 8ND, United Kingdom Amlin plc switchboard: 020 7746 1000 Web Site: http://www.amlin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091113/8d68dfdb/attachment.html From adube at mapgears.com Fri Nov 13 09:04:22 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Add Point to Map In-Reply-To: <8A8A884BC27BED439849DAB50639D302A5AA87@gemini.amlin.com> References: <8A8A884BC27BED439849DAB50639D302A5AA87@gemini.amlin.com> Message-ID: <4AFD6766.7030304@mapgears.com> Christopher, Look at the following example [1]. It should helps you a lot. (click on the small pencil to add a point). See also this article [2] about spherical mercator. Kind regards, Alexandre [1] http://openlayers.org/dev/examples/spherical-mercator.html [2] http://docs.openlayers.org/library/spherical_mercator.html Jones, Christopher wrote: > > Hi all, > > > > Im fairly new to OpenLayers and javascript for that matter as well. > Having looked extensively through all the various examples and forums > and blogs, and one or 2 tutorials, I am still struggling to add a > point to a map (or a vector layer)! All I want, is to click on a map > and adda a point. Heres my code, please feel free to point all the > errors you want! > > > > Thanks in advance! > > > > Chris > > (Sorry if this has been sent twice) > > > > > > var myStyles = new OpenLayers.StyleMap({ > > "default": new OpenLayers.Style({ > > fillColor: "#ffcc66", > > strokeColor: "#ff9933", > > strokeWidth: 10 > > }) > > }); > > > > function initialiseMap(){ > > map = new OpenLayers.Map('map'); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > var gphy = new OpenLayers.Layer.Google( > > "Google Physical", > > { type: G_PHYSICAL_MAP } > > ); > > var gmap = new OpenLayers.Layer.Google( > > "Google Streets", > > {numZoomLevels: 20 } > > ); > > var ghyb = new OpenLayers.Layer.Google( > > "Google Hybrid", > > { type: G_HYBRID_MAP, numZoomLevels: 20 } > > ); > > var gsat = new OpenLayers.Layer.Google( > > "Google Satellite", > > { type: G_SATELLITE_MAP, numZoomLevels: 20 } > > ); > > map.addLayers([gphy, gmap, ghyb, gsat]); > > map.setCenter(new OpenLayers.LonLat(-74.0094, > 40.7048), 5); > > map.addControl(new OpenLayers.Control.PanZoomBar()); > > map.addControl(new OpenLayers.Control.MousePosition()); > > } > > > > > > > > function singleClickButton() { > > document.getElementById("map").childNodes[0].style.cursor = > "crosshair"; > > map.events.register('click', '', singleClickEvent); > > > > } > > > > function singleClickEvent (e) { > > var lonlat = map.getLonLatFromViewPortPx(e.xy); > > var lon = lonlat.lon > > var lat = lonlat.lat > > > > var pointLayer = new OpenLayers.Layer.Vector('Points', { styleMap: > myStyles }); > > map.addLayers([pointLayer]); > > var bPoint = new OpenLayers.Geometry.Point(lon , lat) > > newpoint = new OpenLayers.Feature.Vector(bPoint); > > pointLayer.addFeatures(newpoint); > > > > } > > > > > > > > > > > > > > IMPORTANT - This email and the information that it contains may be > confidential, legally privileged and protected by law. Access by the > intended recipient only is authorised. Any liability (in negligence or > otherwise) arising from any third party acting, or refraining from > acting, on any information contained in this email is hereby excluded. > If you are not the intended recipient, please notify > AmlinCommunications@amlin.co.uk immediately then delete it and do not > disclose the contents to any other person, use it for any purpose or > store or copy the information in any medium. > > Copyright in this email and attachments created by us belong to Amlin > plc and/or one or more of its subsidiaries (Amlin Group). The author > also asserts the right to be identified as such and object to any misuse. > > The Amlin Group prohibits and takes steps to prevent its email systems > from being used to view, store or transmit offensive, obscene or > discriminatory material. If this message contains inappropriate > material please report it immediately to AmlinCommunications@amlin.co.uk. > > The Amlin Group records, monitors and may inspect messages that use > its telecoms systems in order to protect its information, interests > and reputation. Any message sent by you to or within the Amlin Group > may therefore be viewed and may be acted upon. > > Of the companies within the Amlin Group, Amlin Underwriting Limited, > Amlin Underwriting Services Limited, Amlin UK Limited and Amlin Plus > Limited are authorised and regulated by the Financial Services Authority. > > This email has been sent by a member of staff of one or more of the > following Amlin Group companies: > > Amlin plc. Registered in England and Wales no. 2854310 > Amlin Underwriting Limited. Registered in England and Wales no. 2323018 > Amlin Underwriting Services Limited. Registered in England and Wales > no. 422615 > Amlin UK Limited. Registered in England and Wales no. 2739220 > Amlin Plus Limited. Registered in England and Wales no. 4729659 > > Registered Offices: St Helen's, 1 Undershaft, London EC3A 8ND, United > Kingdom > > Amlin plc switchboard: 020 7746 1000 > Web Site: http://www.amlin.com > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From jcd at sdf.lonestar.org Fri Nov 13 11:28:11 2009 From: jcd at sdf.lonestar.org (J. Cliff Dyer) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Trying to draw a box on a map, and get the coordinates back. Message-ID: <1258129691.25288.30.camel@aalcdl07> I'm trying to draw a box on a map, have it persist until another box gets drawn, and submit the coordinates of the box to a form. I'm doing this to allow the user to search for objects within a given area. I'm doing this by using an OpenLayers.Handler.Box tool in a custom OpenLayers.Control, which then uses to the "done" callback of the draw method to create (or recreate) an OpenLayers.Feature.Vector and populate (or repopulate) a search form. My immediate problem is that the persistent box is not in quite the same location as the box the user just drew. I suspect this has something to do with projections, but since I never explicitly set projections, I'm not sure where the error sneaked in. More generally, I'm not sure I'm taking the optimal route from the bounds passed to the callback to the Vector feature. Currently, I do the following: 1) Take the incoming OpenLayers.Bounds object, 2) Get an OpenLayers.Pixel from the the corners 3) Get the coordinates of each pixel using map.getLonLatFromPixel 4) Create a new OpenLayers.Bounds 5) Extend it to my new coordinates 6) Convert it to a geometry 7) Convert it to an OpenLayers.Feature.Vector Then I take the coordinates from step 3) and populate a form with them, which I then submit to my application server side. The code for this is pasted here: http://pastebin.com/m300c24a5 Any pointers on how to do this more cleanly would be much appreciated. Cheers, Cliff From Christopher.Jones at amlin.co.uk Fri Nov 13 11:52:35 2009 From: Christopher.Jones at amlin.co.uk (Jones, Christopher) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Add Point to Map In-Reply-To: <4AFD6766.7030304@mapgears.com> References: <8A8A884BC27BED439849DAB50639D302A5AA87@gemini.amlin.com> <4AFD6766.7030304@mapgears.com> Message-ID: <8A8A884BC27BED439849DAB50639D302A5AB09@gemini.amlin.com> Hi Thanks for the tips! Its not quite what I was looking for unfortunately. I need the ability to add a point to be connected to a button I have on the web page rather than a specific OpenLayers Vector control. I have added the HTML element to hopefully help describe what I am trying to achieve. Thanks again Chris <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> OpenLayers

-----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Alexandre Dube Sent: 13 November 2009 14:04 To: Jones, Christopher Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Add Point to Map Christopher, Look at the following example [1]. It should helps you a lot. (click on the small pencil to add a point). See also this article [2] about spherical mercator. Kind regards, Alexandre [1] http://openlayers.org/dev/examples/spherical-mercator.html [2] http://docs.openlayers.org/library/spherical_mercator.html Jones, Christopher wrote: > > Hi all, > > > > Im fairly new to OpenLayers and javascript for that matter as well. > Having looked extensively through all the various examples and forums > and blogs, and one or 2 tutorials, I am still struggling to add a > point to a map (or a vector layer)! All I want, is to click on a map > and adda a point. Heres my code, please feel free to point all the > errors you want! > > > > Thanks in advance! > > > > Chris > > (Sorry if this has been sent twice) > > > > > > var myStyles = new OpenLayers.StyleMap({ > > "default": new OpenLayers.Style({ > > fillColor: "#ffcc66", > > strokeColor: "#ff9933", > > strokeWidth: 10 > > }) > > }); > > > > function initialiseMap(){ > > map = new OpenLayers.Map('map'); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > var gphy = new OpenLayers.Layer.Google( > > "Google Physical", > > { type: G_PHYSICAL_MAP } > > ); > > var gmap = new OpenLayers.Layer.Google( > > "Google Streets", > > {numZoomLevels: 20 } > > ); > > var ghyb = new OpenLayers.Layer.Google( > > "Google Hybrid", > > { type: G_HYBRID_MAP, numZoomLevels: 20 } > > ); > > var gsat = new OpenLayers.Layer.Google( > > "Google Satellite", > > { type: G_SATELLITE_MAP, numZoomLevels: 20 } > > ); > > map.addLayers([gphy, gmap, ghyb, gsat]); > > map.setCenter(new OpenLayers.LonLat(-74.0094, > 40.7048), 5); > > map.addControl(new OpenLayers.Control.PanZoomBar()); > > map.addControl(new OpenLayers.Control.MousePosition()); > > } > > > > > > > > function singleClickButton() { > > document.getElementById("map").childNodes[0].style.cursor = > "crosshair"; > > map.events.register('click', '', singleClickEvent); > > > > } > > > > function singleClickEvent (e) { > > var lonlat = map.getLonLatFromViewPortPx(e.xy); > > var lon = lonlat.lon > > var lat = lonlat.lat > > > > var pointLayer = new OpenLayers.Layer.Vector('Points', { styleMap: > myStyles }); > > map.addLayers([pointLayer]); > > var bPoint = new OpenLayers.Geometry.Point(lon , lat) > > newpoint = new OpenLayers.Feature.Vector(bPoint); > > pointLayer.addFeatures(newpoint); > > > > } > > > > > > > > > > > > > > IMPORTANT - This email and the information that it contains may be > confidential, legally privileged and protected by law. Access by the > intended recipient only is authorised. Any liability (in negligence or > otherwise) arising from any third party acting, or refraining from > acting, on any information contained in this email is hereby excluded. > If you are not the intended recipient, please notify > AmlinCommunications@amlin.co.uk immediately then delete it and do not > disclose the contents to any other person, use it for any purpose or > store or copy the information in any medium. > > Copyright in this email and attachments created by us belong to Amlin > plc and/or one or more of its subsidiaries (Amlin Group). The author > also asserts the right to be identified as such and object to any misuse. > > The Amlin Group prohibits and takes steps to prevent its email systems > from being used to view, store or transmit offensive, obscene or > discriminatory material. If this message contains inappropriate > material please report it immediately to AmlinCommunications@amlin.co.uk. > > The Amlin Group records, monitors and may inspect messages that use > its telecoms systems in order to protect its information, interests > and reputation. Any message sent by you to or within the Amlin Group > may therefore be viewed and may be acted upon. > > Of the companies within the Amlin Group, Amlin Underwriting Limited, > Amlin Underwriting Services Limited, Amlin UK Limited and Amlin Plus > Limited are authorised and regulated by the Financial Services Authority. > > This email has been sent by a member of staff of one or more of the > following Amlin Group companies: > > Amlin plc. Registered in England and Wales no. 2854310 > Amlin Underwriting Limited. Registered in England and Wales no. 2323018 > Amlin Underwriting Services Limited. Registered in England and Wales > no. 422615 > Amlin UK Limited. Registered in England and Wales no. 2739220 > Amlin Plus Limited. Registered in England and Wales no. 4729659 > > Registered Offices: St Helen's, 1 Undershaft, London EC3A 8ND, United > Kingdom > > Amlin plc switchboard: 020 7746 1000 > Web Site: http://www.amlin.com > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 IMPORTANT - This email and the information that it contains may be confidential, legally privileged and protected by law. Access by the intended recipient only is authorised. Any liability (in negligence or otherwise) arising from any third party acting, or refraining from acting, on any information contained in this email is hereby excluded. If you are not the intended recipient, please notify AmlinCommunications@amlin.co.uk immediately then delete it and do not disclose the contents to any other person, use it for any purpose or store or copy the information in any medium. Copyright in this email and attachments created by us belong to Amlin plc and/or one or more of its subsidiaries (Amlin Group). The author also asserts the right to be identified as such and object to any misuse. The Amlin Group prohibits and takes steps to prevent its email systems from being used to view, store or transmit offensive, obscene or discriminatory material. If this message contains inappropriate material please report it immediately to AmlinCommunications@amlin.co.uk. The Amlin Group records, monitors and may inspect messages that use its telecoms systems in order to protect its information, interests and reputation. Any message sent by you to or within the Amlin Group may therefore be viewed and may be acted upon. Of the companies within the Amlin Group, Amlin Underwriting Limited, Amlin Underwriting Services Limited, Amlin UK Limited and Amlin Plus Limited are authorised and regulated by the Financial Services Authority. This email has been sent by a member of staff of one or more of the following Amlin Group companies: Amlin plc. Registered in England and Wales no. 2854310 Amlin Underwriting Limited. Registered in England and Wales no. 2323018 Amlin Underwriting Services Limited. Registered in England and Wales no. 422615 Amlin UK Limited. Registered in England and Wales no. 2739220 Amlin Plus Limited. Registered in England and Wales no. 4729659 Registered Offices: St Helen's, 1 Undershaft, London EC3A 8ND, United Kingdom Amlin plc switchboard: 020 7746 1000 Web Site: http://www.amlin.com From adube at mapgears.com Fri Nov 13 11:58:44 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Add Point to Map In-Reply-To: <8A8A884BC27BED439849DAB50639D302A5AB09@gemini.amlin.com> References: <8A8A884BC27BED439849DAB50639D302A5AA87@gemini.amlin.com> <4AFD6766.7030304@mapgears.com> <8A8A884BC27BED439849DAB50639D302A5AB09@gemini.amlin.com> Message-ID: <4AFD9044.9040201@mapgears.com> Christopher, Jones, Christopher wrote: > > Hi > > Thanks for the tips! Its not quite what I was looking for unfortunately. I need the ability to add a point to be connected to a button I have on the web page rather than a specific OpenLayers Vector control. > How about this [1] ( still an OpenLayers approach, but outside the map... )? Kind regards, Alexandre [1] http://openlayers.org/dev/examples/navtoolbar-outsidemap.html > I have added the HTML element to hopefully help describe what I am trying to achieve. > > Thanks again > > Chris > > > > <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> > > > > > > > OpenLayers > > > > > > > > > > >

> >

> >
>
> > > > > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Alexandre Dube > Sent: 13 November 2009 14:04 > To: Jones, Christopher > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Add Point to Map > > Christopher, > > Look at the following example [1]. It should helps you a lot. (click > on the small pencil to add a point). > > See also this article [2] about spherical mercator. > > Kind regards, > > Alexandre > > [1] http://openlayers.org/dev/examples/spherical-mercator.html > [2] http://docs.openlayers.org/library/spherical_mercator.html > > Jones, Christopher wrote: > >> Hi all, >> >> >> >> Im fairly new to OpenLayers and javascript for that matter as well. >> Having looked extensively through all the various examples and forums >> and blogs, and one or 2 tutorials, I am still struggling to add a >> point to a map (or a vector layer)! All I want, is to click on a map >> and adda a point. Heres my code, please feel free to point all the >> errors you want! >> >> >> >> Thanks in advance! >> >> >> >> Chris >> >> (Sorry if this has been sent twice) >> >> >> >> >> >> var myStyles = new OpenLayers.StyleMap({ >> >> "default": new OpenLayers.Style({ >> >> fillColor: "#ffcc66", >> >> strokeColor: "#ff9933", >> >> strokeWidth: 10 >> >> }) >> >> }); >> >> >> >> function initialiseMap(){ >> >> map = new OpenLayers.Map('map'); >> >> map.addControl(new OpenLayers.Control.LayerSwitcher()); >> >> var gphy = new OpenLayers.Layer.Google( >> >> "Google Physical", >> >> { type: G_PHYSICAL_MAP } >> >> ); >> >> var gmap = new OpenLayers.Layer.Google( >> >> "Google Streets", >> >> {numZoomLevels: 20 } >> >> ); >> >> var ghyb = new OpenLayers.Layer.Google( >> >> "Google Hybrid", >> >> { type: G_HYBRID_MAP, numZoomLevels: 20 } >> >> ); >> >> var gsat = new OpenLayers.Layer.Google( >> >> "Google Satellite", >> >> { type: G_SATELLITE_MAP, numZoomLevels: 20 } >> >> ); >> >> map.addLayers([gphy, gmap, ghyb, gsat]); >> >> map.setCenter(new OpenLayers.LonLat(-74.0094, >> 40.7048), 5); >> >> map.addControl(new OpenLayers.Control.PanZoomBar()); >> >> map.addControl(new OpenLayers.Control.MousePosition()); >> >> } >> >> >> >> >> >> >> >> function singleClickButton() { >> >> document.getElementById("map").childNodes[0].style.cursor = >> "crosshair"; >> >> map.events.register('click', '', singleClickEvent); >> >> >> >> } >> >> >> >> function singleClickEvent (e) { >> >> var lonlat = map.getLonLatFromViewPortPx(e.xy); >> >> var lon = lonlat.lon >> >> var lat = lonlat.lat >> >> >> >> var pointLayer = new OpenLayers.Layer.Vector('Points', { styleMap: >> myStyles }); >> >> map.addLayers([pointLayer]); >> >> var bPoint = new OpenLayers.Geometry.Point(lon , lat) >> >> newpoint = new OpenLayers.Feature.Vector(bPoint); >> >> pointLayer.addFeatures(newpoint); >> >> >> >> } >> >> >> >> >> >> >> >> >> >> >> >> >> >> IMPORTANT - This email and the information that it contains may be >> confidential, legally privileged and protected by law. Access by the >> intended recipient only is authorised. Any liability (in negligence or >> otherwise) arising from any third party acting, or refraining from >> acting, on any information contained in this email is hereby excluded. >> If you are not the intended recipient, please notify >> AmlinCommunications@amlin.co.uk immediately then delete it and do not >> disclose the contents to any other person, use it for any purpose or >> store or copy the information in any medium. >> >> Copyright in this email and attachments created by us belong to Amlin >> plc and/or one or more of its subsidiaries (Amlin Group). The author >> also asserts the right to be identified as such and object to any misuse. >> >> The Amlin Group prohibits and takes steps to prevent its email systems >> from being used to view, store or transmit offensive, obscene or >> discriminatory material. If this message contains inappropriate >> material please report it immediately to AmlinCommunications@amlin.co.uk. >> >> The Amlin Group records, monitors and may inspect messages that use >> its telecoms systems in order to protect its information, interests >> and reputation. Any message sent by you to or within the Amlin Group >> may therefore be viewed and may be acted upon. >> >> Of the companies within the Amlin Group, Amlin Underwriting Limited, >> Amlin Underwriting Services Limited, Amlin UK Limited and Amlin Plus >> Limited are authorised and regulated by the Financial Services Authority. >> >> This email has been sent by a member of staff of one or more of the >> following Amlin Group companies: >> >> Amlin plc. Registered in England and Wales no. 2854310 >> Amlin Underwriting Limited. Registered in England and Wales no. 2323018 >> Amlin Underwriting Services Limited. Registered in England and Wales >> no. 422615 >> Amlin UK Limited. Registered in England and Wales no. 2739220 >> Amlin Plus Limited. Registered in England and Wales no. 4729659 >> >> Registered Offices: St Helen's, 1 Undershaft, London EC3A 8ND, United >> Kingdom >> >> Amlin plc switchboard: 020 7746 1000 >> Web Site: http://www.amlin.com >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- Alexandre Dub? Mapgears www.mapgears.com From scott.lewis at nsidc.org Fri Nov 13 11:58:45 2009 From: scott.lewis at nsidc.org (Scott Lewis) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Trying to draw a box on a map, and get the coordinates back. In-Reply-To: <1258129691.25288.30.camel@aalcdl07> References: <1258129691.25288.30.camel@aalcdl07> Message-ID: <4AFD9045.2060001@nsidc.org> I did something like this using one of the examples on the OpenLayers site, modified slightly. Here's what I used: 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) { // whatever you want it to do after the box has been drawn } }); // then add the boxControl to the map This works pretty nicely. Note that "geom" will be in the same projection as the map, so if you want the output to be in another projection (like a latitude/longitude display) you will have to go through the geometry and transform the points. Also, you may have to go through the geometry to determine which point is which (it doesn't always start with the upper-left corner, and it's not always clockwise or counter-clockwise). If interested, I can post some of the functions I do for that. I hope this helps, Scott Lewis NSIDC J. Cliff Dyer wrote: > I'm trying to draw a box on a map, have it persist until another box > gets drawn, and submit the coordinates of the box to a form. I'm doing > this to allow the user to search for objects within a given area. > > I'm doing this by using an OpenLayers.Handler.Box tool in a custom > OpenLayers.Control, which then uses to the "done" callback of the draw > method to create (or recreate) an OpenLayers.Feature.Vector and populate > (or repopulate) a search form. > > My immediate problem is that the persistent box is not in quite the same > location as the box the user just drew. I suspect this has something to > do with projections, but since I never explicitly set projections, I'm > not sure where the error sneaked in. > > More generally, I'm not sure I'm taking the optimal route from the > bounds passed to the callback to the Vector feature. Currently, I do > the following: > > 1) Take the incoming OpenLayers.Bounds object, > 2) Get an OpenLayers.Pixel from the the corners > 3) Get the coordinates of each pixel using map.getLonLatFromPixel > 4) Create a new OpenLayers.Bounds > 5) Extend it to my new coordinates > 6) Convert it to a geometry > 7) Convert it to an OpenLayers.Feature.Vector > > Then I take the coordinates from step 3) and populate a form with them, > which I then submit to my application server side. > > The code for this is pasted here: http://pastebin.com/m300c24a5 > > Any pointers on how to do this more cleanly would be much appreciated. > > Cheers, > Cliff > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From jay.douillard at ubc.ca Fri Nov 13 13:04:43 2009 From: jay.douillard at ubc.ca (Jay Douillard) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Save jpg from actual Mapview In-Reply-To: <21637440.1452301258135444017.JavaMail.root@verrazzano> Message-ID: <27443170.1452331258135483146.JavaMail.root@verrazzano> Your best bet is to look at whatever you are using to render your tiles, and use the current bounding box information to send a request to your server to generate the map view as one image rather than a tile. --jay ----- Original Message ----- From: "Rahn Hanno (rahn)" To: users@openlayers.org Sent: Thursday, November 12, 2009 6:53:46 AM GMT -08:00 US/Canada Pacific Subject: [OpenLayers-Users] Save jpg from actual Mapview Hello list, I have another question to you. Perhaps you can help me. I will have a simple imgage (jpg, png, gif, ?) from my mapview. I will have a button on my side and if the user presses this button you can save the actual mapview with all shown layers in the shown scale and so on as an image. Like a screenshot from the map-div for example. The format is not so important. I don?t know if it is possible. Perhaps this is not the right forum, but perhaps somebody can help me. A lot of thanks to you for your help. Greetings Hanno ------------------------------------------ Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik ZHAW Z?rcher Hochschul e 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091113/4a6303ed/attachment.html From jcd at sdf.lonestar.org Fri Nov 13 13:17:19 2009 From: jcd at sdf.lonestar.org (J. Cliff Dyer) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Trying to draw a box on a map, and get the coordinates back. In-Reply-To: <4AFD9045.2060001@nsidc.org> References: <1258129691.25288.30.camel@aalcdl07> <4AFD9045.2060001@nsidc.org> Message-ID: <1258136239.27973.12.camel@aalcdl07> Thanks. That's definitely a cleaner setup, but it didn't really solve the problem I was having. Before the box would look like it was being drawn properly, but then the persistent copy would be vertically offset. Now it's offset from the time I start drawing. Which is an improvement, because at least it will be easier for users to draw the box they want. Here's a screenshot to show what I mean: http://imgur.com/5cJ4H The Box was drawn exactly from Cape Fear to Cape Hatteras, marked with little black dots on the screenshot. However, the box itself starts drawing a bit above the location of the cursor. It seems the further I get from the top of the display, the further displaced the box is. It is impossible to get closer than ~2cm from the bottom of the map. There also seems to be a very slight horizontal displacement. Any thoughts on what might cause this displacement? At this point, no transformation is being done--at least not in any of my code. Cheers, Cliff On Fri, 2009-11-13 at 09:58 -0700, Scott Lewis wrote: > I did something like this using one of the examples on the OpenLayers > site, modified slightly. Here's what I used: > > 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) { > // whatever you want it to do after the box has been drawn > } > }); > > // then add the boxControl to the map > > This works pretty nicely. Note that "geom" will be in the same > projection as the map, so if you want the output to be in another > projection (like a latitude/longitude display) you will have to go > through the geometry and transform the points. Also, you may have to go > through the geometry to determine which point is which (it doesn't > always start with the upper-left corner, and it's not always clockwise > or counter-clockwise). If interested, I can post some of the functions > I do for that. > > I hope this helps, > > Scott Lewis > NSIDC > > J. Cliff Dyer wrote: > > I'm trying to draw a box on a map, have it persist until another box > > gets drawn, and submit the coordinates of the box to a form. I'm doing > > this to allow the user to search for objects within a given area. > > > > I'm doing this by using an OpenLayers.Handler.Box tool in a custom > > OpenLayers.Control, which then uses to the "done" callback of the draw > > method to create (or recreate) an OpenLayers.Feature.Vector and populate > > (or repopulate) a search form. > > > > My immediate problem is that the persistent box is not in quite the same > > location as the box the user just drew. I suspect this has something to > > do with projections, but since I never explicitly set projections, I'm > > not sure where the error sneaked in. > > > > More generally, I'm not sure I'm taking the optimal route from the > > bounds passed to the callback to the Vector feature. Currently, I do > > the following: > > > > 1) Take the incoming OpenLayers.Bounds object, > > 2) Get an OpenLayers.Pixel from the the corners > > 3) Get the coordinates of each pixel using map.getLonLatFromPixel > > 4) Create a new OpenLayers.Bounds > > 5) Extend it to my new coordinates > > 6) Convert it to a geometry > > 7) Convert it to an OpenLayers.Feature.Vector > > > > Then I take the coordinates from step 3) and populate a form with them, > > which I then submit to my application server side. > > > > The code for this is pasted here: http://pastebin.com/m300c24a5 > > > > Any pointers on how to do this more cleanly would be much appreciated. > > > > Cheers, > > Cliff > > > > > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > From crschmidt at metacarta.com Fri Nov 13 13:47:48 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Trying to draw a box on a map, and get the coordinates back. In-Reply-To: <1258136239.27973.12.camel@aalcdl07> References: <1258129691.25288.30.camel@aalcdl07> <4AFD9045.2060001@nsidc.org> <1258136239.27973.12.camel@aalcdl07> Message-ID: <20091113184748.GG12307@metacarta.com> On Fri, Nov 13, 2009 at 01:17:19PM -0500, J. Cliff Dyer wrote: > Thanks. That's definitely a cleaner setup, but it didn't really solve > the problem I was having. Before the box would look like it was being > drawn properly, but then the persistent copy would be vertically offset. > Now it's offset from the time I start drawing. Which is an improvement, > because at least it will be easier for users to draw the box they want. > Here's a screenshot to show what I mean: > > http://imgur.com/5cJ4H http://faq.openlayers.org/vector-related-questions/why-dont-my-vector-features-work-over-google-yahoo-virtual-earth-etc/ "Use Spherical Mercator". -- Chris > The Box was drawn exactly from Cape Fear to Cape Hatteras, marked with > little black dots on the screenshot. However, the box itself starts > drawing a bit above the location of the cursor. It seems the further I > get from the top of the display, the further displaced the box is. It > is impossible to get closer than ~2cm from the bottom of the map. There > also seems to be a very slight horizontal displacement. > > Any thoughts on what might cause this displacement? At this point, no > transformation is being done--at least not in any of my code. > > Cheers, > Cliff > > > > On Fri, 2009-11-13 at 09:58 -0700, Scott Lewis wrote: > > I did something like this using one of the examples on the OpenLayers > > site, modified slightly. Here's what I used: > > > > 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) { > > // whatever you want it to do after the box has been drawn > > } > > }); > > > > // then add the boxControl to the map > > > > This works pretty nicely. Note that "geom" will be in the same > > projection as the map, so if you want the output to be in another > > projection (like a latitude/longitude display) you will have to go > > through the geometry and transform the points. Also, you may have to go > > through the geometry to determine which point is which (it doesn't > > always start with the upper-left corner, and it's not always clockwise > > or counter-clockwise). If interested, I can post some of the functions > > I do for that. > > > > I hope this helps, > > > > Scott Lewis > > NSIDC > > > > J. Cliff Dyer wrote: > > > I'm trying to draw a box on a map, have it persist until another box > > > gets drawn, and submit the coordinates of the box to a form. I'm doing > > > this to allow the user to search for objects within a given area. > > > > > > I'm doing this by using an OpenLayers.Handler.Box tool in a custom > > > OpenLayers.Control, which then uses to the "done" callback of the draw > > > method to create (or recreate) an OpenLayers.Feature.Vector and populate > > > (or repopulate) a search form. > > > > > > My immediate problem is that the persistent box is not in quite the same > > > location as the box the user just drew. I suspect this has something to > > > do with projections, but since I never explicitly set projections, I'm > > > not sure where the error sneaked in. > > > > > > More generally, I'm not sure I'm taking the optimal route from the > > > bounds passed to the callback to the Vector feature. Currently, I do > > > the following: > > > > > > 1) Take the incoming OpenLayers.Bounds object, > > > 2) Get an OpenLayers.Pixel from the the corners > > > 3) Get the coordinates of each pixel using map.getLonLatFromPixel > > > 4) Create a new OpenLayers.Bounds > > > 5) Extend it to my new coordinates > > > 6) Convert it to a geometry > > > 7) Convert it to an OpenLayers.Feature.Vector > > > > > > Then I take the coordinates from step 3) and populate a form with them, > > > which I then submit to my application server side. > > > > > > The code for this is pasted here: http://pastebin.com/m300c24a5 > > > > > > Any pointers on how to do this more cleanly would be much appreciated. > > > > > > Cheers, > > > Cliff > > > > > > > > > > > > _______________________________________________ > > > 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 scott.lewis at nsidc.org Fri Nov 13 13:56:10 2009 From: scott.lewis at nsidc.org (Scott Lewis) Date: Wed Sep 1 17:18:12 2010 Subject: [OpenLayers-Users] Trying to draw a box on a map, and get the coordinates back. In-Reply-To: <1258136239.27973.12.camel@aalcdl07> References: <1258129691.25288.30.camel@aalcdl07> <4AFD9045.2060001@nsidc.org> <1258136239.27973.12.camel@aalcdl07> Message-ID: <4AFDABCA.5010706@nsidc.org> Ah, sorry about that, I misunderstood the problem you were having! J. Cliff Dyer wrote: > Thanks. That's definitely a cleaner setup, but it didn't really solve > the problem I was having. Before the box would look like it was being > drawn properly, but then the persistent copy would be vertically offset. > Now it's offset from the time I start drawing. Which is an improvement, > because at least it will be easier for users to draw the box they want. > Here's a screenshot to show what I mean: > > http://imgur.com/5cJ4H > > The Box was drawn exactly from Cape Fear to Cape Hatteras, marked with > little black dots on the screenshot. However, the box itself starts > drawing a bit above the location of the cursor. It seems the further I > get from the top of the display, the further displaced the box is. It > is impossible to get closer than ~2cm from the bottom of the map. There > also seems to be a very slight horizontal displacement. > > Any thoughts on what might cause this displacement? At this point, no > transformation is being done--at least not in any of my code. > > Cheers, > Cliff > > > > On Fri, 2009-11-13 at 09:58 -0700, Scott Lewis wrote: >> I did something like this using one of the examples on the OpenLayers >> site, modified slightly. Here's what I used: >> >> 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) { >> // whatever you want it to do after the box has been drawn >> } >> }); >> >> // then add the boxControl to the map >> >> This works pretty nicely. Note that "geom" will be in the same >> projection as the map, so if you want the output to be in another >> projection (like a latitude/longitude display) you will have to go >> through the geometry and transform the points. Also, you may have to go >> through the geometry to determine which point is which (it doesn't >> always start with the upper-left corner, and it's not always clockwise >> or counter-clockwise). If interested, I can post some of the functions >> I do for that. >> >> I hope this helps, >> >> Scott Lewis >> NSIDC >> >> J. Cliff Dyer wrote: >>> I'm trying to draw a box on a map, have it persist until another box >>> gets drawn, and submit the coordinates of the box to a form. I'm doing >>> this to allow the user to search for objects within a given area. >>> >>> I'm doing this by using an OpenLayers.Handler.Box tool in a custom >>> OpenLayers.Control, which then uses to the "done" callback of the draw >>> method to create (or recreate) an OpenLayers.Feature.Vector and populate >>> (or repopulate) a search form. >>> >>> My immediate problem is that the persistent box is not in quite the same >>> location as the box the user just drew. I suspect this has something to >>> do with projections, but since I never explicitly set projections, I'm >>> not sure where the error sneaked in. >>> >>> More generally, I'm not sure I'm taking the optimal route from the >>> bounds passed to the callback to the Vector feature. Currently, I do >>> the following: >>> >>> 1) Take the incoming OpenLayers.Bounds object, >>> 2) Get an OpenLayers.Pixel from the the corners >>> 3) Get the coordinates of each pixel using map.getLonLatFromPixel >>> 4) Create a new OpenLayers.Bounds >>> 5) Extend it to my new coordinates >>> 6) Convert it to a geometry >>> 7) Convert it to an OpenLayers.Feature.Vector >>> >>> Then I take the coordinates from step 3) and populate a form with them, >>> which I then submit to my application server side. >>> >>> The code for this is pasted here: http://pastebin.com/m300c24a5 >>> >>> Any pointers on how to do this more cleanly would be much appreciated. >>> >>> Cheers, >>> Cliff >>> >>> >>> >>> _______________________________________________ >>> 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 dtoto at pdsg.com Fri Nov 13 14:00:41 2009 From: dtoto at pdsg.com (Drew Toto) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Add Point to Map References: <8A8A884BC27BED439849DAB50639D302A5AA87@gemini.amlin.com> Message-ID: <81E943E672D0C44EA9BFDCCC34B3B1C1D708DC@cfmail.corp.crossflo.com> A while back I did this for a prototype using something similar to this code, hope it helps. map.events.register("click", map, function(e) { var position = this.events.getMousePosition(e); var point = map.getLonLatFromPixel(position); //create point and add to layer }); Also, as somebody else pointed out, definitely read up on spherical-mercator on the OpenLayers site if you haven't already. http://docs.openlayers.org/library/spherical_mercator.html -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Jones, Christopher Sent: Friday, November 13, 2009 5:05 AM To: users@openlayers.org Subject: [OpenLayers-Users] Add Point to Map Hi all, Im fairly new to OpenLayers and javascript for that matter as well. Having looked extensively through all the various examples and forums and blogs, and one or 2 tutorials, I am still struggling to add a point to a map (or a vector layer)! All I want, is to click on a map and adda a point. Heres my code, please feel free to point all the errors you want! Thanks in advance! Chris (Sorry if this has been sent twice) var myStyles = new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ fillColor: "#ffcc66", strokeColor: "#ff9933", strokeWidth: 10 }) }); function initialiseMap(){ map = new OpenLayers.Map('map'); map.addControl(new OpenLayers.Control.LayerSwitcher()); var gphy = new OpenLayers.Layer.Google( "Google Physical", { type: G_PHYSICAL_MAP } ); var gmap = new OpenLayers.Layer.Google( "Google Streets", {numZoomLevels: 20 } ); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", { type: G_HYBRID_MAP, numZoomLevels: 20 } ); var gsat = new OpenLayers.Layer.Google( "Google Satellite", { type: G_SATELLITE_MAP, numZoomLevels: 20 } ); map.addLayers([gphy, gmap, ghyb, gsat]); map.setCenter(new OpenLayers.LonLat(-74.0094, 40.7048), 5); map.addControl(new OpenLayers.Control.PanZoomBar()); map.addControl(new OpenLayers.Control.MousePosition()); } function singleClickButton() { document.getElementById("map").childNodes[0].style.cursor = "crosshair"; map.events.register('click', '', singleClickEvent); } function singleClickEvent (e) { var lonlat = map.getLonLatFromViewPortPx(e.xy); var lon = lonlat.lon var lat = lonlat.lat var pointLayer = new OpenLayers.Layer.Vector('Points', { styleMap: myStyles }); map.addLayers([pointLayer]); var bPoint = new OpenLayers.Geometry.Point(lon , lat) newpoint = new OpenLayers.Feature.Vector(bPoint); pointLayer.addFeatures(newpoint); } IMPORTANT - This email and the information that it contains may be confidential, legally privileged and protected by law. Access by the intended recipient only is authorised. Any liability (in negligence or otherwise) arising from any third party acting, or refraining from acting, on any information contained in this email is hereby excluded. If you are not the intended recipient, please notify AmlinCommunications@amlin.co.uk immediately then delete it and do not disclose the contents to any other person, use it for any purpose or store or copy the information in any medium. Copyright in this email and attachments created by us belong to Amlin plc and/or one or more of its subsidiaries (Amlin Group). The author also asserts the right to be identified as such and object to any misuse. The Amlin Group prohibits and takes steps to prevent its email systems from being used to view, store or transmit offensive, obscene or discriminatory material. If this message contains inappropriate material please report it immediately to AmlinCommunications@amlin.co.uk. The Amlin Group records, monitors and may inspect messages that use its telecoms systems in order to protect its information, interests and reputation. Any message sent by you to or within the Amlin Group may therefore be viewed and may be acted upon. Of the companies within the Amlin Group, Amlin Underwriting Limited, Amlin Underwriting Services Limited, Amlin UK Limited and Amlin Plus Limited are authorised and regulated by the Financial Services Authority. This email has been sent by a member of staff of one or more of the following Amlin Group companies: Amlin plc. Registered in England and Wales no. 2854310 Amlin Underwriting Limited. Registered in England and Wales no. 2323018 Amlin Underwriting Services Limited. Registered in England and Wales no. 422615 Amlin UK Limited. Registered in England and Wales no. 2739220 Amlin Plus Limited. Registered in England and Wales no. 4729659 Registered Offices: St Helen's, 1 Undershaft, London EC3A 8ND, United Kingdom Amlin plc switchboard: 020 7746 1000 Web Site: http://www.amlin.com From roald.dewit at lisasoft.com Fri Nov 13 16:52:05 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <1258115932926-3998936.post@n2.nabble.com> References: <1258115932926-3998936.post@n2.nabble.com> Message-ID: <4AFDD505.3010205@lisasoft.com> Hi stash, I could be mistaken, but the GS ProxyExtension is not going to help you if you don't serve your OL web app from the same domain (localhost:8080 in your case, IIRC). Can you give a bit more information on what your setup looks like? Do you use Apache for example or another web server? Does GS run by itself or in Tomcat for example? Have you ever tried downloading an OL 2.8 zip file, extracting it somewhere in your document root in Apache (for example) and run the OL examples, WFS ones in particular? Because if those work, the proxy.cgi in the examples dir works. You can then add 'localhost:8080' to allowedHosts (in proxy.cgi) and try your app from that directory. Once that works, you can move your app somewhere else and put proxy.cgi in a better place and get it to work. Regards, Roald stash wrote: > Hello, > > I want to show some data with a wfs in openlayers. I already know, that i > have to configure a proxy that I can do this. With geoserver you have the > opportunity to install a plugin called ProxyExtension, to do exactly this. > > http://geoserver.org/display/GEOS/GeoServer+Proxy+Extension > > I installed the plugin and the example with the redirect to google works > (http://[your_geoserver_domain]/geoserver/rest/proxy?url=http://www.google.com) > --> the proxy is installed correctly. > > But now there are the next problems. > > 1. What for a hostname do i have to configure (Do i have to enter the ip of > my pc, or the ip of the geoserver pc, ...?) > > 2. Do I have to set up a Openlayers.proxyhost in my program. How would this > look like in my case? > > I hope someone can help me with this problem. I already tried so many > different things, but nothing worked. (Either I get no response text in > firebug or I get a bad request) > > Thanks for your answers. > > Regards > stash > From christoph at b3e.net Sat Nov 14 07:40:16 2009 From: christoph at b3e.net (Christoph =?UTF-8?B?QsO2aG1l?=) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Clicks on permalink control trigger clickout on vector layer Message-ID: <20091114124016.01b8b70c@esel> Hi all, in my application [1] a vector layer with an number of features is displayed on top of a base map. When users select one of the markers the permalink will be updated to include the id of the selected feature. This works all fine. The problem comes when users click on the permalink. This click will not only activate the permalink but also trigger a mouseout event on the vector layer which unselects the current feature and updates the permalink. This happens before the browser follows the link which makes it impossible to follow a permalink with a selected feature. I tried to add an event listener to the permalink control in the hope of catching and stopping the click event before it falls through to the map. However, for some reason the event handler is not called. This is the code I used for adding the event listener: this.permalink_control = new OpenLayers.Control.Permalink(null, null, { eventListeners: { "click": function(e) { alert("Test"); OpenLayers.Event.stop(e ? e: window.event); } }}); this.map.addControl(this.permalink_control); this.permalink_control.activate(); Is this the correct way to add an event listener? And would it solve the original problem? Please note that the application does not use the default SelectFeature control but a custom one which includes a Drag handler in addition to the Feature handler. I compared the handling of clickout events in the SelectFeature control and in my control and could not find any differences that might affect the permalink. Cheers, Christoph [1] http://mappa-mercia.org/novam/ From ag at ads.aero Sun Nov 15 09:46:47 2009 From: ag at ads.aero (adsaero) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Using MapCruncher-produced tiles with OpenLayers; We'll pay someone :) Message-ID: <1258296407303-4007748.post@n2.nabble.com> This is a re-post; I'm willing to pay someone who can help us out :) Hello; I've been digging around all day trying to come up with some decent pointers as to the correct way to do this, but in short - I've got two tile sets I've created with MapCruncher. I'm able to use them with Google Maps and Bing Maps, but now I'd like to use them with OpenLayers. I've created the layers and I'm "sort of" able to get them to display on the map, but they don't seem to match up with other map layers that I have in OL. I'm almost certain it has to do with my projection configurationbs, or "resolutions" settings, or something along those lines, but I don't have enough mapping experience/OpenLayers experience to understand exactly where I'm going wrong. Does anyone have any examples of using MapCruncher-created tiles in OpenLayers - without having a Bing Maps or Google Maps "base map" - and is it even possible, given the output of MapCruncher? Are there specific scales or zoom levels or other specific settings I need to have configured properly in order to display these tiles in OL? Any help would be greatly appreciated...! And again, we'd be willing to pay someone who could help :) -- View this message in context: http://n2.nabble.com/Using-MapCruncher-produced-tiles-with-OpenLayers-We-ll-pay-someone-tp4007748p4007748.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ag at ads.aero Sun Nov 15 09:55:40 2009 From: ag at ads.aero (ag@ads.aero) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Using tiles with OpenLayers Message-ID: <24795144.14411.1258296940484.JavaMail.root@tervel.nabble.com> Hey there! I read your post from a while back on using arbitrary projections with OpenLayers - I'm wondering if you've had any success? I'm trying to serve tiles created with MapCruncher and display them with OL, without having anything set as a "base map" - primarily for the reasons you mentioned - performance (we're hosting them on Amazon S3). The problem we're having is getting the tiles to display properly in the various coordinate systems - we have existing tiles that were created with GeoWeb Cache, and we're trying to figure out to make all of these layers "switchable" in OL, and to make the coordinate systems match up so that we can draw vector graphics using standard lat/lon notation instead of meters. Any pointers you could offer would be greatly appreciated - we'd be willing to pay for an answer :) From roald.dewit at lisasoft.com Sun Nov 15 15:43:20 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Using MapCruncher-produced tiles with OpenLayers; We'll pay someone :) In-Reply-To: <1258296407303-4007748.post@n2.nabble.com> References: <1258296407303-4007748.post@n2.nabble.com> Message-ID: <4B0067E8.7020804@lisasoft.com> Hi, Maybe you can show an example of what goes wrong. I've never used MapCruncher. From their site, it seems that it should output in spherical mercator projection [1]. That means that your base maps and any other raster layers must be in that projection too. Vector layers can be reprojected if need be. Regards, Roald [1] http://docs.openlayers.org/library/spherical_mercator.html adsaero wrote: > This is a re-post; I'm willing to pay someone who can help us out :) > > Hello; I've been digging around all day trying to come up with some decent > pointers as to the correct way to do this, but in short - I've got two tile > sets I've created with MapCruncher. I'm able to use them with Google Maps > and Bing Maps, but now I'd like to use them with OpenLayers. > > I've created the layers and I'm "sort of" able to get them to display on the > map, but they don't seem to match up with other map layers that I have in > OL. I'm almost certain it has to do with my projection configurationbs, or > "resolutions" settings, or something along those lines, but I don't have > enough mapping experience/OpenLayers experience to understand exactly where > I'm going wrong. > > Does anyone have any examples of using MapCruncher-created tiles in > OpenLayers - without having a Bing Maps or Google Maps "base map" - and is > it even possible, given the output of MapCruncher? Are there specific > scales or zoom levels or other specific settings I need to have configured > properly in order to display these tiles in OL? > > Any help would be greatly appreciated...! And again, we'd be willing to pay > someone who could help :) > From eric.lemoine at camptocamp.com Mon Nov 16 00:43:01 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Clicks on permalink control trigger clickout on vector layer In-Reply-To: <20091114124016.01b8b70c@esel> References: <20091114124016.01b8b70c@esel> Message-ID: On Saturday, November 14, 2009, Christoph B?hme wrote: > Hi all, > > in my application [1] a vector layer with an number of features is > displayed on top of a base map. When users select one of the markers > the permalink will be updated to include the id of the selected feature. > This works all fine. The problem comes when users click on the > permalink. This click will not only activate the permalink but also > trigger a mouseout event on the vector layer which unselects the > current feature and updates the permalink. This happens before the > browser follows the link which makes it impossible to follow a > permalink with a selected feature. > > I tried to add an event listener to the permalink control in the hope > of catching and stopping the click event before it falls through to > the map. However, for some reason the event handler is not called. > > This is the code I used for adding the event listener: > > this.permalink_control = new OpenLayers.Control.Permalink(null, null, > { eventListeners: { > ? ? ? ?"click": function(e) { > ? ? ? ? ? ? ? ?alert("Test"); > ? ? ? ? ? ? ? ?OpenLayers.Event.stop(e ? e: window.event); > ? ? ? ?} > }}); > this.map.addControl(this.permalink_control); > this.permalink_control.activate(); > > Is this the correct way to add an event listener? AFAIK you cannot register a browser event listener on a control's DOM element using eventListeners (or control.events.register). Have you tried OpenLayers.Event.observe(control.element, "click", function(e) { ... }); ? 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 Mon Nov 16 00:51:09 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser In-Reply-To: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> References: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> Message-ID: On Thursday, November 12, 2009, Pedro Baracho wrote: > Hello all, > > I have huge amount of data being retrieved on a Vector Layer and it is crashing the browser (lack of memory) when it tries rendering it. > > I am thinking of using MinResolution, MinExtent and doing some search on current strategies to crop the data, or show the layer only in a determinate level of zoom. > > Any suggestions? you may be interested to look at the BBOX and Cluster strategies. The former fetches only the data that is contained by the current map extent. The latter clusters together features that are close to each other. The two strategies can be used together. cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From adrian_gh.popa at romtelecom.ro Mon Nov 16 01:36:56 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Forcing FramedCloud autoResize when using stylesheets In-Reply-To: <4AFD0A9F.6070809@romtelecom.ro> References: <4AF96BF9.2020505@romtelecom.ro> <4AFABB0A.8060605@romtelecom.ro> <4AFAC2E1.7050809@romtelecom.ro> <4AFD0A9F.6070809@romtelecom.ro> Message-ID: <4B00F308.9050105@romtelecom.ro> No ideas about this one? Adrian Popa wrote: > I did some more digging and it seems the png image which has the > elements (borders) of the framed cloud has rather small dimensions: > # file > cloud-popup-relative.png > > cloud-popup-relative.png: PNG image data, 676 x 736, 8-bit colormap, > non-interlaced > > I edited the file and increased the width of the image to 1276. I > "streched" the popup window to use the whole width. I looked into > openlayers/lib/OpenLayers/Popup/FramedCloud.js and expanded the > default sizes for the image and the popup to fit the new image size. > If I test this setup, the popup extends ok around my content, but the > right-most side of the popup loses its rounded corners. Also the > "connector" (I guess it's called a stem) between the marker and the > popup is sometimes distorted or blank. > > This has to do with the definitions of offsets in the positionBlocks. Eg: > > positionBlocks: { > "tl": { > 'offset': new OpenLayers.Pixel(44, 0), > 'padding': new OpenLayers.Bounds(8, 40, 8, 9), > 'blocks': [ > { // top-left > size: new OpenLayers.Size('auto', 'auto'), > anchor: new OpenLayers.Bounds(0, 51, 22, 0), > position: new OpenLayers.Pixel(0, 0) > }, > { //top-right > size: new OpenLayers.Size(22, 'auto'), > anchor: new OpenLayers.Bounds(null, 50, 0, 0), > position: new OpenLayers.Pixel(-638, 0) > }, > { //bottom-left > size: new OpenLayers.Size('auto', 19), > anchor: new OpenLayers.Bounds(0, 32, 22, null), > position: new OpenLayers.Pixel(0, -631) > }, > { //bottom-right > size: new OpenLayers.Size(22, 18), > anchor: new OpenLayers.Bounds(null, 32, 0, null), > position: new OpenLayers.Pixel(-638, -632) > }, > { // stem > size: new OpenLayers.Size(81, 35), > anchor: new OpenLayers.Bounds(null, 0, 0, null), > position: new OpenLayers.Pixel(0, -688) > } > ] > }, > ... > > Can somebody explain the following: > 1. bottom-right, bottom-left, top-right, top-left are intended to > "carve-out" the rounded popup corners? > 2. what is "stem" supposed to be? > 3. How is the position coordinates measured from the file? What do > negative coordinates mean (are they measuring from right to left)? > 4. Is there a more automated way to update these offsets from a file - > or should they be imputed by hand - and trial and error? > 5. Is anyone else interested in wider popups? Usualy you shouldn't > need them on normal screens, but I need to display them on large > 4000x4000 screens... If there are people interested, I will submit a > patch... > 6. Oh - is there a way to get wider popups without editing the > image/offsets? I guess the background of the picture is not "streched" > to fit the popup (current behavior). > > Thanks, > Adrian > > Adrian Popa wrote: >> Update: >> - it seems I was partially wrong. The div settings for the decoration >> divs are correct - but it seems the popup background image doesn't get >> any larger... I will look into it. >> >> Adrian Popa wrote: >> >>> Hello everyone, >>> >>> I have done some more digging, and it seems the FramedCloud popup has >>> a default maximum width of 600px (or so it seems when I inspect items >>> with firebug). I tried to set max size to something larger >>> (popup.maxSize = new OpenLayers.Size(1300, 1000);) and it seems to >>> work (partially). >>> >>> The popup gets larger to accomodate content with width greater than >>> 600px, but not all the popup's decorations are streched. >>> >>> My popup's base id is "activeAlarm" - and from what I can tell the >>> following divs get resized: >>> * activeAlarm_contentDiv >>> * activeAlarm_GroupDiv >>> * activeAlarm >>> ... but the following divs don't get resized: >>> * activeAlarm_FrameDecorationDiv_1 >>> * activeAlarm_FrameDecorationDiv_2 >>> * activeAlarm_FrameDecorationDiv_3 >>> * activeAlarm_FrameDecorationDiv_4 >>> >>> I have attached an image that illustrates this. Note that also the >>> background of the popup isn't streched (remains transparent) (most >>> likely it's one of the decoration divs...). >>> >>> Is this a known bug, or am I doing something wrong? If it's a bug, is >>> there a quick workaround? I can think of setting the width parameter >>> for all the decoration divs, but I'm hoping it won't be necessary... >>> >>> Thanks, >>> Adrian >>> >>> Adrian Popa wrote: >>> >>>> Hello everyone, >>>> >>>> If this subject has been discussed before, please point me to the >>>> relevant thread. >>>> >>>> I have a FramedCloud popup which gets its content through an ajax >>>> call. Everything works ok (the popup is the same size as the >>>> content) if I don't change the size of the fonts in the popup. In >>>> some cases, I have to override the default font size and make it >>>> bigger. In these cases, the popup doesn't resize properly. For >>>> instance, if the content has 'font-size: 11px' it fits the popup, but >>>> if the content has 'font-size: 22px', the popup grows in height, but >>>> the width remains the same as the first case. >>>> >>>> By the way, my content is usually a table (which has applied the >>>> style='font-size: 22px;' attribute). >>>> >>>> My questions are: >>>> 1. Is this behavior a known problem or should autoResize work without >>>> problems? >>>> 2. I could call - as a workaround a function to autoRezise the popup >>>> after the ajax call completes. Question is - what is this function? >>>> (I haven't found anything in the api) >>>> 3. I could set maxSize/minSize - but I have no idea how to calculate >>>> the width/height of my content (in case there are no other >>>> workarounds I could *estimate* it based on number of characters per >>>> line + font size - but it's way too cumbersome to be a real solution) >>>> >>>> Thanks, >>>> Adrian. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>>> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > ------------------------------------------------------------------------ > > _______________________________________________ > 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/20091116/385c732c/attachment.html From steffen.schwarz85 at googlemail.com Mon Nov 16 04:49:24 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <4AFDD505.3010205@lisasoft.com> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> Message-ID: <1258364964815-4011086.post@n2.nabble.com> Roald de Wit-2 wrote: > > Hi stash, > > I could be mistaken, but the GS ProxyExtension is not going to help you > if you don't serve your OL web app from the same domain (localhost:8080 > in your case, IIRC). Can you give a bit more information on what your > setup looks like? Do you use Apache for example or another web server? > Does GS run by itself or in Tomcat for example? > > Have you ever tried downloading an OL 2.8 zip file, extracting it > somewhere in your document root in Apache (for example) and run the OL > examples, WFS ones in particular? Because if those work, the proxy.cgi > in the examples dir works. You can then add 'localhost:8080' to > allowedHosts (in proxy.cgi) and try your app from that directory. Once > that works, you can move your app somewhere else and put proxy.cgi in a > better place and get it to work. > > Regards, Roald > > > Hello, thanks for your answer. I have installed GS version 2.0 itself (without tomcat or something else). I copied the OpenLayers folder (with examples...) into my geoserver home_directory and started the examples. but the wfs didn't work. Because nothing worked, I installed geoserver on the same pc as my application is running (for testing). But the dissappointing fact is, that the wfs isn't running too, even when app and geoserver is on the same pc. Or does this matter, where geoserver is running, when the layer in geoserver gets his data from a database (oracle) which is on an other pc. (because that is the fact in my case). Regards stash -- View this message in context: http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4011086.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Mon Nov 16 06:21:12 2009 From: rifins at gmail.com (=?ISO-8859-1?Q?Quim_Rif=E0?=) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Load something like a "custom map"... Message-ID: Hi, I have about 2000 points in a map, distributed in 4 categories (about 500 points per category). If I try to add all the points at a time, it takes a lot of time to load all the points, and I would like to know if it is possible to create four "layers" (I don't know if the word layer fits to what I'm saying..) each one containing the points of a category, and then load the "layers". This would make the loading much faster. I need also that all the points can have their own events, like the click on a marker. Which is the best way to fit what I'm saying? I need a map server or there is any way to make this without creating a custom map with points? Thanks a lot! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/5584741c/attachment.html From pedropbaracho at gmail.com Mon Nov 16 07:10:56 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser In-Reply-To: References: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> Message-ID: <5e3c00490911160410x59b31961y9521fff722a21c88@mail.gmail.com> My data can be displayed via WMS. It represents the streets of my city and is composed by a huge number of center lines. I am currently using BBOX strategy and it is insufficient. I am going to check cluster strategy. Do you know how can I use it to display lines instead of points? On Mon, Nov 16, 2009 at 3:51 AM, Eric Lemoine wrote: > On Thursday, November 12, 2009, Pedro Baracho > wrote: > > Hello all, > > > > I have huge amount of data being retrieved on a Vector Layer and it is > crashing the browser (lack of memory) when it tries rendering it. > > > > I am thinking of using MinResolution, MinExtent and doing some search on > current strategies to crop the data, or show the layer only in a determinate > level of zoom. > > > > Any suggestions? > > you may be interested to look at the BBOX and Cluster strategies. The > former fetches only the data that is contained by the current map > extent. The latter clusters together features that are close to each > other. The two strategies can be used together. > > 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/20091116/c746c41b/attachment.html From pedropbaracho at gmail.com Mon Nov 16 07:15:38 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Zoom in zoom out --> Points of Layer are wrong --> Redraw Layer? In-Reply-To: <1258099914540-3997915.post@n2.nabble.com> References: <1258015312530-3991438.post@n2.nabble.com> <5e3c00490911121004u6f1496a0x73d5fe27efccd9ad@mail.gmail.com> <1258099914540-3997915.post@n2.nabble.com> Message-ID: <5e3c00490911160415x552f047fpa0be032c593a5e17@mail.gmail.com> double check = recheck carefully. As I stated on my first email, I am not sure if this is a problem related to your code. If it was, you wouldn't get the points displayed in the right position on the first load. I bet it has something to do with caching, but I am not sure about that either. That is why I suggest you recheck carefully your projections and if there are any events declared on your code for zooming. Cheers, Pedro. On Fri, Nov 13, 2009 at 6:11 AM, stash wrote: > > > > Pedro Baracho wrote: > > > > > > Maybe double check your projections coordinates and events on zooming. > > > > > > Hello, > > thanks for your answer. But what do you mean, by double check your > projections coordinates and events on zooming? > > I'm sorry but I haven't much experience with openlayers. > > regards > stash > > -- > View this message in context: > http://n2.nabble.com/Zoom-in-zoom-out-Points-of-Layer-are-wrong-Redraw-Layer-tp3991438p3997915.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/e46fe821/attachment.html From ahocevar at opengeo.org Mon Nov 16 07:29:17 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <1258364964815-4011086.post@n2.nabble.com> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> <1258364964815-4011086.post@n2.nabble.com> Message-ID: <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> On Mon, Nov 16, 2009 at 10:49 AM, stash wrote: > Hello, > thanks for your answer. I have installed GS version 2.0 itself (without > tomcat or something else). I copied the OpenLayers folder (with examples...) > into my geoserver home_directory and started the examples. but the wfs > didn't work. What do you mean by home_directory? $GEOSERVER_DATA_DIR/www/ would be the place to put your html stuff, and then you would access it from http://localhost:8080/geoserver/www/ Now if you use the GeoServer proxy extension in this context, you have to add localhost to the Permitted Hostnames. Hope this helps. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From pedropbaracho at gmail.com Mon Nov 16 07:34:31 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] OpenLayers.Control.SelectFeature and shift-click in Firefox In-Reply-To: <2505d0830911121710g75f05eeeq8aac65a697653a46@mail.gmail.com> References: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> <5e3c00490911121014j7188223fy4b5e175bd66904c7@mail.gmail.com> <2505d0830911121710g75f05eeeq8aac65a697653a46@mail.gmail.com> Message-ID: <5e3c00490911160434w21eace4fgbd07c0ff506c32fa@mail.gmail.com> I have seen two examples of handlers to Click event: http://openlayers.org/dev/examples/click.html http://openlayers.org/dev/examples/click-handler.html I think you will have to create a handler to Keyboard events also, so you can capture the Shift+Key. In fact, I think you will only need that. Try adding multipleKey: "shiftKey" to your SelectFeature control, so you override the shift+click behaviour of Firefox. Just a question: FF opens another window when you shift+click a link, i.e. tag. Why is the tag there on your externalGraphic in the first place?? On Thu, Nov 12, 2009 at 11:10 PM, Richard Eichhorn wrote: > Thanks for that. I did come across that, but I couldn't figure out how to > use it in the context of OpenLayers.Control.SelectFeature. > > There is a handlers property but I can't figure out how to use it. > > Has anyone got an example of creating an OpenLayers.Control.SelectFeature > with a handlers property defined? > > Cheers, > Richard. > > > > 2009/11/13 Pedro Baracho > > I am not sure if that helps, but there is a function stop on Event class >> for stopping event propagation. >> >> http://dev.openlayers.org/docs/files/OpenLayers/Events-js.html#OpenLayers.Event.stop >> >> On Thu, Nov 12, 2009 at 5:47 AM, Richard Eichhorn < >> r.eichhorn@netbi.com.au> wrote: >> >>> I am using OpenLayers.Control.SelectFeature with features which are >>> represented using an externalGraphic. When I use do a shift-click to >>> multi-select features in Firefox, it opens up a new window with the icon of >>> the feature I just clicked on. >>> >>> When writing non-openlayers javascript code I have just used >>> preventDefault in firefox to stop the events propagating. >>> >>> How can I do it in Openlayers? >>> >>> Cheers, >>> Richard >>> >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> > > > -- > (w) 07 3124 4034 > (m) 0414 583 411 > > (e) r.eichhorn@netbi.com.au > > (w) www.netbi.com.au > > (a) level 1, 50 park road milton brisbane queensland australia 4064 > > (p) po box 1003 new farm brisbane queensland australia 4005 > > _______________________________________________ > 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/20091116/384d2944/attachment.html From eric.lemoine at camptocamp.com Mon Nov 16 08:30:38 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser In-Reply-To: <5e3c00490911160410x59b31961y9521fff722a21c88@mail.gmail.com> References: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> <5e3c00490911160410x59b31961y9521fff722a21c88@mail.gmail.com> Message-ID: On Mon, Nov 16, 2009 at 1:10 PM, Pedro Baracho wrote: > My data can be displayed via WMS. It represents the streets of my city and > is composed by a huge number of center lines. > > I am currently using BBOX strategy and it is insufficient. > I am going to check cluster strategy. Do you know how can I use it to > display lines instead of points? >From the top of my head I remember that you can use the cluster strategy with other types of geometries than points. However clusters are always represented as points. 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 pedropbaracho at gmail.com Mon Nov 16 08:36:51 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Is it possible to change modifyFeature control ? In-Reply-To: <1258110019590-3998546.post@n2.nabble.com> References: <1258110019590-3998546.post@n2.nabble.com> Message-ID: <5e3c00490911160536t29c4cf94r35418173ae23cfb4@mail.gmail.com> IMHO, it is possible but not trivial. You could do some hacking using handlers property and beforefeaturemodified or featuremodified events. Although, I would suggest you to extend OpenLayers.Control.ModifyFeature and implement your own logic over the DragStart function. On Fri, Nov 13, 2009 at 9:00 AM, Altair wrote: > > Dear list! > Is it possible to change modifyFeature control ? > For example, I want to remove the point of the polygon do not click > Del-button, but mouse double-click on the point. Or add a new point of the > polygon by double clicking on the map. > Thanks for advice. > -- > View this message in context: > http://n2.nabble.com/Is-it-possible-to-change-modifyFeature-control-tp3998546p3998546.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/d4ad5de3/attachment.html From pedropbaracho at gmail.com Mon Nov 16 09:05:18 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Trying to draw a box on a map, and get the coordinates back. In-Reply-To: <4AFDABCA.5010706@nsidc.org> References: <1258129691.25288.30.camel@aalcdl07> <4AFD9045.2060001@nsidc.org> <1258136239.27973.12.camel@aalcdl07> <4AFDABCA.5010706@nsidc.org> Message-ID: <5e3c00490911160605v4bf355c4y87fee7ecf4768b2e@mail.gmail.com> I have done something like that but it didn't fill in any form component... Check it out: http://pastebin.com/m6336e5e6 If you want to use it, you will have to replace the alert with the code that fills in your form. Btw, all projections on this example are EPSG:4326. On Fri, Nov 13, 2009 at 4:56 PM, Scott Lewis wrote: > Ah, sorry about that, I misunderstood the problem you were having! > > J. Cliff Dyer wrote: > > Thanks. That's definitely a cleaner setup, but it didn't really solve > > the problem I was having. Before the box would look like it was being > > drawn properly, but then the persistent copy would be vertically offset. > > Now it's offset from the time I start drawing. Which is an improvement, > > because at least it will be easier for users to draw the box they want. > > Here's a screenshot to show what I mean: > > > > http://imgur.com/5cJ4H > > > > The Box was drawn exactly from Cape Fear to Cape Hatteras, marked with > > little black dots on the screenshot. However, the box itself starts > > drawing a bit above the location of the cursor. It seems the further I > > get from the top of the display, the further displaced the box is. It > > is impossible to get closer than ~2cm from the bottom of the map. There > > also seems to be a very slight horizontal displacement. > > > > Any thoughts on what might cause this displacement? At this point, no > > transformation is being done--at least not in any of my code. > > > > Cheers, > > Cliff > > > > > > > > On Fri, 2009-11-13 at 09:58 -0700, Scott Lewis wrote: > >> I did something like this using one of the examples on the OpenLayers > >> site, modified slightly. Here's what I used: > >> > >> 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) { > >> // whatever you want it to do after the box has been drawn > >> } > >> }); > >> > >> // then add the boxControl to the map > >> > >> This works pretty nicely. Note that "geom" will be in the same > >> projection as the map, so if you want the output to be in another > >> projection (like a latitude/longitude display) you will have to go > >> through the geometry and transform the points. Also, you may have to go > >> through the geometry to determine which point is which (it doesn't > >> always start with the upper-left corner, and it's not always clockwise > >> or counter-clockwise). If interested, I can post some of the functions > >> I do for that. > >> > >> I hope this helps, > >> > >> Scott Lewis > >> NSIDC > >> > >> J. Cliff Dyer wrote: > >>> I'm trying to draw a box on a map, have it persist until another box > >>> gets drawn, and submit the coordinates of the box to a form. I'm doing > >>> this to allow the user to search for objects within a given area. > >>> > >>> I'm doing this by using an OpenLayers.Handler.Box tool in a custom > >>> OpenLayers.Control, which then uses to the "done" callback of the draw > >>> method to create (or recreate) an OpenLayers.Feature.Vector and > populate > >>> (or repopulate) a search form. > >>> > >>> My immediate problem is that the persistent box is not in quite the > same > >>> location as the box the user just drew. I suspect this has something > to > >>> do with projections, but since I never explicitly set projections, I'm > >>> not sure where the error sneaked in. > >>> > >>> More generally, I'm not sure I'm taking the optimal route from the > >>> bounds passed to the callback to the Vector feature. Currently, I do > >>> the following: > >>> > >>> 1) Take the incoming OpenLayers.Bounds object, > >>> 2) Get an OpenLayers.Pixel from the the corners > >>> 3) Get the coordinates of each pixel using map.getLonLatFromPixel > >>> 4) Create a new OpenLayers.Bounds > >>> 5) Extend it to my new coordinates > >>> 6) Convert it to a geometry > >>> 7) Convert it to an OpenLayers.Feature.Vector > >>> > >>> Then I take the coordinates from step 3) and populate a form with them, > >>> which I then submit to my application server side. > >>> > >>> The code for this is pasted here: http://pastebin.com/m300c24a5 > >>> > >>> Any pointers on how to do this more cleanly would be much appreciated. > >>> > >>> Cheers, > >>> Cliff > >>> > >>> > >>> > >>> _______________________________________________ > >>> Users mailing list > >>> Users@openlayers.org > >>> http://openlayers.org/mailman/listinfo/users > > > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/9a979846/attachment.html From hekuran.doli at logisticsplus-ks.com Mon Nov 16 10:20:33 2009 From: hekuran.doli at logisticsplus-ks.com (hekuran S. Doli) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Help with OpenLayer + Google Maps In-Reply-To: <28229349.101258381026796.JavaMail.SYSTEM@heka> Message-ID: <27366160.121258381204078.JavaMail.SYSTEM@heka> I'm using google map as layer in openlayer. I'm trying to add an point in the map as in example http://www.logisticsplus-ks.com/testmap/. I'm successfully adding the point in the map but when I move the map the point changes the position. So it does not stay at the coordinates that I give it. By the way the functions works perfectly with openstreet map, but not with google maps. In the following is the code that I'm using: Any help would be appreciable. Thanks in advance, Hekuran -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/c735ebcb/attachment.html From pedropbaracho at gmail.com Mon Nov 16 09:20:03 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Load something like a "custom map"... In-Reply-To: References: Message-ID: <5e3c00490911160620ufb02e15r10807cee42861711@mail.gmail.com> Well you could use ogc filter to split them in 4 groups. You could split them manually and load 4 different layers from 4 different files for example. And there is also something called Strategy on OL's Vector Layers, that is an automatic way to crop/reduce the amount of data you are showing. I can't say what is the best way, because I don't know how your points are stored. You don't need a map server, if you are splitting them manually or using "Strategy" parameter. If you intend to use OGC Filter you will probably need a OGC-Compliant map server, like Geoserver, for example. Hope it helps, Pedro. 2009/11/16 Quim Rif? > Hi, > > I have about 2000 points in a map, distributed in 4 categories (about 500 > points per category). If I try to add all the points at a time, it takes a > lot of time to load all the points, and I would like to know if it is > possible to create four "layers" (I don't know if the word layer fits to > what I'm saying..) each one containing the points of a category, and then > load the "layers". This would make the loading much faster. > > I need also that all the points can have their own events, like the click > on a marker. > > Which is the best way to fit what I'm saying? I need a map server or there > is any way to make this without creating a custom map with points? > > Thanks a lot! > > _______________________________________________ > 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/20091116/54a6c3bf/attachment.html From pedropbaracho at gmail.com Mon Nov 16 09:28:12 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Help with OpenLayer + Google Maps In-Reply-To: <27366160.121258381204078.JavaMail.SYSTEM@heka> References: <28229349.101258381026796.JavaMail.SYSTEM@heka> <27366160.121258381204078.JavaMail.SYSTEM@heka> Message-ID: <5e3c00490911160628h43ea8eefn67bb9a5b5a1a4c52@mail.gmail.com> var gmap = new OpenLayers.Layer.Google( "Google Streets", // the default {"sphericalMercator": true ,numZoomLevels: 20} ); var vector_layer = new OpenLayers.Layer.Vector("title", {Projection: new OpenLayers.Projection("EPSG:4326")}); On Mon, Nov 16, 2009 at 1:20 PM, hekuran S. Doli < hekuran.doli@logisticsplus-ks.com> wrote: > I'm using google map as layer in openlayer. I'm trying to add an point in > the map as in example http://www.logisticsplus-ks.com/testmap/. I'm > successfully adding the point in the map but when I move the map the point > changes the position. So it does not stay at the coordinates that I give it. > > > By the way the functions works perfectly with openstreet map, but not with > google maps. > > In the following is the code that I'm using: > > > > Any help would be appreciable. > Thanks in advance, > Hekuran > > > > _______________________________________________ > 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/20091116/b5bad381/attachment.html From pedropbaracho at gmail.com Mon Nov 16 09:30:27 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Help with OpenLayer + Google Maps In-Reply-To: <5e3c00490911160628h43ea8eefn67bb9a5b5a1a4c52@mail.gmail.com> References: <28229349.101258381026796.JavaMail.SYSTEM@heka> <27366160.121258381204078.JavaMail.SYSTEM@heka> <5e3c00490911160628h43ea8eefn67bb9a5b5a1a4c52@mail.gmail.com> Message-ID: <5e3c00490911160630h443ed748h171fdaaa49b2db1c@mail.gmail.com> I mispelled projection parameter. it is lowerCase: {projection: new OpenLayers.Projection("EPSG:4326")} On Mon, Nov 16, 2009 at 12:28 PM, Pedro Baracho wrote: > var gmap = new OpenLayers.Layer.Google( > "Google Streets", // the default > {"sphericalMercator": true ,numZoomLevels: 20} > ); > > var vector_layer = new OpenLayers.Layer.Vector("title", {Projection: new > OpenLayers.Projection("EPSG:4326")}); > > On Mon, Nov 16, 2009 at 1:20 PM, hekuran S. Doli < > hekuran.doli@logisticsplus-ks.com> wrote: > >> I'm using google map as layer in openlayer. I'm trying to add an point in >> the map as in example http://www.logisticsplus-ks.com/testmap/. I'm >> successfully adding the point in the map but when I move the map the point >> changes the position. So it does not stay at the coordinates that I give it. >> >> >> By the way the functions works perfectly with openstreet map, but not with >> google maps. >> >> In the following is the code that I'm using: >> >> >> >> Any help would be appreciable. >> Thanks in advance, >> Hekuran >> >> >> >> _______________________________________________ >> 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/20091116/ff9bbcc7/attachment.html From hekuran.doli at logisticsplus-ks.com Mon Nov 16 10:45:17 2009 From: hekuran.doli at logisticsplus-ks.com (hekuran S. Doli) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Help with OpenLayer + Google Maps In-Reply-To: <6910243.71258386261035.JavaMail.root@logisticsplus-ks.com> Message-ID: <20820733.91258386317813.JavaMail.root@logisticsplus-ks.com> Dear Pedro, Thanks a lot for your prompt reply. I implemented your suggestion but now the map does not move and the same coordinates point elsewhere. I published the updated example at http://www.logisticsplus-ks.com/testmap/ Regards, Hekuran ----- Original Message ----- From: "Pedro Baracho" To: "hekuran S. Doli" Cc: users@openlayers.org Sent: Monday, November 16, 2009 3:30:27 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [OpenLayers-Users] Help with OpenLayer + Google Maps I mispelled projection parameter. it is lowerCase: {projection: new OpenLayers.Projection("EPSG:4326")} On Mon, Nov 16, 2009 at 12:28 PM, Pedro Baracho < pedropbaracho@gmail.com > wrote: var gmap = new OpenLayers.Layer.Google( "Google Streets", // the default {"sphericalMercator": true ,numZoomLevels: 20} ); var vector_layer = new OpenLayers.Layer.Vector("title", {Projection: new OpenLayers.Projection("EPSG:4326")}); On Mon, Nov 16, 2009 at 1:20 PM, hekuran S. Doli < hekuran.doli@logisticsplus-ks.com > wrote: I'm using google map as layer in openlayer. I'm trying to add an point in the map as in example http://www.logisticsplus-ks.com/testmap/ . I'm successfully adding the point in the map but when I move the map the point changes the position. So it does not stay at the coordinates that I give it. By the way the functions works perfectly with openstreet map, but not with google maps. In the following is the code that I'm using: Any help would be appreciable. Thanks in advance, Hekuran _______________________________________________ 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/20091116/7e0ab4f0/attachment.html From pedropbaracho at gmail.com Mon Nov 16 10:51:39 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Help with OpenLayer + Google Maps In-Reply-To: <20820733.91258386317813.JavaMail.root@logisticsplus-ks.com> References: <6910243.71258386261035.JavaMail.root@logisticsplus-ks.com> <20820733.91258386317813.JavaMail.root@logisticsplus-ks.com> Message-ID: <5e3c00490911160751j72f4f8c6oe7a5b7d3c0c9a7a8@mail.gmail.com> var center = new OpenLayers.LonLat(21.159739, 42.656138); map.setCenter(center.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")), 10) On Mon, Nov 16, 2009 at 1:45 PM, hekuran S. Doli < hekuran.doli@logisticsplus-ks.com> wrote: > Dear Pedro, > > Thanks a lot for your prompt reply. > > I implemented your suggestion but now the map does not move and the same > coordinates point elsewhere. I published the updated example at > http://www.logisticsplus-ks.com/testmap/ > > Regards, > Hekuran > > > > ----- Original Message ----- > From: "Pedro Baracho" > To: "hekuran S. Doli" > Cc: users@openlayers.org > Sent: Monday, November 16, 2009 3:30:27 PM GMT +01:00 Amsterdam / Berlin / > Bern / Rome / Stockholm / Vienna > Subject: Re: [OpenLayers-Users] Help with OpenLayer + Google Maps > > I mispelled projection parameter. > > it is lowerCase: > > {projection: new OpenLayers.Projection("EPSG:4326")} > > On Mon, Nov 16, 2009 at 12:28 PM, Pedro Baracho wrote: > >> var gmap = new OpenLayers.Layer.Google( >> "Google Streets", // the default >> {"sphericalMercator": true ,numZoomLevels: 20} >> ); >> >> var vector_layer = new OpenLayers.Layer.Vector("title", {Projection: new >> OpenLayers.Projection("EPSG:4326")}); >> >> On Mon, Nov 16, 2009 at 1:20 PM, hekuran S. Doli < >> hekuran.doli@logisticsplus-ks.com> wrote: >> >>> I'm using google map as layer in openlayer. I'm trying to add an point in >>> the map as in example http://www.logisticsplus-ks.com/testmap/. I'm >>> successfully adding the point in the map but when I move the map the point >>> changes the position. So it does not stay at the coordinates that I give it. >>> >>> >>> By the way the functions works perfectly with openstreet map, but not >>> with google maps. >>> >>> In the following is the code that I'm using: >>> >>> >>> >>> Any help would be appreciable. >>> Thanks in advance, >>> Hekuran >>> >>> >>> >>> _______________________________________________ >>> 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/20091116/cf0d6ed4/attachment.html From pedropbaracho at gmail.com Mon Nov 16 11:14:12 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Help with OpenLayer + Google Maps In-Reply-To: <5e3c00490911160751j72f4f8c6oe7a5b7d3c0c9a7a8@mail.gmail.com> References: <6910243.71258386261035.JavaMail.root@logisticsplus-ks.com> <20820733.91258386317813.JavaMail.root@logisticsplus-ks.com> <5e3c00490911160751j72f4f8c6oe7a5b7d3c0c9a7a8@mail.gmail.com> Message-ID: <5e3c00490911160814p6b1623b3ja804ba72d08e0900@mail.gmail.com> I would also add these options to the map if I were you. var options = { maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), numZoomLevels:18, maxResolution:156543.0339, units:'m', projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326") }; var map = new OpenLayers.Map("map", options); On Mon, Nov 16, 2009 at 1:51 PM, Pedro Baracho wrote: > var center = new OpenLayers.LonLat(21.159739, 42.656138); > map.setCenter(center.transform(new OpenLayers.Projection("EPSG:4326"), new > OpenLayers.Projection("EPSG:900913")), 10) > > > On Mon, Nov 16, 2009 at 1:45 PM, hekuran S. Doli < > hekuran.doli@logisticsplus-ks.com> wrote: > >> Dear Pedro, >> >> Thanks a lot for your prompt reply. >> >> I implemented your suggestion but now the map does not move and the same >> coordinates point elsewhere. I published the updated example at >> http://www.logisticsplus-ks.com/testmap/ >> >> Regards, >> Hekuran >> >> >> >> ----- Original Message ----- >> From: "Pedro Baracho" >> To: "hekuran S. Doli" >> Cc: users@openlayers.org >> Sent: Monday, November 16, 2009 3:30:27 PM GMT +01:00 Amsterdam / Berlin / >> Bern / Rome / Stockholm / Vienna >> Subject: Re: [OpenLayers-Users] Help with OpenLayer + Google Maps >> >> I mispelled projection parameter. >> >> it is lowerCase: >> >> {projection: new OpenLayers.Projection("EPSG:4326")} >> >> On Mon, Nov 16, 2009 at 12:28 PM, Pedro Baracho wrote: >> >>> var gmap = new OpenLayers.Layer.Google( >>> "Google Streets", // the default >>> {"sphericalMercator": true ,numZoomLevels: 20} >>> ); >>> >>> var vector_layer = new OpenLayers.Layer.Vector("title", {Projection: new >>> OpenLayers.Projection("EPSG:4326")}); >>> >>> On Mon, Nov 16, 2009 at 1:20 PM, hekuran S. Doli < >>> hekuran.doli@logisticsplus-ks.com> wrote: >>> >>>> I'm using google map as layer in openlayer. I'm trying to add an point >>>> in the map as in example http://www.logisticsplus-ks.com/testmap/. I'm >>>> successfully adding the point in the map but when I move the map the point >>>> changes the position. So it does not stay at the coordinates that I give it. >>>> >>>> >>>> By the way the functions works perfectly with openstreet map, but not >>>> with google maps. >>>> >>>> In the following is the code that I'm using: >>>> >>>> >>>> >>>> Any help would be appreciable. >>>> Thanks in advance, >>>> Hekuran >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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/20091116/30c51bc8/attachment.html From steffen.schwarz85 at googlemail.com Mon Nov 16 11:28:12 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> Message-ID: <1258388892064-4012973.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > > What do you mean by home_directory? $GEOSERVER_DATA_DIR/www/ would be > the place to put your html stuff, and then you would access it from > http://localhost:8080/geoserver/www/ > > Now if you use the GeoServer proxy extension in this context, you have > to add localhost to the Permitted Hostnames. > > Hope this helps. > > Regards, > Andreas. > > Hello, thanks for your answer. I copied it in the right directory now and i added localhost to my hostnames. But when I launch one of the examples the wfs is not shown. I always get the following error. XMLhttpRequest Access denied I think thats because of the proxy but I don't know how to solve it. thanks for your effort. regards stash -- View this message in context: http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4012973.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Mon Nov 16 11:35:19 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <1258388892064-4012973.post@n2.nabble.com> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> Message-ID: <4B017F47.8030503@opengeo.org> stash wrote: > > thanks for your answer. I copied it in the right directory now and i added > localhost to my hostnames. But when I launch one of the examples the wfs is > not shown. > > I always get the following error. > XMLhttpRequest > Access denied > > I think thats because of the proxy but I don't know how to solve it. > No, this is because you have a missing (or incorrect) OpenLayers.ProxyHost setting in your example. In a script tag after you include OpenLayers.js in your example html page, add: OpenLayers.ProxyHost="/geoserver/rest/proxy"; Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Mon Nov 16 11:39:48 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <4B017F47.8030503@opengeo.org> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> Message-ID: <4B018054.7040904@opengeo.org> Andreas Hocevar wrote: > stash wrote: > >> thanks for your answer. I copied it in the right directory now and i added >> localhost to my hostnames. But when I launch one of the examples the wfs is >> not shown. >> >> I always get the following error. >> XMLhttpRequest >> Access denied >> >> I think thats because of the proxy but I don't know how to solve it. >> >> > > No, this is because you have a missing (or incorrect) > OpenLayers.ProxyHost setting in your example. > > In a script tag after you include OpenLayers.js in your example html > page, add: > > OpenLayers.ProxyHost="/geoserver/rest/proxy"; > The above should read OpenLayers.ProxyHost="/geoserver/rest/proxy?url="; Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From steffen.schwarz85 at googlemail.com Mon Nov 16 11:58:38 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <4B018054.7040904@opengeo.org> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> Message-ID: <1258390718086-4013123.post@n2.nabble.com> Andreas Hocevar-2 wrote: > >> >> No, this is because you have a missing (or incorrect) >> OpenLayers.ProxyHost setting in your example. >> >> In a script tag after you include OpenLayers.js in your example html >> page, add: >> >> OpenLayers.ProxyHost="/geoserver/rest/proxy"; >> > > The above should read > > OpenLayers.ProxyHost="/geoserver/rest/proxy?url="; > > > Regards, > Andreas. > > Hello, thanks for your very fast answer. I replaced the line for the proxyhost with 'OpenLayers.ProxyHost="/geoserver/rest/proxy?url=";' --> Unfortunately I get the same error. It's really frustrating. Do you have any other idea. Regards stash -- View this message in context: http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4013123.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Mon Nov 16 12:02:11 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <1258390718086-4013123.post@n2.nabble.com> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> <1258390718086-4013123.post@n2.nabble.com> Message-ID: <4B018593.5010806@opengeo.org> stash wrote: > > Andreas Hocevar-2 wrote: > >>> No, this is because you have a missing (or incorrect) >>> OpenLayers.ProxyHost setting in your example. >>> >>> In a script tag after you include OpenLayers.js in your example html >>> page, add: >>> >>> OpenLayers.ProxyHost="/geoserver/rest/proxy"; >>> >>> >> The above should read >> >> OpenLayers.ProxyHost="/geoserver/rest/proxy?url="; >> >> >> Regards, >> Andreas. >> >> >> > > Hello, > thanks for your very fast answer. I replaced the line for the proxyhost with > 'OpenLayers.ProxyHost="/geoserver/rest/proxy?url=";' > --> Unfortunately I get the same error. > > It's really frustrating. > > Do you have any other idea. > Only if you provide more context: * the code of the example you are trying to run * the url you are accessing it through Regards, Andreas. > Regards > stash > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From hekuran.doli at logisticsplus-ks.com Mon Nov 16 13:19:12 2009 From: hekuran.doli at logisticsplus-ks.com (hekuran S. Doli) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Help with OpenLayer + Google Maps In-Reply-To: <5e3c00490911160858n3c0c0a71m22e5110a8fc5018a@mail.gmail.com> Message-ID: <2469787.161258391920796.JavaMail.SYSTEM@heka> Thank you very much Pedro, I had to set the internal and external projection for the vector and its working perfect now. ----- Original Message ----- From: "Pedro Baracho" To: "hekuran S. Doli" Sent: Monday, November 16, 2009 5:58:12 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [OpenLayers-Users] Help with OpenLayer + Google Maps what are the projections of your point? I don't think they are on EPSG:900913 as your code states. They are most likely on EPSG:4326 (longitude and latitudes). So you should change your vector_layer projection to EPSG:4326. I also suggest you to do this: 1- Add a displayProjection option to your map variable. map = new OpenLayers.Map('map', {displayProjection: new OpenLayers.Projection("EPSG:4326")}); 2- Add a div for OpenLayers.Control.MousePosition at the bottom of your map:
3- Add OpenLayers.Control.MousePosition map.addControl(new OpenLayers.Control.MousePosition({element: $('location')})); This way you will actually see the coordinates where your mouse is pointing on the projection you want. Another thing. OpenLayers only have built-in support to EPSG:4326 and 900913. So any other projections besides those, you will have to add Proj4JS too. Cheers On Mon, Nov 16, 2009 at 3:42 PM, hekuran S. Doli < hekuran.doli@logisticsplus-ks.com > wrote: Dear Pedro, Thank you very very much. Now everything works fine but one the only thing is that the coordinates of the point are pointing elsewhere. Could this be because of projection type? Because the given coordinates should put the point somewhare in Ballkans (Kosovo more exact). This is what we have so far: var featurecollection = { "type":"Feature", "id":"OpenLayers.Feature.Vector_173", "properties":{}, "geometry":{"type":"Point", "coordinates":[21.159739, 42.656138]} }; var geojson_format = new OpenLayers.Format.GeoJSON(); var vector_layer = new OpenLayers.Layer.Vector("title", {projection: new OpenLayers.Projection("EPSG:900913")}); map.addLayer(vector_layer); vector_layer.addFeatures(geojson_format.read(featurecollection)); ----- Original Message ----- From: "Pedro Baracho" < pedropbaracho@gmail.com > To: "hekuran S. Doli" < hekuran.doli@logisticsplus-ks.com > Cc: users@openlayers.org Sent: Monday, November 16, 2009 5:14:12 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [OpenLayers-Users] Help with OpenLayer + Google Maps I would also add these options to the map if I were you. var options = { maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), numZoomLevels:18, maxResolution:156543.0339, units:'m', projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326") }; var map = new OpenLayers.Map("map", options); On Mon, Nov 16, 2009 at 1:51 PM, Pedro Baracho < pedropbaracho@gmail.com > wrote: var center = new OpenLayers.LonLat(21.159739, 42.656138); map.setCenter(center.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")), 10) On Mon, Nov 16, 2009 at 1:45 PM, hekuran S. Doli < hekuran.doli@logisticsplus-ks.com > wrote: Dear Pedro, Thanks a lot for your prompt reply. I implemented your suggestion but now the map does not move and the same coordinates point elsewhere. I published the updated example at http://www.logisticsplus-ks.com/testmap/ Regards, Hekuran ----- Original Message ----- From: "Pedro Baracho" < pedropbaracho@gmail.com > To: "hekuran S. Doli" < hekuran.doli@logisticsplus-ks.com > Cc: users@openlayers.org Sent: Monday, November 16, 2009 3:30:27 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [OpenLayers-Users] Help with OpenLayer + Google Maps I mispelled projection parameter. it is lowerCase: {projection: new OpenLayers.Projection("EPSG:4326")} On Mon, Nov 16, 2009 at 12:28 PM, Pedro Baracho < pedropbaracho@gmail.com > wrote: var gmap = new OpenLayers.Layer.Google( "Google Streets", // the default {"sphericalMercator": true ,numZoomLevels: 20} ); var vector_layer = new OpenLayers.Layer.Vector("title", {Projection: new OpenLayers.Projection("EPSG:4326")}); On Mon, Nov 16, 2009 at 1:20 PM, hekuran S. Doli < hekuran.doli@logisticsplus-ks.com > wrote: I'm using google map as layer in openlayer. I'm trying to add an point in the map as in example http://www.logisticsplus-ks.com/testmap/ . I'm successfully adding the point in the map but when I move the map the point changes the position. So it does not stay at the coordinates that I give it. By the way the functions works perfectly with openstreet map, but not with google maps. In the following is the code that I'm using: Any help would be appreciable. Thanks in advance, Hekuran _______________________________________________ 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/20091116/61b4afba/attachment.html From m.sirin07 at googlemail.com Mon Nov 16 13:26:24 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Change position of vector marker Message-ID: <55744b1c0911161026j3c80c34dm2e65c4b839c942f4@mail.gmail.com> Hi, anybody knows how to change the position of a vector marker? lemme give you some pieces of the code ( got it from http://pgrouting.postlbs.org/wiki/WorkshopOL2.7andOSM "Getting the OpenLayers-Code for the Routing-application ") 1.) 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); } }); var start_style = OpenLayers.Util.applyDefaults({ externalGraphic: "start.png", graphicWidth: 18, graphicHeight: 26, graphicYOffset: -26, graphicOpacity: 1 }, OpenLayers.Feature.Vector.style['default']); var stop_style = OpenLayers.Util.applyDefaults({ externalGraphic: "stop.png", graphicWidth: 18, graphicHeight: 26, graphicYOffset: -26, graphicOpacity: 1 }, OpenLayers.Feature.Vector.style['default']); 2.) init (){ ... start = new OpenLayers.Layer.Vector("Start point", {style: start_style}); stop = new OpenLayers.Layer.Vector("End point", {style: stop_style}); result = new OpenLayers.Layer.Vector("Routing results", {style: result_style}); map.addLayers([mapnik, start, stop,result]); // 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(); } } ... } 3.) function compute() { ... startPoint = start.features[0]; stopPoint = stop.features[0]; Now I want to change the coordinates of the marker: startPoint.geometry.x=x_pos; //x_pos and y_pos are dynamically taken values out of the database. startPoint.geometry.y=y_pos; but it only works for some few zoom levels. When zooming in suddenly the marker disappears ! Why is that happening? thank you leaves you kind regards: mehmet sirin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/ca31ac08/attachment.html From pedropbaracho at gmail.com Mon Nov 16 14:05:42 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser In-Reply-To: References: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> <5e3c00490911160410x59b31961y9521fff722a21c88@mail.gmail.com> Message-ID: <5e3c00490911161105v22e77a64i89d1d1e1ccc954dc@mail.gmail.com> Cluster strategy didn't help me, because I need the lines to be rendered. Right now I am using MaxResolution to crop the whole Layer if the level of detail is small (i.e. low zoom level). The weird thing is that GeoServer can serve me the image in real time of the same layer and OL crashes the browser for lack of memory, and both (the browser and the GeoServer) are hosted and running on my development machine. I know OL is javascript, but even though, there shouldn't be such a huge impact on memory. Have you guys seen this before? And thanks a lot for the help! On Mon, Nov 16, 2009 at 11:30 AM, Eric Lemoine wrote: > On Mon, Nov 16, 2009 at 1:10 PM, Pedro Baracho > wrote: > > My data can be displayed via WMS. It represents the streets of my city > and > > is composed by a huge number of center lines. > > > > I am currently using BBOX strategy and it is insufficient. > > I am going to check cluster strategy. Do you know how can I use it to > > display lines instead of points? > > From the top of my head I remember that you can use the cluster > strategy with other types of geometries than points. However clusters > are always represented as points. > > 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/20091116/988ab56a/attachment.html From steffen.schwarz85 at googlemail.com Mon Nov 16 14:20:02 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <4B018593.5010806@opengeo.org> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> <1258390718086-4013123.post@n2.nabble.com> <4B018593.5010806@opengeo.org> Message-ID: <1258399202179-4014088.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > > Only if you provide more context: > > * the code of the example you are trying to run > * the url you are accessing it through > > Hello, yes I think this is the best idea to solve my problem. I use the following code. It's a wms (my base layer) with a background card and a wfs with some points located somewhere in denmark.

WFS Points

Using a Layer.WFS with a featureClass, one can take in XML data from a WFS class and display it any way you like.

The wms is working, the wfs not. My browser (Internet explorer) tells me an error at the xmlhttprequest (Access denied). Thanks for your help. Best regards stash -- View this message in context: http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4014088.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pedropbaracho at gmail.com Mon Nov 16 14:29:17 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] SLD on the fly Message-ID: <5e3c00490911161129s2cd33feew7fcbb91d00509ec9@mail.gmail.com> I need to change SLD on the fly to create some thematic maps. I would also appreciate if compatibility with OGC's WFS was mantained. Have you guys done this before? I could use some suggestions... :P I have done some searching and came up with a couple of solutions. 1- GeoServer GeoExt Styler Plugin. I don't know if it is a good solution, because as far as I know, it changes the style of the layer for all the users. I would need to replicate styles on the server for each user and each layer. And also this requires the server to be Geoserver, and breaks OGC compatibility. 2- WMS 1.3 and SLD MapServer implements WMS 1.3 and accepts a SLD description in the request. GeoServer doesn't. Nothing against MapServer, but my current development environment is set with GeoServer.. 3- WFS and treat SLD exhibition on the client This is a double edged solution. The good thing about WFS is that I have many more possibilities of control over the map. I can use SelectFeature control, instead of hacking some code to implement it over WMS. But it also gives me many other options I don't need such as the vector data. I only need the images. So right now I am between solutions 2 and 3. I don't want to give up on GeoServer, but I am also having problems dealing with the huge amount of vector data that WFS is retrieving. Any suggestion will be greatly appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/8ed7ab0d/attachment.html From pedropbaracho at gmail.com Mon Nov 16 14:39:23 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <1258399202179-4014088.post@n2.nabble.com> References: <1258115932926-3998936.post@n2.nabble.com> <4AFDD505.3010205@lisasoft.com> <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> <1258390718086-4013123.post@n2.nabble.com> <4B018593.5010806@opengeo.org> <1258399202179-4014088.post@n2.nabble.com> Message-ID: <5e3c00490911161139q684830f3m33ae290df8bb266e@mail.gmail.com> What is the link on your browser when you open the example? is it http:// ... or file:// ? That message from IE is exactly the Cross Domain AJAX Request thing. You can set the Security config of IE to None also. I think that will solve the problem for IE. Cheers On Mon, Nov 16, 2009 at 5:20 PM, stash wrote: > > > > Andreas Hocevar-2 wrote: > > > > > > Only if you provide more context: > > > > * the code of the example you are trying to run > > * the url you are accessing it through > > > > > > Hello, > yes I think this is the best idea to solve my problem. I use the following > code. It's a wms (my base layer) with a background card and a wfs with some > points located somewhere in denmark. > > > > type="text/css" /> > > > > > >

WFS Points

>

> Using a Layer.WFS with a featureClass, one can take in XML data > from a WFS class and display it any way you like. >

>
> > > > The wms is working, the wfs not. My browser (Internet explorer) tells me an > error at the xmlhttprequest (Access denied). > > Thanks for your help. > > Best regards > stash > > -- > View this message in context: > http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4014088.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/7213dd4e/attachment.html From pedropbaracho at gmail.com Mon Nov 16 14:48:19 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <5e3c00490911161139q684830f3m33ae290df8bb266e@mail.gmail.com> References: <1258115932926-3998936.post@n2.nabble.com> <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> <1258390718086-4013123.post@n2.nabble.com> <4B018593.5010806@opengeo.org> <1258399202179-4014088.post@n2.nabble.com> <5e3c00490911161139q684830f3m33ae290df8bb266e@mail.gmail.com> Message-ID: <5e3c00490911161148m5a6ad5eeh68cf61a1c4a53286@mail.gmail.com> In fact, changing the security settings won't solve the problem if you are accessing it via file:// On Mon, Nov 16, 2009 at 5:39 PM, Pedro Baracho wrote: > What is the link on your browser when you open the example? > > is it http:// ... or file:// ? > > That message from IE is exactly the Cross Domain AJAX Request thing. You > can set the Security config of IE to None also. I think that will solve the > problem for IE. > > Cheers > > > On Mon, Nov 16, 2009 at 5:20 PM, stash wrote: > >> >> >> >> Andreas Hocevar-2 wrote: >> > >> > >> > Only if you provide more context: >> > >> > * the code of the example you are trying to run >> > * the url you are accessing it through >> > >> > >> >> Hello, >> yes I think this is the best idea to solve my problem. I use the following >> code. It's a wms (my base layer) with a background card and a wfs with >> some >> points located somewhere in denmark. >> >> >> >> > type="text/css" /> >> >> >> >> >> >>

WFS Points

>>

>> Using a Layer.WFS with a featureClass, one can take in XML data >> from a WFS class and display it any way you like. >>

>>
>> >> >> >> The wms is working, the wfs not. My browser (Internet explorer) tells me >> an >> error at the xmlhttprequest (Access denied). >> >> Thanks for your help. >> >> Best regards >> stash >> >> -- >> View this message in context: >> http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4014088.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/9021e317/attachment.html From ijturton at gmail.com Mon Nov 16 14:54:52 2009 From: ijturton at gmail.com (Ian Turton) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] SLD on the fly In-Reply-To: <5e3c00490911161129s2cd33feew7fcbb91d00509ec9@mail.gmail.com> References: <5e3c00490911161129s2cd33feew7fcbb91d00509ec9@mail.gmail.com> Message-ID: On Mon, Nov 16, 2009 at 2:29 PM, Pedro Baracho wrote: > I need to change SLD on the fly to create some thematic maps. I would also > appreciate if compatibility with OGC's WFS was mantained. Have you guys done > this before? I could use some suggestions... :P > > I have done some searching and came up with a couple of solutions. > > 1- GeoServer GeoExt Styler Plugin. > I don't know if it is a good solution, because as far as I know, it changes > the style of the layer for all the users. I would need to replicate styles > on the server for each user and each layer. And also this requires the > server to be Geoserver, and breaks OGC compatibility. > You are right that will change it for everyone > 2- WMS 1.3 and SLD > MapServer implements WMS 1.3 and accepts a SLD description in the request. > GeoServer doesn't. > Nothing against MapServer, but my current development environment is set > with GeoServer.. Try http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&Format=image/png&request=GetMap&width=550&height=250&srs=EPSG:4326&SLD_BODY=%3CStyledLayerDescriptor%20version%3D%221.0.0%22%3E%3CUserLayer%3E%3CName%3Etopp:states%3C/Name%3E%3CUserStyle%3E%3CName%3EUserSelection%3C/Name%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CFilter%20xmlns:gml%3D%22http://www.opengis.net/gml%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3ESTATE_NAME%3C/PropertyName%3E%3CLiteral%3EIllinois%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E%3CPolygonSymbolizer%3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%3E%23FF0000%3C/CssParameter%3E%3C/Fill%3E%3C/PolygonSymbolizer%3E%3C/Rule%3E%3CRule%3E%3CLineSymbolizer%3E%3CStroke/%3E%3C/LineSymbolizer%3E%3C/Rule%3E%3C/FeatureTypeStyle%3E%3C/UserStyle%3E%3C/UserLayer%3E%3C/StyledLayerDescriptor%3E (from the demo requests page in geoserver 1.7.5) - works for all WMS versions. > > 3- WFS and treat SLD exhibition on the client > This is a double edged solution. The good thing about WFS is that I have > many more possibilities of control over the map. I can use SelectFeature > control, instead of hacking some code to implement it over WMS. But it also > gives me many other options I don't need such as the vector data. I only > need the images. Not sure I understand your plan here but sounds like overkill - and may kill off the browser if you have too much data. Ian -- Ian Turton Sent from Houserville, Pennsylvania, United States From christoph at b3e.net Mon Nov 16 15:15:12 2009 From: christoph at b3e.net (Christoph =?UTF-8?B?QsO2aG1l?=) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Clicks on permalink control trigger clickout on vector layer In-Reply-To: References: <20091114124016.01b8b70c@esel> Message-ID: <20091116201512.2f61d250@esel> Eric Lemoine schrieb: > On Saturday, November 14, 2009, Christoph B?hme > wrote: > > Hi all, > > > > in my application [1] a vector layer with an number of features is > > displayed on top of a base map. When users select one of the markers > > the permalink will be updated to include the id of the selected > > feature. This works all fine. The problem comes when users click on > > the permalink. This click will not only activate the permalink but > > also trigger a mouseout event on the vector layer which unselects > > the current feature and updates the permalink. This happens before > > the browser follows the link which makes it impossible to follow a > > permalink with a selected feature. > > > > I tried to add an event listener to the permalink control in the > > hope of catching and stopping the click event before it falls > > through to the map. However, for some reason the event handler is > > not called. > > > > This is the code I used for adding the event listener: > > > > this.permalink_control = new OpenLayers.Control.Permalink(null, > > null, { eventListeners: { > > ? ? ? ?"click": function(e) { > > ? ? ? ? ? ? ? ?alert("Test"); > > ? ? ? ? ? ? ? ?OpenLayers.Event.stop(e ? e: window.event); > > ? ? ? ?} > > }}); > > this.map.addControl(this.permalink_control); > > this.permalink_control.activate(); > > > > Is this the correct way to add an event listener? > > AFAIK you cannot register a browser event listener on a control's DOM > element using eventListeners (or control.events.register). > > Have you tried > > OpenLayers.Event.observe(control.element, "click", function(e) > { ... }); > > ? Ah yes, this does the trick! Thanks a lot. Here is my actual solution in case someone has a similar problem. The $$() function is part of prototype.js and allows me to address the a element of the permalink easily: OpenLayers.Event.observe( $$("." + this.permalink_control.displayClass + " a")[0], "click", function(evt) { var e = evt ? evt : window.event; // "Follow" the link because the browser does not // handle the click event anymore): location.href = OpenLayers.Event.element(e).href; // And stop the event from falling through to the map: OpenLayers.Event.stop(e); return false; } ); Cheers, Christoph From pedropbaracho at gmail.com Mon Nov 16 15:36:12 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] SLD on the fly In-Reply-To: References: <5e3c00490911161129s2cd33feew7fcbb91d00509ec9@mail.gmail.com> Message-ID: <5e3c00490911161236s41620917pdbf483005c8e1e2c@mail.gmail.com> Wow, I am impressed! What a cool map that is being displayed on my screen! hehe :) Thanks for the reply. Guess I am set in solution 2. Just another question. I don't see SLD BODY on WMS Spec, but I see it on SLD profile for WMS. And it also states: "GetMap is defined in WMS 1.3. The SLD profile for WMS defines additional parameters allowing clients to request layers to be portrayed according to some specified style." Do you know any map server that doesn't support SLD profile for WMS, but supports WMS? I am just curious about it, because imho it doesn't make sense splitting SLD profile for WMS from WMS spec. On Mon, Nov 16, 2009 at 5:54 PM, Ian Turton wrote: > On Mon, Nov 16, 2009 at 2:29 PM, Pedro Baracho > wrote: > > I need to change SLD on the fly to create some thematic maps. I would > also > > appreciate if compatibility with OGC's WFS was mantained. Have you guys > done > > this before? I could use some suggestions... :P > > > > I have done some searching and came up with a couple of solutions. > > > > 1- GeoServer GeoExt Styler Plugin. > > I don't know if it is a good solution, because as far as I know, it > changes > > the style of the layer for all the users. I would need to replicate > styles > > on the server for each user and each layer. And also this requires the > > server to be Geoserver, and breaks OGC compatibility. > > > > You are right that will change it for everyone > > > 2- WMS 1.3 and SLD > > MapServer implements WMS 1.3 and accepts a SLD description in the > request. > > GeoServer doesn't. > > Nothing against MapServer, but my current development environment is set > > with GeoServer.. > > Try > http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&Format=image/png&request=GetMap&width=550&height=250&srs=EPSG:4326&SLD_BODY=%3CStyledLayerDescriptor%20version%3D%221.0.0%22%3E%3CUserLayer%3E%3CName%3Etopp:states%3C/Name%3E%3CUserStyle%3E%3CName%3EUserSelection%3C/Name%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CFilter%20xmlns:gml%3D%22http://www.opengis.net/gml%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3ESTATE_NAME%3C/PropertyName%3E%3CLiteral%3EIllinois%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E%3CPolygonSymbolizer%3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%3E%23FF0000%3C/CssParameter%3E%3C/Fill%3E%3C/PolygonSymbolizer%3E%3C/Rule%3E%3CRule%3E%3CLineSymbolizer%3E%3CStroke/%3E%3C/LineSymbolizer%3E%3C/Rule%3E%3C/FeatureTypeStyle%3E%3C/UserStyle%3E%3C/UserLayer%3E%3C/StyledLayerDescriptor%3E > (from the demo requests page in geoserver 1.7.5) - works for all WMS > versions. > > > > 3- WFS and treat SLD exhibition on the client > > This is a double edged solution. The good thing about WFS is that I have > > many more possibilities of control over the map. I can use SelectFeature > > control, instead of hacking some code to implement it over WMS. But it > also > > gives me many other options I don't need such as the vector data. I only > > need the images. > > Not sure I understand your plan here but sounds like overkill - and > may kill off the browser if you have too much data. > > Ian > -- > Ian Turton > > Sent from Houserville, Pennsylvania, United States > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/91151153/attachment.html From brad at cubewerx.com.au Mon Nov 16 16:24:21 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] SLD on the fly In-Reply-To: <5e3c00490911161236s41620917pdbf483005c8e1e2c@mail.gmail.com> References: <5e3c00490911161129s2cd33feew7fcbb91d00509ec9@mail.gmail.com> <5e3c00490911161236s41620917pdbf483005c8e1e2c@mail.gmail.com> Message-ID: <015501ca6703$2afd5a10$80f80e30$@com.au> Pedro, I use CubeWerx WMS. This allows you to apply SLDs externally with no effect on STYLES but you can also undertake a PutStyles if you have that access privilege which will add/update the STYLE. I build a library of SLDs if I want to keep them as permanent filters which is important in my case as I am producing an infinite number of thematic maps (DemographicDrapes) from Census statistics. Have a look at http://demos.numaps.com.au/demographicdrapes.html I have built a complex Style Builder application that allows the user to pretty much change all aspects of a SLD and Save or SaveAs. Cheers, Brad.. From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Pedro Baracho Sent: Tuesday, November 17, 2009 7:36 AM To: Ian Turton Cc: OpenLayers Users Subject: Re: [OpenLayers-Users] SLD on the fly Wow, I am impressed! What a cool map that is being displayed on my screen! hehe :) Thanks for the reply. Guess I am set in solution 2. Just another question. I don't see SLD BODY on WMS Spec, but I see it on SLD profile for WMS. And it also states: "GetMap is defined in WMS 1.3. The SLD profile for WMS defines additional parameters allowing clients to request layers to be portrayed according to some specified style." Do you know any map server that doesn't support SLD profile for WMS, but supports WMS? I am just curious about it, because imho it doesn't make sense splitting SLD profile for WMS from WMS spec. On Mon, Nov 16, 2009 at 5:54 PM, Ian Turton wrote: On Mon, Nov 16, 2009 at 2:29 PM, Pedro Baracho wrote: > I need to change SLD on the fly to create some thematic maps. I would also > appreciate if compatibility with OGC's WFS was mantained. Have you guys done > this before? I could use some suggestions... :P > > I have done some searching and came up with a couple of solutions. > > 1- GeoServer GeoExt Styler Plugin. > I don't know if it is a good solution, because as far as I know, it changes > the style of the layer for all the users. I would need to replicate styles > on the server for each user and each layer. And also this requires the > server to be Geoserver, and breaks OGC compatibility. > You are right that will change it for everyone > 2- WMS 1.3 and SLD > MapServer implements WMS 1.3 and accepts a SLD description in the request. > GeoServer doesn't. > Nothing against MapServer, but my current development environment is set > with GeoServer.. Try http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&Format=image/png&req uest=GetMap&width=550&height=250&srs=EPSG:4326&SLD_BODY=%3CStyledLayerDescri ptor%20version%3D%221.0.0%22%3E%3CUserLayer%3E%3CName%3Etopp:states%3C/Name% 3E%3CUserStyle%3E%3CName%3EUserSelection%3C/Name%3E%3CFeatureTypeStyle%3E%3C Rule%3E%3CFilter%20xmlns:gml%3D%22http://www.opengis.net/gml%22%3E%3CPropert yIsEqualTo%3E%3CPropertyName%3ESTATE_NAME%3C/PropertyName%3E%3CLiteral%3EIll inois%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E%3CPolygonSymbolizer %3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%3E%23FF0000%3C/CssParameter %3E%3C/Fill%3E%3C/PolygonSymbolizer%3E%3C/Rule%3E%3CRule%3E%3CLineSymbolizer %3E%3CStroke/%3E%3C/LineSymbolizer%3E%3C/Rule%3E%3C/FeatureTypeStyle%3E%3C/U serStyle%3E%3C/UserLayer%3E%3C/StyledLayerDescriptor%3E (from the demo requests page in geoserver 1.7.5) - works for all WMS versions. > > 3- WFS and treat SLD exhibition on the client > This is a double edged solution. The good thing about WFS is that I have > many more possibilities of control over the map. I can use SelectFeature > control, instead of hacking some code to implement it over WMS. But it also > gives me many other options I don't need such as the vector data. I only > need the images. Not sure I understand your plan here but sounds like overkill - and may kill off the browser if you have too much data. Ian -- Ian Turton Sent from Houserville, Pennsylvania, United States -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091117/d277b055/attachment.html From zac.spitzer at gmail.com Mon Nov 16 19:25:18 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser In-Reply-To: <5e3c00490911161105v22e77a64i89d1d1e1ccc954dc@mail.gmail.com> References: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> <5e3c00490911160410x59b31961y9521fff722a21c88@mail.gmail.com> <5e3c00490911161105v22e77a64i89d1d1e1ccc954dc@mail.gmail.com> Message-ID: <7a85053e0911161625y776ac495h1b1bceb7d663bb69@mail.gmail.com> there is a huge different between a server rendering an image and a browser rendering a vector layer a browser can only handle a limited volume of vector data z On Tue, Nov 17, 2009 at 6:05 AM, Pedro Baracho wrote: > Cluster strategy didn't help me, because I need the lines to be rendered. > > Right now I am using MaxResolution to crop the whole Layer if the level of > detail is small (i.e. low zoom level). > The weird thing is that GeoServer can serve me the image in real time of > the same layer and OL crashes the browser for lack of memory, and both (the > browser and the GeoServer) are hosted and running on my development machine. > I know OL is javascript, but even though, there shouldn't be such a huge > impact on memory. > > Have you guys seen this before? > > And thanks a lot for the help! > > > On Mon, Nov 16, 2009 at 11:30 AM, Eric Lemoine < > eric.lemoine@camptocamp.com> wrote: > >> On Mon, Nov 16, 2009 at 1:10 PM, Pedro Baracho >> wrote: >> > My data can be displayed via WMS. It represents the streets of my city >> and >> > is composed by a huge number of center lines. >> > >> > I am currently using BBOX strategy and it is insufficient. >> > I am going to check cluster strategy. Do you know how can I use it to >> > display lines instead of points? >> >> From the top of my head I remember that you can use the cluster >> strategy with other types of geometries than points. However clusters >> are always represented as points. >> >> 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 > > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091117/c1cea8b1/attachment.html From pedropbaracho at gmail.com Mon Nov 16 20:22:20 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser In-Reply-To: <7a85053e0911161625y776ac495h1b1bceb7d663bb69@mail.gmail.com> References: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> <5e3c00490911160410x59b31961y9521fff722a21c88@mail.gmail.com> <5e3c00490911161105v22e77a64i89d1d1e1ccc954dc@mail.gmail.com> <7a85053e0911161625y776ac495h1b1bceb7d663bb69@mail.gmail.com> Message-ID: <5e3c00490911161722j318debccq657a0949f2e91fa5@mail.gmail.com> I know GeoServer is different from OpenLayers, but what I am questioning is how big is that impact on rendering data. I have a development environment on my machine consisting of Apache Tomcat and GeoServer. This same machine is running the Browser that accesses OL code. The vector data is hosted on a Oracle server on a different machine. I find weird that Geoserver, running on my machine, can retrieve the vector data from Oracle Server, render an image and deliver it to the browser, while the browser itself, can't take the XML and render an image. And it is not a performance issue. It simply consumes all my physical memory (that is something like 4.5+ gb) and FF crashes, without any warning or error logging from OL. I know that rendering and delivering an image is a lot simpler than building nested divs and image tags, parsing XML, etc. Even more if you compare Java to Javascript. But is it really "4gb+ simple"? That is what I find weird. I didn't have time to check the rendering code yet, because I am currently working on a project that will serve only WMS images. But I was a bit disappointed when I tried using WFS to show the same data. I thought it would take a lot to load, but in fact it simply crashed the browser over and over. Cheers, Pedro. On Mon, Nov 16, 2009 at 10:25 PM, Zac Spitzer wrote: > there is a huge different between a server rendering an image and > a browser rendering a vector layer > > a browser can only handle a limited volume of vector data > > z > > On Tue, Nov 17, 2009 at 6:05 AM, Pedro Baracho wrote: > >> Cluster strategy didn't help me, because I need the lines to be rendered. >> >> Right now I am using MaxResolution to crop the whole Layer if the level of >> detail is small (i.e. low zoom level). >> The weird thing is that GeoServer can serve me the image in real time of >> the same layer and OL crashes the browser for lack of memory, and both (the >> browser and the GeoServer) are hosted and running on my development machine. >> I know OL is javascript, but even though, there shouldn't be such a huge >> impact on memory. >> >> Have you guys seen this before? >> >> And thanks a lot for the help! >> >> >> On Mon, Nov 16, 2009 at 11:30 AM, Eric Lemoine < >> eric.lemoine@camptocamp.com> wrote: >> >>> On Mon, Nov 16, 2009 at 1:10 PM, Pedro Baracho >>> wrote: >>> > My data can be displayed via WMS. It represents the streets of my city >>> and >>> > is composed by a huge number of center lines. >>> > >>> > I am currently using BBOX strategy and it is insufficient. >>> > I am going to check cluster strategy. Do you know how can I use it to >>> > display lines instead of points? >>> >>> From the top of my head I remember that you can use the cluster >>> strategy with other types of geometries than points. However clusters >>> are always represented as points. >>> >>> 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 >> >> > > > -- > Zac Spitzer > Solution Architect / Director > Ennoble Consultancy Australia > http://www.ennoble.com.au > http://zacster.blogspot.com > +61 405 847 168 > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091116/806206cf/attachment.html From zac.spitzer at gmail.com Mon Nov 16 20:35:33 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser In-Reply-To: <5e3c00490911161722j318debccq657a0949f2e91fa5@mail.gmail.com> References: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> <5e3c00490911160410x59b31961y9521fff722a21c88@mail.gmail.com> <5e3c00490911161105v22e77a64i89d1d1e1ccc954dc@mail.gmail.com> <7a85053e0911161625y776ac495h1b1bceb7d663bb69@mail.gmail.com> <5e3c00490911161722j318debccq657a0949f2e91fa5@mail.gmail.com> Message-ID: <7a85053e0911161735m2167cdd0gc0f43fcfc5b335c@mail.gmail.com> they are simply different technologies. a server is simply using a far more efficent approach than rendering vectors in a browser... vector data alone is very verbose and that's what is causing the problem in the browser an image is depending on the color depth is like 100k and just needs to be displayed. what your doing with vectors is sending all the data to the browser which is probably much more detailed than required for the screen display. The browser needs to process all that data, and display it.. java or c++ or C on a server will always out perform javascript z On Tue, Nov 17, 2009 at 12:22 PM, Pedro Baracho wrote: > I know GeoServer is different from OpenLayers, but what I am questioning is > how big is that impact on rendering data. > I have a development environment on my machine consisting of Apache Tomcat > and GeoServer. > This same machine is running the Browser that accesses OL code. > > The vector data is hosted on a Oracle server on a different machine. > > I find weird that Geoserver, running on my machine, can retrieve the vector > data from Oracle Server, render an image and deliver it to the browser, > while the browser itself, can't take the XML and render an image. And it is > not a performance issue. It simply consumes all my physical memory (that is > something like 4.5+ gb) and FF crashes, without any warning or error logging > from OL. > > I know that rendering and delivering an image is a lot simpler than > building nested divs and image tags, parsing XML, etc. Even more if you > compare Java to Javascript. But is it really "4gb+ simple"? That is what I > find weird. > > I didn't have time to check the rendering code yet, because I am currently > working on a project that will serve only WMS images. But I was a bit > disappointed when I tried using WFS to show the same data. I thought it > would take a lot to load, but in fact it simply crashed the browser over and > over. > > Cheers, > Pedro. > > On Mon, Nov 16, 2009 at 10:25 PM, Zac Spitzer wrote: > >> there is a huge different between a server rendering an image and >> a browser rendering a vector layer >> >> a browser can only handle a limited volume of vector data >> >> z >> >> On Tue, Nov 17, 2009 at 6:05 AM, Pedro Baracho wrote: >> >>> Cluster strategy didn't help me, because I need the lines to be rendered. >>> >>> Right now I am using MaxResolution to crop the whole Layer if the level >>> of detail is small (i.e. low zoom level). >>> The weird thing is that GeoServer can serve me the image in real time of >>> the same layer and OL crashes the browser for lack of memory, and both (the >>> browser and the GeoServer) are hosted and running on my development machine. >>> I know OL is javascript, but even though, there shouldn't be such a huge >>> impact on memory. >>> >>> Have you guys seen this before? >>> >>> And thanks a lot for the help! >>> >>> >>> On Mon, Nov 16, 2009 at 11:30 AM, Eric Lemoine < >>> eric.lemoine@camptocamp.com> wrote: >>> >>>> On Mon, Nov 16, 2009 at 1:10 PM, Pedro Baracho >>>> wrote: >>>> > My data can be displayed via WMS. It represents the streets of my city >>>> and >>>> > is composed by a huge number of center lines. >>>> > >>>> > I am currently using BBOX strategy and it is insufficient. >>>> > I am going to check cluster strategy. Do you know how can I use it to >>>> > display lines instead of points? >>>> >>>> From the top of my head I remember that you can use the cluster >>>> strategy with other types of geometries than points. However clusters >>>> are always represented as points. >>>> >>>> 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 >>> >>> >> >> >> -- >> Zac Spitzer >> Solution Architect / Director >> Ennoble Consultancy Australia >> http://www.ennoble.com.au >> http://zacster.blogspot.com >> +61 405 847 168 >> >> >> >> > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091117/ac9ec917/attachment.html From apestgas2 at yahoo.com.hk Mon Nov 16 20:59:52 2009 From: apestgas2 at yahoo.com.hk (Aypes2) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Query problem In-Reply-To: References: <1258097036622-3997793.post@n2.nabble.com> Message-ID: <1258423192357-4016028.post@n2.nabble.com> Arnd Wippermann wrote: > > Hi, > > It seems, that your loop creates the window for your first queryable layer > and then the queryresult of your next queryable layers use the same window > and overwrite the contents of the window "getfeatureinfo". The last wins. > > If you change the window name to "getfeatureinfo" + i, then you should get > one window for every query. > > A second approach is to collect the visibible layers and do only one > getfeatureinfo request with this layerlist. Then you get back from > MapServer > one result html for all the queried layers. > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Aypes2 > Gesendet: Freitag, 13. November 2009 08:24 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Query problem > > Hi, Sorry for late reply. I have done what you said with "getfeatureinfo" + i, when I click each time, there are one window for each query. But how can I open 1 window only when querying? I have 6 layers, and if I turn on 6 layers, 6 windows come out when clicking on the map. Only 1 windows contains information but others are useless ("EMPTY" template in MapServer). I want the required window comes out only and the "EMPTY" template comes out when clicked coordinates have nothing. I think I should write some more 'if' statements to make it work, but I have no idea about how to do this. I tried to compare the layer's coordinates/pixels with e.xy.x and e.xy.y, so window comes out only when they are same. But it fails, maybe I get the layer's coordinates wrongly. I also tried to make mslayers[i] in ("&QUERY_LAYERS=" + mslayers[i]) in which window comes out when mslayers[i] is not empty template, but fails too. I got your second approach idea. But is that using WMSfeaturegetinfo or my method? And it sounds like giving all queryable layers' information within one window only, right? Thanks Aypes2 -- View this message in context: http://n2.nabble.com/Query-problem-tp3997793p4016028.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From sigenz at yahoo.co.nz Mon Nov 16 21:37:26 2009 From: sigenz at yahoo.co.nz (Sige) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] wrapDateLine with WMS, map covered by opaque film Message-ID: <1258425446167-4016174.post@n2.nabble.com> Hi List, I am trying to make my wms (tilecached) map wrapped across the date line, like: var map = new OpenLayers.Map( $('map'), { maxResolution: 0.3515625, projection: 'EPSG:4326' } ); var wms = new OpenLayers.Layer.WMS( "WMS/Tilecache", "http://maps.geonet.org.nz/tilecache/tilecache.py?", { format: 'image/png', projection: 'EPSG:4326', units: 'degrees', maxResolution: 0.3515625, layers: 'nasagm', isBaseLayer: true, reproject: false, buffer: 1 }, {wrapDateLine: true, reproject: false} ); map.addLayer(wms); map.addControl(new OpenLayers.Control.MousePosition()); map.zoomToMaxExtent(); The map wrapped well, however, when I pan and zoom the map around, part of the map or the whole map becomes opaque (like covered by a white film). I am not sure if this is caused by my wms (tilecache) or wrapDateLine. The WMS map works fine without wrapDateLine. I have also tried the WMS from metacarta.com (mapServer) which works fine: var wms1 = new OpenLayers.Layer.WMS( "OpenLayers Basic",//MapServer "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {wrapDateLine: true} ); map.addLayers([ wms1]); Thanks, Sige -- View this message in context: http://n2.nabble.com/wrapDateLine-with-WMS-map-covered-by-opaque-film-tp4016174p4016174.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From r.eichhorn at netbi.com.au Mon Nov 16 22:09:37 2009 From: r.eichhorn at netbi.com.au (Richard Eichhorn) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] OpenLayers.Control.SelectFeature and shift-click in Firefox In-Reply-To: <5e3c00490911160434w21eace4fgbd07c0ff506c32fa@mail.gmail.com> References: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> <5e3c00490911121014j7188223fy4b5e175bd66904c7@mail.gmail.com> <2505d0830911121710g75f05eeeq8aac65a697653a46@mail.gmail.com> <5e3c00490911160434w21eace4fgbd07c0ff506c32fa@mail.gmail.com> Message-ID: <2505d0830911161909q5874158cqbef66643dbd30142@mail.gmail.com> Hi Pedro, Thanks for the examples, but I was looking for an example where a handler is defined within the selectFeature control. I want the default behavior for a click and shiftClick, I just want to stop the event propagating to the browser. I have a feeling this could be a bug, as I had a look at the selectFeature in Firebug, and the control contains a feature handler, and the stopClick property is set to true. So it should stop the click reaching the browser. On the
tag issue, there is no tag, the images are rendered using a styleMap and the externalGraphic property. Openlayers uses SVG to render the image on the map - It is just default FF behavior. In the end I have given up using multipleKey: "shiftKey" in the control, and have settled for using toggle: true instead. Thanks for the help. Cheers, Richard. 2009/11/16 Pedro Baracho > I have seen two examples of handlers to Click event: > http://openlayers.org/dev/examples/click.html > http://openlayers.org/dev/examples/click-handler.html > > I think you will have to create a handler to Keyboard events also, so you > can capture the Shift+Key. In fact, I think you will only need that. Try > adding > multipleKey: "shiftKey" > to your SelectFeature control, so you override the shift+click behaviour of > Firefox. > > Just a question: FF opens another window when you shift+click a link, i.e. > tag. Why is the tag there on your externalGraphic in the first > place?? > > > On Thu, Nov 12, 2009 at 11:10 PM, Richard Eichhorn < > r.eichhorn@netbi.com.au> wrote: > >> Thanks for that. I did come across that, but I couldn't figure out how to >> use it in the context of OpenLayers.Control.SelectFeature. >> >> There is a handlers property but I can't figure out how to use it. >> >> Has anyone got an example of creating an OpenLayers.Control.SelectFeature >> with a handlers property defined? >> >> Cheers, >> Richard. >> >> >> >> 2009/11/13 Pedro Baracho >> >> I am not sure if that helps, but there is a function stop on Event class >>> for stopping event propagation. >>> >>> http://dev.openlayers.org/docs/files/OpenLayers/Events-js.html#OpenLayers.Event.stop >>> >>> On Thu, Nov 12, 2009 at 5:47 AM, Richard Eichhorn < >>> r.eichhorn@netbi.com.au> wrote: >>> >>>> I am using OpenLayers.Control.SelectFeature with features which are >>>> represented using an externalGraphic. When I use do a shift-click to >>>> multi-select features in Firefox, it opens up a new window with the icon of >>>> the feature I just clicked on. >>>> >>>> When writing non-openlayers javascript code I have just used >>>> preventDefault in firefox to stop the events propagating. >>>> >>>> How can I do it in Openlayers? >>>> >>>> Cheers, >>>> Richard >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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/20091117/9d966ba4/attachment.html From peteralen at earthlink.net Mon Nov 16 22:16:01 2009 From: peteralen at earthlink.net (plen) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] OpenLayers with Google Maps - how to obtain degree lat/long? Message-ID: <1258427761415-4016339.post@n2.nabble.com> Hello, I am using OpenLayers 2.8 and based on multiple examples I found, I use the following to load a Google Map map layer: ------------------------------ var options = { projection: new OpenLayers.Projection("EPSG:900913"), units: "m", maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34) }; map = new OpenLayers.Map('map', options); var layer = new OpenLayers.Layer.Google("Google", {"sphericalMercator": true}); map.addLayer(layer); ------------------------------ I do indeed get the google map layer displayed but what I ran into is that these options change how the OL API handles or deals with latlon coordinates. For example, when I click on the map I get the following type of "coordinate" when calling the OL getLatLongFromViewportPX() function: (Lat: -39135.7584 / Lon: -273950.3093). If I do a map.getExtent(), which typically returns the latlon for the SW and NE boundary corners, now returns a value like -381458.9896 / -722521.0097, -322984.6629 / -686366.2955. These are obviously not coordinates in degrees but some other value. My application is expecting a decimal coordinate in degrees, which OL returns in the getgetLatLongFromViewportPX() and getExtent() function calls when google maps are not used. Now the app does not work. I see that the "unit" value listed in the options is "m". Not sure if that is meters or some other value. The OpenLayers.Bounds value also does not seem to be listed in a latlon coordinate. In order to get my coordinate values in degrees, is there another set of options to use or is there some formula/algorithm that can be applied to what comes back from the OL functions in order to get the value I am looking for. Thanks for any insight - Peter -- View this message in context: http://n2.nabble.com/OpenLayers-with-Google-Maps-how-to-obtain-degree-lat-long-tp4016339p4016339.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Tue Nov 17 00:52:32 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] OpenLayers with Google Maps - how to obtain degree lat/long? In-Reply-To: <1258427761415-4016339.post@n2.nabble.com> References: <1258427761415-4016339.post@n2.nabble.com> Message-ID: On Tuesday, November 17, 2009, plen wrote: > > Hello, > > I am using OpenLayers 2.8 and based on multiple examples I found, I use the > following to load a Google Map map layer: > > ------------------------------ > var options = { > ? ? ? ? ? ? ? ?projection: new OpenLayers.Projection("EPSG:900913"), > ? ? ? ? ? ? ? ?units: "m", > ? ? ? ? ? ? ? ?maxResolution: 156543.0339, > ? ? ? ? ? ? ? ?maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 20037508.34, 20037508.34) > }; > map = new OpenLayers.Map('map', options); > var layer = new OpenLayers.Layer.Google("Google", {"sphericalMercator": > true}); > map.addLayer(layer); > ------------------------------ > > I do indeed get the google map layer displayed but what I ran into is that > these options change how the OL API handles or deals with latlon > coordinates. ?For example, when I click on the map I get the following type > of "coordinate" when calling the OL getLatLongFromViewportPX() function: > (Lat: -39135.7584 ?/ Lon: -273950.3093). ?If I do a map.getExtent(), which > typically returns the latlon for the SW and NE boundary corners, now returns > a value like -381458.9896 / -722521.0097, -322984.6629 / -686366.2955. > These are obviously not coordinates in degrees but some other value. ?My > application is expecting a decimal coordinate in degrees, which OL returns > in the getgetLatLongFromViewportPX() and getExtent() function calls when > google maps are not used. ?Now the app does not work. > > I see that the "unit" value listed in the options is "m". Not sure if that > is meters or some other value. ?The OpenLayers.Bounds value also does not > seem to be listed in a latlon coordinate. ?In order to get my coordinate > values in degrees, is there another set of options to use or is there some > formula/algorithm that can be applied to what comes back from the OL > functions in order to get the value I am looking for. > > Thanks for any insight - Peter Yes, Google layers do not use the EPSG:4326 (lonl/at) coordinates system. You can reproject lonlat, bounds and geometry objects to EPSG:4326 using the transform method: obj.transform( new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326") ); where obj is a LonLat, Bounds or Geometry object. 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 Tue Nov 17 01:29:30 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] OpenLayers.Control.SelectFeature and shift-click in Firefox In-Reply-To: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> References: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> Message-ID: On Thursday, November 12, 2009, Richard Eichhorn wrote: > I am using OpenLayers.Control.SelectFeature with features which are represented using an externalGraphic.? When I use do a shift-click to multi-select features in Firefox, it opens up a new window with the icon of the feature I just clicked on. > > When writing non-openlayers javascript code I have just used preventDefault in firefox to stop the events propagating. > > How can I do it in Openlayers? have you tried fallThrough:false in the map options? (unsure it'll help in your case) 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 r.eichhorn at netbi.com.au Tue Nov 17 02:48:31 2009 From: r.eichhorn at netbi.com.au (Richard Eichhorn) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] OpenLayers.Control.SelectFeature and shift-click in Firefox In-Reply-To: References: <2505d0830911112347i4ad4c453vec5fcdb4370998c8@mail.gmail.com> Message-ID: <2505d0830911162348n5fe92710nb49b2d77a9b26508@mail.gmail.com> Hi Eric, That did it. You're a genius. Cheers, Richard. 2009/11/17 Eric Lemoine > On Thursday, November 12, 2009, Richard Eichhorn > wrote: > > I am using OpenLayers.Control.SelectFeature with features which are > represented using an externalGraphic. When I use do a shift-click to > multi-select features in Firefox, it opens up a new window with the icon of > the feature I just clicked on. > > > > When writing non-openlayers javascript code I have just used > preventDefault in firefox to stop the events propagating. > > > > How can I do it in Openlayers? > > have you tried fallThrough:false in the map options? (unsure it'll > help in your case) > > 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 > -- (w) 07 3124 4034 (m) 0414 583 411 (e) r.eichhorn@netbi.com.au (w) www.netbi.com.au (a) level 1, 50 park road milton brisbane queensland australia 4064 (p) po box 1003 new farm brisbane queensland australia 4005 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091117/ea3a1381/attachment.html From maimaj at gmail.com Tue Nov 17 06:18:40 2009 From: maimaj at gmail.com (maimaj) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Problem with WFS Message-ID: <1258456720258-4017977.post@n2.nabble.com> Hi all, I have a WMS layer as my base layer and also a WFS layer on top of it. OpenLayers renders the WMS layer perfectly, but the WFS layer doesn't show up. I am pretty sure that the OpenLayers is sending an appropriate request to the server (Geoserver) and the server is also responding properly, since: 1. Geoserver is on the same server where my own application (which hosts the OpenLayers.js) is. So there's no need for the proxy. 2. Geoserver console logs show that it has received the request properly. 3. When I copy the the request string in the address bar of my web browser, I get the gml2 file from the server (I also tested the server with uDig as the client, and it can render the features properly through WFS service provided by Geoserver). Could you please help me on this issue and tell me what might be the cause of this problem? I have copied the init function from the WFS example available in the examples directory of OpenLayers 2.8 and added my own WMS layer, removed the proxy setting, and changed the WFS setting. Thanks in advance, Majid -- View this message in context: http://n2.nabble.com/Problem-with-WFS-tp4017977p4017977.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Tue Nov 17 06:35:32 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <5e3c00490911161148m5a6ad5eeh68cf61a1c4a53286@mail.gmail.com> References: <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> <1258390718086-4013123.post@n2.nabble.com> <4B018593.5010806@opengeo.org> <1258399202179-4014088.post@n2.nabble.com> <5e3c00490911161139q684830f3m33ae290df8bb266e@mail.gmail.com> <5e3c00490911161148m5a6ad5eeh68cf61a1c4a53286@mail.gmail.com> Message-ID: <1258457732246-4018043.post@n2.nabble.com> Pedro Baracho wrote: > > In fact, changing the security settings won't solve the problem if you are > accessing it via file:// > > On Mon, Nov 16, 2009 at 5:39 PM, Pedro Baracho > wrote: > >> What is the link on your browser when you open the example? >> >> is it http:// ... or file:// ? >> >> That message from IE is exactly the Cross Domain AJAX Request thing. You >> can set the Security config of IE to None also. I think that will solve >> the >> problem for IE. >> > Hello, thanks for the answer. When I open my html file the browser opens it as a file. Is there any possibility how to solve the problem when i open it as a file? (I develop a application in visual studio with openlayers. When I launch my app in visual studio the app will be opened as a html site (http://localhost:1234/Default.aspx). But there is the same problem with the http request. Furthermore when I try to change the security settings to none the lowest level is "medium" (how can i change it to none?) Hope you can help me. Best regards stash -- View this message in context: http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4018043.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Tue Nov 17 07:13:50 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <1258457732246-4018043.post@n2.nabble.com> References: <1258364964815-4011086.post@n2.nabble.com> <5b021dd0911160429g1e7dff18u6c4f7bd800cf73a6@mail.gmail.com> <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> <1258390718086-4013123.post@n2.nabble.com> <4B018593.5010806@opengeo.org> <1258399202179-4014088.post@n2.nabble.com> <5e3c00490911161139q684830f3m33ae290df8bb266e@mail.gmail.com> <5e3c00490911161148m5a6ad5eeh68cf61a1c4a53286@mail.gmail.com> <1258457732246-4018043.post@n2.nabble.com> Message-ID: <4B02937E.6080001@opengeo.org> stash wrote: > thanks for the answer. When I open my html file the browser opens it as a > file. > Is there any possibility how to solve the problem when i open it as a file? > No. OpenLayers is a *web* mapping library. I already told you to access your page via http://localhost:8080/geoserver/www/. > (I develop a application in visual studio with openlayers. When I launch my > app in visual studio the app will be opened as a html site > (http://localhost:1234/Default.aspx). But there is the same problem with the > http request. > Then you have to search for or write your own proxy in asp, or configure the built-in http server of visual studio to use geoserver in a virtual folder (e.g. http://localhost/1234/geoserver). > Furthermore when I try to change the security settings to none the lowest > level is "medium" (how can i change it to none?) > You should not do that. > Hope you can help me. > You need to think about deployment of your application. This could be the key to solving your problem. Your users won't run OpenLayers off visual studio. You will have an httpd (in your case probably IIS), and you need to configure that to provide GeoServer at the same origin. IIRC this is called "Virtual Folder" (or even Proxy) in IIS. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From grigoregeorge631980 at yahoo.co.uk Tue Nov 17 07:16:25 2009 From: grigoregeorge631980 at yahoo.co.uk (pericoltoxic) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Update error Message-ID: <1258460185690-4018212.post@n2.nabble.com> I'm looking for a strategy to use OL as an editor to update a polygon PostGis layer. My PostGis table looks like gid int4 primary key, name varchar2(20), geom polygon I implement a classic stategy var saveStrategy = new OpenLayers.Strategy.Save() wfs = new OpenLayers.Layer.Vector( 'gtest2', { strategies: [ new OpenLayers.Strategy.BBOX(), saveStrategy ], projection: new OpenLayers.Projection("EPSG:31700"), ............................................ var save = new OpenLayers.Control.Button({ title: "Save Changes", trigger: function() { if(edit.feature) { edit.selectControl.unselectAll(); } //alert("aaaaaaabb"); saveStrategy.save(); }, displayClass: "olControlSaveFeatures" }); but i have an error: http://n2.nabble.com/file/n4018212/errror.jpg -- View this message in context: http://n2.nabble.com/Update-error-tp4018212p4018212.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pedropbaracho at gmail.com Tue Nov 17 08:04:20 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Problem with WFS In-Reply-To: <1258456720258-4017977.post@n2.nabble.com> References: <1258456720258-4017977.post@n2.nabble.com> Message-ID: <5e3c00490911170504v5d199bf5jb9f948b4c9f7c429@mail.gmail.com> Could you please copy your code so I can take look? As I understand, WFS problems are usually related to: 1- Proxy and Cross Domain Requests 2- Projections 3- Incorrect OL instancing As you stated on your email, you are getting correct responses so my guess is that you got a problem with Projections. On Tue, Nov 17, 2009 at 9:18 AM, maimaj wrote: > > Hi all, > > I have a WMS layer as my base layer and also a WFS layer on top of it. > OpenLayers renders the WMS layer perfectly, but the WFS layer doesn't show > up. I am pretty sure that the OpenLayers is sending an appropriate request > to the server (Geoserver) and the server is also responding properly, > since: > > 1. Geoserver is on the same server where my own application (which hosts > the OpenLayers.js) is. So > there's no need for the proxy. > 2. Geoserver console logs show that it has received the request properly. > 3. When I copy the the request string in the address bar of my web > browser, I get the gml2 file from the > server (I also tested the server with uDig as the client, and it can > render the features properly through > WFS service provided by Geoserver). > > Could you please help me on this issue and tell me what might be the cause > of this problem? I have copied the init function from the WFS example > available in the examples directory of OpenLayers 2.8 and added my own WMS > layer, removed the proxy setting, and changed the WFS setting. > > Thanks in advance, > Majid > > -- > View this message in context: > http://n2.nabble.com/Problem-with-WFS-tp4017977p4017977.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091117/50737202/attachment.html From dalda at ikt.es Tue Nov 17 09:48:19 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] SLD on the fly Message-ID: <224DBDAF88A6AC47BD22432815351BE0078DDDBF@nekaposta1> Hello, I'm using MapServer WMS and want to apply some complex SLD to an OL WMS layer. It seems that some features cannot be used in OL, for example putting the text label in the centroid of the polygon or fill-opacity (I can't make this work, even with mapserver). I've been looking to your web page and I've realized that you have a slider bar which lets you set some transparency to the style. How do you do that, if I can ask?? Thanks. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? ________________________________ De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Brad Spencer Enviado el: lunes, 16 de noviembre de 2009 22:24 Para: 'Pedro Baracho'; 'Ian Turton' CC: 'OpenLayers Users' Asunto: Re: [OpenLayers-Users] SLD on the fly Pedro, I use CubeWerx WMS. This allows you to apply SLDs externally with no effect on STYLES but you can also undertake a PutStyles if you have that access privilege which will add/update the STYLE. I build a library of SLDs if I want to keep them as permanent filters which is important in my case as I am producing an infinite number of thematic maps (DemographicDrapes) from Census statistics. Have a look at http://demos.numaps.com.au/demographicdrapes.html I have built a complex Style Builder application that allows the user to pretty much change all aspects of a SLD and Save or SaveAs. Cheers, Brad.... From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Pedro Baracho Sent: Tuesday, November 17, 2009 7:36 AM To: Ian Turton Cc: OpenLayers Users Subject: Re: [OpenLayers-Users] SLD on the fly Wow, I am impressed! What a cool map that is being displayed on my screen! hehe :) Thanks for the reply. Guess I am set in solution 2. Just another question. I don't see SLD BODY on WMS Spec, but I see it on SLD profile for WMS. And it also states: "GetMap is defined in WMS 1.3. The SLD profile for WMS defines additional parameters allowing clients to request layers to be portrayed according to some specified style." Do you know any map server that doesn't support SLD profile for WMS, but supports WMS? I am just curious about it, because imho it doesn't make sense splitting SLD profile for WMS from WMS spec. On Mon, Nov 16, 2009 at 5:54 PM, Ian Turton wrote: On Mon, Nov 16, 2009 at 2:29 PM, Pedro Baracho wrote: > I need to change SLD on the fly to create some thematic maps. I would also > appreciate if compatibility with OGC's WFS was mantained. Have you guys done > this before? I could use some suggestions... :P > > I have done some searching and came up with a couple of solutions. > > 1- GeoServer GeoExt Styler Plugin. > I don't know if it is a good solution, because as far as I know, it changes > the style of the layer for all the users. I would need to replicate styles > on the server for each user and each layer. And also this requires the > server to be Geoserver, and breaks OGC compatibility. > You are right that will change it for everyone > 2- WMS 1.3 and SLD > MapServer implements WMS 1.3 and accepts a SLD description in the request. > GeoServer doesn't. > Nothing against MapServer, but my current development environment is set > with GeoServer.. Try http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&Format=image/png&request=GetMap&width=550&height=250&srs=EPSG:4326&SLD_BODY=%3CStyledLayerDescriptor%20version%3D%221.0.0%22%3E%3CUserLayer%3E%3CName%3Etopp:states%3C/Name%3E%3CUserStyle%3E%3CName%3EUserSelection%3C/Name%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CFilter%20xmlns:gml%3D%22http://www.opengis.net/gml%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3ESTATE_NAME%3C/PropertyName%3E%3CLiteral%3EIllinois%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E%3CPolygonSymbolizer%3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%3E%23FF0000%3C/CssParameter%3E%3C/Fill%3E%3C/PolygonSymbolizer%3E%3C/Rule%3E%3CRule%3E%3CLineSymbolizer%3E%3CStroke/%3E%3C/LineSymbolizer%3E%3C/Rule%3E%3C/FeatureTypeStyle%3E%3C/UserStyle%3E%3C/UserLayer%3E%3C/StyledLayerDescriptor%3E (from the demo requests page in geoserver 1.7.5) - works for all WMS versions. > > 3- WFS and treat SLD exhibition on the client > This is a double edged solution. The good thing about WFS is that I have > many more possibilities of control over the map. I can use SelectFeature > control, instead of hacking some code to implement it over WMS. But it also > gives me many other options I don't need such as the vector data. I only > need the images. Not sure I understand your plan here but sounds like overkill - and may kill off the browser if you have too much data. Ian -- Ian Turton Sent from Houserville, Pennsylvania, United States -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091117/75eb181b/attachment.html From steffen.schwarz85 at googlemail.com Tue Nov 17 09:55:57 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <4B02937E.6080001@opengeo.org> References: <1258388892064-4012973.post@n2.nabble.com> <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> <1258390718086-4013123.post@n2.nabble.com> <4B018593.5010806@opengeo.org> <1258399202179-4014088.post@n2.nabble.com> <5e3c00490911161139q684830f3m33ae290df8bb266e@mail.gmail.com> <5e3c00490911161148m5a6ad5eeh68cf61a1c4a53286@mail.gmail.com> <1258457732246-4018043.post@n2.nabble.com> <4B02937E.6080001@opengeo.org> Message-ID: <1258469757520-4019023.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > stash wrote: >> thanks for the answer. When I open my html file the browser opens it as a >> file. >> Is there any possibility how to solve the problem when i open it as a >> file? >> > > No. OpenLayers is a *web* mapping library. I already told you to access > your page via http://localhost:8080/geoserver/www/. > >> (I develop a application in visual studio with openlayers. When I launch >> my >> app in visual studio the app will be opened as a html site >> (http://localhost:1234/Default.aspx). But there is the same problem with >> the >> http request. >> > > Then you have to search for or write your own proxy in asp, or configure > the built-in http server of visual studio to use geoserver in a virtual > folder (e.g. http://localhost/1234/geoserver). > >> Furthermore when I try to change the security settings to none the lowest >> level is "medium" (how can i change it to none?) >> > > You should not do that. > >> Hope you can help me. >> > > You need to think about deployment of your application. This could be > the key to solving your problem. Your users won't run OpenLayers off > visual studio. You will have an httpd (in your case probably IIS), and > you need to configure that to provide GeoServer at the same origin. IIRC > this is called "Virtual Folder" (or even Proxy) in IIS. > > Regards, > Andreas. > > Hello, ok, that sounds a bit complicated, but thanks for the answer. At the moment i have the following situation. When I launch my example app as a file, I get an error (xmlhttprequest). Then i copied the example code in my visualstudio and made a asp.net application. There, when I launch my application, the app starts as html (not as a file) in this case I don't get an error, but the dissapointing fact is, that I don't see the points of my wfs (only the wms is shown). It's really great that I don't get an xmlhttprequest anymore, but my wfs is still not visible. Is my code correct? Best Regards stash -- View this message in context: http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4019023.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Tue Nov 17 10:25:17 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Huge amount of data crashing browser In-Reply-To: <5e3c00490911161722j318debccq657a0949f2e91fa5@mail.gmail.com> References: <5e3c00490911121001w4785e338nbdd2471d87e3dc21@mail.gmail.com> <5e3c00490911160410x59b31961y9521fff722a21c88@mail.gmail.com> <5e3c00490911161105v22e77a64i89d1d1e1ccc954dc@mail.gmail.com> <7a85053e0911161625y776ac495h1b1bceb7d663bb69@mail.gmail.com> <5e3c00490911161722j318debccq657a0949f2e91fa5@mail.gmail.com> Message-ID: <20091117152517.GA10952@metacarta.com> On Mon, Nov 16, 2009 at 11:22:20PM -0200, Pedro Baracho wrote: > I know GeoServer is different from OpenLayers, but what I am questioning is > how big is that impact on rendering data. > I have a development environment on my machine consisting of Apache Tomcat > and GeoServer. > This same machine is running the Browser that accesses OL code. > > The vector data is hosted on a Oracle server on a different machine. > > I find weird that Geoserver, running on my machine, can retrieve the vector > data from Oracle Server, render an image and deliver it to the browser, > while the browser itself, can't take the XML and render an image. The browser *isn't rendering an image*. That's the key difference. (And in fact, the browser probably could render an image like this -- via the Canvas technology -- but OpenLayers doesn't have an implementation which makes this possible.) > And it is > not a performance issue. It simply consumes all my physical memory (that is > something like 4.5+ gb) and FF crashes, without any warning or error logging > from OL. That sounds exactly like a performance issue to me. "Large use of memory" is performance related. The browser is generating an SVG document. If GeoServer could generate SVG (I don't know if it can) and you were to open the resulting, complex, SVG document in Firefox, it is likely you would see similar behavior. It wouldn't be exactly the same because OpenLayers does *much more* to ensure that the data you download from GeoServer is usable in the browser -- adding events, mapping colors, drawing based on style rules, etc. In addition, this manipulation is done through a notoriously heavy API -- the DOM. Rasterizing an image and vectorizing a set of data are two entirely different tasks, with different use cases, and different performance metrics. > I know that rendering and delivering an image is a lot simpler than building > nested divs and image tags, parsing XML, etc. Even more if you compare Java > to Javascript. But is it really "4gb+ simple"? That is what I find weird. Yes. It really is. Welcome to the browser. Regards, -- Christopher Schmidt MetaCarta From arnd.wippermann at web.de Tue Nov 17 13:29:06 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Query problem In-Reply-To: <1258423192357-4016028.post@n2.nabble.com> Message-ID: Hi, "I got your second approach idea. But is that using WMSfeaturegetinfo or my method? And it sounds like giving all queryable layers' information within one window only, right?" It use your method and it will only open one window. But if there is no result for all queried layers, the window open nevertheless. If you want to control the response from your request, you have to use an ajax call. Then you get back the response as text and if it's not empty, you show the response in a window. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Aypes2 Gesendet: Dienstag, 17. November 2009 03:00 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] Query problem Arnd Wippermann wrote: > > Hi, > > It seems, that your loop creates the window for your first queryable > layer and then the queryresult of your next queryable layers use the > same window and overwrite the contents of the window "getfeatureinfo". The last wins. > > If you change the window name to "getfeatureinfo" + i, then you should > get one window for every query. > > A second approach is to collect the visibible layers and do only one > getfeatureinfo request with this layerlist. Then you get back from > MapServer one result html for all the queried layers. > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] Im Auftrag von Aypes2 > Gesendet: Freitag, 13. November 2009 08:24 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Query problem > > Hi, Sorry for late reply. I have done what you said with "getfeatureinfo" + i, when I click each time, there are one window for each query. But how can I open 1 window only when querying? I have 6 layers, and if I turn on 6 layers, 6 windows come out when clicking on the map. Only 1 windows contains information but others are useless ("EMPTY" template in MapServer). I want the required window comes out only and the "EMPTY" template comes out when clicked coordinates have nothing. I think I should write some more 'if' statements to make it work, but I have no idea about how to do this. I tried to compare the layer's coordinates/pixels with e.xy.x and e.xy.y, so window comes out only when they are same. But it fails, maybe I get the layer's coordinates wrongly. I also tried to make mslayers[i] in ("&QUERY_LAYERS=" + mslayers[i]) in which window comes out when mslayers[i] is not empty template, but fails too. I got your second approach idea. But is that using WMSfeaturegetinfo or my method? And it sounds like giving all queryable layers' information within one window only, right? Thanks Aypes2 -- View this message in context: http://n2.nabble.com/Query-problem-tp3997793p4016028.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 brad at cubewerx.com.au Tue Nov 17 15:34:16 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] SLD on the fly In-Reply-To: <224DBDAF88A6AC47BD22432815351BE0078DDDBF@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE0078DDDBF@nekaposta1> Message-ID: <021a01ca67c5$5662bc50$032834f0$@com.au> David, You can manipulate the opacity of any layer within OL. To change a layer?s opacity I just use the following method >> layerObjectName.setOpacity(newOpacity); Where ?newOpacity? is a real number between 0 and 1 [0=transparent and 1=opaque therefore 0.5=half transparent etc]. Then all you need is some GUI tool to collect the number from the user. Hope that helps. Brad . From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of David Alda Fernandez de Lezea Sent: Wednesday, November 18, 2009 1:48 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] SLD on the fly Hello, I'm using MapServer WMS and want to apply some complex SLD to an OL WMS layer. It seems that some features cannot be used in OL, for example putting the text label in the centroid of the polygon or fill-opacity (I can't make this work, even with mapserver). I've been looking to your web page and I've realized that you have a slider bar which lets you set some transparency to the style. How do you do that, if I can ask?? Thanks. Un saludo, ???????????????????????????????????????????????????????????????????????????? ?????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ???????????????????????????????????????????????????????????????????????????? ?????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ???????????????????????????????????????????????????????????????????????????? ?????? email: dalda@ikt.es web: www.ikt.es ???????????????????????????????????????????????????????????????????????????? ?????? _____ De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Brad Spencer Enviado el: lunes, 16 de noviembre de 2009 22:24 Para: 'Pedro Baracho'; 'Ian Turton' CC: 'OpenLayers Users' Asunto: Re: [OpenLayers-Users] SLD on the fly Pedro, I use CubeWerx WMS. This allows you to apply SLDs externally with no effect on STYLES but you can also undertake a PutStyles if you have that access privilege which will add/update the STYLE. I build a library of SLDs if I want to keep them as permanent filters which is important in my case as I am producing an infinite number of thematic maps (DemographicDrapes) from Census statistics. Have a look at http://demos.numaps.com.au/demographicdrapes.html I have built a complex Style Builder application that allows the user to pretty much change all aspects of a SLD and Save or SaveAs. Cheers, Brad . From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Pedro Baracho Sent: Tuesday, November 17, 2009 7:36 AM To: Ian Turton Cc: OpenLayers Users Subject: Re: [OpenLayers-Users] SLD on the fly Wow, I am impressed! What a cool map that is being displayed on my screen! hehe :) Thanks for the reply. Guess I am set in solution 2. Just another question. I don't see SLD BODY on WMS Spec, but I see it on SLD profile for WMS. And it also states: "GetMap is defined in WMS 1.3. The SLD profile for WMS defines additional parameters allowing clients to request layers to be portrayed according to some specified style." Do you know any map server that doesn't support SLD profile for WMS, but supports WMS? I am just curious about it, because imho it doesn't make sense splitting SLD profile for WMS from WMS spec. On Mon, Nov 16, 2009 at 5:54 PM, Ian Turton wrote: On Mon, Nov 16, 2009 at 2:29 PM, Pedro Baracho wrote: > I need to change SLD on the fly to create some thematic maps. I would also > appreciate if compatibility with OGC's WFS was mantained. Have you guys done > this before? I could use some suggestions... :P > > I have done some searching and came up with a couple of solutions. > > 1- GeoServer GeoExt Styler Plugin. > I don't know if it is a good solution, because as far as I know, it changes > the style of the layer for all the users. I would need to replicate styles > on the server for each user and each layer. And also this requires the > server to be Geoserver, and breaks OGC compatibility. > You are right that will change it for everyone > 2- WMS 1.3 and SLD > MapServer implements WMS 1.3 and accepts a SLD description in the request. > GeoServer doesn't. > Nothing against MapServer, but my current development environment is set > with GeoServer.. Try http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&Format=image/png&req uest=GetMap&width=550&height=250&srs=EPSG:4326&SLD_BODY=%3CStyledLayerDescri ptor%20version%3D%221.0.0%22%3E%3CUserLayer%3E%3CName%3Etopp:states%3C/Name% 3E%3CUserStyle%3E%3CName%3EUserSelection%3C/Name%3E%3CFeatureTypeStyle%3E%3C Rule%3E%3CFilter%20xmlns:gml%3D%22http://www.opengis.net/gml%22%3E%3CPropert yIsEqualTo%3E%3CPropertyName%3ESTATE_NAME%3C/PropertyName%3E%3CLiteral%3EIll inois%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E%3CPolygonSymbolizer %3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%3E%23FF0000%3C/CssParameter %3E%3C/Fill%3E%3C/PolygonSymbolizer%3E%3C/Rule%3E%3CRule%3E%3CLineSymbolizer %3E%3CStroke/%3E%3C/LineSymbolizer%3E%3C/Rule%3E%3C/FeatureTypeStyle%3E%3C/U serStyle%3E%3C/UserLayer%3E%3C/StyledLayerDescriptor%3E (from the demo requests page in geoserver 1.7.5) - works for all WMS versions. > > 3- WFS and treat SLD exhibition on the client > This is a double edged solution. The good thing about WFS is that I have > many more possibilities of control over the map. I can use SelectFeature > control, instead of hacking some code to implement it over WMS. But it also > gives me many other options I don't need such as the vector data. I only > need the images. Not sure I understand your plan here but sounds like overkill - and may kill off the browser if you have too much data. Ian -- Ian Turton Sent from Houserville, Pennsylvania, United States -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/02e26f68/attachment.html From peteralen at earthlink.net Tue Nov 17 15:50:35 2009 From: peteralen at earthlink.net (plen) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] OpenLayers with Google Maps - how to obtain degree lat/long? In-Reply-To: References: <1258427761415-4016339.post@n2.nabble.com> Message-ID: <1258491035481-4021195.post@n2.nabble.com> Eric, The transform function indeed seemed to work. My Point now is listed in decimal lat/lon. I though that would solve my problem but it looks like something else is not working. When I use that new transformed Point to add an icon to the map, the icon gets added to the 0,0 location regardless of that the Point's lat/long value is. It seems like the internal API code is having problems dealing with the transformed value and doesn't know how to place it on the map using a lat/lon, so it simply places it at 0,0. ------------------------------- var lonlat = map.getLonLatFromViewPortPx(e.xy); var point = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat); point.transform( new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326") ); var iconSize = new OpenLayers.Size(16, 16); var iconURL = MY_ICON; var iconOffset = new OpenLayers.Pixel(8,8); var marker = new OpenLayers.Marker( new OpenLayers.LonLat(point.x, point.y), new OpenLayers.Icon(iconURL,iconSize,iconOffset)); getMarkersLayer().addMarker(marker); -------------------------------- The same also happens if I created a OpenLayers.Feature.Vector type of point. So, while the transform function allowed me to get the location as a decimal lat/lon, it doesn't appear that I can use that value to add a map icon to that location. Is there some additional transformation that needs to occur. It would seem that this would be a common thing to do. Any new thoughts as to what I am missing? Thanks as always - Peter -- View this message in context: http://n2.nabble.com/OpenLayers-with-Google-Maps-how-to-obtain-degree-lat-long-tp4016339p4021195.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From nolasco_gabriel at yahoo.com.br Tue Nov 17 16:47:29 2009 From: nolasco_gabriel at yahoo.com.br (Gabriel Nolasco) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] overview map using google layer Message-ID: <463735.92822.qm@web37104.mail.mud.yahoo.com> Hi, I'm unsuccessfully trying to create an overview map using a google layer. The result is a null bounds exception. I've found some messages on forums about this issue but none of them very conclusive. Has anyone succeeded to create an overview map with spherical Mercator projection? Thanks in advance, Gabriel Nolasco ____________________________________________________________________________________ Veja quais s?o os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com From Steve.Lime at dnr.state.mn.us Tue Nov 17 18:01:50 2009 From: Steve.Lime at dnr.state.mn.us (Steve Lime) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Possible to override default ZoomBox control behavior... Message-ID: <4B02D6B3.5157.008F.0@dnr.state.mn.us> Hi all: I'm wondering if it's possible to override the basic behavior of the ZoomBox control to: - work normally if a box is drawn - implement a click handler if the user, well, clicks (as opposed to zooming) Or would creating a new control be necessary? Thanks! Steve From peteralen at earthlink.net Tue Nov 17 20:37:53 2009 From: peteralen at earthlink.net (plen) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] OpenLayers with Google Maps - how to obtain degree lat/long? In-Reply-To: <1258491035481-4021195.post@n2.nabble.com> References: <1258427761415-4016339.post@n2.nabble.com> <1258491035481-4021195.post@n2.nabble.com> Message-ID: <1258508273538-4022658.post@n2.nabble.com> I think I have it. I just needed to reverse the transformation. -- View this message in context: http://n2.nabble.com/OpenLayers-with-Google-Maps-how-to-obtain-degree-lat-long-tp4016339p4022658.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dragan.podvezanec at gmail.com Wed Nov 18 02:18:21 2009 From: dragan.podvezanec at gmail.com (Dragan Podvezanec) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] GetFeatures , features property... Message-ID: <1258528701110-4023776.post@n2.nabble.com> Hi all. If I understood documentation right, "features" property in GetFeature Control should fill an object with selected features. I don't know why, but I get nothing: map.someobject = {}; map.someevent.somelayer = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS.fromWMSLayer(map.somelayer,{ geometryName: geometry, srsName: "EPSG:900913" }), hover: false, features: map.someobject }); map.someevent.somelayer.events.register("featureselected", this, function(e) { console.log(e.feature); console.log(map.someobject); }); When I click on layer, I see in console log e.feature, and it's ok, but map.someobject is an empty object. What am I doing wrong here ? -- View this message in context: http://n2.nabble.com/GetFeatures-features-property-tp4023776p4023776.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From maimaj at gmail.com Wed Nov 18 02:31:21 2009 From: maimaj at gmail.com (maimaj) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] Problem with WFS In-Reply-To: <5e3c00490911170504v5d199bf5jb9f948b4c9f7c429@mail.gmail.com> References: <1258456720258-4017977.post@n2.nabble.com> <5e3c00490911170504v5d199bf5jb9f948b4c9f7c429@mail.gmail.com> Message-ID: <1258529481684-4023822.post@n2.nabble.com> Thanks for your help in the first step. You've been right, the problem was with projection. It's resolved but the WFS features do not show up. Before you mentioned that it might be a projection problem, I copied the request string (obtained by getFullRequestString function of WFS class) in the address bar and I received a GML2 file with some features. However, that request string doesn't include the BBOX parameter. I took your advice and fixed the SRS settings on the server and client. When I copy the request string (obtained from the log file of the Geoserver which has the BBOX parameter in it) to the address bar, the returned GML2 file contains only those features which are in the BBOX. Before fixing the projection problem, this file doesn't have any feature member (an almost empty GML2 file). As I mentioned before, I cannot see the features on the screen yet. The SRS settings on the server for this layer are as follows: native srs: EPSG:32639 declared srs: EPSG:32639 srs handling: keep native And my script is the following: var map, layer, wfs; function init() { var bounds = new OpenLayers.Bounds(431834.067, 3887548.528, 684784.466, 4002241.703); var options = { maxExtent : bounds, maxResolution : 859.9516562499998, projection : "EPSG:32639" }; map = new OpenLayers.Map('map', options); layer = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://localhost:8080/geoserver/wms", { layers : 'naji:TBL_GIS_ARC' }); wfs = new OpenLayers.Layer.WFS("WFS", "http://localhost:8080/geoserver/wfs", { typename : "naji:TBL_GIS_FEATURE_POINT", maxfeatures : 1000, format : OpenLayers.Format.GML.v2 }); wfs.isBaseLayer = true; map.addLayer(layer); map.addLayer(wfs); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToExtent(bounds); } Last point: I am using the "full" OL instance and the Geoserver is on the same machine where the above script is hosted. I am completely stuck at this point, and would appreciate any help. Thanks, Majid Pedro Baracho wrote: > > Could you please copy your code so I can take look? > > As I understand, WFS problems are usually related to: > > 1- Proxy and Cross Domain Requests > 2- Projections > 3- Incorrect OL instancing > > As you stated on your email, you are getting correct responses so my guess > is that you got a problem with Projections. > > On Tue, Nov 17, 2009 at 9:18 AM, maimaj wrote: > >> >> Hi all, >> >> I have a WMS layer as my base layer and also a WFS layer on top of it. >> OpenLayers renders the WMS layer perfectly, but the WFS layer doesn't >> show >> up. I am pretty sure that the OpenLayers is sending an appropriate >> request >> to the server (Geoserver) and the server is also responding properly, >> since: >> >> 1. Geoserver is on the same server where my own application (which hosts >> the OpenLayers.js) is. So >> there's no need for the proxy. >> 2. Geoserver console logs show that it has received the request >> properly. >> 3. When I copy the the request string in the address bar of my web >> browser, I get the gml2 file from the >> server (I also tested the server with uDig as the client, and it can >> render the features properly through >> WFS service provided by Geoserver). >> >> Could you please help me on this issue and tell me what might be the >> cause >> of this problem? I have copied the init function from the WFS example >> available in the examples directory of OpenLayers 2.8 and added my own >> WMS >> layer, removed the proxy setting, and changed the WFS setting. >> >> Thanks in advance, >> Majid >> >> -- >> View this message in context: >> http://n2.nabble.com/Problem-with-WFS-tp4017977p4017977.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-with-WFS-tp4017977p4023822.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dalda at ikt.es Wed Nov 18 02:58:30 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:13 2010 Subject: [OpenLayers-Users] SLD on the fly Message-ID: <224DBDAF88A6AC47BD22432815351BE0078DDF01@nekaposta1> Thanks for your response. Is not what I was looking for, but I apreciate it. Everyday you can learn new things. Thanks. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? ________________________________ De: Brad Spencer [mailto:brad@cubewerx.com.au] Enviado el: martes, 17 de noviembre de 2009 21:34 Para: David Alda Fernandez de Lezea; users@openlayers.org Asunto: RE: [OpenLayers-Users] SLD on the fly David, You can manipulate the opacity of any layer within OL. To change a layer's opacity I just use the following method >> layerObjectName.setOpacity(newOpacity); Where 'newOpacity' is a real number between 0 and 1 [0=transparent and 1=opaque therefore 0.5=half transparent etc]. Then all you need is some GUI tool to collect the number from the user. Hope that helps. Brad.... From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of David Alda Fernandez de Lezea Sent: Wednesday, November 18, 2009 1:48 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] SLD on the fly Hello, I'm using MapServer WMS and want to apply some complex SLD to an OL WMS layer. It seems that some features cannot be used in OL, for example putting the text label in the centroid of the polygon or fill-opacity (I can't make this work, even with mapserver). I've been looking to your web page and I've realized that you have a slider bar which lets you set some transparency to the style. How do you do that, if I can ask?? Thanks. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? ________________________________ De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Brad Spencer Enviado el: lunes, 16 de noviembre de 2009 22:24 Para: 'Pedro Baracho'; 'Ian Turton' CC: 'OpenLayers Users' Asunto: Re: [OpenLayers-Users] SLD on the fly Pedro, I use CubeWerx WMS. This allows you to apply SLDs externally with no effect on STYLES but you can also undertake a PutStyles if you have that access privilege which will add/update the STYLE. I build a library of SLDs if I want to keep them as permanent filters which is important in my case as I am producing an infinite number of thematic maps (DemographicDrapes) from Census statistics. Have a look at http://demos.numaps.com.au/demographicdrapes.html I have built a complex Style Builder application that allows the user to pretty much change all aspects of a SLD and Save or SaveAs. Cheers, Brad.... From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Pedro Baracho Sent: Tuesday, November 17, 2009 7:36 AM To: Ian Turton Cc: OpenLayers Users Subject: Re: [OpenLayers-Users] SLD on the fly Wow, I am impressed! What a cool map that is being displayed on my screen! hehe :) Thanks for the reply. Guess I am set in solution 2. Just another question. I don't see SLD BODY on WMS Spec, but I see it on SLD profile for WMS. And it also states: "GetMap is defined in WMS 1.3. The SLD profile for WMS defines additional parameters allowing clients to request layers to be portrayed according to some specified style." Do you know any map server that doesn't support SLD profile for WMS, but supports WMS? I am just curious about it, because imho it doesn't make sense splitting SLD profile for WMS from WMS spec. On Mon, Nov 16, 2009 at 5:54 PM, Ian Turton wrote: On Mon, Nov 16, 2009 at 2:29 PM, Pedro Baracho wrote: > I need to change SLD on the fly to create some thematic maps. I would also > appreciate if compatibility with OGC's WFS was mantained. Have you guys done > this before? I could use some suggestions... :P > > I have done some searching and came up with a couple of solutions. > > 1- GeoServer GeoExt Styler Plugin. > I don't know if it is a good solution, because as far as I know, it changes > the style of the layer for all the users. I would need to replicate styles > on the server for each user and each layer. And also this requires the > server to be Geoserver, and breaks OGC compatibility. > You are right that will change it for everyone > 2- WMS 1.3 and SLD > MapServer implements WMS 1.3 and accepts a SLD description in the request. > GeoServer doesn't. > Nothing against MapServer, but my current development environment is set > with GeoServer.. Try http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&Format=image/png&request=GetMap&width=550&height=250&srs=EPSG:4326&SLD_BODY=%3CStyledLayerDescriptor%20version%3D%221.0.0%22%3E%3CUserLayer%3E%3CName%3Etopp:states%3C/Name%3E%3CUserStyle%3E%3CName%3EUserSelection%3C/Name%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CFilter%20xmlns:gml%3D%22http://www.opengis.net/gml%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3ESTATE_NAME%3C/PropertyName%3E%3CLiteral%3EIllinois%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E%3CPolygonSymbolizer%3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%3E%23FF0000%3C/CssParameter%3E%3C/Fill%3E%3C/PolygonSymbolizer%3E%3C/Rule%3E%3CRule%3E%3CLineSymbolizer%3E%3CStroke/%3E%3C/LineSymbolizer%3E%3C/Rule%3E%3C/FeatureTypeStyle%3E%3C/UserStyle%3E%3C/UserLayer%3E%3C/StyledLayerDescriptor%3E (from the demo requests page in geoserver 1.7.5) - works for all WMS versions. > > 3- WFS and treat SLD exhibition on the client > This is a double edged solution. The good thing about WFS is that I have > many more possibilities of control over the map. I can use SelectFeature > control, instead of hacking some code to implement it over WMS. But it also > gives me many other options I don't need such as the vector data. I only > need the images. Not sure I understand your plan here but sounds like overkill - and may kill off the browser if you have too much data. Ian -- Ian Turton Sent from Houserville, Pennsylvania, United States -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/c662433c/attachment.html From dalda at ikt.es Wed Nov 18 03:19:24 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Hidden layer for layer switcher but not for map Message-ID: <224DBDAF88A6AC47BD22432815351BE0078DDF2A@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/20091118/af14b4db/attachment.gif From dalda at ikt.es Wed Nov 18 04:24:05 2009 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Hidden layer for layer switcher but not for map Message-ID: <224DBDAF88A6AC47BD22432815351BE0078DDFA1@nekaposta1> Thanks a lot!!! Cheers!! 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 ?????????????????????????????????????????????????????????????????????????????????? -----Mensaje original----- De: Ivan Grcic [mailto:igrcic@gmail.com] Enviado el: mi?rcoles, 18 de noviembre de 2009 10:21 Para: David Alda Fernandez de Lezea Asunto: Re: [OpenLayers-Users] Hidden layer for layer switcher but not for map http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.displayInLayerSwitcher cheers On Wed, Nov 18, 2009 at 9:19 AM, David Alda Fernandez de Lezea wrote: > Hello list, > > Is it possible to create a layer, that is visible on the map but that > is not shown it in the layer switcher? > > Thanks. > > > > Un saludo, > > > > ?????????????????????????????????????????????????????????????????????? > ???????????? > > David Alda Fern?ndez de Lezea > > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y > Biodiversidad > > > > IKT > > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > ?????????????????????????????????????????????????????????????????????? > ???????????? > Tlfnos.: 945-00-32-95???????????????????????? Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????? > ???????????? > email: dalda@ikt.es??????????????????????????????? web: www.ikt.es > ?????????????????????????????????????????????????????????????????????? > ???????????? > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From barbara.fiederer at web.de Wed Nov 18 04:32:08 2009 From: barbara.fiederer at web.de (Barbara Fiederer) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] request and parse GML Message-ID: <1249848712@web.de> Hi Pedro, hi list, thank you for answering my question. > Is your html code on the same domain of your data? In example: http:// > localhost:8080/mypage.html and http://localhost:8080. > If not you have to set OpenLayers.ProxyHost so you can request data > from other domains. I do use a proxy and it works for other Requests. > Second. You don't need all those parameters on OpenLayers.Request. > POST. You only need "data", "url" and "callback". OK, that was because of my attempts to solve my problem. I erased all but the three you suggested. > Third. As I see on your code, you are doing a request to Geoserver to > grab a GML and your callback function is processing it and adding its > features to a Vector Layer. > > You could do this directly by using OpenLayers.Layer.Vector() and > using GML arguments. Check these examples: > 1- http://openlayers.org/dev/examples/gml-layer.html > 2- http://openlayers.org/dev/examples/behavior-fixed-http-gml.html > 3- http://openlayers.org/dev/examples/wfs-protocol.html > > I am pretty sure example 3 is exactly what you are looking for. Not exactly: I need to get selected sets of features. I can use example three and get some thousand features that correctly show on the map after a looooong time. I need to set a filter, but the filter that worked with the post-request, that I tried first and described in my mail, does not work with the WFS-protocol. So, now I read through all the filter WFS and BBox discussions and still do not know whether it is possible do what I try here: var filter_body = new OpenLayers.Filter.Logical({ type: OpenLayers.Filter.Logical.OR, filters: [ new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "infotext", value: "FS330117000000" }), new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "infotext", value: "FS350067900000" }), new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "infotext", value: "FS350068000000" }) ] }); var DBsellayer = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.WFS({ url: "http://myDomain.com:8090/geoserver/wfs", featureType: "flurst", data: filter_body, featureNS: "http://myDomain.com/demo" }) }); map.addLayer(DBsellayer); I do use Strategy.Fixed because this seems to fix the BBox/Filter-Problem of a WFS-Protocol. But the Layer always shows all features. Thanks in advance for answering Babsi ______________________________________________________ GRATIS f?r alle WEB.DE-Nutzer: Die maxdome Movie-FLAT! Jetzt freischalten unter http://movieflat.web.de From ahocevar at opengeo.org Wed Nov 18 06:47:35 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Hidden layer for layer switcher but not for map In-Reply-To: <224DBDAF88A6AC47BD22432815351BE0078DDF2A@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE0078DDF2A@nekaposta1> Message-ID: <4B03DED7.3020805@opengeo.org> David Alda Fernandez de Lezea wrote: > Hello list, > > Is it possible to create a layer, that is visible on the map but that > is not shown it in the layer switcher? It is. All you have to do is add displayInLayerSwitcher: false to the options of your layer. Regards, Andreas. > > Thanks. > > > > Un saludo, > > > > ?????????????????????????????????????????????????????????????????????????????????? > > *David Alda Fern?ndez de Lezea* > > Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad > > > > *IKT* > > Granja Modelo s/n ? 01192 ? Arkaute (Araba) > > > ?????????????????????????????????????????????????????????????????????????????????? > Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 > ?????????????????????????????????????????????????????????????????????????????????? > email: dalda@ikt.es > web: www.ikt.es > > ?????????????????????????????????????????????????????????????????????????????????? > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 hekuran.doli at logisticsplus-ks.com Wed Nov 18 08:04:08 2009 From: hekuran.doli at logisticsplus-ks.com (hekuran S. Doli) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Automatic marker position update In-Reply-To: <11291873.81258545771364.JavaMail.SYSTEM@heka> Message-ID: <26128003.101258545821208.JavaMail.SYSTEM@heka> Hello Guys, I need a fresh pair of eyes, any bright idea would be much appreciated. I'm using two functions to achive the following: 1. to add markers from Text; and, 2. to remove and destroy those markers (in other words to reposition them). This way I'm loading periodically the markers position. But because the markers are deleted and then recreated again I find my markers flashing each time they are updated. So is there a way to update the markers position instead of removing and creating them? The whole idea is to get rid if marker flickering! the functions are as follow: function addUrl() { newl = new OpenLayers.Layer.Text( "Makinat", {location: "./Views/makinat.php"} ); map.addLayer(newl); } function del() { map.removeLayer(newl); newl.destroy() } I published an example of this at http://212.112.229.168/gpsVer2/ . -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/3744df3e/attachment.html From pedropbaracho at gmail.com Wed Nov 18 07:23:53 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] request and parse GML In-Reply-To: <1249848712@web.de> References: <1249848712@web.de> Message-ID: <5e3c00490911180423t6d858d5fk2a0568f03d09b820@mail.gmail.com> On Wed, Nov 18, 2009 at 7:32 AM, Barbara Fiederer wrote: > var DBsellayer = new OpenLayers.Layer.Vector("WFS", { > strategies: [new OpenLayers.Strategy.Fixed()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://myDomain.com:8090/geoserver/wfs", > featureType: "flurst", > data: filter_body, > featureNS: "http://myDomain.com/demo" > > }) > }); > I am not sure what is the key you need, but I am pretty sure is not data. Instead of "data: filter_body", try using "filter: filter_body" or "defaultFilter: filter_body". -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/55467d59/attachment.html From pedropbaracho at gmail.com Wed Nov 18 08:05:15 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Problem with WFS In-Reply-To: <1258529481684-4023822.post@n2.nabble.com> References: <1258456720258-4017977.post@n2.nabble.com> <5e3c00490911170504v5d199bf5jb9f948b4c9f7c429@mail.gmail.com> <1258529481684-4023822.post@n2.nabble.com> Message-ID: <5e3c00490911180505tbfe76aalaacdc2885af582c1@mail.gmail.com> you will need to include proj4js to transform between projections if you are not working with EPSG:4326 or EPSG:900913 See: http://trac.openlayers.org/wiki/Documentation/Dev/ for more info. Also. On your map options you have: projection: "ESPG:32639" it should be: projection: new OpenLayers.Projection("EPSG:32639") And I would recommend you also add projection to your layer options. It is not necessary in this case, because it seems your map and your wfs layer are in the same projection, but it is a good practice imho. wfs = new OpenLayers.Layer.WFS("WFS", "http://localhost:8080/geoserver/wfs", { typename : "naji:TBL_GIS_FEATURE_POINT", maxfeatures : 1000, format : OpenLayers.Format.GML.v2 }, {projection: new OpenLayers.Projection("EPSG:32639")}); On Wed, Nov 18, 2009 at 5:31 AM, maimaj wrote: > > > Thanks for your help in the first step. You've been right, the problem was > with projection. It's resolved but the WFS features do not show up. > > Before you mentioned that it might be a projection problem, I copied the > request string (obtained by getFullRequestString function of WFS class) in > the address bar and I received a GML2 file with some features. However, > that > request string doesn't include the BBOX parameter. > > I took your advice and fixed the SRS settings on the server and client. > When > I copy the request string (obtained from the log file of the Geoserver > which > has the BBOX parameter in it) to the address bar, the returned GML2 file > contains only those features which are in the BBOX. Before fixing the > projection problem, this file doesn't have any feature member (an almost > empty GML2 file). > > As I mentioned before, I cannot see the features on the screen yet. The SRS > settings on the server for this layer are as follows: > native srs: EPSG:32639 > declared srs: EPSG:32639 > srs handling: keep native > > And my script is the following: > > var map, layer, wfs; > function init() { > var bounds = new OpenLayers.Bounds(431834.067, 3887548.528, > 684784.466, > 4002241.703); > var options = { > maxExtent : bounds, > maxResolution : 859.9516562499998, > projection : "EPSG:32639" > }; > > map = new OpenLayers.Map('map', options); > > layer = new OpenLayers.Layer.WMS("OpenLayers WMS", > "http://localhost:8080/geoserver/wms", { > layers : 'naji:TBL_GIS_ARC' > }); > wfs = new OpenLayers.Layer.WFS("WFS", > "http://localhost:8080/geoserver/wfs", { > typename : > "naji:TBL_GIS_FEATURE_POINT", > maxfeatures : 1000, > format : OpenLayers.Format.GML.v2 > }); > wfs.isBaseLayer = true; > > map.addLayer(layer); > map.addLayer(wfs); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.zoomToExtent(bounds); > } > > Last point: I am using the "full" OL instance and the Geoserver is on the > same machine where the above script is hosted. > > I am completely stuck at this point, and would appreciate any help. > > Thanks, > Majid > > > > Pedro Baracho wrote: > > > > Could you please copy your code so I can take look? > > > > As I understand, WFS problems are usually related to: > > > > 1- Proxy and Cross Domain Requests > > 2- Projections > > 3- Incorrect OL instancing > > > > As you stated on your email, you are getting correct responses so my > guess > > is that you got a problem with Projections. > > > > On Tue, Nov 17, 2009 at 9:18 AM, maimaj wrote: > > > >> > >> Hi all, > >> > >> I have a WMS layer as my base layer and also a WFS layer on top of it. > >> OpenLayers renders the WMS layer perfectly, but the WFS layer doesn't > >> show > >> up. I am pretty sure that the OpenLayers is sending an appropriate > >> request > >> to the server (Geoserver) and the server is also responding properly, > >> since: > >> > >> 1. Geoserver is on the same server where my own application (which > hosts > >> the OpenLayers.js) is. So > >> there's no need for the proxy. > >> 2. Geoserver console logs show that it has received the request > >> properly. > >> 3. When I copy the the request string in the address bar of my web > >> browser, I get the gml2 file from the > >> server (I also tested the server with uDig as the client, and it > can > >> render the features properly through > >> WFS service provided by Geoserver). > >> > >> Could you please help me on this issue and tell me what might be the > >> cause > >> of this problem? I have copied the init function from the WFS example > >> available in the examples directory of OpenLayers 2.8 and added my own > >> WMS > >> layer, removed the proxy setting, and changed the WFS setting. > >> > >> Thanks in advance, > >> Majid > >> > >> -- > >> View this message in context: > >> http://n2.nabble.com/Problem-with-WFS-tp4017977p4017977.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-with-WFS-tp4017977p4023822.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/95576e20/attachment.html From jansen at terrestris.de Wed Nov 18 08:10:03 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer Message-ID: <4B03F22B.8030208@terrestris.de> Hi list, when the URL of an imagelayer is changed via the APIMethod setUrl, the image is flickering regardless of the browser cache or the transition effect. This behaviour can be seen e.g. here: http://www.webmapcenter.de/wetterradar/animation.html In that demo the URL of the imagelayer is changed every 500 ms and the flickering should be easy to spot (at least if you wait for roughly 20 seconds). Firebugs Net-tab shows that the images are being requested over and over. The flickering is only noticeable in Firefox (3.5 Win and Linux); Opera 10 and IE 8 work like a charm (they cache the varying images). The changing of the src of a pure with JavaScript does not show the flickering (as can be seen in the above link, too). I don't have results for other browsers. Can anybody help me identify the root of this flickering? I am unsure whether this Firefox bugreport is maybe relevant to this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that it is related to apache settings (Caching- or Expires-Headers) as the pure JS solution isn't flickering at all. Any help or advice on this issue would be great! Regards, Marc BTW.: If someone shows me a better alternative to build an animation of different Imagelayers, I would be happy as well :-) From pedropbaracho at gmail.com Wed Nov 18 08:18:31 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <4B03F22B.8030208@terrestris.de> References: <4B03F22B.8030208@terrestris.de> Message-ID: <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> For the record, I am currently using FF 3.5.5, Gecko/20091102 on Windows and I don't see any flickering in the link you posted. On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen wrote: > Hi list, > > when the URL of an imagelayer is changed via the APIMethod setUrl, the > image is flickering regardless of the browser cache or the transition > effect. This behaviour can be seen e.g. here: > > http://www.webmapcenter.de/wetterradar/animation.html > > In that demo the URL of the imagelayer is changed every 500 ms and the > flickering should be easy to spot (at least if you wait for roughly 20 > seconds). Firebugs Net-tab shows that the images are being requested > over and over. > > The flickering is only noticeable in Firefox (3.5 Win and Linux); Opera > 10 and IE 8 work like a charm (they cache the varying images). The > changing of the src of a pure with JavaScript does not show the > flickering (as can be seen in the above link, too). I don't have results > for other browsers. > > Can anybody help me identify the root of this flickering? I am unsure > whether this Firefox bugreport is maybe relevant to this issue: > https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that it is > related to apache settings (Caching- or Expires-Headers) as the pure JS > solution isn't flickering at all. > > Any help or advice on this issue would be great! > > Regards, > Marc > > BTW.: If someone shows me a better alternative to build an animation of > different Imagelayers, I would be happy as well :-) > > > _______________________________________________ > 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/20091118/872754d3/attachment.html From jansen at terrestris.de Wed Nov 18 08:38:00 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> Message-ID: <4B03F8B8.60504@terrestris.de> Hi Pedro, Thanks for your input... but it seems odd: in my FF (Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5) the upper OL-client is still flickering. Maybe some setting in Firefox I changed? Or a plugin? I am really puzzled. Can someone else reproduce the flickering? Regards, Marc Pedro Baracho wrote: > For the record, I am currently using FF 3.5.5, Gecko/20091102 on > Windows and I don't see any flickering in the link you posted. > > On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen > wrote: > > Hi list, > > when the URL of an imagelayer is changed via the APIMethod setUrl, the > image is flickering regardless of the browser cache or the transition > effect. This behaviour can be seen e.g. here: > > http://www.webmapcenter.de/wetterradar/animation.html > > In that demo the URL of the imagelayer is changed every 500 ms and the > flickering should be easy to spot (at least if you wait for roughly 20 > seconds). Firebugs Net-tab shows that the images are being requested > over and over. > > The flickering is only noticeable in Firefox (3.5 Win and Linux); > Opera > 10 and IE 8 work like a charm (they cache the varying images). The > changing of the src of a pure with JavaScript does not show the > flickering (as can be seen in the above link, too). I don't have > results > for other browsers. > > Can anybody help me identify the root of this flickering? I am unsure > whether this Firefox bugreport is maybe relevant to this issue: > https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that > it is > related to apache settings (Caching- or Expires-Headers) as the > pure JS > solution isn't flickering at all. > > Any help or advice on this issue would be great! > > Regards, > Marc > > BTW.: If someone shows me a better alternative to build an > animation of > different Imagelayers, I would be happy as well :-) > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From bartvde at osgis.nl Wed Nov 18 08:42:03 2009 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <4B03F8B8.60504@terrestris.de> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> <4B03F8B8.60504@terrestris.de> Message-ID: <742AF90E-8B13-4185-AB94-C3090375797C@osgis.nl> I can reproduce it in both Firefox 3.5.5 and Safari on Mac. Best regards, Bart On Nov 18, 2009, at 2:38 PM, Marc Jansen wrote: > Hi Pedro, > > Thanks for your input... but it seems odd: in my FF (Mozilla/5.0 (X11; > U; Linux i686; de; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) > Firefox/3.5.5) the upper OL-client is still flickering. Maybe some > setting in Firefox I changed? Or a plugin? > > I am really puzzled. > > Can someone else reproduce the flickering? > > Regards, > Marc > > Pedro Baracho wrote: >> For the record, I am currently using FF 3.5.5, Gecko/20091102 on >> Windows and I don't see any flickering in the link you posted. >> >> On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen > > wrote: >> >> Hi list, >> >> when the URL of an imagelayer is changed via the APIMethod setUrl, the >> image is flickering regardless of the browser cache or the transition >> effect. This behaviour can be seen e.g. here: >> >> http://www.webmapcenter.de/wetterradar/animation.html >> >> In that demo the URL of the imagelayer is changed every 500 ms and the >> flickering should be easy to spot (at least if you wait for roughly 20 >> seconds). Firebugs Net-tab shows that the images are being requested >> over and over. >> >> The flickering is only noticeable in Firefox (3.5 Win and Linux); >> Opera >> 10 and IE 8 work like a charm (they cache the varying images). The >> changing of the src of a pure with JavaScript does not show the >> flickering (as can be seen in the above link, too). I don't have >> results >> for other browsers. >> >> Can anybody help me identify the root of this flickering? I am unsure >> whether this Firefox bugreport is maybe relevant to this issue: >> https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that >> it is >> related to apache settings (Caching- or Expires-Headers) as the >> pure JS >> solution isn't flickering at all. >> >> Any help or advice on this issue would be great! >> >> Regards, >> Marc >> >> BTW.: If someone shows me a better alternative to build an >> animation of >> different Imagelayers, I would be happy as well :-) >> >> >> _______________________________________________ >> 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 kgeusebroek at xebia.com Wed Nov 18 08:51:18 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <4B03F8B8.60504@terrestris.de> References: <4B03F22B.8030208@terrestris.de><5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> <4B03F8B8.60504@terrestris.de> Message-ID: Hi Marc, I only see the flickering the first time the images are drawn, the second round no more flickering occurs I'm using FF on Vista: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Marc Jansen Sent: Wednesday, November 18, 2009 2:38 PM To: Pedro Baracho Cc: OpenLayers Users Subject: Re: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer Hi Pedro, Thanks for your input... but it seems odd: in my FF (Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5) the upper OL-client is still flickering. Maybe some setting in Firefox I changed? Or a plugin? I am really puzzled. Can someone else reproduce the flickering? Regards, Marc Pedro Baracho wrote: > For the record, I am currently using FF 3.5.5, Gecko/20091102 on > Windows and I don't see any flickering in the link you posted. > > On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen > wrote: > > Hi list, > > when the URL of an imagelayer is changed via the APIMethod setUrl, the > image is flickering regardless of the browser cache or the transition > effect. This behaviour can be seen e.g. here: > > http://www.webmapcenter.de/wetterradar/animation.html > > In that demo the URL of the imagelayer is changed every 500 ms and the > flickering should be easy to spot (at least if you wait for roughly 20 > seconds). Firebugs Net-tab shows that the images are being requested > over and over. > > The flickering is only noticeable in Firefox (3.5 Win and Linux); > Opera > 10 and IE 8 work like a charm (they cache the varying images). The > changing of the src of a pure with JavaScript does not show the > flickering (as can be seen in the above link, too). I don't have > results > for other browsers. > > Can anybody help me identify the root of this flickering? I am unsure > whether this Firefox bugreport is maybe relevant to this issue: > https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that > it is > related to apache settings (Caching- or Expires-Headers) as the > pure JS > solution isn't flickering at all. > > Any help or advice on this issue would be great! > > Regards, > Marc > > BTW.: If someone shows me a better alternative to build an > animation of > different Imagelayers, I would be happy as well :-) > > > _______________________________________________ > 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 pedropbaracho at gmail.com Wed Nov 18 08:58:10 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <742AF90E-8B13-4185-AB94-C3090375797C@osgis.nl> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> <4B03F8B8.60504@terrestris.de> <742AF90E-8B13-4185-AB94-C3090375797C@osgis.nl> Message-ID: <5e3c00490911180558s516acd1bja2c7a46f62912d23@mail.gmail.com> Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) I don't see the flickering at all. I used FF on Safe-mode too, without any complements loaded. I could reproduce it on another computer with a different version of FF, and same version of .NET Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729) Also, I used to have IE Tab addon on Firefox (which replaces Gecko for IE rendering engine). I am just pointing this out, because once I was developing a web application and had to parse XML, and my code worked on my version of firefox and didn't work on this other computer. At that time, I was using a node attribute called "wholeText" and had to change it to "data" to keep compatibility. On Wed, Nov 18, 2009 at 11:42 AM, Bart van den Eijnden wrote: > I can reproduce it in both Firefox 3.5.5 and Safari on Mac. > > Best regards, > Bart > > On Nov 18, 2009, at 2:38 PM, Marc Jansen wrote: > > > Hi Pedro, > > > > Thanks for your input... but it seems odd: in my FF (Mozilla/5.0 (X11; > > U; Linux i686; de; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) > > Firefox/3.5.5) the upper OL-client is still flickering. Maybe some > > setting in Firefox I changed? Or a plugin? > > > > I am really puzzled. > > > > Can someone else reproduce the flickering? > > > > Regards, > > Marc > > > > Pedro Baracho wrote: > >> For the record, I am currently using FF 3.5.5, Gecko/20091102 on > >> Windows and I don't see any flickering in the link you posted. > >> > >> On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen >> > wrote: > >> > >> Hi list, > >> > >> when the URL of an imagelayer is changed via the APIMethod setUrl, > the > >> image is flickering regardless of the browser cache or the transition > >> effect. This behaviour can be seen e.g. here: > >> > >> http://www.webmapcenter.de/wetterradar/animation.html > >> > >> In that demo the URL of the imagelayer is changed every 500 ms and > the > >> flickering should be easy to spot (at least if you wait for roughly > 20 > >> seconds). Firebugs Net-tab shows that the images are being requested > >> over and over. > >> > >> The flickering is only noticeable in Firefox (3.5 Win and Linux); > >> Opera > >> 10 and IE 8 work like a charm (they cache the varying images). The > >> changing of the src of a pure with JavaScript does not show the > >> flickering (as can be seen in the above link, too). I don't have > >> results > >> for other browsers. > >> > >> Can anybody help me identify the root of this flickering? I am unsure > >> whether this Firefox bugreport is maybe relevant to this issue: > >> https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that > >> it is > >> related to apache settings (Caching- or Expires-Headers) as the > >> pure JS > >> solution isn't flickering at all. > >> > >> Any help or advice on this issue would be great! > >> > >> Regards, > >> Marc > >> > >> BTW.: If someone shows me a better alternative to build an > >> animation of > >> different Imagelayers, I would be happy as well :-) > >> > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > >> > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/eb901218/attachment.html From jansen at terrestris.de Wed Nov 18 08:58:49 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> Message-ID: <4B03FD99.1080508@terrestris.de> Hey Pedro, Do you have the firebug plugin? Is it enabled for the link with the demo? Would you be so kind to test that as well... because right now I cannot reproduce the flickering on my machine! (How could that be?) This is *really* annoying, I can't get my head around the problem. Thanks and regards, Marc Pedro Baracho wrote: > For the record, I am currently using FF 3.5.5, Gecko/20091102 on > Windows and I don't see any flickering in the link you posted. > > On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen > wrote: > > Hi list, > > when the URL of an imagelayer is changed via the APIMethod setUrl, the > image is flickering regardless of the browser cache or the transition > effect. This behaviour can be seen e.g. here: > > http://www.webmapcenter.de/wetterradar/animation.html > > In that demo the URL of the imagelayer is changed every 500 ms and the > flickering should be easy to spot (at least if you wait for roughly 20 > seconds). Firebugs Net-tab shows that the images are being requested > over and over. > > The flickering is only noticeable in Firefox (3.5 Win and Linux); > Opera > 10 and IE 8 work like a charm (they cache the varying images). The > changing of the src of a pure with JavaScript does not show the > flickering (as can be seen in the above link, too). I don't have > results > for other browsers. > > Can anybody help me identify the root of this flickering? I am unsure > whether this Firefox bugreport is maybe relevant to this issue: > https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that > it is > related to apache settings (Caching- or Expires-Headers) as the > pure JS > solution isn't flickering at all. > > Any help or advice on this issue would be great! > > Regards, > Marc > > BTW.: If someone shows me a better alternative to build an > animation of > different Imagelayers, I would be happy as well :-) > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From pedropbaracho at gmail.com Wed Nov 18 08:59:16 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <5e3c00490911180558s516acd1bja2c7a46f62912d23@mail.gmail.com> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> <4B03F8B8.60504@terrestris.de> <742AF90E-8B13-4185-AB94-C3090375797C@osgis.nl> <5e3c00490911180558s516acd1bja2c7a46f62912d23@mail.gmail.com> Message-ID: <5e3c00490911180559l3ecba25aif2cc3f31e6676aed@mail.gmail.com> I am not sure if I made myself clear... I could reproduce the flickering on the other computer. On Wed, Nov 18, 2009 at 11:58 AM, Pedro Baracho wrote: > Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.1.5) Gecko/20091102 > Firefox/3.5.5 (.NET CLR 3.5.30729) > > I don't see the flickering at all. > > I used FF on Safe-mode too, without any complements loaded. > > I could reproduce it on another computer with a different version of FF, > and same version of .NET > Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.15) > Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729) > > Also, I used to have IE Tab addon on Firefox (which replaces Gecko for IE > rendering engine). I am just pointing this out, because once I was > developing a web application and had to parse XML, and my code worked on my > version of firefox and didn't work on this other computer. At that time, I > was using a node attribute called "wholeText" and had to change it to "data" > to keep compatibility. > > > On Wed, Nov 18, 2009 at 11:42 AM, Bart van den Eijnden wrote: > >> I can reproduce it in both Firefox 3.5.5 and Safari on Mac. >> >> Best regards, >> Bart >> >> On Nov 18, 2009, at 2:38 PM, Marc Jansen wrote: >> >> > Hi Pedro, >> > >> > Thanks for your input... but it seems odd: in my FF (Mozilla/5.0 (X11; >> > U; Linux i686; de; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) >> > Firefox/3.5.5) the upper OL-client is still flickering. Maybe some >> > setting in Firefox I changed? Or a plugin? >> > >> > I am really puzzled. >> > >> > Can someone else reproduce the flickering? >> > >> > Regards, >> > Marc >> > >> > Pedro Baracho wrote: >> >> For the record, I am currently using FF 3.5.5, Gecko/20091102 on >> >> Windows and I don't see any flickering in the link you posted. >> >> >> >> On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen > >> > wrote: >> >> >> >> Hi list, >> >> >> >> when the URL of an imagelayer is changed via the APIMethod setUrl, >> the >> >> image is flickering regardless of the browser cache or the >> transition >> >> effect. This behaviour can be seen e.g. here: >> >> >> >> http://www.webmapcenter.de/wetterradar/animation.html >> >> >> >> In that demo the URL of the imagelayer is changed every 500 ms and >> the >> >> flickering should be easy to spot (at least if you wait for roughly >> 20 >> >> seconds). Firebugs Net-tab shows that the images are being requested >> >> over and over. >> >> >> >> The flickering is only noticeable in Firefox (3.5 Win and Linux); >> >> Opera >> >> 10 and IE 8 work like a charm (they cache the varying images). The >> >> changing of the src of a pure with JavaScript does not show >> the >> >> flickering (as can be seen in the above link, too). I don't have >> >> results >> >> for other browsers. >> >> >> >> Can anybody help me identify the root of this flickering? I am >> unsure >> >> whether this Firefox bugreport is maybe relevant to this issue: >> >> https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that >> >> it is >> >> related to apache settings (Caching- or Expires-Headers) as the >> >> pure JS >> >> solution isn't flickering at all. >> >> >> >> Any help or advice on this issue would be great! >> >> >> >> Regards, >> >> Marc >> >> >> >> BTW.: If someone shows me a better alternative to build an >> >> animation of >> >> different Imagelayers, I would be happy as well :-) >> >> >> >> >> >> _______________________________________________ >> >> Users mailing list >> >> Users@openlayers.org >> >> http://openlayers.org/mailman/listinfo/users >> >> >> >> >> > >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/5604e15f/attachment.html From m.sirin07 at googlemail.com Wed Nov 18 09:00:00 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Marker disappears in high zoom levels Message-ID: <55744b1c0911180600x59b31eaehae942f865ec817cf@mail.gmail.com> Hi everybody, we stuck on some problem. We tried to move a marker as shown in the example below but after several zoom-in steps the marker suddenly disappears and reassigns by zooming out. Here the entire code. We merged the two examples marker-shadow.html and draw-feature.html to get there. Does anyone have an idea? OpenLayers: Vector Graphics with Shadows

Marker Shadows using Background Graphics/Z-Indexes

This example shows off marker shadows using background graphics and z-indexes. Move the features around to show the shadows' interaction.


Regards, mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/6b86391e/attachment.html From jansen at terrestris.de Wed Nov 18 09:00:18 2009 From: jansen at terrestris.de (Marc Jansen) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <742AF90E-8B13-4185-AB94-C3090375797C@osgis.nl> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> <4B03F8B8.60504@terrestris.de> <742AF90E-8B13-4185-AB94-C3090375797C@osgis.nl> Message-ID: <4B03FDF2.2030808@terrestris.de> Thanks Bart. At least I don't imagine the flickr :-) Crazy enough: I cannot reproduce the flickering on my machine right now. And I did not change anything. Regards, Marc Bart van den Eijnden wrote: > I can reproduce it in both Firefox 3.5.5 and Safari on Mac. > > Best regards, > Bart > > On Nov 18, 2009, at 2:38 PM, Marc Jansen wrote: > > >> Hi Pedro, >> >> Thanks for your input... but it seems odd: in my FF (Mozilla/5.0 (X11; >> U; Linux i686; de; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) >> Firefox/3.5.5) the upper OL-client is still flickering. Maybe some >> setting in Firefox I changed? Or a plugin? >> >> I am really puzzled. >> >> Can someone else reproduce the flickering? >> >> Regards, >> Marc >> >> Pedro Baracho wrote: >> >>> For the record, I am currently using FF 3.5.5, Gecko/20091102 on >>> Windows and I don't see any flickering in the link you posted. >>> >>> On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen >> > wrote: >>> >>> Hi list, >>> >>> when the URL of an imagelayer is changed via the APIMethod setUrl, the >>> image is flickering regardless of the browser cache or the transition >>> effect. This behaviour can be seen e.g. here: >>> >>> http://www.webmapcenter.de/wetterradar/animation.html >>> >>> In that demo the URL of the imagelayer is changed every 500 ms and the >>> flickering should be easy to spot (at least if you wait for roughly 20 >>> seconds). Firebugs Net-tab shows that the images are being requested >>> over and over. >>> >>> The flickering is only noticeable in Firefox (3.5 Win and Linux); >>> Opera >>> 10 and IE 8 work like a charm (they cache the varying images). The >>> changing of the src of a pure with JavaScript does not show the >>> flickering (as can be seen in the above link, too). I don't have >>> results >>> for other browsers. >>> >>> Can anybody help me identify the root of this flickering? I am unsure >>> whether this Firefox bugreport is maybe relevant to this issue: >>> https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that >>> it is >>> related to apache settings (Caching- or Expires-Headers) as the >>> pure JS >>> solution isn't flickering at all. >>> >>> Any help or advice on this issue would be great! >>> >>> Regards, >>> Marc >>> >>> BTW.: If someone shows me a better alternative to build an >>> animation of >>> different Imagelayers, I would be happy as well :-) >>> >>> >>> _______________________________________________ >>> 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 pedropbaracho at gmail.com Wed Nov 18 09:00:13 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <4B03FD99.1080508@terrestris.de> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> <4B03FD99.1080508@terrestris.de> Message-ID: <5e3c00490911180600y646b7d2j2967f582f6ba66c6@mail.gmail.com> Firebug on, and no flickering. On Wed, Nov 18, 2009 at 11:58 AM, Marc Jansen wrote: > Hey Pedro, > > Do you have the firebug plugin? Is it enabled for the link with the demo? > Would you be so kind to test that as well... because right now I cannot > reproduce the flickering on my machine! (How could that be?) > > This is *really* annoying, I can't get my head around the problem. > > Thanks and regards, > Marc > > > > Pedro Baracho wrote: > >> For the record, I am currently using FF 3.5.5, Gecko/20091102 on Windows >> and I don't see any flickering in the link you posted. >> >> On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen > jansen@terrestris.de>> wrote: >> >> Hi list, >> >> when the URL of an imagelayer is changed via the APIMethod setUrl, the >> image is flickering regardless of the browser cache or the transition >> effect. This behaviour can be seen e.g. here: >> >> http://www.webmapcenter.de/wetterradar/animation.html >> >> In that demo the URL of the imagelayer is changed every 500 ms and the >> flickering should be easy to spot (at least if you wait for roughly 20 >> seconds). Firebugs Net-tab shows that the images are being requested >> over and over. >> >> The flickering is only noticeable in Firefox (3.5 Win and Linux); >> Opera >> 10 and IE 8 work like a charm (they cache the varying images). The >> changing of the src of a pure with JavaScript does not show the >> flickering (as can be seen in the above link, too). I don't have >> results >> for other browsers. >> >> Can anybody help me identify the root of this flickering? I am unsure >> whether this Firefox bugreport is maybe relevant to this issue: >> https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that >> it is >> related to apache settings (Caching- or Expires-Headers) as the >> pure JS >> solution isn't flickering at all. >> >> Any help or advice on this issue would be great! >> >> Regards, >> Marc >> >> BTW.: If someone shows me a better alternative to build an >> animation of >> different Imagelayers, I would be happy as well :-) >> >> >> _______________________________________________ >> 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/20091118/efc7623d/attachment.html From pedropbaracho at gmail.com Wed Nov 18 09:01:19 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <2a37f67a0911180530jb4397b9jfa4eb8a57a72966a@mail.gmail.com> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> <2a37f67a0911180530jb4397b9jfa4eb8a57a72966a@mail.gmail.com> Message-ID: <5e3c00490911180601kdab20dev702b7dc6f3816e72@mail.gmail.com> Also for the record ---------- Forwarded message ---------- From: Pavel Iacovlev Date: Wed, Nov 18, 2009 at 11:30 AM Subject: Re: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer To: Pedro Baracho Using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 I see the flickering On Wed, Nov 18, 2009 at 3:18 PM, Pedro Baracho wrote: > For the record, I am currently using FF 3.5.5, Gecko/20091102 on Windows and > I don't see any flickering in the link you posted. > > On Wed, Nov 18, 2009 at 11:10 AM, Marc Jansen wrote: >> >> Hi list, >> >> when the URL of an imagelayer is changed via the APIMethod setUrl, the >> image is flickering regardless of the browser cache or the transition >> effect. This behaviour can be seen e.g. here: >> >> http://www.webmapcenter.de/wetterradar/animation.html >> >> In that demo the URL of the imagelayer is changed every 500 ms and the >> flickering should be easy to spot (at least if you wait for roughly 20 >> seconds). Firebugs Net-tab shows that the images are being requested >> over and over. >> >> The flickering is only noticeable in Firefox (3.5 Win and Linux); Opera >> 10 and IE 8 work like a charm (they cache the varying images). The >> changing of the src of a pure with JavaScript does not show the >> flickering (as can be seen in the above link, too). I don't have results >> for other browsers. >> >> Can anybody help me identify the root of this flickering? I am unsure >> whether this Firefox bugreport is maybe relevant to this issue: >> https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that it is >> related to apache settings (Caching- or Expires-Headers) as the pure JS >> solution isn't flickering at all. >> >> Any help or advice on this issue would be great! >> >> Regards, >> Marc >> >> BTW.: If someone shows me a better alternative to build an animation of >> different Imagelayers, I would be happy as well :-) >> >> >> _______________________________________________ >> 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://iap.md, The future is open -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/6011f58d/attachment.html From pedropbaracho at gmail.com Wed Nov 18 09:08:24 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] GetFeatures , features property... In-Reply-To: <1258528701110-4023776.post@n2.nabble.com> References: <1258528701110-4023776.post@n2.nabble.com> Message-ID: <5e3c00490911180608u2f40eecfr4a68dbd83ffa0d02@mail.gmail.com> I think features is a property of the event featureselected. what you should do is: map.someevent.somelayer. > > events.register("featureselected", this, > function(e) { > map.someobject = e.feature; > console.log(map.someobject); > } or map.someobject.push(e.feature) in case of an array. On Wed, Nov 18, 2009 at 5:18 AM, Dragan Podvezanec < dragan.podvezanec@gmail.com> wrote: > > Hi all. > > If I understood documentation right, "features" property in GetFeature > Control should fill an object with selected features. I don't know why, but > I get nothing: > > map.someobject = {}; > > map.someevent.somelayer = new OpenLayers.Control.GetFeature({ > protocol: > OpenLayers.Protocol.WFS.fromWMSLayer(map.somelayer,{ > geometryName: > geometry, > srsName: > "EPSG:900913" > }), > hover: false, > features: > map.someobject > }); > > > map.someevent.somelayer.events.register("featureselected", this, > function(e) { > console.log(e.feature); > console.log(map.someobject); > }); > > When I click on layer, I see in console log e.feature, and it's ok, but > map.someobject is an empty object. What am I doing wrong here ? > -- > View this message in context: > http://n2.nabble.com/GetFeatures-features-property-tp4023776p4023776.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/88b94418/attachment.html From pedropbaracho at gmail.com Wed Nov 18 09:16:16 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] GetFeatures , features property... In-Reply-To: <5e3c00490911180608u2f40eecfr4a68dbd83ffa0d02@mail.gmail.com> References: <1258528701110-4023776.post@n2.nabble.com> <5e3c00490911180608u2f40eecfr4a68dbd83ffa0d02@mail.gmail.com> Message-ID: <5e3c00490911180616t3b41cedbw2b1fed77ae131e48@mail.gmail.com> Just to correct my previous post, features on OpenLayers.Control.GetFeature is a JS Object with the currently selected features. feature on event "featureselected" is the selected feature that triggered the event. The GetFeature control will set the property features with the features selected during runtime. As I understand it, you should only preset it if you want some features preselected. I think you should do this: control = new OpenLayers.Control.GetFeature(...); map.addControl(control); and replace what you are calling "map.someobject" by "control.features". Is it clear? Or did I mess up? hehe :P Hope you understand... Cheers, Pedro. On Wed, Nov 18, 2009 at 12:08 PM, Pedro Baracho wrote: > I think features is a property of the event featureselected. > > what you should do is: > map.someevent.somelayer. >> >> events.register("featureselected", this, >> function(e) { >> map.someobject = e.feature; >> >> console.log(map.someobject); >> } > > > or map.someobject.push(e.feature) in case of an array. > > > On Wed, Nov 18, 2009 at 5:18 AM, Dragan Podvezanec < > dragan.podvezanec@gmail.com> wrote: > >> >> Hi all. >> >> If I understood documentation right, "features" property in GetFeature >> Control should fill an object with selected features. I don't know why, >> but >> I get nothing: >> >> map.someobject = {}; >> >> map.someevent.somelayer = new OpenLayers.Control.GetFeature({ >> protocol: >> OpenLayers.Protocol.WFS.fromWMSLayer(map.somelayer,{ >> geometryName: >> geometry, >> srsName: >> "EPSG:900913" >> }), >> hover: false, >> features: >> map.someobject >> }); >> >> >> map.someevent.somelayer.events.register("featureselected", this, >> function(e) { >> console.log(e.feature); >> >> console.log(map.someobject); >> }); >> >> When I click on layer, I see in console log e.feature, and it's ok, but >> map.someobject is an empty object. What am I doing wrong here ? >> -- >> View this message in context: >> http://n2.nabble.com/GetFeatures-features-property-tp4023776p4023776.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/939598ed/attachment.html From wayne at platoscave.net Wed Nov 18 09:25:07 2009 From: wayne at platoscave.net (Wayne Dyck) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <4B03F8B8.60504@terrestris.de> References: <4B03F22B.8030208@terrestris.de> <5e3c00490911180518k137596c7o35b08fe772c41f44@mail.gmail.com> <4B03F8B8.60504@terrestris.de> Message-ID: <4B0403C3.9080000@platoscave.net> Marc, I am on a Ubuntu 8.10 machine with Firefox 3.0.15 and the top map definitely flickers here. Wayne From carlshe at 163.com Wed Nov 18 09:33:12 2009 From: carlshe at 163.com (carls) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Zoom in time? Message-ID: <1258554792352-4025767.post@n2.nabble.com> Now while zooming the map, it seems a request is sent to servers, and the map will become blank and will be waiting for the image returned. Of course we can display a loading panel to prompt user, but it will be better to zoom current map image roughtly to expected scale to replace the blank map. Is there such a function switcher already within OL to zoom OL map? Thanks! ----- Regards, Carl SHE -- View this message in context: http://n2.nabble.com/Zoom-in-time-tp4025767p4025767.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jgolinowski at codematix.de Wed Nov 18 09:28:28 2009 From: jgolinowski at codematix.de (Jana Golinowski) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing the URL of an image layer In-Reply-To: <4B03F22B.8030208@terrestris.de> References: <4B03F22B.8030208@terrestris.de> Message-ID: <4B04048C.6080009@codematix.de> I don't use FF 3.5 yet but 3.0 and I do see that flickering also. I just tested it on GNU/Linux and Windows XP. GNU/Linux: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.14) Gecko/2009091010 Iceweasel/3.0.14 (Debian-3.0.14-1) Windows XP: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15 Jana. From bartvde at osgis.nl Wed Nov 18 09:34:49 2009 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Zoom in time? In-Reply-To: <1258554792352-4025767.post@n2.nabble.com> References: <1258554792352-4025767.post@n2.nabble.com> Message-ID: Use transitionEffect: 'resize' as an option on the Layer. Best regards, Bart On Nov 18, 2009, at 3:33 PM, carls wrote: > > Now while zooming the map, it seems a request is sent to servers, and the map > will become blank and will be waiting for the image returned. Of course we > can display a loading panel to prompt user, but it will be better to zoom > current map image roughtly to expected scale to replace the blank map. > Is there such a function switcher already within OL to zoom OL map? > Thanks! > > ----- > > Regards, Carl SHE > -- > View this message in context: http://n2.nabble.com/Zoom-in-time-tp4025767p4025767.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 Wed Nov 18 10:21:45 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] WFS GetFeature Message-ID: <1258557705965-4026139.post@n2.nabble.com> Hello, I have a openlayers map with a wms showing some points. Furthermore a wms getfeatureinfo returns some infos when the user is clicking on a point on the map. Thereby the wms getfeatureinfo returns a "application/vnd.ogc.gml". Afterwards i parse my gml and the user gets the parsed info. What I want to add now is, that the user only getting some info, when certain points are clicked (for example: only when point 2 or 3 is clicked). I think this is only possible when i replace my wms getfeatureinfo with a wfs getfeature + a filter. Am I right with this thought? The wfs should also return a gml what I can parse then. I hope someone can help me (maybe with an easy example of a wfs getfeature request + filter) because I have not so much experience with openlayers. Thanks for your answers. Regards stash -- View this message in context: http://n2.nabble.com/WFS-GetFeature-tp4026139p4026139.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jakob.voss at gbv.de Wed Nov 18 10:50:05 2009 From: jakob.voss at gbv.de (Jakob Voss) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Ho to zoom to the extents of a layer Message-ID: <4B0417AD.2090101@gbv.de> Hi, I want to show a KML file as overlay on a map. Unfortunately all examples I found have hard coded coordinates for the extend which part of the map to show. My KML file is generated dynamically so I want to zoom the Map to the extent of the layer. The KML file is loaded and shown: kml = new OpenLayers.Layer.GML("KML", "mykml.kml", { format: OpenLayers.Format.KML, formatOptions: { extractAttributes: true, extractStyles: false }, projection: map.displayProjection }); map.addLayer(kml); But when i later try to zoom to the objects included in the KML, the map does not move as expected (yes, the KML has been loaded when I call this): map.zoomToExtent( kml.getExtent() ); The getExtent() method of OpenLayers.Layer does only return the current viewport but not the whole extend. The following does not works neither: map.zoomToExtent( kml.maxExtent ); I think the problem is that the KML layer may lie outside of the current viewport and so it does not get loaded (?) I just want to get the smallest bounding box that contains all coordinates in the KML file. How can you do this? Thanks! Jakob -- Jakob Vo? , skype: nichtich Verbundzentrale des GBV (VZG) / Common Library Network Platz der Goettinger Sieben 1, 37073 G?ttingen, Germany +49 (0)551 39-10242, http://www.gbv.de From john.pulles at geodan.nl Wed Nov 18 11:00:24 2009 From: john.pulles at geodan.nl (John Pulles) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] how to initialize 'WFS.fromWMSLayer' with features Message-ID: <4B041A18.1090301@geodan.nl> Hi list, Like the example at http://openlayers.org/dev/examples/getfeature-wfs.html, I am using the OpenLayers.Protocol.WFS.fromWSMLayer convenience function to select features from a wms layer and collect the values of a certain attribute. When opening the same map a next time, I would like to show which features were selected. Now I'm looking for a way to add features to the wfs layer based on some attribute values, what would be the easiest way? Thanks, John From crschmidt at metacarta.com Wed Nov 18 11:16:30 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Ho to zoom to the extents of a layer In-Reply-To: <4B0417AD.2090101@gbv.de> References: <4B0417AD.2090101@gbv.de> Message-ID: <20091118161629.GC10952@metacarta.com> On Wed, Nov 18, 2009 at 04:50:05PM +0100, Jakob Voss wrote: > map.zoomToExtent( kml.getExtent() ); map.zoomToExtent( kml.getDataExtent() ); http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Vector-js.html#OpenLayers.Layer.Vector.getDataExtent > The getExtent() method of OpenLayers.Layer does only return the current > viewport but not the whole extend. The following does not works neither: > > map.zoomToExtent( kml.maxExtent ); > > I think the problem is that the KML layer may lie outside of the current > viewport and so it does not get loaded (?) I just want to get the > smallest bounding box that contains all coordinates in the KML file. How > can you do this? > > Thanks! > Jakob > > -- > Jakob Vo? , skype: nichtich > Verbundzentrale des GBV (VZG) / Common Library Network > Platz der Goettinger Sieben 1, 37073 G?ttingen, Germany > +49 (0)551 39-10242, http://www.gbv.de > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From richard.wiesinger at gmail.com Wed Nov 18 12:54:35 2009 From: richard.wiesinger at gmail.com (Richard Wiesinger) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Layer.redraw() - strange behavior Message-ID: Hi list, i extended the OpenLayers.Layer.OSM class to provide my own layer and overrid the getURL(bounds) function as I load the osm tiles from my own server. The strategy is as follows: When getURL is called on the browser an ajax request is called to my osm server and the necessary tiles are loaded and stored to the webserver. This works pretty well and I can see tiles lying around on my webserver. But of course this takes some time and is too late for openlayers to render this specific tile in the scope of the getURL method. So there are no tiles visible in the browser which is logical. I now tried to call layername.redraw() in firebug after all tiles where loaded. I see in firebug that all the necessary tiles are again requested within the getURL function. The URLs are alright and the tiles are at the right place. But again nothing is visible in the browser! But now comes the strange thing. When I copy one url string of a tile from the firebug console and open it in a new browser window, the tile (.png) is shown in the browser! And even more strange (at least for me) when I *now* call layername.redraw() this tile is shown in the map. But only this tile and not the others. When I open another tile in a new tab and call redraw() again two tiles are visible and so on. It seems that tiles are visible only when they are requested before. Somebody has an idea? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/d10ca5a6/attachment.html From dtoto at pdsg.com Wed Nov 18 13:20:17 2009 From: dtoto at pdsg.com (Drew Toto) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Image flickering in Firefox when changing theURL of an image layer References: <4B03F22B.8030208@terrestris.de> Message-ID: <81E943E672D0C44EA9BFDCCC34B3B1C1D709E3@cfmail.corp.crossflo.com> FYI The top flickers for me with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1. Turning Firebug plugin on/off has no effect, and, when I look at the Firebug Net tab, the images all return 304 status and are only re-requested when I mouseover Firebug (I don't know what that's all about). -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Marc Jansen Sent: Wednesday, November 18, 2009 5:10 AM To: OpenLayers Users Subject: [OpenLayers-Users] Image flickering in Firefox when changing theURL of an image layer Hi list, when the URL of an imagelayer is changed via the APIMethod setUrl, the image is flickering regardless of the browser cache or the transition effect. This behaviour can be seen e.g. here: http://www.webmapcenter.de/wetterradar/animation.html In that demo the URL of the imagelayer is changed every 500 ms and the flickering should be easy to spot (at least if you wait for roughly 20 seconds). Firebugs Net-tab shows that the images are being requested over and over. The flickering is only noticeable in Firefox (3.5 Win and Linux); Opera 10 and IE 8 work like a charm (they cache the varying images). The changing of the src of a pure with JavaScript does not show the flickering (as can be seen in the above link, too). I don't have results for other browsers. Can anybody help me identify the root of this flickering? I am unsure whether this Firefox bugreport is maybe relevant to this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=492052. I doubt that it is related to apache settings (Caching- or Expires-Headers) as the pure JS solution isn't flickering at all. Any help or advice on this issue would be great! Regards, Marc BTW.: If someone shows me a better alternative to build an animation of different Imagelayers, I would be happy as well :-) _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From dragan.podvezanec at gmail.com Wed Nov 18 15:56:34 2009 From: dragan.podvezanec at gmail.com (Dragan Podvezanec) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] WFS.fromWMSLayer selection question Message-ID: <1258577794686-4028249.post@n2.nabble.com> Hi all. I have 10 WMS layers (polygons) which do not overlap. I'm trying to panZoom to the center of the polygon which user clicked. I registered "featureselected" events on all WMS layers, like this: for(var i in map.layers[layer]) { mapa.events.layers[layer] = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS.fromWMSLayer(map.layers[layer],{ geometryName: 'geometry', srsName: "EPSG:900913" }), hover: false }); mapa.events.layers[layer][i].events.register("featureselected", this, function(e) { var objekt = e.feature; var bbox = (objekt.geometry.bounds); var newcenter = (bbox.getCenterLonLat()); mapa.panTo(newcenter); } And this works. Map gets centered to the object that I have clicked. But as I see, there are 10 post request to Geoserver, featureselected is triggered on every WMS layer. Is this not an overhead? Why is event featureselected triggered, even I have clicked outside a layer? 1. Is this normal behavior? 2. What would happen if I have 100 layers? 3. Should I use different approach? (To make invisible WFS layers on top of WMS layers, and then register featureselected to WFS layers?) -- View this message in context: http://n2.nabble.com/WFS-fromWMSLayer-selection-question-tp4028249p4028249.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Nov 18 16:36:39 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] WFS.fromWMSLayer selection question In-Reply-To: <1258577794686-4028249.post@n2.nabble.com> References: <1258577794686-4028249.post@n2.nabble.com> Message-ID: <20091118213639.GE10952@metacarta.com> On Wed, Nov 18, 2009 at 12:56:34PM -0800, Dragan Podvezanec wrote: > > Hi all. > > I have 10 WMS layers (polygons) which do not overlap. I'm trying to panZoom > to the center of the polygon which user clicked. I registered > "featureselected" events on all WMS layers, like this: > > for(var i in map.layers[layer]) { > mapa.events.layers[layer] = new OpenLayers.Control.GetFeature({ > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(map.layers[layer],{ > geometryName: 'geometry', > srsName: "EPSG:900913" > }), > hover: false > }); > > mapa.events.layers[layer][i].events.register("featureselected", this, > function(e) { > > var objekt = e.feature; > var bbox = (objekt.geometry.bounds); > var newcenter = (bbox.getCenterLonLat()); > mapa.panTo(newcenter); > } > > And this works. Map gets centered to the object that I have clicked. But as > I see, there are 10 post request to Geoserver, featureselected is triggered > on every WMS layer. Is this not an overhead? Why is event featureselected > triggered, even I have clicked outside a layer? The featureselected event *isn't* triggered -- that event just centers the map. The event that requests the datai s the GetFeature control. The GetFeature Control has no way of knowing that there is a feature under your cursor without asking the server. What you have downloaded is just images -- OL knows nothing about the geometries. As such, it has to ask the server for each of the layers whether there is an intersecting feature. > 1. Is this normal behavior? > 2. What would happen if I have 100 layers? Probably what you would expect. > 3. Should I use different approach? (To make invisible WFS layers on top of > WMS layers, and then register featureselected to WFS layers?) You could, assuming 'invisible' layers actually get select events (I don't know if they do.) > -- > View this message in context: http://n2.nabble.com/WFS-fromWMSLayer-selection-question-tp4028249p4028249.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 kgeusebroek at xebia.com Wed Nov 18 17:00:58 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers 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/20091118/571921d8/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/20091118/571921d8/attachment.png From ricardorodot02 at gmail.com Wed Nov 18 18:27:56 2009 From: ricardorodot02 at gmail.com (ricardo rodriguez) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] help(coordinates plane, forms) Message-ID: <3fe9e6d70911181527n2c87675fo4f580bba7b3c82b0@mail.gmail.com> english: hi can anyone explain me how I can work with flat coordinates, since most or all of my files are in these coordinates, or as a viewer or set up my page so you can see and directly manipulate this file type. Another concern I have is on how to put the viewer linked forms of open layers. thanks for any help espa?ol: hola alguno me puede explicar como puedo trabajar con coordenadas planas, ya que la mayoria o todos mis archivos estan en estas coordenadas, o como configuro mi visor o pagina para que pueda ver y manipular directamente este tipos de archivos. otra inquietud que tengo es sobre la forma de poner formularios vinculados al visor de open layers. gracias por cualquier ayuda Estudiante de ultimo semestre de ING. TOPOGRAFICA -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091118/1152c125/attachment.html From ag at ads.aero Wed Nov 18 18:51:52 2009 From: ag at ads.aero (adsaero) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Possible to change feature style before adding feature collection? Message-ID: <1258588312800-4029160.post@n2.nabble.com> I've got a collection of features (FeatureCollection) returned from a server, and I'd like to change the style of, say, the first feature in the collection to have "stroke" set to true... but I'd like the rest of the features to use the default style(s). Can this be done? If so, what's the best way to do it? Thanks in advance! -- View this message in context: http://n2.nabble.com/Possible-to-change-feature-style-before-adding-feature-collection-tp4029160p4029160.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From carlshe at 163.com Wed Nov 18 20:09:11 2009 From: carlshe at 163.com (carls) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Zoom in time? In-Reply-To: References: <1258554792352-4025767.post@n2.nabble.com> Message-ID: <1258592951253-4029435.post@n2.nabble.com> Thank you! it's great! bartvde wrote: > > Use transitionEffect: 'resize' as an option on the Layer. > > Best regards, > Bart > > On Nov 18, 2009, at 3:33 PM, carls wrote: > >> >> Now while zooming the map, it seems a request is sent to servers, and the >> map >> will become blank and will be waiting for the image returned. Of course >> we >> can display a loading panel to prompt user, but it will be better to zoom >> current map image roughtly to expected scale to replace the blank map. >> Is there such a function switcher already within OL to zoom OL map? >> Thanks! >> >> ----- >> >> Regards, Carl SHE >> -- >> View this message in context: >> http://n2.nabble.com/Zoom-in-time-tp4025767p4025767.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 > > ----- Regards, Carl SHE -- View this message in context: http://n2.nabble.com/Zoom-in-time-tp4025767p4029435.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Wed Nov 18 20:20:15 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Possible to change feature style before adding feature collection? In-Reply-To: <1258588312800-4029160.post@n2.nabble.com> References: <1258588312800-4029160.post@n2.nabble.com> Message-ID: <4B049D4F.1070609@lisasoft.com> Hi, On 19/11/09 10:51, adsaero wrote: > I've got a collection of features (FeatureCollection) returned from a server, > and I'd like to change the style of, say, the first feature in the > collection to have "stroke" set to true... but I'd like the rest of the > features to use the default style(s). > > Can this be done? If so, what's the best way to do it? > You can listen to the 'beforefeaturesadded' event [1] and manipulate the features you like before they get added to the layer. [1] http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Vector-js.html#OpenLayers.Layer.Vector.EVENT_TYPES Regards, Roald -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. From brad at cubewerx.com.au Wed Nov 18 21:54:10 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] connection to a google-like tiled service Message-ID: <010f01ca68c3$92e39420$b8aabc60$@com.au> Guys, I have reached a point where I really need help. I am trying to connect to a published web service that is configured like GoogleMaps. They have given me instruction of the url philosophy and have explained that the Urls will look very similar to Google's. Instructions were... http://www.nearmap.com/maps/hl=en &x=53843&y=38889&z=16&nml=Vert&s=Ga * The x, y, and z are the image location and zoom level, with the same values used by Google or Bing (ie, standard slippymap tile co-ordinates). * The nml parameter is the NearMap layer, and can be one of: o Vert for PhotoMap 'Vertical' images o N, S, E or W for MultiView images looking North, South, East or West o Map for NearMap StreetMap images o Dem for terrain images * The hl is the Host Language; only English is currently supported * The s parameter is ignored; it can be used as with Google Maps, to work around issues in FireFox's caching The equivalent Google Maps URL would be: http://khm0.google.com/kh/v=48 &x=53843&y=38889&z=16&s=Ga NearMap also support this format; just change the hostname: http://www.nearmap.com/kh/v=48 &x=53843&y=38889&z=16&s=Ga In fact, NearMap have a set of hostnames that match Google's, so the only change needed is to the domain: http://khm0.nearmap.com/kh/v=48 &x=53843&y=38889&z=16&s=Ga These URLs will get the latest NearMap images. To give a specific date, add the nmd parameter, with the date in YYYYMMDD format. For example: http://khm0.nearmap.com/kh/v=48 &x=53843&y=38889&z=16&s=Ga&nmd=20091031 http://khm0.nearmap.com/kh/v=48 &x=53843&y=38889&z=16&s=Ga&nmd=20090926 You should be able to replace google with nearmap in most Google image URLs and get an equivalent image. However, there are some differences: * The recently introduced Google lyrs parameter isn't yet supported. * NearMap doesn't have a layer with terrain data and maps combined, like Google. * The NearMap servers will deduce the type of image from the URL path (/kh or /mt), the Google-compatible v parameter (if supplied) or the nml parameter. The nml parameter overrides the others. To open the NearMap map page with a given location shown, use a URL like: http://www.nearmap.com/?ll=-31.962103,115.832505 &z=15&t=h The same URL can be used with Google: http://maps.google.com/maps?ll=-31.962103,115.832505 &z=15&t=h So I looked in OL lists etc and found the page about TMS. http://trac.openlayers.org/wiki/UsingCustomTiles But I have never done this before and I managed to get the following test app going but with no luck on the nearmaps data layer. http://demos.numaps.com.au/nearmap_test.html It seems to be navigating the tiles correctly but they are all broken (pink). I must be doing something very wrong because if you copy the location (firebug) of the Url into browser it works. http://www.nearmap.com/?x=69 &y=186&z=10&hl=en&nml=Vert&s=Galileo But I also do not really understand why as this is getting a whole map area of tiles and not a single tile? Can anyone who has done this before have a quick look at my code for this example. Its probably very simple I have tried everything I can think of with no luck. Cheers, Brad.. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091119/49035c93/attachment.html From ag at ads.aero Wed Nov 18 22:27:02 2009 From: ag at ads.aero (adsaero) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Possible to change feature style before adding feature collection? In-Reply-To: <4B049D4F.1070609@lisasoft.com> References: <1258588312800-4029160.post@n2.nabble.com> <4B049D4F.1070609@lisasoft.com> Message-ID: <1258601222061-4029891.post@n2.nabble.com> When I try that, it seems the feature doesn't render at all. I also tried setting the style in the feature object before adding the feature, but I get the same result. Some code snippets: tracks_style = new OpenLayers.Style({ label: "test", strokeColor: "#FFFFFF", stroke: true, pointRadius: 2 }); track_layer = new OpenLayers.Layer.Vector("Tracks", { styleMap: tracks_stylemap }); map.addLayer(track_layer); track_layer.events.register("beforefeaturesadded", track_layer, function (o) { alert("boo!"); o.features[0].style = tracks_style; }); This basically causes that first feature not to render, although the second feature renders fine (there are two features in the feature array) This also fails, with the same result: testfeatures = geojson_format.read(results); testfeatures[0].style = tracks_style; track_layer.addFeatures(poofeatures); I'm stumped :) Roald de Wit-2 wrote: > > Hi, > > On 19/11/09 10:51, adsaero wrote: >> I've got a collection of features (FeatureCollection) returned from a >> server, >> and I'd like to change the style of, say, the first feature in the >> collection to have "stroke" set to true... but I'd like the rest of the >> features to use the default style(s). >> >> Can this be done? If so, what's the best way to do it? >> > You can listen to the 'beforefeaturesadded' event [1] and manipulate the > features you like before they get added to the layer. > > [1] > http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Vector-js.html#OpenLayers.Layer.Vector.EVENT_TYPES > > Regards, Roald > > -- > Roald de Wit > Software Engineer > roald.dewit@lisasoft.com > > Commercial Support for Open Source GIS Software > http://lisasoft.com/LISAsoft/SupportedProducts/ > > > > The contents of this email are confidential and may be subject to legal or > professional privilege and copyright. No representation is made that this > email is free of viruses or other defects. If you have received this > communication in error, you may not copy or distribute any part of it or > otherwise disclose its contents to anyone. Please advise the sender of > your incorrect receipt of this correspondence. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Possible-to-change-feature-style-before-adding-feature-collection-tp4029160p4029891.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Wed Nov 18 23:58:31 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Possible to change feature style before adding feature collection? In-Reply-To: <1258601222061-4029891.post@n2.nabble.com> References: <1258588312800-4029160.post@n2.nabble.com> <4B049D4F.1070609@lisasoft.com> <1258601222061-4029891.post@n2.nabble.com> Message-ID: <4B04D077.3050008@lisasoft.com> Hi, On 19/11/09 14:27, adsaero wrote: > When I try that, it seems the feature doesn't render at all. I also tried > setting the style in the feature object before adding the feature, but I get > the same result. > That is a bit odd. What happens when you give your track_layer no style*map* at all? I think the problem might be in the combination of your stylemap and your newly created style for that feature. Btw: isn't there any way you can use a stylemap with rules? If there is a specific attribute in your first feature that differentiates itself from the other(s), then you would not need to use the beforefeaturesadded event at all. > This also fails, with the same result: > > testfeatures = geojson_format.read(results); > testfeatures[0].style = tracks_style; > track_layer.addFeatures(poofeatures); > I assume you meant to say in your last line: track_layer.addFeatures(testfeatures); ? Regards, Roald -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. From eric.lemoine at camptocamp.com Thu Nov 19 00:53:26 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: References: Message-ID: On Wednesday, November 18, 2009, Kris Geusebroek wrote: > > > > > > > > > > > > > > > Hi All, > > > > I?m currently investigating the > possibilities of integrating html5 functionality into openlayers. > > My first try is using canvas for a layer > instead of div?s > > > > I?ve setup a sandbox which you can > use to have a look: http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecacheCanvas.html > > > > This is the first example to show it?s > possible ;-). Only features now are zoom and pan without the resize transition effect. > > If anyone has remarks, ideas, feature > requests, help offerings etc. Feel free to contact me. This is cool! May I ask what's your goal with displaying tiles using canvas? Is it performance? I have never played with canvas so I'm interested to know and talk about what it can bring to OpenLayers. Thanks Kris, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Thu Nov 19 01:33:01 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] how to initialize 'WFS.fromWMSLayer' with features In-Reply-To: <4B041A18.1090301@geodan.nl> References: <4B041A18.1090301@geodan.nl> Message-ID: On Wednesday, November 18, 2009, John Pulles wrote: > Hi list, > > Like the example at > http://openlayers.org/dev/examples/getfeature-wfs.html, I am using the > OpenLayers.Protocol.WFS.fromWSMLayer convenience function to select > features from a wms layer and collect the values of a certain attribute. > When opening the same map a next time, I would like to show which > features were selected. Now I'm looking for a way to add features to the > wfs layer based on some attribute values, what would be the easiest way? you can register a "beforefeatureadded" listener on the vector layer, something like that: layer.events.on({ beforefeatureadded: function(e) { // only add features whose foo attribute // is set to "bar" return e.feature.attributes.foo == "bar" ? true : false; } }); 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 Thu Nov 19 01:48:50 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] WFS GetFeature In-Reply-To: <1258557705965-4026139.post@n2.nabble.com> References: <1258557705965-4026139.post@n2.nabble.com> Message-ID: On Wednesday, November 18, 2009, stash wrote: > > Hello, > I have a openlayers map with a wms showing some points. Furthermore a wms > getfeatureinfo returns some infos when the user is clicking on a point on > the map. Thereby the wms getfeatureinfo returns a "application/vnd.ogc.gml". > Afterwards i parse my gml and the user gets the parsed info. > > What I want to add now is, that the user only getting some info, when > certain points are clicked (for example: only when point 2 or 3 is clicked). > > I think this is only possible when i replace my wms getfeatureinfo with a > wfs getfeature + a filter. > > Am I right with this thought? The wfs should also return a gml what I can > parse then. > > I hope someone can help me (maybe with an easy example of a wfs getfeature > request + filter) because I have not so much experience with openlayers. Hi look at the getfeature-wfs.html to know how to use the GetFeature control. And based on what you describe above I think what you want is a default filter set in the protocol, this default filter will be composed of mutiple FeatureId filters combined in an OR logical filter. IIRC the defaultFilter property in OpenLayers.Protocol isn't in 2.8, but in trunk. 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 steffen.schwarz85 at googlemail.com Thu Nov 19 02:41:32 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] WFS GetFeature In-Reply-To: References: <1258557705965-4026139.post@n2.nabble.com> Message-ID: <1258616492771-4030474.post@n2.nabble.com> Eric Lemoine-2-2 wrote: > > And based on what you describe above I think what you want is > a default filter set in the protocol, this default filter will be > composed of mutiple FeatureId filters combined in an OR logical > filter. IIRC the defaultFilter property in OpenLayers.Protocol isn't > in 2.8, but in trunk. > > Hi, thanks for the answer. I will take a look at the example. But what I didn't get is how to implement such a default filter. Could you give me an example, please? Furthermore what do you mean by "trunk". I use openlayers 2.8. What is trunk? Regards stash -- View this message in context: http://n2.nabble.com/WFS-GetFeature-Filter-tp4026139p4030474.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Thu Nov 19 03:03:44 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] Openlayers WFS + different styles of the points Message-ID: <1258617824034-4030522.post@n2.nabble.com> Hello, I have an openlayers.layer.wms which displays a background card and furthermore I have an openlayers.layer.wfs which shows some points on this card. That works fine. But there is something I don't like on my map. Every point of my wfs layer is displayed with a red arrow (like the google marker) on my map ( i think this is basic with geoserver). Is it possible to show the points in different colors. Furthermore it would be great, when a certain text is beside the point. When using wms i can do this with a sld_body. But with wfs I can filter my points and therefore I want to use a wfs. Is it possible to show my wfs layer points in different colors? Thanks for the answers. Regards stash -- View this message in context: http://n2.nabble.com/Openlayers-WFS-different-styles-of-the-points-tp4030522p4030522.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Thu Nov 19 02:58:57 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: References: Message-ID: Hi Eric, Indeed it's cool, thanks. My goal was to write an application with open source technologies to track cars driving around. I wrote a prototype with geoserver and openlayers and this was succesfull. The big problem was the memory consumption (especially in IE) because of the large amount of DOM manipulation that is done when panning and zooming and drawing vector's (the cars, with fills, stroke, label etc.) Since using a plugin is out of the question here I began investigating the html5 canvas. I know it's not supported in IE, but for me that was a good thing because it gave me the opportunity to have the client choose a different browser then IE. My plans for the future of the app is to also use workers and the browser database (to be able to store historical responses clientside to draw a route the car has followed for the last 10 minutes or so) Also I think the canvas gives us the opportunity to create a print control or a save map as, because in the end it's just an image. (have to combine the layer specific canvasses into one but that's easy ;-)) If you have any other ideas or see different opportunities let me know, my client is fundning me to experiment with html5 so I might be able to spent some time on other's feature requests ;-) Cheers Kris -----Original Message----- From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] Sent: Thursday, November 19, 2009 6:53 AM To: Kris Geusebroek Cc: OpenLayers Users Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers On Wednesday, November 18, 2009, Kris Geusebroek wrote: > > > > > > > > > > > > > > > Hi All, > > > > I'm currently investigating the > possibilities of integrating html5 functionality into openlayers. > > My first try is using canvas for a layer > instead of div's > > > > I've setup a sandbox which you can > use to have a look: http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache Canvas.html > > > > This is the first example to show it's > possible ;-). Only features now are zoom and pan without the resize transition effect. > > If anyone has remarks, ideas, feature > requests, help offerings etc. Feel free to contact me. This is cool! May I ask what's your goal with displaying tiles using canvas? Is it performance? I have never played with canvas so I'm interested to know and talk about what it can bring to OpenLayers. Thanks Kris, -- 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 steffen.schwarz85 at googlemail.com Thu Nov 19 03:07:32 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] GeoServer Proxy Extension OpenLayers In-Reply-To: <1258469757520-4019023.post@n2.nabble.com> References: <4B017F47.8030503@opengeo.org> <4B018054.7040904@opengeo.org> <1258390718086-4013123.post@n2.nabble.com> <4B018593.5010806@opengeo.org> <1258399202179-4014088.post@n2.nabble.com> <5e3c00490911161139q684830f3m33ae290df8bb266e@mail.gmail.com> <5e3c00490911161148m5a6ad5eeh68cf61a1c4a53286@mail.gmail.com> <1258457732246-4018043.post@n2.nabble.com> <4B02937E.6080001@opengeo.org> <1258469757520-4019023.post@n2.nabble.com> Message-ID: <1258618052256-4030537.post@n2.nabble.com> Hello, finally I made it that my wfs is shown too. Because my geoserver and my app are on the same pc I don't need to declare a openlayers.proxyhost. That was the failure in my code. Now it's working. The dissapointing point is, that my app and geoserver have to be on the same pc. Regards stash -- View this message in context: http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-tp3998936p4030537.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From john.pulles at geodan.nl Thu Nov 19 03:42:47 2009 From: john.pulles at geodan.nl (John Pulles) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] how to initialize 'WFS.fromWMSLayer' with features In-Reply-To: References: <4B041A18.1090301@geodan.nl> Message-ID: <4B050507.3090404@geodan.nl> Eric Lemoine schreef: > On Wednesday, November 18, 2009, John Pulles wrote: > >> Hi list, >> >> Like the example at >> http://openlayers.org/dev/examples/getfeature-wfs.html, I am using the >> OpenLayers.Protocol.WFS.fromWSMLayer convenience function to select >> features from a wms layer and collect the values of a certain attribute. >> When opening the same map a next time, I would like to show which >> features were selected. Now I'm looking for a way to add features to the >> wfs layer based on some attribute values, what would be the easiest way? >> > you can register a "beforefeatureadded" listener on the vector layer, > something like that: > > layer.events.on({ > beforefeatureadded: function(e) { > // only add features whose foo attribute > // is set to "bar" > return e.feature.attributes.foo == "bar" ? > true : false; > } > }); > Hi Eric, What I would like is to fill the vector layer at initialization with the known features from the associated wfs layer. The beforefeatureadded event would still require the user to select features and then only adds the known features. But how to fill the vector layer with these features, without any action from the user? Thanks, John > cheers, > > > -- ------------------------------------- Geodan IT b.v. Buitenhaven 27-A 5211 TP 's-Hertogenbosch (NL) ------------------------------------- Tel: +31 (0)73 - 692 5151 Fax: +31 (0)20 - 5711 333 ------------------------------------- Postadres / mailing address President Kennedylaan 1 1079 MB Amsterdam (NL) ------------------------------------- E-mail: john.pulles@geodan.nl Website: http://www.geodan.nl Disclaimer: http://www.geodan.nl/disclaimer ------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091119/9e81cdff/attachment.html From barbara.fiederer at web.de Thu Nov 19 03:44:16 2009 From: barbara.fiederer at web.de (Barbara Fiederer) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] request and parse GML Message-ID: <1251580851@web.de> Hi Pedro, hi list, it might not be perfect, but this is how it works. Maybe it helps someone else. var filter = new OpenLayers.Format.Filter({version: "1.1.0"}); var xml = new OpenLayers.Format.XML(); var filter1 = new OpenLayers.Filter.Logical({ type: OpenLayers.Filter.Logical.OR, filters: [ new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "myAttributeName", value: "myAttributeValue" }), new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "myAttributeName", value: "myAttributeValue" }) ] }); filter = xml.write(filter.write(filter1)); var sellayer = new OpenLayers.Layer.WFS( "Selected Features", "http://myDomain.com/geoserver/wfs", { typename: 'namespace:features', //e.g.'topp:tasmania_roads' srs: 'EPSG:11111', tiled: 'true', filter:filter } ); map.addLayer(sellayer); Thanks for your help. Babsi _____________________________________________________________ DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon f?r 16,99 Euro/mtl.!* Hier klicken: http://produkte.web.de/go/02/ From steffen.schwarz85 at googlemail.com Thu Nov 19 04:30:50 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] WFS Layer with Filter Message-ID: <1258623050554-4030894.post@n2.nabble.com> Hello, I have a wfs layer with some points. Now I want to add a filter to this wfs layer, that only certain points are displayed. Here is the code: var my_filter = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "NAME", value: "Point_1" }); var my_layer = new OpenLayers.Layer.WFS("Points", "http://localhost:8080/geoserver/wfs", { typename: "topp:my_layer", filter: my_filter, maxfeatures: 1000 }, { featureClass: OpenLayers.Feature.WFS }); But when I start my html file, no point is shown on my map (the point with the name Point_1 is surely excisting). When I start my html file without the filter:my_filter in the wfs all points of my wfs are displayed. Is something wrong with my filter? Thanks for your help. Regards stash -- View this message in context: http://n2.nabble.com/WFS-Layer-with-Filter-tp4030894p4030894.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Thu Nov 19 04:46:43 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] how to initialize 'WFS.fromWMSLayer' with features In-Reply-To: <4B050507.3090404@geodan.nl> References: <4B041A18.1090301@geodan.nl> <4B050507.3090404@geodan.nl> Message-ID: On Thu, Nov 19, 2009 at 9:42 AM, John Pulles wrote: > Eric Lemoine schreef: > > On Wednesday, November 18, 2009, John Pulles wrote: > > > Hi list, > > Like the example at > http://openlayers.org/dev/examples/getfeature-wfs.html, I am using the > OpenLayers.Protocol.WFS.fromWSMLayer convenience function to select > features from a wms layer and collect the values of a certain attribute. > When opening the same map a next time, I would like to show which > features were selected. Now I'm looking for a way to add features to the > wfs layer based on some attribute values, what would be the easiest way? > > > you can register a "beforefeatureadded" listener on the vector layer, > something like that: > > layer.events.on({ > beforefeatureadded: function(e) { > // only add features whose foo attribute > // is set to "bar" > return e.feature.attributes.foo == "bar" ? > true : false; > } > }); > > > Hi Eric, > > What I would like is to fill the vector layer at initialization with the > known features from the associated wfs layer. The beforefeatureadded event > would still require the user to select features and then only adds the known > features. But how to fill the vector layer with these features, without any > action from the user? I don't get it. beforefeatureadded is triggered for every feature added to the layer, it has nothing to do with the user selecting features, hasn't it? -- 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 john.pulles at geodan.nl Thu Nov 19 04:53:08 2009 From: john.pulles at geodan.nl (John Pulles) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] how to initialize 'WFS.fromWMSLayer' with features In-Reply-To: References: <4B041A18.1090301@geodan.nl> <4B050507.3090404@geodan.nl> Message-ID: <4B051584.5090006@geodan.nl> Eric Lemoine schreef: >> Like the example at >> http://openlayers.org/dev/examples/getfeature-wfs.html, I am using the >> OpenLayers.Protocol.WFS.fromWSMLayer convenience function to select >> features from a wms layer and collect the values of a certain attribute. >> When opening the same map a next time, I would like to show which >> features were selected. Now I'm looking for a way to add features to the >> wfs layer based on some attribute values, what would be the easiest way? >> >> >> you can register a "beforefeatureadded" listener on the vector layer, >> something like that: >> >> layer.events.on({ >> beforefeatureadded: function(e) { >> // only add features whose foo attribute >> // is set to "bar" >> return e.feature.attributes.foo == "bar" ? >> true : false; >> } >> }); >> >> >> Hi Eric, >> >> What I would like is to fill the vector layer at initialization with the >> known features from the associated wfs layer. The beforefeatureadded event >> would still require the user to select features and then only adds the known >> features. But how to fill the vector layer with these features, without any >> action from the user? >> > > I don't get it. beforefeatureadded is triggered for every feature > added to the layer, it has nothing to do with the user selecting > features, hasn't it? > But where (or when) do the features come from? The OpenLayers.Protocol.WFS.fromWSMLayer function doesn't automatically fetch features from the wfs layer, but only in response to a click event. I would like it to automatically fetch (some) features at startup but don't know how. John. ------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091119/db35bb1a/attachment.html From cezarto at interia.pl Thu Nov 19 04:57:46 2009 From: cezarto at interia.pl (Czarek Tomaszewski) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] OpenLayer + Google Maps API key Message-ID: <20091119095747.15D8EE4362A@f11.poczta.interia.pl> Hi, I?ve created application based on GWT-OpenLayer. It works OK. Application enables client to change that key in configuration form but I?ve noticed that when I put incorrect key, popup window informs me: ?This web site needs a different Google Maps API key ?? and it is OK, but after all, map is opening. I think it should not. I checked this also using simple example from http://workshops.opengeo.org/stack-intro/openlayers.html and problem is the same. Does anyone know how to solve the problem? Thanks in advance, Czarek ---------------------------------------------------------------------- Audi kilka tysiecy zlotych taniej? Przebieraj wsrod tysiecy ogloszen! Kliknij >>> http://link.interia.pl/f2424 From bartvde at osgis.nl Thu Nov 19 04:59:13 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] how to initialize 'WFS.fromWMSLayer' with features In-Reply-To: <4B051584.5090006@geodan.nl> References: <4B041A18.1090301@geodan.nl> <4B050507.3090404@geodan.nl> <4B051584.5090006@geodan.nl> Message-ID: <26428.145.50.39.11.1258624753.squirrel@webmail.hostingdiscounter.nl> Call the read function on the returned protocol yourself. Best regards, Bart > Eric Lemoine schreef: >>> Like the example at >>> http://openlayers.org/dev/examples/getfeature-wfs.html, I am using the >>> OpenLayers.Protocol.WFS.fromWSMLayer convenience function to select >>> features from a wms layer and collect the values of a certain >>> attribute. >>> When opening the same map a next time, I would like to show which >>> features were selected. Now I'm looking for a way to add features to >>> the >>> wfs layer based on some attribute values, what would be the easiest >>> way? >>> >>> >>> you can register a "beforefeatureadded" listener on the vector layer, >>> something like that: >>> >>> layer.events.on({ >>> beforefeatureadded: function(e) { >>> // only add features whose foo attribute >>> // is set to "bar" >>> return e.feature.attributes.foo == "bar" ? >>> true : false; >>> } >>> }); >>> >>> >>> Hi Eric, >>> >>> What I would like is to fill the vector layer at initialization with >>> the >>> known features from the associated wfs layer. The beforefeatureadded >>> event >>> would still require the user to select features and then only adds the >>> known >>> features. But how to fill the vector layer with these features, without >>> any >>> action from the user? >>> >> >> I don't get it. beforefeatureadded is triggered for every feature >> added to the layer, it has nothing to do with the user selecting >> features, hasn't it? >> > But where (or when) do the features come from? The > OpenLayers.Protocol.WFS.fromWSMLayer function doesn't automatically > fetch features from the wfs layer, but only in response to a click > event. I would like it to automatically fetch (some) features at startup > but don't know how. > > John. > > ------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From pedropbaracho at gmail.com Thu Nov 19 07:53:06 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:14 2010 Subject: [OpenLayers-Users] OpenLayer + Google Maps API key In-Reply-To: <20091119095747.15D8EE4362A@f11.poczta.interia.pl> References: <20091119095747.15D8EE4362A@f11.poczta.interia.pl> Message-ID: <5e3c00490911190453m31d3900etf51b277e6c6f639a@mail.gmail.com> Generate a key for your site using this link: http://code.google.com/intl/en/apis/maps/signup.html replace your > > > > > > > Also, here is my transformation: var srcProj = new OpenLayers.Projection("EPSG:2913"); var destProj = new OpenLayers.Projection("EPSG:900913"); var point = new OpenLayers.LonLat(7662464.286, 614886.646); point.transform(srcProj, map.getProjectionObject()); My input coordinates were: 7662464.286, 614886.646 Transformed coordinates: -13647631.260266263, 5674262.881180859 Works great, at least for now. Richard Marsden wrote: > > It looks like you are trying to re-project Google raster layers? > > I thought OpenLayers was only capable of re-projecting vector layers? > > For example, the following article uses OpenLayers (& Proj4JS) to > re-project > KML and GeoRSS data (geographic coords, WGS84) to a number of different > projections (Mollweide, Behrmann, etc): > > http://www.geowebguru.com/articles/209-how-to-create-an-online-map-with-a-non-mercator-projection-part-2 > > > Richard Marsden > Winwaed Software Technology LLC > http://www.winwaed.com > http://www.mapping-tools.com > http://www.geowebguruc.om > > > On Thu, Nov 19, 2009 at 12:12 PM, Dash wrote: > >> >> Aloha Thursday folks, >> >> I am banging my head against the problem for the last several hours. I >> have >> went through numerous examples and utilized OpenLayers tutorial on >> reprojecting points without any success. I've even used the Proj4js Wiki >> without any help. Could some please shed some light on what I am doing >> wrong? >> >> Here is the scenario. I am trying to transform some coordinates from >> EPSG:2913 to EPSG:900913. I've also tried a simplified version using >> EPSG:4326 -> EPSG:900913. Anyway, the transform is not happening for >> some >> odd reason. I do have the proj4js library within my code and I have >> added >> EPSG definition to my /proj4js/lib/def directory. I am checking if the >> projection by using the getUnits function of the projection class within >> OpenLayers. If the units come back null, then the proj4js library is >> unavailable. Why is this? I'm so confused. This should be rather >> straight >> forward. Anyway, here is some of my code. Hopefully someone can help me >> out. Thanks. >> >> >> >> >> >> >> >> >> >> merc.js and lcc.js are included in the proj4js-compressed.js version and not in proj4js.js Mike Dash wrote: > Thanks for the quick response Richard, but I don't see how I'm re-projecting > raster layers when I'm explicitly specifying coordinates to transform? I'm > only using the transformation on coordinates, not the base layers (Google). > > Ahhh, I just figured it out. Here is what I had to do in-order to transform > coordinates from EPSG:2913 (Stateplane) to EPSG:900913. Within the head tag > I added 2 projCodes (lcc.js and merc.js). > > > > > > > > Also, here is my transformation: > > var srcProj = new OpenLayers.Projection("EPSG:2913"); > var destProj = new OpenLayers.Projection("EPSG:900913"); > var point = new OpenLayers.LonLat(7662464.286, 614886.646); > point.transform(srcProj, map.getProjectionObject()); > > My input coordinates were: 7662464.286, 614886.646 > Transformed coordinates: -13647631.260266263, 5674262.881180859 > > Works great, at least for now. > > > Richard Marsden wrote: > >> It looks like you are trying to re-project Google raster layers? >> >> I thought OpenLayers was only capable of re-projecting vector layers? >> >> For example, the following article uses OpenLayers (& Proj4JS) to >> re-project >> KML and GeoRSS data (geographic coords, WGS84) to a number of different >> projections (Mollweide, Behrmann, etc): >> >> http://www.geowebguru.com/articles/209-how-to-create-an-online-map-with-a-non-mercator-projection-part-2 >> >> >> Richard Marsden >> Winwaed Software Technology LLC >> http://www.winwaed.com >> http://www.mapping-tools.com >> http://www.geowebguruc.om >> >> >> On Thu, Nov 19, 2009 at 12:12 PM, Dash wrote: >> >> >>> Aloha Thursday folks, >>> >>> I am banging my head against the problem for the last several hours. I >>> have >>> went through numerous examples and utilized OpenLayers tutorial on >>> reprojecting points without any success. I've even used the Proj4js Wiki >>> without any help. Could some please shed some light on what I am doing >>> wrong? >>> >>> Here is the scenario. I am trying to transform some coordinates from >>> EPSG:2913 to EPSG:900913. I've also tried a simplified version using >>> EPSG:4326 -> EPSG:900913. Anyway, the transform is not happening for >>> some >>> odd reason. I do have the proj4js library within my code and I have >>> added >>> EPSG definition to my /proj4js/lib/def directory. I am checking if the >>> projection by using the getUnits function of the projection class within >>> OpenLayers. If the units come back null, then the proj4js library is >>> unavailable. Why is this? I'm so confused. This should be rather >>> straight >>> forward. Anyway, here is some of my code. Hopefully someone can help me >>> out. Thanks. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> > > > merc.js and lcc.js are included in the proj4js-compressed.js version and > not in proj4js.js > > Mike > > > Dash wrote: >> Thanks for the quick response Richard, but I don't see how I'm >> re-projecting >> raster layers when I'm explicitly specifying coordinates to transform? >> I'm >> only using the transformation on coordinates, not the base layers >> (Google). >> >> Ahhh, I just figured it out. Here is what I had to do in-order to >> transform >> coordinates from EPSG:2913 (Stateplane) to EPSG:900913. Within the head >> tag >> I added 2 projCodes (lcc.js and merc.js). >> >> >> >> >> >> >> >> Also, here is my transformation: >> >> var srcProj = new OpenLayers.Projection("EPSG:2913"); >> var destProj = new OpenLayers.Projection("EPSG:900913"); >> var point = new OpenLayers.LonLat(7662464.286, 614886.646); >> point.transform(srcProj, map.getProjectionObject()); >> >> My input coordinates were: 7662464.286, 614886.646 >> Transformed coordinates: -13647631.260266263, 5674262.881180859 >> >> Works great, at least for now. >> >> >> Richard Marsden wrote: >> >>> It looks like you are trying to re-project Google raster layers? >>> >>> I thought OpenLayers was only capable of re-projecting vector layers? >>> >>> For example, the following article uses OpenLayers (& Proj4JS) to >>> re-project >>> KML and GeoRSS data (geographic coords, WGS84) to a number of different >>> projections (Mollweide, Behrmann, etc): >>> >>> http://www.geowebguru.com/articles/209-how-to-create-an-online-map-with-a-non-mercator-projection-part-2 >>> >>> >>> Richard Marsden >>> Winwaed Software Technology LLC >>> http://www.winwaed.com >>> http://www.mapping-tools.com >>> http://www.geowebguruc.om >>> >>> >>> On Thu, Nov 19, 2009 at 12:12 PM, Dash >>> wrote: >>> >>> >>>> Aloha Thursday folks, >>>> >>>> I am banging my head against the problem for the last several hours. I >>>> have >>>> went through numerous examples and utilized OpenLayers tutorial on >>>> reprojecting points without any success. I've even used the Proj4js >>>> Wiki >>>> without any help. Could some please shed some light on what I am doing >>>> wrong? >>>> >>>> Here is the scenario. I am trying to transform some coordinates from >>>> EPSG:2913 to EPSG:900913. I've also tried a simplified version using >>>> EPSG:4326 -> EPSG:900913. Anyway, the transform is not happening for >>>> some >>>> odd reason. I do have the proj4js library within my code and I have >>>> added >>>> EPSG definition to my /proj4js/lib/def directory. I am checking if the >>>> projection by using the getUnits function of the projection class >>>> within >>>> OpenLayers. If the units come back null, then the proj4js library is >>>> unavailable. Why is this? I'm so confused. This should be rather >>>> straight >>>> forward. Anyway, here is some of my code. Hopefully someone can help >>>> me >>>> out. Thanks. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> > > > > > > Also, here is my transformation: > > var srcProj = new OpenLayers.Projection("EPSG:2913"); > var destProj = new OpenLayers.Projection("EPSG:900913"); > var point = new OpenLayers.LonLat(7662464.286, 614886.646); > point.transform(srcProj, map.getProjectionObject()); > > My input coordinates were: 7662464.286, 614886.646 > Transformed coordinates: -13647631.260266263, 5674262.881180859 > > Works great, at least for now. > > > Richard Marsden wrote: > > > > It looks like you are trying to re-project Google raster layers? > > > > I thought OpenLayers was only capable of re-projecting vector layers? > > > > For example, the following article uses OpenLayers (& Proj4JS) to > > re-project > > KML and GeoRSS data (geographic coords, WGS84) to a number of different > > projections (Mollweide, Behrmann, etc): > > > > > http://www.geowebguru.com/articles/209-how-to-create-an-online-map-with-a-non-mercator-projection-part-2 > > > > > > Richard Marsden > > Winwaed Software Technology LLC > > http://www.winwaed.com > > http://www.mapping-tools.com > > http://www.geowebguruc.om > > > > > > On Thu, Nov 19, 2009 at 12:12 PM, Dash > wrote: > > > >> > >> Aloha Thursday folks, > >> > >> I am banging my head against the problem for the last several hours. I > >> have > >> went through numerous examples and utilized OpenLayers tutorial on > >> reprojecting points without any success. I've even used the Proj4js > Wiki > >> without any help. Could some please shed some light on what I am doing > >> wrong? > >> > >> Here is the scenario. I am trying to transform some coordinates from > >> EPSG:2913 to EPSG:900913. I've also tried a simplified version using > >> EPSG:4326 -> EPSG:900913. Anyway, the transform is not happening for > >> some > >> odd reason. I do have the proj4js library within my code and I have > >> added > >> EPSG definition to my /proj4js/lib/def directory. I am checking if the > >> projection by using the getUnits function of the projection class within > >> OpenLayers. If the units come back null, then the proj4js library is > >> unavailable. Why is this? I'm so confused. This should be rather > >> straight > >> forward. Anyway, here is some of my code. Hopefully someone can help > me > >> out. Thanks. > >> > >> > >> > >> > >> > >> > >> > >> > >> > >>

Google Layer Example

Demonstrate use of the various types of Google layers.

For best performance, you must be using a version of the Google Maps API which is v2.93 or higher. In order to use this version of the API, it is best to simply set your application to use the string "v=2" in the request, rather than tying your application to an explicit version.

In order to position the Google attribution div in the default ocation, you must include the extra theme/default/google.css stylesheet.

Thanks in advance, Joe Miller -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091120/19d197a8/attachment.html From adam at prema.co.nz Fri Nov 20 18:44:42 2009 From: adam at prema.co.nz (Adam Ratcliffe) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: References: Message-ID: <6355937c0911201544y1bb25d9dvd71264bcc6b8537f@mail.gmail.com> Hi Kris, Am I correct in thinking this technique would be useful for displaying read-only vector data only? Or are you considering an approach such as overlaying a transparent image map to allow interactivity? Cheers Adam On Thu, Nov 19, 2009 at 8:58 PM, Kris Geusebroek wrote: > Hi Eric, > > Indeed it's cool, thanks. > My goal was to write an application with open source technologies to > track cars driving around. > I wrote a prototype with geoserver and openlayers and this was > succesfull. The big problem was the memory consumption (especially in > IE) because of the large amount of DOM manipulation that is done when > panning and zooming and drawing vector's (the cars, with fills, stroke, > label etc.) > > Since using a plugin is out of the question here I began investigating > the html5 canvas. > I know it's not supported in IE, but for me that was a good thing > because it gave me the opportunity to have the client choose a different > browser then IE. > > My plans for the future of the app is to also use workers and the > browser database (to be able to store historical responses clientside to > draw a route the car has followed for the last 10 minutes or so) > > Also I think the canvas gives us the opportunity to create a print > control or a save map as, because in the end it's just an image. (have > to combine the layer specific canvasses into one but that's easy ;-)) > > If you have any other ideas or see different opportunities let me know, > my client is fundning me to experiment with html5 so I might be able to > spent some time on other's feature requests ;-) > > Cheers Kris > > > -----Original Message----- > From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] > Sent: Thursday, November 19, 2009 6:53 AM > To: Kris Geusebroek > Cc: OpenLayers Users > Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers > > On Wednesday, November 18, 2009, Kris Geusebroek > wrote: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Hi All, >> >> >> >> I'm currently investigating the >> possibilities of integrating html5 functionality into openlayers. >> >> My first try is using canvas for a layer >> instead of div's >> >> >> >> I've setup a sandbox which you can >> use to have a look: > http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache > Canvas.html >> >> >> >> This is the first example to show it's >> possible ;-). Only features now are zoom and pan without the resize > transition effect. >> >> If anyone has remarks, ideas, feature >> requests, help offerings etc. Feel free to contact me. > > This is cool! > > May I ask what's your goal with displaying tiles using canvas? Is it > performance? I have never played with canvas so I'm interested to know > and talk about what it can bring to OpenLayers. > > Thanks Kris, > > -- > 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 > From tommy.niittula at nethouse.se Fri Nov 20 19:14:56 2009 From: tommy.niittula at nethouse.se (Tommy74) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Vector disappears when zooming in (sometimes) Message-ID: <1258762496966-4040736.post@n2.nabble.com> Hi I'm trying to draw a long linestring on a map. On IE7 the line disappears on the southern end when zooming in max. But on the northern end the line is still there. Is it a bug or have I done something wrong? http://n2.nabble.com/file/n4040736/Tutorial2.html Tutorial2.html http://n2.nabble.com/file/n4040736/Route.js Route.js Since I have an internal WMS the background will not be visible for you but you should be able to see the linestring that is read from Route.js-file. Thanks in advance /Tommy -- View this message in context: http://n2.nabble.com/Vector-disappears-when-zooming-in-sometimes-tp4040736p4040736.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Fri Nov 20 19:32:33 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: <6355937c0911201544y1bb25d9dvd71264bcc6b8537f@mail.gmail.com> References: <6355937c0911201544y1bb25d9dvd71264bcc6b8537f@mail.gmail.com> Message-ID: Hi Adam, I think it doesn't make a difference in the current way OpenLayers works other then replacing a lot of div's by a single canvas. Nothing to do with interactivity I guess. The current div based vector layer can be used together with wfs-t or getfeatureinfo request to make it interactive. And together with the refresh strategy (in trunk) you can make it look like you are following the changes in data near real time. Perhaps I misunderstood your remark. If so feel free to contact me Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Adam Ratcliffe Sent: Saturday, November 21, 2009 12:45 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers Hi Kris, Am I correct in thinking this technique would be useful for displaying read-only vector data only? Or are you considering an approach such as overlaying a transparent image map to allow interactivity? Cheers Adam On Thu, Nov 19, 2009 at 8:58 PM, Kris Geusebroek wrote: > Hi Eric, > > Indeed it's cool, thanks. > My goal was to write an application with open source technologies to > track cars driving around. > I wrote a prototype with geoserver and openlayers and this was > succesfull. The big problem was the memory consumption (especially in > IE) because of the large amount of DOM manipulation that is done when > panning and zooming and drawing vector's (the cars, with fills, stroke, > label etc.) > > Since using a plugin is out of the question here I began investigating > the html5 canvas. > I know it's not supported in IE, but for me that was a good thing > because it gave me the opportunity to have the client choose a different > browser then IE. > > My plans for the future of the app is to also use workers and the > browser database (to be able to store historical responses clientside to > draw a route the car has followed for the last 10 minutes or so) > > Also I think the canvas gives us the opportunity to create a print > control or a save map as, because in the end it's just an image. (have > to combine the layer specific canvasses into one but that's easy ;-)) > > If you have any other ideas or see different opportunities let me know, > my client is fundning me to experiment with html5 so I might be able to > spent some time on other's feature requests ;-) > > Cheers Kris > > > -----Original Message----- > From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] > Sent: Thursday, November 19, 2009 6:53 AM > To: Kris Geusebroek > Cc: OpenLayers Users > Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers > > On Wednesday, November 18, 2009, Kris Geusebroek > wrote: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Hi All, >> >> >> >> I'm currently investigating the >> possibilities of integrating html5 functionality into openlayers. >> >> My first try is using canvas for a layer >> instead of div's >> >> >> >> I've setup a sandbox which you can >> use to have a look: > http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache > Canvas.html >> >> >> >> This is the first example to show it's >> possible ;-). Only features now are zoom and pan without the resize > transition effect. >> >> If anyone has remarks, ideas, feature >> requests, help offerings etc. Feel free to contact me. > > This is cool! > > May I ask what's your goal with displaying tiles using canvas? Is it > performance? I have never played with canvas so I'm interested to know > and talk about what it can bring to OpenLayers. > > Thanks Kris, > > -- > 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 > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From adam at prema.co.nz Fri Nov 20 19:54:15 2009 From: adam at prema.co.nz (Adam Ratcliffe) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: References: <6355937c0911201544y1bb25d9dvd71264bcc6b8537f@mail.gmail.com> Message-ID: <6355937c0911201654hbc544d4sf1c4f4f9262a65e@mail.gmail.com> Hi Kris, I'm fairly new to OpenLayers and assumed that when creating a vector layer for use with wfs-t that the layer features would be rendered using either SVG or VML, thus allowing for the full range of mouse interactions that other DOM elements support (click, mouseover, mouseout etc). With the canvas implementation how do you support edting of a polygon for instance? Cheers Adam On Sat, Nov 21, 2009 at 1:32 PM, Kris Geusebroek wrote: > Hi Adam, > > I think it doesn't make a difference in the current way OpenLayers works > other then replacing a lot of div's by a single canvas. Nothing to do > with interactivity I guess. > > The current div based vector layer can be used together with wfs-t or > getfeatureinfo request to make it interactive. > > And together with the refresh strategy (in trunk) you can make it look > like you are following the changes in data near real time. > > > Perhaps I misunderstood your remark. If so feel free to contact me > > Cheers Kris > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Adam Ratcliffe > Sent: Saturday, November 21, 2009 12:45 AM > To: users@openlayers.org > Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers > > Hi Kris, > > Am I correct in thinking this technique would be useful for displaying > read-only vector data only? ?Or are you considering an approach such > as overlaying a transparent image map to allow interactivity? > > Cheers > Adam > > On Thu, Nov 19, 2009 at 8:58 PM, Kris Geusebroek > wrote: >> Hi Eric, >> >> Indeed it's cool, thanks. >> My goal was to write an application with open source technologies to >> track cars driving around. >> I wrote a prototype with geoserver and openlayers and this was >> succesfull. The big problem was the memory consumption (especially in >> IE) because of the large amount of DOM manipulation that is done when >> panning and zooming and drawing vector's (the cars, with fills, > stroke, >> label etc.) >> >> Since using a plugin is out of the question here I began investigating >> the html5 canvas. >> I know it's not supported in IE, but for me that was a good thing >> because it gave me the opportunity to have the client choose a > different >> browser then IE. >> >> My plans for the future of the app is to also use workers and the >> browser database (to be able to store historical responses clientside > to >> draw a route the car has followed for the last 10 minutes or so) >> >> Also I think the canvas gives us the opportunity to create a print >> control or a save map as, because in the end it's just an image. (have >> to combine the layer specific canvasses into one but that's easy ;-)) >> >> If you have any other ideas or see different opportunities let me > know, >> my client is fundning me to experiment with html5 so I might be able > to >> spent some time on other's feature requests ;-) >> >> Cheers Kris >> >> >> -----Original Message----- >> From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] >> Sent: Thursday, November 19, 2009 6:53 AM >> To: Kris Geusebroek >> Cc: OpenLayers Users >> Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers >> >> On Wednesday, November 18, 2009, Kris Geusebroek > >> wrote: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Hi All, >>> >>> >>> >>> I'm currently investigating the >>> possibilities of integrating html5 functionality into openlayers. >>> >>> My first try is using canvas for a layer >>> instead of div's >>> >>> >>> >>> I've setup a sandbox which you can >>> use to have a look: >> > http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache >> Canvas.html >>> >>> >>> >>> This is the first example to show it's >>> possible ;-). Only features now are zoom and pan without the resize >> transition effect. >>> >>> If anyone has remarks, ideas, feature >>> requests, help offerings etc. Feel free to contact me. >> >> This is cool! >> >> May I ask what's your goal with displaying tiles using canvas? Is it >> performance? I have never played with canvas so I'm interested to know >> and talk about what it can bring to OpenLayers. >> >> Thanks Kris, >> >> -- >> 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 >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From crschmidt at metacarta.com Fri Nov 20 20:22:48 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: <6355937c0911201654hbc544d4sf1c4f4f9262a65e@mail.gmail.com> References: <6355937c0911201544y1bb25d9dvd71264bcc6b8537f@mail.gmail.com> <6355937c0911201654hbc544d4sf1c4f4f9262a65e@mail.gmail.com> Message-ID: <20091121012248.GC8355@metacarta.com> On Sat, Nov 21, 2009 at 01:54:15PM +1300, Adam Ratcliffe wrote: > Hi Kris, > > I'm fairly new to OpenLayers and assumed that when creating a vector > layer for use with wfs-t that the layer features would be rendered > using either SVG or VML, thus allowing for the full range of mouse > interactions that other DOM elements support (click, mouseover, > mouseout etc). > > With the canvas implementation how do you support edting of a polygon > for instance? NOte that there is already a canvs drawing implementation in OpenLayers that fully supports drawing, editing, feature selection, etc. (It works by reimplementing all of the features of these functionalities that exist in SVG at the browser level in OpenLayers.) -- Chris > Cheers > Adam > > On Sat, Nov 21, 2009 at 1:32 PM, Kris Geusebroek wrote: > > Hi Adam, > > > > I think it doesn't make a difference in the current way OpenLayers works > > other then replacing a lot of div's by a single canvas. Nothing to do > > with interactivity I guess. > > > > The current div based vector layer can be used together with wfs-t or > > getfeatureinfo request to make it interactive. > > > > And together with the refresh strategy (in trunk) you can make it look > > like you are following the changes in data near real time. > > > > > > Perhaps I misunderstood your remark. If so feel free to contact me > > > > Cheers Kris > > > > -----Original Message----- > > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > > On Behalf Of Adam Ratcliffe > > Sent: Saturday, November 21, 2009 12:45 AM > > To: users@openlayers.org > > Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers > > > > Hi Kris, > > > > Am I correct in thinking this technique would be useful for displaying > > read-only vector data only? ?Or are you considering an approach such > > as overlaying a transparent image map to allow interactivity? > > > > Cheers > > Adam > > > > On Thu, Nov 19, 2009 at 8:58 PM, Kris Geusebroek > > wrote: > >> Hi Eric, > >> > >> Indeed it's cool, thanks. > >> My goal was to write an application with open source technologies to > >> track cars driving around. > >> I wrote a prototype with geoserver and openlayers and this was > >> succesfull. The big problem was the memory consumption (especially in > >> IE) because of the large amount of DOM manipulation that is done when > >> panning and zooming and drawing vector's (the cars, with fills, > > stroke, > >> label etc.) > >> > >> Since using a plugin is out of the question here I began investigating > >> the html5 canvas. > >> I know it's not supported in IE, but for me that was a good thing > >> because it gave me the opportunity to have the client choose a > > different > >> browser then IE. > >> > >> My plans for the future of the app is to also use workers and the > >> browser database (to be able to store historical responses clientside > > to > >> draw a route the car has followed for the last 10 minutes or so) > >> > >> Also I think the canvas gives us the opportunity to create a print > >> control or a save map as, because in the end it's just an image. (have > >> to combine the layer specific canvasses into one but that's easy ;-)) > >> > >> If you have any other ideas or see different opportunities let me > > know, > >> my client is fundning me to experiment with html5 so I might be able > > to > >> spent some time on other's feature requests ;-) > >> > >> Cheers Kris > >> > >> > >> -----Original Message----- > >> From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] > >> Sent: Thursday, November 19, 2009 6:53 AM > >> To: Kris Geusebroek > >> Cc: OpenLayers Users > >> Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers > >> > >> On Wednesday, November 18, 2009, Kris Geusebroek > > > >> wrote: > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> Hi All, > >>> > >>> > >>> > >>> I'm currently investigating the > >>> possibilities of integrating html5 functionality into openlayers. > >>> > >>> My first try is using canvas for a layer > >>> instead of div's > >>> > >>> > >>> > >>> I've setup a sandbox which you can > >>> use to have a look: > >> > > http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache > >> Canvas.html > >>> > >>> > >>> > >>> This is the first example to show it's > >>> possible ;-). Only features now are zoom and pan without the resize > >> transition effect. > >>> > >>> If anyone has remarks, ideas, feature > >>> requests, help offerings etc. Feel free to contact me. > >> > >> This is cool! > >> > >> May I ask what's your goal with displaying tiles using canvas? Is it > >> performance? I have never played with canvas so I'm interested to know > >> and talk about what it can bring to OpenLayers. > >> > >> Thanks Kris, > >> > >> -- > >> 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 > >> > > _______________________________________________ > > 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 ahocevar at opengeo.org Sat Nov 21 04:19:34 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Multiple Map with the same google base Layer possible? In-Reply-To: References: Message-ID: <4B07B0A6.4090802@opengeo.org> Hi, by "same", do you mean you are sharing a Layer.Google instance among multiple maps? Try to create one instance for each map instead. Regards, Andras. Jimmy Aumard wrote: > Hi, > > I try to put the same baseLayer (google Physical) on multiple > OpenLayers.Map object but it's doesn't work just one map have the > baseLayer, others was empty. > > Anyone have ideas? > > Cheers > > -- > 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 Sat Nov 21 04:24:49 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Disabling right-click during DrawFeature of a polygon In-Reply-To: References: Message-ID: <4B07B1E1.3070609@opengeo.org> Hi, the easiest way to do what you want is to make sure that your right-click handler is registered before the draw handler. Then, in your right-click handler, you have to stop the event from propagating, e.g. using OpenLayers.Event.stop(); Regards, Andreas. Harry Lam wrote: > In my map, I have added a OpenLayers.Control.DrawFeature(vectorLayer, > OpenLayers.Handler.Polygon) control for drawing a polygon. > > The polygon gets drawn for both left clicks and right clicks on the map. > > How can I remove the right-click functionality? I ask because I > already have other code to pull up a custom context menu on > right-click. What occurs presently is that both the menu and the next > polygon point appear at the same time. So while not an error per se, > it is distracting and counter-intuitive. > > The Polygon handler inherits from the Path handler which contains a > > mousedown: function(evt) { ... } > > function that I assume is the driver for drawing the polygon. Am I > forced to add custom code in here to disable my right-clicks? (I > would prefer not to mess with the internal JS files if there are > alternative methods.) > > Meanwhile, the OpenLayers.Control.Navigation control (added by default > to most maps) has a handleRightClicks property that is *false* by > default. So I don't think my solution is there... > > Any help or advice is appreciated! > > --Harry L. > mr.harry.lam@gmail.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. From ahocevar at opengeo.org Sat Nov 21 04:33:25 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Vector disappears when zooming in (sometimes) In-Reply-To: <1258762496966-4040736.post@n2.nabble.com> References: <1258762496966-4040736.post@n2.nabble.com> Message-ID: <4B07B3E5.1050404@opengeo.org> Hey- things like this can happen when the renderer (VML in your case) runs out of coordinate space. If you can serve your vector data through something that supports a BBOX filter (i.e. e.g. a WFS or FeatureServer, but not a static file), you can use a BBOX strategy on your vector layer to avoid the issue. Regards, Andreas. Tommy74 wrote: > Hi > > I'm trying to draw a long linestring on a map. On IE7 the line disappears on > the southern end when zooming in max. But on the northern end the line is > still there. Is it a bug or have I done something wrong? > > > http://n2.nabble.com/file/n4040736/Tutorial2.html Tutorial2.html > http://n2.nabble.com/file/n4040736/Route.js Route.js > > Since I have an internal WMS the background will not be visible for you but > you should be able to see the linestring that is read from Route.js-file. > > Thanks in advance > > /Tommy > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From tommy.niittula at nethouse.se Sat Nov 21 08:51:18 2009 From: tommy.niittula at nethouse.se (Tommy74) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Vector disappears when zooming in (sometimes) In-Reply-To: <4B07B3E5.1050404@opengeo.org> References: <1258762496966-4040736.post@n2.nabble.com> <4B07B3E5.1050404@opengeo.org> Message-ID: <1258811478604-4042647.post@n2.nabble.com> Hi! Thanks for you answer Andreas! What does "renderer runs out of coordinate space" really mean? Is there a limitation in OpenLayers/VML or is this a common GIS-"feature"? Can it be fixed or is it possible to do a simple workaround? The vector data is not a static file, but is created as GeoJSON on the server in my real application, but that's a custom geojson generator, not a WFS or FeatureServer. Unfortunately there is no time to change the type of datasource at the moment. The goal is to serve the data from WMS instead (in a later version), since its a lot of data. The example that I linked to is a reduced geometry. Regards, Tommy ________________________________ Fr?n: Andreas Hocevar-2 [via OSGeo.org] [ml-node+4042098-280672575@n2.nabble.com] Skickat: den 21 november 2009 10:33 Till: Tommy Niittula ?mne: Re: [OpenLayers-Users] Vector disappears when zooming in (sometimes) Hey- things like this can happen when the renderer (VML in your case) runs out of coordinate space. If you can serve your vector data through something that supports a BBOX filter (i.e. e.g. a WFS or FeatureServer, but not a static file), you can use a BBOX strategy on your vector layer to avoid the issue. Regards, Andreas. Tommy74 wrote: > Hi > > I'm trying to draw a long linestring on a map. On IE7 the line disappears on > the southern end when zooming in max. But on the northern end the line is > still there. Is it a bug or have I done something wrong? > > > http://n2.nabble.com/file/n4040736/Tutorial2.html Tutorial2.html > http://n2.nabble.com/file/n4040736/Route.js Route.js > > Since I have an internal WMS the background will not be visible for you but > you should be able to see the linestring that is read from Route.js-file. > > Thanks in advance > > /Tommy > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [hidden email] http://openlayers.org/mailman/listinfo/users ________________________________ View message @ http://n2.nabble.com/Vector-disappears-when-zooming-in-sometimes-tp4040736p4042098.html To unsubscribe from Vector disappears when zooming in (sometimes), click here< (link removed) =>. -- View this message in context: http://n2.nabble.com/Vector-disappears-when-zooming-in-sometimes-tp4040736p4042647.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/20091121/e176d162/attachment.html From saduc at seznam.cz Sat Nov 21 21:41:33 2009 From: saduc at seznam.cz (saduc@seznam.cz) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Open Layers - Mapnik / Yahoo / OpenLayers WMS projection problem ? - newbie question Message-ID: <2029.2848-12950-1657098157-1258857693@seznam.cz> Hello all. I would really appreciate help with following tests I am performing. I have set up very basic Open Layers scenario, displaying WMS from Open Layers, Yahoo and Mapnik. My problem is, I can change layers only from Open Layers WMS to Yahoo and back, not to Mapnik, if I do, everything gets broken, I see "South pole" instead of central Europe and the projection is so corrupted I even can not switch back to original Layer. It looks like some OpenStreetMap js bug, because in the following code, if I do have layers order set to map.addLayers([mapnik, wms, yahoo]); - mapnik first, then I see mapnik map ok, but if I switch to Yahoo for example, the projection gets broken, but if I set order to map.addLayers([yahoo, wms, mapnik]); - then I can see yahoo layer, I can change to Open Layers WMS, but when I change to Mapnik, everything is broken again. even more, when I try to display a data imported to postgis from osm and published by geoserver, I can see the data aligned using only Open Layers WMS; if I use Yahoo then the projection is shifted (by 100 km for example), and I have problems using Mapnik at all. Am I doing something wrong ? Thank you for any help. -------------------------------------------------------- OpenLayers: Yahoo Layer
From kgeusebroek at xebia.com Sun Nov 22 14:43:03 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: <6355937c0911201654hbc544d4sf1c4f4f9262a65e@mail.gmail.com> References: <6355937c0911201544y1bb25d9dvd71264bcc6b8537f@mail.gmail.com> <6355937c0911201654hbc544d4sf1c4f4f9262a65e@mail.gmail.com> Message-ID: Hi Adam, As Chris rightly point out there is already a canvas implementation of the OpenLayers.Renderer which can be used instead of VML or SVG renderer. My changes for using canvas in OpenLayers are currently concentrating on the other layer types like WMS or Grid layers. Cheers Kris -----Original Message----- From: adam.ratcliffe@gmail.com [mailto:adam.ratcliffe@gmail.com] On Behalf Of Adam Ratcliffe Sent: Saturday, November 21, 2009 1:54 AM To: Kris Geusebroek Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers Hi Kris, I'm fairly new to OpenLayers and assumed that when creating a vector layer for use with wfs-t that the layer features would be rendered using either SVG or VML, thus allowing for the full range of mouse interactions that other DOM elements support (click, mouseover, mouseout etc). With the canvas implementation how do you support edting of a polygon for instance? Cheers Adam On Sat, Nov 21, 2009 at 1:32 PM, Kris Geusebroek wrote: > Hi Adam, > > I think it doesn't make a difference in the current way OpenLayers works > other then replacing a lot of div's by a single canvas. Nothing to do > with interactivity I guess. > > The current div based vector layer can be used together with wfs-t or > getfeatureinfo request to make it interactive. > > And together with the refresh strategy (in trunk) you can make it look > like you are following the changes in data near real time. > > > Perhaps I misunderstood your remark. If so feel free to contact me > > Cheers Kris > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Adam Ratcliffe > Sent: Saturday, November 21, 2009 12:45 AM > To: users@openlayers.org > Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers > > Hi Kris, > > Am I correct in thinking this technique would be useful for displaying > read-only vector data only? ?Or are you considering an approach such > as overlaying a transparent image map to allow interactivity? > > Cheers > Adam > > On Thu, Nov 19, 2009 at 8:58 PM, Kris Geusebroek > wrote: >> Hi Eric, >> >> Indeed it's cool, thanks. >> My goal was to write an application with open source technologies to >> track cars driving around. >> I wrote a prototype with geoserver and openlayers and this was >> succesfull. The big problem was the memory consumption (especially in >> IE) because of the large amount of DOM manipulation that is done when >> panning and zooming and drawing vector's (the cars, with fills, > stroke, >> label etc.) >> >> Since using a plugin is out of the question here I began investigating >> the html5 canvas. >> I know it's not supported in IE, but for me that was a good thing >> because it gave me the opportunity to have the client choose a > different >> browser then IE. >> >> My plans for the future of the app is to also use workers and the >> browser database (to be able to store historical responses clientside > to >> draw a route the car has followed for the last 10 minutes or so) >> >> Also I think the canvas gives us the opportunity to create a print >> control or a save map as, because in the end it's just an image. (have >> to combine the layer specific canvasses into one but that's easy ;-)) >> >> If you have any other ideas or see different opportunities let me > know, >> my client is fundning me to experiment with html5 so I might be able > to >> spent some time on other's feature requests ;-) >> >> Cheers Kris >> >> >> -----Original Message----- >> From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] >> Sent: Thursday, November 19, 2009 6:53 AM >> To: Kris Geusebroek >> Cc: OpenLayers Users >> Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers >> >> On Wednesday, November 18, 2009, Kris Geusebroek > >> wrote: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Hi All, >>> >>> >>> >>> I'm currently investigating the >>> possibilities of integrating html5 functionality into openlayers. >>> >>> My first try is using canvas for a layer >>> instead of div's >>> >>> >>> >>> I've setup a sandbox which you can >>> use to have a look: >> > http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache >> Canvas.html >>> >>> >>> >>> This is the first example to show it's >>> possible ;-). Only features now are zoom and pan without the resize >> transition effect. >>> >>> If anyone has remarks, ideas, feature >>> requests, help offerings etc. Feel free to contact me. >> >> This is cool! >> >> May I ask what's your goal with displaying tiles using canvas? Is it >> performance? I have never played with canvas so I'm interested to know >> and talk about what it can bring to OpenLayers. >> >> Thanks Kris, >> >> -- >> 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 >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ahocevar at opengeo.org Sun Nov 22 15:13:31 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Vector disappears when zooming in (sometimes) In-Reply-To: <1258811478604-4042647.post@n2.nabble.com> References: <1258762496966-4040736.post@n2.nabble.com> <4B07B3E5.1050404@opengeo.org> <1258811478604-4042647.post@n2.nabble.com> Message-ID: <4B099B6B.6060701@opengeo.org> Hi, Tommy74 wrote: > What does "renderer runs out of coordinate space" really mean? Is > there a limitation in OpenLayers/VML or is this a common > GIS-"feature"? Can it be fixed or is it possible to do a > simple workaround? The problem is that at high resolutions, when you have points that are too far apart, your drawing coordinates get larger than VML can handle. > The vector data is not a static file, but is created as GeoJSON on the > server in my real application, but that's a custom geojson generator, > not a WFS or FeatureServer. So maybe you could give your custom geojson generator a bbox filter? > Unfortunately there is no time to change the type of datasource at the > moment. The goal is to serve the data from WMS instead (in a later > version), since its a lot of data. The example that I linked to is a > reduced geometry. Yeah, WMS would be a good solution in that case. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From sigenz at yahoo.co.nz Sun Nov 22 15:35:33 2009 From: sigenz at yahoo.co.nz (Sige) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] wrapDateLine with WMS, map covered by opaque film In-Reply-To: <1258425446167-4016174.post@n2.nabble.com> References: <1258425446167-4016174.post@n2.nabble.com> Message-ID: <1258922133220-4047649.post@n2.nabble.com> I found that wrapDateLine tries to request http://maps.geonet.org.nz/tilecache/tilecache.py?LAYERS=nasagm&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,-270,0,-180&WIDTH=256&HEIGHT=256 map tiles outside the map extent , such as: [-90.0, -270.0, 0.0, -180.0], which our tilecache server is unable to retrieve and responds with an error message: An error occurred: couldn't calculate tile index for layer nasagm from ([0.0, -270.0, 90.0, -180.0]) File "/usr/local/tilecache/TileCache/Service.py", line 421, in modPythonHandler host ) While the WMS server of metacarta is able to handle such http://labs.metacarta.com/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,-270,0,-180&WIDTH=256&HEIGHT=256 request , and responds with an empty blue tile, I guess this might be the reason for the problem mentioned in my previous post. What should I do on the tilecache server side to handle request outside the map extent? Sige Sige wrote: > > Hi List, > > I am trying to make my wms (tilecached) map wrapped across the date line, > like: > > var map = new OpenLayers.Map( $('map'), > { > maxResolution: 0.3515625, > projection: 'EPSG:4326' > } > ); > var wms = new OpenLayers.Layer.WMS( > "WMS/Tilecache", > "http://maps.geonet.org.nz/tilecache/tilecache.py?", > { > format: 'image/png', > projection: 'EPSG:4326', > units: 'degrees', > maxResolution: 0.3515625, > layers: 'nasagm', > isBaseLayer: true, > reproject: false, > buffer: 1 > }, > {wrapDateLine: true, reproject: false} > ); > map.addLayer(wms); > map.addControl(new OpenLayers.Control.MousePosition()); > map.zoomToMaxExtent(); > > The map wrapped well, however, when I pan and zoom the map around, part of > the map or the whole map becomes opaque (like covered by a white film). I > am not sure if this is caused by my wms (tilecache) or wrapDateLine. The > WMS map works fine without wrapDateLine. > > I have also tried the WMS from metacarta.com (mapServer) which works fine: > var wms1 = new OpenLayers.Layer.WMS( "OpenLayers Basic",//MapServer > "http://labs.metacarta.com/wms/vmap0", > {layers: 'basic'}, > {wrapDateLine: true} ); > map.addLayers([ wms1]); > > Thanks, > > Sige > -- View this message in context: http://n2.nabble.com/wrapDateLine-with-WMS-map-covered-by-opaque-film-tp4016174p4047649.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From srweal at gmail.com Sun Nov 22 17:39:24 2009 From: srweal at gmail.com (srweal) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] mapExtents for Layer vs mapExtents for Map In-Reply-To: <1258698513185-4036288.post@n2.nabble.com> References: <1258698513185-4036288.post@n2.nabble.com> Message-ID: <1258929564307-4048054.post@n2.nabble.com> Actually, to simplify this question a bit, can someone please just explain how the setting for mapExtents on a Layer, as opposed to setting mapExtents on the Map differ? I'm particularly interested in whether they each limit the tiles requested from the servers. My situation is that I have a large extent I want visible on the map, but have multiple different layers that each provide tiles for smaller parts of the map extent, so I want them to only request tiles from the appropriate areas. -- View this message in context: http://n2.nabble.com/mapExtents-for-Layer-vs-mapExtents-for-Map-tp4036288p4048054.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Mon Nov 23 01:32:52 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] mapExtents for Layer vs mapExtents for Map In-Reply-To: <1258929564307-4048054.post@n2.nabble.com> References: <1258698513185-4036288.post@n2.nabble.com> <1258929564307-4048054.post@n2.nabble.com> Message-ID: <4B0A2C94.8040302@opengeo.org> Hi, srweal wrote: > Actually, to simplify this question a bit, can someone please just explain > how the setting for mapExtents on a Layer, as opposed to setting mapExtents > on the Map differ? > The maxExtent of the active base layer takes precedence over the maxExtent of the map. For overlays, maxExtent is only used to determine if the layer is to be displayed or not, i.e. if it would be visible in the current viewport. > I'm particularly interested in whether they each limit the tiles requested > from the servers. My situation is that I have a large extent I want visible > on the map, but have multiple different layers that each provide tiles for > smaller parts of the map extent, so I want them to only request tiles from > the appropriate areas. > In that case you would set a large maxExtent of the map (or base layer), and small maxExtents for your other layers. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From eric.lemoine at camptocamp.com Mon Nov 23 01:33:35 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] mapExtents for Layer vs mapExtents for Map In-Reply-To: <1258698513185-4036288.post@n2.nabble.com> References: <1258698513185-4036288.post@n2.nabble.com> Message-ID: On Friday, November 20, 2009, srweal wrote: > > Hi there, > > I'm a new OpenLayers user and am struggling with the use of the mapExtent > setting. ?I have a WMS that renders imagery for me, which is being accessed > through a TileCache. ?The imagery only covers part of my entire map, so I > want to make sure OpenLayers is not requesting image tiles for areas beyond > the extent of the layer. > > However, when I set a mapExtent on my WMS layer to something like > (135,-45,180,0), it is still displaying 'pink tiles' over top of the base > layer of the map (which has mapExtent -something like 180,-90,180,90). ?This > seems wrong, as the WMS layer may be set up to only return tiles inside the > BBOX (135,-45,180,0). ?Am I missing something here with the way these > options are supposed to work? ?Please explain. OpenLayers uses the current base layer's maxExtent as the max extent for the map. So your WMS layer must be a base layer for its maxExtent to be taken into account. Also, make sure you use "maxExtent", and not "mapExtent". 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 srweal at gmail.com Mon Nov 23 01:41:46 2009 From: srweal at gmail.com (srweal) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] maxExtents for Layer vs maxExtents for Map In-Reply-To: <4B0A2C94.8040302@opengeo.org> References: <1258698513185-4036288.post@n2.nabble.com> <1258929564307-4048054.post@n2.nabble.com> <4B0A2C94.8040302@opengeo.org> Message-ID: <1258958506417-4049378.post@n2.nabble.com> Thanks Andreas and Eric for your responses. But I still have one remaining question. If I set maxExtents on a WMS overlay layer and it is smaller than the maxExtents of my map, will tiles be requested from the WMS (or TileCache) for areas that are outside the bounds specified for the WMS layer, but still within the viewport that is showing the larger extent of the map? Steve Andreas Hocevar-2 wrote: > > Hi, > > srweal wrote: >> Actually, to simplify this question a bit, can someone please just >> explain >> how the setting for mapExtents on a Layer, as opposed to setting >> mapExtents >> on the Map differ? >> > > The maxExtent of the active base layer takes precedence over the > maxExtent of the map. For overlays, maxExtent is only used to determine > if the layer is to be displayed or not, i.e. if it would be visible in > the current viewport. > >> I'm particularly interested in whether they each limit the tiles >> requested >> from the servers. My situation is that I have a large extent I want >> visible >> on the map, but have multiple different layers that each provide tiles >> for >> smaller parts of the map extent, so I want them to only request tiles >> from >> the appropriate areas. >> > > In that case you would set a large maxExtent of the map (or base layer), > and small maxExtents for your other layers. > > Regards, > Andreas. > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/mapExtents-for-Layer-vs-mapExtents-for-Map-tp4036288p4049378.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Mon Nov 23 01:44:02 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: References: Message-ID: On Thursday, November 19, 2009, Kris Geusebroek wrote: > Hi Eric, Hi Kris. Thanks for response. > > Indeed it's cool, thanks. > My goal was to write an application with open source technologies to > track cars driving around. > I wrote a prototype with geoserver and openlayers and this was > succesfull. The big problem was the memory consumption (especially in > IE) because of the large amount of DOM manipulation that is done when > panning and zooming do you manage to actually lower memory consumption with your Canvas-based tiles? IIRC an image tile is two DOM elements (a div and an img). How many elements is a Canvas tile? One? > and drawing vector's (the cars, with fills, stroke, > label etc.) > > Since using a plugin is out of the question here I began investigating > the html5 canvas. > I know it's not supported in IE, but for me that was a good thing > because it gave me the opportunity to have the client choose a different > browser then IE. > > My plans for the future of the app is to also use workers and the > browser database (to be able to store historical responses clientside to > draw a route the car has followed for the last 10 minutes or so) This could be written as a OpenLayers.Protocol. Chris Schmidt started an HTML5 Protocol a while back if I recall correctly. You may want to check this with him. 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 Mon Nov 23 02:12:18 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] mapExtents for Layer vs mapExtents for Map In-Reply-To: <4B0A2C94.8040302@opengeo.org> References: <1258698513185-4036288.post@n2.nabble.com> <1258929564307-4048054.post@n2.nabble.com> <4B0A2C94.8040302@opengeo.org> Message-ID: On Monday, November 23, 2009, Andreas Hocevar wrote: > Hi, > > srweal wrote: >> Actually, to simplify this question a bit, can someone please just explain >> how the setting for mapExtents on a Layer, as opposed to setting mapExtents >> on the Map differ? >> > > The maxExtent of the active base layer takes precedence over the > maxExtent of the map. For overlays, maxExtent is only used to determine > if the layer is to be displayed or not, i.e. if it would be visible in > the current viewport. are you sure about that Andreas? I thought only minResolution and maxResolution were looked at to determine whether an overlay is to be displayed. I may be wrong, and would appreciate being corrected and pointed to the relevant code in that case. Thanks, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ahocevar at opengeo.org Mon Nov 23 02:28:01 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] mapExtents for Layer vs mapExtents for Map In-Reply-To: References: <1258698513185-4036288.post@n2.nabble.com> <1258929564307-4048054.post@n2.nabble.com> <4B0A2C94.8040302@opengeo.org> Message-ID: <4B0A3981.3090508@opengeo.org> Eric Lemoine wrote: > On Monday, November 23, 2009, Andreas Hocevar wrote: > >> Hi, >> >> srweal wrote: >> >>> Actually, to simplify this question a bit, can someone please just explain >>> how the setting for mapExtents on a Layer, as opposed to setting mapExtents >>> on the Map differ? >>> >>> >> The maxExtent of the active base layer takes precedence over the >> maxExtent of the map. For overlays, maxExtent is only used to determine >> if the layer is to be displayed or not, i.e. if it would be visible in >> the current viewport. >> > > are you sure about that Andreas? I thought only minResolution and > maxResolution were looked at to determine whether an overlay is to be > displayed. I may be wrong, and would appreciate being corrected and > pointed to the relevant code in that case. Thanks, > You are right, calculateInRange (which turns layer visibility on and off) only uses min/maxResolution. OpenLayers.Tile::draw determines tiles to be loaded by checking interectsBounds of the viewport with the layers maxExtent. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Mon Nov 23 02:28:48 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] maxExtents for Layer vs maxExtents for Map In-Reply-To: <1258958506417-4049378.post@n2.nabble.com> References: <1258698513185-4036288.post@n2.nabble.com> <1258929564307-4048054.post@n2.nabble.com> <4B0A2C94.8040302@opengeo.org> <1258958506417-4049378.post@n2.nabble.com> Message-ID: <4B0A39B0.8040009@opengeo.org> srweal wrote: > Thanks Andreas and Eric for your responses. But I still have one remaining > question. > > If I set maxExtents on a WMS overlay layer and it is smaller than the > maxExtents of my map, will tiles be requested from the WMS (or TileCache) > for areas that are outside the bounds specified for the WMS layer, but still > within the viewport that is showing the larger extent of the map? > Only if you set displayOutsideMaxExtent to true. Regards, Andreas. > Steve > > > Andreas Hocevar-2 wrote: > >> Hi, >> >> srweal wrote: >> >>> Actually, to simplify this question a bit, can someone please just >>> explain >>> how the setting for mapExtents on a Layer, as opposed to setting >>> mapExtents >>> on the Map differ? >>> >>> >> The maxExtent of the active base layer takes precedence over the >> maxExtent of the map. For overlays, maxExtent is only used to determine >> if the layer is to be displayed or not, i.e. if it would be visible in >> the current viewport. >> >> >>> I'm particularly interested in whether they each limit the tiles >>> requested >>> from the servers. My situation is that I have a large extent I want >>> visible >>> on the map, but have multiple different layers that each provide tiles >>> for >>> smaller parts of the map extent, so I want them to only request tiles >>> from >>> the appropriate areas. >>> >>> >> In that case you would set a large maxExtent of the map (or base layer), >> and small maxExtents for your other layers. >> >> Regards, >> Andreas. >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> _______________________________________________ >> 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 steffen.schwarz85 at googlemail.com Mon Nov 23 02:36:27 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS + Filter Message-ID: <1258961787884-4049517.post@n2.nabble.com> Hello, I have a wfs layer with some points. Now I want to add a filter to this wfs layer, that only certain points are displayed. Here is the code: var my_filter = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "NAME", value: "Point_1" }); var my_layer = new OpenLayers.Layer.WFS("Points", "http://localhost:8080/geoserver/wfs", { typename: "topp:my_layer", filter: my_filter, maxfeatures: 1000 }, { featureClass: OpenLayers.Feature.WFS }); But when I start my html file, no point is shown on my map (the point with the name Point_1 is surely excisting). When I start my html file without the filter:my_filter in the wfs all points of my wfs are displayed. Is something wrong with my filter? Thanks for your help. Regards stash -- View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4049517.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Mon Nov 23 02:43:17 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] mapExtents for Layer vs mapExtents for Map In-Reply-To: <4B0A3981.3090508@opengeo.org> References: <1258698513185-4036288.post@n2.nabble.com> <1258929564307-4048054.post@n2.nabble.com> <4B0A2C94.8040302@opengeo.org> <4B0A3981.3090508@opengeo.org> Message-ID: On Mon, Nov 23, 2009 at 8:28 AM, Andreas Hocevar wrote: > Eric Lemoine wrote: >> >> On Monday, November 23, 2009, Andreas Hocevar >> wrote: >> >>> >>> Hi, >>> >>> srweal wrote: >>> >>>> >>>> Actually, to simplify this question a bit, can someone please just >>>> explain >>>> how the setting for mapExtents on a Layer, as opposed to setting >>>> mapExtents >>>> on the Map differ? >>>> >>>> >>> >>> The maxExtent of the active base layer takes precedence over the >>> maxExtent of the map. For overlays, maxExtent is only used to determine >>> if the layer is to be displayed or not, i.e. if it would be visible in >>> the current viewport. >>> >> >> are you sure about that Andreas? I thought only minResolution and >> maxResolution were looked at to determine whether an overlay is to be >> displayed. I may be wrong, and would appreciate being corrected and >> pointed to the relevant code in that case. Thanks, >> > > You are right, calculateInRange (which turns layer visibility on and off) > only uses min/maxResolution. OpenLayers.Tile::draw determines tiles to be > loaded by checking interectsBounds of the viewport with the layers > maxExtent. cool, never realized that. Thanks, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ahocevar at opengeo.org Mon Nov 23 03:03:12 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <1258961787884-4049517.post@n2.nabble.com> References: <1258961787884-4049517.post@n2.nabble.com> Message-ID: <4B0A41C0.2030802@opengeo.org> Hi, Please use Layer.Vector with a BBOX strategy and a WFS protocol instead of Layer.WMS and see if it works then. Also double-check if your Point_1 is in the viewport, otherwise it won't be loaded because your custom filter is combined with a BBOX filter for the viewport. Regards, Andreas. stash wrote: > Hello, > I have a wfs layer with some points. Now I want to add a filter to this wfs > layer, that only certain points are displayed. > > Here is the code: > > var my_filter = new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.EQUAL_TO, > property: "NAME", > value: "Point_1" > }); > var my_layer = new OpenLayers.Layer.WFS("Points", > "http://localhost:8080/geoserver/wfs", > { typename: "topp:my_layer", filter: my_filter, maxfeatures: > 1000 }, > { featureClass: OpenLayers.Feature.WFS }); > > > But when I start my html file, no point is shown on my map (the point with > the name Point_1 is surely excisting). When I start my html file without the > filter:my_filter in the wfs all points of my wfs are displayed. > > Is something wrong with my filter? > > Thanks for your help. > > Regards > stash > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From kgeusebroek at xebia.com Mon Nov 23 02:58:50 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: References: Message-ID: Hi Eric, I haven't measured the memory use yet. But I'm implementing the tilecache layer with a single canvas, all images are loaded through a javascript Image object and when all are loaded they are 'drawn' in the single canvas. This way the number of dom elements is significantly lower. Thanks for the hint on the protocol. When I'm ready to implement that I will sure have a look into the protocol types that are around. Cheers Kris -----Original Message----- From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] Sent: Monday, November 23, 2009 7:44 AM To: Kris Geusebroek Cc: OpenLayers Users Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers On Thursday, November 19, 2009, Kris Geusebroek wrote: > Hi Eric, Hi Kris. Thanks for response. > > Indeed it's cool, thanks. > My goal was to write an application with open source technologies to > track cars driving around. > I wrote a prototype with geoserver and openlayers and this was > succesfull. The big problem was the memory consumption (especially in > IE) because of the large amount of DOM manipulation that is done when > panning and zooming do you manage to actually lower memory consumption with your Canvas-based tiles? IIRC an image tile is two DOM elements (a div and an img). How many elements is a Canvas tile? One? > and drawing vector's (the cars, with fills, stroke, > label etc.) > > Since using a plugin is out of the question here I began investigating > the html5 canvas. > I know it's not supported in IE, but for me that was a good thing > because it gave me the opportunity to have the client choose a different > browser then IE. > > My plans for the future of the app is to also use workers and the > browser database (to be able to store historical responses clientside to > draw a route the car has followed for the last 10 minutes or so) This could be written as a OpenLayers.Protocol. Chris Schmidt started an HTML5 Protocol a while back if I recall correctly. You may want to check this with him. 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 adam at prema.co.nz Mon Nov 23 03:14:26 2009 From: adam at prema.co.nz (Adam Ratcliffe) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: References: <6355937c0911201544y1bb25d9dvd71264bcc6b8537f@mail.gmail.com> <6355937c0911201654hbc544d4sf1c4f4f9262a65e@mail.gmail.com> Message-ID: <58BD1722-43E6-45CD-AF66-C1E8BC2F8598@prema.co.nz> OK, that makes sense. Will be interesting to hear more of how this works out with a browser-based database. Cheers Adam On 23/11/2009, at 8:43 AM, Kris Geusebroek wrote: > Hi Adam, > > As Chris rightly point out there is already a canvas implementation > of the OpenLayers.Renderer which can be used instead of VML or SVG > renderer. > My changes for using canvas in OpenLayers are currently > concentrating on the other layer types like WMS or Grid layers. > > Cheers Kris > > > > > -----Original Message----- > From: adam.ratcliffe@gmail.com [mailto:adam.ratcliffe@gmail.com] On > Behalf Of Adam Ratcliffe > Sent: Saturday, November 21, 2009 1:54 AM > To: Kris Geusebroek > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers > > Hi Kris, > > I'm fairly new to OpenLayers and assumed that when creating a vector > layer for use with wfs-t that the layer features would be rendered > using either SVG or VML, thus allowing for the full range of mouse > interactions that other DOM elements support (click, mouseover, > mouseout etc). > > With the canvas implementation how do you support edting of a polygon > for instance? > > Cheers > Adam > > On Sat, Nov 21, 2009 at 1:32 PM, Kris Geusebroek > wrote: >> Hi Adam, >> >> I think it doesn't make a difference in the current way OpenLayers >> works >> other then replacing a lot of div's by a single canvas. Nothing to do >> with interactivity I guess. >> >> The current div based vector layer can be used together with wfs-t or >> getfeatureinfo request to make it interactive. >> >> And together with the refresh strategy (in trunk) you can make it >> look >> like you are following the changes in data near real time. >> >> >> Perhaps I misunderstood your remark. If so feel free to contact me >> >> Cheers Kris >> >> -----Original Message----- >> From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org >> ] >> On Behalf Of Adam Ratcliffe >> Sent: Saturday, November 21, 2009 12:45 AM >> To: users@openlayers.org >> Subject: Re: [OpenLayers-Users] First try with html5 canvas for >> layers >> >> Hi Kris, >> >> Am I correct in thinking this technique would be useful for >> displaying >> read-only vector data only? Or are you considering an approach such >> as overlaying a transparent image map to allow interactivity? >> >> Cheers >> Adam >> >> On Thu, Nov 19, 2009 at 8:58 PM, Kris Geusebroek > > >> wrote: >>> Hi Eric, >>> >>> Indeed it's cool, thanks. >>> My goal was to write an application with open source technologies to >>> track cars driving around. >>> I wrote a prototype with geoserver and openlayers and this was >>> succesfull. The big problem was the memory consumption (especially >>> in >>> IE) because of the large amount of DOM manipulation that is done >>> when >>> panning and zooming and drawing vector's (the cars, with fills, >> stroke, >>> label etc.) >>> >>> Since using a plugin is out of the question here I began >>> investigating >>> the html5 canvas. >>> I know it's not supported in IE, but for me that was a good thing >>> because it gave me the opportunity to have the client choose a >> different >>> browser then IE. >>> >>> My plans for the future of the app is to also use workers and the >>> browser database (to be able to store historical responses >>> clientside >> to >>> draw a route the car has followed for the last 10 minutes or so) >>> >>> Also I think the canvas gives us the opportunity to create a print >>> control or a save map as, because in the end it's just an image. >>> (have >>> to combine the layer specific canvasses into one but that's >>> easy ;-)) >>> >>> If you have any other ideas or see different opportunities let me >> know, >>> my client is fundning me to experiment with html5 so I might be able >> to >>> spent some time on other's feature requests ;-) >>> >>> Cheers Kris >>> >>> >>> -----Original Message----- >>> From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] >>> Sent: Thursday, November 19, 2009 6:53 AM >>> To: Kris Geusebroek >>> Cc: OpenLayers Users >>> Subject: Re: [OpenLayers-Users] First try with html5 canvas for >>> layers >>> >>> On Wednesday, November 18, 2009, Kris Geusebroek >> >>> wrote: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Hi All, >>>> >>>> >>>> >>>> I'm currently investigating the >>>> possibilities of integrating html5 functionality into openlayers. >>>> >>>> My first try is using canvas for a layer >>>> instead of div's >>>> >>>> >>>> >>>> I've setup a sandbox which you can >>>> use to have a look: >>> >> http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache >>> Canvas.html >>>> >>>> >>>> >>>> This is the first example to show it's >>>> possible ;-). Only features now are zoom and pan without the resize >>> transition effect. >>>> >>>> If anyone has remarks, ideas, feature >>>> requests, help offerings etc. Feel free to contact me. >>> >>> This is cool! >>> >>> May I ask what's your goal with displaying tiles using canvas? Is it >>> performance? I have never played with canvas so I'm interested to >>> know >>> and talk about what it can bring to OpenLayers. >>> >>> Thanks Kris, >>> >>> -- >>> 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 >>> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> From kgeusebroek at xebia.com Mon Nov 23 03:15:44 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] First try with html5 canvas for layers In-Reply-To: <58BD1722-43E6-45CD-AF66-C1E8BC2F8598@prema.co.nz> References: <6355937c0911201544y1bb25d9dvd71264bcc6b8537f@mail.gmail.com> <6355937c0911201654hbc544d4sf1c4f4f9262a65e@mail.gmail.com> <58BD1722-43E6-45CD-AF66-C1E8BC2F8598@prema.co.nz> Message-ID: Me too ;-). Unfortunately this is not the first thing I'm going to work on, first need to make the current functionality work with canvas. But you can follow the progress by checking my sandbox on http://dev.openlayers.org/sandbox/krisgeus/openlayers I added 2 examples already: http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache Canvas.html and http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/transitio nWithCanvas.html If you find any bugs or strange behavior please let me know. Cheers Kris -----Original Message----- From: Adam Ratcliffe [mailto:adam.ratcliffe@gmail.com] On Behalf Of Adam Ratcliffe Sent: Monday, November 23, 2009 9:14 AM To: Kris Geusebroek Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers OK, that makes sense. Will be interesting to hear more of how this works out with a browser-based database. Cheers Adam On 23/11/2009, at 8:43 AM, Kris Geusebroek wrote: > Hi Adam, > > As Chris rightly point out there is already a canvas implementation > of the OpenLayers.Renderer which can be used instead of VML or SVG > renderer. > My changes for using canvas in OpenLayers are currently > concentrating on the other layer types like WMS or Grid layers. > > Cheers Kris > > > > > -----Original Message----- > From: adam.ratcliffe@gmail.com [mailto:adam.ratcliffe@gmail.com] On > Behalf Of Adam Ratcliffe > Sent: Saturday, November 21, 2009 1:54 AM > To: Kris Geusebroek > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] First try with html5 canvas for layers > > Hi Kris, > > I'm fairly new to OpenLayers and assumed that when creating a vector > layer for use with wfs-t that the layer features would be rendered > using either SVG or VML, thus allowing for the full range of mouse > interactions that other DOM elements support (click, mouseover, > mouseout etc). > > With the canvas implementation how do you support edting of a polygon > for instance? > > Cheers > Adam > > On Sat, Nov 21, 2009 at 1:32 PM, Kris Geusebroek > wrote: >> Hi Adam, >> >> I think it doesn't make a difference in the current way OpenLayers >> works >> other then replacing a lot of div's by a single canvas. Nothing to do >> with interactivity I guess. >> >> The current div based vector layer can be used together with wfs-t or >> getfeatureinfo request to make it interactive. >> >> And together with the refresh strategy (in trunk) you can make it >> look >> like you are following the changes in data near real time. >> >> >> Perhaps I misunderstood your remark. If so feel free to contact me >> >> Cheers Kris >> >> -----Original Message----- >> From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org >> ] >> On Behalf Of Adam Ratcliffe >> Sent: Saturday, November 21, 2009 12:45 AM >> To: users@openlayers.org >> Subject: Re: [OpenLayers-Users] First try with html5 canvas for >> layers >> >> Hi Kris, >> >> Am I correct in thinking this technique would be useful for >> displaying >> read-only vector data only? Or are you considering an approach such >> as overlaying a transparent image map to allow interactivity? >> >> Cheers >> Adam >> >> On Thu, Nov 19, 2009 at 8:58 PM, Kris Geusebroek > > >> wrote: >>> Hi Eric, >>> >>> Indeed it's cool, thanks. >>> My goal was to write an application with open source technologies to >>> track cars driving around. >>> I wrote a prototype with geoserver and openlayers and this was >>> succesfull. The big problem was the memory consumption (especially >>> in >>> IE) because of the large amount of DOM manipulation that is done >>> when >>> panning and zooming and drawing vector's (the cars, with fills, >> stroke, >>> label etc.) >>> >>> Since using a plugin is out of the question here I began >>> investigating >>> the html5 canvas. >>> I know it's not supported in IE, but for me that was a good thing >>> because it gave me the opportunity to have the client choose a >> different >>> browser then IE. >>> >>> My plans for the future of the app is to also use workers and the >>> browser database (to be able to store historical responses >>> clientside >> to >>> draw a route the car has followed for the last 10 minutes or so) >>> >>> Also I think the canvas gives us the opportunity to create a print >>> control or a save map as, because in the end it's just an image. >>> (have >>> to combine the layer specific canvasses into one but that's >>> easy ;-)) >>> >>> If you have any other ideas or see different opportunities let me >> know, >>> my client is fundning me to experiment with html5 so I might be able >> to >>> spent some time on other's feature requests ;-) >>> >>> Cheers Kris >>> >>> >>> -----Original Message----- >>> From: Eric Lemoine [mailto:eric.lemoine@camptocamp.com] >>> Sent: Thursday, November 19, 2009 6:53 AM >>> To: Kris Geusebroek >>> Cc: OpenLayers Users >>> Subject: Re: [OpenLayers-Users] First try with html5 canvas for >>> layers >>> >>> On Wednesday, November 18, 2009, Kris Geusebroek >> >>> wrote: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Hi All, >>>> >>>> >>>> >>>> I'm currently investigating the >>>> possibilities of integrating html5 functionality into openlayers. >>>> >>>> My first try is using canvas for a layer >>>> instead of div's >>>> >>>> >>>> >>>> I've setup a sandbox which you can >>>> use to have a look: >>> >> http://dev.openlayers.org/sandbox/krisgeus/openlayers/examples/tilecache >>> Canvas.html >>>> >>>> >>>> >>>> This is the first example to show it's >>>> possible ;-). Only features now are zoom and pan without the resize >>> transition effect. >>>> >>>> If anyone has remarks, ideas, feature >>>> requests, help offerings etc. Feel free to contact me. >>> >>> This is cool! >>> >>> May I ask what's your goal with displaying tiles using canvas? Is it >>> performance? I have never played with canvas so I'm interested to >>> know >>> and talk about what it can bring to OpenLayers. >>> >>> Thanks Kris, >>> >>> -- >>> 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 >>> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> From srweal at gmail.com Mon Nov 23 03:27:48 2009 From: srweal at gmail.com (srweal) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] mapExtents for Layer vs mapExtents for Map In-Reply-To: <4B0A3981.3090508@opengeo.org> References: <1258698513185-4036288.post@n2.nabble.com> <1258929564307-4048054.post@n2.nabble.com> <4B0A2C94.8040302@opengeo.org> <4B0A3981.3090508@opengeo.org> Message-ID: <1258964868402-4049707.post@n2.nabble.com> I am seeing behavior different to what you describe. I have a WMS layer providing data over Australia (using tilecache.py) and if I set it up to have no BBOX restriction set on the TileCache, then transparent tiles are requested and provided when my map viewport is showing other parts of the world (e.g. zoomed in on Africa). However, if I set a BBOX restriction on my TileCache and also set the same as a maxExtent on the WMS layer, then I get pink tiles displayed over Africa when I zoom in there, while my actual data tiles display over Australia when it is in the viewport. I was expecting to have no tiles requested when zoomed on Africa with the maxExtent of my WMS set to Australia. Something must be wrong. I've checked my settings a few times now, but being fairly new to OpenLayers I wonder what I might be missing. Can anyone else test this and confirm that this does/doesn't work? Ta, Steve Andreas Hocevar-2 wrote: > > Eric Lemoine wrote: >> On Monday, November 23, 2009, Andreas Hocevar >> wrote: >> >>> Hi, >>> >>> srweal wrote: >>> >>>> Actually, to simplify this question a bit, can someone please just >>>> explain >>>> how the setting for mapExtents on a Layer, as opposed to setting >>>> mapExtents >>>> on the Map differ? >>>> >>>> >>> The maxExtent of the active base layer takes precedence over the >>> maxExtent of the map. For overlays, maxExtent is only used to determine >>> if the layer is to be displayed or not, i.e. if it would be visible in >>> the current viewport. >>> >> >> are you sure about that Andreas? I thought only minResolution and >> maxResolution were looked at to determine whether an overlay is to be >> displayed. I may be wrong, and would appreciate being corrected and >> pointed to the relevant code in that case. Thanks, >> > > You are right, calculateInRange (which turns layer visibility on and > off) only uses min/maxResolution. OpenLayers.Tile::draw determines tiles > to be loaded by checking interectsBounds of the viewport with the layers > maxExtent. > > Regards, > Andreas. > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/mapExtents-for-Layer-vs-mapExtents-for-Map-tp4036288p4049707.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Mon Nov 23 04:14:19 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <4B0A41C0.2030802@opengeo.org> References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> Message-ID: <1258967659865-4049908.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > Hi, > > Please use Layer.Vector with a BBOX strategy and a WFS protocol instead > of Layer.WMS and see if it works then. Also double-check if your Point_1 > is in the viewport, otherwise it won't be loaded because your custom > filter is combined with a BBOX filter for the viewport. > > Hi, thanks for the hint. But can you tell me how to implement such a bbox strategy and a wfs protocol? I'm a beginner in programming with openlayers and I've never heard this before. What do you mean by double-check? Thanks for your answer regards stash -- View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4049908.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Mon Nov 23 04:19:32 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <1258967659865-4049908.post@n2.nabble.com> References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> Message-ID: <4B0A53A4.2010304@opengeo.org> stash wrote: > > Andreas Hocevar-2 wrote: > >> Hi, >> >> Please use Layer.Vector with a BBOX strategy and a WFS protocol instead >> of Layer.WMS and see if it works then. Also double-check if your Point_1 >> is in the viewport, otherwise it won't be loaded because your custom >> filter is combined with a BBOX filter for the viewport. >> >> >> > > Hi, > thanks for the hint. But can you tell me how to implement such a bbox > strategy and a wfs protocol? I'm a beginner in programming with openlayers > and I've never heard this before. > Learn by example: http://www.openlayers.org/dev/examples/wfs-protocol.html > What do you mean by double-check? > I was just saying that it might be the case that your point is not returned from the WFS because it is not inside the bounding box of your current map viewport. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From igrcic at gmail.com Mon Nov 23 04:48:40 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <4B0A53A4.2010304@opengeo.org> References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> Message-ID: http://n2.nabble.com/request-and-parse-GML-td3991309.html On Mon, Nov 23, 2009 at 10:19 AM, Andreas Hocevar wrote: > stash wrote: >> >> Andreas Hocevar-2 wrote: >> >>> Hi, >>> >>> Please use Layer.Vector with a BBOX strategy and a WFS protocol instead >>> of Layer.WMS and see if it works then. Also double-check if your Point_1 >>> is in the viewport, otherwise it won't be loaded because your custom >>> filter is combined with a BBOX filter for the viewport. >>> >>> >>> >> >> Hi, >> thanks for the hint. But can you tell me how to implement such a bbox >> strategy and a wfs protocol? I'm a beginner in programming with openlayers >> and I've never heard this before. >> > > Learn by example: http://www.openlayers.org/dev/examples/wfs-protocol.html > > >> What do you mean by double-check? >> > > I was just saying that it might be the case that your point is not > returned from the WFS because it is not inside the bounding box of your > current map viewport. > > > Regards, > Andreas. > > -- > 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 n.e.kendall at gmail.com Mon Nov 23 10:55:16 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Single file build deployment: control images not loading Message-ID: <33fd44f90911230755q2c829648wc6f822f782ad6e63@mail.gmail.com> Hi all, I've just followed the instructions to make a single-file OL 2.8 build and the images for the zoom-controls aren't loading. I followed the instructions for linux on the site and I got this error "IOError: [Errno 2] No such file or directory: '../lib/OpenLayers/BaseTypes.js' I didn't think much of it, and proceeded to upload the created OL.js and copying the theme and nested img directories into my js directory on the server. Now when the app loads the zoom bar doesn't show up, and the images for navigation show up with broken links. I've copied the image location, which is referencing the img directory in the correct place (i.e. site/js/img) but it is referencing an image which doesn't appear to be in the directory "east-mini.png" or "zoom-plus-mini.png." The same is true for the layer select tab. The scale bar shows up fine. Has anyone run into this issue? and does anyone have suggestions on how to fix this? Some superficial googling and running through the email lists didn't turn anything up. -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091123/8cbaf45d/attachment.html From pedropbaracho at gmail.com Mon Nov 23 13:48:51 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] SLD_BODY and FeatureId / GmlObjectId Message-ID: <5e3c00490911231048v1622c5c6x6fe5106f5b080b06@mail.gmail.com> Does anyone have an example of a SLD using as a Filter the FeatureId or GmlObjectId option? I am trying to use it but I don't get any results. Here is my SLD code: Layer UserSelection FF0000 Thanks for the help. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091123/c41a3e07/attachment.html From bartvde at osgis.nl Mon Nov 23 13:57:36 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] SLD_BODY and FeatureId / GmlObjectId In-Reply-To: <5e3c00490911231048v1622c5c6x6fe5106f5b080b06@mail.gmail.com> References: <5e3c00490911231048v1622c5c6x6fe5106f5b080b06@mail.gmail.com> Message-ID: <1367.87.212.162.59.1259002656.squirrel@webmail.hostingdiscounter.nl> Hi, this is not really an OpenLayers question, but more a question for the mailing list of your WMS product. Best regards, Bart > Does anyone have an example of a SLD using as a Filter the FeatureId or > GmlObjectId option? > > I am trying to use it but I don't get any results. > > Here is my SLD code: > > > > Layer > UserSelection > > > > FF0000 > > > > > Thanks for the help. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From pedropbaracho at gmail.com Mon Nov 23 14:07:01 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] SLD_BODY and FeatureId / GmlObjectId In-Reply-To: <1367.87.212.162.59.1259002656.squirrel@webmail.hostingdiscounter.nl> References: <5e3c00490911231048v1622c5c6x6fe5106f5b080b06@mail.gmail.com> <1367.87.212.162.59.1259002656.squirrel@webmail.hostingdiscounter.nl> Message-ID: <5e3c00490911231107v66f8361es8f3f88cbf7776afe@mail.gmail.com> In fact, I am having problem trying to replicate this example: http://openlayers.org/dev/examples/WMSPost.html I can't use this OpenLayers.Layer.WMS.Post()... I get an undefined reference when trying to use that call. On Mon, Nov 23, 2009 at 4:57 PM, wrote: > Hi, > > this is not really an OpenLayers question, but more a question for the > mailing list of your WMS product. > > Best regards, > Bart > > > Does anyone have an example of a SLD using as a Filter the FeatureId or > > GmlObjectId option? > > > > I am trying to use it but I don't get any results. > > > > Here is my SLD code: > > > > > > > > Layer > > UserSelection > > > > > > > > FF0000 > > > > > > > > > > Thanks for the help. > > _______________________________________________ > > 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/20091123/1b44aa28/attachment.html From bartvde at osgis.nl Mon Nov 23 14:09:15 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] SLD_BODY and FeatureId / GmlObjectId In-Reply-To: <5e3c00490911231107v66f8361es8f3f88cbf7776afe@mail.gmail.com> References: <5e3c00490911231048v1622c5c6x6fe5106f5b080b06@mail.gmail.com> <1367.87.212.162.59.1259002656.squirrel@webmail.hostingdiscounter.nl> <5e3c00490911231107v66f8361es8f3f88cbf7776afe@mail.gmail.com> Message-ID: <1490.87.212.162.59.1259003355.squirrel@webmail.hostingdiscounter.nl> Which version of OpenLayers are you using? The WMS POST layer was done after the 2.8 release. Best regards, Bart > In fact, I am having problem trying to replicate this example: > http://openlayers.org/dev/examples/WMSPost.html > > I can't use this OpenLayers.Layer.WMS.Post()... I get an undefined > reference > when trying to use that call. > > On Mon, Nov 23, 2009 at 4:57 PM, wrote: > >> Hi, >> >> this is not really an OpenLayers question, but more a question for the >> mailing list of your WMS product. >> >> Best regards, >> Bart >> >> > Does anyone have an example of a SLD using as a Filter the FeatureId >> or >> > GmlObjectId option? >> > >> > I am trying to use it but I don't get any results. >> > >> > Here is my SLD code: >> > >> > >> > >> > Layer >> > UserSelection >> > >> > >> > >> > FF0000 >> > >> > >> > >> > >> > Thanks for the help. >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> >> >> > From pedropbaracho at gmail.com Mon Nov 23 14:31:13 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] SLD_BODY and FeatureId / GmlObjectId In-Reply-To: <1490.87.212.162.59.1259003355.squirrel@webmail.hostingdiscounter.nl> References: <5e3c00490911231048v1622c5c6x6fe5106f5b080b06@mail.gmail.com> <1367.87.212.162.59.1259002656.squirrel@webmail.hostingdiscounter.nl> <5e3c00490911231107v66f8361es8f3f88cbf7776afe@mail.gmail.com> <1490.87.212.162.59.1259003355.squirrel@webmail.hostingdiscounter.nl> Message-ID: <5e3c00490911231131q6cc5215q59b1da46ea441886@mail.gmail.com> lol guess what... besides the OL version (I am using nightly build now), it was missing a # before the color code. On Mon, Nov 23, 2009 at 5:09 PM, wrote: > Which version of OpenLayers are you using? > > The WMS POST layer was done after the 2.8 release. > > Best regards, > Bart > > > In fact, I am having problem trying to replicate this example: > > http://openlayers.org/dev/examples/WMSPost.html > > > > I can't use this OpenLayers.Layer.WMS.Post()... I get an undefined > > reference > > when trying to use that call. > > > > On Mon, Nov 23, 2009 at 4:57 PM, wrote: > > > >> Hi, > >> > >> this is not really an OpenLayers question, but more a question for the > >> mailing list of your WMS product. > >> > >> Best regards, > >> Bart > >> > >> > Does anyone have an example of a SLD using as a Filter the FeatureId > >> or > >> > GmlObjectId option? > >> > > >> > I am trying to use it but I don't get any results. > >> > > >> > Here is my SLD code: > >> > > >> > > >> > > >> > Layer > >> > UserSelection > >> > > >> > > >> > > >> > FF0000 > >> > > >> > > >> > > >> > > >> > Thanks for the help. > >> > _______________________________________________ > >> > 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/20091123/c05fa25c/attachment.html From jcd at sdf.lonestar.org Mon Nov 23 16:54:01 2009 From: jcd at sdf.lonestar.org (J. Clifford Dyer) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Trouble getting Yahoo layer to line up with mercator coordinates. Message-ID: <1259013241.2924.47.camel@mctell> Hey all, I posted a week or so back about some trouble I was having getting coordinates from a box that users draw. Thanks for all the help with the box drawing code, and pointers to information on Spherical Mercator and other projection issues. I think I'm starting to get a handle on it. It never quite solved my original problem, but I've definitely managed to narrow it down. I'm drawing on a YahooMaps base layer, and the latitude of the box that gets drawn seems not to line up with what I'm actually drawing. Specifically, it seems to show up about 15% of the way between where I draw it and the top of the view window. If I draw at the top of the window, it's accurate; if I draw at the bottom of the window, it's about 15% up the map from the bottom. Longitude renders properly. However, I've noticed that if I switch to a different base layer (I'm working with an ol_wms layer right now), the box moves, and the base layer moves, and everything lines up as it should. So there's something wrong with how I'm using the Yahoo Map. I'm doing this: var yahoo_layer = new OpenLayers.Layer.Yahoo("Yahoo", {}); And all of my layers plus the map show up as EPSG:4326. I had tried defining sphericalMercator: True, but then the map shows up zoomed in on Sao Tome, and won't let me pan away from it. The yahoo layer and the map itself then show up as EPSG:900913, while the vector layer and ol_wms layer show up as EPSG:4326. For what it's worth, I'm getting that information from the following code: alert("Map: " + map.getProjectionObject()); alert("Yahoo: " + yahoo_layer.projection); alert("WMS: " + ol_wms.projection); alert("Vector: " + vector_layer.projection); I'm still missing something in how to get my data into a consistent, usable format. Any ideas? Cheers, Cliff From Steve.Toutant at inspq.qc.ca Mon Nov 23 16:40:19 2009 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] RE getFeatureInfo and variable substitution SOLVED In-Reply-To: Message-ID: added vendorParams:{ SEMCDC:thisCDC, RSS: thisRSS, ORDRE: thisOrdre} in the WMSGetFeatureInfo options Steve.Toutant@inspq.qc.ca@openlayers.org Envoy? par : users-bounces@openlayers.org 20/11/2009 03:52 PM A users@openlayers.org cc Objet [OpenLayers-Users] getFeatureInfo and variable substitution Hi, I got an error when querying a wms layer (mapserver) with a OpenLayers.Control.WMSGetFeatureInfo request when there is a variables substitution. I have a WMS layer define like this: createWmsLayer('ecoles', '.../cgi-bin/mapserv.exe?map=MYMAP',{layers: 'ecoles', transparent: "true", format:"image/gif", SEMCDC:thisCDC, RSS: thisRSS, ORDRE: thisOrdre},{isBaseLayer: false, visibility: false,singleTile:true,transitionEffect: 'resize'}); I have 3 variables: SEMCDC, RSS, ORDRE In the mapfile I use this statement FILTER "semcdc in (%SEMCDC%) and rss in (%RSS%) and ordre in (%ORDRE%)" The getMap request is succesfull. Here is the request /cgi-bin/mapserv.exe?map=MYMAP service=WMS&version=1.1.0&request=GetFeatureInfo&layers=ecoles&query_layers=ecoles&styles=&bbox=-8820221.560815%2C5721770.182129%2C-7587445.168853%2C6361395.234705&srs=EPSG%3A900913&feature_count=3000&x=272&y=457&height=523&width=1008&info_format=text%2Fhtml Here is the response prepare_database(): Query error. Error declaring cursor: ERROR: syntax error at or near "%" LINE 1: ...:text from ecoles WHERE (semcdc in (%SEMCDC%) ... ^ With query string: DECLARE mycursor BINARY CURSOR FOR SELECT "taux_abs"::text,"nouv"::text,asbinary(force_collection(force_2d(geom900913)),'NDR'),id::text from ecoles WHERE (semcdc in (%SEMCDC%) and rss in (%RSS%) and ordre in (%ORDRE%)) and (geom900913 && setSRID( 'BOX3D(-8493071.07981319 5795761.22549582,-8480841.15528974 5807991.15001926)'::BOX3D,900913) ) How should I query the layer? Thanks Steve Steve Toutant, M. Sc. Analyste en g?omatique Secteur environnement Direction de la sant? environnementale et de la toxicologie Institut national de sant? publique du Qu?bec 945, avenue Wolfe Qu?bec, Qc G1V 5B3 T?l.: (418) 650-5115 #5281 Fax.: (418) 654-3144 steve.toutant@inspq.qc.ca http://www.inspq.qc.ca _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091123/47c5a01c/attachment.html From grinfeldsv75 at yahoo.com Mon Nov 23 17:51:14 2009 From: grinfeldsv75 at yahoo.com (Vladimir Grinfeds) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] agstile when Tile Origin is X:-400 Y:400 Message-ID: <579702.30851.qm@web54204.mail.re2.yahoo.com> I got the agstile from your site, and it works fine with the examples provide but when you have a ArcGIS Service that the Tile Origins are X:-400 Y:400 the Images are placed with some offset from where it should be. can some one give me a example where they use this map services http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsBasemap/MapServer and overlap this other using ArcGISRest93 http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsLiveLayers/MapServer if you do the same using ArcGIS jsapi it lineup correctly but if you use Openlayers they are not aline correctly. I will appreciate the Help provide. vg __________________________________________________________________ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091123/706fcf74/attachment.html From maria.neywell at gmail.com Tue Nov 24 05:05:07 2009 From: maria.neywell at gmail.com (Maria Neywell) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] export SVG Message-ID: <6dbb2e690911240205s5fdaa931rddb604505ae14470@mail.gmail.com> Hi list, I?m trying to export my current map into a svg file. I saw this old post : http://openlayers.org/pipermail/dev/2008-August/003302.html but i would like to do my export with all browsers and with all kinds of layers. Is there a possibility with OpenLayers for example to convert from some generic format like WKT to SVG ? Or is there another hack ? Regards, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091124/c62bc93d/attachment.html From bartvde at osgis.nl Tue Nov 24 05:07:29 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] export SVG In-Reply-To: <6dbb2e690911240205s5fdaa931rddb604505ae14470@mail.gmail.com> References: <6dbb2e690911240205s5fdaa931rddb604505ae14470@mail.gmail.com> Message-ID: <28630.145.50.39.11.1259057249.squirrel@webmail.hostingdiscounter.nl> No this is not possible currently, you would need to implement write support for the Format.SVG which is in: http://trac.openlayers.org/ticket/1808 Best regards, Bart > Hi list, > > > > I?m trying to export my current map into a svg file. I saw this old post : > http://openlayers.org/pipermail/dev/2008-August/003302.html but i would > like > to do my export with all browsers and with all kinds of layers. > > > > Is there a possibility with OpenLayers for example to convert from some > generic format like WKT to SVG ? Or is there another hack ? > > > > Regards, > > > Maria > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From rifins at gmail.com Tue Nov 24 06:36:50 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] GetFeatureInfo... Access denied.. In-Reply-To: References: <1258648604079-4032903.post@n2.nabble.com> <20091119182922.GJ10952@metacarta.com> Message-ID: Hi all, Finally I've decided to modify the openlayers call. Now I make the XmlHttpRequest.open against the same domain (The IIS served application), and there I redirect the call to geoserver, and then return the result to the client.. I've modifyed the OpenLayers.js doing this: sUrl = "test.aspx?param=" + escape(sUrl); //Force the call to same domain this._object.open(sMethod, sUrl, bAsync, sUser, sPassword); And I've created a new page called test hosted in IIS, that catch the request: If Request.QueryString.Count <> 0 Then Dim wsResponse As XmlDocument = New XmlDocument() Dim param As String param = Request.QueryString("param") 'In the param we have the GeoServer URL Dim url As String = param wsResponse.Load(url) Dim XMLDocument As String = wsResponse.InnerXml Response.Clear() Response.ContentType = "text/xml" Response.Write(XMLDocument) 'We return the result from GeoServer End If And doing that, I can do the XMLHttpRequest and get the response from GeoServer.. Any advice/problem with doing in that way? Thanks! On Thu, Nov 19, 2009 at 06:03:23PM +0100, JuKiM wrote: >> > Hi, >> > >> > I've been testing in IE.. If I create a 'test.html' file in a folder >> under >> > IIS, I get an error of denied access/resource not available.. But if I >> copy >> > that file in the www folder of geoserver, then everything works ok.. >> This is >> > quite logical, because IIS is running on port 80, and geoserver in 8080 >> > (They are different hosts)... >> >> >> > Then when I declare the proxy, the IIS's test.html, the response i get >> is >> > empty.. >> >> Your *IIS* needs the proxy. GeoServer has one built in, but it won't help >> you in the slightest if your HTML page isn't hosted on GeoServer. So >> either host your page on geoserver's webserver, or get a proxy into >> whatever webserver you do need. >> >> -- Chris > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091124/9f88d9b8/attachment.html From bartvde at osgis.nl Tue Nov 24 06:53:04 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] GetFeatureInfo... Access denied.. In-Reply-To: References: <1258648604079-4032903.post@n2.nabble.com> <20091119182922.GJ10952@metacarta.com> Message-ID: <39000.145.50.39.11.1259063584.squirrel@webmail.hostingdiscounter.nl> Hi, why don't you set: OpenLayers.ProxyHost = 'test.aspx?param='; and then you don't need to change anything inside of the OpenLayers library. Best regards, Bart > Hi all, > > Finally I've decided to modify the openlayers call. > Now I make the XmlHttpRequest.open against the same domain (The IIS served > application), and there I redirect the call to geoserver, and then return > the result to the client.. > > I've modifyed the OpenLayers.js doing this: > > sUrl = "test.aspx?param=" + escape(sUrl); //Force the call to same domain > this._object.open(sMethod, sUrl, bAsync, sUser, sPassword); > > And I've created a new page called test hosted in IIS, that catch the > request: > If Request.QueryString.Count <> 0 Then > Dim wsResponse As XmlDocument = New XmlDocument() > Dim param As String > param = Request.QueryString("param") 'In the param we have the > GeoServer URL > Dim url As String = param > wsResponse.Load(url) > Dim XMLDocument As String = wsResponse.InnerXml > Response.Clear() > Response.ContentType = "text/xml" > Response.Write(XMLDocument) 'We return the result from > GeoServer > End If > > And doing that, I can do the XMLHttpRequest and get the response from > GeoServer.. > > Any advice/problem with doing in that way? > > Thanks! > > > On Thu, Nov 19, 2009 at 06:03:23PM +0100, JuKiM wrote: >>> > Hi, >>> > >>> > I've been testing in IE.. If I create a 'test.html' file in a folder >>> under >>> > IIS, I get an error of denied access/resource not available.. But if >>> I >>> copy >>> > that file in the www folder of geoserver, then everything works ok.. >>> This is >>> > quite logical, because IIS is running on port 80, and geoserver in >>> 8080 >>> > (They are different hosts)... >>> >>> >>> > Then when I declare the proxy, the IIS's test.html, the response i >>> get >>> is >>> > empty.. >>> >>> Your *IIS* needs the proxy. GeoServer has one built in, but it won't >>> help >>> you in the slightest if your HTML page isn't hosted on GeoServer. So >>> either host your page on geoserver's webserver, or get a proxy into >>> whatever webserver you do need. >>> >>> -- Chris >> >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From kgeusebroek at xebia.com Tue Nov 24 06:47:27 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] export SVG In-Reply-To: <6dbb2e690911240205s5fdaa931rddb604505ae14470@mail.gmail.com> References: <6dbb2e690911240205s5fdaa931rddb604505ae14470@mail.gmail.com> Message-ID: Hi Maria, I don;t know what mapserver you are using, but I believe in geoserver it's possible to get your wms request in svg (or even pdf) format. Cheers Kris From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Maria Neywell Sent: Tuesday, November 24, 2009 11:05 AM To: users@openlayers.org Subject: [OpenLayers-Users] export SVG Hi list, I'm trying to export my current map into a svg file. I saw this old post : http://openlayers.org/pipermail/dev/2008-August/003302.html but i would like to do my export with all browsers and with all kinds of layers. Is there a possibility with OpenLayers for example to convert from some generic format like WKT to SVG ? Or is there another hack ? Regards, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091124/4fc1fd6b/attachment.html From rifins at gmail.com Tue Nov 24 07:14:32 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] GetFeatureInfo... Access denied.. In-Reply-To: <39000.145.50.39.11.1259063584.squirrel@webmail.hostingdiscounter.nl> References: <1258648604079-4032903.post@n2.nabble.com> <20091119182922.GJ10952@metacarta.com> <39000.145.50.39.11.1259063584.squirrel@webmail.hostingdiscounter.nl> Message-ID: wow! This is what I was looking for...!! I found that I need to define the proxyhost like "OpenLayers.ProxyHost = "/geoserver/rest/proxy?url=";" but the 'rest/proxy' confused me, and I looked for an alternative way.. Thanks a lot! 2009/11/24 > Hi, > > why don't you set: > > OpenLayers.ProxyHost = 'test.aspx?param='; > > and then you don't need to change anything inside of the OpenLayers > library. > > Best regards, > Bart -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091124/f43b3c35/attachment.html From maria.neywell at gmail.com Tue Nov 24 08:52:54 2009 From: maria.neywell at gmail.com (Maria Neywell) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] export SVG In-Reply-To: References: <6dbb2e690911240205s5fdaa931rddb604505ae14470@mail.gmail.com> Message-ID: <6dbb2e690911240552g3518e49ci76930614e9a4149@mail.gmail.com> Thanks Kris, I'm using mapserver 5.2. I have tested all mapserver exports to render my map in svg, see : http://mapserver.org/output/svg.html but, the point is that all of theseoutputs give meup simplified geometry. I want to export my map in a svg with geometries who match exactly with my map. Regards, Maria PS : I had post in mapserver mailing list, http://n2.nabble.com/Export-SVG-td4057884.html 2009/11/24 Kris Geusebroek > Hi Maria, > > > > I don;t know what mapserver you are using, but I believe in geoserver it?s > possible to get your wms request in svg (or even pdf) format. > > > > Cheers Kris > > > > *From:* users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > *On Behalf Of *Maria Neywell > *Sent:* Tuesday, November 24, 2009 11:05 AM > *To:* users@openlayers.org > *Subject:* [OpenLayers-Users] export SVG > > > > Hi list, > > > > I?m trying to export my current map into a svg file. I saw this old post : > http://openlayers.org/pipermail/dev/2008-August/003302.html but i would > like to do my export with all browsers and with all kinds of layers. > > > > Is there a possibility with OpenLayers for example to convert from some > generic format like WKT to SVG ? Or is there another hack ? > > > > Regards, > > > > Maria > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091124/102e28f2/attachment.html From yves.moisan at boreal-is.com Tue Nov 24 15:00:55 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Common style for points, lines and polygons Message-ID: <1259092855.4485.114.camel@yves-laptop> Hi All, I'm trying to get a common style for any of (point,line,polygon). I thought something like : var s = new OpenLayers.Style({ fillColor: "#0000FF", strokeColor: "#0000FF", strokeWidth: 2 }); var myStyles = new OpenLayers.StyleMap(s); would work, but I only get blue lines and nothing for points. I haven't tried polygons but I'm confident it works. I thought since all the properties defined in the style apply to all feature types I should expect blue points but instead I get nothing. I'm using OpenLayers trunk. Any clue ? TIA, Yves From arnd.wippermann at web.de Tue Nov 24 15:19:56 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Common style for points, lines and polygons In-Reply-To: <1259092855.4485.114.camel@yves-laptop> Message-ID: Hi, The way, you declare your common style, you set all not named properties of the common OL style to null. If you add pointRadius : 10 to your style, it should also work for points. I use var newStyle = new OpenLayers.Util.applyDefaults( { strokeColor: "black", strokeWidth: 1, strokeOpacity: 0.6, fillOpacity: 0.8 }, OpenLayers.Feature.Vector.style["default"] ); to declare a new style. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Yves Moisan Gesendet: Dienstag, 24. November 2009 21:01 An: users Betreff: [OpenLayers-Users] Common style for points, lines and polygons Hi All, I'm trying to get a common style for any of (point,line,polygon). I thought something like : var s = new OpenLayers.Style({ fillColor: "#0000FF", strokeColor: "#0000FF", strokeWidth: 2 }); var myStyles = new OpenLayers.StyleMap(s); would work, but I only get blue lines and nothing for points. I haven't tried polygons but I'm confident it works. I thought since all the properties defined in the style apply to all feature types I should expect blue points but instead I get nothing. I'm using OpenLayers trunk. Any clue ? TIA, Yves _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From plablo09 at gmail.com Tue Nov 24 19:30:15 2009 From: plablo09 at gmail.com (pablo lopez) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] problem with WFS GetFeature Message-ID: Hi list I've seen this topic discussed on this list but I'm still a little lost. I want to run the wfs get feature example with my own data served trough mapserver. I'm able to make the request and mapserver returns what seems to be a valid gml, the only problem is that it is not displaying in OL. Here's the relevant code: map = new OpenLayers.Map('map', { controls: [ new OpenLayers.Control.PanZoom(), new OpenLayers.Control.Permalink(), new OpenLayers.Control.Navigation() ] }); layer = new OpenLayers.Layer.WMS( "Regiones ANUIES", " http://192.168.5.241/cgi-bin/mapserv?map=/var/www/aplicaciones/sined/regsanu.map ", {layers: 'regs_anu'} ); select = new OpenLayers.Layer.Vector("Selection", {styleMap: new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]) }); hover = new OpenLayers.Layer.Vector("Hover"); map.addLayers([layer, hover, select]); control = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer), box: true, hover: true, multipleKey: "shiftKey", toggleKey: "ctrlKey" }); control.events.register("featureselected", this, function(e) { select.addFeatures([e.feature]); }); control.events.register("featureunselected", this, function(e) { select.removeFeatures([e.feature]); }); control.events.register("hoverfeature", this, function(e) { hover.addFeatures([e.feature]); }); control.events.register("outfeature", this, function(e) { hover.removeFeatures([e.feature]); }); map.addControl(control); control.activate(); map.setCenter(new OpenLayers.Bounds(-140.444336,25.115234,-44.438477,50.580078).getCenterLonLat(), 3); } I think the problem could be with the gml version since mapserver is returning gml v3. Any thoughts. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091124/a539b9b7/attachment.html From ahocevar at opengeo.org Wed Nov 25 02:31:56 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] problem with WFS GetFeature In-Reply-To: References: Message-ID: <4B0CDD6C.9000004@opengeo.org> Hi, can you please try the following and report back if it works: pablo lopez wrote: > control = new OpenLayers.Control.GetFeature({ > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer), Instead, use protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer, { featurePrefix: "feature" }), That's the only idea I have. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From emmexx at tiscalinet.it Wed Nov 25 04:36:16 2009 From: emmexx at tiscalinet.it (emmexx) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Draw and drag map Message-ID: <4B0CFA90.1020109@tiscalinet.it> I couldn't find on documentation, wiki, ml, examples of drawing a feature (a line, a polygon) and panning (dragging?) the map simultaneously. >From a user point of view it's easier to click and drag the map while drawing rather than clicking on the navigation button. Do you have any example or indication on where to start from? click handler? drag handler? A mix of click, drag and path handler? Is it feasible? Thank you maxx From estelle_ancelet at hotmail.fr Wed Nov 25 04:53:31 2009 From: estelle_ancelet at hotmail.fr (Estelle A) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Details in AnchoredBubble are transparents in IE8 Message-ID: <1259142811593-4063901.post@n2.nabble.com> Hi all ! I noticed that details in a OpenLayers.Popup.AnchoredBubble are transparents with IE8. http://vrenouee.grenoble.cemagref.fr/client_1/doc_travail/issue_anchoredbubble.php See for example An idea to solve this ? Best regards, Estelle -- View this message in context: http://n2.nabble.com/Details-in-AnchoredBubble-are-transparents-in-IE8-tp4063901p4063901.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From niconoe at ulb.ac.be Wed Nov 25 06:01:12 2009 From: niconoe at ulb.ac.be (Nicolas Noe) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Distance problem Message-ID: <4B0D0E78.2050604@ulb.ac.be> Hi everyone, I have a simple problem, bit I can't figure it. I'm probably missing something very simple and stupid ! I have an OL map with google background. The projection is EPSG:900913, so the map unit is meters (right?). I have a marker layer, on which I add a first marker. Then I ask OL to compute a second marker 1 kilometer on the east, and display it. It seems to work, except of my distance problem : if I check with the OL scaleline, there's 1 KM between both markers (which is correct). However, if I use the ruler tool of Google Earth, I can see there is only about 650 meters between these 2 points. Do you have any idea of where my error is ? Thanks in advance, Here is my code : var BeBounds = new OpenLayers.Bounds(2.5, 49.5, 6.5, 51.5); function mapInit() { var map = new OpenLayers.Map('map', { projection: new OpenLayers.Projection("EPSG:900913"), controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher({'ascending':false}), new OpenLayers.Control.Permalink(), new OpenLayers.Control.ScaleLine(), new OpenLayers.Control.Permalink('permalink'), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.OverviewMap(), new OpenLayers.Control.KeyboardDefaults() ] }); var gsat = new OpenLayers.Layer.Google("Google Hybrid", { type: G_HYBRID_MAP, 'sphericalMercator':true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34) /*, numZoomLevels: 20*/ }); var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(gsat); map.addLayer(markers); // Add a marker var myPoint = new OpenLayers.LonLat(5.080646954,50.49373471); var myPointInMeters = myPoint.transform(new OpenLayers.Projection("EPSG:4326"), map.projection); var pt2 = myPointInMeters.add(1000,0); var mymark = new OpenLayers.Marker(myPointInMeters); var mymark2 = new OpenLayers.Marker(pt2); markers.addMarker(mymark); markers.addMarker(mymark2); map.zoomToExtent(BeBounds.transform(new OpenLayers.Projection("EPSG:4326"), map.projection)); } From dave.potts at pinan.co.uk Wed Nov 25 05:03:08 2009 From: dave.potts at pinan.co.uk (David Potts) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] loadURL function In-Reply-To: References: Message-ID: <59846.193.123.16.70.1259143388.squirrel@dp2642.force9.co.uk> Quick question about the location of the loadURL function The documentation lists this function as being part of the Ajax package, see http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Ajax-js.html#loadURL But if you look at the source code OpenLayers-2.8/lib/OpenLayers/Ajax.js at line 71, the function is declared to be part of the OpenLayers namespace ie OpenLayers.loadURL = function(uri, params, caller, onComplete, onFailure) { Is this an code error or an error in the docmentation? 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 eric.lemoine at camptocamp.com Wed Nov 25 05:19:22 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] loadURL function In-Reply-To: <59846.193.123.16.70.1259143388.squirrel@dp2642.force9.co.uk> References: <59846.193.123.16.70.1259143388.squirrel@dp2642.force9.co.uk> Message-ID: On Wed, Nov 25, 2009 at 11:03 AM, David Potts wrote: > > Quick question about the location of the loadURL function > > The documentation lists this function as being part of the Ajax package, > see > http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Ajax-js.html#loadURL > > But if you look at the source code OpenLayers-2.8/lib/OpenLayers/Ajax.js > at line 71, the function is declared to be part of the OpenLayers > namespace ie > > OpenLayers.loadURL = function(uri, params, caller, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?onComplete, onFailure) { > loadURL is in the OpenLayers namespace. Although the section is named "loadURL" in the documentation, the signature of the function provided at the beginning of the section makes it clear that it's part of the OpenLayers namespace. 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 rifins at gmail.com Wed Nov 25 09:17:05 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS-T Message-ID: Hi, I'm searching documentation about WFS-T, because with I can understand, it let to create new entries in the datastore through the GeoServer.... I create the map, and a wms layers which is displayed, and then I create the wfs layer.. wfs = new OpenLayers.Layer.WFS("Test_Layer"," http://localhost:8080/geoserver/wfs", {typename: 'Test:dots'}, { typename: "dots", featureNS: "http://www.uriURL.org/test", extractAttributes: false, commitReport: function(str) { alert(str); OpenLayers.Console.log(str); } } ); var draw = new OpenLayers.Control.DrawFeature( wfs, OpenLayers.Handler.Point, { handlerOptions: {freehand: false, multi: true}, displayClass: "olControlDrawFeaturePoint" } ); var save = new OpenLayers.Control.Button({ trigger: OpenLayers.Function.bind(wfs.commit, wfs), displayClass: "olControlSaveFeatures" }); panel.addControls([ new OpenLayers.Control.Navigation(), save, draw ]); map.addControl(panel); When I save the new points, they are insterted in the DB, but with empty values.. Only the auto incremental id is created.. In my table there are four fields, 'id', 'location', 'description', 'type'. How can I configure the WFS calls to create the new entries with all the information? (The information about description and type is the same, and is stored in a textfield, and the location should be the different points of the map.. And on the other hand, if the datasource contains about 40.000 positions, is better to work with WMS and process the information in server side? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091125/aab22f54/attachment.html From adube at mapgears.com Wed Nov 25 09:25:14 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS-T In-Reply-To: References: Message-ID: <4B0D3E4A.1080901@mapgears.com> Hi, Just before your commit, you need to copy the your field values to the feature's attributes. They will then be part of the 'insert' request sent to your server. See an example (demo) of what I'm talking about [1]. It uses TinyOWS, but it should be similar to what you're seeking to do. Hope this helps, Alexandre [1] http://dev4.mapgears.com/bdga/bdgaWFS-T.html JuKiM wrote: > Hi, > > I'm searching documentation about WFS-T, because with I can > understand, it let to create new entries in the datastore through the > GeoServer.... > > I create the map, and a wms layers which is displayed, and then I > create the wfs layer.. > > wfs = new > OpenLayers.Layer.WFS("Test_Layer","http://localhost:8080/geoserver/wfs", > {typename: 'Test:dots'}, > { > typename: "dots", > featureNS: "http://www.uriURL.org/test", > extractAttributes: false, > commitReport: function(str) { > alert(str); > OpenLayers.Console.log(str); > } > } > ); > > var draw = new OpenLayers.Control.DrawFeature( > wfs, OpenLayers.Handler.Point, > { > handlerOptions: {freehand: false, multi: true}, > displayClass: "olControlDrawFeaturePoint" > } > ); > > var save = new OpenLayers.Control.Button({ > trigger: OpenLayers.Function.bind(wfs.commit, wfs), > displayClass: "olControlSaveFeatures" > }); > > panel.addControls([ > new OpenLayers.Control.Navigation(), > save, draw > ]); > > map.addControl(panel); > > When I save the new points, they are insterted in the DB, but with > empty values.. Only the auto incremental id is created.. > In my table there are four fields, 'id', 'location', 'description', > 'type'. How can I configure the WFS calls to create the new entries > with all the information? (The information about description and type > is the same, and is stored in a textfield, and the location should be > the different points of the map.. > > And on the other hand, if the datasource contains about 40.000 > positions, is better to work with WMS and process the information in > server side? > > Thanks! > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From rifins at gmail.com Wed Nov 25 09:48:06 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS-T In-Reply-To: <4B0D3E4A.1080901@mapgears.com> References: <4B0D3E4A.1080901@mapgears.com> Message-ID: Ok.. And about the other question.. If in the datasource there are about 40.000 positions... Is a good way to try loading them with WFS? Or using WMS is recommended? Thanks! 2009/11/25 Alexandre Dube > Hi, > > Just before your commit, you need to copy the your field values to the > feature's attributes. They will then be part of the 'insert' request sent > to your server. See an example (demo) of what I'm talking about [1]. It > uses TinyOWS, but it should be similar to what you're seeking to do. > > Hope this helps, > > Alexandre > > > [1] http://dev4.mapgears.com/bdga/bdgaWFS-T.html > > > JuKiM wrote: > >> Hi, >> >> I'm searching documentation about WFS-T, because with I can understand, it >> let to create new entries in the datastore through the GeoServer.... >> >> I create the map, and a wms layers which is displayed, and then I create >> the wfs layer.. >> >> wfs = new OpenLayers.Layer.WFS("Test_Layer"," >> http://localhost:8080/geoserver/wfs", >> {typename: 'Test:dots'}, >> { >> typename: "dots", >> featureNS: "http://www.uriURL.org/test", >> extractAttributes: false, >> commitReport: function(str) { >> alert(str); >> OpenLayers.Console.log(str); >> } >> } >> ); >> >> var draw = new OpenLayers.Control.DrawFeature( >> wfs, OpenLayers.Handler.Point, >> { >> handlerOptions: {freehand: false, multi: true}, >> displayClass: "olControlDrawFeaturePoint" >> } >> ); >> var save = new OpenLayers.Control.Button({ >> trigger: OpenLayers.Function.bind(wfs.commit, wfs), >> displayClass: "olControlSaveFeatures" >> }); >> panel.addControls([ >> new OpenLayers.Control.Navigation(), >> save, draw >> ]); >> map.addControl(panel); >> >> When I save the new points, they are insterted in the DB, but with empty >> values.. Only the auto incremental id is created.. >> In my table there are four fields, 'id', 'location', 'description', >> 'type'. How can I configure the WFS calls to create the new entries with all >> the information? (The information about description and type is the same, >> and is stored in a textfield, and the location should be the different >> points of the map.. >> >> And on the other hand, if the datasource contains about 40.000 positions, >> is better to work with WMS and process the information in server side? >> >> Thanks! >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091125/891ac64b/attachment.html From eric.lemoine at camptocamp.com Wed Nov 25 10:09:15 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] loadURL function In-Reply-To: <59846.193.123.16.70.1259143388.squirrel@dp2642.force9.co.uk> References: <59846.193.123.16.70.1259143388.squirrel@dp2642.force9.co.uk> Message-ID: On Wed, Nov 25, 2009 at 11:03 AM, David Potts wrote: > > Quick question about the location of the loadURL function > > The documentation lists this function as being part of the Ajax package, > see > http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Ajax-js.html#loadURL > > But if you look at the source code OpenLayers-2.8/lib/OpenLayers/Ajax.js > at line 71, the function is declared to be part of the OpenLayers > namespace ie > > OpenLayers.loadURL = function(uri, params, caller, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?onComplete, onFailure) { > > Is this an code error or an error in the docmentation? 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 pedropbaracho at gmail.com Wed Nov 25 10:39:25 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] What IDE do you use for OpenLayers Development? Message-ID: <5e3c00490911250739y2affc10dsb1c34905a032f939@mail.gmail.com> Hey list, I got a brand new pc and I am reinstalling everything on it, so I had the chance to try some new software. What IDE do you guys use for developing code using OpenLayers? I was used to Notepad++, firefox and firebug on Windows, and gedit, ff and firebug on Ubuntu. I am inclined to try out Eclipse again, but I am not sure I will do it. Do you guys have any suggestions or opinions on this? thanks, Pedro. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091125/c2e83be9/attachment.html From adube at mapgears.com Wed Nov 25 10:59:41 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS-T In-Reply-To: References: <4B0D3E4A.1080901@mapgears.com> Message-ID: <4B0D546D.1050202@mapgears.com> Hey, 40.000 is sure big. You could try the Cluster strategy [1], or have you points in WMS when zoomed out then changed to WFS when zoomed in. The latter is what I'm doing in the demo I sent you. Load it, then zoom out. You'll see that the roads switch from WFS to WMS. You could also do that. Best regards, Alexandre [1] http://openlayers.org/dev/examples/strategy-cluster.html JuKiM wrote: > Ok.. > > And about the other question.. If in the datasource there are about > 40.000 positions... Is a good way to try loading them with WFS? Or > using WMS is recommended? > > Thanks! > > > 2009/11/25 Alexandre Dube > > > Hi, > > Just before your commit, you need to copy the your field values > to the feature's attributes. They will then be part of the > 'insert' request sent to your server. See an example (demo) of > what I'm talking about [1]. It uses TinyOWS, but it should be > similar to what you're seeking to do. > > Hope this helps, > > Alexandre > > > [1] http://dev4.mapgears.com/bdga/bdgaWFS-T.html > > > JuKiM wrote: > > Hi, > > I'm searching documentation about WFS-T, because with I can > understand, it let to create new entries in the datastore > through the GeoServer.... > > I create the map, and a wms layers which is displayed, and > then I create the wfs layer.. > > wfs = new > OpenLayers.Layer.WFS("Test_Layer","http://localhost:8080/geoserver/wfs", > {typename: 'Test:dots'}, > { > typename: "dots", > featureNS: "http://www.uriURL.org/test", > extractAttributes: false, > commitReport: function(str) { > alert(str); > OpenLayers.Console.log(str); > } > } > ); > > var draw = new OpenLayers.Control.DrawFeature( > wfs, OpenLayers.Handler.Point, > { > handlerOptions: {freehand: false, multi: true}, > displayClass: "olControlDrawFeaturePoint" > } > ); > var save = new OpenLayers.Control.Button({ > trigger: OpenLayers.Function.bind(wfs.commit, wfs), > displayClass: "olControlSaveFeatures" > }); > panel.addControls([ > new OpenLayers.Control.Navigation(), > save, draw > ]); > map.addControl(panel); > > When I save the new points, they are insterted in the DB, but > with empty values.. Only the auto incremental id is created.. > In my table there are four fields, 'id', 'location', > 'description', 'type'. How can I configure the WFS calls to > create the new entries with all the information? (The > information about description and type is the same, and is > stored in a textfield, and the location should be the > different points of the map.. > > And on the other hand, if the datasource contains about 40.000 > positions, is better to work with WMS and process the > information in server side? > > Thanks! > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -- Alexandre Dub? Mapgears www.mapgears.com From crschmidt at metacarta.com Wed Nov 25 11:09:34 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] WFS-T In-Reply-To: <4B0D546D.1050202@mapgears.com> References: <4B0D3E4A.1080901@mapgears.com> <4B0D546D.1050202@mapgears.com> Message-ID: <20091125160934.GC25266@metacarta.com> On Wed, Nov 25, 2009 at 10:59:41AM -0500, Alexandre Dube wrote: > Hey, > > 40.000 is sure big. You could try the Cluster strategy [1], I think this wold be unlikely to work for this number of points. > or have you > points in WMS when zoomed out then changed to WFS when zoomed in. The > latter is what I'm doing in the demo I sent you. Load it, then zoom > out. You'll see that the roads switch from WFS to WMS. You could also > do that. > > Best regards, > > Alexandre > > [1] http://openlayers.org/dev/examples/strategy-cluster.html > > > JuKiM wrote: > > Ok.. > > > > And about the other question.. If in the datasource there are about > > 40.000 positions... Is a good way to try loading them with WFS? Or > > using WMS is recommended? > > > > Thanks! > > > > > > 2009/11/25 Alexandre Dube > > > > > Hi, > > > > Just before your commit, you need to copy the your field values > > to the feature's attributes. They will then be part of the > > 'insert' request sent to your server. See an example (demo) of > > what I'm talking about [1]. It uses TinyOWS, but it should be > > similar to what you're seeking to do. > > > > Hope this helps, > > > > Alexandre > > > > > > [1] http://dev4.mapgears.com/bdga/bdgaWFS-T.html > > > > > > JuKiM wrote: > > > > Hi, > > > > I'm searching documentation about WFS-T, because with I can > > understand, it let to create new entries in the datastore > > through the GeoServer.... > > > > I create the map, and a wms layers which is displayed, and > > then I create the wfs layer.. > > > > wfs = new > > OpenLayers.Layer.WFS("Test_Layer","http://localhost:8080/geoserver/wfs", > > {typename: 'Test:dots'}, > > { > > typename: "dots", > > featureNS: "http://www.uriURL.org/test", > > extractAttributes: false, > > commitReport: function(str) { > > alert(str); > > OpenLayers.Console.log(str); > > } > > } > > ); > > > > var draw = new OpenLayers.Control.DrawFeature( > > wfs, OpenLayers.Handler.Point, > > { > > handlerOptions: {freehand: false, multi: true}, > > displayClass: "olControlDrawFeaturePoint" > > } > > ); > > var save = new OpenLayers.Control.Button({ > > trigger: OpenLayers.Function.bind(wfs.commit, wfs), > > displayClass: "olControlSaveFeatures" > > }); > > panel.addControls([ > > new OpenLayers.Control.Navigation(), > > save, draw > > ]); > > map.addControl(panel); > > > > When I save the new points, they are insterted in the DB, but > > with empty values.. Only the auto incremental id is created.. > > In my table there are four fields, 'id', 'location', > > 'description', 'type'. How can I configure the WFS calls to > > create the new entries with all the information? (The > > information about description and type is the same, and is > > stored in a textfield, and the location should be the > > different points of the map.. > > > > And on the other hand, if the datasource contains about 40.000 > > positions, is better to work with WMS and process the > > information in server side? > > > > Thanks! > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > > > > > -- > > Alexandre Dub? > > Mapgears > > www.mapgears.com > > > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From yuratsebro at gmail.com Wed Nov 25 11:27:31 2009 From: yuratsebro at gmail.com (Yurka) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Polygon points Message-ID: <1259166451314-4065977.post@n2.nabble.com> I have a vector layer and i'm putting a polygon on the map. So i'm looking for a way to get all the points from that polygon back. The interface allows user to rotate and stretch the shape, so i need to know how the shape changed. Is this possible at all? Thanks, -y -- View this message in context: http://n2.nabble.com/Polygon-points-tp4065977p4065977.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From plablo09 at gmail.com Wed Nov 25 11:31:38 2009 From: plablo09 at gmail.com (pablo lopez) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] problem with WFS GetFeature In-Reply-To: <4B0CDD6C.9000004@opengeo.org> References: <4B0CDD6C.9000004@opengeo.org> Message-ID: Thanks Andreas, I've just tried your suggestion and it didn't work. I'm now taking a look at the gml returned by mapserver to see if I need to specify more parameters. On the other hand, I was looking at the highlight feature code in http://trac.openlayers.org/wiki/Highlighting, and I wonder if there is a way to control the highlighting with mouse clicks instead of filters. Any suggestions on this? Regards, Pablo On Wed, Nov 25, 2009 at 1:31 AM, Andreas Hocevar wrote: > Hi, > > can you please try the following and report back if it works: > > > pablo lopez wrote: > >> control = new OpenLayers.Control.GetFeature({ >> protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer), >> > > Instead, use > > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer, { > featurePrefix: "feature" > }), > > That's the only idea I have. > > Regards, > Andreas. > > -- > 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/20091125/689934bb/attachment.html From igrcic at gmail.com Wed Nov 25 12:39:15 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Polygon points In-Reply-To: <1259166451314-4065977.post@n2.nabble.com> References: <1259166451314-4065977.post@n2.nabble.com> Message-ID: hi, http://dev.openlayers.org/docs/files/OpenLayers/Geometry-js.html#OpenLayers.Geometry.getVertices cheers On Wed, Nov 25, 2009 at 5:27 PM, Yurka wrote: > > I have a vector layer and i'm putting a polygon on the map. > So i'm looking for a way to get all the points from that polygon back. The > interface allows user to rotate and stretch the shape, so i need to know how > the shape changed. > > Is this possible at all? > > Thanks, > -y > -- > View this message in context: http://n2.nabble.com/Polygon-points-tp4065977p4065977.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 Wed Nov 25 12:46:43 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] Capture screen coordinates In-Reply-To: <401257.52726.qm@web58001.mail.re3.yahoo.com> References: <401257.52726.qm@web58001.mail.re3.yahoo.com> Message-ID: hi, 1) register featureAdded function in your draw control; new OpenLayers.Control.DrawFeature( polygon, OpenLayers.Handler.Polygon, { featureAdded: function(evt){ var geom = evt.geometry; //do what ever you want to do with it } } ), 2) http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.getCenter cheers On Thu, Sep 24, 2009 at 5:40 PM, Diego Roberto wrote: > Hi, > > - I will generate a search space as follows: User draws a polygon > (OpenLayers.Layer.Vector) on the screen and when to draw this polygon as the > application will return all the points that are within this polygon. > Currently the application works this way only when the User draw the polygon > he has to click the search button or triggering event "onclick" and calling > the function serialize () to capture the coordinates into a JSON object. > What I want is to eliminate the need for the User clicks the search button, > or just make a fence on the screen capture system has the coordinates to > perform the search. How should I proceed in this case? As the caption event > so he finished drawing without clicking any button or trigger an onclick > event? If there is no better way to search through what you display or link > so I can search? > Solution to use: OpenLayers + JSON + Java + DWR + PostGIS. > > Here is the code below the layers of vectors that do get to catch the > details after the User draw on the screen to generate the search. > > > ???????????? / / Layer to design for polygon generation of space research > ???????????? rectangle = new OpenLayers.Layer.Vector ( 'Simple Search', > ???????????? / / Style applied to the blue rectangle > > ?? ( > ???????????????????? Style: OpenLayers.StyleMap new (( > ???????????????????????? fillColor: "# 333399" > ???????????????????????? fillOpacity: 0.5 > ???????????????????? )) > ???????????????????? ) > ?????? ); > > ???????????? / / Layer to design for polygon generation of space research > ???????????? polygon = new OpenLayers.Layer.Vector ( 'Search Polygon', > ???????????????????????????????? / / Blue Style applied to the polygon > ???????????????????????????????? ( > ???????????????????? Style: OpenLayers.StyleMap new (( > ???????????????????????? fillColor: "# 333399" > ???????????????????????? fillOpacity: 0.5 > ???????????????????? )) > ???????????????????? ) > ?????? ); > > > ???????????????? / / Layer to design a point for the generation of space > research > ???????????? point = new OpenLayers.Layer.Vector ( 'Search Point'); > > ?????????????? / / Search through the rectangle is inserted into a new layer > of rectangle on the map > ??????????????? retanguloOptions = (sides: 4); > ???????? retanguloControl = new OpenLayers.Control.DrawFeature (rectangle, > > OpenLayers.Handler.RegularPolygon, > ???????????????????????????????????????????? (handlerOptions: > retanguloOptions)); > > ????????? / / Search through polygon is inserted into a new layer of polygon > on the map > ???????? poligonoControl = new OpenLayers.Control.DrawFeature (polygon, > ???????????????????????????????????????????? OpenLayers.Handler.Polygon); > > ?????????? / / Search through point is inserted a new layer of point on the > map > ???????? pontoControl = new OpenLayers.Control.DrawFeature (point, > ???????????????????????????????????????????? OpenLayers.Handler.Point); > > > > - Another question also must generate a search in which I capture the > coordinates of the center of the screen to generate a buffer. User will not > make any drawing only a select category of hospitals and click search. The > application then captures the coordinates of the center of the screen to > generate a buffer of 2 km of the center point. I already have the running > buffer to know what heading to use these coordinates of the center of the > screen (map)? > > > > Regards, > Diego Roberto > Phone: + 55 62 96190902 > Msn: diego_roberto@live.com > Skype: diego.rrborges > ________________________________ > Veja quais s?o os assuntos do momento no Yahoo! + Buscados: Top 10 - > Celebridades - M?sica - Esportes > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From n.e.kendall at gmail.com Wed Nov 25 12:48:47 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] What IDE do you use for OpenLayers Development? In-Reply-To: <5e3c00490911250739y2affc10dsb1c34905a032f939@mail.gmail.com> References: <5e3c00490911250739y2affc10dsb1c34905a032f939@mail.gmail.com> Message-ID: <33fd44f90911250948w72bdf304tf5d765c2780076c9@mail.gmail.com> jedit for the pc isn't bad, but I'm fond of dreamweaver. On ubuntu, bluefish is nice. On Wed, Nov 25, 2009 at 5:39 PM, Pedro Baracho wrote: > Hey list, > > I got a brand new pc and I am reinstalling everything on it, so I had the > chance to try some new software. What IDE do you guys use for developing > code using OpenLayers? > I was used to Notepad++, firefox and firebug on Windows, and gedit, ff and > firebug on Ubuntu. I am inclined to try out Eclipse again, but I am not sure > I will do it. > > Do you guys have any suggestions or opinions on this? > > thanks, > Pedro. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091125/73d3a671/attachment.html From ahocevar at opengeo.org Wed Nov 25 13:20:38 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:15 2010 Subject: [OpenLayers-Users] problem with WFS GetFeature In-Reply-To: References: <4B0CDD6C.9000004@opengeo.org> Message-ID: <4B0D7576.7030705@opengeo.org> pablo lopez wrote: > Thanks Andreas, I've just tried your suggestion and it didn't work. > I'm now taking a look at the gml returned by mapserver to see if I > need to specify more parameters. > On the other hand, I was looking at the highlight feature code in > http://trac.openlayers.org/wiki/Highlighting, and I wonder if there is > a way to control the highlighting with mouse clicks instead of filters. > Any suggestions on this? This is only recommended if you have very few features. The prerequisite is to load the layer as vector layer, not from WMS. But back to the original problem. If you provide a sample XML that your server returns, it will be easier to see what is wrong. Regards, Andreas. > Regards, > Pablo > > On Wed, Nov 25, 2009 at 1:31 AM, Andreas Hocevar > wrote: > > Hi, > > can you please try the following and report back if it works: > > > pablo lopez wrote: > > control = new OpenLayers.Control.GetFeature({ > protocol: > OpenLayers.Protocol.WFS.fromWMSLayer(layer), > > > Instead, use > > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer, { > featurePrefix: "feature" > }), > > That's the only idea I have. > > Regards, > Andreas. > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 hfpmartins at gmail.com Wed Nov 25 13:32:45 2009 From: hfpmartins at gmail.com (Hugo) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] What IDE do you use for OpenLayers Development? In-Reply-To: <33fd44f90911250948w72bdf304tf5d765c2780076c9@mail.gmail.com> References: <5e3c00490911250739y2affc10dsb1c34905a032f939@mail.gmail.com> <33fd44f90911250948w72bdf304tf5d765c2780076c9@mail.gmail.com> Message-ID: Hi Pedro, If you are wishing to try Eclipse again I recommend you to try out Aptana first. It is also open-source (not entirely because it has some components under proprietary licensing). I find it very useful and you can try out things and preview your app without leaving the IDE. I think it was built upon eclipse (almost sure) and so the GUI is quite similar. It also has the possibility to include external libraries (like extjs or jquery) and take advantage of autocompleting capabilities. Hope this helps, Hugo -- Hugo Martins FMV-UTL CIISA-Epidemiologia e Sa?de P?blica Veterin?ria Av. da Universidade T?cnica 1300-477 Lisboa N 38?42'49.54", W 9?11'43.42" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091125/8bec02ab/attachment.html From yves.moisan at boreal-is.com Wed Nov 25 13:35:12 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Common style for points, lines and polygons In-Reply-To: References: Message-ID: <1259174112.4262.56.camel@yves-laptop> Thanx Arnd ! Works like a charm Yves > Hi, > > The way, you declare your common style, you set all not named properties of > the common OL style to null. If you add pointRadius : 10 to your style, it > should also work for points. > > I use > > var newStyle = new OpenLayers.Util.applyDefaults( > { > strokeColor: "black", > strokeWidth: 1, > strokeOpacity: 0.6, > fillOpacity: 0.8 > }, OpenLayers.Feature.Vector.style["default"] > ); > > to declare a new style. > > Arnd > > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Yves Moisan > Gesendet: Dienstag, 24. November 2009 21:01 > An: users > Betreff: [OpenLayers-Users] Common style for points, lines and polygons > > Hi All, > > I'm trying to get a common style for any of (point,line,polygon). I thought > something like : > > var s = new OpenLayers.Style({ > fillColor: "#0000FF", > strokeColor: "#0000FF", > strokeWidth: 2 > }); > > var myStyles = new OpenLayers.StyleMap(s); > > > would work, but I only get blue lines and nothing for points. I haven't > tried polygons but I'm confident it works. I thought since all the > properties defined in the style apply to all feature types I should expect > blue points but instead I get nothing. I'm using OpenLayers trunk. Any clue > ? > > TIA, > > Yves > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From plablo09 at gmail.com Wed Nov 25 13:37:39 2009 From: plablo09 at gmail.com (pablo lopez) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] problem with WFS GetFeature In-Reply-To: <4B0D7576.7030705@opengeo.org> References: <4B0CDD6C.9000004@opengeo.org> <4B0D7576.7030705@opengeo.org> Message-ID: Ok, here's the XML response from the server: ?xml version='1.0' encoding="ISO-8859-1" ?> -107.210132 21.041869 -97.144224 29.880024 -107.210132 21.041869 -97.144224 29.880024 ?xml version='1.0' encoding="ISO-8859-1" ?> -107.210132 21.041869 -97.144224 29.880024 -107.210132 21.041869 -97.144224 29.880024 .....some coordinates Thanks in advance Pablo On Wed, Nov 25, 2009 at 12:20 PM, Andreas Hocevar wrote: > pablo lopez wrote: > >> Thanks Andreas, I've just tried your suggestion and it didn't work. I'm >> now taking a look at the gml returned by mapserver to see if I need to >> specify more parameters. >> On the other hand, I was looking at the highlight feature code in >> http://trac.openlayers.org/wiki/Highlighting, and I wonder if there is a >> way to control the highlighting with mouse clicks instead of filters. >> Any suggestions on this? >> > > This is only recommended if you have very few features. The prerequisite is > to load the layer as vector layer, not from WMS. > > But back to the original problem. If you provide a sample XML that your > server returns, it will be easier to see what is wrong. > > Regards, > Andreas. > > > Regards, >> Pablo >> >> >> On Wed, Nov 25, 2009 at 1:31 AM, Andreas Hocevar > ahocevar@opengeo.org>> wrote: >> >> Hi, >> >> can you please try the following and report back if it works: >> >> >> pablo lopez wrote: >> >> control = new OpenLayers.Control.GetFeature({ >> protocol: >> OpenLayers.Protocol.WFS.fromWMSLayer(layer), >> >> >> Instead, use >> >> protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer, { >> featurePrefix: "feature" >> }), >> >> That's the only idea I have. >> >> Regards, >> Andreas. >> >> -- Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> >> ------------------------------------------------------------------------ >> >> >> _______________________________________________ >> 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/20091125/7e46906e/attachment.html From igrcic at gmail.com Wed Nov 25 13:39:03 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS-T In-Reply-To: <4B0D546D.1050202@mapgears.com> References: <4B0D3E4A.1080901@mapgears.com> <4B0D546D.1050202@mapgears.com> Message-ID: Hi, I would say your solution depends on two things: level of interactivity you want to achieve and browser limits. Most important thing to have in your mind: Browser limit says don't load more then (having IE in mind) -> 100-150 features! Off course we would like to have the highest level of interactivity, that is, to have all the features loaded - vector layer, so we can have fast hover/click effects on features. But because of browser limits that's not possible. So depending on your data, we can cope with this with different solutions: 1) Use wms layer with GetFeature control http://openlayers.org/dev/examples/getfeature-wfs.html Like this all the feature show up, but you only get some info when you click on it. Bad thing is that sometimes it takes some time to query the features (lower interactivity), so make sure you have fast response from your server for this (spatial index data usually helps ;) Use this for large scales of you layer 2) Use vector layers. Use this solutions when you are sure that you wont be requesting lots of features at once (browser limits). Using BBOX with Cluster strategy is not a bad solution. Use this for small scales (small areas -> less features are requested) One important note here: Cluster strategy that we have here is a client solution, that means all the data has to be received before they are clustered. Example: we have 5000 points. If we use cluster strategy they will be visualized with, lets say, 100 points -> within browser limits right? But what about the data transfer and expensive calculations of clusters (every time we zoom in?) Conclusion: be careful with cluster strategy, don't use it if you have more then few hundreds features (and use it together with BBOX strategy) 3) Develop server clustering - this should be the best solution I think (most intereactive also) Let server process the data, and make clusters for you, with some basic cluster info - like geometry, number of features in cluster etc. Then you make vector layer out of it, and implement lets say hover effect that get basic data, and on click you make GetFeatureInfo request that gets the rest of the data. The best example that works in similar way is maps.google.com with Wikipedia & Photos layers, where you can see tons of images at once without lots of stress on thebrowser. Its wms layer with clusters in background, and div elements (or image map?, im not sure) in front. Cheers On Wed, Nov 25, 2009 at 4:59 PM, Alexandre Dube wrote: > Hey, > > 40.000 is sure big. ?You could try the Cluster strategy [1], or have you > points in WMS when zoomed out then changed to WFS when zoomed in. ?The > latter is what I'm doing in the demo I sent you. ?Load it, then zoom > out. ?You'll see that the roads switch from WFS to WMS. ?You could also > do that. > > Best regards, > > Alexandre > > [1] http://openlayers.org/dev/examples/strategy-cluster.html > > > JuKiM wrote: >> Ok.. >> >> And about the other question.. If in the datasource there are about >> 40.000 positions... Is a good way to try loading them with WFS? Or >> using WMS is recommended? >> >> Thanks! >> >> >> 2009/11/25 Alexandre Dube > >> >> ? ? Hi, >> >> ? ? ?Just before your commit, you need to copy the your field values >> ? ? to the feature's attributes. ?They will then be part of the >> ? ? 'insert' request sent to your server. ?See an example (demo) of >> ? ? what I'm talking about [1]. ?It uses TinyOWS, but it should be >> ? ? similar to what you're seeking to do. >> >> ? ? ?Hope this helps, >> >> ? ? Alexandre >> >> >> ? ? [1] http://dev4.mapgears.com/bdga/bdgaWFS-T.html >> >> >> ? ? JuKiM wrote: >> >> ? ? ? ? Hi, >> >> ? ? ? ? I'm searching documentation about WFS-T, because with I can >> ? ? ? ? understand, it let to create new entries in the datastore >> ? ? ? ? through the GeoServer.... >> >> ? ? ? ? I create the map, and a wms layers which is displayed, and >> ? ? ? ? then I create the wfs layer.. >> >> ? ? ? ? wfs = new >> ? ? ? ? OpenLayers.Layer.WFS("Test_Layer","http://localhost:8080/geoserver/wfs", >> ? ? ? ? ? ? ? ? ? ? ? ?{typename: 'Test:dots'}, >> ? ? ? ? ? ? ? ? ? ? ? ?{ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?typename: "dots", >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?featureNS: "http://www.uriURL.org/test", >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?extractAttributes: false, >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?commitReport: function(str) { >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? alert(str); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?OpenLayers.Console.log(str); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ?); >> >> ? ? ? ? var draw = new OpenLayers.Control.DrawFeature( >> ? ? ? ? ? ? ? ? ? ? ? ?wfs, OpenLayers.Handler.Point, >> ? ? ? ? ? ? ? ? ? ? ? ?{ >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?handlerOptions: {freehand: false, multi: true}, >> ? ? ? ? ? ? ? ? ? ? ? ? ? ?displayClass: "olControlDrawFeaturePoint" >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ? ? ?); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?var save = new OpenLayers.Control.Button({ >> ? ? ? ? ? ? ? ? ? ? ? ?trigger: OpenLayers.Function.bind(wfs.commit, wfs), >> ? ? ? ? ? ? ? ? ? ? ? ?displayClass: "olControlSaveFeatures" >> ? ? ? ? ? ? ? ? ? ?}); >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?panel.addControls([ >> ? ? ? ? ? ? ? ? ? ? ? ?new OpenLayers.Control.Navigation(), >> ? ? ? ? ? ? ? ? ? ? ? ?save, draw >> ? ? ? ? ? ? ? ? ? ?]); >> ? ? ? ? ? ? ? ? ? ? ?map.addControl(panel); >> >> ? ? ? ? When I save the new points, they are insterted in the DB, but >> ? ? ? ? with empty values.. Only the auto incremental id is created.. >> ? ? ? ? In my table there are four fields, 'id', 'location', >> ? ? ? ? 'description', 'type'. How can I configure the WFS calls to >> ? ? ? ? create the new entries with all the information? (The >> ? ? ? ? information about description and type is the same, and is >> ? ? ? ? stored in a textfield, and the location should be the >> ? ? ? ? different points of the map.. >> >> ? ? ? ? And on the other hand, if the datasource contains about 40.000 >> ? ? ? ? positions, is better to work with WMS and process the >> ? ? ? ? information in server side? >> >> ? ? ? ? Thanks! >> ? ? ? ? ------------------------------------------------------------------------ >> >> ? ? ? ? _______________________________________________ >> ? ? ? ? Users mailing list >> ? ? ? ? Users@openlayers.org >> ? ? ? ? http://openlayers.org/mailman/listinfo/users >> >> >> >> >> ? ? -- >> ? ? Alexandre Dub? >> ? ? Mapgears >> ? ? www.mapgears.com >> >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From pedropbaracho at gmail.com Wed Nov 25 13:40:29 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] What IDE do you use for OpenLayers Development? In-Reply-To: References: <5e3c00490911250739y2affc10dsb1c34905a032f939@mail.gmail.com> <33fd44f90911250948w72bdf304tf5d765c2780076c9@mail.gmail.com> Message-ID: <5e3c00490911251040l187a1930s34d16bcd9cff36a1@mail.gmail.com> I tried Aptana and I am pretty sure it asked me for an activation key, although I have no commercial purposes... Also right now I am trying spkte, which works in the same way as Aptana. I wanted to know if there was any IDE that would have these auto complete features for OpenLayers, like these 2 have for ExtJS, Prototype etc. On Wed, Nov 25, 2009 at 4:32 PM, Hugo wrote: > Hi Pedro, > > If you are wishing to try Eclipse again I recommend you to try out Aptana > first. It is also open-source (not entirely because it has some components > under proprietary licensing). I find it very useful and you can try out > things and preview your app without leaving the IDE. I think it was built > upon eclipse (almost sure) and so the GUI is quite similar. It also has the > possibility to include external libraries (like extjs or jquery) and take > advantage of autocompleting capabilities. > > Hope this helps, > > Hugo > > -- > Hugo Martins > FMV-UTL > CIISA-Epidemiologia e Sa?de P?blica Veterin?ria > Av. da Universidade T?cnica > 1300-477 Lisboa > N 38?42'49.54", W 9?11'43.42" > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091125/27257146/attachment.html From hfpmartins at gmail.com Wed Nov 25 13:57:54 2009 From: hfpmartins at gmail.com (Hugo) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] What IDE do you use for OpenLayers Development? In-Reply-To: <5e3c00490911251040l187a1930s34d16bcd9cff36a1@mail.gmail.com> References: <5e3c00490911250739y2affc10dsb1c34905a032f939@mail.gmail.com> <33fd44f90911250948w72bdf304tf5d765c2780076c9@mail.gmail.com> <5e3c00490911251040l187a1930s34d16bcd9cff36a1@mail.gmail.com> Message-ID: Pedro, If you open Aptana site (http://aptana.com/) and go to Aptana Studio they state the following: *"Download Aptana Studio for Windows, Mac, or Linux. Both the standalone and Eclipse plugin distributions are free, open source software."* I think they will ask the activation key for those proprietary components i have mentioned on the previous email. I've been using it without any problems. Cheers, Hugo -- Hugo Martins FMV-UTL CIISA-Epidemiologia e Sa?de P?blica Veterin?ria Av. da Universidade T?cnica 1300-477 Lisboa N 38?42'49.54", W 9?11'43.42" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091125/ea2a125a/attachment.html From ahocevar at opengeo.org Wed Nov 25 14:06:18 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] problem with WFS GetFeature In-Reply-To: References: <4B0CDD6C.9000004@opengeo.org> <4B0D7576.7030705@opengeo.org> Message-ID: <4B0D802A.4080305@opengeo.org> Hi, Try to do the following: protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer, { featureNS: "http://mapserver.gis.umn.edu/mapserver", featurePrefix: "ms", geometryName: "msGeometry" }); Note that this looks more like WFS1.0.0 with GML2, so if the above still does not work, add version: "1.0.0" Regards, Andreas. pablo lopez wrote: > Ok, here's the XML response from the server: > > > ?xml version='1.0' encoding="ISO-8859-1" ?> > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > xmlns:gml="http://www.opengis.net/gml" > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver > http://localhost/cgi-bin/mapserv?map=/var/www/aplicaciones/sined/regsanu.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=regs_anu&OUTPUTFORMAT=text/xml > ; > subtype=gml/3.1.1 http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> > > > -107.210132 21.041869 > -97.144224 29.880024 > > > > > > > -107.210132 21.041869 > -97.144224 29.880024 > > > ?xml version='1.0' encoding="ISO-8859-1" ?> > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > xmlns:gml="http://www.opengis.net/gml" > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver > http://localhost/cgi-bin/mapserv?map=/var/www/aplicaciones/sined/regsanu.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=regs_anu&OUTPUTFORMAT=text/xml > ; > subtype=gml/3.1.1 http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> > > > -107.210132 21.041869 > -97.144224 29.880024 > > > > > > > -107.210132 21.041869 > -97.144224 29.880024 > > > > > > .....some coordinates > > Thanks in advance > Pablo > > On Wed, Nov 25, 2009 at 12:20 PM, Andreas Hocevar > > wrote: > > pablo lopez wrote: > > Thanks Andreas, I've just tried your suggestion and it didn't > work. I'm now taking a look at the gml returned by mapserver > to see if I need to specify more parameters. > On the other hand, I was looking at the highlight feature code > in http://trac.openlayers.org/wiki/Highlighting, and I wonder > if there is a way to control the highlighting with mouse > clicks instead of filters. > Any suggestions on this? > > > This is only recommended if you have very few features. The > prerequisite is to load the layer as vector layer, not from WMS. > > But back to the original problem. If you provide a sample XML that > your server returns, it will be easier to see what is wrong. > > Regards, > Andreas. > > > Regards, > Pablo > > > On Wed, Nov 25, 2009 at 1:31 AM, Andreas Hocevar > > >> > wrote: > > Hi, > > can you please try the following and report back if it works: > > > pablo lopez wrote: > > control = new OpenLayers.Control.GetFeature({ > protocol: > OpenLayers.Protocol.WFS.fromWMSLayer(layer), > > > Instead, use > > protocol: > OpenLayers.Protocol.WFS.fromWMSLayer(layer, { > featurePrefix: "feature" > }), > > That's the only idea I have. > > Regards, > Andreas. > > -- Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > 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 > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From plablo09 at gmail.com Wed Nov 25 14:22:01 2009 From: plablo09 at gmail.com (pablo lopez) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] problem with WFS GetFeature In-Reply-To: <4B0D802A.4080305@opengeo.org> References: <4B0CDD6C.9000004@opengeo.org> <4B0D7576.7030705@opengeo.org> <4B0D802A.4080305@opengeo.org> Message-ID: Thanks Andreas, that pretty much solved the problem, the featureNS bit doesn't do anything, but the prefix and the geometry name solve the issue. Regards Pablo On Wed, Nov 25, 2009 at 1:06 PM, Andreas Hocevar wrote: > Hi, > > Try to do the following: > > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer, { > featureNS: "http://mapserver.gis.umn.edu/mapserver", > featurePrefix: "ms", > geometryName: "msGeometry" > }); > > Note that this looks more like WFS1.0.0 with GML2, so if the above still > does not work, add > > version: "1.0.0" > > Regards, > Andreas. > > pablo lopez wrote: > >> Ok, here's the XML response from the server: >> >> >> ?xml version='1.0' encoding="ISO-8859-1" ?> >> > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >> xmlns:gml="http://www.opengis.net/gml" >> xmlns:wfs="http://www.opengis.net/wfs" >> xmlns:ogc="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >> http://localhost/cgi-bin/mapserv?map=/var/www/aplicaciones/sined/regsanu.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=regs_anu&OUTPUTFORMAT=text/xml< >> http://localhost/cgi-bin/mapserv?map=/var/www/aplicaciones/sined/regsanu.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=regs_anu&OUTPUTFORMAT=text/xml>; >> subtype=gml/3.1.1 http://www.opengis.net/wfs >> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >> >> >> >> -107.210132 21.041869 >> -97.144224 29.880024 >> >> >> >> >> >> >> -107.210132 21.041869 >> -97.144224 29.880024 >> >> >> ?xml version='1.0' encoding="ISO-8859-1" ?> >> > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >> xmlns:gml="http://www.opengis.net/gml" >> xmlns:wfs="http://www.opengis.net/wfs" >> xmlns:ogc="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >> http://localhost/cgi-bin/mapserv?map=/var/www/aplicaciones/sined/regsanu.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=regs_anu&OUTPUTFORMAT=text/xml< >> http://localhost/cgi-bin/mapserv?map=/var/www/aplicaciones/sined/regsanu.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=regs_anu&OUTPUTFORMAT=text/xml>; >> subtype=gml/3.1.1 http://www.opengis.net/wfs >> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >> >> >> >> -107.210132 21.041869 >> -97.144224 29.880024 >> >> >> >> >> >> >> -107.210132 21.041869 >> -97.144224 29.880024 >> >> >> >> >> >> .....some coordinates >> >> Thanks in advance >> Pablo >> >> On Wed, Nov 25, 2009 at 12:20 PM, Andreas Hocevar > ahocevar@opengeo.org>> wrote: >> >> pablo lopez wrote: >> >> Thanks Andreas, I've just tried your suggestion and it didn't >> work. I'm now taking a look at the gml returned by mapserver >> to see if I need to specify more parameters. >> On the other hand, I was looking at the highlight feature code >> in http://trac.openlayers.org/wiki/Highlighting, and I wonder >> if there is a way to control the highlighting with mouse >> clicks instead of filters. >> Any suggestions on this? >> >> >> This is only recommended if you have very few features. The >> prerequisite is to load the layer as vector layer, not from WMS. >> >> But back to the original problem. If you provide a sample XML that >> your server returns, it will be easier to see what is wrong. >> >> Regards, >> Andreas. >> >> >> Regards, >> Pablo >> >> >> On Wed, Nov 25, 2009 at 1:31 AM, Andreas Hocevar >> >> >> >> >> wrote: >> >> Hi, >> >> can you please try the following and report back if it works: >> >> >> pablo lopez wrote: >> >> control = new OpenLayers.Control.GetFeature({ >> protocol: >> OpenLayers.Protocol.WFS.fromWMSLayer(layer), >> >> >> Instead, use >> >> protocol: >> OpenLayers.Protocol.WFS.fromWMSLayer(layer, { >> featurePrefix: "feature" >> }), >> >> That's the only idea I have. >> >> Regards, >> Andreas. >> >> -- Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> >> >> ------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> 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 >> >> > > > -- > 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/20091125/39fb7166/attachment.html From sigenz at yahoo.co.nz Wed Nov 25 15:14:32 2009 From: sigenz at yahoo.co.nz (Sige) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] wrapDateLine with WMS, map covered by opaque film In-Reply-To: <1258922133220-4047649.post@n2.nabble.com> References: <1258425446167-4016174.post@n2.nabble.com> <1258922133220-4047649.post@n2.nabble.com> Message-ID: <1259180072558-4067382.post@n2.nabble.com> For those who have similar problem, there is actually a work around http://n2.nabble.com/Tiles-outside-maxExtent-being-loaded-td1829360.html#a1829361 posted earlier on this forum , which overcomes the request for tiles outside the maxExtent by creating a subclass of OpenLayers.Layer.WMS and overriding the getURL() method. The new method checks the latitude bounds, setting the URL to that of a fixed blank image if out of bounds. Thank you Jon! Sige wrote: > > I found that wrapDateLine tries to request > http://maps.geonet.org.nz/tilecache/tilecache.py?LAYERS=nasagm&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,-270,0,-180&WIDTH=256&HEIGHT=256 > map tiles outside the map extent , such as: > [-90.0, -270.0, 0.0, -180.0], which our tilecache server is unable to > retrieve and responds with an error message: > > An error occurred: couldn't calculate tile index for layer nasagm from > ([0.0, -270.0, 90.0, -180.0]) > File "/usr/local/tilecache/TileCache/Service.py", line 421, in > modPythonHandler > host ) > > While the WMS server of metacarta is able to handle such > http://labs.metacarta.com/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,-270,0,-180&WIDTH=256&HEIGHT=256 > request , and responds with an empty blue tile, I guess this might be the > reason for the problem mentioned in my previous post. What should I do on > the tilecache server side to handle request outside the map extent? > > Sige > > > > > Sige wrote: >> >> Hi List, >> >> I am trying to make my wms (tilecached) map wrapped across the date line, >> like: >> >> var map = new OpenLayers.Map( $('map'), >> { >> maxResolution: 0.3515625, >> projection: 'EPSG:4326' >> } >> ); >> var wms = new OpenLayers.Layer.WMS( >> "WMS/Tilecache", >> "http://maps.geonet.org.nz/tilecache/tilecache.py?", >> { >> format: 'image/png', >> projection: 'EPSG:4326', >> units: 'degrees', >> maxResolution: 0.3515625, >> layers: 'nasagm', >> isBaseLayer: true, >> reproject: false, >> buffer: 1 >> }, >> {wrapDateLine: true, reproject: false} >> ); >> map.addLayer(wms); >> map.addControl(new OpenLayers.Control.MousePosition()); >> map.zoomToMaxExtent(); >> >> The map wrapped well, however, when I pan and zoom the map around, part >> of the map or the whole map becomes opaque (like covered by a white >> film). I am not sure if this is caused by my wms (tilecache) or >> wrapDateLine. The WMS map works fine without wrapDateLine. >> >> I have also tried the WMS from metacarta.com (mapServer) which works >> fine: >> var wms1 = new OpenLayers.Layer.WMS( "OpenLayers >> Basic",//MapServer >> "http://labs.metacarta.com/wms/vmap0", >> {layers: 'basic'}, >> {wrapDateLine: true} ); >> map.addLayers([ wms1]); >> >> Thanks, >> >> Sige >> > > -- View this message in context: http://n2.nabble.com/wrapDateLine-with-WMS-map-covered-by-opaque-film-tp4016174p4067382.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Wed Nov 25 17:47:51 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Distance problem In-Reply-To: <4B0D0E78.2050604@ulb.ac.be> Message-ID: Hi, Also the map units are in meters, doesn't mean that you can measure real length. EPSG:900913 is not a length-preserving projection. As you can see that the equator have the same lenght as the north or south pole! With the OpenLayers measure control you can get probably the correct length. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Nicolas Noe Gesendet: Mittwoch, 25. November 2009 12:01 An: users@openlayers.org Betreff: [OpenLayers-Users] Distance problem Hi everyone, I have a simple problem, bit I can't figure it. I'm probably missing something very simple and stupid ! I have an OL map with google background. The projection is EPSG:900913, so the map unit is meters (right?). I have a marker layer, on which I add a first marker. Then I ask OL to compute a second marker 1 kilometer on the east, and display it. It seems to work, except of my distance problem : if I check with the OL scaleline, there's 1 KM between both markers (which is correct). However, if I use the ruler tool of Google Earth, I can see there is only about 650 meters between these 2 points. Do you have any idea of where my error is ? Thanks in advance, Here is my code : var BeBounds = new OpenLayers.Bounds(2.5, 49.5, 6.5, 51.5); function mapInit() { var map = new OpenLayers.Map('map', { projection: new OpenLayers.Projection("EPSG:900913"), controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher({'ascending':false}), new OpenLayers.Control.Permalink(), new OpenLayers.Control.ScaleLine(), new OpenLayers.Control.Permalink('permalink'), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.OverviewMap(), new OpenLayers.Control.KeyboardDefaults() ] }); var gsat = new OpenLayers.Layer.Google("Google Hybrid", { type: G_HYBRID_MAP, 'sphericalMercator':true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34) /*, numZoomLevels: 20*/ }); var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(gsat); map.addLayer(markers); // Add a marker var myPoint = new OpenLayers.LonLat(5.080646954,50.49373471); var myPointInMeters = myPoint.transform(new OpenLayers.Projection("EPSG:4326"), map.projection); var pt2 = myPointInMeters.add(1000,0); var mymark = new OpenLayers.Marker(myPointInMeters); var mymark2 = new OpenLayers.Marker(pt2); markers.addMarker(mymark); markers.addMarker(mymark2); map.zoomToExtent(BeBounds.transform(new OpenLayers.Projection("EPSG:4326"), map.projection)); } _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From m.sirin07 at googlemail.com Wed Nov 25 21:08:10 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Remove Features By Id Message-ID: <55744b1c0911251808i7d6b60fdpfccd6fe0651d61a6@mail.gmail.com> Hi, I'm failing when trying to remove a feature selected by its ID: ... var startpoint= new OpenLayers.Feature.Vector(point,null,start_style); startpoint.id="hey"; mylayer.addFeatures([startpoint]); ... var something=getFeatureById("hey"); //works mylayer.removeFeatures(mylayer.features[something]); Maybe it's in general not possible choosing a feature by an associative key ? Then how solving this problem in another, elegant way ? (i have a solution for my problem, but it's definitely not fine or elegant^^) leaving you kind regards mehmet sirin c. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/30b14a79/attachment.html From adrian_gh.popa at romtelecom.ro Thu Nov 26 02:01:07 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] [PartiallySolved] Forcing FramedCloud autoResize when using stylesheets In-Reply-To: <4B00F308.9050105@romtelecom.ro> References: <4AF96BF9.2020505@romtelecom.ro> <4AFABB0A.8060605@romtelecom.ro> <4AFAC2E1.7050809@romtelecom.ro> <4AFD0A9F.6070809@romtelecom.ro> <4B00F308.9050105@romtelecom.ro> Message-ID: <4B0E27B3.6050603@romtelecom.ro> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: cloud-popup-relative.png Type: image/png Size: 3177 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/129f38f5/cloud-popup-relative.png -------------- next part -------------- A non-text attachment was scrubbed... Name: framedCloud-1200px.patch Type: text/x-patch Size: 4798 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/129f38f5/framedCloud-1200px.bin From ahocevar at opengeo.org Thu Nov 26 02:40:47 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Remove Features By Id In-Reply-To: <55744b1c0911251808i7d6b60fdpfccd6fe0651d61a6@mail.gmail.com> References: <55744b1c0911251808i7d6b60fdpfccd6fe0651d61a6@mail.gmail.com> Message-ID: <4B0E30FF.80208@opengeo.org> Hi, Mehmet Sirin wrote: > I'm failing when trying to remove a feature selected by its ID: > > var startpoint= new OpenLayers.Feature.Vector(point,null,start_style); > startpoint.id ="hey"; > mylayer.addFeatures([startpoint]); > ... > var something=getFeatureById("hey"); //works > mylayer.removeFeatures(mylayer.features[something]); The removeFeatures method takes an array of features as argument: myLayer.removeFeatures([something]); Regards, Andreas. > > > > Maybe it's in general not possible choosing a feature by an > associative key ? > Then how solving this problem in another, elegant way ? (i have a > solution for my problem, but it's definitely not fine or elegant^^) > > > > > leaving you kind regards > mehmet sirin c. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 steffen.schwarz85 at googlemail.com Thu Nov 26 04:29:47 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> Message-ID: <1259227787511-4070254.post@n2.nabble.com> Hello, after discovering some examples from openlayers (and from the forum) I finally made it, that my wfs protocol is shown on my map. Now I want to add the filter to my wfs protocol. And that is the problem. After adding the filter, all points are shown on my map again (the same result as when I have no filter). Here is my code: var my_filter = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "NAME", value: "Point_1" }); var saveStrategy = new OpenLayers.Strategy.Save(options); var my_layer = new OpenLayers.Layer.Vector("layer", { strategies: [new OpenLayers.Strategy.Fixed({ preload: false }), saveStrategy], filter: my_filter, styleMap: oStyleMap, protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", featureType: "MY_GAZETTEER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", maxfeatures: 100 }) }); The param 'maxfeatures: 100' doesn't work too (all points are displayed). What am I doing wrong? Thanks for your help. Regards stash -- View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4070254.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Thu Nov 26 05:37:23 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <1259227787511-4070254.post@n2.nabble.com> References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> Message-ID: Hi, I think filter should go inside protocol params. And try with maxFeatures instead of maxfeatures. Let me know if it worked Cheers On Thu, Nov 26, 2009 at 10:29 AM, stash wrote: > > Hello, > > after discovering some examples from openlayers (and from the forum) I > finally made it, that my wfs protocol is shown on my map. > > Now I want to add the filter to my wfs protocol. And that is the problem. > After adding the filter, all points are shown on my map again (the same > result as when I have no filter). > > Here is my code: > > var my_filter = new OpenLayers.Filter.Comparison({ > ? ?type: OpenLayers.Filter.Comparison.EQUAL_TO, > ? ? ? ?property: "NAME", > ? ? ? ?value: "Point_1" > ? ?}); > > ? ?var saveStrategy = new OpenLayers.Strategy.Save(options); > ? ?var my_layer = new OpenLayers.Layer.Vector("layer", { > ? ? ? ?strategies: [new OpenLayers.Strategy.Fixed({ > ? ? ? ? ? ?preload: false > ? ? ? ?}), saveStrategy], > ? ? ? ?filter: my_filter, > ? ? ? ?styleMap: oStyleMap, > ? ? ? ?protocol: new OpenLayers.Protocol.WFS({ > ? ? ? ? ? ?url: "http://localhost:8080/geoserver/wfs", > ? ? ? ? ? ?featureType: "MY_GAZETTEER", > ? ? ? ? ? ?featurePrefix: 'topp', > ? ? ? ? ? ?featureNS: "http://www.openplans.org/topp", > ? ? ? ? ? ?maxfeatures: 100 > ? ? ? ?}) > ? ?}); > > The param 'maxfeatures: 100' doesn't work too (all points are displayed). > > What am I doing wrong? > > Thanks for your help. > > Regards > stash > -- > View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4070254.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 Nov 26 05:48:58 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Remove Features By Id In-Reply-To: <4B0E30FF.80208@opengeo.org> References: <55744b1c0911251808i7d6b60fdpfccd6fe0651d61a6@mail.gmail.com> <4B0E30FF.80208@opengeo.org> Message-ID: Hi, mylayer.removeFeatures(mylayer.getFeatureById(startpoint.id)) Andreas, I think that array param is not necessary, single feature should also work * APIMethod: removeFeatures line 581: if (!(features instanceof Array)) { features = [features]; } BTW features automatically get id, so I wouldnt asign IDs manually. Cheers On Thu, Nov 26, 2009 at 8:40 AM, Andreas Hocevar wrote: > Hi, > > Mehmet Sirin wrote: >> I'm failing when trying to remove a feature selected by its ID: >> >> var startpoint= new OpenLayers.Feature.Vector(point,null,start_style); >> startpoint.id ="hey"; >> mylayer.addFeatures([startpoint]); >> ... >> var something=getFeatureById("hey"); //works >> mylayer.removeFeatures(mylayer.features[something]); > > The removeFeatures method takes an array of features as argument: > > myLayer.removeFeatures([something]); > > Regards, > Andreas. > >> >> >> >> Maybe ?it's in general not possible choosing a feature by an >> associative key ? >> Then how solving this problem in another, elegant way ? (i have a >> solution for my problem, but it's definitely not fine or elegant^^) >> >> >> >> >> leaving you kind regards >> mehmet sirin c. >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 igrcic at gmail.com Thu Nov 26 06:04:45 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> Message-ID: Actually, im not sure if filter should go to protocol. It should go in layer options like you put it. Then strategy should take that filter and apply it to the protocol when data is requested. But I dont see any filter options inside Fixed strategy, only in BBOX strategy. New ticket? So setting filter manually inside protocol will maybe do the trick. On Thu, Nov 26, 2009 at 11:37 AM, Ivan Grcic wrote: > Hi, > > I think filter should go inside protocol params. > And try with maxFeatures instead of maxfeatures. > > Let me know if it worked > Cheers > > On Thu, Nov 26, 2009 at 10:29 AM, stash > wrote: >> >> Hello, >> >> after discovering some examples from openlayers (and from the forum) I >> finally made it, that my wfs protocol is shown on my map. >> >> Now I want to add the filter to my wfs protocol. And that is the problem. >> After adding the filter, all points are shown on my map again (the same >> result as when I have no filter). >> >> Here is my code: >> >> var my_filter = new OpenLayers.Filter.Comparison({ >> ? ?type: OpenLayers.Filter.Comparison.EQUAL_TO, >> ? ? ? ?property: "NAME", >> ? ? ? ?value: "Point_1" >> ? ?}); >> >> ? ?var saveStrategy = new OpenLayers.Strategy.Save(options); >> ? ?var my_layer = new OpenLayers.Layer.Vector("layer", { >> ? ? ? ?strategies: [new OpenLayers.Strategy.Fixed({ >> ? ? ? ? ? ?preload: false >> ? ? ? ?}), saveStrategy], >> ? ? ? ?filter: my_filter, >> ? ? ? ?styleMap: oStyleMap, >> ? ? ? ?protocol: new OpenLayers.Protocol.WFS({ >> ? ? ? ? ? ?url: "http://localhost:8080/geoserver/wfs", >> ? ? ? ? ? ?featureType: "MY_GAZETTEER", >> ? ? ? ? ? ?featurePrefix: 'topp', >> ? ? ? ? ? ?featureNS: "http://www.openplans.org/topp", >> ? ? ? ? ? ?maxfeatures: 100 >> ? ? ? ?}) >> ? ?}); >> >> The param 'maxfeatures: 100' doesn't work too (all points are displayed). >> >> What am I doing wrong? >> >> Thanks for your help. >> >> Regards >> stash >> -- >> View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4070254.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 steffen.schwarz85 at googlemail.com Thu Nov 26 06:08:09 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> Message-ID: <1259233689123-4070602.post@n2.nabble.com> Ivan Grcic-2 wrote: > > Hi, > > I think filter should go inside protocol params. > And try with maxFeatures instead of maxfeatures. > > Let me know if it worked > Cheers > Hi, thanks for the hint. First the good news. When I type maxFeatures instead of maxfeatures it works. Thats fine. But the filter, which is much more important for me, isn't working (even when I put the filter: my_filter param inside the protocol params.) Do you have any other idea? Regards stash -- View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4070602.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Thu Nov 26 06:19:29 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <1259233689123-4070602.post@n2.nabble.com> References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> Message-ID: Im going to check it out with my data now. I have to examine request and see if the filter is actually sent in the request. In the meanwhile, can you try with BBOX Strategy instead of Fixed strategy?( Put your filter in layer options) On Thu, Nov 26, 2009 at 12:08 PM, stash wrote: > > > > Ivan Grcic-2 wrote: >> >> Hi, >> >> I think filter should go inside protocol params. >> And try with maxFeatures instead of maxfeatures. >> >> Let me know if it worked >> Cheers >> > > Hi, > > thanks for the hint. First the good news. When I type maxFeatures instead of > maxfeatures it works. Thats fine. But the filter, which is much more > important for me, isn't working (even when I put the filter: my_filter param > inside the protocol params.) > > Do you have any other idea? > > Regards > stash > > -- > View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4070602.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 kgeusebroek at xebia.com Thu Nov 26 06:27:16 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1258961787884-4049517.post@n2.nabble.com><4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com><4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> Message-ID: Hi, filter should into layer options! Something like this: function setRadiusFilter(ft) { if (ft != null) { var radiusFilter = new OpenLayers.Filter.Spatial( { type: OpenLayers.Filter.Spatial.DWITHIN, distance: selectedRadius, value: ft.geometry, projection: myLayer.projection } ); var combinedFilter=new OpenLayers.Filter.Logical({ type:OpenLayers.Filter.Logical.AND, filters:[filter,radiusFilter] }); myLayer.filter = combinedFilter; Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Ivan Grcic Sent: Thursday, November 26, 2009 12:19 PM To: stash Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] WFS + Filter Im going to check it out with my data now. I have to examine request and see if the filter is actually sent in the request. In the meanwhile, can you try with BBOX Strategy instead of Fixed strategy?( Put your filter in layer options) On Thu, Nov 26, 2009 at 12:08 PM, stash wrote: > > > > Ivan Grcic-2 wrote: >> >> Hi, >> >> I think filter should go inside protocol params. >> And try with maxFeatures instead of maxfeatures. >> >> Let me know if it worked >> Cheers >> > > Hi, > > thanks for the hint. First the good news. When I type maxFeatures instead of > maxfeatures it works. Thats fine. But the filter, which is much more > important for me, isn't working (even when I put the filter: my_filter param > inside the protocol params.) > > Do you have any other idea? > > Regards > stash > > -- > View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4070602.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 From igrcic at gmail.com Thu Nov 26 06:37:44 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> Message-ID: Yes, but using it together with Fixed strategy doesnt work. Maybe there is ticket allready opened for that, ill take a look. Stash, can you try putting defaultFilter option inside protocol params? On Thu, Nov 26, 2009 at 12:27 PM, Kris Geusebroek wrote: > Hi, > > ?filter should into layer options! > > Something like this: > > function setRadiusFilter(ft) { > ? ? ? ?if (ft != null) { > ? ? ? ? ? ? ? ?var radiusFilter = new OpenLayers.Filter.Spatial( > ? ? ? ? ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?type: OpenLayers.Filter.Spatial.DWITHIN, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?distance: selectedRadius, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value: ft.geometry, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?projection: myLayer.projection > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?); > ? ? ? ? ? ? ? ?var combinedFilter=new OpenLayers.Filter.Logical({ > ? ? ? ? ? ? ? ? ? ? ? ?type:OpenLayers.Filter.Logical.AND, > ? ? ? ? ? ? ? ? ? ? ? ?filters:[filter,radiusFilter] > ? ? ? ? ? ? ? ?}); > ? ? ? ? ? ? ? ?myLayer.filter = combinedFilter; > > > Cheers Kris > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Ivan Grcic > Sent: Thursday, November 26, 2009 12:19 PM > To: stash > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] WFS + Filter > > Im going to check it out with my data now. I have to examine request > and see if the filter is actually sent in the request. > > In the meanwhile, can you try with BBOX Strategy instead of Fixed > strategy?( Put your filter in layer options) > > On Thu, Nov 26, 2009 at 12:08 PM, stash > wrote: >> >> >> >> Ivan Grcic-2 wrote: >>> >>> Hi, >>> >>> I think filter should go inside protocol params. >>> And try with maxFeatures instead of maxfeatures. >>> >>> Let me know if it worked >>> Cheers >>> >> >> Hi, >> >> thanks for the hint. First the good news. When I type maxFeatures > instead of >> maxfeatures it works. Thats fine. But the filter, which is much more >> important for me, isn't working (even when I put the filter: my_filter > param >> inside the protocol params.) >> >> Do you have any other idea? >> >> Regards >> stash >> >> -- >> View this message in context: > http://n2.nabble.com/WFS-Filter-tp4049517p4070602.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 > -- Ivan Grcic From kgeusebroek at xebia.com Thu Nov 26 06:44:30 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> Message-ID: Hi, Don't know if it works with fixed strategy but you can try to call myLayer.refresh({force: true});after setting the filter Cheers Kris -----Original Message----- From: Ivan Grcic [mailto:igrcic@gmail.com] Sent: Thursday, November 26, 2009 12:38 PM To: Kris Geusebroek Cc: stash; users@openlayers.org Subject: Re: [OpenLayers-Users] WFS + Filter Yes, but using it together with Fixed strategy doesnt work. Maybe there is ticket allready opened for that, ill take a look. Stash, can you try putting defaultFilter option inside protocol params? On Thu, Nov 26, 2009 at 12:27 PM, Kris Geusebroek wrote: > Hi, > > ?filter should into layer options! > > Something like this: > > function setRadiusFilter(ft) { > ? ? ? ?if (ft != null) { > ? ? ? ? ? ? ? ?var radiusFilter = new OpenLayers.Filter.Spatial( > ? ? ? ? ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?type: OpenLayers.Filter.Spatial.DWITHIN, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?distance: selectedRadius, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value: ft.geometry, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?projection: myLayer.projection > ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?); > ? ? ? ? ? ? ? ?var combinedFilter=new OpenLayers.Filter.Logical({ > ? ? ? ? ? ? ? ? ? ? ? ?type:OpenLayers.Filter.Logical.AND, > ? ? ? ? ? ? ? ? ? ? ? ?filters:[filter,radiusFilter] > ? ? ? ? ? ? ? ?}); > ? ? ? ? ? ? ? ?myLayer.filter = combinedFilter; > > > Cheers Kris > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Ivan Grcic > Sent: Thursday, November 26, 2009 12:19 PM > To: stash > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] WFS + Filter > > Im going to check it out with my data now. I have to examine request > and see if the filter is actually sent in the request. > > In the meanwhile, can you try with BBOX Strategy instead of Fixed > strategy?( Put your filter in layer options) > > On Thu, Nov 26, 2009 at 12:08 PM, stash > wrote: >> >> >> >> Ivan Grcic-2 wrote: >>> >>> Hi, >>> >>> I think filter should go inside protocol params. >>> And try with maxFeatures instead of maxfeatures. >>> >>> Let me know if it worked >>> Cheers >>> >> >> Hi, >> >> thanks for the hint. First the good news. When I type maxFeatures > instead of >> maxfeatures it works. Thats fine. But the filter, which is much more >> important for me, isn't working (even when I put the filter: my_filter > param >> inside the protocol params.) >> >> Do you have any other idea? >> >> Regards >> stash >> >> -- >> View this message in context: > http://n2.nabble.com/WFS-Filter-tp4049517p4070602.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 > -- Ivan Grcic From steffen.schwarz85 at googlemail.com Thu Nov 26 07:31:52 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> Message-ID: <1259238712600-4070907.post@n2.nabble.com> Hi, thanks for your answers. But I have to admit, that I don't know exactly what to do now. (I have not so much experience in openlayers, so I don't understand some of your answers. Kris Geusebroek wrote: > > Don't know if it works with fixed strategy but you can try to call > myLayer.refresh({force: true});after setting the filter > I did this, but nothing changed. > In the meanwhile, can you try with BBOX Strategy instead of Fixed > strategy?( Put your filter in layer options) > When I change it in BBOX strategy no data is shown on my map. >> function setRadiusFilter(ft) { >> if (ft != null) { >> var radiusFilter = new OpenLayers.Filter.Spatial( >> { >> type: OpenLayers.Filter.Spatial.DWITHIN, >> distance: selectedRadius, >> value: ft.geometry, >> projection: myLayer.projection >> } >> ); >> var combinedFilter=new OpenLayers.Filter.Logical({ >> type:OpenLayers.Filter.Logical.AND, >> filters:[filter,radiusFilter] >> }); >> myLayer.filter = combinedFilter; > Why do I need this function? When do I call it? > Stash, can you try putting defaultFilter option inside protocol params? > What do you mean by defaultFilter option? Thanks for your help. regards stash -- View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4070907.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Thu Nov 26 07:47:26 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <1259238712600-4070907.post@n2.nabble.com> References: <1258967659865-4049908.post@n2.nabble.com> <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> <1259238712600-4070907.post@n2.nabble.com> Message-ID: On Thu, Nov 26, 2009 at 1:31 PM, stash wrote: > > > > Hi, > > thanks for your answers. But I have to admit, that I don't know exactly what > to do now. (I have not so much experience in openlayers, so I don't > understand some of your answers. > > > Kris Geusebroek wrote: >> >> Don't know if it works with fixed strategy but you can try to call >> myLayer.refresh({force: true});after setting the filter >> > > I did this, but nothing changed. > > > >> In the meanwhile, can you try with BBOX Strategy instead of Fixed >> strategy?( Put your filter in layer options) >> > > When I change it in BBOX strategy no data is shown on my map. > What is the response you get? > > >>> function setRadiusFilter(ft) { >>> ? ? ? ?if (ft != null) { >>> ? ? ? ? ? ? ? ?var radiusFilter = new OpenLayers.Filter.Spatial( >>> ? ? ? ? ? ? ? ? ? ? ? ?{ >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?type: OpenLayers.Filter.Spatial.DWITHIN, >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?distance: selectedRadius, >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?value: ft.geometry, >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?projection: myLayer.projection >>> ? ? ? ? ? ? ? ? ? ? ? ?} >>> ? ? ? ? ? ? ? ?); >>> ? ? ? ? ? ? ? ?var combinedFilter=new OpenLayers.Filter.Logical({ >>> ? ? ? ? ? ? ? ? ? ? ? ?type:OpenLayers.Filter.Logical.AND, >>> ? ? ? ? ? ? ? ? ? ? ? ?filters:[filter,radiusFilter] >>> ? ? ? ? ? ? ? ?}); >>> ? ? ? ? ? ? ? ?myLayer.filter = combinedFilter; >> > > Why do I need this function? When do I call it? > This is only the way he made a filter, you allready have filter created (var my_filter) > > >> Stash, can you try putting defaultFilter option inside protocol params? >> > > What do you mean by defaultFilter option? protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", featureType: "MY_GAZETTEER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", maxfeatures: 100, defaultFilter: my_filter }) You have to apply the patch in order for this to work: http://trac.openlayers.org/ticket/2292 (best is to get OL trunk version from svn) > > > Thanks for your help. > > regards > stash > -- > View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4070907.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 m.sirin07 at googlemail.com Thu Nov 26 07:54:52 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Remove Features By Id In-Reply-To: References: <55744b1c0911251808i7d6b60fdpfccd6fe0651d61a6@mail.gmail.com> <4B0E30FF.80208@opengeo.org> Message-ID: <55744b1c0911260454i78b672e3xcbc862e56c0e49ea@mail.gmail.com> ..let me try it... mylayer.removeFeatures(mylayer.getFeatureById("start")) uuh yes its works! thank you ! regards mehmet sirin c. 2009/11/26 Ivan Grcic > Hi, > > mylayer.removeFeatures(mylayer.getFeatureById(startpoint.id)) > > Andreas, I think that array param is not necessary, single feature > should also work > > * APIMethod: removeFeatures line 581: > if (!(features instanceof Array)) { > features = [features]; > } > > BTW features automatically get id, so I wouldnt asign IDs manually. > > Cheers > > On Thu, Nov 26, 2009 at 8:40 AM, Andreas Hocevar > wrote: > > Hi, > > > > Mehmet Sirin wrote: > >> I'm failing when trying to remove a feature selected by its ID: > >> > >> var startpoint= new OpenLayers.Feature.Vector(point,null,start_style); > >> startpoint.id ="hey"; > >> mylayer.addFeatures([startpoint]); > >> ... > >> var something=getFeatureById("hey"); //works > >> mylayer.removeFeatures(mylayer.features[something]); > > > > The removeFeatures method takes an array of features as argument: > > > > myLayer.removeFeatures([something]); > > > > Regards, > > Andreas. > > > >> > >> > >> > >> Maybe it's in general not possible choosing a feature by an > >> associative key ? > >> Then how solving this problem in another, elegant way ? (i have a > >> solution for my problem, but it's definitely not fine or elegant^^) > >> > >> > >> > >> > >> leaving you kind regards > >> mehmet sirin c. > >> > >> > >> > >> ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/21a24f99/attachment.html From steffen.schwarz85 at googlemail.com Thu Nov 26 08:01:20 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> <1259238712600-4070907.post@n2.nabble.com> Message-ID: <1259240480593-4071042.post@n2.nabble.com> hi, thanks for your detailed answer. I set defaultFiler: my_filter in protocol params and now it's working. That's really great. Thanks. > You have to apply the patch in order for this to work: > http://trac.openlayers.org/ticket/2292 > (best is to get OL trunk version from svn) > > I did not apply this patch to get it working. but I use the nightly build of openlayers. Maybe, the patch is there already included. Thanks. Regards stash -- View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4071042.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Steve.Toutant at inspq.qc.ca Thu Nov 26 09:15:43 2009 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant@inspq.qc.ca) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Distance problem In-Reply-To: Message-ID: Hi, Yes you can get the correct length setting the geodesic properties of the measure control to true. But this measure won't fit with the scaleline. I might be wrong but I think there is no such geodesic property for the scaleline. Steve "Arnd Wippermann" @openlayers.org Envoy? par : users-bounces@openlayers.org 25/11/2009 05:47 PM A "'Nicolas Noe'" cc users@openlayers.org Objet Re: [OpenLayers-Users] Distance problem Hi, Also the map units are in meters, doesn't mean that you can measure real length. EPSG:900913 is not a length-preserving projection. As you can see that the equator have the same lenght as the north or south pole! With the OpenLayers measure control you can get probably the correct length. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Nicolas Noe Gesendet: Mittwoch, 25. November 2009 12:01 An: users@openlayers.org Betreff: [OpenLayers-Users] Distance problem Hi everyone, I have a simple problem, bit I can't figure it. I'm probably missing something very simple and stupid ! I have an OL map with google background. The projection is EPSG:900913, so the map unit is meters (right?). I have a marker layer, on which I add a first marker. Then I ask OL to compute a second marker 1 kilometer on the east, and display it. It seems to work, except of my distance problem : if I check with the OL scaleline, there's 1 KM between both markers (which is correct). However, if I use the ruler tool of Google Earth, I can see there is only about 650 meters between these 2 points. Do you have any idea of where my error is ? Thanks in advance, Here is my code : var BeBounds = new OpenLayers.Bounds(2.5, 49.5, 6.5, 51.5); function mapInit() { var map = new OpenLayers.Map('map', { projection: new OpenLayers.Projection("EPSG:900913"), controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.LayerSwitcher({'ascending':false}), new OpenLayers.Control.Permalink(), new OpenLayers.Control.ScaleLine(), new OpenLayers.Control.Permalink('permalink'), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.OverviewMap(), new OpenLayers.Control.KeyboardDefaults() ] }); var gsat = new OpenLayers.Layer.Google("Google Hybrid", { type: G_HYBRID_MAP, 'sphericalMercator':true, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34) /*, numZoomLevels: 20*/ }); var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(gsat); map.addLayer(markers); // Add a marker var myPoint = new OpenLayers.LonLat(5.080646954,50.49373471); var myPointInMeters = myPoint.transform(new OpenLayers.Projection("EPSG:4326"), map.projection); var pt2 = myPointInMeters.add(1000,0); var mymark = new OpenLayers.Marker(myPointInMeters); var mymark2 = new OpenLayers.Marker(pt2); markers.addMarker(mymark); markers.addMarker(mymark2); map.zoomToExtent(BeBounds.transform(new OpenLayers.Projection("EPSG:4326"), map.projection)); } _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/e748252d/attachment.html From derek at cmainfo.co.za Thu Nov 26 09:52:25 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] layerswitcher maximised event? Message-ID: <1259247145572-4071512.post@n2.nabble.com> Is there an event that triggers when the layerswitcher is maximised? If so how do I hook into it? -- View this message in context: http://n2.nabble.com/layerswitcher-maximised-event-tp4071512p4071512.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Thu Nov 26 09:55:14 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <1259240480593-4071042.post@n2.nabble.com> References: <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> <1259238712600-4070907.post@n2.nabble.com> <1259240480593-4071042.post@n2.nabble.com> Message-ID: <1259247314644-4071529.post@n2.nabble.com> Hi, I have one more question and I hope you can answer it. At the moment i have one filter which is working. But now, I want to add a second filter to my wfs protocol. Is that possible? adding both filters (the variables) in defaultFilter at the protocol params doesn't work. Thanks for the help Regards stash -- View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4071529.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Thu Nov 26 10:08:07 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: <1259247314644-4071529.post@n2.nabble.com> References: <1259227787511-4070254.post@n2.nabble.com> <1259233689123-4070602.post@n2.nabble.com> <1259238712600-4070907.post@n2.nabble.com> <1259240480593-4071042.post@n2.nabble.com> <1259247314644-4071529.post@n2.nabble.com> Message-ID: Check this setRadiusFilter function that Kris mentioned before. Hes combining two filters there. var combinedFilter=new OpenLayers.Filter.Logical({ type:OpenLayers.Filter.Logical.AND, filters:[filter,radiusFilter] }); http://openlayers.org/dev/examples/filter.html cheers On Thu, Nov 26, 2009 at 3:55 PM, stash wrote: > > Hi, > > I have one more question and I hope you can answer it. At the moment i have > one filter which is working. But now, I want to add a second filter to my > wfs protocol. > > Is that possible? adding both filters (the variables) in defaultFilter at > the protocol params doesn't work. > > Thanks for the help > > Regards > stash > > -- > View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4071529.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 Nov 26 10:22:57 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1259227787511-4070254.post@n2.nabble.com> <1259238712600-4070907.post@n2.nabble.com> <1259240480593-4071042.post@n2.nabble.com> <1259247314644-4071529.post@n2.nabble.com> Message-ID: BTW this is ticket http://trac.openlayers.org/ticket/2152, but it hasnt been commited to trunk still On Thu, Nov 26, 2009 at 4:08 PM, Ivan Grcic wrote: > Check this setRadiusFilter function that Kris mentioned before. Hes > combining two filters there. > > var combinedFilter=new OpenLayers.Filter.Logical({ > ? ? ? ? ? ? ? ? ? ? ? type:OpenLayers.Filter.Logical.AND, > ? ? ? ? ? ? ? ? ? ? ? filters:[filter,radiusFilter] > ? ? ? ? ? ? ? }); > > http://openlayers.org/dev/examples/filter.html > > cheers > > > On Thu, Nov 26, 2009 at 3:55 PM, stash wrote: >> >> Hi, >> >> I have one more question and I hope you can answer it. At the moment i have >> one filter which is working. But now, I want to add a second filter to my >> wfs protocol. >> >> Is that possible? adding both filters (the variables) in defaultFilter at >> the protocol params doesn't work. >> >> Thanks for the help >> >> Regards >> stash >> >> -- >> View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4071529.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 steffen.schwarz85 at googlemail.com Thu Nov 26 10:50:32 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1259233689123-4070602.post@n2.nabble.com> <1259238712600-4070907.post@n2.nabble.com> <1259240480593-4071042.post@n2.nabble.com> <1259247314644-4071529.post@n2.nabble.com> Message-ID: <1259250632455-4071778.post@n2.nabble.com> Ivan Grcic-2 wrote: > > > var combinedFilter=new OpenLayers.Filter.Logical({ > type:OpenLayers.Filter.Logical.AND, > filters:[filter,radiusFilter] > }); > > http://openlayers.org/dev/examples/filter.html > > Hi, Good idea to look at this example. This is exactly what I need. I already tried it and it works. thanks. regards stash -- View this message in context: http://n2.nabble.com/WFS-Filter-tp4049517p4071778.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Thu Nov 26 11:19:08 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Text (Text_Symbolizer) Message-ID: <1259252348410-4071914.post@n2.nabble.com> Hi, I didn't know a good Subject titel for my question, therefore I explain it exactly know. I have a protocol wfs which shows some points on my map (with geoserver). That is working fine so far. But besides the points, I want to show the name of the points in my map. Before I used the wfs I had a wms with a sld_body. With this sld_body I could see the points and the names of the points on my map (sld_body= styled layer descriptor with point_symbolizer and text_symbolizer). But because of the big amount of data I decided to use a wfs instead of a wms. Everything works fine with a wfs, but it would be perfect, when I could see the names of the points (besides the points) in my map (like it was with the wms). Is this possible with using a wfs. I have already implemented a styleMap to show my points in different colors. Can I add something like a text_symbolizer there? I hope someone can help me. Thanks for the answers. Regards stash -- View this message in context: http://n2.nabble.com/WFS-Text-Text-Symbolizer-tp4071914p4071914.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From florent.coste at gmail.com Thu Nov 26 11:20:28 2009 From: florent.coste at gmail.com (Florent Coste) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] too much CPU used when zooming Message-ID: <6478775d0911260820i1b80dd2cxcfff744c785fbbbd@mail.gmail.com> Hello OpenLayer community I'm a little surprised by the CPU used when zooming on any layer (WMS, TMS....) It is like there is a spinning loop somewhere. For me this is like the tiles are displayed synchronously : It is looks like the map is not rendered until all tiles are retreived from the network. Inside FireBug, clear() method is eating time and CPU (i'm not used to firebug for profiling) clear()7025.62%73.726ms*3316.139*ms47.373ms40.459ms97.064msOpenLayers.js (ligne 886) The CPU used during zoom is so high that the user experience is not good... i'm available to test any patch to test/investigate the situation. Regards, Florent -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/84851b51/attachment.html From mak.kolybabi at telenium.ca Thu Nov 26 11:57:59 2009 From: mak.kolybabi at telenium.ca (Mak Kolybabi) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] OpenLayers.Format.JSON not working Message-ID: <20091126165759.GA7016@throckmorton> I've wasted long enough on this, it's time to ask for help... I'm making a simple Ajax request with OpenLayers.loadURL, which works perfectly. If I process the return data with: var info = eval("(" + response.responseText + ")"); a proper object is created in both IE and Firefox. But if I try to use: var parser = new OpenLayers.Format.JSON(); var info = parser.read(response.responseText); nothing happens. In fact, if I try: var parser = new OpenLayers.Format.JSON(); var info = parser.read("{'a': 1}"); in the Firebug console, info will contain null. Can anyone provide a guess as to what might be going wrong? Any help would be much 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/20091126/5ea64302/attachment.bin From rifins at gmail.com Thu Nov 26 12:05:41 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS post and proxy? Message-ID: Hi, I think that I'm missplacing something with the POST method... When I load an WMS, I needed to put the OpenLayers.ProxyHost = "test.aspx?url="; in order to get the WMS data from geoserver when the GET method is done... But, what about making a POST? I'm trying to understant how can I send the POST to the geoserver going through the test.aspx proxy? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/c1749f1e/attachment.html From igrcic at gmail.com Thu Nov 26 12:09:38 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Text (Text_Symbolizer) In-Reply-To: <1259252348410-4071914.post@n2.nabble.com> References: <1259252348410-4071914.post@n2.nabble.com> Message-ID: http://openlayers.org/dev/examples/vector-features-with-text.html You shoul dreally be using http://openlayers.org/dev/examples/example-list.html more often ;) cheers On Thu, Nov 26, 2009 at 5:19 PM, stash wrote: > > Hi, > I didn't know a good Subject titel for my question, therefore I explain it > exactly know. > > I have a protocol wfs which shows some points on my map (with geoserver). > That is working fine so far. But besides the points, I want to show the name > of the points in my map. > > Before I used the wfs I had a wms with a sld_body. With this sld_body I > could see the points and the names of the points on my map (sld_body= styled > layer descriptor with point_symbolizer and text_symbolizer). > > But because of the big amount of data I decided to use a wfs instead of a > wms. Everything works fine with a wfs, but it would be perfect, when I could > see the names of the points (besides the points) in my map (like it was with > the wms). > > Is this possible with using a wfs. I have already implemented a styleMap to > show my points in different colors. Can I add something like a > text_symbolizer there? > > I hope someone can help me. > > Thanks for the answers. > > Regards > stash > -- > View this message in context: http://n2.nabble.com/WFS-Text-Text-Symbolizer-tp4071914p4071914.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 m.sirin07 at googlemail.com Thu Nov 26 14:44:47 2009 From: m.sirin07 at googlemail.com (Mehmet Sirin) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Dragging and Selecting Message-ID: <55744b1c0911261144o2b6792ffnd8017b61c53c42f9@mail.gmail.com> Hi, somehow my combined select and drag does not work the way I want.. for the first time I click on "marker-green" it turns into "marker blue", but after i clicked out and reselect the feature it won't turn to blue. But then it's still draggable.. just the selectControl seems to be deactivated. And my second question: Is it possible to use both hover and select ? Because turning on hover turns off the normal selectFeature ability... take a look at the code that is responsible for the above described problem: var vectors1 = new OpenLayers.Layer.Vector("Vector Layer 1", { styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({ externalGraphic: "../img/marker-green.png", graphicOpacity: 1, rotation: -45, pointRadius: 10 }, OpenLayers.Feature.Vector.style["default"])), "select": new OpenLayers.Style({ externalGraphic: "../img/marker-blue.png" }) }) }); map.addLayers([wmsLayer, vectors1]); map.addControl(new OpenLayers.Control.LayerSwitcher()); selectControl = new OpenLayers.Control.SelectFeature( [vectors1], { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", multipleKey: "shiftKey" } ); map.addControl(selectControl); map.setCenter(new OpenLayers.LonLat(0, 0), 3); vectors1.addFeatures(createFeatures()); var dragFeature = new OpenLayers.Control.DragFeature(vectors1,{}); map.addControl(dragFeature); dragFeature.activate(); selectControl.activate(); in hope someone could help me.. regards mehmet sirin c. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/9e318e9b/attachment.html From igrcic at gmail.com Fri Nov 27 02:05:54 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Dragging and Selecting In-Reply-To: <55744b1c0911261144o2b6792ffnd8017b61c53c42f9@mail.gmail.com> References: <55744b1c0911261144o2b6792ffnd8017b61c53c42f9@mail.gmail.com> Message-ID: On Thu, Nov 26, 2009 at 8:44 PM, Mehmet Sirin wrote: > Hi, > > somehow my combined select and drag does not work the way I want.. > for the first time I click on "marker-green" it turns into "marker blue", > but after i clicked out and reselect the feature it won't turn to blue. But > then it's still draggable.. just the selectControl seems to be deactivated. > > And my second question: Is it possible to use both hover and select ? Yes,but you have to make two selectfeature controls, one with http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature-js.html#OpenLayers.Control.SelectFeature.highlightOnly and one normal for click > Because turning on hover turns off the normal selectFeature ability... > > > take a look at the code that is responsible for the above described problem: > > ??????????? var vectors1 = new OpenLayers.Layer.Vector("Vector Layer 1", { > ??????????????? styleMap: new OpenLayers.StyleMap({ > ??????????????????? "default": new > OpenLayers.Style(OpenLayers.Util.applyDefaults({ > ??????????????????????? externalGraphic: "../img/marker-green.png", > ??????????????????????? graphicOpacity: 1, > ??????????????????????? rotation: -45, > ??????????????????????? pointRadius: 10 > ??????????????????? }, OpenLayers.Feature.Vector.style["default"])), > ??????????????????? "select": new OpenLayers.Style({ > ??????????????????????? externalGraphic: "../img/marker-blue.png" > ??????????????????? }) > ??????????????? }) > ??????????? }); > > ??????????? map.addLayers([wmsLayer, vectors1]); > ??????????? map.addControl(new OpenLayers.Control.LayerSwitcher()); > > ??????????? selectControl = new OpenLayers.Control.SelectFeature( > ??????????????? [vectors1], > ??????????????? { > ??????????????????? clickout: true, toggle: false, > ??????????????????? multiple: false, hover: false, > ??????????????????? toggleKey: "ctrlKey", > ??????????????????? multipleKey: "shiftKey" > ??????????????? } > ??????????? ); > > ??????????? map.addControl(selectControl); > > ??????????? map.setCenter(new OpenLayers.LonLat(0, 0), 3); > ??????????? vectors1.addFeatures(createFeatures()); > > ????????? var dragFeature = new > OpenLayers.Control.DragFeature(vectors1,{}); > > > ??????????? map.addControl(dragFeature); > ??????????? dragFeature.activate(); > ? ??? ??? selectControl.activate(); > > > > in hope someone could help me.. > regards > mehmet sirin c. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From adrian_gh.popa at romtelecom.ro Fri Nov 27 02:18:34 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Advice about Google layer limitations Message-ID: <4B0F7D4A.4020603@romtelecom.ro> Hello everybody, I would like to share with you my findings about the usage of Google background on very large maps. I have to render a map with the screen resolution of about 4500x3100 (on a wall of screens). It works ok with WFS layers, OSM and even Microsoft Virtual Earth, but I have issues with Google and Yahoo. When I switch to the google layer, the background turns gray and then the browser starts loading the images. After about 130s of loading (there are quite a lot of pictures), I notice that google starts throwing back HTTP 403 errors (Resource temporary unavailable). Just before seeing these errors, some images (the center part of the map) start appearing, but only about 1/4 of the map is drawn. If I wait about 5 minutes, the download process gives up (it still receives HTTP 403 errors all this time), but it displays the rest of the images - which were apparently downloaded before the 403 error appeard. I'm thinking it manages to download most of the visible images + some images in the bbox (which is quite large), but not all the images before getting errors. The problem is the Google API doesn't display what it downloaded, but waits for more images to be downloaded. After analysing the data, I noticed that when the first DNS query is done for the Google cache, it receives back 4 IP addresses. However, only the first 2 IPs are used for traffic - and these 2 IPs start sending back HTTP 403 errors after a while. I would like to know if the following are possible: 1. configure the Google API to use all the IP addresses it receives in the DNS query - maybe this avoids the 403 erros 2. configure the Google API to display the pictures received without waiting for more pictures to download. I'm not sure if this is possible - maybe the images are pipelined through the same connection - and they are shown only when the connection closes. 3. reduce the bbox for the Google Layer - this should be fine for my needs - and maybe avoids the 403 errors. With regard to the Yahoo layer - things are better. It loads faster for the same size (they don't seem to have a "throttling" mechanism), but it only displays the final image when all the bits are downloaded - so it's as fast as the slowest image. Can this behavoir be changed from within OpenLayers? Thanks, Adrian From steffen.schwarz85 at googlemail.com Fri Nov 27 03:27:13 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Text (Text_Symbolizer) In-Reply-To: References: <1259252348410-4071914.post@n2.nabble.com> Message-ID: <1259310433623-4074588.post@n2.nabble.com> Ivan Grcic-2 wrote: > > http://openlayers.org/dev/examples/vector-features-with-text.html > Hi, thanks for the example. After studying it, I copied the code, changed it for my app and it worked. But the disadvantage in the example is, that a predefined text (in my app i used: "test") is used by the stylemap. Because I don't want to have the same text at each point I have a small problem. The text for each point is stored in my database (which is connected to a layer in geoserver). Now I want to use the text from the database for each point instead of predefining some text. Is this possible? Can you tell me how to implement this. Thanks for the help. Regards stash -- View this message in context: http://n2.nabble.com/WFS-Text-Text-Symbolizer-tp4071914p4074588.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From cbo at le34.dk Fri Nov 27 05:34:22 2009 From: cbo at le34.dk (Chau) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] IE: OpenLayers not visible Message-ID: <1259318062411-4075092.post@n2.nabble.com> Hi! I've made a fairly simple OpenLayers page, that just displays a map, zoom/pan, overview map and layercontrol. It works perfectly in FF, but in IE the page is visually empty. Using IE8's debugging tool, I can verify, that my 'map' DIV has been populated. When I pan/zoom in the window, IE is caching new images - just like I think it should, but still nothing is visible. I recieve no JS errors and a validation of the HTML and CSS code returns succesfully from W3. Can you guide me to find the problem? Kind regards, Casper -- View this message in context: http://n2.nabble.com/IE-OpenLayers-not-visible-tp4075092p4075092.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Fri Nov 27 06:21:33 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Text (Text_Symbolizer) In-Reply-To: <1259310433623-4074588.post@n2.nabble.com> References: <1259252348410-4071914.post@n2.nabble.com> <1259310433623-4074588.post@n2.nabble.com> Message-ID: It's pretty simple, from the example: label : "name: ${name}, age: ${age}", where ${name} -> feature.attributes.name and ${age} -> feature.attributes.age So labels are attribute values, which you get from your geoserver that gets it from database ;) cheers On Fri, Nov 27, 2009 at 9:27 AM, stash wrote: > > > > Ivan Grcic-2 wrote: >> >> http://openlayers.org/dev/examples/vector-features-with-text.html >> > > Hi, > thanks for the example. After studying it, I copied the code, changed it for > my app and it worked. > > But the disadvantage in the example is, that a predefined text (in my app i > used: "test") is used by the stylemap. > > Because I don't want to have the same text at each point I have a small > problem. > > The text for each point is stored in my database (which is connected to a > layer in geoserver). Now I want to use the text from the database for each > point instead of predefining some text. > > Is this possible? Can you tell me how to implement this. > > Thanks for the help. > > Regards > stash > -- > View this message in context: http://n2.nabble.com/WFS-Text-Text-Symbolizer-tp4071914p4074588.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 ks at geograf.dk Fri Nov 27 06:39:42 2009 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] IE: OpenLayers not visible In-Reply-To: <1259318062411-4075092.post@n2.nabble.com> References: <1259318062411-4075092.post@n2.nabble.com> Message-ID: <4B0FBA7E.8030608@geograf.dk> The most common reason something works in FF but fails in IE is a trailing comma: var obj = { x: 1, y: 2, //<--- Causes error in IE, fine in FF }; Regards, Kenneth Skovhede, GEOGRAF A/S Chau skrev: > Hi! > > I've made a fairly simple OpenLayers page, that just displays a map, > zoom/pan, overview map and layercontrol. It works perfectly in FF, but in IE > the page is visually empty. Using IE8's debugging tool, I can verify, that > my 'map' DIV has been populated. When I pan/zoom in the window, IE is > caching new images - just like I think it should, but still nothing is > visible. I recieve no JS errors and a validation of the HTML and CSS code > returns succesfully from W3. > > Can you guide me to find the problem? > > Kind regards, Casper > > > From adrian_gh.popa at romtelecom.ro Fri Nov 27 07:00:20 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Advice about Google layer limitations In-Reply-To: <4B0F7D4A.4020603@romtelecom.ro> References: <4B0F7D4A.4020603@romtelecom.ro> Message-ID: <4B0FBF54.5050309@romtelecom.ro> I asked the same question on Google API forums, and it looks like the original Google API doesn't have this limitation. I did some tests and you can see the results on this thread: http://groups.google.com/group/google-maps-api/browse_thread/thread/97d62ed9a85e665e I would like to know if there is something that can be done from the OpenLayers side, or is this a known limitation. Is OpenLayers scraping images from Google, or is it using the API just like any other Google Maps client? Thank you, Adrian Adrian Popa wrote: > Hello everybody, > > I would like to share with you my findings about the usage of Google > background on very large maps. I have to render a map with the screen > resolution of about 4500x3100 (on a wall of screens). It works ok with > WFS layers, OSM and even Microsoft Virtual Earth, but I have issues with > Google and Yahoo. > > When I switch to the google layer, the background turns gray and then > the browser starts loading the images. After about 130s of loading > (there are quite a lot of pictures), I notice that google starts > throwing back HTTP 403 errors (Resource temporary unavailable). Just > before seeing these errors, some images (the center part of the map) > start appearing, but only about 1/4 of the map is drawn. If I wait about > 5 minutes, the download process gives up (it still receives HTTP 403 > errors all this time), but it displays the rest of the images - which > were apparently downloaded before the 403 error appeard. > > I'm thinking it manages to download most of the visible images + some > images in the bbox (which is quite large), but not all the images before > getting errors. The problem is the Google API doesn't display what it > downloaded, but waits for more images to be downloaded. > > After analysing the data, I noticed that when the first DNS query is > done for the Google cache, it receives back 4 IP addresses. However, > only the first 2 IPs are used for traffic - and these 2 IPs start > sending back HTTP 403 errors after a while. > > I would like to know if the following are possible: > 1. configure the Google API to use all the IP addresses it receives in > the DNS query - maybe this avoids the 403 erros > 2. configure the Google API to display the pictures received without > waiting for more pictures to download. I'm not sure if this is possible > - maybe the images are pipelined through the same connection - and they > are shown only when the connection closes. > 3. reduce the bbox for the Google Layer - this should be fine for my > needs - and maybe avoids the 403 errors. > > With regard to the Yahoo layer - things are better. It loads faster for > the same size (they don't seem to have a "throttling" mechanism), but it > only displays the final image when all the bits are downloaded - so it's > as fast as the slowest image. Can this behavoir be changed from within > OpenLayers? > > Thanks, > Adrian > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From steffen.schwarz85 at googlemail.com Fri Nov 27 07:44:13 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Text (Text_Symbolizer) In-Reply-To: References: <1259252348410-4071914.post@n2.nabble.com> <1259310433623-4074588.post@n2.nabble.com> Message-ID: <1259325853217-4075559.post@n2.nabble.com> Ivan Grcic-2 wrote: > > It's pretty simple, from the example: > > label : "name: ${name}, age: ${age}", > > where ${name} -> feature.attributes.name and ${age} -> > feature.attributes.age > > So labels are attribute values, which you get from your geoserver that > gets it from database ;) > > Hi, thanks for your answer. But can you tell me how to implement the code in my app. I only need the name, so my code looks like this at the moment. var saveStrategy = new OpenLayers.Strategy.Save(options); var my_layer = new OpenLayers.Layer.Vector("layer", { strategies: [new OpenLayers.Strategy.Fixed({ preload: false }), saveStrategy], //filter: my_filter, // styleMap: oStyleMap, styleMap: new OpenLayers.StyleMap({ 'default': { strokeColor: "#00FF00", strokeOpacity: 1, strokeWidth: 3, fillColor: "#FF5500", fillOpacity: 0.5, pointRadius: 6, pointerEvents: "visiblePainted", label: feature.attributes.NAME, fontColor: "black", fontSize: "12px", fontFamily: "Courier New, monospace", fontWeight: "bold", labelAlign: "cm", labelXOffset: "25", labelYOffset: "0" }}), protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", featureType: "MY_LAYER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", maxFeatures: 1500, defaultFilter: my_filter }) }); But when I start my app I get an error --> feature is undefined. Thanks for your help. Regards stash -- View this message in context: http://n2.nabble.com/WFS-Text-Text-Symbolizer-tp4071914p4075559.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Fri Nov 27 08:46:47 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Text (Text_Symbolizer) In-Reply-To: <1259325853217-4075559.post@n2.nabble.com> References: <1259252348410-4071914.post@n2.nabble.com> <1259310433623-4074588.post@n2.nabble.com> <1259325853217-4075559.post@n2.nabble.com> Message-ID: label: '${NAME}' On Fri, Nov 27, 2009 at 1:44 PM, stash wrote: > > > > Ivan Grcic-2 wrote: >> >> It's pretty simple, from the example: >> >> label : "name: ${name}, age: ${age}", >> >> where ?${name} -> feature.attributes.name and ${age} -> >> feature.attributes.age >> >> So labels are attribute values, which you get from your geoserver that >> gets it from database ;) >> >> > > Hi, > thanks for your answer. But can you tell me how to implement the code in my > app. I only need the name, so my code looks like this at the moment. > > var saveStrategy = new OpenLayers.Strategy.Save(options); > ? ?var my_layer = new OpenLayers.Layer.Vector("layer", { > ? ? ? ?strategies: [new OpenLayers.Strategy.Fixed({ > ? ? ? ? ? ?preload: false > ? ? ? ?}), saveStrategy], > ? ? ? ?//filter: my_filter, > ? ? ? // styleMap: oStyleMap, > ? ? ? ?styleMap: new OpenLayers.StyleMap({ 'default': { > ? ? ? ? ? ?strokeColor: "#00FF00", > ? ? ? ? ? ?strokeOpacity: 1, > ? ? ? ? ? ?strokeWidth: 3, > ? ? ? ? ? ?fillColor: "#FF5500", > ? ? ? ? ? ?fillOpacity: 0.5, > ? ? ? ? ? ?pointRadius: 6, > ? ? ? ? ? ?pointerEvents: "visiblePainted", > ? ? ? ? ? ?label: feature.attributes.NAME, > ? ? ? ? ? ?fontColor: "black", > ? ? ? ? ? ?fontSize: "12px", > ? ? ? ? ? ?fontFamily: "Courier New, monospace", > ? ? ? ? ? ?fontWeight: "bold", > ? ? ? ? ? ?labelAlign: "cm", > ? ? ? ? ? ?labelXOffset: "25", > ? ? ? ? ? ?labelYOffset: "0" > ? ? ? ?}}), > > ? ? ? ?protocol: new OpenLayers.Protocol.WFS({ > ? ? ? ?url: "http://localhost:8080/geoserver/wfs", > ? ? ? ?featureType: "MY_LAYER", > ? ? ? ? ? ?featurePrefix: 'topp', > ? ? ? ? ? ?featureNS: "http://www.openplans.org/topp", > ? ? ? ? ? ?maxFeatures: 1500, > ? ? ? ? ? ?defaultFilter: my_filter > ? ? ? ?}) > ? ?}); > > > But when I start my app I get an error --> feature is undefined. > > Thanks for your help. > > Regards > stash > -- > View this message in context: http://n2.nabble.com/WFS-Text-Text-Symbolizer-tp4071914p4075559.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 singhsanjivk at gmail.com Fri Nov 27 08:51:04 2009 From: singhsanjivk at gmail.com (Sanjiv Singh) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Cluster Strategy over Multiple Layers Message-ID: Hi, Is it possible to use Cluster Strategy across multiple vector layers? I have several vector layers with may features. I want the features to be clustered together irrespective of the layers they belong to. Is such a thing possible? Is there a better way alternative for implementing what I am trying to achieve? regards Sanjiv From martin.laloux at gmail.com Fri Nov 27 09:02:55 2009 From: martin.laloux at gmail.com (gene) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] shapefile.js A binary shapefile loader and canvas-based renderer, for javascript. Message-ID: <1259330575800-4075850.post@n2.nabble.com> Tom Carden is currently developing a javascript library to read shapefiles : shapefile.js, a Javascript Shapefile and DBF Loader see http://s3.amazonaws.com/shapefile-js/index.html http://s3.amazonaws.com/shapefile-js/index.html For source http://github.com/RandomEtc/shapefile-js http://github.com/RandomEtc/shapefile-js Could it be interesting for openlayers ? -- View this message in context: http://n2.nabble.com/shapefile-js-A-binary-shapefile-loader-and-canvas-based-renderer-for-javascript-tp4075850p4075850.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Fri Nov 27 09:10:49 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Text (Text_Symbolizer) In-Reply-To: References: <1259252348410-4071914.post@n2.nabble.com> <1259310433623-4074588.post@n2.nabble.com> <1259325853217-4075559.post@n2.nabble.com> Message-ID: <1259331049640-4075891.post@n2.nabble.com> Ivan Grcic-2 wrote: > > label: '${NAME}' > > Hi, it worked. Thank you very much. Thanks. Regards stash -- View this message in context: http://n2.nabble.com/WFS-Text-Text-Symbolizer-tp4071914p4075891.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From cbo at le34.dk Fri Nov 27 09:14:23 2009 From: cbo at le34.dk (Chau) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] IE: OpenLayers not visible In-Reply-To: <4B0FBA7E.8030608@geograf.dk> References: <1259318062411-4075092.post@n2.nabble.com> <4B0FBA7E.8030608@geograf.dk> Message-ID: <1259331263660-4075900.post@n2.nabble.com> Kenneth Skovhede, GEOGRAF A/S wrote: > > The most common reason something works in FF but fails in IE is a > trailing comma: > > var obj = { > x: 1, > y: 2, //<--- Causes error in IE, fine in FF > }; > > Regards, Kenneth Skovhede, GEOGRAF A/S > > > > Chau skrev: >> Hi! >> >> I've made a fairly simple OpenLayers page, that just displays a map, >> zoom/pan, overview map and layercontrol. It works perfectly in FF, but in >> IE >> the page is visually empty. Using IE8's debugging tool, I can verify, >> that >> my 'map' DIV has been populated. When I pan/zoom in the window, IE is >> caching new images - just like I think it should, but still nothing is >> visible. I recieve no JS errors and a validation of the HTML and CSS code >> returns succesfully from W3. >> >> Can you guide me to find the problem? >> >> Kind regards, Casper >> >> >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > That is so true, but in those cases - for me atleast - IE responds with an error pointing at some random object error. I my case, it was a question of trying to create a fullscreen map, which resulted in my map being invisible in IE, but still available for manipulation. How I am able to move around in an invisible map, I don't know. Kenneth, Thanks for your fast answer. /Casper -- View this message in context: http://n2.nabble.com/IE-OpenLayers-not-visible-tp4075092p4075900.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Fri Nov 27 09:20:30 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature Message-ID: <1259331630271-4075933.post@n2.nabble.com> Hello, at the moment I have a wms getfeatureinfo to get features of the points on my map. Because I only want to get features of certain points I want to exchange the wms getfeatureinfo wit a control.getfeature. I read in the examples and the classdocumentation of openlayers that I have to implement at least a protocol to get it working. And there is my problem. How can I do that. every example I looked up was not interesting for me, because the protocol was defined like that: protocol: OpenLayers.Protocol.WFS.fromWMSLayer(...) But my protocol is from a wfs not from a wms. How do I implement that, when my protocol comes from a wfs? i have only a wms as a background worldcard. My wfs contains the points I want to getfeature from. How can I do that? Thanks for the help. Regards stash -- View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4075933.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rifins at gmail.com Fri Nov 27 10:49:32 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Drawing WFS (with vector) Message-ID: Hi list, I suppose for what I'm reading that "the best practices" way to draw a WFS layer, is using the Vector Layer defining a WFS protocol.. My question is about that... How is drawn a WFS Layer or a WFS Vector? I mean, with WMS, the client gets images and no more processing is needed.. But how (where?) Openlayer.js read/parse the gml information that serves WFS? If I want to draw some points programatically, what is the best way? Create a GML compliant file, and tell OpenLayers to draw it? Or make a simple XML (less verbose than GML), and read it doing addMarker at each new location ? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091127/74b17d04/attachment.html From igrcic at gmail.com Fri Nov 27 11:37:50 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: <1259331630271-4075933.post@n2.nabble.com> References: <1259331630271-4075933.post@n2.nabble.com> Message-ID: OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for creating OpenLayers.Protocol.WFS from allready defined WMS layer. So you can just define protocol as: protocol: OpenLayers.Protocol.WFS({ readFormat: new OpenLayers.Format.GeoJSON(), formatOptions: { outputFormat: "JSON" }, url: "http://localhost:8080/geoserver/wfs" featureType: "ftName", featurePrefix: 'prefix', featureNS: "http://ns", geometryName: 'geometry', maxFeatures: 100 }) cheers On Fri, Nov 27, 2009 at 3:20 PM, stash wrote: > > Hello, > > at the moment I have a wms getfeatureinfo to get features of the points on > my map. > > Because I only want to get features of certain points I want to exchange the > wms getfeatureinfo wit a control.getfeature. > > I read in the examples and the classdocumentation of openlayers that I have > to implement at least a protocol to get it working. > > And there is my problem. How can I do that. every example I looked up was > not interesting for me, because the protocol was defined like that: > > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(...) > > But my protocol is from a wfs not from a wms. How do I implement that, when > my protocol comes from a wfs? > > i have only a wms as a background worldcard. My wfs contains the points I > want to getfeature from. > > How can I do that? > > Thanks for the help. > > Regards > stash > -- > View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4075933.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 Fri Nov 27 11:40:53 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Cluster Strategy over Multiple Layers In-Reply-To: References: Message-ID: On Fri, Nov 27, 2009 at 2:51 PM, Sanjiv Singh wrote: > Hi, > > Is it possible to use Cluster Strategy across multiple vector layers? > > I have several vector layers with may features. I want the features to be > clustered together irrespective of the layers they belong to. > Is such a thing possible? > < Hi, as far as I know this is not possible in OL. (yet) > Is there a better way alternative for implementing what I am trying to achieve? > Combine your data on server maybe? Create single view from different tables? > regards > Sanjiv > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From eric.lemoine at camptocamp.com Sat Nov 28 08:22:26 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Drawing WFS (with vector) In-Reply-To: References: Message-ID: On Friday, November 27, 2009, JuKiM wrote: > Hi list, > I suppose for what I'm reading that "the best practices" way to draw a WFS layer, is using the Vector Layer defining a WFS protocol.. > My question is about that... How is drawn a WFS Layer or a WFS Vector? I mean, with WMS, the client gets images and no more processing is needed.. But how (where?) Openlayer.js read/parse the gml information that serves WFS? The vector layer is configured with a WFS protocol, which is configured with a WFS format, which relies on a GML format for parsing geometries received in GetFeature responses. Features resulting from parsing GetFeature responses are added to the vector layer, and then rendered in the page using SVG, VML or Canvas. > If I want to draw some points programatically, what is the best way? Just create OpenLayers.Feature.Vector objects and add them to an OpenLayers.Layer.Vector layer. I'd recommend searching the OpenLayers examples. 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 Nov 28 08:39:55 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS post and proxy? In-Reply-To: References: Message-ID: On Thursday, November 26, 2009, JuKiM wrote: > Hi, > I think that I'm missplacing something with the POST method...When I load an WMS, I needed to put the?OpenLayers.ProxyHost = "test.aspx?url="; in order to get the WMS data from geoserver when the GET method is done... > But, what about making a POST? > I'm trying to understant how can I send the POST to the geoserver going through the test.aspx proxy? you need your proxy to support POST (Sorry, I don't about your test.aspx proxy) 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 Nov 28 08:48:02 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] OpenLayers.Format.JSON not working In-Reply-To: <20091126165759.GA7016@throckmorton> References: <20091126165759.GA7016@throckmorton> Message-ID: On Thursday, November 26, 2009, Mak Kolybabi wrote: > I've wasted long enough on this, it's time to ask for help... > > I'm making a simple Ajax request with OpenLayers.loadURL, which works perfectly. > If I process the return data with: > > ? ?var info = eval("(" + response.responseText + ")"); > > a proper object is created in both IE and Firefox. But if I try to use: > > ? ?var parser = new OpenLayers.Format.JSON(); > ? ?var info = parser.read(response.responseText); > > nothing happens. In fact, if I try: > > ? ?var parser = new OpenLayers.Format.JSON(); > ? ?var info = parser.read("{'a': 1}"); This isn't valid JSON. Use . Try {"a": 1}. 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 Nov 28 08:51:04 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS + Filter In-Reply-To: References: <1258961787884-4049517.post@n2.nabble.com> <4B0A41C0.2030802@opengeo.org> <1258967659865-4049908.post@n2.nabble.com> <4B0A53A4.2010304@opengeo.org> <1259227787511-4070254.post@n2.nabble.com> Message-ID: On Thursday, November 26, 2009, Ivan Grcic wrote: > Actually, im not sure if filter should go to protocol. It should go in > layer options like you put it. Then strategy should take that filter > and apply it to the protocol when data is requested. > > But I dont see any filter options inside Fixed strategy, only in BBOX > strategy. New ticket? > > So setting filter manually inside protocol will maybe do the trick. FWIW, there now (trunk) is a defaultFilter option in OpenLayers.Protocol. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Sat Nov 28 08:59:08 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] layerswitcher maximised event? In-Reply-To: <1259247145572-4071512.post@n2.nabble.com> References: <1259247145572-4071512.post@n2.nabble.com> Message-ID: On Thursday, November 26, 2009, Derek Watling wrote: > > Is there an event that triggers when the layerswitcher is maximised? If so > how do I hook into it? there's not. But you can inherit from LayerSwitcher and overload the maximizeControl method: CustomLayerSwitcher = OpenLayers.Class(OpenLayers.Control.LayerSwitcher, { maximizeControl: function() { OpenLayers.Control.LayerSwitcher.prototype.maximizeControl.apply(this, arguments); // do what you need here } }); note, though, that maximizeControl isn't part of the public API, so this code could break with future OpenLayers releases. 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 brhempen at uos.de Sat Nov 28 10:25:44 2009 From: brhempen at uos.de (Bryan Hempen) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] wfs + popup bug Message-ID: <4B1140F8.5@uos.de> hi everyone! the situation: i am running a wfs-server for viewing hotels as points of interest which can be clicked to show a popup. the problem: everything works fine, except the fact that when i zoom in or out while a popup is still opened, it is not possible to close the popup anymore. just see yourself: http://igf-project.igf.uni-osnabrueck.de/~bhempen/ i do not know if this is a known problem, did not find anything at google. i worked on all of the functions regarding feature selecting or unselecting using the example from http://openlayers.org/dev/examples/sundials-spherical-mercator.html where the bug does not exist. the code now is close to identic, but it still does not work. the problem might be openlayers reloading the wfs-layer, so the previous version is not available anymore afterwards. please go forward taking a look at the code! why does it work in the kml-example and does not work for me? thanks for the help. best regards, Bryan Hempen From brhempen at uos.de Sat Nov 28 11:23:03 2009 From: brhempen at uos.de (Bryan Hempen) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] wfs + popup bug In-Reply-To: <2502_1259421961_nASFPxCs003758_4B1140F8.5@uos.de> References: <2502_1259421961_nASFPxCs003758_4B1140F8.5@uos.de> Message-ID: <4B114E67.5040301@uos.de> Bryan Hempen schrieb: > hi everyone! > > > the situation: i am running a wfs-server for viewing hotels as points of > interest which can be clicked to show a popup. > > the problem: everything works fine, except the fact that when i zoom in > or out while a popup is still opened, it is not possible to close the > popup anymore. > > just see yourself: http://igf-project.igf.uni-osnabrueck.de/~bhempen/ > > i do not know if this is a known problem, did not find anything at google. > > i worked on all of the functions regarding feature selecting or > unselecting using the example from > http://openlayers.org/dev/examples/sundials-spherical-mercator.html > where the bug does not exist. the code now is close to identic, but it > still does not work. > > the problem might be openlayers reloading the wfs-layer, so the previous > version is not available anymore afterwards. > > please go forward taking a look at the code! > > why does it work in the kml-example and does not work for me? > > thanks for the help. > > > best regards, > Bryan Hempen > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > i fixed it using the following code: function onPopupClose(evt) { selectControl.unselectAll(); for (var i=0; i < map.popups.length; i++) { map.removePopup(map.popups[i]); } } thanks anyway :) best regards, Bryan Hempen From eric.lemoine at camptocamp.com Sat Nov 28 17:23:07 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] mapExtents for Layer vs mapExtents for Map In-Reply-To: <1258964868402-4049707.post@n2.nabble.com> References: <1258698513185-4036288.post@n2.nabble.com> <1258929564307-4048054.post@n2.nabble.com> <4B0A2C94.8040302@opengeo.org> <4B0A3981.3090508@opengeo.org> <1258964868402-4049707.post@n2.nabble.com> Message-ID: On Mon, Nov 23, 2009 at 9:27 AM, srweal wrote: > > I am seeing behavior different to what you describe. ?I have a WMS layer > providing data over Australia (using tilecache.py) and if I set it up to > have no BBOX restriction set on the TileCache, then transparent tiles are > requested and provided when my map viewport is showing other parts of the > world (e.g. zoomed in on Africa). > > However, if I set a BBOX restriction on my TileCache and also set the same > as a maxExtent on the WMS layer, then I get pink tiles displayed over Africa > when I zoom in there, while my actual data tiles display over Australia when > it is in the viewport. ?I was expecting to have no tiles requested when > zoomed on Africa with the maxExtent of my WMS set to Australia. ?Something > must be wrong. > > I've checked my settings a few times now, but being fairly new to OpenLayers > I wonder what I might be missing. ?Can anyone else test this and confirm > that this does/doesn't work? This is hard to tell (at least for me). It'd be great if you could come up with a simple example showing the problem. 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 brhempen at uos.de Sun Nov 29 05:59:51 2009 From: brhempen at uos.de (Bryan Hempen) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] problems settings up proxy Message-ID: <4B125427.5080903@uos.de> hi there! i am trying to set up a proxy as described on http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost to avoid the security exception "Access to restricted URI denied" code: "1012". it started occuring yesterday without me making any changes on the code (at least i wasn't aware of). ever since then i did not get to fix it, so i hope you guys can help me. i put the proxy.cgi in my private script folder on the server located at /home/bhempen/public_html/cgi-bin (i didn't modify it) and added OpenLayers.ProxyHost = "cgi-bin/proxy.cgi?url="; to the code of my index.html. the URL should be right relativ to the index.html. anyways, changing it to OpenLayers.ProxyHost = "/~bhempen/cgi-bin/proxy.cgi?url="; does not help either. i get a 500 Internal Server Error and didn't find anything useful at google. take a look at the code yourself: http://igf-project.igf.uos.de/~bhempen/ any ideas? thanks for the help. Bryan Hempen From igrcic at gmail.com Sun Nov 29 08:22:56 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] problems settings up proxy In-Reply-To: <4B125427.5080903@uos.de> References: <4B125427.5080903@uos.de> Message-ID: You have to check your apache logs and see excatly whats happening. Cheers On Sun, Nov 29, 2009 at 11:59 AM, Bryan Hempen wrote: > hi there! > > i am trying to set up a proxy as described on > http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost to > avoid the security exception "Access to restricted URI denied" code: > "1012". > > it started occuring yesterday without me making any changes on the code > (at least i wasn't aware of). > > ever since then i did not get to fix it, so i hope you guys can help me. > > i put the proxy.cgi in my private script folder on the server located at > /home/bhempen/public_html/cgi-bin (i didn't modify it) and added > > OpenLayers.ProxyHost = "cgi-bin/proxy.cgi?url="; > > to the code of my index.html. the URL should be right relativ to the > index.html. anyways, changing it to > > OpenLayers.ProxyHost = "/~bhempen/cgi-bin/proxy.cgi?url="; > > does not help either. i get a 500 Internal Server Error and didn't find > anything useful at google. > > take a look at the code yourself: > > http://igf-project.igf.uos.de/~bhempen/ > > any ideas? > > > > thanks for the help. > > Bryan Hempen > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From eric.lemoine at camptocamp.com Sun Nov 29 09:52:36 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] problems settings up proxy In-Reply-To: <4B125427.5080903@uos.de> References: <4B125427.5080903@uos.de> Message-ID: On Sunday, November 29, 2009, Bryan Hempen wrote: > hi there! > > i am trying to set up a proxy as described on > http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost to > avoid the security exception "Access to restricted URI denied" code: > "1012". > > it started occuring yesterday without me making any changes on the code > (at least i wasn't aware of). > > ever since then i did not get to fix it, so i hope you guys can help me. > > i put the proxy.cgi in my private script folder on the server located at > /home/bhempen/public_html/cgi-bin (i didn't modify it) and added > > OpenLayers.ProxyHost = "cgi-bin/proxy.cgi?url="; > > to the code of my index.html. the URL should be right relativ to the > index.html. anyways, changing it to > > OpenLayers.ProxyHost = "/~bhempen/cgi-bin/proxy.cgi?url="; > > does not help either. i get a 500 Internal Server Error and didn't find > anything useful at google. > > take a look at the code yourself: > > http://igf-project.igf.uos.de/~bhempen/ > > any ideas? are you sure your cgi-bin directory is effectively declared as a CGI directory in the Apache config? 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 brhempen at uos.de Sun Nov 29 10:25:30 2009 From: brhempen at uos.de (Bryan Hempen) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] problems settings up proxy In-Reply-To: References: <4B125427.5080903@uos.de> Message-ID: <4B12926A.4030308@uos.de> Eric Lemoine schrieb: > On Sunday, November 29, 2009, Bryan Hempen wrote: >> hi there! >> >> i am trying to set up a proxy as described on >> http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost to >> avoid the security exception "Access to restricted URI denied" code: >> "1012". >> >> it started occuring yesterday without me making any changes on the code >> (at least i wasn't aware of). >> >> ever since then i did not get to fix it, so i hope you guys can help me. >> >> i put the proxy.cgi in my private script folder on the server located at >> /home/bhempen/public_html/cgi-bin (i didn't modify it) and added >> >> OpenLayers.ProxyHost = "cgi-bin/proxy.cgi?url="; >> >> to the code of my index.html. the URL should be right relativ to the >> index.html. anyways, changing it to >> >> OpenLayers.ProxyHost = "/~bhempen/cgi-bin/proxy.cgi?url="; >> >> does not help either. i get a 500 Internal Server Error and didn't find >> anything useful at google. >> >> take a look at the code yourself: >> >> http://igf-project.igf.uos.de/~bhempen/ >> >> any ideas? > > are you sure your cgi-bin directory is effectively declared as a CGI > directory in the Apache config? > > cheers, > ok, my private cgi-bin folder might not be declared. i have now downloaded the proxy.cgi to the directory the mapserv-binary, which works fine, is located at. the mapserver wouldnt work in a directory that is not declared as a cgi-directory in the apache config, right? now i get the same error i tried to fix using the proxy.cgi. here is a screenshot: http://www.pictureupload.de/originals/pictures/291109162359_screenshot1.png sigh. greets, Bryan Hempen From richard.wiesinger at gmail.com Sun Nov 29 10:30:30 2009 From: richard.wiesinger at gmail.com (ridsch) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Layer.redraw() - strange behavior In-Reply-To: References: Message-ID: <1259508630918-4083202.post@n2.nabble.com> I further tested the behavior and it seems that the described behavior is shown in firefox (3.5.5) and IE (8) only. In chrome and safari layer.redraw() works perfectly. ?? ridsch wrote: > > Hi list, > > i extended the OpenLayers.Layer.OSM class to provide my own layer and > overrid the getURL(bounds) function as I load the osm tiles from my own > server. > The strategy is as follows: > When getURL is called on the browser an ajax request is called to my osm > server and the necessary tiles are loaded and stored to the webserver. > This > works pretty well and I can see tiles lying around on my webserver. But of > course this takes some time and is too late for openlayers to render this > specific tile in the scope of the getURL method. So there are no tiles > visible in the browser which is logical. > I now tried to call layername.redraw() in firebug after all tiles where > loaded. I see in firebug that all the necessary tiles are again requested > within the getURL function. The URLs are alright and the tiles are at the > right place. But again nothing is visible in the browser! > But now comes the strange thing. When I copy one url string of a tile from > the firebug console and open it in a new browser window, the tile (.png) > is > shown in the browser! And even more strange (at least for me) when I *now* > call layername.redraw() this tile is shown in the map. But only this tile > and not the others. When I open another tile in a new tab and call > redraw() > again two tiles are visible and so on. > It seems that tiles are visible only when they are requested before. > > Somebody has an idea? > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Layer-redraw-strange-behavior-tp4027120p4083202.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Sun Nov 29 11:31:56 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Advice about Google layer limitations In-Reply-To: <4B0FBF54.5050309@romtelecom.ro> References: <4B0F7D4A.4020603@romtelecom.ro> <4B0FBF54.5050309@romtelecom.ro> Message-ID: <4B12A1FC.5040102@opengeo.org> Adrian Popa wrote: > I asked the same question on Google API forums, and it looks like the > original Google API doesn't have this limitation. > OpenLayers uses the original Google API, v2.x. Using OpenLayers.Layer.Google is nothing else than using a GMaps Map directly, you just access it wrapped by an OpenLayers layer type, not by the API directly. I also do not see a violation of the terms of use. We even make sure that the Terms of Use link is clickable if we render other layers on top of Google. There is, however, a known issue: if you create your map at a smaller size and switch from one Google Layer type to another after resizing it to your big map, tiles will only be loaded for the area of the old extent. There is a patch that appears to solve this issue. You can try it: http://trac.openlayers.org/ticket/1797 Regards, Andreas. > I did some tests and you can see the results on this thread: > http://groups.google.com/group/google-maps-api/browse_thread/thread/97d62ed9a85e665e > > I would like to know if there is something that can be done from the > OpenLayers side, or is this a known limitation. Is OpenLayers scraping > images from Google, or is it using the API just like any other Google > Maps client? > > Thank you, > Adrian > > Adrian Popa wrote: > >> Hello everybody, >> >> I would like to share with you my findings about the usage of Google >> background on very large maps. I have to render a map with the screen >> resolution of about 4500x3100 (on a wall of screens). It works ok with >> WFS layers, OSM and even Microsoft Virtual Earth, but I have issues with >> Google and Yahoo. >> >> When I switch to the google layer, the background turns gray and then >> the browser starts loading the images. After about 130s of loading >> (there are quite a lot of pictures), I notice that google starts >> throwing back HTTP 403 errors (Resource temporary unavailable). Just >> before seeing these errors, some images (the center part of the map) >> start appearing, but only about 1/4 of the map is drawn. If I wait about >> 5 minutes, the download process gives up (it still receives HTTP 403 >> errors all this time), but it displays the rest of the images - which >> were apparently downloaded before the 403 error appeard. >> >> I'm thinking it manages to download most of the visible images + some >> images in the bbox (which is quite large), but not all the images before >> getting errors. The problem is the Google API doesn't display what it >> downloaded, but waits for more images to be downloaded. >> >> After analysing the data, I noticed that when the first DNS query is >> done for the Google cache, it receives back 4 IP addresses. However, >> only the first 2 IPs are used for traffic - and these 2 IPs start >> sending back HTTP 403 errors after a while. >> >> I would like to know if the following are possible: >> 1. configure the Google API to use all the IP addresses it receives in >> the DNS query - maybe this avoids the 403 erros >> 2. configure the Google API to display the pictures received without >> waiting for more pictures to download. I'm not sure if this is possible >> - maybe the images are pipelined through the same connection - and they >> are shown only when the connection closes. >> 3. reduce the bbox for the Google Layer - this should be fine for my >> needs - and maybe avoids the 403 errors. >> >> With regard to the Yahoo layer - things are better. It loads faster for >> the same size (they don't seem to have a "throttling" mechanism), but it >> only displays the final image when all the bits are downloaded - so it's >> as fast as the slowest image. Can this behavoir be changed from within >> OpenLayers? >> >> Thanks, >> Adrian >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Sun Nov 29 11:43:39 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] IE: OpenLayers not visible In-Reply-To: <1259331263660-4075900.post@n2.nabble.com> References: <1259318062411-4075092.post@n2.nabble.com> <4B0FBA7E.8030608@geograf.dk> <1259331263660-4075900.post@n2.nabble.com> Message-ID: <4B12A4BB.8050305@opengeo.org> Chau wrote: > > That is so true, but in those cases - for me atleast - IE responds with an > error pointing at some random object error. > > I my case, it was a question of trying to create a fullscreen map, which > resulted in my map being invisible in IE, but still available for > manipulation. How I am able to move around in an invisible map, I don't > know. > Fullscreen? This is a CSS issue. If you want that to work, you have to either make your page run in quirks mode (i.e. without setting a doctype, see http://openlayers.org/dev/examples/fullScreen.html), or you need to set a width and height of 100% not just on your map div, but also on the body and the html elements of your document Regards, Andreas. Regards, Andreas. > Kenneth, Thanks for your fast answer. > > /Casper > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Sun Nov 29 11:51:35 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] shapefile.js A binary shapefile loader and canvas-based renderer, for javascript. In-Reply-To: <1259330575800-4075850.post@n2.nabble.com> References: <1259330575800-4075850.post@n2.nabble.com> Message-ID: <4B12A697.1070900@opengeo.org> gene wrote: > Tom Carden is currently developing a javascript library to read shapefiles : > shapefile.js, a Javascript Shapefile and DBF Loader > see http://s3.amazonaws.com/shapefile-js/index.html > http://s3.amazonaws.com/shapefile-js/index.html > For source > http://github.com/RandomEtc/shapefile-js > http://github.com/RandomEtc/shapefile-js > Thanks for the notice. > Could it be interesting for openlayers ? > There are more efficient ways to render maps from shapefiles than doing it in the browser, but if someone wants to get their hands dirty to write an OpenLayers.Format.Shapefile or provide funding for it, then I guess nobody would be opposed. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From adrian_gh.popa at romtelecom.ro Mon Nov 30 01:50:10 2009 From: adrian_gh.popa at romtelecom.ro (Adrian Popa) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Advice about Google layer limitations In-Reply-To: <4B12A1FC.5040102@opengeo.org> References: <4B0F7D4A.4020603@romtelecom.ro> <4B0FBF54.5050309@romtelecom.ro> <4B12A1FC.5040102@opengeo.org> Message-ID: <4B136B22.2010305@romtelecom.ro> Thank you Andreas for the info. I will try to load the map once the browser is resized to the original dimension and tell you if there is a difference. One more question - if the patch or workaround don't work - do you think it's possible to limit the bbox to just the visible area of the map (without extra margins?). I would like to do this either for the Google Layer, or for all the layers - to reduce general load on the server. Thank you, Adrian Andreas Hocevar wrote: > Adrian Popa wrote: >> I asked the same question on Google API forums, and it looks like the >> original Google API doesn't have this limitation. >> > > OpenLayers uses the original Google API, v2.x. Using > OpenLayers.Layer.Google is nothing else than using a GMaps Map > directly, you just access it wrapped by an OpenLayers layer type, not > by the API directly. > > I also do not see a violation of the terms of use. We even make sure > that the Terms of Use link is clickable if we render other layers on > top of Google. > > There is, however, a known issue: if you create your map at a smaller > size and switch from one Google Layer type to another after resizing > it to your big map, tiles will only be loaded for the area of the old > extent. There is a patch that appears to solve this issue. You can try > it: http://trac.openlayers.org/ticket/1797 > > Regards, > Andreas. > >> I did some tests and you can see the results on this thread: >> http://groups.google.com/group/google-maps-api/browse_thread/thread/97d62ed9a85e665e >> >> >> I would like to know if there is something that can be done from the >> OpenLayers side, or is this a known limitation. Is OpenLayers >> scraping images from Google, or is it using the API just like any >> other Google Maps client? >> >> Thank you, >> Adrian >> >> Adrian Popa wrote: >> >>> Hello everybody, >>> >>> I would like to share with you my findings about the usage of >>> Google background on very large maps. I have to render a map with >>> the screen resolution of about 4500x3100 (on a wall of screens). It >>> works ok with WFS layers, OSM and even Microsoft Virtual Earth, but >>> I have issues with Google and Yahoo. >>> >>> When I switch to the google layer, the background turns gray and >>> then the browser starts loading the images. After about 130s of >>> loading (there are quite a lot of pictures), I notice that google >>> starts throwing back HTTP 403 errors (Resource temporary >>> unavailable). Just before seeing these errors, some images (the >>> center part of the map) start appearing, but only about 1/4 of the >>> map is drawn. If I wait about 5 minutes, the download process gives >>> up (it still receives HTTP 403 errors all this time), but it >>> displays the rest of the images - which were apparently downloaded >>> before the 403 error appeard. >>> >>> I'm thinking it manages to download most of the visible images + >>> some images in the bbox (which is quite large), but not all the >>> images before getting errors. The problem is the Google API doesn't >>> display what it downloaded, but waits for more images to be downloaded. >>> >>> After analysing the data, I noticed that when the first DNS query is >>> done for the Google cache, it receives back 4 IP addresses. However, >>> only the first 2 IPs are used for traffic - and these 2 IPs start >>> sending back HTTP 403 errors after a while. >>> >>> I would like to know if the following are possible: >>> 1. configure the Google API to use all the IP addresses it receives >>> in the DNS query - maybe this avoids the 403 erros >>> 2. configure the Google API to display the pictures received without >>> waiting for more pictures to download. I'm not sure if this is >>> possible - maybe the images are pipelined through the same >>> connection - and they are shown only when the connection closes. >>> 3. reduce the bbox for the Google Layer - this should be fine for my >>> needs - and maybe avoids the 403 errors. >>> >>> With regard to the Yahoo layer - things are better. It loads faster >>> for the same size (they don't seem to have a "throttling" >>> mechanism), but it only displays the final image when all the bits >>> are downloaded - so it's as fast as the slowest image. Can this >>> behavoir be changed from within OpenLayers? >>> >>> Thanks, >>> Adrian >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- --- 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 ahocevar at opengeo.org Mon Nov 30 02:37:46 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Advice about Google layer limitations In-Reply-To: <4B136B22.2010305@romtelecom.ro> References: <4B0F7D4A.4020603@romtelecom.ro> <4B0FBF54.5050309@romtelecom.ro> <4B12A1FC.5040102@opengeo.org> <4B136B22.2010305@romtelecom.ro> Message-ID: <4B13764A.8000405@opengeo.org> Hi, Adrian Popa wrote: > Thank you Andreas for the info. I will try to load the map once the > browser is resized to the original dimension and tell you if there is a > difference. > > One more question - if the patch or workaround don't work - do you think > it's possible to limit the bbox to just the visible area of the map > (without extra margins?). I would like to do this either for the Google > Layer, or for all the layers - to reduce general load on the server. For Google layers, this is handled by the Google API. No idea if you can do that there. For WMS layers, if using tiles, you can set the buffer option to 0. If untiled, set the ratio option to 1. Regards, Andreas. From rifins at gmail.com Mon Nov 30 03:49:07 2009 From: rifins at gmail.com (JuKiM) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] WFS post and proxy? In-Reply-To: References: Message-ID: Well, test.aspx is not a proxy, is a simple aspx page that loads and returns the information generated by the URL passed in the querystring. With this, I can do a GET petition from the script. I was looking a proxy to work under IIS, but the only information I found was for Apache.. And I download "IISProxy", but I can't understand how it works.. Is for that reason that I ended using the test.aspx. But now, I'm looking how to do the same, with the POST. Thanks! 2009/11/28 Eric Lemoine > On Thursday, November 26, 2009, JuKiM wrote: > > Hi, > > I think that I'm missplacing something with the POST method...When I load > an WMS, I needed to put the OpenLayers.ProxyHost = "test.aspx?url="; in > order to get the WMS data from geoserver when the GET method is done... > > But, what about making a POST? > > I'm trying to understant how can I send the POST to the geoserver going > through the test.aspx proxy? > > you need your proxy to support POST (Sorry, I don't about your test.aspx > proxy) > > 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/20091130/de3648c9/attachment.html From steffen.schwarz85 at googlemail.com Mon Nov 30 04:01:20 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: References: <1259331630271-4075933.post@n2.nabble.com> Message-ID: <1259571680893-4086404.post@n2.nabble.com> Ivan Grcic-2 wrote: > > OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for > creating OpenLayers.Protocol.WFS from allready defined WMS layer. So > you can just define protocol as: > > protocol: OpenLayers.Protocol.WFS({ > readFormat: new OpenLayers.Format.GeoJSON(), > formatOptions: { > outputFormat: "JSON" > }, > url: "http://localhost:8080/geoserver/wfs" > featureType: "ftName", > featurePrefix: 'prefix', > featureNS: "http://ns", > geometryName: 'geometry', > maxFeatures: 100 > }) > > Hello, thanks for your post. I tried this but it doesn't work. Here is my code. var control = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS({ readFormat: new OpenLayers.Format.GeoJSON(), formatOptions: { outputFormat: "JSON" }, url: "http://localhost:8080/geoserver/wfs", featureType: "MY_LAYER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", geometryName: 'GEOM', maxFeatures: 100, defaultFilter: my_filter }) }); control.events.register("featureselected", this, function(e) { select.addFeatures([e.feature]); }); map.addControl(control); control.activate(); When I launch my app I get an error that feature.lenght is null or doesn't exist? Do I have to implement a map.events.register as I did it with my getfeatureinfo or is there something else wrong. Thanks for your help Regards stash -- View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4086404.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Mon Nov 30 03:59:33 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: References: <1259331630271-4075933.post@n2.nabble.com> Message-ID: <1259571573145-4086401.post@n2.nabble.com> Ivan Grcic-2 wrote: > > OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for > creating OpenLayers.Protocol.WFS from allready defined WMS layer. So > you can just define protocol as: > > protocol: OpenLayers.Protocol.WFS({ > readFormat: new OpenLayers.Format.GeoJSON(), > formatOptions: { > outputFormat: "JSON" > }, > url: "http://localhost:8080/geoserver/wfs" > featureType: "ftName", > featurePrefix: 'prefix', > featureNS: "http://ns", > geometryName: 'geometry', > maxFeatures: 100 > }) > > Hello, thanks for your post. I tried this but it doesn't work. Here is my code. var control = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS({ readFormat: new OpenLayers.Format.GeoJSON(), formatOptions: { outputFormat: "JSON" }, url: "http://localhost:8080/geoserver/wfs", featureType: "MY_LAYER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", geometryName: 'GEOM', maxFeatures: 100, defaultFilter: my_filter }) }); control.events.register("featureselected", this, function(e) { select.addFeatures([e.feature]); }); map.addControl(control); control.activate(); When I launch my app I get an error that feature.lenght is null or doesn't exist? Do I have to implement a map.events.register as I did it with my getfeatureinfo or is there something else wrong. Thanks for your help Regards stash -- View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4086401.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Mon Nov 30 03:59:33 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: References: <1259331630271-4075933.post@n2.nabble.com> Message-ID: <1259571573009-4086400.post@n2.nabble.com> Ivan Grcic-2 wrote: > > OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for > creating OpenLayers.Protocol.WFS from allready defined WMS layer. So > you can just define protocol as: > > protocol: OpenLayers.Protocol.WFS({ > readFormat: new OpenLayers.Format.GeoJSON(), > formatOptions: { > outputFormat: "JSON" > }, > url: "http://localhost:8080/geoserver/wfs" > featureType: "ftName", > featurePrefix: 'prefix', > featureNS: "http://ns", > geometryName: 'geometry', > maxFeatures: 100 > }) > > Hello, thanks for your post. I tried this but it doesn't work. Here is my code. var control = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS({ readFormat: new OpenLayers.Format.GeoJSON(), formatOptions: { outputFormat: "JSON" }, url: "http://localhost:8080/geoserver/wfs", featureType: "MY_LAYER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", geometryName: 'GEOM', maxFeatures: 100, defaultFilter: my_filter }) }); control.events.register("featureselected", this, function(e) { select.addFeatures([e.feature]); }); map.addControl(control); control.activate(); When I launch my app I get an error that feature.lenght is null or doesn't exist? Do I have to implement a map.events.register as I did it with my getfeatureinfo or is there something else wrong. Thanks for your help Regards stash -- View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4086400.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Mon Nov 30 03:59:23 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: References: <1259331630271-4075933.post@n2.nabble.com> Message-ID: <1259571563381-4086377.post@n2.nabble.com> Ivan Grcic-2 wrote: > > OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for > creating OpenLayers.Protocol.WFS from allready defined WMS layer. So > you can just define protocol as: > > protocol: OpenLayers.Protocol.WFS({ > readFormat: new OpenLayers.Format.GeoJSON(), > formatOptions: { > outputFormat: "JSON" > }, > url: "http://localhost:8080/geoserver/wfs" > featureType: "ftName", > featurePrefix: 'prefix', > featureNS: "http://ns", > geometryName: 'geometry', > maxFeatures: 100 > }) > > Hello, thanks for your post. I tried this but it doesn't work. Here is my code. var control = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS({ readFormat: new OpenLayers.Format.GeoJSON(), formatOptions: { outputFormat: "JSON" }, url: "http://localhost:8080/geoserver/wfs", featureType: "MY_LAYER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", geometryName: 'GEOM', maxFeatures: 100, defaultFilter: my_filter }) }); control.events.register("featureselected", this, function(e) { select.addFeatures([e.feature]); }); map.addControl(control); control.activate(); When I launch my app I get an error that feature.lenght is null or doesn't exist? Do I have to implement a map.events.register as I did it with my getfeatureinfo or is there something else wrong. Thanks for your help Regards stash -- View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4086377.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Mon Nov 30 03:59:33 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: References: <1259331630271-4075933.post@n2.nabble.com> Message-ID: <1259571573270-4086390.post@n2.nabble.com> Ivan Grcic-2 wrote: > > OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for > creating OpenLayers.Protocol.WFS from allready defined WMS layer. So > you can just define protocol as: > > protocol: OpenLayers.Protocol.WFS({ > readFormat: new OpenLayers.Format.GeoJSON(), > formatOptions: { > outputFormat: "JSON" > }, > url: "http://localhost:8080/geoserver/wfs" > featureType: "ftName", > featurePrefix: 'prefix', > featureNS: "http://ns", > geometryName: 'geometry', > maxFeatures: 100 > }) > > Hello, thanks for your post. I tried this but it doesn't work. Here is my code. var control = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS({ readFormat: new OpenLayers.Format.GeoJSON(), formatOptions: { outputFormat: "JSON" }, url: "http://localhost:8080/geoserver/wfs", featureType: "MY_LAYER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", geometryName: 'GEOM', maxFeatures: 100, defaultFilter: my_filter }) }); control.events.register("featureselected", this, function(e) { select.addFeatures([e.feature]); }); map.addControl(control); control.activate(); When I launch my app I get an error that feature.lenght is null or doesn't exist? Do I have to implement a map.events.register as I did it with my getfeatureinfo or is there something else wrong. Thanks for your help Regards stash -- View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4086390.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Mon Nov 30 04:14:35 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: <1259571573270-4086390.post@n2.nabble.com> References: <1259331630271-4075933.post@n2.nabble.com> <1259571573270-4086390.post@n2.nabble.com> Message-ID: <4B138CFB.1030104@opengeo.org> Hi, why are you forcing your format to JSON? And are you sure that your geometryName is "GEOM", not "the_geom"? Try to omit the readFormat and formatOptions properties. Regards, Andreas. stash wrote: > > Ivan Grcic-2 wrote: > >> OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for >> creating OpenLayers.Protocol.WFS from allready defined WMS layer. So >> you can just define protocol as: >> >> protocol: OpenLayers.Protocol.WFS({ >> readFormat: new OpenLayers.Format.GeoJSON(), >> formatOptions: { >> outputFormat: "JSON" >> }, >> url: "http://localhost:8080/geoserver/wfs" >> featureType: "ftName", >> featurePrefix: 'prefix', >> featureNS: "http://ns", >> geometryName: 'geometry', >> maxFeatures: 100 >> }) >> >> >> > > Hello, > thanks for your post. I tried this but it doesn't work. Here is my code. > > > var control = new OpenLayers.Control.GetFeature({ > protocol: OpenLayers.Protocol.WFS({ > readFormat: new OpenLayers.Format.GeoJSON(), > formatOptions: { > outputFormat: "JSON" > }, > url: "http://localhost:8080/geoserver/wfs", > featureType: "MY_LAYER", > featurePrefix: 'topp', > featureNS: "http://www.openplans.org/topp", > geometryName: 'GEOM', > maxFeatures: 100, > defaultFilter: my_filter > }) > }); > > control.events.register("featureselected", this, function(e) { > select.addFeatures([e.feature]); > }); > > map.addControl(control); > control.activate(); > > When I launch my app I get an error that feature.lenght is null or doesn't > exist? > > Do I have to implement a map.events.register as I did it with my > getfeatureinfo or is there something else wrong. > > Thanks for your help > > Regards > stash > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From steffen.schwarz85 at googlemail.com Mon Nov 30 03:59:23 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: References: <1259331630271-4075933.post@n2.nabble.com> Message-ID: <1259571563746-4086383.post@n2.nabble.com> Ivan Grcic-2 wrote: > > OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for > creating OpenLayers.Protocol.WFS from allready defined WMS layer. So > you can just define protocol as: > > protocol: OpenLayers.Protocol.WFS({ > readFormat: new OpenLayers.Format.GeoJSON(), > formatOptions: { > outputFormat: "JSON" > }, > url: "http://localhost:8080/geoserver/wfs" > featureType: "ftName", > featurePrefix: 'prefix', > featureNS: "http://ns", > geometryName: 'geometry', > maxFeatures: 100 > }) > > Hello, thanks for your post. I tried this but it doesn't work. Here is my code. var control = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS({ readFormat: new OpenLayers.Format.GeoJSON(), formatOptions: { outputFormat: "JSON" }, url: "http://localhost:8080/geoserver/wfs", featureType: "MY_LAYER", featurePrefix: 'topp', featureNS: "http://www.openplans.org/topp", geometryName: 'GEOM', maxFeatures: 100, defaultFilter: my_filter }) }); control.events.register("featureselected", this, function(e) { select.addFeatures([e.feature]); }); map.addControl(control); control.activate(); When I launch my app I get an error that feature.lenght is null or doesn't exist? Do I have to implement a map.events.register as I did it with my getfeatureinfo or is there something else wrong. Thanks for your help Regards stash -- View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4086383.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From steffen.schwarz85 at googlemail.com Mon Nov 30 04:49:07 2009 From: steffen.schwarz85 at googlemail.com (stash) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: <4B138CFB.1030104@opengeo.org> References: <1259331630271-4075933.post@n2.nabble.com> <4B138CFB.1030104@opengeo.org> Message-ID: <1259574547805-4086772.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > Hi, > > why are you forcing your format to JSON? And are you sure that your > geometryName is "GEOM", not "the_geom"? Try to omit the readFormat and > formatOptions properties. > > Regards, > Andreas. > > Hi, thanks for the hint. That was the point. Now it's working and I get data. Thanks -- View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4086772.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Mon Nov 30 07:35:53 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] too much CPU used when zooming In-Reply-To: <6478775d0911260820i1b80dd2cxcfff744c785fbbbd@mail.gmail.com> References: <6478775d0911260820i1b80dd2cxcfff744c785fbbbd@mail.gmail.com> Message-ID: <20091130123553.GB4421@metacarta.com> On Thu, Nov 26, 2009 at 05:20:28PM +0100, Florent Coste wrote: > Hello OpenLayer community > > I'm a little surprised by the CPU used when zooming on any layer > (WMS, TMS....) > > It is like there is a spinning loop somewhere. For me this is like the tiles > are displayed synchronously : > It is looks like the map is not rendered until all tiles are retreived from > the network. This is definitely not true. Tiles are displayed asynchronously as they are downloaded. > Inside FireBug, clear() method is eating time and CPU (i'm not used to > firebug for profiling) Note that Firebug is a poor tool for profiling DOM interactions, because the 'last mile' of things like 'actually displaying the image' just gets 'lost'; there is no "DOM Rendering" method which the time gets attributed to. Also, any useful profiling requires working against a non-singlefile build, since it will just attribute time to whatever the first function is on a line that's actually using the time, so you'll need to use a development build to get any meaningful profiles. > clear()7025.62%73.726ms*3316.139*ms47.373ms40.459ms97.064msOpenLayers.js > (ligne 886) > The CPU used during zoom is so high that the user experience is not good... > > i'm available to test any patch to test/investigate the situation. Good luck investigating the issue. Best Regards, -- Christopher Schmidt MetaCarta From igrcic at gmail.com Mon Nov 30 08:04:54 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] Control.GetFeature In-Reply-To: <4B138CFB.1030104@opengeo.org> References: <1259331630271-4075933.post@n2.nabble.com> <1259571573270-4086390.post@n2.nabble.com> <4B138CFB.1030104@opengeo.org> Message-ID: Hi, On Mon, Nov 30, 2009 at 10:14 AM, Andreas Hocevar wrote: > Hi, > > why are you forcing your format to JSON? And are you sure that your > geometryName is "GEOM", not "the_geom"? Try to omit the readFormat and > formatOptions properties. > Well using JSON is much more lightweight then using GML, that is, transfered size in data is several times smaller. Where was a little error, it shoud say: readFormat: new OpenLayers.Format.GeoJSON(), outputFormat: "JSON", That should work, cheers > Regards, > Andreas. > > stash wrote: >> >> Ivan Grcic-2 wrote: >> >>> OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for >>> creating OpenLayers.Protocol.WFS from allready defined WMS layer. So >>> you can just define protocol as: >>> >>> protocol: OpenLayers.Protocol.WFS({ >>> ? ? ? ? ? ? readFormat: new OpenLayers.Format.GeoJSON(), >>> ? ? ? ? ? ? formatOptions: { >>> ? ? ? ? ? ? ? ? outputFormat: "JSON" >>> ? ? ? ? ? ? }, >>> ? ? ? ? ? ? url: "http://localhost:8080/geoserver/wfs" >>> ? ? ? ? ? ? featureType: "ftName", >>> ? ? ? ? ? ? featurePrefix: 'prefix', >>> ? ? ? ? ? ? featureNS: "http://ns", >>> ? ? ? ? ? ? geometryName: 'geometry', >>> ? ? ? ? ? ? maxFeatures: 100 >>> }) >>> >>> >>> >> >> Hello, >> thanks for your post. I tried this but it doesn't work. Here is my code. >> >> >> var control = new OpenLayers.Control.GetFeature({ >> protocol: OpenLayers.Protocol.WFS({ >> ? ? ? ? ? ? readFormat: new OpenLayers.Format.GeoJSON(), >> ? ? ? ? ? ? formatOptions: { >> ? ? ? ? ? ? ? ? outputFormat: "JSON" >> ? ? ? ? ? ? }, >> ? ? ? ? ? ? url: "http://localhost:8080/geoserver/wfs", >> ? ? ? ? ? ? featureType: "MY_LAYER", >> ? ? ? ? ? ? featurePrefix: 'topp', >> ? ? ? ? ? ? featureNS: "http://www.openplans.org/topp", >> ? ? ? ? ? ? geometryName: 'GEOM', >> ? ? ? ? ? ? maxFeatures: 100, >> ? ? ? ? ? ?defaultFilter: my_filter >> ? ?}) >> ? ?}); >> >> control.events.register("featureselected", this, function(e) { >> ? ? select.addFeatures([e.feature]); >> }); >> >> map.addControl(control); >> control.activate(); >> >> When I launch my app I get an error that feature.lenght is null or doesn't >> exist? >> >> Do I have to implement a map.events.register as I did it with my >> getfeatureinfo or is there something else wrong. >> >> Thanks for your help >> >> Regards >> stash >> > > > -- > 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 pedropbaracho at gmail.com Mon Nov 30 12:53:57 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] How to preset a parameter into a callback function? Message-ID: <5e3c00490911300953i11b11666we2a8290fe50d9802@mail.gmail.com> In some part of my code I am sending multiple requests asynchronously to some servers. The problem is: I need some information from the requests (like server address and URL string) in order to process the responses and these informations aren't available in the response parameter (which is something like a GML). That being said, I think the best way is to preset some parameters in the callback function when sending the requests. I found this solution: http://openlayers.org/pipermail/users/2009-March/010890.html which partially explains OpenLayers.Function.bind() and gives another option of using the scope to set the parameter. The problem with these solutions is that I need the scope to be on the current object AND set additional parameters. In other words, I CAN'T change the scope, which means either I set these parameters inside the scope in some sort of twisted temporary variables or I use some unknown method which allows me to tell OpenLayers: "When calling the callback function, set these parameters additionally to the response". This is what I have: for (i in servers) { OpenLayers.Request.issue({ url: servers[i], headers: {...}, params: {...} success: this.someFunction, scope: this }); } This is what I need: for (i in servers) { OpenLayers.Request.issue({ url: servers[i], headers: {...}, params: {...} success: this.someFunction(i, response), // preset parameter "i" scope: this }); } Is OpenLayers.Function.bind() what I am looking for? If it is, how do I use it? I didn't find any docs on it, on OL API. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091130/3e5e5d6f/attachment.html From pedropbaracho at gmail.com Mon Nov 30 13:16:27 2009 From: pedropbaracho at gmail.com (Pedro Baracho) Date: Wed Sep 1 17:18:16 2010 Subject: [OpenLayers-Users] How to preset a parameter into a callback function? In-Reply-To: <5e3c00490911300953i11b11666we2a8290fe50d9802@mail.gmail.com> References: <5e3c00490911300953i11b11666we2a8290fe50d9802@mail.gmail.com> Message-ID: <5e3c00490911301016s33c6076eua2fad3820c384c8f@mail.gmail.com> 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. On Mon, Nov 30, 2009 at 3:53 PM, Pedro Baracho wrote: > In some part of my code I am sending multiple requests asynchronously to > some servers. The problem is: I need some information from the requests > (like server address and URL string) in order to process the responses and > these informations aren't available in the response parameter (which is > something like a GML). That being said, I think the best way is to preset > some parameters in the callback function when sending the requests. > > I found this solution: > http://openlayers.org/pipermail/users/2009-March/010890.html which > partially explains OpenLayers.Function.bind() and gives another option of > using the scope to set the parameter. > > The problem with these solutions is that I need the scope to be on the > current object AND set additional parameters. In other words, I CAN'T change > the scope, which means either I set these parameters inside the scope in > some sort of twisted temporary variables or I use some unknown method which > allows me to tell OpenLayers: "When calling the callback function, set these > parameters additionally to the response". > > This is what I have: > > for (i in servers) { > OpenLayers.Request.issue({ > url: servers[i], > headers: {...}, > params: {...} > success: this.someFunction, > scope: this > }); > } > > This is what I need: > > for (i in servers) { > OpenLayers.Request.issue({ > url: servers[i], > headers: {...}, > params: {...} > success: this.someFunction(i, response), // preset parameter "i" > scope: this > }); > } > > Is OpenLayers.Function.bind() what I am looking for? If it is, how do I use > it? I didn't find any docs on it, on OL API. > > Thanks in advance. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091130/e2836e94/attachment.html