From joepub1962 at gmail.com Wed Sep 1 00:09:37 2010 From: joepub1962 at gmail.com (Joe Public) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] Using getFeatureInfo on a vector (WFS) layer in openLayers Message-ID: <1283314177551-5485412.post@n2.nabble.com> Hey OL.... I'm trying display the data associated with a feature (point) in a vector (WFS) layer using the script below When I click on the feature I get the message: No QUERY_LAYERS has been requested, or no queriable layer in the request anyways I've used both "http://tobagoborn.com:8080/geoserver/WMS", and "http://tobagoborn.com:8080/geoserver/WFS", as the URL in the getFeatureInfo part of the script Any suggestion or solution would be greatly appreciated Thanks Joe P -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Using-getFeatureInfo-on-a-vector-WFS-layer-in-openLayers-tp5485412p5485412.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alb.valente at gmail.com Wed Sep 1 03:42:13 2010 From: alb.valente at gmail.com (Alberto Valente) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] which is the best way to display a set of points coming from database? In-Reply-To: <1283265634279-5482958.post@n2.nabble.com> References: <1283265634279-5482958.post@n2.nabble.com> Message-ID: I understand.. I'm sure this solution is very good but unfortunately I MUST (and I'm not happy of this) use an Oracle db and I haven't access to it (cannot configure extensions, plugins, etc.). So the only way for getting the coords is querying them with a SELECT statement from a php page and arrange them in a format suitable by OpenLayers. Other suggestions? ;-) btw thank you Piero for your help.. it reminds me I'm not using the best available tools.. :-( alberto On Tue, Aug 31, 2010 at 4:40 PM, Piero Campa wrote: > > I've been working on something like 'display georeferenced point', and I > did > like that: > > - associate the X/Y coordinates with a geometry in the database (using > PostGIS extension to a PostgreSQL database; > - import the database in an istance of GeoServer (which can reproject your > points in all the SRS you can think of, maybe this can be useful for your > application), > - let OL ask for the points (you can use filters also, e.g. spatial > filters) > via WFS protocol to GeoServer. > > Absolutely powerful, and simple. > Piero > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/which-is-the-best-way-to-display-a-set-of-points-coming-from-database-tp5482933p5482958.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/20100901/cc04d7e7/attachment.html From sburbeck at bfs.de Wed Sep 1 03:45:05 2010 From: sburbeck at bfs.de (Sven Burbeck) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] proxy.cgi fails In-Reply-To: <4C779B9A.6020502@terrestris.de> References: <20100827093653.13244qxoo08o8084@dc-slave2-fr.fr.bfs.de> <4C7775D6.5080100@terrestris.de> <20100827110452.98576etijo320z48@dc-slave2-fr.fr.bfs.de> <4C778F14.5000105@terrestris.de> <20100827124025.49012ot071px9xc0@dc-slave2-fr.fr.bfs.de> <4C779B9A.6020502@terrestris.de> Message-ID: <20100901094505.83982tnp7k00ntes@dc-slave2-fr.fr.bfs.de> Hello, finally i got the proxy.running. The problem came up due to the application running on glassfish (port 8080) and the cgi script being run by Apache (port 80) So I had to add "myApache_URL/" to the path of OpenLayers.ProxyHost However, the request now is forwarded to the external MapServer, the response (format = html) seems to be O.K. (status = 200) but the GeoExt.popup ist still empty. Definition of WMSGetFeatureInfo is: var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo( { vendorParams: {map: 'PathToMap.map'} } ); featureInfo.events.on({ getfeatureinfo: function(e) { new GeoExt.Popup({ title: "Info", width: 200, height: 150, autoScroll: true, maximizable: true, map: map, lonlat: map.getLonLatFromPixel(e.xy), html: e.text }).show(); } }); Is there still anything missing, that I forgot to define or defined the wrong way? cheers, Sven Quoting "Marc Jansen" : > Hi Sven, > > are you using another proxy to access URLs in your network? I found this > Mailinglist discussion > http://mail.python.org/pipermail/python-list/2008-December/569855.html > > If that is still not doing the trick, I',m afraid I am running out of > ideas soon. > > Regards, > Marc > > > On 27.08.2010 12:40, Sven Burbeck wrote: >> Hi, >> the firewall is off. >> Entering http://example.com/cgi-bin/proxy.cgi >> manually in the browser brings up the following message: >> Not Found >> The requested URL /cgi-bin/proxy.cgi was not found on this server. >> Apache/2.2.3 (CentOS) Server at example.com Port 80 >> >> entering http://localhost/cgi-bin/proxy.cgi >> brings up: >> waiting for localhost... >> >> >> cheers, >> Sven >> >> >> Quoting "Marc Jansen": >> >> >>> Hi Sven, >>> >>> Is there some firewall active on the server? >>> >>> What do you see if you enter http://example.com/cgi-bin/proxy.cgi in >>> your browser manually? When called without parameters, it'll try to >>> access www.openlayers.org. >>> >>> You should see the OpenLayers Homepage served by your proxy (You'll need >>> to allow the host www.openlayers.org though) >>> >>> Regards, >>> Marc >>> >>> >>> On 27.08.2010 11:04, Sven Burbeck wrote: >>> >>>> Hi Marc, >>>> 1.) Browser indicates: "waiting for localhost" and finally: >>>> "" >>>> >>>> 2.) mytest.cgi indeed wasn't Python but Perl. However, I changed it >>>> to Python >>>> Content: >>>> #!/usr/bin/python >>>> print "Content-type: text/html\r\n\r\n"; >>>> print "Python CGI works"; >>>> and it works! >>>> >>>> 3.) changed first line in proxy.cgi to #!/usr/bin/python >>>> but to no avail. The problem remains. >>>> >>>> Any idea? >>>> >>>> Sven >>>> >>>> >>>> >>>> Quoting "Marc Jansen": >>>> >>>> >>>> >>>>> Hi Sven, >>>>> >>>>> Just some thoughts/questions: >>>>> >>>>> * What is the exact server message? >>>>> * Is your test.cgi a python cgi? >>>>> * Can proxy.cgi find the pythoin executable? >>>>> * On a terminal on that machine issue >>>>> which python >>>>> >>>>> This should give you the path to the python executable >>>>> (/path/to/python). Replace the first line in the proxy.cgi script >>>>> #!/usr/bin/env python >>>>> >>>>> to the output of 'which' >>>>> #!/path/to/python >>>>> >>>>> * Is the script executable (check it with ls -la, maybe add it with >>>>> chmod +x proxy.cgi) >>>>> >>>>> >>>>> Regards, >>>>> Marc >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On 27.08.2010 09:36, Sven Burbeck wrote: >>>>> >>>>> >>>>>> Hello, >>>>>> sorry for asking stupid newbie questions but I fail to get the >>>>>> proxi.cgi working. >>>>>> I followed the FAQ description: >>>>>> http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost >>>>>> >>>>>> I've installed Apache 2.2.13 on SUSE11.2 via rpm. >>>>>> Apparently the default cgi-bin is under /srv/www/cgi-bin >>>>>> I put a test.cgi there and it works when calling it: >>>>>> http://localhost/cgi-bin/test.cgi >>>>>> >>>>>> However, trying the same with proxy.cgi fails. >>>>>> Is there anything else I have to consider? >>>>>> >>>>>> cheers, >>>>>> Sven >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>> >>> >>> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > > ................................................................. > Karten im (Inter|Intra)net? > > OpenLayers - Webentwicklung mit dynamischen Karten und Geodaten > von M. Jansen und T. Adams, OpenSourcePress, M?nchen. > > ISBN: 978-3-937514-92-5 > URL: http://openlayers-buch.de > ................................................................. > > > Dipl.-Geogr. Marc Jansen > - Anwendungsentwickler - > > terrestris GmbH& Co. KG > Irmintrudisstra?e 17 > 53111 Bonn > > Tel: ++49 (0)228 / 96 28 99 -53 > Fax: ++49 (0)228 / 96 28 99 -57 > > Email: jansen@terrestris.de > Web: http://www.terrestris.de > > Amtsgericht Bonn, HRA 6835 > Komplement?rin: terrestris Verwaltungsgesellschaft mbH > vertreten durch: Hinrich Paulsen, Till Adams > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From mulone at rome.com Wed Sep 1 06:23:31 2010 From: mulone at rome.com (Mulone) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] How to change WMS layer on the fly? Message-ID: <1283336611934-5486278.post@n2.nabble.com> Hi all, I'm struggling with a peculiar set up: we have a WMS layer in OpenLayers (within a GeoExt web interface) invoking a MapServer string (e.g. http://mydomain/cgi-bin/mapserv.exe?map=someMapFile.map&etcetc). Now we need to split the dataset into several layers. We tried by instanciating n separate WMS layers and it's way too slow, so we're trying a pretty simple solution: generating a custom mapFile containing only the required layers. This dynamic mapfile is returned by a service: http://mydomain/myservice/get?layers=listoflayers,otherparams,etc that returns the path to the custom mapfile. This solution is very simple and efficient. So now we should update the WMS layer in order to replace this mapfile on the fly, without reloading the whole page. So my questions are: - Is this possible? - Is it ok to have a separate layer list (not the default one offered by OpenLayers) and trigger an event "changeLayers"? Are there any examples of this setup? Thanks in advance for any hints! Mulone ----- Mulone PhD student -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-change-WMS-layer-on-the-fly-tp5486278p5486278.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paolo_tome at hotmail.com Wed Sep 1 07:10:34 2010 From: paolo_tome at hotmail.com (snuffer892) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] WKT insert into database Message-ID: <1283339434457-5486415.post@n2.nabble.com> Hello everyone, I followed one of the examples provided by openlayer, to allow users to draw geometries: http://svn.openlayers.org/sandbox/stvn/arcgis-server/examples/wkt.html I have, for the geometry designed, an info window containing the coordinates in WKT format; Can someone help me understand how to insert geometries in a database? thanks a lot! Paolo -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WKT-insert-into-database-tp5486415p5486415.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From robertdbuckley at yahoo.com Wed Sep 1 07:16:33 2010 From: robertdbuckley at yahoo.com (Robert Buckley) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] Symbolize wfs using sld? Message-ID: <856848.96748.qm@web24101.mail.ird.yahoo.com> Hi, Is it possible to symbolize a wfs Layer using an sld stylesheet? Thanks, Rob From pablo at softplan.com.br Wed Sep 1 07:23:40 2010 From: pablo at softplan.com.br (Pablo Cabrera) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] Symbolize wfs using sld? In-Reply-To: <856848.96748.qm@web24101.mail.ird.yahoo.com> References: <856848.96748.qm@web24101.mail.ird.yahoo.com> Message-ID: <4C7E37BC.7080408@softplan.com.br> Hello, Yes it is, OL supports the usage of an SLD with vector layers such as WFS or GML, but its slow and it does have its limitations. If you can it is better to have those layers rendered through WMS telling the server which SLD to use On 01/09/2010 08:16, Robert Buckley wrote: > Hi, > > Is it possible to symbolize a wfs Layer using an sld stylesheet? > > Thanks, > > Rob > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From bartvde at osgis.nl Wed Sep 1 07:24:13 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] Symbolize wfs using sld? In-Reply-To: <856848.96748.qm@web24101.mail.ird.yahoo.com> References: <856848.96748.qm@web24101.mail.ird.yahoo.com> Message-ID: Sure, check out the sld.html example. This works with Layer.GML, but the same should apply to Layer.Vector. Best regards, Bart -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bartvde@osgis.nl On Sep 1, 2010, at 1:16 PM, Robert Buckley wrote: > Hi, > > Is it possible to symbolize a wfs Layer using an sld stylesheet? > > Thanks, > > Rob > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From robertdbuckley at yahoo.com Wed Sep 1 08:02:49 2010 From: robertdbuckley at yahoo.com (Robert Buckley) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] Symbolize wfs using sld? Message-ID: <372696.81068.qm@web24103.mail.ird.yahoo.com> Hi, I am actually trying to load a shapefile into openlayers and have all the attributes listed into a table under the map. I have completed this using a wfs layer, but am now looking at getting some scale dependant symbols into the map as well with the use of an SLD file. Is there maybe a better way of completing this? Yours, Rob From remiglobal at gmail.com Wed Sep 1 08:08:16 2010 From: remiglobal at gmail.com (remi) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] WKT insert into database In-Reply-To: <1283339434457-5486415.post@n2.nabble.com> References: <1283339434457-5486415.post@n2.nabble.com> Message-ID: hi paolo, you've got to have a database with GIS extension. I use mysql. mysql 4.1 and above supports GIS and spatial extension. my application is written in php with mysql. I use phpmyadmin to manage my db inserting can be as simple as this ------------------------------------------------- insert into my_geometries (my_id,geometries) values ('$my_id',GeomFromText('$geometries')) and retrieving like this ------------------------------- select AsText(geometries) as geom from my_geometries where my_id='$my_id' to view geometries from phpmyadmin, please use the latest phpmyadmin version. hope that helps, remi On Wed, Sep 1, 2010 at 7:10 PM, snuffer892 wrote: > > Hello everyone, > I followed one of the examples provided by openlayer, to allow users to > draw > geometries: > > http://svn.openlayers.org/sandbox/stvn/arcgis-server/examples/wkt.html > > I have, for the geometry designed, an info window containing the > coordinates in WKT format; > Can someone help me understand how to insert geometries in a database? > > thanks a lot! > Paolo > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/WKT-insert-into-database-tp5486415p5486415.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/20100901/1924dd9d/attachment.html From benjaminpreisig at gmx.at Wed Sep 1 09:36:27 2010 From: benjaminpreisig at gmx.at (Bennos) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] proxi.cgi configure to read any WMS or WFS url services In-Reply-To: <1283261898256-5482677.post@n2.nabble.com> References: <1283261898256-5482677.post@n2.nabble.com> Message-ID: <1283348187381-5486968.post@n2.nabble.com> BMcBride, Thanks a lot! Finally i found a way how to use the proxy with IIS. Works perfect for me!! Cheers, B -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/proxi-cgi-configure-to-read-any-WMS-or-WFS-url-services-tp5480390p5486968.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bmcbride at chacompanies.com Wed Sep 1 10:01:52 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] which is the best way to display a set of points coming from database? In-Reply-To: References: <1283265634279-5482958.post@n2.nabble.com> Message-ID: <1283349712653-5487113.post@n2.nabble.com> Hey Alberto, I've had luck using PHP with a SELECT statement on a MySQL database to write a KML file for use in OpenLayers. As long as your query returns a relatively small subset of features (<500) and your users have a snappy connection with a decent browser, you should be OK using this method. Fortunately you are returning point features with a single set of coordinate pairs, as opposed to complex polygons! A benefit of using KML is that you can also let the user download the results in a fairly common and readily usable GIS format without having to write any additional code. If you are interested I can post my MySQL -> KML PHP script. Best of luck! BRYAN ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com http://geoserving.net/ geoserving.net -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/which-is-the-best-way-to-display-a-set-of-points-coming-from-database-tp5482933p5487113.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ricardorodot02 at gmail.com Wed Sep 1 10:02:37 2010 From: ricardorodot02 at gmail.com (=?ISO-8859-1?Q?Ricardo_Rodr=EDguez?=) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] proxi.cgi configure to read any WMS or WFS url services In-Reply-To: <1283348187381-5486968.post@n2.nabble.com> References: <1283261898256-5482677.post@n2.nabble.com> <1283348187381-5486968.post@n2.nabble.com> Message-ID: hi thanks for the reply, I have a question then as to be amended this statement ( OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; ) for file proxy.php since the requests are not processed or the system is awaiting a response. Thanks again and suggest Ricardo Rodr?guez Univalle -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100901/33283690/attachment.html From bmcbride at chacompanies.com Wed Sep 1 10:12:18 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] proxi.cgi configure to read any WMS or WFS url services In-Reply-To: References: <1283261898256-5482677.post@n2.nabble.com> <1283348187381-5486968.post@n2.nabble.com> Message-ID: <1283350338984-5487166.post@n2.nabble.com> Ricardo, Use this: OpenLayers.ProxyHost = "proxy.php?url="; ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com http://geoserving.net/ geoserving.net -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/proxi-cgi-configure-to-read-any-WMS-or-WFS-url-services-tp5480390p5487166.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paolo_tome at hotmail.com Wed Sep 1 10:18:01 2010 From: paolo_tome at hotmail.com (snuffer892) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] WKT insert into database In-Reply-To: References: <1283339434457-5486415.post@n2.nabble.com> Message-ID: <1283350681331-5487188.post@n2.nabble.com> thanks! First of all I have to create a script that retrieves the string on the server, and then an insert query in geodabase (like the one you suggested), this is the right procedure? regarding the script I can elaborate on some one that already exists? because I'm not able to write a new one ... thanks again! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WKT-insert-into-database-tp5486415p5487188.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ijturton at gmail.com Wed Sep 1 11:03:39 2010 From: ijturton at gmail.com (Ian Turton) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] Using getFeatureInfo on a vector (WFS) layer in openLayers In-Reply-To: <1283314177551-5485412.post@n2.nabble.com> References: <1283314177551-5485412.post@n2.nabble.com> Message-ID: On Wed, Sep 1, 2010 at 12:09 AM, Joe Public wrote: > > Hey OL.... > I'm trying display the data associated with a feature (point) in a vector > (WFS) layer using the script below > When I click on the feature I get the message: > No QUERY_LAYERS has been requested, or no queriable layer in the request > anyways > You can't use getFeatureInfo against a WFS as it is a WMS request. You would need to use a GetFeature request against the WFS. Look at the demo requests provided by GeoServer to see the differences. Or http://dev.openlayers.org/releases/OpenLayers-2.9.1/examples/getfeature-wfs.html for a working OpenLayers example. Ian -- Ian Turton From ryan.feagin at PEACHTREEGEOGRAPHICS.COM Wed Sep 1 11:05:15 2010 From: ryan.feagin at PEACHTREEGEOGRAPHICS.COM (RFeagin) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] which is the best way to display a set of points coming from database? In-Reply-To: <1283349712653-5487113.post@n2.nabble.com> References: <1283265634279-5482958.post@n2.nabble.com> <1283349712653-5487113.post@n2.nabble.com> Message-ID: <1283353515770-5487444.post@n2.nabble.com> I had a need for simply displaying thousands of css styled points from a SQL Server db (no need for click handlers) and ended up creating a custom tiled vector layer. The points are created as img tags. I can even swap the style sheet on the fly to change thematics without having to post anything back. Carving up the data into the tiles allowed for caching of the point data too since the bounding box of each tile is consistent just like with a WMS. On the database side, it returns clustered points with css styles as KML. I never have gotten around to cleaning up the code or getting it to be generic and to the point where it was worthy of submitting back to the community. I only took it just as far as I needed for what I was doing. If someone else could benefit from it and be able to finish it up, I'd of course be more than willing to send it. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/which-is-the-best-way-to-display-a-set-of-points-coming-from-database-tp5482933p5487444.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ricardorodot02 at gmail.com Wed Sep 1 12:13:42 2010 From: ricardorodot02 at gmail.com (=?ISO-8859-1?Q?Ricardo_Rodr=EDguez?=) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] proxi.cgi configure to read any WMS or WFS url services In-Reply-To: <1283350338984-5487166.post@n2.nabble.com> References: <1283261898256-5482677.post@n2.nabble.com> <1283348187381-5486968.post@n2.nabble.com> <1283350338984-5487166.post@n2.nabble.com> Message-ID: hi, not work OpenLayers.ProxyHost = "proxy.php?url="; I have to change something in the script, aside from this there are more scripts proxy of this type. thanks for the help and time Ricardo Rodr?guez Univalle -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100901/f453f6ec/attachment.html From MostlyBaldEagle at shaw.ca Wed Sep 1 15:01:25 2010 From: MostlyBaldEagle at shaw.ca (MostlyBaldEagle) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] need to internet event on vector layer before features are rendered Message-ID: <1283367685586-5488396.post@n2.nabble.com> I am trying to figure out a way to intercept an event which causes the rendering of the features on a vector layer. Basically I need to modify line features before they are rendered but after a zoom has been requested. So I registered the moveend event on the layer with my line features, which works fine except that the lines are already rendered when I get the moveend event. (I am trying to hide/unhide a few line features when zooming in/out...) Is there an event I can register for that is sent when a zoom has been requested but before the features are rendered? This is driving me bonkers... ;-) Regards Olaf -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/need-to-internet-event-on-vector-layer-before-features-are-rendered-tp5488396p5488396.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From huit_six13 at hotmail.com Wed Sep 1 15:08:37 2010 From: huit_six13 at hotmail.com (huit_six) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] What is the meaning of the result of getLonLatFromPixel ? Message-ID: <1283368117008-5488414.post@n2.nabble.com> Hello, I'm a quite new user to openlayers, so there must be a lot of things I don't understand... I tried to convert between coordinates in pixels of the position of the mouse, over a map. I tried this http://carriernicolas.open-web.fr/ressources/essais_de_code/openlayers_test.html little piece of code but I don't understand the values that get displayed. Is there an additional I must do in order to obtain the right latitude and longitude ? Thank you, Regards, Nicolas -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/What-is-the-meaning-of-the-result-of-getLonLatFromPixel-tp5488414p5488414.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From huit_six13 at hotmail.com Wed Sep 1 15:20:21 2010 From: huit_six13 at hotmail.com (huit_six) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] What is the meaning of the result of getLonLatFromPixel ? In-Reply-To: <1283368117008-5488414.post@n2.nabble.com> References: <1283368117008-5488414.post@n2.nabble.com> Message-ID: <1283368821986-5488456.post@n2.nabble.com> I tried that sort of conversion : var point = map.getLonLatFromPixel(position); locDisp.innerHTML = (point.lat / 40000000 * 360 ).toFixed(4)+ ', ' + (point.lon / 40065035.535 * 180).toFixed(4); which seem to give results in the good ranges. But is it really the good way of conversion ? And why the latitude and longitude would be given in meters ? Isn't it weird ? Have I missed something ? Thank you ! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/What-is-the-meaning-of-the-result-of-getLonLatFromPixel-tp5488414p5488456.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alex at crackpot.org Wed Sep 1 15:31:08 2010 From: alex at crackpot.org (Alex Dean) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] What is the meaning of the result of getLonLatFromPixel ? In-Reply-To: <1283368821986-5488456.post@n2.nabble.com> References: <1283368117008-5488414.post@n2.nabble.com> <1283368821986-5488456.post@n2.nabble.com> Message-ID: On Sep 1, 2010, at 2:20 PM, huit_six wrote: > > I tried that sort of conversion : > var point = map.getLonLatFromPixel(position); > locDisp.innerHTML = (point.lat / 40000000 * 360 ).toFixed(4)+ ', ' + > (point.lon / 40065035.535 * 180).toFixed(4); > which seem to give results in the good ranges. > But is it really the good way of conversion ? And why the latitude and > longitude would be given in meters ? Isn't it weird ? Have I missed > something ? I couldn't find OpenLayers.Layer.OSM in the API docs, but the coordinates on your sample look like they're in 'spherical mercator', which is common for WMS providers like Google, Yahoo, etc. http://docs.openlayers.org/library/spherical_mercator.html says that OSM is indeed spherical mercator. So, I think you're getting x & y values in the coordinate system of your base layer. I think the values are actually a number of meters north & east of 0. You can translate that to EPSG:4326 (lat/lon) using a function described in this page http://dev.openlayers.org/releases/OpenLayers-2.9.1/doc/apidocs/files/OpenLayers/Layer/SphericalMercator-js.html Also take a look at the re-projection examples on the spherical_mercator.html page I linked to above. alex From christopher.schmidt at nokia.com Wed Sep 1 15:36:18 2010 From: christopher.schmidt at nokia.com (christopher.schmidt@nokia.com) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] What is the meaning of the result of getLonLatFromPixel ? In-Reply-To: References: <1283368117008-5488414.post@n2.nabble.com> <1283368821986-5488456.post@n2.nabble.com> Message-ID: <1ABB68D5-C57D-4171-A894-9BB29CA33F64@nokia.com> On Sep 1, 2010, at 3:31 PM, ext Alex Dean wrote: > > On Sep 1, 2010, at 2:20 PM, huit_six wrote: > >> >> I tried that sort of conversion : >> var point = map.getLonLatFromPixel(position); >> locDisp.innerHTML = (point.lat / 40000000 * 360 ).toFixed(4)+ ', ' + >> (point.lon / 40065035.535 * 180).toFixed(4); >> which seem to give results in the good ranges. >> But is it really the good way of conversion ? And why the latitude and >> longitude would be given in meters ? Isn't it weird ? Have I missed >> something ? > > I couldn't find OpenLayers.Layer.OSM in the API docs, but the > coordinates on your sample look like they're in 'spherical mercator', > which is common for WMS providers like Google, Yahoo, etc. http://docs.openlayers.org/library/spherical_mercator.html > says that OSM is indeed spherical mercator. > > So, I think you're getting x & y values in the coordinate system of > your base layer. I think the values are actually a number of meters > north & east of 0. You can translate that to EPSG:4326 (lat/lon) > using a function described in this page > http://dev.openlayers.org/releases/OpenLayers-2.9.1/doc/apidocs/files/OpenLayers/Layer/SphericalMercator-js.html Also, http://docs.openlayers.org/library/spherical_mercator.html -- Chris > Also take a look at the re-projection examples on the > spherical_mercator.html page I linked to above. > > alex > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From alb.valente at gmail.com Wed Sep 1 15:57:25 2010 From: alb.valente at gmail.com (Alberto Valente) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] which is the best way to display a set of points coming from database? In-Reply-To: <1283353515770-5487444.post@n2.nabble.com> References: <1283265634279-5482958.post@n2.nabble.com> <1283349712653-5487113.post@n2.nabble.com> <1283353515770-5487444.post@n2.nabble.com> Message-ID: dear BMcBride and RFeagin, If you send me your works I'll give them a try!! Actually I've managed creating a geojson object from the php page that executes the query. The geojson featurecollection is echoed inside the main page so I have it inside the openlayers I know it's not a optimum solution but actually it works and I can show it to the boss! So now I'm keeping it and I'll improve it in the future. if you want on next monday I can send or post here the solution I've found but, since I know it's horrible, you have to promise me you won't laugh at it ;-) thank you alberto On Wed, Sep 1, 2010 at 5:05 PM, RFeagin < ryan.feagin@peachtreegeographics.com> wrote: > > I had a need for simply displaying thousands of css styled points from a > SQL > Server db (no need for click handlers) and ended up creating a custom tiled > vector layer. The points are created as img tags. I can even swap the > style sheet on the fly to change thematics without having to post anything > back. Carving up the data into the tiles allowed for caching of the point > data too since the bounding box of each tile is consistent just like with a > WMS. On the database side, it returns clustered points with css styles as > KML. I never have gotten around to cleaning up the code or getting it to > be > generic and to the point where it was worthy of submitting back to the > community. I only took it just as far as I needed for what I was doing. > If > someone else could benefit from it and be able to finish it up, I'd of > course be more than willing to send it. > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/which-is-the-best-way-to-display-a-set-of-points-coming-from-database-tp5482933p5487444.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/20100901/28e014ce/attachment.html From adam at prema.co.nz Wed Sep 1 16:29:01 2010 From: adam at prema.co.nz (Adam Ratcliffe) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] Symbolize wfs using sld? In-Reply-To: <372696.81068.qm@web24103.mail.ird.yahoo.com> References: <372696.81068.qm@web24103.mail.ird.yahoo.com> Message-ID: This page may help if you're using a vector layer: http://docs.openlayers.org/library/feature_styling.html Cheers Adam On 2/09/2010, at 12:02 AM, Robert Buckley wrote: > Hi, > > I am actually trying to load a shapefile into openlayers and have all the > attributes listed into a table under the map. I have completed this using a wfs > layer, but am now looking at getting some > > scale dependant symbols into the map as well with the use of an SLD file. > > Is there maybe a better way of completing this? > > Yours, > > Rob > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From yves.moisan at boreal-is.com Wed Sep 1 16:41:34 2010 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] maxExtent not passed to an OSM layer Message-ID: <4C7EBA7E.50901@boreal-is.com> Hi All, The maxExtent map option doesn't seem to be carried over to an XYZ type of layer. Looking at the initialize function of an XYZ layer, I see the maxExtent is hardcoded whereas it is not in e.g. a Google type. Why is that so ? The difference in behaviour means we can't use a maxExtent with OSM as a base layer : it just doesn't zoom in. Works with Bing, Google or Yahoo though. But I want OSM as my base layer ... Pointers appreciated, Yves From christopher.schmidt at nokia.com Wed Sep 1 16:48:43 2010 From: christopher.schmidt at nokia.com (christopher.schmidt@nokia.com) Date: Wed Sep 1 17:19:11 2010 Subject: [OpenLayers-Users] maxExtent not passed to an OSM layer In-Reply-To: <4C7EBA7E.50901@boreal-is.com> References: <4C7EBA7E.50901@boreal-is.com> Message-ID: On Sep 1, 2010, at 4:41 PM, ext Yves Moisan wrote: > > Hi All, > > The maxExtent map option doesn't seem to be carried over to an XYZ type > of layer. Looking at the initialize function of an XYZ layer, I see the > maxExtent is hardcoded whereas it is not in e.g. a Google type. Why is > that so ? The difference in behaviour means we can't use a maxExtent > with OSM as a base layer : it just doesn't zoom in. Works with Bing, > Google or Yahoo though. But I want OSM as my base layer ... OSM tile grid is (like all of our other existing layers) based on the maxExtent of the layer. Changing the maxExtent would change the extent of the tiles, and then nothing would line up. If you are interested in changing this, check out: http://trac.openlayers.org/ticket/2741 Which has some code and discussion of the issue. -- Chris