From arnd.wippermann at web.de Sat Dec 1 07:58:05 2012 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Sat, 1 Dec 2012 16:58:05 +0100 Subject: [OpenLayers-Users] Can not Extract KML Attribute In-Reply-To: <3f5stj7.2ed8928fe8ad2dbac2e21bf2ef9ebba3@webmail.geodesign.com.br> References: <3f5stj7.2ed8928fe8ad2dbac2e21bf2ef9ebba3@webmail.geodesign.com.br> Message-ID: <7CAC78FE3D0E468DAB09F2F238E3BEA7@pcawh2> It seems, that the propertyStyles for label have to be set. something like this: pois["styleMap"]["styles"]["default"]["propertyStyles"] = {"label":true}; Example: http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/kml_csv_data_layer/kml_csv_ data_layer.asp?propertyStyles=true Regards, Arnd gis.ibbeck.de _____ Von: openlayers-users-bounces at lists.osgeo.org [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von reinaldo at geodesign.com.br Gesendet: Freitag, 30. November 2012 13:38 An: openlayers-users at lists.osgeo.org Betreff: [OpenLayers-Users] Can not Extract KML Attribute OL Users, Could some one please help? I can not extract attributes in a KML file. Here is my KML: ba_uf 2909901 Nordeste> BAHIA> 0 1 -39.76265494838268,-12.27246488227016,0 -39.48325151827876,-12.09283133762983,0 -39.41905766787695,-11.8699639552835,0 -39.36482198574752,-11.65858652001503,0 -39.76422342556302,-11.64471479218556,0 -40.04350054605078,-11.82438907570092,0 -40.01005372231482,-12.1350573465942,0 -39.76265494838268,-12.27246488227016,0 This what I am using to extract and style the attributes: ... new OpenLayers.Layer.Vector("ESTADO DA BAHIA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_uf_900913a.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), style: { fillColor: "#ffffff", fillOpacity: 0, strokeWidth: 1, strokeColor: "#0000ff", strokeOpacity: 1, label: "${State}", fontColor: "#ffffff", fontFamily: "sans-serif", fontSize: "15px", fontWeight: "bold" } ... I want the attribute for State to be rendered on the map, but I only get ${State} rendered. I've tried additng and label: "${State}" or label: "${State.value}" . I get either ${State} or ${State.value} rendered on the map, but never the actual attribute, which is BAHIA. I just can?t get it to work. Could someone help please? Thanks a lot in advance. Reinaldo _____ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnd.wippermann at web.de Sat Dec 1 07:58:05 2012 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Sat, 1 Dec 2012 16:58:05 +0100 Subject: [OpenLayers-Users] BBOX Strategy and StyleMap problem In-Reply-To: References: Message-ID: <40AA7B6708244C37A3AFC82E9A7E48EA@pcawh2> Your problem should be solved with a styleMap like this styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ externalGraphic: "kml_csv_data_layer_marker-${Type}.png", graphicWidth: 21, graphicHeight: 25, graphicXOffset: -11, graphicYOffset: -25 }) }) Example: http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/kml_csv_data_layer/kml_csv_ data_layer.asp?propertyStyles=true Regards, Arnd gis.ibbeck.de -----Urspr?ngliche Nachricht----- Von: openlayers-users-bounces at lists.osgeo.org [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Mario Danelli Gesendet: Samstag, 1. Dezember 2012 06:42 An: openlayers-users at lists.osgeo.org Betreff: [OpenLayers-Users] BBOX Strategy and StyleMap problem Dear all, I've a problem trying to apply a custom (different marker pngs following a specific type) markers when using BBOX Strategy to get features data. I'm using Openlayers 2.12. Below the code var pois = new OpenLayers.Layer.Vector("POIs", { projection: new OpenLayers.Projection("EPSG:4326"), strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1.1})], protocol: new OpenLayers.Protocol.HTTP({ url: "./get_data.php", format: new OpenLayers.Format.Text() }), styleMap: new OpenLayers.StyleMap({ "default": { externalGraphic: "./js/openlayers/img/marker-${type}.png", graphicHeight: 20, name: "${id}", id: "${type}" + "-" + "${id}" } }) map.addLayer(pois); pois.setVisibility(true); pois.events.on({ 'featureselected': onFeatureSelect, 'featureunselected': onFeatureUnselect }); selectControl = new OpenLayers.Control.SelectFeature(pois); map.addControl(selectControl); selectControl.activate(); the "get_data.php" returns data as example below id point ref_lat ref_lon name descr type 2 55.92,14.3 55.92 14.3 Name1 descr1 t1 3 56.1,10.2 56.16 10.2 Name2 descr2 t2 4 56.13,10.21 56.13 10.21 Name3 descr3 t1 The goal is to have different markers (colours) if the points are of type "t1" or "t2". But it's nevere selected the correct marker (for example: marker-t1.png) but every time is selected the default marker.png. The behaviour is the same if I specificy a "not parameterized" marker (for example externalGraphic: "./js/openlayers/img/marker-ABC.png"). What's wrong? Anyone can help me? Thanks Mario Danelli _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users From rkluge50 at web.de Sat Dec 1 09:01:20 2012 From: rkluge50 at web.de (Rainer Kluge) Date: Sat, 01 Dec 2012 18:01:20 +0100 Subject: [OpenLayers-Users] How to set zoom level dynamically? Message-ID: Hello, I want to display a map with two different zoom levels, 3 zoom levels for the whole map extend and 6 levels for a detailed section in the center of the extent. I do this with a zoomend event handler, in which I set restrictedExtend to the detail area when the user zooms to level 4. map.events.register('zoomend', this, function (event) { var zLevel = map.getZoom(); if( restricted && zLevel < detailZoom) { restricted = false; map.setOptions({restrictedExtent: fullExtent}); } if( !restricted && zLevel == detailZoom){ restricted = true; map.setOptions({restrictedExtent: detailExtend}); } }); This works fine but makes the map 'jump' to the detail area when the user zooms in while the mouse is outside the detailed area. Therefore I am looking for a way to disable zooming in while the cursor is outside the detail area. I know how to track the mouse position, but did not find a way to limit the minimum zoom level dynamically. Any hints are welcome. Rainer From mario.danelli at gmail.com Sat Dec 1 13:11:52 2012 From: mario.danelli at gmail.com (Mario Danelli) Date: Sat, 01 Dec 2012 22:11:52 +0100 Subject: [OpenLayers-Users] BBOX Strategy and StyleMap problem In-Reply-To: <40AA7B6708244C37A3AFC82E9A7E48EA@pcawh2> References: <40AA7B6708244C37A3AFC82E9A7E48EA@pcawh2> Message-ID: Dear Arnd, it should but it doesn't work. I don't know why... I implemented a work-around with an ajax call into the moveend event linked to the map eventListeners: { "moveend": mapEventMove, } In "done" ajax case i parsed the text results and used the removeAllFeatures and addFeatures. Thanks Mario Danelli Il 01/12/2012 16:58, Arnd Wippermann ha scritto: > Your problem should be solved with a styleMap like this > > styleMap: new OpenLayers.StyleMap({ > "default": new OpenLayers.Style({ > externalGraphic: "kml_csv_data_layer_marker-${Type}.png", > graphicWidth: 21, > graphicHeight: 25, > graphicXOffset: -11, > graphicYOffset: -25 > }) > }) > > Example: > http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/kml_csv_data_layer/kml_csv_ > data_layer.asp?propertyStyles=true > > Regards, > Arnd > gis.ibbeck.de > > -----Urspr?ngliche Nachricht----- > Von: openlayers-users-bounces at lists.osgeo.org > [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Mario > Danelli > Gesendet: Samstag, 1. Dezember 2012 06:42 > An: openlayers-users at lists.osgeo.org > Betreff: [OpenLayers-Users] BBOX Strategy and StyleMap problem > > Dear all, > > I've a problem trying to apply a custom (different marker pngs following a > specific type) markers when using BBOX Strategy to get features data. > I'm using Openlayers 2.12. > > Below the code > > > var pois = new OpenLayers.Layer.Vector("POIs", { > projection: new > OpenLayers.Projection("EPSG:4326"), > strategies: [new > OpenLayers.Strategy.BBOX({resFactor: 1.1})], > protocol: new OpenLayers.Protocol.HTTP({ > url: "./get_data.php", > format: new OpenLayers.Format.Text() > }), > styleMap: new OpenLayers.StyleMap({ > "default": { > > externalGraphic: "./js/openlayers/img/marker-${type}.png", > > graphicHeight: 20, > > name: "${id}", > id: > "${type}" + "-" + "${id}" > } > }) > > map.addLayer(pois); > pois.setVisibility(true); > > pois.events.on({ > 'featureselected': onFeatureSelect, > 'featureunselected': onFeatureUnselect > }); > > selectControl = new OpenLayers.Control.SelectFeature(pois); > > map.addControl(selectControl); > selectControl.activate(); > > > the "get_data.php" returns data as example below > > id point ref_lat ref_lon name descr type > 2 55.92,14.3 55.92 14.3 Name1 descr1 t1 > 3 56.1,10.2 56.16 10.2 Name2 descr2 t2 > 4 56.13,10.21 56.13 10.21 Name3 descr3 t1 > > > The goal is to have different markers (colours) if the points are of type > "t1" or "t2". But it's nevere selected the correct marker (for > example: marker-t1.png) but every time is selected the default marker.png. > The behaviour is the same if I specificy a "not parameterized" marker (for > example externalGraphic: "./js/openlayers/img/marker-ABC.png"). > > What's wrong? > > Anyone can help me? > > Thanks > > Mario Danelli > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > From osm at tappenbeck.net Sun Dec 2 10:37:29 2012 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Sun, 02 Dec 2012 19:37:29 +0100 Subject: [OpenLayers-Users] Problem to show ways in vectorlayers (mobile) Message-ID: <50BB9FE9.3090602@tappenbeck.net> hi ! i want to show way-elements (data by overpass) and define by vectorlayer. here the link: http://www.tappenbeck.net/osm/maps/deu/mobile2012.php?id=9512#mappage first you had to add the layerswitch (top-left) and move the map little. left-top of the roundabout is a park with dark way-lines (on a pc). but my problem is that the ways will not show on mobile device (htc desire - android-browser). the sourc you can find at http://www.tappenbeck.net/osm/maps/js/hms_002_overpass.js did anyone have a idea why will not show and a alternative ?? regards Jan :-) From 945070223 at qq.com Sun Dec 2 18:11:29 2012 From: 945070223 at qq.com (OpenGSC) Date: Sun, 2 Dec 2012 18:11:29 -0800 (PST) Subject: [OpenLayers-Users] Retrieving label width In-Reply-To: <1354269008859-5019813.post@n6.nabble.com> References: <1354269008859-5019813.post@n6.nabble.com> Message-ID: <1354500689673-5020217.post@n6.nabble.com> I think you cann't do it by OL.because the label width determind by your string length. but you can do it by yourself,the relationship about pixels and resolution or scale you ought to konw ! how to calculate is very easy! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Retrieving-label-width-tp5019813p5020217.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From 945070223 at qq.com Sun Dec 2 18:14:05 2012 From: 945070223 at qq.com (OpenGSC) Date: Sun, 2 Dec 2012 18:14:05 -0800 (PST) Subject: [OpenLayers-Users] Can not Extract KML Attribute In-Reply-To: <3f5stj7.2ed8928fe8ad2dbac2e21bf2ef9ebba3@webmail.geodesign.com.br> References: <3f5stj7.2ed8928fe8ad2dbac2e21bf2ef9ebba3@webmail.geodesign.com.br> Message-ID: <1354500845771-5020219.post@n6.nabble.com> ok,you can do it like this! var vector_style = new OpenLayers.Style({ 'fillColor': "#ffffff", 'fillOpacity': 0.5, 'strokeWidth': 1, 'strokeColor': "#0000ff", 'strokeOpacity': 4, 'label': '${state}', 'fontColor': "#ffffff", 'fontFamily': "sans-serif", 'fontSize': "15px", 'fontWeight': "bold" }, { context: { state: function(feature){ return feature.attributes.State.value; } }}); var vector_style_map = new OpenLayers.StyleMap({ 'default': vector_style }); var vectorlayer = new OpenLayers.Layer.Vector("ESTADO DA BAHIA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_uf_900913a.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), styleMap:vector_style_map }); you ought to use context which can fetch the attribute value from KML's feature! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Can-not-Extract-KML-Attribute-tp5019859p5020219.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From 945070223 at qq.com Sun Dec 2 18:25:18 2012 From: 945070223 at qq.com (OpenGSC) Date: Sun, 2 Dec 2012 18:25:18 -0800 (PST) Subject: [OpenLayers-Users] How to set zoom level dynamically? In-Reply-To: References: Message-ID: <1354501518030-5020220.post@n6.nabble.com> add event zoomstart on map,if the mouse position does'n on your detail area,return, otherwise continue; OGCer V1.0 owner! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-set-zoom-level-dynamically-tp5020089p5020220.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dretpams2005 at yahoo.com Sun Dec 2 18:38:37 2012 From: dretpams2005 at yahoo.com (drate pamella) Date: Sun, 2 Dec 2012 18:38:37 -0800 (PST) Subject: [OpenLayers-Users] editing icons not showing In-Reply-To: References: Message-ID: <1354502317.4242.YahooMailNeo@web121401.mail.ne1.yahoo.com> Dear all ?Iam developing an application using Geoserver 2.2, Openlayers 2.12 and Postgresql. I have been following the tutorial at:?http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html. I have managed to display my vector data and I can see the save icon but not the modify, pan editing and the others. If i hover over their supposed locations, i can read their (pan, modify etc) titles and even pick and use them but i can't see the icons. I tried to download the openlayers stable release and placed the theme/default/img folder in the root directory of the Geoserver but i still get no response. am using windows 7. I think the problem is with the path but i can't still figure it out. when i debug, the error that i get is the 404 not found, cant connect to localhost:8080/theme/default/img/editing tool bar.pgn. this goes for all the icons that am trying to upload. I would also like to know how i can add multiple layers(wfs) in the application through the geoserver. please help me, i have been trying this for weeks now. thanks ________________________________ From: "openlayers-users-request at lists.osgeo.org" To: dretpams2005 at yahoo.com Sent: Monday, December 3, 2012 5:29 AM Subject: Welcome to the "Users" mailing list Welcome to the Users at lists.osgeo.org mailing list! To post to this list, send your email to: ? openlayers-users at lists.osgeo.org General information about the mailing list is at: ? http://lists.osgeo.org/mailman/listinfo/openlayers-users If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at: ? http://lists.osgeo.org/mailman/options/openlayers-users/dretpams2005%40yahoo.com You can also make such adjustments via email by sending a message to: ? Users-request at lists.osgeo.org with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions. You must know your password to change your options (including changing the password, itself) or to unsubscribe.? It is: ? search27 Normally, Mailman will remind you of your lists.osgeo.org mailing list passwords once every month, although you can disable this if you prefer.? This reminder will also include instructions on how to unsubscribe or change your account options.? There is also a button on your options page that will email your current password to you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.scadden at gns.cri.nz Sun Dec 2 19:27:49 2012 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Mon, 03 Dec 2012 16:27:49 +1300 Subject: [OpenLayers-Users] editing icons not showing In-Reply-To: <1354502317.4242.YahooMailNeo@web121401.mail.ne1.yahoo.com> References: <1354502317.4242.YahooMailNeo@web121401.mail.ne1.yahoo.com> Message-ID: <50BC1C35.7060001@gns.cri.nz> > Iam developing an application using Geoserver 2.2, Openlayers 2.12 > and Postgresql. I have been following the tutorial > at:http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html. This is blacklisted on our system as an attack site. " *What happened when Google visited this site?* Of the 135 pages we tested on the site over the past 90 days, 33 page(s) resulted in malicious software being downloaded and installed without user consent. The last time Google visited this site was on 2012-12-02, and the last time suspicious content was found on this site was on 2012-12-02." >I tried to download the openlayers stable release and placed the theme/default/img folder in the root directory of the Geoserver but i still get >no response. am using windows 7. I think the problem is with the path but i can't still figure it out. It looks to me like you are having problems getting the web server configuration sorted. You fundamentally need to have a good handle on the basics of web applications. I use Apache and Apache Tomcat but basics should be the same for jetty etc, though 8080 suggests tomcat. Your server layout has a web apps root. (by default webapps in tomcat). You should have your application in a separate directory to geoserver. I usually put openlayers in another. webapp/geoserver /Openlayers /myapp /geoserver_data Under myapp, you put the things like theme, images etc. Keep clear of geoserver and move geoserver_data to point to a directory outside geoserver. This lets you update geoserver at will without disturbing other applications nor the data. You will need to setup the context path to openlayers. Alternatively put OpenLayers in subdir of myapp. Make sure you have a proxy!!! (dont try to fight it). Try https://github.com/terrestris/JSP-Whitelist-Proxy for a jsp and edit to match your system. > I would also like to know how i can add multiple layers(wfs) in the > application through the geoserver. This is just the OpenLayers.addLayers() call. However, unless you layers have trivial amounts of data, you are best to add layers as WMS and query them with WFS. (see http://openlayers.org/dev/examples/getfeature-wfs.html for starters). Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkluge50 at web.de Sun Dec 2 22:04:26 2012 From: rkluge50 at web.de (Rainer Kluge) Date: Mon, 03 Dec 2012 07:04:26 +0100 Subject: [OpenLayers-Users] How to set zoom level dynamically? In-Reply-To: <1354501518030-5020220.post@n6.nabble.com> References: <1354501518030-5020220.post@n6.nabble.com> Message-ID: 03/12/2012 03:25 OpenGSC: > add event zoomstart on map, i suppose you mean movestart > if the mouse position does'n on your detail > area,return, "return false" prevents zooming in. > otherwise continue; Thanks for the hint. I tried and it works perfectly. Rainer From slawomir.messner at staff.uni-marburg.de Sun Dec 2 22:16:08 2012 From: slawomir.messner at staff.uni-marburg.de (Slawomir Messner) Date: Mon, 03 Dec 2012 07:16:08 +0100 Subject: [OpenLayers-Users] Retrieving label width In-Reply-To: <1354500689673-5020217.post@n6.nabble.com> References: <1354269008859-5019813.post@n6.nabble.com> <1354500689673-5020217.post@n6.nabble.com> Message-ID: <50BC43A8.7050706@staff.uni-marburg.de> In my opinion, it is the easiest way to do it with a hidden div. It works fine for us and one more div on a website is not that overhead or memory problem if you're aware of not creating divs without destroy it again. The textMetrics function is nice if you use jQuery: http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript Am 03.12.2012 03:11, schrieb OpenGSC: > I think you cann't do it by OL.because the label width determind by your > string length. > but you can do it by yourself,the relationship about pixels and resolution > or scale you ought to konw ! > how to calculate is very easy! > > > > > -- > View this message in context: http://osgeo-org.1560.n6.nabble.com/Retrieving-label-width-tp5019813p5020217.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- -------------------------------------------------- Slawomir Messner Forschungszentrum "Deutscher Sprachatlas" 06421-28-24981 From 945070223 at qq.com Sun Dec 2 22:29:44 2012 From: 945070223 at qq.com (OpenGSC) Date: Sun, 2 Dec 2012 22:29:44 -0800 (PST) Subject: [OpenLayers-Users] editing icons not showing In-Reply-To: <1354502317.4242.YahooMailNeo@web121401.mail.ne1.yahoo.com> References: <1354502317.4242.YahooMailNeo@web121401.mail.ne1.yahoo.com> Message-ID: <1354516184191-5020240.post@n6.nabble.com> you ought to learn the article about OL and geoserver.generally speaking ,one is the map server,one is the client api. you must config right on client for the layers which published by geoserver ,especially the extent and projection.about multiLayers you can make a layer group on geoserver. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/editing-icons-not-showing-tp5020222p5020240.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From 945070223 at qq.com Sun Dec 2 22:31:30 2012 From: 945070223 at qq.com (OpenGSC) Date: Sun, 2 Dec 2012 22:31:30 -0800 (PST) Subject: [OpenLayers-Users] editing icons not showing In-Reply-To: <1354502317.4242.YahooMailNeo@web121401.mail.ne1.yahoo.com> References: <1354502317.4242.YahooMailNeo@web121401.mail.ne1.yahoo.com> Message-ID: <1354516290005-5020243.post@n6.nabble.com> you ought to learn the article about OL and geoserver.generally speaking ,one is the map server,one is the client api. you must config right on client for the layers which published by geoserver ,especially the extent and projection.about multiLayers you can make a layer group on geoserver. I am OGCer v1.0 owner! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/editing-icons-not-showing-tp5020222p5020243.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From nuno.magalhaes at inov.pt Mon Dec 3 01:39:55 2012 From: nuno.magalhaes at inov.pt (=?UTF-8?Q?Nuno_Magalh=C3=A3es?=) Date: Mon, 3 Dec 2012 01:39:55 -0800 (PST) Subject: [OpenLayers-Users] Retrieving label width In-Reply-To: <50BC43A8.7050706@staff.uni-marburg.de> References: <1354269008859-5019813.post@n6.nabble.com> <1354500689673-5020217.post@n6.nabble.com> <50BC43A8.7050706@staff.uni-marburg.de> Message-ID: <1354527595404-5020289.post@n6.nabble.com> Hi Slawomir, I'm using something similar to measureText function but the result width is always shorter than the label. Slawomir Messner wrote > In my opinion, it is the easiest way to do it with a hidden div. It > works fine for us and one more div on a website is not that overhead or > memory problem if you're aware of not creating divs without destroy it > again. > The textMetrics function is nice if you use jQuery: > http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript > > Am 03.12.2012 03:11, schrieb OpenGSC: >> I think you cann't do it by OL.because the label width determind by your >> string length. >> but you can do it by yourself,the relationship about pixels and >> resolution >> or scale you ought to konw ! >> how to calculate is very easy! >> >> >> >> >> -- >> View this message in context: >> http://osgeo-org.1560.n6.nabble.com/Retrieving-label-width-tp5019813p5020217.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> > Users at .osgeo >> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> > > > -- > -------------------------------------------------- > Slawomir Messner > Forschungszentrum "Deutscher Sprachatlas" > 06421-28-24981 > > _______________________________________________ > Users mailing list > Users at .osgeo > http://lists.osgeo.org/mailman/listinfo/openlayers-users -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Retrieving-label-width-tp5019813p5020289.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From derek at cmainfo.co.za Mon Dec 3 02:07:42 2012 From: derek at cmainfo.co.za (Derek Watling) Date: Mon, 3 Dec 2012 02:07:42 -0800 (PST) Subject: [OpenLayers-Users] Touch navigation implementation Message-ID: <1354529262303-5020294.post@n6.nabble.com> I am in the process of updating to OL 2.12 and Google v3 (previously used OL 2.10, Google v2). While I have sorted most of the issues I am a bit confused as to implementing touch navigation. I am testing on various desktop browsers as well as an iPad and an Andriod tablet. Is there any device detection? Which navigation control should be included if you don't know what device the web site is being viewed on? Currently I have the following code: map.addControl(new OpenLayers.Control.Navigation({ dragPanOptions: { enableKinetic: true } })); map.addControl(new OpenLayers.Control.TouchNavigation({ dragPanOptions: { enableKinetic: true } })); The one issue I do still have is with the Measure control. On both iPad and Andriod when measuring, each "click" to add a point also activates the map's Click control. How do I stop this happening? -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Touch-navigation-implementation-tp5020294.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From richardjnz at yahoo.com Mon Dec 3 04:17:09 2012 From: richardjnz at yahoo.com (Richard Jones) Date: Mon, 3 Dec 2012 12:17:09 +0000 (GMT) Subject: [OpenLayers-Users] Click to get nearest point on track In-Reply-To: Message-ID: <1354537029.67894.YahooMailClassic@web29706.mail.ird.yahoo.com> Thanks for the tips - much appreciated. :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at spatially-oriented.com Mon Dec 3 07:19:45 2012 From: info at spatially-oriented.com (Casper Span) Date: Mon, 3 Dec 2012 16:19:45 +0100 Subject: [OpenLayers-Users] Mouseout event on IE Message-ID: Hi List, I have a small Internet Explorer issue, I hope somebody has dealt with this before, as I'm not able to fix it myself apearantly... I have a Markers layer. If you hover over a marker, it get's highlighted. (or: replaced by a different marker) When the mouse stops hovering, it should pop back to original state. m is the current marker: m.events.register("mouseover", obj, this.HoverMarker); m.events.register("mouseout", obj, this.UnHoverMarker); This works fine on Firefox, but on Chrome and IE, only the mouseover works. When I stop hovering on the image, it never returns to it's starting state. When on Firefox, this works fine. I tried using JQuery as well, but I don't know the element id at this point in time. Is there anyone who got this working on IE/Chrome? Regards, Casper Span -- Casper Span T: @Span_Droid W: http://www.spatially-oriented.com M: info at spatially-oriented.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnd.wippermann at web.de Mon Dec 3 13:02:11 2012 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Mon, 3 Dec 2012 22:02:11 +0100 Subject: [OpenLayers-Users] BBOX Strategy and StyleMap problem In-Reply-To: References: <40AA7B6708244C37A3AFC82E9A7E48EA@pcawh2> Message-ID: Hi Mario, I don't no why, but for the KML-Layer the propertyStyles:{externalGraphic:true} have to be set. For the Text-Layer it isn't needed. I have updated my example to show the difference between the two formats. Regard, Arnd -----Urspr?ngliche Nachricht----- Von: openlayers-users-bounces at lists.osgeo.org [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Mario Danelli Gesendet: Samstag, 1. Dezember 2012 22:12 An: openlayers-users at lists.osgeo.org Betreff: Re: [OpenLayers-Users] BBOX Strategy and StyleMap problem Dear Arnd, it should but it doesn't work. I don't know why... I implemented a work-around with an ajax call into the moveend event linked to the map eventListeners: { "moveend": mapEventMove, } In "done" ajax case i parsed the text results and used the removeAllFeatures and addFeatures. Thanks Mario Danelli Il 01/12/2012 16:58, Arnd Wippermann ha scritto: > Your problem should be solved with a styleMap like this > > styleMap: new OpenLayers.StyleMap({ > "default": new OpenLayers.Style({ > externalGraphic: "kml_csv_data_layer_marker-${Type}.png", > graphicWidth: 21, > graphicHeight: 25, > graphicXOffset: -11, > graphicYOffset: -25 > }) > }) > > Example: > http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/kml_csv_data_layer/km > l_csv_ > data_layer.asp?propertyStyles=true > > Regards, > Arnd > gis.ibbeck.de > > -----Urspr?ngliche Nachricht----- > Von: openlayers-users-bounces at lists.osgeo.org > [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Mario > Danelli > Gesendet: Samstag, 1. Dezember 2012 06:42 > An: openlayers-users at lists.osgeo.org > Betreff: [OpenLayers-Users] BBOX Strategy and StyleMap problem > > Dear all, > > I've a problem trying to apply a custom (different marker pngs > following a specific type) markers when using BBOX Strategy to get features data. > I'm using Openlayers 2.12. > > Below the code > > > var pois = new OpenLayers.Layer.Vector("POIs", { > projection: new > OpenLayers.Projection("EPSG:4326"), > strategies: [new > OpenLayers.Strategy.BBOX({resFactor: 1.1})], > protocol: new OpenLayers.Protocol.HTTP({ > url: "./get_data.php", > format: new OpenLayers.Format.Text() > }), > styleMap: new OpenLayers.StyleMap({ > "default": { > > externalGraphic: "./js/openlayers/img/marker-${type}.png", > > graphicHeight: 20, > > name: "${id}", > id: > "${type}" + "-" + "${id}" > } > }) > > map.addLayer(pois); > pois.setVisibility(true); > > pois.events.on({ > 'featureselected': onFeatureSelect, > 'featureunselected': onFeatureUnselect > }); > > selectControl = new OpenLayers.Control.SelectFeature(pois); > > map.addControl(selectControl); > selectControl.activate(); > > > the "get_data.php" returns data as example below > > id point ref_lat ref_lon name descr type > 2 55.92,14.3 55.92 14.3 Name1 descr1 t1 > 3 56.1,10.2 56.16 10.2 Name2 descr2 t2 > 4 56.13,10.21 56.13 10.21 Name3 descr3 t1 > > > The goal is to have different markers (colours) if the points are of > type "t1" or "t2". But it's nevere selected the correct marker (for > example: marker-t1.png) but every time is selected the default marker.png. > The behaviour is the same if I specificy a "not parameterized" marker > (for example externalGraphic: "./js/openlayers/img/marker-ABC.png"). > > What's wrong? > > Anyone can help me? > > Thanks > > Mario Danelli > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users From manuel at trackair.com Tue Dec 4 13:09:26 2012 From: manuel at trackair.com (Manuel Arredondo) Date: Tue, 4 Dec 2012 21:09:26 -0000 Subject: [OpenLayers-Users] Load monitoring multiple layers Message-ID: I have multiple WMS layers on an OpenStreetMap base layer. I want to be able to know when there are no more map requests being done by any layer. I have used the OL example to monitor layers as shown below. Do I have to monitor each layer separately and give them a boolean to switch to true when their ?loadend? event is triggered? or is there an API call I can use which monitors all the events as a whole? The map event doesn?t have a ?loadend? event type. function registerEvents(layer) { layer.events.register("loadend", layer, function() { this.logEvent("Ready"); baseTilesLoaded = true; }); map.addLayer(layer); } Best Regards, Manuel Arredondo. -------------- next part -------------- An HTML attachment was scrubbed... URL: From woodbri at swoodbridge.com Mon Dec 3 13:36:00 2012 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Mon, 03 Dec 2012 16:36:00 -0500 Subject: [OpenLayers-Users] Updated Google Maps API and 3D Message-ID: <50BD1B40.8000600@swoodbridge.com> Hi All, Sorry for the cross posting. The following article which is thin on details raise some interesting questions in my mind related to Mapserver and OpenLayers. http://www.zdnet.com/google-dives-deeper-on-vector-based-maps-with-api-update-7000008233/?s_cid=e550 I know OpenLayers 3 is looking at potentially adding camera model to support tilted views. Would this be a static definition to support tiling? Or would the camera be able to be dynamically changed? This seems a lot like Google Street View. Has any thought been given to support for 2.5D or 3D features? Is there a need for this? If mapserver supported rendering orthogonal views or even a camera view model them a guess a layer could be defined to pass that information to mapserver to render in the same. Mapserver devs - there was some discussion about supporting 2.5D objections like buildings. In light of Google and Apple moving in these directions is this an area that we should be discussing for a future version. Should be be looking at a more flexible viewing model like a camera model as an option. It looks like the OGC is working on this also, google "ogc web 3d service". Seems like these questions should be discussed if they are not already being discussed. Thanks, -Steve From tom.payne at camptocamp.com Tue Dec 4 06:00:27 2012 From: tom.payne at camptocamp.com (Tom Payne) Date: Tue, 4 Dec 2012 15:00:27 +0100 Subject: [OpenLayers-Users] [mapserver-dev] Updated Google Maps API and 3D In-Reply-To: <50BD1B40.8000600@swoodbridge.com> References: <50BD1B40.8000600@swoodbridge.com> Message-ID: Hi Stephen, On 3 December 2012 22:36, Stephen Woodbridge wrote: > Sorry for the cross posting. The following article which is thin on details > raise some interesting questions in my mind related to Mapserver and > OpenLayers. > > http://www.zdnet.com/google-dives-deeper-on-vector-based-maps-with-api-update-7000008233/?s_cid=e550 > > I know OpenLayers 3 is looking at potentially adding camera model to support > tilted views. Would this be a static definition to support tiling? Or would > the camera be able to be dynamically changed? This seems a lot like Google > Street View. > > Has any thought been given to support for 2.5D or 3D features? Is there a > need for this? Yes, supporting 2.5D and 3D features is part of what we're working on for OpenLayers 3 at Camptocamp. Note that StreetView is quite different technology, it's closer to the skyboxes used to provide backgrounds in computer graphics. > If mapserver supported rendering orthogonal views or even a camera view > model them a guess a layer could be defined to pass that information to > mapserver to render in the same. > > Mapserver devs - there was some discussion about supporting 2.5D objections > like buildings. In light of Google and Apple moving in these directions is > this an area that we should be discussing for a future version. Should be be > looking at a more flexible viewing model like a camera model as an option. Note that it's incredibly inefficient to re-generate all the tiles on the server whenever the camera position changes on the client. Instead, (almost) all systems work by sending normal tiles to the client and then having the client project them. > It looks like the OGC is working on this also, google "ogc web 3d service". My understanding from following the OGC discussions is that they were more focused on visualizing CityGML data. > Seems like these questions should be discussed if they are not already being > discussed. They are already being discussed (and implementation has started) for ol3 at Camptocamp. Regards, Tom -- Camptocamp SA Tom PAYNE PSE A CH-1015 Lausanne +41 21 619 10 13 (direct) +41 21 619 10 10 (centrale) +41 21 619 10 00 (fax) From woodbri at swoodbridge.com Mon Dec 3 17:11:36 2012 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Mon, 03 Dec 2012 20:11:36 -0500 Subject: [OpenLayers-Users] Updated Google Maps API and 3D In-Reply-To: References: <50BD1B40.8000600@swoodbridge.com> Message-ID: <50BD4DC8.9000905@swoodbridge.com> Hi Andreas, I created a ticket: https://github.com/openlayers/ol3/issues/89 please feel free to add to it as appropriate. I can think of a couple of use cases that this might come in handy for: 1. one is the obvious one of something like Street View 2. another is being able to do a walk through or fly through the environment. This could be done via user controls like look right, left, up, down and move forward, backwards, right left. Or it could be done by creating a path or route through the scene and then flying the camera along the path. This might be a sequence of points in space where each point has attributes for the camera, like azimuth, elevation, camera angle, etc. Thanks, -Steve On 12/3/2012 5:53 PM, Andreas Hocevar wrote: > Hey Steven, > > the purpose of adding camera and scene support to OpenLayers 3 is indeed > 2.5D views for use cases like tilting and street views. The idea is to > tilt 2D tiles and combine them with an elevation model or other > height/elevation information that is associated with the tiles. But we > will also be working on 3D vector rendering, in which case the 3D > information is used directly from the geometries, and all rendering is > done on the client. > > It seems the use case that you are envisioning is to request tilted > tiles from the server, i.e. to send requests for new tiles whenever the > camera properties change, which will then get rendered on the server and > returned to the client? Is this correct? If so, let's make sure it gets > ticketed on http://github.com/openlayers/ol3, so it won't be forgotten. > > Andreas. > > > On Mon, Dec 3, 2012 at 10:36 PM, Stephen Woodbridge > > wrote: > > Hi All, > > Sorry for the cross posting. The following article which is thin on > details raise some interesting questions in my mind related to > Mapserver and OpenLayers. > > http://www.zdnet.com/google-__dives-deeper-on-vector-based-__maps-with-api-update-__7000008233/?s_cid=e550 > > > I know OpenLayers 3 is looking at potentially adding camera model to > support tilted views. Would this be a static definition to support > tiling? Or would the camera be able to be dynamically changed? This > seems a lot like Google Street View. > > Has any thought been given to support for 2.5D or 3D features? Is > there a need for this? > > If mapserver supported rendering orthogonal views or even a camera > view model them a guess a layer could be defined to pass that > information to mapserver to render in the same. > > Mapserver devs - there was some discussion about supporting 2.5D > objections like buildings. In light of Google and Apple moving in > these directions is this an area that we should be discussing for a > future version. Should be be looking at a more flexible viewing > model like a camera model as an option. > > It looks like the OGC is working on this also, google "ogc web 3d > service". > > Seems like these questions should be discussed if they are not > already being discussed. > > Thanks, > -Steve From ahocevar at opengeo.org Mon Dec 3 14:53:09 2012 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Mon, 3 Dec 2012 23:53:09 +0100 Subject: [OpenLayers-Users] Updated Google Maps API and 3D In-Reply-To: <50BD1B40.8000600@swoodbridge.com> References: <50BD1B40.8000600@swoodbridge.com> Message-ID: Hey Steven, the purpose of adding camera and scene support to OpenLayers 3 is indeed 2.5D views for use cases like tilting and street views. The idea is to tilt 2D tiles and combine them with an elevation model or other height/elevation information that is associated with the tiles. But we will also be working on 3D vector rendering, in which case the 3D information is used directly from the geometries, and all rendering is done on the client. It seems the use case that you are envisioning is to request tilted tiles from the server, i.e. to send requests for new tiles whenever the camera properties change, which will then get rendered on the server and returned to the client? Is this correct? If so, let's make sure it gets ticketed on http://github.com/openlayers/ol3, so it won't be forgotten. Andreas. On Mon, Dec 3, 2012 at 10:36 PM, Stephen Woodbridge wrote: > Hi All, > > Sorry for the cross posting. The following article which is thin on > details raise some interesting questions in my mind related to Mapserver > and OpenLayers. > > http://www.zdnet.com/google-**dives-deeper-on-vector-based-** > maps-with-api-update-**7000008233/?s_cid=e550 > > I know OpenLayers 3 is looking at potentially adding camera model to > support tilted views. Would this be a static definition to support tiling? > Or would the camera be able to be dynamically changed? This seems a lot > like Google Street View. > > Has any thought been given to support for 2.5D or 3D features? Is there a > need for this? > > If mapserver supported rendering orthogonal views or even a camera view > model them a guess a layer could be defined to pass that information to > mapserver to render in the same. > > Mapserver devs - there was some discussion about supporting 2.5D > objections like buildings. In light of Google and Apple moving in these > directions is this an area that we should be discussing for a future > version. Should be be looking at a more flexible viewing model like a > camera model as an option. > > It looks like the OGC is working on this also, google "ogc web 3d service". > > Seems like these questions should be discussed if they are not already > being discussed. > > Thanks, > -Steve > ______________________________**_________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/**mailman/listinfo/openlayers-**users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhuhuazha2004 at yahoo.com.cn Mon Dec 3 17:20:27 2012 From: zhuhuazha2004 at yahoo.com.cn (zhuhua zha) Date: Tue, 4 Dec 2012 09:20:27 +0800 (CST) Subject: [OpenLayers-Users] (no subject) Message-ID: <1354584027.9157.YahooMailNeo@web15205.mail.cnb.yahoo.com> http://fashionusaonlineshop.net/wp-content/themes/twentyeleven/google.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From reinaldo at geodesign.com.br Tue Dec 4 02:50:13 2012 From: reinaldo at geodesign.com.br (reinaldo at geodesign.com.br) Date: Tue, 4 Dec 2012 08:50:13 -0200 (BRST) Subject: [OpenLayers-Users] Can not Get Rule-based Styling to Work Message-ID: <1bvkptm.f845bd00ebf18e5866b84f5c0648d8c2@webmail.geodesign.com.br> OL Users, I am now trying to do rule-based styling, but am not getting anywhere. Can some one help? I would like to apply styling base on rules, such as the examples: var map = new OpenLayers.Map("map"); var vector_style = new OpenLayers.Style(); var ruleLow = new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison (http://OpenLayers.Filter.Comparison)({ type: OpenLayers.Filter.Comparison.LESS_THAN, (http://OpenLayers.Filter.Comparison.LESS_THAN,) property: "SUMMER", value = 2000.0 }), symbolizer: { strokeColor: "#ff0000", strokeWidth: 1, fillColor: "#ff0000" } }); var ruleHigh = new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison (http://OpenLayers.Filter.Comparison)({ type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, (http://OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,) property: "SUMMER", value = 2000.0 }), symbolizer: { strokeColor: "#ff0000", strokeWidth: 1, fillColor: "#ff0000" } }); vector_style.addRules([ruleLow, ruleHigh]); var vectorlayer = new OpenLayers.Layer.Vector("SOLAR RAD BA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_diffuse_summer.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), styleMap: vector_style }); var googleLayer = new OpenLayers.Layer.Google("Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} ); map.addLayers([googleLayer, vectorlayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); I have a KML file with the following attributes for the features (placemarks): ff0000ff 0 cel_41355 -39.33 -8.514 2354.6590 3722.106 2457.454 2300.018 1856.493 1874.805 1766.843 2075.472 2165.046 2079.367 2044.279 2210.000 2242.269 2128.142 2864.096 2002.744 1974.092 -39.374898840000021,-8.532500220000012 -39.368901960000017,-8.53460298000002 -39.361320000000006,-8.539000020000019 -39.357873000000019,-8.542680029999996 -39.356818920000016,-8.546292000000021 -39.352569839999994,-8.549219969999998 -39.345095880000024,-8.55734202 -39.342219480000033,-8.558644590000013 -39.373840080000008,-8.559807030000023 -39.374898840000021,-8.532500220000012-39.328748280000021,-8.558149410000008 -39.339051840000003,-8.558528130000013 -39.331622880000026,-8.557507980000004 -39.328748280000021,-8.558149410000008-39.311822160000034,-8.557527150000002 -39.311876160000018,-8.557529130000008 -39.311844840000013,-8.55752202 -39.311822160000034,-8.557527150000002 Tanks a lot. Reinaldo ------------------------------------ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br (http://www.geodesign.com.br) Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahocevar at opengeo.org Tue Dec 4 00:36:38 2012 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Tue, 4 Dec 2012 09:36:38 +0100 Subject: [OpenLayers-Users] Updated Google Maps API and 3D In-Reply-To: <50BD4DC8.9000905@swoodbridge.com> References: <50BD1B40.8000600@swoodbridge.com> <50BD4DC8.9000905@swoodbridge.com> Message-ID: Hey Steven, thanks for creating the ticket - the title is perfect. Andreas. On Tue, Dec 4, 2012 at 2:11 AM, Stephen Woodbridge wrote: > Hi Andreas, > > I created a ticket: > https://github.com/openlayers/**ol3/issues/89 > please feel free to add to it as appropriate. > > I can think of a couple of use cases that this might come in handy for: > > 1. one is the obvious one of something like Street View > 2. another is being able to do a walk through or fly through the > environment. This could be done via user controls like look right, left, > up, down and move forward, backwards, right left. Or it could be done by > creating a path or route through the scene and then flying the camera along > the path. This might be a sequence of points in space where each point has > attributes for the camera, like azimuth, elevation, camera angle, etc. > > Thanks, > -Steve > > On 12/3/2012 5:53 PM, Andreas Hocevar wrote: > >> Hey Steven, >> >> the purpose of adding camera and scene support to OpenLayers 3 is indeed >> 2.5D views for use cases like tilting and street views. The idea is to >> tilt 2D tiles and combine them with an elevation model or other >> height/elevation information that is associated with the tiles. But we >> will also be working on 3D vector rendering, in which case the 3D >> information is used directly from the geometries, and all rendering is >> done on the client. >> >> It seems the use case that you are envisioning is to request tilted >> tiles from the server, i.e. to send requests for new tiles whenever the >> camera properties change, which will then get rendered on the server and >> returned to the client? Is this correct? If so, let's make sure it gets >> ticketed on http://github.com/openlayers/**ol3, >> so it won't be forgotten. >> >> Andreas. >> >> >> On Mon, Dec 3, 2012 at 10:36 PM, Stephen Woodbridge >> >> >> wrote: >> >> Hi All, >> >> Sorry for the cross posting. The following article which is thin on >> details raise some interesting questions in my mind related to >> Mapserver and OpenLayers. >> >> http://www.zdnet.com/google-__**dives-deeper-on-vector-based-_** >> _maps-with-api-update-__**7000008233/?s_cid=e550 >> > maps-with-api-update-**7000008233/?s_cid=e550 >> > >> >> I know OpenLayers 3 is looking at potentially adding camera model to >> support tilted views. Would this be a static definition to support >> tiling? Or would the camera be able to be dynamically changed? This >> seems a lot like Google Street View. >> >> Has any thought been given to support for 2.5D or 3D features? Is >> there a need for this? >> >> If mapserver supported rendering orthogonal views or even a camera >> view model them a guess a layer could be defined to pass that >> information to mapserver to render in the same. >> >> Mapserver devs - there was some discussion about supporting 2.5D >> objections like buildings. In light of Google and Apple moving in >> these directions is this an area that we should be discussing for a >> future version. Should be be looking at a more flexible viewing >> model like a camera model as an option. >> >> It looks like the OGC is working on this also, google "ogc web 3d >> service". >> >> Seems like these questions should be discussed if they are not >> already being discussed. >> >> Thanks, >> -Steve >> > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Mon Dec 3 23:53:51 2012 From: 945070223 at qq.com (OpenGSC) Date: Mon, 3 Dec 2012 23:53:51 -0800 (PST) Subject: [OpenLayers-Users] Load monitoring multiple layers In-Reply-To: References: Message-ID: <1354607631764-5020496.post@n6.nabble.com> I think you can use map's addlayer event to realize Your thoughts! I am OGCer V1.0 owner! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Load-monitoring-multiple-layers-tp5020471p5020496.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From 945070223 at qq.com Mon Dec 3 23:44:28 2012 From: 945070223 at qq.com (OpenGSC) Date: Mon, 3 Dec 2012 23:44:28 -0800 (PST) Subject: [OpenLayers-Users] Mouseout event on IE In-Reply-To: References: Message-ID: <1354607068460-5020494.post@n6.nabble.com> m.events.register("mouseover", m, HoverMarker); m.events.register("mouseout", m, UnHoverMarker); you can try the above code ! debug it by firebug! I am OGCer V1.0 owner! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Mouseout-event-on-IE-tp5020390p5020494.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From woodbri at swoodbridge.com Tue Dec 4 07:44:37 2012 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Tue, 04 Dec 2012 10:44:37 -0500 Subject: [OpenLayers-Users] [mapserver-dev] Updated Google Maps API and 3D In-Reply-To: References: <50BD1B40.8000600@swoodbridge.com> Message-ID: <50BE1A65.6040900@swoodbridge.com> On 12/4/2012 9:00 AM, Tom Payne wrote: > Hi Stephen, > > On 3 December 2012 22:36, Stephen Woodbridge wrote: >> Sorry for the cross posting. The following article which is thin on details >> raise some interesting questions in my mind related to Mapserver and >> OpenLayers. >> >> http://www.zdnet.com/google-dives-deeper-on-vector-based-maps-with-api-update-7000008233/?s_cid=e550 >> >> I know OpenLayers 3 is looking at potentially adding camera model to support >> tilted views. Would this be a static definition to support tiling? Or would >> the camera be able to be dynamically changed? This seems a lot like Google >> Street View. >> >> Has any thought been given to support for 2.5D or 3D features? Is there a >> need for this? > > Yes, supporting 2.5D and 3D features is part of what we're working on > for OpenLayers 3 at Camptocamp. I thought I remembered this form the OL3 post a while back. > Note that StreetView is quite different technology, it's closer to the > skyboxes used to provide backgrounds in computer graphics. Right, Google uses Flash to stitch together the individual images and to navigate through them. And I imagine there is a lot of pre-processing to organize them all. >> If mapserver supported rendering orthogonal views or even a camera view >> model them a guess a layer could be defined to pass that information to >> mapserver to render in the same. >> >> Mapserver devs - there was some discussion about supporting 2.5D objections >> like buildings. In light of Google and Apple moving in these directions is >> this an area that we should be discussing for a future version. Should be be >> looking at a more flexible viewing model like a camera model as an option. > > Note that it's incredibly inefficient to re-generate all the tiles on > the server whenever the camera position changes on the client. > Instead, (almost) all systems work by sending normal tiles to the > client and then having the client project them. Right, I do not think this is viable to generate tiles for a movable camera. It probably makes more sense to just generate singleTile images of the view in question and you comment in the ticket this is already possible in OL3 if a server had support for defining a camera. >> It looks like the OGC is working on this also, google "ogc web 3d service". > > My understanding from following the OGC discussions is that they were > more focused on visualizing CityGML data. I'm not up to speed on this, so I guess I need to do more reading. >> Seems like these questions should be discussed if they are not already being >> discussed. > > They are already being discussed (and implementation has started) for > ol3 at Camptocamp. Good to know. I worked at Computervision Corp for 17+ years, a company that developed computer aided design and drafting systems, and we did a lot of modeling and rendering of surfaces and solid models, so I am aware of the what goes into render such models. That was 15 years ago and computers are much faster these days but even so having support from a GL/OpenGL rendering pipeline really helps performance. That said I'm not sure we have access to it from the browser. Some initial work was done in mapserver to support using an OpenGL renderer to render through a HW graphics board, but I'm not sure if that ever got released or was anything more than an experiment. So all in all, I think more important than the use cases I put out is that I think "we" as a community need to stay on top of the emerging industry trends and it sounds like you are doing that. Thank you for your thoughts and insights. -Steve W > Regards, > Tom > > From gamejihou at hotmail.com Tue Dec 4 00:48:17 2012 From: gamejihou at hotmail.com (Gery) Date: Tue, 4 Dec 2012 00:48:17 -0800 (PST) Subject: [OpenLayers-Users] legend "floating" over map In-Reply-To: References: <1354122966874-5019375.post@n6.nabble.com> Message-ID: <1354610897440-5020501.post@n6.nabble.com> Thanks Donald, Alexandre, Sergeant and Mark for the ideas. I think Mark's solution is what I have in mind, Mark could you share an example about using this UpdateLegendControl.js script please? I went through it but I'm confused about how to use it. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/legend-floating-over-map-tp5019001p5020501.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jgolinowski at codematix.de Tue Dec 4 00:27:39 2012 From: jgolinowski at codematix.de (Jana Golinowski) Date: Tue, 04 Dec 2012 09:27:39 +0100 Subject: [OpenLayers-Users] Load monitoring multiple layers In-Reply-To: References: Message-ID: <50BDB3FB.2000506@codematix.de> Hello Manuel, I think you'll have to monitor these layers yourself. I remember having problems using the "moveend" event of the map (at least it didn't fit my needs). But it's quite simple to catch that "all layers are loaded" event. Just declare a global (or semi-global) counter, increase it on each "loadstart" and decrease it on each "loadend". When the counter is back to zero you're done. Applied to your sample code: var layerCounter = 0; function registerEvents(layer) { layer.events.register("loadstart", layer, function() { layerCounter++; }); layer.events.register("loadend", layer, function() { layerCounter--; if (layerCounter == 0) { // now all layers should be loaded } }); } Greeting, Jana. Am 04.12.2012 22:09, schrieb Manuel Arredondo: > I have multiple WMS layers on an OpenStreetMap base layer. I want to be able to > know when there are no more map requests being done by any layer. I have used > the OL example to monitor layers as shown below. > Do I have to monitor each layer separately and give them a boolean to switch to > true when their ?loadend? event is triggered? > or is there an API call I can use which monitors all the events as a whole? > The map event doesn?t have a ?loadend? event type. > function registerEvents(layer) { > layer.events.register("loadend", layer, function() { > this.logEvent("Ready"); > baseTilesLoaded = true; > }); > map.addLayer(layer); > } > Best Regards, > Manuel Arredondo. > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users From pascal2833 at gmail.com Tue Dec 4 09:56:10 2012 From: pascal2833 at gmail.com (pascal) Date: Tue, 4 Dec 2012 09:56:10 -0800 (PST) Subject: [OpenLayers-Users] Show and hide maps with a button in OpenLayers Message-ID: <1354643770870-5020705.post@n6.nabble.com> Hi, I want to show/not show a map in Open Layer by the use of a button (create with JQuery). This is my code (espace_map1 = id create by var map_element1= new OpenLayers.Map("espace_map1") ). // Create button: $('#button_map1').button(); // TOGGLE /BOUTTON 1: var clic_b1= function click_b1(){createmap1();}; var clic2_b1= function click2_b1(){$("#espace_map1").remove();}; $(function toggle_fonct() { $("#boutton_map1").toggle(click_b1,click2_b1); }); // end toogle fonction ? The toogle function works (if click2_b1 = alert(? something ?) ; these lines create the map and then write something and then create the map etc ? ? But in this case, i can't see the map after the click2. I've tried with .hide() (and not remove) but it's the same. How can i solve this problem ? Thanks a lot ! Pascal. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Show-and-hide-maps-with-a-button-in-OpenLayers-tp5020705.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From fernando at globalgeo.com.br Tue Dec 4 10:27:52 2012 From: fernando at globalgeo.com.br (Fernando Norte) Date: Tue, 4 Dec 2012 16:27:52 -0200 Subject: [OpenLayers-Users] Show and hide maps with a button in OpenLayers In-Reply-To: <1354643770870-5020705.post@n6.nabble.com> References: <1354643770870-5020705.post@n6.nabble.com> Message-ID: Hi Pascal, Your solution seems to confused to me. The OpenLayers.Map is applied to an HTML element, a DIV actually. You can create the button in the HTML, instead to create a jQuery function to do so. You can create only the toggle to the click event on this button, to show/hide the DIV that is applied the OL.map(). Give a try on this way, *Fernando Norte* Desenvolvedor SIGWeb tel.(31) 2533.9900 cel.(31) 9119.8814 skype: fernandoglobalgeo Endere?o: Alameda do Ing?, 88, 6? andar, Vale do Sereno Nova Lima/MG - CEP: 34.000-000 www.globalgeo.com.br "O presente documento pode conter material confidencial ou seu sigilo ? protegido por lei. Quaisquer informa??es nele contida s?o destinadas exclusivamente ao(s) seu(s) destinat?rio(s) n?o devendo em nenhuma hip?tese ser repassado a terceiros". 2012/12/4 pascal > Hi, > > I want to show/not show a map in Open Layer by the use of a button (create > with JQuery). > This is my code (espace_map1 = id create by var map_element1= new > OpenLayers.Map("espace_map1") ). > > // Create button: > $('#button_map1').button(); > // TOGGLE /BOUTTON 1: > var clic_b1= function click_b1(){createmap1();}; > var clic2_b1= function click2_b1(){$("#espace_map1").remove();}; > > $(function toggle_fonct() > { > $("#boutton_map1").toggle(click_b1,click2_b1); > }); // end toogle fonction > > ? The toogle function works (if click2_b1 = alert(? something ?) ; > these > lines create the map and then write something and then create the map etc ? > ? But in this case, i can't see the map after the click2. I've tried > with > .hide() (and not remove) but it's the same. > How can i solve this problem ? > Thanks a lot ! > > Pascal. > > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/Show-and-hide-maps-with-a-button-in-OpenLayers-tp5020705.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Tue Dec 4 19:42:25 2012 From: 945070223 at qq.com (OpenGSC) Date: Tue, 4 Dec 2012 19:42:25 -0800 (PST) Subject: [OpenLayers-Users] Show and hide maps with a button in OpenLayers In-Reply-To: <1354643770870-5020705.post@n6.nabble.com> References: <1354643770870-5020705.post@n6.nabble.com> Message-ID: <1354678945235-5020808.post@n6.nabble.com> I think you only remove div ,but doesn't remove map you ought to add some sentence in createmap1 function to judge whether map has been created,if it was,show,if not create map I am OGCer V1.0 owner! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Show-and-hide-maps-with-a-button-in-OpenLayers-tp5020705p5020808.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hayden.lewis at dpi.vic.gov.au Tue Dec 4 21:27:20 2012 From: hayden.lewis at dpi.vic.gov.au (hayds79) Date: Tue, 4 Dec 2012 21:27:20 -0800 (PST) Subject: [OpenLayers-Users] Create gml vector from selection Message-ID: <1354685240790-5020816.post@n6.nabble.com> Can anyone inform me of either links or code examples for creating a new polygon feature from wms polygon selections to a gml file for loading back in to the map as wms? I currently have the wms selections operating fine but just cant figure out how to manage this part. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Create-gml-vector-from-selection-tp5020816.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From info at spatially-oriented.com Tue Dec 4 22:15:59 2012 From: info at spatially-oriented.com (Casper Span) Date: Wed, 5 Dec 2012 07:15:59 +0100 Subject: [OpenLayers-Users] Mouseout event on IE In-Reply-To: <1354607068460-5020494.post@n6.nabble.com> References: <1354607068460-5020494.post@n6.nabble.com> Message-ID: Thanks for the reply, but that's part of the problem. It works fine with Firefox! It doesn't work with IE or Chrome and I don't have as good debugging tools there. Also, I need the obj var because it contains a reference to my OL (overriden) Map object and everything it contains... But it does seem to be called with this code change so I might hack some more from here on. On Tue, Dec 4, 2012 at 8:44 AM, OpenGSC <945070223 at qq.com> wrote: > m.events.register("mouseover", m, HoverMarker); > m.events.register("mouseout", m, UnHoverMarker); > you can try the above code ! debug it by firebug! > > > > I am OGCer V1.0 owner! > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/Mouseout-event-on-IE-tp5020390p5020494.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Casper Span T: @Span_Droid W: http://www.spatially-oriented.com M: info at spatially-oriented.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.lemoine at camptocamp.com Tue Dec 4 22:44:59 2012 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed, 5 Dec 2012 07:44:59 +0100 Subject: [OpenLayers-Users] Touch navigation implementation In-Reply-To: <1354529262303-5020294.post@n6.nabble.com> References: <1354529262303-5020294.post@n6.nabble.com> Message-ID: On Mon, Dec 3, 2012 at 11:07 AM, Derek Watling wrote: > I am in the process of updating to OL 2.12 and Google v3 (previously used OL > 2.10, Google v2). > > While I have sorted most of the issues I am a bit confused as to > implementing touch navigation. > > I am testing on various desktop browsers as well as an iPad and an Andriod > tablet. Is there any device detection? Which navigation control should be > included if you don't know what device the web site is being viewed on? > > > Currently I have the following code: > map.addControl(new OpenLayers.Control.Navigation({ dragPanOptions: { > enableKinetic: true } })); > map.addControl(new OpenLayers.Control.TouchNavigation({ dragPanOptions: { > enableKinetic: true } })); OpenLayers.Control.Navigation supports mouse as well as touch. For pinch zoom to work you have to have OpenLayers/Control/PinchZoom.js in your build. OpenLayers.Control.TouchNavigation supports touch only, it is to be used for touch/mobile specific apps. > The one issue I do still have is with the Measure control. On both iPad and > Andriod when measuring, each "click" to add a point also activates the map's > Click control. How do I stop this happening? You can try this: yourMeasureControl.handler.stopUp = true; -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 94 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Tue Dec 4 22:53:56 2012 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed, 5 Dec 2012 07:53:56 +0100 Subject: [OpenLayers-Users] Problem to show ways in vectorlayers (mobile) In-Reply-To: <50BB9FE9.3090602@tappenbeck.net> References: <50BB9FE9.3090602@tappenbeck.net> Message-ID: On Sun, Dec 2, 2012 at 7:37 PM, Jan Tappenbeck wrote: > hi ! > > i want to show way-elements (data by overpass) and define by vectorlayer. > > here the link: > http://www.tappenbeck.net/osm/maps/deu/mobile2012.php?id=9512#mappage > > first you had to add the layerswitch (top-left) and move the map little. > left-top of the roundabout is a park with dark way-lines (on a pc). > > but my problem is that the ways will not show on mobile device (htc desire - > android-browser). > > the sourc you can find at > http://www.tappenbeck.net/osm/maps/js/hms_002_overpass.js > > did anyone have a idea why will not show and a alternative ?? > > regards Jan :-) Not every Android version supports SVG. Try Canvas. See and . Hope it helps, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 94 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Tue Dec 4 22:57:21 2012 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed, 5 Dec 2012 07:57:21 +0100 Subject: [OpenLayers-Users] Map moveend event fires twice if zoomed In-Reply-To: <1354123679111-5019378.post@n6.nabble.com> References: <1354123679111-5019378.post@n6.nabble.com> Message-ID: On Wed, Nov 28, 2012 at 6:27 PM, Tondo wrote: > Hi Lists, > > is it just a bug, or it is supposed to rise MoveEnd event once when panning > but twice when zooming? > > /_map.events.on({ > moveend: function () > { > var bbox = _map.getExtent().toArray(); > var denominator = _map.getScale(); > alert("CALL0"); // Alerts twice whne zoomed > if (originBBox[0] > bbox[0] || originBBox[1] > bbox[1] || > originBBox[2] < bbox[2] || originBBox[3] < bbox[3] || originBBox[4] !== > denominator) > { > originBBox = newOriginBox(bbox, denominator); > loadGeometry(originBBox); > } > } > });/ > > Thanks, > Tom I just tried on (using `map.events.on({moveend: function() { console.log('moveeend'); }})` on the console) and I'm not reproducing the problem. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 94 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com From derek at cmainfo.co.za Wed Dec 5 00:19:01 2012 From: derek at cmainfo.co.za (Derek Watling) Date: Wed, 5 Dec 2012 00:19:01 -0800 (PST) Subject: [OpenLayers-Users] Touch navigation implementation In-Reply-To: References: <1354529262303-5020294.post@n6.nabble.com> Message-ID: <1354695541775-5020838.post@n6.nabble.com> Eric, Thank you for clarifying the controls. I tried adding "stopUp = true" as in the following code: var control; for (var key in measureControls) { control = measureControls[key]; control.events.on({ "measure": handleMeasurements, "measurepartial": handleMeasurements }); control.geodesic = true; + control.handler.stopUp = true; map.addControl(control); } This works on the touch devices but breaks the measure when using a mouse, ie. you click the first point and the map then drags. Is there any way of detecting touch devices? What about devices that have both touch and mouse? -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Touch-navigation-implementation-tp5020294p5020838.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Wed Dec 5 02:41:20 2012 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed, 5 Dec 2012 11:41:20 +0100 Subject: [OpenLayers-Users] Touch navigation implementation In-Reply-To: <1354695541775-5020838.post@n6.nabble.com> References: <1354529262303-5020294.post@n6.nabble.com> <1354695541775-5020838.post@n6.nabble.com> Message-ID: On Wed, Dec 5, 2012 at 9:19 AM, Derek Watling wrote: > Eric, Thank you for clarifying the controls. > > I tried adding "stopUp = true" as in the following code: > > var control; > for (var key in measureControls) { > control = measureControls[key]; > control.events.on({ > "measure": handleMeasurements, > "measurepartial": handleMeasurements > }); > control.geodesic = true; > + control.handler.stopUp = true; > map.addControl(control); > } > > This works on the touch devices but breaks the measure when using a mouse, > ie. you click the first point and the map then drags. > > Is there any way of detecting touch devices? One way: 'ontouchstart' in document.documentElement > What about devices that have > both touch and mouse? You probably want to rely on touch events for those. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 94 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com From Christian.Sell.ext at atis-systems.com Wed Dec 5 04:31:45 2012 From: Christian.Sell.ext at atis-systems.com (Christian.Sell.ext at atis-systems.com) Date: Wed, 5 Dec 2012 12:31:45 +0000 Subject: [OpenLayers-Users] mark a selected area as negative/positive Message-ID: <71E28EA4A8B2054EA07B5E38907E013016765A08@max.atis-systems.com> Hello all, I have a requirement thath the user be able to select a rectangular area of a map (via box selection) such that thereafter, the selection can be visualized either positively or negatively, meaning "only the selected area" or "everything except the selected area". To visualize the first case, I would like to have the map covered with a semi-opaque color (or some pattern), with the exception of the selected rectangle, where the map should be displayed normally. Vice-versa for the second case. Can somebody give me a pointer how to implement this? It is of course easy to draw a box with fillOpacity=0.5 (covering case 2), but I am unclear how to cover the other case. TIA, Christian //////////////////////////////////////////////////////////////////// ATIS systems GmbH Sitz: Bad Homburg Registergericht: Bad Homburg HRB 1514 Geschaeftsfuehrer: Helmut Huschka ________________________________________________________________________________________________ This message is confidential. It may also be privileged or otherwise protected by work product immunity or other legal rules. If you have received this message by mistake please let us know by reply and then delete it from your system; you should not copy it or disclose its contents to anyone. All messages sent to and from ATIS systems GmbH may be monitored to ensure compliance with internal policies and to protect our business. E-Mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed. Anyone who communicates with us by e-mail is taken to accept these risks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mc.prins at gmail.com Wed Dec 5 05:54:00 2012 From: mc.prins at gmail.com (Mark Prins) Date: Wed, 5 Dec 2012 14:54:00 +0100 Subject: [OpenLayers-Users] legend "floating" over map In-Reply-To: <1354610897440-5020501.post@n6.nabble.com> References: <1354122966874-5019375.post@n6.nabble.com> <1354610897440-5020501.post@n6.nabble.com> Message-ID: 2012/12/4 Gery > Thanks Donald, Alexandre, Sergeant and Mark for the ideas. I think Mark's > solution is what I have in mind, Mark could you share an example about > using > this UpdateLegendControl.js script please? I went through it but I'm > confused about how to use it. > you just add it to a map as a control while passing a div or other container element that you want to hold the legend: _map.addControl(new UpdateLegendControl({ div : jQuery('#legendDiv')[0] })); like shown here: https://github.com/MinELenI/CBSviewer/blob/master/src/main/js/Viewer.js#L168 The div should be styled and positioned with some css -- Disclaimer; This message is just a reflection of what I thought at the time of sending. The message may contain information that is not intended for you or that you don't understand. -------------- next part -------------- An HTML attachment was scrubbed... URL: From derek at cmainfo.co.za Wed Dec 5 07:05:42 2012 From: derek at cmainfo.co.za (Derek Watling) Date: Wed, 5 Dec 2012 07:05:42 -0800 (PST) Subject: [OpenLayers-Users] Touch navigation implementation In-Reply-To: References: <1354529262303-5020294.post@n6.nabble.com> <1354695541775-5020838.post@n6.nabble.com> Message-ID: <1354719942614-5020951.post@n6.nabble.com> Thanks Eric I have managed to improve the interface with your input. Still have an issue with touch & mouse input on the same device as the touch is taking precedence where the mouse is more precise... -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Touch-navigation-implementation-tp5020294p5020951.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From robhyx at gmail.com Wed Dec 5 08:01:52 2012 From: robhyx at gmail.com (Rob Hyx) Date: Wed, 5 Dec 2012 11:01:52 -0500 Subject: [OpenLayers-Users] OpenLayers 2.12 Map Rotation Message-ID: Hey all, I'm curious if OL 2.12 supports map rotation? I see this is 'planned' for 2.13 http://trac.osgeo.org/openlayers/ticket/3126, but do the functions exist that allow you to orient the map other than north at the top in 2.12? Thanks in advance! -- HYX http://hyx-music.com From reinaldo at geodesign.com.br Wed Dec 5 11:35:52 2012 From: reinaldo at geodesign.com.br (reinaldo at geodesign.com.br) Date: Wed, 5 Dec 2012 17:35:52 -0200 (BRST) Subject: [OpenLayers-Users] Can Not Get Rule-based Stying to Work on KML Message-ID: OL Users, I am now trying to do rule-based styling, but am not getting anywhere. Can some one help? I would like to apply styling base on rules, such as the examples: var map = new OpenLayers.Map("map"); var vector_style = new OpenLayers.Style(); var ruleLow = new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison (http://OpenLayers.Filter.Comparison)({ type: OpenLayers.Filter.Comparison.LESS_THAN, (http://OpenLayers.Filter.Comparison.LESS_THAN,) property: "SUMMER", value = 2000.0 }), symbolizer: { strokeColor: "#ff0000", strokeWidth: 1, fillColor: "#ff0000" } }); var ruleHigh = new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison (http://OpenLayers.Filter.Comparison)({ type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, (http://OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,) property: "SUMMER", value = 2000.0 }), symbolizer: { strokeColor: "#ff0000", strokeWidth: 1, fillColor: "#ff0000" } }); vector_style.addRules([ruleLow, ruleHigh]); var vectorlayer = new OpenLayers.Layer.Vector("SOLAR RAD BA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_diffuse_summer.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), styleMap: vector_style }); var googleLayer = new OpenLayers.Layer.Google("Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} ); map.addLayers([googleLayer, vectorlayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); I have a KML file with the following attributes for the features (placemarks): ff0000ff 0 cel_41355 -39.33 -8.514 2354.6590 3722.106 2457.454 2300.018 1856.493 1874.805 1766.843 2075.472 2165.046 2079.367 2044.279 2210.000 2242.269 2128.142 2864.096 2002.744 1974.092 -39.374898840000021,-8.532500220000012 -39.368901960000017,-8.53460298000002 -39.361320000000006,-8.539000020000019 -39.357873000000019,-8.542680029999996 -39.356818920000016,-8.546292000000021 -39.352569839999994,-8.549219969999998 -39.345095880000024,-8.55734202 -39.342219480000033,-8.558644590000013 -39.373840080000008,-8.559807030000023 -39.374898840000021,-8.532500220000012-39.328748280000021,-8.558149410000008 -39.339051840000003,-8.558528130000013 -39.331622880000026,-8.557507980000004 -39.328748280000021,-8.558149410000008-39.311822160000034,-8.557527150000002 -39.311876160000018,-8.557529130000008 -39.311844840000013,-8.55752202 -39.311822160000034,-8.557527150000002 Thanks a lot. Reinaldo ------------------------------------ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br (http://www.geodesign.com.br) Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta -------------- next part -------------- An HTML attachment was scrubbed... URL: From erdal.karaca.de at gmail.com Wed Dec 5 11:56:50 2012 From: erdal.karaca.de at gmail.com (Erdal Karaca) Date: Wed, 5 Dec 2012 20:56:50 +0100 Subject: [OpenLayers-Users] OL 2.12 on phonegap/cordova and android 4.1.1 Message-ID: When running OL 2.12 in phonegap/cordova and android 4.1.1 (galaxy s3), the map (for instance OSM WMS) has a 'fisheye effect', i.e. at the center of the screen everything is as expected, but at the borders everything is 'squeezed'. Did anyone else encounter this? Any hints what to look for or to check? -------------- next part -------------- An HTML attachment was scrubbed... URL: From iacovlev.pavel at gmail.com Wed Dec 5 12:16:45 2012 From: iacovlev.pavel at gmail.com (Pavel Iacovlev) Date: Wed, 5 Dec 2012 22:16:45 +0200 Subject: [OpenLayers-Users] OL 2.12 on phonegap/cordova and android 4.1.1 In-Reply-To: References: Message-ID: Do not use static positioning for map div. On Wed, Dec 5, 2012 at 9:56 PM, Erdal Karaca wrote: > When running OL 2.12 in phonegap/cordova and android 4.1.1 (galaxy s3), > the map (for instance OSM WMS) has a 'fisheye effect', i.e. at the center > of the screen everything is as expected, but at the borders everything is > 'squeezed'. > Did anyone else encounter this? Any hints what to look for or to check? > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From erdal.karaca.de at gmail.com Wed Dec 5 12:23:41 2012 From: erdal.karaca.de at gmail.com (Erdal Karaca) Date: Wed, 5 Dec 2012 21:23:41 +0100 Subject: [OpenLayers-Users] OL 2.12 on phonegap/cordova and android 4.1.1 In-Reply-To: References: Message-ID: Thanks for the fast reply! I use this to initialize the map div:
That is wrong? How else do I get 'full screen map'? 2012/12/5 Pavel Iacovlev > Do not use static positioning for map div. > > > On Wed, Dec 5, 2012 at 9:56 PM, Erdal Karaca wrote: > >> When running OL 2.12 in phonegap/cordova and android 4.1.1 (galaxy s3), >> the map (for instance OSM WMS) has a 'fisheye effect', i.e. at the center >> of the screen everything is as expected, but at the borders everything is >> 'squeezed'. >> Did anyone else encounter this? Any hints what to look for or to check? >> >> _______________________________________________ >> Users mailing list >> Users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Wed Dec 5 17:42:15 2012 From: 945070223 at qq.com (OpenGSC) Date: Wed, 5 Dec 2012 17:42:15 -0800 (PST) Subject: [OpenLayers-Users] Mouseout event on IE In-Reply-To: References: Message-ID: <1354758135570-5021092.post@n6.nabble.com> use alert to see whether the function is executed; if it was.check you code about the two functions; -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Mouseout-event-on-IE-tp5020390p5021092.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From 945070223 at qq.com Wed Dec 5 21:49:21 2012 From: 945070223 at qq.com (OpenGSC) Date: Wed, 5 Dec 2012 21:49:21 -0800 (PST) Subject: [OpenLayers-Users] Can Not Get Rule-based Stying to Work on KML In-Reply-To: References: Message-ID: <1354772961705-5021109.post@n6.nabble.com> syleMap is not equal to style,your code is not correct. construt a styleMap and match the defalut attribute to you style. and Assign it to vectory layer's styleMap attribute -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Can-Not-Get-Rule-based-Stying-to-Work-on-KML-tp5021027p5021109.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From derek at cmainfo.co.za Wed Dec 5 22:58:03 2012 From: derek at cmainfo.co.za (Derek Watling) Date: Wed, 5 Dec 2012 22:58:03 -0800 (PST) Subject: [OpenLayers-Users] Google v3 "Report a map error" not active in OL 2.12 Message-ID: <1354777083515-5021117.post@n6.nabble.com> In the latest post from Google Maps Mania they mention the new(?) report a problem/error error link that appears in the bottom right of the map: "... Google has also added the 'Report a problem' link to all maps that use the API for each of the 40+ countries where this tool is available on the consumer version of Google Maps. Now any visitor to a Google Maps API V3 site can submit corrections and feedback directly to Google." However, this link is not "active" when wrapping Google in OpenLayers (2.12). Using Firebug I have located the element and tried increasing the z-index, but no joy. Any ideas on how to make this feature available? -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Google-v3-Report-a-map-error-not-active-in-OL-2-12-tp5021117.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed Dec 5 23:58:56 2012 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Thu, 6 Dec 2012 08:58:56 +0100 Subject: [OpenLayers-Users] Google v3 "Report a map error" not active in OL 2.12 In-Reply-To: <1354777083515-5021117.post@n6.nabble.com> References: <1354777083515-5021117.post@n6.nabble.com> Message-ID: Hi, you may want to apply https://github.com/openlayers/openlayers/pull/484. This should fix the issue. Andreas. On Thu, Dec 6, 2012 at 7:58 AM, Derek Watling wrote: > In the latest post from Google Maps Mania they mention the new(?) report a > problem/error error link that appears in the bottom right of the map: > "... Google has also added the 'Report a problem' link to all maps that use > the API for each of the 40+ countries where this tool is available on the > consumer version of Google Maps. Now any visitor to a Google Maps API V3 > site can submit corrections and feedback directly to Google." > > However, this link is not "active" when wrapping Google in OpenLayers > (2.12). Using Firebug I have located the element and tried increasing the > z-index, but no joy. Any ideas on how to make this feature available? > > > > -- > View this message in context: http://osgeo-org.1560.n6.nabble.com/Google-v3-Report-a-map-error-not-active-in-OL-2-12-tp5021117.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From eric.lemoine at camptocamp.com Thu Dec 6 00:03:14 2012 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Thu, 6 Dec 2012 09:03:14 +0100 Subject: [OpenLayers-Users] OpenLayers 2.12 Map Rotation In-Reply-To: References: Message-ID: Le mercredi 5 d?cembre 2012, Rob Hyx a ?crit : > Hey all, I'm curious if OL 2.12 supports map rotation? I see this is > 'planned' for 2.13 http://trac.osgeo.org/openlayers/ticket/3126, but > do the functions exist that allow you to orient the map other than > north at the top in 2.12? No, map rotation isn't supported by 2.12 and the current dev branch. And I don't know if it will be eventually supported. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 94 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From osm at tappenbeck.net Thu Dec 6 01:13:42 2012 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Thu, 06 Dec 2012 10:13:42 +0100 Subject: [OpenLayers-Users] Problem to show ways in vectorlayers (mobile) In-Reply-To: References: <50BB9FE9.3090602@tappenbeck.net> Message-ID: <50C061C6.1090706@tappenbeck.net> Hi Eric, thanks for the message - this may be a possibility and so i add this to an example. roland of overpass has the following public links with works fine: http://overpass-api.de/open_layers_multilayer.html EVEN ON MY HTC Desire - Roland did not define a special render like renderers: ["Canvas", "SVG", "VML"], i put html and overpass.js local to my server (with and without the renderers-tag) and on desktop i get following image: http://www.tappenbeck.net/osm/sandbox/vector_overpass/roland.html http://www.tappenbeck.net/osm/sandbox/vector_overpass/overpass.js http://www.tappenbeck.net/forum/openlayer/ol_example_roland.jpg but when open on htc desire the circels will not show again. in my option it may be a problem or right or something else. if the render-way is the reason the side of roland will not show on my htc desire ???? i did not have any ideas !!! regards Jan :-( From osm at tappenbeck.net Thu Dec 6 01:14:05 2012 From: osm at tappenbeck.net (Jan Tappenbeck) Date: Thu, 06 Dec 2012 10:14:05 +0100 Subject: [OpenLayers-Users] Problem to show ways in vectorlayers (mobile) In-Reply-To: References: <50BB9FE9.3090602@tappenbeck.net> Message-ID: <50C061DD.3020207@tappenbeck.net> Hi Eric, thanks for the message - this may be a possibility and so i add this to an example. roland of overpass has the following public links with works fine: http://overpass-api.de/open_layers_multilayer.html EVEN ON MY HTC Desire - Roland did not define a special render like renderers: ["Canvas", "SVG", "VML"], i put html and overpass.js local to my server (with and without the renderers-tag) and on desktop i get following image: http://www.tappenbeck.net/osm/sandbox/vector_overpass/roland.html http://www.tappenbeck.net/osm/sandbox/vector_overpass/overpass.js http://www.tappenbeck.net/forum/openlayer/ol_example_roland.jpg but when open on htc desire the circels will not show again. in my option it may be a problem or right or something else. if the render-way is the reason the side of roland will not show on my htc desire ???? i did not have any ideas !!! regards Jan :-( From pascal2833 at gmail.com Thu Dec 6 01:43:11 2012 From: pascal2833 at gmail.com (pascal evano) Date: Thu, 6 Dec 2012 10:43:11 +0100 Subject: [OpenLayers-Users] Show and hide maps with a button in OpenLayers In-Reply-To: <1354678945235-5020808.post@n6.nabble.com> References: <1354643770870-5020705.post@n6.nabble.com> <1354678945235-5020808.post@n6.nabble.com> Message-ID: Hi! The problem is that if I try to hide and remove the id after using the function createmap, the firebug writes: "b is null". It seems that the fact of removing or hiding the id works but then it's impossible to show or recreate the map and all these elements. So, what can I do to integrate all the elements which are in the map? Pascal. 2012/12/5 OpenGSC <945070223 at qq.com> > I think you only remove div ,but doesn't remove map > you ought to add some sentence in createmap1 function to judge whether map > has been created,if it was,show,if not create map > > > > > I am OGCer V1.0 owner! > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/Show-and-hide-maps-with-a-button-in-OpenLayers-tp5020705p5020808.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.ledermann at gmail.com Thu Dec 6 03:32:19 2012 From: christian.ledermann at gmail.com (Christian Ledermann) Date: Thu, 6 Dec 2012 14:32:19 +0300 Subject: [OpenLayers-Users] WMSGetFeatureInfo Proxy Message-ID: hello If i define: OpenLayers.ProxyHost = 'http://myserver/proxy/@@openlayers_proxy_view?url='; var map = cgmap.config['default-cgmap'].map; var wmss = map.getLayersByClass('OpenLayers.Layer.WMS'); info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://remoteserver/wms', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } }); with the http://remoteserver/wms is the same address as the source of the layer. It works as expected. i want to get the WMSGetFeatureInfo to retrieve the information from another URL e.g: /**/ is it possible to point the WMSGetFeatureInfo url (local) to another url than the Layer.WMS url (remote) ? -- Best Regards, Christian Ledermann Nairobi - Kenya Mobile : +254 702978914 <*)))>{ If you save the living environment, the biodiversity that we have left, you will also automatically save the physical environment, too. But If you only save the physical environment, you will ultimately lose both. 1) Don?t drive species to extinction 2) Don?t destroy a habitat that species rely on. 3) Don?t change the climate in ways that will result in the above. }<(((*> From gamejihou at hotmail.com Thu Dec 6 05:09:43 2012 From: gamejihou at hotmail.com (Gery) Date: Thu, 6 Dec 2012 05:09:43 -0800 (PST) Subject: [OpenLayers-Users] legend "floating" over map In-Reply-To: References: <1354122966874-5019375.post@n6.nabble.com> <1354610897440-5020501.post@n6.nabble.com> Message-ID: Thanks Marc, I'll check that and see what gives, Cheers, __________________________________________________________________________________________ Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario. Think green - keep it on the screen. Do NOT print if it is NOT necessary. Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist. Date: Wed, 5 Dec 2012 05:54:13 -0800 From: ml-node+s1560n5020930h56 at n6.nabble.com To: gamejihou at hotmail.com Subject: Re: legend "floating" over map 2012/12/4 Gery <[hidden email]> Thanks Donald, Alexandre, Sergeant and Mark for the ideas. I think Mark's solution is what I have in mind, Mark could you share an example about using this UpdateLegendControl.js script please? I went through it but I'm confused about how to use it. you just add it to a map as a control while passing a div or other container element that you want to hold the legend: _map.addControl(new UpdateLegendControl({ div : jQuery('#legendDiv')[0] })); like shown here: https://github.com/MinELenI/CBSviewer/blob/master/src/main/js/Viewer.js#L168 The div should be styled and positioned with some css -- Disclaimer; This message is just a reflection of what I thought at the time of sending. The message may contain information that is not intended for you or that you don't understand. _______________________________________________ Users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/openlayers-users If you reply to this email, your message will be added to the discussion below: http://osgeo-org.1560.n6.nabble.com/legend-floating-over-map-tp5019001p5020930.html To unsubscribe from legend "floating" over map, click here. NAML -- View this message in context: http://osgeo-org.1560.n6.nabble.com/legend-floating-over-map-tp5019001p5021197.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stevec at renci.org Thu Dec 6 09:07:32 2012 From: stevec at renci.org (Steven Chall) Date: Thu, 6 Dec 2012 17:07:32 +0000 Subject: [OpenLayers-Users] updating layer name in LayerSwitcher Message-ID: <330F028D4BFD4249AA03F5C869E3E2C14B11A123@MAIL-MBX1.ad.renci.org> I set up a map and a layer switcher thusly: var map = new OpenLayers.Map("liveMap", options); map.addLayer(new OpenLayers.Layer.OSM()); var layerSwitcher = new OpenLayers.Control.LayerSwitcher(); map.addControl(layerSwitcher); Then I add a data layer: ... var points = new OpenLayers.Layer.Vector( variableName, { styleMap: dataStyles, rendererOptions: {zIndexing: true} } ); // dataPoints is an Array of new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(etc etc))... points.addFeatures(dataPoints); map.addLayer(points); ...// and other stuff to populate the layer... That all works fine. But I need to periodically let the user change some attributes of the layer, and there needs to be a name change to the layer at that time. I change the name of the layer like this:: map.layers[indexOfDatalayer].name = newName; and the name shows up in the layer as I look at the data structure's values using Firebug's Watch functionality. However, I can't get the name of the layer that shows by its checkbox in layerSwitcher to reflect the name change (except sporadically and by doing other undesirable things to the layerSwitcher). I've even gone so far as to destroy the layerSwitcher and create a new one, thinking it would pick up on the new layer name, but it doesn't: layerSwitcher.destroy; layerSwitcher = new OpenLayers.Control.LayerSwitcher(); map.addControl(ShipDataSet.layerSwitcher); Some other things I've tried: map.controls[4].layerStates[1].name = name; // the layerSwitcher is map.controls[4]. map.controls[4].loadContents(); map.controls[4].updateMap(); map.controls[4].redraw(); layer.refresh(); I'd really appreciate any suggestions on getting the name of the layer to change in the layerSwitcher when I change the name of the layer. Thanks. Steve Chall From reinaldo at geodesign.com.br Thu Dec 6 11:34:27 2012 From: reinaldo at geodesign.com.br (reinaldo at geodesign.com.br) Date: Thu, 6 Dec 2012 17:34:27 -0200 (BRST) Subject: [OpenLayers-Users] Can Not Get Rule-based Stying to Work on KML Message-ID: OpenGSC, Thanks for he advise, but I can't get it to work. Please point out where I am wrong. This my code now: var map = new OpenLayers.Map("map"); var vector_style = new OpenLayers.Style({ fillColor: "#ffffff", fillOpacity: 0.1, strokeWidth: 1, strokeColor: "#ffffff", strokeOpacity: 4, }); var ruleLow = new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LESS_THAN, property: "SUMMER", value = 2000.0 }), symbolizer: { strokeColor: "#00ff00", strokeWidth: 1, fillColor: "#00ff00" } }); var ruleHigh = new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, property: "SUMMER", value = 2000.0 }), symbolizer: { strokeColor: "#ff0000", strokeWidth: 1, fillColor: "#ff0000" } }); vector_style.addRules([ruleLow, ruleHigh]); var vector_style_map = new OpenLayers.StyleMap({ 'default': vector_style }); var vectorlayer = new OpenLayers.Layer.Vector("SOLAR RAD BA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_diffuse_summer.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), styleMap: vector_style_map }); var googleLayer = new OpenLayers.Layer.Google("Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} ); map.addLayers([googleLayer, vectorlayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); ------------------------------------ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br (http://www.geodesign.com.br) Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta >---- Original Message ---- >From: OpenGSC <945070223 at qq.com> >To: openlayers-users at lists.osgeo.org >Sent: Qui, Dez 6, 2012, 3:49 AM >Subject: Re: [OpenLayers-Users] Can Not Get Rule-based Stying to Work on KML > >syleMap is not equal to style,your code is not correct. >construt a styleMap and match the defalut attribute to you style. >and Assign it to vectory layer's styleMap attribute > > > >-- >View this message in context: http://osgeo-org.1560.n6.nabble.com/Can-Not-Get-Rule-based-Stying-to-Work-on-KML-tp5021027p5021109.html >Sent from the OpenLayers Users mailing list archive at Nabble.com. >_______________________________________________ >Users mailing list >Users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/openlayers-users From Juergen.Dankoweit at T-Online.de Thu Dec 6 11:29:17 2012 From: Juergen.Dankoweit at T-Online.de (=?ISO-8859-1?Q?J=FCrgen_Dankoweit?=) Date: Thu, 06 Dec 2012 20:29:17 +0100 Subject: [OpenLayers-Users] updating layer name in LayerSwitcher In-Reply-To: <330F028D4BFD4249AA03F5C869E3E2C14B11A123@MAIL-MBX1.ad.renci.org> References: <330F028D4BFD4249AA03F5C869E3E2C14B11A123@MAIL-MBX1.ad.renci.org> Message-ID: <50C0F20D.4030609@T-Online.de> Hello Steven, for my maps with dynamic layer-switch entries I use the following code snipped: var l_Satbild = map.getLayersBy("metadata","LAYER_METEOSAT9")[0]; var c_LayerSwitcher = map.getControlsByClass("OpenLayers.Control.LayerSwitcher")[0]; if (l_Satbild) { l_Satbild.name = "new name"; l_Satbild.redraw(); c_LayerSwitcher.redraw(); } Look here: http://www.dankoweit.de/cgi-bin/metar_karte.pl?geo=1&typ=metar I hope this hels you. Best regards Juergen From p.scadden at gns.cri.nz Thu Dec 6 12:11:30 2012 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Fri, 07 Dec 2012 09:11:30 +1300 Subject: [OpenLayers-Users] WMSGetFeatureInfo Proxy In-Reply-To: References: Message-ID: <50C0FBF2.70704@gns.cri.nz> I'm not sure if I am really following this, but in my setup, I just use the URL of remote wms in my wmsgetfeatureinfo (ie I dont understand why you have a url of "'http://myserver/wmsserver/proxy?url='") In the configuration of the proxy used by ProxyHost, I add the address of all remote servers that I am going to use. The effect of the ProxyHost setting is to change all you GET calls from say http://wmsserver/wms/etc to http://myserver/proxy.jsp?url=http://wmsserver/wms/etc The proxy decides whether the url passed in a parameter is allowed or not. Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From stevec at renci.org Thu Dec 6 13:09:29 2012 From: stevec at renci.org (Steven Chall) Date: Thu, 6 Dec 2012 21:09:29 +0000 Subject: [OpenLayers-Users] updating layer name in LayerSwitcher In-Reply-To: <50C0F20D.4030609@T-Online.de> References: <330F028D4BFD4249AA03F5C869E3E2C14B11A123@MAIL-MBX1.ad.renci.org>, <50C0F20D.4030609@T-Online.de> Message-ID: <330F028D4BFD4249AA03F5C869E3E2C14B11A152@MAIL-MBX1.ad.renci.org> Thank you, J?rgen, that did the trick. Steve ________________________________________ From: J?rgen Dankoweit [Juergen.Dankoweit at T-Online.de] Sent: Thursday, December 06, 2012 2:29 PM To: Steven Chall Cc: openlayers-users at lists.osgeo.org Subject: Re: [OpenLayers-Users] updating layer name in LayerSwitcher Hello Steven, for my maps with dynamic layer-switch entries I use the following code snipped: var l_Satbild = map.getLayersBy("metadata","LAYER_METEOSAT9")[0]; var c_LayerSwitcher = map.getControlsByClass("OpenLayers.Control.LayerSwitcher")[0]; if (l_Satbild) { l_Satbild.name = "new name"; l_Satbild.redraw(); c_LayerSwitcher.redraw(); } Look here: http://www.dankoweit.de/cgi-bin/metar_karte.pl?geo=1&typ=metar I hope this hels you. Best regards Juergen From arnd.wippermann at web.de Thu Dec 6 15:50:03 2012 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Fri, 7 Dec 2012 00:50:03 +0100 Subject: [OpenLayers-Users] Can Not Get Rule-based Stying to Work on KML In-Reply-To: References: Message-ID: It seems, that OL doesn't parse ExtendedData in filter property try simple attributes to see if your code works. ... 2242.269 2128.142 2864.096 2002.744 1974.092 ... This should work. Arnd -----Urspr?ngliche Nachricht----- Von: openlayers-users-bounces at lists.osgeo.org [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von reinaldo at geodesign.com.br Gesendet: Donnerstag, 6. Dezember 2012 20:34 An: openlayers-users at lists.osgeo.org; OpenGSC Betreff: Re: [OpenLayers-Users] Can Not Get Rule-based Stying to Work on KML OpenGSC, Thanks for he advise, but I can't get it to work. Please point out where I am wrong. This my code now: var map = new OpenLayers.Map("map"); var vector_style = new OpenLayers.Style({ fillColor: "#ffffff", fillOpacity: 0.1, strokeWidth: 1, strokeColor: "#ffffff", strokeOpacity: 4, }); var ruleLow = new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LESS_THAN, property: "SUMMER", value = 2000.0 }), symbolizer: { strokeColor: "#00ff00", strokeWidth: 1, fillColor: "#00ff00" } }); var ruleHigh = new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, property: "SUMMER", value = 2000.0 }), symbolizer: { strokeColor: "#ff0000", strokeWidth: 1, fillColor: "#ff0000" } }); vector_style.addRules([ruleLow, ruleHigh]); var vector_style_map = new OpenLayers.StyleMap({ 'default': vector_style }); var vectorlayer = new OpenLayers.Layer.Vector("SOLAR RAD BA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_diffuse_summer.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), styleMap: vector_style_map }); var googleLayer = new OpenLayers.Layer.Google("Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} ); map.addLayers([googleLayer, vectorlayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); ------------------------------------ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br (http://www.geodesign.com.br) Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta >---- Original Message ---- >From: OpenGSC <945070223 at qq.com> >To: openlayers-users at lists.osgeo.org >Sent: Qui, Dez 6, 2012, 3:49 AM >Subject: Re: [OpenLayers-Users] Can Not Get Rule-based Stying to Work >on KML > >syleMap is not equal to style,your code is not correct. >construt a styleMap and match the defalut attribute to you style. >and Assign it to vectory layer's styleMap attribute > > > >-- >View this message in context: >http://osgeo-org.1560.n6.nabble.com/Can-Not-Get-Rule-based-Stying-to-Wo >rk-on-KML-tp5021027p5021109.html Sent from the OpenLayers Users mailing >list archive at Nabble.com. >_______________________________________________ >Users mailing list >Users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/openlayers-users _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users From jeff.storey at nextcentury.com Thu Dec 6 16:53:06 2012 From: jeff.storey at nextcentury.com (Jeff Storey) Date: Thu, 6 Dec 2012 19:53:06 -0500 Subject: [OpenLayers-Users] zooming to fit the full earth using google maps layers Message-ID: <8EDBE3F4D9261F4A90677FB13B9CCEBC02323527@ws2.hq.nextcentury.com> I have a map that uses the google earth hybrid layer as the base layer. I would like it so the map is initially zoomed to show the whole world, but I can't quite figure out how. My code looks like var map = new OpenLayers.Map({ div: "map", projection: 'EPSG:3857', layers: [ new OpenLayers.Layer.Google("Google Hybrid",{type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}) ], center: new OpenLayers.LonLat(0,0).transform('EPSG:4326', 'EPSG:3857') }); map.zoomToMapExtent(); Do I need to set the map div dimensions to a particular aspect ratio (or a minimum height/width)? Also, is there a way to prevent the user from panning when zoomed out all the way? Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Thu Dec 6 17:31:55 2012 From: 945070223 at qq.com (OpenGSC) Date: Thu, 6 Dec 2012 17:31:55 -0800 (PST) Subject: [OpenLayers-Users] Show and hide maps with a button in OpenLayers In-Reply-To: References: <1354643770870-5020705.post@n6.nabble.com> <1354678945235-5020808.post@n6.nabble.com> Message-ID: <1354843915590-5021339.post@n6.nabble.com> I am wrong,if you remove div which is the container of the map ,the map also removed. so i think you would best not to use remove.but to use hide/or show function about map's layers. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Show-and-hide-maps-with-a-button-in-OpenLayers-tp5020705p5021339.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From 945070223 at qq.com Thu Dec 6 17:53:17 2012 From: 945070223 at qq.com (OpenGSC) Date: Thu, 6 Dec 2012 17:53:17 -0800 (PST) Subject: [OpenLayers-Users] zooming to fit the full earth using google maps layers In-Reply-To: <8EDBE3F4D9261F4A90677FB13B9CCEBC02323527@ws2.hq.nextcentury.com> References: <8EDBE3F4D9261F4A90677FB13B9CCEBC02323527@ws2.hq.nextcentury.com> Message-ID: <1354845197221-5021340.post@n6.nabble.com> define your own extent use OpenLayers.Bounds class according the projection of you map. and use map's zoomToExtent function -- View this message in context: http://osgeo-org.1560.n6.nabble.com/zooming-to-fit-the-full-earth-using-google-maps-layers-tp5021337p5021340.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From reinaldo at geodesign.com.br Thu Dec 6 18:27:47 2012 From: reinaldo at geodesign.com.br (reinaldo at geodesign.com.br) Date: Fri, 7 Dec 2012 00:27:47 -0200 (BRST) Subject: [OpenLayers-Users] Still Can Not Do Rule-based Styling with KML Message-ID: OL Users, I tried a new piece of code based on the provided OL examples. But I still can not get the rule-based styling to work with a KML file. Could someone please help? Thanks. This is how my code looks like now: var map = new OpenLayers.Map("map"); var googleLayer = new OpenLayers.Layer.Google("Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} ); var features = new OpenLayers.Layer.Vector("SOLAR RAD BA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_diffuse_summer.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }) styleMap: new OpenLayers.StyleMap(style) }); var style = new OpenLayers.Style( { fillColor: "#ffffff", fillOpacity: 0.1, strokeWidth: 1, strokeColor: "#ffffff", strokeOpacity: 4 }, { rules: [ new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LESS_THAN, property: "SUMMER", value: 2000 }), symbolizer: { strokeColor: "#00ff00", strokeWidth: 1, fillColor: "#00ff00" } }), new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, property: "SUMMER", value: 2000 }), symbolizer: { strokeColor: "#ff0000", strokeWidth: 1, fillColor: "#ff0000" } }) ] } ); map.addLayers([googleLayer, features]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); ------------------------------------ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br (http://www.geodesign.com.br) Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.lemoine at camptocamp.com Thu Dec 6 21:27:06 2012 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Fri, 7 Dec 2012 06:27:06 +0100 Subject: [OpenLayers-Users] updating layer name in LayerSwitcher In-Reply-To: <330F028D4BFD4249AA03F5C869E3E2C14B11A152@MAIL-MBX1.ad.renci.org> References: <330F028D4BFD4249AA03F5C869E3E2C14B11A123@MAIL-MBX1.ad.renci.org> <50C0F20D.4030609@T-Online.de> <330F028D4BFD4249AA03F5C869E3E2C14B11A152@MAIL-MBX1.ad.renci.org> Message-ID: Le jeudi 6 d?cembre 2012, Steven Chall a ?crit : > Thank you, J?rgen, that did the trick. Layers have a setName function. By using this function calling redraw on the LayerSwitcher shouldn't be necessary. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 94 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Thu Dec 6 22:30:21 2012 From: 945070223 at qq.com (OpenGSC) Date: Thu, 6 Dec 2012 22:30:21 -0800 (PST) Subject: [OpenLayers-Users] Can Not Get Rule-based Stying to Work on KML In-Reply-To: References: Message-ID: <1354861820992-5021355.post@n6.nabble.com> is there some error message happened; there are some demos you can look up http://openlayers.org/dev/examples/filter-strategy.html for your code , i cann't see any error. you ought to debug your code by firebug. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Can-Not-Get-Rule-based-Stying-to-Work-on-KML-tp5021027p5021355.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From derek at cmainfo.co.za Thu Dec 6 23:26:34 2012 From: derek at cmainfo.co.za (Derek Watling) Date: Thu, 6 Dec 2012 23:26:34 -0800 (PST) Subject: [OpenLayers-Users] Google v3 "Report a map error" not active in OL 2.12 In-Reply-To: References: <1354777083515-5021117.post@n6.nabble.com> Message-ID: <1354865194685-5021362.post@n6.nabble.com> Thanks Andreas Got it working properly. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Google-v3-Report-a-map-error-not-active-in-OL-2-12-tp5021117p5021362.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pascal2833 at gmail.com Fri Dec 7 00:24:56 2012 From: pascal2833 at gmail.com (pascal evano) Date: Fri, 7 Dec 2012 09:24:56 +0100 Subject: [OpenLayers-Users] Show and hide maps with a button in OpenLayers In-Reply-To: <1354843915590-5021339.post@n6.nabble.com> References: <1354643770870-5020705.post@n6.nabble.com> <1354678945235-5020808.post@n6.nabble.com> <1354843915590-5021339.post@n6.nabble.com> Message-ID: Hi! Yes, it's what happening in the firebug, if we remove or hide the div, it's hiding/removing all. But i don't know how to apply hide/show about map's layer only and that's my problem! Pascal. 2012/12/7 OpenGSC <945070223 at qq.com> > I am wrong,if you remove div which is the container of the map ,the map > also > removed. > so i think you would best not to use remove.but to use hide/or show > function > about map's layers. > > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/Show-and-hide-maps-with-a-button-in-OpenLayers-tp5020705p5021339.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From slawomir.messner at staff.uni-marburg.de Fri Dec 7 04:24:19 2012 From: slawomir.messner at staff.uni-marburg.de (Slawomir Messner) Date: Fri, 07 Dec 2012 13:24:19 +0100 Subject: [OpenLayers-Users] SelectFeature unselecting programmatically Message-ID: <50C1DFF3.8050308@staff.uni-marburg.de> Hi, when you use select/unselect function of SelectFeature control why this.handlers.feature.lastFeature is set in select function but not in unset in unselect? It's not just the asymmetry which bother me, it is also that it would solve an issue in the following scenario: We have a RemoveFeature control which can also remove vertices of polygons and lines. We use a SelectFeature to select a feature. On select it draws edit vertices on the edges, like the ModifyFeature control and a Feature handler handles the click on the vertices and removes it form layer and the geometry. After removing it redraws the feature and all seams well, the feature is correctly drawn, the vertex is gone and it's selected but unfortunately clickout doesn't work(it works when you select and clickout without deleting vertex). After some investigation I found out that lastFeature of the feature handler in SelectFeature control is the deleted vertex. So on click outside the feature the handler runs handle method where it sets lastFeature to null, because it is removed from layer. if(this.lastFeature && !this.lastFeature.layer) { // last feature has been destroyed this.lastFeature = null; } so it never gets some lines below: } else { if(this.lastFeature && (previouslyIn || click)) { this.triggerCallback(type, 'out', [this.lastFeature]); } } there it should call the clickout callback. So I tried it with unselect and than select the feature programmatically after deleting the vertex, to reset the select, but this didn't help. The only thing that helps is when I set the lastFeature to null before reselect or to set it to the feature without . Why not "simple" do something like: "this.selectFeature.handlers.feature.lastFeature = this.feature" because it looks ugly, uses some attributes which should be private and I saw the asymmetry in the code of the SelectFeature and asked myself if it's a bug or a feature. Is there something why not change the unselect method of SelectFeature to: unselect: function(feature) { var layer = feature.layer; // Store feature style for restoration later this.unhighlight(feature); // if the feature handler isn't involved in the feature // selection (because the feature is selected programatically) // we fake the // feature handler to allow unselecting on clickout if(this.handlers.feature.lastFeature) { this.handlers.feature.lastFeature = null; } OpenLayers.Util.removeItem(layer.selectedFeatures, feature); layer.events.triggerEvent("featureunselected", {feature: feature}); this.onUnselect.call(this.scope, feature); }, It doesn't crash the tests. Btw: I think there is a documentation error in OL.Handler.Feauture deactivate function it should be: /** * Method: deactivate * Turn off the handler. Returns false if the handler was not active. * * Returns: * {Boolean} */ Keep up the excellent work guys, we look forward to OL3. Regards Slawomir From Juergen.Dankoweit at T-Online.de Fri Dec 7 07:29:35 2012 From: Juergen.Dankoweit at T-Online.de (=?ISO-8859-1?Q?J=FCrgen_Dankoweit?=) Date: Fri, 07 Dec 2012 16:29:35 +0100 Subject: [OpenLayers-Users] updating layer name in LayerSwitcher In-Reply-To: References: <330F028D4BFD4249AA03F5C869E3E2C14B11A123@MAIL-MBX1.ad.renci.org> <50C0F20D.4030609@T-Online.de> <330F028D4BFD4249AA03F5C869E3E2C14B11A152@MAIL-MBX1.ad.renci.org> Message-ID: <50C20B5F.7000900@T-Online.de> When I coded the maps for my website such a function wasn't documented officially. J?rgen Am 07.12.2012 06:27, schrieb Eric Lemoine: > > > Le jeudi 6 d?cembre 2012, Steven Chall a ?crit : > > Thank you, J?rgen, that did the trick. > > > > Layers have a setName function. By using this function calling redraw > on the LayerSwitcher shouldn't be necessary. > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 94 > Mail : eric.lemoine at camptocamp.com > http://www.camptocamp.com -- Meine stets unfertige Homepage: www.dankoweit.de From stevec at renci.org Fri Dec 7 07:33:10 2012 From: stevec at renci.org (Steven Chall) Date: Fri, 7 Dec 2012 15:33:10 +0000 Subject: [OpenLayers-Users] updating layer name in LayerSwitcher In-Reply-To: <50C20B5F.7000900@T-Online.de> References: <330F028D4BFD4249AA03F5C869E3E2C14B11A123@MAIL-MBX1.ad.renci.org> <50C0F20D.4030609@T-Online.de> <330F028D4BFD4249AA03F5C869E3E2C14B11A152@MAIL-MBX1.ad.renci.org> , <50C20B5F.7000900@T-Online.de> Message-ID: <330F028D4BFD4249AA03F5C869E3E2C14B11A18E@MAIL-MBX1.ad.renci.org> Both approaches work and both have been informative. Thanks to all. Steve ________________________________________ From: J?rgen Dankoweit [Juergen.Dankoweit at T-Online.de] Sent: Friday, December 07, 2012 10:29 AM To: Eric Lemoine Cc: Steven Chall; openlayers-users at lists.osgeo.org Subject: Re: [OpenLayers-Users] updating layer name in LayerSwitcher When I coded the maps for my website such a function wasn't documented officially. J?rgen Am 07.12.2012 06:27, schrieb Eric Lemoine: > > > Le jeudi 6 d?cembre 2012, Steven Chall a ?crit : > > Thank you, J?rgen, that did the trick. > > > > Layers have a setName function. By using this function calling redraw > on the LayerSwitcher shouldn't be necessary. > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 94 > Mail : eric.lemoine at camptocamp.com > http://www.camptocamp.com -- Meine stets unfertige Homepage: www.dankoweit.de From kguardado at gmail.com Fri Dec 7 08:11:02 2012 From: kguardado at gmail.com (Karina Guardado) Date: Fri, 7 Dec 2012 10:11:02 -0600 Subject: [OpenLayers-Users] problem with open up popup with WMSGetFeatureInfo control Message-ID: Hi everybody, I'm using the WMSGetFeatureInfo control with openlayers 2.11 and mapfish, mapserver, linux Debian. When I click on a point I get the popup with the information but can not close the popup. I have tried with a few layers and there is no problem but when using more then it is not possible to close the popup box. I have review the layers and are ok so I think the problem is with the control WMSGetFeatureInfo. Is there a limit of layers I can use with this control? or is a problem with the apache or something else? Here is the code I'm using. Thanks in advance. Regards. toolbar.addControl(new OpenLayers.Control.WMSGetFeatureInfo({ url: ' http://200.13.186.56/cgi-bin/mapserv?MAP=/var/www/geo/pages/client/opamssmapfile.map&', title: 'Identify features by clicking', queryVisible: true, infoFormat:'text/html', click: 'true', layers: [infecos, infcasasalud, infalbergues, infcentronutre, infhospitales, infsibasis, infhogarespera, infpromotor, AgisECOS, Municipios, MuniMesoamerica, infecosmesoamerica, proyconstruccion, proyequipamiento, proyconstruccionAvance, proyequipamientoAvance, ProyConstruccionPrides, ProyequipamientoPrides, ProyConstruccionAvancePrides, ProyequipamientoAvancePrides, RegionOriental, RegionParacentral, RegionCentral, RegionOccidental, RegionMetropolitana,MicroredAtiquizaya, MicroredCaraSucia, MicroredGuaymango, MicroredJujutla, MicroredAtiquizayaMuni,MicroredAhuachapanMuni, MicroredCaraSuciaMuni, MicroredGuaymangoMuni, MicroredJujutlaMuni,infecosAtiquizaya, infhospitalesAtiquizaya, infecosAhuachapan, infhospitalesAhuachapan, infecosCaraSucia, infhospitalesCaraSucia, infecosGuaymango, infhospitalesGuaymango, infecosJujutla, infhospitalesJujutla, MicroredSonsonate, MicroredSonzacate, MicroredAcajutla, MicroredIzalco, MicroredLourdesColon, MicroredSonsonateMuni, infecosSonsonate, infhospitalesSonsonate, MicroredSonzacateMuni, infecosSonzacate, infhospitalesSonzacate,MicroredAcajutlaMuni, infecosAcajutla, infhospitalesAcajutla, MicroredIzalcoMuni, infecosIzalco, infhospitalesIzalco,MicroredLourdesColonMuni, infecosLourdesColon, infhospitalesLourdesColon, MicroredMetapan, MicroredTexistepeque, MicroredElcongo, MicroredTomasPineda, MicroredChalchuapa, MicroredMetapanMuni, infecosMetapan, infhospitalesMetapan, MicroredTexistepequeMuni, infecosTexistepeque, infhospitalesTexistepeque, MicroredElcongoMuni, infecosElcongo, infhospitalesElcongo, MicroredTomasPinedaMuni, infecosTomasPineda, infhospitalesTomasPineda, MicroredChalchuapaMuni, infecosChalchuapa, infhospitalesChalchuapa, MicroredPerquin, MicroredOsicala, MicroredSanFranciscoGotera, MicroredSensembra, MicroredPerquinMuni, infecosPerquin, infhospitalesPerquin, MicroredOsicalaMuni, infecosOsicala, infhospitalesOsicala, MicroredSanFranciscoGoteraMuni, infecosSanFranciscoGotera, infhospitalesSanFranciscoGotera, MicroredSensembraMuni, infecosSensembra, infhospitalesSensembra], eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( \"chicken\", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } },{ isDefault: true, title: 'Info' }), { iconCls: 'query', toggleGroup: 'map' }); Karina Guardado El Salvador -------------- next part -------------- An HTML attachment was scrubbed... URL: From islanis at infomed.sld.cu Fri Dec 7 08:50:16 2012 From: islanis at infomed.sld.cu (islanis at infomed.sld.cu) Date: Fri, 07 Dec 2012 11:50:16 -0500 Subject: [OpenLayers-Users] overwrhite the layers of the control "OpenLayers.Control.WMSGetFeatureInfo" Message-ID: <20121207115016.81895udyjjon72bk@webmail.sld.cu> i got this , i want to overwrhite the layers of the control "OpenLayers.Control.WMSGetFeatureInfo" cause in this way it always use the layers of the map, and i want to use the layer that i want , no all of them. //------------------------------------------------------------------------ wmsFeatureInfo = new OpenLayers.Control.WMSGetFeatureInfo({ autoActivate : true, infoFormat : "application/vnd.ogc.gml", maxFeatures : 1, QUERY_LAYERS:[potencial], LAYERS: [potencial], eventListeners : { "getfeatureinfo" : function(e){popupPotencialGenerico(e,"sigfre_potencial_hidrico_Rios","Pot hidrico de r?o");} } }); map.addControl(wmsFeatureInfo); wmsFeatureInfo.QUERY_LAYERS=[potencial]; wmsFeatureInfo.LAYERS=[potencial]; map.zoomToMaxExtent(); //------------------------------------------------------------------------ thanks to all ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ From wallyatkins at gmail.com Fri Dec 7 09:38:20 2012 From: wallyatkins at gmail.com (Wally Atkins) Date: Fri, 7 Dec 2012 12:38:20 -0500 Subject: [OpenLayers-Users] Google Nexus 7 - DroidGap Message-ID: <1281148434571263454@unknownmsgid> List, I'm building an application using PhoneGap (specifically DroidGap right now) and using the OpenLayers mobile I am getting some white lines showing on the OSM layer and it gets worse on my local WMS layer. Has anyone had this issue before? Thoughts on a workaround? Thanks, Wally Atkins From bartvde at opengeo.org Fri Dec 7 10:22:08 2012 From: bartvde at opengeo.org (Bart van den Eijnden) Date: Fri, 7 Dec 2012 19:22:08 +0100 Subject: [OpenLayers-Users] Google Nexus 7 - DroidGap In-Reply-To: <1281148434571263454@unknownmsgid> References: <1281148434571263454@unknownmsgid> Message-ID: <4102A6EE-C76E-4246-8DDB-AF04E12596A6@opengeo.org> What version of OL? Should be fixed in master IIRC. Best regards, Bart -- Bart van den Eijnden OpenGeo - http://opengeo.org Expert service straight from the developers. On Dec 7, 2012, at 6:38 PM, Wally Atkins wrote: > List, > > I'm building an application using PhoneGap (specifically DroidGap > right now) and using the OpenLayers mobile I am getting some white > lines showing on the OSM layer and it gets worse on my local WMS > layer. Has anyone had this issue before? Thoughts on a workaround? > > Thanks, > Wally Atkins > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From wallyatkins at gmail.com Fri Dec 7 14:21:54 2012 From: wallyatkins at gmail.com (Wally Atkins) Date: Fri, 7 Dec 2012 17:21:54 -0500 Subject: [OpenLayers-Users] Google Nexus 7 - DroidGap In-Reply-To: <4102A6EE-C76E-4246-8DDB-AF04E12596A6@opengeo.org> References: <1281148434571263454@unknownmsgid> <4102A6EE-C76E-4246-8DDB-AF04E12596A6@opengeo.org> Message-ID: <-844319557611298599@unknownmsgid> I grabbed my js and CSS from the dev examples for mobile and jquery mobile ... OpenLayers.mobile.js - is the file Version number in the code says - Release 2.13 dev On Dec 7, 2012, at 1:22 PM, Bart van den Eijnden wrote: What version of OL? Should be fixed in master IIRC. Best regards, Bart -- Bart van den Eijnden OpenGeo - http://opengeo.org Expert service straight from the developers. On Dec 7, 2012, at 6:38 PM, Wally Atkins wrote: List, I'm building an application using PhoneGap (specifically DroidGap right now) and using the OpenLayers mobile I am getting some white lines showing on the OSM layer and it gets worse on my local WMS layer. Has anyone had this issue before? Thoughts on a workaround? Thanks, Wally Atkins _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From osgeo.mailinglist at gmail.com Sat Dec 8 09:34:28 2012 From: osgeo.mailinglist at gmail.com (Thomas Gratier) Date: Sat, 8 Dec 2012 18:34:28 +0100 Subject: [OpenLayers-Users] Best practices: windows.onload or Message-ID: Hello, I'm a bit curious about OpenLayers examples They rely on but Unobtrusive JavaScript principles ( http://en.wikipedia.org/wiki/Unobtrusive_JavaScript) tell you to use something like windows.onload = function() { init(); } So, why Openlayers examples are using the first syntax? Regards ThomasG -------------- next part -------------- An HTML attachment was scrubbed... URL: From kguardado at gmail.com Sun Dec 9 03:48:37 2012 From: kguardado at gmail.com (Karina Guardado) Date: Sun, 9 Dec 2012 05:48:37 -0600 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" Message-ID: Hello everybody, I would like to know if there is a limit of layers that I can use with the OpenLayers.Control.WMSGetFeatureInfo, because I'm using more than 100 and with all the layers after the number 70 I have problems with the popup because I can not close them but the others work fine. I'm using Openlayers-2.11 , Mapfish, Mapserver, Apache, Linux Debian. Here is the code of the control toolbar.addControl(new OpenLayers.Control.WMSGetFeatureInfo({ url: ' http://geo.salud.gob.sv/cgi-bin/mapserv?MAP=/var/www/geominsal/pages/client/minsal.map&', title: 'Identify features by clicking', queryVisible: true, infoFormat:'text/html', click: 'true', layers: [infecos, infcasasalud, infalbergues, infcentronutre, infhospitales, infsibasis, infhogarespera, infpromotor, AgisECOS, Municipios, MuniMesoamerica, infecosmesoamerica, proyconstruccion, proyconstruccionAvance, proyequipamiento, proyequipamientoAvance, MicroredAtiquizaya, MicroredCaraSucia, MicroredGuaymango, MicroredJujutla, MicroredSonsonate, MicroredSonzacate, MicroredAcajutla, MicroredIzalco, MicroredLourdesColon, MicroredMetapan, MicroredTexistepeque, MicroredElcongo, MicroredTomasPineda, MicroredChalchuapa, MicroredTejutla, MicroredLaPalma, MicroredNuevaConcepcion, MicroredDulceNombre, MicroredChalatenango, MicroredGuarjila, MicroredJoyaCeren, MicroredLaCumbre, MicroredCordilleraBalsamo, MicroredMacizoCostero, MicroredCentroNorte, MicroredOriente, MicroredSur, MicroredOlocuilta, MicroredRosarioPaz, MicroredSantiagoNonualco, MicroredZacatecoluca, MicroredIlobasco, MicroredSensuntepeque, MicroredSanVicente, MicroredApastepeque, MicroredVerapaz, MicroredSanPedroPerulapan, MicroredCandelaria, MicroredCojutepeque, MicroredSanRafaelCedros, MicroredJiquilisco, MicroredBerlin, MicroredSantiagoMaria, MicroredUsulutan, MicroredConcepcionBatres, MicroredNorteSanMiguel, MicroredPonienteSanMiguel, MicroredSurSanMiguel, MicroredCentroSanMiguel, MicroredOrienteSanMiguel, MicroredAnamoros, MicroredSantaRosa, MicroredLlanoPatos, MicroredLaUnion, MicroredJocoro, MicroredPerquin, MicroredOsicala, MicroredSanFranciscoGotera, MicroredSensembra, ProyConstruccionPrides, ProyConstruccionAvancePrides, ProyequipamientoPrides, ProyequipamientoAvancePrides,MicroredAtiquizayaMuni, MicroredCaraSuciaMuni, MicroredGuaymangoMuni, MicroredJujutlaMuni, MicroredSonsonateMuni, MicroredSonzacateMuni, MicroredAcajutlaMuni, MicroredIzalcoMuni, MicroredLourdesColonMuni, MicroredMetapanMuni, MicroredTexistepequeMuni, MicroredElcongoMuni, MicroredTomasPinedaMuni, MicroredChalchuapaMuni, MicroredTejutlaMuni, MicroredLaPalmaMuni, MicroredNuevaConcepcionMuni, MicroredDulceNombreMuni, MicroredChalatenangoMuni, MicroredGuarjilaMuni, MicroredJoyaCerenMuni, MicroredLaCumbreMuni, MicroredCordilleraBalsamoMuni, MicroredMacizoCosteroMuni, MicroredCentroNorteMuni, MicroredOrienteMuni, MicroredSurMuni, MicroredOlocuiltaMuni, MicroredRosarioPazMuni, MicroredSantiagoNonualcoMuni, MicroredZacatecolucaMuni, MicroredIlobascoMuni, MicroredSensuntepequeMuni, MicroredSanVicenteMuni, MicroredApastepequeMuni, MicroredVerapazMuni, MicroredSanPedroPerulapanMuni, MicroredCandelariaMuni, MicroredCojutepequeMuni, MicroredSanRafaelCedrosMuni, MicroredJiquiliscoMuni, MicroredBerlinMuni, MicroredSantiagoMariaMuni, MicroredUsulutanMuni, MicroredConcepcionBatresMuni, MicroredNorteSanMiguelMuni, MicroredPonienteSanMiguelMuni, MicroredSurSanMiguelMuni, MicroredCentroSanMiguelMuni, MicroredOrienteSanMiguelMuni, MicroredAnamorosMuni, MicroredSantaRosaMuni, MicroredLlanoPatosMuni, MicroredLaUnionMuni, MicroredJocoroMuni, MicroredPerquinMuni, MicroredOsicalaMuni, MicroredSanFranciscoGoteraMuni, MicroredSensembraMuni, infecosAtiquizaya, infhospitalesAtiquizaya, infecosCaraSucia, infhospitalesCaraSucia, infecosGuaymango, infhospitalesGuaymango, infecosJujutla, infhospitalesJujutla, infecosAhuachapan, infhospitalesAhuachapan, infecosSonsonate, infhospitalesSonsonate, infecosSonzacate, infhospitalesSonzacate, infecosAcajutla, infhospitalesAcajutla, infecosIzalco, infhospitalesIzalco, infecosLourdesColon, infhospitalesLourdesColon, infecosMetapan, infhospitalesMetapan, infecosTexistepeque, infhospitalesTexistepeque, infecosElcongo, infhospitalesElcongo, infecosTomasPineda, infhospitalesTomasPineda, infecosChalchuapa, infhospitalesChalchuapa, infecosTejutla, infhospitalesTejutla, infecosLaPalma, infhospitalesLaPalma, infecosNuevaConcepcion, infhospitalesNuevaConcepcion, infecosDulceNombre, infhospitalesDulceNombre, infecosChalatenango, infhospitalesChalatenango, infecosGuarjila, infhospitalesGuarjila, infecosJoyaCeren, infhospitalesJoyaCeren, infecosLaCumbre, infhospitalesLaCumbre, infecosCordilleraBalsamo, infhospitalesCordilleraBalsamo, infecosMacizoCostero, infhospitalesMacizoCostero, infecosCentroNorte, infhospitalesCentroNorte, infecosOriente, infhospitalesOriente, infecosSur, infhospitalesSur, infecosOlocuilta, infhospitalesOlocuilta, infecosRosarioPaz, infhospitalesRosarioPaz, infecosSantiagoNonualco, infhospitalesSantiagoNonualco, infecosZacatecoluca, infhospitalesZacatecoluca, infecosSensuntepeque, infhospitalesSensuntepeque, infecosIlobasco, infhospitalesIlobasco, infecosSanVicente, infhospitalesSanVicente, infecosVerapaz, infhospitalesVerapaz, infecosApastepeque, infhospitalesApastepeque, infecosSanPedroPerulapan, infhospitalesSanPedroPerulapan, infecosCandelaria, infhospitalesCandelaria, infecosCojutepeque, infhospitalesCojutepeque, infecosSanRafaelCedros, infhospitalesSanRafaelCedros, infecosJiquilisco, infhospitalesJiquilisco, infecosBerlin, infhospitalesBerlin, infecosSantiagoMaria, infhospitalesSantiagoMaria, infecosUsulutan, infhospitalesUsulutan, infecosConcepcionBatres, infhospitalesConcepcionBatres, infecosNorteSanMiguel, infhospitalesNorteSanMiguel, infecosPonienteSanMiguel, infhospitalesPonienteSanMiguel, infecosSurSanMiguel, infhospitalesSurSanMiguel, infecosCentroSanMiguel, infhospitalesCentroSanMiguel, infecosOrienteSanMiguel, infhospitalesOrienteSanMiguel, infecosAnamoros, infhospitalesAnamoros, infecosSantaRosa, infhospitalesSantaRosa, infecosLlanoPatos, infhospitalesLlanoPatos, infecosLaUnion, infhospitalesLaUnion, infecosJocoro, infhospitalesJocoro, infecosPerquin, infhospitalesPerquin, infecosOsicala, infhospitalesOsicala, infecosSanFranciscoGotera, infhospitalesSanFranciscoGotera, infecosSensembra, infhospitalesSensembra, RegionOriental, RegionParacentral, RegionCentral, RegionOccidental, RegionMetropolitana ], eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( \"chicken\", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } },{ isDefault: true, title: 'Info' }), { iconCls: 'query', toggleGroup: 'map' }); thanks and regards Karina Guardado El Salvador -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.lemoine at camptocamp.com Sun Dec 9 11:52:04 2012 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Sun, 9 Dec 2012 20:52:04 +0100 Subject: [OpenLayers-Users] Best practices: windows.onload or In-Reply-To: References: Message-ID: On Sat, Dec 8, 2012 at 6:34 PM, Thomas Gratier wrote: > Hello, > > I'm a bit curious about OpenLayers examples > > They rely on > > > > but Unobtrusive JavaScript principles > (http://en.wikipedia.org/wiki/Unobtrusive_JavaScript) tell you to use > something like > > windows.onload = function() { init(); } > > So, why Openlayers examples are using the first syntax? Hysterical Raisins (http://www.catb.org/jargon/html/H/hysterical-reasons.html). I agree that using windows.onload is more in line with the "Separation of behavior from markup" practice described in . -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 94 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com From osgeo.mailinglist at gmail.com Sun Dec 9 12:26:15 2012 From: osgeo.mailinglist at gmail.com (Thomas Gratier) Date: Sun, 9 Dec 2012 21:26:15 +0100 Subject: [OpenLayers-Users] Best practices: windows.onload or In-Reply-To: References: Message-ID: Hello, Thanks Eric for your answer. I've supposed it was inherited but without knowing enough project history like PSC and historical devs, I wasn't sure. Thanks to confirm ;) Regards ThomasG -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Sun Dec 9 19:30:44 2012 From: 945070223 at qq.com (OpenGSC) Date: Sun, 9 Dec 2012 19:30:44 -0800 (PST) Subject: [OpenLayers-Users] Show and hide maps with a button in OpenLayers In-Reply-To: References: <1354643770870-5020705.post@n6.nabble.com> <1354678945235-5020808.post@n6.nabble.com> <1354843915590-5021339.post@n6.nabble.com> Message-ID: <1355110244975-5021770.post@n6.nabble.com> please look at OL Layer's API ,maybe display() function can meet you ogcer v1.0 tile loader developer. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Show-and-hide-maps-with-a-button-in-OpenLayers-tp5020705p5021770.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From 945070223 at qq.com Mon Dec 10 00:12:34 2012 From: 945070223 at qq.com (OpenGSC) Date: Mon, 10 Dec 2012 00:12:34 -0800 (PST) Subject: [OpenLayers-Users] problem with open up popup with WMSGetFeatureInfo control In-Reply-To: References: Message-ID: <1355127154451-5021816.post@n6.nabble.com> add too many layers can make server very slowly,and I think it also consume a lot of memory of browser.so I think your browser is die,because it run out your browser memory! OGCer v1.0 tiles loader owner -- View this message in context: http://osgeo-org.1560.n6.nabble.com/problem-with-open-up-popup-with-WMSGetFeatureInfo-control-tp5021490p5021816.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Mon Dec 10 00:53:36 2012 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Mon, 10 Dec 2012 09:53:36 +0100 Subject: [OpenLayers-Users] Still Can Not Do Rule-based Styling with KML In-Reply-To: References: Message-ID: You will have to set the extractStyles option of the KML format to false, otherwise your rule based styles will be taken precedence over by the inline styles of the KML. Andreas. On Fri, Dec 7, 2012 at 3:27 AM, wrote: > OL Users, > > I tried a new piece of code based on the provided OL examples. But I still > can not get the rule-based styling to work with a KML file. > > Could someone please help? > > Thanks. > > This is how my code looks like now: > > var map = new OpenLayers.Map("map"); > > var googleLayer = new OpenLayers.Layer.Google("Google Satellite", > {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} > ); > > var features = new OpenLayers.Layer.Vector("SOLAR RAD BA", { > strategies: [new OpenLayers.Strategy.Fixed()], > protocol: new OpenLayers.Protocol.HTTP({ > url: "kml/ba_diffuse_summer.kml", > format: new OpenLayers.Format.KML({ > extractStyles: false, > extractAttributes: true, > srsName: "EPSG:900913" > }) > }) > styleMap: new OpenLayers.StyleMap(style) > }); > > var style = new OpenLayers.Style( > { > fillColor: "#ffffff", > fillOpacity: 0.1, > strokeWidth: 1, > strokeColor: "#ffffff", > strokeOpacity: 4 > }, > > { > rules: [ > new OpenLayers.Rule({ > filter: new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.LESS_THAN, > property: "SUMMER", > value: 2000 > }), > symbolizer: { > strokeColor: "#00ff00", > strokeWidth: 1, > fillColor: "#00ff00" > } > }), > new OpenLayers.Rule({ > filter: new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, > property: "SUMMER", > value: 2000 > }), > symbolizer: { > strokeColor: "#ff0000", > strokeWidth: 1, > fillColor: "#ff0000" > } > }) > ] > } > ); > > map.addLayers([googleLayer, features]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.zoomToMaxExtent(); > > > ________________________________ > > Reinaldo Escada Chohfi > S?cio Gerente > GeoDesign Internacional > www.geodesign.com.br > Tel./Fax: (12) 3153-5115 > > Intelig?ncia e Tecnologia Espacial de Ponta > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Mon Dec 10 00:56:06 2012 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Mon, 10 Dec 2012 09:56:06 +0100 Subject: [OpenLayers-Users] SelectFeature unselecting programmatically In-Reply-To: <50C1DFF3.8050308@staff.uni-marburg.de> References: <50C1DFF3.8050308@staff.uni-marburg.de> Message-ID: Would you mind creating a pull request for this? It is easier to discuss things like this over code that can be seen in context an executed. Thanks, Andreas. On Fri, Dec 7, 2012 at 1:24 PM, Slawomir Messner wrote: > Hi, > when you use select/unselect function of SelectFeature control why > this.handlers.feature.lastFeature is set in select function but not in unset > in unselect? It's not just the asymmetry which bother me, it is also that it > would solve an issue in the following scenario: > We have a RemoveFeature control which can also remove vertices of polygons > and lines. > We use a SelectFeature to select a feature. On select it draws edit vertices > on the edges, like the ModifyFeature control and a Feature handler handles > the click on the vertices and removes it form layer and the geometry. After > removing it redraws the feature and all seams well, the feature is correctly > drawn, the vertex is gone and it's selected but unfortunately clickout > doesn't work(it works when you select and clickout without deleting vertex). > After some investigation I found out that lastFeature of the feature handler > in SelectFeature control is the deleted vertex. So on click outside the > feature the handler runs handle method where it sets lastFeature to null, > because it is removed from layer. > if(this.lastFeature && !this.lastFeature.layer) { > // last feature has been destroyed > this.lastFeature = null; > } > so it never gets some lines below: > } else { > if(this.lastFeature && (previouslyIn || click)) { > this.triggerCallback(type, 'out', [this.lastFeature]); > } > } > there it should call the clickout callback. So I tried it with unselect and > than select the feature programmatically after deleting the vertex, to reset > the select, but this didn't help. The only thing that helps is when I set > the lastFeature to null before reselect or to set it to the feature without > . Why not "simple" do something like: > "this.selectFeature.handlers.feature.lastFeature = this.feature" > because it looks ugly, uses some attributes which should be private and I > saw the asymmetry in the code of the SelectFeature and asked myself if it's > a bug or a feature. > Is there something why not change the unselect method of SelectFeature to: > unselect: function(feature) { > var layer = feature.layer; > // Store feature style for restoration later > this.unhighlight(feature); > // if the feature handler isn't involved in the feature > // selection (because the feature is selected programatically) > // we fake the > // feature handler to allow unselecting on clickout > if(this.handlers.feature.lastFeature) { > this.handlers.feature.lastFeature = null; > } > OpenLayers.Util.removeItem(layer.selectedFeatures, feature); > layer.events.triggerEvent("featureunselected", {feature: feature}); > this.onUnselect.call(this.scope, feature); > }, > It doesn't crash the tests. > Btw: > I think there is a documentation error in OL.Handler.Feauture deactivate > function it should be: > > /** > * Method: deactivate > * Turn off the handler. Returns false if the handler was not active. > * > * Returns: > * {Boolean} > */ > > Keep up the excellent work guys, we look forward to OL3. > Regards > Slawomir > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Mon Dec 10 00:59:57 2012 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Mon, 10 Dec 2012 09:59:57 +0100 Subject: [OpenLayers-Users] problem with open up popup with WMSGetFeatureInfo control In-Reply-To: References: Message-ID: When using the text/html format, you do not need the default format (OpenLayers.Format.WMSGetFeatureInfo) to parse your features. So when configuring your OpenLayers.Control.WMSGetFeatureInfo, set the following format: format: {read: function(doc) {return doc; }} Andreas. On Fri, Dec 7, 2012 at 5:11 PM, Karina Guardado wrote: > Hi everybody, > > I'm using the WMSGetFeatureInfo control with openlayers 2.11 and mapfish, > mapserver, linux Debian. When I click on a point I get the popup with the > information but can not close the popup. I have tried with a few layers and > there is no problem but when using more then it is not possible to close the > popup box. I have review the layers and are ok so I think the problem is > with the control WMSGetFeatureInfo. > Is there a limit of layers I can use with this control? or is a problem with > the apache or something else? > > Here is the code I'm using. > > Thanks in advance. Regards. > > toolbar.addControl(new OpenLayers.Control.WMSGetFeatureInfo({ > url: > 'http://200.13.186.56/cgi-bin/mapserv?MAP=/var/www/geo/pages/client/opamssmapfile.map&', > title: 'Identify features by clicking', > queryVisible: true, > infoFormat:'text/html', > click: 'true', > layers: [infecos, infcasasalud, infalbergues, > infcentronutre, infhospitales, infsibasis, infhogarespera, infpromotor, > AgisECOS, Municipios, MuniMesoamerica, infecosmesoamerica, proyconstruccion, > proyequipamiento, proyconstruccionAvance, proyequipamientoAvance, > ProyConstruccionPrides, ProyequipamientoPrides, > ProyConstruccionAvancePrides, ProyequipamientoAvancePrides, RegionOriental, > RegionParacentral, RegionCentral, RegionOccidental, > RegionMetropolitana,MicroredAtiquizaya, MicroredCaraSucia, > MicroredGuaymango, MicroredJujutla, > MicroredAtiquizayaMuni,MicroredAhuachapanMuni, MicroredCaraSuciaMuni, > MicroredGuaymangoMuni, MicroredJujutlaMuni,infecosAtiquizaya, > infhospitalesAtiquizaya, infecosAhuachapan, infhospitalesAhuachapan, > infecosCaraSucia, infhospitalesCaraSucia, infecosGuaymango, > infhospitalesGuaymango, infecosJujutla, infhospitalesJujutla, > MicroredSonsonate, MicroredSonzacate, MicroredAcajutla, MicroredIzalco, > MicroredLourdesColon, MicroredSonsonateMuni, infecosSonsonate, > infhospitalesSonsonate, MicroredSonzacateMuni, infecosSonzacate, > infhospitalesSonzacate,MicroredAcajutlaMuni, infecosAcajutla, > infhospitalesAcajutla, MicroredIzalcoMuni, infecosIzalco, > infhospitalesIzalco,MicroredLourdesColonMuni, infecosLourdesColon, > infhospitalesLourdesColon, MicroredMetapan, MicroredTexistepeque, > MicroredElcongo, MicroredTomasPineda, MicroredChalchuapa, > MicroredMetapanMuni, infecosMetapan, infhospitalesMetapan, > MicroredTexistepequeMuni, infecosTexistepeque, infhospitalesTexistepeque, > MicroredElcongoMuni, infecosElcongo, infhospitalesElcongo, > MicroredTomasPinedaMuni, infecosTomasPineda, infhospitalesTomasPineda, > MicroredChalchuapaMuni, infecosChalchuapa, infhospitalesChalchuapa, > MicroredPerquin, MicroredOsicala, MicroredSanFranciscoGotera, > MicroredSensembra, MicroredPerquinMuni, infecosPerquin, > infhospitalesPerquin, MicroredOsicalaMuni, infecosOsicala, > infhospitalesOsicala, MicroredSanFranciscoGoteraMuni, > infecosSanFranciscoGotera, infhospitalesSanFranciscoGotera, > MicroredSensembraMuni, infecosSensembra, infhospitalesSensembra], > eventListeners: { > getfeatureinfo: function(event) { > map.addPopup(new OpenLayers.Popup.FramedCloud( > \"chicken\", > map.getLonLatFromPixel(event.xy), > null, > event.text, > null, > true > )); > } > } > },{ > isDefault: true, > title: 'Info' > }), > { > iconCls: 'query', > toggleGroup: 'map' > }); > > > Karina Guardado > El Salvador > > > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From christian.ledermann at gmail.com Mon Dec 10 01:13:01 2012 From: christian.ledermann at gmail.com (Christian Ledermann) Date: Mon, 10 Dec 2012 12:13:01 +0300 Subject: [OpenLayers-Users] TMS Layers always added as Baselayers Message-ID: Hello, I defined my TMS layers as {layers: [ function(){return new OpenLayers.Layer.TMS('OpenStreetMap','http://tile.openstreetmap.org/',{'type':'png',getURL: cgmap.osm_getTileURL,displayOutsideMaxExtent:true,numZoomLevels:19,attribution:'OpenStreetMap'});} , function(){return new OpenLayers.Layer.Google('Satellite (Google)',{'type': google.maps.MapTypeId.SATELLITE, numZoomLevels:22,'sphericalMercator':true});} , function() { return new OpenLayers.Layer.TMS("OMI_Absorbing_Aerosol_Optical_Depth", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", {layername: 'OMI_Absorbing_Aerosol_Optical_Depth', type:'png'}, {isBaseLayer: true }); }, function() { return new OpenLayers.Layer.TMS("MODIS_Land_Water_Mask", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", {layername: 'MODIS_Land_Water_Mask', type:'png'}, {isBaseLayer: false }); }, function() { return new OpenLayers.Layer.TMS("MODIS_Aqua_Aerosol", "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi", {layername: 'MODIS_Aqua_Aerosol', type:'png'}, {isBaseLayer: false }); } ]} What I expect is that the layers MODIS_Aqua_Aerosol, MODIS_Land_Water_Mask are added as overlays so i can check uncheck them in the layerswitcher what happens is that all layers are added as Baselayers so the layerswitcher has just radio buttons Q: How can I add TMS Layers as overlays? The above looks right to me and is what i could make out of the documentation and examples -- Best Regards, Christian Ledermann Nairobi - Kenya Mobile : +254 702978914 <*)))>{ If you save the living environment, the biodiversity that we have left, you will also automatically save the physical environment, too. But If you only save the physical environment, you will ultimately lose both. 1) Don?t drive species to extinction 2) Don?t destroy a habitat that species rely on. 3) Don?t change the climate in ways that will result in the above. }<(((*> From milo at dogodigi.net Mon Dec 10 01:28:05 2012 From: milo at dogodigi.net (Milo van der Linden) Date: Mon, 10 Dec 2012 10:28:05 +0100 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: References: Message-ID: Hello Karina, That is a whole lot of layers. Since the WMSGetFeatureInfo uses the http-get protocol, there are some (browser-specific) limitations: http://www.boutell.com/newfaq/misc/urllength.html Isn't it possible to combine layers? For instance, you now have a microred layer per municipality, wouldn't it be smarter to make just one microred layer and make sure that serverside they are all in one layer/file/table? Op 9 dec. 2012 12:48 schreef "Karina Guardado" het volgende: > > Hello everybody, > > I would like to know if there is a limit of layers that I can use with the > OpenLayers.Control.WMSGetFeatureInfo, because I'm using more than 100 and > with all the layers after the number 70 I have problems with the popup > because I can not close them but the others work fine. I'm using > Openlayers-2.11 , Mapfish, Mapserver, Apache, Linux Debian. > > Here is the code of the control > > toolbar.addControl(new OpenLayers.Control.WMSGetFeatureInfo({ > url: ' > http://geo.salud.gob.sv/cgi-bin/mapserv?MAP=/var/www/geominsal/pages/client/minsal.map&', > > title: 'Identify features by clicking', > queryVisible: true, > infoFormat:'text/html', > click: 'true', > layers: [infecos, infcasasalud, infalbergues, > infcentronutre, infhospitales, infsibasis, infhogarespera, infpromotor, > AgisECOS, Municipios, MuniMesoamerica, infecosmesoamerica, > proyconstruccion, proyconstruccionAvance, proyequipamiento, > proyequipamientoAvance, MicroredAtiquizaya, MicroredCaraSucia, > MicroredGuaymango, MicroredJujutla, MicroredSonsonate, MicroredSonzacate, > MicroredAcajutla, MicroredIzalco, MicroredLourdesColon, MicroredMetapan, > MicroredTexistepeque, MicroredElcongo, MicroredTomasPineda, > MicroredChalchuapa, MicroredTejutla, MicroredLaPalma, > MicroredNuevaConcepcion, MicroredDulceNombre, MicroredChalatenango, > MicroredGuarjila, MicroredJoyaCeren, MicroredLaCumbre, > MicroredCordilleraBalsamo, MicroredMacizoCostero, MicroredCentroNorte, > MicroredOriente, MicroredSur, MicroredOlocuilta, MicroredRosarioPaz, > MicroredSantiagoNonualco, MicroredZacatecoluca, MicroredIlobasco, > MicroredSensuntepeque, MicroredSanVicente, MicroredApastepeque, > MicroredVerapaz, MicroredSanPedroPerulapan, MicroredCandelaria, > MicroredCojutepeque, MicroredSanRafaelCedros, MicroredJiquilisco, > MicroredBerlin, MicroredSantiagoMaria, MicroredUsulutan, > MicroredConcepcionBatres, MicroredNorteSanMiguel, > MicroredPonienteSanMiguel, MicroredSurSanMiguel, MicroredCentroSanMiguel, > MicroredOrienteSanMiguel, MicroredAnamoros, MicroredSantaRosa, > MicroredLlanoPatos, MicroredLaUnion, MicroredJocoro, MicroredPerquin, > MicroredOsicala, MicroredSanFranciscoGotera, MicroredSensembra, > ProyConstruccionPrides, ProyConstruccionAvancePrides, > ProyequipamientoPrides, > ProyequipamientoAvancePrides,MicroredAtiquizayaMuni, MicroredCaraSuciaMuni, > MicroredGuaymangoMuni, MicroredJujutlaMuni, MicroredSonsonateMuni, > MicroredSonzacateMuni, MicroredAcajutlaMuni, MicroredIzalcoMuni, > MicroredLourdesColonMuni, MicroredMetapanMuni, MicroredTexistepequeMuni, > MicroredElcongoMuni, MicroredTomasPinedaMuni, MicroredChalchuapaMuni, > MicroredTejutlaMuni, MicroredLaPalmaMuni, MicroredNuevaConcepcionMuni, > MicroredDulceNombreMuni, MicroredChalatenangoMuni, MicroredGuarjilaMuni, > MicroredJoyaCerenMuni, MicroredLaCumbreMuni, MicroredCordilleraBalsamoMuni, > MicroredMacizoCosteroMuni, MicroredCentroNorteMuni, MicroredOrienteMuni, > MicroredSurMuni, MicroredOlocuiltaMuni, MicroredRosarioPazMuni, > MicroredSantiagoNonualcoMuni, MicroredZacatecolucaMuni, > MicroredIlobascoMuni, MicroredSensuntepequeMuni, MicroredSanVicenteMuni, > MicroredApastepequeMuni, MicroredVerapazMuni, > MicroredSanPedroPerulapanMuni, MicroredCandelariaMuni, > MicroredCojutepequeMuni, MicroredSanRafaelCedrosMuni, > MicroredJiquiliscoMuni, MicroredBerlinMuni, MicroredSantiagoMariaMuni, > MicroredUsulutanMuni, MicroredConcepcionBatresMuni, > MicroredNorteSanMiguelMuni, MicroredPonienteSanMiguelMuni, > MicroredSurSanMiguelMuni, MicroredCentroSanMiguelMuni, > MicroredOrienteSanMiguelMuni, MicroredAnamorosMuni, MicroredSantaRosaMuni, > MicroredLlanoPatosMuni, MicroredLaUnionMuni, MicroredJocoroMuni, > MicroredPerquinMuni, MicroredOsicalaMuni, MicroredSanFranciscoGoteraMuni, > MicroredSensembraMuni, infecosAtiquizaya, infhospitalesAtiquizaya, > infecosCaraSucia, infhospitalesCaraSucia, infecosGuaymango, > infhospitalesGuaymango, infecosJujutla, infhospitalesJujutla, > infecosAhuachapan, infhospitalesAhuachapan, infecosSonsonate, > infhospitalesSonsonate, infecosSonzacate, infhospitalesSonzacate, > infecosAcajutla, infhospitalesAcajutla, infecosIzalco, infhospitalesIzalco, > infecosLourdesColon, infhospitalesLourdesColon, infecosMetapan, > infhospitalesMetapan, infecosTexistepeque, infhospitalesTexistepeque, > infecosElcongo, infhospitalesElcongo, infecosTomasPineda, > infhospitalesTomasPineda, infecosChalchuapa, infhospitalesChalchuapa, > infecosTejutla, infhospitalesTejutla, infecosLaPalma, infhospitalesLaPalma, > infecosNuevaConcepcion, infhospitalesNuevaConcepcion, infecosDulceNombre, > infhospitalesDulceNombre, infecosChalatenango, infhospitalesChalatenango, > infecosGuarjila, infhospitalesGuarjila, infecosJoyaCeren, > infhospitalesJoyaCeren, infecosLaCumbre, infhospitalesLaCumbre, > infecosCordilleraBalsamo, infhospitalesCordilleraBalsamo, > infecosMacizoCostero, infhospitalesMacizoCostero, infecosCentroNorte, > infhospitalesCentroNorte, infecosOriente, infhospitalesOriente, infecosSur, > infhospitalesSur, infecosOlocuilta, infhospitalesOlocuilta, > infecosRosarioPaz, infhospitalesRosarioPaz, infecosSantiagoNonualco, > infhospitalesSantiagoNonualco, infecosZacatecoluca, > infhospitalesZacatecoluca, infecosSensuntepeque, > infhospitalesSensuntepeque, infecosIlobasco, infhospitalesIlobasco, > infecosSanVicente, infhospitalesSanVicente, infecosVerapaz, > infhospitalesVerapaz, infecosApastepeque, infhospitalesApastepeque, > infecosSanPedroPerulapan, infhospitalesSanPedroPerulapan, > infecosCandelaria, infhospitalesCandelaria, infecosCojutepeque, > infhospitalesCojutepeque, infecosSanRafaelCedros, > infhospitalesSanRafaelCedros, infecosJiquilisco, infhospitalesJiquilisco, > infecosBerlin, infhospitalesBerlin, infecosSantiagoMaria, > infhospitalesSantiagoMaria, infecosUsulutan, infhospitalesUsulutan, > infecosConcepcionBatres, infhospitalesConcepcionBatres, > infecosNorteSanMiguel, infhospitalesNorteSanMiguel, > infecosPonienteSanMiguel, infhospitalesPonienteSanMiguel, > infecosSurSanMiguel, infhospitalesSurSanMiguel, infecosCentroSanMiguel, > infhospitalesCentroSanMiguel, infecosOrienteSanMiguel, > infhospitalesOrienteSanMiguel, infecosAnamoros, infhospitalesAnamoros, > infecosSantaRosa, infhospitalesSantaRosa, infecosLlanoPatos, > infhospitalesLlanoPatos, infecosLaUnion, infhospitalesLaUnion, > infecosJocoro, infhospitalesJocoro, infecosPerquin, infhospitalesPerquin, > infecosOsicala, infhospitalesOsicala, infecosSanFranciscoGotera, > infhospitalesSanFranciscoGotera, infecosSensembra, infhospitalesSensembra, > RegionOriental, RegionParacentral, RegionCentral, RegionOccidental, > RegionMetropolitana ], > eventListeners: { > getfeatureinfo: function(event) { > map.addPopup(new OpenLayers.Popup.FramedCloud( > \"chicken\", > map.getLonLatFromPixel(event.xy), > null, > event.text, > null, > true > )); > } > } > },{ > isDefault: true, > title: 'Info' > }), > { > iconCls: 'query', > toggleGroup: 'map' > }); > > > > thanks and regards > > > Karina Guardado > El Salvador > > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Mon Dec 10 01:33:22 2012 From: 945070223 at qq.com (OpenGSC) Date: Mon, 10 Dec 2012 01:33:22 -0800 (PST) Subject: [OpenLayers-Users] problem with open up popup with WMSGetFeatureInfo control In-Reply-To: References: Message-ID: <1355132002166-5021842.post@n6.nabble.com> yes ,get request has some limitation,may be you ought to use post request.OL has demo -- View this message in context: http://osgeo-org.1560.n6.nabble.com/problem-with-open-up-popup-with-WMSGetFeatureInfo-control-tp5021490p5021842.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gpktondo at gmail.com Mon Dec 10 04:08:22 2012 From: gpktondo at gmail.com (Tondo) Date: Mon, 10 Dec 2012 04:08:22 -0800 (PST) Subject: [OpenLayers-Users] Two vector layers and select control Message-ID: <1355141302481-5021878.post@n6.nabble.com> Hi lists, I have two vector layers: 1. Draw layer: User draws feature. When featureadded event rises, request is send with coordinates of drawn feature. 2. Units layer: Response - features returned as intersection. Problem is, that I want to highlight units layer features AND I need draw layer above units layer, because user must be able to edit drawn feature... Is it possible? Thanks, Tom -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Two-vector-layers-and-select-control-tp5021878.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From schnieders.a at gmail.com Mon Dec 10 05:43:45 2012 From: schnieders.a at gmail.com (Andreas Schnieders) Date: Mon, 10 Dec 2012 14:43:45 +0100 Subject: [OpenLayers-Users] Filter features in multiple geographical areas? Message-ID: Hi, I need to filter features (1 KML-vector layer) in multiple geographical areas. Only those features shall be displayed that are located in one of 1-n geographical boundaries. Would I use multiple OGC filters to achieve this? Or is there a better solution? Any recommendations? Just to prevent me running off in a totally wrong direction ;) Many thanks in advance, Andreas Schnieders -------------- next part -------------- An HTML attachment was scrubbed... URL: From kguardado at gmail.com Mon Dec 10 06:40:20 2012 From: kguardado at gmail.com (Karina Guardado) Date: Mon, 10 Dec 2012 08:40:20 -0600 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: References: Message-ID: Thank you very much for your reply and will try to reduce the layers but the point is that I have one table with the municipalities but people need to view the differents microred that are 14 and for each one I need to create different queries as long to see only the municipalities that belong to that microred, so the query in the layer of the mapfile is as the follow, and the same point is related with the hospitals and infoecos. So if you or someone could give an idea about how to reduce the amount of layers but I don't want to have two different applications because people want to visualize the information in the sameone but if it is not possible I think I should. LAYER NAME 'MicroredLaPaz' TYPE POLYGON DUMP true EXTENT -90.191281 12.706798 -87.623150 14.902626 CONNECTIONTYPE postgis CONNECTION "dbname='geominsal' host=geo.salud.gob.sv port=5432 user='admin' password='adming30' sslmode=disable" DATA 'the_geom FROM (select a.the_geom as the_geom, a.mign_id as mign_id,a.dpto as dpto,a.muni as muni, a.region as region, r.nombre as microred, a.tipo as tipo, a.dependen as dependen, r.codmicrored as codmicrored from agisdependencias a, municipios_sv_wgs84 m, microred r where m.codmicrored in(48, 49, 50, 51) and a.mign_id=m.mign_id and m.codmicrored=r.codmicrored) as subquery using unique the_geom using SRID=4326' HEADER "templates/header.html" TEMPLATE "templates/contentm.html" FOOTER "templates/footer.html" METADATA 'ows_title' 'municipios_sv_wgs84' "wms_srs" "epsg:4326" 'ows_geometries' 'the_geom' 'wms_enable_request' '*' 'wms_include_items' 'all' 'ows_mygeom_type' 'point' "wms_feature_info_mime_type" "text/html" 'queryable' 'true' "wms_enable_request" "GetMap GetFeatureInfo" END STATUS OFF TRANSPARENCY 100 PROJECTION "init=epsg:4326" END CLASS EXPRESSION ('[codmicrored]' eq '48') STYLE ANTIALIAS false OUTLINECOLOR 0 0 0 COLOR 255 255 153 END #end style END # end class CLASS EXPRESSION ('[codmicrored]' eq '49') STYLE ANTIALIAS false OUTLINECOLOR 0 0 0 COLOR 255 178 102 END #end style END # end class CLASS EXPRESSION ('[codmicrored]' eq '50') STYLE ANTIALIAS false OUTLINECOLOR 0 0 0 COLOR 102 255 102 END #end style END # end class CLASS EXPRESSION ('[codmicrored]' eq '51') STYLE ANTIALIAS false OUTLINECOLOR 0 0 0 COLOR 204 153 255 END #end style END # end class END LAYER NAME 'MicroredCabanas' TYPE POLYGON DUMP true EXTENT -90.191281 12.706798 -87.623150 14.902626 CONNECTIONTYPE postgis CONNECTION "dbname='geominsal' host=geo.salud.gob.sv port=5432 user='admin' password='adming30' sslmode=disable" DATA 'the_geom FROM (select a.the_geom as the_geom, a.mign_id as mign_id,a.dpto as dpto,a.muni as muni, a.region as region, r.nombre as microred, a.tipo as tipo, a.dependen as dependen, r.codmicrored as codmicrored from agisdependencias a, municipios_sv_wgs84 m, microred r where m.codmicrored in(52, 53) and a.mign_id=m.mign_id and m.codmicrored=r.codmicrored) as subquery using unique the_geom using SRID=4326' HEADER "templates/header.html" TEMPLATE "templates/contentm.html" FOOTER "templates/footer.html" METADATA 'ows_title' 'municipios_sv_wgs84' "wms_srs" "epsg:4326" 'ows_geometries' 'the_geom' 'wms_enable_request' '*' 'wms_include_items' 'all' 'ows_mygeom_type' 'point' "wms_feature_info_mime_type" "text/html" 'queryable' 'true' "wms_enable_request" "GetMap GetFeatureInfo" END STATUS OFF TRANSPARENCY 100 PROJECTION "init=epsg:4326" END CLASS EXPRESSION ('[codmicrored]' eq '52') STYLE ANTIALIAS false OUTLINECOLOR 0 0 0 COLOR 255 178 102 END #end style END # end class CLASS EXPRESSION ('[codmicrored]' eq '53') STYLE ANTIALIAS false OUTLINECOLOR 0 0 0 COLOR 102 255 102 END #end style END # end class END On Mon, Dec 10, 2012 at 3:28 AM, Milo van der Linden wrote: > Hello Karina, > > That is a whole lot of layers. Since the WMSGetFeatureInfo uses the > http-get protocol, there are some (browser-specific) limitations: > http://www.boutell.com/newfaq/misc/urllength.html > > Isn't it possible to combine layers? For instance, you now have a microred > layer per municipality, wouldn't it be smarter to make just one microred > layer and make sure that serverside they are all in one layer/file/table? > > > Op 9 dec. 2012 12:48 schreef "Karina Guardado" het > volgende: > >> >> Hello everybody, >> >> I would like to know if there is a limit of layers that I can use with >> the OpenLayers.Control.WMSGetFeatureInfo, because I'm using more than 100 >> and with all the layers after the number 70 I have problems with the popup >> because I can not close them but the others work fine. I'm using >> Openlayers-2.11 , Mapfish, Mapserver, Apache, Linux Debian. >> >> Here is the code of the control >> >> toolbar.addControl(new OpenLayers.Control.WMSGetFeatureInfo({ >> url: ' >> http://geo.salud.gob.sv/cgi-bin/mapserv?MAP=/var/www/geominsal/pages/client/minsal.map&', >> >> title: 'Identify features by clicking', >> queryVisible: true, >> infoFormat:'text/html', >> click: 'true', >> layers: [infecos, infcasasalud, infalbergues, >> infcentronutre, infhospitales, infsibasis, infhogarespera, infpromotor, >> AgisECOS, Municipios, MuniMesoamerica, infecosmesoamerica, >> proyconstruccion, proyconstruccionAvance, proyequipamiento, >> proyequipamientoAvance, MicroredAtiquizaya, MicroredCaraSucia, >> MicroredGuaymango, MicroredJujutla, MicroredSonsonate, MicroredSonzacate, >> MicroredAcajutla, MicroredIzalco, MicroredLourdesColon, MicroredMetapan, >> MicroredTexistepeque, MicroredElcongo, MicroredTomasPineda, >> MicroredChalchuapa, MicroredTejutla, MicroredLaPalma, >> MicroredNuevaConcepcion, MicroredDulceNombre, MicroredChalatenango, >> MicroredGuarjila, MicroredJoyaCeren, MicroredLaCumbre, >> MicroredCordilleraBalsamo, MicroredMacizoCostero, MicroredCentroNorte, >> MicroredOriente, MicroredSur, MicroredOlocuilta, MicroredRosarioPaz, >> MicroredSantiagoNonualco, MicroredZacatecoluca, MicroredIlobasco, >> MicroredSensuntepeque, MicroredSanVicente, MicroredApastepeque, >> MicroredVerapaz, MicroredSanPedroPerulapan, MicroredCandelaria, >> MicroredCojutepeque, MicroredSanRafaelCedros, MicroredJiquilisco, >> MicroredBerlin, MicroredSantiagoMaria, MicroredUsulutan, >> MicroredConcepcionBatres, MicroredNorteSanMiguel, >> MicroredPonienteSanMiguel, MicroredSurSanMiguel, MicroredCentroSanMiguel, >> MicroredOrienteSanMiguel, MicroredAnamoros, MicroredSantaRosa, >> MicroredLlanoPatos, MicroredLaUnion, MicroredJocoro, MicroredPerquin, >> MicroredOsicala, MicroredSanFranciscoGotera, MicroredSensembra, >> ProyConstruccionPrides, ProyConstruccionAvancePrides, >> ProyequipamientoPrides, >> ProyequipamientoAvancePrides,MicroredAtiquizayaMuni, MicroredCaraSuciaMuni, >> MicroredGuaymangoMuni, MicroredJujutlaMuni, MicroredSonsonateMuni, >> MicroredSonzacateMuni, MicroredAcajutlaMuni, MicroredIzalcoMuni, >> MicroredLourdesColonMuni, MicroredMetapanMuni, MicroredTexistepequeMuni, >> MicroredElcongoMuni, MicroredTomasPinedaMuni, MicroredChalchuapaMuni, >> MicroredTejutlaMuni, MicroredLaPalmaMuni, MicroredNuevaConcepcionMuni, >> MicroredDulceNombreMuni, MicroredChalatenangoMuni, MicroredGuarjilaMuni, >> MicroredJoyaCerenMuni, MicroredLaCumbreMuni, MicroredCordilleraBalsamoMuni, >> MicroredMacizoCosteroMuni, MicroredCentroNorteMuni, MicroredOrienteMuni, >> MicroredSurMuni, MicroredOlocuiltaMuni, MicroredRosarioPazMuni, >> MicroredSantiagoNonualcoMuni, MicroredZacatecolucaMuni, >> MicroredIlobascoMuni, MicroredSensuntepequeMuni, MicroredSanVicenteMuni, >> MicroredApastepequeMuni, MicroredVerapazMuni, >> MicroredSanPedroPerulapanMuni, MicroredCandelariaMuni, >> MicroredCojutepequeMuni, MicroredSanRafaelCedrosMuni, >> MicroredJiquiliscoMuni, MicroredBerlinMuni, MicroredSantiagoMariaMuni, >> MicroredUsulutanMuni, MicroredConcepcionBatresMuni, >> MicroredNorteSanMiguelMuni, MicroredPonienteSanMiguelMuni, >> MicroredSurSanMiguelMuni, MicroredCentroSanMiguelMuni, >> MicroredOrienteSanMiguelMuni, MicroredAnamorosMuni, MicroredSantaRosaMuni, >> MicroredLlanoPatosMuni, MicroredLaUnionMuni, MicroredJocoroMuni, >> MicroredPerquinMuni, MicroredOsicalaMuni, MicroredSanFranciscoGoteraMuni, >> MicroredSensembraMuni, infecosAtiquizaya, infhospitalesAtiquizaya, >> infecosCaraSucia, infhospitalesCaraSucia, infecosGuaymango, >> infhospitalesGuaymango, infecosJujutla, infhospitalesJujutla, >> infecosAhuachapan, infhospitalesAhuachapan, infecosSonsonate, >> infhospitalesSonsonate, infecosSonzacate, infhospitalesSonzacate, >> infecosAcajutla, infhospitalesAcajutla, infecosIzalco, infhospitalesIzalco, >> infecosLourdesColon, infhospitalesLourdesColon, infecosMetapan, >> infhospitalesMetapan, infecosTexistepeque, infhospitalesTexistepeque, >> infecosElcongo, infhospitalesElcongo, infecosTomasPineda, >> infhospitalesTomasPineda, infecosChalchuapa, infhospitalesChalchuapa, >> infecosTejutla, infhospitalesTejutla, infecosLaPalma, infhospitalesLaPalma, >> infecosNuevaConcepcion, infhospitalesNuevaConcepcion, infecosDulceNombre, >> infhospitalesDulceNombre, infecosChalatenango, infhospitalesChalatenango, >> infecosGuarjila, infhospitalesGuarjila, infecosJoyaCeren, >> infhospitalesJoyaCeren, infecosLaCumbre, infhospitalesLaCumbre, >> infecosCordilleraBalsamo, infhospitalesCordilleraBalsamo, >> infecosMacizoCostero, infhospitalesMacizoCostero, infecosCentroNorte, >> infhospitalesCentroNorte, infecosOriente, infhospitalesOriente, infecosSur, >> infhospitalesSur, infecosOlocuilta, infhospitalesOlocuilta, >> infecosRosarioPaz, infhospitalesRosarioPaz, infecosSantiagoNonualco, >> infhospitalesSantiagoNonualco, infecosZacatecoluca, >> infhospitalesZacatecoluca, infecosSensuntepeque, >> infhospitalesSensuntepeque, infecosIlobasco, infhospitalesIlobasco, >> infecosSanVicente, infhospitalesSanVicente, infecosVerapaz, >> infhospitalesVerapaz, infecosApastepeque, infhospitalesApastepeque, >> infecosSanPedroPerulapan, infhospitalesSanPedroPerulapan, >> infecosCandelaria, infhospitalesCandelaria, infecosCojutepeque, >> infhospitalesCojutepeque, infecosSanRafaelCedros, >> infhospitalesSanRafaelCedros, infecosJiquilisco, infhospitalesJiquilisco, >> infecosBerlin, infhospitalesBerlin, infecosSantiagoMaria, >> infhospitalesSantiagoMaria, infecosUsulutan, infhospitalesUsulutan, >> infecosConcepcionBatres, infhospitalesConcepcionBatres, >> infecosNorteSanMiguel, infhospitalesNorteSanMiguel, >> infecosPonienteSanMiguel, infhospitalesPonienteSanMiguel, >> infecosSurSanMiguel, infhospitalesSurSanMiguel, infecosCentroSanMiguel, >> infhospitalesCentroSanMiguel, infecosOrienteSanMiguel, >> infhospitalesOrienteSanMiguel, infecosAnamoros, infhospitalesAnamoros, >> infecosSantaRosa, infhospitalesSantaRosa, infecosLlanoPatos, >> infhospitalesLlanoPatos, infecosLaUnion, infhospitalesLaUnion, >> infecosJocoro, infhospitalesJocoro, infecosPerquin, infhospitalesPerquin, >> infecosOsicala, infhospitalesOsicala, infecosSanFranciscoGotera, >> infhospitalesSanFranciscoGotera, infecosSensembra, infhospitalesSensembra, >> RegionOriental, RegionParacentral, RegionCentral, RegionOccidental, >> RegionMetropolitana ], >> eventListeners: { >> getfeatureinfo: function(event) { >> map.addPopup(new OpenLayers.Popup.FramedCloud( >> \"chicken\", >> map.getLonLatFromPixel(event.xy), >> null, >> event.text, >> null, >> true >> )); >> } >> } >> },{ >> isDefault: true, >> title: 'Info' >> }), >> { >> iconCls: 'query', >> toggleGroup: 'map' >> }); >> >> >> >> thanks and regards >> >> >> Karina Guardado >> El Salvador >> >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From kguardado at gmail.com Mon Dec 10 06:51:38 2012 From: kguardado at gmail.com (Karina Guardado) Date: Mon, 10 Dec 2012 08:51:38 -0600 Subject: [OpenLayers-Users] problem with open up popup with WMSGetFeatureInfo control In-Reply-To: <1355132002166-5021842.post@n6.nabble.com> References: <1355132002166-5021842.post@n6.nabble.com> Message-ID: Thank you for your soon reply and if you have a link to an example I would appreciate it a lot. Do you know if this method post can be used with the version 2.11? bye On Mon, Dec 10, 2012 at 3:33 AM, OpenGSC <945070223 at qq.com> wrote: > yes ,get request has some limitation,may be you ought to use post > request.OL > has demo > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/problem-with-open-up-popup-with-WMSGetFeatureInfo-control-tp5021490p5021842.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- M.Sc. Karina Guardado Celular: (503) 7115 2898 -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.scadden at gns.cri.nz Mon Dec 10 12:14:03 2012 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Tue, 11 Dec 2012 09:14:03 +1300 Subject: [OpenLayers-Users] Filter features in multiple geographical areas? In-Reply-To: References: Message-ID: <50C6428B.3010305@gns.cri.nz> > Would I use multiple OGC filters to achieve this? Or is there a better > solution? Any recommendations? Just to prevent me running off in a > totally wrong direction ;) Not that helpful, but are you absolutely forced to use KML? Unless your point count is low, any client-side solution will be very slow. If at all possible you want data to be within a spatial database server-side and to do the filtering there. Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From p.scadden at gns.cri.nz Mon Dec 10 12:20:13 2012 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Tue, 11 Dec 2012 09:20:13 +1300 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: References: Message-ID: <50C643FD.1040107@gns.cri.nz> I am not familiar with Mapserver at all, however it looks to me like each of your layers are in fact queries (EXPRESSION(etc)) on some deeper baselayer. ( agisdependencias) Could you serve the baselayer (but not display it) and do the WMSGetFeatureInfo just against this single layer? Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From pascal2833 at gmail.com Mon Dec 10 12:35:50 2012 From: pascal2833 at gmail.com (pascal evano) Date: Mon, 10 Dec 2012 21:35:50 +0100 Subject: [OpenLayers-Users] Show and hide maps with a button in OpenLayers In-Reply-To: <1355110244975-5021770.post@n6.nabble.com> References: <1354643770870-5020705.post@n6.nabble.com> <1354678945235-5020808.post@n6.nabble.com> <1354843915590-5021339.post@n6.nabble.com> <1355110244975-5021770.post@n6.nabble.com> Message-ID: Hi! I find a solution (I used remove map, OL function) and then pass this function in JQuery. Thanks for your help! Pascal. 2012/12/10 OpenGSC <945070223 at qq.com> > please look at OL Layer's API ,maybe display() function can meet you > > > > > > > ogcer v1.0 tile loader developer. > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/Show-and-hide-maps-with-a-button-in-OpenLayers-tp5020705p5021770.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kguardado at gmail.com Mon Dec 10 13:24:44 2012 From: kguardado at gmail.com (Karina Guardado) Date: Mon, 10 Dec 2012 15:24:44 -0600 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: <50C643FD.1040107@gns.cri.nz> References: <50C643FD.1040107@gns.cri.nz> Message-ID: Thank you for the idea, you know the point is that I need to have diferent queries to visualize just a certain area and give a different color to the municipalities that belong to that area so I nee different layers for that but I see that the main problem is when I have the tree to select the layer if I locate one layer in the last position I have problems with the popup but when I locate the same layer in the first positions I have no problems. So I found that the problem is more related with the amount of layers I'm using even when I use just a few ones in the WMSGetFeatureInfo to retrieve information. People in other emails say that is related with the browser limitation and I think that I should probably use mainly a Post and not a Get metho but have no idea about how to do that, does it mean no to use WMSGetFeatureInfo ? Thank you for your help. best regards On Mon, Dec 10, 2012 at 2:20 PM, Phil Scadden wrote: > I am not familiar with Mapserver at all, however it looks to me like > each of your layers are in fact queries (EXPRESSION(etc)) on some deeper > baselayer. ( agisdependencias) Could you serve the baselayer (but not > display it) and do the WMSGetFeatureInfo just against this single layer? > > Notice: This email and any attachments are confidential. If received in > error please destroy and immediately notify us. Do not copy or disclose the > contents. > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- M.Sc. Karina Guardado Celular: (503) 7115 2898 -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.scadden at gns.cri.nz Mon Dec 10 14:01:53 2012 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Tue, 11 Dec 2012 11:01:53 +1300 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: References: <50C643FD.1040107@gns.cri.nz> Message-ID: <50C65BD1.9070104@gns.cri.nz> Depends on how you are using WMSGetFeatureInfo. The WMSGetFeatureInfo control does a GET. You could use a click handler and explicitly do a request.POST. However, back to the structure -- I understand the need to have different layers with different colours (though it looks to me like you could achieve the same thing with an SLD). The question though is whether the wmsgetfeatureInfo has to made against the same layer as you are displaying. Use the layers property on the control (not documented but see the source code) to specify a hidden layer by which the query is done on. Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From kguardado at gmail.com Mon Dec 10 14:21:22 2012 From: kguardado at gmail.com (Karina Guardado) Date: Mon, 10 Dec 2012 16:21:22 -0600 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: <50C65BD1.9070104@gns.cri.nz> References: <50C643FD.1040107@gns.cri.nz> <50C65BD1.9070104@gns.cri.nz> Message-ID: Do you have an example please using this part where you mention "the layers property on the control (not documented but see the source code) to specify a hidden layer by which the query is done on". Also if you have a link to an example how to use the Post method please. Thank you so much for your help On Mon, Dec 10, 2012 at 4:01 PM, Phil Scadden wrote: > Depends on how you are using WMSGetFeatureInfo. The WMSGetFeatureInfo > control does a GET. You could use a click handler and explicitly do a > request.POST. > > However, back to the structure -- I understand the need to have > different layers with different colours (though it looks to me like you > could achieve the same thing with an SLD). The question though is > whether the wmsgetfeatureInfo has to made against the same layer as you > are displaying. Use the layers property on the control (not documented > but see the source code) to specify a hidden layer by which the query is > done on. > > Notice: This email and any attachments are confidential. If received in > error please destroy and immediately notify us. Do not copy or disclose the > contents. > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- M.Sc. Karina Guardado Celular: (503) 7115 2898 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kguardado at gmail.com Mon Dec 10 14:34:09 2012 From: kguardado at gmail.com (Karina Guardado) Date: Mon, 10 Dec 2012 16:34:09 -0600 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: References: <50C643FD.1040107@gns.cri.nz> <50C65BD1.9070104@gns.cri.nz> Message-ID: I forgot to ask if it s better to use select from text file where I have one php application and when just click on one point I get the information but the issue is that I can not change the popup style with css, because it uses a print option with a tab separation and I need to show a table with css style but have not idea how to do it here is the code of my file. var infecos = new OpenLayers.Layer.Text( \"infecos\", {location: \"textsedesecos.php\"}, \"http://myhost/cgi-bin/mapserv?MAP=/myfolder/mymapfile.map\"); this the textsedesecos.php file Municipio:$muni
Codigo:$codmuni
Departamento:$dpto" . "\t" . "14,14" . "\t" . "htt://myhost/ecos_blue24.png" . "\n"); } ?> On Mon, Dec 10, 2012 at 4:21 PM, Karina Guardado wrote: > Do you have an example please using this part where you mention "the > layers property on the control (not documented > but see the source code) to specify a hidden layer by which the query is > done on". Also if you have a link to an example how to use the Post method > please. > > Thank you so much for your help > > > On Mon, Dec 10, 2012 at 4:01 PM, Phil Scadden wrote: > >> Depends on how you are using WMSGetFeatureInfo. The WMSGetFeatureInfo >> control does a GET. You could use a click handler and explicitly do a >> request.POST. >> >> However, back to the structure -- I understand the need to have >> different layers with different colours (though it looks to me like you >> could achieve the same thing with an SLD). The question though is >> whether the wmsgetfeatureInfo has to made against the same layer as you >> are displaying. Use the layers property on the control (not documented >> but see the source code) to specify a hidden layer by which the query is >> done on. >> >> Notice: This email and any attachments are confidential. If received in >> error please destroy and immediately notify us. Do not copy or disclose the >> contents. >> >> _______________________________________________ >> Users mailing list >> Users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> > > > > -- > M.Sc. Karina Guardado > Celular: (503) 7115 2898 > > > > -- M.Sc. Karina Guardado Celular: (503) 7115 2898 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpriour at kestrelcomputer.com Mon Dec 10 14:32:20 2012 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Mon, 10 Dec 2012 16:32:20 -0600 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: References: <50C643FD.1040107@gns.cri.nz> Message-ID: <50C662F4.6080107@kestrelcomputer.com> On 12/10/2012 3:24 PM, Karina Guardado wrote: > Thank you for the idea, you know the point is that I need to have > diferent queries to visualize just a certain area and give a different > color to the municipalities that belong to that area so I nee > different layers for that but I see that the main problem is when I > have the tree to select the layer if I locate one layer in the last > position I have problems with the popup but when I locate the same > layer in the first positions I have no problems. > > So I found that the problem is more related with the amount of layers > I'm using even when I use just a few ones in the WMSGetFeatureInfo to > retrieve information. People in other emails say that is related with > the browser limitation and I think that I should probably use mainly a > Post and not a Get metho but have no idea about how to do that, does > it mean no to use WMSGetFeatureInfo ? > > Thank you for your help. > > best regards > On Mon, Dec 10, 2012 at 2:20 PM, Phil Scadden > wrote: > > I am not familiar with Mapserver at all, however it looks to me like > each of your layers are in fact queries (EXPRESSION(etc)) on some > deeper > baselayer. ( agisdependencias) Could you serve the baselayer (but not > display it) and do the WMSGetFeatureInfo just against this single > layer? > > Notice: This email and any attachments are confidential. If > received in error please destroy and immediately notify us. Do not > copy or disclose the contents. > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > > > > -- > M.Sc. Karina Guardado > Celular: (503) 7115 2898 > > > > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users The popup hiding issue is a z-Index problem. When you get lots of layers in your map, it is possible that they have a higher z-Index than the default z-Index value of the popup. The best way to fix this (besides using less layers) is to do this: OpenLayers.Map.Z_INDEX_BASE.Popup = 900; somewhere in your application, before any popups are created. Matt Priour Kestrel Computer Consulting -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Mon Dec 10 17:19:56 2012 From: 945070223 at qq.com (OpenGSC) Date: Mon, 10 Dec 2012 17:19:56 -0800 (PST) Subject: [OpenLayers-Users] problem with open up popup with WMSGetFeatureInfo control In-Reply-To: References: <1355132002166-5021842.post@n6.nabble.com> Message-ID: <1355188796504-5022072.post@n6.nabble.com> http://openlayers.org/dev/examples/wms-long-url.html whether 2.11 has this function you ought to look at api of OL -- View this message in context: http://osgeo-org.1560.n6.nabble.com/problem-with-open-up-popup-with-WMSGetFeatureInfo-control-tp5021490p5022072.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kguardado at gmail.com Mon Dec 10 17:58:36 2012 From: kguardado at gmail.com (Karina Guardado) Date: Mon, 10 Dec 2012 19:58:36 -0600 Subject: [OpenLayers-Users] How many layers can I use with "OpenLayers.Control.WMSGetFeatureInfo" In-Reply-To: <50C662F4.6080107@kestrelcomputer.com> References: <50C643FD.1040107@gns.cri.nz> <50C662F4.6080107@kestrelcomputer.com> Message-ID: Thank you so much!!!!, this is the solution for my problem, I just add the following line as you sujested: map.Z_INDEX_BASE.Popup = 5000; And now I have no problems with the popup , now I can close them for wathever layer that I load and even when I have many layers and it does not matter if the layer is the last one or the first one. So I'm sure this solution as the other ones that many people has mentioned will be very usefull for others. best regards and thank you very much!!! saludos y muchas gracias!!! On Mon, Dec 10, 2012 at 4:32 PM, Matt Priour wrote: > On 12/10/2012 3:24 PM, Karina Guardado wrote: > > Thank you for the idea, you know the point is that I need to have diferent > queries to visualize just a certain area and give a different color to the > municipalities that belong to that area so I nee different layers for that > but I see that the main problem is when I have the tree to select the > layer if I locate one layer in the last position I have problems with the > popup but when I locate the same layer in the first positions I have no > problems. > > So I found that the problem is more related with the amount of layers I'm > using even when I use just a few ones in the WMSGetFeatureInfo to retrieve > information. People in other emails say that is related with the browser > limitation and I think that I should probably use mainly a Post and not a > Get metho but have no idea about how to do that, does it mean no to use > WMSGetFeatureInfo ? > > Thank you for your help. > > best regards > On Mon, Dec 10, 2012 at 2:20 PM, Phil Scadden wrote: > >> I am not familiar with Mapserver at all, however it looks to me like >> each of your layers are in fact queries (EXPRESSION(etc)) on some deeper >> baselayer. ( agisdependencias) Could you serve the baselayer (but not >> display it) and do the WMSGetFeatureInfo just against this single layer? >> >> Notice: This email and any attachments are confidential. If received in >> error please destroy and immediately notify us. Do not copy or disclose the >> contents. >> >> _______________________________________________ >> Users mailing list >> Users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> > > > > -- > M.Sc. Karina Guardado > Celular: (503) 7115 2898 > > > > > > _______________________________________________ > Users mailing listUsers at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/openlayers-users > > The popup hiding issue is a z-Index problem. When you get lots of layers > in your map, it is possible that they have a higher z-Index than the > default z-Index value of the popup. > The best way to fix this (besides using less layers) is to do this: > > OpenLayers.Map.Z_INDEX_BASE.Popup = 900; > > somewhere in your application, before any popups are created. > > Matt Priour > Kestrel Computer Consulting > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > -- M.Sc. Karina Guardado Celular: (503) 7115 2898 -------------- next part -------------- An HTML attachment was scrubbed... URL: From reinaldo at geodesign.com.br Mon Dec 10 18:42:16 2012 From: reinaldo at geodesign.com.br (reinaldo at geodesign.com.br) Date: Tue, 11 Dec 2012 00:42:16 -0200 (BRST) Subject: [OpenLayers-Users] Can Not Get Rule-based Styling to Work with KML Message-ID: OP Users, I can't get the rule-base styling to work on KML file. Please find below my JS, HTML and KML files. I would appreciate very much if someone could help me. I examined the examples, read the documentation and double checked the KML file structure. Evertyhing indicate that the rule-based styling should work, but it doesn't. I created a simple kml file with one attribute for each placemark. I can get the attributes rendered as labels, but I can not do the rule-based styling to work It looks like the rules are not being evaluated because I only get the elseifFilter style result rendered. It does not evaluate the other two EQUAL_TO rules, or any other Filter.Comparison rule. Thanks in advance, Reinaldo *** JS FILE ************************************** var map = new OpenLayers.Map("map"); var vector_style = new OpenLayers.Style( { fillColor: "#00ff00", fillOpacity: 0.1, strokeWidth: 1, strokeColor: "#0000ff", strokeOpacity: 4, // label: 'S{state}', // fontColor: "#ff0000", // fontFamily: "sans-serif", // fontSize: "10px", // fontWeight: "bold" }, //{ //context: { //state: function(feature){ return feature.attributes.SUMMER.value; } //}}, { rules: [ new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "SUMMER", value: 1000.123 }), symbolizer: { fillColor: "#ff0000", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#ff0000", strokeOpacity: 4, } }), new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "SUMMER", value: 2000.123 }), symbolizer: { fillColor: "#00ff00", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#00ff00", strokeOpacity: 4, } }), new OpenLayers.Rule({ // apply this rule if no others apply elseFilter: true, symbolizer: { fillColor: "#ffff00", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#ffffff", strokeOpacity: 4, } }) ] } ); var vector_style_map = new OpenLayers.StyleMap({ 'default': vector_style }); var vectorlayer = new OpenLayers.Layer.Vector("SOLAR RAD BAHIA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_diff_simple1.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), styleMap: vector_style_map }); var googleLayer = new OpenLayers.Layer.Google("Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} ); map.addLayers([googleLayer, vectorlayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); *** HTML FILE ************************************** #map { width: 600px; height: 450px; border: 1px solid black; } OpenLayers Example simple, basic, light *** KML FILE ************************************** diffuse_summer ff0000ff 0 1000.123 -39.551991120000018,-8.654038020000009 -39.461196960000017,-8.650702980000011 -39.457748160000023,-8.738279009999998 -39.54856104000001,-8.741648970000023 -39.551991120000018,-8.654038020000009 ff0000ff 0 2000.123 -39.370407120000024,-8.647350030000021 -39.27961296000003,-8.643977999999999 -39.27612708000003,-8.731485000000008 -39.366936000000003,-8.734890960000024 -39.370407120000024,-8.647350030000021 ff0000ff 0 3000.123 -41.365158120000011,-8.805078990000009 -41.274315,-8.802090000000005 -41.271233040000013,-8.890313040000013 -41.362098840000023,-8.893332990000021 -41.365158120000011,-8.805078990000009 ------------------------------------ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br (http://www.geodesign.com.br) Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta -------------- next part -------------- An HTML attachment was scrubbed... URL: From smaran.harihar at gmail.com Tue Dec 11 10:28:11 2012 From: smaran.harihar at gmail.com (Smaran Harihar) Date: Tue, 11 Dec 2012 11:28:11 -0700 Subject: [OpenLayers-Users] 502 Bad Gateway Message-ID: Hi guys, I am trying to access the featureInfo in my application and I keep getting 502 Bad Gateway Network error. In teh console log under the response tab I am getting this error, This proxy does not allow you to access that location ( castle.iplantcollaborative.org:8080). The GET param is, http://castle.iplantcollaborative.org:8080/geoserver/wms/?LAYERS=opengeo%3APimaPine,opengeo%3ABIEN_Species_Richness_Margalef,opengeo%3ABIEN_Species_Richness,opengeo%3ABIEN_Species_Richness_Margalef_Interpolated&QUERY_LAYERS=opengeo%3APimaPine,opengeo%3ABIEN_Species_Richness_Margalef,opengeo%3ABIEN_Species_Richness,opengeo%3ABIEN_Species_Richness_Margalef_Interpolated&STYLES=,,,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-18295967.087793%2C-10684061.894102%2C18295967.087793%2C10684062.234102&FEATURE_COUNT=10&HEIGHT=546&WIDTH=935&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A900913&X=174&Y=140 My `/usr/lib/cgi-bin/proxy.cgi` has the domain's url added to it's allowed hosts. The apache error.log file was giving this error, Permission denied: exec of '/usr/lib/cgi-bin/proxy.cgi' failed But when I changed the `chmod` for the proxy.cgi file to `root:root` it is not giving that error but it continues to give 502 Bad Gateway. I know I need to make some changes somewhere in the user permissions but not sure where? Any idea what I should correct? -- Thanks & Regards Smaran Harihar -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnd.wippermann at web.de Tue Dec 11 11:57:22 2012 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Tue, 11 Dec 2012 20:57:22 +0100 Subject: [OpenLayers-Users] Can Not Get Rule-based Styling to Work with KML In-Reply-To: References: Message-ID: <49FD43BCDC1C42BC82378E1BAB947164@pcawh2> try with attributes like 1000.123 instead of this 1000.123 then your code should work. Very likely the property in the filter doesn't evaluate against ExtendedData. Arnd _____ Von: openlayers-users-bounces at lists.osgeo.org [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von reinaldo at geodesign.com.br Gesendet: Dienstag, 11. Dezember 2012 03:42 An: openlayers-users at lists.osgeo.org; OpenGSC Betreff: [OpenLayers-Users] Can Not Get Rule-based Styling to Work with KML OP Users, I can't get the rule-base styling to work on KML file. Please find below my JS, HTML and KML files. I would appreciate very much if someone could help me. I examined the examples, read the documentation and double checked the KML file structure. Evertyhing indicate that the rule-based styling should work, but it doesn't. I created a simple kml file with one attribute for each placemark. I can get the attributes rendered as labels, but I can not do the rule-based styling to work It looks like the rules are not being evaluated because I only get the elseifFilter style result rendered. It does not evaluate the other two EQUAL_TO rules, or any other Filter.Comparison rule. Thanks in advance, Reinaldo *** JS FILE ************************************** var map = new OpenLayers.Map("map"); var vector_style = new OpenLayers.Style( { fillColor: "#00ff00", fillOpacity: 0.1, strokeWidth: 1, strokeColor: "#0000ff", strokeOpacity: 4, // label: '${state}', // fontColor: "#ff0000", // fontFamily: "sans-serif", // fontSize: "10px", // fontWeight: "bold" }, //{ //context: { //state: function(feature){ return feature.attributes.SUMMER.value; } //}}, { rules: [ new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "SUMMER", value: 1000.123 }), symbolizer: { fillColor: "#ff0000", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#ff0000", strokeOpacity: 4, } }), new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "SUMMER", value: 2000.123 }), symbolizer: { fillColor: "#00ff00", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#00ff00", strokeOpacity: 4, } }), new OpenLayers.Rule({ // apply this rule if no others apply elseFilter: true, symbolizer: { fillColor: "#ffff00", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#ffffff", strokeOpacity: 4, } }) ] } ); var vector_style_map = new OpenLayers.StyleMap({ 'default': vector_style }); var vectorlayer = new OpenLayers.Layer.Vector("SOLAR RAD BAHIA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_diff_simple1.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), styleMap: vector_style_map }); var googleLayer = new OpenLayers.Layer.Google("Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} ); map.addLayers([googleLayer, vectorlayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); *** HTML FILE **************************************

OpenLayers Example

simple, basic, light
*** KML FILE ************************************** diffuse_summer 1000.123 -39.551991120000018,-8.654038020000009 -39.461196960000017,-8.650702980000011 -39.457748160000023,-8.738279009999998 -39.54856104000001,-8.741648970000023 -39.551991120000018,-8.654038020000009 2000.123 -39.370407120000024,-8.647350030000021 -39.27961296000003,-8.643977999999999 -39.27612708000003,-8.731485000000008 -39.366936000000003,-8.734890960000024 -39.370407120000024,-8.647350030000021 3000.123 -41.365158120000011,-8.805078990000009 -41.274315,-8.802090000000005 -41.271233040000013,-8.890313040000013 -41.362098840000023,-8.893332990000021 -41.365158120000011,-8.805078990000009 _____ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.scadden at gns.cri.nz Tue Dec 11 12:07:47 2012 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed, 12 Dec 2012 09:07:47 +1300 Subject: [OpenLayers-Users] 502 Bad Gateway In-Reply-To: References: Message-ID: <50C79293.2030106@gns.cri.nz> If your proxy is based on the openlayers example proxy.cgi, you will see that the error for a host that is not allowed is: 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 This pretty much describe what you are seeing. I would say that your host castle.iplantcollaborative.org is not in the allowedHosts list or that you have misspelled it there. Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robbie at ushahidi.com Tue Dec 11 12:09:40 2012 From: robbie at ushahidi.com (Robbie MacKay) Date: Wed, 12 Dec 2012 09:09:40 +1300 Subject: [OpenLayers-Users] Disable zoom limitations without disabling wrapDateLine Message-ID: Hi All, I'm trying to figure out if there is a way to disable the zoom limitations - i.e. allow zooming out to more that one world visible - without disabling wrapDateLine? This used to be the behaviour before OL 2.12 - but this changed in 2.12 "OpenLayers won't zoom out to resolutions where more than one world is visible any more. For maps that have base layers with wrapDateLine set to false, no zoom restrictions apply." https://github.com/openlayers/openlayers/blob/master/notes/2.12.md#changes-when-base-layer-configured-with-wrapdateline-true The reason I want to do this is a have a few maps where dimensions are such that to zoom out enough to show the full world they end up overlapping the date line slightly. However after upgrading to 2.12 I can no longer zoom out fully. -- Robbie Mackay Software Developer, External Projects Ushahidi Inc e: robbie at ushahidi.com skype: robbie.mackay -------------- next part -------------- An HTML attachment was scrubbed... URL: From smaran.harihar at gmail.com Tue Dec 11 13:03:54 2012 From: smaran.harihar at gmail.com (Smaran Harihar) Date: Tue, 11 Dec 2012 14:03:54 -0700 Subject: [OpenLayers-Users] 502 Bad Gateway In-Reply-To: <50C79293.2030106@gns.cri.nz> References: <50C79293.2030106@gns.cri.nz> Message-ID: Yes you are right Phil. I realized that later and changed it but was still giving me the same error. Then I realized I had to clear my browser history and now it is working fine. Thanks, Smaran On Tue, Dec 11, 2012 at 1:07 PM, Phil Scadden wrote: > If your proxy is based on the openlayers example proxy.cgi, you will see > that the error for a host that is not allowed is: > > 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 > > This pretty much describe what you are seeing. I would say that your host > castle.iplantcollaborative.org > is not in the allowedHosts list or that you have misspelled it there. > > Notice: This email and any attachments are confidential. If received in > error please destroy and immediately notify us. Do not copy or disclose the > contents. > > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > -- Thanks & Regards Smaran Harihar -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahocevar at opengeo.org Wed Dec 12 03:20:35 2012 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed, 12 Dec 2012 12:20:35 +0100 Subject: [OpenLayers-Users] Disable zoom limitations without disabling wrapDateLine In-Reply-To: References: Message-ID: Hi, there is currently no API compliant way to do this. It would not be hard to add an option for it though. The method that applies this restriction is OpenLayers.Map::adjustZoom. Maybe you want to submit a pull request? If not, although the adjustZoom method is not part of the API, a quick and unsupported hack would be to set a map option: adjustZoom: function(zoom) { return zoom; } Andreas. On Tue, Dec 11, 2012 at 9:09 PM, Robbie MacKay wrote: > Hi All, > > I'm trying to figure out if there is a way to disable the zoom limitations - > i.e. allow zooming out to more that one world visible - without disabling > wrapDateLine? > > This used to be the behaviour before OL 2.12 - but this changed in 2.12 > "OpenLayers won't zoom out to resolutions where more than one world is > visible any more. For maps that have base layers with wrapDateLine set to > false, no zoom restrictions apply." > https://github.com/openlayers/openlayers/blob/master/notes/2.12.md#changes-when-base-layer-configured-with-wrapdateline-true > > The reason I want to do this is a have a few maps where dimensions are such > that to zoom out enough to show the full world they end up overlapping the > date line slightly. However after upgrading to 2.12 I can no longer zoom out > fully. > > -- > Robbie Mackay > > Software Developer, External Projects > Ushahidi Inc > e: robbie at ushahidi.com > skype: robbie.mackay > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From gamejihou at hotmail.com Wed Dec 12 04:21:09 2012 From: gamejihou at hotmail.com (Gery .) Date: Wed, 12 Dec 2012 12:21:09 +0000 Subject: [OpenLayers-Users] vector doesn't display Message-ID: Hello, I have some features in GeoJSON format I want to display, so I did this: [code] var vectorLayer = null; var vectorStyle = { graphicName: 'square', strokeColor: '#222', fillColor: '#222' }; var styleDefault = OpenLayers.Util.applyDefaults( vectorStyle, OpenLayers.Feature.Vector.style['default'] ); vectorLayer = new OpenLayers.Layer.Vector('search', { styleMap: new OpenLayers.StyleMap( { 'default': styleDefault } ), displayInLayerSwitcher: true } ); [/code] but they don't appear in the map, my question is if this is enough to get the features displayed or do I need something else there? if this is enough, I should think that this problem is about how the features are being read by OL. In fact, this doesn't work either: var ll = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y); mapPanel.map.setCenter(ll); I get: feature is not definedvar ll = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y); why should this happen? thanks in advance __________________________________________________________________________________________ Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario. Think green - keep it on the screen. Do NOT print if it is NOT necessary. Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist. -------------- next part -------------- An HTML attachment was scrubbed... URL: From BrianJBaldwin at gmail.com Wed Dec 12 07:37:53 2012 From: BrianJBaldwin at gmail.com (BrianJBaldwin) Date: Wed, 12 Dec 2012 07:37:53 -0800 (PST) Subject: [OpenLayers-Users] OpenLS Geocode Not Working Message-ID: <1355326673534-5022525.post@n6.nabble.com> NOOB here, I copied almost verbatim the code found in the OpenLS example and it is not working when I host it. My code and the *example code* (when hosted on two different servers) both come up with the same error "An error occurred while communicating with the OpenLS service. Please try again." But the example code hosted at OpenLayers works as expected. I can't find any differences between the two sources. My map is found here: http://www.brianjamesbaldwin.com/Milwaukee/ Any tips? Thanks so much, Brian -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLS-Geocode-Not-Working-tp5022525.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From brianjbaldwin at gmail.com Wed Dec 12 09:18:34 2012 From: brianjbaldwin at gmail.com (Brian Baldwin) Date: Wed, 12 Dec 2012 11:18:34 -0600 Subject: [OpenLayers-Users] OpenLS Geocode Not Working In-Reply-To: <50C97080020000370000E54D@lx-gwgate1.asurequality.com> References: <50C97080020000370000E54D@lx-gwgate1.asurequality.com> Message-ID: Robert, Thanks for the reply. I just stumbled upon the proxy issue. Does it matter that we are running IIS and not Apache? Does the proxy need to be in my web root or can it reside anywhere? I also saw that it could be formatted as a .php file? Sorry, kind of new to the OpenLayers Thanks so much, * Brian James Baldwin*, MURP Milwaukee, WI 53208 (808)-937-2601 China RPCV 2005-2007 On Wed, Dec 12, 2012 at 11:06 AM, Robert Sanson < Robert.Sanson at asurequality.com> wrote: > Hi Brian > > Did you set up a proxy.cgi script in your cgi-bin folder, and include the > address of the OpenLS service in it? > > Regards, > > Robert Sanson > > >>> BrianJBaldwin 12/12/12 8:38 AM >>> > NOOB here, > > I copied almost verbatim the code found in the OpenLS example and it is not > working when I host it. My code and the *example code* (when hosted on two > different servers) both come up with the same error "An error occurred > while > communicating with the OpenLS service. Please try again." But the example > code hosted at OpenLayers works as expected. > > I can't find any differences between the two sources. > > My map is found here: http://www.brianjamesbaldwin.com/Milwaukee/ > > Any tips? > > Thanks so much, > Brian > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/OpenLS-Geocode-Not-Working-tp5022525.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > > This email and any attachments are confidential and intended solely for > the addressee(s). If you are not the intended recipient, please notify us > immediately and then delete this email from your system. > > This message has been scanned for Malware and Viruses by Websense Hosted > Security. www.websense.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.Sanson at asurequality.com Wed Dec 12 09:06:56 2012 From: Robert.Sanson at asurequality.com (Robert Sanson) Date: Thu, 13 Dec 2012 06:06:56 +1300 Subject: [OpenLayers-Users] OpenLS Geocode Not Working Message-ID: <50C97080020000370000E54D@lx-gwgate1.asurequality.com> Hi Brian Did you set up a proxy.cgi script in your cgi-bin folder, and include the address of the OpenLS service in it? Regards, Robert Sanson >>> BrianJBaldwin 12/12/12 8:38 AM >>> NOOB here, I copied almost verbatim the code found in the OpenLS example and it is not working when I host it. My code and the *example code* (when hosted on two different servers) both come up with the same error "An error occurred while communicating with the OpenLS service. Please try again." But the example code hosted at OpenLayers works as expected. I can't find any differences between the two sources. My map is found here: http://www.brianjamesbaldwin.com/Milwaukee/ Any tips? Thanks so much, Brian -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLS-Geocode-Not-Working-tp5022525.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system. This message has been scanned for Malware and Viruses by Websense Hosted Security. www.websense.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpriour at kestrelcomputer.com Wed Dec 12 10:11:01 2012 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Wed, 12 Dec 2012 12:11:01 -0600 Subject: [OpenLayers-Users] vector doesn't display In-Reply-To: References: Message-ID: <50C8C8B5.6050003@kestrelcomputer.com> You have to actually load the GeoJSON features into the layer. First, look at the following examples: http://openlayers.org/dev/examples/geojson-reprojected.html http://openlayers.org/dev/examples/cartodb-geojson.html They both use a Fixed strategy which is the best one if you want to load your data once and have it in a static file or known URL. You would add your style definition to the vector layer definition they present in these examples and then you would have a layer with features to be symbolized. Matt Priour Kestrel Computer Consulting On 12/12/2012 6:21 AM, Gery . wrote: > Hello, > > I have some features in GeoJSON format I want to display, so I did this: > > [code] > var vectorLayer = null; > > var vectorStyle = > { > graphicName: 'square', > strokeColor: '#222', > fillColor: '#222' > }; > > var styleDefault = OpenLayers.Util.applyDefaults( > vectorStyle, > OpenLayers.Feature.Vector.style['default'] > ); > > vectorLayer = new OpenLayers.Layer.Vector('search', > { > styleMap: new OpenLayers.StyleMap( > { > 'default': styleDefault > } > ), > displayInLayerSwitcher: true > } > ); > [/code] > > but they don't appear in the map, my question is if this is enough to > get the features displayed or do I need something else there? if this > is enough, I should think that this problem is about how the features > are being read by OL. In fact, this doesn't work either: > > var ll = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y); > mapPanel.map.setCenter(ll); > > I get: > > feature is not defined > [Break On This Error] > var ll = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y); > > > why should this happen? thanks in advance > > > > __________________________________________________________________________________________ > Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas > si NO es necesario. > Think green - keep it on the screen. Do NOT print if it is NOT necessary. > Denken Sie an die Umwelt- bewahren Sie es auf dem Bildschirm. Drucken > Sie NICHT, wenn es NICHT notwendig ist. > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpriour at kestrelcomputer.com Wed Dec 12 10:16:07 2012 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Wed, 12 Dec 2012 12:16:07 -0600 Subject: [OpenLayers-Users] OpenLS Geocode Not Working In-Reply-To: <1355326673534-5022525.post@n6.nabble.com> References: <1355326673534-5022525.post@n6.nabble.com> Message-ID: <50C8C9E7.4050701@kestrelcomputer.com> Did you include: "www.openrouteservice.org" in your list of allowed host in the proxy.cgi file? It is not included by default. Matt Priour On 12/12/2012 9:37 AM, BrianJBaldwin wrote: > NOOB here, > > I copied almost verbatim the code found in the OpenLS example and it is not > working when I host it. My code and the *example code* (when hosted on two > different servers) both come up with the same error "An error occurred while > communicating with the OpenLS service. Please try again." But the example > code hosted at OpenLayers works as expected. > > I can't find any differences between the two sources. > > My map is found here: http://www.brianjamesbaldwin.com/Milwaukee/ > > Any tips? > > Thanks so much, > Brian > > > > -- > View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLS-Geocode-Not-Working-tp5022525.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > From mpriour at kestrelcomputer.com Wed Dec 12 10:30:29 2012 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Wed, 12 Dec 2012 12:30:29 -0600 Subject: [OpenLayers-Users] OpenLS Geocode Not Working In-Reply-To: References: <50C97080020000370000E54D@lx-gwgate1.asurequality.com> Message-ID: <50C8CD45.70707@kestrelcomputer.com> See: http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost And these 2 relevant GIS StackExchange posts for further information. http://gis.stackexchange.com/questions/2523/problems-with-openlayers-and-wfs-proxy-cgi-issues http://gis.stackexchange.com/questions/21761/setup-own-openlayers-proxyhost Matt Priour On 12/12/2012 11:18 AM, Brian Baldwin wrote: > Robert, > > Thanks for the reply. I just stumbled upon the proxy issue. > > Does it matter that we are running IIS and not Apache? Does the proxy > need to be in my web root or can it reside anywhere? I also saw that > it could be formatted as a .php file? > > Sorry, kind of new to the OpenLayers > > > Thanks so much, * > > Brian James Baldwin*, MURP > Milwaukee, WI 53208 > (808)-937-2601 > China RPCV 2005-2007 > > > > On Wed, Dec 12, 2012 at 11:06 AM, Robert Sanson > > wrote: > > Hi Brian > > Did you set up a proxy.cgi script in your cgi-bin folder, and > include the address of the OpenLS service in it? > > Regards, > > Robert Sanson > > >>> BrianJBaldwin > 12/12/12 8:38 AM >>> > NOOB here, > > I copied almost verbatim the code found in the OpenLS example and > it is not > working when I host it. My code and the *example code* (when > hosted on two > different servers) both come up with the same error "An error > occurred while > communicating with the OpenLS service. Please try again." But the > example > code hosted at OpenLayers works as expected. > > I can't find any differences between the two sources. > > My map is found here: http://www.brianjamesbaldwin.com/Milwaukee/ > > Any tips? > > Thanks so much, > Brian > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/OpenLS-Geocode-Not-Working-tp5022525.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > > This email and any attachments are confidential and intended > solely for the addressee(s). If you are not the intended > recipient, please notify us immediately and then delete this email > from your system. > > This message has been scanned for Malware and Viruses by Websense > Hosted Security. www.websense.com > > > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From BrianJBaldwin at gmail.com Wed Dec 12 10:57:56 2012 From: BrianJBaldwin at gmail.com (BrianJBaldwin) Date: Wed, 12 Dec 2012 10:57:56 -0800 (PST) Subject: [OpenLayers-Users] OpenLS Geocode Not Working In-Reply-To: <50C8CD45.70707@kestrelcomputer.com> References: <1355326673534-5022525.post@n6.nabble.com> <50C97080020000370000E54D@lx-gwgate1.asurequality.com> <50C8CD45.70707@kestrelcomputer.com> Message-ID: <1355338676717-5022571.post@n6.nabble.com> Thanks so much for the responses. It looks like the issue is coming down to getting the proxy.cgi working with IIS. How do I rename this file and where do I place it in this circumstance? I have found a few different resources for doing this, but everything looks fairly convoluted. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLS-Geocode-Not-Working-tp5022525p5022571.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From teknocreator at gmail.com Wed Dec 12 11:47:24 2012 From: teknocreator at gmail.com (teknocreator) Date: Wed, 12 Dec 2012 11:47:24 -0800 (PST) Subject: [OpenLayers-Users] OL 2.12 and Image layer flicker In-Reply-To: <1343067164823-4990161.post@n6.nabble.com> References: <1340980086335-4984910.post@n6.nabble.com> <1342778061601-4989578.post@n6.nabble.com> <1343067164823-4990161.post@n6.nabble.com> Message-ID: <1355341644469-5022581.post@n6.nabble.com> Revisiting this as we'd like to use other features in OL 2.12. I was going to write a ticket on the problem but didn't want to duplicate one. In my search I found issue #792 written by antialize, which looked very similar in which a lot of flicker was introduced when using mergeNewParams. antialize suggested adding his/her code changes which created a tile replace method. This which would delay the redraw of an Image tile until the new image has been reloaded, where the DOM would then replace the node of the old image. After I reviewed antialize's code, it appeared to be exactly what was needed for our Image layer flicker issue as well. So I incorporated the changes listed in #792 and made one small change in the Layer Image.js file: setUrl: function(newUrl) { this.url = newUrl; //this.tile.draw(); this.tile.replace(); }, This would call antialize's new Tile replace method instead of the present draw method. Tested the changes with our application and they worked well for the Image layer as well as a Mapserver layer which was returning image tiles. The application essentially steps through time via the mouse hovering over different areas of the page. With each time step, the url of the Image layer is changed as well as returning new image tiles from MapServer. Calling antialize's replace method created a nice animation effect which is what we need in our application. Seemed to work well in Firefox 16, Chrome 23, and IE8 on a Windows 7 platform. More testing may be needed on antialize's code, but I'm looking to incorporate them in our application so we can move forward and use OL 2.12's other features. Even if it's not completely correct, think a replace function for images is what's needed here to remove the flicker vs a remove/reinitialize, which is essentially what OL 2.12's current draw method does when it then calls the tile clear method. As I noted earlier, I can see in Firebug is the cause of the flicker. Dave M -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OL-2-12-and-Image-layer-flicker-tp4984910p5022581.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mpriour at kestrelcomputer.com Wed Dec 12 11:59:55 2012 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Wed, 12 Dec 2012 13:59:55 -0600 Subject: [OpenLayers-Users] OpenLS Geocode Not Working In-Reply-To: <1355338676717-5022571.post@n6.nabble.com> References: <1355326673534-5022525.post@n6.nabble.com> <50C97080020000370000E54D@lx-gwgate1.asurequality.com> <50C8CD45.70707@kestrelcomputer.com> <1355338676717-5022571.post@n6.nabble.com> Message-ID: <50C8E23B.1070301@kestrelcomputer.com> The answer is highly dependant on what server setup you have. Are you hosting / proxing Apache through IIS? - then just put proxy.cgi in a scriptAlias directory Do you have IIS handlers configured to run Python files? - rename proxy.cgi to proxy.py and put it here it can be accessed and run If no to the above questions, then you should look at the ArcGIS for Javascript Proxy Page help http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/ags_proxy.htm The intro and section 1 are relevant. Finally, set OpenLayers.ProxyHost to point to the correct location of your proxy. Make sure that your proxy and your webpage with the OpenLayers map are on the same subdomain, host, and port. Hope that helps Matt Priour On 12/12/2012 12:57 PM, BrianJBaldwin wrote: > Thanks so much for the responses. > > It looks like the issue is coming down to getting the proxy.cgi working with > IIS. > > How do I rename this file and where do I place it in this circumstance? > > I have found a few different resources for doing this, but everything looks > fairly convoluted. > > > > -- > View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLS-Geocode-Not-Working-tp5022525p5022571.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > From p.scadden at gns.cri.nz Wed Dec 12 12:27:47 2012 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Thu, 13 Dec 2012 09:27:47 +1300 Subject: [OpenLayers-Users] OpenLS Geocode Not Working In-Reply-To: <1355338676717-5022571.post@n6.nabble.com> References: <1355326673534-5022525.post@n6.nabble.com> <50C97080020000370000E54D@lx-gwgate1.asurequality.com> <50C8CD45.70707@kestrelcomputer.com> <1355338676717-5022571.post@n6.nabble.com> Message-ID: <50C8E8C3.7090300@gns.cri.nz> A proxy can be written in any servlet environment that you are comfortable with. I use a jsp because its convenient to my environment. I know nothing about what IIS but I am guessing asp? could use php as well. All the proxy has to do is 1/ verify the destination is allowed (If you dont then you have an openproxy that some crim can discover for spamming, DDOS etc etc) 2/ open an http connection to the url supplied as a parameter 3/ read the connection and pipe back as response. Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From 945070223 at qq.com Wed Dec 12 22:14:00 2012 From: 945070223 at qq.com (OpenGSC) Date: Wed, 12 Dec 2012 22:14:00 -0800 (PST) Subject: [OpenLayers-Users] vector doesn't display In-Reply-To: References: Message-ID: <1355379240814-5022631.post@n6.nabble.com> look demos from above suggestion,and use firebug to fetch you feature's attributes. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/vector-doesn-t-display-tp5022467p5022631.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From info at spatially-oriented.com Thu Dec 13 00:36:49 2012 From: info at spatially-oriented.com (Casper Span) Date: Thu, 13 Dec 2012 09:36:49 +0100 Subject: [OpenLayers-Users] Mouseout event on IE In-Reply-To: <1354758135570-5021092.post@n6.nabble.com> References: <1354758135570-5021092.post@n6.nabble.com> Message-ID: Apparently, the mouseover & mouseout seemed to collide with eachother. So now I made sure there is just one of them registered. Basically, when the user hovers, I will register the unhover and unregister the hover. And vice versa. Regards, Casper Span On Thu, Dec 6, 2012 at 2:42 AM, OpenGSC <945070223 at qq.com> wrote: > use alert to see whether the function is executed; > if it was.check you code about the two functions; > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/Mouseout-event-on-IE-tp5020390p5021092.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Casper Span T: @Span_Droid W: http://www.spatially-oriented.com M: info at spatially-oriented.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From 945070223 at qq.com Thu Dec 13 00:48:55 2012 From: 945070223 at qq.com (OpenGSC) Date: Thu, 13 Dec 2012 00:48:55 -0800 (PST) Subject: [OpenLayers-Users] Mouseout event on IE In-Reply-To: References: Message-ID: <1355388535212-5022672.post@n6.nabble.com> I think use mouseover and mouseout event is enough ! there is no need to unregister event! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Mouseout-event-on-IE-tp5020390p5022672.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From info at spatially-oriented.com Thu Dec 13 01:02:26 2012 From: info at spatially-oriented.com (Casper Span) Date: Thu, 13 Dec 2012 10:02:26 +0100 Subject: [OpenLayers-Users] Mouseout event on IE In-Reply-To: <1355388535212-5022672.post@n6.nabble.com> References: <1355388535212-5022672.post@n6.nabble.com> Message-ID: I just wanted to be sure I don't leave any garbage as I delete and add markers during events as well. (I show different marker images when hovering and revert back to the non-hover image on mouseout) I have a stable and working situation now, so I'm going to leave it at that.:) Thanks for the help! On Thu, Dec 13, 2012 at 9:48 AM, OpenGSC <945070223 at qq.com> wrote: > I think use mouseover and mouseout event is enough ! > there is no need to unregister event! > > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/Mouseout-event-on-IE-tp5020390p5022672.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Casper Span T: @Span_Droid W: http://www.spatially-oriented.com M: info at spatially-oriented.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From gpktondo at gmail.com Thu Dec 13 01:47:51 2012 From: gpktondo at gmail.com (Tondo) Date: Thu, 13 Dec 2012 01:47:51 -0800 (PST) Subject: [OpenLayers-Users] Two vector layers and select control In-Reply-To: <1355141302481-5021878.post@n6.nabble.com> References: <1355141302481-5021878.post@n6.nabble.com> Message-ID: <1355392071435-5022692.post@n6.nabble.com> Hi I forgot, I tried this without success... case 1 - Units layers is above - highlighting (SelectFeature Control) works fine, but Draw Layer is not visible -> is not editable. case 2 - Draw Layer is above - Editing works fine, but Select Feature (hover) wont highlight. Regards, Tom -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Two-vector-layers-and-select-control-tp5021878p5022692.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pascal2833 at gmail.com Thu Dec 13 01:56:45 2012 From: pascal2833 at gmail.com (pascal) Date: Thu, 13 Dec 2012 01:56:45 -0800 (PST) Subject: [OpenLayers-Users] OpenLayers.Event.observe(); Message-ID: <1355392605714-5022698.post@n6.nabble.com> Hi, I'm trying to use the OpenLayers.Event.observe(); function to integrate a click event to a jQuery button but i don't know how to do: That's what I'm doing: 1) I'm trying to integrate this fonction in the init() function: mapelement1.addLayers([baselayer, wms1]); OpenLayers.Event.observe(OpenLayers.Util.getElement("boutton_map1"), "onclick", alert(555)); } // End of init() function. Then, I create the button in JQuery function: $(document).ready(function() { createmap1(); // Create button: $('#boutton_map1').button(); }); // End JQuery function }); // Fin JQ Result: When the page start, I have the alert message 555 (I don't want this!) but when I?m doing click on the button, noting occurs. 2) If I?m trying put the OpenLayers.Event.observe() function in the JQuery function, it happens the same. Two questions: 1) what's wrong? 2) Is it possible to put the OpenLayers.Event.observe() function in the JQuery function? Thanks a lot, Pascal. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLayers-Event-observe-tp5022698.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gpktondo at gmail.com Thu Dec 13 02:52:08 2012 From: gpktondo at gmail.com (Tondo) Date: Thu, 13 Dec 2012 02:52:08 -0800 (PST) Subject: [OpenLayers-Users] Filter features in multiple geographical areas? In-Reply-To: <50C6428B.3010305@gns.cri.nz> References: <50C6428B.3010305@gns.cri.nz> Message-ID: <1355395928929-5022714.post@n6.nabble.com> Hi ...true + there is always possibility to use non-transparent proxy and cache results. Truth be told, I'm working on something similar: User can choose wheter to use pre-defined geometries (intersction result is always one of few cases -> can be cached) or draw custom geometry (so I have to send an AJAX request; params: type of geometry - DrawControl.Hander, coordinates - feature.geometry.getVerticies() and name of requested layer - can not be cached) and see the result. I dont have any options to use spatial database, so I'm forced to use WFS. Any XML-based data = very slow (produce huge blocking time). My solution was to write proxy that konverts GML to GeoJSON. Response time depends on your SW/HW configuration (4CPUs, 4GB RAM (virtual) - requests 20000 of vetricies intersection = aprox. 10sec waiting for response, 1sec loading GeoJSON file, 0.75sec parse time) Tom -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Filter-features-in-multiple-geographical-areas-tp5021902p5022714.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From RDell at CatawbaCountyNC.gov Thu Dec 13 05:17:17 2012 From: RDell at CatawbaCountyNC.gov (Ralph Dell) Date: Thu, 13 Dec 2012 13:17:17 +0000 Subject: [OpenLayers-Users] OpenLayers.Event.observe(); In-Reply-To: <1355392605714-5022698.post@n6.nabble.com> References: <1355392605714-5022698.post@n6.nabble.com> Message-ID: <6D13ED3CF6898644B9DF3B2F54470B5101B386@COCATEXGC.cocat.local> I am not familiar with event.observe but I do tie other events to the click of a query button. $( "#identify" ).button({ text: true, label: "Identify" }) .click(function() { ctrl_disable(); ctrl_identify.activate(); }) where ctrl_disable() looks like this and disables all my controls function ctrl_disable() { ctrl_pan.deactivate(); ctrl_identify.deactivate(); return; } and ctrl_identify is ctrl_identify = new OpenLayers.Control.GetFeature({ whatever you need to put here )}; Ralph Dell -----Original Message----- From: openlayers-users-bounces at lists.osgeo.org [mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of pascal Sent: Thursday, December 13, 2012 4:57 AM To: openlayers-users at lists.osgeo.org Subject: [OpenLayers-Users] OpenLayers.Event.observe(); Hi, I'm trying to use the OpenLayers.Event.observe(); function to integrate a click event to a jQuery button but i don't know how to do: That's what I'm doing: 1) I'm trying to integrate this fonction in the init() function: mapelement1.addLayers([baselayer, wms1]); OpenLayers.Event.observe(OpenLayers.Util.getElement("boutton_map1"), "onclick", alert(555)); } // End of init() function. Then, I create the button in JQuery function: $(document).ready(function() { createmap1(); // Create button: $('#boutton_map1').button(); }); // End JQuery function }); // Fin JQ Result: When the page start, I have the alert message 555 (I don't want this!) but when I?m doing click on the button, noting occurs. 2) If I?m trying put the OpenLayers.Event.observe() function in the JQuery function, it happens the same. Two questions: 1) what's wrong? 2) Is it possible to put the OpenLayers.Event.observe() function in the JQuery function? Thanks a lot, Pascal. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLayers-Event-observe-tp5022698.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users From xavier.mamano at gmail.com Thu Dec 13 11:21:22 2012 From: xavier.mamano at gmail.com (Xavier Mamano (jorix)) Date: Thu, 13 Dec 2012 11:21:22 -0800 (PST) Subject: [OpenLayers-Users] Two vector layers and select control In-Reply-To: <1355392071435-5022692.post@n6.nabble.com> References: <1355141302481-5021878.post@n6.nabble.com> <1355392071435-5022692.post@n6.nabble.com> Message-ID: <1355426482255-5022827.post@n6.nabble.com> Hi, I assume you used ModifyFeature to edit, which also uses a SelectFeature internally (the last activated is the winner --two ModifyFeature controls in certain situations can cooperate, but on the same layers--) Without more details would advise him to use eg a panel to toggle editing (use methods activate and deactivate of ModifyFeature) Tondo wrote > Hi > > I forgot, I tried this without success... > case 1 - Units layers is above - highlighting (SelectFeature Control) > works fine, but Draw Layer is not visible -> is not editable. > case 2 - Draw Layer is above - Editing works fine, but Select Feature > (hover) wont highlight. > > Regards, > Tom -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Two-vector-layers-and-select-control-tp5021878p5022827.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From p.scadden at gns.cri.nz Thu Dec 13 15:11:20 2012 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Fri, 14 Dec 2012 12:11:20 +1300 Subject: [OpenLayers-Users] Filter features in multiple geographical areas? In-Reply-To: <1355395928929-5022714.post@n6.nabble.com> References: <50C6428B.3010305@gns.cri.nz> <1355395928929-5022714.post@n6.nabble.com> Message-ID: <50CA6098.6050304@gns.cri.nz> >I dont have any options to use spatial database, so I'm forced to use WFS. If a server provides the layer through WFS, then very very likely to provide the same layer as WMS as well which would improve your performance for display enormously. Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From forum.email.a at googlemail.com Fri Dec 14 01:10:14 2012 From: forum.email.a at googlemail.com (aho) Date: Fri, 14 Dec 2012 10:10:14 +0100 Subject: [OpenLayers-Users] WFS-T without geometry Message-ID: <50CAECF6.5050501@googlemail.com> Hello all, I was wondering how I can manage the tables without geometry openLayers. I actually created a WFS-Protocol and this is working fine - I get my features... But the layer remains empty. I need to delete, insert and update features - so far I havn?t found how I could achieve that with the protocol. Here is my testing code so far: var saveStrategy = new OpenLayers.Strategy.Save(); saveStrategy.events.register("success", '', this.showSuccessMsg); saveStrategy.events.register("fail", '', this.showFailureMsg); var equalFilter = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "id", value: this.currentId }); protocol = new OpenLayers.Protocol.WFS({ version: "1.1.0", srsName: "EPSG:900913", url: "/cgi-bin/", featureNS : "www.something.de/else", featurePrefix: "prefix", featureType: "feature_type", filter: equalFilter, geometryName: "" }); protocol.read( { callback: function(response){ if(response.success()){ for(var i = 0; i < response.features.length; i++) { ... do something here } } else { console.log('error'); } } }) var layer= new OpenLayers.Layer.Vector("test_layer", { strategies: saveStrategy, protocol: protocol }); Thanks in advance!! From gamejihou at hotmail.com Fri Dec 14 02:19:44 2012 From: gamejihou at hotmail.com (Gery .) Date: Fri, 14 Dec 2012 10:19:44 +0000 Subject: [OpenLayers-Users] vector doesn't display In-Reply-To: <50C8C8B5.6050003@kestrelcomputer.com> References: , <50C8C8B5.6050003@kestrelcomputer.com> Message-ID: thanks for the answer Matt, OpenGSC and Diego, I'll check the links and see what is going on there Regards, __________________________________________________________________________________________ Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario. Think green - keep it on the screen. Do NOT print if it is NOT necessary. Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist. Date: Wed, 12 Dec 2012 12:11:01 -0600 From: mpriour at kestrelcomputer.com To: openlayers-users at lists.osgeo.org Subject: Re: [OpenLayers-Users] vector doesn't display You have to actually load the GeoJSON features into the layer. First, look at the following examples: http://openlayers.org/dev/examples/geojson-reprojected.html http://openlayers.org/dev/examples/cartodb-geojson.html They both use a Fixed strategy which is the best one if you want to load your data once and have it in a static file or known URL. You would add your style definition to the vector layer definition they present in these examples and then you would have a layer with features to be symbolized. Matt Priour Kestrel Computer Consulting On 12/12/2012 6:21 AM, Gery . wrote: Hello, I have some features in GeoJSON format I want to display, so I did this: [code] var vectorLayer = null; var vectorStyle = { graphicName: 'square', strokeColor: '#222', fillColor: '#222' }; var styleDefault = OpenLayers.Util.applyDefaults( vectorStyle, OpenLayers.Feature.Vector.style['default'] ); vectorLayer = new OpenLayers.Layer.Vector('search', { styleMap: new OpenLayers.StyleMap( { 'default': styleDefault } ), displayInLayerSwitcher: true } ); [/code] but they don't appear in the map, my question is if this is enough to get the features displayed or do I need something else there? if this is enough, I should think that this problem is about how the features are being read by OL. In fact, this doesn't work either: var ll = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y); mapPanel.map.setCenter(ll); I get: feature is not defined var ll = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y); why should this happen? thanks in advance __________________________________________________________________________________________ Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario. Think green - keep it on the screen. Do NOT print if it is NOT necessary. Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist. _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From msi_g at yahoo.com Fri Dec 14 02:50:46 2012 From: msi_g at yahoo.com (Shariful Islam) Date: Fri, 14 Dec 2012 02:50:46 -0800 (PST) Subject: [OpenLayers-Users] (no subject) Message-ID: <1355482246.84502.YahooMailNeo@web121104.mail.ne1.yahoo.com> Hi all , ?It may be very basic question for you,but i am in suspense with it. I have a postgis shapefile loaded as WMS in geoserver.This shapefile (through geocode field in attribute table) has many more interrelated tables located in mysql. Now i want to build some form (multi 5-10,one form options selection sorts the following form options and thus goes to the last form - just going in deep) in openlayers that will query the mysql. In this scenario what to do. Plz response Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msi_g at yahoo.com Fri Dec 14 02:52:10 2012 From: msi_g at yahoo.com (Shariful Islam) Date: Fri, 14 Dec 2012 02:52:10 -0800 (PST) Subject: [OpenLayers-Users] How to Load data with Openlayers In-Reply-To: <1355482246.84502.YahooMailNeo@web121104.mail.ne1.yahoo.com> References: <1355482246.84502.YahooMailNeo@web121104.mail.ne1.yahoo.com> Message-ID: <1355482330.8061.YahooMailNeo@web121105.mail.ne1.yahoo.com> ----- Forwarded Message ----- From: Shariful Islam To: OpenLayers Sent: Friday, December 14, 2012 4:50 PM Subject: Hi all , ?It may be very basic question for you,but i am in suspense with it. I have a postgis shapefile loaded as WMS in geoserver.This shapefile (through geocode field in attribute table) has many more interrelated tables located in mysql. Now i want to build some form (multi 5-10,one form options selection sorts the following form options and thus goes to the last form - just going in deep) in openlayers that will query the mysql. In this scenario what to do. Plz response Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msi_g at yahoo.com Fri Dec 14 02:57:46 2012 From: msi_g at yahoo.com (Shariful Islam) Date: Fri, 14 Dec 2012 02:57:46 -0800 (PST) Subject: [OpenLayers-Users] How to Load data with Openlayers By User Form Input Message-ID: <1355482666.24427.YahooMailNeo@web121103.mail.ne1.yahoo.com> Hi all , ?It may be very basic question for you,but i am in suspense with it. I have a postgis shapefile loaded as WMS in geoserver.This shapefile (through geocode field in attribute table) has many more interrelated tables located in mysql. Now i want to build some form (multi 5-10,one form options selection sorts the following form options and thus goes to the last form - just going in deep) in openlayers that will query the mysql. In this scenario what to do. Plz response Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gamejihou at hotmail.com Fri Dec 14 03:31:58 2012 From: gamejihou at hotmail.com (Gery .) Date: Fri, 14 Dec 2012 11:31:58 +0000 Subject: [OpenLayers-Users] vector doesn't display In-Reply-To: References: , <50C8C8B5.6050003@kestrelcomputer.com>, Message-ID: really cool, it works like a champ, thanks Marc, Cheers, Gery __________________________________________________________________________________________ Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario. Think green - keep it on the screen. Do NOT print if it is NOT necessary. Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist. From: gamejihou at hotmail.com To: mpriour at kestrelcomputer.com; openlayers-users at lists.osgeo.org Subject: RE: [OpenLayers-Users] vector doesn't display Date: Fri, 14 Dec 2012 10:19:44 +0000 thanks for the answer Matt, OpenGSC and Diego, I'll check the links and see what is going on there Regards, __________________________________________________________________________________________ Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario. Think green - keep it on the screen. Do NOT print if it is NOT necessary. Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist. Date: Wed, 12 Dec 2012 12:11:01 -0600 From: mpriour at kestrelcomputer.com To: openlayers-users at lists.osgeo.org Subject: Re: [OpenLayers-Users] vector doesn't display You have to actually load the GeoJSON features into the layer. First, look at the following examples: http://openlayers.org/dev/examples/geojson-reprojected.html http://openlayers.org/dev/examples/cartodb-geojson.html They both use a Fixed strategy which is the best one if you want to load your data once and have it in a static file or known URL. You would add your style definition to the vector layer definition they present in these examples and then you would have a layer with features to be symbolized. Matt Priour Kestrel Computer Consulting On 12/12/2012 6:21 AM, Gery . wrote: Hello, I have some features in GeoJSON format I want to display, so I did this: [code] var vectorLayer = null; var vectorStyle = { graphicName: 'square', strokeColor: '#222', fillColor: '#222' }; var styleDefault = OpenLayers.Util.applyDefaults( vectorStyle, OpenLayers.Feature.Vector.style['default'] ); vectorLayer = new OpenLayers.Layer.Vector('search', { styleMap: new OpenLayers.StyleMap( { 'default': styleDefault } ), displayInLayerSwitcher: true } ); [/code] but they don't appear in the map, my question is if this is enough to get the features displayed or do I need something else there? if this is enough, I should think that this problem is about how the features are being read by OL. In fact, this doesn't work either: var ll = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y); mapPanel.map.setCenter(ll); I get: feature is not defined var ll = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y); why should this happen? thanks in advance __________________________________________________________________________________________ Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario. Think green - keep it on the screen. Do NOT print if it is NOT necessary. Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist. _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users _______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From reinaldo at geodesign.com.br Fri Dec 14 04:53:21 2012 From: reinaldo at geodesign.com.br (reinaldo at geodesign.com.br) Date: Fri, 14 Dec 2012 10:53:21 -0200 (BRST) Subject: [OpenLayers-Users] Ruled-Based Styling Does Not Work with KML File Message-ID: OL Users, I can't get the rule-base styling to work on a KML file. Please find below my JS, HTML and KML files. I would appreciate very much if someone could help me. I examined the examples, read the documentation and double checked the KML file structure. Evertyhing indicate that the rule-based styling should work, but it doesn't. I created a simple kml file with one attribute for each placemark. I can get the attributes rendered as labels, but I can not do the rule-based styling to work It looks like the rules are not being evaluated because I only get the elseifFilter style result rendered. It does not evaluate the other two EQUAL_TO rules, or any other Filter.Comparison rule. Thanks in advance, Reinaldo *** JS FILE ************************************** var map = new OpenLayers.Map("map"); var vector_style = new OpenLayers.Style( { fillColor: "#00ff00", fillOpacity: 0.1, strokeWidth: 1, strokeColor: "#0000ff", strokeOpacity: 4, // label: 'S{state}', // fontColor: "#ff0000", // fontFamily: "sans-serif", // fontSize: "10px", // fontWeight: "bold" }, //{ //context: { //state: function(feature){ return feature.attributes.SUMMER.value; } //}}, { rules: [ new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "SUMMER", value: 1000.123 }), symbolizer: { fillColor: "#ff0000", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#ff0000", strokeOpacity: 4, } }), new OpenLayers.Rule({ filter: new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "SUMMER", value: 2000.123 }), symbolizer: { fillColor: "#00ff00", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#00ff00", strokeOpacity: 4, } }), new OpenLayers.Rule({ // apply this rule if no others apply elseFilter: true, symbolizer: { fillColor: "#ffff00", fillOpacity: 1.0, strokeWidth: 1, strokeColor: "#ffffff", strokeOpacity: 4, } }) ] } ); var vector_style_map = new OpenLayers.StyleMap({ 'default': vector_style }); var vectorlayer = new OpenLayers.Layer.Vector("SOLAR RAD BAHIA", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "kml/ba_diff_simple1.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, srsName: "EPSG:900913" }) }), styleMap: vector_style_map }); var googleLayer = new OpenLayers.Layer.Google("Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} ); map.addLayers([googleLayer, vectorlayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); *** HTML FILE ************************************** #map { width: 600px; height: 450px; border: 1px solid black; } OpenLayers Example simple, basic, light *** KML FILE ************************************** diffuse_summer ff0000ff 0 1000.123 -39.551991120000018,-8.654038020000009 -39.461196960000017,-8.650702980000011 -39.457748160000023,-8.738279009999998 -39.54856104000001,-8.741648970000023 -39.551991120000018,-8.654038020000009 ff0000ff 0 2000.123 -39.370407120000024,-8.647350030000021 -39.27961296000003,-8.643977999999999 -39.27612708000003,-8.731485000000008 -39.366936000000003,-8.734890960000024 -39.370407120000024,-8.647350030000021 ff0000ff 0 3000.123 -41.365158120000011,-8.805078990000009 -41.274315,-8.802090000000005 -41.271233040000013,-8.890313040000013 -41.362098840000023,-8.893332990000021 -41.365158120000011,-8.805078990000009 ------------------------------------ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br (http://www.geodesign.com.br) Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta -------------- next part -------------- An HTML attachment was scrubbed... URL: From digbymaass at gmail.com Fri Dec 14 06:33:14 2012 From: digbymaass at gmail.com (Digby Maass) Date: Fri, 14 Dec 2012 14:33:14 +0000 Subject: [OpenLayers-Users] display waypoints from a gpx file Message-ID: I can display a gpx trace on a map eg: http://www.carnethy.com/maps/wed_training/iframecontent/121212nightrun.htm (attached) But I can't work out how to display waypoints with their names. Can anyone help? Nothing happens if I change this: var lgpx = new OpenLayers.Layer.Vector("wed training", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "../../gpx/wed-training/12-Dec-12.gpx", format: new OpenLayers.Format.GPX() }), style: {strokeColor: "red", strokeWidth: 3, strokeOpacity: 0.8}, projection: new OpenLayers.Projection("EPSG:4326") }); to this: var lgpx = new OpenLayers.Layer.Vector("wed training", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "../../gpx/wed-training/12-Dec-12.gpx", format: new OpenLayers.Format.GPX({extractWaypoints: true, extractRoutes: true, extractAttributes: true}) }), style: {strokeColor: "red", strokeWidth: 3, strokeOpacity: 0.8}, styleMap: gpxStyles, projection: new OpenLayers.Projection("EPSG:4326") }); and define gpxStyles thus: var gpxStyles = new OpenLayers.StyleMap({"default": new OpenLayers.Style({ pointRadius: "5", // sized according to type attribute label: "${wpt}", labelAlign: 'cb', fontSize: 9, fontFamily: "Arial", fontColor: "red", labelYOffset: 6, fillColor: "brown", strokeColor: "yellow", strokeWidth: 2, strokeOpacity: 1 }), "select": new OpenLayers.Style({fillColor: "#66ccff", strokeColor: "#3399ff",graphicZIndex: 2 }) }); Thanks Digby -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 121212nightrun.htm Type: application/octet-stream Size: 5071 bytes Desc: not available URL: From mpriour at kestrelcomputer.com Fri Dec 14 09:06:33 2012 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Fri, 14 Dec 2012 11:06:33 -0600 Subject: [OpenLayers-Users] display waypoints from a gpx file In-Reply-To: References: Message-ID: <50CB5C99.6070101@kestrelcomputer.com> If you are providing a StyleMap to the layer, you should drop the 'style' property in the layer definition. Matt Priour On 12/14/2012 8:33 AM, Digby Maass wrote: > display waypoints from a gpx file I can display a gpx trace on a map eg: > > http://www.carnethy.com/maps/wed_training/iframecontent/121212nightrun.htm > (attached) > > But I can't work out how to display waypoints with their names. Can > anyone help? > > Nothing happens if I change this: > var lgpx = new OpenLayers.Layer.Vector("wed training", { > strategies: [new OpenLayers.Strategy.Fixed()], > protocol: new OpenLayers.Protocol.HTTP({ > url: "../../gpx/wed-training/12-Dec-12.gpx", > format: new OpenLayers.Format.GPX() > }), > style: {strokeColor: "red", strokeWidth: 3, > strokeOpacity: 0.8}, > projection: new OpenLayers.Projection("EPSG:4326") > }); > > to this: > > var lgpx = new OpenLayers.Layer.Vector("wed training", { > strategies: [new OpenLayers.Strategy.Fixed()], > protocol: new OpenLayers.Protocol.HTTP({ > url: "../../gpx/wed-training/12-Dec-12.gpx", > format: new > OpenLayers.Format.GPX({extractWaypoints: true, extractRoutes: true, > extractAttributes: true}) }), > style: {strokeColor: "red", strokeWidth: 3, > strokeOpacity: 0.8}, > styleMap: gpxStyles, > projection: new OpenLayers.Projection("EPSG:4326") > }); > > and define gpxStyles thus: > > var gpxStyles = new OpenLayers.StyleMap({"default": new > OpenLayers.Style({ pointRadius: "5", // > sized according to type attribute label: > "${wpt}", > labelAlign: 'cb', > fontSize: 9, > fontFamily: "Arial", > fontColor: "red", > labelYOffset: 6, > fillColor: "brown", > strokeColor: "yellow", > strokeWidth: 2, > strokeOpacity: 1 > }), > "select": new OpenLayers.Style({fillColor: "#66ccff", > strokeColor: "#3399ff",graphicZIndex: 2 > }) > }); > > Thanks > Digby > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpriour at kestrelcomputer.com Fri Dec 14 09:17:24 2012 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Fri, 14 Dec 2012 11:17:24 -0600 Subject: [OpenLayers-Users] Ruled-Based Styling Does Not Work with KML File In-Reply-To: References: Message-ID: <50CB5F24.8020208@kestrelcomputer.com> Since you are using a KML file with attributes in the ExtendedData section, you need to tell the KML parser to use a simple attribute key:value model if you want to write rule based styling without an additional conversion function. new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, kvpAttribures: true, // <- THAT is the important part you are missing srsName: "EPSG:900913" }) Matt Priour On 12/14/2012 6:53 AM, reinaldo at geodesign.com.br wrote: > OL Users, > > I can't get the rule-base styling to work on a KML file. > > Please find below my JS, HTML and KML files. > > I would appreciate very much if someone could help me. > > I examined the examples, read the documentation and double checked the > KML file structure. Evertyhing indicate that the rule-based styling > should work, but it doesn't. > > I created a simple kml file with one attribute for each placemark. I > can get the attributes rendered as labels, but I can not do the > rule-based styling to work It looks like the rules are not being > evaluated because I only get the elseifFilter style result rendered. > It does not evaluate the other two EQUAL_TO rules, or any other > Filter.Comparison rule. > > Thanks in advance, > > Reinaldo > > *** JS FILE ************************************** > var map = new OpenLayers.Map("map"); > > var vector_style = new OpenLayers.Style( > { > fillColor: "#00ff00", > fillOpacity: 0.1, > strokeWidth: 1, > strokeColor: "#0000ff", > strokeOpacity: 4, > // label: '${state}', > // fontColor: "#ff0000", > // fontFamily: "sans-serif", > // fontSize: "10px", > // fontWeight: "bold" > }, > //{ > //context: { > //state: function(feature){ return feature.attributes.SUMMER.value; } > //}}, > { > rules: [ > new OpenLayers.Rule({ > filter: new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.EQUAL_TO, > property: "SUMMER", > value: 1000.123 > }), > symbolizer: { > fillColor: "#ff0000", > fillOpacity: 1.0, > strokeWidth: 1, > strokeColor: "#ff0000", > strokeOpacity: 4, > } > }), > new OpenLayers.Rule({ > filter: new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.EQUAL_TO, > property: "SUMMER", > value: 2000.123 > }), > symbolizer: { > fillColor: "#00ff00", > fillOpacity: 1.0, > strokeWidth: 1, > strokeColor: "#00ff00", > strokeOpacity: 4, > } > }), > new OpenLayers.Rule({ > // apply this rule if no others apply > elseFilter: true, > symbolizer: { > fillColor: "#ffff00", > fillOpacity: 1.0, > strokeWidth: 1, > strokeColor: "#ffffff", > strokeOpacity: 4, > } > }) > ] > } > ); > > var vector_style_map = new OpenLayers.StyleMap({ > 'default': vector_style > }); > > var vectorlayer = new OpenLayers.Layer.Vector("SOLAR RAD BAHIA", { > strategies: [new OpenLayers.Strategy.Fixed()], > protocol: new OpenLayers.Protocol.HTTP({ > url: "kml/ba_diff_simple1.kml", > format: new OpenLayers.Format.KML({ > extractStyles: false, > extractAttributes: true, > srsName: "EPSG:900913" > }) > }), > styleMap: vector_style_map > }); > > var googleLayer = new OpenLayers.Layer.Google("Google Satellite", > {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} > ); > > map.addLayers([googleLayer, vectorlayer]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.zoomToMaxExtent(); > > *** HTML FILE ************************************** > > > > > > > > type="text/css"> > > > > > >

