From grob_david at gmx.ch Sat May 1 08:33:47 2010 From: grob_david at gmx.ch (T@f!t) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] show only specific objects, wms In-Reply-To: References: <1272642420966-4986382.post@n2.nabble.com> Message-ID: <1272717227168-4989878.post@n2.nabble.com> Thank you for your answer. I tried it, but it always show the default style. My code is like this. theSLD_BODY= 'LinienLinienobjekte im WebGIS der ETHTrockenmauerPflE_art_n1780#38A8003'; linien = new OpenLayers.Layer.WMS("Linien",url,params,options); linien.mergeNewParams({"SLD_BODY":theSLD_BODY}); I tried also linien.mergeNewParams({ SLD_BODY : theSLD_BODY }); After this the Layer is draw again. But it has still the same style. Do you know what the problem could be? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/show-only-specific-objects-wms-tp4986382p4989878.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From grob_david at gmx.ch Sat May 1 09:07:48 2010 From: grob_david at gmx.ch (T@f!t) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] show only specific objects, wms In-Reply-To: <1272717227168-4989878.post@n2.nabble.com> References: <1272642420966-4986382.post@n2.nabble.com> <1272717227168-4989878.post@n2.nabble.com> Message-ID: <1272719268780-4989958.post@n2.nabble.com> It works with a cql filter!! *jupy* Thank you everybody for different the solution strategies! Your awsome. If somebody need an example: var filter = "PflE_art_n=1780"; filterParams["cql_filter"] = filter; linien.mergeNewParams(filterParams); -->PflE_art_n is a Attribut name and linien is a wms layer. greetz David -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/show-only-specific-objects-wms-tp4986382p4989958.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From beppenapo at gmail.com Sat May 1 18:13:07 2010 From: beppenapo at gmail.com (beppe) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] read gml attributes and open pop-up Message-ID: <1272751987.2802.11.camel@beppe> Hi list, I've a gml layer [1], It's possible read the attributes of this file and, "onClick" event, open a pop-up? Something like "fullRequestString" and wfs. I'm trying different solutions unsuccessfully!!! thanks -beppe- [1] var ut = new OpenLayers.Layer.Vector("ut", { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "ut_900913.gml", format: new OpenLayers.Format.GML() }) }); From gmduky at hotmail.com Sun May 2 03:49:14 2010 From: gmduky at hotmail.com (Zuhex) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] KML layer doesn't display in OL. Message-ID: <1272786554619-4992338.post@n2.nabble.com> hello I am new for Openlayer and GeoServer.I was created KML file from ArcGIS by converted shapefile to KMZ. So I extracted KMZ file and then I got one image and one KML file. I put them together into my KML folder. Here this is my code ################################################## ################################################## This is my KML code ################################################## herb herb ??? #IconStyle00 0 relativeToGround 101.294314,15.181605,0.000000 ??? #IconStyle00 0 relativeToGround 101.294730,15.181329,0.000000 ??? #IconStyle00 0 relativeToGround 101.294675,15.181411,0.000000 ??? #IconStyle00 0 relativeToGround 101.294734,15.178293,0.000000 ????????????????????? #IconStyle00 0 relativeToGround 101.294911,15.179159,0.000000 ??? #IconStyle00 0 relativeToGround 101.294943,15.178653,0.000000 ??? #IconStyle00 0 relativeToGround 101.294714,15.178149,0.000000 ???????????????????????? #IconStyle00 0 relativeToGround 101.294313,15.178072,0.000000 ??? #IconStyle00 0 relativeToGround 101.294998,15.178616,0.000000 hhh #IconStyle00 0 relativeToGround 101.293716,15.180359,0.000000 ###################################################### Thank, Zuhex -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/KML-layer-doesn-t-display-in-OL-tp4992338p4992338.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From strk at keybit.net Sun May 2 05:03:02 2010 From: strk at keybit.net (strk) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] Changing singleTile property of a loaded layer In-Reply-To: <4BD99E51.3010404@swoodbridge.com> References: <20100429145459.GF50031@keybit.net> <4BD99E51.3010404@swoodbridge.com> Message-ID: <20100502090302.GA11687@keybit.net> On Thu, Apr 29, 2010 at 10:57:21AM -0400, Stephen Woodbridge wrote: > strk wrote: > > Is it possible to switch between singleTile on/off for > > a layer which is already added to a map ? > > > > When I try using addOptions({singleTile:true}) over a layer > > initialized w/out that option the result is some odd behaviour: > > a single tile is loaded with the request of full extent BUT > > it is placed as it was a single tile of a set. > > > > The test is here: > > > > http://strk.keybit.net/tmp/ol/st.html > > > > Thanks in advance for any help. > > I have not tried that, but what I normally do is have two layers, one > tiled and one single tile and switch between them. FYI: I've handled to produce a version which doesn't require removal and re-addition of a layer: http://strk.keybit.net/tmp/ol/st2.html Not sure about unwanted side-effects, but seems to work. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From sb.ray at hotmail.com Sun May 2 09:22:17 2010 From: sb.ray at hotmail.com (sunny74) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] control.SelectFeature In-Reply-To: <869707.16280.qm@web26505.mail.ukl.yahoo.com> References: <596370.21151.qm@web26502.mail.ukl.yahoo.com> <1272289390037-4962622.post@n2.nabble.com> <611177.99590.qm@web26505.mail.ukl.yahoo.com> <1272348549052-4966806.post@n2.nabble.com> <446609.63526.qm@web26504.mail.ukl.yahoo.com> <15848.145.50.39.11.1272356445.squirrel@webmail.hostingdiscounter.nl> <1272359793737-4967654.post@n2.nabble.com> <332004.40050.qm@web26505.mail.ukl.yahoo.com> <1272366362213-4968003.post@n2.nabble.com> <869707.16280.qm@web26505.mail.ukl.yahoo.com> Message-ID: <1272806537943-4992935.post@n2.nabble.com> Hi Sarah, Have you been able to make the selection work with a layer over the region of selection? I need to get that working desperately. My code is not that Good. It works in one machine but doesn't work in other. Can you give me better code? WFS.FromWMSLayer does not work in my case, I 'm using Mapserver. The guy called Bart told me that he has code to make circle work instead of box but didn't give the code since then. Pl tell me how you got the selection layer working. Thanks for your reply. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/control-SelectFeature-tp4930933p4992935.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Sun May 2 13:53:40 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] control.SelectFeature In-Reply-To: <15848.145.50.39.11.1272356445.squirrel@webmail.hostingdiscounter.nl> References: <596370.21151.qm@web26502.mail.ukl.yahoo.com> <1272289390037-4962622.post@n2.nabble.com> <611177.99590.qm@web26505.mail.ukl.yahoo.com> <1272348549052-4966806.post@n2.nabble.com> <446609.63526.qm@web26504.mail.ukl.yahoo.com> <15848.145.50.39.11.1272356445.squirrel@webmail.hostingdiscounter.nl> Message-ID: <0281CE40-45F6-4158-8319-3404AF9D437D@osgis.nl> Okay, the basic code for circle selection in the GetFeature control is here: http://trac.openlayers.org/ticket/2609 Please give it a try. Best regards, Bart On Apr 27, 2010, at 10:20 AM, bartvde@OSGIS.NL wrote: > I've got some code lying around to do circle selection with the GetFeature > control. If anybody is interested I can open up a ticket with a patch. > > Some handlers have a persist option which indicate whether or not the > drawn geometry should persist (not be cleared after drawing), however the > box Handler (used by the GetFeature Control in box mode) does not have it > currently. > > Circle uses the RegularPolygon handler, and that one can persist if you want. > > Best regards, > Bart > >> Hi, >> >> I think you cannot use a circle instead of a box. But you can change your >> code to do a GeFeature-request with a filter, so you can request your >> features around a circle area. >> To question 1: I had same occurrence with the fast disappearing box- but I >> think that has to do with event and style for wfs layer (see my other >> post). >> >> Hope that helped a little bit. >> >> best regards >> Sarah >> >> >> >> >> ________________________________ >> Von: sunny74 >> An: users@openlayers.org >> Gesendet: Dienstag, den 27. April 2010, 8:09:09 Uhr >> Betreff: Re: [OpenLayers-Users] control.SelectFeature >> >> >> Hi Sarah, >> >> Thanks for your reply. >> I tried using >> http://dev.openlayers.org/releases/OpenLayers-2.9/examples/getfeature-wfs.html >> http://dev.openlayers.org/releases/OpenLayers-2.9/examples/getfeature-wfs.html >> >> but it doesn't work. >> >> How ever when I create a WFS atop a WMS and then do getfeature on the WFS >> layer I get the information about the features. >> My problems are: >> >> 1) When I drag a mouse a box is created but it goes off as soon as I leave >> it.I want a permanent layer over the position of selection. >> >> 2) I want to have a circle instead of a box for selection. >> >> You can look at my code in my post, >> >> http://osgeo-org.1803224.n2.nabble.com/WFS-GEtFeature-layer-not-showing-on-map-td4921150.html#a4921150 >> http://osgeo-org.1803224.n2.nabble.com/WFS-GEtFeature-layer-not-showing-on-map-td4921150.html#a4921150 >> >> Thanks again. >> -- >> View this message in context: >> http://osgeo-org.1803224.n2.nabble.com/control-SelectFeature-tp4930933p4966806.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From rafeh at dreamscapeit.com Mon May 3 00:01:10 2010 From: rafeh at dreamscapeit.com (Rafe Hargrove) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] Consulting Services Message-ID: <05C9849EADA5174AAFFDC0463FF5B6F8195F61@mail.dreammail.local> I am looking for a seasoned OpenLayers developer with experience in integrating OpenLayers with a MapServer/PostgreSQL backend. WFS-T experience is required. If interested, please respond to rafeh@dreamscapeit.com . Thanks, Rafe This email and any attached files are confidential and intended solely for the intended recipient(s). If you are not the named recipient you should not read, distribute, copy or alter this email. Any views or opinions expressed in this email are those of the author and do not represent those of the company. Warning: Although precautions have been taken to make sure no viruses are present in this email, the company cannot accept responsibility for any loss or damage that arise from the use of this email or attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100502/4457f8f1/attachment.html From slawomir.messner at staff.uni-marburg.de Mon May 3 04:07:14 2010 From: slawomir.messner at staff.uni-marburg.de (Slawomir Messner) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] Generated icons in a vector layer based on KML In-Reply-To: <4BCD7190.9020809@staff.uni-marburg.de> References: <4BCC3E23.8060307@staff.uni-marburg.de> <4BCD7190.9020809@staff.uni-marburg.de> Message-ID: <4BDE8432.9000808@staff.uni-marburg.de> Hi, to complete this. I've solved the problem with this lines of code : newLayer.events.register("loadend", newLayer, function(evt){this.setVisibility(true);}); newLayer.visibility = false; userContext.controller.map.addLayer(newLayer); What happens: If the layer is visible before loadend the symbols/graphics only show if they are in the buffer, now when layer is invisible while waiting for kml-data they come at the first time. Slawomir Messner Am 20.04.2010 11:19, schrieb Slawomir Messner: > Hi again, > it seems that Chome has the same problem, all images have 0/0 > dimensions. But in Chrome dims are also 0/0 when you call the layer > again and the images are already generated at the first call. > > Am 19.04.2010 13:27, schrieb Slawomir Messner: > >> Hi, >> I want to add a vector layer with a generated KML file with generated >> icons. Both are generated together and then the KML-file is sent to the >> client. Then when the kml-file is loaded as a layer OL tries to get the >> icon files form a ASP handler, they are not generated by the handler >> they are already existing at the time when OL requests them. The >> icon-files are generated only once on a second call the already existing >> files are sent to the client. >> So, now the problem: When I first call the layer no icons are visible on >> the second and the next tries the icons are visible. >> 1. I looked into firebug and all the icons are sent to the client. >> 2. Firebug tells me that the icons are there but the width and height >> are 0 when I change them the icon is visible. >> 3. I looked into the Format.KML and Renderer.SVG and they told me the >> width is 32x32 in the setStyle-function, I suppose it's the default >> value of OL my icons are smaller. >> 4. I saw in 3 you parse the w/h tags of icon in kml so I set them, but >> it doesn't help the w/h in firebug says it's both 0. >> 5. When I tried 3 and 4 I used some alerts and when I paste them into >> setStyle like this: >> //if(this.test< 10) >> //alert("1 : "+style.graphicWidth +" : >> "+style.graphicHeight); >> var width = style.graphicWidth || style.graphicHeight; >> var height = style.graphicHeight || style.graphicWidth; >> //if(this.test< 10) >> //alert("2 : "+width+" : "+height); >> width = width ? width : style.pointRadius*2; >> height = height ? height : style.pointRadius*2; >> //if(this.test< 10) >> //alert("3 : "+width+" : "+height); >> this.test++; >> a random number of icons appeared on the map. >> 6. I tried to delay the sending of the kml-file but no change. >> 7. I tried all if the icon-files are locked or something but it doesn't >> seem so and if you remember firebug says the files are ok. >> 8. I debugged the handler, but the files are ok and no hidden exception >> and the icons are not visible after a breakpoint, not like with the alert. >> So that's all from me, anyone an idea? >> Thanks >> Slawomir >> >> >> > > -- ----------------------------------------------- Slawomir Messner Forschungszentrum "Deutscher Sprachatlas" 06421-28-24981 From zaza1851983ml at googlemail.com Mon May 3 04:53:26 2010 From: zaza1851983ml at googlemail.com (Moataz Elmasry) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] no element found with OpenLayers.Request Message-ID: <4BDE8F06.2080401@googlemail.com> Hello List I'm creating a feature with the features-edit tool and then committing this feature to some server in geojson format. It looks as follows: OpenLayers.Request.POST({ url: Pronto.consts.Mapservice.URL.Base, callback: this.featureHandler, scope: this, headers: { "Content-Type": "text/plain" }, params : { geojson : serializedJson, featureid : featureId, featuretype : Pronto.consts.layer.id.Annotation, action : "create" } }); and the handler: featureHandler : function(request) { console.log(request); } Everything on the firebug looks ok. but in web developer toolbar I get the error: Error: no element found Source File: http://localhost:8089/PRONTO_MAP/servlet?geojson=%7B%22type%22%3A%22FeatureCollection%22%2C%22features%22%3A%5B%7B%22type%22%3A%22Feature%22%2C%22id%22%3A%22OpenLayers.Feature.Vector_402%22%2C%22properties%22%3A%7B%22name%22%3A%22%22%2C%22description%22%3A%22%22%7D%2C%22geometry%22%3A%7B%22type%22%3A%22Polygon%22%2C%22coordinates%22%3A%5B%5B%5B6.1054986506963%2C49.58728741831%5D%2C%5B6.1130088359377%2C49.58728741831%5D%2C%5B6.1117642909548%2C49.585033821579%5D%2C%5B6.1076444179081%2C49.585033821579%5D%2C%5B6.1054986506963%2C49.58728741831%5D%5D%5D%7D%7D%5D%7D&featureid=annotations.1_1482%0D%0A.1272876543855&featuretype=annotations&action=create Line: 1 Any ideas? Thanks for the help From zaza1851983ml at googlemail.com Mon May 3 04:56:46 2010 From: zaza1851983ml at googlemail.com (Moataz Elmasry) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] no element found with OpenLayers.Request In-Reply-To: <4BDE8F06.2080401@googlemail.com> References: <4BDE8F06.2080401@googlemail.com> Message-ID: <4BDE8FCE.1070405@googlemail.com> sorry forgot to mention Firefox 3.5.9 OpenLayers: 2.8 Firebug 1.5.3 And the url is localhost Moataz Elmasry wrote: > Hello List > > I'm creating a feature with the features-edit tool and then committing > this feature to some server in geojson format. > > It looks as follows: > OpenLayers.Request.POST({ > url: Pronto.consts.Mapservice.URL.Base, > callback: this.featureHandler, > scope: this, > headers: { > "Content-Type": "text/plain" > }, > > params : { > geojson : serializedJson, > featureid : featureId, > featuretype : Pronto.consts.layer.id.Annotation, > action : "create" > } > }); > > and the handler: > featureHandler : function(request) { > console.log(request); > } > > > Everything on the firebug looks ok. but in web developer toolbar I get > the error: > Error: no element found > Source File: > http://localhost:8089/PRONTO_MAP/servlet?geojson=%7B%22type%22%3A%22FeatureCollection%22%2C%22features%22%3A%5B%7B%22type%22%3A%22Feature%22%2C%22id%22%3A%22OpenLayers.Feature.Vector_402%22%2C%22properties%22%3A%7B%22name%22%3A%22%22%2C%22description%22%3A%22%22%7D%2C%22geometry%22%3A%7B%22type%22%3A%22Polygon%22%2C%22coordinates%22%3A%5B%5B%5B6.1054986506963%2C49.58728741831%5D%2C%5B6.1130088359377%2C49.58728741831%5D%2C%5B6.1117642909548%2C49.585033821579%5D%2C%5B6.1076444179081%2C49.585033821579%5D%2C%5B6.1054986506963%2C49.58728741831%5D%5D%5D%7D%7D%5D%7D&featureid=annotations.1_1482%0D%0A.1272876543855&featuretype=annotations&action=create > > Line: 1 > > Any ideas? > Thanks for the help > From Zoeppi at gmx.de Mon May 3 05:20:16 2010 From: Zoeppi at gmx.de (Zoeppi@gmx.de) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] Show huge vector layers Message-ID: <20100503092016.308570@gmx.net> Hello, I use OpenLayers to show the track of a user. The user uploads a gpx file and OpenLayers creates a vector and than shows the track. That's all working fine. But users can also upload track files with more than 10000 track points and that will slow down the zooming and scrolling of the map. I thought about using only every n-th track point, but if I zoom in, the resolution of the track becomes more and more bad, so I had to recalculate the track points for every zoom level, which also slows down the browser. So is there a way to limit the number of shown track points of a vector? Or is there a better way to solve my issue? Thanks for your help and best regards. Ren? -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From zac.spitzer at gmail.com Mon May 3 06:19:35 2010 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] Show huge vector layers In-Reply-To: <20100503092016.308570@gmx.net> References: <20100503092016.308570@gmx.net> Message-ID: why not just use a map server? On 3 May 2010 19:20, wrote: > Hello, > > I use OpenLayers to show the track of a user. The user uploads a gpx file and OpenLayers creates a vector and than shows the track. That's all working fine. But users can also upload track files with more than 10000 track points and that will slow down the zooming and scrolling of the map. > > > I thought about using only every n-th track point, but if I zoom in, the resolution of the track becomes more and more bad, so I had to recalculate the track points for every zoom level, which also slows down the browser. > So is there a way to limit the number of shown track points of a vector? > > Or is there a better way to solve my issue? > > Thanks for your help and best regards. > Ren? > -- > GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 From lluis at sigte.udg.es Mon May 3 05:18:01 2010 From: lluis at sigte.udg.es (=?ISO-8859-1?Q?Llu=EDs_Vicens?=) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] Community Review Program at FOSS4G2010 Message-ID: <4BDE94C9.3070200@sigte.udg.es> At FOSS4G 2010 the community and conference registrants will have an opportunity to read through and score potential presentations prior to the selection of the final conference program. [1] There is enough room in the conference schedule for 120 presentations. The conference committee will use the aggregate scores from the community review process to help choose which presentations to accept, and to assign presentations to appropriately sized rooms. The top quoted presentations will receive a special attention from the organization. Please follow this link to express your opinion: http://2010.foss4g.org/review/ Best regards, Llu?s LOC Member [1] http://wiki.osgeo.org/wiki/FOSS4G_2010_Press_Release_8 From to.tonton at gmail.com Mon May 3 08:13:52 2010 From: to.tonton at gmail.com (Tonton) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] multiple wms Layer Message-ID: hello how to use multiple layer from wms i just can see a layers at once other layers are hidden by the previous thanks Bonjour comment utiliser plusieurs layer wms sans qu'ils ne se dissimulent ? Je ne peux apercevoir q'un layer a la fois ? les autre layers sont cach?s par le pr?c?dent Merci -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100503/f8a5496a/attachment.html From brfr at metrico.lu Mon May 3 08:26:41 2010 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] multiple wms Layer In-Reply-To: References: Message-ID: <4BDEC101.7090109@metrico.lu> Am 03.05.2010 14:13, schrieb Tonton: > hello > > how to use multiple layer from wms > > i just can see a layers at once other layers are hidden by the previous > > thanks > > Bonjour > comment utiliser plusieurs layer wms sans qu'ils ne se dissimulent ? > > Je ne peux apercevoir q'un layer a la fois ? les autre layers sont > cach?s par le pr?c?dent > > Merci > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users Hi, only one baselayer can be visible at once, if you define your WMS layer as overlays you should be able to have more than one active Frank -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From ashley_c_mort at raytheon.com Mon May 3 08:39:39 2010 From: ashley_c_mort at raytheon.com (mortac8) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] SelectFeature on Overlapping Layers In-Reply-To: <1263887874224-4418624.post@n2.nabble.com> References: <1263810393266-4412919.post@n2.nabble.com> <4B544D5F.3070601@terrestris.de> <20100118154037.GD29171@metacarta.com> <1263887874224-4418624.post@n2.nabble.com> Message-ID: <1272890379802-4997561.post@n2.nabble.com> Did you ever find a solution for this? I am looking for a way to set a "top" layer so that if data from different layers overlap, the data on my "top" layer gets selected. Afroz Kannancheri wrote: > > Thanx for the replies, > What I expect is to get the data for the polygon on Layer2 > hidden below the polygon on Layer1. > I donno how to iterate and check if theres an intersection and get data if > thers an intersection. > Did some research on this before replying but failed. > Please shed some light on this. > > Thanks > Afroz > > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/SelectFeature-on-Overlapping-Layers-tp4412919p4997561.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From list at rdewit.net Mon May 3 08:47:58 2010 From: list at rdewit.net (Roald de Wit) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] Show huge vector layers In-Reply-To: <20100503092016.308570@gmx.net> References: <20100503092016.308570@gmx.net> Message-ID: <4BDEC5FE.2070308@rdewit.net> Hi Ren?, About a year ago, I tackled a similar problem [1] by putting FeatureServer [2] in front of my WFS server, acting as a WPS (sort of). Nowadays there are a few applications that can do real WPS (OGC standard), like PyWPS, Zoo, deegree (IIRC). The nice thing with FS was that I only needed to proved the resolution as an extra WFS parameter to get it to work in OL. The idea is simple: - convert your GPX data into something that GeoServer (or MapServer, etc) can consume and then output as WFS - have a WPS act as a proxy between OL and your WFS and - configure the WPS to simplify the features it returns, based on your map resolution. The more you zoom in, the less you have it simplify and vice versa. I hope that helps. Regards, Roald [1] http://openlayers.org/pipermail/users/2009-January/009924.html [2] http://featureserver.org/ On 03/05/10 19:20, Zoeppi@gmx.de wrote: > Hello, > > I use OpenLayers to show the track of a user. The user uploads a gpx file and OpenLayers creates a vector and than shows the track. That's all working fine. But users can also upload track files with more than 10000 track points and that will slow down the zooming and scrolling of the map. > > > I thought about using only every n-th track point, but if I zoom in, the resolution of the track becomes more and more bad, so I had to recalculate the track points for every zoom level, which also slows down the browser. > So is there a way to limit the number of shown track points of a vector? > > Or is there a better way to solve my issue? > > Thanks for your help and best regards. > Ren? > From pauljame at gmail.com Mon May 3 10:38:54 2010 From: pauljame at gmail.com (Paul james) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer In-Reply-To: References: <0ef201ca38a5$2ee661d0$3998a8c0@deltha> Message-ID: Hi Arnd... I have some questions about that... First I have a geo app using Openlayers/Mapserver WMS with SDE layers.... My application has a treeview with all layers, and a radiobox for each layer... When I click in a layer?s radiobox a window with a GRID containing all layer?s data is opened... In that GRID, When I select a line (layer?s data), the Map should : 1-) Highlight it 2-) Zoom in data selected Can I develope that using SLD and SLD_BODY ? Do you have any tip to how do that? Thanks On Fri, Sep 18, 2009 at 5:40 PM, Arnd Wippermann wrote: > hi salas, > > you request the layer Cuba, but in the SLD_BODY you describe rules for the > layer topp:cuba. Change it to Cuba. And if your SLD_BODY has escaped chars, > change them too (%3D =, %23 #). > > you can try this > > http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map > &Service=WMS&Version=1.1.1&Request=GetStyles&Layers=Cuba > > to get a sld file for the layer defined by the mapfile . > > Arnd > > ------------------------------ > *Von:* fsalas [mailto:fsalas@geocuba.cu] > *Gesendet:* Freitag, 18. September 2009 23:15 > > *An:* Arnd Wippermann > *Cc:* users@openlayers.org > *Betreff:* Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS > Layer > > Arnd, > > Thanks very very much for your help, the map is show, as you said I forgot > to insert a projection block. > > My finaly objetive is obtain one maps change the sld_body params, but its > don't affect the maps. > > This is part of my code > *********************** > function init(){ > var options = { > projection: new OpenLayers.Projection("EPSG:4267"), > displayProjection: new OpenLayers.Projection("EPSG:4267"), > units: 'degrees', > maxResolution: 0.05115824837085553, > maxExtent: new > OpenLayers.Bounds(-86.09240990784447,19.463031059956343,-72.99589832490545,23.634939943479928), > controls : [] > }; > > map = new OpenLayers.Map('map',options); > > // setup single tiled layer > > layer0 = new OpenLayers.Layer.WMS( > "Cuba"," > http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map > ", > { layers: "Cuba", > format: "image/png", > transparent: 'true' > }); > > layer0.isBaseLayer=true; > > map.addLayers([layer0]); > > // setup controls and initial zooms > map.addControl(new OpenLayers.Control.PanZoomBar()); > map.addControl(new OpenLayers.Control.Navigation()); > map.addControl(new OpenLayers.Control.Scale($('scale'))); > map.addControl(new > OpenLayers.Control.MousePosition({element:$('location')})); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > } > > function Mostrar() > { > map.layers[0].mergeNewParams({SLD_BODY:' version%3D"1.0.0">topp:cubaUserSelection xmlns:gml%3D" > http://www.opengis.net/gml">codprovpinarname%3D"fill">%23FF0000'}); > > } > > Best Regards, > > Salas > > > *************** > > > > > ----- Original Message ----- > *From:* Arnd Wippermann > *To:* 'fsalas' > *Sent:* Friday, September 18, 2009 1:50 PM > *Subject:* AW: [OpenLayers-Users] HELP!!! How implement Filter in WMS > Layer > > Hi salas, > > as the message says, you have forgotten to insert a projection block in the > mapfile on map level. > > PROJECTION > 'init=EPSG:4267' > END > Arnd > > ------------------------------ > *Von:* fsalas [mailto:fsalas@geocuba.cu] > *Gesendet:* Freitag, 18. September 2009 19:28 > *An:* Arnd Wippermann > *Betreff:* Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS > Layer > > Arnd, the problem persist , I atach the imagen error and the map file and > the html file. > > > I don?t know how resolve this problem, can you chek this files? > > > > Regards , salas > > ----- Original Message ----- > From: "Arnd Wippermann" > To: "'fsalas'" > Sent: Friday, September 18, 2009 10:28 AM > Subject: AW: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer > > Hi salas, > > Now have a look at your OpenLayers code. I suggest, that you have no > options > set for your map. > > var options = { > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: "m", > numZoomLevels: 18, > maxResolution: 156543.0339, > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, > 20037508, 20037508.34), > controls : [] > }; > > map = new OpenLayers.Map('map', options); > > It is an example for the google projection. > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: fsalas [mailto:fsalas@geocuba.cu] > Gesendet: Freitag, 18. September 2009 18:14 > An: Arnd Wippermann > Cc: users@openlayers.org > Betreff: Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer > > Arnd, > > I don't Know why in WMS request ,the EPSG is different of 2085, Its > EPSG:4326 > > ----- Original Message ----- > From: "Arnd Wippermann" > To: "'fsalas'" > Sent: Friday, September 18, 2009 9:06 AM > Subject: AW: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer > > > Hi, > > You have not added the projection block to the layer. Perhaps it is needed, > i'm not sure. I declare always a projection for the map (as default > output), > and for the layers (the data have to be in a specific projection). > > If the problem remain, do the next: > > The message comes, when the WMS requests for an EPSG, that is not declared > in the wms_srs tag. Have you in OpenLayers the projection for the map set > to > EPSG:2085. For the layer you need not declare the SRS, because OpenLayers > add the EPSG from the map to the SRS parameter for the WMS layer. > > Use right click on your map to get the url for one tile of your WMS. Paste > the url into the addressbar of your browser. The errormessage should be the > same. But now you can inspect the WMS request. Look at the SRS. Is it > &SRS=EPSG:2085? > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: fsalas [mailto:fsalas@geocuba.cu] > Gesendet: Freitag, 18. September 2009 16:31 > An: Arnd Wippermann > Betreff: Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer > > Arn , I make your suggestion in my map file but the problem persist > > I atach my map file and the error image > > regards salas > > ___________________________________ > Direcci?n de Comunicaciones > Grupo Empresarial GEOCUBA > Este mensaje esta libre de virus. > Revisado por Kaspersky Antivirus > ---------------------------------------------------------------------- > Definition count: 2596814 > Definition date: 9/18/2009 > SecurityPlus version: 3.0.5 > > > > > ___________________________________ > Direcci?n de Comunicaciones > Grupo Empresarial GEOCUBA > Este mensaje esta libre de virus. > Revisado por Kaspersky Antivirus > ---------------------------------------------------------------------- > Definition count: 2596814 > Definition date: 9/18/2009 > SecurityPlus version: 3.0.5 > > > > > ___________________________________ > Direcci?n de Comunicaciones > Grupo Empresarial GEOCUBA > Este mensaje esta libre de virus. > Revisado por Kaspersky Antivirus > ---------------------------------------------------------------------- > Definition count: 2596814 Definition date: 9/18/2009 SecurityPlus version: > 3.0.5 > > > ___________________________________ > Direcci?n de Comunicaciones > Grupo Empresarial GEOCUBA > Este mensaje esta libre de virus. > Revisado por Kaspersky Antivirus > ---------------------------------------------------------------------- > Definition count: 2596814 Definition date: 9/18/2009 SecurityPlus version: > 3.0.5 > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100503/17fca8c5/attachment.html From to.tonton at gmail.com Mon May 3 11:01:11 2010 From: to.tonton at gmail.com (Tonton) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] multiple wms Layer In-Reply-To: <4BDEC101.7090109@metrico.lu> References: <4BDEC101.7090109@metrico.lu> Message-ID: > Hi, > > only one baselayer can be visible at once, if you define your WMS layer > as overlays you should be able to have more than one active > > Frank > did you mean to add this at my other layer definitions ? {isBaseLayer:false} ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100503/e0ebb8f6/attachment.html From estelle_ancelet at hotmail.fr Mon May 3 11:33:34 2010 From: estelle_ancelet at hotmail.fr (Estelle A) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] How put a fix image on the map? In-Reply-To: <20090831142807.GC10927@metacarta.com> References: <20090831142807.GC10927@metacarta.com> Message-ID: <1272900814215-4998418.post@n2.nabble.com> Hi, Do anybody knows which file has to be modified to change image position in the map? Thanks in advance Estelle Christopher Schmidt-2 wrote: > > On Mon, Aug 31, 2009 at 12:27:19PM +0200, Jimmy Aumard wrote: >> Hi list, >> >> I want to know how it's possible to put a fix image on the right bottom >> on >> the map? (like google logo) > > new OpenLayers.Layer.Vector("My Data", { > 'attribution': " /foo/bar.png " > }); > > Ensure that you have the OpenLayers.Control.Attribution in the map, and > you > should be good. (It's there by default, unless you're overriding the > default > controls.) > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-put-a-fix-image-on-the-map-tp3552625p4998418.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Mon May 3 11:48:06 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] How put a fix image on the map? In-Reply-To: <1272900814215-4998418.post@n2.nabble.com> References: <20090831142807.GC10927@metacarta.com> <1272900814215-4998418.post@n2.nabble.com> Message-ID: Hi, this is just a matter of css. No need to change any file, just use a DOM inspector to see what CSS class the output has (should be something like "olControlAttribution", create a selector with that class (e.g. ".olControlAttribution) and give it an appropriate positioning in your application css. Regards, Andreas. On May 3, 2010, at 17:33 , Estelle A wrote: > > Hi, > > Do anybody knows which file has to be modified to change image position in > the map? > Thanks in advance > > Estelle > > > Christopher Schmidt-2 wrote: >> >> On Mon, Aug 31, 2009 at 12:27:19PM +0200, Jimmy Aumard wrote: >>> Hi list, >>> >>> I want to know how it's possible to put a fix image on the right bottom >>> on >>> the map? (like google logo) >> >> new OpenLayers.Layer.Vector("My Data", { >> 'attribution': " /foo/bar.png " >> }); >> >> Ensure that you have the OpenLayers.Control.Attribution in the map, and >> you >> should be good. (It's there by default, unless you're overriding the >> default >> controls.) >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-put-a-fix-image-on-the-map-tp3552625p4998418.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From afrozk at gmail.com Mon May 3 11:56:08 2010 From: afrozk at gmail.com (Afroz Kannancheri) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] SelectFeature on Overlapping Layers In-Reply-To: <1272890379802-4997561.post@n2.nabble.com> References: <1263810393266-4412919.post@n2.nabble.com> <4B544D5F.3070601@terrestris.de> <20100118154037.GD29171@metacarta.com> <1263887874224-4418624.post@n2.nabble.com> <1272890379802-4997561.post@n2.nabble.com> Message-ID: Hi, Coulnt find a solution with the vector layers nd I dint continue trying as the vector layers were giving me other problems as well. I changed my two layers to WMS layers and then found a workaround by making the featurecount as 2 and parsing the result Thanks Afroz Kannancheri On Mon, May 3, 2010 at 4:39 PM, mortac8 [via OSGeo.org] < ml-node+4997561-266906357-382940@n2.nabble.com > wrote: > Did you ever find a solution for this? I am looking for a way to set a > "top" layer so that if data from different layers overlap, the data on my > "top" layer gets selected. > > Afroz Kannancheri wrote: > Thanx for the replies, > What I expect is to get the data for the polygon on Layer2 > hidden below the polygon on Layer1. > I donno how to iterate and check if theres an intersection and get data if > thers an intersection. > Did some research on this before replying but failed. > Please shed some light on this. > > Thanks > Afroz > > > > ------------------------------ > View message @ > http://osgeo-org.1803224.n2.nabble.com/SelectFeature-on-Overlapping-Layers-tp4412919p4997561.html > To unsubscribe from Re: SelectFeature on Overlapping Layers, click here. > > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/SelectFeature-on-Overlapping-Layers-tp4412919p4998540.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100503/55d89f41/attachment.html From arnd.wippermann at web.de Mon May 3 12:58:29 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:47 2010 Subject: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer In-Reply-To: Message-ID: Hi Paul, SLD_BODY is a request parameter of a wms. If you can get from your grid a reference to your OpenLayers WMS layer, then you can use yourWMSlayer.mergeNewParams('SLD_BODY' : ....). if your wms have only one layer (in the eample below POLYGONS) to request, you can use something like this COUNTRY #f0f0f0 1.00 #646464 as SLD_BODY to highlight the the features of the layer. Attention! You have to delete the line feeds for the request. Zooming to the extent of the wms layer is not so easy, perhaps inpossible. You can request the WMS GetCapabilities and hope that there the correct extent are described for the layer. Or if the layer is also requestable as WFS you can perhaps on that way get the extent of the layer. But I'm not sure. If you are the holder of the WMS server, I would suggest, that you calculate the extent on other ways and adds it as array to your application. Arnd _____ Von: Paul james [mailto:pauljame@gmail.com] Gesendet: Montag, 3. Mai 2010 16:39 An: Arnd Wippermann Cc: fsalas; users@openlayers.org Betreff: Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer Hi Arnd... I have some questions about that... First I have a geo app using Openlayers/Mapserver WMS with SDE layers.... My application has a treeview with all layers, and a radiobox for each layer... When I click in a layer?s radiobox a window with a GRID containing all layer?s data is opened... In that GRID, When I select a line (layer?s data), the Map should : 1-) Highlight it 2-) Zoom in data selected Can I develope that using SLD and SLD_BODY ? Do you have any tip to how do that? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100503/0e30ca14/attachment.html From pauljame at gmail.com Mon May 3 14:02:08 2010 From: pauljame at gmail.com (Paul james) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer In-Reply-To: References: Message-ID: Thanks Arnd! So, I have 3 WMS layers: Roads, GasStation, Country... The user will select the Layer with radiobutton, and after select one data in Grid... So I?ll use selectedWMSLayer.mergeNewParams with a SLD_BODY ... Is that right? And how about Mapfile configuration, Am I suppossed to change anything? What? Thanks On Mon, May 3, 2010 at 1:58 PM, Arnd Wippermann wrote: > Hi Paul, > > SLD_BODY is a request parameter of a wms. If you can get from your grid a > reference to your OpenLayers WMS layer, then you can use > > yourWMSlayer.mergeNewParams('SLD_BODY' : ....). > > if your wms have only one layer (in the eample below POLYGONS) to request, > you can use something like this > > xmlns:gml="http://www.opengis.net/gml" xmlns:ogc=" > http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" > http://www.opengis.net/sld > http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"> > > COUNTRY > > > > > > #f0f0f0 > 1.00 > > > #646464 > > > > > > > > > as SLD_BODY to highlight the the features of the layer. Attention! You have > to delete the line feeds for the request. > > Zooming to the extent of the wms layer is not so easy, perhaps inpossible. > You can request the WMS GetCapabilities and hope that there the correct > extent are described for the layer. Or if the layer is also requestable as > WFS you can perhaps on that way get the extent of the layer. But I'm not > sure. > > If you are the holder of the WMS server, I would suggest, that you > calculate the extent on other ways and adds it as array to your application. > > Arnd > > ------------------------------ > *Von:* Paul james [mailto:pauljame@gmail.com] > *Gesendet:* Montag, 3. Mai 2010 16:39 > *An:* Arnd Wippermann > *Cc:* fsalas; users@openlayers.org > > *Betreff:* Re: [OpenLayers-Users] HELP!!! How implement Filter in WMS > Layer > > Hi Arnd... > I have some questions about that... > > First I have a geo app using Openlayers/Mapserver WMS with SDE layers.... > My application has a treeview with all layers, and a radiobox for each > layer... When I click in a layer?s radiobox a window with a GRID containing > all layer?s data is opened... > In that GRID, When I select a line (layer?s data), the Map should : > 1-) Highlight it > 2-) Zoom in data selected > > Can I develope that using SLD and SLD_BODY ? Do you have any tip to how do > that? > > Thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100503/4c7ab82c/attachment.html From mike at uwmike.com Mon May 3 17:28:23 2010 From: mike at uwmike.com (Mike Purvis) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Basic marker questions Message-ID: Hi everyone, I'm working on an application that allows the user to add lines and vertices to the map, to construct routes. In Google Maps, this would simply be markers and polylines. Using the OpenLayers abstraction layer, should I be using OpenLayers.Marker? What about the line segments? If they're on a separate layer, will they still be able to receive clicks? I read elsewhere that the use of Marker and Layer.Markers is effectively deprecated in the OpenLayers world, in favour of Layer.Vector. Is this true? Is there one of the basic examples that demonstrates dynamically adding and removing different objects from a Layer.Vector? Ideally, something like: click the map to create a marker, click the marker to delete it. Please note that I do not wish to use the standard editing toolbar that comes with OpenLayers?my application is fairly specialized, so I will need to build up this functionality from scratch. Thanks! Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100503/6ff7fc01/attachment.html From guillaume at viguierjust.com Mon May 3 17:58:41 2010 From: guillaume at viguierjust.com (guillaumev) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] How to print map area with openlayers In-Reply-To: <1272567502163-4981714.post@n2.nabble.com> References: <1271243350225-4901023.post@n2.nabble.com> <1271342226074-4907889.post@n2.nabble.com> <1272310179761-4964522.post@n2.nabble.com> <4BD6A944.379F.0037.0@asurequality.com> <88F992D3-E31A-4ABC-BE9C-129EADCA03FD@gmail.com> <1272400964123-4970936.post@n2.nabble.com> <1272567502163-4981714.post@n2.nabble.com> Message-ID: <1272923921968-5000414.post@n2.nabble.com> Hi, Just in case someone encounters the same problem (i. e. when moving the map, it is printed in its initial position), I solved it by adding the position of the viewport (map.layerContainerDiv.style.left and map.layerContainerDiv.style.top), and then adding the left value of the viewport to the $tile->x and the top value of the viewport to the $tile->y in the calls to imagecopymerge_alpha. Here is my full client code (I encapsulated the map object within an object): this.print = function(print_url, callback) { var size = this.map.getSize(); var tiles = []; var nb_layers = this.map.layers.length; var layeri = 0; var nb_vector_layers = 0; var features = []; for (layeri = 0; layeri < nb_layers; layeri++) { // if the layer isn't visible at this range, or is turned off, skip it var layer = this.map.layers[layeri]; if (!layer.getVisibility()) continue; if (!layer.calculateInRange()) continue; if (layer.grid) { // iterate through their grid's tiles, collecting each tile's extent and pixel location at this moment var grid_length = layer.grid.length; var row_length = 0; var tilerow = 0; var tilei = 0; for (tilerow = 0; tilerow < grid_length; tilerow++) { row_length = layer.grid[tilerow].length; tilei = 0; for (tilei = 0; tilei < row_length; tilei++) { var tile = layer.grid[tilerow][tilei]; var url = layer.getURL(tile.bounds); var position = tile.position; var opacity = layer.opacity ? parseInt(100*layer.opacity) : 100; var bounds = tile.bounds; tiles[tiles.length] = {url:url, x:position.x, y:position.y, opacity:opacity, bounds:{left:bounds.left, right: bounds.right, top: bounds.top, bottom: bounds.bottom}}; } } } else { // get the features of the layer var olFeatures = layer.features; var features_temp = []; var styles = {}; var nb_features = layer.features.length; var featuresi = 0; var nextId = 1; for (var i = 0; i < nb_features; i++) { var feature = olFeatures[i]; var style = feature.style || layer.style || layer.styleMap.createSymbolizer(feature, feature.renderIntent); if(feature.geometry) { if (feature.geometry.CLASS_NAME.search(/point$/i) >= 0) { var fpos = this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y)); if(fpos != null) { features_temp[featuresi] = {type: 'point', x: fpos.x, y:fpos.y, style: style}; featuresi++; } } } } features[nb_vector_layers] = features_temp; nb_vector_layers++; } } // hand off the list to our server-side script, which will do the heavy lifting var tiles_json = JSON.stringify(tiles); var features_json = JSON.stringify(features); var viewport_left = parseInt(this.map.layerContainerDiv.style.left); var viewport_top = parseInt(this.map.layerContainerDiv.style.top); var viewport = {top: viewport_top, left: viewport_left}; var viewport_json = JSON.stringify(viewport); var scale = Math.round(this.map.getScale()); OpenLayers.Request.POST( { url:print_url, data:OpenLayers.Util.getParameterString({width:size.w,height:size.h,scale:scale,viewport: viewport_json,tiles:tiles_json,features:features_json}), headers:{'Content-Type':'application/x-www-form-urlencoded'}, callback: callback } ); } -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-print-map-area-with-openlayers-tp4901023p5000414.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adam.jamison at portbris.com.au Mon May 3 18:12:15 2010 From: adam.jamison at portbris.com.au (Jamo) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Google / Yahoo Geometry transfrom?? Message-ID: <1272924735788-5000481.post@n2.nabble.com> I've decided to try and use openlayers for a small project I'm working on ... basically a little website that users can hover over block of land and get information. I'd like to give the user the option of having yahoo maps or even google maps as the background. I can get a map with yahoo maps background. However I can't seem to transform my geometry ... at all (Example of a single point)... I thought it would transform my point into EPSG 4236 from EPSG 28356 ? ... ... var map = new OpenLayers.Map('map', {projection: new OpenLayers.Projection("EPSG:4326")}); var layer = new OpenLayers.Layer.Yahoo("Yahoo"); map.addLayer(layer); map.zoomToMaxExtent(); map.addControl(new OpenLayers.Control.MousePosition()); var proj = new OpenLayers.Projection("EPSG:28356"); map.setCenter(new OpenLayers.LonLat(511500, 6966000).transform(proj, map.getProjectionObject()), 10); -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Google-Yahoo-Geometry-transfrom-tp5000481p5000481.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mike at uwmike.com Mon May 3 18:20:51 2010 From: mike at uwmike.com (Mike Purvis) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Documentation of apparent functionality duplication? Message-ID: Hi again, I'm confused at a number of points where OpenLayers seems to contain multiple possible ways of doing the same thing. For example, what is a Geometry.Point? Is it closer in spirit to a LonLat or a Pixel? Why does its constructor take x and y rather than a LonLat or Pixel? Is there an FAQ or some kind of documentation somewhere that disambiguates these things a little and explains which aspects are by-design, and which are the result of heritage? Thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100503/83dfe67d/attachment.html From subhaniminhas at gmail.com Mon May 3 21:42:39 2010 From: subhaniminhas at gmail.com (Subhani Minhas) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Ho to add a marker with custom Icon and Text Message-ID: hello All, i myself was recently working on the problem of adding a custom marker with custom text, and with the help of open-layers examples code i was able to achieve following: 1. Add a marker with a custom icon and label, each time i click on the map. 2. Able to drag markers I have only this suggestion that this functionality is pretty basic and should be made part of editing toolbar, along with the option to save and load KML data. Here is the complete working code: You can copy paste this code in an html file in the open-layers 2.9 examples folder and it should work fine :-) ----------------------------------Code to add a custom marker--------------------- OpenLayers Click Event Example

Click Event Example with Custom Marker

This example shows the use of the click handler and getLonLatFromViewPortPx functions to trigger events on mouse click.It also shopws how to add a custom marker with custom Icon

----------------------------------Code to add a custom marker--------------------- >Hi everyone, >I'm working on an application that allows the user to add lines and vertices >to the map, to construct routes. In Google Maps, this would simply be >markers and polylines. >Using the OpenLayers abstraction layer, should I be using OpenLayers.Marker? >What about the line segments? If they're on a separate layer, will they >still be able to receive clicks? >I read elsewhere that the use of Marker and Layer.Markers is effectively >deprecated in the OpenLayers world, in favour of Layer.Vector. Is this true? >Is there one of the basic examples that demonstrates dynamically adding and >removing different objects from a Layer.Vector? Ideally, something like: >click the map to create a marker, click the marker to delete it. >Please note that I do not wish to use the standard editing toolbar that >comes with OpenLayers?my application is fairly specialized, so I will need >to build up this functionality from scratch. >Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100504/2bc3b1b6/attachment.html From ashley_c_mort at raytheon.com Mon May 3 23:44:36 2010 From: ashley_c_mort at raytheon.com (mortac8) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] RootContainer styleMap problem- IE Message-ID: <1272944676994-5001602.post@n2.nabble.com> In IE 7/8 when I create a SelectFeature control and pass in an array of layers, all of my features' styles are lost (am using a custom StyleMap). If I modify Control/SelectFeature:initLayer to pass the styleMap to the RootContainer constructor, the styles will take effect if I redraw after activating the tool. However IE makes such a redraw operation painfully slow. Is there any way in IE that I can activate the SelectFeature control with an array of layers and have my features keep their styling without an expensive redraw of the layers? As usual, this problem doesn't exist in other browsers. Ideas are greatly appreciated. Thanks! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/RootContainer-styleMap-problem-IE-tp5001602p5001602.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ashley_c_mort at raytheon.com Mon May 3 23:55:15 2010 From: ashley_c_mort at raytheon.com (mortac8) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] RootContainer styleMap problem- IE In-Reply-To: <1272944676994-5001602.post@n2.nabble.com> References: <1272944676994-5001602.post@n2.nabble.com> Message-ID: <1272945315725-5001623.post@n2.nabble.com> I forgot to add that my Point features with an externalGraphic retain their styling (no problems). The loss of styling issue seems to only occur with Polygons, Polylines, etc. mortac8 wrote: > > In IE 7/8 when I create a SelectFeature control and pass in an array of > layers, all of my features' styles are lost (am using a custom StyleMap). > > If I modify Control/SelectFeature:initLayer to pass the styleMap to the > RootContainer constructor, the styles will take effect if I redraw after > activating the tool. However IE makes such a redraw operation painfully > slow. > > Is there any way in IE that I can activate the SelectFeature control with > an array of layers and have my features keep their styling without an > expensive redraw of the layers? As usual, this problem doesn't exist in > other browsers. > > Ideas are greatly appreciated. Thanks! > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/RootContainer-styleMap-problem-IE-tp5001602p5001623.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From James.Sewell at lisasoft.com Tue May 4 00:43:28 2010 From: James.Sewell at lisasoft.com (James.Sewell@lisasoft.com) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE6 / OpenLayers / Path DrawFeature and DoubleClicks Message-ID: Thanks for the help Andreas, I tried using setTimer , but this resulted in intermittent results (depending on the timing of each line draw I believe) and a flickering circle in all broswers. A simplified version of the code I am using is as below (I have omitted the map with a toolbar). I hope it isn't too convoluted! When using IE and using a polyline tool to draw a line (a circle with a diameter of 10 will be drawn around the last point) a double click will not terminate the line (single then wait then double is needed). Please note I am using an array stored in e.feature.geometry.attributes to store the rangeCircle within the Vector (as passed to the handler in e.feature). waypointLayer.events.on({'sketchstarted': sketchStarted}); waypointLayer.events.on({'sketchmodified': sketchModified}); function sketchStarted(e) { e.feature.geometry.attributes = new Array(); e.feature.geometry.attributes['circle'] = createCircle(e.feature.geometry.getVertices()); } function sketchModified(e) { e.feature.geometry.attributes['circle'].destroy(); e.feature.geometry.attributes['circle'] = createCircle(e.feature.geometry.getVertices()); waypointLayer.addFeatures(e.feature.geometry.attributes['circle']); } function createCircle(vert) { return new OpenLayers.Feature.Vector( OpenLayers.Geometry.Polygon.createRegularPolygon(vert[vert.length-1], 10, 50) ); } Any help would be really appreciated! Cheers, James Sewell LISAsoft Developer +61 (3) 8680 3200 / +61 414 688 892 -----Original Message----- From: andreas.hocevar@gmail.com [mailto:andreas.hocevar@gmail.com] On Behalf Of Andreas Hocevar Sent: Friday, 30 April 2010 8:04 PM To: James.Sewell@lisasoft.com Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] IE6 / OpenLayers / Path DrawFeature and DoubleClicks Hi, On Fri, Apr 30, 2010 at 8:23 AM, James.Sewell@lisasoft.com wrote: > I am working with OpenLayers and IE6 (which is the required SOE for the > project) and have noticed that mouse doubleclicks are not being captured > correctly when drawing a Path from an OpenLayers.Control.DrawFeature if > another element is drawn to any layer from a sketchmodified event. I think the "if" part in the above sentence screws your application. This sounds like an application issue. You could try to draw the other element in the sketchmodified handler using setTimeout. If that does not work, try to create a minimal example that shows the issues, so it will be easier for others to help. Regards, Andreas. > > > > From IE in the above situation the Path is drawn (which has a circle > dynamically drawn round it using the sketchmodified event to call the > OpenLayers.Layer.Vector.addFeatures method) but requires a single click > immediately followed by a double click to terminate the Path. > > > > If the addFeatures call is not made (the circle is not drawn ) behavior is > as normal. The code works as expected in Chrome. > > > > Has anyone dealt with this behavior before? Any help would really be > appreciated. > > > > Cheers, > > James Sewell > > LISAsoft Developer > > +61 (3) 8680 3200 / +61 414 688 892 > > > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100504/1467df4d/attachment.html From andreas.hocevar at gmail.com Tue May 4 03:22:50 2010 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE6 / OpenLayers / Path DrawFeature and DoubleClicks In-Reply-To: References: Message-ID: <9460777E-D05C-4A37-8F29-CE65066682C7@gmail.com> Hi, are you using a debugger? You should get an error, and I think this is the reason for the behavior you are experiencing: On May 4, 2010, at 06:43 , James.Sewell@lisasoft.com wrote: > Thanks for the help Andreas, > > I tried using setTimer , but this resulted in intermittent results (depending on the timing of each line draw I believe) and a flickering circle in all broswers. > > A simplified version of the code I am using is as below (I have omitted the map with a toolbar). I hope it isn?t too convoluted! > > When using IE and using a polyline tool to draw a line (a circle with a diameter of 10 will be drawn around the last point) a double click will not terminate the line (single then wait then double is needed). > > Please note I am using an array stored in e.feature.geometry.attributes to store the rangeCircle within the Vector (as passed to the handler in e.feature). > > waypointLayer.events.on({'sketchstarted': sketchStarted}); > waypointLayer.events.on({'sketchmodified': sketchModified}); > > function sketchStarted(e) > { > e.feature.geometry.attributes = new Array(); > e.feature.geometry.attributes['circle'] = createCircle(e.feature.geometry.getVertices()); > } > > function sketchModified(e) > { > e.feature.geometry.attributes['circle'].destroy(); There is no destroy method on an Object, unless you have something that overrides Object. Regards, Andreas. > e.feature.geometry.attributes['circle'] = createCircle(e.feature.geometry.getVertices()); > waypointLayer.addFeatures(e.feature.geometry.attributes['circle']); > } > > function createCircle(vert) > { > return new OpenLayers.Feature.Vector( > OpenLayers.Geometry.Polygon.createRegularPolygon(vert[vert.length-1], 10, 50) > ); > } > > Any help would be really appreciated! > Cheers, > > James Sewell > LISAsoft Developer > +61 (3) 8680 3200 / +61 414 688 892 > > -----Original Message----- > From: andreas.hocevar@gmail.com [mailto:andreas.hocevar@gmail.com] On Behalf Of Andreas Hocevar > Sent: Friday, 30 April 2010 8:04 PM > To: James.Sewell@lisasoft.com > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] IE6 / OpenLayers / Path DrawFeature and DoubleClicks > > Hi, > > On Fri, Apr 30, 2010 at 8:23 AM, James.Sewell@lisasoft.com > wrote: > > I am working with OpenLayers and IE6 (which is the required SOE for the > > project) and have noticed that mouse doubleclicks are not being captured > > correctly when drawing a Path from an OpenLayers.Control.DrawFeature if > > another element is drawn to any layer from a sketchmodified event. > > I think the "if" part in the above sentence screws your application. > This sounds like an application issue. You could try to draw the other > element in the sketchmodified handler using setTimeout. If that does > not work, try to create a minimal example that shows the issues, so it > will be easier for others to help. > > Regards, > Andreas. > > > > > > > > > From IE in the above situation the Path is drawn (which has a circle > > dynamically drawn round it using the sketchmodified event to call the > > OpenLayers.Layer.Vector.addFeatures method) but requires a single click > > immediately followed by a double click to terminate the Path. > > > > > > > > If the addFeatures call is not made (the circle is not drawn ) behavior is > > as normal. The code works as expected in Chrome. > > > > > > > > Has anyone dealt with this behavior before? Any help would really be > > appreciated. > > > > > > > > Cheers, > > > > James Sewell > > > > LISAsoft Developer > > > > +61 (3) 8680 3200 / +61 414 688 892 > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From ahocevar at opengeo.org Tue May 4 03:24:00 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE6 / OpenLayers / Path DrawFeature and DoubleClicks In-Reply-To: References: Message-ID: Hi, are you using a debugger? You should get an error, and I think this is the reason for the behavior you are experiencing: On May 4, 2010, at 06:43 , James.Sewell@lisasoft.com wrote: > Thanks for the help Andreas, > > I tried using setTimer , but this resulted in intermittent results (depending on the timing of each line draw I believe) and a flickering circle in all broswers. > > A simplified version of the code I am using is as below (I have omitted the map with a toolbar). I hope it isn?t too convoluted! > > When using IE and using a polyline tool to draw a line (a circle with a diameter of 10 will be drawn around the last point) a double click will not terminate the line (single then wait then double is needed). > > Please note I am using an array stored in e.feature.geometry.attributes to store the rangeCircle within the Vector (as passed to the handler in e.feature). > > waypointLayer.events.on({'sketchstarted': sketchStarted}); > waypointLayer.events.on({'sketchmodified': sketchModified}); > > function sketchStarted(e) > { > e.feature.geometry.attributes = new Array(); > e.feature.geometry.attributes['circle'] = createCircle(e.feature.geometry.getVertices()); > } > > function sketchModified(e) > { > e.feature.geometry.attributes['circle'].destroy(); There is no destroy method on an Object, unless you have something that overrides Object. Regards, Andreas. > e.feature.geometry.attributes['circle'] = createCircle(e.feature.geometry.getVertices()); > waypointLayer.addFeatures(e.feature.geometry.attributes['circle']); > } > > function createCircle(vert) > { > return new OpenLayers.Feature.Vector( > OpenLayers.Geometry.Polygon.createRegularPolygon(vert[vert.length-1], 10, 50) > ); > } > > Any help would be really appreciated! > Cheers, > > James Sewell > LISAsoft Developer > +61 (3) 8680 3200 / +61 414 688 892 > > -----Original Message----- > From: andreas.hocevar@gmail.com [mailto:andreas.hocevar@gmail.com] On Behalf Of Andreas Hocevar > Sent: Friday, 30 April 2010 8:04 PM > To: James.Sewell@lisasoft.com > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] IE6 / OpenLayers / Path DrawFeature and DoubleClicks > > Hi, > > On Fri, Apr 30, 2010 at 8:23 AM, James.Sewell@lisasoft.com > wrote: >> I am working with OpenLayers and IE6 (which is the required SOE for the >> project) and have noticed that mouse doubleclicks are not being captured >> correctly when drawing a Path from an OpenLayers.Control.DrawFeature if >> another element is drawn to any layer from a sketchmodified event. > > I think the "if" part in the above sentence screws your application. > This sounds like an application issue. You could try to draw the other > element in the sketchmodified handler using setTimeout. If that does > not work, try to create a minimal example that shows the issues, so it > will be easier for others to help. > > Regards, > Andreas. > >> >> >> >> From IE in the above situation the Path is drawn (which has a circle >> dynamically drawn round it using the sketchmodified event to call the >> OpenLayers.Layer.Vector.addFeatures method) but requires a single click >> immediately followed by a double click to terminate the Path. >> >> >> >> If the addFeatures call is not made (the circle is not drawn ) behavior is >> as normal. The code works as expected in Chrome. >> >> >> >> Has anyone dealt with this behavior before? Any help would really be >> appreciated. >> >> >> >> Cheers, >> >> James Sewell >> >> LISAsoft Developer >> >> +61 (3) 8680 3200 / +61 414 688 892 >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From mrc78a at yahoo.it Tue May 4 04:46:23 2010 From: mrc78a at yahoo.it (marco) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] measure layer Message-ID: <312413.46063.qm@web27403.mail.ukl.yahoo.com> Hi all, using measure control, after I have drawn a line (or polygon) I get the relative value for length (or area), and then, if I make a new measure drawing a new line, the previous one disappear. I would like to have instead a "mesure layer" that allow to make multiple measures, drawing multiple lines each one with a progressive number as label. What is the best way to get this result? Is it possible to make this layer a real layer (turning it on/of)? Thanks Marco From bartvde at osgis.nl Tue May 4 04:54:05 2010 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] measure layer In-Reply-To: <312413.46063.qm@web27403.mail.ukl.yahoo.com> References: <312413.46063.qm@web27403.mail.ukl.yahoo.com> Message-ID: <56778.145.50.39.11.1272963245.squirrel@webmail.hostingdiscounter.nl> I think you need to create your own vector layer, and then listen to the measure event. In the event handler you can create a feature using the geometry returned and add it to your layer. Best regards, Bart > Hi all, > using measure control, after I have drawn a line (or polygon) I get the > relative value for length (or area), and then, if I make a new measure > drawing a new line, the previous one disappear. > I would like to have instead a "mesure layer" that allow to make multiple > measures, drawing multiple lines each one with a progressive number as > label. > What is the best way to get this result? > Is it possible to make this layer a real layer (turning it on/of)? > > Thanks > Marco > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ahocevar at opengeo.org Tue May 4 06:55:46 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] RootContainer styleMap problem- IE In-Reply-To: <1272945315725-5001623.post@n2.nabble.com> References: <1272944676994-5001602.post@n2.nabble.com> <1272945315725-5001623.post@n2.nabble.com> Message-ID: <48485CC1-D45F-4F8E-B36F-1079415B1482@opengeo.org> Hi, posting an example that shows the issue would help. I suspect that your StyleMap has incomplete symbolizers. Regards, Andreas. On May 4, 2010, at 05:55 , mortac8 wrote: > > I forgot to add that my Point features with an externalGraphic retain their > styling (no problems). The loss of styling issue seems to only occur with > Polygons, Polylines, etc. > > > mortac8 wrote: >> >> In IE 7/8 when I create a SelectFeature control and pass in an array of >> layers, all of my features' styles are lost (am using a custom StyleMap). >> >> If I modify Control/SelectFeature:initLayer to pass the styleMap to the >> RootContainer constructor, the styles will take effect if I redraw after >> activating the tool. However IE makes such a redraw operation painfully >> slow. >> >> Is there any way in IE that I can activate the SelectFeature control with >> an array of layers and have my features keep their styling without an >> expensive redraw of the layers? As usual, this problem doesn't exist in >> other browsers. >> >> Ideas are greatly appreciated. Thanks! >> >> > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/RootContainer-styleMap-problem-IE-tp5001602p5001623.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From jpatokal at iki.fi Tue May 4 06:56:47 2010 From: jpatokal at iki.fi (Jani Patokallio) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Landsat (NASA Global Mosaic) server down again? Message-ID: <4BDFFD6F.7050802@iki.fi> TelaScience's Landsat7 tile server has been down for a while now, and this time even the main page of openlayers.org and the code examples seem to be affected. Have they just changed their server names again, or is it gone for good? Any alternatives? I'm using the same servers as the main apage: var jpl_wms = new OpenLayers.Layer.WMS("Imagery", ["http://t1.hypercube.telascience.org/tiles?", "http://t2.hypercube.telascience.org/tiles?", "http://t3.hypercube.telascience.org/tiles?", "http://t4.hypercube.telascience.org/tiles?"], {layers: 'landsat7'} ); Once again, I think there would be a market for hosting a reliable paid tile server out there somewhere... Cheers, -jani -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100504/b6f44960/attachment.html From christopher.schmidt at nokia.com Tue May 4 07:10:04 2010 From: christopher.schmidt at nokia.com (christopher.schmidt@nokia.com) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Landsat (NASA Global Mosaic) server down again? In-Reply-To: <4BDFFD6F.7050802@iki.fi> References: <4BDFFD6F.7050802@iki.fi> Message-ID: On May 4, 2010, at 6:56 AM, ext Jani Patokallio wrote: > TelaScience's Landsat7 tile server has been down for a while now, and this time even the main page of openlayers.org and the code examples seem to be affected. Have they just changed their server names again, or is it gone for good? Any alternatives? I'm using the same servers as the main apage: > > var jpl_wms = new OpenLayers.Layer.WMS("Imagery", > [ > "http://t1.hypercube.telascience.org/tiles?" > , > > "http://t2.hypercube.telascience.org/tiles?" > , > > "http://t3.hypercube.telascience.org/tiles?" > , > > "http://t4.hypercube.telascience.org/tiles?" > ], > {layers: 'landsat7'} > ); > > Once again, I think there would be a market for hosting a reliable paid tile server out there somewhere... There are no current plans to bring this server back. -- Chris From dalda at ikt.es Tue May 4 07:16:00 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] How to print map area with openlayers Message-ID: <224DBDAF88A6AC47BD22432815351BE007EC87EF@nekaposta1> Hello, I'm trying to make a tool like yours, indeed I asked this before but nobody seemed to know the solution, but I'm not able to figure out how to process the features data in php script. Can you please give me some clues to solve the problem?? Another question I've got is that I see that you're just parsing Point fetures. If I would want to parse polygons or lines how could I do it? Do I have to use GeoJSON Syntax?? Thanks. P.S. I'm a bit newbie, I know. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de guillaumev Enviado el: lunes, 03 de mayo de 2010 23:59 Para: users@openlayers.org Asunto: Re: [OpenLayers-Users] How to print map area with openlayers Hi, Just in case someone encounters the same problem (i. e. when moving the map, it is printed in its initial position), I solved it by adding the position of the viewport (map.layerContainerDiv.style.left and map.layerContainerDiv.style.top), and then adding the left value of the viewport to the $tile->x and the top value of the viewport to the $tile->y in the calls to imagecopymerge_alpha. Here is my full client code (I encapsulated the map object within an object): this.print = function(print_url, callback) { var size = this.map.getSize(); var tiles = []; var nb_layers = this.map.layers.length; var layeri = 0; var nb_vector_layers = 0; var features = []; for (layeri = 0; layeri < nb_layers; layeri++) { // if the layer isn't visible at this range, or is turned off, skip it var layer = this.map.layers[layeri]; if (!layer.getVisibility()) continue; if (!layer.calculateInRange()) continue; if (layer.grid) { // iterate through their grid's tiles, collecting each tile's extent and pixel location at this moment var grid_length = layer.grid.length; var row_length = 0; var tilerow = 0; var tilei = 0; for (tilerow = 0; tilerow < grid_length; tilerow++) { row_length = layer.grid[tilerow].length; tilei = 0; for (tilei = 0; tilei < row_length; tilei++) { var tile = layer.grid[tilerow][tilei]; var url = layer.getURL(tile.bounds); var position = tile.position; var opacity = layer.opacity ? parseInt(100*layer.opacity) : 100; var bounds = tile.bounds; tiles[tiles.length] = {url:url, x:position.x, y:position.y, opacity:opacity, bounds:{left:bounds.left, right: bounds.right, top: bounds.top, bottom: bounds.bottom}}; } } } else { // get the features of the layer var olFeatures = layer.features; var features_temp = []; var styles = {}; var nb_features = layer.features.length; var featuresi = 0; var nextId = 1; for (var i = 0; i < nb_features; i++) { var feature = olFeatures[i]; var style = feature.style || layer.style || layer.styleMap.createSymbolizer(feature, feature.renderIntent); if(feature.geometry) { if (feature.geometry.CLASS_NAME.search(/point$/i) >= 0) { var fpos = this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y)); if(fpos != null) { features_temp[featuresi] = {type: 'point', x: fpos.x, y:fpos.y, style: style}; featuresi++; } } } } features[nb_vector_layers] = features_temp; nb_vector_layers++; } } // hand off the list to our server-side script, which will do the heavy lifting var tiles_json = JSON.stringify(tiles); var features_json = JSON.stringify(features); var viewport_left = parseInt(this.map.layerContainerDiv.style.left); var viewport_top = parseInt(this.map.layerContainerDiv.style.top); var viewport = {top: viewport_top, left: viewport_left}; var viewport_json = JSON.stringify(viewport); var scale = Math.round(this.map.getScale()); OpenLayers.Request.POST( { url:print_url, data:OpenLayers.Util.getParameterString({width:size.w,height:size.h,scal e:scale,viewport: viewport_json,tiles:tiles_json,features:features_json}), headers:{'Content-Type':'application/x-www-form-urlencoded'}, callback: callback } ); } -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-print-map-area-with-openla yers-tp4901023p5000414.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From adube at mapgears.com Tue May 4 08:22:56 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Basic marker questions In-Reply-To: References: Message-ID: <4BE011A0.1050204@mapgears.com> Hi Mike, See : http://www.openlayers.org/dev/examples/draw-feature.html http://www.openlayers.org/dev/examples/wfs-protocol-transactions.html See also below : Mike Purvis wrote: > I'm working on an application that allows the user to add lines and > vertices to the map, to construct routes. In Google Maps, this would > simply be markers and polylines. If you really need to have 2 layers, one for the lines and one for the intersections (points), my guess is that you should draw the lines only and once one is finished drawing, get all its vertices and add them to your other layer. You should be able to accomplish this by registering a "featureadded" event on your DrawFeature control used to draw your lines. > I read elsewhere that the use of Marker and Layer.Markers is > effectively deprecated in the OpenLayers world, in favour of > Layer.Vector. Is this true? Yes, highly recommended. -- Alexandre Dub? Mapgears www.mapgears.com From mike at uwmike.com Tue May 4 10:34:23 2010 From: mike at uwmike.com (Mike Purvis) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Basic marker questions In-Reply-To: <4BE011A0.1050204@mapgears.com> References: <4BE011A0.1050204@mapgears.com> Message-ID: Hey, thanks for your response. One more question (for the moment). > I read elsewhere that the use of Marker and Layer.Markers is effectively >> deprecated in the OpenLayers world, in favour of Layer.Vector. Is this true? >> > Yes, highly recommended. My markers are effectively just little square and round tokens. Should I render them using the SVG abilities of Layer.Vector, or should I use a graphics program to make them as PNG icons? I need to be able to rotate them?does that affect anything? Also, it seems like the coordinates of Layer.Vector are with respect to latitude and longitude rather than the viewport?how would I make my markers size the same independent of zoom level? Finally, in my initial tests, it seems that the vector shapes experience a lot of "drift" as I drag the map around. My application requires that they be pretty precisely fixed?is there a way to crank up the precision on this? Thanks again. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100504/0072a83c/attachment.html From guillaume at viguierjust.com Tue May 4 10:44:49 2010 From: guillaume at viguierjust.com (guillaumev) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] How to print map area with openlayers In-Reply-To: <224DBDAF88A6AC47BD22432815351BE007EC87EF@nekaposta1> References: <1271243350225-4901023.post@n2.nabble.com> <224DBDAF88A6AC47BD22432815351BE007EC87EF@nekaposta1> Message-ID: <1272984289586-5003693.post@n2.nabble.com> Hi David, Here is the code I'm using on the server side to parse the features: $red = imagecolorallocate($image, 255, 0, 0); $black = imagecolorallocate($image, 0, 0, 0); foreach($features as $feature_array) { if(count($feature_array) > 0) { foreach($feature_array as $feature) { if($feature->type == "point") { if($feature->style) { $dst_x = $feature->x + $viewport->left; $dst_y = $feature->y + $viewport->top; if($feature->style->externalGraphic) { // Draw the external graphic $tempfilename = basename($feature->style->externalGraphic); $tempfile = sprintf("%s".DS."%s", $graphs_directory, $tempfilename); if(!file_exists($tempfile)) { $tempfiles[] = $tempfile; file_put_contents($tempfile,file_get_contents($this->relative_to_absolute_url($feature->style->externalGraphic))); } list($fwidth, $fheight, $fformat) = @getimagesize($tempfile); $feature_image = $this->image_create_from_format($fformat, $tempfile); $dst_x = $dst_x - ($fwidth / 2); $dst_y = $dst_y - ($fheight / 2); imagecopy($image, $feature_image, $dst_x, $dst_y, 0, 0, $fwidth, $fheight); } else { // something needs to be drawn $color_rgb = $this->html2rgb($feature->style->fillColor); $color = imagecolorallocatealpha($image, $color_rgb[0], $color_rgb[1], $color_rgb[2], 40); $radius = $feature->style->pointRadius * 2; imagefilledellipse($image, $dst_x, $dst_y, $radius, $radius, $color); } if($feature->style->label != "") { imagestring($image, 2, $dst_x, $dst_y, $feature->style->label, $black); } } } } } } As you said, I'm only parsing points because, in my case, I'm only interested in points (I don't have any layer in my map that describes polygons). However, I'm pretty sure it must be possible to do the same thing for polygons using the imagepolygon GD function (http://www.php.net/manual/en/function.imagepolygon.php)... Also, if you are interested and maybe if other people are interested in this functionality too, it could be interesting to create an open source library in PHP to implement this functionality. Let me know if you are in, and if other people are interested, please let me know... Guillaume -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-print-map-area-with-openlayers-tp4901023p5003693.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gmduky at hotmail.com Tue May 4 10:50:18 2010 From: gmduky at hotmail.com (Zuhex) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Please help me configured popup GetFeatureInfo Message-ID: <1272984618672-5003719.post@n2.nabble.com> Hello I am a starter of OL and GeoServer. I have tried to modify popup codes where I get from http://openlayers.org/dev/examples/getfeatureinfo-popup.html. My map work very well but the popup seems a trouble. I have two questions for asking. 1. When I click other than a point the popup show up with a blank. I don?t like it so I write my code like this var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://localhost:8080/geoserver/wms', title: 'Identify features by clicking', layers: [herb], vendorParams: {"FEATURE_COUNT": "100"}, //maxfeatures: 200, vendorParams: { format : 'image/png' }, //handlerOptions: {'hover':{delay:500}}, eventListeners: { getfeatureinfo: function(event) { if (popup != null) { popup.destroy(); popup = null; } if((event.text).length != 1){ map.addPopup(popup = new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } } }); map.addControl(info); info.activate(); It still doesn?t work. I get idea from an old thread. .: See picture if you don?t understand. http://img260.imageshack.us/img260/4239/34618760.jpg http://img260.imageshack.us/img260/4239/34618760.jpg 2. When I look in my map at high level, the points seem to overlap each other. After I click on the point, the popup query all the point. I want the top most only query. I am using WMS layer not Vector layer. Is it impossible for WMS layer? Can anyone tell me ideas to write a code? If you don?t mind please give me some example or explain. Sorry for my English .: See picture if you don?t understand. http://img42.imageshack.us/img42/4038/85036773.jpg http://img42.imageshack.us/img42/4038/85036773.jpg Thank you Zuhex -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Please-help-me-configured-popup-GetFeatureInfo-tp5003719p5003719.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From scott.lewis at nsidc.org Tue May 4 14:20:48 2010 From: scott.lewis at nsidc.org (Scott Lewis) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Occasionally getting hundreds of requests in a short time Message-ID: <4BE06580.6050502@nsidc.org> I'm working on an application using OpenLayers that has a Tilecache/WMS backend to serve the map images. For the most part, it runs pretty smoothly without too much load on the mapserver. However, every once in awhile, maybe once a week or so, something happens where several hundred requests are sent to the backend in a very short amount of time, causing the server to crash or grind to a halt because of it. While I'm sure this is due, in part, to some action by a user, I'm not quite sure what it could be. Even though I'm using Tilecache, the requests that are eventually causing this are going to the WMS server itself, indicating that the cache does not currently have the requested images. I'm not sure if this is a "problem" with OpenLayers itself, but it is becoming a problem for our server. Has anyone experienced this in their applications? If so, what may be the cause? About the only thing I can think of is maybe a user using the scroll wheel to rapidly zoom in (and out?) of an area that hasn't been cached, or perhaps many users trying to hit the cache at nearly the same time (which could be from some kind of lab or class or something). Thanks in advance, Scott Lewis National Snow and Ice Data Center Boulder, CO, USA From adube at mapgears.com Tue May 4 14:56:47 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Basic marker questions In-Reply-To: References: <4BE011A0.1050204@mapgears.com> Message-ID: <4BE06DEF.80702@mapgears.com> Hey Mike, See below : Mike Purvis wrote: > My markers are effectively just little square and round tokens. Should > I render them using the SVG abilities of Layer.Vector, or should I use > a graphics program to make them as PNG icons? It's up to you. Both are okay IMHO. > I need to be able to rotate them?does that affect anything? http://www.openlayers.org/dev/examples/styles-rotation.html > > Also, it seems like the coordinates of Layer.Vector are with respect > to latitude and longitude rather than the viewport?how would I make my > markers size the same independent of zoom level? It's already the case, see in the same example above (try zooming, you'll see that the markers remain the same size). > > Finally, in my initial tests, it seems that the vector shapes > experience a lot of "drift" as I drag the map around. My application > requires that they be pretty precisely fixed?is there a way to crank > up the precision on this? This shouldn't be the case, could it be related to this (wild guess): http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#WhydontmyvectorfeaturesworkoverGoogleYahooVirtualEarthetc. -- Alexandre Dub? Mapgears www.mapgears.com From mike at uwmike.com Tue May 4 15:12:36 2010 From: mike at uwmike.com (Mike Purvis) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Basic marker questions In-Reply-To: <4BE06DEF.80702@mapgears.com> References: <4BE011A0.1050204@mapgears.com> <4BE06DEF.80702@mapgears.com> Message-ID: > > Finally, in my initial tests, it seems that the vector shapes experience a >> lot of "drift" as I drag the map around. My application requires that they >> be pretty precisely fixed?is there a way to crank up the precision on this? >> > This shouldn't be the case, could it be related to this (wild guess): > > http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#WhydontmyvectorfeaturesworkoverGoogleYahooVirtualEarthetc > . Okay, yes, I have now got this working, but it's been extremely painful. I can share my code for others if it would be helpful to do so, but I feel certain that there must be a better way. It feels extremely hacky to be constantly loading lat/lon pairs into Point objects, just to "transform" them to the map coordinates. (Which, of course, the map methods still refer to and interact with as LonLat objects, even the contents are clearly not latitudes and longitudes, but another coordinate system altogether.) Seems like if I pass it LonLat objects, it just know to do the right thing, as Google does. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100504/7b414c5f/attachment.html From jimlug at co.clackamas.or.us Tue May 4 18:46:05 2010 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE 8 this.size.w is null or not an object - OL 2.9 Message-ID: <1273013165660-5006221.post@n2.nabble.com> Hey folks, I'm using OpenLayers 2.9 and everything works fine except when it comes to IE 8. I've coded a click event to display the results from a getfeatureinfo wms request. The error I receive is 'this.size.w' is null or not an object, and it refers to the OpenLayers.js build. I've tested this with several different builds including the OpenLayers full build and it still breaks. However, everything works great within Mozilla, Safari and Opera. I'm not sure what the deal is. Here is the line the error occurs on: if((origTL.x+this.size.w)>(mapSize.w-this.map.paddingForPopups.right)){newTL.x=mapSize.w-this.map.paddingForPopups.right-this.size.w;} Anyone else experience this issue? If so, how did you resolve it? Unfortunately, our shop is mainly using IE. Any suggestions would be great appreciated. Thanks. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE-8-this-size-w-is-null-or-not-an-object-OL-2-9-tp5006221p5006221.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Tue May 4 19:28:05 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE 8 this.size.w is null or not an object - OL 2.9 In-Reply-To: <1273013165660-5006221.post@n2.nabble.com> References: <1273013165660-5006221.post@n2.nabble.com> Message-ID: Hi, this sounds like a known regression. It should be fixed in trunk and OpenLayers 2.9.1. See http://trac.openlayers.org/ticket/2414. Regards, Andreas. On May 5, 2010, at 00:46 , Dash wrote: > > Hey folks, > > I'm using OpenLayers 2.9 and everything works fine except when it comes to > IE 8. I've coded a click event to display the results from a getfeatureinfo > wms request. The error I receive is 'this.size.w' is null or not an object, > and it refers to the OpenLayers.js build. I've tested this with several > different builds including the OpenLayers full build and it still breaks. > However, everything works great within Mozilla, Safari and Opera. I'm not > sure what the deal is. Here is the line the error occurs on: > > if((origTL.x+this.size.w)>(mapSize.w-this.map.paddingForPopups.right)){newTL.x=mapSize.w-this.map.paddingForPopups.right-this.size.w;} > > Anyone else experience this issue? If so, how did you resolve it? > Unfortunately, our shop is mainly using IE. Any suggestions would be great > appreciated. > > Thanks. > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE-8-this-size-w-is-null-or-not-an-object-OL-2-9-tp5006221p5006221.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From jimlug at co.clackamas.or.us Tue May 4 19:50:46 2010 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE 8 this.size.w is null or not an object - OL 2.9 In-Reply-To: References: <1273013165660-5006221.post@n2.nabble.com> Message-ID: <1273017046219-5006457.post@n2.nabble.com> Thanks for the heads-up . -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE-8-this-size-w-is-null-or-not-an-object-OL-2-9-tp5006221p5006457.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ashley_c_mort at raytheon.com Tue May 4 22:15:18 2010 From: ashley_c_mort at raytheon.com (mortac8) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] RootContainer styleMap problem- IE In-Reply-To: <48485CC1-D45F-4F8E-B36F-1079415B1482@opengeo.org> References: <1272944676994-5001602.post@n2.nabble.com> <1272945315725-5001623.post@n2.nabble.com> <48485CC1-D45F-4F8E-B36F-1079415B1482@opengeo.org> Message-ID: <1273025718673-5006913.post@n2.nabble.com> It turns out my problem occurs because I am setting a custom layer.id after I create an OpenLayers.Layer. I guess my next question is: Is there any way to provide your own custom ID when creating a layer? If you provide it via the options object, the div never gets created. Andreas Hocevar-2 wrote: > > Hi, > > posting an example that shows the issue would help. I suspect that your > StyleMap has incomplete symbolizers. > > Regards, > Andreas. > > On May 4, 2010, at 05:55 , mortac8 wrote: > >> >> I forgot to add that my Point features with an externalGraphic retain >> their >> styling (no problems). The loss of styling issue seems to only occur >> with >> Polygons, Polylines, etc. >> >> >> mortac8 wrote: >>> >>> In IE 7/8 when I create a SelectFeature control and pass in an array of >>> layers, all of my features' styles are lost (am using a custom >>> StyleMap). >>> >>> If I modify Control/SelectFeature:initLayer to pass the styleMap to the >>> RootContainer constructor, the styles will take effect if I redraw after >>> activating the tool. However IE makes such a redraw operation painfully >>> slow. >>> >>> Is there any way in IE that I can activate the SelectFeature control >>> with >>> an array of layers and have my features keep their styling without an >>> expensive redraw of the layers? As usual, this problem doesn't exist in >>> other browsers. >>> >>> Ideas are greatly appreciated. Thanks! >>> >>> >> >> -- >> View this message in context: >> http://osgeo-org.1803224.n2.nabble.com/RootContainer-styleMap-problem-IE-tp5001602p5001623.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/RootContainer-styleMap-problem-IE-tp5001602p5006913.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From marjiea1 at gmail.com Wed May 5 00:19:36 2010 From: marjiea1 at gmail.com (Marjie Anderson) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Basic marker questions In-Reply-To: References: <4BE011A0.1050204@mapgears.com> <4BE06DEF.80702@mapgears.com> Message-ID: <004b01caec0a$2d091b00$871b5100$@com> I would love to see an example of how you got this working in code. I am having problems with hand parsing a kml file to pull out the zoom box points and use them for bounds, pull out the marker point and use that for the lonlat, and then letting the automatic kml loader load the linestrings in the kml file that show all the points hooked together of where my vehicle has been. I can get it working without the spherical mercator (and the markers not in the right place on the commercial layers), but once I follow the directions for mercator using the forwardMercator calls: marker = new OpenLayers.Marker(OpenLayers.Layer.SphericalMercator.forwardMercator(lon, lat)); I get neither markers nor linestrings. I am unable to request help here for this issue as I cannot get the non-mercator version to run on my current server space, only on my development laptop. Marjie "Okay, yes, I have now got this working, but it's been extremely painful. I can share my code for others if it would be helpful to do so, but I feel certain that there must be a better way. It feels extremely hacky to be constantly loading lat/lon pairs into Point objects, just to "transform" them to the map coordinates. (Which, of course, the map methods still refer to and interact with as LonLat objects, even the contents are clearly not latitudes and longitudes, but another coordinate system altogether.) Seems like if I pass it LonLat objects, it just know to do the right thing, as Google does." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100505/dc5fb911/attachment.html From marjiea1 at gmail.com Wed May 5 00:22:04 2010 From: marjiea1 at gmail.com (Marjie Anderson) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] ProxyHost (PHP example?) In-Reply-To: <1272890379802-4997561.post@n2.nabble.com> References: <1263810393266-4412919.post@n2.nabble.com> <4B544D5F.3070601@terrestris.de> <20100118154037.GD29171@metacarta.com> <1263887874224-4418624.post@n2.nabble.com> <1272890379802-4997561.post@n2.nabble.com> Message-ID: <005001caec0a$84d96bf0$8e8c43d0$@com> Does anyone have a PHP ProxyHost example? (My web hosting is windows, not linux, so it does not support cgi.) Also, in the instructions (wiki FAQs) it says: Once a proxy host script has been installed, you must then edit the OpenLayers.ProxyHost variable to match that URL. Given the standard Apache configuration: OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; Where would I find the OpenLayers.ProxyHost variable to point it to my phpProxy location? I am hoping this might be the solution to file not found issues on my server (but not on my development laptop.) Marjie From ehanoj at gmail.com Wed May 5 01:46:04 2010 From: ehanoj at gmail.com (Hanoj) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] ProxyHost (PHP example?) In-Reply-To: <005001caec0a$84d96bf0$8e8c43d0$@com> References: <1263810393266-4412919.post@n2.nabble.com> <4B544D5F.3070601@terrestris.de> <20100118154037.GD29171@metacarta.com> <1263887874224-4418624.post@n2.nabble.com> <1272890379802-4997561.post@n2.nabble.com> <005001caec0a$84d96bf0$8e8c43d0$@com> Message-ID: Hi, use proxy.php from app Mapbuilder http://docs.codehaus.org/display/MAP/Downloads bye Dan Barta 2010/5/5 Marjie Anderson : > Does anyone have a PHP ProxyHost example? ?(My web hosting is windows, not > linux, so it does not support cgi.) > > Also, in the instructions (wiki FAQs) it says: > > ? ? ? ?Once a proxy host script has been installed, you must then edit the > OpenLayers.ProxyHost variable to match that URL. > > ? ? ? ?Given the standard Apache configuration: > > ? ? ? ?OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; > > > Where would I find the OpenLayers.ProxyHost variable to point it to my > phpProxy location? > > I am hoping this might be the solution to file not found issues on my server > (but not on my development laptop.) From to.tonton at gmail.com Wed May 5 03:13:38 2010 From: to.tonton at gmail.com (Tonton) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] is there partners ? Message-ID: in trac like http://trac.openlayers.org/wiki/NewToOpenLayers there is some external links to custom writers ans so more ? http://cvresumewriters.com/ http://custom-essay-writing-service.org/index.php etc... is there partners or wiki squatting ? tonton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100505/7ef7b176/attachment.html From ahocevar at opengeo.org Wed May 5 03:20:16 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] RootContainer styleMap problem- IE In-Reply-To: <1273025718673-5006913.post@n2.nabble.com> References: <1272944676994-5001602.post@n2.nabble.com> <1272945315725-5001623.post@n2.nabble.com> <48485CC1-D45F-4F8E-B36F-1079415B1482@opengeo.org> <1273025718673-5006913.post@n2.nabble.com> Message-ID: <605F20B2-FE83-486C-B8F5-3A2D80427520@opengeo.org> Hi, On May 5, 2010, at 04:15 , mortac8 wrote: > > It turns out my problem occurs because I am setting a custom layer.id after I > create an OpenLayers.Layer. > > I guess my next question is: Is there any way to provide your own custom ID > when creating a layer? If you provide it via the options object, the div > never gets created. The only workaround would be to do something like var layer = new OpenLayers.Layer(...); document.getElementById(layer.id).id = myCustomId; layer.id = myCustomId; The above should work, but is untested. Regards, Andreas. > > > Andreas Hocevar-2 wrote: >> >> Hi, >> >> posting an example that shows the issue would help. I suspect that your >> StyleMap has incomplete symbolizers. >> >> Regards, >> Andreas. >> >> On May 4, 2010, at 05:55 , mortac8 wrote: >> >>> >>> I forgot to add that my Point features with an externalGraphic retain >>> their >>> styling (no problems). The loss of styling issue seems to only occur >>> with >>> Polygons, Polylines, etc. >>> >>> >>> mortac8 wrote: >>>> >>>> In IE 7/8 when I create a SelectFeature control and pass in an array of >>>> layers, all of my features' styles are lost (am using a custom >>>> StyleMap). >>>> >>>> If I modify Control/SelectFeature:initLayer to pass the styleMap to the >>>> RootContainer constructor, the styles will take effect if I redraw after >>>> activating the tool. However IE makes such a redraw operation painfully >>>> slow. >>>> >>>> Is there any way in IE that I can activate the SelectFeature control >>>> with >>>> an array of layers and have my features keep their styling without an >>>> expensive redraw of the layers? As usual, this problem doesn't exist in >>>> other browsers. >>>> >>>> Ideas are greatly appreciated. Thanks! >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://osgeo-org.1803224.n2.nabble.com/RootContainer-styleMap-problem-IE-tp5001602p5001623.html >>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >> >> >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/RootContainer-styleMap-problem-IE-tp5001602p5006913.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From andreas.hocevar at gmail.com Wed May 5 03:26:41 2010 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] is there partners ? In-Reply-To: References: Message-ID: <03B5CF7D-20F9-4E41-B15F-01A767D3F811@gmail.com> Hi, looks indeed like a misuse of our wiki. Chris, can you please remove user BrendonMiller from trac? I have reverted the change that added these links. Thanks, Andreas. On May 5, 2010, at 09:13 , Tonton wrote: > in trac like > > http://trac.openlayers.org/wiki/NewToOpenLayers > > there is some external links to custom writers ans so more ? http://cvresumewriters.com/ http://custom-essay-writing-service.org/index.php etc... > > is there partners or wiki squatting ? > > tonton > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From josema.mira at gmail.com Wed May 5 06:03:27 2010 From: josema.mira at gmail.com (=?ISO-8859-1?Q?Jos=E9_Manuel_Mira_Mart=EDnez?=) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Panoramio photos as a vector layer Message-ID: Hi list, This is my first post. I have developed an html-javascript script to load Panoramio's photos in OpenLayers. Panoramio (http:/www.panoramio.com) is a great store of georeferenced photos accesible with a public API ( http://www.panoramio.com/api/) that allows to get a doc in JSON format. A how-to explanation can be viewed as a post in our blog (in spanish - http://www.gisandchips.org) :http://www.gisandchips.org/2010/05/04/openlayers-y-panoramio/ We have also made two examples: 1. OpenLayers with OpenStreetMap base layer and Panoramio: http://www.gisandchips.org/demos/j3m/panoramio/panoramio.html 2. OpenLayers with WMS base layer and Panoramio: http://www.gisandchips.org/demos/j3m/panoramio/panoramio_4326.html Now, my questions: 1. How can I design a new custom layer format ( http://docs.openlayers.org/library/formats.html) for Panoramio to load the layer as usual (example: panoLayer = new OpenLayers.Layer.Format.Panoramio(). I make an unique JSON data request, but I don't know how to make the layer persistent (new httpRequest) for every zoom-pan event which loads new data. Any suggestions are welcome Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100505/d465d2e6/attachment.html From mike at uwmike.com Wed May 5 07:37:58 2010 From: mike at uwmike.com (Mike Purvis) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Basic marker questions In-Reply-To: <004b01caec0a$2d091b00$871b5100$@com> References: <4BE011A0.1050204@mapgears.com> <4BE06DEF.80702@mapgears.com> <004b01caec0a$2d091b00$871b5100$@com> Message-ID: Hi Marjie, This is what I have so far: http://sandbox.mikepurvis.com/maps/clearpath/ (doubleclick to create more waypoints) Like I say, it's a real hack, especially this kind of stuff: var lonlatProjected = map.getLonLatFromViewPortPx(e.xy); /*alert("You clicked near " + lonlatProjected.lat + " N, " + > lonlatProjected.lon + " E");*/ var point = new OpenLayers.Geometry.Point(lonlatProjected.lon, > lonlatProjected.lat); var pointFeature = new OpenLayers.Feature.Vector(point, null, > style_waypoint); vectorLayer.addFeatures([pointFeature]); If you re-enable the alert, you see that it's very clearly _not_ a true latitude and longitude coming out of the getLonLatFromViewPortPx?it's a coordinate pair in some other scheme that's been packaged into a LonLat. Perhaps one of the gurus could help break this down a bit for me. Is this an expected behaviour, or did I do something wrong in the setup phase? My understanding so far is that Pixel is for x/y pairs representing screen coordinates, LonLat is for x/y pairs representing global coordinates, and Point is for unitless x/y pairs representing anything that needs to be transformed or otherwise manipulated. Is that reasonable, or am I still out to lunch on it? Thanks, Mike On Wed, May 5, 2010 at 12:19 AM, Marjie Anderson wrote: > I would love to see an example of how you got this working in code. > > > > I am having problems with hand parsing a kml file to pull out the zoom box > points and use them for bounds, pull out the marker point and use that for > the lonlat, and then letting the automatic kml loader load the linestrings > in the kml file that show all the points hooked together of where my vehicle > has been. I can get it working without the spherical mercator (and the > markers not in the right place on the commercial layers), but once I follow > the directions for mercator using the forwardMercator calls: > > > > marker = new > OpenLayers.Marker(OpenLayers.Layer.SphericalMercator.forwardMercator(lon, > lat)); > > > > I get neither markers nor linestrings. > > > > I am unable to request help here for this issue as I cannot get the > non-mercator version to run on my current server space, only on my > development laptop. > > > > Marjie > > > > * * > > * * > > *?*Okay, yes, I have now got this working, but it's been extremely > painful. I can share my code for others if it would be helpful to do so, but > I feel certain that there must be a better way. It feels extremely hacky to > be constantly loading lat/lon pairs into Point objects, just to "transform" > them to the map coordinates. (Which, of course, the map methods still refer > to and interact with as LonLat objects, even the contents are clearly not > latitudes and longitudes, but another coordinate system altogether.) > > > > Seems like if I pass it LonLat objects, it just know to do the right thing, > as Google does.? > -- http://uwmike.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100505/d6f5e91c/attachment.html From matthewdw at gmail.com Wed May 5 13:12:41 2010 From: matthewdw at gmail.com (Matthew Williamson) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Multiple click control stopClick precedence/order Message-ID: Hello list, I'm trying to set up a vector layer to respond to click events, and also have a map-level click handler that gets fired if the click was not on one of my features. I'm doing this with two controls, one with a OpenLayers.Handler.Feature and one with a OpenLayers.Handler.Click. This is what puzzles me: In my first attempt: The feature click control is added first, and its stopSingle value is true. The map click control is added last, and its stopSingle value is false. When I click on a feature, the handler for the feature click control fires first (this makes sense), and then the map click control fires (this didn't make sense to me). Then, I tried setting stopSingle = true on the map click control as well. This stopped the feature click control from firing at all! So, I conclude that--even though the map click control was added last, AND executes last, the stopSingle value on the map click handler is evaluated first?? Why is this? How can I ensure that the feature click handler control is able to stop the propagation to the map click handler, preferably regardless of the order in which they are added to the map? To eliminate some confusion: yes, I know about the SelectFeature control. So far as I can tell, I can't use that--my features are points with large, mostly transparent icons that tend to overlap and cover the whole map (in which case SelectFeature intercepts mousedowns on the whole icon and makes drag-panning impossible), therefore I only want to respond to clicks near the center (canceling propagation in that case). If someone can tell me how to make that work with SelectFeature, I'd be glad to use that instead. Help? Thanks! -Matt For reference, here is essentially my code (though the feature click control gets added in a completely different place, it happens in this order in my example): var vectorLayer = new OpenLayers.Layer.Vector(...); /* ...set up vector layer with features, etc... */ OpenLayers.Control.ClickFeature = OpenLayers.Class(OpenLayers.Control, { defaultHandlerOptions: { 'single': true, 'double': false, 'pixelTolerance': 0, 'stopSingle': true, 'stopDouble': false }, initialize: function(options) { this.handlerOptions = OpenLayers.Util.extend( {}, this.defaultHandlerOptions ); OpenLayers.Control.prototype.initialize.apply( this, arguments ); this.handler = new OpenLayers.Handler.Feature( this, vectorLayer, { 'click': function(feature){ if(true){ console.log('feature clicked.'); OpenLayers.Event.stop(this.handler.evt); // this shouldn't even be necessary when stopSingle = true, right? } } }, this.handlerOptions ); } }); var featureClickControl = new OpenLayers.Control.ClickFeature(); map.addControl(featureClickControl); featureClickControl.activate(); // Map click handler OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { defaultHandlerOptions: { 'single': true, 'double': false, 'pixelTolerance': 0, 'stopSingle': false, 'stopDouble': false }, initialize: function(options) { this.handlerOptions = OpenLayers.Util.extend( {}, this.defaultHandlerOptions ); OpenLayers.Control.prototype.initialize.apply( this, arguments ); this.handler = new OpenLayers.Handler.Click( this, { 'click': function(evt){console.log('map clicked');} }, this.handlerOptions ); } }); var mapClickControl = new OpenLayers.Control.Click(); map.addControl(mapClickControl); mapClickControl.activate(); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100505/9e60293e/attachment.html From percyd at pdx.edu Wed May 5 17:22:34 2010 From: percyd at pdx.edu (Percy) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] component list for build cfg file In-Reply-To: <48D24480.7050303@geograf.dk> References: <48D24480.7050303@geograf.dk> Message-ID: <4BE1E19A.1020509@pdx.edu> I'm trying to build a smaller openlayers.js, following the instructions in the build folder. I've looked everywhere for a list of components that I could just add the [include] section of my .CFG file for the build script and then trial and error just start deleting... Of course, I started out by creating a .CFG file that just listed the components I thought I needed by inspecting my html file and looking for components I was using. So, What's the easiest/foolproof way of creating a .CFG file that has just the modules I need for my app? Thanks, Percy -- David Percy Geospatial Data Manager Geology Department Portland State University http://gisgeek.pdx.edu 503-725-3373 From speleo at web.de Wed May 5 17:45:01 2010 From: speleo at web.de (Dirk Wimmer) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] kml-files doesn't shown correct Message-ID: <4BE1E6DD.8030708@web.de> Hello, I have problem to use this kml file with openlayers: http://www.dav-felsinfo.de/export/cliffs_kml.php?1=22 E.g. I use this example http://www.openlayers.org/dev/examples/sundials.html and change only a little bit: var sundials = new OpenLayers.Layer.Vector("KML", { projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "http://www.dav-felsinfo.de/export/cliffs_kml.php?1=22", format: new OpenLayers.Format.KML({ extractStyles: true, extractAttributes: true }) }) Then I see only one icon in the sea nearby Africa and not in Germany. :-( But the result should looks like that: http://maps.google.de/maps?f=q&hl=de&q=http://www.dav-felsinfo.de/export/cliffs_kml.php?1=22 I try some other kml files and it works. Could it be that this kml file is incorrect? Any ideas? thanks, Dirk From arnd.wippermann at web.de Wed May 5 18:42:31 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] kml-files doesn't shown correct In-Reply-To: <4BE1E6DD.8030708@web.de> Message-ID: Hi, It seems to be a projection error. Your data come in EPSG:4326 (-180 - 180, -90 - 90), that's in sphericalMercator equal 0,0 near Africa. I would think, that you use map.projection sphericalMercator and for map.displayProjection also sphericalMercator. Set in the layer declaration projection: "EPSG:4326" and your data should be at the right place. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Dirk Wimmer Gesendet: Mittwoch, 5. Mai 2010 23:45 An: users@openlayers.org Betreff: [OpenLayers-Users] kml-files doesn't shown correct Hello, I have problem to use this kml file with openlayers: http://www.dav-felsinfo.de/export/cliffs_kml.php?1=22 E.g. I use this example http://www.openlayers.org/dev/examples/sundials.html and change only a little bit: var sundials = new OpenLayers.Layer.Vector("KML", { projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "http://www.dav-felsinfo.de/export/cliffs_kml.php?1=22", format: new OpenLayers.Format.KML({ extractStyles: true, extractAttributes: true }) }) Then I see only one icon in the sea nearby Africa and not in Germany. :-( But the result should looks like that: http://maps.google.de/maps?f=q&hl=de&q=http://www.dav-felsinfo.de/export/cli ffs_kml.php?1=22 I try some other kml files and it works. Could it be that this kml file is incorrect? Any ideas? thanks, Dirk _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From percyd at pdx.edu Wed May 5 20:01:37 2010 From: percyd at pdx.edu (Percy) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] component list for build cfg file In-Reply-To: <4BE1E19A.1020509@pdx.edu> References: <48D24480.7050303@geograf.dk> <4BE1E19A.1020509@pdx.edu> Message-ID: <4BE206E1.2010604@pdx.edu> Nevermind, just search for all of the New statements in your file, and put a line in the .cfg for each unique one. much more deterministic:-) Thanks for the help on IRC! Percy Percy wrote: > I'm trying to build a smaller openlayers.js, following the instructions > in the build folder. > > I've looked everywhere for a list of components that I could just add > the [include] section of my .CFG file for the build script and then > trial and error just start deleting... > > Of course, I started out by creating a .CFG file that just listed the > components I thought I needed by inspecting my html file and looking for > components I was using. > > So, What's the easiest/foolproof way of creating a .CFG file that has > just the modules I need for my app? > > Thanks, > Percy > > -- David Percy Geospatial Data Manager Geology Department Portland State University http://gisgeek.pdx.edu 503-725-3373 From Tobias.Luetticke at justice.govt.nz Wed May 5 23:54:30 2010 From: Tobias.Luetticke at justice.govt.nz (Tobias Luetticke) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] POI lost when dragging the map References: <4BE2B576020000AF000975DB@nogwhub.courts.govt.nz> <4BE2E5A5020000AF00097682@nogwhub.courts.govt.nz> <4BE2E636020000AF00097685@nogwhub.courts.govt.nz> Message-ID: <4BE2E634.CA8D.00AF.0@justice.govt.nz> Hi guys I am displaying POIs (speed cameras) via WMS as overlay on top of a Google base map. When I drag the map (in my case) to the left the POI markers disappear from the map. When I drag the map back they reappear. It appears data is coming back from GeoServer each time, but doesn't always make it on the map... I am using * OpenLayers 2.8 * GeoServer 2.0.1 * Firefox 3.6.3 Data is coming from Oracle, but the same happens if I attach an shapefile data store. Native SRS of the layer is EPSG:2193 (EPSG:NZGD2000 / New Zealand Transverse Mercator ), but it doesn't seem to make a difference whether I let GeoServer serve them with EPSG:2193 (native) or reproject to EPSG:900913. I also just realised that the phenomenon happens with all my WMS layers. I suspect I am missing something very obvious, but are stuck nonetheless. Any pointers much appreciated! My OpenLayers code is: var map; function init(){ var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", numZoomLevels: 20, maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34) }; map = new OpenLayers.Map('map', options); var gphys = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP, 'sphericalMercator': true, numZoomLevels: 20} ); var wmslayer2 = new OpenLayers.Layer.WMS( "Speed Cameras", "http://localhost:8080/geoserver/wms", {'layers': 'SPEED_CAMERA', 'format':'image/png', 'transparent':'true'}, {'opacity': 1.0, 'isBaseLayer': false, 'visibility': false} ); map.addLayers([gphys, wmslayer2]); Cheers Tobias ==================================================================================== This e-mail message and attachments do not necessarily reflect the views of the New Zealand Ministry of Justice and may contain information that is confidential and may be subject to legal privilege. If you are not the intended recipient, you are hereby notified that you must not use, disseminate, distribute or copy this e-mail message or its attachments. If you received this message in error, please notify the Ministry of Justice by telephone (call collect: 00-64-4-918-8800) or return the original message to us by e-mail, and destroy any copies. Thank you. ==================================================================================== From p.scadden at gns.cri.nz Thu May 6 00:22:09 2010 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] KML files that use balloon style and extend data. In-Reply-To: References: Message-ID: <4BE243F1.2060102@gns.cri.nz> I dont suppose anyone has code lying around for creating a balloon popup when the KML is using balloon style and extended data to store the attribute data? -- Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232 Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From to.tonton at gmail.com Thu May 6 04:06:48 2010 From: to.tonton at gmail.com (Tonton) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] ZoomToMaxExtent ??? Message-ID: hello this is my testpage the Zoom is not at the boundings i think to set but a part of it! So i can not see my map in once zoom - neither work :o( ?? the extent i see seems to be (842943, 2334894, 843837, 2335562)

-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100506/49837a34/attachment.html From gmduky at hotmail.com Thu May 6 05:04:22 2010 From: gmduky at hotmail.com (Zuhex) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] [Newbie] I can't specify attribute in WMSGetFeatureInfo Message-ID: <1273136662137-5013240.post@n2.nabble.com> I am newbie for java script. So when I try to specify attribute value from my layer. I got the message error from IE8 ############################# Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E) Timestamp: Thu, 6 May 2010 08:58:57 UTC Message: Object doesn't support this property or method Line: 197 Char: 13 Code: 0 URI: http://localhost/map.php Here this is my modify WMSGetFeatureInfo code ###################################### var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://localhost:8080/geoserver/wms', title: 'Identify features by clicking', layers: [herb], vendorParams: {"FEATURE_COUNT": "100"}, //maxfeatures: 200, vendorParams: { format : 'image/png' }, //handlerOptions: {'hover':{delay:500}}, eventListeners: { getfeatureinfo: function(event) { if (popup != null) { popup.destroy(); popup = null; } var features = event.features; if((event.text).length != 709 && (event.text).length < 1000){ map.addPopup(popup = new OpenLayers.Popup.FramedCloud( "chicken", map.getLonLatFromPixel(event.xy), null, event.getAttributes('name') + "
" + " http://www.google.co.th www.google.co.th ", null, true )); }} } }); map.addControl(info); info.activate(); Can anyone fix my error or tell me the problem? Thank you -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Newbie-I-can-t-specify-attribute-in-WMSGetFeatureInfo-tp5013240p5013240.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Thu May 6 09:35:01 2010 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] OpenLayers 2.9.1 released Message-ID: <23416.145.50.39.11.1273152901.squirrel@webmail.hostingdiscounter.nl> The OpenLayers Development Team is proud to announce the release of OpenLayers 2.9.1, the first bug fix release of OpenLayers 2.9. Since the 2.9 release 3 regressions have been fixed, as well as 2 documentation errors: * Protocol.HTTP: PUT and DELETE should use url from options (#2393) * do not use getDimensions anymore, but use offsetWidth and offsetHeight (#2414) * Rotated graphics are positioned incorrectly when moved or zoom changes (#2596) * preload default value is incorrect in Strategy.Fixed documentation (#2611) * isBaseLayer default value is incorrect in Layer.Vector documentation (#2613) See also: http://trac.openlayers.org/wiki/Release/2.9.1/Notes For information on possible changes that will need to be made between this version of !OpenLayers and previous versions, please look at the Release notes, available at the Release Notes information [1]. [1] http://trac.openlayers.org/wiki/Release/2.9.1/Notes#CompatibilityNotes Best regards, Bart From to.tonton at gmail.com Thu May 6 10:04:41 2010 From: to.tonton at gmail.com (Tonton) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] ZoomToMaxExtent ??? In-Reply-To: References: <64FEFB3BDAC1414F80EBF758194587DA19BCF55569@mbx.ajgirona.org> Message-ID: Yes this is it !! i presumed about Scale instead thanks for your help tonton On Thu, May 6, 2010 at 2:55 PM, wrote: > Try adding maxResolution: 64 or 128 or 256 to your map options. If it > works CC the list. > > > ------------------------------ > *De:* users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] *En > nombre de *Tonton > *Enviado el:* jueves, 06 de mayo de 2010 10:07 > *Para:* users@openlayers.org > *Asunto:* [OpenLayers-Users] ZoomToMaxExtent ??? > > hello this is my testpage > the Zoom is not at the boundings i think to set but a part of it! > So i can not see my map in once zoom - neither work :o( ?? > the extent i see seems to be (842943, 2334894, 843837, 2335562) > > > > > > > > > > >
>
> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100506/186dcb6e/attachment.html From mrc78a at yahoo.it Thu May 6 12:26:26 2010 From: mrc78a at yahoo.it (marco) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] measure control & google layer Message-ID: <149706.48736.qm@web27401.mail.ukl.yahoo.com> Hi all, I'm using measure controls with google maps layer. You can see my test page at http://webgis.iamc.cnr.it/webgis/prova/test3.html As you can see, using measure tool, ther's a shift between cursor position and features. Also, I save digitized features in a vector layer, and when I zoom out, features lost their original position. There's many posts regarding the precision of measures, but I can't find nothing about this issues.... there's a way to solve this problem?? Thanks in advance Marco From jimlug at co.clackamas.or.us Thu May 6 15:39:35 2010 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE 8 this.size.w is null or not an object - OL 2.9 In-Reply-To: References: <1273013165660-5006221.post@n2.nabble.com> Message-ID: <1273174775485-5016099.post@n2.nabble.com> Hello again, I was excited to hear there was a fix but when I downloaded and tried 2.9.1 I still received the same error message within Internet Explorer when I click on a point and try to obtain the popup box: "this.size.w" is null or not an object. I am totally at a loss . I've attached some of my code in hopes that someone will be able to point out the issue (if there is one). function findLayerClick(event) { mouseLoc = map.getLonLatFromPixel(event.xy); var url = prox.getFullRequestString({ REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: map.getExtent().toBBOX(), X: event.xy.x, Y: event.xy.y, INFO_FORMAT: 'gml', LAYERS: map.layers[6].params.LAYERS + "," + map.layers[7].params.LAYERS, QUERY_LAYERS: map.layers[6].params.LAYERS + "," + map.layers[7].params.LAYERS, FEATURE_COUNT: 1, WIDTH: map.size.w, HEIGHT: map.size.h, STYLE: ''}, "http://ain'tnothinglikeachickenwing?"); OpenLayers.loadURL(url, '', this, setHTML); Event.stop(event); } function setHTML(response) { var xmlFormat = new OpenLayers.Format.XML(); var xmlResponse = xmlFormat.read(response.responseText); var featureType = xmlResponse.getElementsByTagName("feature")[0]; var lyrName = featureType.textContent; switch(lyrName) { case "adt": //alert("Layer name: " + lyrName); var adt1995 = xmlResponse.getElementsByTagName("adt1995")[0]; var value1995 = adt1995.textContent; var adt1997 = xmlResponse.getElementsByTagName("adt1997")[0]; var value1997 = adt1997.textContent; var adt2000 = xmlResponse.getElementsByTagName("adt2000")[0]; var value2000 = adt2000.textContent; var adt2002 = xmlResponse.getElementsByTagName("adt2002")[0]; var value2002 = adt2002.textContent; var adt2005 = xmlResponse.getElementsByTagName("adt2005")[0]; var value2005 = adt2005.textContent; var adt2008 = xmlResponse.getElementsByTagName("adt2008")[0]; var value2008 = adt2008.textContent; // Create popup box var popup_info = "Average Daily Traffic Counts
" + "ADT 1995: " + value1995 + "
" + "ADT 1997: " + value1997 + "
" + "ADT 2000: " + value2000 + "
" + "ADT 2002: " + value2002 + "
" + "ADT 2005: " + value2005 + "
" + "ADT 2008: " + value2008 + ""; break; case "turnmove": //alert("Layer name: " + lyrName); var interSecTag = xmlResponse.getElementsByTagName("addr")[0]; var intersection = interSecTag.textContent; var pdfLinkTag = xmlResponse.getElementsByTagName("link")[0]; var pdfLink = pdfLinkTag.textContent; var popup_info = "Turning Movement
" + "Intersection: " + intersection + "
" + "PDF Image: + pdfLink + Total Vehicle Summary "; break; defualt: alert("No layer selected."); } if (popup != null) { popup.destroy(); popup = null; } popup = new OpenLayers.Popup.FramedCloud("Traffic", mouseLoc, new OpenLayers.Size(250,120), popup_info, null, true); map.addPopup(popup); popup.events.register("click", map, popupDestroy); } -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE-8-this-size-w-is-null-or-not-an-object-OL-2-9-tp5006221p5016099.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Thu May 6 16:36:43 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE 8 this.size.w is null or not an object -OL 2.9 In-Reply-To: <1273174775485-5016099.post@n2.nabble.com> Message-ID: Hi, I'm not sure, if it solves your problem. But i had the same error with my application and I could solve it by adding to the map div style width:100%; height:100%; #map{ width:100%; height:100%; } With FF i hadn't a problem. And with OL 2.8 this wasn't needed. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Dash Gesendet: Donnerstag, 6. Mai 2010 21:40 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] IE 8 this.size.w is null or not an object -OL 2.9 Hello again, I was excited to hear there was a fix but when I downloaded and tried 2.9.1 I still received the same error message within Internet Explorer when I click on a point and try to obtain the popup box: "this.size.w" is null or not an object. I am totally at a loss . I've attached some of my code in hopes that someone will be able to point out the issue (if there is one). function findLayerClick(event) { mouseLoc = map.getLonLatFromPixel(event.xy); var url = prox.getFullRequestString({ REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: map.getExtent().toBBOX(), X: event.xy.x, Y: event.xy.y, INFO_FORMAT: 'gml', LAYERS: map.layers[6].params.LAYERS + "," + map.layers[7].params.LAYERS, QUERY_LAYERS: map.layers[6].params.LAYERS + "," + map.layers[7].params.LAYERS, FEATURE_COUNT: 1, WIDTH: map.size.w, HEIGHT: map.size.h, STYLE: ''}, "http://ain'tnothinglikeachickenwing?"); OpenLayers.loadURL(url, '', this, setHTML); Event.stop(event); } function setHTML(response) { var xmlFormat = new OpenLayers.Format.XML(); var xmlResponse = xmlFormat.read(response.responseText); var featureType = xmlResponse.getElementsByTagName("feature")[0]; var lyrName = featureType.textContent; switch(lyrName) { case "adt": //alert("Layer name: " + lyrName); var adt1995 = xmlResponse.getElementsByTagName("adt1995")[0]; var value1995 = adt1995.textContent; var adt1997 = xmlResponse.getElementsByTagName("adt1997")[0]; var value1997 = adt1997.textContent; var adt2000 = xmlResponse.getElementsByTagName("adt2000")[0]; var value2000 = adt2000.textContent; var adt2002 = xmlResponse.getElementsByTagName("adt2002")[0]; var value2002 = adt2002.textContent; var adt2005 = xmlResponse.getElementsByTagName("adt2005")[0]; var value2005 = adt2005.textContent; var adt2008 = xmlResponse.getElementsByTagName("adt2008")[0]; var value2008 = adt2008.textContent; // Create popup box var popup_info = "Average Daily Traffic Counts
" + "ADT 1995: " + value1995 + "
" + "ADT 1997: " + value1997 + "
" + "ADT 2000: " + value2000 + "
" + "ADT 2002: " + value2002 + "
" + "ADT 2005: " + value2005 + "
" + "ADT 2008: " + value2008 + ""; break; case "turnmove": //alert("Layer name: " + lyrName); var interSecTag = xmlResponse.getElementsByTagName("addr")[0]; var intersection = interSecTag.textContent; var pdfLinkTag = xmlResponse.getElementsByTagName("link")[0]; var pdfLink = pdfLinkTag.textContent; var popup_info = "Turning Movement
" + "Intersection: " + intersection + "
" + "PDF Image: + pdfLink + Total Vehicle Summary "; break; defualt: alert("No layer selected."); } if (popup != null) { popup.destroy(); popup = null; } popup = new OpenLayers.Popup.FramedCloud("Traffic", mouseLoc, new OpenLayers.Size(250,120), popup_info, null, true); map.addPopup(popup); popup.events.register("click", map, popupDestroy); } -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE-8-this-size-w-is-null-or-not-an-ob ject-OL-2-9-tp5006221p5016099.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From jimlug at co.clackamas.or.us Thu May 6 17:08:58 2010 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] IE 8 this.size.w is null or not an object -OL 2.9 In-Reply-To: References: <1273013165660-5006221.post@n2.nabble.com> <1273174775485-5016099.post@n2.nabble.com> Message-ID: <1273180138073-5016510.post@n2.nabble.com> Thanks for the suggestion, however, this did not work. I'm still trying to find a solution. Thanks. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE-8-this-size-w-is-null-or-not-an-object-OL-2-9-tp5006221p5016510.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From woodbri at swoodbridge.com Fri May 7 00:06:41 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] Can OpenLayers call ...... In-Reply-To: <1273197083845-5017473.post@n2.nabble.com> References: <1273197083845-5017473.post@n2.nabble.com> Message-ID: <4BE391D1.7040006@swoodbridge.com> Hi Venkat and Anindya, First, your questions (see below) are user questions and not dev questions so I have moved them over to the user list. Second, your questions are very basic web development questions and not really OpenLayers specific. OpenLayers is a JavaScript library that runs in a web browser, so all the rules that apply to this development environment apply to OpenLayers. If you can not answer this question then you need to do more research and read some tutorials on web development BEFORE you start asking questions on OpenLayers User or the Dev lists. [2] So questions like, Can OpenLayers call .... can be more generally ask in terms of can any JavaScript web client call ... and how do they do that? Then you can look at the examples OpenLayers provides that do very simple things like you are asking. Once you have some basic understanding of OpenLayers and you need to more specific information, I'm sure there are plenty of people that are willing to give you some help. If you are asking to decide if you should pursue some additional investigation on your own then: 1) Yes, OpenLayers can call AJAX services - see the examples [1]. 2) Yes, OpenLayers has support for parsing various geostapial data formats - see the examples [1] 3) No Javascript running in a browser can talk to a Database without some kind of AJAX server application 4) All Javascript running in a browser can talk to web services as AJAX requests, but you have to deal with the "server of origin" issues. If you don't know what that means, google it. -Steve [1] http://dev.openlayers.org/releases/OpenLayers-2.9/examples/ [2] http://trac.openlayers.org/wiki/Documentation -------- Original Message -------- Subject: [OpenLayers-Dev] Can OpenLayers call a webservice? Date: Thu, 6 May 2010 18:51:23 -0700 (PDT) From: venkat.bapalu To: dev@openlayers.org Hi, I was stuck up at the below implementations and am not able to move further. I have few queries on OpenLayers functionalities, Please let me know the possibility of the approach and the best way of implementing it !! 1. Can OpenLayers directly read the XML data with spatial information and display in web page? If this possible, please give any example 2. Can OpenLayers connect directly to any database (oracle) and publish the data on map? one way of connecting to the database is through the use of GeoServer with OpenLayers. But I want to use only OpenLayers to connect to the oracle database. Please let me know how to achieve this? 3. Can OpenLayers using JavaScript (AJAX) can call a Oracle BPEL webservice? If so how to customize the openlayers to call the webservice Regards Venkat -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Can-OpenLayers-call-a-webservice-tp5017473p5017473.html Sent from the OpenLayers Dev mailing list archive at Nabble.com. _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev -------- Original Message -------- Subject: [OpenLayers-Dev] Can OpenLayers call a java program Date: Thu, 6 May 2010 19:34:36 -0700 (PDT) From: Anindya To: dev@openlayers.org Hi, Can OpenLayers call a java program? If yes, can anybody provide any example which explains how OpenLayers call a java program Regards, Anindya -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Can-OpenLayers-call-a-java-program-tp5017563p5017563.html Sent from the OpenLayers Dev mailing list archive at Nabble.com. _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev From vanessa.towers at dsto.defence.gov.au Fri May 7 00:36:22 2010 From: vanessa.towers at dsto.defence.gov.au (noosy) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Marker + Popups = Flicker Message-ID: <1273206982599-5017786.post@n2.nabble.com> I'm using the GWT wrapper for Openlayers and I've pretty much got the same code as seen in this old tutorial http://geoserver.org/display/GEOSDOC/Google+Web+Toolkit+(GWT),+OpenLayers+and+GeoServer. I want a popup to come up when I rollover a marker with the mouse. This works but I get the worst flickering when the popup is visible and the mouse rolls over the popup (which is just over the marker). I've tried offsetting the popup but it's hard to judge where the thing is going to pop up depending on where I'm looking at the map. I've changed to using a FramedCloud cause it's a skinnier popup at the base (less of a problem) but this isn't helping much. It just seems so random, sometimes it is perfect sometimes it is absolutely horrible. My zoom level seems to affect it and obviously whatever algorithm is the the background to determine which quadrant the popup appears in. I've tried overriding, registering/unregistering mouseover/mouseout events but to no avail. Are there any straightforward solutions to this problem? It is really bugging me. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Marker-Popups-Flicker-tp5017786p5017786.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From vanessa.towers at dsto.defence.gov.au Fri May 7 00:51:24 2010 From: vanessa.towers at dsto.defence.gov.au (noosy) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Marker + Popups = Flicker In-Reply-To: <1273206982599-5017786.post@n2.nabble.com> References: <1273206982599-5017786.post@n2.nabble.com> Message-ID: <1273207884051-5017809.post@n2.nabble.com> Well thats a bit embarrassing, I think I fixed it - just passed in the following for my popup constructor to offset the achor a little: popup = new FramedCloud("marker-info", marker.getLonLat(), new Size(120,80), "

" + getTitle() + "\n" + marker.getLonLat().lon() + "\n" + marker.getLonLat().lat() + "

" , new Icon("", new Size(16,16), new Pixel(-8,-8)), false); Previously I had new Icon("", new Size(0,0), new Pixel(0,0)), false); Oh well, I hope my oversight helps someone! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Marker-Popups-Flicker-tp5017786p5017809.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jax at schildmos.nl Fri May 7 04:04:29 2010 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] popup.autoSize = true is rather strange In-Reply-To: <1271764404032-4930736.post@n2.nabble.com> References: <1271764404032-4930736.post@n2.nabble.com> Message-ID: <1273219469605-5018240.post@n2.nabble.com> No real help, just a bump. Got the exact same problem. However, after closing the popup it is reopened (??) as soon as I do some panning, not necessarily panning it out of view first. (for ref: panMapIfOutOfView is set to false). When it reopens, the size is correct... running 2.8 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/popup-autoSize-true-is-rather-strange-tp4930736p5018240.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From slawomir.messner at Staff.Uni-Marburg.DE Fri May 7 04:12:20 2010 From: slawomir.messner at Staff.Uni-Marburg.DE (Slawomir Messner) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Points in KML Format In-Reply-To: <1273201330567-5017611.post@n2.nabble.com> References: <1273199676796-5017563.post@n2.nabble.com> <1273200888004-5017601.post@n2.nabble.com> <1273201330567-5017611.post@n2.nabble.com> Message-ID: <4BE3CB64.6030205@staff.uni-marburg.de> ||Our Application uses OL to draw features on a map, style them and save it in postgresql(attributes and style as json strings). After that then we load them as KML-files. With polygons and linestrings there is no problem, but with points. When they are styled like below they are not drawn when we load them. Now I was looking for the reason and I found it, I think. It's when a point is styled not the default(or any other) value for pointRadius is used, am I right? If there is no failure in my style than my proposal is to add the following line into the parseFeature-function of OpenLayers.Format.KML, right before "var feature = new OpenLayers.Feature.Vector(geometry, attributes);": if ((geometry instanceof OpenLayers.Geometry.Point || geometry instanceof OpenLayers.Geometry.MultiPoint) && this.styles[attributes.styleUrl] && !this.styles[attributes.styleUrl].pointRadius) { this.styles[attributes.styleUrl].pointRadius = 6; } Or it could be a better solution to add the default as default to 6 in the parseStyle-function like(would save the if statement, but there would be more useless data in the style-objects): style["pointRadius "] = 6; It's a pity that in the parseStyle there is no access to the geometries use the style, but it's clear why it's like that. || -- ----------------------------------------------- Slawomir Messner Forschungszentrum "Deutscher Sprachatlas" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100507/bc737ae7/attachment.html From carlos.montalvillo at gmail.com Fri May 7 04:32:48 2010 From: carlos.montalvillo at gmail.com (Carlos Montalvillo) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Points in KML Format In-Reply-To: <4BE3CB64.6030205@staff.uni-marburg.de> References: <1273199676796-5017563.post@n2.nabble.com> <1273200888004-5017601.post@n2.nabble.com> <1273201330567-5017611.post@n2.nabble.com> <4BE3CB64.6030205@staff.uni-marburg.de> Message-ID: Dear Slawomir, Try to use "http://kmlvalidator.com/" in order to "strong" validate your kml file. Hope this help. Regards, Carlos 2010/5/7 Slawomir Messner > Our Application uses OL to draw features on a map, style them and save it > in postgresql(attributes and style as json strings). After that then we load > them as KML-files. With polygons and linestrings there is no problem, but > with points. When they are styled like below they are not drawn when we load > them. > Now I was looking for the reason and I found it, I think. It's when a point > is styled not the default(or any other) value for pointRadius is used, am I > right? > If there is no failure in my style than my proposal is to add the following > line into the parseFeature-function of OpenLayers.Format.KML, right before > "var feature = new OpenLayers.Feature.Vector(geometry, attributes);": > if ((geometry instanceof OpenLayers.Geometry.Point || geometry > instanceof OpenLayers.Geometry.MultiPoint) && > this.styles[attributes.styleUrl] && > !this.styles[attributes.styleUrl].pointRadius) { > this.styles[attributes.styleUrl].pointRadius = 6; > } > Or it could be a better solution to add the default as default to 6 in the > parseStyle-function like(would save the if statement, but there would be > more useless data in the style-objects): > style["pointRadius "] = 6; > It's a pity that in the parseStyle there is no access to the geometries use > the style, but it's clear why it's like that. > > > > > > > -- > ----------------------------------------------- > Slawomir Messner > Forschungszentrum "Deutscher Sprachatlas" > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100507/efdeee07/attachment.html From chris.green at ibstv.co.uk Fri May 7 07:42:38 2010 From: chris.green at ibstv.co.uk (Chris Green) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] logical.OR filter Message-ID: <013101caedda$65d98c90$318ca5b0$@green@ibstv.co.uk> Hi All I am using OL2.8 with a vector layer that uses WFS getfeature to obtain up to about 20 features from a MapServer WMS layer. Each feature is found via a comparison filter, all of which are then combined via a logical.OR filter. It sort of works but I get inconsistent results from the logical OR filter - generally I see one or two of the features only, not all of them. I see that there has been some problems with logical.OR in OL2.8, can anyone tell me if moving to OL2.9 is likely to solve my problem? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100507/ae52248b/attachment.html From tilakapash at gmail.com Fri May 7 10:46:04 2010 From: tilakapash at gmail.com (Jonas Blasques) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] WFS-T insert error Message-ID: Hello everyone, I have a bug which I cannot solve. Was wandering if anyone could help. I am trying to save a single point to a vector layer (this is originally a shp file which I uploaded to GeoServer in two ways - as the shapefile itself and as a postgis table, both of them produce the same error) following the wfs-t example that comes with geoserver (geoserver/www/wfs-t.html). When I try with the default page it works and saves the point to topp:tasmania_cities. Anyone has any ideas. I'm kind of in the dark. If you want any more info about my data feel free to ask. I will answer immediately. Thanks, Jo?o Logs below: When I send this POST Request: 14337.787617188,31343.8228125 The Response is: Error performing insert The GeoServer Log says: 2010-05-07 15:23:53,190 ERROR [geoserver.wfs] - Transaction failed org.geoserver.wfs.WFSTransactionException: Error performing insert 2010-05-07 15:23:53,192 INFO [geoserver.wfs] - Request: transaction handle = null service = WFS version = 1.0.0 baseUrl = http://localhost:80/geoserver/ providedVersion = null lockId = null group = [wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl@f53890(feature: [SimpleFeatureImpl:pontos_interesse_min_postgis=[SimpleFeatureImpl.Attribute: objectid=null, SimpleFeatureImpl.Attribute: id=null, SimpleFeatureImpl.Attribute: nome=null, SimpleFeatureImpl.Attribute: categoria=null, SimpleFeatureImpl.Attribute: dtcc=null, SimpleFeatureImpl.Attribute: the_geom=]], handle: null, idgen: , inputFormat: , srsName: null)] insert = [net.opengis.wfs.impl.InsertElementTypeImpl@f53890 (feature: [SimpleFeatureImpl:pontos_interesse_min_postgis=[SimpleFeatureImpl.Attribute: objectid=null, SimpleFeatureImpl.Attribute: id=null, SimpleFeatureImpl.Attribute: nome=null, SimpleFeatureImpl.Attribute: categoria=null, SimpleFeatureImpl.Attribute: dtcc=null, SimpleFeatureImpl.Attribute: the_geom=]], handle: null, idgen: , inputFormat: , srsName: null)] update = [] delete = [] native = [] releaseAction = ALL The PostGre log does not report anything. -- "Ajude um pouco ... j? ? muito" Projecto SOSIndia http://sosindia.net --------------------------------------------- Shoot for the moon, even if you miss it you will land among the stars. - Unknown ------------------------------------------------- What if for a moment, as an experiment, you drop every belief that you have? - Unknown --------------------------------------------------------------- "We are all linked by a fabric of unseen connections. This fabric is constantly changing and evolving. This field is directly structured and influenced by our behavior and by our understanding." ?David Bohm, quantum physicist, 1917?1992 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100507/a3d6f41c/attachment.html From marjiea1 at gmail.com Fri May 7 13:20:24 2010 From: marjiea1 at gmail.com (Marjie Anderson) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Points in KML Format (KML mime type in IIS7) In-Reply-To: References: <1273199676796-5017563.post@n2.nabble.com> <1273200888004-5017601.post@n2.nabble.com> <1273201330567-5017611.post@n2.nabble.com> <4BE3CB64.6030205@staff.uni-marburg.de> Message-ID: <000c01caee09$9525f6d0$bf71e470$@com> Thank you so much for that link! I did not need it to validate my kml file, but when I typed in my kml URL and got a 404-not found, that told me my proxy was not why I was getting a 404-not found error in my application. That helped me to track down the error to kml mime type not enabled in IIS7 (windows hosting.) While my host (GoDaddy) does not allow me to directly add mime types to IIS7, it can be done in the web.config file in my app directory as so: Marjie From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Carlos Montalvillo Sent: Friday, May 07, 2010 4:33 AM To: Slawomir Messner Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Points in KML Format Dear Slawomir, Try to use "http://kmlvalidator.com/" in order to "strong" validate your kml file. Hope this help. Regards, Carlos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100507/47f8f3dd/attachment.html From list at rdewit.net Sat May 8 03:08:59 2010 From: list at rdewit.net (Roald de Wit) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] WFS-T insert error In-Reply-To: References: Message-ID: <4BE50E0B.9080007@rdewit.net> Hi Jo?o, I noticed that the coordinates that get inserted seem to be in spherical mercator projection (or at least some projection that uses meters instead of degrees) without specifying the SRS in the WFS POST anywhere. Try by either providing the correct projection or by converting your points to the projection your layer is in. I hope that helps. Regards, Roald On 08/05/10 00:46, Jonas Blasques wrote: > Hello everyone, > > I have a bug which I cannot solve. Was wandering if anyone could help. > > I am trying to save a single point to a vector layer (this is > originally a shp file which I uploaded to GeoServer in two ways - as > the shapefile itself and as a postgis table, both of them produce the > same error) following the wfs-t example that comes with geoserver > (geoserver/www/wfs-t.html). > When I try with the default page it works and saves the point to > topp:tasmania_cities. > > Anyone has any ideas. I'm kind of in the dark. If you want any more > info about my data feel free to ask. I will answer immediately. > > Thanks, Jo?o > > > Logs below: > > When I send this POST Request: > > | version="1.0.0" service="WFS"> > | > || > || > | xmlns:feature="http://localhost:8080/geoserver/peniche">| > || > || > || > || > || > || > || > || > || > | > | > |14337.787617188,31343.8228125 > | > || > || > || > || > || > || > || > || > || > || > | > | > || > || > || > > The Response is: > > | > xmlns:wfs="http:/||/www.opengis.net/wfs " > > > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"|| > > > xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:80/geoserver/schemas/wfs/1.0.0/WFS-transaction||.xsd"> > > > | > | > | > | > | > | > > | > | > | > | > | > | > > | > |Error performing insert > | > | > | > | > | > | > > > | > > The GeoServer Log says: > > 2010-05-07 15:23:53,190 ERROR [geoserver.wfs] - Transaction failed > org.geoserver.wfs.WFSTransactionException: Error performing insert > > 2010-05-07 15:23:53,192 INFO [geoserver.wfs] - > Request: transaction > handle = null > service = WFS > version = 1.0.0 > baseUrl = http://localhost:80/geoserver/ > providedVersion = null > lockId = null > group = > [wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl@f53890 > (feature: > [SimpleFeatureImpl:pontos_interesse_min_postgis=[SimpleFeatureImpl.Attribute: > objectid=null, > SimpleFeatureImpl.Attribute: id id=fid--6c61e3e8_128726979c6_-7fec>=null, SimpleFeatureImpl.Attribute: > nome=null, > SimpleFeatureImpl.Attribute: categoria id=fid--6c61e3e8_128726979c6_-7fec>=null, SimpleFeatureImpl.Attribute: > dtcc=null, > SimpleFeatureImpl.Attribute: the_geom id=fid--6c61e3e8_128726979c6_-7fec>=]], handle: null, idgen: , > inputFormat: , srsName: null)] > insert = [net.opengis.wfs.impl.InsertElementTypeImpl@f53890 > (feature: > [SimpleFeatureImpl:pontos_interesse_min_postgis=[SimpleFeatureImpl.Attribute: > objectid=null, > SimpleFeatureImpl.Attribute: id id=fid--6c61e3e8_128726979c6_-7fec>=null, SimpleFeatureImpl.Attribute: > nome=null, > SimpleFeatureImpl.Attribute: categoria id=fid--6c61e3e8_128726979c6_-7fec>=null, SimpleFeatureImpl.Attribute: > dtcc=null, > SimpleFeatureImpl.Attribute: the_geom id=fid--6c61e3e8_128726979c6_-7fec>=]], handle: null, idgen: , > inputFormat: , srsName: null)] > update = [] > delete = [] > native = [] > releaseAction = ALL > > > The PostGre log does not report anything. > > > > > > > -- > "Ajude um pouco ... j? ? muito" > Projecto SOSIndia http://sosindia.net > --------------------------------------------- > > Shoot for the moon, > even if you miss it > you will land among the stars. > - Unknown > > ------------------------------------------------- > > What if for a moment, as an experiment, > you drop every belief that you have? > - Unknown > > --------------------------------------------------------------- > > "We are all linked by a fabric of unseen connections. This fabric is > constantly changing and evolving. This field is directly structured > and influenced by our behavior and by our understanding." > ?David Bohm, quantum physicist, 1917?1992 > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From tolpxob at googlemail.com Sat May 8 13:21:37 2010 From: tolpxob at googlemail.com (boxplot) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Nodelist Info / GetFeatureInfo not working Message-ID: <9D99985C-4EA0-40EC-AA5F-793BE11DF1CB@googlemail.com> Hi, I use the following example of geolayers to test GetFeatureInfo (it works, so this can be no proxy-issue, also OpenLayers and GeoServer run on the same server). But when I copy the (what I think) relevant parts into my own code, it is not working anymore (after clicking on the line the text switches from "Click on the map to get feature info" to "Loading... please wait..." and that's it). So it would be great to know what the minimum requirements for this method are? And if it is possible to limit the output to some properties of the layer? Maybe the problem is the line > QUERY_LAYERS: map.layers[0].params.LAYERS, because I have more than one layer in my own map? Thanks for any help! Pascal > > > > > OpenLayers map preview > > > > > > > > > > > >
> >
>
> >
location
>
>
>
>
> Click on the map to get feature info >
> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100508/b5de9049/attachment.html From list at rdewit.net Sat May 8 19:05:47 2010 From: list at rdewit.net (Roald de Wit) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Nodelist Info / GetFeatureInfo not working In-Reply-To: <9D99985C-4EA0-40EC-AA5F-793BE11DF1CB@googlemail.com> References: <9D99985C-4EA0-40EC-AA5F-793BE11DF1CB@googlemail.com> Message-ID: <4BE5EE4B.9010503@rdewit.net> Hi, Have you looked at the request that OL is sending to GS? The FireBug addin for Firefox has a 'Net' tab that shows you every request that your application sends, including what response it gets back. That might help you find out what's wrong. Regards, Roald On 09/05/10 03:21, boxplot wrote: > Hi, > > I use the following example of geolayers to test GetFeatureInfo (it > works, so this can be no proxy-issue, also OpenLayers and GeoServer > run on the same server). But when I copy the (what I think) relevant > parts into my own code, it is not working anymore (after clicking on > the line the text switches from "Click on the map to get feature info" > to "Loading... please wait..." and that's it). So it would be great to > know what the minimum requirements for this method are? And if it is > possible to limit the output to some properties of the layer? > > Maybe the problem is the line > >> QUERY_LAYERS: map.layers[0].params.LAYERS, > > because I have more than one layer in my own map? > > Thanks for any help! > > Pascal > >> >> > "DTD/xhtml1-strict.dtd"> >> >> >> OpenLayers map preview >> >> > href="http://myownhomepage.xyz:80/geoserver/openlayers/theme/default/style.css"/> >> >> >> >> >> >> >> >> >> >>
>> > src="http://myownhomepage.xyz:80/geoserver/options.png"/> >>
>>
>> >>
location
>>
>>
>>
>>
>> Click on the map to get feature info >>
>> >> >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From dupes9999 at hotmail.com Sat May 8 19:39:31 2010 From: dupes9999 at hotmail.com (Chris Dpont) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Another GetFeatureWFS & (Possible) Proxy Issue - CONTENT_LENGTH Message-ID: <1273361971808-5024916.post@n2.nabble.com> Hi All, I apologize in advance if this question is already answered in a previous post. I have looked through many GetFeatureWFS (and proxy.cgi) related posts and have not found a solution to my problem as of yet - and it doesn't help that my coding skills have gone stale - so here goes.... I've been fiddling with the Openlayers WFS GetFeature capabilities for a little while, but have been having a hard time getting any results from it. At first, Firebug was giving me a lot of errors when I tried to select or hover over features, but I quickly found out about the need for the ProxyHost, and have downloaded the proxy.cgi from the Openlayers site and placed it in my /cgi-bin/ folder. After a lot of work with it, I believe I finally have that working - it's properly opening when directly referenced (though It could still be failing for other purposes). Now when I try to select features from my map, I'm no longer getting any 'red errors' in Firebug, but nothing is being selected and I'm still seeing some error messages (though no longer red) pop up in Firebug. The query appears to be sent to the server, but this is what is coming up as the response: Some unexpected error occurred. Error text was: 'CONTENT_LENGTH' Now, I'm guessing that I have something wrong with either my js or my proxy (or even possibly my mapfile), but I can't seem to find where the problem is. Anybody have any ideas? As for the environment details: I'm currently running my website on a Ubuntu 8.04 machine with Apache version 2.2, and am referencing the newest version of OpenLayers from their site. I will post the web and proxy code below, but if someone wants to play in my sandbox, please go right ahead : http://www.cemetermaps.ca/Simpletest.html www.cemeterymaps.ca/Simpletest.html . It only appears to work for Firefox right now - not IE. That's a completely separate issue that I will tackle later on . Any help would be appreciated - please let me know if you have any clarification questions for me. Thanks, Chris CODE Website code -- -----------------
------------------------Proxy.cgi Code -------------------------------- #!/usr/bin/env python import urllib2 import cgi import sys, os # Designed to prevent Open Proxy type stuff. allowedHosts = ['www.openlayers.org', 'openlayers.org', 'labs.metacarta.com', 'world.freemap.in', 'prototype.openmnnd.org', 'geo.openplans.org', 'sigma.openplans.org', 'demo.opengeo.org', 'www.openstreetmap.org', 'www.cemeterymaps.ca', '192.168.1.66'] method = os.environ["REQUEST_METHOD"] if method == "POST": qs = os.environ["REQUEST_METHOD"] d = cgi.parse_qs(qs) if d.has_key("url"): url = d["url"][0] else: url = "http://www.openlayers.org" else: fs = cgi.FieldStorage(); url = fs.getvalue('url', "http://www.openlayers.org") try: host = url.split("/")[2] #Gets rid of the http or https if allowedHosts and not host in allowedHosts: print "Status: 502 Bad Gateway" print "Content-Type: text/plain" print print "This proxy does not allow you to access that location (%s)." % (host,) print print os.environ elif url.startswith("http://") or url.startswith("https://"): if method == "POST": length = int(os.environ["CONTENT_LENGTH"]) headers = {"Content-type": os.environ["CONTENT_TYPE"]} body = sys.stdin.read(length) r = urllib2.Request(url, body, headers) y = urllib2.urlopen(r) else: y = urllib2.urlopen(url) # print content type header i = y.info() if i.has_key("Content-type"): print "Content-type: %s" % (i["Content-type"]) print y.read() y.close() else: print "Content-type: text/plain\n\n" print print y.read() y.close() else: print "Content-type: text/plain\n\n" print print "Illegal request." except Exception, E: print "Status: 500 Unexpected Error" print "Content-type: text/plain\n\n" print print "Some unexpected error occurred. Error text was:", E -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Another-GetFeatureWFS-Possible-Proxy-Issue-CONTENT-LENGTH-tp5024916p5024916.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stefanie at weykam.net Sun May 9 07:18:36 2010 From: stefanie at weykam.net (Stefanie Weykam) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Raster map shift - solved Message-ID: <4BE69A0C.1030409@weykam.net> A couple of weeks ago I notified strange raster layer behaviour and I would now like to share with you how we solved the problem: We observed a slight shift when the raster layer was displayed in OpenLayers. The shift seemed to be dependent on scale and GetFeatureInfo requests were not affected. That means that, although the pixel class was not the expected one, the returned value was always correct. We did not observe this behaviour in the thick client we use to check our map services and therefore concluded that the underlying WMS was correct and that the shift had something to do with how OpenLayers displays raster layers. And the end it turned out that the test client did not display the layer correctly either ? we just happened to look at a scale where the shift was very small. So, OpenLayers was off the hook and we went back to MapServer. We finally changed the configuration to allow non-square pixels - the raster layer pixels are defined in decimal degrees and thus are irregular. For those who have been working for years with MapServer and didn?t even know that this parameter existed, this did the trick: CONFIG MS_NONSQUARE yes According to the manual, this should be the default, but it seems that MapServer doesn?t always ?remember? this. Now everything is back in place. Thanks, Bart, for the hint. Kind regards, Stefanie From tolpxob at googlemail.com Sun May 9 09:53:55 2010 From: tolpxob at googlemail.com (boxplot) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Nodelist Info / GetFeatureInfo not working In-Reply-To: <4BE5EE4B.9010503@rdewit.net> References: <9D99985C-4EA0-40EC-AA5F-793BE11DF1CB@googlemail.com> <4BE5EE4B.9010503@rdewit.net> Message-ID: <6CBC1808-8E16-4198-94EC-A4637E5CFA17@googlemail.com> Hi Roald, I added this tool and loaded the page again. Unfortunately the response is empty. What could be the reason for this? Thanks, Pascal Am 09.05.2010 um 01:05 schrieb Roald de Wit: > Hi, > > Have you looked at the request that OL is sending to GS? The FireBug addin for Firefox has a 'Net' tab that shows you every request that your application sends, including what response it gets back. > That might help you find out what's wrong. > > Regards, Roald > > On 09/05/10 03:21, boxplot wrote: >> Hi, >> >> I use the following example of geolayers to test GetFeatureInfo (it works, so this can be no proxy-issue, also OpenLayers and GeoServer run on the same server). But when I copy the (what I think) relevant parts into my own code, it is not working anymore (after clicking on the line the text switches from "Click on the map to get feature info" to "Loading... please wait..." and that's it). So it would be great to know what the minimum requirements for this method are? And if it is possible to limit the output to some properties of the layer? >> >> Maybe the problem is the line >> >>> QUERY_LAYERS: map.layers[0].params.LAYERS, >> >> because I have more than one layer in my own map? >> >> Thanks for any help! >> >> Pascal >> >>> >>> >>> >>> >>> OpenLayers map preview >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>>
>>> >>>
>>>
>>> >>>
location
>>>
>>>
>>>
>>>
>>> Click on the map to get feature info >>>
>>> >>> >>> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > From sb.ray at hotmail.com Sun May 9 10:03:39 2010 From: sb.ray at hotmail.com (sunny74) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] drawing a polygon over selected region Message-ID: <1273413819773-5026619.post@n2.nabble.com> Hi Friends, I am doing a GETfeature over a WFS layer.I am able to get the info of selected features. I have 2 questions: 1) When I drag the mouse a box is drawn temporarily and it goes off as soon as I leave the mouse.. I want to pass the bounds of the selected region drawn to a function which will draw a rectangle with a particular style over the selected region.How can I do this? 2)I want to save the details of the features selected i.e within the box in a GML. 3) Can we have a circle instead of a box for selection? My code is : layer = new OpenLayers.Layer.WMS("OpenLayers WMS", "/Mapserver/mapserv.exe?map=c:/ms4w/apache/htdocs/Shape/newwr1rec.map", { layers: ["state", "RailwayStations"], transparent: false, format: "image/png" }, { isBaseLayer: true }); map.addLayer(layer); layer = new OpenLayers.Layer.WFS("MyWFS", "/Mapserver/mapserv.exe?map=c:/ms4w/apache/htdocs/Shape/Rail_wfs.map", { typename: "RailwayStations", maxfeatures: 100 }, { featureClass: OpenLayers.Feature.WFS }); select = new OpenLayers.Layer.Vector("Selection", { styleMap: new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]) }); // select1 = new OpenLayers.Layer.Vector("Selection1", { styleMap: // new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]) // }); // map.addLayers([layer,select]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); // make a GetFeature request // map.events.register('click', map, function(e) { // var url = "http://localhost:81/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/Shape/Rail_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GETfeature&typename=state"; // }) control = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS({ formatOptions: { outputFormat: "text/xml" }, url: "/Mapserver/mapserv.exe?map=c:/ms4w/apache/htdocs/Shape/Rail_wfs.map", featureType: 'RailwayStations', featurePrefix: 'ms', geometryName: 'msgeometry', maxFeatures: 100 }), box: true, multipleKey: "shiftKey" }); control.events.register("featureselected", this, function(e) { alert(" in fselected"); //select.addFeatures([e.feature]); // document.getElementById('featuredetails').innerHTML += "
"+ e.feature.attributes.S_Name + "
" // + e.feature.attributes.S_no; var feats = e.feature; alert(feats); alert(e.feature.attributes); alert(e.feature.geometry); //response += e.feature.attributes.S_Name + e.feature.attributes.S_no + e.feature.attributes.Distance_K + e.feature.attributes.Stn_Code; //UpdatePopup(response); //alert(results.attributes.length); // OpenLayers.Strategy.Save(e.feature); //alert(feats); // while (feats.attributes != null) { // document.getElementById('featuredetails').innerHTML += "
" + feats.attributes.name + "
"; // } // for (i = 0; i < feats.attributes.length; i++) { // alert(feats.attributes.first); // alert(feats.attributes); // document.getElementById('featuredetails').innerHTML += "
" + feats.attributes[i].name + "
"; // } document.getElementById('featuredetails').innerHTML += "
" + e.feature.attributes.S_Name + "
" + e.feature.attributes.S_No + "
" + e.feature.attributes.Distance_K + "
" + e.feature.attributes.Stn_Code; }); map.addControl(control); control.activate(); -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/drawing-a-polygon-over-selected-region-tp5026619p5026619.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From sb.ray at hotmail.com Sun May 9 10:17:24 2010 From: sb.ray at hotmail.com (sunny74) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] doing a search with a buffer Message-ID: <1273414644678-5026652.post@n2.nabble.com> Hi Friends, I want to do a search with a buffer. My scenario is like this. I get a structure Id from the user and using that I get the geometry of that structure from the postgres DB. Now I want to do a search of all structures within a radius of say 100km from the structure selected by the user. Is there any postgres function which will give the geometry of all features lying within a certain radius of a feature.. Has anybody done something like this before?If yes pls share as to how you have done it? Thanks for your attention. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/doing-a-search-with-a-buffer-tp5026652p5026652.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stephane.poirier at usherbrooke.ca Sun May 9 14:00:15 2010 From: stephane.poirier at usherbrooke.ca (Stephane Poirier) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] custom bitmap as main background layer Message-ID: <1E355A16FF9848E8A909547ABE8F8360@geog.local> Hi All, I am using a custom bitmap (878 x 823 pixel) as openlayer main background layer and I get the openlayers map display that I want (http://www.oifii.org/imt/dai/src/2010may31/index_CRCM_POLSTE-BITMAP.html). I would like to be able to do coordinate (projection) transforms. Provided my bitmap is a stereo polar projection rotated in order to get north america vertical and center to canada, how could I modify my code here below (that works in pixel projection) to work with this specific projection? I need to do this because I want to overlay objects from a layer that I must query in lat lon (EPSG:4326). My code used to create the default layer is: minimumdefaultBounds=new OpenLayers.Bounds(0, 0, 1, 1); defaultBounds=new OpenLayers.Bounds(0, 0, 878, 823); var options= { minResolution: "auto", minExtent: minimumdefaultBounds, maxResolution: "auto", maxExtent: defaultBounds, //i.e. max bitmap size restrictedExtent: defaultBounds, //null to allow panning projection: myproj, controls: [new OpenLayers.Control.MouseDefaults(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.PanZoom()] }; map=new OpenLayers.Map('map',options); Regards, Stephane -------------------------------------------------------------------- Stephane Poirier, M.Sc. Optical Physics Remote Sensing Application Software Developer 3532 rue Sainte-Famille, Apt. 4 Montreal, QC, H2X 2L1, Canada http://www.oifii.org stephane.poirier@oifii.org Tel.: (514) 509-8833 Fax: (514) 509-8833 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100509/07021b76/attachment.html From list at rdewit.net Sun May 9 18:06:52 2010 From: list at rdewit.net (Roald de Wit) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Nodelist Info / GetFeatureInfo not working In-Reply-To: References: <9D99985C-4EA0-40EC-AA5F-793BE11DF1CB@googlemail.com> <4BE5EE4B.9010503@rdewit.net> Message-ID: <4BE731FC.6040706@rdewit.net> Hi Pascal, You should pretty much always get at least *something* back: either an error or an empty reponse (FireBug would tell you). Have you really got ":80" in your settings like below? OpenLayers.loadURL("http://myownhomepage.xyz:80/geoserver/wms", params, this, setHTML, setHTML); If your Tomcat runs on port 80 then you can leave out the port number. That might do the trick (and yes, it would then have been a proxy issue). Like this: OpenLayers.loadURL("http://myownhomepage.xyz/geoserver/wms ", params, this, setHTML, setHTML); And since your OL is on the same server as your GS, you could even do this: OpenLayers.loadURL("/geoserver/wms ", params, this, setHTML, setHTML); And to deal with errors in your AJAX request, why not use a separate function like this: OpenLayers.loadURL("/geoserver/wms ", params, this, setHTML, *onAjaxError*); Regards, Roald On 10/05/10 05:45, boxplot wrote: > Hi, > > maybe a made a small progress. As I have written in my last mail I get > no response when using GetFeatureInfo (I do get a response when using > the GeoServer OpenLayers example which I can access through "Layer > Preview" => see code below). So I copied both requests directly into > my browser and both got a response: > >> http://myownhomepage.xyz/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=12.327023%2C47.673%2C12.362977%2C47.777&X=79&Y=375&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=Workspace%3ALayer&FEATURE_COUNT=50&Srs=EPSG%3A4326&Layers=Workspace%3ALayer&Styles=&WIDTH=177&HEIGHT=512&format=image%2Fpng >> > > GeoServer runs as a .war within Tomcat and OpenLayers is on the same > server. I really can't believe why the same code with the same request > on the same server is once getting a response and the other time it is > not. Is there a possibility that it is a proxy-issue or maybe a > problem with the encoding? > > Thanks, Pascal > > Am 09.05.2010 um 01:05 schrieb Roald de Wit: > >> Hi, >> >> Have you looked at the request that OL is sending to GS? The FireBug >> addin for Firefox has a 'Net' tab that shows you every request that >> your application sends, including what response it gets back. >> That might help you find out what's wrong. >> >> Regards, Roald >> From list at rdewit.net Sun May 9 21:21:24 2010 From: list at rdewit.net (Roald de Wit) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] doing a search with a buffer In-Reply-To: <1273414644678-5026652.post@n2.nabble.com> References: <1273414644678-5026652.post@n2.nabble.com> Message-ID: <4BE75F94.7020002@rdewit.net> Hi, From your other post ('drawing a polygon over selected region'), I assume that you're using MapServer. You can quite easily add a spatial filter to your WFS request. var radius = 100 * 1000; // 100km // create point from your lat and lon of your selected feature var radiusPoint = new OpenLayers.Geometry.Point(lon, lat); var radiusFilter = new OpenLayers.Filter.Spatial({ type: OpenLayers.Filter.Spatial.DWITHIN, value: radiusPoint, distanceUnits: "meters", distance: radius }); // assuming this is your vector layer layer.filter = radiusFilter; That should do the trick. Note: if you want to do something similar with GeoServer, please note that GS can only use the native distanceUnits for that layer. If that layer has degrees as its units, you'd need to convert your units from meters to degrees. Regards, Roald On 10/05/10 00:17, sunny74 wrote: > Hi Friends, > > I want to do a search with a buffer. > My scenario is like this. > I get a structure Id from the user and using that I get the geometry of that > structure from the postgres DB. > Now I want to do a search of all structures within a radius of say 100km > from the structure selected by the user. > Is there any postgres function which will give the geometry of all features > lying within a certain radius of a feature.. > > Has anybody done something like this before?If yes pls share as to how you > have done it? > > Thanks for your attention. > From eric.lemoine at camptocamp.com Mon May 10 01:49:47 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] doing a search with a buffer In-Reply-To: <1273414644678-5026652.post@n2.nabble.com> References: <1273414644678-5026652.post@n2.nabble.com> Message-ID: On Sunday, May 9, 2010, sunny74 wrote: > > Hi Friends, > > I want to do a search with a buffer. > My scenario is like this. > I get a structure Id from the user and using that I get the geometry of that > structure from the postgres DB. > Now I want to do a search of all structures within a radius of say 100km > from the structure selected by the user. > Is there any postgres function which will give the geometry of all features > lying within a certain radius of a feature.. > > Has anybody done something like this before?If yes pls share as to how you > have done it? Hi. We do that in MapFish using the && operator, and the expand and distance functions. See [*]. Hope it can help. [*] -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Mon May 10 02:24:31 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Multiple click control stopClick precedence/order In-Reply-To: References: Message-ID: On Wednesday, May 5, 2010, Matthew Williamson wrote: > Hello list, > I'm trying to set up a vector layer to respond to click events, and also have a map-level click handler that gets fired if the click was not on one of my features. I'm doing this with two controls, one with a OpenLayers.Handler.Feature and one with a OpenLayers.Handler.Click. > > This is what puzzles me: > In my first attempt:?The feature click control is added first, and its stopSingle value is true.?The map click control is added last, and its stopSingle value is false. When I click on a feature, the handler for the feature click control fires first (this makes sense), and then the map click control fires (this didn't make sense to me). The handler that is activated last should be triggered first. > > Then, I tried setting stopSingle = true on the map click control as well. This stopped the feature click control from firing at all! This makes sense to me. > So, I conclude that--even though the map click control was added last, AND executes last, the stopSingle value on the map click handler is evaluated first?? Why is this? How can I ensure that the feature click handler control is able to stop the propagation to the map click handler, preferably regardless of the order in which they are added to the map? AFAICT you need to activate the feature handler last. You also need to set stopClick to true in this handler. And you may also need to set stopDown and stopUp to true in this handler. > > To eliminate some confusion: yes, I know about the SelectFeature control. So far as I can tell, I can't use that--my features are points with large, mostly transparent icons that tend to overlap and cover the whole map (in which case SelectFeature intercepts mousedowns on the whole icon and makes drag-panning impossible), therefore I only want to respond to clicks near the center (canceling propagation in that case). If someone can tell me how to make that work with SelectFeature, I'd be glad to use that instead. You could possibly use two point features, with one dedicated to feature selection. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From slawomir.messner at staff.uni-marburg.de Mon May 10 02:36:19 2010 From: slawomir.messner at staff.uni-marburg.de (Slawomir Messner) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Points in KML Format (KML mime type in IIS7) In-Reply-To: <000c01caee09$9525f6d0$bf71e470$@com> References: <1273199676796-5017563.post@n2.nabble.com> <1273200888004-5017601.post@n2.nabble.com> <1273201330567-5017611.post@n2.nabble.com> <4BE3CB64.6030205@staff.uni-marburg.de> <000c01caee09$9525f6d0$bf71e470$@com> Message-ID: <4BE7A963.3010103@staff.uni-marburg.de> Hi, thanks for the link Carlos. I checked my files and the result is now "Errors = 0 Recommendations = 0 Suggestions = 0 The KML file is valid and complies with best practices.", but the points are not drawn in OL, except I add the lines from the first mail into the OpenLayers.Format.KML. Is it possible to add it generally to the OpenLayer.Format.KML that the radius of point is default 6 or should we make an own solution by edit the file on every update? It's a similar behaviour like Google Earth whitch has also an default pin for points, but in openlayers it's default the default Point (circle with default radius of 6). Regards Slawomir Am 07.05.2010 19:20, schrieb Marjie Anderson: > > Thank you so much for that link! > > I did not need it to validate my kml file, but when I typed in my kml > URL and got a 404-not found, that told me my proxy was not why I was > getting a 404-not found error in my application. That helped me to > track down the error to kml mime type not enabled in IIS7 (windows > hosting.) While my host (GoDaddy) does not allow me to directly add > mime types to IIS7, it can be done in the web.config file in my app > directory as so: > > > > > > > > mimeType=?application/vnd.google-earth.kml+xml?/> > > > > > > > > Marjie > > *From:* users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] *On Behalf Of *Carlos Montalvillo > *Sent:* Friday, May 07, 2010 4:33 AM > *To:* Slawomir Messner > *Cc:* users@openlayers.org > *Subject:* Re: [OpenLayers-Users] Points in KML Format > > Dear Slawomir, > Try to use "http://kmlvalidator.com/" in order to "strong" validate > your kml file. > Hope this help. > Regards, > Carlos > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- ----------------------------------------------- Slawomir Messner Forschungszentrum "Deutscher Sprachatlas" 06421-28-24981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100510/fba14758/attachment.html From grant.massan at gmail.com Mon May 10 03:38:21 2010 From: grant.massan at gmail.com (Grant Masan) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] Wms authentication problem. Message-ID: Hi all, I am using normal wms layer request like: mapThis = new OpenLayers.Layer.WMS("Basemap", " https://username:password@www.kartta.fi/image", {layers: 'perus', singleTile: true, srs: 'EPSG:4326', format: 'image/png', styles: ['style_1'], transparent: false }, {isBaseLayer: true}); My problem is that this authentication " username:password@www.kartta.fi/image" is not working how I would like. It is still asking everytime username/password when I reload map or when I remove map. (Browsers box that asks username/password) So I am asking that what is right way to handle this wms authentication ? Br. Grant -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100510/d1f2807d/attachment.html From cgalpin at lhsw.com Mon May 10 13:18:57 2010 From: cgalpin at lhsw.com (Charles Galpin) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] ModifyFeature with SelectFeature hover/highlight type capability Message-ID: Hi all. I'm new to the list (as well as openlayers) and have some hopefully rudimentary questions. First, can someone explain or point to an example that shows how to extend ModifyFeature to visually select features as you mouse over them like you can with the SelectFeature? What I want to do is visually highlight them as I mouse over them (as well as display some detail about them in a layer) but not actually select them (ie put into edit mode) until I click on them. Once they are truly selected I want them to stay highlighted while being edited/moved (I am working with points). I have tried setting hover = true for the ModifyFeature, as well as create my own SelectFeature and set the modifyFeature.selectControl to it but when I do that, the ModifyFeature behaves like a SelectFeature only. thanks, charles From joanne.mcgraw at SYMPATICO.CA Mon May 10 14:02:17 2010 From: joanne.mcgraw at SYMPATICO.CA (myOpenLayersUName) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] OpenLayers.Format.WMC.v1 in 2.8 vs. 2.9 Message-ID: <1273514537091-5032030.post@n2.nabble.com> There seems to be some pretty significant differences between the hierarchy of the context that is returned after the read_wmc_Layer function is run in OpenLayers 2.8 vs. 2.9. In 2.8, there is actually a layer created with params and options attached. In 2.9, there seems to be only an associative array added to a "layersContext" object that doesn't have a layer in it at all. Can someone point me to some documentation that discusses the changes between the two versions? Perhaps a mapping chart to tell me where I will find the pieces of information imported now? For example, in 2.8, a lot of the layer's Server information was placed in the params object under layerInfo. In our code, we needed used the Server's title attribute from our WMCs as well, and extended the Format read to read that title attribute and append it to the layerInfo.params object as well. Now, it's looking like I'm just appending title to the layerContext object and I'm uncertain what other things are found in that object. Is the layer's title already in there? Also, how does the layer itself get created now if the Format read isn't doing so? Basically, 2.9 appears so completely different from 2.8, I can't get it to work for our application anymore and am facing a pretty significant re-write to adjust. The fact that I can't find anything in any documentation (release notes even) that mentions that it is happening is a little frightening. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Format-WMC-v1-in-2-8-vs-2-9-tp5032030p5032030.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Mon May 10 14:33:04 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] OpenLayers.Format.WMC.v1 in 2.8 vs. 2.9 In-Reply-To: <1273514537091-5032030.post@n2.nabble.com> References: <1273514537091-5032030.post@n2.nabble.com> Message-ID: <2E29AF09-8C48-4E66-AF34-E8B0657C5C7A@osgis.nl> Hi, most of the changes are descirbed here, http://trac.openlayers.org/ticket/2251 however there should not be any *API* changes, but it seems your usage was the internal structures and not the API right? Best regards, Bart On May 10, 2010, at 8:02 PM, myOpenLayersUName wrote: > > There seems to be some pretty significant differences between the hierarchy > of the context that is returned after the read_wmc_Layer function is run in > OpenLayers 2.8 vs. 2.9. > > In 2.8, there is actually a layer created with params and options attached. > In 2.9, there seems to be only an associative array added to a > "layersContext" object that doesn't have a layer in it at all. > > Can someone point me to some documentation that discusses the changes > between the two versions? Perhaps a mapping chart to tell me where I will > find the pieces of information imported now? For example, in 2.8, a lot of > the layer's Server information was placed in the params object under > layerInfo. In our code, we needed used the Server's title attribute from our > WMCs as well, and extended the Format read to read that title attribute and > append it to the layerInfo.params object as well. Now, it's looking like I'm > just appending title to the layerContext object and I'm uncertain what other > things are found in that object. Is the layer's title already in there? > > Also, how does the layer itself get created now if the Format read isn't > doing so? > > Basically, 2.9 appears so completely different from 2.8, I can't get it to > work for our application anymore and am facing a pretty significant re-write > to adjust. The fact that I can't find anything in any documentation (release > notes even) that mentions that it is happening is a little frightening. > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Format-WMC-v1-in-2-8-vs-2-9-tp5032030p5032030.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From joanne.mcgraw at SYMPATICO.CA Mon May 10 14:46:06 2010 From: joanne.mcgraw at SYMPATICO.CA (myOpenLayersUName) Date: Wed Sep 1 17:18:48 2010 Subject: [OpenLayers-Users] OpenLayers.Format.WMC.v1 in 2.8 vs. 2.9 In-Reply-To: <2E29AF09-8C48-4E66-AF34-E8B0657C5C7A@osgis.nl> References: <1273514537091-5032030.post@n2.nabble.com> <2E29AF09-8C48-4E66-AF34-E8B0657C5C7A@osgis.nl> Message-ID: <1273517166045-5032256.post@n2.nabble.com> Yes, that's correct. Thanks for the reference to the documentation; I'll have a look. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Format-WMC-v1-in-2-8-vs-2-9-tp5032030p5032256.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Mon May 10 15:09:27 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] ModifyFeature with SelectFeature hover/highlight type capability In-Reply-To: References: Message-ID: <4BE859E7.90702@mapgears.com> Hi Charles, You could achieve what you want be creating a SelectFeature control with highlightOnly:true for "highlight and display info" and a standard ModifyFeature control for the second one. By registering "featurehighlighted" on the first control should allow the display of the hovered feature info. The following example should be of great help : http://www.openlayers.org/dev/examples/highlight-feature.html You could toggle on/off the highlight control when editing, but that's up you. Regards, Alexandre Charles Galpin wrote: > Hi all. I'm new to the list (as well as openlayers) and have some hopefully rudimentary questions. > > First, can someone explain or point to an example that shows how to extend ModifyFeature to visually select features as you mouse over them like you can with the SelectFeature? What I want to do is visually highlight them as I mouse over them (as well as display some detail about them in a layer) but not actually select them (ie put into edit mode) until I click on them. Once they are truly selected I want them to stay highlighted while being edited/moved (I am working with points). > > I have tried setting hover = true for the ModifyFeature, as well as create my own SelectFeature and set the modifyFeature.selectControl to it but when I do that, the ModifyFeature behaves like a SelectFeature only. > > thanks, > charles > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From tolpxob at googlemail.com Mon May 10 15:14:53 2010 From: tolpxob at googlemail.com (boxplot) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Nodelist Info / GetFeatureInfo not working In-Reply-To: <4BE731FC.6040706@rdewit.net> References: <9D99985C-4EA0-40EC-AA5F-793BE11DF1CB@googlemail.com> <4BE5EE4B.9010503@rdewit.net> <4BE731FC.6040706@rdewit.net> Message-ID: <59E398E4-86B7-4E0A-9AE6-5870D6E0FA09@googlemail.com> Hi Roald, I made a complete new setup and found out that the enconding of one file was not the right one. Now I can use the GS example anywhere on my site and it works. But when I try to copy the code in my index.html it's not working anymore (the map is loading but after a click there is no request). So here is my code: index.html > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > > > Map > > > > > > > > > > > >
> >
> >
>
> >
> Click on the map to get feature info >
>
> > Karte2.js > function init(){ > > var options = { > controls: [], > }; > > var map = new OpenLayers.Map('map', options); > > var gphy = new OpenLayers.Layer.Google( > "Google Physical", > {type: G_PHYSICAL_MAP} > ); > var gmap = new OpenLayers.Layer.Google( > "Google Streets", > {numZoomLevels: 20} > ); > var ghyb = new OpenLayers.Layer.Google( > "Google Hybrid", > {type: G_HYBRID_MAP, numZoomLevels: 20} > ); > var satellite = new OpenLayers.Layer.Google( > "Google Satellite", > {type: G_SATELLITE_MAP} > ); > var wms = new OpenLayers.Layer.WMS( > "My Map", > "http://myownhomepage.xyz/geoserver/wms", > { > srs: 'EPSG:4326', > layers: 'Map2:Layer', > transparent: 'TRUE' > }, > { > 'reproject': true > } > ); > > map.addLayers([satellite, wms, gphy, gmap, ghyb]); > map.setCenter(new OpenLayers.LonLat(12.5000,47.5000), 15); > > map.addControl(new OpenLayers.Control.LayerSwitcher() ); > map.addControl(new OpenLayers.Control.Navigation()); > map.addControl(new OpenLayers.Control.MousePosition({element: $('location')})); > map.addControl(new OpenLayers.Control.Permalink('permalink')); > map.addControl(new OpenLayers.Control.PanZoomBar({ > position: new OpenLayers.Pixel(2, 15) > })); > > map.events.register('click', map, function (e) { > document.getElementById('nodelist').innerHTML = "Loading... please wait..."; > var params = { > REQUEST: "GetFeatureInfo", > EXCEPTIONS: "application/vnd.ogc.se_xml", > BBOX: map.getExtent().toBBOX(), > X: e.xy.x, > Y: e.xy.y, > INFO_FORMAT: 'text/html', > QUERY_LAYERS: map.layers[0].params.LAYERS, > FEATURE_COUNT: 50, > Srs: 'EPSG:4326', > Layers: 'Map2:Layer', > Styles: '', > WIDTH: map.size.w, > HEIGHT: map.size.h, > format: format}; > OpenLayers.loadURL("http://myownhomepage.xyz/geoserver/wms", params, this, setHTML, setHTML); > OpenLayers.Event.stop(e); > }); > } > function setHTML(response){ > document.getElementById('nodelist').innerHTML = response.responseText; > }; It is strange now but there is no request in Firebug. When I click on the map the text switches to "Loading please wait" and that's it. Maybe the problem is because of the different layers? Thank you very much for your help! Pascal Am 10.05.2010 um 00:06 schrieb Roald de Wit: > Hi Pascal, > > You should pretty much always get at least *something* back: either an error or an empty reponse (FireBug would tell you). Have you really got ":80" in your settings like below? > > OpenLayers.loadURL("http://myownhomepage.xyz:80/geoserver/wms", params, this, setHTML, setHTML); > > If your Tomcat runs on port 80 then you can leave out the port number. That might do the trick (and yes, it would then have been a proxy issue). Like this: > > OpenLayers.loadURL("http://myownhomepage.xyz/geoserver/wms ", params, this, setHTML, setHTML); > > And since your OL is on the same server as your GS, you could even do this: > > OpenLayers.loadURL("/geoserver/wms ", params, this, setHTML, setHTML); > > And to deal with errors in your AJAX request, why not use a separate function like this: > > OpenLayers.loadURL("/geoserver/wms ", params, this, setHTML, *onAjaxError*); > > Regards, Roald > > On 10/05/10 05:45, boxplot wrote: >> Hi, >> >> maybe a made a small progress. As I have written in my last mail I get no response when using GetFeatureInfo (I do get a response when using the GeoServer OpenLayers example which I can access through "Layer Preview" => see code below). So I copied both requests directly into my browser and both got a response: >> >>> http://myownhomepage.xyz/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=12.327023%2C47.673%2C12.362977%2C47.777&X=79&Y=375&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=Workspace%3ALayer&FEATURE_COUNT=50&Srs=EPSG%3A4326&Layers=Workspace%3ALayer&Styles=&WIDTH=177&HEIGHT=512&format=image%2Fpng >> >> GeoServer runs as a .war within Tomcat and OpenLayers is on the same server. I really can't believe why the same code with the same request on the same server is once getting a response and the other time it is not. Is there a possibility that it is a proxy-issue or maybe a problem with the encoding? >> >> Thanks, Pascal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100510/6feff6a7/attachment.html From eric.lemoine at camptocamp.com Mon May 10 15:33:20 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Documentation of apparent functionality duplication? In-Reply-To: References: Message-ID: On Tuesday, May 4, 2010, Mike Purvis wrote: > Hi again, > I'm confused at a number of points where OpenLayers seems to contain multiple possible ways of doing the same thing. For example, what is a Geometry.Point? A geometry represents a shape that can be drawn in a vector layer. > Is it closer in spirit to a LonLat or a Pixel? A lonlat, as a lonlat and a point both represent a geographic location. A lonlat isn't a shape and cannot be drawn. A pixel represents a position in the map div, its x and y values are expressed in pixels. A Map object exposes method for converting a pixel to a lonlat and vice-versa. >Why does its constructor take x and y rather than a LonLat or Pixel? OpenLayers could indeed include a Geometry.Point.fromLonlat conveniene function or something, but it currently doesn't have such a function. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Mon May 10 15:42:08 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] KML layer doesn't display in OL. In-Reply-To: <1272786554619-4992338.post@n2.nabble.com> References: <1272786554619-4992338.post@n2.nabble.com> Message-ID: On Sunday, May 2, 2010, Zuhex wrote: > > hello > > I am new for Openlayer and GeoServer.I was created KML file from ArcGIS by > converted shapefile to KMZ. So I extracted KMZ file and then I got one image > and one KML file. I put them together into my KML folder. > Here this is my code > > ################################################## > >

Click Event Example with Custom Marker

This example shows the use of the click handler and getLonLatFromViewPortPx functions to trigger events on mouse click.It also shows how to add a custom marker with custom Icon



------------------------------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100512/3d3b7d7f/attachment.html From jimmy.aumard at gmail.com Wed May 12 11:54:23 2010 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] OL and browser cache Message-ID: Hi everyone, I want to know if it's possible to control what is caching by the browser. It's possible to free cache (memory) of OL ? Because when I use for a long time my application firefox take 600 000 KO of memory Thanks -- Aumard Jimmy D?veloppeur KINAXIA c/o CICA / PacaEst 2229 Route des Cr?tes F-06560 Sophia Antipolis T?l.: +33 (0)4 8973 0242 Mob.: +33 (0)6 6017 2827 Fax : +33 (0)4 8307 6583 http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100512/aef2349d/attachment.html From michael.heigl at yahoo.de Wed May 12 13:32:32 2010 From: michael.heigl at yahoo.de (Michael Heigl) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Custom TMS layer shifted to the north Message-ID: <182003.8086.qm@web23001.mail.ird.yahoo.com> Hi together, I've set up a small test page to integrate a custom TMS Layer into OpenLayers. The tiles are displayed correctly but when I place a marker on the map it is placed north of the real position. Example: http://www.uecmoedling.at/maptest.html Mapnik layer is shown by default: shows the correct position when switching the layer you get to a position which is exactly to the north of the real position Maybe anyone can give me an hint which parameters I need to adjust to fix this shifting? I tried to modifiy the north/south bounds but this resulted in the marker changing position depending on the zoom level. I got the following information from the people how manage the tile server but I don't know exactly what to do with these infos to make it work in OpenLayers: The number of grids at a given zoom level is: gridWidth = 2^zoomlevel The (earth) radius for the Mercator map projection is calculated as radius = (gridWidth * tileSize) / (2.0 * PI) where tileSize=256. The x and y grid indexes are given by the calculated Mercator coordinate divided by the tile size: xGrid = xCoordinate / tileSize yGrid = yCoordinate / tileSize Mercator coordinates will range from 0 through (gridWidth * tileSize). The origin for the grid coordinates is at 180? W (false easting = radius * PI), and approx 85? N (false northing = -radius * PI), with x increasing toward the East and y toward the South. The scale (mpp) is determined by scale = radius * 2.0 * PI / (gridWidth * tileSize) Other customers use an inverse flattening value of 298.257223563; so the projection is actually Mercator-ellipsoidal. Thanks very much, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100512/b597ef76/attachment.html From eric.lemoine at camptocamp.com Wed May 12 16:07:00 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WMS layer redraw problem In-Reply-To: <4BEAA0AE.1040506@gis3w.it> References: <4BEAA0AE.1040506@gis3w.it> Message-ID: On Wed, May 12, 2010 at 1:35 PM, Walter Lorenzetti wrote: > Hi all, > > I build a webgis editing ?application with OL 2.8, all work fine, but > I've a problem with redraw wms layer background: > > In my application I edit several layers during the editing mode... but > on simple watching mode I show that layers like wms layer (by > mapserver...)... after a layer editing action I invoke a > wms_layer.redraw(true) method... but ?I think for browser cache, the > layer is redraw... but single tile doesn't change ad so for to see the > changes I've to pan the map until the layers wms are redraw.... > > I hope you could understand my problem... Hi. redraw(true) is supposed to do the job. Could you please post a simple example demonstrating the problem? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ngerber999 at gmail.com Wed May 12 16:26:20 2010 From: ngerber999 at gmail.com (Nathan Gerber) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WMS layer redraw problem In-Reply-To: References: <4BEAA0AE.1040506@gis3w.it> Message-ID: I have found that the most reliable way to avoid browser caching when I want to force a redraw of a WMS layer is to do something like this: wms_layer.mergeNewParams({'timestamp':datetime}); If you append the current timestamp to the layer each time you want to do a redraw it will have a unique address and thus bypass browser caching. If you do this you will not need to utilize the OpenLayers redraw function. -- Nathan Gerber On Wed, May 12, 2010 at 4:07 PM, Eric Lemoine wrote: > On Wed, May 12, 2010 at 1:35 PM, Walter Lorenzetti > wrote: > > Hi all, > > > > I build a webgis editing application with OL 2.8, all work fine, but > > I've a problem with redraw wms layer background: > > > > In my application I edit several layers during the editing mode... but > > on simple watching mode I show that layers like wms layer (by > > mapserver...)... after a layer editing action I invoke a > > wms_layer.redraw(true) method... but I think for browser cache, the > > layer is redraw... but single tile doesn't change ad so for to see the > > changes I've to pan the map until the layers wms are redraw.... > > > > I hope you could understand my problem... > > > Hi. redraw(true) is supposed to do the job. Could you please post a > simple example demonstrating the problem? > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100512/acd99695/attachment.html From emmexx at tiscalinet.it Wed May 12 16:30:31 2010 From: emmexx at tiscalinet.it (emmexx) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Fwd: Re: Popup over GPX track In-Reply-To: <4BEA645F.1010509@tiscali.it> References: <4BEA645F.1010509@tiscali.it> Message-ID: <4BEB0FE7.1010703@tiscalinet.it> Il 12/05/2010 10:18, Francesco scrisse: > Hi, > in feature.attributes I have an empty object. You should "tell" OL to extract the attributes. There's a parameter to set, see my example code. >One more problem is > how could i find the LonLat of the selected feature? In my code it is: f.feature.geometry.getBounds().getCenterLonLat() bye maxx From mike at uwmike.com Wed May 12 17:23:52 2010 From: mike at uwmike.com (Mike Purvis) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Center of rotation for vector features In-Reply-To: <8988E51F-3F20-42F9-9ADF-1A0ED26D76BB@opengeo.org> References: <8988E51F-3F20-42F9-9ADF-1A0ED26D76BB@opengeo.org> Message-ID: Related question? Say that I have multiple objects that I'd like to be able to rotate independently of each other. It seems like the tool for the job is the substitution engine found in OpenLayers.Style. Currently, I'm just setting the symbolizer directly on each of my features, so my question is, is it possible to take advantage of OpenLayers.Style without having to deal with the complication and complexity of OpenLayers.StyleMap? I attempted to wrap my style hashes in the OpenLayers.Style class and then pass them into the Feature constructor as before, but it didn't display anything at all. As an alternative, I could just create a per-Feature clone of the style hash ("symbolizer"), and inject my rotation parameter directly into each one, but this seem inelegant. What would be the best course of action? On Wed, May 12, 2010 at 3:23 AM, Andreas Hocevar wrote: > This sounds like an issue we had in OpenLayers 2.9, but was fixed in 2.9.1. > Make sure you are using the latest version. > > Regards, > Andreas. > > On May 12, 2010, at 02:16 , Mike Purvis wrote: > > > Hey, > > > > I'm having an issue with specifying rotation for one of my features. It's > a point feature with a externalGraphic specified, and the center of rotation > of the feature seems to be initially set to the feature's own Point. > > > > However, when I programmatically move the feature, the center of rotation > doesn't move with it, and the feature's rotation against an external center > causes it to be way off-position. > > > > I've tried implementing the move both by updating the x and y fields > directly in the Point object itself, and also by using the Feature.move > function. Neither has the desired effect?using the Web Inspector, I can > clearly see the SVG element and the rotation is being specified in (angle, > cx, cy) form. > > > > As a last resort, I'm willing to use external JavaScript to find the > element and manually insert the rotation which I require, but is there some > way to do it "properly" using OpenLayers' own rotation stylings? > > > > Thanks, > > > > Mike > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > -- http://uwmike.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100512/996e227d/attachment.html From sasha.milenkovic at gmail.com Thu May 13 03:49:21 2010 From: sasha.milenkovic at gmail.com (sasamil) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] List features in WMS Message-ID: <1273736961668-5045091.post@n2.nabble.com> Hello friends! How can one list all the features (for example, road-lines with the attributes) in a wms layer? It is easy (more or less) to perform it in wfs; but, how can we do that in wms? (GetFeatureInfo returns information about features located on the clicked point but it doesn't answer to my wishes. I need ALL the features in a layer) Regards! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/List-features-in-WMS-tp5045091p5045091.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dalda at ikt.es Thu May 13 03:59:08 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Toolbar icons IE6 transparency problem Message-ID: <224DBDAF88A6AC47BD22432815351BE007F1FEDD@nekaposta1> Hello, How can I make the icons of my toolbar to be transparent?? I've try modifying my css adding "filter: alpha(opacity=0);" but they disappear form the toolpanel. See attached image. Any ideas? TIA. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? -------------- next part -------------- A non-text attachment was scrubbed... Name: sample.GIF Type: image/gif Size: 9900 bytes Desc: sample.GIF Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100513/ce400b1d/sample.gif From eric.lemoine at camptocamp.com Thu May 13 04:17:31 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WMS layer redraw problem In-Reply-To: References: <4BEAA0AE.1040506@gis3w.it> Message-ID: On Wednesday, May 12, 2010, Nathan Gerber wrote: > I have found that the most reliable way to avoid browser caching when I want to force a redraw of a WMS layer is to do something like this: > wms_layer.mergeNewParams({'timestamp':datetime}); > > If you append the current timestamp to the layer each time you want to do a redraw it will have a unique address and thus bypass browser caching. If you do this you will not need to utilize the OpenLayers redraw function. redraw(true) calls mergeNewParams but uses Math.random instead of datetime. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From dalda at ikt.es Thu May 13 05:31:22 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Toolbar icons IE6 transparency problem [SOLVED] Message-ID: <224DBDAF88A6AC47BD22432815351BE007F1FF89@nekaposta1> Ok, my mistake. Just when I sent the email I figured out what could be the problem. The problem was that the icons were in png 24bit format, so I've changed them to png 8bit format and now is working. Regards. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de David Alda Fernandez de Lezea Enviado el: jueves, 13 de mayo de 2010 9:59 Para: users@openlayers.org Asunto: [OpenLayers-Users] Toolbar icons IE6 transparency problem Hello, How can I make the icons of my toolbar to be transparent?? I've try modifying my css adding "filter: alpha(opacity=0);" but they disappear form the toolpanel. See attached image. Any ideas? TIA. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? From arnd.wippermann at web.de Thu May 13 07:58:13 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] List features in WMS In-Reply-To: <1273736961668-5045091.post@n2.nabble.com> Message-ID: Hi, That's not the intention of WMS. WMS does not allow to request all features from a server. If the serverside wants to deliver all the data, then they have to setup a wfs. Or if it's your own server and you use MapServer, then it could be possible with a MapServer CGI-request. Regards, Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von sasamil Gesendet: Donnerstag, 13. Mai 2010 09:49 An: users@openlayers.org Betreff: [OpenLayers-Users] List features in WMS Hello friends! How can one list all the features (for example, road-lines with the attributes) in a wms layer? It is easy (more or less) to perform it in wfs; but, how can we do that in wms? (GetFeatureInfo returns information about features located on the clicked point but it doesn't answer to my wishes. I need ALL the features in a layer) Regards! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/List-features-in-WMS-tp5045091p504509 1.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From andy at centremaps.co.uk Thu May 13 08:19:13 2010 From: andy at centremaps.co.uk (AndyT) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] rectangle - resize from one corner whilst opposite is fixed Message-ID: <1273753153781-5045810.post@n2.nabble.com> Hi, Hopefully i didn't miss this one elsewhere in the forums.... At the moment our resizing of a rectangle means that if i drag one corner outwards then the opposite corner moves out in the other direction. For practical purposes, it would be good (as an example) to move my rectangle so the top left corner is where i want it and i can drag the bottom right to the overall coverage i need. At the moment, to do this i would get the box so the top left is close, drag out the bottom right, move so top left closer again and do this as a loop until i had the rectangle close enough. What would be even better is to be able to drag any of the four corners whilst the opposite corner stays fixed. Anyone done this before? Apologies again if i'm missing the obvious Thanks Andy -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/rectangle-resize-from-one-corner-whilst-opposite-is-fixed-tp5045810p5045810.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stuart.jones at jacobs.com Thu May 13 11:16:47 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WFS using OpenLayers.Layer.Vector() fails to render Message-ID: <1273763807000-5046572.post@n2.nabble.com> Dear all I am trying to render a vector layer from Geoserver using the WFS protocol onto my British National Grid (EPSG:27700) map as follows: var wfslayer = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://d2.elgin.gov.uk/geoserver.2/wfs", featureType: "NSG_STREET_PUBLIC", featureNS: "http://www.elgin.gov.uk/", featurePrefix: "e", geometryName: "GEOM" }) }); map.addLayer(wfslayer); But it's not rendering. In Firebug, I see that the XML response looks good. In fact, if I save the XML and add it to the map as a GML layer as follows, it renders perfectly: var gmllayer = new OpenLayers.Layer.GML("GML", "nsg_street_public.xml") map.addLayer(gmllayer); Does anyone have any ideas what I'm missing here? Thanks, in advance, Stuart -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-using-OpenLayers-Layer-Vector-fails-to-render-tp5046572p5046572.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stuart.jones at jacobs.com Thu May 13 11:57:17 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WFS using OpenLayers.Layer.Vector() fails to render In-Reply-To: <1273763807000-5046572.post@n2.nabble.com> References: <1273763807000-5046572.post@n2.nabble.com> Message-ID: <1273766237457-5046770.post@n2.nabble.com> BTW, when I save the response GML to file, I have to remove the XML declaration to make it load with OpenLayers.Layer.GML(). -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-using-OpenLayers-Layer-Vector-fails-to-render-tp5046572p5046770.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From robhyx at gmail.com Thu May 13 12:04:08 2010 From: robhyx at gmail.com (Robert Hicks) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Style issue with LayerSwitcher Message-ID: Hi all, I am having a problem with the CSS styles on my html page in which the OpenLayers map is in. Basically our graphic designer made a run that all text in the div, p and body tags are to be black and obviously the LayerSwitcher is inheriting that rule. No matter what I do I cannot override it. This is what I added to the CSS: div.olControlLayerSwitcher { width: 250px; color:#ffffff; } And nothing. I can see in Firebug that this piece of code is in fact overriding it: body, p, div { font-family: "Helvetica Neue", 'Helvetica', sans-serif; font-size: 14px; line-height:20px; color:#000000; } Anything I am doing wrong or could try? THANKS! -- web http://www.hyxspace.com aim hyx1138 From stuart.jones at jacobs.com Thu May 13 12:37:38 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WFS using OpenLayers.Layer.Vector() fails to render In-Reply-To: <1273766237457-5046770.post@n2.nabble.com> References: <1273763807000-5046572.post@n2.nabble.com> <1273766237457-5046770.post@n2.nabble.com> Message-ID: <1273768658127-5046964.post@n2.nabble.com> OK. I have managed to render my data using OpenLayers.Layer.WFS() but according to [1] this is deprecated, so I'd really appreciate any hints to get the Vector() route working. var wfslayer = new OpenLayers.Layer.WFS("WFS", "http://d2.elgin.gov.uk/geoserver.3/wfs", { typeName: "e:NSG_STREET_PUBLIC" }, { typename: "NSG_STREET_PUBLIC", featureNS: "http://www.elgin.gov.uk/", extractAttributes: true, srsName: "EPSG:27700" } ); map.addLayer(wfslayer); [1] http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/WFS-js.html Thanks Stuart -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-using-OpenLayers-Layer-Vector-fails-to-render-tp5046572p5046964.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ilya at drakontas.com Thu May 13 23:32:04 2010 From: ilya at drakontas.com (Ilya Braude) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to Use selectControl and dragFeature control at the same time? In-Reply-To: References: Message-ID: <4BECC434.7030002@drakontas.com> Try to set the following on the drag control: dragFeature.handlers['drag'].stopDown = false; dragFeature.handlers['drag'].stopUp = false; dragFeature.handlers['drag'].stopClick = false; dragFeature.handlers['feature'].stopDown = false; dragFeature.handlers['feature'].stopUp = false; dragFeature.handlers['feature'].stopClick = false; -- Ilya Subhani Minhas wrote: > Hello All, i am working to achieve following, > 1. Click to add a vector feature with custom icon and label at the > point of click (Completed) > 2. Click to select any drawn feature and delete it (Completed) > 3. Click to select any drawn feature and Modify it. ( By deleting and > re-creating the a new feature at the same place with new icon and > label) (Completed) > the code is posted below. Now the only problem i am facing it is as > follows: > > When ever i activate the dragFeature control, the icons (Vector > features) become drag-able, but i cannot select them any more. My > desired functionality is heavily dependent on the select feature, as > only after selection i can modify and delete the features. How can i > work around this problem? Any suggestions are welcome. > > Also, is it a good practice to Edit a feature as in point 3? , is > there a better way? > > Thanks in advance. > > --------------------------------My Code is as > follows------------------------------------- > > > OpenLayers Click Event Example > > type="text/css" /> > > > > > >

Click Event Example with Custom Marker

>
>
>

> This example shows the use of the click handler and > getLonLatFromViewPortPx functions to trigger events on mouse click.It > also shows how to add a custom marker with custom Icon >

>
> >
> > maxlength="5" > name="Marker Label" value="label" > onchange="update()" /> > > > >
>
>
>
> > > ------------------------------------------------------------------------------------------------------------------------ > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From lorenzetti at gis3w.it Fri May 14 02:23:53 2010 From: lorenzetti at gis3w.it (Walter Lorenzetti) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WMS layer redraw problem [FIXED] In-Reply-To: References: <4BEAA0AE.1040506@gis3w.it> Message-ID: <4BECEC79.4000309@gis3w.it> Eric Lemoine ha scritto: > On Wednesday, May 12, 2010, Nathan Gerber wrote: > >> I have found that the most reliable way to avoid browser caching when I want to force a redraw of a WMS layer is to do something like this: >> wms_layer.mergeNewParams({'timestamp':datetime}); >> >> If you append the current timestamp to the layer each time you want to do a redraw it will have a unique address and thus bypass browser caching. If you do this you will not need to utilize the OpenLayers redraw function. >> > > redraw(true) calls mergeNewParams but uses Math.random instead of datetime. > > > Thank Eric and Nathan, I found the solution... It was a my mistake: when I save the new/modified/deleted feature vector I send the informations by several ajax calls, but in a stupid manner I did it by async mode... so the layer refresh at the end of all calls something happened before database data saved!! Sorry for my post... and thanks a lot!! Regards Walter -- Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0588 85021 Viale Giuseppe Verdi n. 24, 51016 Montecatini Terme,Pistoia P.IVA 01686280478 Italy From ahocevar at opengeo.org Fri May 14 04:22:42 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] OL and browser cache In-Reply-To: References: Message-ID: Hi, On May 12, 2010, at 17:54 , Jimmy Aumard wrote: > Hi everyone, > > I want to know if it's possible to control what is caching by the browser. > It's possible to free cache (memory) of OL ? Because when I use for a long time my application firefox take 600 000 KO of memory This can be caused by memory leaks. But in most cases it is just because a debugger (e.g. Firebug) is active when running the application. You should run your application without a debugger active, and if the memory footprint still increases, it is likely because of memory leaks (which can be in your application, but also OpenLayers is known to have some). Regards, Andreas. > > Thanks > > -- > Aumard Jimmy > D?veloppeur > > KINAXIA > c/o CICA / PacaEst > 2229 Route des Cr?tes > F-06560 Sophia Antipolis > > T?l.: +33 (0)4 8973 0242 > Mob.: +33 (0)6 6017 2827 > Fax : +33 (0)4 8307 6583 > > http://www.kinaxia.fr > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ravikrishna at qburst.com Fri May 14 04:45:29 2010 From: ravikrishna at qburst.com (Ravikrishna Nair) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] New join Message-ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100514/a6e6ab12/attachment.html From eric.lemoine at camptocamp.com Fri May 14 05:01:22 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] OL and browser cache In-Reply-To: References: Message-ID: On Fri, May 14, 2010 at 9:22 AM, Andreas Hocevar wrote: > [...] (which can be in your application, but also OpenLayers is known to have some). Even in FireFox? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From list at rdewit.net Fri May 14 05:07:43 2010 From: list at rdewit.net (Roald de Wit) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] doing a search with a buffer In-Reply-To: <1273605040402-5037730.post@n2.nabble.com> References: <1273414644678-5026652.post@n2.nabble.com> <4BE75F94.7020002@rdewit.net> <1273605040402-5037730.post@n2.nabble.com> Message-ID: <4BED12DF.6090701@rdewit.net> Hi, What you want is more difficult than I realised. If you can retrieve the geometry of the feature you are interested in, you could use that in your filter (instead of the point). Have a look at the getfeature-wfs example on how to do that [1]. If you cannot retrieve your geometry it's going to be harder. I don't know if you can tell your WFS server to use the geometry of a certain feature for your spatial operator (like: give me all features from layer X within a buffer around this feature from layer Y (or are all features in the same layer?)). Maybe somebody else can shed a light on whether this is possible? I'm sure you could do it with a WPS server, but that adds extra complexity. Regards, Roald [1] http://www.openlayers.org/dev/examples/getfeature-wfs.html On 12/05/10 05:10, sunny74 wrote: > Hi Roald, > > Thanks for your reply. > If I have the center point of the selected region then your code will do the > rest. > But the problem is that when the box is drawn using the GEtFeature control > it is not possible to get center point of the selected region or the bounds > of the selected region. > If either of these were available then it would have been possible to draw a > layer over the selected region.(this is wrt 'drawing a polygon over selected > region'). > > w .r.t this post I have a structure ID using which I can get the geometry > from the postgres table.Since I get this geometry on the server side I need > to get the other geometries and their attributes on the server side as well. > > I am not sure how get feature can help me when my selected geometry is on > the server side. > As far as I know getfeature works only when I select multiple features on a > wfs layer. > Is it possible to pass the geometry to getfeature control and get other > feature details within a certain radius. > > Thanks. > From mr at marcelruff.info Fri May 14 05:07:57 2010 From: mr at marcelruff.info (Marcel Ruff) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to use Gauss Krueger JPEG with Open Layer? Message-ID: <4BED12ED.1070607@marcelruff.info> Hi, I have some jpegs with Gau? Kr?ger projection. How can I use those with Open Layers? Thank you Marcel From list at rdewit.net Fri May 14 05:15:44 2010 From: list at rdewit.net (Roald de Wit) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Nodelist Info / GetFeatureInfo not working In-Reply-To: <59E398E4-86B7-4E0A-9AE6-5870D6E0FA09@googlemail.com> References: <9D99985C-4EA0-40EC-AA5F-793BE11DF1CB@googlemail.com> <4BE5EE4B.9010503@rdewit.net> <4BE731FC.6040706@rdewit.net> <59E398E4-86B7-4E0A-9AE6-5870D6E0FA09@googlemail.com> Message-ID: <4BED14C0.9020807@rdewit.net> Hi Pascal, Are you sure your index.html is on server 'myownhomepage.xyz' and the same port? If so, you should be able to reference your geoserver with '/geoserver/wms'. If not, you need to use a proxy script or make sure that they are all on the same server and port. Regards, Roald On 11/05/10 05:14, boxplot wrote: > Hi Roald, > > I made a complete new setup and found out that the enconding of one > file was not the right one. Now I can use the GS example anywhere on > my site and it works. But when I try to copy the code in my index.html > it's not working anymore (the map is loading but after a click there > is no request). So here is my code: > > index.html >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> >> >> >> >> >> Map >> >> >> >> >> >> >> >> >> >> >> >>
>> >>
>> >>
>>
>> >>
>> Click on the map to get feature info >>
>>
>> >> > > Karte2.js >> function init(){ >> >> var options = { >> controls: [], >> }; >> >> var map = new OpenLayers.Map('map', options); >> >> var gphy = new OpenLayers.Layer.Google( >> "Google Physical", >> {type: G_PHYSICAL_MAP} >> ); >> var gmap = new OpenLayers.Layer.Google( >> "Google Streets", >> {numZoomLevels: 20} >> ); >> var ghyb = new OpenLayers.Layer.Google( >> "Google Hybrid", >> {type: G_HYBRID_MAP, numZoomLevels: 20} >> ); >> var satellite = new OpenLayers.Layer.Google( >> "Google Satellite", >> {type: G_SATELLITE_MAP} >> ); >> var wms = new OpenLayers.Layer.WMS( >> "My Map", >> "http://myownhomepage.xyz/geoserver/wms", >> { >> srs: 'EPSG:4326', >> layers: 'Map2:Layer', >> transparent: 'TRUE' >> }, >> { >> 'reproject': true >> } >> ); >> >> map.addLayers([satellite, wms, gphy, gmap, ghyb]); >> map.setCenter(new OpenLayers.LonLat(12.5000,47.5000), 15); >> >> map.addControl(new OpenLayers.Control.LayerSwitcher() ); >> map.addControl(new OpenLayers.Control.Navigation()); >> map.addControl(new OpenLayers.Control.MousePosition({element: >> $('location')})); >> map.addControl(new OpenLayers.Control.Permalink('permalink')); >> map.addControl(new OpenLayers.Control.PanZoomBar({ >> position: new OpenLayers.Pixel(2, 15) >> })); >> >> map.events.register('click', map, function (e) { >> document.getElementById('nodelist').innerHTML = "Loading... please >> wait..."; >> var params = { >> REQUEST: "GetFeatureInfo", >> EXCEPTIONS: "application/vnd.ogc.se_xml", >> BBOX: map.getExtent().toBBOX(), >> X: e.xy.x, >> Y: e.xy.y, >> INFO_FORMAT: 'text/html', >> QUERY_LAYERS: map.layers[0].params.LAYERS, >> FEATURE_COUNT: 50, >> Srs: 'EPSG:4326', >> Layers: 'Map2:Layer', >> Styles: '', >> WIDTH: map.size.w, >> HEIGHT: map.size.h, >> format: format}; >> OpenLayers.loadURL("http://myownhomepage.xyz/geoserver/wms", params, >> this, setHTML, setHTML); >> OpenLayers.Event.stop(e); >> }); >> } >> function setHTML(response){ >> document.getElementById('nodelist').innerHTML = response.responseText; >> }; > > It is strange now but there is no request in Firebug. When I click on > the map the text switches to "Loading please wait" and that's it. > Maybe the problem is because of the different layers? > > Thank you very much for your help! > > Pascal > > > Am 10.05.2010 um 00:06 schrieb Roald de Wit: > >> Hi Pascal, >> >> You should pretty much always get at least *something* back: either >> an error or an empty reponse (FireBug would tell you). Have you >> really got ":80" in your settings like below? >> >> OpenLayers.loadURL("http://myownhomepage.xyz:80/geoserver/wms", >> params, this, setHTML, setHTML); >> >> If your Tomcat runs on port 80 then you can leave out the port >> number. That might do the trick (and yes, it would then have been a >> proxy issue). Like this: >> >> OpenLayers.loadURL("http://myownhomepage.xyz/geoserver/wms >> ", params, this, setHTML, >> setHTML); >> >> And since your OL is on the same server as your GS, you could even do >> this: >> >> OpenLayers.loadURL("/geoserver/wms >> ", params, this, setHTML, >> setHTML); >> >> And to deal with errors in your AJAX request, why not use a separate >> function like this: >> >> OpenLayers.loadURL("/geoserver/wms >> ", params, this, setHTML, >> *onAjaxError*); >> >> Regards, Roald >> >> On 10/05/10 05:45, boxplot wrote: >>> Hi, >>> >>> maybe a made a small progress. As I have written in my last mail I >>> get no response when using GetFeatureInfo (I do get a response when >>> using the GeoServer OpenLayers example which I can access through >>> "Layer Preview" => see code below). So I copied both requests >>> directly into my browser and both got a response: >>> >>>> http://myownhomepage.xyz/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=12.327023%2C47.673%2C12.362977%2C47.777&X=79&Y=375&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=Workspace%3ALayer&FEATURE_COUNT=50&Srs=EPSG%3A4326&Layers=Workspace%3ALayer&Styles=&WIDTH=177&HEIGHT=512&format=image%2Fpng >>>> >>>> >>> > >>> >>> GeoServer runs as a .war within Tomcat and OpenLayers is on the same >>> server. I really can't believe why the same code with the same >>> request on the same server is once getting a response and the other >>> time it is not. Is there a possibility that it is a proxy-issue or >>> maybe a problem with the encoding? >>> >>> Thanks, Pascal From ahocevar at opengeo.org Fri May 14 06:44:07 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] OL and browser cache In-Reply-To: References: Message-ID: <4EE9BFAA-2339-4557-A566-6CEB37E6DBCE@opengeo.org> On May 14, 2010, at 11:01 , Eric Lemoine wrote: > On Fri, May 14, 2010 at 9:22 AM, Andreas Hocevar wrote: > >> [...] (which can be in your application, but also OpenLayers is known to have some). > > Even in FireFox? Mh. Good question. Well, maybe not. But I don't think anybody has ever investigated potential leaks in Firefox. According to http://dbaron.org/mozilla/leak-monitor/, no web application should be able to cause memory leaks in a browser. If it does, then it's a bug in the browser. -Andreas. From subhaniminhas at gmail.com Fri May 14 06:55:27 2010 From: subhaniminhas at gmail.com (Subhani Minhas) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to Use selectControl and dragFeature control at the same time? In-Reply-To: References: <4BECC434.7030002@drakontas.com> Message-ID: Hurray, the code suggested by you works great :-) Here is the final code which can achieve following: 1. Click to add a vector feature with custom icon and label at the point of click (Completed) 2. Click to select any drawn feature and delete it (Completed) 3. Click to select any drawn feature and Modify it. ( By deleting and re-creating the a new feature at the same place with new icon and label) (Completed) 4. Drag Any selected or un-selected icon. (completed with the gracious help of Mr. Ilya Braude, All credit goes to him) My next goal is to save this layer as kml. Hope i will post results soon ----------------the Code is as following- Sharing with every one in the hope that sme one can benefit from it ------------------------- OpenLayers Click Event Example

Click Event Example with Custom Marker

This example shows the use of the click handler and getLonLatFromViewPortPx functions to trigger events on mouse click.It also shows how to add a custom marker with custom Icon


-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100514/59c5e9c9/attachment.html From arnd.wippermann at web.de Fri May 14 09:14:23 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to use Gauss Krueger JPEG with Open Layer? In-Reply-To: <4BED12ED.1070607@marcelruff.info> Message-ID: Hi, If the size of the images are reasonable, then the easiest way is to use an OpenLayers.Layer.Image. Set the map with your Gauss-Kr?ger projection, add a baselayer and then your image layers (with yourImgLayer.isBaseLayer=false). Or take the image layers as baselayers. http://openlayers.org/dev/examples/image-layer.html Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Marcel Ruff Gesendet: Freitag, 14. Mai 2010 11:08 An: users@openlayers.org Betreff: [OpenLayers-Users] How to use Gauss Krueger JPEG with Open Layer? Hi, I have some jpegs with Gau? Kr?ger projection. How can I use those with Open Layers? Thank you Marcel _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From n.e.kendall at gmail.com Fri May 14 09:20:38 2010 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to use Gauss Krueger JPEG with Open Layer? In-Reply-To: References: <4BED12ED.1070607@marcelruff.info> Message-ID: Just for reference, is there a max size/resolution that can be used optimally with the layer.image? On Fri, May 14, 2010 at 4:14 PM, Arnd Wippermann wrote: > Hi, > > If the size of the images are reasonable, then the easiest way is to use an > OpenLayers.Layer.Image. > > Set the map with your Gauss-Kr?ger projection, add a baselayer and then > your > image layers (with yourImgLayer.isBaseLayer=false). Or take the image > layers > as baselayers. > > http://openlayers.org/dev/examples/image-layer.html > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Marcel Ruff > Gesendet: Freitag, 14. Mai 2010 11:08 > An: users@openlayers.org > Betreff: [OpenLayers-Users] How to use Gauss Krueger JPEG with Open Layer? > > Hi, > > I have some jpegs with Gau? Kr?ger projection. > How can I use those with Open Layers? > > Thank you > Marcel > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100514/ab106f83/attachment.html From eric.lemoine at camptocamp.com Fri May 14 11:09:24 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] OL and browser cache In-Reply-To: <4EE9BFAA-2339-4557-A566-6CEB37E6DBCE@opengeo.org> References: <4EE9BFAA-2339-4557-A566-6CEB37E6DBCE@opengeo.org> Message-ID: On Friday, May 14, 2010, Andreas Hocevar wrote: > > On May 14, 2010, at 11:01 , Eric Lemoine wrote: > >> On Fri, May 14, 2010 at 9:22 AM, Andreas Hocevar wrote: >> >>> [...] (which can be in your application, but also OpenLayers is known to have some). >> >> Even in FireFox? > > Mh. Good question. Well, maybe not. But I don't think anybody has ever investigated potential leaks in Firefox. According to http://dbaron.org/mozilla/leak-monitor/, no web application should be able to cause memory leaks in a browser. If it does, then it's a bug in the browser. Yeah. FWIW, and in case we want to support IE < 8, I have a patch implementing a "garbage bin element", see . Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From arnd.wippermann at web.de Fri May 14 13:32:56 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to use Gauss Krueger JPEG with Open Layer? In-Reply-To: Message-ID: Hello, not that I'm aware. But images could be really large. 8000 x 4000 is no problem. You have to wait a moment until the image is loaded, but afterwards pan and zoom works lovely. Regards, Arnd _____ Von: Nicholas Efremov-Kendall [mailto:n.e.kendall@gmail.com] Gesendet: Freitag, 14. Mai 2010 15:21 An: Arnd Wippermann Cc: Marcel Ruff; users@openlayers.org Betreff: Re: [OpenLayers-Users] How to use Gauss Krueger JPEG with Open Layer? Just for reference, is there a max size/resolution that can be used optimally with the layer.image? On Fri, May 14, 2010 at 4:14 PM, Arnd Wippermann wrote: Hi, If the size of the images are reasonable, then the easiest way is to use an OpenLayers.Layer.Image. Set the map with your Gauss-Kr?ger projection, add a baselayer and then your image layers (with yourImgLayer.isBaseLayer=false). Or take the image layers as baselayers. http://openlayers.org/dev/examples/image-layer.html Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Marcel Ruff Gesendet: Freitag, 14. Mai 2010 11:08 An: users@openlayers.org Betreff: [OpenLayers-Users] How to use Gauss Krueger JPEG with Open Layer? Hi, I have some jpegs with Gau? Kr?ger projection. How can I use those with Open Layers? Thank you Marcel _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Nicholas Efremov-Kendall Fulbright Student 2009-2010, Ukraine nefremov@artsci.wustl.edu c/o Halyna Yerko Balzaka 92a, Kv 27 02232 Kyiv, Ukraine (mob) +380963576524 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100514/bd0956c3/attachment.html From stuart.jones at jacobs.com Fri May 14 15:20:39 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WFS using OpenLayers.Layer.Vector() fails to render In-Reply-To: <1273768658127-5046964.post@n2.nabble.com> References: <1273763807000-5046572.post@n2.nabble.com> <1273766237457-5046770.post@n2.nabble.com> <1273768658127-5046964.post@n2.nabble.com> Message-ID: <1273864839801-5056825.post@n2.nabble.com> Any ideas anyone? I did wonder about projection issues: my data is EPSG:27700 but then so is my map. And as I said, the static GML layer renders fine. I have implemented the Tasmania demo [1] locally with my version of Geoserver and OpenLayers.Layer.Vector() and that works OK. ? [1] http://openlayers.org/dev/examples/wfs-protocol.html -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-using-OpenLayers-Layer-Vector-fails-to-render-tp5046572p5056825.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From sb.ray at hotmail.com Fri May 14 15:46:29 2010 From: sb.ray at hotmail.com (sunny74) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] zooming a certain portion of the map Message-ID: <1273866389486-5056929.post@n2.nabble.com> Dear Friends, I have a map which I display within a div of 600 * 600 pixels.This obviously has an extent as defined in the map file. Now I want to zoom a certain rectangular portion of the map so that it covers the entire map area i.e the entire div. Now which functions do I use zoomto Extent() or zoomtoMaxExtent(). Which of these allow me to pass bounds? 1)Extent as defined in the map file and Bounds are the same thing?PLs confirm. 2)Bound or extent is specified using a lonlat pair in the following pattern: longitude 1 lattitude1 longitude2 lattitude2 Where longitude 1 lattitude1 is the co-ord of bottom left point,longitude2 lattitude2 is the co-ord of the top right point of the rectangle. Pls confirm whether my understanding in 1 & 2 are correct or not? Thanks for your attention. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/zooming-a-certain-portion-of-the-map-tp5056929p5056929.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ijturton at gmail.com Fri May 14 16:07:10 2010 From: ijturton at gmail.com (Ian Turton) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WFS using OpenLayers.Layer.Vector() fails to render In-Reply-To: <1273864839801-5056825.post@n2.nabble.com> References: <1273763807000-5046572.post@n2.nabble.com> <1273766237457-5046770.post@n2.nabble.com> <1273768658127-5046964.post@n2.nabble.com> <1273864839801-5056825.post@n2.nabble.com> Message-ID: On Fri, May 14, 2010 at 3:20 PM, gingerbbm wrote: > > Any ideas anyone? > > I did wonder about projection issues: my data is EPSG:27700 but then so is > my map. And as I said, the static GML layer renders fine. > I assume you are using version 1.1.0 with the WFS as 1.0 doesn't support projections? Ian -- Ian Turton From stuart.jones at jacobs.com Fri May 14 16:29:04 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WFS using OpenLayers.Layer.Vector() fails to render In-Reply-To: References: <1273763807000-5046572.post@n2.nabble.com> <1273766237457-5046770.post@n2.nabble.com> <1273768658127-5046964.post@n2.nabble.com> <1273864839801-5056825.post@n2.nabble.com> Message-ID: <1273868944584-5057076.post@n2.nabble.com> > I assume you are using version 1.1.0 with the WFS > as 1.0 doesn't support projections? I've tried adding version: "1.1.0" to the protocol object, if that's what you mean. The XML response is structured differently but it still does not render. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-using-OpenLayers-Layer-Vector-fails-to-render-tp5046572p5057076.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stuart.jones at jacobs.com Fri May 14 19:47:19 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] zooming a certain portion of the map In-Reply-To: <1273866389486-5056929.post@n2.nabble.com> References: <1273866389486-5056929.post@n2.nabble.com> Message-ID: <1273880839606-5057629.post@n2.nabble.com> If I'm understanding you correctly you need zoomToExtent [1], passing in an OpenLayers.Bounds() object configured with your lon/lat pairs [2], e.g. map.zoomToExtent(new OpenLayers.Bounds(lattiude1, longitude1, lattitude2, longitude2)); [1] http://dev.openlayers.org/releases/OpenLayers-2.9/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent [2] http://dev.openlayers.org/releases/OpenLayers-2.9/doc/apidocs/files/OpenLayers/BaseTypes/Bounds-js.html#OpenLayers.Bounds -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/zooming-a-certain-portion-of-the-map-tp5056929p5057629.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stuart.jones at jacobs.com Fri May 14 20:23:29 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] WFS using OpenLayers.Layer.Vector() fails to render In-Reply-To: <1273868944584-5057076.post@n2.nabble.com> References: <1273763807000-5046572.post@n2.nabble.com> <1273766237457-5046770.post@n2.nabble.com> <1273768658127-5046964.post@n2.nabble.com> <1273864839801-5056825.post@n2.nabble.com> <1273868944584-5057076.post@n2.nabble.com> Message-ID: <1273883009993-5057688.post@n2.nabble.com> Figured it out. I suspected it would be something simple, and it was: I just needed to remove the trailing slash from the featureNS value: var wfslayer = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://d2.elgin.gov.uk/geoserver.2/wfs", featureType: "NSG_STREET_PUBLIC", featureNS: "http://www.elgin.gov.uk", // <-- removed trailing slash featurePrefix: "e", geometryName: "GEOM" }) }); map.addLayer(wfslayer); It would be nice if OL was a bit more forgiving! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-using-OpenLayers-Layer-Vector-fails-to-render-tp5046572p5057688.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mulone at rome.com Sun May 16 10:12:05 2010 From: mulone at rome.com (Mulone) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How many registered users on this forum? Message-ID: <1274019125437-5061676.post@n2.nabble.com> Hi guys, I need 2 pieces of information for a survey: - how many active users are registered to this forum? - and on the dev forum? I couldn't find it on Nabble. Thanks for any hint! Mulone ----- Mulone PhD student -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-many-registered-users-on-this-forum-tp5061676p5061676.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Sun May 16 10:15:52 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How many registered users on this forum? In-Reply-To: <1274019125437-5061676.post@n2.nabble.com> References: <1274019125437-5061676.post@n2.nabble.com> Message-ID: <000E12B2-A106-42FF-9A3A-55EB653D64DE@osgis.nl> Users: 1116 non-digested members, 333 digested members. Dev: 519 non-digested members, 117 digested members. Best regards, Bart On May 16, 2010, at 4:12 PM, Mulone wrote: > > Hi guys, > I need 2 pieces of information for a survey: > > - how many active users are registered to this forum? > - and on the dev forum? > > I couldn't find it on Nabble. > > Thanks for any hint! > Mulone > > ----- > Mulone > PhD student > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-many-registered-users-on-this-forum-tp5061676p5061676.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From mulone at rome.com Sun May 16 10:47:56 2010 From: mulone at rome.com (Mulone) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How many registered users on this forum? In-Reply-To: <000E12B2-A106-42FF-9A3A-55EB653D64DE@osgis.nl> References: <1274019125437-5061676.post@n2.nabble.com> <000E12B2-A106-42FF-9A3A-55EB653D64DE@osgis.nl> Message-ID: <1274021276310-5061761.post@n2.nabble.com> Thanks! ----- Mulone PhD student -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-many-registered-users-on-this-forum-tp5061676p5061761.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From richard.greenwood at gmail.com Sun May 16 13:11:15 2010 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] custom cursor depends on activation order Message-ID: My map page has measure controls for path & polygon, and a DragPan control, as well as various other controls. I have defined a custom cursor for the DragPan as follows: .olControlDragPanActive { cursor: url('/mapserver/common/rwg/img/handRWG.cur'), auto; } If the user activates DragPan before using a measure control, the cursor for the measure control is the default pointer style. However, if the user activates a measure control before doing a DragPan, the cursor for the measure control is the one that I have defined above for DragPanActive, which I do not want. To rephrase that: the measure controls are using my custom DragPan cursor unless DragPan has been previously activated and deactivated. An example can be seen here: http://records.sublettewyo.com/mapserver/ Thanks, -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From jg58508 at gmail.com Sun May 16 20:54:11 2010 From: jg58508 at gmail.com (Joseph G.) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Performance problem while measuring on Chrome Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100517/9ef70bf7/measure.html From ravikrishna at qburst.com Mon May 17 02:28:43 2010 From: ravikrishna at qburst.com (Ravi Krishna) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to display a specific place ? Message-ID: <1274077723868-5063850.post@n2.nabble.com> Hi, I am a beginner with Openlayers. I tried out the tutorials and could display maps from metacarta. Now i am trying to display google maps inside OpenLayers. i could display the google maps.., but how can i display a specif portion of map when it comes first. eg: how can i display India when it first shows. i will copy the code below :
-- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-display-a-specific-place-tp5063850p5063850.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rboza at sitep.com Mon May 17 02:47:28 2010 From: rboza at sitep.com (=?UTF-8?Q?Ram=C3=B3n_Boza?=) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to display a specific place ? In-Reply-To: <1274077723868-5063850.post@n2.nabble.com> References: <1274077723868-5063850.post@n2.nabble.com> Message-ID: <007d01caf58c$d4affb90$7e0ff2b0$@com> Hello, There are different approaches you can use to solve this. 1) As you are looking to represent on a map a concrete projection, is to have the coordinates (BBox in latlon, center in latlon and zoom for googlemaps) hardcoded in like a datamodel of your app. So when you want to use them just map.setCenter(centerLatLon,zoomlvl,MapType.NORMAL_MAP_TYPE); 2) When working with different coordinate systems, like myself (epsg:23031), when you want to transform that coordinates to google ones you have to use one functionality, implemented by yourself. googleLatLon = UTM2LatLon(myBBoxInUTM); zoomLvl = getZoomForGoogleBBox(googleLatLon); BTW it will not be stranger that someone implemented some webservice or so that given a name, like 'india' returns you the information needed to its representation, google can have that webservice itself, really I always work with 23031 so didn't searched for. Ram?n Boza Programador rboza@sitep.com Avda. Meridiana, 30-32 - 08018 Barcelona (Spain) Tel: +34 93 320 82 15 - Fax: +34 93 485 57 77 www.sitep.com - info@sitep.com ? Abans d?imprimir aquest correu, assegura?t que ?s del tot necessari. El medi ambient ?s cosa de tots! AVISO DE CONFIDENCIALIDAD Este mensaje va dirigido, de manera exclusiva, a su destinatario y contiene informaci?n confidencial y sujeta al secreto profesional, cuya divulgaci?n no est? permitida por la ley. En caso de haber recibido este mensaje por error, le rogamos que, de forma inmediata, nos lo comunique mediante correo electr?nico remitido a nuestra atenci?n y proceda a su eliminaci?n, as? como a la de cualquier documento adjunto al mismo. Asimismo, le comunicamos que la distribuci?n, copia o utilizaci?n de este mensaje, o de cualquier documento adjunto al mismo, cualquiera que fuera su finalidad, est?n prohibidas por la ley. INFORMACION RELATIVA A LA LOPD En cumplimiento de la Ley Org?nica 15/1999 de Protecci?n de Datos de Car?cter Personal (LOPD), le informamos de que sus datos de contacto han sido incorporados en ficheros titularidad de Sistemas de Informaci?n Territorial y Posicionamiento S.L., que responden a la finalidad de servir de directorio o agenda de contactos, as? como para facilitar la gesti?n administrativa y comercial desarrollada por la empresa. Usted tiene la posibilidad de ejercer los derechos de acceso, rectificaci?n, cancelaci?n y oposici?n previstos en la ley, mediante carta dirigida a Sistemas de Informaci?n Territorial y Posicionamiento S.L., Ref. Protecci?n de datos, C/Avda. Meridiana n? 30-32 Escalera B, Entresuelo 2?, 08018-Barcelona. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Ravi Krishna Enviado el: lunes, 17 de mayo de 2010 8:29 Para: users@openlayers.org Asunto: [OpenLayers-Users] How to display a specific place ? Hi, I am a beginner with Openlayers. I tried out the tutorials and could display maps from metacarta. Now i am trying to display google maps inside OpenLayers. i could display the google maps.., but how can i display a specif portion of map when it comes first. eg: how can i display India when it first shows. i will copy the code below :
-- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-display-a-specific-place-tp5063850p5063850.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users Se certific? que el correo entrante no contiene virus. Comprobada por AVG - www.avg.es Versi?n: 9.0.819 / Base de datos de virus: 271.1.1/2872 - Fecha de la versi?n: 05/16/10 20:26:00 From fedesanchez888 at gmail.com Mon May 17 03:42:01 2010 From: fedesanchez888 at gmail.com (fedesan) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Vector layer performance Message-ID: <1274082121233-5064013.post@n2.nabble.com> Hi list, I have a vector layer that is generated after a search, like this: the search returns a list of numbers and those numbers are the id's from schools in my country, so i do a query to the database and i get the coordinates and features from those schools, The layer is created properly but i have this problem: the search can return a maximun of 15.000 schools but Openlayers home page recommends having only around 2500 Coordinates So this is mi cuestion: What's the alternative? I read about TEXT layers and about GML layers but they keep all the data in the client side(is this correct??), and that seems to be the problem I also tried learning about php mapscript, by creating a dynamic layer by changing the Data value on the mapfile but i do not know how to display that layer with openlayers Can i use Openlayers.layer.mapserver to do this?? I use mapserver and postgres. Can someone point me to the right direction please !! Thanks -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Vector-layer-performance-tp5064013p5064013.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From webfrank at tiscali.it Mon May 17 04:44:54 2010 From: webfrank at tiscali.it (Francesco) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Popup over GPX track In-Reply-To: <4BE98FC9.5050000@tiscalinet.it> References: <4BE98927.9010303@tiscali.it> <4BE98FC9.5050000@tiscalinet.it> Message-ID: <4BF10206.8020904@tiscali.it> I tried with this code: var lgpx = new OpenLayers.Layer.Vector("Track", { style: {strokeColor: 'red', strokeWidth: 10, strokeOpacity: 0.5}, projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: 'gpx.php?imei='+imei+'&from='+from+'&to='+to, format: new OpenLayers.Format.GPX({ extractAttributes: true, extractStyles: false, maxDepth: 4, extractTracks: true, extractRoutes: false, extractWaypoints: false }) }) }); map.addLayer(lgpx); lgpx.events.register('loadend',lgpx,function() { var bounds = this.getDataExtent(); map.zoomToExtent(bounds); }); var hoverSelect = new OpenLayers.Control.SelectFeature(lgpx, { hover: true, multiple: true, geometryTypes: ["OpenLayers.Geometry.LineString"], renderIntent: "temporary", onSelect: function(f) { var content = 'popup'; popup = new OpenLayers.Popup.FramedCloud("Info", f.geometry.getBounds().getCenterLonLat(), null, content, null, true, function() { hoverSelect.unselectAll(); } ); f.popup = popup; map.addPopup(popup); }, onUnselect: function(f) { if (f.popup) { map.removePopup(f.popup); f.popup.destroy(); delete f.popup; } } }); map.addControl(hoverSelect); hoverSelect.activate(); and the GPX file is like this: 0 ............. I would like to display inside the popup time and name attributes Il 11/05/2010 19.11, emmexx ha scritto: > Il 11/05/2010 18:43, Francesco scrisse: > >> Hi, >> I'm trying to display a popup on mouse over GPX track. This is the >> code used to load the track: >> > >> onSelect: function(feature) { >> >> --------------> Here I want to display a popup with info from the GPX file >> >> }, >> onUnselect: function(feature) { >> > I use eventListeners instead of onSelect onUnselect. > > bye > maxx > > > >>>> Code for the popup: >>>> > var highlightCtrl = new OpenLayers.Control.SelectFeature([vlayer, > clayer], { > hover: true, > highlightOnly: true, > multiple: true, > geometryTypes: ["OpenLayers.Geometry.LineString"], > renderIntent: "temporary", > eventListeners: > { > featurehighlighted: function(f) > { > popup = new OpenLayers.Popup("mylayer", > f.feature.geometry.getBounds().getCenterLonLat(), > null, > 'some html text', > null, > true); > popup.autoSize=true; > // popup.panMapIfOutOfView=true; > f.feature.popup = popup; > map.addPopup(popup); > }, > featureunhighlighted: function(f) > { > map.removePopup(f.feature.popup); > f.feature.popup.destroy(); > f.feature.popup = null; > > } > } > }); > > map.addControl(highlightCtrl); > > highlightCtrl.activate(); > > (popup is a global variable) > > >>>>> Code to open a gpx file: >>>>> > var tmplayerGps= new OpenLayers.Layer.GML('myfile', path, > { > format: OpenLayers.Format.GPX, > formatOptions: { > extractAttributes: true, > extractStyles: false, > maxDepth: 2, > extractTracks: true, > extractRoutes: false, > extractWaypoints: false > }, > 'styleMap': styleMap, > projection: map.displayProjection > }); > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100517/37e87aac/attachment.html From ravikrishna at qburst.com Mon May 17 05:06:58 2010 From: ravikrishna at qburst.com (Ravi Krishna) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] How to display a specific place ? In-Reply-To: <007d01caf58c$d4affb90$7e0ff2b0$@com> References: <1274077723868-5063850.post@n2.nabble.com> <007d01caf58c$d4affb90$7e0ff2b0$@com> Message-ID: Hi, Thanks for ur reply..but it didnt work with me.. I am posting the code of my map. Can u please edit it and send me the working code which comes with some specified place when we open it..:) Ravi OpenLayers Example
2010/5/17 Ram?n Boza [via OSGeo.org] < ml-node+5063890-1564863673-541374@n2.nabble.com > > Hello, > > There are different approaches you can use to solve this. > > 1) As you are looking to represent on a map a concrete projection, is to > have the coordinates (BBox in latlon, center in latlon and zoom for > googlemaps) hardcoded in like a datamodel of your app. > > So when you want to use them just > map.setCenter(centerLatLon,zoomlvl,MapType.NORMAL_MAP_TYPE); > > 2) When working with different coordinate systems, like myself > (epsg:23031), when you want to transform that coordinates to google ones you > have to use one functionality, implemented by yourself. > > googleLatLon = UTM2LatLon(myBBoxInUTM); > zoomLvl = getZoomForGoogleBBox(googleLatLon); > > BTW it will not be stranger that someone implemented some webservice or so > that given a name, like 'india' returns you the information needed to its > representation, google can have that webservice itself, really I always work > with 23031 so didn't searched for. > > Ram?n Boza > Programador > [hidden email] > > Avda. Meridiana, 30-32 - 08018 Barcelona (Spain) > Tel: +34 93 320 82 15 - Fax: +34 93 485 57 77 > www.sitep.com - [hidden email] > ? Abans d?imprimir aquest correu, assegura?t que ?s del tot necessari. El > medi ambient ?s cosa de tots! > AVISO DE CONFIDENCIALIDAD > > Este mensaje va dirigido, de manera exclusiva, a su destinatario y contiene > informaci?n confidencial y sujeta al secreto profesional, cuya divulgaci?n > no est? permitida por la ley. En caso de haber recibido este mensaje por > error, le rogamos que, de forma inmediata, nos lo comunique mediante correo > electr?nico remitido a nuestra atenci?n y proceda a su eliminaci?n, as? como > a la de cualquier documento adjunto al mismo. Asimismo, le comunicamos que > la distribuci?n, copia o utilizaci?n de este mensaje, o de cualquier > documento adjunto al mismo, cualquiera que fuera su finalidad, est?n > prohibidas por la ley. > > INFORMACION RELATIVA A LA LOPD > > En cumplimiento de la Ley Org?nica 15/1999 de Protecci?n de Datos de > Car?cter Personal (LOPD), le informamos de que sus datos de contacto han > sido incorporados en ficheros titularidad de Sistemas de Informaci?n > Territorial y Posicionamiento S.L., que responden a la finalidad de servir > de directorio o agenda de contactos, as? como para facilitar la gesti?n > administrativa y comercial desarrollada por la empresa. Usted tiene la > posibilidad de ejercer los derechos de acceso, rectificaci?n, cancelaci?n y > oposici?n previstos en la ley, mediante carta dirigida a Sistemas de > Informaci?n Territorial y Posicionamiento S.L., Ref. Protecci?n de datos, > C/Avda. Meridiana n? 30-32 Escalera B, Entresuelo 2?, 08018-Barcelona. > > -----Mensaje original----- > De: [hidden email] [mailto:[hidden > email] ] En nombre > de Ravi Krishna > Enviado el: lunes, 17 de mayo de 2010 8:29 > Para: [hidden email] > Asunto: [OpenLayers-Users] How to display a specific place ? > > > Hi, > I am a beginner with Openlayers. I tried out the tutorials and could > display > maps from metacarta. Now i am trying to display google maps inside > OpenLayers. i could display the google maps.., but how can i display a > specif portion of map when it comes first. eg: how can i display India when > > it first shows. > i will copy the code below : > > > > > > > >
> > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/How-to-display-a-specific-place-tp5063850p5063850.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > [hidden email] > http://openlayers.org/mailman/listinfo/users > > Se certific? que el correo entrante no contiene virus. > Comprobada por AVG - www.avg.es > Versi?n: 9.0.819 / Base de datos de virus: 271.1.1/2872 - Fecha de la > versi?n: 05/16/10 20:26:00 > > > _______________________________________________ > Users mailing list > [hidden email] > http://openlayers.org/mailman/listinfo/users > > > ------------------------------ > View message @ > http://osgeo-org.1803224.n2.nabble.com/How-to-display-a-specific-place-tp5063850p5063890.html > To unsubscribe from How to display a specific place ?, click here. > > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-display-a-specific-place-tp5063850p5064217.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100517/9cbb8852/attachment.html From f.boussuges at gmail.com Mon May 17 05:55:45 2010 From: f.boussuges at gmail.com (=?ISO-8859-1?Q?Fran=E7ois_Boussuges?=) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] problem cluster attributs Message-ID: <4BF112A1.9070109@gmail.com> Hello. Actually I'm in training in the INRA (agronomicaly institute) in France. I make a webmapping application about the genetically ressources. I have a lot of points (sites) with different attributs, this attibuts is load in a grid panel. this panel display all site and attributs. The problem is that some points have the same location. For resolve this I think use the Cluster strategy of OpenLayers. Second problem: when I made a cluster with two (or more) points, this points disapear of my grid panel ad the cluster is create an empty line. Have you a solution to keep my original data in the grid panel an, when i click on the cluster in the map, select the data point of the cluster in the grid panel? If you have an other solution.... With my best regards (sorry for my english). Fran?ois From brfr at metrico.lu Mon May 17 06:06:09 2010 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Ie8 Popup Opacity issues In-Reply-To: <4BF10206.8020904@tiscali.it> References: <4BE98927.9010303@tiscali.it> <4BE98FC9.5050000@tiscalinet.it> <4BF10206.8020904@tiscali.it> Message-ID: <4BF11511.8050909@metrico.lu> Hello list, we're having some trouble here with Ie8 and popup opacity issues. We use our own alpha-transparent background-image for popups. Works fine, except in Ie8, where the background is replaced by a grey color. Using the debugger, the filter property set by the OpenLayers.Popup.setOpacity() method seems to be the cause for this. Disabling it in the debugger makes the transparency work with the png. I am not 100% sure what is causing this behavior, but with Ie8, a new method for setting opacity was introduced, see http://msdn.microsoft.com/en-gb/library/ms530752.aspx which is missing in the setOpacity() method. And there are some more issues with Ie and opacity, see the links mentioned below [1,2,3] I don't know the reason for setting opacity (and others, border, bg-color) by javascript, but would'nt it be better to set them by css altogether? Frank Some more links [1] http://blogs.msdn.com/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx [2] http://www.wickham43.supanet.com/tutorial/opacity.html [3] http://realtech.burningbird.net/graphics/css/opacity-returns-ie8 -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From Kai-Behncke at gmx.de Mon May 17 08:52:27 2010 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] hovering-informations after 500 milliseconds Message-ID: <20100517125227.128110@gmx.net> Dear users, I use a WFS to get informations to an object by hovering a feature like: my_wfs_highlight = new OpenLayers.Control.GetFeature({ protocol: OpenLayers.Protocol.WFS.fromWMSLayer(my_layer), hover: true, clickTolerance: 15 }); ...in generally this works finely, but: If I move the mouse over some features I oftenly get failure messages in Firebug (e.g. "aborted" because the mouse doesn`t stop long enough over a feaure). I wonder if its possible to send a request e.g. if the mouse is above a feature for 500 millisecondes or so, to avoid these error messages? Or is it maybe possible to avoid error messages if a request is aborted? Thank you very much, Kai -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From eric.lemoine at camptocamp.com Mon May 17 11:32:05 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] hovering-informations after 500 milliseconds In-Reply-To: <20100517125227.128110@gmx.net> References: <20100517125227.128110@gmx.net> Message-ID: On Monday, May 17, 2010, Kai Behncke wrote: > Dear users, > > I use a WFS to get informations to an object by hovering a feature like: > > my_wfs_highlight = new OpenLayers.Control.GetFeature({ > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(my_layer), > hover: true, > clickTolerance: 15 > }); > > > ...in generally this works finely, but: > > If I move the mouse over some features I oftenly get failure messages in Firebug (e.g. "aborted" because the mouse doesn`t stop long enough over a feaure). > > I wonder if its possible to send a request e.g. if the mouse is above a feature for 500 millisecondes or so, to avoid these error messages? The GetFeature control uses a 250 ms delay. And AFAICT there's currently no way to customize that, which is a shame. It'd be great if you could create a ticket for that. Even greater would a patch to GetFeature. A patch would probably just involve having delay:250 in the prototype, and using this.delay when creating the hover handler. > Or is it maybe possible to avoid error messages if a request is aborted? I don't recall seeing such errors on abort. What they look like exactly? Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From RWood at entrix.com Mon May 17 11:41:50 2010 From: RWood at entrix.com (Robert M. Wood) Date: Wed Sep 1 17:18:49 2010 Subject: [OpenLayers-Users] Making vector layers. Message-ID: I am having difficulty figuring out how to make a vector layer. At this point I have tried at least two different methods. One is importing the data as a KML file out of geoserver, the KML works fine in Google earth so I don't think it is an issue with the KML. The other is using WFS. In IE I am getting an unspecified error on line 634 of OpenLayers.js and firefox just does not display anything for that layer, it shows up in the layer switcher but does not show up on the map. The map_init function is called from body onload. My actual goal is to fire onhover events from the points in the vector layer. The WMS layer is just the imagery. I am using the 2.9.1 version of openlayers. var poles = null; var map = null; var drawControls; function map_init(){ //map = new OpenLayers.Map('map'); map = new OpenLayers.Map({ div: "map", maxExtent: new OpenLayers.Bounds( -82.134,27.544,-81.968,27.678 ), allOverlays: true }); var base = new OpenLayers.Layer.WMS( "Imagery", "http://geo.entrix.com/geoserver/wms/kml?layers=cite:poles", { layers: 'basic' } ); poles = new OpenLayers.Layer.Vector("Poles", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.HTTP({ url: "http://geo.entrix.com:80/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=Jeff:mec_gps_2010029_data_join&bbox=-82.134,27.544,-81.968,27.678&width=299&height=512&srs=EPSG:63266405&format=application/vnd.google-earth.kml+xml", format: new OpenLayers.Format.KML({ extractAttributes: true }) }) }); /* poles = new OpenLayers.Layer.Vector("Poles", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://geo.entrix.com/geoserver/wfs", srsName: "EPSG:63266405", featurePrefix: "Jeff", typeName: "mec_gps_2010029_data_join" }) }); */ map.addLayers([base,poles]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); } From rwilliams at paqinteractive.com Mon May 17 12:26:14 2010 From: rwilliams at paqinteractive.com (Ryan Williams) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] how to get layers in a layer Message-ID: <4BF16E26.7040807@paqinteractive.com> Hi all, I've searched around on google for a while on this and haven't found an answer yet: Can anyone show me an example of how to get the layers in a openlayers wms.layer? Here's an example: cities = new OpenLayers.Layer.WMS("US Cities", wms_path, {layers: 'Public:US_Cities'} ); I'm able to read items like the layer name (which would be "US Cities" in the above example, with: layer.get("layer").name but haven't had luck with getting the layers listed in the paramaters ( { layers: }) I want to know how to get the value 'Public:US_Cities' Thanks, Ryan -- Ryan Williams, GISP GIS Analyst / Programmer PAQ Interactive Inc. 107 S State St., Suite 300 Monticello, IL 61856-1968 Office: (217) 762-7955 Mobile: (217) 722-2794 rwilliams@paqinteractive.com From arnd.wippermann at web.de Mon May 17 12:52:21 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] how to get layers in a layer In-Reply-To: <4BF16E26.7040807@paqinteractive.com> Message-ID: Hi, yourWMS.params.LAYERS The params of the wms layer are in uppercase. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Ryan Williams Gesendet: Montag, 17. Mai 2010 18:26 An: users@openlayers.org Betreff: [OpenLayers-Users] how to get layers in a layer Hi all, I've searched around on google for a while on this and haven't found an answer yet: Can anyone show me an example of how to get the layers in a openlayers wms.layer? Here's an example: cities = new OpenLayers.Layer.WMS("US Cities", wms_path, {layers: 'Public:US_Cities'} ); I'm able to read items like the layer name (which would be "US Cities" in the above example, with: layer.get("layer").name but haven't had luck with getting the layers listed in the paramaters ( { layers: }) I want to know how to get the value 'Public:US_Cities' Thanks, Ryan -- Ryan Williams, GISP GIS Analyst / Programmer PAQ Interactive Inc. 107 S State St., Suite 300 Monticello, IL 61856-1968 Office: (217) 762-7955 Mobile: (217) 722-2794 rwilliams@paqinteractive.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From rwilliams at paqinteractive.com Mon May 17 13:08:07 2010 From: rwilliams at paqinteractive.com (Ryan Williams) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] how to get layers in a layer In-Reply-To: References: Message-ID: <4BF177F7.6030306@paqinteractive.com> Wow, That is much more simple than I thought it was. Thanks! On 5/17/2010 11:52 AM, Arnd Wippermann wrote: > Hi, > > yourWMS.params.LAYERS > > The params of the wms layer are in uppercase. > > Arnd > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Ryan Williams > Gesendet: Montag, 17. Mai 2010 18:26 > An: users@openlayers.org > Betreff: [OpenLayers-Users] how to get layers in a layer > > > Hi all, > > I've searched around on google for a while on this and haven't found an > answer yet: > Can anyone show me an example of how to get the layers in a openlayers > wms.layer? > Here's an example: > > cities = new OpenLayers.Layer.WMS("US Cities", wms_path, > {layers: 'Public:US_Cities'} ); > > > I'm able to read items like the layer name (which would be "US Cities" > in the above example, with: > layer.get("layer").name > > but haven't had luck with getting the layers listed in the paramaters ( > { layers: }) > I want to know how to get the value 'Public:US_Cities' > > Thanks, > Ryan > > -- > Ryan Williams, GISP > GIS Analyst / Programmer > PAQ Interactive Inc. > 107 S State St., Suite 300 > Monticello, IL 61856-1968 > Office: (217) 762-7955 > Mobile: (217) 722-2794 > rwilliams@paqinteractive.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > -- Ryan Williams, GISP GIS Analyst / Programmer PAQ Interactive Inc. 107 S State St., Suite 300 Monticello, IL 61856-1968 Office: (217) 762-7955 Mobile: (217) 722-2794 rwilliams@paqinteractive.com From stuart.jones at jacobs.com Mon May 17 13:52:29 2010 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Making vector layers. In-Reply-To: References: Message-ID: <1274118749365-5066236.post@n2.nabble.com> Regarding the WFS issue, what is in the response from Geoserver? (You can check this if you have Firebug installed in Firefox (which you really ought to!)). -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Making-vector-layers-tp5065699p5066236.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From emmexx at tiscalinet.it Mon May 17 15:47:44 2010 From: emmexx at tiscalinet.it (emmexx) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Popup over GPX track In-Reply-To: <4BF10206.8020904@tiscali.it> References: <4BE98927.9010303@tiscali.it> <4BE98FC9.5050000@tiscalinet.it> <4BF10206.8020904@tiscali.it> Message-ID: <4BF19D60.5090402@tiscalinet.it> Il 17/05/2010 10:44, Francesco scrisse: > I would like to display inside the popup time and name attributes Here a working example: http://www.emmexx.it/varie/t1.html I downloaded a gpx file from here: http://www.topografix.com/team/view.asp?gpx=ashland.gpx#gpx_tracks The file has the name and desc attributes. You should change the way the file is loaded and the attributes you want to display inside the popup. Start with a simple working file and then add new features (not in OL sense.) Use Firefox and firebug to watch the content of variables and attributes. bye maxx p.s. e se parli italiano, come suppongo, scrivimi direttamente perche' stiamo andando un po' OT. From jg58508 at gmail.com Mon May 17 19:13:54 2010 From: jg58508 at gmail.com (Joseph G.) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Performance problem while measuring on Chrome In-Reply-To: References: Message-ID: I'm pasting the example in plain text just in case: OpenLayers
From ben.welsh at gmail.com Mon May 17 20:32:53 2010 From: ben.welsh at gmail.com (palewire) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Problems when using IE7 or Safari page zoom feature In-Reply-To: <20090415113514.GH26968@metacarta.com> References: <1239783639470-2637599.post@n2.nabble.com> <20090415113514.GH26968@metacarta.com> Message-ID: <1274142773644-5067857.post@n2.nabble.com> I'm seeing this problem in Safari. If the user uses the "zoom" feature of the browser -- not the map's zoom feature -- polygons will get all out of whack. If you don't know what I mean, It's the same button people press to up the font size. This thing still hanging around? Any have a fix? Should I file a bug report? Ben. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problems-when-using-IE7-page-zoom-feature-tp2637599p5067857.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Tue May 18 04:25:03 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Problems when using IE7 or Safari page zoom feature In-Reply-To: <1274142773644-5067857.post@n2.nabble.com> References: <1239783639470-2637599.post@n2.nabble.com> <20090415113514.GH26968@metacarta.com> <1274142773644-5067857.post@n2.nabble.com> Message-ID: <42FB36A5-E314-4CBC-9B01-8099194C5305@opengeo.org> Hi, in Safari, you could enable the "Zoom text only" option in the View menu. In my opinion, you should create a Safari/WebKit ticket for this, not an OpenLayers ticket. Page Zoom is supposed to zoom the whole page. Web applications don't even know that the page is zoomed, so it is unlikely that this can be fixed in OpenLayers. If you create a Safari/WebKit ticket, it should read something like "When using page zoom, SVG content does not align with HTML and image content". Regards, Andreas. On May 18, 2010, at 02:32 , palewire wrote: > > I'm seeing this problem in Safari. If the user uses the "zoom" feature of the > browser -- not the map's zoom feature -- polygons will get all out of whack. > If you don't know what I mean, It's the same button people press to up the > font size. > > This thing still hanging around? Any have a fix? Should I file a bug report? > > Ben. > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problems-when-using-IE7-page-zoom-feature-tp2637599p5067857.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From luis.a.de.sousa at gmail.com Tue May 18 07:45:39 2010 From: luis.a.de.sousa at gmail.com (=?ISO-8859-1?Q?Lu=EDs_de_Sousa?=) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] MinZoomLevel with WMS layer Message-ID: Hello everyone, I've been using the MinZoomLevel option on WFS layers to set the minimum resolution beyond which a layer can be rendered (useful for when there are lots of features). Today I'm trying to the same with a WMS layer, but in that case the MinZoomLevel option is ignored. Should it be working? If not how can i be done for WMS layers? I'm using OpenLayers 2.9. Thank you, Lu?s From bartvde at osgis.nl Tue May 18 07:53:24 2010 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] MinZoomLevel with WMS layer In-Reply-To: References: Message-ID: <39091.145.50.39.11.1274183604.squirrel@webmail.hostingdiscounter.nl> Hi, use minResolution or minScale instead. Best regards, Bart > Hello everyone, > > I've been using the MinZoomLevel option on WFS layers to set the > minimum resolution beyond which a layer can be rendered (useful for > when there are lots of features). > > Today I'm trying to the same with a WMS layer, but in that case the > MinZoomLevel option is ignored. Should it be working? If not how can i > be done for WMS layers? > > I'm using OpenLayers 2.9. Thank you, > > Lu?s > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From adube at mapgears.com Tue May 18 08:23:08 2010 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] MinZoomLevel with WMS layer In-Reply-To: References: Message-ID: <4BF286AC.1060901@mapgears.com> Luis, How about minScale or minResolution properties of the Layer object ? Here's an example using these properties, but the lines are commented and they are used in the map object. Try one in one of your layer objects. http://www.openlayers.org/dev/examples/zoomLevels.html Regards, Alexandre Lu?s de Sousa wrote: > Hello everyone, > > I've been using the MinZoomLevel option on WFS layers to set the > minimum resolution beyond which a layer can be rendered (useful for > when there are lots of features). > > Today I'm trying to the same with a WMS layer, but in that case the > MinZoomLevel option is ignored. Should it be working? If not how can i > be done for WMS layers? > > I'm using OpenLayers 2.9. Thank you, > > Lu?s > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From christoph.ratke at gmx.net Tue May 18 09:26:19 2010 From: christoph.ratke at gmx.net (Christoph Ratke) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] customize getFeatureInfo control Message-ID: <4BF2957B.70004@gmx.net> Hi all, I am trying to to get the getfeatureinfo-control example (http://localhost/ol/OpenLayers-2.9.1/examples/getfeatureinfo-control.html) to work with either right click or a key down click. I tried the options clickCallback: "rightclick" and as well handlerOptions: {"click":{keyMask: OpenLayers.Handler.MOD_SHIFT|OpenLayers.Handler.MOD_CTRL}} both without success. What am I doing wroing? Regards, Christoph From tn at xcdroast.org Tue May 18 10:27:35 2010 From: tn at xcdroast.org (Toni7) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Brightness/Contrast Modifcation? Message-ID: <1274192855865-5070229.post@n2.nabble.com> Hello all, I am trying to display a map with openlayers but also provide brightness/contrast sliders for the user. I managed to implement a working demo for HTML5-Canvas with a static image (without OpenLayers). My question is now if it is possible to use an OpenLayers-Canvas-Layer for that as well. Perhaps someone looked already into this and can give me a pointer? Thank you, Toni -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Brightness-Contrast-Modifcation-tp5070229p5070229.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ashley_c_mort at raytheon.com Tue May 18 11:58:15 2010 From: ashley_c_mort at raytheon.com (mortac8) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] potential big IE performance enhancement- help! Message-ID: <1274198295847-5070709.post@n2.nabble.com> I think there is a potential to greatly improve the rendering performance in IE (cases of large# of points). Take points for example. In VML.js setStyle, every .style action seems to trigger a browser reflow: node.style.width="18px"; //1st reflow node.style.height="18px"; //2nd reflow node.style.top="10px"; //3rd reflow node.style.left="10px"; //4th reflow I am trying to do: node.style.cssText="width:18px;height:18px;top:10px;left:10px;"; //only 1 reflow! The node.style.cssText only works the first time (when the point is initially created and added). If I zoom on the map, I see my .cssText values changing (in IE Developer Tools) but the point always remains at the original screen location :( I am really pulling my hair out as to why we can't get node.style.cssText to take effect after the initial draw. Any ideas??? PS: If I set node.style.cssText, remove the node (removeChild), and then do this.vectorRoot.appendChild(node); the styling will be correct however the remove&add obviously negate any styling performance gains. Help! Thank you! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/potential-big-IE-performance-enhancement-help-tp5070709p5070709.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Tue May 18 12:10:25 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] potential big IE performance enhancement- help! In-Reply-To: <1274198295847-5070709.post@n2.nabble.com> References: <1274198295847-5070709.post@n2.nabble.com> Message-ID: <6711203E-B70E-4179-9F01-5A4294627D16@opengeo.org> Hi, setting cssText is not the same as setting the style. But you could instead try to call node.style.display = "none"; as first line of the setStyle method, and node.style.display = ""; as last line of the setStyle method. Let us know if this also boosts performance. Good luck, Andreas. On May 18, 2010, at 17:58 , mortac8 wrote: > > I think there is a potential to greatly improve the rendering performance in > IE (cases of large# of points). > > Take points for example. In VML.js setStyle, every .style action seems to > trigger a browser reflow: > node.style.width="18px"; //1st reflow > node.style.height="18px"; //2nd reflow > node.style.top="10px"; //3rd reflow > node.style.left="10px"; //4th reflow > > I am trying to do: > node.style.cssText="width:18px;height:18px;top:10px;left:10px;"; //only 1 > reflow! > > The node.style.cssText only works the first time (when the point is > initially created and added). If I zoom on the map, I see my .cssText > values changing (in IE Developer Tools) but the point always remains at the > original screen location :( > > I am really pulling my hair out as to why we can't get node.style.cssText to > take effect after the initial draw. Any ideas??? > > PS: If I set node.style.cssText, remove the node (removeChild), and then do > this.vectorRoot.appendChild(node); the styling will be correct however the > remove&add obviously negate any styling performance gains. > > Help! Thank you! > > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/potential-big-IE-performance-enhancement-help-tp5070709p5070709.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ashley_c_mort at raytheon.com Tue May 18 13:21:41 2010 From: ashley_c_mort at raytheon.com (mortac8) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] potential big IE performance enhancement- help! In-Reply-To: <6711203E-B70E-4179-9F01-5A4294627D16@opengeo.org> References: <1274198295847-5070709.post@n2.nabble.com> <6711203E-B70E-4179-9F01-5A4294627D16@opengeo.org> Message-ID: <1274203301980-5071123.post@n2.nabble.com> That actually seems a bit slower :( 2:59- to render my layer setting node.style.display="none"; then node.style.display=""; 2:42- the original way I don't understand why setting node.style.cssText is different than node.style. Can you explain it briefly? I ask because the simple example below seems to work as I'd expect VML.js:setStyle to work. Thanks again! Ashley
Andreas Hocevar-2 wrote: > > Hi, > > setting cssText is not the same as setting the style. But you could > instead try to call > > node.style.display = "none"; > > as first line of the setStyle method, and > > node.style.display = ""; > > as last line of the setStyle method. > > Let us know if this also boosts performance. > > Good luck, > Andreas. > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/potential-big-IE-performance-enhancement-help-tp5070709p5071123.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Tue May 18 14:48:48 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] potential big IE performance enhancement- help! In-Reply-To: <1274203301980-5071123.post@n2.nabble.com> References: <1274198295847-5070709.post@n2.nabble.com> <6711203E-B70E-4179-9F01-5A4294627D16@opengeo.org> <1274203301980-5071123.post@n2.nabble.com> Message-ID: On May 18, 2010, at 19:21 , mortac8 wrote: > > That actually seems a bit slower :( > 2:59- to render my layer setting node.style.display="none"; then > node.style.display=""; > 2:42- the original way > > I don't understand why setting node.style.cssText is different than > node.style. Can you explain it briefly? I ask because the simple example > below seems to work as I'd expect VML.js:setStyle to work. Because cssText is meant to set css on a CSS rule, not on a style. In IE, however, it works on styles (presumably accidently, and not very well). See the 2nd usage caveat on http://msdn.microsoft.com/en-us/library/ms533698(VS.85).aspx You could try node.cssText instead of node.style.cssText. Wouldn't surprise me if that would do the trick. Regards, Andreas. > > Thanks again! > Ashley > > > >
style="left:50px;top:50px;width:800px;height:600px;background-color:gray;"> >
>
style="position:absolute;width:5px;height:5px;left:100px;top:75px;background-color:red;">
> > > > > > > Andreas Hocevar-2 wrote: >> >> Hi, >> >> setting cssText is not the same as setting the style. But you could >> instead try to call >> >> node.style.display = "none"; >> >> as first line of the setStyle method, and >> >> node.style.display = ""; >> >> as last line of the setStyle method. >> >> Let us know if this also boosts performance. >> >> Good luck, >> Andreas. >> >> > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/potential-big-IE-performance-enhancement-help-tp5070709p5071123.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From jimlug at co.clackamas.or.us Tue May 18 15:03:28 2010 From: jimlug at co.clackamas.or.us (Dash) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] IE 8 this.size.w is null or not an object -OL 2.9 In-Reply-To: <1273180138073-5016510.post@n2.nabble.com> References: <1273013165660-5006221.post@n2.nabble.com> <1273174775485-5016099.post@n2.nabble.com> <1273180138073-5016510.post@n2.nabble.com> Message-ID: <1274209408371-5071576.post@n2.nabble.com> Well, after many hours of struggling and the process of elimination I figured it out . I'll share my results for anyone else struggling like me . Previously, I was using a getFullSRequestString with a OpenLayers.loadURL to return an Ajax object that contained my GML information. Then, I converted the response into and XML format for parsing. xmlFormat = new OpenLayers.Format.XML().read(response.responseText); >From the XML, I needed to obtain some tag information. I've placed a field ("feature") in my data that describes the title of the layer. I used this to identify which layer I'm working with. featureType = xmlFormat.getElementsByTagName("feature")[0]; // This is the part that did not work in IE but every other browser lyrName = featureType.textContent; // Provided me with layer name that was stored in feature field Since I'm rather new to DOM and XML parsing I had to dig a little deeper and this is what I found. featureType = xmlFormat.getElementsByTagName("feature")[0].firstChild.data; The above statement worked in all browsers: IE, Safari, Opera and Firefox. I hope this helps. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE-8-this-size-w-is-null-or-not-an-object-OL-2-9-tp5006221p5071576.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From beppenapo at gmail.com Tue May 18 18:46:58 2010 From: beppenapo at gmail.com (beppe) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] insert new geomtery attributes Message-ID: <1274222818.2633.38.camel@beppe> Hi all, I'm not sure to understand how to insert new geometry and pass attributes to db via form... So, I can add a new geometry (wfs-t) using "OpenLayers.State.INSERT", ok but I'd want also open a popup with a form to compile (with select, text input, check box ...) onclick event Some tips? thanks -beppe- From n13green at gmail.com Tue May 18 19:26:24 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] unselect and move between layers Message-ID: <1274225184139-5072650.post@n2.nabble.com> Hi all, I have a function that is executed when a user hits a submit button in a popup form (below). This saves changes both to the map feature and to the database. I have 2 problems. One My unselect isn't working - here and in other places in the code - but every other function using my selectedFeature variable works fine. selectControl.unselect(selectedFeature); In some cases I want to destroy the feature and redraw it on another layer, but so far have had no luck using the destroyFeatures function using any of the various methods I've seen described online. My variables are: selectedFeature - the feature origLayer - layer the feature is currently on tgtLayer - layer the feature needs to be moved to Any help anyone can provide would be greatly appreciated. Thanks, Nick. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/unselect-and-move-between-layers-tp5072650p5072650.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From nikida78 at gmail.com Tue May 18 22:37:13 2010 From: nikida78 at gmail.com (adstan) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Insert additional parameters to event listeners Message-ID: <1274236633425-5073085.post@n2.nabble.com> Hi all, Is there a way I could add additional parameters to event listeners? Please refer to this example: var control = new OpenLayers.Control.DrawFeature( someLayer, OpenLayers.Handler.Point, { featureAdded: someFunction }); ... function: someFunction(feature, param2) { ... } In the abovementioned example, how can I get the featureAdded event to insert additional parameters to the "someFunction" method? Thanks!!! Ads -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Insert-additional-parameters-to-event-listeners-tp5073085p5073085.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed May 19 04:14:29 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] insert new geomtery attributes In-Reply-To: <1274222818.2633.38.camel@beppe> References: <1274222818.2633.38.camel@beppe> Message-ID: <49AF0CDE-EED6-44A7-8ACB-90160B87A36B@opengeo.org> On May 19, 2010, at 00:46 , beppe wrote: > Hi all, > I'm not sure to understand how to insert new geometry and pass > attributes to db via form... > So, I can add a new geometry (wfs-t) using "OpenLayers.State.INSERT", ok > but I'd want also open a popup with a form to compile (with select, text > input, check box ...) onclick event > > Some tips? JavaScript and/or your favorite JS framework (JQuery, Ext JS) is your friend. Or have a look at GeoExt (http://geoext.org/) and the FeatureEditing ux (http://trac.geoext.org/wiki/ux/FeatureEditing). Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From pfischer at zebra.com Wed May 19 04:20:39 2010 From: pfischer at zebra.com (The_Zebra) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] getting name placemark from a kml-file Message-ID: <1274257239712-5073940.post@n2.nabble.com> hallo, i want to display on map some icons, written in a kml file. i do this with the following statement: markers = new OpenLayers.Layer.GML("KML", "unit.kml", {format: OpenLayers.Format.KML, formatOptions: { extractStyles: true, extractAttributes: true,} }); map.addLayer(markers); this runs great, but now my problem: in the kml file is also the name of the icon i am displaying: Tractor1 1 0 #SmallTractor 4.486325, 50.90313777777778 i want to open/show a label or popup by clicking on the icon in the map. this label should show the name which is written in the kml file, in this case the "Tractor1". How can i realise that? Please Help Thanks! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/getting-name-placemark-from-a-kml-file-tp5073940p5073940.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bamerbalazs at gmail.com Wed May 19 07:16:48 2010 From: bamerbalazs at gmail.com (=?UTF-8?B?QmFsw6F6cyBCw6FtZXI=?=) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] WFS maxFeatures Message-ID: Hi All, I would like to ask if there is a way to determine if the WFS GetFeature request contains all the result features or there would be more but the maxFeatures parameter clipped the result set. Well, my OpenLayers application could know about the maxFeatures value, but if the number of result features equals to maxFeatures, I'm still in trouble. I've read the WFS specification, but no relevant tag is presented there. best regards: Bal?zs B?mer From bartvde at osgis.nl Wed May 19 07:22:20 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] WFS maxFeatures In-Reply-To: References: Message-ID: Sure, perform a GetFeature request with resultType hits and you'll know. Best regards, Bart On May 19, 2010, at 1:16 PM, Bal?zs B?mer wrote: > Hi All, > > I would like to ask if there is a way to determine if the WFS > GetFeature request contains all the result features or there would be > more but the maxFeatures parameter clipped the result set. Well, my > OpenLayers application could know about the maxFeatures value, but if > the number of result features equals to maxFeatures, I'm still in > trouble. I've read the WFS specification, but no relevant tag is > presented there. > > best regards: Bal?zs B?mer > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From bamerbalazs at gmail.com Wed May 19 07:26:14 2010 From: bamerbalazs at gmail.com (=?UTF-8?B?QmFsw6F6cyBCw6FtZXI=?=) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] WFS maxFeatures In-Reply-To: References: Message-ID: Hi Bart, > Sure, perform a GetFeature request with resultType hits and you'll know. Yes, I know but that would be 2 requests each performing a possibly long dastabase operation. And it would require extra processing on the client side. Well, this would be required only for the equal case... Now I know the solution. I specify a somewhat higher limit and if the result count reaches the limit, I cancel the result set even if it would be the equal case. best regards: Bal?zs From florent.gravin at gmail.com Wed May 19 08:28:58 2010 From: florent.gravin at gmail.com (Florent Gravin) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] getCapabilities multithread Message-ID: <346ECE2BC793484C8C2A793F3183EDD4@Neggro113> Hi, i launch about 15 getCapabilities request before loading my map application. i use GeoExt.data.WMSCapabilitiesStore and the proxy.cgi of openlayers in my url param to load my store. item.layersStore = new GeoExt.data.WMSCapabilitiesStore({ url: '/cgi-bin/proxy.cgi?url=', baseParams: { url : item.url + '?request=GetCapabilities&SERVICE=WMS&VERSION=1.1.1' + (item.namespace? '&NAMESPACE=' + item.namespace : '')} }); it works well, but 15 requests make my app a bit slow to load. it's like other loading operations of the app (in particulary ajax ones) are interrupted until my 15 request haven't been all respond. Is there a way to multithread all the request, or way that they take less ressources ? thks for help -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100519/b2e132ef/attachment.html From mike at uwmike.com Wed May 19 09:53:19 2010 From: mike at uwmike.com (Mike Purvis) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Insert additional parameters to event listeners In-Reply-To: <1274236633425-5073085.post@n2.nabble.com> References: <1274236633425-5073085.post@n2.nabble.com> Message-ID: Hi Ads, It kinda depends what parameters you want in there. The "featureAdded" handler is going to be a generic one, so it will have to get a lot of its information about the feature and so-on at its own runtime. However, what you probably want to do is use a closure: var control = new OpenLayers.Control.DrawFeature( someLayer, OpenLayers.Handler.Point, { featureAdded: this.createFeatureAddedHandler(param1, param2) }); ... function: createFeatureAddedHandler(param1, param2) { return function(feature) { // In here you have access perpetually to the param1 and param2 // that were passed in when the handler was created. } } If you'd like further information, the Wikipedia article has some good examples, despite the obtuse introduction: http://en.wikipedia.org/wiki/Closure_(computer_science) On Tue, May 18, 2010 at 10:37 PM, adstan wrote: > > Hi all, > > Is there a way I could add additional parameters to event listeners? Please > refer to this example: > > var control = new OpenLayers.Control.DrawFeature( > someLayer, OpenLayers.Handler.Point, { > featureAdded: someFunction > }); > > ... > > function: someFunction(feature, param2) { > ... > } > > In the abovementioned example, how can I get the featureAdded event to > insert additional parameters to the "someFunction" method? > > Thanks!!! > > Ads > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Insert-additional-parameters-to-event-listeners-tp5073085p5073085.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- http://uwmike.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100519/da7ac039/attachment.html From brfr at metrico.lu Wed May 19 10:44:59 2010 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Help with Strategy.save and protocol.http Message-ID: <4BF3F96B.3060209@metrico.lu> Hello all, I am currently (virtually ;-))fighting to understand how I can make an editable layer in OpenLayers. Especially the connection between the save-strategy and the protocol is difficult to understand. I already searched the docs and the mailing list, but was unable to find some kind of definition what exactly a strategy or a protocol is and for what kind of "behavoir" they are responsible. I managed to create a working example, where I could edit/create/modify features and the changes were sent to my server but I really lack understanding how things work together ... var points = new OpenLayers.Layer.Vector( 'Viaah Points', { 'protocol' : new OpenLayers.Protocol.HTTP( { 'url' : '/my/layer.geojson', 'format' : new OpenLayers.Format.GeoJSON() } ), 'strategies' : [ new OpenLayers.Strategy.BBOX(), new OpenLayers.Strategy.Save({auto:true}) ] } ); I added a standard editing toolbar, and with the auto:true save-strategy I could see the requests sent to the server in firebug. From what I have guessed so far: Is it true that the save-strategy uses the protocols methods for read/update/create/delete depending on the edit-actions taken by the user? And I presume it's somewhat hard-coded, that updates are done by a HTTP PUT, create by HTTP POST etc. ? In the mailing lists post I often saw a callback function mentioned for the protocol - does this function get called after the request has been sent to the server? I am sure I have more questions, but these are the most basic ones concerning editing of features. Any info on these internals is greatly welcome Frank -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From eric.lemoine at camptocamp.com Wed May 19 11:56:57 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Help with Strategy.save and protocol.http In-Reply-To: <4BF3F96B.3060209@metrico.lu> References: <4BF3F96B.3060209@metrico.lu> Message-ID: On Wed, May 19, 2010 at 3:44 PM, Frank Broniewski wrote: > Hello all, > > I am currently (virtually ;-))fighting to understand how I can make an > editable layer in OpenLayers. Especially the connection between the > save-strategy and the protocol is difficult to understand. I already > searched the docs and the mailing list, but was unable to find some kind > of definition what exactly a strategy or a protocol is and for what kind > of "behavoir" they are responsible. > > I managed to create a working example, where I could edit/create/modify > features and the changes were sent to my server but I really lack > understanding how things work together ... > > var points = new OpenLayers.Layer.Vector( > ? ? ? ?'Viaah Points', > ? ? ? ?{ > ? ? ? ? ? ? ? ?'protocol' : new OpenLayers.Protocol.HTTP( > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?{ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'url' : '/my/layer.geojson', > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'format' : new OpenLayers.Format.GeoJSON() > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ?), > ? ? ? ? ? ? ? ?'strategies' : [ > ? ? ? ? ? ? ? ? ? ? ? ?new OpenLayers.Strategy.BBOX(), > ? ? ? ? ? ? ? ? ? ? ? ?new OpenLayers.Strategy.Save({auto:true}) > ? ? ? ? ? ? ? ?] > ? ? ? ?} > ); > > I added a standard editing toolbar, and with the auto:true save-strategy > I could see the requests sent to the server in firebug. > > ?From what I have guessed so far: Is it true that the save-strategy uses > the protocols methods for read/update/create/delete depending on the > edit-actions taken by the user? The save strategy just calls protocol.commit(). See . The protocol's commit method looks at the states of the features and calls the appropriate method (update/create/delete). See . > And I presume it's somewhat hard-coded, > that updates are done by a HTTP PUT, create by HTTP POST etc. ? Yes. > In the > mailing lists post I often saw a callback function mentioned for the > protocol - does this function get called after the request has been sent > to the server? No, after the response is received. > > I am sure I have more questions, but these are the most basic ones > concerning editing of features. Any info on these internals is greatly > welcome The code is a great information source to know about the internals of OpenLayers :-) -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From n13green at gmail.com Wed May 19 17:25:56 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] insert new geomtery attributes In-Reply-To: <1274222818.2633.38.camel@beppe> References: <1274222818.2633.38.camel@beppe> Message-ID: <1274304356393-5077033.post@n2.nabble.com> There are others, but I used this example's basic form setup. http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/styles_unique_with_group.html http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/styles_unique_with_group.html For passing info to a database, AJAX can do that. http://www.w3schools.com/ajax/default.asp http://www.w3schools.com/ajax/default.asp The specific bits you really need are this (best defined globally): var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } and then in your function to save you need something like: var geom_x = feature.geometry.x; var geom_y = feature.geometry.y; xmlhttp.open("GET","proc/proc_map_point_new.php?"map_num="+map_num+"&x="+geom_x+"&y="+geom_y,true); xmlhttp.send(); and if you want to return a confirmation of the edit changes: if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("edit_msg_" + fid).innerHTML="Saved"; } And you'll obviously need to alter the GET url to include any extra attributes you want to save to the database from the form. Be aware that when referencing popup forms, each popup form field needs to be unique and the feature.id is a good way to do that, eg. And referencing that value to send it to the database would be: function editPoint(fid){ var ed_id = document.getElementById("disp_id_" + fid).value; -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/insert-new-geomtery-attributes-tp5072541p5077033.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From n13green at gmail.com Wed May 19 17:38:45 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Help with Strategy.save and protocol.http In-Reply-To: <4BF3F96B.3060209@metrico.lu> References: <4BF3F96B.3060209@metrico.lu> Message-ID: <1274305125294-5077092.post@n2.nabble.com> I'm far from an expert, but I know that it's possible to edit features on the map and save those changes externally (eg to a database) without these strategies or protocols. I write them directly to feature attributes and send the data to a db with AJAX. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Help-with-Strategy-save-and-protocol-http-tp5075277p5077092.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From p.scadden at gns.cri.nz Wed May 19 18:57:59 2010 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] getting name placemark from a kml-file In-Reply-To: <1274257239712-5073940.post@n2.nabble.com> References: <1274257239712-5073940.post@n2.nabble.com> Message-ID: <4BF46CF7.9070307@gns.cri.nz> > i want to open/show a label or popup by clicking on the icon in the map. > this label should show the name which is written in the kml file, in this > case the "Tractor1". > > See the KML examples but basics are - use a SelectFeature control and assign events to featurehighlighted and featureunhighlighted. My onfeaturehighlighted (following the examples closely), looks like below. Note the feature.attributes.name which what you want. function onKmlFeatureSelect(event) { var feature = event.feature; // Since KML is user-generated, do naive protection against // Javascript. var content if (feature.style.balloonStyle) { // Use Style.js to replace balloonstyle variables with attribute values content = OpenLayers.Style.createLiteral(feature.style.balloonStyle, feature); } else if (!feature.attributes.description && !feature.attributes.name) { content = "\n"; for (var i in feature.attributes){ content += "\n"; } content += "
" + feature.attributes[i] + "
\n"; } else { content = '
' + feature.attributes.name + "
" + feature.attributes.description; } if (content.search(" Hi everyone, I would use OpenLayers with Google maps, Vector layers and Geoscopio layers. I think I've some trouble with projections. Geoscopio maps are available with projections EPSG:4326 and EPSG:3003. How can I set all parts to work together? If I use "standard" projection for google I'm using that code get from various examples, in that way the only layer doesn't work properly is the "Tuscany Map": ... var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34) }; map = new OpenLayers.Map('map',options); map.addControl(new OpenLayers.Control.LayerSwitcher()); var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP, sphericalMercator:true} ); var wms = new OpenLayers.Layer.WMS("Tuscany Map", " http://web.rete.toscana.it/sgrwms/com.rt.wms.RTmap?servicename=_rt_wms&version=1.1.1&SRS=EPSG:3003 ", { projection: map.displayProjection, layers: 'idcomuni', transparent: 'true' }); var layerGML = new OpenLayers.Layer.Vector("Layer Vector", { projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "markers.kml", format: new OpenLayers.Format.KML({ extractStyles: true, extractAttributes: true }) }) }); map.addLayers([gmap, ghyb, layerGML]); ... -- Willy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100520/9132c46f/attachment.html From brfr at metrico.lu Thu May 20 04:02:30 2010 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Help with Strategy.save and protocol.http In-Reply-To: References: <4BF3F96B.3060209@metrico.lu> Message-ID: <4BF4EC96.9000409@metrico.lu> Hello Eric, all, > The save strategy just calls protocol.commit(). See > . > > The protocol's commit method looks at the states of the features and > calls the appropriate method (update/create/delete). See > . If it "just" calls protocol.commit(), what's the reason for having a save-strategy? Is it to have some kind of user - frontend to the protocols methods? If I don't use the save-strategies autosave feature, there's for me no difference wether I call protocol.commit() or strategy.save(). Or is there something more to using strategy.save() or strategies in general? Something like: "Don't use protocols directly, it is preferred to use them through strategies.", thus a design decision? From looking at the code ;-) I see that there is a projection check and an optional transformation to the remote projection, so that would be the "only" difference before protocol.commit(), right? I presume, the transformation is mostly there for the google projection (900913) to wgs84 transformation, or does OpenLayers have already some kind of proj support built in? > I'm far from an expert, but I know that it's possible to edit features on the > map and save those changes externally (eg to a database) without these > strategies or protocols. I write them directly to feature attributes and > send the data to a db with AJAX. Well, obvious I am also far from being an expert, but I like to understand how things work together and from my standpoint I don't see the reason to wrap up my own communication protocol when I can use a built-in one, especially when I use GeoJSON as a transport format and I just need to specify that in my layer definition. This feels very snappy, it fits nicely together, simply using the protocol and strategy with my layer. No need to reenvent the wheel a second time ... Well, thanks for the clarification so far. This should get me going with my project Frank -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From n13green at gmail.com Thu May 20 05:09:01 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Help with Strategy.save and protocol.http In-Reply-To: <4BF4EC96.9000409@metrico.lu> References: <4BF3F96B.3060209@metrico.lu> <4BF4EC96.9000409@metrico.lu> Message-ID: <1274346541575-5078818.post@n2.nabble.com> I can appreciate that. I just thought it worth pointing out you can get by without it in case no-one can provide a better answer. I'm curious to see an answer to your question too. The save function I wrote is quite short and simple - it's just feature.attributes.xxxx = "xxxx" etc. and a couple of lines of standard AJAX. But if there is a built-in way to do the same it would be interesting to see it. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Help-with-Strategy-save-and-protocol-http-tp5075277p5078818.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From n13green at gmail.com Thu May 20 05:22:25 2010 From: n13green at gmail.com (ngreen) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Style issue with LayerSwitcher In-Reply-To: References: Message-ID: <1274347345696-5078860.post@n2.nabble.com> I've only played with this a little bit myself, but Mika's suggestion in this thread might be what you need. http://osgeo-org.1803224.n2.nabble.com/changing-fonts-in-the-layerswitcher-td3623357.html http://osgeo-org.1803224.n2.nabble.com/changing-fonts-in-the-layerswitcher-td3623357.html And I've played around with this method too. http://openlayers.org/pipermail/users/2009-June/012118.html http://openlayers.org/pipermail/users/2009-June/012118.html -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Style-issue-with-LayerSwitcher-tp5046800p5078860.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Thu May 20 08:04:17 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Help with Strategy.save and protocol.http In-Reply-To: <4BF4EC96.9000409@metrico.lu> References: <4BF3F96B.3060209@metrico.lu> <4BF4EC96.9000409@metrico.lu> Message-ID: On Thu, May 20, 2010 at 9:02 AM, Frank Broniewski wrote: > Hello Eric, all, > >> The save strategy just calls protocol.commit(). See >> >> . >> >> The protocol's commit method looks at the states of the features and >> calls the appropriate method (update/create/delete). See >> >> . > > If it "just" calls protocol.commit(), what's the reason for having a > save-strategy? Is it to have some kind of user - frontend to the protocols > methods? If I don't use the save-strategies autosave feature, there's for me > no difference wether I call protocol.commit() or strategy.save(). Look at the onCommit method in the strategy, it does some work. > Or is > there something more to using strategy.save() or strategies in general? > Something like: "Don't use protocols directly, it is preferred to use them > through strategies.", thus a design decision? To me there's no such principle. > From looking at the code ;-) I see that there is a projection check and an > optional transformation to the remote projection, so that would be the > "only" difference before protocol.commit(), right? onCommit does other things. > I presume, the > transformation is mostly there for the google projection (900913) to wgs84 > transformation, or does OpenLayers have already some kind of proj support > built in? OpenLayers can be used with proj4js. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From janhenrik.overland at gmail.com Thu May 20 08:30:55 2010 From: janhenrik.overland at gmail.com (=?ISO-8859-1?Q?Jan_Henrik_=D8verland?=) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] this.div.appendChild is not a function OpenLayers.js (line 897) Message-ID: Hi, Firebug reports: this.div.appendChild is not a function OpenLayers.js (line 897) -> this.div.appendChild(this.element); By using alerts I can see that this happens when the overviewmap control is added to the map: MAP.addControl(new OpenLayers.Control.OverviewMap({ div: $('overviewmap'), size: new OpenLayers.Size(188, 97), minRectSize: 0 })); The mouse position control has stopped working as well (I comment out the overviewmap and get no errors). This has worked perfectly for a long time, and I didn't change any libs recently. Still using OL 2.8. What could cause this error? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100520/ce59fdea/attachment.html From strk at keybit.net Thu May 20 08:49:13 2010 From: strk at keybit.net (strk) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Dynamically adding Strategies to Layer ? Message-ID: <20100520124913.GL82349@keybit.net> Is there any standard way to add a Strategy to a Layer after the layer was created and placed on the map ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From bartvde at osgis.nl Thu May 20 08:52:53 2010 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Dynamically adding Strategies to Layer ? In-Reply-To: <20100520124913.GL82349@keybit.net> References: <20100520124913.GL82349@keybit.net> Message-ID: <57138.145.50.39.11.1274359973.squirrel@webmail.hostingdiscounter.nl> I think using setLayer and then activating the strategy, at least that what I did in my SOS Layer: http://trac.openlayers.org/attachment/ticket/2565/2565.patch Best regards, Bart > Is there any standard way to add a Strategy to a Layer > after the layer was created and placed on the map ? > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From janhenrik.overland at gmail.com Thu May 20 09:27:40 2010 From: janhenrik.overland at gmail.com (=?ISO-8859-1?Q?Jan_Henrik_=D8verland?=) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] this.div.appendChild is not a function OpenLayers.js (line 897) In-Reply-To: References: Message-ID: Using OL 2.9.1 did not solve it. On Thu, May 20, 2010 at 2:30 PM, Jan Henrik ?verland < janhenrik.overland@gmail.com> wrote: > Hi, Firebug reports: this.div.appendChild is not a function OpenLayers.js > (line 897) -> this.div.appendChild(this.element); > > By using alerts I can see that this happens when the overviewmap control is > added to the map: > > MAP.addControl(new OpenLayers.Control.OverviewMap({ > div: $('overviewmap'), > size: new OpenLayers.Size(188, 97), > minRectSize: 0 > })); > > The mouse position control has stopped working as well (I comment out the > overviewmap and get no errors). > > This has worked perfectly for a long time, and I didn't change any libs > recently. Still using OL 2.8. What could cause this error? > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100520/82e44c61/attachment.html From bartvde at osgis.nl Thu May 20 09:42:07 2010 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] this.div.appendChild is not a function OpenLayers.js (line 897) In-Reply-To: References: Message-ID: <42642.145.50.39.11.1274362927.squirrel@webmail.hostingdiscounter.nl> Hi, can you show us a *minimal* example to reproduce your issue? Best regards, Bart > Using OL 2.9.1 did not solve it. > > > On Thu, May 20, 2010 at 2:30 PM, Jan Henrik ?verland < > janhenrik.overland@gmail.com> wrote: > >> Hi, Firebug reports: this.div.appendChild is not a function >> OpenLayers.js >> (line 897) -> this.div.appendChild(this.element); >> >> By using alerts I can see that this happens when the overviewmap control >> is >> added to the map: >> >> MAP.addControl(new OpenLayers.Control.OverviewMap({ >> div: $('overviewmap'), >> size: new OpenLayers.Size(188, 97), >> minRectSize: 0 >> })); >> >> The mouse position control has stopped working as well (I comment out >> the >> overviewmap and get no errors). >> >> This has worked perfectly for a long time, and I didn't change any libs >> recently. Still using OL 2.8. What could cause this error? >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From brfr at metrico.lu Thu May 20 10:33:11 2010 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] renderintent not persistent Message-ID: <4BF54827.6090100@metrico.lu> Hi, I have a modified ModifyFeature.handleKeypress function for deleting features from a layer. There I set the feature's state to deleted just as I do it with the renderIntent of the feature. Whenever I click into the map after deleting a feature, it appears back on the map because the renderIntent is somewhere set back to default. Unfortunately I can't find where or why. My code so far (ModifyFeature.prototype.handleKeypress): ... this.onModification(this.feature); this.layer.events.triggerEvent("featuremodified", {feature: this.feature}); } else { if(confirm("Do you want to delete the selected feature?")){ var feature = this.feature; if(feature.id == undefined) { this.layer.destroyFeatures([feature]); } feature.state = OpenLayers.State.DELETE; this.layer.drawFeature(feature, 'delete'); feature.renderIntent = "delete"; } } I could set the feature.style to OpenLayers.Feature.Vector.style["delete"] and this is persistent, but I wonder why the renderintent does not keep its state. Frank -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From hermsdorfer84 at web.de Thu May 20 10:34:43 2010 From: hermsdorfer84 at web.de (Martin.L) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers Message-ID: <1274366083654-5079946.post@n2.nabble.com> Keywords: Openlayers, GeoExt, GeoServer, Browsers Hi at all! First of all..yep I know about similar problems in other threads and forums but I dont find a solution for this problem. I try to make a GeoExt.Popup with informations from WMSGetFeatureInfo in my mapping-application. Here is the code for this popup: // GeoExt Popup II var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo(); featureInfo.events.on({ getfeatureinfo: function(e) { new GeoExt.Popup({ title: 'Feature Info', width: 200, height: 150, autoScroll: true, map: map, lonlat: map.getLonLatFromPixel(e.xy), html: e.text }).show(); setInfoToDiv(e.text); } }); map.addControl(featureInfo); featureInfo.activate(); // Method for testing Output in a DIV function setInfoToDiv(text) { document.getElementById("abfrage").innerHTML=text; } For IE8 is everything fine. I get the FeatureInfo in the GeoExt.Popup and the testing output in the DIV "abfrage". If I test it in Firefox3.5, I dont get any output. Either the text in the GeoExt.Popup or the text in the DIV. But I do get the Popup-Window (without any text). If I copy the Request given me by Firebug in a new tab, I get the Response correctly. What do I wrong? Any suggestions would help me. THX Martin -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5079946.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From cdobell at meteostar.com Thu May 20 11:19:25 2010 From: cdobell at meteostar.com (cdobell) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Using OpenLayers with Google, Vector and Geoscopio layers In-Reply-To: References: Message-ID: <1274368765642-5080157.post@n2.nabble.com> Your Tuscany Map url has SRS=EPSG:3003 which is not your map displayProjection. Change that to SRS=EPSG:4326. Also, WMS layers are base layers by default so you need to specify it is an overlay by writing isBaseLayer: false in your options. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Using-OpenLayers-with-Google-Vector-and-Geoscopio-layers-tp5078539p5080157.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From cdobell at meteostar.com Thu May 20 11:31:25 2010 From: cdobell at meteostar.com (cdobell) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Making vector layers. In-Reply-To: References: Message-ID: <1274369485325-5080205.post@n2.nabble.com> Try using featureName instead of typeName in your WFS Protocol parameters. Also, include featureNS even though it is technically optional. Also, you might want to explicitly declare your projection and displayProjection in your map options as it may help the community analyze your issue. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Making-vector-layers-tp5065699p5080205.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From cdobell at meteostar.com Thu May 20 11:42:59 2010 From: cdobell at meteostar.com (cdobell) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] wfs request in Openlayer from Geoserver gives NullPointerException In-Reply-To: <1251219256083-3511346.post@n2.nabble.com> References: <1251219256083-3511346.post@n2.nabble.com> Message-ID: <1274370179966-5080260.post@n2.nabble.com> I noticed the SRS value in the GetCapabilities return is messed up: EPSG:EPSG:4269 This might be a typo in your GeoServer layer. Try changing that first. In line with this, your WFS request has EPSG:4326 as SRS and your layer may not provide EPSG:4326. I can only see EPSG:4269 in your snippet of GetCapabilities. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/wfs-request-in-Openlayer-from-Geoserver-gives-NullPointerException-tp3511346p5080260.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From janhenrik.overland at gmail.com Thu May 20 13:02:48 2010 From: janhenrik.overland at gmail.com (=?ISO-8859-1?Q?Jan_Henrik_=D8verland?=) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] this.div.appendChild is not a function OpenLayers.js (line 897) In-Reply-To: <42642.145.50.39.11.1274362927.squirrel@webmail.hostingdiscounter.nl> References: <42642.145.50.39.11.1274362927.squirrel@webmail.hostingdiscounter.nl> Message-ID: It was a jQuery $() problem. The noConflict method solved it. On Thu, May 20, 2010 at 3:42 PM, Bart van den Eijnden (OSGIS) < bartvde@osgis.nl> wrote: > Hi, > > can you show us a *minimal* example to reproduce your issue? > > Best regards, > Bart > > > Using OL 2.9.1 did not solve it. > > > > > > On Thu, May 20, 2010 at 2:30 PM, Jan Henrik ?verland < > > janhenrik.overland@gmail.com> wrote: > > > >> Hi, Firebug reports: this.div.appendChild is not a function > >> OpenLayers.js > >> (line 897) -> this.div.appendChild(this.element); > >> > >> By using alerts I can see that this happens when the overviewmap control > >> is > >> added to the map: > >> > >> MAP.addControl(new OpenLayers.Control.OverviewMap({ > >> div: $('overviewmap'), > >> size: new OpenLayers.Size(188, 97), > >> minRectSize: 0 > >> })); > >> > >> The mouse position control has stopped working as well (I comment out > >> the > >> overviewmap and get no errors). > >> > >> This has worked perfectly for a long time, and I didn't change any libs > >> recently. Still using OL 2.8. What could cause this error? > >> > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100520/a39f52ac/attachment.html From strk at keybit.net Thu May 20 13:06:43 2010 From: strk at keybit.net (strk) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Dynamically adding Strategies to Layer ? In-Reply-To: <57138.145.50.39.11.1274359973.squirrel@webmail.hostingdiscounter.nl> References: <20100520124913.GL82349@keybit.net> <57138.145.50.39.11.1274359973.squirrel@webmail.hostingdiscounter.nl> Message-ID: <20100520170643.GN82349@keybit.net> On Thu, May 20, 2010 at 02:52:53PM +0200, Bart van den Eijnden (OSGIS) wrote: > I think using setLayer and then activating the strategy, at least that > what I did in my SOS Layer: > > http://trac.openlayers.org/attachment/ticket/2565/2565.patch Thanks, yes I've done something like that lately, but the setLayer is good to know about (I was naively setting strategy.layer directly) For cluster I also had to handle the caching and initial clustering myself. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html From cdobell at meteostar.com Thu May 20 13:48:25 2010 From: cdobell at meteostar.com (cdobell) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274366083654-5079946.post@n2.nabble.com> References: <1274366083654-5079946.post@n2.nabble.com> Message-ID: <1274377705394-5080824.post@n2.nabble.com> My first thought was that you needed to specify 'layers' and 'layerstoquery' parameters. Maybe IE8 somehow manages to set the top/current layer. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5080824.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu May 20 14:05:36 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274377705394-5080824.post@n2.nabble.com> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> Message-ID: <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> To me this sounds more like a same origin issue. Internet Explorer treats the same domain with a different port as same origin: http://localhost/ http://localhost:8080/ Other browsers don't. Some reading for the OP on this: http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost http://geoserver.org/display/GEOSDOC/How+to+proxy+Jetty+through+Apache+on+port+80 Regards, Andreas. On May 20, 2010, at 19:48 , cdobell wrote: > > My first thought was that you needed to specify 'layers' and 'layerstoquery' > parameters. Maybe IE8 somehow manages to set the top/current layer. > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5080824.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From cdobell at meteostar.com Thu May 20 14:52:09 2010 From: cdobell at meteostar.com (cdobell) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] How to display a specific place ? In-Reply-To: <1274077723868-5063850.post@n2.nabble.com> References: <1274077723868-5063850.post@n2.nabble.com> Message-ID: <1274381529997-5081089.post@n2.nabble.com> First, make sure that you're adding your google layer to map. In one of your examples, you only added the wms layer. Second, since google maps are EPSG:900913, you'll need to pass it meters instead of a lon,lat. Set up a point or bounds you know (lon,lat) and then transform that point/bounds to the google projection. // I saw a reference to this lat,lon coordinate: 63.259591,-144.667969 var GEOGRAPHIC_PROJECTION = new OpenLayers.Projection("EPSG:4326"); // stnd LAT,LON via WGS84 datum var MERCATOR_PROJECTION = new OpenLayers.Projection("EPSG:900913"); // '900913' == 'GOOGLE' projection var IndiaCenterPointGeographic = new OpenLayers.LonLat(-144.667969,63.259591); // lon,lat var IndiaCenterPointMercator = IndiaCenterPointGeographic.transform(GEOGRAPHIC_PROJECTION,MERCATOR_PROJECTION); var startZoomLevel = 5; //.... //set up map and layers... //.... map.setCenter(IndiaCenterPointMercator,startZoomLevel); -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-display-a-specific-place-tp5063850p5081089.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ravikrishna at qburst.com Thu May 20 23:40:55 2010 From: ravikrishna at qburst.com (Ravi Krishna) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] How to display a specific place ? In-Reply-To: <1274381529997-5081089.post@n2.nabble.com> References: <1274077723868-5063850.post@n2.nabble.com> <1274381529997-5081089.post@n2.nabble.com> Message-ID: Thanks cdobell, It worked :) On Fri, May 21, 2010 at 12:22 AM, cdobell [via OSGeo.org] < ml-node+5081089-668295985-541374@n2.nabble.com > wrote: > First, make sure that you're adding your google layer to map. In one of > your examples, you only added the wms layer. > > Second, since google maps are EPSG:900913, you'll need to pass it meters > instead of a lon,lat. Set up a point or bounds you know (lon,lat) and then > transform that point/bounds to the google projection. > > // I saw a reference to this lat,lon coordinate: 63.259591,-144.667969 > > var GEOGRAPHIC_PROJECTION = new OpenLayers.Projection("EPSG:4326"); // stnd > LAT,LON via WGS84 datum > var MERCATOR_PROJECTION = new OpenLayers.Projection("EPSG:900913"); // > '900913' == 'GOOGLE' projection > var IndiaCenterPointGeographic = new > OpenLayers.LonLat(-144.667969,63.259591); // lon,lat > var IndiaCenterPointMercator = > IndiaCenterPointGeographic.transform(GEOGRAPHIC_PROJECTION,MERCATOR_PROJECTION); > > var startZoomLevel = 5; > //.... > //set up map and layers... > //.... > map.setCenter(IndiaCenterPointMercator,startZoomLevel); > > > ------------------------------ > View message @ > http://osgeo-org.1803224.n2.nabble.com/How-to-display-a-specific-place-tp5063850p5081089.html > To unsubscribe from How to display a specific place ?, click here. > > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-display-a-specific-place-tp5063850p5082565.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100520/f0b1cdb9/attachment.html From gruppi at willygroup.org Fri May 21 02:50:06 2010 From: gruppi at willygroup.org (Willy) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Using OpenLayers with Google, Vector and Geoscopio layers In-Reply-To: <1274368765642-5080157.post@n2.nabble.com> References: <1274368765642-5080157.post@n2.nabble.com> Message-ID: I've tried also in that way (and in many others), but the Tuscany map is not properly shown (it's very small and moved respect the others). 2010/5/20 cdobell > > Your Tuscany Map url has SRS=EPSG:3003 which is not your map > displayProjection. Change that to SRS=EPSG:4326. Also, WMS layers are > base > layers by default so you need to specify it is an overlay by writing > isBaseLayer: false in your options. > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Using-OpenLayers-with-Google-Vector-and-Geoscopio-layers-tp5078539p5080157.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100521/eec93c00/attachment.html From chris.green at ibstv.co.uk Fri May 21 04:02:10 2010 From: chris.green at ibstv.co.uk (Chris Green) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] loading panel question Message-ID: <003101caf8bb$ea9a6440$bfcf2cc0$@green@ibstv.co.uk> Hi list I have been trying to make the loading panel work, as per http://trac.openlayers.org/wiki/Addins/LoadingPanel but can't seem to make it work. I am using OL 2.8 (also tried 2.9 - same problem) which is referenced in my code as: . I downloaded LoadingPanel.js and put it in the directory OpenLayers-2.8/lib/OpenLayers/Control. Then when creating a map I have: map = new OpenLayers.Map('map', options); var loadingpanel = new OpenLayers.Control.LoadingPanel() map.addControl(loadingpanel); This throws an error in Firefox: "OpenLayers.Control.LoadingPanel is not a constructor" The loading panel instructions talk about creating a single file build which I have not done - is this my problem, or should I be able to make this work with the OL 2.8 development libraries? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100521/f525766b/attachment.html From bartvde at osgis.nl Fri May 21 04:04:57 2010 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] loading panel question In-Reply-To: <003101caf8bb$ea9a6440$bfcf2cc0$@green@ibstv.co.uk> References: <003101caf8bb$ea9a6440$bfcf2cc0$@green@ibstv.co.uk> Message-ID: <56673.145.50.39.11.1274429097.squirrel@webmail.hostingdiscounter.nl> Hi Chris, if you do it this way, you need to add an entry to your OpenLayers.js: if(!singleFile) { var jsfiles = new Array( .. "OpenLayers/Control.js", "OpenLayers/Control/LoadingPanel.js", .. Best regards, Bart > Hi list > > > > I have been trying to make the loading panel work, as per > http://trac.openlayers.org/wiki/Addins/LoadingPanel but can't seem to make > it work. > > > > I am using OL 2.8 (also tried 2.9 - same problem) which is referenced in > my > code as: . > > > > I downloaded LoadingPanel.js and put it in the directory > OpenLayers-2.8/lib/OpenLayers/Control. Then when creating a map I have: > > > > map = new OpenLayers.Map('map', options); > > var loadingpanel = new OpenLayers.Control.LoadingPanel() > > map.addControl(loadingpanel); > > > > This throws an error in Firefox: "OpenLayers.Control.LoadingPanel is not > a > constructor" > > > > The loading panel instructions talk about creating a single file build > which > I have not done - is this my problem, or should I be able to make this > work > with the OL 2.8 development libraries? > > > > > > Chris > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ahti.lahtela at pp.inet.fi Fri May 21 05:01:38 2010 From: ahti.lahtela at pp.inet.fi (ahlah) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] IE7 and Firefox draws icons to different places Message-ID: <1274432498271-5083376.post@n2.nabble.com> Hi, I have some icons in my map ponting to interesting places. Points are vector features and icon path is in styleparameters of the feature. There is also graphicWidth and graphicHeight values but no graphicXOffset and no graphicYOffset in styleparameters. Left picture is from Firefox and right one from IE7. Popup points to the coordinate point of the feature correctly and Firefox draws the icon to correct place. In IE7 X axis is correct but Y is in different place, the offset doesn't depend on zoomlevel, it is always the same (In pixels). Am I doing something wrong or is this known problem with IE. Should I check which browser is in use and put some offset to style parameters in IE7? Br, ahlah http://n2.nabble.com/file/n5083376/ff.jpg http://n2.nabble.com/file/n5083376/IE7.jpg -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE7-and-Firefox-draws-icons-to-different-places-tp5083376p5083376.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From chris.green at ibstv.co.uk Fri May 21 05:56:28 2010 From: chris.green at ibstv.co.uk (Chris Green) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] loading panel question In-Reply-To: <56673.145.50.39.11.1274429097.squirrel@webmail.hostingdiscounter.nl> References: <003101caf8bb$ea9a6440$bfcf2cc0$@green@ibstv.co.uk> <56673.145.50.39.11.1274429097.squirrel@webmail.hostingdiscounter.nl> Message-ID: <000001caf8cb$e27b9580$a772c080$@green@ibstv.co.uk> Hi Bart Thanks for the help. I found " if(!singleFile) {var jsfiles = new Array(....." in OpenLayers.js and added "OpenLayers/Control.js", "OpenLayers/Control/LoadingPanel.js", at the end of the (very long) list of controls. Unfortunately I still get the same result: "OpenLayers.Control.LoadingPanel is not a constructor" Did I do it wrong? Chris -----Original Message----- From: Bart van den Eijnden (OSGIS) [mailto:bartvde@osgis.nl] Sent: 21 May 2010 09:05 To: chris.green@ibstv.co.uk Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] loading panel question Hi Chris, if you do it this way, you need to add an entry to your OpenLayers.js: if(!singleFile) { var jsfiles = new Array( .. "OpenLayers/Control.js", "OpenLayers/Control/LoadingPanel.js", .. Best regards, Bart > Hi list > > > > I have been trying to make the loading panel work, as per > http://trac.openlayers.org/wiki/Addins/LoadingPanel but can't seem to make > it work. > > > > I am using OL 2.8 (also tried 2.9 - same problem) which is referenced in > my > code as: . > > > > I downloaded LoadingPanel.js and put it in the directory > OpenLayers-2.8/lib/OpenLayers/Control. Then when creating a map I have: > > > > map = new OpenLayers.Map('map', options); > > var loadingpanel = new OpenLayers.Control.LoadingPanel() > > map.addControl(loadingpanel); > > > > This throws an error in Firefox: "OpenLayers.Control.LoadingPanel is not > a > constructor" > > > > The loading panel instructions talk about creating a single file build > which > I have not done - is this my problem, or should I be able to make this > work > with the OL 2.8 development libraries? > > > > > > Chris > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ale.pas at tiscali.it Fri May 21 06:08:04 2010 From: ale.pas at tiscali.it (Alessandro Pasotti) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Control.SelectFeature issue on FF (but not on Chrome) Message-ID: <201005211208.04773.ale.pas@tiscali.it> Hello, I've discovered a strange behaviour (bug?) with FF and select control. Basically, it happens when you already have an active control Control.SelectFeature attached to a layer and you add a new layer with its own Control.SelectFeature, on FF the control attached to the first layer will cease to react to click events. See a live example here (test it on FF and Chrome): http://www.parconord.milano.it/ol_ko.html I don't need a workaround (I've already found one), but I would be happy to understand why it happens. Tested on: FF 3.6.3 Linux Chromium 5.0.389.0 (45661) Ubuntu -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502 From frederic.junod at camptocamp.com Fri May 21 06:19:37 2010 From: frederic.junod at camptocamp.com (Frederic Junod) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Control.SelectFeature issue on FF (but not on Chrome) In-Reply-To: <201005211208.04773.ale.pas@tiscali.it> References: <201005211208.04773.ale.pas@tiscali.it> Message-ID: Hello, Same behavior here. But it works when the 2 vector layers are passed to the SelectFeature control: new OpenLayers.Control.SelectFeature([vectorLayer, vectorLayer2], { clickout: true, hover: false }); Is that what you used ? fredj On Fri, May 21, 2010 at 12:08 PM, Alessandro Pasotti wrote: > Hello, > > I've discovered a strange behaviour (bug?) with FF and select control. > > Basically, it happens when you already have an active ?control > Control.SelectFeature attached to a layer and you add a new layer with its own > Control.SelectFeature, on FF the control attached to the first layer will cease > to react to click events. > > See a live example here (test it on FF and Chrome): > > http://www.parconord.milano.it/ol_ko.html > > I don't need a workaround (I've already found one), but I would be happy to > understand why it happens. > > > Tested on: > FF 3.6.3 Linux > Chromium > 5.0.389.0 (45661) Ubuntu > -- Fr?d?ric Junod Camptocamp SA From ale.pas at tiscali.it Fri May 21 06:33:35 2010 From: ale.pas at tiscali.it (Alessandro Pasotti) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Control.SelectFeature issue on FF (but not on Chrome) In-Reply-To: References: <201005211208.04773.ale.pas@tiscali.it> Message-ID: <201005211233.35545.ale.pas@tiscali.it> In data venerd? 21 maggio 2010 12:19:37, Frederic Junod ha scritto: : > Hello, > > On Fri, May 21, 2010 at 12:08 PM, Alessandro Pasotti wrote: > > Hello, > > > > I've discovered a strange behaviour (bug?) with FF and select control. > > > > Basically, it happens when you already have an active control > > Control.SelectFeature attached to a layer and you add a new layer with > > its own Control.SelectFeature, on FF the control attached to the first > > layer will cease to react to click events. > > > > See a live example here (test it on FF and Chrome): > > > > http://www.parconord.milano.it/ol_ko.html > > > > I don't need a workaround (I've already found one), but I would be happy > > to understand why it happens. > > > > > > Tested on: > > FF 3.6.3 Linux > > Chromium > > 5.0.389.0 (45661) Ubuntu > Same behavior here. > But it works when the 2 vector layers are passed to the SelectFeature > control: new OpenLayers.Control.SelectFeature([vectorLayer, vectorLayer2], > { clickout: true, hover: false }); > > Is that what you used ? > > fredj > Hi, Yes, it works if you pass both layers simultanously to the control init, but in my project the layers were added dynamically so that was not the ideal solution. The workaround is to scan existing layers and pass them all every time you add a new control. But the question remains: why does it work fine on Chrome and fail on FF ? Is this a bug in ol, in FF or is it just Chrome that has an odd behaviour ? -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502 From bartvde at osgis.nl Fri May 21 06:47:44 2010 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] loading panel question In-Reply-To: <000001caf8cb$e27b9580$a772c080$@green@ibstv.co.uk> References: <003101caf8bb$ea9a6440$bfcf2cc0$@green@ibstv.co.uk> <56673.145.50.39.11.1274429097.squirrel@webmail.hostingdiscounter.nl> <000001caf8cb$e27b9580$a772c080$@green@ibstv.co.uk> Message-ID: <24648.145.50.39.11.1274438864.squirrel@webmail.hostingdiscounter.nl> Hi Chris, only add the line wrt to the LoadingPanel.js, not an extra line for Control.js. Install Firebug in Firefox and see if the file actually gets loaded in the scripts tab. Best regards, Bart > Hi Bart > > Thanks for the help. I found " if(!singleFile) {var jsfiles = new > Array(....." in OpenLayers.js and added > > "OpenLayers/Control.js", "OpenLayers/Control/LoadingPanel.js", > > > at the end of the (very long) list of controls. Unfortunately I still get > the same result: "OpenLayers.Control.LoadingPanel is not a constructor" > > > Did I do it wrong? > > > Chris > > > > -----Original Message----- > From: Bart van den Eijnden (OSGIS) [mailto:bartvde@osgis.nl] > Sent: 21 May 2010 09:05 > To: chris.green@ibstv.co.uk > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] loading panel question > > Hi Chris, > > if you do it this way, you need to add an entry to your OpenLayers.js: > > if(!singleFile) { > var jsfiles = new Array( > .. > "OpenLayers/Control.js", > "OpenLayers/Control/LoadingPanel.js", > .. > > Best regards, > Bart > >> Hi list >> >> >> >> I have been trying to make the loading panel work, as per >> http://trac.openlayers.org/wiki/Addins/LoadingPanel but can't seem to >> make >> it work. >> >> >> >> I am using OL 2.8 (also tried 2.9 - same problem) which is referenced >> in >> my >> code as: . >> >> >> >> I downloaded LoadingPanel.js and put it in the directory >> OpenLayers-2.8/lib/OpenLayers/Control. Then when creating a map I have: >> >> >> >> map = new OpenLayers.Map('map', options); >> >> var loadingpanel = new OpenLayers.Control.LoadingPanel() >> >> map.addControl(loadingpanel); >> >> >> >> This throws an error in Firefox: "OpenLayers.Control.LoadingPanel is >> not >> a >> constructor" >> >> >> >> The loading panel instructions talk about creating a single file build >> which >> I have not done - is this my problem, or should I be able to make this >> work >> with the OL 2.8 development libraries? >> >> >> >> >> >> Chris >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > > From chris.green at ibstv.co.uk Fri May 21 07:12:32 2010 From: chris.green at ibstv.co.uk (Chris Green) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] loading panel question In-Reply-To: <24648.145.50.39.11.1274438864.squirrel@webmail.hostingdiscounter.nl> References: <003101caf8bb$ea9a6440$bfcf2cc0$@green@ibstv.co.uk> <56673.145.50.39.11.1274429097.squirrel@webmail.hostingdiscounter.nl> <000001caf8cb$e27b9580$a772c080$@green@ibstv.co.uk> <24648.145.50.39.11.1274438864.squirrel@webmail.hostingdiscounter.nl> Message-ID: <000a01caf8d6$827d9b00$8778d100$@green@ibstv.co.uk> Bart I changed the entry so it only adds "OpenLayers/Control/LoadingPanel.js", but still the same result. The Firefox script tab shows a list of controls but LoadingPanel.js is not there. Could it be a problem with the LoadingPanel.js file? Chris -----Original Message----- From: Bart van den Eijnden (OSGIS) [mailto:bartvde@osgis.nl] Sent: 21 May 2010 11:48 To: chris.green@ibstv.co.uk Cc: users@openlayers.org Subject: RE: [OpenLayers-Users] loading panel question Hi Chris, only add the line wrt to the LoadingPanel.js, not an extra line for Control.js. Install Firebug in Firefox and see if the file actually gets loaded in the scripts tab. Best regards, Bart > Hi Bart > > Thanks for the help. I found " if(!singleFile) {var jsfiles = new > Array(....." in OpenLayers.js and added > > "OpenLayers/Control.js", "OpenLayers/Control/LoadingPanel.js", > > > at the end of the (very long) list of controls. Unfortunately I still get > the same result: "OpenLayers.Control.LoadingPanel is not a constructor" > > > Did I do it wrong? > > > Chris > > > > -----Original Message----- > From: Bart van den Eijnden (OSGIS) [mailto:bartvde@osgis.nl] > Sent: 21 May 2010 09:05 > To: chris.green@ibstv.co.uk > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] loading panel question > > Hi Chris, > > if you do it this way, you need to add an entry to your OpenLayers.js: > > if(!singleFile) { > var jsfiles = new Array( > .. > "OpenLayers/Control.js", > "OpenLayers/Control/LoadingPanel.js", > .. > > Best regards, > Bart > >> Hi list >> >> >> >> I have been trying to make the loading panel work, as per >> http://trac.openlayers.org/wiki/Addins/LoadingPanel but can't seem to >> make >> it work. >> >> >> >> I am using OL 2.8 (also tried 2.9 - same problem) which is referenced >> in >> my >> code as: . >> >> >> >> I downloaded LoadingPanel.js and put it in the directory >> OpenLayers-2.8/lib/OpenLayers/Control. Then when creating a map I have: >> >> >> >> map = new OpenLayers.Map('map', options); >> >> var loadingpanel = new OpenLayers.Control.LoadingPanel() >> >> map.addControl(loadingpanel); >> >> >> >> This throws an error in Firefox: "OpenLayers.Control.LoadingPanel is >> not >> a >> constructor" >> >> >> >> The loading panel instructions talk about creating a single file build >> which >> I have not done - is this my problem, or should I be able to make this >> work >> with the OL 2.8 development libraries? >> >> >> >> >> >> Chris >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > > From yuratsebro at gmail.com Fri May 21 15:12:24 2010 From: yuratsebro at gmail.com (Yurka) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Large Dataset Message-ID: <1274469144963-5085920.post@n2.nabble.com> Hi, I need an advice. I have a dataset of about 1.5Mil locations that i need to display within OpenLayers. Also currently i'm displaying results as a WMS layer at the moment (there is geoserver running in the background). There are number of filters that i'm applying to minimize number of returned results. Still i see anywhere from 5 - 15 sec delay before my layer is rendered, I assume mostly because of the searching the dataset. This is a temporary workaround since in few weeks the 1.5 Mil number will be more like 5-10 Mil. Is there a better way to search / display such a huge dataset ? Maybe OpenLayers can handle this amount of info without geoserver help. Thanks, -y -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Large-Dataset-tp5085920p5085920.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bmcbride at chacompanies.com Fri May 21 15:19:59 2010 From: bmcbride at chacompanies.com (Mapmaker) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Large Dataset In-Reply-To: <1274469144963-5085920.post@n2.nabble.com> References: <1274469144963-5085920.post@n2.nabble.com> Message-ID: <1274469599067-5085949.post@n2.nabble.com> Yurka, What format are you storing your data in? Shapefile... PostGIS? I doubt there is a much more efficient way of handling that size dataset than your current GeoServer/WMS method. You may be able to optimize your current setup by utilizing PostGIS Views rather than WMS Filters. You may also want to play around with setting scale thresholds for your image rendering- and you could try using a single tile WMS layer. Best of luck! BRYAN -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Large-Dataset-tp5085920p5085949.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From yuratsebro at gmail.com Fri May 21 15:27:06 2010 From: yuratsebro at gmail.com (Yurka) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Large Dataset In-Reply-To: <1274469599067-5085949.post@n2.nabble.com> References: <1274469144963-5085920.post@n2.nabble.com> <1274469599067-5085949.post@n2.nabble.com> Message-ID: <1274470026502-5085981.post@n2.nabble.com> Well it may sound weird but the data is stored in MYSql ... Transfer to PostGIS was my next step to try. If i understood you correctly, in my case its impossible to use views since some of the input comes from user. I will try to use singe tiled WMS see if its better. Thanks for quick response, -y -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Large-Dataset-tp5085920p5085981.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From aeskreis at gmail.com Fri May 21 15:37:01 2010 From: aeskreis at gmail.com (Adam Eskreis) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Large Dataset In-Reply-To: <1274470026502-5085981.post@n2.nabble.com> References: <1274469144963-5085920.post@n2.nabble.com> <1274469599067-5085949.post@n2.nabble.com> <1274470026502-5085981.post@n2.nabble.com> Message-ID: Pretty standard question, but do you have any indexes on the data? On Fri, May 21, 2010 at 3:27 PM, Yurka wrote: > > Well it may sound weird but the data is stored in MYSql ... > Transfer to PostGIS was my next step to try. > > If i understood you correctly, > in my case its impossible to use views since some of the input comes from > user. > > > I will try to use singe tiled WMS see if its better. > Thanks for quick response, > > -y > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Large-Dataset-tp5085920p5085981.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100521/e9d8aec8/attachment.html From yuratsebro at gmail.com Fri May 21 15:40:11 2010 From: yuratsebro at gmail.com (Yurka) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Large Dataset In-Reply-To: References: <1274469144963-5085920.post@n2.nabble.com> <1274469599067-5085949.post@n2.nabble.com> <1274470026502-5085981.post@n2.nabble.com> Message-ID: <1274470811471-5086038.post@n2.nabble.com> Yes, each field i filter by is indexed, Also i couldn't create GIS-Index on MySQL due to non-null constrain but I should be able to once i remove all nulls. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Large-Dataset-tp5085920p5086038.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From brian at beruna.org Fri May 21 23:18:14 2010 From: brian at beruna.org (Brian Russo) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Dateline panning Message-ID: The nabble archive search is down so there may have been prior discussion on this. Are there any plans to support (or is it possible now) to do 'infinite' panning around the dateline w/OL? I.e. how google and bing's map apis let you keep panning east/west indefinitely. thanks, - bri -- Brian Russo / (808) 271 4166 From eric.lemoine at camptocamp.com Sat May 22 08:42:49 2010 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Dateline panning In-Reply-To: References: Message-ID: On Sat, May 22, 2010 at 4:18 AM, Brian Russo wrote: > The nabble archive search is down so there may have been prior > discussion on this. > > Are there any plans to support (or is it possible now) to do > 'infinite' panning around the dateline w/OL? > > I.e. how google and bing's map apis let you keep panning east/west indefinitely. Have you tried the wrapDateLine option? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ahocevar at opengeo.org Sun May 23 05:49:15 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] IE7 and Firefox draws icons to different places In-Reply-To: <1274432498271-5083376.post@n2.nabble.com> References: <1274432498271-5083376.post@n2.nabble.com> Message-ID: Hi, this could be a VML renderer bug. But to investigate, I'd ask you to provide a minimal example showing the issue. Thanks, Andreas. On May 21, 2010, at 11:01 , ahlah wrote: > > Hi, > I have some icons in my map ponting to interesting places. Points are > vector features and icon path is in styleparameters of the feature. There is > also graphicWidth and graphicHeight values but no graphicXOffset and no > graphicYOffset in styleparameters. > > Left picture is from Firefox and right one from IE7. Popup points to the > coordinate point of the feature correctly and Firefox draws the icon to > correct place. In IE7 X axis is correct but Y is in different place, the > offset doesn't depend on zoomlevel, it is always the same (In pixels). Am I > doing something wrong or is this known problem with IE. Should I check which > browser is in use and put some offset to style parameters in IE7? > > Br, > > ahlah > > http://n2.nabble.com/file/n5083376/ff.jpg > http://n2.nabble.com/file/n5083376/IE7.jpg > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE7-and-Firefox-draws-icons-to-different-places-tp5083376p5083376.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From andreas.hocevar at gmail.com Sun May 23 19:53:04 2010 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Control.SelectFeature issue on FF (but not on Chrome) In-Reply-To: <201005211233.35545.ale.pas@tiscali.it> References: <201005211208.04773.ale.pas@tiscali.it> <201005211233.35545.ale.pas@tiscali.it> Message-ID: <7CFC99BE-FBAD-4A21-AF2C-D16F59D22955@gmail.com> I think the proper way to solve this would be a setLayers method for the SelectFeature control. Regards, Andreas. On May 21, 2010, at 12:33 , Alessandro Pasotti wrote: > In data venerd? 21 maggio 2010 12:19:37, Frederic Junod ha scritto: > : > Hello, >> >> On Fri, May 21, 2010 at 12:08 PM, Alessandro Pasotti > wrote: >>> Hello, >>> >>> I've discovered a strange behaviour (bug?) with FF and select control. >>> >>> Basically, it happens when you already have an active control >>> Control.SelectFeature attached to a layer and you add a new layer with >>> its own Control.SelectFeature, on FF the control attached to the first >>> layer will cease to react to click events. >>> >>> See a live example here (test it on FF and Chrome): >>> >>> http://www.parconord.milano.it/ol_ko.html >>> >>> I don't need a workaround (I've already found one), but I would be happy >>> to understand why it happens. >>> >>> >>> Tested on: >>> FF 3.6.3 Linux >>> Chromium >>> 5.0.389.0 (45661) Ubuntu > > >> Same behavior here. >> But it works when the 2 vector layers are passed to the SelectFeature >> control: new OpenLayers.Control.SelectFeature([vectorLayer, vectorLayer2], >> { clickout: true, hover: false }); >> >> Is that what you used ? >> >> fredj >> > > Hi, > > Yes, it works if you pass both layers simultanously to the control init, but > in my project the layers were added dynamically so that was not the ideal > solution. > > The workaround is to scan existing layers and pass them all every time you add > a new control. > > But the question remains: why does it work fine on Chrome and fail on FF ? > > Is this a bug in ol, in FF or is it just Chrome that has an odd behaviour ? > > > > -- > Alessandro Pasotti > itOpen - "Open Solutions for the Net Age" > w3: www.itopen.it > Linux User# 167502 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From bartvde at osgis.nl Mon May 24 01:21:48 2010 From: bartvde at osgis.nl (Bart van den Eijnden) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Control.SelectFeature issue on FF (but not on Chrome) In-Reply-To: <7CFC99BE-FBAD-4A21-AF2C-D16F59D22955@gmail.com> References: <201005211208.04773.ale.pas@tiscali.it> <201005211233.35545.ale.pas@tiscali.it> <7CFC99BE-FBAD-4A21-AF2C-D16F59D22955@gmail.com> Message-ID: We added this in 2.9.1 right? http://trac.openlayers.org/ticket/2340 Best regards, Bart On May 24, 2010, at 1:53 AM, Andreas Hocevar wrote: > I think the proper way to solve this would be a setLayers method for the SelectFeature control. > > Regards, > Andreas. > > On May 21, 2010, at 12:33 , Alessandro Pasotti wrote: > >> In data venerd? 21 maggio 2010 12:19:37, Frederic Junod ha scritto: >> : > Hello, >>> >>> On Fri, May 21, 2010 at 12:08 PM, Alessandro Pasotti >> wrote: >>>> Hello, >>>> >>>> I've discovered a strange behaviour (bug?) with FF and select control. >>>> >>>> Basically, it happens when you already have an active control >>>> Control.SelectFeature attached to a layer and you add a new layer with >>>> its own Control.SelectFeature, on FF the control attached to the first >>>> layer will cease to react to click events. >>>> >>>> See a live example here (test it on FF and Chrome): >>>> >>>> http://www.parconord.milano.it/ol_ko.html >>>> >>>> I don't need a workaround (I've already found one), but I would be happy >>>> to understand why it happens. >>>> >>>> >>>> Tested on: >>>> FF 3.6.3 Linux >>>> Chromium >>>> 5.0.389.0 (45661) Ubuntu >> >> >>> Same behavior here. >>> But it works when the 2 vector layers are passed to the SelectFeature >>> control: new OpenLayers.Control.SelectFeature([vectorLayer, vectorLayer2], >>> { clickout: true, hover: false }); >>> >>> Is that what you used ? >>> >>> fredj >>> >> >> Hi, >> >> Yes, it works if you pass both layers simultanously to the control init, but >> in my project the layers were added dynamically so that was not the ideal >> solution. >> >> The workaround is to scan existing layers and pass them all every time you add >> a new control. >> >> But the question remains: why does it work fine on Chrome and fail on FF ? >> >> Is this a bug in ol, in FF or is it just Chrome that has an odd behaviour ? >> >> >> >> -- >> Alessandro Pasotti >> itOpen - "Open Solutions for the Net Age" >> w3: www.itopen.it >> Linux User# 167502 >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From cserumola at yahoo.co.uk Mon May 24 04:14:16 2010 From: cserumola at yahoo.co.uk (simi) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] GetFeatureInfo returns attribute name only(Mapserver & Openlayers) Message-ID: <1274688856963-5092982.post@n2.nabble.com> I have been trying for a long time(since february 2010) to use GetFeatureInfo to display the attributes of a clicked polygon feature . The map is displayed in OpenLayers 2.8 which uses a mapserver 5.6.1 for the mapfile whose data source is a shapefile. When i click on a polygon feature, i only get the attribute name "[NAME]" (as it appears on the html body template file) AND not the atrribute values. Please help.Here is the openlayers file contents; OpenLayers project

OpenLayers Example

and the mapfile; MAP NAME "Districts2" # Map image size SIZE 400 400 UNITS dd EXTENT 15.807570 -27.131403 33.564789 -17.550001 SHAPEPATH 'C:\ms4w\PSI_Shapefiles\' #FONTSET './fonts/fonts.txt' SYMBOLSET 'C:\ms4w\Apache\cgi-bin\Symbols.sym' PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END # Background color for the map canvas -- change as desired IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE agg OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH 'C:\ms4w\tmp\' # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL '\tmp\' # WMS server settings METADATA wms_title 'QGIS-MAP' wms_onlineresource 'http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/cgi-bin/Districts2.map&' wms_srs 'EPSG:4326' wms_server_version '1.1.1' wms_feature_info_mime_type 'text/html' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation HEADER 'http://localhost/Header.html' TEMPLATE 'http://localhost/Body.html' FOOTER 'http://localhost/Footer.html' END LAYER NAME 'Botswana_Admin_Districts' TYPE POLYGON TOLERANCE 10 TOLERANCEUNITS pixels DUMP true HEADER 'http://localhost/Header.html' FOOTER 'http://localhost/Footer.html' EXTENT 15.807570 -27.131403 33.564789 -17.550001 DATA Botswana_Admin_Districts METADATA wms_title 'Botswana_Admin_Districts' wms_srs 'EPSG:4326' gml_include_items 'NAME' wms_include_items 'NAME' wms_server_version '1.1.1' wms_name 'Botswana_Admin_Districts' wms_feature_info_mime_type 'text/html' gml_featureid 'OBJECTID' END STATUS ON TRANSPARENCY 100 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END CLASS TEMPLATE 'http://localhost/Body.html' OUTLINECOLOR "#C60F0F" COLOR 50 50 50 END END END The template files; The header, GetFeatureInfo example The body template file; and the Footer template file;
Name:
[NAME]
-- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-returns-attribute-name-only-Mapserver-Openlayers-tp5092982p5092982.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Mon May 24 05:01:58 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Control.SelectFeature issue on FF (but not on Chrome) In-Reply-To: References: <201005211208.04773.ale.pas@tiscali.it> <201005211233.35545.ale.pas@tiscali.it> <7CFC99BE-FBAD-4A21-AF2C-D16F59D22955@gmail.com> Message-ID: <08F8CD1B-69C1-48E4-8738-0EAA798824F9@opengeo.org> Oh, and I was the reviewer. Great! Well in that case, the solution to the OP's problem is to reconfigure the control with the new set of layers after adding/removing layers, instead of creating a new control with a new layer. Regards, Andreas. On May 24, 2010, at 07:21 , Bart van den Eijnden wrote: > We added this in 2.9.1 right? > > http://trac.openlayers.org/ticket/2340 > > Best regards, > Bart > > On May 24, 2010, at 1:53 AM, Andreas Hocevar wrote: > >> I think the proper way to solve this would be a setLayers method for the SelectFeature control. >> >> Regards, >> Andreas. >> >> On May 21, 2010, at 12:33 , Alessandro Pasotti wrote: >> >>> In data venerd? 21 maggio 2010 12:19:37, Frederic Junod ha scritto: >>> : > Hello, >>>> >>>> On Fri, May 21, 2010 at 12:08 PM, Alessandro Pasotti >>> wrote: >>>>> Hello, >>>>> >>>>> I've discovered a strange behaviour (bug?) with FF and select control. >>>>> >>>>> Basically, it happens when you already have an active control >>>>> Control.SelectFeature attached to a layer and you add a new layer with >>>>> its own Control.SelectFeature, on FF the control attached to the first >>>>> layer will cease to react to click events. >>>>> >>>>> See a live example here (test it on FF and Chrome): >>>>> >>>>> http://www.parconord.milano.it/ol_ko.html >>>>> >>>>> I don't need a workaround (I've already found one), but I would be happy >>>>> to understand why it happens. >>>>> >>>>> >>>>> Tested on: >>>>> FF 3.6.3 Linux >>>>> Chromium >>>>> 5.0.389.0 (45661) Ubuntu >>> >>> >>>> Same behavior here. >>>> But it works when the 2 vector layers are passed to the SelectFeature >>>> control: new OpenLayers.Control.SelectFeature([vectorLayer, vectorLayer2], >>>> { clickout: true, hover: false }); >>>> >>>> Is that what you used ? >>>> >>>> fredj >>>> >>> >>> Hi, >>> >>> Yes, it works if you pass both layers simultanously to the control init, but >>> in my project the layers were added dynamically so that was not the ideal >>> solution. >>> >>> The workaround is to scan existing layers and pass them all every time you add >>> a new control. >>> >>> But the question remains: why does it work fine on Chrome and fail on FF ? >>> >>> Is this a bug in ol, in FF or is it just Chrome that has an odd behaviour ? >>> >>> >>> >>> -- >>> Alessandro Pasotti >>> itOpen - "Open Solutions for the Net Age" >>> w3: www.itopen.it >>> Linux User# 167502 >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ale.pas at tiscali.it Mon May 24 06:17:05 2010 From: ale.pas at tiscali.it (Alessandro Pasotti) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Control.SelectFeature issue on FF (but not on Chrome) In-Reply-To: <08F8CD1B-69C1-48E4-8738-0EAA798824F9@opengeo.org> References: <201005211208.04773.ale.pas@tiscali.it> <08F8CD1B-69C1-48E4-8738-0EAA798824F9@opengeo.org> Message-ID: <201005241217.06185.ale.pas@tiscali.it> In data luned? 24 maggio 2010 11:01:58, Andreas Hocevar ha scritto: : > Oh, and I was the reviewer. Great! > > Well in that case, the solution to the OP's problem is to reconfigure the > control with the new set of layers after adding/removing layers, instead > of creating a new control with a new layer. > > Regards, > Andreas. Thank you all for the suggestions, The suggested workaround works on both FF and Chrome, but I'm still confused: what if I need two different controls instances attached to the the two layers ? Suppose I want the Control.SelectFeature attached to the first layer to open a popup and the Control.SelectFeature attached to the second layer to update a div somewhere in the page. Does Control.SelectFeature really needs to be a singleton ? Additionaly: why on Chrome I can have two different controls attached to my two layers and on FF I can't ? This doesn't work on FF (lower left point click is not active) but works on Chrome: http://www.parconord.milano.it/ol_ko.html Should I file a bug report ? -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502 From ahocevar at opengeo.org Mon May 24 06:32:59 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Control.SelectFeature issue on FF (but not on Chrome) In-Reply-To: <201005241217.06185.ale.pas@tiscali.it> References: <201005211208.04773.ale.pas@tiscali.it> <08F8CD1B-69C1-48E4-8738-0EAA798824F9@opengeo.org> <201005241217.06185.ale.pas@tiscali.it> Message-ID: Hi, On May 24, 2010, at 12:17 , Alessandro Pasotti wrote: > In data luned? 24 maggio 2010 11:01:58, Andreas Hocevar ha scritto: > : > Oh, and I was the reviewer. Great! >> >> Well in that case, the solution to the OP's problem is to reconfigure the >> control with the new set of layers after adding/removing layers, instead >> of creating a new control with a new layer. >> >> Regards, >> Andreas. > > Thank you all for the suggestions, > > The suggested workaround works on both FF and Chrome, but I'm still confused: > what if I need two different controls instances attached to the the two layers > ? > > Suppose I want the Control.SelectFeature attached to the first layer to open a > popup and the Control.SelectFeature attached to the second layer to update a > div somewhere in the page. You can check for the layer that a feature was selected on in the event handler and perform different actions based on that. Why would you need a second control for that? > Does Control.SelectFeature really needs to be a singleton ? No, you can have as many SelectFeature controls as you want. But the way it works is that it needs to put the layers to select from at the top of the layer stack, and this is why you should just have one SelectFeature contorl *activated* at a time. > Additionaly: why on Chrome I can have two different controls attached to my two > layers and on FF I can't ? This must have to do with the way events are handled on SVG elements. But I cannot tell you exactly why. > This doesn't work on FF (lower left point click is not active) but works on > Chrome: > http://www.parconord.milano.it/ol_ko.html > > Should I file a bug report ? No, because having two active SelectFeature controls is not supported. If you want smarter feature selection, have a look at http://trac.openlayers.org/changeset/9739 - this could become the way we handle feature selection in the future. Regards, Andreas. > > -- > Alessandro Pasotti > itOpen - "Open Solutions for the Net Age" > w3: www.itopen.it > Linux User# 167502 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From beppenapo at gmail.com Mon May 24 09:14:54 2010 From: beppenapo at gmail.com (Giuseppe Naponiello) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] display different popup for different layer Message-ID: Hi all, in my project I've 2 layers (layer1, layer2) with different attributes. Layer 1 is in gml format, layer2 is a txt file When I click on the layer1, I open a popup with this code: function onPopupClose(evt) {selectControl.unselect(feature);} //al click su un elemento, creo e visualizzo al popup function onFeatureSelect(event) { feature = event.feature; popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), null, "", null, true, onPopupClose); feature.popup = popup; map.addPopup(popup); } function onFeatureUnselect(event) { feature = event.feature; if (feature.popup){ map.removePopup(feature.popup); feature.popup.destroy(); feature.popup = null; } } .... selectControl = new OpenLayers.Control.SelectFeature(layer1); //{onSelect: onFeatureSelect, onUnselect: onFeatureUnselect}); layer1.events.on({ "featureselected": onFeatureSelect, "featureunselected": onFeatureUnselect }); Now I'd like to display the same kind of popup for the layer2 but I don't know what is the correct code to write!!! thanks -- -beppe- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100524/c3e176b8/attachment.html From paweluz at o2.pl Mon May 24 16:51:41 2010 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Layer from raster images... Message-ID: <1274734301103-5095731.post@n2.nabble.com> Hi! It has been a while since I got any problems with OL but this time has unfortunately come... Actually I am just looking for some solution for my task... I got some images that shows the city of New York with the streets hotels and some other objects. All this data are stored as jpg files. I have images of N.Y. in different scales e.g. 1:1000, 1:5000 and so on... So for example I got 9 images of N.Y in scale 1:1000, 9 images in scale 1:2000 etc... I have also got the center point of each picture. My task is to use them all in openlayers. But I have to: - presents not one picture on map but many pictures in some order. I mean like this: 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg I have to glue them together using openlayers to preset the hole map of N.Y. - I have to change all the images when someone changes the scale (zoom) I was thinking about using the Image layer, but as far I know, one Image layer does not allow to present many pictures... in url you define just the string to url, and not the e.g table of images... I know it is not standard question but maybe someone has any ideas... or thoughts on this... Any help would be appreciated Regards Poul -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Layer-from-raster-images-tp5095731p5095731.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pfischer at zebra.com Tue May 25 02:58:26 2010 From: pfischer at zebra.com (The_Zebra) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] getting name placemark from a kml-file In-Reply-To: <4BF46CF7.9070307@gns.cri.nz> References: <1274257239712-5073940.post@n2.nabble.com> <4BF46CF7.9070307@gns.cri.nz> Message-ID: <1274770706040-5097175.post@n2.nabble.com> hey great! Thank you very much! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/getting-name-placemark-from-a-kml-file-tp5073940p5097175.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From slawomir.messner at staff.uni-marburg.de Tue May 25 03:40:41 2010 From: slawomir.messner at staff.uni-marburg.de (Slawomir Messner) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] layer.clone() In-Reply-To: <1274770706040-5097175.post@n2.nabble.com> References: <1274257239712-5073940.post@n2.nabble.com> <4BF46CF7.9070307@gns.cri.nz> <1274770706040-5097175.post@n2.nabble.com> Message-ID: <4BFB7EF9.4020102@staff.uni-marburg.de> Hi, is it possible that the clone() method of OL.Layer.Vector clones the features but forgets to set the layer attribute of each feature to the cloned layer? I had the problem, that I couldn't modify the features in the new layer until I wrote the following code after cloning: for (var t = 0; t < newLayer.features.length; t++) { newLayer.features[t].layer = newLayer; } It's a bug or a feature? -- ----------------------------------------------- Slawomir Messner Forschungszentrum "Deutscher Sprachatlas" 06421-28-24981 From eider at fh-bingen.de Tue May 25 04:06:21 2010 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] [Bug] IE8:XML.js Attributes with null-value Message-ID: <4BFB84FD.6070402@fh-bingen.de> Hi list, when serializing features with null values on attributes on IE8, then there is a exception in XML.createTextNode. Line 247 "node = this.xmldom.createTextNode(text);" fails, as text is a null-Object. Placing "if (text==null) text='';" before works fine. Any better suggestions? FF works fine! -- Mit freundlichen Gr??en / Yours faithfully Carsten Eider Dipl. Inf. (FH) Kompetenzzentrum f?r Innovative Informationssysteme c/o Fachhochschule Bingen / University of applied sciences Bingen Berlinstra?e 109 55411 Bingen Tel: +49 (0) 6721 / 409-179 Fax: +49 (0) 6721 / 994-251 email: eider@fh-bingen.de Internet: iis.fh-bingen.de Diese E-Mail, inklusive anh?ngender Dateien, kann vertrauliche und/oder rechtlich gesch?tzte Inhalte enthalten. Wenn Sie nicht der richtige Adressat sind und diese E-Mail irrt?mlich erhalten haben, benachrichtigen Sie bitte sofort den Absender und vernichten Sie sodann die Originalnachricht. Die unbefugte Kopie, Weiterleitung oder sonstige Verbreitung dieser Nachricht ist nicht gestattet. This e-mail, including attachments, may contain confidential and/or privileged information. If you are not the intended recipient, please notify the sender immediately then delete the original message. Any copying forwarding and/or distribution without permission of the sender is forbidden. -------------- next part -------------- A non-text attachment was scrubbed... Name: eider.vcf Type: text/x-vcard Size: 1142 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100525/4115f00b/eider.vcf From ale.pas at tiscali.it Tue May 25 06:09:55 2010 From: ale.pas at tiscali.it (Alessandro Pasotti) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] display different popup for different layer In-Reply-To: References: Message-ID: <201005251209.55423.ale.pas@tiscali.it> In data luned? 24 maggio 2010 15:14:54, Giuseppe Naponiello ha scritto: : > Hi all, > in my project I've 2 layers (layer1, layer2) with different attributes. > Layer 1 is in gml format, layer2 is a txt file > When I click on the layer1, I open a popup with this code: > > function onPopupClose(evt) {selectControl.unselect(feature);} > > //al click su un elemento, creo e visualizzo al popup > function onFeatureSelect(event) { > feature = event.feature; > popup = new OpenLayers.Popup.FramedCloud("chicken", > feature.geometry.getBounds().getCenterLonLat(), > null, > "", > null, true, onPopupClose); > feature.popup = popup; > map.addPopup(popup); > } > > function onFeatureUnselect(event) { > feature = event.feature; > if (feature.popup){ > map.removePopup(feature.popup); > feature.popup.destroy(); > feature.popup = null; > } > } > .... > > selectControl = new OpenLayers.Control.SelectFeature(layer1); > //{onSelect: onFeatureSelect, onUnselect: onFeatureUnselect}); > layer1.events.on({ > "featureselected": onFeatureSelect, > "featureunselected": onFeatureUnselect > }); > > > Now I'd like to display the same kind of popup for the layer2 but I don't > know what is the correct code to write!!! > > > thanks Hi, I think that passing both layers to the select control should work: selectControl = new OpenLayers.Control.SelectFeature([layer1, layer2]); selectControl.events.register("featureselected", map, onFeatureSelect); selectControl.events.register("featureunselected", map, onFeatureUnselect); map.addControl(selectControl); selectControl.activate(); -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502 From to.tonton at gmail.com Tue May 25 06:26:13 2010 From: to.tonton at gmail.com (Tonton) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] [openlayers users] Message-ID: hello i would like to have a layers switcher in external of the map box. is it possible to use OL for or is it necessary to use a other JS library with i thing about something like that function valider() { var valeur = document.choisir.nomdeCouche; for (var i=1;i < valeur.length; i++) { if ( valeur[i].checked ) { map.layerContainerDiv.children([valeur[i].value].* setvisible=true*); } else {map.layerContainerDiv.children([valeur[i].value])* .setvisible=false*;} } }




thanks for your comments -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100525/306777b4/attachment.html From luis.a.de.sousa at gmail.com Tue May 25 07:02:46 2010 From: luis.a.de.sousa at gmail.com (=?ISO-8859-1?Q?Lu=EDs_de_Sousa?=) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] getLonLatFromPixel in IE Message-ID: Hello everyone, Please check the code below. This is a very simple map with an event listener that shows the coordinates when you click on it. It works on every know web browser in the world, Firefox, Opera, Chrome, except for ... yes you guessed it, Internet Explorer! Is there any work around for this? Is it worth to dedicate time to this? Is OpenLayers supposed to work with IE? Thank you, Lu?s OpenLayers Demo
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100525/c1ab144a/attachment.html From brfr at metrico.lu Tue May 25 07:17:43 2010 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] getLonLatFromPixel in IE In-Reply-To: References: Message-ID: <4BFBB1D7.6080907@metrico.lu> Hi, I use map = new OpenLayers.Map(map_div); ... map.events.register("click", map, showCoords); where showCoords the function for display is. Alternatively see http://dev.openlayers.org/releases/OpenLayers-2.9.1/examples/events.html for an alternate example Frank > > > OpenLayers Demo > > > > > > >
> > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From brfr at metrico.lu Tue May 25 07:37:42 2010 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Format.geojson.write - missing crs with featurecollection Message-ID: <4BFBB686.9070502@metrico.lu> Hi, I'm using Format.GeoJSON for talking with my server. When creating new Features and sending them to my server I saw that OL sends the new features as a featurecollection object. But there is no crs attached. Looking at the code, the crs is only attached to instances of OL.Features.Vector. Featurecollections are typeof array and there's no crs attachment done in the code. I prepared a small snipped to fix this: write: function(obj, pretty) { console.info(obj) var geojson = { "type": null }; if(obj instanceof Array) { geojson.type = "FeatureCollection"; var numFeatures = obj.length; geojson.features = new Array(numFeatures); ++ if(obj[0].layer && obj[0].layer.projection) { ++ geojson.crs = this.createCRSObject(obj[0]); ++ } for(var i=0; i References: <4BFBB1D7.6080907@metrico.lu> Message-ID: Hi Frank, Thank you for your help, but the problem isn't registering the listener, but the argument IE is passing to it. The object with which the showCoords function is invoked seems to null, so the .xy property generates an error. Thanks, Lu?s On Tue, May 25, 2010 at 12:17 PM, Frank Broniewski wrote: > Hi, > > I use > map = new OpenLayers.Map(map_div); > ... > map.events.register("click", map, showCoords); > > where showCoords the function for display is. Alternatively see > http://dev.openlayers.org/releases/OpenLayers-2.9.1/examples/events.html > for an alternate example > > > Frank > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100525/4fa83c27/attachment.html From brfr at metrico.lu Tue May 25 09:44:27 2010 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] getLonLatFromPixel in IE In-Reply-To: References: <4BFBB1D7.6080907@metrico.lu> Message-ID: <4BFBD43B.1080003@metrico.lu> Hi, well obviously you can't pass any arguments to an event function (in IE). The function only has access to window.event. You can do function coords(event) { var xy = event.object.getLonLatFromViewPortPx(event.xy); var x = xy.lon; var y = xy.lat; ... } if you enable the console in IE8, you can do inside the event function: console.log(event) to see what you get Frank Am 25.05.2010 15:17, schrieb Lu?s de Sousa: > Hi Frank, > > Thank you for your help, but the problem isn't registering the listener, > but the argument IE is passing to it. The object with which the > showCoords function is invoked seems to null, so the .xy property > generates an error. > > Thanks, > > Lu?s > > > On Tue, May 25, 2010 at 12:17 PM, Frank Broniewski > wrote: > > Hi, > > I use > map = new OpenLayers.Map(map_div); > ... > map.events.register("click", map, showCoords); > > where showCoords the function for display is. Alternatively see > http://dev.openlayers.org/releases/OpenLayers-2.9.1/examples/events.html > for an alternate example > > > Frank > -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From bmcbride at chacompanies.com Tue May 25 10:10:33 2010 From: bmcbride at chacompanies.com (Mapmaker) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] First project for Openlayers newbie: HELP! In-Reply-To: <1274779126292-5097592.post@n2.nabble.com> References: <1274779126292-5097592.post@n2.nabble.com> Message-ID: <1274796633372-5098619.post@n2.nabble.com> Robert, Welcome to OpenLayers! You have several options for getting your GIS data into OL. The size of your shapefile and the number of features you are managing will most likely drive what format will work best in your situation. If you are working with tens or even hundreds of points, you may be able to get away with converting the shapefile to a KML or text file and loading it directly in OL. If you've got several hundred or thousands of points, you will probably want to involve some server side processes for managing what gets thrown at the browser. You could easily use a shapefile data store in GeoServer to render the points as a WMS layer. The benefit of this approach is that your GIS users will also be able to tap into the WMS feed within their GIS software for real-time access to your data. If GeoServer is not an option, you could load the shapefile data into a PostGIS or MySQL database and use PHP to generate only the relevant bits of JSON or KML on the fly. Let me know if you need any help or further clarification and best of luck! BRYAN ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/First-project-for-Openlayers-newbie-HELP-tp5097592p5098619.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahti.lahtela at pp.inet.fi Tue May 25 10:15:24 2010 From: ahti.lahtela at pp.inet.fi (ahlah) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] IE7 and Firefox draws icons to different places In-Reply-To: <1274432498271-5083376.post@n2.nabble.com> References: <1274432498271-5083376.post@n2.nabble.com> Message-ID: <1274796924708-5098642.post@n2.nabble.com> Hi, I made a simple example with hardcoded values and both browsers works fine, icon is in same correct place. So it seems that problem isn't in renderer. But there is some difference in behaviour between Firefox and IE because the use case is same, data in database is same and javascript code is same. I'll compare the behaviour with debugger, maybe I can find out something..... Br, ahlah -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE7-and-Firefox-draws-icons-to-different-places-tp5083376p5098642.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From luis.a.de.sousa at gmail.com Tue May 25 10:50:58 2010 From: luis.a.de.sousa at gmail.com (=?ISO-8859-1?Q?Lu=EDs_de_Sousa?=) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] getLonLatFromPixel in IE In-Reply-To: <4BFBD43B.1080003@metrico.lu> References: <4BFBB1D7.6080907@metrico.lu> <4BFBD43B.1080003@metrico.lu> Message-ID: 2010/5/25 Frank Broniewski Hi, well obviously you can't pass any arguments to an event function (in IE). The function only has access to window.event. You can do function coords(event) { var xy = event.object. > > getLonLatFromViewPortPx(event.xy); > var x = xy.lon; > var y = xy.lat; > ... > } Thank you Frank, that did it, works both with Firefox and IE. Note though that the listener has to be registered the way you indicated, not how I had tried initially. Full code below. Thanks, Lu?s OpenLayers Demo
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100525/f15701da/attachment.html From arnd.wippermann at web.de Tue May 25 13:23:10 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] GetFeatureInfo returns attribute nameonly(Mapserver & Openlayers) In-Reply-To: <1274688856963-5092982.post@n2.nabble.com> Message-ID: Hi, It's an issue with MapServer. If the returned html shows only "[NAME]" as in the template, then it means, that MapServer couldn't resolve the tag. Perhaps you have no column NAME in your data or it's an issue with upper and lowercase. Try 'wms_feature_info_mime_type' 'text/plain' 'wms_include_items' 'all' To get the result with all attributes, that are availible. Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von simi Gesendet: Montag, 24. Mai 2010 10:14 An: users@openlayers.org Betreff: [OpenLayers-Users] GetFeatureInfo returns attribute nameonly(Mapserver & Openlayers) I have been trying for a long time(since february 2010) to use GetFeatureInfo to display the attributes of a clicked polygon feature . The map is displayed in OpenLayers 2.8 which uses a mapserver 5.6.1 for the mapfile whose data source is a shapefile. When i click on a polygon feature, i only get the attribute name "[NAME]" (as it appears on the html body template file) AND not the atrribute values. Please help.Here is the openlayers file contents; OpenLayers project

OpenLayers Example

and the mapfile; MAP NAME "Districts2" # Map image size SIZE 400 400 UNITS dd EXTENT 15.807570 -27.131403 33.564789 -17.550001 SHAPEPATH 'C:\ms4w\PSI_Shapefiles\' #FONTSET './fonts/fonts.txt' SYMBOLSET 'C:\ms4w\Apache\cgi-bin\Symbols.sym' PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END # Background color for the map canvas -- change as desired IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE agg OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. IMAGEPATH 'C:\ms4w\tmp\' # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration IMAGEURL '\tmp\' # WMS server settings METADATA wms_title 'QGIS-MAP' wms_onlineresource 'http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/cgi-bin/Districts2. map&' wms_srs 'EPSG:4326' wms_server_version '1.1.1' wms_feature_info_mime_type 'text/html' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation HEADER 'http://localhost/Header.html' TEMPLATE 'http://localhost/Body.html' FOOTER 'http://localhost/Footer.html' END LAYER NAME 'Botswana_Admin_Districts' TYPE POLYGON TOLERANCE 10 TOLERANCEUNITS pixels DUMP true HEADER 'http://localhost/Header.html' FOOTER 'http://localhost/Footer.html' EXTENT 15.807570 -27.131403 33.564789 -17.550001 DATA Botswana_Admin_Districts METADATA wms_title 'Botswana_Admin_Districts' wms_srs 'EPSG:4326' gml_include_items 'NAME' wms_include_items 'NAME' wms_server_version '1.1.1' wms_name 'Botswana_Admin_Districts' wms_feature_info_mime_type 'text/html' gml_featureid 'OBJECTID' END STATUS ON TRANSPARENCY 100 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END CLASS TEMPLATE 'http://localhost/Body.html' OUTLINECOLOR "#C60F0F" COLOR 50 50 50 END END END The template files; The header, GetFeatureInfo example The body template file; and the Footer template file;
Name:
[NAME]
-- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-returns-attribute-name -only-Mapserver-Openlayers-tp5092982p5092982.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From xingshan_he at hotmail.com Tue May 25 13:25:39 2010 From: xingshan_he at hotmail.com (Xingshan He) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Converting distance to map units? Message-ID: I am trying to create a circle with fixed radius programatically and am using OpenLayers.Geometry.Polygon.createRegularPolygon(center, radius, sides, angle) to do that. I have trouble converting my distance, say 800 feet, to the correct radius value in map units. This is what I do: var inches = OpenLayers.INCHES_PER_UNIT; radius = radius * inches["ft"] / inches[map.getUnits()]; The circle drawn has smaller radius than what I wanted. What's the right way of converting real distance to map units? And by 'map units', does it mean the value returned by map.getUnits()? Thanks for any help. Cynthia -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100525/9778943f/attachment.html From arnd.wippermann at web.de Tue May 25 13:45:58 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Layer from raster images... In-Reply-To: <1274734301103-5095731.post@n2.nabble.com> Message-ID: Hi As a workaround you could try with a point vectorlayer and externalGraphic. With small images it works. Problem is, when the insert point is outside the viewport, then the externalGraphic will not displayed. Example with nine images http://gis.ibbeck.de/ginfo/apps/OLExamples/OL29/ExternalGraphicTilesLayer/Ex ternalGraphicTilesLayer.asp Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von paweluz Gesendet: Montag, 24. Mai 2010 22:52 An: users@openlayers.org Betreff: [OpenLayers-Users] Layer from raster images... Hi! It has been a while since I got any problems with OL but this time has unfortunately come... Actually I am just looking for some solution for my task... I got some images that shows the city of New York with the streets hotels and some other objects. All this data are stored as jpg files. I have images of N.Y. in different scales e.g. 1:1000, 1:5000 and so on... So for example I got 9 images of N.Y in scale 1:1000, 9 images in scale 1:2000 etc... I have also got the center point of each picture. My task is to use them all in openlayers. But I have to: - presents not one picture on map but many pictures in some order. I mean like this: 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg I have to glue them together using openlayers to preset the hole map of N.Y. - I have to change all the images when someone changes the scale (zoom) I was thinking about using the Image layer, but as far I know, one Image layer does not allow to present many pictures... in url you define just the string to url, and not the e.g table of images... I know it is not standard question but maybe someone has any ideas... or thoughts on this... Any help would be appreciated Regards Poul -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Layer-from-raster-images-tp5095731p50 95731.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From marjiea1 at gmail.com Tue May 25 14:10:53 2010 From: marjiea1 at gmail.com (Marjie Anderson) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Layer Switcher Outside of Map Window In-Reply-To: References: Message-ID: <005601cafc35$9e339f90$da9adeb0$@com> If I understand what you want correctly, this is shown in the examples. I used it in my project (demo here): http://marjie.info/map/ In the javascript, after initialiazing your map: map.addControl(new OpenLayers.Control.LayerSwitcher( { 'div': OpenLayers.Util.getElement('right') })); In the html: You will probably want to override the ControlLayerSwitcher style in your CSS as well. - Marjie From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Tonton Sent: Tuesday, May 25, 2010 6:26 AM To: users@openlayers.org Subject: [OpenLayers-Users] [openlayers users] hello i would like to have a layers switcher in external of the map box. is it possible to use OL for or is it necessary to use a other JS library with i thing about something like that function valider() { var valeur = document.choisir.nomdeCouche; for (var i=1;i < valeur.length; i++) { if ( valeur[i].checked ) { map.layerContainerDiv.children([valeur[i].value].setvisible=true); } else {map.layerContainerDiv.children([valeur[i].value]).setvisible=false;} } }




thanks for your comments -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100525/4dc823c0/attachment.html From nw at ufl.edu Tue May 25 17:06:09 2010 From: nw at ufl.edu (Nathaniel Wingfield) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] ol+ags integration Message-ID: <4BFC3BC1.9090708@ufl.edu> I'm embarking on an ambitious project with ArcGIS Server and would like to use OpenLayers for the front-end. I found some info (http://www.mkgeomatics.com/apps/REST_Dev/) about adding identify & geoprocessing support but the links to august's sandbox are dead and the work has been removed from trac.openlayers.org. Is this a dead project or has it graduated to something more official? Is there much going on these days with OL + AGS integration? From ben.welsh at gmail.com Tue May 25 19:42:47 2010 From: ben.welsh at gmail.com (palewire) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Problems when using IE7 or Safari page zoom feature In-Reply-To: <42FB36A5-E314-4CBC-9B01-8099194C5305@opengeo.org> References: <1239783639470-2637599.post@n2.nabble.com> <20090415113514.GH26968@metacarta.com> <1274142773644-5067857.post@n2.nabble.com> <42FB36A5-E314-4CBC-9B01-8099194C5305@opengeo.org> Message-ID: <1274830967969-5101052.post@n2.nabble.com> Thanks for the tip. I've filed the ticket. https://bugs.webkit.org/show_bug.cgi?id=39698 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problems-when-using-IE7-page-zoom-feature-tp2637599p5101052.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From p.scadden at gns.cri.nz Tue May 25 21:20:44 2010 From: p.scadden at gns.cri.nz (Phil Scadden) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Two questions on google maps In-Reply-To: <1274830967969-5101052.post@n2.nabble.com> References: <1239783639470-2637599.post@n2.nabble.com> <20090415113514.GH26968@metacarta.com> <1274142773644-5067857.post@n2.nabble.com> <42FB36A5-E314-4CBC-9B01-8099194C5305@opengeo.org> <1274830967969-5101052.post@n2.nabble.com> Message-ID: <4BFC776C.1050201@gns.cri.nz> 1/ I notice V2 of the google Map API is now deprecated. Is there a development to move openlayers to V3? (looks like some good reasons to do so). 2/ Anyone know if there is a way to get at unminified google maps api? One the issues I have is where the checkresize() method is called. In a GOOD working version, the checkresize() changes values of mapobject properties (notable Yb which is clearly bounds) whereas a non-working version (when using a treepanel) doesnt cause changes. I am trying hard to find out what controls what checkresize() does so I can modify it in openlayers before that call. -- Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232 Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents. From ahocevar at opengeo.org Wed May 26 03:07:20 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] Two questions on google maps In-Reply-To: <4BFC776C.1050201@gns.cri.nz> References: <1239783639470-2637599.post@n2.nabble.com> <20090415113514.GH26968@metacarta.com> <1274142773644-5067857.post@n2.nabble.com> <42FB36A5-E314-4CBC-9B01-8099194C5305@opengeo.org> <1274830967969-5101052.post@n2.nabble.com> <4BFC776C.1050201@gns.cri.nz> Message-ID: <0C7FF0DE-F99F-4B35-9B6B-E97792E4C08B@opengeo.org> Hi, On May 26, 2010, at 03:20 , Phil Scadden wrote: > 1/ I notice V2 of the google Map API is now deprecated. Is there a > development to move openlayers to V3? (looks like some good reasons to > do so). The v3 support of OpenLayers is ready (http://dev.openlayers.org/sandbox/ahocevar/gmaps-v3/examples/google-v3.html), but we are blocked by http://code.google.com/p/gmaps-api-issues/issues/detail?id=2346 to make panning work correctly. Please star this issue to raise its importance to the GMaps development team. > 2/ Anyone know if there is a way to get at unminified google maps api? > One the issues I have is where the checkresize() method is called. In a > GOOD working version, the checkresize() changes values of mapobject > properties (notable Yb which is clearly bounds) whereas a non-working > version (when using a treepanel) doesnt cause changes. I am trying hard > to find out what controls what checkresize() does so I can modify > it in openlayers before that call. I don't think so. But you would have to ask the GMaps development team at Google. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From gruppi at willygroup.org Wed May 26 03:41:14 2010 From: gruppi at willygroup.org (Willy) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] SelectFeature working at the same time in two different overlays? Message-ID: Hi, I've two overlays, one is a Vector layers of markers built from a kml file, the other is a GML geometric layer from an xml file. I've added a SelectFeature for each layer, but if I add first layer1 then layer2 only selectFeature for layer2 work. On otherwise if I add layer2 then layer1 only selectFeature for layer1 work, there is a way to make working both layers? Here the code: var layer1 = new OpenLayers.Layer.Vector("Segnalazioni", { 'displayInLayerSwitcher':false, styleMap: new OpenLayers.StyleMap(style), projection: map.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "file.kml", format: new OpenLayers.Format.KML({ extractStyles: false, extractAttributes: true }) }) }); var layer2 = new OpenLayers.Layer.GML( "GML", "file.xml", { projection: map.displayProjection, styleMap: myStyleMap, 'displayInLayerSwitcher':false, 'isBaseLayer':false } ); selectControl = new OpenLayers.Control.SelectFeature( layer2, { clickout: true, toggle: true, multiple: false, hover: true } ); layer2.events.on( { "featureselected": function(e) { alert("Selected."); }, "featureunselected": function(e) { alert("Unselected."); } } ); map.addControl(selectControl); selectControl.activate(); select = new OpenLayers.Control.SelectFeature(layer1); layer1.events.on( { "featureselected": onFeatureSelect, "featureunselected": onFeatureUnselect } ); map.addControl(select); select.activate(); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100526/0807993f/attachment.html From bartvde at osgis.nl Wed May 26 03:43:54 2010 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] SelectFeature working at the same time in two different overlays? In-Reply-To: References: Message-ID: <7653.145.50.39.11.1274859834.squirrel@webmail.hostingdiscounter.nl> Use 1 SelectFeature Control and initialize it with an array of layers. /** * Constructor: OpenLayers.Control.SelectFeature * Create a new control for selecting features. * * Parameters: * layers - {}, or an array of vector layers. The * layer(s) this control will select features from. * options - {Object} */ Best regards, Bart > Hi, > I've two overlays, one is a Vector layers of markers built from a kml > file, > the other is a GML geometric layer from an xml file. > I've added a SelectFeature for each layer, but if I add first layer1 then > layer2 > only selectFeature for layer2 work. On otherwise if I add layer2 then > layer1 > only > selectFeature for layer1 work, there is a way to make working both layers? > Here the code: > > var layer1 = new OpenLayers.Layer.Vector("Segnalazioni", { > 'displayInLayerSwitcher':false, > styleMap: new OpenLayers.StyleMap(style), > projection: map.displayProjection, > strategies: [new OpenLayers.Strategy.Fixed()], > protocol: new OpenLayers.Protocol.HTTP({ > url: "file.kml", > format: new OpenLayers.Format.KML({ > extractStyles: false, > extractAttributes: true > }) > }) > }); > > var layer2 = new OpenLayers.Layer.GML( > "GML", > "file.xml", > { > projection: map.displayProjection, > styleMap: myStyleMap, > 'displayInLayerSwitcher':false, > 'isBaseLayer':false > } > ); > > > > > selectControl = new OpenLayers.Control.SelectFeature( > layer2, > { > clickout: true, toggle: true, > multiple: false, hover: true > } > ); > > layer2.events.on( > { > "featureselected": function(e) { > alert("Selected."); > }, > "featureunselected": function(e) { > alert("Unselected."); > } > } > ); > > map.addControl(selectControl); > selectControl.activate(); > > select = new OpenLayers.Control.SelectFeature(layer1); > layer1.events.on( > { > "featureselected": onFeatureSelect, > "featureunselected": onFeatureUnselect > } > ); > > map.addControl(select); > select.activate(); > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From alb.valente at gmail.com Wed May 26 03:56:48 2010 From: alb.valente at gmail.com (Alberto Valente) Date: Wed Sep 1 17:18:50 2010 Subject: [OpenLayers-Users] manual for openlayers with arcims? Message-ID: Hi everybody, I cannot find a complete manual about using openlayers with arcims. I need to use openlayers with an existing arcIMS installation but I don't know who made it and what are the settings and components needed for using it with openlayers (I mean, proxy.cgi, servlet engine and stuff like that). Anyone can help me? Thank you in advance Alberto -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100526/bc0022ac/attachment.html From ahti.lahtela at pp.inet.fi Wed May 26 04:51:15 2010 From: ahti.lahtela at pp.inet.fi (ahlah) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] IE7 and Firefox draws icons to different places In-Reply-To: <1274432498271-5083376.post@n2.nabble.com> References: <1274432498271-5083376.post@n2.nabble.com> Message-ID: <1274863875464-5102487.post@n2.nabble.com> Hi, I finally found bug from my code: graphicHeight was string instead of of integer and that caused error in calculating y offset in IE. -13.5 + "27" is -13.527 instead of 13.5 :( SVG renderer in Firefox calculates offset differently than VML renderer in IE, luckily the string didn't cause any harm in Firefox. Br, ahlah -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE7-and-Firefox-draws-icons-to-different-places-tp5083376p5102487.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gruppi at willygroup.org Wed May 26 05:22:56 2010 From: gruppi at willygroup.org (Daniele Forti) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] SelectFeature working at the same time in two different overlays? In-Reply-To: <7653.145.50.39.11.1274859834.squirrel@webmail.hostingdiscounter.nl> References: , <7653.145.50.39.11.1274859834.squirrel@webmail.hostingdiscounter.nl> Message-ID: Thanks for the answer, but that solution in my case works only with Chrome Browser. In Chrome also works the two-select solution. With any other browser: two-select works only the upper layer one-select doesn't work any layer -- Willy > Date: Wed, 26 May 2010 09:43:54 +0200 > Subject: Re: [OpenLayers-Users] SelectFeature working at the same time in two different overlays? > From: bartvde@osgis.nl > To: gruppi@willygroup.org > CC: users@openlayers.org > > Use 1 SelectFeature Control and initialize it with an array of layers. > > /** > * Constructor: OpenLayers.Control.SelectFeature > * Create a new control for selecting features. > * > * Parameters: > * layers - {}, or an array of vector layers. > The > * layer(s) this control will select features from. > * options - {Object} > */ > > Best regards, > Bart > > > Hi, > > I've two overlays, one is a Vector layers of markers built from a kml > > file, > > the other is a GML geometric layer from an xml file. > > I've added a SelectFeature for each layer, but if I add first layer1 then > > layer2 > > only selectFeature for layer2 work. On otherwise if I add layer2 then > > layer1 > > only > > selectFeature for layer1 work, there is a way to make working both layers? > > Here the code: > > > > var layer1 = new OpenLayers.Layer.Vector("Segnalazioni", { > > 'displayInLayerSwitcher':false, > > styleMap: new OpenLayers.StyleMap(style), > > projection: map.displayProjection, > > strategies: [new OpenLayers.Strategy.Fixed()], > > protocol: new OpenLayers.Protocol.HTTP({ > > url: "file.kml", > > format: new OpenLayers.Format.KML({ > > extractStyles: false, > > extractAttributes: true > > }) > > }) > > }); > > > > var layer2 = new OpenLayers.Layer.GML( > > "GML", > > "file.xml", > > { > > projection: map.displayProjection, > > styleMap: myStyleMap, > > 'displayInLayerSwitcher':false, > > 'isBaseLayer':false > > } > > ); > > > > > > > > > > selectControl = new OpenLayers.Control.SelectFeature( > > layer2, > > { > > clickout: true, toggle: true, > > multiple: false, hover: true > > } > > ); > > > > layer2.events.on( > > { > > "featureselected": function(e) { > > alert("Selected."); > > }, > > "featureunselected": function(e) { > > alert("Unselected."); > > } > > } > > ); > > > > map.addControl(selectControl); > > selectControl.activate(); > > > > select = new OpenLayers.Control.SelectFeature(layer1); > > layer1.events.on( > > { > > "featureselected": onFeatureSelect, > > "featureunselected": onFeatureUnselect > > } > > ); > > > > map.addControl(select); > > select.activate(); > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > _________________________________________________________________ Importa i tuoi amici di Facebook su Messenger http://www.windowslive.it/importaAmici.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100526/c4037357/attachment.html From guillaume.polet at trasys.be Wed May 26 06:06:46 2010 From: guillaume.polet at trasys.be (Polet Guillaume) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] potential big IE performance enhancement-help! In-Reply-To: References: <1274198295847-5070709.post@n2.nabble.com><6711203E-B70E-4179-9F01-5A4294627D16@opengeo.org><1274203301980-5071123.post@n2.nabble.com> Message-ID: Probably a dumb thought but why not using directly: node.style="width:18px;height:18px;top:10px;left:10px;"; Guillaume -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Andreas Hocevar Sent: 18 May 2010 20:49 To: mortac8 Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] potential big IE performance enhancement-help! On May 18, 2010, at 19:21 , mortac8 wrote: > > That actually seems a bit slower :( > 2:59- to render my layer setting node.style.display="none"; then > node.style.display=""; > 2:42- the original way > > I don't understand why setting node.style.cssText is different than > node.style. Can you explain it briefly? I ask because the simple example > below seems to work as I'd expect VML.js:setStyle to work. Because cssText is meant to set css on a CSS rule, not on a style. In IE, however, it works on styles (presumably accidently, and not very well). See the 2nd usage caveat on http://msdn.microsoft.com/en-us/library/ms533698(VS.85).aspx You could try node.cssText instead of node.style.cssText. Wouldn't surprise me if that would do the trick. Regards, Andreas. > > Thanks again! > Ashley > > > >
style="left:50px;top:50px;width:800px;height:600px;background-color:gray ;"> >
>
style="position:absolute;width:5px;height:5px;left:100px;top:75px;backgr ound-color:red;">
> > > > > > > Andreas Hocevar-2 wrote: >> >> Hi, >> >> setting cssText is not the same as setting the style. But you could >> instead try to call >> >> node.style.display = "none"; >> >> as first line of the setStyle method, and >> >> node.style.display = ""; >> >> as last line of the setStyle method. >> >> Let us know if this also boosts performance. >> >> Good luck, >> Andreas. >> >> > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/potential-big-IE-performance-enha ncement-help-tp5070709p5071123.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From scalablev at yahoo.com Wed May 26 08:38:47 2010 From: scalablev at yahoo.com (scalable vector) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Layer.Vector with Protocol.WFS will not show In-Reply-To: Message-ID: <67051.45353.qm@web55502.mail.re4.yahoo.com> I've tried your suggestion with OL 2.9 now, but there is no change. Any idea why? My wfs-server can deliver GML 2.1.2, GML 3.0, GML 3.1.1 and GML 3.2. What does OL need? --- On Thu, 3/11/10, Bart van den Eijnden wrote: > From: Bart van den Eijnden > Subject: Re: [OpenLayers-Users] Layer.Vector with Protocol.WFS will not show > To: "Bart van den Eijnden" > Cc: "scalable vector" , users@openlayers.org > Date: Thursday, March 11, 2010, 12:06 PM > Btw, readFormat was not in OL 2.8, > only in trunk. > > Best regards, > Bart > > On Mar 11, 2010, at 11:57 AM, Bart van den Eijnden wrote: > > > Hi, > > > > this is because the new GML parser (i.e. Format.GML.v2 > in your case) does not parse your response. I would need to > dig in deeper to see why. > > > > As a workaround, you can specify the old GML parser > (used by Layer.WFS) as the readFormat for your Protocol.WFS, > so: > > > > protocol: new OpenLayers.Protocol.WFS({ > >? ???url:? > "/grensepunkt.gml.asp", > >? ???readFormat: new > OpenLayers.Format.GML(),? ? ? ? ? > ? ? ? ? ? ? ? ? > ? ? ? ? ? ? ? ? > ? ? ? ? ? ? ? ? > >? ???featureType: "GRENSEPUNKT" > >? .. > > etc. > > > > Best regards, > > Bart > > > > On Mar 11, 2010, at 11:41 AM, scalable vector wrote: > > > >> http://kart.nois.no/openlayers-2.8test/test.htm tries > to display some gml with Layer.WFS (deprecated according to > the docs) and Layer.Vector. Only Layer.WFS works. Can anyone > see why? I tried setting featurePrefix and featureNS, but > that didn't help. > >> > >> > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > From ale.pas at tiscali.it Wed May 26 08:45:40 2010 From: ale.pas at tiscali.it (Alessandro Pasotti) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] SelectFeature working at the same time in two different overlays? In-Reply-To: References: <7653.145.50.39.11.1274859834.squirrel@webmail.hostingdiscounter.nl> Message-ID: <201005261445.40392.ale.pas@tiscali.it> In data mercoled? 26 maggio 2010 11:22:56, Daniele Forti ha scritto: : > Thanks for the answer, > but that solution in my case works only with Chrome Browser. > In Chrome also works the two-select solution. > With any other browser: > two-select works only the upper layer > one-select doesn't work any layer Hi, A similar problem has been discussed just a few days ago, please read the thread: http://openlayers.org/pipermail/users/2010-May/017837.html response was: it's not a bug. -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502 From f.boussuges at gmail.com Wed May 26 08:47:53 2010 From: f.boussuges at gmail.com (=?ISO-8859-1?Q?Fran=E7ois_Boussuges?=) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Layer.Vector with Protocol.WFS will not show In-Reply-To: <67051.45353.qm@web55502.mail.re4.yahoo.com> References: <67051.45353.qm@web55502.mail.re4.yahoo.com> Message-ID: <4BFD1879.3060605@gmail.com> Hello, try this, I have the same problem with my layers and this method work fine: var protocol1=new OpenLayers.Protocol.HTTP( {url : "http://localhost:8090/geoserver/wfs?", params: {format:"WFS", service: "WFS", version: "1.0.0", request: "GetFeature", typename: "MEDICAGO_VIEW", SRS: "EPSG:4326"}, format : new OpenLayers.Format.GML() scalable vector a ?crit : > I've tried your suggestion with OL 2.9 now, but there is no change. Any idea why? > > My wfs-server can deliver GML 2.1.2, GML 3.0, GML 3.1.1 and GML 3.2. What does OL need? > > > --- On Thu, 3/11/10, Bart van den Eijnden wrote: > > >> From: Bart van den Eijnden >> Subject: Re: [OpenLayers-Users] Layer.Vector with Protocol.WFS will not show >> To: "Bart van den Eijnden" >> Cc: "scalable vector" , users@openlayers.org >> Date: Thursday, March 11, 2010, 12:06 PM >> Btw, readFormat was not in OL 2.8, >> only in trunk. >> >> Best regards, >> Bart >> >> On Mar 11, 2010, at 11:57 AM, Bart van den Eijnden wrote: >> >> >>> Hi, >>> >>> this is because the new GML parser (i.e. Format.GML.v2 >>> >> in your case) does not parse your response. I would need to >> dig in deeper to see why. >> >>> As a workaround, you can specify the old GML parser >>> >> (used by Layer.WFS) as the readFormat for your Protocol.WFS, >> so: >> >>> protocol: new OpenLayers.Protocol.WFS({ >>> url: >>> >> "/grensepunkt.gml.asp", >> >>> readFormat: new >>> >> OpenLayers.Format.GML(), >> >> >> >> >>> featureType: "GRENSEPUNKT" >>> .. >>> etc. >>> >>> Best regards, >>> Bart >>> >>> On Mar 11, 2010, at 11:41 AM, scalable vector wrote: >>> >>> >>>> http://kart.nois.no/openlayers-2.8test/test.htm tries >>>> >> to display some gml with Layer.WFS (deprecated according to >> the docs) and Layer.Vector. Only Layer.WFS works. Can anyone >> see why? I tried setting featurePrefix and featureNS, but >> that didn't help. >> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From hermsdorfer84 at web.de Wed May 26 08:51:25 2010 From: hermsdorfer84 at web.de (Martin.L) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> Message-ID: <1274878285058-5103295.post@n2.nabble.com> Thanks for the answers! @cd: My version is correctly. It makes a request to the WMS of the GeoServer. The params are optional. @Andreas: I've tried the second link and after I paste the code for the VitualHost-section, the Apache won't start again. The errormessage is "The requested operation has failed!". If I comment the VirtualHost-section, apache starts again. After that, I wanted to try the second link. I noticed that there is no path like /usr/lib/cgi-bin/ in my Apache-installation. So do you have some further informations for me? Here is the VitualHost-section in my httpd.conf ProxyRequest Off # Remember to turn the next line off if you are proxying to a NameVirtualHost ProxyPreserveHost On Order deny,allow Allow from all ProxyPass /geoserver http://localhost:8090/geoserver ProxyPassReverse /geoserver http://localhost:8090/geoserver Greets Martin -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103295.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed May 26 09:33:12 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274878285058-5103295.post@n2.nabble.com> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> Message-ID: <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> Hi, for Apache proxy to work you need the mod_proxy module. More info can be found in the Apache documentation. Regards, Andreas. On May 26, 2010, at 14:51 , Martin.L wrote: > > Thanks for the answers! > > @cd: My version is correctly. It makes a request to the WMS of the > GeoServer. The params are optional. > > @Andreas: I've tried the second link and after I paste the code for the > VitualHost-section, the Apache won't start again. The errormessage is "The > requested operation has failed!". If I comment the VirtualHost-section, > apache starts again. After that, I wanted to try the second link. I noticed > that there is no path like /usr/lib/cgi-bin/ in my Apache-installation. So > do you have some further informations for me? > > Here is the VitualHost-section in my httpd.conf > > > ProxyRequest Off > # Remember to turn the next line off if you are proxying to a > NameVirtualHost > ProxyPreserveHost On > > Order deny,allow > Allow from all > > ProxyPass /geoserver http://localhost:8090/geoserver > ProxyPassReverse /geoserver http://localhost:8090/geoserver > > > > Greets > Martin > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103295.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From hermsdorfer84 at web.de Wed May 26 09:40:51 2010 From: hermsdorfer84 at web.de (Martin.L) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> Message-ID: <1274881251581-5103529.post@n2.nabble.com> You mean these two modules? LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so I have these modules and took the comments away. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103529.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hermsdorfer84 at web.de Wed May 26 09:41:29 2010 From: hermsdorfer84 at web.de (Martin.L) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> Message-ID: <1274881289247-5103534.post@n2.nabble.com> You mean these two modules? LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so I have these modules and took the comments in the httpd.conf away. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103534.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dalda at ikt.es Wed May 26 09:46:02 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Question about styling with OL Message-ID: <224DBDAF88A6AC47BD22432815351BE007F76DE9@nekaposta1> Hello, I was wondering if it's possible to use an image (png,gif,whatever) to use it like a fill pattern, to fill a polygon? Thanks. Un saludo, ?????????????????????????????????????????????????????????????????????????????????? David Alda Fern?ndez de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n ? 01192 ? Arkaute (Araba) ?????????????????????????????????????????????????????????????????????????????????? Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ?????????????????????????????????????????????????????????????????????????????????? email: dalda@ikt.es web: www.ikt.es ?????????????????????????????????????????????????????????????????????????????????? From ahocevar at opengeo.org Wed May 26 09:49:16 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274881289247-5103534.post@n2.nabble.com> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> <1274881289247-5103534.post@n2.nabble.com> Message-ID: <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> Yes, exactly these two. You need to have them installed, not just uncommented. Regards, Andreas. On May 26, 2010, at 15:41 , Martin.L wrote: > > You mean these two modules? > > > LoadModule proxy_module modules/mod_proxy.so > LoadModule proxy_http_module modules/mod_proxy_http.so > > > I have these modules and took the comments in the httpd.conf away. > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103534.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From bmcbride at chacompanies.com Wed May 26 09:50:56 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Question about styling with OL In-Reply-To: <224DBDAF88A6AC47BD22432815351BE007F76DE9@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE007F76DE9@nekaposta1> Message-ID: <1274881856558-5103591.post@n2.nabble.com> What type of layer are you trying to style- WMS? Vector? KML? ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-styling-with-OL-tp5103558p5103591.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hermsdorfer84 at web.de Wed May 26 09:58:11 2010 From: hermsdorfer84 at web.de (Martin.L) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> <1274881289247-5103534.post@n2.nabble.com> <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> Message-ID: <1274882291950-5103642.post@n2.nabble.com> I do have these modules installed. http://osgeo-org.1803224.n2.nabble.com/file/n5103642/apache_modules.png -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103642.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From dalda at ikt.es Wed May 26 09:55:44 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Question about styling with OL Message-ID: <224DBDAF88A6AC47BD22432815351BE007F76E07@nekaposta1> Douh!! Sorry, I forgot to mention that. I'm talking about a Vector Layer. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de BMcBride Enviado el: mi?rcoles, 26 de mayo de 2010 15:51 Para: users@openlayers.org Asunto: Re: [OpenLayers-Users] Question about styling with OL What type of layer are you trying to style- WMS? Vector? KML? ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-styling-with-OL-tp5103558p5103591.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From ahocevar at opengeo.org Wed May 26 10:05:05 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274882291950-5103642.post@n2.nabble.com> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> <1274881289247-5103534.post@n2.nabble.com> <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> <1274882291950-5103642.post@n2.nabble.com> Message-ID: <5A1430BC-8BE4-40B6-8FC6-B089C8260473@opengeo.org> The snippet in the link I had sent you means to paste the proxy code (everything between the # ... lines) into your existing VirtualHost section, not to create a new VirtualHost section. Please refer to the Apache documentation for more help. Regards, Andreas. On May 26, 2010, at 15:58 , Martin.L wrote: > > I do have these modules installed. > > http://osgeo-org.1803224.n2.nabble.com/file/n5103642/apache_modules.png > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103642.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From hermsdorfer84 at web.de Wed May 26 10:05:26 2010 From: hermsdorfer84 at web.de (Martin.L) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274882291950-5103642.post@n2.nabble.com> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> <1274881289247-5103534.post@n2.nabble.com> <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> <1274882291950-5103642.post@n2.nabble.com> Message-ID: <1274882726091-5103688.post@n2.nabble.com> Ok my fault. Look again at the VirtualHosts-section. There is a spelling error. ProxyRequest Off is wrong. Changed it to ProxyRequests Off and now the Apache runs. Thanks again and sorry about my mistake. My problem is still exist. The Popup is empty and the request on new tab returns a result. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103688.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed May 26 10:09:40 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274882726091-5103688.post@n2.nabble.com> References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> <1274881289247-5103534.post@n2.nabble.com> <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> <1274882291950-5103642.post@n2.nabble.com> <1274882726091-5103688.post@n2.nabble.com> Message-ID: Have you also changed the url of your wms from http://your.url/path/wms to /path/wms ? If so, then we need more information from you: * the url you access your page with * the url of your wms layer * the response of your GetFeatureInfo request Regards, Andreas. On May 26, 2010, at 16:05 , Martin.L wrote: > > Ok my fault. Look again at the VirtualHosts-section. There is a spelling > error. > > ProxyRequest Off is wrong. Changed it to ProxyRequests Off and now the > Apache runs. Thanks again and sorry about my mistake. > My problem is still exist. The Popup is empty and the request on new tab > returns a result. > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103688.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From hermsdorfer84 at web.de Wed May 26 10:35:01 2010 From: hermsdorfer84 at web.de (Martin.L) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: References: <1274366083654-5079946.post@n2.nabble.com> <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> <1274881289247-5103534.post@n2.nabble.com> <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> <1274882291950-5103642.post@n2.nabble.com> <1274882726091-5103688.post@n2.nabble.com> Message-ID: <1274884501223-5103843.post@n2.nabble.com> No I didn't change the WMS-URL. But after you told me that, I changed ist. And now...IT WORKS!! Thank you very very much. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103843.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hermsdorfer84 at web.de Wed May 26 10:48:34 2010 From: hermsdorfer84 at web.de (Martin.L) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274884501223-5103843.post@n2.nabble.com> References: <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> <1274881289247-5103534.post@n2.nabble.com> <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> <1274882291950-5103642.post@n2.nabble.com> <1274882726091-5103688.post@n2.nabble.com> <1274884501223-5103843.post@n2.nabble.com> Message-ID: <1274885314897-5103927.post@n2.nabble.com> One question, yet. Why do I have to use a Proxy for the Popups? Is this a bug of GeoServer or OpenLayers? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103927.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bmcbride at chacompanies.com Wed May 26 10:57:10 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Question about styling with OL In-Reply-To: <224DBDAF88A6AC47BD22432815351BE007F76E07@nekaposta1> References: <224DBDAF88A6AC47BD22432815351BE007F76DE9@nekaposta1> <224DBDAF88A6AC47BD22432815351BE007F76E07@nekaposta1> Message-ID: <1274885830796-5103974.post@n2.nabble.com> It looks like you can style a vector layer using SLD- http://openlayers.org/dev/examples/sld.html http://openlayers.org/dev/examples/sld.html Have a look at the recently updated http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/index.html SLD Cookbook for examples. The link for polygons with a graphic fill is here: http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons.html#graphic-fill http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons.html#graphic-fill . ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-styling-with-OL-tp5103558p5103974.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed May 26 11:02:36 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GeoExt & OpenLayers, IE8 vs other Browsers In-Reply-To: <1274885314897-5103927.post@n2.nabble.com> References: <1274377705394-5080824.post@n2.nabble.com> <95B25F65-0F69-4789-AF0E-73B3E0FCE78F@opengeo.org> <1274878285058-5103295.post@n2.nabble.com> <398233E8-0E02-4F9C-A032-3BEC2F4795F8@opengeo.org> <1274881289247-5103534.post@n2.nabble.com> <16B0A5F7-08C8-400A-94FA-23F83BCEBA4F@opengeo.org> <1274882291950-5103642.post@n2.nabble.com> <1274882726091-5103688.post@n2.nabble.com> <1274884501223-5103843.post@n2.nabble.com> <1274885314897-5103927.post@n2.nabble.com> Message-ID: It's a security feature of web browsers, called the Same Origin Policy. Regards, Andreas. On May 26, 2010, at 16:48 , Martin.L wrote: > > One question, yet. Why do I have to use a Proxy for the Popups? Is this a bug > of GeoServer or OpenLayers? > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoExt-OpenLayers-IE8-vs-other-Browsers-tp5079946p5103927.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From mak.kolybabi at telenium.ca Wed May 26 13:55:54 2010 From: mak.kolybabi at telenium.ca (Mak Kolybabi) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Icons in LayerSwitcher Message-ID: <4BFD60AA.3030604@telenium.ca> I have a requirement for the OpenLayers LayerSwitcher to have icons beside the overlay layers. Is this possible? -- Mak Kolybabi Programmer Telenium Inc. 204-957-2821 From bmcbride at chacompanies.com Wed May 26 14:02:55 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Icons in LayerSwitcher In-Reply-To: <4BFD60AA.3030604@telenium.ca> References: <4BFD60AA.3030604@telenium.ca> Message-ID: <1274896975787-5104952.post@n2.nabble.com> Mak, You can accomplish this very easily by including some html in your layer constructor code... var layer = new OpenLayers.Layer.WMS( " http://www.myhost.com/myimage.png  OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); map.addLayer(layer); ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Icons-in-LayerSwitcher-tp5104920p5104952.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andreas.hocevar at gmail.com Wed May 26 15:05:49 2010 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] ol+ags integration In-Reply-To: <4BFC3BC1.9090708@ufl.edu> References: <4BFC3BC1.9090708@ufl.edu> Message-ID: Hi, have a look at http://openlayers.org/dev/examples/arcgis93rest.html and http://dev.openlayers.org/releases/OpenLayers-2.9.1/doc/apidocs/files/OpenLayers/Layer/ArcGIS93Rest-js.html This is all officially in the 2.9.1 release of OpenLayers. Regards, Andreas. On May 25, 2010, at 23:06 , Nathaniel Wingfield wrote: > I'm embarking on an ambitious project with ArcGIS Server and would like > to use OpenLayers for the front-end. I found some info > (http://www.mkgeomatics.com/apps/REST_Dev/) about adding identify & > geoprocessing support but the links to august's sandbox are dead and the > work has been removed from trac.openlayers.org. Is this a dead project > or has it graduated to something more official? Is there much going on > these days with OL + AGS integration? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From bmcbride at chacompanies.com Wed May 26 15:25:02 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] ol+ags integration In-Reply-To: References: <4BFC3BC1.9090708@ufl.edu> Message-ID: <1274901902055-5105324.post@n2.nabble.com> If your AGS Service has WMS support activated, you may be able to go that route... So for the dev example you would use: http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer?request=GetCapabilities&service=WMS http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer?request=GetCapabilities&service=WMS . I guess it really depends upon how ambitious your project is and what sort of AGS functionality you are looking to expose to OL. ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/ol-ags-integration-tp5100474p5105324.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Wed May 26 15:25:34 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Question about styling with OL In-Reply-To: <1274885830796-5103974.post@n2.nabble.com> References: <224DBDAF88A6AC47BD22432815351BE007F76DE9@nekaposta1> <224DBDAF88A6AC47BD22432815351BE007F76E07@nekaposta1> <1274885830796-5103974.post@n2.nabble.com> Message-ID: <44F7D734-5551-452D-8E70-98B5DE50365A@opengeo.org> Hi, Using SLD is one thing. What OpenLayers supports of it another. You can style vector layers in OpenLayers using SLD. But graphic fills for polygons are not supported by our vector renderers. Regards, Andreas. On May 26, 2010, at 16:57 , BMcBride wrote: > > It looks like you can style a vector layer using SLD- > http://openlayers.org/dev/examples/sld.html > http://openlayers.org/dev/examples/sld.html > > Have a look at the recently updated > http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/index.html SLD > Cookbook for examples. The link for polygons with a graphic fill is here: > http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons.html#graphic-fill > http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons.html#graphic-fill > . > > ----- > Bryan R. McBride, GISP > http://www.bryanmcbride.com bryanmcbride.com > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-styling-with-OL-tp5103558p5103974.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From bmcbride at chacompanies.com Wed May 26 15:29:03 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Question about styling with OL In-Reply-To: <44F7D734-5551-452D-8E70-98B5DE50365A@opengeo.org> References: <224DBDAF88A6AC47BD22432815351BE007F76DE9@nekaposta1> <224DBDAF88A6AC47BD22432815351BE007F76E07@nekaposta1> <1274885830796-5103974.post@n2.nabble.com> <44F7D734-5551-452D-8E70-98B5DE50365A@opengeo.org> Message-ID: <1274902143186-5105342.post@n2.nabble.com> Doh- my bad! It works great with WMS... Thanks for the clarification. ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-styling-with-OL-tp5103558p5105342.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From qmarqeva at gmail.com Wed May 26 15:45:26 2010 From: qmarqeva at gmail.com (=?ISO-8859-1?Q?C=FAmar_Cueva?=) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Routes between two points Message-ID: Hello, Any one know if openlayers allows to make a "optimal routes" between two points ?? (considering streets ;-) ). If you know any example, please let me know. have a nice day, -- Atte, C?mar Cueva -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100526/e60e4ac7/attachment.html From cserumola at yahoo.co.uk Wed May 26 15:56:12 2010 From: cserumola at yahoo.co.uk (simi) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] GetFeatureInfo returns attribute name only(Mapserver & Openlayers) In-Reply-To: <1274688856963-5092982.post@n2.nabble.com> References: <1274688856963-5092982.post@n2.nabble.com> Message-ID: <1274903772546-5105456.post@n2.nabble.com> Thanks, i tried your suggestions but with no success. I even changed the 'INFO_FORMAT=text/html' to 'INFO_FORMAT=text/plain'. Any further suggestions? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-returns-attribute-name-only-Mapserver-Openlayers-tp5092982p5105456.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From James.Sewell at lisasoft.com Thu May 27 02:49:02 2010 From: James.Sewell at lisasoft.com (James.Sewell@lisasoft.com) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Rules, Styles and context Message-ID: Hello, I want to dynamically set a strokeColor based on feature.styler.color rather that feature.attribute.color. I am using this code: var context = function(feature) { feature.stylers ? ret = feature.stylers : ret = feature.attributes; ret ? null : ret = feature; return ret; } var defaultStyle = new OpenLayers.Style(OpenLayers.Util.applyDefaults({ strokeColor: "${color}", strokeWidth: 3 } , OpenLayers.Feature.Vector.style["default"]), {context: context}); I have also tried this: var defaultStyle = new OpenLayers.Style(OpenLayers.Util.applyDefaults({ strokeColor: "${color}", strokeWidth: 3 } , OpenLayers.Feature.Vector.style["default"]), {context: {styler: null}}) ; But neither seem to work! I am particularly confused as the top example works for OpenLayers.Rule context manipulation. Any hints? Cheers, James Sewell LISAsoft Developer +61 (3) 8680 3200 / +61 414 688 892 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100527/669bea8e/attachment.html From beppenapo at gmail.com Thu May 27 03:20:57 2010 From: beppenapo at gmail.com (Giuseppe Naponiello) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] display different popup for different layer In-Reply-To: <201005251209.55423.ale.pas@tiscali.it> References: <201005251209.55423.ale.pas@tiscali.it> Message-ID: Mmhh, I've tried but it's doesn't work, I think because the layer's attributes are different and I cannot define the same popup content. I've risolved writing a second function: function onFeatureSelect(event) { feature = event.feature; popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), null, "", null, true, onPopupClose); feature.popup = popup; map.addPopup(popup); } and function onFeatureSelect2(event) { feature = event.feature; popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), null, "

" + feature.attributes.title + "

" + feature.attributes.description, null, true, onPopupClose); feature.popup = popup; map.addPopup(popup); } ... ... toscana.events.on({ "featureselected": onFeatureSelect, "featureunselected": onFeatureUnselect }); poi.events.on({ "featureselected": onFeatureSelect2, "featureunselected": onFeatureUnselect2 }); ...maybe I could write better code but ... it works!!! thanks -beppe- 2010/5/25 Alessandro Pasotti > In data luned? 24 maggio 2010 15:14:54, Giuseppe Naponiello ha scritto: > : > Hi all, > > in my project I've 2 layers (layer1, layer2) with different attributes. > > Layer 1 is in gml format, layer2 is a txt file > > When I click on the layer1, I open a popup with this code: > > > > function onPopupClose(evt) {selectControl.unselect(feature);} > > > > //al click su un elemento, creo e visualizzo al popup > > function onFeatureSelect(event) { > > feature = event.feature; > > popup = new OpenLayers.Popup.FramedCloud("chicken", > > feature.geometry.getBounds().getCenterLonLat(), > > null, > > "", > > null, true, onPopupClose); > > feature.popup = popup; > > map.addPopup(popup); > > } > > > > function onFeatureUnselect(event) { > > feature = event.feature; > > if (feature.popup){ > > map.removePopup(feature.popup); > > feature.popup.destroy(); > > feature.popup = null; > > } > > } > > .... > > > > selectControl = new OpenLayers.Control.SelectFeature(layer1); > > //{onSelect: onFeatureSelect, onUnselect: onFeatureUnselect}); > > layer1.events.on({ > > "featureselected": onFeatureSelect, > > "featureunselected": onFeatureUnselect > > }); > > > > > > Now I'd like to display the same kind of popup for the layer2 but I don't > > know what is the correct code to write!!! > > > > > > thanks > > Hi, > > I think that passing both layers to the select control should work: > > selectControl = new OpenLayers.Control.SelectFeature([layer1, layer2]); > selectControl.events.register("featureselected", map, onFeatureSelect); > selectControl.events.register("featureunselected", map, onFeatureUnselect); > map.addControl(selectControl); > selectControl.activate(); > > > -- > Alessandro Pasotti > itOpen - "Open Solutions for the Net Age" > w3: www.itopen.it > Linux User# 167502 > -- -beppe- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100527/565233b7/attachment.html From dalda at ikt.es Thu May 27 03:33:44 2010 From: dalda at ikt.es (David Alda Fernandez de Lezea) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Question about styling with OL Message-ID: <224DBDAF88A6AC47BD22432815351BE007FAAE11@nekaposta1> Hi folks!! I think Andreas has pointed the right way. I forgot to mention or maybe I didn't explain it clearly enough, but what I was asking about features of a OpenLayers.Vector layer an it's associated style without using SLD, just using OL style. Thanks. -----Mensaje original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] En nombre de Andreas Hocevar Enviado el: mi?rcoles, 26 de mayo de 2010 21:26 Para: BMcBride CC: users@openlayers.org Asunto: Re: [OpenLayers-Users] Question about styling with OL Hi, Using SLD is one thing. What OpenLayers supports of it another. You can style vector layers in OpenLayers using SLD. But graphic fills for polygons are not supported by our vector renderers. Regards, Andreas. On May 26, 2010, at 16:57 , BMcBride wrote: > > It looks like you can style a vector layer using SLD- > http://openlayers.org/dev/examples/sld.html > http://openlayers.org/dev/examples/sld.html > > Have a look at the recently updated > http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/index.ht > ml SLD Cookbook for examples. The link for polygons with a graphic fill is here: > http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons > .html#graphic-fill > http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons > .html#graphic-fill > . > > ----- > Bryan R. McBride, GISP > http://www.bryanmcbride.com bryanmcbride.com > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Question-about-styling-with-OL- > tp5103558p5103974.html Sent from the OpenLayers Users mailing list > archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From ahocevar at opengeo.org Thu May 27 05:35:58 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Rules, Styles and context In-Reply-To: References: Message-ID: <81271756-D552-4D99-9EFE-4A9AF5D841BC@opengeo.org> Hi, you are using the context in an incorrect way. Try something like var context = { color: function(feature) { return feature.stylers.color; } }; If you have your color in feature.attributes, you don't need a context at all. Regards, Andreas. On May 27, 2010, at 08:49 , James.Sewell@lisasoft.com wrote: > Hello, > > I want to dynamically set a strokeColor based on feature.styler.color rather that feature.attribute.color. > > I am using this code: > > var context = function(feature) { > feature.stylers ? ret = feature.stylers : ret = feature.attributes; > ret ? null : ret = feature; > return ret; > } > > var defaultStyle = new OpenLayers.Style(OpenLayers.Util.applyDefaults({ strokeColor: "${color}", strokeWidth: 3 } > , OpenLayers.Feature.Vector.style["default"]), {context: context}); > > I have also tried this: > > var defaultStyle = new OpenLayers.Style(OpenLayers.Util.applyDefaults({ strokeColor: "${color}", strokeWidth: 3 } > , OpenLayers.Feature.Vector.style["default"]), {context: {styler: null}}) ; > > But neither seem to work! I am particularly confused as the top example works for OpenLayers.Rule context manipulation. > > Any hints? > > > Cheers, > > James Sewell > LISAsoft Developer > +61 (3) 8680 3200 / +61 414 688 892 > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ravikrishna at qburst.com Thu May 27 05:50:06 2010 From: ravikrishna at qburst.com (Ravi Krishna) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] How to display a specific place on Open Layers using vector overlays? Message-ID: <1274953806010-5107806.post@n2.nabble.com> Hi, I am a newbie in OpenLayers. I have created an openlayers map which has a google overlay as well. I want to display specific points on my map by latitude and longitude . I think it should be done by overlaying with a vector map and adding features like point features in it. I am trying to do in that method. I will paste my html code below. Somebody please give me a solution. OpenLayers Example

-- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Re-How-to-display-a-specific-place-on-Open-Layers-using-vector-overlays-tp5107806p5107806.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gary_wales at hotmail.com Thu May 27 06:28:36 2010 From: gary_wales at hotmail.com (gwales) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Vector Feature Popup without select? Message-ID: <1274956116051-5107915.post@n2.nabble.com> I am researching how to add an onClick event to a point feature on a vector layer to generate a pop-up or add it to selection based on a toolbar switch. As far as I can tell, the only method of launching pop-ups on vectors is to use feature selected? What if I want to select the feature (add it to a selection layer) without launching a pop-up. Markers is the old approach bit it seems straightforward to add an onClick handler to a marker. Can't say the same for a vector point layer or am I missing something? Appreciate any guidance. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Vector-Feature-Popup-without-select-tp5107915p5107915.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From woodbri at swoodbridge.com Thu May 27 08:35:50 2010 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Routes between two points In-Reply-To: References: Message-ID: <4BFE6726.5040909@swoodbridge.com> C?mar Cueva wrote: > Hello, > > Any one know if openlayers allows to make a "optimal routes" between two > points ?? (considering streets ;-) ). If you know any example, please > let me know. See http://pgrouting.postlbs.org/ This works on a server but can be integrated with OpenLayers to display the results. OL can not do the routing in the javascript client. -Steve http://imaptools.com/ From huub.gis at gmail.com Thu May 27 08:52:30 2010 From: huub.gis at gmail.com (huub fleuren) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] add a method to see if layer switcher is maxmized Message-ID: Hi List, If you want to click something else than the Control to toggle the layerswitcher you need an extra function to check the state of the Control by looking at the minimizedDiv or maximizedDiv propery. I never worried about the logic of the terms. If the maximizeDiv display =="none" the switchercontrol is in the maximized state so it seems so: OpenLayers.Control.LayerSwitcher.prototype.isShowControls = function () { return(this.maximizeDiv.style.display=="none") ; } usage: if(layerSwitcher.isShowControls()) layerSwitcher.minimizeControl() else layerSwitcher.maximizeControl(); this is compatible with the layer switcher control button (class: olControlLayerSwitcher) regards, Huub -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100527/b4e1f59c/attachment.html From nw at UFL.EDU Thu May 27 09:29:08 2010 From: nw at UFL.EDU (Nathaniel Wingfield) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] ol+ags integration In-Reply-To: References: <4BFC3BC1.9090708@ufl.edu> Message-ID: <4BFE73A4.5050600@ufl.edu> Thanks to Andreas & Bryan for the pointers. I did eventually find august's AGS work in http://trac.openlayers.org/browser/sandbox/august/trunk/lib/OpenLayers/Control. There appears to be support for Find, Identify, Query, Route, Geoprocessing, and several other AGS functions. There also seems to be a dependency on the ESRI JS API... On 5/26/2010 3:05 PM, Andreas Hocevar wrote: > Hi, > > have a look at > http://openlayers.org/dev/examples/arcgis93rest.html > and > http://dev.openlayers.org/releases/OpenLayers-2.9.1/doc/apidocs/files/OpenLayers/Layer/ArcGIS93Rest-js.html > > This is all officially in the 2.9.1 release of OpenLayers. > > Regards, > Andreas. > > On May 25, 2010, at 23:06 , Nathaniel Wingfield wrote: > >> I'm embarking on an ambitious project with ArcGIS Server and would like >> to use OpenLayers for the front-end. I found some info >> (http://www.mkgeomatics.com/apps/REST_Dev/) about adding identify& >> geoprocessing support but the links to august's sandbox are dead and the >> work has been removed from trac.openlayers.org. Is this a dead project >> or has it graduated to something more official? Is there much going on >> these days with OL + AGS integration? >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > From scalablev at yahoo.com Thu May 27 09:47:39 2010 From: scalablev at yahoo.com (scalable vector) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Layer.Vector with Protocol.WFS will not show In-Reply-To: Message-ID: <432190.92079.qm@web55508.mail.re4.yahoo.com> Many thanks for that! Works for me too. --- On Wed, 5/26/10, users-request@openlayers.org wrote: > > Message: 4 > Date: Wed, 26 May 2010 14:47:53 +0200 > From: Fran?ois Boussuges > Subject: Re: [OpenLayers-Users] Layer.Vector with > Protocol.WFS will > ??? not show > Cc: users@openlayers.org > Message-ID: <4BFD1879.3060605@gmail.com> > Content-Type: text/plain; charset=ISO-8859-1; > format=flowed > > Hello, try this, I have the same problem with my layers and > this method > work fine: > > var protocol1=new OpenLayers.Protocol.HTTP( > ? ? ? ? ? ? {url : "http://localhost:8090/geoserver/wfs?", > ? ? ? ? ? ? ? ? > params: {format:"WFS", > ? ? ? ? ? ? ? ? > service: "WFS", > ? ? ? ? ? ? ? ? > version: "1.0.0", > ? ? ? ? ? ? ? ? > request: "GetFeature", > ? ? ? ? ? ? ? ? > typename: "MEDICAGO_VIEW", > ? ? ? ? ? ? ? ? > SRS: "EPSG:4326"}, > ? ? ? ? ? ? ? ? > format : new OpenLayers.Format.GML() > From me at blakecrosby.com Thu May 27 10:35:49 2010 From: me at blakecrosby.com (Blake Crosby) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] WFS Not Returning Coordinates Message-ID: <4BFE8345.5020409@blakecrosby.com> Hello, I'm using WFS Protocol on a vector layer (as per the example) to plot data on the map from a wfs server: var geographic = new OpenLayers.Projection("EPSG:4326"); var layer = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://mapserver.worldflightplanner.com/radar/", featureType: "flightrules", featureNS: "http://mapserver.gis.umn.edu/mapserver", featurePrefix: "ms", version: "1.1.0", geometryName: "location", srsName: "EPSG:4326", extractAttribute: true }),projection: geographic }); This works fine, however, the returned GML from the WFS does not contain any coordinates, just the metadata. Is this something wrong with my Mapserver configuration, or my OL call? You can see the request, and the returned data here: http://pastebin.org/284683 Thanks, Blake From armin_helic at hotmail.com Thu May 27 10:57:16 2010 From: armin_helic at hotmail.com (Armin Helic) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] =?windows-1252?q?First-time__user_of_OpenLayer?= =?windows-1252?q?s_=96_FORMAT_of_Layers?= Message-ID: Hi, I have never used OpenLayers and would appreciate any help to get started. My first question is about using my own base layers and overlays. Some of my base layers are in .TIF format and others are in MapInfo format. Some data are raster layers and some vector layers. The same applies for overlays. Could somebody tell me what I need to do with these data i.e. in what format they have to be stored in order to be properly displayed in OpenLayers? Any help will be grately appreciated. Thanks, Armin _________________________________________________________________ http://clk.atdmt.com/UKM/go/197222280/direct/01/ Do you have a story that started on Hotmail? Tell us now -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100527/2a09acf8/attachment.html From bmcbride at chacompanies.com Thu May 27 11:27:18 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] =?utf-8?q?First-time__user_of_OpenLayers_?= =?utf-8?q?=E2=80=93_FORMAT_of_Layers?= In-Reply-To: References: Message-ID: <1274974038742-5109163.post@n2.nabble.com> Hi Armin, OpenLayers supports several different layer types. Have a look at the http://dev.openlayers.org/releases/OpenLayers-2.9.1/doc/apidocs/files/OpenLayers-js.html Class Documentation under the Layer section. Depending on the size of your raster layers, you may be able to load them directly as an Image Layer- see http://openlayers.org/dev/examples/image-layer.html http://openlayers.org/dev/examples/image-layer.html . If they are large images, you will probably want to cut them into tiles- see http://www.maptiler.org/ Map Tiler . The same general rule applies for your vector data. Smaller, less complex datasets may be loaded directly as a vector layer (KML, JSON, GML, Text, etc), while larger datasets will require some server side processing. You could use GeoServer to render your files as WMS overlays in OpenLayers, or you could load the data into a spatial database (PostGIS/MySQL) and write a PHP script to call just the bits you need to fill the map viewport. Hope this helps to get you started... ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/First-time-user-of-OpenLayers-FORMAT-of-Layers-tp5109032p5109163.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bsigrist at tooledesign.com Thu May 27 12:16:04 2010 From: bsigrist at tooledesign.com (Ben Sigrist) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] using openlayers for VGI application Message-ID: <004701cafdb7$e7dfd950$b79f8bf0$@com> Hi folks, I am new to OpenLayers and I wanted to get some rough feedback on an implementation I have in mind. We would like to collect information from the public as points and possibly polylines. I would like to use OpenLayers to display the basemap and for the user to input data using the geometry tools. As far as storing that data, would it be feasible to use a public Google Spreadsheet to store the data? The idea of having everything client side (and on Google's server side) is appealing. Or is it better to have that data entered into a PostGIS database? Any tutorials on the web that you could point me to would be helpful. Thank you for your feedback. Benjamin Sigrist GIS Specialist -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100527/9f936718/attachment.html From arnd.wippermann at web.de Thu May 27 13:26:31 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] WFS Not Returning Coordinates In-Reply-To: <4BFE8345.5020409@blakecrosby.com> Message-ID: Hi, If you use Mapserver 5.6.x, then it's a bug. WFS Server - GetFeature POST request does not return geometry http://trac.osgeo.org/mapserver/ticket/3235 Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Blake Crosby Gesendet: Donnerstag, 27. Mai 2010 16:36 An: users@openlayers.org Betreff: [OpenLayers-Users] WFS Not Returning Coordinates Hello, I'm using WFS Protocol on a vector layer (as per the example) to plot data on the map from a wfs server: var geographic = new OpenLayers.Projection("EPSG:4326"); var layer = new OpenLayers.Layer.Vector("WFS", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ url: "http://mapserver.worldflightplanner.com/radar/", featureType: "flightrules", featureNS: "http://mapserver.gis.umn.edu/mapserver", featurePrefix: "ms", version: "1.1.0", geometryName: "location", srsName: "EPSG:4326", extractAttribute: true }),projection: geographic }); This works fine, however, the returned GML from the WFS does not contain any coordinates, just the metadata. Is this something wrong with my Mapserver configuration, or my OL call? You can see the request, and the returned data here: http://pastebin.org/284683 Thanks, Blake _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From subhaniminhas at gmail.com Thu May 27 14:07:05 2010 From: subhaniminhas at gmail.com (Subhani Minhas) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Custom OpenLayers Graphic Names with multiple vector features Message-ID: Dear all, at present the graphic-name.html example from OL2.9 examples shows us how to add a custom graphic name, as follows: OpenLayers.Renderer.symbol.lightning = [0,0, 4,2, 6,0, 10,5, 6,3, 4,5, 0,0]; and OpenLayers.Renderer.symbol.rectangle = [0,0, 4,0, 4,10, 0,10, 0,0]; 1. My first question is , how can we add a feature with multiple vector features, e.g. i found an example in geoext 0.7 http://dev.geoext.org/trunk/geoext/examples/renderer.html which can draw multiple vectors in a single feature as following: Geometry Well-Known Text : POLYGON((1 30, -33 10, -39 -21, 1 -41, 23 -22, 27 15, 1 30), (0 10, -14 0, -4 -24, 12 -8, 0 10)) How we can achieve the same in OL? 2. I want to achieve following: Once i add a vector layer feature on a click event, the actual symbol is drawn above the point of click, and it is connected with the point of click with a vector line. Also when i drag the drawn vector feature the line's one end remains at the point of click, while the other end is 'fastened' to the vector feature. How this can be achieved in OL ? Thanks in advance.... Any help will be welcome, especially if some code example can be given, thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100527/7c6b9e66/attachment.html From ml at lingner.eu Thu May 27 15:09:36 2010 From: ml at lingner.eu (Lars Lingner) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] FYI: Spam in trac wiki Message-ID: <4BFEC370.3090108@lingner.eu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, on the wiki page http://trac.openlayers.org/wiki/UserGuide someone manged somehow to leave spam again. Lars -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv+w28ACgkQ0GRF77ebR/lMvwCfbd6lo3rG1cXdUyKiBl4sKmkX 7YwAn1u0p49z4ozwNinhStvQnDuZs5dz =FSUr -----END PGP SIGNATURE----- From bmcbride at chacompanies.com Thu May 27 15:16:11 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] using openlayers for VGI application In-Reply-To: <004701cafdb7$e7dfd950$b79f8bf0$@com> References: <004701cafdb7$e7dfd950$b79f8bf0$@com> Message-ID: <1274987771142-5110157.post@n2.nabble.com> Hi Ben, You may be able to get away with using Google Spreadsheets to store point data, but I'm not quite sure how you would handle polyline geometries. You may want to look into the http://code.google.com/apis/maps/documentation/mapsdata/ Google Maps Data API , which basically exposes the My Maps storage platform. Alternatively, you could have your editors use Google My Maps to edit a collaborative KML, which could be referenced in your OpenLayers application. Depending on the scope of your application, you could use PostGIS or even MySQL Spatial to store your VGI. You'd still have to write some scripts to spit the data out of the database in an OL friendly format (KML, JSON, etc). I guess a lot depends upon how sophisticated your data collection application needs to be and what level of information you are trying to collect. ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/using-openlayers-for-VGI-application-tp5109385p5110157.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu May 27 16:08:31 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] FYI: Spam in trac wiki In-Reply-To: <4BFEC370.3090108@lingner.eu> References: <4BFEC370.3090108@lingner.eu> Message-ID: <36C765FE-3F43-4177-8EB2-F9995379316D@opengeo.org> Thanks, removed. Chris, can you please delete user bobmarks, who committed this crime on our opensource community, using IP address 67.70.199.163. Thanks, -Andreas. On May 27, 2010, at 21:09 , Lars Lingner wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > on the wiki page http://trac.openlayers.org/wiki/UserGuide someone > manged somehow to leave spam again. > > > Lars > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkv+w28ACgkQ0GRF77ebR/lMvwCfbd6lo3rG1cXdUyKiBl4sKmkX > 7YwAn1u0p49z4ozwNinhStvQnDuZs5dz > =FSUr > -----END PGP SIGNATURE----- > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From christopher.schmidt at nokia.com Thu May 27 16:35:29 2010 From: christopher.schmidt at nokia.com (christopher.schmidt@nokia.com) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] FYI: Spam in trac wiki In-Reply-To: <36C765FE-3F43-4177-8EB2-F9995379316D@opengeo.org> References: <4BFEC370.3090108@lingner.eu> <36C765FE-3F43-4177-8EB2-F9995379316D@opengeo.org> Message-ID: On May 27, 2010, at 4:08 PM, ext Andreas Hocevar wrote: > Thanks, removed. > > Chris, can you please delete user bobmarks, who committed this crime on our opensource community, using IP address 67.70.199.163. Done. Regards, -- Christopher Schmidt Nokia From beppenapo at gmail.com Fri May 28 03:37:36 2010 From: beppenapo at gmail.com (Giuseppe Naponiello) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] First-time user of OpenLayers ? FORMAT of Layers (BMcBride) Message-ID: > > ... or you could load the data into a spatial database (PostGIS/MySQL) and > write a > PHP script to call just the bits you need to fill the map viewport. > > Hope this helps to get you started... > Very helpful, thanks! I'm trying to do something like that but I don't understand how to perform the script; I'll try to explain me better: 1. Extract the data from db with a query -> "select * from ..." 2. Create the variables 3. Write my html code and create a structure like a csv (first row as title and then the data) Could works? bye -- -beppe- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100528/57a7549d/attachment.html From tamer.gur at vodafone.com Fri May 28 04:35:18 2010 From: tamer.gur at vodafone.com (TAMER GUR) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] (no subject) Message-ID: Hi all, I have problem when drawing circles on google map layer. I simply edit this google example http://www.openlayers.org/dev/examples/google.html for drawing circle I added polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); var polyOptions = { sides :40 }; polygonControl = new OpenLayers.Control.DrawFeature(polygonLayer, OpenLayers.Handler.RegularPolygon, { handlerOptions :polyOptions }); map.addControl(polygonControl); after this circles drawn as expected but when panning up and down side on map , circles positions are broken. Any solution for this Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100528/72a4f8ea/attachment.html From dimos_anastasiou at yahoo.com Fri May 28 05:32:53 2010 From: dimos_anastasiou at yahoo.com (Dimos) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Sharing/editing maps on a website? Message-ID: <453870.95440.qm@web50101.mail.re2.yahoo.com> Dear OpenLayers Mailing List, I am sorry if this has been already covered in previous posts: I would like to share maps online, on a high resolution imagery background, and permit visitors (average pc users) in an easy manner to draw and/or add text comments to the maps, and then share again with the map user list (as in commonly used proprietary software). --- Is there any website offering that with OpenLayers, so an average pc user, can log in, draw maps, post comments and share with a specific map user list? --- Thanks, Dimos From eta at le34.dk Fri May 28 07:36:51 2010 From: eta at le34.dk (Esben Taudorf) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] How to use WMTS (Web Map Tile Service) in OpenLayers Message-ID: Hi everybody I am trying to use a WMTS (Web Map Tile Service) and was wondering how to do this and which layer class to use? I use the newest stable build of OpenLayers (2.9.1). Regards, Esben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100528/235efd4e/attachment.html From jimmy.aumard at gmail.com Fri May 28 08:40:45 2010 From: jimmy.aumard at gmail.com (Jimmy Aumard) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] OL and android Message-ID: Hello, I have test OpenLayers example on android and they works but I can't move on map with touch, it's normal? I have no interaction with map Cheers -- Aumard Jimmy D?veloppeur KINAXIA c/o CICA / PacaEst 2229 Route des Cr?tes F-06560 Sophia Antipolis T?l.: +33 (0)4 8973 0242 Mob.: +33 (0)6 6017 2827 Fax : +33 (0)4 8307 6583 http://www.kinaxia.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100528/b9069592/attachment.html From christopher.schmidt at nokia.com Fri May 28 08:46:23 2010 From: christopher.schmidt at nokia.com (christopher.schmidt@nokia.com) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] OL and android In-Reply-To: References: Message-ID: On May 28, 2010, at 8:40 AM, ext Jimmy Aumard wrote: > Hello, > > I have test OpenLayers example on android and they works but I can't move on map with touch, it's normal? I have no interaction with map Android (and most touch browsers) do not support/implement mousemove events based on dragging in the map. There has been some work towards improved touch-based navigation for iPhone using Apple-generated touch events. Assuming the android browser implements similar properties, this effort could also help on Android. Regards, -- Christopher Schmidt Nokia From cedric.moullet at camptocamp.com Fri May 28 09:03:53 2010 From: cedric.moullet at camptocamp.com (=?ISO-8859-1?Q?C=E9dric_Moullet?=) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] How to use WMTS (Web Map Tile Service) in OpenLayers In-Reply-To: References: Message-ID: Hi, If you want (can) to use the WMTS RESTFul interface, you can use: var layer = new OpenLayers.Layer.XYZ(layerName, "http://wmtsPath/${z}/${y}/${x}.jpeg", jpegOptions); Hope this helps. I would be interested to know if there are open (RESTFull) WMTS servers available. C?dric On Fri, May 28, 2010 at 1:36 PM, Esben Taudorf wrote: > Hi everybody > > > > I am trying to use a WMTS (Web Map Tile Service) and was wondering how to > do this and which layer class to use? > > I use the newest stable build of OpenLayers (2.9.1). > > > > Regards, Esben > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Geospatial Director Camptocamp SA C?dric Moullet PSE A CH-1015 Lausanne www.camptocamp.com / www.mapfish.org / twitter.com/cedricmoullet / mapfishblog.blogspot.com/ +41 79 759 69 83 (mobile) +41 21 619 10 21 (direct) +41 21 619 10 10 (centrale) +41 21 619 10 00 (fax) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100528/31a1bb27/attachment.html From bmcbride at chacompanies.com Fri May 28 09:05:40 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] First-time user of OpenLayers ? FORMAT of Layers (BMcBride) In-Reply-To: References: Message-ID: <1275051940810-5112983.post@n2.nabble.com> There is a good PHP/MySQL tutorial written by the Google Geo Team you may want to check out here: http://code.google.com/apis/maps/articles/phpsqlajax.html http://code.google.com/apis/maps/articles/phpsqlajax.html . This method uses PHP to echo XML, but should get you started in the right direction. Keep in mind if you are storing spatial geometries you will need to convert them to WKT using a function like AsText(the_geom). ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Re-First-time-user-of-OpenLayers-FORMAT-of-Layers-BMcBride-tp5111964p5112983.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eta at le34.dk Fri May 28 10:04:27 2010 From: eta at le34.dk (Esben Taudorf) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] How to use WMTS (Web Map Tile Service) in OpenLayers In-Reply-To: References: Message-ID: Hi C?dric Thanks for your reply. I will try to use the XYZ layer class. The WMTS I am testing is unfortunately not open, but it would be nice to have open WMTS server. I just realised that there are a ticket about adding a new WMTS layer class here: http://trac.openlayers.org/ticket/2637 The WMTS service that I am testing have KVP (Key-value-pairs) as parameters so maybe a WMTS layer with parameters is a better option for me. Anyway I will try the XYZ class. Esben Fra: C?dric Moullet [mailto:cedric.moullet@camptocamp.com] Sendt: 28. maj 2010 15:04 Til: Esben Taudorf Cc: users@openlayers.org Emne: Re: [OpenLayers-Users] How to use WMTS (Web Map Tile Service) in OpenLayers Hi, If you want (can) to use the WMTS RESTFul interface, you can use: var layer = new OpenLayers.Layer.XYZ(layerName, "http://wmtsPath/${z}/${y}/${x}.jpeg ", jpegOptions); Hope this helps. I would be interested to know if there are open (RESTFull) WMTS servers available. C?dric On Fri, May 28, 2010 at 1:36 PM, Esben Taudorf wrote: Hi everybody I am trying to use a WMTS (Web Map Tile Service) and was wondering how to do this and which layer class to use? I use the newest stable build of OpenLayers (2.9.1). Regards, Esben _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Geospatial Director Camptocamp SA C?dric Moullet PSE A CH-1015 Lausanne www.camptocamp.com / www.mapfish.org / twitter.com/cedricmoullet / mapfishblog.blogspot.com/ +41 79 759 69 83 (mobile) +41 21 619 10 21 (direct) +41 21 619 10 10 (centrale) +41 21 619 10 00 (fax) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100528/e4c7dd8e/attachment.html From randy.horner at nisc.coop Fri May 28 10:15:14 2010 From: randy.horner at nisc.coop (rhorner) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] postgis queries Message-ID: <1275056114380-5113242.post@n2.nabble.com> I need to zoom to features based on values in a postgis database. Is it reasonable to a throw a query at a servlet that queries the database and returns the extent, which I then zoom to? I don't want to go this route if there are easier/better ways to accomplish this. PHP is not an option. Thanks for any help or comments. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/postgis-queries-tp5113242p5113242.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bmcbride at chacompanies.com Fri May 28 10:39:14 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] postgis queries In-Reply-To: <1275056114380-5113242.post@n2.nabble.com> References: <1275056114380-5113242.post@n2.nabble.com> Message-ID: <1275057554920-5113345.post@n2.nabble.com> If you are running GeoServer you can make a WFS request, which will return the BBOX for the feature queried. The nice thing about this approach is that you don't have to write any server side scripting- you can just use JavaScript to piece together the variables needed to build the WFS URL. ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/postgis-queries-tp5113242p5113345.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From randy.horner at nisc.coop Fri May 28 10:42:23 2010 From: randy.horner at nisc.coop (rhorner) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] postgis queries In-Reply-To: <1275057554920-5113345.post@n2.nabble.com> References: <1275056114380-5113242.post@n2.nabble.com> <1275057554920-5113345.post@n2.nabble.com> Message-ID: <8388742B98C6BE479282C543CD000EE01E5F6BD2@ndes1.nisc.lan> Thanks for the quick reply. I am running geoserver. Can you make attribute queries with wfs? The wfs query examples I've seen are all spatial queries. From: BMcBride [via OSGeo.org] [mailto:ml-node+5113345-1431074383-516948@n2.nabble.com] Sent: Friday, May 28, 2010 9:39 AM To: Randy Horner Subject: Re: postgis queries If you are running GeoServer you can make a WFS request, which will return the BBOX for the feature queried. The nice thing about this approach is that you don't have to write any server side scripting- you can just use JavaScript to piece together the variables needed to build the WFS URL. Bryan R. McBride, GISP bryanmcbride.com ________________________________ View message @ http://osgeo-org.1803224.n2.nabble.com/postgis-queries-tp5113242p5113345 .html To unsubscribe from postgis queries, click here . -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/postgis-queries-tp5113242p5113358.html Sent from the OpenLayers Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100528/42d401c7/attachment.html From bmcbride at chacompanies.com Fri May 28 11:01:55 2010 From: bmcbride at chacompanies.com (BMcBride) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] postgis queries In-Reply-To: <8388742B98C6BE479282C543CD000EE01E5F6BD2@ndes1.nisc.lan> References: <1275056114380-5113242.post@n2.nabble.com> <1275057554920-5113345.post@n2.nabble.com> <8388742B98C6BE479282C543CD000EE01E5F6BD2@ndes1.nisc.lan> Message-ID: <1275058915919-5113446.post@n2.nabble.com> Sure- you can use simple CQL_FILTER queries in your WFS request... http://suite.opengeo.org/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=usa:states&CQL_FILTER=STATE_NAME='New York'&outputformat=json Just make sure to tick the "Return bounding box with every feature" box in your WFS settings in GeoServer. I use this technique for querying attributes and returning the results to an ExtJS grid. One of the columns in my grid is a "Map" link, which calls a map.zoomToExtent function, based on the bbox values returned. You may also want to check out the http://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html?highlight=cql GeoServer CQL Documentation . ----- Bryan R. McBride, GISP http://www.bryanmcbride.com bryanmcbride.com -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/postgis-queries-tp5113242p5113446.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eider at fh-bingen.de Fri May 28 11:03:49 2010 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] OL and android In-Reply-To: References: Message-ID: <4BFFDB55.1060709@fh-bingen.de> Maybe you should have a look at http://www.opentouchmap.org/ Am 28.05.2010 14:46, schrieb christopher.schmidt@nokia.com: > On May 28, 2010, at 8:40 AM, ext Jimmy Aumard wrote: > > >> Hello, >> >> I have test OpenLayers example on android and they works but I can't move on map with touch, it's normal? I have no interaction with map >> > Android (and most touch browsers) do not support/implement mousemove events based on dragging in the map. There has been some work towards improved touch-based navigation for iPhone using Apple-generated touch events. Assuming the android browser implements similar properties, this effort could also help on Android. > > Regards, > -- Mit freundlichen Gr??en / Yours faithfully Carsten Eider Dipl. Inf. (FH) Kompetenzzentrum f?r Innovative Informationssysteme c/o Fachhochschule Bingen / University of applied sciences Bingen Berlinstra?e 109 55411 Bingen Tel: +49 (0) 6721 / 409-179 Fax: +49 (0) 6721 / 994-251 email: eider@fh-bingen.de Internet: iis.fh-bingen.de Diese E-Mail, inklusive anh?ngender Dateien, kann vertrauliche und/oder rechtlich gesch?tzte Inhalte enthalten. Wenn Sie nicht der richtige Adressat sind und diese E-Mail irrt?mlich erhalten haben, benachrichtigen Sie bitte sofort den Absender und vernichten Sie sodann die Originalnachricht. Die unbefugte Kopie, Weiterleitung oder sonstige Verbreitung dieser Nachricht ist nicht gestattet. This e-mail, including attachments, may contain confidential and/or privileged information. If you are not the intended recipient, please notify the sender immediately then delete the original message. Any copying forwarding and/or distribution without permission of the sender is forbidden. -------------- next part -------------- A non-text attachment was scrubbed... Name: eider.vcf Type: text/x-vcard Size: 1142 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100528/1e8c3cbc/eider.vcf From randy.horner at nisc.coop Fri May 28 14:45:18 2010 From: randy.horner at nisc.coop (rhorner) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] postgis queries In-Reply-To: <1275058915919-5113446.post@n2.nabble.com> References: <1275056114380-5113242.post@n2.nabble.com> <1275057554920-5113345.post@n2.nabble.com> <8388742B98C6BE479282C543CD000EE01E5F6BD2@ndes1.nisc.lan> <1275058915919-5113446.post@n2.nabble.com> Message-ID: <1275072318761-5114234.post@n2.nabble.com> Thanks for the direction. I'll give it a shot. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/postgis-queries-tp5113242p5114234.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From nw at ufl.edu Fri May 28 16:02:43 2010 From: nw at ufl.edu (Nathaniel Wingfield) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] newbie questions Message-ID: <4C002163.60600@ufl.edu> I've built my first OL map, but encountered some quirky behavior with certain controls. All symptoms are present in Chrome, Firefox, and IE 8. a. No alpha transparency for Navigation or ScaleLine control images. b. Scroll wheel does not zoom in/out. c. Adding an OverviewMap control causes the main map to be blank. The overview map is also blank. I'm adding a single layer (the only layer) to its layers array. I'll gladly post code if that would help. -- Nathaniel Wingfield GeoPlan Center http://www.geoplan.ufl.edu From list at rdewit.net Sat May 29 01:25:20 2010 From: list at rdewit.net (Roald de Wit) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] WFS Not Returning Coordinates In-Reply-To: References: Message-ID: <4C00A540.6050303@rdewit.net> Hi Blake, You can work around this issue by providing the property names explicitly in the options of your protocol, including the name of the geometry. Example: propertyNames: 'year,seq,name,storm_start,storm_end,msGeometry'.split(',') Note that MapServer by default chooses 'msGeometry' as the name of the geometry attribute even though it might be called 'the_geom' or 'wkb_geometry' on the data source. In your case it's 'location' I presume. Regards, Roald On 28/05/10 03:26, Arnd Wippermann wrote: > Hi, > > If you use Mapserver 5.6.x, then it's a bug. > > WFS Server - GetFeature POST request does not return geometry > http://trac.osgeo.org/mapserver/ticket/3235 > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Blake Crosby > Gesendet: Donnerstag, 27. Mai 2010 16:36 > An: users@openlayers.org > Betreff: [OpenLayers-Users] WFS Not Returning Coordinates > > Hello, > > I'm using WFS Protocol on a vector layer (as per the example) to plot data > on the map from a wfs server: > > var geographic = new OpenLayers.Projection("EPSG:4326"); > var layer = new OpenLayers.Layer.Vector("WFS", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://mapserver.worldflightplanner.com/radar/", > featureType: "flightrules", > featureNS: "http://mapserver.gis.umn.edu/mapserver", > featurePrefix: "ms", > version: "1.1.0", > geometryName: "location", > srsName: "EPSG:4326", > extractAttribute: true > }),projection: geographic > }); > > This works fine, however, the returned GML from the WFS does not contain any > coordinates, just the metadata. Is this something wrong with my Mapserver > configuration, or my OL call? > > You can see the request, and the returned data here: > > http://pastebin.org/284683 > > Thanks, > Blake > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From pomiarowiec10 at poczta.onet.pl Sat May 29 13:18:31 2010 From: pomiarowiec10 at poczta.onet.pl (=?UTF-8?B?QmFydMWCb21pZWogQnVya290?=) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Problem with Vector_points from WFS Geoserver Message-ID: <4C014C67.4020308@poczta.onet.pl> Hello OLusers I have probelm with confusing display bahavior of vectorlayer from goeserver as WFS. I created a rasterlayer from Mapserver and vector layer from Geoserver as folows: var options = { projection: new OpenLayers.Projection("EPSG:2180"), units: "m", maxResolution: 10, maxExtent: new OpenLayers.Bounds(545440,226900,586250,261950) }; map = new OpenLayers.Map('map',options); var topo = new OpenLayers.Layer.WMS( "Mapa topo","http://myserver/cgi-bin/wms?", {layers: 'topo', format: 'image/png',projection: "EPSG:2180" },{'buffer':0} ); map.addLayers([topo]); wfs = new OpenLayers.Layer.WFS( "WFS czysty", "http://myserver:8080/geoserver/wfs", {typename: 'komunikacja:przystanki_mk'}, { typename: "komunikacja:przystanki_mk" //featureNS: "http://www.openplans.org/topp", //extractAttributes: false, } ); map.addLayers([wfs]); The topo layer displays correctly in all cases. Wfs-layer don't displays points in Mozilla 3.6.3. In IE 8 I see my vectorpoints correctly. Please tell me wat should I add to my code to see vectorlayer in Mozilla? In the geoserver log I see: /geoserver/wfs?TYPENAME=komunikacja%3Aprzystanki_mk&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A2180&BBOX=559123,241606,572573,247236 Also the geoserver give me the gml file and I can see this as http://myserver:8080/geoserver/wfs?TYPENAME=komunikacja%3Aprzystanki_mk&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A2180&BBOX=562938,243383.5,569768,246168.5 ? unknown ? ? Dworzec G??wny Wsch?d 461 a ? ? 567877.55357216,245038.45782074 dworzec g??wny wsch?d ? ? Dworzec G??wny Wsch?d 461 a ? ? 567911.75531243,245032.42086227 ... I tried to define point layer as vectorlayer with protocol WFS (as I found in OL discussions): var przystanki_wfs = new OpenLayers.Layer.Vector("WFS przystanki protocol", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ //protocol: new OpenLayers.Protocol.WFS.v1_1_0({ url: "http://myserver:8080/geoserver/wfs", featureType: "komunikacja:przystanki_mk", //featureType {String} Local (without prefix) feature typeName (required). //TYPENAME=komunikacja:przystanki //featureNS: "komunikacja", //featureNS {String} Feature namespace (optional). "http://opengeo.org" "http://postgis.org" //featurePrefix:"komunikacja" , //Feature namespace alias (optional - only used if featureNS is provided). Default is ?feature?. //featureNS: "komunikacja", srsName: "EPSG:2180", version: "1.0.0" //version: "1.1.0 //schema: "http://myserver:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=komunikacja:przystanki", }) }); map.addLayers([ przystanki_wfs]); Now I see no one point in this layer in Mozilla and no one in IE When I display the layer przystanki_wfs in Mozilla I see that Geoserver logs has new lines: 91.150.223.134 - - [29/maj/2010:16:52:22 +0000] "OPTIONS /geoserver/wfs HTTP/1.1" 200 0 91.150.223.134 - - [29/maj/2010:16:52:24 +0000] "OPTIONS /geoserver/wfs HTTP/1.1" 200 0 When I show the new layer in IE the log looks like so: 91.150.223.134 - - [29/maj/2010:16:54:39 +0000] "POST /geoserver/wfs HTTP/1.1" 200 23047 91.150.223.134 - - [29/maj/2010:16:54:56 +0000] "POST /geoserver/wfs HTTP/1.1" 200 19968 I tried change the version of WFS: to version: "1.1.0", enter a schema: as: schema: "http://myserver:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=komunikacja:przystanki", change the: strategies: [new OpenLayers.Strategy.Fixed()], It don't helped. I generated the gml file from Geoserver log /geoserver/wfs?TYPENAME=komunikacja%3Aprzystanki_mk&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A2180&BBOX=559018,241636,572678,247206 and defined the layer as GML layer var gml = new OpenLayers.Layer.GML("GML", "przystanki_gml.xml", { format: OpenLayers.Format.GML }) map.addLayer(gml); Now I see the points correctly in Mozilla and in IE. Pleace tell me what I'm doing wrong. I would like to user geoserver as WSF-T to edit the points. What is the reason of so confusing behavior. Thanks Bartek -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100529/655f9628/attachment.html From arnd.wippermann at web.de Sun May 30 17:04:29 2010 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] WFS Not Returning Coordinates In-Reply-To: <4C00A540.6050303@rdewit.net> Message-ID: Hi Roald, Adding propertyNames (attributes of the feature) to the protocol solves the problem with the geometry for MapServer 5.6.1. First I thought it wouldn't work, because i added msgeometry instead of msGeometry. And I have to add srsName to the protocol, what for version 5.2 is not needed. thx Arnd -----Urspr?ngliche Nachricht----- Von: Roald de Wit [mailto:list@rdewit.net] Gesendet: Samstag, 29. Mai 2010 07:25 An: 'Blake Crosby' Cc: Arnd Wippermann; users@openlayers.org Betreff: Re: [OpenLayers-Users] WFS Not Returning Coordinates Hi Blake, You can work around this issue by providing the property names explicitly in the options of your protocol, including the name of the geometry. Example: propertyNames: 'year,seq,name,storm_start,storm_end,msGeometry'.split(',') Note that MapServer by default chooses 'msGeometry' as the name of the geometry attribute even though it might be called 'the_geom' or 'wkb_geometry' on the data source. In your case it's 'location' I presume. Regards, Roald On 28/05/10 03:26, Arnd Wippermann wrote: > Hi, > > If you use Mapserver 5.6.x, then it's a bug. > > WFS Server - GetFeature POST request does not return geometry > http://trac.osgeo.org/mapserver/ticket/3235 > > Arnd > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] Im Auftrag von Blake Crosby > Gesendet: Donnerstag, 27. Mai 2010 16:36 > An: users@openlayers.org > Betreff: [OpenLayers-Users] WFS Not Returning Coordinates > > Hello, > > I'm using WFS Protocol on a vector layer (as per the example) to plot > data on the map from a wfs server: > > var geographic = new OpenLayers.Projection("EPSG:4326"); > var layer = new OpenLayers.Layer.Vector("WFS", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.WFS({ > url: "http://mapserver.worldflightplanner.com/radar/", > featureType: "flightrules", > featureNS: "http://mapserver.gis.umn.edu/mapserver", > featurePrefix: "ms", > version: "1.1.0", > geometryName: "location", > srsName: "EPSG:4326", > extractAttribute: true > }),projection: geographic > }); > > This works fine, however, the returned GML from the WFS does not > contain any coordinates, just the metadata. Is this something wrong > with my Mapserver configuration, or my OL call? > > You can see the request, and the returned data here: > > http://pastebin.org/284683 > > Thanks, > Blake > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From SansonR at asurequality.com Sun May 30 19:34:29 2010 From: SansonR at asurequality.com (Robert Sanson) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Layer.XYZ tiles from ArcGIS Server not lining up with other layers Message-ID: <4C039EC5.379F.0037.1@asurequality.com> This is a resend, as I have not had any responses. Tiles I request from an ArcGIS Server cache using Layer.XYZ are not lining up with other layers requested from the same server via Layer.WMS or Layer.ArcGIS93Rest. Instead of making use of tileOrigin (which doesn't seem to get used), we make sure the Origin as reported by ArcGIS is contained within the maxExtent, and then use restrictedExtent to constrain the map area to the are we want OL to work within: var mapoptions = { //tileOrigin: new OpenLayers.LonLat(-4020900,19998100), //Origin as reported by ArcGIS maxExtent: new OpenLayers.Bounds(-4020900, 4674128.11975, 2568710.79993, 19998100), //contains the AGS origin restrictedExtent: new OpenLayers.Bounds(1018697.71047, 4674128.11975, 2568710.79993, 6296981.53325), resolutions: new Array(3175.0063500127, 793.751587503175, 264.583862501058, 198.437896875794, 132.291931250529, 66.1459656252646, 26.4583862501058, 19.8437896875794, 13.2291931250529, 9.26043518753704, 6.61459656252646, 5.29167725002117, 3.96875793751588, 2.64583862501058, 1.98437896875794, 1.32291931250529), tileSize: new OpenLayers.Size(256,256), units: 'm', projection: new OpenLayers.Projection('EPSG:2193'), fractionalZoom: false }; var map = new OpenLayers.Map( 'map',mapoptions ); var nzcoastwms = new OpenLayers.Layer.WMS( "Coastline", "http://ws-esrimt/arcgis/services/mapservice_asurequality_prod/MapServer/WMSServer", {layers: ['0'], format: "image/png"}, {isBaseLayer: true, singleTile:true, visibility: true, attribution:"LINZ data Crown copyright reserved"} ); var topoxyz = new OpenLayers.Layer.XYZ( "Topo", "http://ws-esrimt/ArcGIS/rest/services/mapservice_topography_vector_prod/MapServer/tile/${z}/${y}/${x}", {isBaseLayer: false, sphericalMercator: false//, tileOrigin: new OpenLayers.LonLat(-4020900,19998100) }); map.addLayers([nzcoastwms,topoxyz]); Doing this above, requests the correct tiles, but it seems the requested tiles are displaced in a north-south direction. The displacement seems different depending on zoom level. The latter is sometimes displaced to the north, and sometimes to the south, depending on Zoom level. I have previously verified the WMS layer is in the correct location. Many thanks, Robert Sanson This message has been scanned for malware by SurfControl plc. www.surfcontrol.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100531/db73079f/attachment.html From zac.spitzer at ennoble.com.au Mon May 31 02:29:21 2010 From: zac.spitzer at ennoble.com.au (Zac Spitzer) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Layer.XYZ tiles from ArcGIS Server not lining up with other layers In-Reply-To: <4C039EC5.379F.0037.1@asurequality.com> References: <4C039EC5.379F.0037.1@asurequality.com> Message-ID: have you included proj4js? otherwise I'm pretty sure setting the projection doesn't do anything On 31 May 2010 09:34, Robert Sanson wrote: > This is a resend, as I have not had any responses. Tiles I request from an > ArcGIS Server cache using Layer.XYZ are not lining up with other layers > requested from the same server via Layer.WMS or Layer.ArcGIS93Rest. > > Instead of making use of tileOrigin (which doesn't seem to get used), we > make sure the Origin as reported by ArcGIS is contained within the > maxExtent, and then use restrictedExtent to constrain the map area to the > are we want OL to work within: > > var mapoptions = { > ??//tileOrigin: new OpenLayers.LonLat(-4020900,19998100), //Origin as > reported by ArcGIS > ????maxExtent: new OpenLayers.Bounds(-4020900, 4674128.11975, 2568710.79993, > 19998100), //contains the?AGS origin > ????restrictedExtent: new OpenLayers.Bounds(1018697.71047, 4674128.11975, > 2568710.79993, 6296981.53325), > ????resolutions: new Array(3175.0063500127, 793.751587503175, > 264.583862501058, 198.437896875794, 132.291931250529, 66.1459656252646, > 26.4583862501058, 19.8437896875794, 13.2291931250529, 9.26043518753704, > 6.61459656252646, 5.29167725002117, 3.96875793751588, 2.64583862501058, > 1.98437896875794, 1.32291931250529), > ????tileSize: new OpenLayers.Size(256,256), > ????units: 'm', > ????projection: new OpenLayers.Projection('EPSG:2193'), > ????fractionalZoom: false > }; > var map = new OpenLayers.Map( 'map',mapoptions ); > var nzcoastwms = new OpenLayers.Layer.WMS( "Coastline", > > "http://ws-esrimt/arcgis/services/mapservice_asurequality_prod/MapServer/WMSServer", > ????????????????????????? {layers: ['0'], format: "image/png"}, > ????????????????????????? {isBaseLayer: true, singleTile:true, visibility: > true, > ?????????????????????????? attribution:"LINZ data Crown copyright reserved"} > ); > var topoxyz = new OpenLayers.Layer.XYZ( "Topo", > > "http://ws-esrimt/ArcGIS/rest/services/mapservice_topography_vector_prod/MapServer/tile/${z}/${y}/${x}", > ?????????????????? {isBaseLayer: false, sphericalMercator: false//, > tileOrigin: new OpenLayers.LonLat(-4020900,19998100) > }); > map.addLayers([nzcoastwms,topoxyz]); > Doing this above, requests the correct tiles, but it seems the requested > tiles are displaced in a north-south direction. The?displacement seems > different depending on zoom level. The latter is sometimes displaced to the > north, and sometimes to the south, depending on Zoom level. I have > previously verified the WMS layer is in the correct location. > > Many thanks, > > Robert Sanson > > This message has been scanned for malware by SurfControl plc. > www.surfcontrol.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 From p.jourdan at iesa-cyprus.com Mon May 31 08:15:51 2010 From: p.jourdan at iesa-cyprus.com (Pierre Jourdan) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] start line drawing programatically Message-ID: <0E85D632A888964B809D6E215ADF01370110AE@se-001.iesacy.local> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 2310 bytes Desc: image001.gif Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100531/8da6a670/attachment.gif From p.jourdan at iesa-cyprus.com Mon May 31 08:16:49 2010 From: p.jourdan at iesa-cyprus.com (Pierre Jourdan) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] start draw path programatically Message-ID: <0E85D632A888964B809D6E215ADF01370110AF@se-001.iesacy.local> Hello, I have a draw feature control drawing linestrings, that I want to trigger programmatically, without having to do a mouse down from starting position. I want to start the line drawing from some coordinates and then let the user click to set the other extremity? Pierre JOURDAN, IT Engineer IESA CYPRUS ltd 16 Kyriakou Matsi 2408 Engomi - Nicosia Cyprus Tel: 00 357 22 77 33 61 Fax: 00 357 22 77 33 62 Email : p.jourdan@iesa-cyprus.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100531/7a1c99db/attachment.html From openlayers+users at nonsense.ee Mon May 31 08:28:38 2010 From: openlayers+users at nonsense.ee (=?ISO-8859-1?Q?Joosep=2DGeorg_J=E4rvemaa?=) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] WMS and Mercator projection In-Reply-To: References: Message-ID: Hello, Appears that my question hasn't appeared in the list yet, so reposting. Tried different examples but the image is still showing up streched -- http://skip.nonsense.ee/.dev/openlayers/ With JOSM everything is working -- image is displayed in EPSG:3857 and WMS images get asked in EPSG:4326 as it should... How to fix? Regards, -- Joosep-Georg J?rvemaa From ahocevar at opengeo.org Mon May 31 09:01:11 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] WMS and Mercator projection In-Reply-To: References: Message-ID: <3467DFCA-4F22-44F7-AD97-810A2C6D4EDC@opengeo.org> Hi, several things are wrong in your code. * Looking at your WMS Capabilities, I see that only EPSG:3301 is supported for your layers. * OpenLayers does not do client side reprojection * displayProjection is only there to tell controls in which coordinate system they should display coordinates * maxExtent has to be provided in coordinates of the map projection. So I'd configure the map like this: var options = { projection: new OpenLayers.Projection("EPSG:3301"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: 'm', 'maxExtent': new OpenLayers.Bounds( 370753.1145, 6382922.7769, 739245.6000, 6624811.0577 ), 'maxResolution': 'auto' }; I took the maxExtent from the Projected Bounds found here: http://spatialreference.org/ref/epsg/3301/ Regards, Andreas. On May 31, 2010, at 14:28 , Joosep-Georg J?rvemaa wrote: > Hello, > > > Appears that my question hasn't appeared in the list yet, so reposting. > > > Tried different examples but the image is still showing up streched -- > http://skip.nonsense.ee/.dev/openlayers/ > > With JOSM everything is working -- image is displayed in EPSG:3857 and > WMS images get asked in EPSG:4326 as it should... > > > How to fix? > > > > Regards, > -- > Joosep-Georg J?rvemaa > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From openlayers+users at nonsense.ee Mon May 31 09:12:30 2010 From: openlayers+users at nonsense.ee (=?ISO-8859-1?Q?Joosep=2DGeorg_J=E4rvemaa?=) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] WMS and Mercator projection In-Reply-To: <3467DFCA-4F22-44F7-AD97-810A2C6D4EDC@opengeo.org> References: <3467DFCA-4F22-44F7-AD97-810A2C6D4EDC@opengeo.org> Message-ID: Thanks Andreas for your answer, > So I'd configure the map like this: > > var options = { > projection: new OpenLayers.Projection("EPSG:3301"), > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: 'm', > 'maxExtent': new OpenLayers.Bounds( > 370753.1145, 6382922.7769, 739245.6000, 6624811.0577 > ), > 'maxResolution': 'auto' > }; Now it stopped working at all -- see http://skip.nonsense.ee/.dev/openlayers/ahocevar@opengeo.org.html I can see that OpenLayers is sending now WMS requests with SRS=EPSG%3A3301&BBOX=370753.1145,6382922.7769,561216.32772835,6573385.9901283 But it should send them with SRS=EPSG:4326&bbox=24.6461274,59.3624859,24.6479219,59.3634004 Like: http://xgis.maaamet.ee/wms-pub/alus-geo?STYLES=&SRS=EPSG:4326&FORMAT=image/png&VERSION=1.1.1&REQUEST=GetMap&LAYERS=of10000,TOPOYKSUS_6569,TOPOYKSUS_7793&bbox=24.6461274,59.3624859,24.6479219,59.3634004&width=499&height=499 Regards, -- Joosep-Georg From alb.valente at gmail.com Mon May 31 09:11:50 2010 From: alb.valente at gmail.com (Alberto Valente) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] how to choose layers and "tile is undefined" error Message-ID: Hi, I'm working with OL and arcIMS. Actually I can connect to arcIMS server but cannot load the layers I need. Here a snippet of my code (copied from examples) [..] layer = new OpenLayers.Layer.ArcIMS( "Global Sample Map", "http://www.mydomain.com/servlet/com.esri.esrimap.Esrimap", { serviceName: "myService", layers: [ // layers to manipulate {id: 2, visible: true}, {id: '5', visible: true}, {id: "11", visible: true}, {id: 12, visible: true} ], async: true } ); [..] I know this service has layers with IDs from 0 to 15. Some are image layers, others are featureclass. In my browser I see only one layer, and it is the only layer which hasn't a numeric id but a textual id. Looking at firebug console I get "tile is undefined" error Can someone help me with this issue? How can I set visible layers? thank you Alberto -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100531/d7498b1f/attachment.html From ahocevar at opengeo.org Mon May 31 09:41:45 2010 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] WMS and Mercator projection In-Reply-To: References: <3467DFCA-4F22-44F7-AD97-810A2C6D4EDC@opengeo.org> Message-ID: <4C1B06E2-0CC2-466F-ABE1-C5E6272272E5@opengeo.org> On May 31, 2010, at 15:12 , Joosep-Georg J?rvemaa wrote: > Thanks Andreas for your answer, > >> So I'd configure the map like this: >> >> var options = { >> projection: new OpenLayers.Projection("EPSG:3301"), >> displayProjection: new OpenLayers.Projection("EPSG:4326"), >> units: 'm', >> 'maxExtent': new OpenLayers.Bounds( >> 370753.1145, 6382922.7769, 739245.6000, 6624811.0577 >> ), >> 'maxResolution': 'auto' >> }; > > Now it stopped working at all -- see > http://skip.nonsense.ee/.dev/openlayers/ahocevar@opengeo.org.html Looking at your WMS Capabilities again, I see that the 'of10000' layer does not support EPSG:3301. Remove it from the "layers" list, and you should be fine. Also note that displayProjection will display your coordinates in EPSG:3301, because OpenLayers cannot transform from 3301 to 4326. But all you have to do is to include proj4js (google for it), and add the proj4js definition from the spatialreference.org link I posted in my first reply to your js code. Regards, Andreas. > > > I can see that OpenLayers is sending now WMS requests with > SRS=EPSG%3A3301&BBOX=370753.1145,6382922.7769,561216.32772835,6573385.9901283 > > But it should send them with > SRS=EPSG:4326&bbox=24.6461274,59.3624859,24.6479219,59.3634004 > > Like: > > http://xgis.maaamet.ee/wms-pub/alus-geo?STYLES=&SRS=EPSG:4326&FORMAT=image/png&VERSION=1.1.1&REQUEST=GetMap&LAYERS=of10000,TOPOYKSUS_6569,TOPOYKSUS_7793&bbox=24.6461274,59.3624859,24.6479219,59.3634004&width=499&height=499 > > > > Regards, > -- > Joosep-Georg > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From SansonR at asurequality.com Mon May 31 16:56:47 2010 From: SansonR at asurequality.com (Robert Sanson) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] Layer.XYZ tiles from ArcGIS Server not lining up with other layers In-Reply-To: References: <4C039EC5.379F.0037.1@asurequality.com> Message-ID: <4C04CB4E.379F.0037.1@asurequality.com> Yes. However, all the data is in New Zealand Transverse Mercator (2193), so there is no re-projection work being done. >>> Zac Spitzer 31/05/2010 6:29 p.m. >>> have you included proj4js? otherwise I'm pretty sure setting the projection doesn't do anything On 31 May 2010 09:34, Robert Sanson wrote: > This is a resend, as I have not had any responses. Tiles I request from an > ArcGIS Server cache using Layer.XYZ are not lining up with other layers > requested from the same server via Layer.WMS or Layer.ArcGIS93Rest. > > Instead of making use of tileOrigin (which doesn't seem to get used), we > make sure the Origin as reported by ArcGIS is contained within the > maxExtent, and then use restrictedExtent to constrain the map area to the > are we want OL to work within: > > var mapoptions = { > //tileOrigin: new OpenLayers.LonLat(-4020900,19998100), //Origin as > reported by ArcGIS > maxExtent: new OpenLayers.Bounds(-4020900, 4674128.11975, 2568710.79993, > 19998100), //contains the AGS origin > restrictedExtent: new OpenLayers.Bounds(1018697.71047, 4674128.11975, > 2568710.79993, 6296981.53325), > resolutions: new Array(3175.0063500127, 793.751587503175, > 264.583862501058, 198.437896875794, 132.291931250529, 66.1459656252646, > 26.4583862501058, 19.8437896875794, 13.2291931250529, 9.26043518753704, > 6.61459656252646, 5.29167725002117, 3.96875793751588, 2.64583862501058, > 1.98437896875794, 1.32291931250529), > tileSize: new OpenLayers.Size(256,256), > units: 'm', > projection: new OpenLayers.Projection('EPSG:2193'), > fractionalZoom: false > }; > var map = new OpenLayers.Map( 'map',mapoptions ); > var nzcoastwms = new OpenLayers.Layer.WMS( "Coastline", > > "http://ws-esrimt/arcgis/services/mapservice_asurequality_prod/MapServer/WMSServer", > {layers: ['0'], format: "image/png"}, > {isBaseLayer: true, singleTile:true, visibility: > true, > attribution:"LINZ data Crown copyright reserved"} > ); > var topoxyz = new OpenLayers.Layer.XYZ( "Topo", > > "http://ws-esrimt/ArcGIS/rest/services/mapservice_topography_vector_prod/MapServer/tile/${z}/${y}/${x}", > {isBaseLayer: false, sphericalMercator: false//, > tileOrigin: new OpenLayers.LonLat(-4020900,19998100) > }); > map.addLayers([nzcoastwms,topoxyz]); > Doing this above, requests the correct tiles, but it seems the requested > tiles are displaced in a north-south direction. The displacement seems > different depending on zoom level. The latter is sometimes displaced to the > north, and sometimes to the south, depending on Zoom level. I have > previously verified the WMS layer is in the correct location. > > Many thanks, > > Robert Sanson > > This message has been scanned for malware by SurfControl plc. > www.surfcontrol.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100601/233d6564/attachment.html From sdjbm17 at gmail.com Mon May 31 17:23:39 2010 From: sdjbm17 at gmail.com (giraam) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] messageRequest method 'DELETE' not supported Message-ID: <1275341019395-5123405.post@n2.nabble.com> Hi! I'm trying to save changes that were made on a vector layer but when I click the save button I got this on Firebug: HTTP Status 405 - Request method 'DELETE' not supported type Status report messageRequest method 'DELETE' not supported descriptionThe specified HTTP method is not allowed for the requested resource (Request method 'DELETE' not supported). I'm having this code (the following is just a fragment, if needed more please ask!): var saveStrategy = new OpenLayers.Strategy.Save(); saveStrategy.events.register('success', null, saveSuccess); saveStrategy.events.register('fail', null, saveFail); function saveSuccess(event) { alert('Changes saved'); } function saveFail(event) { alert('Error! Changes not saved'); } function dataLoaded(event) { map.zoomToExtent(event.object.getDataExtent()); } pdv = new OpenLayers.Layer.Vector("Puntos de Venta", { styleMap: myStyles, eventListeners: { "featuresadded": dataLoaded }, strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy], protocol: new OpenLayers.Protocol.HTTP({ url: "http://server:port/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=GestionComercial:pdv_new&maxFeatures=1000&outputFormat=json", format: new OpenLayers.Format.GeoJSON({ ignoreExtraDims: true }) }) }); map.addLayer(pdv); ----- just another web developer -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/messageRequest-method-DELETE-not-supported-tp5123405p5123405.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From P.Kennedy at fugro.com.au Mon May 31 20:20:11 2010 From: P.Kennedy at fugro.com.au (Paul kennedy) Date: Wed Sep 1 17:18:51 2010 Subject: [OpenLayers-Users] How to control the WMS tile origins? Message-ID: <1275351611888-5123935.post@n2.nabble.com> Hi Apologies, this is a repost, as the forum continues to say my original is 'pending'. I have been trying to figure this out for 2days and it is driving me nuts. I have a wms server which has hard bounds of -180,-90 to 180,90, ie I cannot make requests beyond e end of the world! I can see the data in openlayers if I use single tile, but I am having trouble with tiled requests. The tile origins are not at even spacings from the origin. I would have thought the low resolution requests would be at 90 degree tile spacings, but they are about 92 degrees. By the time we get across the globe, the last tile is asking for data at 188 degrees long, when it should be adhering to my layer and map bound of 180.0 Is there any way I can control the origin and tile size, so I can force openlayers to always ask for consistent tile origins? here is my code... var enc_wms = new OpenLayers.Layer.WMS( "ENC WMS", "http://172.23.21.4/WMS/wms.ashx", { layers: 'ENC' , //Width: '256', //Height: '256', //tilesOrigin: "-180.0, -90.0" , //tiled: 'true' , srs: 'EPSG:4326', styles: ' ', format: 'image/png', }, { //wrapDateLine: true, //buffer: 0, maxResolution: 1.40625, //minExtent: new OpenLayers.Bounds(-180, -90, 180, 90), //maxExtent:[-180,-90,180,90], maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90), resolutions:[1.40625,0.703125, 0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.000021457672119140625], displayOutsideMaxExtents: false, isBaseLayer: false, transitionEffect: 'resize', //ratio: 1 }); As you can see from the image, the lower left corner of the tile is NOT at a predictable origin, whihc in this case should be 90W. http://osgeo-org.1803224.n2.nabble.com/file/n5123935/wmstiletroubles.png Many thanks in advance. http://osgeo-org.1803224.n2.nabble.com/file/n5123935/wmstiletroubles.png -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-control-the-WMS-tile-origins-tp5123935p5123935.html Sent from the OpenLayers Users mailing list archive at Nabble.com.