OpenLayers Example

>
simple, basic, light
>
> > > > > > *** KML FILE ************************************** > > > > diffuse_summer > > > > > > > > 1000.123 > > > > > > -39.551991120000018,-8.654038020000009 > -39.461196960000017,-8.650702980000011 > -39.457748160000023,-8.738279009999998 > -39.54856104000001,-8.741648970000023 > -39.551991120000018,-8.654038020000009 > > > > > > > > > 2000.123 > > > > > > -39.370407120000024,-8.647350030000021 > -39.27961296000003,-8.643977999999999 > -39.27612708000003,-8.731485000000008 > -39.366936000000003,-8.734890960000024 > -39.370407120000024,-8.647350030000021 > > > > > > > > > 3000.123 > > > > > > -41.365158120000011,-8.805078990000009 > -41.274315,-8.802090000000005 -41.271233040000013,-8.890313040000013 > -41.362098840000023,-8.893332990000021 > -41.365158120000011,-8.805078990000009 > > > > > > > > > > > ------------------------------------------------------------------------ > > Reinaldo Escada Chohfi > S?cio Gerente > GeoDesign Internacional > www.geodesign.com.br > Tel./Fax: (12) 3153-5115 > > Intelig?ncia e Tecnologia Espacial de Ponta > > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpriour at kestrelcomputer.com Fri Dec 14 09:30:28 2012 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Fri, 14 Dec 2012 11:30:28 -0600 Subject: [OpenLayers-Users] How to Load data with Openlayers By User Form Input In-Reply-To: <1355482666.24427.YahooMailNeo@web121103.mail.ne1.yahoo.com> References: <1355482666.24427.YahooMailNeo@web121103.mail.ne1.yahoo.com> Message-ID: <50CB6234.9090701@kestrelcomputer.com> We, on this list, are not here to build or write your application for you. However, a few key points should help you: 1. WMS transfers an image to the browser. There is not inherent data in that image. 2. You will need the actual data for a feature or features to do what you describe you want to do 3. There are a number of ways to get the data, you will have to choose what is best for you: * WMS GetFeatureInfo - click or hover on the map and a request is sent to the WMS server and a response is sent back with 1 or more features from 1 or more layers depending on if you actually "hit" a feature and if you requested data from only 1 or several layers at once. * WFS GetFeature - similar idea as above, but the request itself tends to be simpler * Vector features retrieved through WFS protocol either all at once (Fixed strategy) or view limited (BBOX strategy) 4. You will need some other service on the server to allow you to talk to the MySQL server. This is totally out of scope for the OpenLayers list and you can do that in whatever way, framework, and language works for you. Hope that helps point you in the right direction to do your own investigations and application development. Matt Priour On 12/14/2012 4:57 AM, Shariful Islam wrote: > Hi all , > It may be very basic question for you,but i am in suspense with it. > > I have a postgis shapefile loaded as WMS in geoserver.This shapefile > (through geocode field in attribute table) has many more interrelated > tables located in mysql. > > Now i want to build some form (multi 5-10,one form options selection > sorts the following form options and thus goes to the last form - just > going in deep) in openlayers that will query the mysql. > > > In this scenario what to do. > > Plz response > > Thanks in advance. > > > > _______________________________________________ > Users mailing list > Users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From reinaldo at geodesign.com.br Fri Dec 14 11:06:48 2012 From: reinaldo at geodesign.com.br (reinaldo at geodesign.com.br) Date: Fri, 14 Dec 2012 17:06:48 -0200 (BRST) Subject: [OpenLayers-Users] Ruled-Based Styling Does Not Work with KML File Message-ID: <08455ri.21cd5c9a5175264a3a7c713faa273f1f@webmail.geodesign.com.br> Thanks a lot Matt. It worked. I read the OpenLayers.Format.KML documentation again and see that this property was right there in front of my eyes: kvpAttributes (http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Format/KML-js.html#OpenLayers.Format.KML.kvpAttributes){Boolean} Only used if extractAttributes is true. I can start configuring my site with Solar Radiation Data for Brazil now. Reinaldo ------------------------------------ Reinaldo Escada Chohfi S?cio Gerente GeoDesign Internacional www.geodesign.com.br (http://www.geodesign.com.br) Tel./Fax: (12) 3153-5115 Intelig?ncia e Tecnologia Espacial de Ponta ---- Original Message ---- From: Matt Priour To: openlayers-users at lists.osgeo.org Sent: Sex, Dez 14, 2012, 15:17 PM Subject: Re: [OpenLayers-Users] Ruled-Based Styling Does Not Work with KML File Since you are using a KML file with attributes in the ExtendedData section, you need to tell the KML parser to use a simple attribute key:value model if you want to write rule based styling without an additional conversion function. new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true, kvpAttribures: true, // -------------- next part -------------- An HTML attachment was scrubbed... URL: From BrianJBaldwin at gmail.com Fri Dec 14 12:07:36 2012 From: BrianJBaldwin at gmail.com (BrianJBaldwin) Date: Fri, 14 Dec 2012 12:07:36 -0800 (PST) Subject: [OpenLayers-Users] OpenLS Geocode Not Working In-Reply-To: <50C8E8C3.7090300@gns.cri.nz> References: <1355326673534-5022525.post@n6.nabble.com> <50C97080020000370000E54D@lx-gwgate1.asurequality.com> <50C8CD45.70707@kestrelcomputer.com> <1355338676717-5022571.post@n6.nabble.com> <50C8E8C3.7090300@gns.cri.nz> Message-ID: <1355515656320-5023135.post@n6.nabble.com> Thanks for the advice. I was able to get the proxy working, thanks for everyone's advice. Just wanted to make sure that my workaround is viable. I was still having trouble with the proxy, but adjusted the permissions to 775 and it started working. Thanks again for everyone's links and advice. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLS-Geocode-Not-Working-tp5022525p5023135.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From BrianJBaldwin at gmail.com Fri Dec 14 13:14:54 2012 From: BrianJBaldwin at gmail.com (BrianJBaldwin) Date: Fri, 14 Dec 2012 13:14:54 -0800 (PST) Subject: [OpenLayers-Users] Pass an XY coordinate to my marker Message-ID: <1355519694102-5023145.post@n6.nabble.com> I think this is a pretty simply problem, I just don't have the JS knowledge to get it solved. This is the output from the address locator, where it pulls the XY of the address. I was to pass the geometry.x and geometry.y to my marker. Here is the code from the address locator: function requestSuccess(response) { var format = new OpenLayers.Format.XLS(); var output = format.read(response.responseXML); if (output.responseLists[0]) { var geometry = output.responseLists[0].features[0].geometry; var foundPosition = new OpenLayers.LonLat(geometry.x, geometry.y).transform( new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject() ); map.setCenter(foundPosition, 16); Here is my marker location, can I just pass the new geometry to this point? If so, what is the best way to do this? var myLocation = new OpenLayers.Geometry.Point() .transform('EPSG:4326', 'EPSG:3857'); -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Pass-an-XY-coordinate-to-my-marker-tp5023145.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andrew.stewart at reddeer.ca Fri Dec 14 14:40:30 2012 From: andrew.stewart at reddeer.ca (Planet_x) Date: Fri, 14 Dec 2012 14:40:30 -0800 (PST) Subject: [OpenLayers-Users] OpenLayers.Layer.WMS - using SVG Format? Message-ID: <1355524830198-5023159.post@n6.nabble.com> Hi, just wondering if instead of pushing out an OpenLayers.Layer.WMS as format:image/png I can use svg. My getcapabilities request of my WMS says that is supports SVG with the following - - image/png image/jpeg image/svg+xml svgz However when I declare a WMS layer with svg format it does not show, is there any way to use SVG with a WMS layer? Thanks. layer_Overview = new OpenLayers.Layer.WMS("Overview Map Layers", wms, { layers: ["OVERVIEW_County", "OVERVIEW_City_Boundaries", "OVERVIEW_Roads", "OVERVIEW_River", "OVERVIEW_Roads_Highways"], VERSION: "1.3.0", format: 'image/svg+xml' }, { isBaseLayer: true, displayInLayerSwitcher: false, singleTile: true, buffer: 1, ratio: 1 }); -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OpenLayers-Layer-WMS-using-SVG-Format-tp5023159.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hhudson at katmandu.org Fri Dec 14 22:37:47 2012 From: hhudson at katmandu.org (Harris Hudson) Date: Sat, 15 Dec 2012 17:37:47 +1100 Subject: [OpenLayers-Users] OpenLayers.Layer.WMS - using SVG Format? In-Reply-To: <1355524830198-5023159.post@n6.nabble.com> References: <1355524830198-5023159.post@n6.nabble.com> Message-ID: <73b8e4c9bbc5b36521febb4be03cb04a.squirrel@webmail.utlchart.com> Using OpenLayers.Layer.WMS to add a WMS SVG (image/svg+xml) format layer should work fine for modern browsers. I've successfully added WMS SVG layers using OpenLayers.Layer.WMS where the layer tiles are added to the map based either on the tag or the