From bthoen at gisnet.com Thu Jan 1 18:08:24 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options? Message-ID: <495D4CE8.8010402@gisnet.com> In several places in the OpenLayers Constructor functions there is a parameter that is an object consisting of a "Hashtable of extra options...", but I can't find a list of what those choices might be. For example, the fourth parameter for OpenLayers. Layer. MapServer() is such an object. What are the available tags that can be used here and where do I find out what these are? Are they the parameters from a map file, like LAYER.CLASS.STYLE.COLOR: "255 255 0" or something like that? TIA, - Bill Thoen From crschmidt at metacarta.com Thu Jan 1 19:57:08 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options? In-Reply-To: <495D4CE8.8010402@gisnet.com> References: <495D4CE8.8010402@gisnet.com> Message-ID: <20090102005708.GE25566@metacarta.com> On Thu, Jan 01, 2009 at 04:08:24PM -0700, Bill Thoen wrote: > In several places in the OpenLayers Constructor functions there is a > parameter that is an object consisting of a "Hashtable of extra > options...", but I can't find a list of what those choices might be. For > example, the fourth parameter for OpenLayers. Layer. MapServer() is such > an object. What are the available tags that can be used here and where > do I find out what these are? Are they the parameters from a map file, > like LAYER.CLASS.STYLE.COLOR: "255 255 0" or something like that? Options override the 'properties' of the layer: anything that is listed as a property of the Layer in the API documentation can be overridden via the options hash. What you want is another parameter (the third param): something like {'layers': 'a, b', 'layers[a].class.style.color': 'red'}. The third parameter is serialized and sent directly to the server with *no* intervention on the part of OpenLayers (except in WMS, where keys are uppercased); this means that you simply need to figure out the right parameter to send to MapServer and include it as a key/value pair in the parameters hash. Regards, -- Christopher Schmidt MetaCarta From mika at digikartta.net Fri Jan 2 03:55:14 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Single vector layer Message-ID: <495DD672.7070201@digikartta.net> Hi, is it possible to consruct a map with only one layer, which is vector layer? I noticed that vector layer has a property 'isBaseLayer'. However trying to consruct a map having a single and only layer as vector layer fails. I get some this.baseLayer is null warnings. If I add e.g. google layer, vector layer works. OL is 2.7. I'll attach some code if necessery. - mika - From eric.c2c at gmail.com Fri Jan 2 06:19:25 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Single vector layer In-Reply-To: <495DD672.7070201@digikartta.net> References: <495DD672.7070201@digikartta.net> Message-ID: <5ec103de0901020319w45364731wc35c7ccf70cfd9de@mail.gmail.com> On Fri, Jan 2, 2009 at 9:55 AM, Lehtonen, Mika wrote: > Hi, > > is it possible to consruct a map with only one layer, which is vector > layer? I noticed that vector layer has a property 'isBaseLayer'. However > trying to consruct a map having a single and only layer as vector layer > fails. I get some this.baseLayer is null warnings. If I add e.g. google > layer, vector layer works. OL is 2.7. Have you tried setting isBaseLayer to true in the vector layer options? -- Eric From mika at digikartta.net Fri Jan 2 06:54:46 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Single vector layer In-Reply-To: <5ec103de0901020319w45364731wc35c7ccf70cfd9de@mail.gmail.com> References: <495DD672.7070201@digikartta.net> <5ec103de0901020319w45364731wc35c7ccf70cfd9de@mail.gmail.com> Message-ID: <495E0086.7010506@digikartta.net> Hi Eric, yes I had that 'isBaseLayer: true' in my vector layer options, but obviously there was something wrong with the syntax. I rewrote my vector layer definition from the scratch including that 'isBaseLayer' and now it's working. Thanks. - mika Eric Lemoine kirjoitti: > On Fri, Jan 2, 2009 at 9:55 AM, Lehtonen, Mika wrote: > >> Hi, >> >> is it possible to consruct a map with only one layer, which is vector >> layer? I noticed that vector layer has a property 'isBaseLayer'. However >> trying to consruct a map having a single and only layer as vector layer >> fails. I get some this.baseLayer is null warnings. If I add e.g. google >> layer, vector layer works. OL is 2.7. >> > > Have you tried setting isBaseLayer to true in the vector layer options? > -- > Eric > From antoni.vidal at icc.cat Fri Jan 2 08:39:23 2009 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Change server wms layer depending resolution Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> Hi there, I would change the server of a wms layer depending of map's resolution. Is this possible ?, if yes, any help will be thankfull. Happy 2009. Antoni Vidal Institut Cartogr?fic de Catalunya Tel: +34-93 567 1500 Ext. 3228 Parc de Montju?c Fax: +34-93 567 1567 08038 Barcelona http://www.icc.cat Spain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090102/c008488f/attachment.html From zac.spitzer at gmail.com Fri Jan 2 09:31:07 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Change server wms layer depending resolution In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> Message-ID: <7a85053e0901020631x41fb786y17f73ace18521e62@mail.gmail.com> you could always write a really simple 'proxy' script in say php which passes the request to the appropriate url based on the scale.. that's the sheer beauty and flexibility of open standard based gis stuff :) z On Sat, Jan 3, 2009 at 12:39 AM, Vidal, Antoni wrote: > Hi there, > > > > I would change the server of a wms layer depending of map's resolution. Is > this possible ?, if yes, any help will be thankfull. > > > > Happy 2009. > > > > Antoni Vidal > > Institut Cartogr?fic de Catalunya Tel: +34-93 567 1500 Ext. 3228 > > Parc de Montju?c Fax: +34-93 567 1567 > > 08038 Barcelona http://www.icc.cat > > Spain > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From crschmidt at metacarta.com Fri Jan 2 10:03:55 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Change server wms layer depending resolution In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> Message-ID: <20090102150355.GI25566@metacarta.com> On Fri, Jan 02, 2009 at 02:39:23PM +0100, Vidal, Antoni wrote: > Hi there, > > I would change the server of a wms layer depending of map's resolution. Is this possible ?, if yes, any help will be thankfull. You probably want to have two scale-dependant WMS overlays -- one with a minScale: 1000000, maxScale: 10000 , the next with a minScale: 10000 , maxScale: 1, or something. If you don't have another base layer, creating an empty base layer: new OpenLayers.Layer("", {displayInLayerSwitcher: false, isBaseLayer: true}); Can be used. REgards, -- Christopher Schmidt MetaCarta From bthoen at gisnet.com Fri Jan 2 10:04:23 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options? In-Reply-To: <20090102005708.GE25566@metacarta.com> References: <495D4CE8.8010402@gisnet.com> <20090102005708.GE25566@metacarta.com> Message-ID: <495E2CF7.2070806@gisnet.com> Thanks for the info, Christopher. However, the syntax you list for overriding the MapServer map file parameter doesn't work. If you (or anyone else) knows how I can override the layer color to yellow (255 255 0) in OpenLayers from a map file that looks like the following, I'd appreciate knowing what the trick is. LAYER NAME "states" TYPE POLYGON DATA states CLASS NAME "US States" STYLE OUTLINECOLOR 100 100 100 COLOR 255 255 192 END END PROJECTION "init=epsg:32614" # UTM Zone 14 N WGS84 END STATUS DEFAULT END Christopher Schmidt wrote: > On Thu, Jan 01, 2009 at 04:08:24PM -0700, Bill Thoen wrote: > >> In several places in the OpenLayers Constructor functions there is a >> parameter that is an object consisting of a "Hashtable of extra >> options...", but I can't find a list of what those choices might be. For >> example, the fourth parameter for OpenLayers. Layer. MapServer() is such >> an object. What are the available tags that can be used here and where >> do I find out what these are? Are they the parameters from a map file, >> like LAYER.CLASS.STYLE.COLOR: "255 255 0" or something like that? >> > > Options override the 'properties' of the layer: anything that is listed > as a property of the Layer in the API documentation can be overridden > via the options hash. > > What you want is another parameter (the third param): something like > {'layers': 'a, b', 'layers[a].class.style.color': 'red'}. The third > parameter is serialized and sent directly to the server with *no* > intervention on the part of OpenLayers (except in WMS, where keys are > uppercased); this means that you simply need to figure out the right > parameter to send to MapServer and include it as a key/value pair in the > parameters hash. > > Regards, > From antoni.vidal at icc.cat Fri Jan 2 10:16:22 2009 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Change server wms layer depending resolution In-Reply-To: <20090102150355.GI25566@metacarta.com> Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D6231@CORRIOL.icc.local> Yes, This is that I want, but I have three base layer and I only want this for one of them. I actually have: var topo = new OpenLayers.Layer.WMS( _("Topographic"), baseWmsServer, {layers: 'topo', format:"image/jpeg", exceptions:"application/vnd.ogc.se_xml"}, {buffer:0, transitionEffect:'resize'} ); How can I implement two scale-dependant WMS overlays like you propose? Thank's in advance, Antoni Vidal. -----Mensaje original----- De: Christopher Schmidt [mailto:crschmidt@metacarta.com] Enviado el: viernes, 02 de enero de 2009 16:04 Para: Vidal, Antoni CC: users@openlayers.org Asunto: Re: [OpenLayers-Users] Change server wms layer depending resolution On Fri, Jan 02, 2009 at 02:39:23PM +0100, Vidal, Antoni wrote: > Hi there, > > I would change the server of a wms layer depending of map's resolution. Is this possible ?, if yes, any help will be thankfull. You probably want to have two scale-dependant WMS overlays -- one with a minScale: 1000000, maxScale: 10000 , the next with a minScale: 10000 , maxScale: 1, or something. If you don't have another base layer, creating an empty base layer: new OpenLayers.Layer("", {displayInLayerSwitcher: false, isBaseLayer: true}); Can be used. REgards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Jan 2 10:22:34 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options? In-Reply-To: <495E2CF7.2070806@gisnet.com> References: <495D4CE8.8010402@gisnet.com> <20090102005708.GE25566@metacarta.com> <495E2CF7.2070806@gisnet.com> Message-ID: <20090102152234.GJ25566@metacarta.com> On Fri, Jan 02, 2009 at 08:04:23AM -0700, Bill Thoen wrote: > Thanks for the info, Christopher. > > However, the syntax you list for overriding the MapServer map file > parameter doesn't work. If you (or anyone else) knows how I can > override the layer color to yellow (255 255 0) in OpenLayers from a map > file that looks like the following, I'd appreciate knowing what the > trick is. This is really a question for the MapServer list, which is why I said: "you simply need to figure out the right parameter to send to MapServer" I'm not a MapServer user, but the documentation seems to be quite clear: http://mapserver.osgeo.org/cgi/controls.html#changing-map-file-parameters-via-a-form-or-a-url -- Chris > LAYER > NAME "states" > TYPE POLYGON > DATA states > CLASS > NAME "US States" > STYLE > OUTLINECOLOR 100 100 100 > COLOR 255 255 192 > END > END > PROJECTION > "init=epsg:32614" # UTM Zone 14 N WGS84 > END > STATUS DEFAULT > END > > > > Christopher Schmidt wrote: > > On Thu, Jan 01, 2009 at 04:08:24PM -0700, Bill Thoen wrote: > > > >> In several places in the OpenLayers Constructor functions there is a > >> parameter that is an object consisting of a "Hashtable of extra > >> options...", but I can't find a list of what those choices might be. For > >> example, the fourth parameter for OpenLayers. Layer. MapServer() is such > >> an object. What are the available tags that can be used here and where > >> do I find out what these are? Are they the parameters from a map file, > >> like LAYER.CLASS.STYLE.COLOR: "255 255 0" or something like that? > >> > > > > Options override the 'properties' of the layer: anything that is listed > > as a property of the Layer in the API documentation can be overridden > > via the options hash. > > > > What you want is another parameter (the third param): something like > > {'layers': 'a, b', 'layers[a].class.style.color': 'red'}. The third > > parameter is serialized and sent directly to the server with *no* > > intervention on the part of OpenLayers (except in WMS, where keys are > > uppercased); this means that you simply need to figure out the right > > parameter to send to MapServer and include it as a key/value pair in the > > parameters hash. > > > > Regards, > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From david.fawcett at gmail.com Fri Jan 2 10:56:52 2009 From: david.fawcett at gmail.com (David Fawcett) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Change server wms layer depending resolution In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> Message-ID: Antoni, If you also control the WMS and are serving up your own data, you could use a scale-dependent WMS layer as your source. You could also potentially build a WMS layer that cascades the data from the two external WMS', using scale to determine which data source to use. That said, this would likely be a performance hit, you would probably do better to write some custom javascript code to accomplish it on the client side. David. On Fri, Jan 2, 2009 at 7:39 AM, Vidal, Antoni wrote: > Hi there, > > > > I would change the server of a wms layer depending of map's resolution. Is > this possible ?, if yes, any help will be thankfull. > > > > Happy 2009. > > > > Antoni Vidal > > Institut Cartogr?fic de Catalunya Tel: +34-93 567 1500 Ext. 3228 > > Parc de Montju?c Fax: +34-93 567 1567 > > 08038 Barcelona http://www.icc.cat > > Spain > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From chris at genieknows.com Fri Jan 2 11:06:10 2009 From: chris at genieknows.com (Chris Adams) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options? In-Reply-To: <495D4CE8.8010402@gisnet.com> References: <495D4CE8.8010402@gisnet.com> Message-ID: <495E3B72.2040200@genieknows.com> Bill Thoen wrote: > In several places in the OpenLayers Constructor functions there is a > parameter that is an object consisting of a "Hashtable of extra > options...", but I can't find a list of what those choices might be. For > example, the fourth parameter for OpenLayers. Layer. MapServer() is such > an object. What are the available tags that can be used here and where > do I find out what these are? Are they the parameters from a map file, > like LAYER.CLASS.STYLE.COLOR: "255 255 0" or something like that? > > TIA, > - Bill Thoen > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > From chris at genieknows.com Fri Jan 2 11:08:12 2009 From: chris at genieknows.com (Chris Adams) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options? In-Reply-To: <495E3B72.2040200@genieknows.com> References: <495D4CE8.8010402@gisnet.com> <495E3B72.2040200@genieknows.com> Message-ID: <495E3BEC.2080700@genieknows.com> Sorry for the double post, I hit send by accident... Could you clarify what you mean by setting the layer color? Perhaps you mean adding a tint to colour of the tiles, or changing the colour of tile backgrounds before they load? Chris Adams wrote: > Bill Thoen wrote: > >> In several places in the OpenLayers Constructor functions there is a >> parameter that is an object consisting of a "Hashtable of extra >> options...", but I can't find a list of what those choices might be. For >> example, the fourth parameter for OpenLayers. Layer. MapServer() is such >> an object. What are the available tags that can be used here and where >> do I find out what these are? Are they the parameters from a map file, >> like LAYER.CLASS.STYLE.COLOR: "255 255 0" or something like that? >> >> TIA, >> - Bill Thoen >> _______________________________________________ >> 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 ashore3 at verizon.net Fri Jan 2 12:46:24 2009 From: ashore3 at verizon.net (Arnie Shore) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Porting Fm GMaps? Message-ID: <495E52F0.8070301@verizon.net> Hello all. Let me tell you a bit re what I'm doing (he sez, as though he really knows!) and invite suggestions. I've written a free open source computer-aided dispatch application, targeted to teams/agencies with zero budgets for software of this nature. (It's Tickets by name, and with a demonstration/download site at http://www.saefern.org/tickets/ - in addition to SourceForge.) It's built using the usual open source suspects, PHP and MySql. Of special relevance here is that I've included Google Maps as the geo-spatial component. Justification for the latter is, not surprisingly, its zero cost, ubiquity, and convenience - as well as its capabilities. By design for its expected installation by first-timers, it avoids use of any other than the most basic components. But a portion of the user community are (properly) concerned re its dependence on Google - for the mapping and API. Now I'm looking at what it takes to port Tickets to a mapping base that wd allow its use in situations where - at least temporarily - there's no Internet access; the maps/tiles/images wd need storage and accessibility at the local web server. (Client browser and server are readily configured onto a single box.) Certainly, OpenLayer's open Source aspect is especially attractive, given all of the above. Tickets can/is deployed where there's limited mapping available, but I expect that users - many of them ham radio enthusiasts - might be willing to spend some effort in developing the kinds of map information appropriate to their particular situations. From what I see on this list, there's no shortage of tools and advice to help them do so. This might be a particularly positive aspect in such an implementation, although possibly more than countered by the possible lack of immediate out-of-the-box availability. What I'm looking for is any experience in porting a GMaps-based application towards OpenLayers, and, especially, re what maps/tiles/images you used, including those fm OpenStreetMap, and why. Th - th - th - that's it folks. Comments and suggestions invited. With best wishes for a peaceful new year, Arnie Shore Annapolis, MD ~~~~_/)~~~~~~~~~~_/)~~~~~~~~~~_/)~~~~~~~~~~_/)~~~~~~~~~~_/)~~~~~~~~~~_/)~~~~~~~~~~_/)~~~~~~~~~~_/)~~~~~~~~ From bthoen at gisnet.com Fri Jan 2 13:38:21 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options? In-Reply-To: <495E3BEC.2080700@genieknows.com> References: <495D4CE8.8010402@gisnet.com> <495E3B72.2040200@genieknows.com> <495E3BEC.2080700@genieknows.com> Message-ID: <495E5F1D.1060406@gisnet.com> Chris Adams wrote: > Could you clarify what you mean by setting the layer color? Perhaps > you mean adding a tint to colour of the tiles, or changing the colour > of tile backgrounds before they load? > What I want to do is change the global fill color for the layer's polygon features from pale yellow specified in the map file to bright yellow when it displays in OL. The layer is all the US states. I'm just trying to learn how to work with MapServer and OpenLayers in tandem, so this is just an experiment to see if I can override MapServer parameters in OpenLayers without having to modify the Map file. From bthoen at gisnet.com Fri Jan 2 14:50:19 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options? In-Reply-To: <495D4CE8.8010402@gisnet.com> References: <495D4CE8.8010402@gisnet.com> Message-ID: <495E6FFB.4080606@gisnet.com> Problem solved! This works: var baseLayer = new OpenLayers.Layer.MapServer( "USA", "http://206.168.217.244/cgi-bin/mapserv?", { 'map_imagetype': 'PNG', layer: 'states', "map.layer[states].class[0].style[0]": "COLOR 255 255 0", map: '/var/www/html/piper/usa.map' }, { singleTile: true }); The trick to overriding MapServer map file directives is to format them as specified in http://mapserver.osgeo.org/cgi/controls.html#changing-map-file-parameters-via-a-form-or-a-url, putting the directive hierarchy in the key and the final parameter and its value in the value. Also use spaces instead of the '+' characters. Thanks again! - Bill Thoen Bill Thoen wrote: > In several places in the OpenLayers Constructor functions there is a > parameter that is an object consisting of a "Hashtable of extra > options...", but I can't find a list of what those choices might be. For > example, the fourth parameter for OpenLayers. Layer. MapServer() is such > an object. What are the available tags that can be used here and where > do I find out what these are? Are they the parameters from a map file, > like LAYER.CLASS.STYLE.COLOR: "255 255 0" or something like that? > > TIA, > - Bill Thoen > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From antoni.vidal at icc.cat Fri Jan 2 17:22:53 2009 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] RS: Change server wms layer depending resolution References: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> Message-ID: <784FAC631C0CB14CAE68764151D5DA4106056DE2@CORRIOL.icc.local> Thank's David. You know any example code how to implement a scale-dependent WMS layer?. Thank's again. Antoni Vidal. -----Missatge original----- De: David Fawcett [mailto:david.fawcett@gmail.com] Enviat el: dv. 02/01/2009 16:56 Per a: Vidal, Antoni A/c: users@openlayers.org Tema: Re: [OpenLayers-Users] Change server wms layer depending resolution Antoni, If you also control the WMS and are serving up your own data, you could use a scale-dependent WMS layer as your source. You could also potentially build a WMS layer that cascades the data from the two external WMS', using scale to determine which data source to use. That said, this would likely be a performance hit, you would probably do better to write some custom javascript code to accomplish it on the client side. David. On Fri, Jan 2, 2009 at 7:39 AM, Vidal, Antoni wrote: > Hi there, > > > > I would change the server of a wms layer depending of map's resolution. Is > this possible ?, if yes, any help will be thankfull. > > > > Happy 2009. > > > > Antoni Vidal > > Institut Cartogr?fic de Catalunya Tel: +34-93 567 1500 Ext. 3228 > > Parc de Montju?c Fax: +34-93 567 1567 > > 08038 Barcelona http://www.icc.cat > > Spain > > > > _______________________________________________ > 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/20090102/62b78624/attachment.html From f.vanderbiest at gmail.com Sat Jan 3 03:14:53 2009 From: f.vanderbiest at gmail.com (=?ISO-8859-1?Q?Fran=E7ois_Van_Der_Biest?=) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] RS: Change server wms layer depending resolution In-Reply-To: <784FAC631C0CB14CAE68764151D5DA4106056DE2@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D6230@CORRIOL.icc.local> <784FAC631C0CB14CAE68764151D5DA4106056DE2@CORRIOL.icc.local> Message-ID: <86169bba0901030014j22ec6c6n5538a84b421eaa86@mail.gmail.com> Hi Antoni, If your scale-dependent WMS serves as a background layer, you could try something like this, with custom boundary resolutions: map.events.register('zoomend', this, function() { var res = map.getResolution(); if (res <= 3) { map.setBaseLayer(orthoLayer); } else if ((res <= 12) && (res > 3)) { map.setBaseLayer(communLayer); } else { map.setBaseLayer(gmapLayer); } }); ... but we lack here the 'zoomstart' event, which would be more appropriate IMO. HTH, F. 2009/1/2, Vidal, Antoni : > > Thank's David. > > You know any example code how to implement a scale-dependent WMS layer?. > > Thank's again. > > Antoni Vidal. > > > -----Missatge original----- > De: David Fawcett [mailto:david.fawcett@gmail.com > ] > Enviat el: dv. 02/01/2009 16:56 > Per a: Vidal, Antoni > A/c: users@openlayers.org > Tema: Re: [OpenLayers-Users] Change server wms layer depending resolution > > Antoni, > > If you also control the WMS and are serving up your own data, you > could use a scale-dependent WMS layer as your source. > > You could also potentially build a WMS layer that cascades the data > from the two external WMS', using scale to determine which data source > to use. That said, this would likely be a performance hit, you would > probably do better to write some custom javascript code to accomplish > it on the client side. > > David. > > > > On Fri, Jan 2, 2009 at 7:39 AM, Vidal, Antoni > wrote: > > Hi there, > > > > > > > > I would change the server of a wms layer depending of map's resolution. > Is > > this possible ?, if yes, any help will be thankfull. > > > > > > > > Happy 2009. > > > > > > > > Antoni Vidal > > > > Institut Cartogr?fic de Catalunya Tel: +34-93 567 1500 Ext. 3228 > > > > Parc de Montju?c Fax: +34-93 567 1567 > > > > 08038 Barcelona http://www.icc.cat > > > > Spain > > > > > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090103/3572df7e/attachment.html From sumith.paul at gmail.com Sat Jan 3 07:03:44 2009 From: sumith.paul at gmail.com (runningcodez) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] bounds of an overlaylayer Message-ID: <1230984224109-2105565.post@n2.nabble.com> Hi, I have a base googlemap layer over which i have 1 overlay.The overlay layer has its own bound values given by my geoserver.my requirement is to get the the bound values of the overlay layer and zoom to that bounds,along with the base google layer,on a buton click.Could anybody guide me as to how would i fetch the original bounds generated by the geoserver...My code is is as follows.. thanx in advance function setupMapsOnload(){ var options = { projection: "EPSG:900913", maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34), controls:[] }; map = new OpenLayers.Map('map', options); gooPHY = new OpenLayers.Layer.Google( "GoogleMap" , { type: G_PHYSICAL_MAP, 'sphericalMercator': true, minZoomLevel: 4, maxZoomLevels:15 }, { isBaseLayer: true, buffer: 1, } ); ovlay = new OpenLayers.Layer.WMS( "ibin:gridcenter", "http://localhost/geoserver/wms", { layers: 'ibin:gridcenter', srs: 'EPSG:4326', height: '550', width: '350', styles: '', format: format, tiled: 'true', tilesOrigin : "72.7,7.696875", transparent: true }, { 'opacity': 1, 'isBaseLayer': false, 'wrapDateLine': true } ); map.addLayers([gooPHY,ovlay]); } function fetchbounds(){ //the button click takes me here //here is where i shud fill in } -- View this message in context: http://n2.nabble.com/bounds-of-an-overlaylayer-tp2105565p2105565.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Sat Jan 3 11:30:18 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Hide features In-Reply-To: <1053B20F24D85F41B57F168351684E22029173E7@0015-its-exmb04.us.saic.com> References: <20686966.post@talk.nabble.com> <5ec103de0812030906q3a3b2be5n6c871ed26303e76@mail.gmail.com> <1053B20F24D85F41B57F168351684E22029173E7@0015-its-exmb04.us.saic.com> Message-ID: <5b021dd0901030830y11693dbbscbf51575b49e7857@mail.gmail.com> Hi, On Wed, Dec 3, 2008 at 10:05 PM, Heidt, Christopher M. wrote: > How do I hide features? > I did it by changing my opacity to 0, > but I need to find another way because my features can have multiple > styles, > and I need the feature to retain whatever style it has when hidden and > reshown. You just need to set the symbolizer (style) property "display" to "none" (like in CSS). So instead of var symbolizer = { opacity: 0 } you set var symbolizer = { ... display: "none", ... } No other symbolizer properties will be lost (but the same is true for your opacity hack), and the feature will not be rendered until you delete the display property (or set it to a value other than "none"). Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From diego.ochoat at gmail.com Sat Jan 3 21:31:03 2009 From: diego.ochoat at gmail.com (Diego Ochoa Tocachi) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] Problem with wfs examples In-Reply-To: <20081230021636.GI15726@metacarta.com> References: <6951cb850812291012g6ac3628aof06ecd44a9a6e042@mail.gmail.com> <495919E9.5050304@osgis.nl> <20081230021636.GI15726@metacarta.com> Message-ID: <6951cb850901031831p2cccdd74p5ba09d2574da9a2c@mail.gmail.com> 2008/12/29 Christopher Schmidt > On Mon, Dec 29, 2008 at 07:41:45PM +0100, Bart van den Eijnden (OSGIS) > wrote: > > Hi, > > > > see: > > > > http://faq.openlayers.org/proxyhost/all/ > > Or even more directly: > > > http://faq.openlayers.org/wfs/why-isnt-wfs-working-on-my-local-checkout-of-openlayers/ > > > Best regards, > > Bart > > > > Diego Ochoa Tocachi wrote: > > > Hi list, > > > > > > I have this problem when I run the examples locally: > > > > > > ----- > > > (wfs-reprojection.html) > > > > > > uncaught exception: Access to restricted URI denied > (NS_ERROR_DOM_BAD_URI) > > > [Break on this error] this._object.open(sMethod, sUrl, bAsync, sUser, > > > sPassword); > > > > > > XMLHttpRequest.js (ligne 177) > > > ----- > > > > > > The same error happens when I try to access other wfs server using > > > gwt-openlayers > > > > > > I'm trying to create WFS java classes as WMS java classes from that > > > package: > > > > > > WFSLayerParams wfsLayerParams = new WFSLayerParams(); > > > wfsLayerParams.setProjection("EPSG:4326"); > > > > > > WFSParams wfsParams = new WFSParams(); > > > wfsParams.setTypeName("idm:islas"); > > > > > > wfsLayer = new WFS("WMS Layer", > > > "http://www.geoportaligm.gov.ec/nacional/wfs", wfsParams, > wfsLayerParams); > > > > > > I don't know if that's ok, I'm newbie in openlayers :) > > > > > > > > > -- > > > Diego Ochoa - darkbalder > > > email: diego.ochoat@gmail.com > > > Luis Pasteur 2-30 y Copernico > > > Telf: +593 7 2451 388 > > > Fax: +593 7 2451 388 > > > Movil: 593 95359807 > > > Cuenca - Ecuador > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > Users mailing list > > > Users@openlayers.org > > > http://openlayers.org/mailman/listinfo/users > > > > > > > > > -- > > Bart van den Eijnden > > OSGIS, Open Source GIS > > bartvde@osgis.nl > > http://www.osgis.nl > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta Thanks for response, I solved my problem using this proxy: http://trac.openlayers.org/browser/sandbox/august/openlayers/openlayers-2.6/lib/OpenLayers/Util/proxy.jsp?rev=7801 very useful! -- Diego Ochoa - darkbalder email: diego.ochoat@gmail.com Luis Pasteur 2-30 y Copernico Telf: +593 7 2451 388 Fax: +593 7 2451 388 Movil: 593 95359807 Cuenca - Ecuador -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090103/7ca7aeea/attachment.html From r.connolly at auckland.ac.nz Sun Jan 4 15:37:38 2009 From: r.connolly at auckland.ac.nz (Robert Connolly) Date: Wed Sep 1 17:17:01 2010 Subject: [OpenLayers-Users] setCenter not working with EPSG:900913 projection Message-ID: <1231101458.6294.3.camel@frodo> Hi Everyone, I sent the following message before Christmas via Nabble, however I am unable to track down the reply I received. Can anyone help with my problem? Regards, Rob Connolly --Original Message-- Hi, I'm having trouble using the setCenter method when using a EPSG:900913 projection for a Google map layer, see my code below: map = new OpenLayers.Map('map', {projection: new OpenLayers.Projection("EPSG:900913")}); var gmap = new OpenLayers.Layer.Google("Google Streets", { sphericalMercator: true }); // streets is the default map.addLayers([gmap]); var center = new OpenLayers.LonLat(-41.27, 173.28); alert('['+center.lon+','+center.lat+']'); var proj = new OpenLayers.Projection("EPSG:4326"); center.transform(proj, map.getProjectionObject()); alert('['+center.lon+','+center.lat+']'); map.setCenter(center, 13); I have the proj4js library installed and included on the page. It appears that the conversion is working (from the data being shown by my alert statements), however the center of the map remains on the equator/prime meridian intersection, when it should be over Nelson, New Zealand! Can anyone help? Regards, Rob Connolly From p.grimwood at gns.cri.nz Sun Jan 4 20:01:06 2009 From: p.grimwood at gns.cri.nz (Paul Stevenson) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map wrapping? In-Reply-To: <4a419bc70803081244h30040f04m2be7f69904dc0739@mail.gmail.com> References: <4a419bc70803081140m65b015em95ce6e707391329b@mail.gmail.com> <20080308202608.GB11955@metacarta.com> <4a419bc70803081233v57f8a630h5120cf1f9a513574@mail.gmail.com> <20080308203728.GD11955@metacarta.com> <4a419bc70803081244h30040f04m2be7f69904dc0739@mail.gmail.com> Message-ID: <1231117266514-2111067.post@n2.nabble.com> I have NZ earthquake data in KML format. These data often span the dateline and are rendered on the map in 2 sets, each side of the date line. As I scroll the map eastward the set of data west of the dateline disappears as the set east of the dateline appears. It looks clunky, and gives the initial impression that earthquakes only occur west of the dateline. Is it possible to display all data at once? This sounds a similar request to one above written 9 months ago - has there been any development on this issue or is there going to be? -- View this message in context: http://n2.nabble.com/Map-wrapping--tp1828298p2111067.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Sun Jan 4 20:01:13 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] setCenter not working with EPSG:900913 projection In-Reply-To: <1231101458.6294.3.camel@frodo> References: <1231101458.6294.3.camel@frodo> Message-ID: <20090105010111.GB10452@metacarta.com> On Mon, Jan 05, 2009 at 09:37:38AM +1300, Robert Connolly wrote: > > Hi Everyone, > > I sent the following message before Christmas via Nabble, however I am > unable to track down the reply I received. Can anyone help with my > problem? > > Regards, > > Rob Connolly > > --Original Message-- > > Hi, > > I'm having trouble using the setCenter method when using a EPSG:900913 > projection for a Google map layer, see my code below: > > map = new OpenLayers.Map('map', {projection: new > OpenLayers.Projection("EPSG:900913")}); > var gmap = new OpenLayers.Layer.Google("Google Streets", > { sphericalMercator: true }); // streets is the default > > map.addLayers([gmap]); > > > var center = new OpenLayers.LonLat(-41.27, 173.28); ^^^^^^ Lon,Lat is X,Y: you want 173.28, -41.27. -- Chris > alert('['+center.lon+','+center.lat+']'); > var proj = new OpenLayers.Projection("EPSG:4326"); > center.transform(proj, map.getProjectionObject()); > alert('['+center.lon+','+center.lat+']'); > map.setCenter(center, 13); > > I have the proj4js library installed and included on the page. It > appears that the conversion is working (from the data being shown by my > alert statements), however the center of the map remains on the > equator/prime meridian intersection, when it should be over Nelson, New > Zealand! > > Can anyone help? > > Regards, > > Rob Connolly > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Sun Jan 4 20:16:24 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map wrapping? In-Reply-To: <1231117266514-2111067.post@n2.nabble.com> References: <4a419bc70803081140m65b015em95ce6e707391329b@mail.gmail.com> <20080308202608.GB11955@metacarta.com> <4a419bc70803081233v57f8a630h5120cf1f9a513574@mail.gmail.com> <20080308203728.GD11955@metacarta.com> <4a419bc70803081244h30040f04m2be7f69904dc0739@mail.gmail.com> <1231117266514-2111067.post@n2.nabble.com> Message-ID: <20090105011624.GC10452@metacarta.com> On Sun, Jan 04, 2009 at 05:01:06PM -0800, Paul Stevenson wrote: > > I have NZ earthquake data in KML format. These data often span the dateline > and are rendered on the map in 2 sets, each side of the date line. As I > scroll the map eastward the set of data west of the dateline disappears as > the set east of the dateline appears. It looks clunky, and gives the initial > impression that earthquakes only occur west of the dateline. Is it possible > to display all data at once? Not in OpenLayers. > This sounds a similar request to one above > written 9 months ago - has there been any development on this issue or is > there going to be? Not that I'm aware of. > > > -- > View this message in context: http://n2.nabble.com/Map-wrapping--tp1828298p2111067.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Mon Jan 5 01:45:13 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] OpenLayers Google Map resolution Issue In-Reply-To: References: Message-ID: <5ec103de0901042245u56b35661n8ae2fe9ab1376f66@mail.gmail.com> Hi >From my understanding you can't change the resolution numbers of commercial layers. I'm not very familiar with the commercial APIs so I'd like to be corrected if I'm wrong. Cheers, Eric 2008/12/30, AJ R : > Hi > > I am trying to do an interesting thing. > > I have couple of user defined WMS layers (in EPSG 32616) which have a > set of resolutions not matching the Google Resolutions. I was trying > to modify the Google layer to match the resolution set that I have (I > had to tweak the OpenLayers code for this). The Google Layer was able > to get me the right zoom for the resolution, but when doing the > calculateBounds() in the Map object, the WMS layer extent (of course > they have been reprojected to 900913) are slightly skewed i.e. does > not match the bounding box extent in my Context document. > > I found the reason for this and that is the way calculateBounds() > tries to find the extent from the center, which skews the extent a > little bit as compared to the default extent. Does anyone have any > idea why this happens. Does this mean that we cannot change the > default resolution set for the google / yahoo maps? > > Any information would be helpful > > Thanks & regards > > Ajay Ravichandran > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From dave.potts at pinan.co.uk Mon Jan 5 06:53:54 2009 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] ActiveXObject is not defined and FireBug on Linux In-Reply-To: <20090105010111.GB10452@metacarta.com> References: <1231101458.6294.3.camel@frodo> <20090105010111.GB10452@metacarta.com> Message-ID: <4961F4D2.3080702@pinan.co.uk> Hi List I am trying to debug a javascript problem, so I have firebug enabled, but my openlayers application keeps on scraming about "ActiveXObject is not defined". You can ignore this problem by just clicking on the blue next button, but I would like to get to the bottom of this problem. Having tried to access the www.openlayers.org site, its coming up with the same problem, so its not just my application. Any suggestions ? I working with openlayers 2.7 on a Linux box. What is werid is that I have always through that ActiveXObject would be a windoz problem. Dave. -------------- next part -------------- A non-text attachment was scrubbed... Name: dave_potts.vcf Type: text/x-vcard Size: 85 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090105/6dcf607e/dave_potts.vcf From crschmidt at metacarta.com Mon Jan 5 07:02:30 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] ActiveXObject is not defined and FireBug on Linux In-Reply-To: <4961F4D2.3080702@pinan.co.uk> References: <1231101458.6294.3.camel@frodo> <20090105010111.GB10452@metacarta.com> <4961F4D2.3080702@pinan.co.uk> Message-ID: <20090105120229.GE10452@metacarta.com> On Mon, Jan 05, 2009 at 11:53:54AM +0000, Dave Potts wrote: > Hi List > > I am trying to debug a javascript problem, so I have firebug enabled, > but my openlayers application keeps on scraming about "ActiveXObject is > not defined". > > You can ignore this problem by just clicking on the blue next button, > but I would like to get to the bottom of this problem. "Blue next button"? I have never seen a blue next button in Firefox. You didn't actually mention what browser you're in, but Im assuming Firefox? Anyway, all I can say is that this is not a problem in FF2(/Iceweasel) On Debian Etch, FF3 on Ubuntu, or any other browser I've tried. I would suggest perhaps turning off all browser extensions, because this doesn't seem like an OpenLayers problem... > Having tried to access the www.openlayers.org site, its coming up with > the same problem, so its not just my application. > > Any suggestions ? > > I working with openlayers 2.7 on a Linux box. > > What is werid is that I have always through that ActiveXObject would be > a windoz problem. > > Dave. > begin:vcard > fn:David Potts > n:Potts;David > x-mozilla-html:FALSE > version:2.1 > end:vcard > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From CHRISTOPHER.M.HEIDT at saic.com Mon Jan 5 09:52:08 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] setCenter not working with EPSG:900913projection In-Reply-To: <20090105010111.GB10452@metacarta.com> References: <1231101458.6294.3.camel@frodo> <20090105010111.GB10452@metacarta.com> Message-ID: <1053B20F24D85F41B57F168351684E2202C703CF@0015-its-exmb04.us.saic.com> you need to transform the values you are applying to the setcenter. Map.setCenter( new OpenLayers.LonLat(lon, lat).transform(map.displayProjection, map.projection),null); You may want to add {displayProjection: new OpenLayers.Projection("EPSG:4326")} to your map options to make your code a bit cleaner. Whenever you pull data from the map you need to transform it from projection to displayProjection and when you add data to the map you need to transform from displayProjection to projection. -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Christopher Schmidt Sent: Sunday, January 04, 2009 8:01 PM To: Robert Connolly Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] setCenter not working with EPSG:900913projection On Mon, Jan 05, 2009 at 09:37:38AM +1300, Robert Connolly wrote: > > Hi Everyone, > > I sent the following message before Christmas via Nabble, however I am > unable to track down the reply I received. Can anyone help with my > problem? > > Regards, > > Rob Connolly > > --Original Message-- > > Hi, > > I'm having trouble using the setCenter method when using a EPSG:900913 > projection for a Google map layer, see my code below: > > map = new OpenLayers.Map('map', {projection: new > OpenLayers.Projection("EPSG:900913")}); > var gmap = new OpenLayers.Layer.Google("Google Streets", { > sphericalMercator: true }); // streets is the default > > map.addLayers([gmap]); > > > var center = new OpenLayers.LonLat(-41.27, 173.28); ^^^^^^ Lon,Lat is X,Y: you want 173.28, -41.27. -- Chris > alert('['+center.lon+','+center.lat+']'); > var proj = new OpenLayers.Projection("EPSG:4326"); > center.transform(proj, map.getProjectionObject()); > alert('['+center.lon+','+center.lat+']'); > map.setCenter(center, 13); > > I have the proj4js library installed and included on the page. It > appears that the conversion is working (from the data being shown by > my alert statements), however the center of the map remains on the > equator/prime meridian intersection, when it should be over Nelson, > New Zealand! > > Can anyone help? > > Regards, > > Rob Connolly > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From jlacroix at mapgears.com Mon Jan 5 11:02:51 2009 From: jlacroix at mapgears.com (Julien-Samuel Lacroix) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] wms+wfs+google with overlay+kml In-Reply-To: <21154863.post@talk.nabble.com> References: <21154863.post@talk.nabble.com> Message-ID: <49622F2B.4090002@mapgears.com> Hi, Sorry if you didn't get a response earlier. Mailing-lists are always more quiet during the Holidays. If you didn't figure it out yet, here's some tips. - Try to start from a working example like the spherical mercator one: http://openlayers.org/dev/examples/spherical-mercator.html - Does your WMS and WFS support the 900913 projection? Get the URL of your WMS image, with something like with FireBug (a FireFox extension), and see what it return. - Your projection in your WMS is 28992. Is it compatible with the 900913 of your map? - In your WMS, you set the maxExtent and maxResolution in the wrong parameter. They should be in the fourth one, not the third one. Hope that get you started. Julien cwest wrote: > hi all, > i 've got a problem with nested layer,i set google as baselayer, > wms,wfs,and kml as overlayers.I can show individual of them,but i > cant nested them all,maybe some difference of projection , > Is there anyway that I can nested them. > > follow is my code: > //////////////////////////////////// > var map; > > function init(){ > OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; > OpenLayers.Util.onImageLoadErrorColor = "transparent"; > > var bounds = new OpenLayers.Bounds( > 243000,466000,257000,482000//242300, 465200,257700, > 482800// > ); > var options = { > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: "m", > maxResolution: 156543.0339, > maxExtent: bounds > }; > > map = new OpenLayers.Map('map',options); // nothing display > when i add options > //map = new OpenLayers.Map('map');// i can nested them except > wfs when no options > > var googlehybrid = new OpenLayers.Layer.Google( "Google Hybrid" , > {type:G_HYBRID_MAP,isBaseLayer: true}); > > > > wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", > "http://192.168.0.105:8081/geoserver/wms", {layers: > 'topp:SW_PIPE',maxExtent: bounds,maxResolution: '68.75',projection: > "EPSG:28992",units: 'm',tiled: 'true',transparent: true} > //{reproject: true,opacity: 0.8,isBaseLayer: false} > ); > //layer1.transparent=true; > wms.isBaseLayer=false; > > > var wfs = new OpenLayers.Layer.WFS( "WFS", > "http://192.168.0.105:8081/geoserver/wfs", > {typename: 'topp:RD_ROAD_OBJECT'}, > { > typename: 'topp:RD_ROAD_OBJECT', > featureNS: 'http://www.openplans.org/topp', > extractAttributes: false, > visibility:false > },{ featureClass: OpenLayers.Feature.WFS}); > > kml=new OpenLayers.Layer.GML("KML0", > "http://192.168.0.125:8080/geoserver/www/sw4.kml", > { > format: OpenLayers.Format.KML, > formatOptions: { > extractStyles: true, > extractAttributes: false > } > }); > > > map.addLayers([googlehybrid,wms,wfs,kml]); > > map.setCenter(new > OpenLayers.LonLat(6.785026240707595,52.27358741413968), 13); > > map.addControl( new OpenLayers.Control.LayerSwitcher() ); > } > /////////////////////////////////////////////////////// > > Thanks in advance > > cwest -- Julien-Samuel Lacroix Mapgears http://www.mapgears.com/ From crschmidt at metacarta.com Mon Jan 5 11:28:57 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] ActiveXObject is not defined and FireBug on Linux In-Reply-To: <49622F81.5000303@pinan.co.uk> References: <1231101458.6294.3.camel@frodo> <20090105010111.GB10452@metacarta.com> <4961F4D2.3080702@pinan.co.uk> <20090105120229.GE10452@metacarta.com> <49622F81.5000303@pinan.co.uk> Message-ID: <20090105162857.GH10452@metacarta.com> On Mon, Jan 05, 2009 at 04:04:17PM +0000, Dave Potts wrote: > Christopher Schmidt wrote: > The blue button that I refer to is a shaped like a triangle, like a > video play button. > > Its part of Firebug, a javsascript debugger. I'm aware of Firebug, I use it all the time, but not what yu'e talking about. It sounds like you have an option like "Stop on all exceptions" checked. You shouldn't do that, because OpenLayers throws (and internally catches) exceptions. I have seen this beahvior before when I have used options in Venkman to debug, but I see no matching option in my version of Firebug. In any case, what you are describing does not sound like a problem in OpenLayers. Good luck. > I am using firefox (3) as a browser on Ubuntu. > > Disabling firebug makes the problem "go away", but since the "problem" > only occurs when looking at the openlayer sites, I suspect that its an > openlayers problem. > > Dave. > >On Mon, Jan 05, 2009 at 11:53:54AM +0000, Dave Potts wrote: > > > >>Hi List > >> > >>I am trying to debug a javascript problem, so I have firebug enabled, > >>but my openlayers application keeps on scraming about "ActiveXObject is > >>not defined". > >> > >>You can ignore this problem by just clicking on the blue next button, > >>but I would like to get to the bottom of this problem. > >> > > > >"Blue next button"? I have never seen a blue next button in Firefox. You > >didn't actually mention what browser you're in, but Im assuming Firefox? > > > >Anyway, all I can say is that this is not a problem in FF2(/Iceweasel) > >On Debian Etch, FF3 on Ubuntu, or any other browser I've tried. I would > >suggest perhaps turning off all browser extensions, because this doesn't > >seem like an OpenLayers problem... > > > > > >>Having tried to access the www.openlayers.org site, its coming up with > >>the same problem, so its not just my application. > >> > >>Any suggestions ? > >> > >>I working with openlayers 2.7 on a Linux box. > >> > >>What is werid is that I have always through that ActiveXObject would be > >>a windoz problem. > >> > >>Dave. > >> > > > > > >>begin:vcard > >>fn:David Potts > >>n:Potts;David > >>x-mozilla-html:FALSE > >>version:2.1 > >>end:vcard > >> > >> > > > > > >>_______________________________________________ > >>Users mailing list > >>Users@openlayers.org > >>http://openlayers.org/mailman/listinfo/users > >> > > > > > > > > begin:vcard > fn:David Potts > n:Potts;David > x-mozilla-html:FALSE > version:2.1 > end:vcard > -- Christopher Schmidt MetaCarta From ashore3 at verizon.net Mon Jan 5 11:30:08 2009 From: ashore3 at verizon.net (Arnie Shore) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] OL on Hand-held's - RAM demands? In-Reply-To: <49622F2B.4090002@mapgears.com> References: <21154863.post@talk.nabble.com> <49622F2B.4090002@mapgears.com> Message-ID: <49623590.3020801@verizon.net> Folks, I'm beginning to think about developing a version of my (currently) GMaps-based application for use on a hand-held device, type yet-TBD, but Blackberry's are candidates. I wonder if anyone here can speak to any specific experience here, esp re OL's RAM demands. Seems quite a bit, frankly, given the API and images to be handled. (Not a pblm in desktops or notebooks, but handhelds?) Overwhelming? Any special considerations? (Fyi, I've seen: http://download.oracle.com/otndocs/products/spatial/pdf/osuc2007_presentations/gita07200b_eSpatial.pdf - excellent!) Thanks, all. Arnie Shore Annapolis, MD ~~~~_/)~~~~~~~~_/)~~~~~~~~_/)~~~~~~~~_/)~~~~~ From dhollema at UnitedPower.com Mon Jan 5 11:50:47 2009 From: dhollema at UnitedPower.com (David Hollema) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] custom control.button problems Message-ID: <6E8207CA2FD8994893D27C329DCCEDF0034692D9@upimail2003.unitedpower.com> Couple question as an openlayers newbie. * I can't get custom control.buttons to fire. What am I doing wrong? I tried in IE7 and FF and neither work properly. * When I first open the web page, the functions which are assigned to the trigger events of my custom control buttons are fired. What's going on here? This function below gets called during the body onload of the html. I don't see why it's calling the trigger events are called. function init(){ /*var options = { controls: [new OpenLayers.Control.MouseDefaults()], units: 'ft' };*/ var options = { units: 'ft' //projection: "EPSG:4326" }; map = new OpenLayers.Map('map' , options); document.getElementById('IDimgFolder').value = baseURL; setImgArray(); /*var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );*/ //map.addLayer(wms); //debugger; pointLayer = new OpenLayers.Layer.Vector("Target Picks", {geometryType: OpenLayers.Geometry.Point}); map.addLayer(pointLayer); //debugger; //OpenLayers.ProxyHost="/proxy/?url="; //var newl = new OpenLayers.Layer.Text( "text", {location: "test.txt"} ); //var newl = new OpenLayers.Layer.Text( "text", {location: "http://openlayers.org/dev/examples/textfile.txt"} ); //var newl = new OpenLayers.Layer.Text( "text", {location: "c://temp//test.txt"} ); //map.addLayer(newl); //var new2 = new OpenLayers.Layer.GML( "textGML", "http://upigis/joint use/test.txt",{format: OpenLayers.Format.Text}); //map.addLayer(new2); var new3 = new OpenLayers.Layer.GML( "Target Picks GML", "http://upigis/joint use/point.xml"); map.addLayer(new3); //map.setLayerIndex(new3, 0); map.setCenter(0,0); map.addControl(new OpenLayers.Control.MousePosition({div: document.getElementById("mouseposition"), prefix: "mouse pos: (", suffix: ")"})); map.addControl(new OpenLayers.Control.PanZoom()); map.addControl(new OpenLayers.Control.LayerSwitcher()); var overview = new OpenLayers.Control.OverviewMap(); map.addControl(overview); var panCustom = new OpenLayers.Control.MouseDefaults( {title:'You can use the default mouse configuration'}); var zb = new OpenLayers.Control.ZoomBox( {title:"Zoom box: Selecting it you can zoom on an area by clicking and dragging."}); var drawPtControl = new OpenLayers.Control.DrawFeature(pointLayer, OpenLayers.Handler.Point, {title:'Pick target on photo'}); var dragPtControl = new OpenLayers.Control.DragFeature(pointLayer, {title:'Move target pick'}); //map.addControl(dragPtControl); var history = new OpenLayers.Control.NavigationHistory(); map.addControl(history); var clearPicksBtn = new OpenLayers.Control.Button({trigger: clearPicks(pointLayer), displayClass: "clearPicksBtn", title:'Clear all picks'}); var prevPhotoBtn = new OpenLayers.Control.Button({trigger: f_slideshow(-1), displayClass: "prevPhotoBtn", title:'Previous photo'}); var nextPhotoBtn = new OpenLayers.Control.Button({trigger: f_slideshow(1), displayClass: "nextPhotoBtn", title:'Next photo'}); //var panel = new OpenLayers.Control.Panel({div: document.getElementById("panel")}); var panel2 = new OpenLayers.Control.Panel({div: document.getElementById("panel2"), defaultControl: panCustom}); panel2.addControls([panCustom, zb, history.next, history.previous, drawPtControl, dragPtControl, clearPicksBtn, prevPhotoBtn, nextPhotoBtn]); map.addControl(panel2); } David A. Hollema GIS Analyst United Power, Inc. From bthoen at gisnet.com Mon Jan 5 12:03:20 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] What's the Difference Between feature.data and feature.attributes? Message-ID: <49623D58.3010306@gisnet.com> I want to create some points in a vector layer and associate some data values with them. It looks like I could store them in either the point feature's data object or its attributes object. Which should I use and what's the difference between these feature objects? From ahocevar at opengeo.org Mon Jan 5 12:02:23 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] OL on Hand-held's - RAM demands? In-Reply-To: <49623590.3020801@verizon.net> References: <21154863.post@talk.nabble.com> <49622F2B.4090002@mapgears.com> <49623590.3020801@verizon.net> Message-ID: <49623D1F.8050709@opengeo.org> Hey, Arnie Shore wrote: > Folks, I'm beginning to think about developing a version of my > (currently) GMaps-based application for use on a hand-held device, type > yet-TBD, but Blackberry's are candidates. > not sure about Blackberry, but there is a version available which uses some special features of the iPhone. See [1] for more details. Regards, Andreas. [1] http://docs.opengeo.org/geospiel/topics/computer-languages/javascript/ol/ioljs/ -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From eric.c2c at gmail.com Mon Jan 5 12:06:33 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] custom control.button problems In-Reply-To: <6E8207CA2FD8994893D27C329DCCEDF0034692D9@upimail2003.unitedpower.com> References: <6E8207CA2FD8994893D27C329DCCEDF0034692D9@upimail2003.unitedpower.com> Message-ID: <5ec103de0901050906o781677a9ka81ace019b7f722c@mail.gmail.com> Hi You don't pass a function in the options but the return code of a function. Try this: var onTrigger = function() { alert("yo"); }; var btn = new OpenLayers.Control.Button({ trigger: onTrigger }); Cheers, Eric 2009/1/5, David Hollema : > Couple question as an openlayers newbie. > > * I can't get custom control.buttons to fire. What am I doing wrong? I > tried in IE7 and FF and neither work properly. > * When I first open the web page, the functions which are assigned to > the trigger events of my custom control buttons are fired. What's going > on here? This function below gets called during the body onload of the > html. I don't see why it's calling the trigger events are called. > > function init(){ > > /*var options = { > controls: [new OpenLayers.Control.MouseDefaults()], > units: 'ft' > };*/ > > var options = { > units: 'ft' > //projection: "EPSG:4326" > }; > > map = new OpenLayers.Map('map' , > options); > > > document.getElementById('IDimgFolder').value = baseURL; > setImgArray(); > /*var wms = new OpenLayers.Layer.WMS( > "OpenLayers WMS", > "http://labs.metacarta.com/wms/vmap0?", > {layers: 'basic'} > );*/ > //map.addLayer(wms); > > //debugger; > pointLayer = new > OpenLayers.Layer.Vector("Target Picks", {geometryType: > OpenLayers.Geometry.Point}); > map.addLayer(pointLayer); > > //debugger; > //OpenLayers.ProxyHost="/proxy/?url="; > //var newl = new OpenLayers.Layer.Text( > "text", {location: "test.txt"} ); > //var newl = new OpenLayers.Layer.Text( > "text", {location: "http://openlayers.org/dev/examples/textfile.txt"} ); > //var newl = new OpenLayers.Layer.Text( > "text", {location: "c://temp//test.txt"} ); > //map.addLayer(newl); > > //var new2 = new OpenLayers.Layer.GML( > "textGML", "http://upigis/joint use/test.txt",{format: > OpenLayers.Format.Text}); > //map.addLayer(new2); > > var new3 = new OpenLayers.Layer.GML( "Target Picks GML", > "http://upigis/joint use/point.xml"); > map.addLayer(new3); > //map.setLayerIndex(new3, 0); > > map.setCenter(0,0); > map.addControl(new > OpenLayers.Control.MousePosition({div: > document.getElementById("mouseposition"), > prefix: "mouse pos: (", suffix: ")"})); > map.addControl(new > OpenLayers.Control.PanZoom()); > map.addControl(new > OpenLayers.Control.LayerSwitcher()); > > var overview = new > OpenLayers.Control.OverviewMap(); > map.addControl(overview); > > var panCustom = new > OpenLayers.Control.MouseDefaults( > {title:'You can use the default mouse > configuration'}); > > var zb = new OpenLayers.Control.ZoomBox( > {title:"Zoom box: Selecting it you can zoom on an area > by clicking and dragging."}); > > var drawPtControl = new > OpenLayers.Control.DrawFeature(pointLayer, > OpenLayers.Handler.Point, {title:'Pick > target on photo'}); > > var dragPtControl = new > OpenLayers.Control.DragFeature(pointLayer, {title:'Move target pick'}); > //map.addControl(dragPtControl); > > var history = new > OpenLayers.Control.NavigationHistory(); > map.addControl(history); > > var clearPicksBtn = new > OpenLayers.Control.Button({trigger: clearPicks(pointLayer), > displayClass: "clearPicksBtn", > title:'Clear all picks'}); > > var prevPhotoBtn = new > OpenLayers.Control.Button({trigger: f_slideshow(-1), displayClass: > "prevPhotoBtn", > title:'Previous photo'}); > > var nextPhotoBtn = new > OpenLayers.Control.Button({trigger: f_slideshow(1), displayClass: > "nextPhotoBtn", > title:'Next photo'}); > > //var panel = new > OpenLayers.Control.Panel({div: document.getElementById("panel")}); > var panel2 = new > OpenLayers.Control.Panel({div: document.getElementById("panel2"), > defaultControl: panCustom}); > > > panel2.addControls([panCustom, zb, > history.next, history.previous, drawPtControl, > dragPtControl, clearPicksBtn, > prevPhotoBtn, nextPhotoBtn]); > map.addControl(panel2); > } > > > > David A. Hollema > GIS Analyst > > United Power, Inc. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From CHRISTOPHER.M.HEIDT at saic.com Mon Jan 5 12:13:04 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] custom control.button problems In-Reply-To: <5ec103de0901050906o781677a9ka81ace019b7f722c@mail.gmail.com> References: <6E8207CA2FD8994893D27C329DCCEDF0034692D9@upimail2003.unitedpower.com> <5ec103de0901050906o781677a9ka81ace019b7f722c@mail.gmail.com> Message-ID: <1053B20F24D85F41B57F168351684E2202CD1A82@0015-its-exmb04.us.saic.com> And if u need to pass a variable var onTrigger = function(variableName) { alert(variableName); }; var btn = new OpenLayers.Control.Button({ trigger: function(variableName){ onTrigger(variableName); } }); The basic principle here is that you need to store a function in trigger. Your code was tring to store the output of a function in trigger. -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Eric Lemoine Sent: Monday, January 05, 2009 12:07 PM To: David Hollema; users@openlayers.org Subject: Re: [OpenLayers-Users] custom control.button problems Hi You don't pass a function in the options but the return code of a function. Try this: var onTrigger = function() { alert("yo"); }; var btn = new OpenLayers.Control.Button({ trigger: onTrigger }); Cheers, Eric 2009/1/5, David Hollema : > Couple question as an openlayers newbie. > > * I can't get custom control.buttons to fire. What am I doing wrong? > I tried in IE7 and FF and neither work properly. > * When I first open the web page, the functions which are assigned to > the trigger events of my custom control buttons are fired. What's > going on here? This function below gets called during the body onload > of the html. I don't see why it's calling the trigger events are called. > > function init(){ > > /*var options = { > controls: [new > OpenLayers.Control.MouseDefaults()], > units: 'ft' > };*/ > > var options = { > units: 'ft' > //projection: "EPSG:4326" > }; > > map = new OpenLayers.Map('map' , > options); > > > document.getElementById('IDimgFolder').value = baseURL; > setImgArray(); > /*var wms = new OpenLayers.Layer.WMS( > "OpenLayers WMS", > "http://labs.metacarta.com/wms/vmap0?", > {layers: 'basic'} > );*/ > //map.addLayer(wms); > > //debugger; > pointLayer = new > OpenLayers.Layer.Vector("Target Picks", {geometryType: > OpenLayers.Geometry.Point}); > map.addLayer(pointLayer); > > //debugger; > //OpenLayers.ProxyHost="/proxy/?url="; > //var newl = new OpenLayers.Layer.Text( "text", {location: > "test.txt"} ); > //var newl = new OpenLayers.Layer.Text( "text", {location: > "http://openlayers.org/dev/examples/textfile.txt"} ); > //var newl = new OpenLayers.Layer.Text( "text", {location: > "c://temp//test.txt"} ); > //map.addLayer(newl); > > //var new2 = new OpenLayers.Layer.GML( "textGML", > "http://upigis/joint use/test.txt",{format: > OpenLayers.Format.Text}); > //map.addLayer(new2); > > var new3 = new OpenLayers.Layer.GML( "Target Picks > GML", "http://upigis/joint use/point.xml"); > map.addLayer(new3); > //map.setLayerIndex(new3, 0); > > map.setCenter(0,0); > map.addControl(new > OpenLayers.Control.MousePosition({div: > document.getElementById("mouseposition"), > prefix: "mouse pos: (", suffix: ")"})); > map.addControl(new > OpenLayers.Control.PanZoom()); > map.addControl(new > OpenLayers.Control.LayerSwitcher()); > > var overview = new > OpenLayers.Control.OverviewMap(); > map.addControl(overview); > > var panCustom = new > OpenLayers.Control.MouseDefaults( > {title:'You can use the default mouse > configuration'}); > > var zb = new OpenLayers.Control.ZoomBox( > {title:"Zoom box: Selecting it you can zoom on an area > by clicking and dragging."}); > > var drawPtControl = new > OpenLayers.Control.DrawFeature(pointLayer, > OpenLayers.Handler.Point, {title:'Pick > target on photo'}); > > var dragPtControl = new > OpenLayers.Control.DragFeature(pointLayer, {title:'Move target pick'}); > //map.addControl(dragPtControl); > > var history = new > OpenLayers.Control.NavigationHistory(); > map.addControl(history); > > var clearPicksBtn = new > OpenLayers.Control.Button({trigger: clearPicks(pointLayer), > displayClass: "clearPicksBtn", > title:'Clear all picks'}); > > var prevPhotoBtn = new > OpenLayers.Control.Button({trigger: f_slideshow(-1), displayClass: > "prevPhotoBtn", > title:'Previous photo'}); > > var nextPhotoBtn = new > OpenLayers.Control.Button({trigger: f_slideshow(1), displayClass: > "nextPhotoBtn", > title:'Next photo'}); > > //var panel = new > OpenLayers.Control.Panel({div: document.getElementById("panel")}); > var panel2 = new > OpenLayers.Control.Panel({div: document.getElementById("panel2"), > defaultControl: panCustom}); > > > panel2.addControls([panCustom, zb, history.next, history.previous, > drawPtControl, > dragPtControl, clearPicksBtn, > prevPhotoBtn, nextPhotoBtn]); > map.addControl(panel2); > } > > > > David A. Hollema > GIS Analyst > > United Power, Inc. > _______________________________________________ > 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 eric.c2c at gmail.com Mon Jan 5 12:15:15 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] What's the Difference Between feature.data and feature.attributes? In-Reply-To: <49623D58.3010306@gisnet.com> References: <49623D58.3010306@gisnet.com> Message-ID: <5ec103de0901050915t215cf9b9n3774430c8212e9c6@mail.gmail.com> Hi For information "data" is in the base Feature class while "attributes" is in the Feature.Vector class. "data" is there for historical reason and isn't to be used when using Feature.Vector, so you should use "attributes". This is particularly true if you're to use a Format to serialize features, or to style your features based on property values. Eric 2009/1/5, Bill Thoen : > I want to create some points in a vector layer and associate some data > values with them. It looks like I could store them in either the point > feature's data object or its attributes object. Which should I use and > what's the difference between these feature objects? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ashore3 at verizon.net Mon Jan 5 14:20:23 2009 From: ashore3 at verizon.net (Arnie Shore) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Recommendations for Map data? In-Reply-To: <5ec103de0901050915t215cf9b9n3774430c8212e9c6@mail.gmail.com> References: <49623D58.3010306@gisnet.com> <5ec103de0901050915t215cf9b9n3774430c8212e9c6@mail.gmail.com> Message-ID: <49625D77.9020807@verizon.net> Folks, I'm looking at porting an application now using Google's maps and API to a platform that has no reliance on Internet availability. It's Open Source, and OpenLayers is the API of clear choice. Given that as half of the solution, what's recommended for the other half, the map data? I'm looking for suggestions that meet the following criteria. Users cd be anyplace, so I'll need something that wd cover the US, be moderate in price, and readily used with OpenLayers. GMaps-level of resolution and functionality is a target. There's several CDROM's around, notably those fm Microsoft, but I'll appreciate any suggestions. Thanks, Arnie Shore Annapolis, MD From ajayr.email at gmail.com Mon Jan 5 15:29:55 2009 From: ajayr.email at gmail.com (AJ R) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Recommendations for Map data? In-Reply-To: <49625D77.9020807@verizon.net> References: <49623D58.3010306@gisnet.com> <5ec103de0901050915t215cf9b9n3774430c8212e9c6@mail.gmail.com> <49625D77.9020807@verizon.net> Message-ID: Hi Arnie One possible open source solution is Open street Map. This provide almost google like results, and has the advantage of exporting data in couple of different formats, one of them being OSM which can then be converted into shapefiles that you can render offline using a server like geoserver. Of course it depends on the location and how well the location has been mapped by Open Street Maps since the data collection is mostly a volunteer effort. Regards Ajay Ravichandran On Mon, Jan 5, 2009 at 1:20 PM, Arnie Shore wrote: > Folks, I'm looking at porting an application now using Google's maps > and API to a platform that has no reliance on Internet availability. > > It's Open Source, and OpenLayers is the API of clear choice. Given that > as half of the solution, what's recommended for the other half, the map > data? I'm looking for suggestions that meet the following criteria. > Users cd be anyplace, so I'll need something that wd cover the US, be > moderate in price, and readily used with OpenLayers. GMaps-level of > resolution and functionality is a target. > > There's several CDROM's around, notably those fm Microsoft, but I'll > appreciate any suggestions. Thanks, > > Arnie Shore > Annapolis, MD > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From r.connolly at auckland.ac.nz Mon Jan 5 15:36:45 2009 From: r.connolly at auckland.ac.nz (Robert Connolly) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] setCenter not working with EPSG:900913projection In-Reply-To: <1053B20F24D85F41B57F168351684E2202C703CF@0015-its-exmb04.us.saic.com> References: <1231101458.6294.3.camel@frodo> <20090105010111.GB10452@metacarta.com> <1053B20F24D85F41B57F168351684E2202C703CF@0015-its-exmb04.us.saic.com> Message-ID: <1231187805.6508.2.camel@frodo> On Mon, 2009-01-05 at 09:52 -0500, Heidt, Christopher M. wrote: > you need to transform the values you are applying to the setcenter. > Map.setCenter( new OpenLayers.LonLat(lon, > lat).transform(map.displayProjection, map.projection),null); I thought I was already doing that, see code below: > > map = new OpenLayers.Map('map', {projection: new > > OpenLayers.Projection("EPSG:900913")}); > > var gmap = new OpenLayers.Layer.Google("Google Streets", { > > sphericalMercator: true }); // streets is the default > > > > map.addLayers([gmap]); > > > > var center = new OpenLayers.LonLat(-41.27, 173.28); > > alert('['+center.lon+','+center.lat+']'); > > var proj = new OpenLayers.Projection("EPSG:4326"); > > center.transform(proj, map.getProjectionObject()); > > alert('['+center.lon+','+center.lat+']'); > > map.setCenter(center, 13); Perhaps I'm not doing this correctly, but the conversion appears to be working according to the alert statements. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090106/dd1deaf1/attachment.html From ijturton at gmail.com Mon Jan 5 16:21:37 2009 From: ijturton at gmail.com (Ian Turton) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Projects from my students Message-ID: As some of you will be aware students taking my open web mapping course (https://www.e-education.psu.edu/geog585/) at Penn State have to produce a working web mapping project as their final project. While they aren't required to use a GeoServer/OpenLayers combo most of them do (well why deviate from the examples in the course?). Here is the page that points to this years projects http://webmapping.mgis.psu.edu/geoserver/www/index.html for people to look at - if any one can work out why the selection box on http://webmapping.mgis.psu.edu/geoserver/www/chris/CHS_Health_Atlas_FINAL.html doesn't work I'd be really grateful as I can't figure it out. Ian From bpederse at gmail.com Mon Jan 5 17:05:16 2009 From: bpederse at gmail.com (Brent Pedersen) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Projects from my students In-Reply-To: References: Message-ID: > look at - if any one can work out why the selection box on > http://webmapping.mgis.psu.edu/geoserver/www/chris/CHS_Health_Atlas_FINAL.html > doesn't work I'd be really grateful as I can't figure it out. > > Ian looks like you need to start by making Zoom() and UHFZoom() global functions. they are currently defined in inside init() and therefore not accessible. after that, you need a lookup of layername => extent for zoomToExtent() -b From dhollema at UnitedPower.com Mon Jan 5 18:24:38 2009 From: dhollema at UnitedPower.com (David Hollema) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] can't read text layer Message-ID: <6E8207CA2FD8994893D27C329DCCEDF0034692E1@upimail2003.unitedpower.com> I'm having trouble simply reading a text file layer (tab-delimited). I see no marker on my map and I verified that I'm at coord 0,0. var newl = new OpenLayers.Layer.Text( "text file", {location: "http://upigis/joint use/test.txt"} ); map.addLayer(newl); Here's my example text file: point title description iconSize icon 0,0 title desc 1,1 http://upigis/joint use/marker.png David A. Hollema GIS Analyst United Power, Inc. Direct: 303-637-1366 Fax: 303-637-1366 www.unitedpower.com Physical Address 500 Cooperative Way Brighton, CO 80603 Mailing Address P.O. Box 929 Brighton, CO 80601 From wvick at europa-tech.com Tue Jan 6 05:43:11 2009 From: wvick at europa-tech.com (Warren Vick) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Problem with overlays on VE Message-ID: <776B93361B7BEE4FAD9E720FFBC746B604EB6D9D@34093-EVS4C2.exchange.rackspace.com> I'm having problem with an overlay on a Virtual Earth base. The TMS overlay has been created with Mapnik/generate_tiles.py in ESPG:900913 and looks fine when placed as a base layer. However, when placed on a VE base, the overlay disappears. Just to check I wasn't going mad, I used SphericalMercator.html and found my overlay works fine over Google and Yahoo maps. It's just the VE base which shows the problem. Any thoughts on what's different with a VE base? Regards, Warren Vick From wvick at europa-tech.com Tue Jan 6 06:01:39 2009 From: wvick at europa-tech.com (Warren Vick) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Recommendations for Map data? In-Reply-To: <49625D77.9020807@verizon.net> References: <49623D58.3010306@gisnet.com><5ec103de0901050915t215cf9b9n3774430c8212e9c6@mail.gmail.com> <49625D77.9020807@verizon.net> Message-ID: <776B93361B7BEE4FAD9E720FFBC746B604EB6DB1@34093-EVS4C2.exchange.rackspace.com> Hello Arnie, My company is a world map data vendor currently working with Mapnik tile rendering displayed with OpenLayers. It's the same small scale data that's used in Google Earth/Maps and numerous other services. We've got our data working well which would take you down to a reasonable zoom level with a tile volume that would not be a burden on a disconnected machine. We plan to make this available as a commercial pre-rendered TMS tile set for OpenLayers. Licence costs are yet to be finalised but will be pretty low in comparison with taking commercial vector data. We have one customer who is trialling our data with OSM for street level views in the areas available. This give global completeness at small scale and good (but limited) street level coverage. If you're only looking for coverage of the US, you will have a few data options available. However, if you may need something international in the future, please do get in touch and I'll arrange access to a tile set. Regards, Warren Vick Europa Technologies Ltd. http://www.europa.uk.com -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Arnie Shore Sent: 05 January 2009 19:20 Cc: users@openlayers.org Subject: [OpenLayers-Users] Recommendations for Map data? Folks, I'm looking at porting an application now using Google's maps and API to a platform that has no reliance on Internet availability. It's Open Source, and OpenLayers is the API of clear choice. Given that as half of the solution, what's recommended for the other half, the map data? I'm looking for suggestions that meet the following criteria. Users cd be anyplace, so I'll need something that wd cover the US, be moderate in price, and readily used with OpenLayers. GMaps-level of resolution and functionality is a target. There's several CDROM's around, notably those fm Microsoft, but I'll appreciate any suggestions. Thanks, Arnie Shore Annapolis, MD _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From peteralen at earthlink.net Tue Jan 6 10:30:20 2009 From: peteralen at earthlink.net (plen) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] OpenLayers.Control.ScaleLine accuracy issue Message-ID: <1231255820712-2117980.post@n2.nabble.com> Hello, I have a scenario where I need to measure the distance of my map's viewport's diagonal by measuring the distance between the SW viewport coordinate and the NE viewport coordinate. What I have found is that the distance will be different depending on where in the world the viewport is looking. For example, the distance between the SW and NE points might be 500 km in the middle of North America but might be 325 km in Ecuador. Visually, it looks the same because I have not zoomed in or out. I am starting to find out that the difference is due to the curvature of the earth as a sphere vs a flat map. I added the control OpenLayers.Control.ScaleLine to my map to see the scale. The scale remains the same at a given zoom level regardless of where I am in the world. Because I have found that the viewport distance will be different depending on where you are, I am now finding that the map scale does not reflect the proper measurement. I went to Google Maps to see if they had a scale and found that the Google Maps scale changes as the map is panned around the world. This seemed to verify my earlier findings. My question is to see why the OpenLayers scale remains the same, as if it were placed on a flat map. Maybe I am missing some key piece of information and that is what I am trying to find out. Any thoughts would be greatly appreciated. Thanks - Peter Len -- View this message in context: http://n2.nabble.com/OpenLayers.Control.ScaleLine-accuracy-issue-tp2117980p2117980.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Tue Jan 6 10:42:43 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] OpenLayers.Control.ScaleLine accuracy issue In-Reply-To: <1231255820712-2117980.post@n2.nabble.com> References: <1231255820712-2117980.post@n2.nabble.com> Message-ID: <20090106154243.GJ10452@metacarta.com> On Tue, Jan 06, 2009 at 07:30:20AM -0800, plen wrote: > My question is to see why the OpenLayers scale remains the same, as if it > were placed on a flat map. Because maps are flat. OpenLayers deals entirely with 2d map planes -- not spheres. The ScaleLine is based on the projected coordinate space; distances are not geodesic. I believe it would be possible to make the scale line geodesic in nature; no one has offered a clean patch for this functionality yet. I'm assuming that you're using Google Maps as a base layer. if you are, are you using SphericalMercator? If you're not, I request that you do so, and then try your measurements again -- in the projected coordinates that the map is actually drawn in. Measuring in degrees will have the effect you discuss, but 2d maps aren't measured in degrees, they're measured in projected units. Regards, -- Christopher Schmidt MetaCarta From George at muammar.net Tue Jan 6 15:06:08 2009 From: George at muammar.net (George Mu'ammar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] OL on Hand-held's - RAM demands? In-Reply-To: <49623D1F.8050709@opengeo.org> References: <21154863.post@talk.nabble.com> <49622F2B.4090002@mapgears.com> <49623590.3020801@verizon.net> <49623D1F.8050709@opengeo.org> Message-ID: <20090106210608.mdb2b35s84gc00k8@webmail.muammar.net> Hi all, I don't want to pass as a Microsoft fan, but I recommend the Opera mini-browser. I have done some non-extensive tests and found OL to work suprisingly well on the HTC Touch HD with windows mobile 6.1 and Opera for Pocket PC (don't ask what version because it doesn't say). This PDA has screen 800x320 resolution so there are a lot more pixels than on an iPhone Best of Luck -- George Quoting Andreas Hocevar : > Hey, > > Arnie Shore wrote: >> Folks, I'm beginning to think about developing a version of my >> (currently) GMaps-based application for use on a hand-held device, type >> yet-TBD, but Blackberry's are candidates. >> > > not sure about Blackberry, but there is a version available which uses > some special features of the iPhone. See [1] for more details. > > Regards, > Andreas. > > [1] > http://docs.opengeo.org/geospiel/topics/computer-languages/javascript/ol/ioljs/ > > -- > 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 linda.rawson at gmail.com Tue Jan 6 16:10:49 2009 From: linda.rawson at gmail.com (Linda Rawson) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Need function to pass in center lonlat and resolution and return bounds Message-ID: <6e9b30fb0901061310r2b77b0d6ofe5f79f8ba8963b4@mail.gmail.com> Is there such a function? I need to pass in the center lonlat and resolution and have it return bounds. Thanks! Linda Rawson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090106/1e110cdd/attachment.html From bthoen at gisnet.com Tue Jan 6 18:27:48 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map Labeling Message-ID: <4963E8F4.1070609@gisnet.com> I have a vector layer of points with associated attributes and I want to use one of those attributes as a label for the points. I thought this would be simple, but it's proving to be elusive. Can someone here explain how to do this in OpenLayers 2.7? Thanks, - Bill Thoen From crschmidt at metacarta.com Tue Jan 6 19:35:18 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map Labeling In-Reply-To: <4963E8F4.1070609@gisnet.com> References: <4963E8F4.1070609@gisnet.com> Message-ID: <20090107003518.GK10452@metacarta.com> On Tue, Jan 06, 2009 at 04:27:48PM -0700, Bill Thoen wrote: > I have a vector layer of points with associated attributes and I want to > use one of those attributes as a label for the points. I thought this > would be simple, but it's proving to be elusive. Can someone here > explain how to do this in OpenLayers 2.7? This is not possible in OpenLayers. Regards, -- Christopher Schmidt MetaCarta From brad at cubewerx.com.au Tue Jan 6 19:54:05 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map Labeling In-Reply-To: <4963E8F4.1070609@gisnet.com> References: <4963E8F4.1070609@gisnet.com> Message-ID: <017e01c97062$723f3260$56bd9720$@com.au> Bill, If you can, you need to import these as points or features of some sort into your database and use SLDs to render these as labels. Cheers Brad... -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Bill Thoen Sent: Wednesday, January 07, 2009 10:28 AM To: users@openlayers.org Subject: [OpenLayers-Users] Map Labeling I have a vector layer of points with associated attributes and I want to use one of those attributes as a label for the points. I thought this would be simple, but it's proving to be elusive. Can someone here explain how to do this in OpenLayers 2.7? Thanks, - Bill Thoen _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From arnd.wippermann at web.de Tue Jan 6 19:57:24 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map Labeling In-Reply-To: <4963E8F4.1070609@gisnet.com> Message-ID: Hi Bill, I do it with popups. You can see it here: http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/labels.html Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Bill Thoen Gesendet: Mittwoch, 7. Januar 2009 00:28 An: users@openlayers.org Betreff: [OpenLayers-Users] Map Labeling I have a vector layer of points with associated attributes and I want to use one of those attributes as a label for the points. I thought this would be simple, but it's proving to be elusive. Can someone here explain how to do this in OpenLayers 2.7? Thanks, - Bill Thoen _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From ashore3 at verizon.net Tue Jan 6 21:01:47 2009 From: ashore3 at verizon.net (Arnie Shore) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] MS's Streets and Trips In-Reply-To: <776B93361B7BEE4FAD9E720FFBC746B604EB6DB1@34093-EVS4C2.exchange.rackspace.com> References: <49623D58.3010306@gisnet.com><5ec103de0901050915t215cf9b9n3774430c8212e9c6@mail.gmail.com> <49625D77.9020807@verizon.net> <776B93361B7BEE4FAD9E720FFBC746B604EB6DB1@34093-EVS4C2.exchange.rackspace.com> Message-ID: <49640D0B.609@verizon.net> Can anyone here speak to experience in using OL with maps exported from subject system? Right now I have no information at all re their technical parameters, so ANY information wd be appreciated. Arnie Shore Annapolis, MD From peteralen at earthlink.net Tue Jan 6 21:37:12 2009 From: peteralen at earthlink.net (plen) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] OpenLayers.Control.ScaleLine accuracy issue In-Reply-To: <20090106154243.GJ10452@metacarta.com> References: <1231255820712-2117980.post@n2.nabble.com> <20090106154243.GJ10452@metacarta.com> Message-ID: <1231295832836-2120559.post@n2.nabble.com> Christopher, Thanks for the reply. I see that you work for MetaCarta so you are not as confused about planar vs geodesic vs degrees vs projected units etc etc as I am. A little background as to how we are using OpenLayers and what led me to this question.... We are using a government mapping interface API (which is built upon OpenLayers) for our 2D mapping solution. All base maps are populated by them (Google Maps is not one of them). Calls to do something with the map are either through the government API or I can make some calls directly to the OpenLayers API. I needed to find the map viewport's diagonal (SW to NE corner). To do this, I was comparing two different methods: The OpenLayers distanceTo function and another third party function that determines the length of 2 points on a sphere. The distanceTo function always returned the same distance value, regardless of where I was on the map while the other method always returned a different value. This goes to the flat map vs a sphere thing. The reason why I needed to viewport diagonal is that I need to determine the SW & NE coordinates for the viewport at x zoom levels out from the current zoom level. For example, the viewport might be at zoom level 13 and I need to find what the viewport's SW & NE coordinates are if I were out at zoom level 10. To do this I get the bearings of the SW --> NE and NE <-- SW points and then determine the distance out to the previous zoom level (for our 15 zoom levels I found that the distance from the NE corner of zoom level x to the NE corner of zoom level x-1 was half of the diagonal distance). Using the bearing and the distance out, I can caluculate wher the SW & NE coordinates are for the zoom level I need. In my tests, if I used the formula that generated the diagonal based on 2 points on a sphere, the newly generated SW & NE coordinates matched up exactly. When I say exactly, I meant that I could plot the new points on the map and then draw a colored polygon based on the viewport coordinates for the zoom level I was trying to go to and the points would be at the SW & NE corners. If I used the distanceTo function to determine the viewport diagonal, the generated points would be further out and not match. The distanceTo function, like the map scale, seem to be based on a flat map. Now to your response..... while I am a little confused over what degrees vs projected units is, I understood you to indicate that the OpenLayers map is a 2d flat map and the scale is based on that premise. My confusion now is that it seem that several OpenLayers mapping functions are based on degrees. I say that because, for example, get the area of a polygon (using the OpenLayers API) returns a value in square degrees. The distanceTo function also returns a value in square degrees. Also, because my newly generated points that were based on a distance determine by 2 points on a sphere (rather than a flat map) exactly matched the OpenLayers zoom level corners makes me think that OpenLayers must deal with degrees on the map. That all being said, my head just spins when thinking of the whole issue of geographic mathematics/algorithms. Now, I don't really know what to make of what I mentioned above. I have to make the functionality for our mapping requirements as accurate as possible and it doesn't seem that I can use some functions that deal with map from a flat perspective along side with other functions that deal with the map as a sphere. I am still trying to get my hands wrapped around this issue and my forum question on the line scale was part of this process. Out of this I am not even sure if I am asking another question or just validation. In any case, I appreciate your initial response and your time in taking my question. Thanks - Peter Len -- View this message in context: http://n2.nabble.com/OpenLayers.Control.ScaleLine-accuracy-issue-tp2117980p2120559.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From aweiser at gmx.de Wed Jan 7 04:49:51 2009 From: aweiser at gmx.de (worklikeadevil) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] How can i group layers Message-ID: <1231321791574-2121563.post@n2.nabble.com> Hi list, I want to group some thematically similar layer under one "group layer". Is there a possibility to do this? In the api i didn't find something similar under "layer". kindly Albrecht -- View this message in context: http://n2.nabble.com/How-can-i-group-layers-tp2121563p2121563.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From openlayers at tauris.be Wed Jan 7 06:31:44 2009 From: openlayers at tauris.be (Peesjee) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Move to Openlayers Message-ID: <1231327904486-2121890.post@n2.nabble.com> Hi, Let me explain my situation. I recently created an website showing current positions of ships with googlemaps. For a couple of reasons, we want to migrate to another solution. One of the reasons is performance. With googlemaps, i parse an xml (given by a webservice) and add/update markers for every ship to show. This slows down with the number of ships to show (example, sometimes we show more than 500 ships). To be honest, i'm not sure this is a good way to work... We are in contact with a company that offers a solution for us. They use Openlayers. We have seen a demo and its very fast. I dont think they add "markers" for every ship. Cause, when i zoom, the object also zooms, and then refresh to the correct size it was before. How do they do that? Its extremely fast, less than a second to show a 1000 of objects on a map. i'm given the task to investigate the possibilities of Openlayers, and decide whether we can implement everything ourselfs (with openlayers), or just buy the solution of that company. i'm afraid that, with my "solution", adding so many markers, the website would'nt be that fast. What is the best way to put 500 - 1000 "markers" on a map? (and refresh, when refreshing in googlemaps, i had to update the marker-objects to prevent flickering) Sometimes a have to draw lines between them (tracking). (i know of the image caching problem in IE) I see i can add Markers, GML, geoRSS. So, which one do i use? i could create a webservice that gives me a GML, so i only have to load it, but is this fast? or do i use my googlemaps way, adding markers and updating those markers (slow)? Greetz Peesjee -- View this message in context: http://n2.nabble.com/Move-to-Openlayers-tp2121890p2121890.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From George at muammar.net Wed Jan 7 06:34:46 2009 From: George at muammar.net (George Mu'ammar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Move to Openlayers In-Reply-To: <1231327904486-2121890.post@n2.nabble.com> References: <1231327904486-2121890.post@n2.nabble.com> Message-ID: <20090107123446.gctfy4ty8gwsco0c@webmail.muammar.net> It's a probably a WMS based solution.... -- George Quoting Peesjee : > > Hi, > > Let me explain my situation. I recently created an website showing current > positions of ships with googlemaps. For a couple of reasons, we want to > migrate to another solution. One of the reasons is performance. With > googlemaps, i parse an xml (given by a webservice) and add/update markers > for every ship to show. This slows down with the number of ships to show > (example, sometimes we show more than 500 ships). To be honest, i'm not sure > this is a good way to work... > > We are in contact with a company that offers a solution for us. They use > Openlayers. We have seen a demo and its very fast. I dont think they add > "markers" for every ship. Cause, when i zoom, the object also zooms, and > then refresh to the correct size it was before. How do they do that? Its > extremely fast, less than a second to show a 1000 of objects on a map. > > i'm given the task to investigate the possibilities of Openlayers, and > decide whether we can implement everything ourselfs (with openlayers), or > just buy the solution of that company. i'm afraid that, with my "solution", > adding so many markers, the website would'nt be that fast. > > What is the best way to put 500 - 1000 "markers" on a map? (and refresh, > when refreshing in googlemaps, i had to update the marker-objects to prevent > flickering) Sometimes a have to draw lines between them (tracking). (i know > of the image caching problem in IE) > > I see i can add Markers, GML, geoRSS. So, which one do i use? i could create > a webservice that gives me a GML, so i only have to load it, but is this > fast? or do i use my googlemaps way, adding markers and updating those > markers (slow)? > > Greetz > Peesjee > > > -- > View this message in context: > http://n2.nabble.com/Move-to-Openlayers-tp2121890p2121890.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 sindile.bidla at gmail.com Wed Jan 7 07:26:23 2009 From: sindile.bidla at gmail.com (Intengu Technologies) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Which Content Management System to use Message-ID: Hello List Members Could someone advice on the recommended CMS that combines well with OpenLayers. The idea is to built a property listing website CMS - will provide the interface / look and fill of the website OpenLayers - will provide mapping Examples of websites would also be greately appreciated. Thanking you in advance for your valuable contribution. -- Sindile Bidla -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090107/54651383/attachment.html From igrcic at gmail.com Wed Jan 7 07:31:42 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Which Content Management System to use In-Reply-To: References: Message-ID: Hi, i havent tried to use with OL, but I think drupal has some support for it... http://szeged2008.drupalcon.org/program/sessions/roadmap-mapping-gis-drupal-2008-and-beyond Greetings On Wed, Jan 7, 2009 at 1:26 PM, Intengu Technologies wrote: > Hello List Members > > Could someone advice on the recommended CMS that combines well with > OpenLayers. The idea is to built a property listing website CMS - will > provide the interface / look and fill of the website > OpenLayers - will provide mapping > Examples of websites would also be greately appreciated. > > Thanking you in advance for your valuable contribution. > > > -- > Sindile Bidla > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From adams at terrestris.de Wed Jan 7 08:10:03 2009 From: adams at terrestris.de (Till Adams) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Move to Openlayers In-Reply-To: <1231327904486-2121890.post@n2.nabble.com> References: <1231327904486-2121890.post@n2.nabble.com> Message-ID: <4964A9AB.9020105@terrestris.de> Hi, it is a WMS or WFS solution - that is what I probably would think as well:: There is a probalby UMN Mapserver or Geoserver (as WMS servers) solution behind, which handles the points (your ships) out of the database or a file. For this case, OL only has to handle one image, regardless whether you have 1, 3 or 2000 ships - this is a matter of the database or file feeding the WMS server behind, not of the client to render every single point. To explain the rough archtitecture behind - there is a WMS server like UMN or Geoserver (see www.osgeo.org for more info on them), they access your ship data (don't know where they come out, file or database?), you give them a marker and they create an image on the fly out of the ships - a WMS map request looks like that: http://www.webmapcenter.de/cgi-bin/mapserv?map=/var/data/www.webmapcenter.de%2Fnabu%2Fportale.map&TRANSPARENT=true&LAYERS=portale&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=761809.6422981643,6579508.301301379,831099.8084290314,6616771.352585221&WIDTH=1813&HEIGHT=975 As you can see, there is are params like BoundingBox, layer, coordinate system (srid) and so on - they let you control the "place" (don't find a better word) you see on the map. The configuration of our WMS let you control the rendering of the images, e.g. different symbols and/or sizes based on any attribute(s). The WMS server parses the request, accesses the data (your ships), creates a png (or gif, jpeg, ...) and sends it back to the requesting client. More: see http://en.wikipedia.org/wiki/Web_Map_Service The request as above is directly taken from OL, so you only have to care about the WMS, not the rest, this will be done by OL for you. In the OL main file you bring the things together, the base layer from google and the WMS from your server - that's it, no worry about the amount of ships. BTW: I give you another strong reason why switching to openlayers makes sense: By changing one line of code you may switch from google basemaps to yahoo, virtual earth or any other base map service supported by OL, if any reason to do this comes up. Using the google API means using google maps ;-) Kind regards - Till > Hi, > > Let me explain my situation. I recently created an website showing current > positions of ships with googlemaps. For a couple of reasons, we want to > migrate to another solution. One of the reasons is performance. With > googlemaps, i parse an xml (given by a webservice) and add/update markers > for every ship to show. This slows down with the number of ships to show > (example, sometimes we show more than 500 ships). To be honest, i'm not sure > this is a good way to work... > > We are in contact with a company that offers a solution for us. They use > Openlayers. We have seen a demo and its very fast. I dont think they add > "markers" for every ship. Cause, when i zoom, the object also zooms, and > then refresh to the correct size it was before. How do they do that? Its > extremely fast, less than a second to show a 1000 of objects on a map. > > i'm given the task to investigate the possibilities of Openlayers, and > decide whether we can implement everything ourselfs (with openlayers), or > just buy the solution of that company. i'm afraid that, with my "solution", > adding so many markers, the website would'nt be that fast. > > What is the best way to put 500 - 1000 "markers" on a map? (and refresh, > when refreshing in googlemaps, i had to update the marker-objects to prevent > flickering) Sometimes a have to draw lines between them (tracking). (i know > of the image caching problem in IE) > > I see i can add Markers, GML, geoRSS. So, which one do i use? i could create > a webservice that gives me a GML, so i only have to load it, but is this > fast? or do i use my googlemaps way, adding markers and updating those > markers (slow)? > > Greetz > Peesjee > > > -- ---------------------------------------------------------- terrestris GmbH & Co. KG Irmintrudisstrasse 17 53111 Bonn Germany Till Adams Gesch?ftsf?hrung Tel: +49 (0)228 / 962 899-52 Fax: +49 (0)228 / 962 899-57 adams@terrestris.de http://www.terrestris.de Amtsgericht Bonn, HRA 6835 --------------------------------------------------------- Komplement?rin: terrestris Verwaltungs GmbH vertreten durch: Hinrich Paulsen, Till Adams From wvick at europa-tech.com Wed Jan 7 08:18:58 2009 From: wvick at europa-tech.com (Warren Vick) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Access management Message-ID: <776B93361B7BEE4FAD9E720FFBC746B604EB786E@34093-EVS4C2.exchange.rackspace.com> Has anyone worked on a project where they needed to protect a valuable tile set? Is there a "Google Maps API key"-like solution out there in the commercial world or open source community? Regards, Warren From openlayers at tauris.be Wed Jan 7 08:53:03 2009 From: openlayers at tauris.be (Peesjee) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Move to Openlayers In-Reply-To: <4964A9AB.9020105@terrestris.de> References: <1231327904486-2121890.post@n2.nabble.com> <4964A9AB.9020105@terrestris.de> Message-ID: <1231336383104-2122458.post@n2.nabble.com> Thx Till, your answer clears a lot of questions for me. I am definitely a *newbie* in this area. I started reading about WMS and WFS yesterday, i even installed 'GeoServer', and succesfully mapped custom shapefile into the Geoserver. But then i got stuck thinking that only OpenLayers was responsible for the objects on the Map. I read about WFS, but i thought that was for retrieving data from existing data in maps (which my ships are not). I was clearly wrong. So can i say that: with GeoServer i must be able to show my own "maps" (tiff images), include the ships positions (with WFS) from our database...return this as one WMS layer... and add this layer in with Openlayers. I have to figure the WFS part of the puzzle then... ps: seeing your answer and mine now, this post doesn't handle much of openlayer, sorry for that... Greetz Peesjee Till Adams wrote: > > Hi, > > it is a WMS or WFS solution - that is what I probably would think as > well:: There is a probalby UMN Mapserver or Geoserver (as WMS servers) > solution behind, which handles the points (your ships) out of the > database or a file. For this case, OL only has to handle one image, > regardless whether you have 1, 3 or 2000 ships - this is a matter of the > database or file feeding the WMS server behind, not of the client to > render every single point. > > To explain the rough archtitecture behind - there is a WMS server like > UMN or Geoserver (see www.osgeo.org for more info on them), they access > your ship data (don't know where they come out, file or database?), you > give them a marker and they create an image on the fly out of the ships > - a WMS map request looks like that: > > http://www.webmapcenter.de/cgi-bin/mapserv?map=/var/data/www.webmapcenter.de%2Fnabu%2Fportale.map&TRANSPARENT=true&LAYERS=portale&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=761809.6422981643,6579508.301301379,831099.8084290314,6616771.352585221&WIDTH=1813&HEIGHT=975 > > As you can see, there is are params like BoundingBox, layer, coordinate > system (srid) and so on - they let you control the "place" (don't find a > better word) you see on the map. The configuration of our WMS let you > control the rendering of the images, e.g. different symbols and/or sizes > based on any attribute(s). > The WMS server parses the request, accesses the data (your ships), > creates a png (or gif, jpeg, ...) and sends it back to the requesting > client. > More: see http://en.wikipedia.org/wiki/Web_Map_Service > > The request as above is directly taken from OL, so you only have to care > about the WMS, not the rest, this will be done by OL for you. > > In the OL main file you bring the things together, the base layer from > google and the WMS from your server - that's it, no worry about the > amount of ships. > > BTW: I give you another strong reason why switching to openlayers makes > sense: By changing one line of code you may switch from google basemaps > to yahoo, virtual earth or any other base map service supported by OL, > if any reason to do this comes up. Using the google API means using > google maps ;-) > > Kind regards - Till > >> Hi, >> >> Let me explain my situation. I recently created an website showing >> current >> positions of ships with googlemaps. For a couple of reasons, we want to >> migrate to another solution. One of the reasons is performance. With >> googlemaps, i parse an xml (given by a webservice) and add/update markers >> for every ship to show. This slows down with the number of ships to show >> (example, sometimes we show more than 500 ships). To be honest, i'm not >> sure >> this is a good way to work... >> >> We are in contact with a company that offers a solution for us. They use >> Openlayers. We have seen a demo and its very fast. I dont think they add >> "markers" for every ship. Cause, when i zoom, the object also zooms, and >> then refresh to the correct size it was before. How do they do that? Its >> extremely fast, less than a second to show a 1000 of objects on a map. >> >> i'm given the task to investigate the possibilities of Openlayers, and >> decide whether we can implement everything ourselfs (with openlayers), or >> just buy the solution of that company. i'm afraid that, with my >> "solution", >> adding so many markers, the website would'nt be that fast. >> >> What is the best way to put 500 - 1000 "markers" on a map? (and refresh, >> when refreshing in googlemaps, i had to update the marker-objects to >> prevent >> flickering) Sometimes a have to draw lines between them (tracking). (i >> know >> of the image caching problem in IE) >> >> I see i can add Markers, GML, geoRSS. So, which one do i use? i could >> create >> a webservice that gives me a GML, so i only have to load it, but is this >> fast? or do i use my googlemaps way, adding markers and updating those >> markers (slow)? >> >> Greetz >> Peesjee >> >> >> > > > -- > ---------------------------------------------------------- > terrestris GmbH & Co. KG > Irmintrudisstrasse 17 > 53111 Bonn > Germany > > Till Adams > Gesch?ftsf?hrung > > Tel: +49 (0)228 / 962 899-52 > Fax: +49 (0)228 / 962 899-57 > adams@terrestris.de http://www.terrestris.de > Amtsgericht Bonn, HRA 6835 > --------------------------------------------------------- > > Komplement?rin: > > terrestris Verwaltungs GmbH > > vertreten durch: > Hinrich Paulsen, Till Adams > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Move-to-Openlayers-tp2121890p2122458.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Wed Jan 7 09:03:53 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Move to Openlayers In-Reply-To: <1231336383104-2122458.post@n2.nabble.com> References: <1231327904486-2121890.post@n2.nabble.com> <4964A9AB.9020105@terrestris.de> <1231336383104-2122458.post@n2.nabble.com> Message-ID: <4964B649.4070705@mapgears.com> Hi Peesjee, You don't need WFS in your case. A WMS request on your ship position data would return a single image with your ships on it. Like Till said, you only need to care about WMS. You'll handle the rest with OpenLayers. Alexandre Peesjee wrote: > Thx Till, > > your answer clears a lot of questions for me. I am definitely a *newbie* in > this area. I started reading about WMS and WFS yesterday, i even installed > 'GeoServer', and succesfully mapped custom shapefile into the Geoserver. But > then i got stuck thinking that only OpenLayers was responsible for the > objects on the Map. I read about WFS, but i thought that was for retrieving > data from existing data in maps (which my ships are not). I was clearly > wrong. > > So can i say that: with GeoServer i must be able to show my own "maps" (tiff > images), include the ships positions (with WFS) from our database...return > this as one WMS layer... and add this layer in with Openlayers. > > I have to figure the WFS part of the puzzle then... > > ps: seeing your answer and mine now, this post doesn't handle much of > openlayer, sorry for that... > > Greetz > Peesjee > > > > > > Till Adams wrote: > >> Hi, >> >> it is a WMS or WFS solution - that is what I probably would think as >> well:: There is a probalby UMN Mapserver or Geoserver (as WMS servers) >> solution behind, which handles the points (your ships) out of the >> database or a file. For this case, OL only has to handle one image, >> regardless whether you have 1, 3 or 2000 ships - this is a matter of the >> database or file feeding the WMS server behind, not of the client to >> render every single point. >> >> To explain the rough archtitecture behind - there is a WMS server like >> UMN or Geoserver (see www.osgeo.org for more info on them), they access >> your ship data (don't know where they come out, file or database?), you >> give them a marker and they create an image on the fly out of the ships >> - a WMS map request looks like that: >> >> http://www.webmapcenter.de/cgi-bin/mapserv?map=/var/data/www.webmapcenter.de%2Fnabu%2Fportale.map&TRANSPARENT=true&LAYERS=portale&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=761809.6422981643,6579508.301301379,831099.8084290314,6616771.352585221&WIDTH=1813&HEIGHT=975 >> >> As you can see, there is are params like BoundingBox, layer, coordinate >> system (srid) and so on - they let you control the "place" (don't find a >> better word) you see on the map. The configuration of our WMS let you >> control the rendering of the images, e.g. different symbols and/or sizes >> based on any attribute(s). >> The WMS server parses the request, accesses the data (your ships), >> creates a png (or gif, jpeg, ...) and sends it back to the requesting >> client. >> More: see http://en.wikipedia.org/wiki/Web_Map_Service >> >> The request as above is directly taken from OL, so you only have to care >> about the WMS, not the rest, this will be done by OL for you. >> >> In the OL main file you bring the things together, the base layer from >> google and the WMS from your server - that's it, no worry about the >> amount of ships. >> >> BTW: I give you another strong reason why switching to openlayers makes >> sense: By changing one line of code you may switch from google basemaps >> to yahoo, virtual earth or any other base map service supported by OL, >> if any reason to do this comes up. Using the google API means using >> google maps ;-) >> >> Kind regards - Till >> >> >>> Hi, >>> >>> Let me explain my situation. I recently created an website showing >>> current >>> positions of ships with googlemaps. For a couple of reasons, we want to >>> migrate to another solution. One of the reasons is performance. With >>> googlemaps, i parse an xml (given by a webservice) and add/update markers >>> for every ship to show. This slows down with the number of ships to show >>> (example, sometimes we show more than 500 ships). To be honest, i'm not >>> sure >>> this is a good way to work... >>> >>> We are in contact with a company that offers a solution for us. They use >>> Openlayers. We have seen a demo and its very fast. I dont think they add >>> "markers" for every ship. Cause, when i zoom, the object also zooms, and >>> then refresh to the correct size it was before. How do they do that? Its >>> extremely fast, less than a second to show a 1000 of objects on a map. >>> >>> i'm given the task to investigate the possibilities of Openlayers, and >>> decide whether we can implement everything ourselfs (with openlayers), or >>> just buy the solution of that company. i'm afraid that, with my >>> "solution", >>> adding so many markers, the website would'nt be that fast. >>> >>> What is the best way to put 500 - 1000 "markers" on a map? (and refresh, >>> when refreshing in googlemaps, i had to update the marker-objects to >>> prevent >>> flickering) Sometimes a have to draw lines between them (tracking). (i >>> know >>> of the image caching problem in IE) >>> >>> I see i can add Markers, GML, geoRSS. So, which one do i use? i could >>> create >>> a webservice that gives me a GML, so i only have to load it, but is this >>> fast? or do i use my googlemaps way, adding markers and updating those >>> markers (slow)? >>> >>> Greetz >>> Peesjee >>> >>> >>> >>> >> -- >> ---------------------------------------------------------- >> terrestris GmbH & Co. KG >> Irmintrudisstrasse 17 >> 53111 Bonn >> Germany >> >> Till Adams >> Gesch?ftsf?hrung >> >> Tel: +49 (0)228 / 962 899-52 >> Fax: +49 (0)228 / 962 899-57 >> adams@terrestris.de http://www.terrestris.de >> Amtsgericht Bonn, HRA 6835 >> --------------------------------------------------------- >> >> Komplement?rin: >> >> terrestris Verwaltungs GmbH >> >> vertreten durch: >> Hinrich Paulsen, Till Adams >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > -- Alexandre Dub? Mapgears www.mapgears.com From CHRISTOPHER.M.HEIDT at saic.com Wed Jan 7 09:25:33 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] OpenLayers.Control.ScaleLine accuracy issue In-Reply-To: <1231295832836-2120559.post@n2.nabble.com> References: <1231255820712-2117980.post@n2.nabble.com><20090106154243.GJ10452@metacarta.com> <1231295832836-2120559.post@n2.nabble.com> Message-ID: <1053B20F24D85F41B57F168351684E2202D16FE7@0015-its-exmb04.us.saic.com> Have you tried using bounds functionms to get your corners? Maybe: var coordArray = map.getBounds().toArray(); Var ws = coordArray[0]+' '+coordArray[1]; Var en = coordArray[2]+' '+coordArray[3]; -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of plen Sent: Tuesday, January 06, 2009 9:37 PM To: users@openlayers.org Subject: Re: [OpenLayers-Users] OpenLayers.Control.ScaleLine accuracy issue Christopher, Thanks for the reply. I see that you work for MetaCarta so you are not as confused about planar vs geodesic vs degrees vs projected units etc etc as I am. A little background as to how we are using OpenLayers and what led me to this question.... We are using a government mapping interface API (which is built upon OpenLayers) for our 2D mapping solution. All base maps are populated by them (Google Maps is not one of them). Calls to do something with the map are either through the government API or I can make some calls directly to the OpenLayers API. I needed to find the map viewport's diagonal (SW to NE corner). To do this, I was comparing two different methods: The OpenLayers distanceTo function and another third party function that determines the length of 2 points on a sphere. The distanceTo function always returned the same distance value, regardless of where I was on the map while the other method always returned a different value. This goes to the flat map vs a sphere thing. The reason why I needed to viewport diagonal is that I need to determine the SW & NE coordinates for the viewport at x zoom levels out from the current zoom level. For example, the viewport might be at zoom level 13 and I need to find what the viewport's SW & NE coordinates are if I were out at zoom level 10. To do this I get the bearings of the SW --> NE and NE <-- SW points and then determine the distance out to the previous zoom level (for our 15 zoom levels I found that the distance from the NE corner of zoom level x to the NE corner of zoom level x-1 was half of the diagonal distance). Using the bearing and the distance out, I can caluculate wher the SW & NE coordinates are for the zoom level I need. In my tests, if I used the formula that generated the diagonal based on 2 points on a sphere, the newly generated SW & NE coordinates matched up exactly. When I say exactly, I meant that I could plot the new points on the map and then draw a colored polygon based on the viewport coordinates for the zoom level I was trying to go to and the points would be at the SW & NE corners. If I used the distanceTo function to determine the viewport diagonal, the generated points would be further out and not match. The distanceTo function, like the map scale, seem to be based on a flat map. Now to your response..... while I am a little confused over what degrees vs projected units is, I understood you to indicate that the OpenLayers map is a 2d flat map and the scale is based on that premise. My confusion now is that it seem that several OpenLayers mapping functions are based on degrees. I say that because, for example, get the area of a polygon (using the OpenLayers API) returns a value in square degrees. The distanceTo function also returns a value in square degrees. Also, because my newly generated points that were based on a distance determine by 2 points on a sphere (rather than a flat map) exactly matched the OpenLayers zoom level corners makes me think that OpenLayers must deal with degrees on the map. That all being said, my head just spins when thinking of the whole issue of geographic mathematics/algorithms. Now, I don't really know what to make of what I mentioned above. I have to make the functionality for our mapping requirements as accurate as possible and it doesn't seem that I can use some functions that deal with map from a flat perspective along side with other functions that deal with the map as a sphere. I am still trying to get my hands wrapped around this issue and my forum question on the line scale was part of this process. Out of this I am not even sure if I am asking another question or just validation. In any case, I appreciate your initial response and your time in taking my question. Thanks - Peter Len -- View this message in context: http://n2.nabble.com/OpenLayers.Control.ScaleLine-accuracy-issue-tp21179 80p2120559.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 yves.moisan at boreal-is.com Wed Jan 7 09:45:51 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE mem leak with proxy Message-ID: <1231339551.6511.11.camel@dell-desktop.example.com> Hi All, I'm experiencing a problem viewing a small OL 2.7 page in IE. I'm using the OpenLayers proxy because I'm requesting features from FeatureServer on another port. Everything works fine in FF3 but IE7 stalls on the proxy and it starts eating up memory in what looks like an infinite loop. IE becomes a zombie and I can't get to it in any fashion so it's impossible to debug. I have to kill the process. Anyone had similar behaviour ? Cheers, Yves From crschmidt at metacarta.com Wed Jan 7 09:47:32 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE mem leak with proxy In-Reply-To: <1231339551.6511.11.camel@dell-desktop.example.com> References: <1231339551.6511.11.camel@dell-desktop.example.com> Message-ID: <20090107144732.GM10452@metacarta.com> On Wed, Jan 07, 2009 at 09:45:51AM -0500, Yves Moisan wrote: > Hi All, > > I'm experiencing a problem viewing a small OL 2.7 page in IE. I'm using > the OpenLayers proxy because I'm requesting features from FeatureServer > on another port. Everything works fine in FF3 but IE7 stalls on the > proxy and it starts eating up memory in what looks like an infinite > loop. IE becomes a zombie and I can't get to it in any fashion so it's > impossible to debug. I have to kill the process. > > Anyone had similar behaviour ? How much data are you loading? (How many features?) Is it more than 100? Are they complex features? The 'proxy' part of it is probably not the problem, but if you're trying to do the same thing in FF3 and IE7, I wouldn't be surprised to hear that you've simply overpowered the browser... Regards, -- Christopher Schmidt MetaCarta From ivan.grcic at geofoto.hr Wed Jan 7 10:01:33 2009 From: ivan.grcic at geofoto.hr (Ivan Grcic) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Geoserver sld editor Message-ID: Hi list, has anyone allready tried it? http://blog.geoserver.org/2008/12/23/geoext-based-sld-editor/ Greetings, Ivan From asufsc at gmail.com Wed Jan 7 10:13:55 2009 From: asufsc at gmail.com (Salvaro) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map Labeling In-Reply-To: References: <4963E8F4.1070609@gisnet.com> Message-ID: <1231341235263-2122944.post@n2.nabble.com> Is possible set the popup's background as transparent? Thanks. Arnd Wippermann wrote: > > Hi Bill, > > I do it with popups. You can see it here: > http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/labels.html > > Arnd Wippermann > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Bill Thoen > Gesendet: Mittwoch, 7. Januar 2009 00:28 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Map Labeling > > I have a vector layer of points with associated attributes and I want to > use > one of those attributes as a label for the points. I thought this would be > simple, but it's proving to be elusive. Can someone here explain how to do > this in OpenLayers 2.7? > > Thanks, > - Bill Thoen > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Map-Labeling-tp2119991p2122944.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From yves.moisan at boreal-is.com Wed Jan 7 10:16:35 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE mem leak with proxy In-Reply-To: <20090107144732.GM10452@metacarta.com> References: <1231339551.6511.11.camel@dell-desktop.example.com> <20090107144732.GM10452@metacarta.com> Message-ID: <1231341395.6511.17.camel@dell-desktop.example.com> > How much data are you loading? (How many features?) Is it more than 100? > Are they complex features? 1000 features, but luckily they are just points. > The 'proxy' part of it is probably not the problem, but if you're trying > to do the same thing in FF3 and IE7, I wouldn't be surprised to hear > that you've simply overpowered the browser... You're right again. Setting maxFeatures to a whopping 20 did the trick.;-) I wish there was a FFTab in IE for our poor customers stuck with IE. Thanx again, Yves From psingler at gmx.de Wed Jan 7 10:19:49 2009 From: psingler at gmx.de (KartoPete) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] How to implement draggable Markers? Message-ID: <1231341589485-2122977.post@n2.nabble.com> Hi guys, I#m working with OpenLayers2.6 and try make my markers draggable. I tried a few edited classes I found here but it wouldn't work out, even the posted example(long time ago) wouldn't work on my machine. Does anyone know if draggable markers is already working with the new or future versions? Or has someone a idea on how to implement this? thx Pete -- View this message in context: http://n2.nabble.com/How-to-implement-draggable-Markers--tp2122977p2122977.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From aboudreault at mapgears.com Wed Jan 7 10:28:41 2009 From: aboudreault at mapgears.com (Alan Boudreault) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] How to implement draggable Markers? In-Reply-To: <1231341589485-2122977.post@n2.nabble.com> References: <1231341589485-2122977.post@n2.nabble.com> Message-ID: <4964CA29.7060206@mapgears.com> KartoPete wrote: > Hi guys, > I#m working with OpenLayers2.6 and try make my markers draggable. I tried a > few edited classes I found here but it wouldn't work out, even the posted > example(long time ago) wouldn't work on my machine. Does anyone know if > draggable markers is already working with the new or future versions? Or has > someone a idea on how to implement this? > thx Pete > Something that you can do is to create a new class "DraggableMarker" that inherit of OpenLayers.Marker. This class will mainly handle 2 events: mouseup and mousedown: this.events.register('mousedown', this, this._markerDown); this.events.registerPriority('mouseup', this, this._markerUp); After that, the mousedown function will activate the event "mousemove" and the mouseup will disable it. And the mousemove handle will calculate the new position and move the marker on the fly. Hope this help. Alan -- Alan Boudreault Mapgears http://www.mapgears.com From stephan.holl at intevation.de Wed Jan 7 10:45:26 2009 From: stephan.holl at intevation.de (Stephan Holl) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] singleTile and Google-resolution < 2 Message-ID: <20090107164526.2bad3c68@thoe.hq.intevation.de> Dear OpenLayers-users, I have encountered a problem with WMS w/ singleTile: true in combination with google-layers. Zooming to max extent (world) the google-map appears correct, my untiled WMS is localed on the right border of my map. Everything zooming > 2 the layer is displayed correct. Is this a known issue? Thanks for any pointer Best Stephan -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 206 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090107/33cfed21/signature.bin From yves.moisan at boreal-is.com Wed Jan 7 10:54:40 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies Message-ID: <1231343680.6511.25.camel@dell-desktop.example.com> Hi All, You've seen my previous post about IE issues with a large number of features. Well, our customers all use IE and there's unfortunately no way around that. Not being able to use OL with a decent number of featues in IE is an almost showstopper for us, so I'm asking the community : - are there IE users out there ? - what do you do to cope with the limitations of IE ? I heard about people shoving a WMS layer at small scales to avoid having a large number of features then coming back to "feature mode" at larger scales. Is that all there is to do ? I understand this has nothing to do with OL but we're stuck with IE for a good while here ... TIA, Yves From psingler at gmx.de Wed Jan 7 11:05:27 2009 From: psingler at gmx.de (KartoPete) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] How to implement draggable Markers? In-Reply-To: <4964CA29.7060206@mapgears.com> References: <1231341589485-2122977.post@n2.nabble.com> <4964CA29.7060206@mapgears.com> Message-ID: <1231344327994-2123235.post@n2.nabble.com> Alan Boudreault wrote: > > KartoPete wrote: >> Hi guys, >> I#m working with OpenLayers2.6 and try make my markers draggable. I tried >> a >> few edited classes I found here but it wouldn't work out, even the posted >> example(long time ago) wouldn't work on my machine. Does anyone know if >> draggable markers is already working with the new or future versions? Or >> has >> someone a idea on how to implement this? >> thx Pete >> > Something that you can do is to create a new class "DraggableMarker" > that inherit of OpenLayers.Marker. This class will mainly handle 2 > events: mouseup and mousedown: > > this.events.register('mousedown', this, this._markerDown); > this.events.registerPriority('mouseup', this, this._markerUp); > > Thanks, I'll try > But why registerPriority()? > > After that, the mousedown function will activate the event "mousemove" > and the mouseup will disable it. And the mousemove handle will calculate > the new position and move the marker on the fly. > > Hope this help. > Alan > > > -- > Alan Boudreault > Mapgears > http://www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/How-to-implement-draggable-Markers--tp2122977p2123235.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Jan 7 11:06:04 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231343680.6511.25.camel@dell-desktop.example.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> Message-ID: <20090107160604.GN10452@metacarta.com> On Wed, Jan 07, 2009 at 10:54:40AM -0500, Yves Moisan wrote: > Hi All, > > You've seen my previous post about IE issues with a large number of > features. Well, our customers all use IE and there's unfortunately no > way around that. Not being able to use OL with a decent number of > featues in IE is an almost showstopper for us, so I'm asking the > community : > > - are there IE users out there ? > > - what do you do to cope with the limitations of IE ? > > I heard about people shoving a WMS layer at small scales to avoid having > a large number of features then coming back to "feature mode" at larger > scales. Is that all there is to do ? You need to limit DOM elements. WMS with a query-on-click works for that. of course, showing 1000 features won't just be a problem for IE -- it will also be a problem for FF2, mobile browsers, eeepcs, etc. Anotehr thing I do (on the OpenStreetMap homepage) is load the data, then ask the user if they want to show it, if it's more than 100 features. That way, they hae the option of making the determination of whether they think they can load it -- or the optino to zoom in further if that's what they want. Regards, -- Christopher Schmidt MetaCarta From eider at fh-bingen.de Wed Jan 7 11:18:41 2009 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Selectfeature issues Message-ID: <4964D5E1.5060403@fh-bingen.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: eider.vcf Type: text/x-vcard Size: 330 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090107/ffbe87fe/eider.vcf From aboudreault at mapgears.com Wed Jan 7 11:54:54 2009 From: aboudreault at mapgears.com (Alan Boudreault) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] How to implement draggable Markers? In-Reply-To: <1231344327994-2123235.post@n2.nabble.com> References: <1231341589485-2122977.post@n2.nabble.com> <4964CA29.7060206@mapgears.com> <1231344327994-2123235.post@n2.nabble.com> Message-ID: <4964DE5E.7010709@mapgears.com> KartoPete wrote: > > Alan Boudreault wrote: > >> KartoPete wrote: >> >>> Hi guys, >>> I#m working with OpenLayers2.6 and try make my markers draggable. I tried >>> a >>> few edited classes I found here but it wouldn't work out, even the posted >>> example(long time ago) wouldn't work on my machine. Does anyone know if >>> draggable markers is already working with the new or future versions? Or >>> has >>> someone a idea on how to implement this? >>> thx Pete >>> >>> >> Something that you can do is to create a new class "DraggableMarker" >> that inherit of OpenLayers.Marker. This class will mainly handle 2 >> events: mouseup and mousedown: >> >> this.events.register('mousedown', this, this._markerDown); >> this.events.registerPriority('mouseup', this, this._markerUp); >> >> Thanks, I'll try >> But why registerPriority()? >> >> After that, the mousedown function will activate the event "mousemove" >> and the mouseup will disable it. And the mousemove handle will calculate >> the new position and move the marker on the fly. >> >> Hope this help. >> Alan >> >> >> -- >> Alan Boudreault >> Mapgears >> http://www.mapgears.com >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > You can try without the "priority" ..... i don't remember why we used this. Maybe a problem with an old version. -- Alan Boudreault Mapgears http://www.mapgears.com From yves.moisan at boreal-is.com Wed Jan 7 12:01:47 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <20090107160604.GN10452@metacarta.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> Message-ID: <1231347707.6511.46.camel@dell-desktop.example.com> > You need to limit DOM elements. WMS with a query-on-click works for > that. Right. The whole purpose of having features is defeated though and that's a drag. I'm really not fond of query-on-click to a WMS server. I played with the clustering strategy in a bid to limit the number of features to draw, but the calculations in the client are horrendously slow. Typically, I get a popup asking me if I want to keep going with the script. I hit yes and then I get my clusters. For some reason though the rendering of clusters is faster in IE7 than FF3 ?!? I guess an option would be to calculate the clusters on the server, e.g. set up some trigger in PG and calculate cluster tables for each discrete zoom level. I would then point FeatureServer to a cluster table as a function of zoom level. That would allow me to keep a relatively small number of features for the DOM to deal with. > of course, showing 1000 features won't just be a problem for IE -- > it will also be a problem for FF2, mobile browsers, eeepcs, etc. Agreed. > > Anotehr thing I do (on the OpenStreetMap homepage) is load the data, > then ask the user if they want to show it, if it's more than 100 > features. That way, they hae the option of making the determination of > whether they think they can load it -- or the optino to zoom in further > if that's what they want. Thanx for the suggestion. Yves From bwoodall at bwoodall.org Wed Jan 7 12:25:28 2009 From: bwoodall at bwoodall.org (bwoodall) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231347707.6511.46.camel@dell-desktop.example.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> Message-ID: <1231349128.9131.280.camel@wardrobe.dhs.org> On Wed, 2009-01-07 at 12:01 -0500, Yves Moisan wrote: > > You need to limit DOM elements. WMS with a query-on-click works for > > that. > > Right. The whole purpose of having features is defeated though and > that's a drag. I'm really not fond of query-on-click to a WMS server. Might the Hover to a WMS server work then? > I played with the clustering strategy in a bid to limit the number of > features to draw, but the calculations in the client are horrendously > slow. Typically, I get a popup asking me if I want to keep going with > the script. I hit yes and then I get my clusters. For some reason > though the rendering of clusters is faster in IE7 than FF3 ?!? > > I guess an option would be to calculate the clusters on the server, e.g. > set up some trigger in PG and calculate cluster tables for each discrete > zoom level. I would then point FeatureServer to a cluster table as a > function of zoom level. That would allow me to keep a relatively small > number of features for the DOM to deal with. > > > of course, showing 1000 features won't just be a problem for IE -- > > it will also be a problem for FF2, mobile browsers, eeepcs, etc. > > Agreed. > > > > > Anotehr thing I do (on the OpenStreetMap homepage) is load the data, > > then ask the user if they want to show it, if it's more than 100 > > features. That way, they hae the option of making the determination of > > whether they think they can load it -- or the optino to zoom in further > > if that's what they want. > > Thanx for the suggestion. > > Yves > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From yves.moisan at boreal-is.com Wed Jan 7 13:27:36 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231349128.9131.280.camel@wardrobe.dhs.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> Message-ID: <1231352856.6511.61.camel@dell-desktop.example.com> > Might the Hover to a WMS server work then? Thanx for the suggestion. It's still a trip to the server and I find it foolish to be required to turn features into a WMS. > > I guess an option would be to calculate the clusters on the server, e.g. > > set up some trigger in PG and calculate cluster tables for each discrete > > zoom level. I would then point FeatureServer to a cluster table as a > > function of zoom level. That would allow me to keep a relatively small > > number of features for the DOM to deal with. Answering to self : maybe point to a view that does on-the-fly clustering ? Yves From ahocevar at opengeo.org Wed Jan 7 13:56:00 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231352856.6511.61.camel@dell-desktop.example.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> Message-ID: <4964FAC0.2010803@opengeo.org> Yves Moisan wrote:] >> Might the Hover to a WMS server work then? >> > > Thanx for the suggestion. It's still a trip to the server and I find it > foolish to be required to turn features into a WMS. > Why that? Features can be handled much more efficient by the server than by the client. You may want to have a look at [1]. This example uses the WFSGetFeature control which OpenGeo is about to contribute to OpenLayers. You can see that the features are loaded on hover, and selected on click. The extra server trip is not too expensive, since it will only be triggered when the mouse pointer stops for a configurable amount of milliseconds. Regards, Andreas. [1] http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From dave.potts at pinan.co.uk Wed Jan 7 14:56:27 2009 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] setting the colour of a GML layer In-Reply-To: <1231349128.9131.280.camel@wardrobe.dhs.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> Message-ID: <496508EB.7070400@pinan.co.uk> Is there any way of setting the colour that is used to draw a gml feature? Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: dave_potts.vcf Type: text/x-vcard Size: 85 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090107/64506189/dave_potts.vcf From jesse.cleary at duke.edu Wed Jan 7 14:56:42 2009 From: jesse.cleary at duke.edu (Jesse Cleary) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] WFS-V with OL 2.7 In-Reply-To: <21147449.post@talk.nabble.com> References: <21147449.post@talk.nabble.com> Message-ID: <189D2F19-7DF4-4B91-BC02-8EF21F412C25@duke.edu> Thanks Sebastian I'll work through these examples and get back in touch if needed... Jesse On Dec 29, 2008, at 12:40 PM, Sebastian Benthall wrote: > > Hi Jesse, > > > Jesse Cleary wrote: >> >> I'm interested in examples of WFS-V clients built with OL 2.7 - any >> recommendations of sample code or a working example? I have seen the >> examples in tschaub's sandbox which are really nice. Any other >> examples that I should review? We are working with GeoServer and a >> PG/ >> PG backend, to enable TTW spatial and attribute editing. Mainly >> doing >> some preliminary research about options and direction at this point. >> > > You might be interested in these examples, built on the same > stack--version-enabled GeoServer and PostGIS: > http://publicus.opengeo.org/landgate_demo/vespucci/index.html > http://beta.landgate.wa.gov.au/projects/wfsv/ > > The first is a demo of versioned data editing based on some > requirements > from urban planning advocates in New York. The second is almost > entirely > the same code, but reconfigured by Landgate as a proof of concept of > crowdsourced mapping in Australia. > > The open source code and project trac of the those > demos--"Vespucci"--can be > found here: > http://svn.opengeo.org/vespucci/branches/landgate/ > http://projects.opengeo.org/vespucci/ > > Those branches of Vespucci use an OpenLayers sandbox that has some > decent > WFSV support (i.e. a WFSV Format and Protocol comparable to the latest > WFS-related classes): > http://svn.openlayers.org/sandbox/topp/wfsv/ > > The wfsv-demo.html example in that sandbox should demonstrate some > of the > functionality, although it could take some tweaking to get it to work. > > Hope that's helpful. Feel free to contact me directly if you have any > questions about any of it, > > Sebastian Benthall > OpenGeo - http://opengeo.org > -- > View this message in context: http://www.nabble.com/WFS-V-with-OL-2.7-tp21129157p21147449.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users --- Jesse A. Cleary Associate in Research Marine Geospatial Ecology Lab Nicholas School of the Environment Duke University +1 (919) 613-8021 x6 http://mgel.nicholas.duke.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090107/dc3bee2f/attachment.html From crschmidt at metacarta.com Wed Jan 7 15:24:45 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] setting the colour of a GML layer In-Reply-To: <496508EB.7070400@pinan.co.uk> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <496508EB.7070400@pinan.co.uk> Message-ID: <20090107202444.GO10452@metacarta.com> On Wed, Jan 07, 2009 at 07:56:27PM +0000, Dave Potts wrote: > Is there any way of setting the colour that is used to draw a gml > feature? Yes. http://docs.openlayers.org/library/feature_styling > Dave > begin:vcard > fn:David Potts > n:Potts;David > x-mozilla-html:FALSE > version:2.1 > end:vcard > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From dave.potts at pinan.co.uk Wed Jan 7 15:43:42 2009 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] setting the colour of a GML layer In-Reply-To: <20090107202444.GO10452@metacarta.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <496508EB.7070400@pinan.co.uk> <20090107202444.GO10452@metacarta.com> Message-ID: <496513FE.1020000@pinan.co.uk> Christopher Schmidt wrote: Hi Chris Thank you for such a prompt answer, I had expect the colour information to be kept in the gml file. But I have a play with this interface. Dave. > On Wed, Jan 07, 2009 at 07:56:27PM +0000, Dave Potts wrote: > >> Is there any way of setting the colour that is used to draw a gml >> feature? >> > > Yes. > > http://docs.openlayers.org/library/feature_styling > > >> Dave >> > > >> begin:vcard >> fn:David Potts >> n:Potts;David >> x-mozilla-html:FALSE >> version:2.1 >> end:vcard >> >> > > >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: dave_potts.vcf Type: text/x-vcard Size: 85 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090107/c7368dcb/dave_potts.vcf From CHRISTOPHER.M.HEIDT at saic.com Wed Jan 7 15:49:48 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Google layer,vector graphic, and the dateline In-Reply-To: <20090107202444.GO10452@metacarta.com> References: <1231343680.6511.25.camel@dell-desktop.example.com><20090107160604.GN10452@metacarta.com><1231347707.6511.46.camel@dell-desktop.example.com><1231349128.9131.280.camel@wardrobe.dhs.org><496508EB.7070400@pinan.co.uk> <20090107202444.GO10452@metacarta.com> Message-ID: <1053B20F24D85F41B57F168351684E2202D17665@0015-its-exmb04.us.saic.com> I use the control below to allow my users to draw a "bounding box" on a map that uses the Google layers. The problem arises when they draw a shape that crosses the dateline, as it creates a shape longitudly inverse to what they wanted. Any suggestions as to the best way to handle this? [javascript] //bbox _bboxDrawControl = new OpenLayers.Control({ draw: function () { this.box = new OpenLayers.Handler.Box( _bboxDrawControl,{ done: this.notice },{}); this.box.boxDivClassName = 'Control_DrawBox'; }, notice: function (bounds){ this.box.deactivate(); var newbounds = new OpenLayers.Bounds(); newbounds.extend(_map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom))); newbounds.extend(_map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top))); var bbox = new OpenLayers.Feature.Vector(newbounds.toGeometry()); bbox.id = 'SW_customBoundingBox'; _bboxLayer.addFeatures(bbox); _map.zoomToExtent(newbounds); } }); _map.addControl(_bboxDrawControl); [end javascript] I could snip the shape off entirely at the dateline, but id like to avoid that. I could cut it in half and create two shapes, but while producing a more accurate result it would render on different sides of the map, and if its not coherent its not very user friendly. A third option would be to force the draw control to be unable to cross the date line, but I don't have any idea how to accomplish that. Ultimately id like one shape(or look like one) that truly represents the shape drawn. From adube at mapgears.com Wed Jan 7 16:02:22 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Event registration in activate function Message-ID: <4965185E.9020301@mapgears.com> Dear list, I'm writing my own Control and I need to register some events. Doing so in the initialize function isn't good because some objects are not created yet ( like the map object ). So I thought I could register them in the activate() func and unregister them in the deactivate() func. So far it was ok to do so, but now I'm facing a problem. I need to register events that, when triggered, deactivate the control, and other events that, when triggered, reactivate the control. It's a control that can contain multiple layers that come from the same source but have been normalized to render faster, so the user sees no difference when zooming. The control change the opacity of a layer when the mouse is over it and because the features generated come from different sources, I need to deactivate the control while I'm zooming ( deactivate on loadstart, activate on loadend ). This looks like this : // inside the activate function() for (var key in this.layers){ this.layers[key].events.register( "loadstart", this, this.deactivate); this.layers[key].events.register( "loadend", this, this.activate); } So basically I should unregister them in the deactivate function(), right ? The problem is : if I deactivate the control, it will unregister the loadend event so it will not be reactivated in the end. Is there an other place I should register my events to avoid that behavior ? I see in some other control registration on events in a draw() function. Could I do something similar ? -- Alexandre Dub? Mapgears www.mapgears.com From yves.moisan at boreal-is.com Wed Jan 7 16:03:06 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <4964FAC0.2010803@opengeo.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> Message-ID: <1231362186.6511.71.camel@dell-desktop.example.com> > > > Why that? Features can be handled much more efficient by the server than > by the client. Right. Maybe it's me but I find it clumsy to do a WMS GetFeatureInfo. You're never sure what features you get results from if there are a bunch of features. For example, you cannot easily highlight features. Sending a request to get a new image back with the feature(s) highlighted together with the feature(s) info just feels awkward. > > You may want to have a look at [1]. This example uses the WFSGetFeature > control which OpenGeo is about to contribute to OpenLayers. You can see > that the features are loaded on hover, and selected on click. The extra > server trip is not too expensive, since it will only be triggered when > the mouse pointer stops for a configurable amount of milliseconds. I'll have a look thanx. In the meantime I found out that the clustering strategy in OL is not that slow after all. The thing is I had a very small BBOX in which I had 1000 features that had to be processed into clusters. I found that zooming far out allowed me to get 1 or very few clusters to render quickly so the trick I believe would be to have an effective maxFeatures param at specified zoom levels. Thanx again, Yves > > Regards, > Andreas. > > [1] http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html > From mika at digikartta.net Wed Jan 7 16:28:37 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Best option for visualizing JSON Message-ID: <49651E85.4090100@digikartta.net> Hi, I have some JSON data produced from an "ordinary" database. Basically it's an array having objects that include x-, y- and some attribute values. What would be the best way to render these x-, y-values as points or markers in Openlayers. Should I use Marker or Vector or what layer? Any Examples? - mika - From crschmidt at metacarta.com Wed Jan 7 16:51:34 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Best option for visualizing JSON In-Reply-To: <49651E85.4090100@digikartta.net> References: <49651E85.4090100@digikartta.net> Message-ID: <20090107215133.GP10452@metacarta.com> On Wed, Jan 07, 2009 at 11:28:37PM +0200, Lehtonen, Mika wrote: > Hi, > I have some JSON data produced from an "ordinary" database. Basically > it's an array having objects that include x-, y- and some attribute values. > > What would be the best way to render these x-, y-values as points or > markers in Openlayers. Should I use Marker or Vector or what layer? Any > Examples? I'd recommend turning the data into GeoJSON on the server, then using a Vector Layer with the HTTP Protocol and the GeoJSON format (alternatively, a GML Layer with a GeoJSON format). If you really can't do that, then you could write a custom subclass o the JSON format, basing it of something like the GeoJSON format, and follow either of the above options with your custom format. Regards, -- Christopher Schmidt MetaCarta From ahocevar at opengeo.org Wed Jan 7 17:33:43 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Event registration in activate function In-Reply-To: <4965185E.9020301@mapgears.com> References: <4965185E.9020301@mapgears.com> Message-ID: <49652DC7.7000000@opengeo.org> Hi Alexandre, Alexandre Dube wrote: > I'm writing my own Control and I need to register some events. Doing > so in the initialize function isn't good because some objects are not > created yet ( like the map object ). So I thought I could register them > in the activate() func and unregister them in the deactivate() func. > > So far it was ok to do so, but now I'm facing a problem. I need to > register events that, when triggered, deactivate the control, and other > events that, when triggered, reactivate the control. It's a control > that can contain multiple layers that come from the same source but have > been normalized to render faster, so the user sees no difference when > zooming. I would suggest registering your events in the setMap method of your control. This will be called when you add the control to the map. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From riceornoodle at googlemail.com Wed Jan 7 17:47:19 2009 From: riceornoodle at googlemail.com (Adolf Hohl) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Visualization question: KML+BBox query+labeled placemark Message-ID: <48ccfc180901071447w21b24620re6c01ff494314615@mail.gmail.com> Hi, after digging into different sources i ask for advice. For an openstreetmap based project which shows average traffic speed i need to visualize placemarks with individual icons. However I want to save a click and see a part of the description in the map. A click should reveal the rest of the description. Currently i generate region based KML using BBoxQuery/NetworkLinks but haven't got it working with openlayers. I would like to do this and visualize my placemarks with the short descritptions in openlayers and if possible in the most standard conformant way. Can i do this altogether and if yes, how. Any pointers and comment are highly appreciated. Thanks in advance -ah -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090107/942bd3b6/attachment.html From ahocevar at opengeo.org Wed Jan 7 17:48:36 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231362186.6511.71.camel@dell-desktop.example.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> Message-ID: <49653144.2030008@opengeo.org> Yves Moisan wrote: >> >> >> Why that? Features can be handled much more efficient by the server than >> by the client. >> > > Right. Maybe it's me but I find it clumsy to do a WMS GetFeatureInfo. > You're never sure what features you get results from if there are a > bunch of features. The mentioned WFSGetFeature control does WFS GetFeature and not WMS GetFeatureInfo, and also takes measures to only return the best matching feature when you click on the map. If you drag a box, it will return all features that intersect the box. > For example, you cannot easily highlight features. > Sending a request to get a new image back with the feature(s) > highlighted together with the feature(s) info just feels awkward. > If your use case involves highlighting only up to ~100 features, you can just load the features to be highlighted using the WFSGetFeature control and display them on a vector layer overlaying the WMS layer (see the example in my previous post, which does exactly that). If you have more features to highlight, you may indeed run into trouble, because rendering them as vector features will be slow. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From zac.spitzer at gmail.com Wed Jan 7 20:12:07 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] BBOX strategy with scale Message-ID: <7a85053e0901071712u764d346dtc8d84338a351d2b5@mail.gmail.com> Is there a way to pass the current scale within this request? poi_layer = new OpenLayers.Layer.Vector("POI", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.HTTP({ url: "/explore/poi_json.cfm", params: { scale: map.getZoom() }, format: new OpenLayers.Format.GeoJSON() }), styleMap: new OpenLayers.StyleMap(style) }); at the moment, the scale is only calculated once and is always passed at the initial scale z -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From openlayers at yahoo.com.sg Thu Jan 8 02:41:38 2009 From: openlayers at yahoo.com.sg (ashlin) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] limit map to maxExtent? In-Reply-To: <56407c947c946b44217ddefb0c29959d@145.50.39.11> References: <56407c947c946b44217ddefb0c29959d@145.50.39.11> Message-ID: <1231400498201-2126763.post@n2.nabble.com> Hi, I have the same problem too. May i know is it possible to keep panning within max extent? Best Regards, Ashlin bartvde wrote: > > Hi list, > > is there a way to limit the map to its maxExtent? Right now I can pan > outside of the maxExtent. > > I tried adding a check to setCenter in Map.js: > > .. > var bounds = this.getExtent(); > if (!this.maxExtent.containsBounds(bounds)) > { > return false; > } > > but that does not seem to do the job. > > Any help appreciated. > > Best regards, > Bart > > -- > Bart van den Eijnden > OSGIS, Open Source GIS > http://www.osgis.nl > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/limit-map-to-maxExtent--tp1825039p2126763.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Thu Jan 8 04:39:34 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Event registration in activate function In-Reply-To: <4965185E.9020301@mapgears.com> References: <4965185E.9020301@mapgears.com> Message-ID: <5ec103de0901080139k7260d4bgbaa149752c9ade18@mail.gmail.com> On Wed, Jan 7, 2009 at 10:02 PM, Alexandre Dube wrote: > Dear list, > > I'm writing my own Control and I need to register some events. Doing > so in the initialize function isn't good because some objects are not > created yet ( like the map object ). So I thought I could register them > in the activate() func and unregister them in the deactivate() func. > > So far it was ok to do so, but now I'm facing a problem. I need to > register events that, when triggered, deactivate the control, and other > events that, when triggered, reactivate the control. It's a control > that can contain multiple layers that come from the same source but have > been normalized to render faster, so the user sees no difference when > zooming. The control change the opacity of a layer when the mouse is > over it and because the features generated come from different sources, > I need to deactivate the control while I'm zooming ( deactivate on > loadstart, activate on loadend ). This looks like this : > > // inside the activate function() > for (var key in this.layers){ > this.layers[key].events.register( > "loadstart", this, this.deactivate); > this.layers[key].events.register( > "loadend", this, this.activate); > } > > So basically I should unregister them in the deactivate function(), > right ? The problem is : if I deactivate the control, it will > unregister the loadend event so it will not be reactivated in the end. > Is there an other place I should register my events to avoid that > behavior ? I see in some other control registration on events in a > draw() function. Could I do something similar ? Defining events that activate and deactivate a control in the control itself seems weird to me. Have you thought about implementing an external component controlling your control? -- Eric From john.pulles at geodan.nl Thu Jan 8 04:45:41 2009 From: john.pulles at geodan.nl (John Pulles) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] limit map to maxExtent? In-Reply-To: <1231400498201-2126763.post@n2.nabble.com> References: <56407c947c946b44217ddefb0c29959d@145.50.39.11> <1231400498201-2126763.post@n2.nabble.com> Message-ID: <4965CB45.8060505@geodan.nl> ashlin schreef: > Hi, > > I have the same problem too. May i know is it possible to keep panning > within max extent? > I assume the restrictedExtent (see http://openlayers.org/dev/examples/restricted-extent.html) is the solution to this problem. Regards, John > Best Regards, > Ashlin > > > > bartvde wrote: > >> Hi list, >> >> is there a way to limit the map to its maxExtent? Right now I can pan >> outside of the maxExtent. >> >> I tried adding a check to setCenter in Map.js: >> >> .. >> var bounds = this.getExtent(); >> if (!this.maxExtent.containsBounds(bounds)) >> { >> return false; >> } >> >> but that does not seem to do the job. >> >> Any help appreciated. >> >> Best regards, >> Bart >> >> -- >> Bart van den Eijnden >> OSGIS, Open Source GIS >> http://www.osgis.nl >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > -- John Pulles ------------------------------------- Geodan IT b.v. Buitenhaven 27-A 5211TP 's-Hertogenbosch ------------------------------------- Tel: +31 (0)73 - 692 5151 Fax: +31 (0)73 - 692 5150 ------------------------------------- Postadres / mailing address President Kennedylaan 1 1079MB Amsterdam ------------------------------------- E-mail: john.pulles@geodan.nl Website: http://www.geodan.nl ------------------------------------- From joao.c.duarte at co.sapo.pt Thu Jan 8 05:03:05 2009 From: joao.c.duarte at co.sapo.pt (Joao Duarte) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] How to implement draggable Markers? In-Reply-To: <4964DE5E.7010709@mapgears.com> References: <1231341589485-2122977.post@n2.nabble.com> <4964CA29.7060206@mapgears.com> <1231344327994-2123235.post@n2.nabble.com> <4964DE5E.7010709@mapgears.com> Message-ID: <008e01c97178$4ca2c640$e5e852c0$@c.duarte@co.sapo.pt> Hi, Another option would be to have your markers rendered in a Vector layer (each marker would be a Feature). Example: ************Create the layer and add it to the map*************** markersLayer = new OpenLayers.Layer.Vector("Markers", { projection: new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ externalGraphic: "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, backgroundXOffset: 0, backgroundYOffset: -17, pointRadius: 10 }) } ); map.addLayer(markersLayer); ************Add some features(markers)******************* var feature1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-9.39)); var feature2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-8,42)); markersLayer.addFeatures([feature1, feature2]); With this option you could then just add the DragFeature control to the map, and your markers (features) will become draggable. Best regards, Jo?o Duarte -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Alan Boudreault Sent: quarta-feira, 7 de Janeiro de 2009 16:55 To: KartoPete Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] How to implement draggable Markers? KartoPete wrote: > > Alan Boudreault wrote: > >> KartoPete wrote: >> >>> Hi guys, >>> I#m working with OpenLayers2.6 and try make my markers draggable. I tried >>> a >>> few edited classes I found here but it wouldn't work out, even the posted >>> example(long time ago) wouldn't work on my machine. Does anyone know if >>> draggable markers is already working with the new or future versions? Or >>> has >>> someone a idea on how to implement this? >>> thx Pete >>> >>> >> Something that you can do is to create a new class "DraggableMarker" >> that inherit of OpenLayers.Marker. This class will mainly handle 2 >> events: mouseup and mousedown: >> >> this.events.register('mousedown', this, this._markerDown); >> this.events.registerPriority('mouseup', this, this._markerUp); >> >> Thanks, I'll try >> But why registerPriority()? >> >> After that, the mousedown function will activate the event "mousemove" >> and the mouseup will disable it. And the mousemove handle will calculate >> the new position and move the marker on the fly. >> >> Hope this help. >> Alan >> >> >> -- >> Alan Boudreault >> Mapgears >> http://www.mapgears.com >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > You can try without the "priority" ..... i don't remember why we used this. Maybe a problem with an old version. -- Alan Boudreault Mapgears http://www.mapgears.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From mika at digikartta.net Thu Jan 8 07:25:51 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Best option for visualizing JSON In-Reply-To: <20090107215133.GP10452@metacarta.com> References: <49651E85.4090100@digikartta.net> <20090107215133.GP10452@metacarta.com> Message-ID: <4965F0CF.9070009@digikartta.net> Thanks Christopher, for your answer. However, beacuse there's not so many points and I have to put this together quickly and because this is just a temporary solution, I ended up adding points onto a vector layer one by one. So here's the function that does that: function json(req) { g = new OpenLayers.Format.JSON(); vastaus = g.read(req.responseText); vlayer.destroyFeatures(); for (i in vastaus) { piste = new OpenLayers.Geometry.Point(vastaus[i].x, vastaus[i].y); spot = new OpenLayers.Feature.Vector(piste,{id: vastaus[i].id}); vlayer.addFeatures(spot); } // vlayer.redraw(true); } Behind this, is an OpenLayers.Request that requests the json from database using php-script for that. I also have a function which adds points to the database. This all works fine in FF3, but not in IE7. If I add a point in IE, it won't appear until I restart the browser. Even reloading the page won't help. Still if, after I have added the point in IE, I reload the page in FF3, the newly added point appears in it. Any idea what's wrong? - mika - Christopher Schmidt kirjoitti: > On Wed, Jan 07, 2009 at 11:28:37PM +0200, Lehtonen, Mika wrote: > >> Hi, >> I have some JSON data produced from an "ordinary" database. Basically >> it's an array having objects that include x-, y- and some attribute values. >> >> What would be the best way to render these x-, y-values as points or >> markers in Openlayers. Should I use Marker or Vector or what layer? Any >> Examples? >> > > I'd recommend turning the data into GeoJSON on the server, then using a > Vector Layer with the HTTP Protocol and the GeoJSON format > (alternatively, a GML Layer with a GeoJSON format). If you really can't > do that, then you could write a custom subclass o the JSON format, > basing it of something like the GeoJSON format, and follow either of the > above options with your custom format. > > Regards, > From adube at mapgears.com Thu Jan 8 08:25:22 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Event registration in activate function In-Reply-To: <5ec103de0901080139k7260d4bgbaa149752c9ade18@mail.gmail.com> References: <4965185E.9020301@mapgears.com> <5ec103de0901080139k7260d4bgbaa149752c9ade18@mail.gmail.com> Message-ID: <4965FEC2.406@mapgears.com> Eric Lemoine wrote: > On Wed, Jan 7, 2009 at 10:02 PM, Alexandre Dube wrote: > >> Dear list, >> >> I'm writing my own Control and I need to register some events. Doing >> so in the initialize function isn't good because some objects are not >> created yet ( like the map object ). So I thought I could register them >> in the activate() func and unregister them in the deactivate() func. >> >> So far it was ok to do so, but now I'm facing a problem. I need to >> register events that, when triggered, deactivate the control, and other >> events that, when triggered, reactivate the control. It's a control >> that can contain multiple layers that come from the same source but have >> been normalized to render faster, so the user sees no difference when >> zooming. The control change the opacity of a layer when the mouse is >> over it and because the features generated come from different sources, >> I need to deactivate the control while I'm zooming ( deactivate on >> loadstart, activate on loadend ). This looks like this : >> >> // inside the activate function() >> for (var key in this.layers){ >> this.layers[key].events.register( >> "loadstart", this, this.deactivate); >> this.layers[key].events.register( >> "loadend", this, this.activate); >> } >> >> So basically I should unregister them in the deactivate function(), >> right ? The problem is : if I deactivate the control, it will >> unregister the loadend event so it will not be reactivated in the end. >> Is there an other place I should register my events to avoid that >> behavior ? I see in some other control registration on events in a >> draw() function. Could I do something similar ? >> > > Defining events that activate and deactivate a control in the control > itself seems weird to me. Have you thought about implementing an > external component controlling your control? > > -- > Eric > Eric : Yeah, it seems weird doing so but I want the control to be independent. External component : I think that's what I'm actually doing in my init() function, or do you mean something else ? Andreas : that's a great idea. Event registration on the map object can be set in the setMap() function and others, like on layers, can be in the initialize(). Thanks a lot, -- Alexandre Dub? Mapgears www.mapgears.com From yves.moisan at boreal-is.com Thu Jan 8 08:52:46 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <49653144.2030008@opengeo.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> Message-ID: <1231422767.6555.26.camel@dell-desktop.example.com> > > > If your use case involves highlighting only up to ~100 features, you can > just load the features to be highlighted using the WFSGetFeature control > and display them on a vector layer overlaying the WMS layer (see the > example in my previous post, which does exactly that). If you have more > features to highlight, you may indeed run into trouble, because > rendering them as vector features will be slow. This brings us to the original issue. In fact I need to be able to update features so I need a vector layer. In my case, I've got 1000 features in a GeoJSON object -- in fact I get the maxFeature=1000 features FeatureServer has hardcoded out of the 8000 I have:-) . Using clustering, I found I can bring the number of features to show to something reasonable performancewise. I managed my popups so that all features clustered in cluster X show some attributes (eventually an url to each object that I could shove into an edit form) so in my first zoom level I get one cluster containing all 1000 features and as the number of clusters grows as I zoom in I get fewer features in each cluster. I very much like the looks of that compared to a bunch of overlapping points. I don't know what it does for lines and polygons though. I did some tests with the maxFeature param of the vector layer to keep the number of features down and I find that zooming in does not invalidate the bounds so that I'm stuck with the N features I got for the parent zoom level, irrespective of the fact that there are features that were missed at the parent zoom level that should now show up. For example, if I ask for 50 features out of the 1000, I get points in the upper right corner. If I ask for 500, I get a better point distribution. I understand I'm getting the features sequentially in some order so it may well be that the 50 first features are all bunched up in some corner but when I zoom in in an area I did not get any point for and for which I know there are features I should see maxFeature=50 features. But I don't see anything. That's the only part left for me to clear. Cheers, Yves From mika at digikartta.net Thu Jan 8 09:09:40 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Best option for visualizing JSON In-Reply-To: <4965F0CF.9070009@digikartta.net> References: <49651E85.4090100@digikartta.net> <20090107215133.GP10452@metacarta.com> <4965F0CF.9070009@digikartta.net> Message-ID: <49660924.6020905@digikartta.net> Hi again, actually I might have been barking the wrong tree. This is what seem not to be working in IE7. function selectAll() { req = OpenLayers.Request.issue({ method: 'GET', url:'http://mydomain/my.php', headers:{"Content-Type": "application/x-www-form-urlencoded"}, callback: json }); } It works at the start, but the second attempt in IE7 won't return anything. So that's why the newly inserted row won't update my map. Is there something wrong with that request? - mika - Lehtonen, Mika kirjoitti: > Thanks Christopher, > for your answer. However, beacuse there's not so many points and I have > to put this together quickly and because this is just a temporary > solution, I ended up adding points onto a vector layer one by one. So > here's the function that does that: > > function json(req) { > g = new OpenLayers.Format.JSON(); > vastaus = g.read(req.responseText); > vlayer.destroyFeatures(); > for (i in vastaus) { > piste = new OpenLayers.Geometry.Point(vastaus[i].x, vastaus[i].y); > spot = new OpenLayers.Feature.Vector(piste,{id: vastaus[i].id}); > vlayer.addFeatures(spot); > } > // vlayer.redraw(true); > } > > Behind this, is an OpenLayers.Request that requests the json from > database using php-script for that. I also have a function which adds > points to the database. This all works fine in FF3, but not in IE7. If I > add a point in IE, it won't appear until I restart the browser. Even > reloading the page won't help. Still if, after I have added the point in > IE, I reload the page in FF3, the newly added point appears in it. > Any idea what's wrong? > > - mika - > > Christopher Schmidt kirjoitti: > >> On Wed, Jan 07, 2009 at 11:28:37PM +0200, Lehtonen, Mika wrote: >> >> >>> Hi, >>> I have some JSON data produced from an "ordinary" database. Basically >>> it's an array having objects that include x-, y- and some attribute values. >>> >>> What would be the best way to render these x-, y-values as points or >>> markers in Openlayers. Should I use Marker or Vector or what layer? Any >>> Examples? >>> >>> >> I'd recommend turning the data into GeoJSON on the server, then using a >> Vector Layer with the HTTP Protocol and the GeoJSON format >> (alternatively, a GML Layer with a GeoJSON format). If you really can't >> do that, then you could write a custom subclass o the JSON format, >> basing it of something like the GeoJSON format, and follow either of the >> above options with your custom format. >> >> Regards, >> >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From CHRISTOPHER.M.HEIDT at saic.com Thu Jan 8 10:31:02 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] maxResolution google layer In-Reply-To: <4965CB45.8060505@geodan.nl> References: <56407c947c946b44217ddefb0c29959d@145.50.39.11><1231400498201-2126763.post@n2.nabble.com> <4965CB45.8060505@geodan.nl> Message-ID: <1053B20F24D85F41B57F168351684E2202D17B48@0015-its-exmb04.us.saic.com> Im tring to restrict how far my users can zoom out but changing the maxResolution but it isnt doing anything for my google layers. Ive also played with maxExtent/restrictedExtent but these don't affect the zoom. I just don't want to be able to see multiple copies of the earth ;p From psingler at gmx.de Thu Jan 8 10:33:11 2009 From: psingler at gmx.de (KartoPete) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Draggable Markers on Openlayers. In-Reply-To: References: Message-ID: <1231428791321-2128434.post@n2.nabble.com> BenJamin2007 wrote: > > Hi, somebody gives me a hand, pls > > > BenJamin2007 wrote: >> >> Hi guys, >> >> I downloaded the draggable Marker feature from >> >> http://trac.openlayers.org/browser/sandbox/tschaub/feature/lib/OpenLayers/Control/DragMarker.js?rev=3459 >> >> and I make it work. >> >> This feature will be released on version 2.6 I guess. But I would like to >> put it forward because I have to use it for my current work. >> >> Basically, there are 2 fundamental 'classes': >> >> OpenLayers.Control.DragMarker >> OpenLayers.Handler.Marker >> >> This is how we add drag control to the markers.:::: >> >> >> map = new OpenLayers.Map('map'); >> markermanager = new OpenLayers.Layer.Markers(" marker layer "); >> var DragControl=new OpenLayers.Control.DragMarker(markermanager); >> map.addControl(DragControl); >> DragControl.activate(); >> >> >> Easy, Simple, Good! >> >> I also had this code in my javascript: >> >> a_marker=new OpenLayers.Marker(new OpenLayers.LonLat(-72,42)); >> a_marker.events.register("mouseup", null, function(evt){ >> // Do something. >> 333 // option 2: intend to creat an error >> here. >> } >> >> But here is my Problem: If I add the customer event handler.... >> When I drag the a_marker, I can drag it.. but after I release my left >> button, the a_marker won't go release.. The marker keep sticking to the >> mouse. Seems that the 'mouseup' event has not been passed to the >> DragHandler..... >> >> The ONLY way I can solve this problem is to create an error at the end of >> the event function, like this: >> >> a_marker.events.register("mouseup", null, function(evt){ >> // Do something. >> 333 // intend to creat an error here. >> } >> >> >> >> >> Here are the ways I tried, but failed!!!! >> >> a_marker.events.register("mouseup", a_marker, function(evt){ >> // Do something. >> map.Event.Stop(evt); >> } >> >> a_marker.events.register("mouseup", map, function(evt){ >> // Do something. >> map.Event.Stop(evt); >> } >> >> a_marker.events.register("mouseup", null, function(evt){ >> // Do something. >> map.Event.Stop(evt); >> } >> >> >> >> SO, Some body Help me. >> >> Thank a lot!!! >> >> > > I#ve got the same problem. Did you fix yours? thx, Pete -- View this message in context: http://n2.nabble.com/Draggable-Markers-on-Openlayers.-tp1825955p2128434.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu Jan 8 10:37:31 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231422767.6555.26.camel@dell-desktop.example.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> Message-ID: <49661DBB.5020100@opengeo.org> Yves Moisan wrote: > I did some tests with the maxFeature param of the vector layer to keep > the number of features down and I find that zooming in does not > invalidate the bounds so that I'm stuck with the N features I got for > the parent zoom level, irrespective of the fact that there are features > that were missed at the parent zoom level that should now show up. For > example, if I ask for 50 features out of the 1000, I get points in the > upper right corner. If I ask for 500, I get a better point > distribution. I understand I'm getting the features sequentially in > some order so it may well be that the 50 first features are all bunched > up in some corner but when I zoom in in an area I did not get any point > for and for which I know there are features I should see maxFeature=50 > features. But I don't see anything. That's the only part left for me > to clear. > What you are describing looks like you do not use the BBOX strategy. Add OpenLayers.Strategy.BBOX to your vector layer's strategies array. This will also ensure that, once you are zoomed in far enough, all features will be visible, even if you set a maxfeatures parameter. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From psingler at gmx.de Thu Jan 8 10:47:43 2009 From: psingler at gmx.de (KartoPete) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] How to implement draggable Markers? In-Reply-To: <008e01c97178$4ca2c640$e5e852c0$@c.duarte@co.sapo.pt> References: <1231341589485-2122977.post@n2.nabble.com> <4964CA29.7060206@mapgears.com> <1231344327994-2123235.post@n2.nabble.com> <4964DE5E.7010709@mapgears.com> <008e01c97178$4ca2c640$e5e852c0$@c.duarte@co.sapo.pt> Message-ID: <1231429663889-2128501.post@n2.nabble.com> good idea, I tried first version and can't stop the mousemove event. Any ideas? If it would be my own code I would do it different, but I#m stuck in many code from another author, who worked on the project before. My actuell DraggableMarkerClass looks like this: OpenLayers.Marker.DraggableMarker = OpenLayers.Class(OpenLayers.Marker, { layer: null, currentEvent: null, registerEvents: function(){ this.events.registerPriority('mousedown', this, this.onMarkerDown); this.map.events.register('mouseup', this, this.onMarkerUp); }, onMarkerDown: function(){ this.map.events.register('mousemove', this, this.onMove); }, onMarkerUp: function(){ Event.stop(this.currentEvent); }, onMove: function(e){ var lonlat = this.map.getLonLatFromViewPortPx(e.xy); var marker = new OpenLayers.Marker.DraggableMarker(new OpenLayers.LonLat(lonlat.lon,lonlat.lat), markerIcon2.clone()); this.layer.clearMarkers(); this.layer.addMarker(marker); this.currentEvent = e; }, CLASS_NAME: "OpenLayers.Marker.DraggableMarker" }); As I already said, I can't stop the mousemove-Event! Any ideas? thx, Pete -- View this message in context: http://n2.nabble.com/How-to-implement-draggable-Markers--tp2122977p2128501.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Thu Jan 8 10:52:24 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources Message-ID: <49662138.4010300@mapgears.com> Hi devs, I want to discuss about a new feature on Layer.Vector : multiple data sources depending on the zoom level. I already developped something very similar : http://dev4.mapgears.com/bdga/bdgaWFS-T.html At zoom level 0 to 3, you will see vector polygons ( regions ). Each level comes from a different source that has been normalized to improve the rendering speed. So, each zoom level has its own vector layer and they are all hidden from the layer switcher. They are controlled by a dummy layer. At first, I thought this was cool, but now that I think about it, a single type of data, the Quebec regions on my example, should be displayed on a single layer. If I want to interact with my data the way it is now, I need to look at 4 different layers and keep track of a dummy layer also. A single vector layer with the possibility to give it multiple data sources depending on the zoom level would be much better. What do you think ? It could be a nice upgrade. -- Alexandre Dub? Mapgears www.mapgears.com From trondmm-openlayers at crusaders.no Thu Jan 8 11:15:16 2009 From: trondmm-openlayers at crusaders.no (Trond Michelsen) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map wrapping? In-Reply-To: <20090105011624.GC10452@metacarta.com> References: <4a419bc70803081140m65b015em95ce6e707391329b@mail.gmail.com> <20080308202608.GB11955@metacarta.com> <4a419bc70803081233v57f8a630h5120cf1f9a513574@mail.gmail.com> <20080308203728.GD11955@metacarta.com> <4a419bc70803081244h30040f04m2be7f69904dc0739@mail.gmail.com> <1231117266514-2111067.post@n2.nabble.com> <20090105011624.GC10452@metacarta.com> Message-ID: <20090108161516.GJ21122@crusaders.no> On Sun, Jan 04, 2009 at 08:16:24PM -0500, Christopher Schmidt wrote: > On Sun, Jan 04, 2009 at 05:01:06PM -0800, Paul Stevenson wrote: >> I have NZ earthquake data in KML format. These data often span the dateline >> and are rendered on the map in 2 sets, each side of the date line. As I >> scroll the map eastward the set of data west of the dateline disappears as >> the set east of the dateline appears. It looks clunky, and gives the initial >> impression that earthquakes only occur west of the dateline. Is it possible >> to display all data at once? > Not in OpenLayers. Doesn't that depend on the projection, though? Use a projection that wraps somewhere else (or not at all), and it should work fine. -- Trond Michelsen From chris at genieknows.com Thu Jan 8 11:48:16 2009 From: chris at genieknows.com (Chris Adams) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Map wrapping? In-Reply-To: <1231117266514-2111067.post@n2.nabble.com> References: <4a419bc70803081140m65b015em95ce6e707391329b@mail.gmail.com> <20080308202608.GB11955@metacarta.com> <4a419bc70803081233v57f8a630h5120cf1f9a513574@mail.gmail.com> <20080308203728.GD11955@metacarta.com> <4a419bc70803081244h30040f04m2be7f69904dc0739@mail.gmail.com> <1231117266514-2111067.post@n2.nabble.com> Message-ID: <49662E50.6030406@genieknows.com> Paul Stevenson wrote: > I have NZ earthquake data in KML format. These data often span the dateline > and are rendered on the map in 2 sets, each side of the date line. As I > scroll the map eastward the set of data west of the dateline disappears as > the set east of the dateline appears. It looks clunky, and gives the initial > impression that earthquakes only occur west of the dateline. Is it possible > to display all data at once? This sounds a similar request to one above > written 9 months ago - has there been any development on this issue or is > there going to be? > > > If OL doesn't wrap your data, than duplicate each data set, with the one east of the date line by +180 longitude, and the one west of the date line by -180 longitude, and display all four data sets at once. From mika at digikartta.net Thu Jan 8 11:48:58 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Best option for visualizing JSON In-Reply-To: <49660924.6020905@digikartta.net> References: <49651E85.4090100@digikartta.net> <20090107215133.GP10452@metacarta.com> <4965F0CF.9070009@digikartta.net> <49660924.6020905@digikartta.net> Message-ID: <49662E7A.2040800@digikartta.net> Solved. I added params: {random: Math.random()} to my request and now my application works also in IE7. Some caching problem? Known issue? - mika - Lehtonen, Mika kirjoitti: > Hi again, > actually I might have been barking the wrong tree. This is what seem not > to be working in IE7. > > function selectAll() { > req = OpenLayers.Request.issue({ > method: 'GET', url:'http://mydomain/my.php', > headers:{"Content-Type": > "application/x-www-form-urlencoded"}, > callback: json > }); > } > > It works at the start, but the second attempt in IE7 won't return > anything. So that's why the newly inserted row won't update my map. Is > there something wrong with that request? > > - mika - > > Lehtonen, Mika kirjoitti: > >> Thanks Christopher, >> for your answer. However, beacuse there's not so many points and I have >> to put this together quickly and because this is just a temporary >> solution, I ended up adding points onto a vector layer one by one. So >> here's the function that does that: >> >> function json(req) { >> g = new OpenLayers.Format.JSON(); >> vastaus = g.read(req.responseText); >> vlayer.destroyFeatures(); >> for (i in vastaus) { >> piste = new OpenLayers.Geometry.Point(vastaus[i].x, vastaus[i].y); >> spot = new OpenLayers.Feature.Vector(piste,{id: vastaus[i].id}); >> vlayer.addFeatures(spot); >> } >> // vlayer.redraw(true); >> } >> >> Behind this, is an OpenLayers.Request that requests the json from >> database using php-script for that. I also have a function which adds >> points to the database. This all works fine in FF3, but not in IE7. If I >> add a point in IE, it won't appear until I restart the browser. Even >> reloading the page won't help. Still if, after I have added the point in >> IE, I reload the page in FF3, the newly added point appears in it. >> Any idea what's wrong? >> >> - mika - >> >> Christopher Schmidt kirjoitti: >> >> >>> On Wed, Jan 07, 2009 at 11:28:37PM +0200, Lehtonen, Mika wrote: >>> >>> >>> >>>> Hi, >>>> I have some JSON data produced from an "ordinary" database. Basically >>>> it's an array having objects that include x-, y- and some attribute values. >>>> >>>> What would be the best way to render these x-, y-values as points or >>>> markers in Openlayers. Should I use Marker or Vector or what layer? Any >>>> Examples? >>>> >>>> >>>> >>> I'd recommend turning the data into GeoJSON on the server, then using a >>> Vector Layer with the HTTP Protocol and the GeoJSON format >>> (alternatively, a GML Layer with a GeoJSON format). If you really can't >>> do that, then you could write a custom subclass o the JSON format, >>> basing it of something like the GeoJSON format, and follow either of the >>> above options with your custom format. >>> >>> Regards, >>> >>> >>> >> _______________________________________________ >> 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 wvick at europa-tech.com Thu Jan 8 12:14:45 2009 From: wvick at europa-tech.com (Warren Vick) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] World wrapping? In-Reply-To: <49662E50.6030406@genieknows.com> References: <4a419bc70803081140m65b015em95ce6e707391329b@mail.gmail.com> <20080308202608.GB11955@metacarta.com> <4a419bc70803081233v57f8a630h5120cf1f9a513574@mail.gmail.com> <20080308203728.GD11955@metacarta.com> <4a419bc70803081244h30040f04m2be7f69904dc0739@mail.gmail.com><1231117266514-2111067.post@n2.nabble.com> <49662E50.6030406@genieknows.com> Message-ID: <776B93361B7BEE4FAD9E720FFBC746B604F0986B@34093-EVS4C2.exchange.rackspace.com> Sort or related to the "Map Wrapping" thread... Can OpenLayers be set so that a world map (ESPG:900913) view wraps around. i.e. Like Google Maps which allows continuous panning east or west. Regards, Warren Vick Europa Technologies Ltd. http://www.europa.uk.com From ahocevar at opengeo.org Thu Jan 8 12:29:18 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <49662138.4010300@mapgears.com> References: <49662138.4010300@mapgears.com> Message-ID: <496637EE.9010802@opengeo.org> Alexandre Dube wrote: > Hi devs, > > I want to discuss about a new feature on Layer.Vector : multiple data > sources depending on the zoom level. > > I already developped something very similar : > http://dev4.mapgears.com/bdga/bdgaWFS-T.html At zoom level 0 to 3, you > will see vector polygons ( regions ). Each level comes from a different > source that has been normalized to improve the rendering speed. So, > each zoom level has its own vector layer and they are all hidden from > the layer switcher. They are controlled by a dummy layer. > > At first, I thought this was cool, but now that I think about it, a > single type of data, the Quebec regions on my example, should be > displayed on a single layer. If I want to interact with my data the way > it is now, I need to look at 4 different layers and keep track of a > dummy layer also. A single vector layer with the possibility to give it > multiple data sources depending on the zoom level would be much better. > What do you think ? It could be a nice upgrade. > It should be easy to customize the strategy you are using (I assume Fixed or BBOX) to change the url and/or params of the protocol on the zoomend event (similar to the moveend event handler in the BBOX strategy). This strategy would then have to know the urls/params for each zoom level, and you would just interact with one vector layer. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From adube at mapgears.com Thu Jan 8 12:42:57 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <496637EE.9010802@opengeo.org> References: <49662138.4010300@mapgears.com> <496637EE.9010802@opengeo.org> Message-ID: <49663B21.9050201@mapgears.com> Andreas Hocevar wrote: > Alexandre Dube wrote: > >> Hi devs, >> >> I want to discuss about a new feature on Layer.Vector : multiple data >> sources depending on the zoom level. >> >> I already developped something very similar : >> http://dev4.mapgears.com/bdga/bdgaWFS-T.html At zoom level 0 to 3, you >> will see vector polygons ( regions ). Each level comes from a different >> source that has been normalized to improve the rendering speed. So, >> each zoom level has its own vector layer and they are all hidden from >> the layer switcher. They are controlled by a dummy layer. >> >> At first, I thought this was cool, but now that I think about it, a >> single type of data, the Quebec regions on my example, should be >> displayed on a single layer. If I want to interact with my data the way >> it is now, I need to look at 4 different layers and keep track of a >> dummy layer also. A single vector layer with the possibility to give it >> multiple data sources depending on the zoom level would be much better. >> What do you think ? It could be a nice upgrade. >> >> > > It should be easy to customize the strategy you are using (I assume > Fixed or BBOX) to change the url and/or params of the protocol on the > zoomend event (similar to the moveend event handler in the BBOX > strategy). This strategy would then have to know the urls/params for > each zoom level, and you would just interact with one vector layer. > > Regards, > Andreas. > > Exactly. It's a common practice on the web to have data normalized by scales, so it would be quite useful to have such an upgrade. So, you would modify both BBOX and Fixed ? Do others have opinions about it ? -- Alexandre Dub? Mapgears www.mapgears.com From ajayr.email at gmail.com Thu Jan 8 13:01:45 2009 From: ajayr.email at gmail.com (AJ R) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] maxResolution google layer In-Reply-To: <1053B20F24D85F41B57F168351684E2202D17B48@0015-its-exmb04.us.saic.com> References: <56407c947c946b44217ddefb0c29959d@145.50.39.11> <1231400498201-2126763.post@n2.nabble.com> <4965CB45.8060505@geodan.nl> <1053B20F24D85F41B57F168351684E2202D17B48@0015-its-exmb04.us.saic.com> Message-ID: Hi Christopher I have had to do something similar, wherein i Had to restrict zoom levels for the users, and i did this by setting the min and maxZoom levels, for example for our app, the resolutions ranges from Zoom level 9 to level 15 were all that were needed. This worked perfectly. I dont know if this would help solve your problem. Regards Ajay On Thu, Jan 8, 2009 at 9:31 AM, Heidt, Christopher M. wrote: > Im tring to restrict how far my users can zoom out but changing the > maxResolution but it isnt doing anything for my google layers. > Ive also played with maxExtent/restrictedExtent but these don't affect > the zoom. > I just don't want to be able to see multiple copies of the earth ;p > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ahocevar at opengeo.org Thu Jan 8 13:04:58 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <49663B21.9050201@mapgears.com> References: <49662138.4010300@mapgears.com> <496637EE.9010802@opengeo.org> <49663B21.9050201@mapgears.com> Message-ID: <5b021dd0901081004k73d0bc74y160715c54311016e@mail.gmail.com> On Thu, Jan 8, 2009 at 6:42 PM, Alexandre Dube wrote: > Andreas Hocevar wrote: >> Alexandre Dube wrote: >> It should be easy to customize the strategy you are using (I assume >> Fixed or BBOX) to change the url and/or params of the protocol on the >> zoomend event (similar to the moveend event handler in the BBOX >> strategy). This strategy would then have to know the urls/params for >> each zoom level, and you would just interact with one vector layer. >> > Exactly. It's a common practice on the web to have data normalized by > scales, so it would be quite useful to have such an upgrade. > > So, you would modify both BBOX and Fixed ? Do others have opinions > about it ? No, I'd encourage you to do this on the application level because it is less than 10 lines of code. If this is to become part of OpenLayers, it should be a separate strategy (a layer can have multiple strategies). Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Thu Jan 8 13:09:53 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Best option for visualizing JSON In-Reply-To: <49662E7A.2040800@digikartta.net> References: <49651E85.4090100@digikartta.net> <20090107215133.GP10452@metacarta.com> <4965F0CF.9070009@digikartta.net> <49660924.6020905@digikartta.net> <49662E7A.2040800@digikartta.net> Message-ID: <5b021dd0901081009k1d1ac4a7w299f35bfa35316c7@mail.gmail.com> On Thu, Jan 8, 2009 at 5:48 PM, Lehtonen, Mika wrote: > Solved. > > I added params: {random: Math.random()} to my request and now my > application works also in IE7. Some caching problem? Known issue? Definitely a caching issue. If your server script supports POST, you could change the request method from GET to POST instead of adding a random parameter. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From adube at mapgears.com Thu Jan 8 13:38:14 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <5b021dd0901081004k73d0bc74y160715c54311016e@mail.gmail.com> References: <49662138.4010300@mapgears.com> <496637EE.9010802@opengeo.org> <49663B21.9050201@mapgears.com> <5b021dd0901081004k73d0bc74y160715c54311016e@mail.gmail.com> Message-ID: <49664816.3000407@mapgears.com> Andreas Hocevar wrote: > On Thu, Jan 8, 2009 at 6:42 PM, Alexandre Dube wrote: > >> Andreas Hocevar wrote: >> >>> Alexandre Dube wrote: >>> It should be easy to customize the strategy you are using (I assume >>> Fixed or BBOX) to change the url and/or params of the protocol on the >>> zoomend event (similar to the moveend event handler in the BBOX >>> strategy). This strategy would then have to know the urls/params for >>> each zoom level, and you would just interact with one vector layer. >>> >>> >> Exactly. It's a common practice on the web to have data normalized by >> scales, so it would be quite useful to have such an upgrade. >> >> So, you would modify both BBOX and Fixed ? Do others have opinions >> about it ? >> > > No, I'd encourage you to do this on the application level because it > is less than 10 lines of code. If this is to become part of > OpenLayers, it should be a separate strategy (a layer can have > multiple strategies). > > Regards, > Andreas. > > Understood. I'll try to write a new strategy then. Thanks a lot for the tips. -- Alexandre Dub? Mapgears www.mapgears.com From joao.c.duarte at co.sapo.pt Thu Jan 8 14:12:31 2009 From: joao.c.duarte at co.sapo.pt (Joao Duarte) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] dblclick notifications on Handler.Feature Message-ID: <00c101c971c5$0dc7e570$2957b050$@c.duarte@co.sapo.pt> Hi, I've created a control with a Handler.Feature handler so that I can register callbacks for events which occur over features. The problem I'm having is when I regist the click and dblclick events: var callbacks = { click: this.clickFeature, over: this.overFeature, out: this.outFeature, dblclick: this.dblclickFeature } this.callbacks = OpenLayers.Util.extend(callbacks, this.callbacks); this.handlers = { feature: new OpenLayers.Handler.Feature( this, this.layer, this.callbacks ) }; I only get notifications for the click event. Only if I remove the click listener I start receiving the dblclick event. Is there any way that I can be notified of double clicks? Best regards, Joao Duarte -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090108/0965e0f3/attachment.html From CHRISTOPHER.M.HEIDT at saic.com Thu Jan 8 14:39:48 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] maxResolution google layer In-Reply-To: References: <56407c947c946b44217ddefb0c29959d@145.50.39.11> <1231400498201-2126763.post@n2.nabble.com> <4965CB45.8060505@geodan.nl> <1053B20F24D85F41B57F168351684E2202D17B48@0015-its-exmb04.us.saic.com> Message-ID: <1053B20F24D85F41B57F168351684E2202D64766@0015-its-exmb04.us.saic.com> Is this a map or layer property? I see a numZoomLevels under each, but that's the only zoom property I can find in the docs. I tried adding maxZoom to the map and layer but that didn't appear to do anything. -----Original Message----- From: AJ R [mailto:ajayr.email@gmail.com] Sent: Thursday, January 08, 2009 1:02 PM To: Heidt, Christopher M. Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] maxResolution google layer Hi Christopher I have had to do something similar, wherein i Had to restrict zoom levels for the users, and i did this by setting the min and maxZoom levels, for example for our app, the resolutions ranges from Zoom level 9 to level 15 were all that were needed. This worked perfectly. I dont know if this would help solve your problem. Regards Ajay On Thu, Jan 8, 2009 at 9:31 AM, Heidt, Christopher M. wrote: > Im tring to restrict how far my users can zoom out but changing the > maxResolution but it isnt doing anything for my google layers. > Ive also played with maxExtent/restrictedExtent but these don't affect > the zoom. > I just don't want to be able to see multiple copies of the earth ;p > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ajayr.email at gmail.com Thu Jan 8 14:48:40 2009 From: ajayr.email at gmail.com (AJ R) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] maxResolution google layer In-Reply-To: <1053B20F24D85F41B57F168351684E2202D64766@0015-its-exmb04.us.saic.com> References: <56407c947c946b44217ddefb0c29959d@145.50.39.11> <1231400498201-2126763.post@n2.nabble.com> <4965CB45.8060505@geodan.nl> <1053B20F24D85F41B57F168351684E2202D17B48@0015-its-exmb04.us.saic.com> <1053B20F24D85F41B57F168351684E2202D64766@0015-its-exmb04.us.saic.com> Message-ID: This is a sample of the code , observe the minZoomLevel and maxZoomLevel which are essentially Layer properties baseLayer = new OpenLayers.Layer.Google( baseLayerName , {type: baseLayerType, minZoomLevel: 9, maxZoomLevel:15, sphericalMercator: sphericalMercator } ); Regards Ajay Ravichandran On Thu, Jan 8, 2009 at 1:39 PM, Heidt, Christopher M. wrote: > Is this a map or layer property? > I see a numZoomLevels under each, but that's the only zoom property I > can find in the docs. > I tried adding maxZoom to the map and layer but that didn't appear to do > anything. > > -----Original Message----- > From: AJ R [mailto:ajayr.email@gmail.com] > Sent: Thursday, January 08, 2009 1:02 PM > To: Heidt, Christopher M. > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] maxResolution google layer > > Hi Christopher > > I have had to do something similar, wherein i Had to restrict zoom > levels for the users, and i did this by setting the min and maxZoom > levels, for example for our app, the resolutions ranges from Zoom level > 9 to level 15 were all that were needed. This worked perfectly. > I dont know if this would help solve your problem. > > Regards > > Ajay > > On Thu, Jan 8, 2009 at 9:31 AM, Heidt, Christopher M. > wrote: >> Im tring to restrict how far my users can zoom out but changing the >> maxResolution but it isnt doing anything for my google layers. >> Ive also played with maxExtent/restrictedExtent but these don't affect > >> the zoom. >> I just don't want to be able to see multiple copies of the earth ;p >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > From CHRISTOPHER.M.HEIDT at saic.com Thu Jan 8 15:31:15 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Zoombox over dateline Message-ID: <1053B20F24D85F41B57F168351684E2202D64831@0015-its-exmb04.us.saic.com> if I create a zoombox(shift+drag) over the dateline it incorrectly zooms over the prime meridian instead. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090108/1224adfe/attachment.html From yves.moisan at boreal-is.com Thu Jan 8 16:03:54 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <49661DBB.5020100@opengeo.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> Message-ID: <1231448634.7174.24.camel@dell-desktop.example.com> > What you are describing looks like you do not use the BBOX strategy. Andreas, Here's my vector layer : pts_gps = new OpenLayers.Layer.Vector("GeoJSON", { strategies: [new OpenLayers.Strategy.BBOX(),new OpenLayers.Strategy.Cluster()], protocol: new OpenLayers.Protocol.HTTP({ url: "http://myserver:8080/PGTEST4326/all.json", format: new OpenLayers.Format.GeoJSON(), params:{maxfeatures: 100} }), format: new OpenLayers.Format.GeoJSON(), styleMap: new OpenLayers.StyleMap({ "default": style, "select": { fillColor: "#8aeeef", strokeColor: "#32a8a9" } }) }); > Add > OpenLayers.Strategy.BBOX to your vector layer's strategies array. This > will also ensure that, once you are zoomed in far enough, all features > will be visible, even if you set a maxfeatures parameter. To illustrate what I was saying in the previous email, here's a bunch of screenshots : maxFeatures= 1000 : http://www.flickr.com/photos/30818159@N05/3180683492/ maxFeatures= 1000, zoomed in : http://www.flickr.com/photos/30818159@N05/3179845579/ maxFeatures= 5 : http://www.flickr.com/photos/30818159@N05/3180683598/ maxFeatures= 5, zoomed in : http://www.flickr.com/photos/30818159@N05/3179845687/ The first level of zoom is the same for both maxFeature values. Zooming in mean I hit the + sign on the OL control once. You can see (well almost) that when I zoom in with maxFeature = 5, i get *3* clusters each worth 1 feature. It is clear from the zoomed in example with maxFeatures = 1000 that there *are* more than 3 features at that zoom level so I was expecting to see 5 features spread into N <= 5 clusters so something is wrong there. If I zoom into the top right portion of my zoomed out window, I see no feature. The same rubberband zoom with maxFeatures = 1000 gives me some features ?? I saw a thread explaining the issue but I don't remember where. I will investigate further and report if I find an explanation. Cheers, Yves From ahocevar at opengeo.org Thu Jan 8 18:14:06 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231448634.7174.24.camel@dell-desktop.example.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> Message-ID: <496688BE.80803@opengeo.org> Yves Moisan wrote: > Here's my vector layer : > > pts_gps = new OpenLayers.Layer.Vector("GeoJSON", { > strategies: [new OpenLayers.Strategy.BBOX(),new > OpenLayers.Strategy.Cluster()], > protocol: new OpenLayers.Protocol.HTTP({ > url: "http://myserver:8080/PGTEST4326/all.json", > format: new OpenLayers.Format.GeoJSON(), > params:{maxfeatures: 100} > }), > format: new OpenLayers.Format.GeoJSON(), > styleMap: new OpenLayers.StyleMap({ > "default": style, > "select": { > fillColor: "#8aeeef", > strokeColor: "#32a8a9" > } > }) > }); > This looks perfectly sane. > To illustrate what I was saying in the previous email, here's a bunch of > screenshots : > > maxFeatures= 1000 : > http://www.flickr.com/photos/30818159@N05/3180683492/ > > maxFeatures= 1000, zoomed in : > http://www.flickr.com/photos/30818159@N05/3179845579/ > > maxFeatures= 5 : http://www.flickr.com/photos/30818159@N05/3180683598/ > > maxFeatures= 5, zoomed in : > http://www.flickr.com/photos/30818159@N05/3179845687/ > > The first level of zoom is the same for both maxFeature values. Zooming > in mean I hit the + sign on the OL control once. You can see (well > almost) that when I zoom in with maxFeature = 5, i get *3* clusters each > worth 1 feature. It is clear from the zoomed in example with > maxFeatures = 1000 that there *are* more than 3 features at that zoom > level so I was expecting to see 5 features spread into N <= 5 clusters > so something is wrong there. If I zoom into the top right portion of my > zoomed out window, I see no feature. The same rubberband zoom with > maxFeatures = 1000 gives me some features ?? > > I saw a thread explaining the issue but I don't remember where. I will > investigate further and report if I find an explanation. > You are probably referring to http://n2.nabble.com/bbox-strategy-and-zooming-td1836240.html#a20489423 New features will only be fetched if you zoom out, not if you zoom in. I had forgotten about this thread in my previous reply, sorry for the confusion. You can make the BBOX strategy aggressive by instantiating your BBOX strategy like this: new OpenLayers.Strategy.BBOX(invalidBounds: function(){return true;}); This will cause features to be fetched also if you zoom in. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From arnd.wippermann at web.de Thu Jan 8 20:13:36 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <49664816.3000407@mapgears.com> Message-ID: Hi Alexandre, If you have found a solution, I would be interested. I have thought about a solution with all features on one vectorlayer and an attribute "group". I'm able to set the style of the features due to the zoomlevel, but I have no clue to hide features. // create the layer styleMap by giving the default style a context var colors = ["#FF0000", "#FF8000", "#FFFF00", "#80FF00", "#00FF00"]; var context = { getColor: function(feature) { var region = parseInt(feature.attributes['group']); if(map.getZoom()>5) return colors[region]; return colors[map.getZoom()]; } }; var template = { fillColor: "${getColor}", // using context.getColor(feature) strokeColor: "#FF0000", strokeWidth:3 }; map.layers[map.aktLayer].styleMap = new OpenLayers.Style(template, {context: context}); map.layers[map.aktLayer].redraw(); Perhaps Andreas you could gave a hint. In a previous post you have mentioned display:"none" to hide features, but i don't know where to use it. Especially can I use display:"none" with context and template? Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Andreas Hocevar Gesendet: Samstag, 3. Januar 2009 17:30 An: Heidt, Christopher M. Cc: users@openlayers.org Betreff: Re: [OpenLayers-Users] Hide features Hi, On Wed, Dec 3, 2008 at 10:05 PM, Heidt, Christopher M. wrote: > How do I hide features? > I did it by changing my opacity to 0, > but I need to find another way because my features can have multiple > styles, and I need the feature to retain whatever style it has when > hidden and reshown. You just need to set the symbolizer (style) property "display" to "none" (like in CSS). So instead of var symbolizer = { opacity: 0 } you set var symbolizer = { ... display: "none", ... } No other symbolizer properties will be lost (but the same is true for your opacity hack), and the feature will not be rendered until you delete the display property (or set it to a value other than "none"). Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Alexandre Dube Gesendet: Donnerstag, 8. Januar 2009 19:38 An: Andreas Hocevar Cc: OpenLayers users mailing list Betreff: Re: [OpenLayers-Users] Layer.Vector with multiple data sources Andreas Hocevar wrote: > On Thu, Jan 8, 2009 at 6:42 PM, Alexandre Dube wrote: > >> Andreas Hocevar wrote: >> >>> Alexandre Dube wrote: >>> It should be easy to customize the strategy you are using (I assume >>> Fixed or BBOX) to change the url and/or params of the protocol on >>> the zoomend event (similar to the moveend event handler in the BBOX >>> strategy). This strategy would then have to know the urls/params for >>> each zoom level, and you would just interact with one vector layer. >>> >>> >> Exactly. It's a common practice on the web to have data normalized >> by scales, so it would be quite useful to have such an upgrade. >> >> So, you would modify both BBOX and Fixed ? Do others have opinions >> about it ? >> > > No, I'd encourage you to do this on the application level because it > is less than 10 lines of code. If this is to become part of > OpenLayers, it should be a separate strategy (a layer can have > multiple strategies). > > Regards, > Andreas. > > Understood. I'll try to write a new strategy then. Thanks a lot for the tips. -- Alexandre Dub? Mapgears www.mapgears.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From eric.c2c at gmail.com Fri Jan 9 01:27:10 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:02 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <5b021dd0901081004k73d0bc74y160715c54311016e@mail.gmail.com> References: <49662138.4010300@mapgears.com> <496637EE.9010802@opengeo.org> <49663B21.9050201@mapgears.com> <5b021dd0901081004k73d0bc74y160715c54311016e@mail.gmail.com> Message-ID: <5ec103de0901082227w34d88dbbu8f9e01170b0f1330@mail.gmail.com> Yeah I agree, the re-configuration of the protocol could go in a separate, custom strategy. Cheers, Eric 2009/1/8, Andreas Hocevar : > On Thu, Jan 8, 2009 at 6:42 PM, Alexandre Dube wrote: >> Andreas Hocevar wrote: >>> Alexandre Dube wrote: >>> It should be easy to customize the strategy you are using (I assume >>> Fixed or BBOX) to change the url and/or params of the protocol on the >>> zoomend event (similar to the moveend event handler in the BBOX >>> strategy). This strategy would then have to know the urls/params for >>> each zoom level, and you would just interact with one vector layer. >>> >> Exactly. It's a common practice on the web to have data normalized by >> scales, so it would be quite useful to have such an upgrade. >> >> So, you would modify both BBOX and Fixed ? Do others have opinions >> about it ? > > No, I'd encourage you to do this on the application level because it > is less than 10 lines of code. If this is to become part of > OpenLayers, it should be a separate strategy (a layer can have > multiple strategies). > > Regards, > Andreas. > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ahocevar at opengeo.org Fri Jan 9 04:35:38 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: References: Message-ID: <49671A6A.8010108@opengeo.org> Hey Arnd- Arnd Wippermann wrote: > If you have found a solution, I would be interested. I have thought about a > solution with all features on one vectorlayer and an attribute "group". I'm > able to set the style of the features due to the zoomlevel, but I have no > clue to hide features. > See my proposals for a template and context which helps you do that below: > // create the layer styleMap by giving the default style a context > var colors = ["#FF0000", "#FF8000", "#FFFF00", "#80FF00", "#00FF00"]; > var context = { > getColor: function(feature) { > var region = parseInt(feature.attributes['group']); > if(map.getZoom()>5) > return colors[region]; > return colors[map.getZoom()]; > } > getVisibility: function(feature) { var visible = feature.attributes["group"] == visibleGroup; return visible ? "" : "none"; } > }; > var template = { > fillColor: "${getColor}", // using context.getColor(feature) > display: "${getVisibility}", > strokeColor: "#FF0000", > strokeWidth:3 > }; > map.layers[map.aktLayer].styleMap = new OpenLayers.Style(template, {context: > context}); > map.layers[map.aktLayer].redraw(); > > Perhaps Andreas you could gave a hint. In a previous post you have mentioned > display:"none" to hide features, but i don't know where to use it. > > Especially can I use display:"none" with context and template? > The above code snippet should answer your questions. It assumes that you have a global variable visibleGroup which contains the name of the group you want to show. If the value of this variable changes, you have to redraw the layer. Regards, Andreas. > Arnd Wippermann > > > > > > > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Andreas Hocevar > Gesendet: Samstag, 3. Januar 2009 17:30 > An: Heidt, Christopher M. > Cc: users@openlayers.org > Betreff: Re: [OpenLayers-Users] Hide features > > Hi, > > On Wed, Dec 3, 2008 at 10:05 PM, Heidt, Christopher M. > wrote: > >> How do I hide features? >> I did it by changing my opacity to 0, >> but I need to find another way because my features can have multiple >> styles, and I need the feature to retain whatever style it has when >> hidden and reshown. >> > > You just need to set the symbolizer (style) property "display" to "none" > (like in CSS). > > So instead of > var symbolizer = { > opacity: 0 > } > > you set > > var symbolizer = { > ... > display: "none", > ... > } > > No other symbolizer properties will be lost (but the same is true for your > opacity hack), and the feature will not be rendered until you delete the > display property (or set it to a value other than "none"). > > Regards, > Andreas. > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Alexandre Dube > Gesendet: Donnerstag, 8. Januar 2009 19:38 > An: Andreas Hocevar > Cc: OpenLayers users mailing list > Betreff: Re: [OpenLayers-Users] Layer.Vector with multiple data sources > > Andreas Hocevar wrote: > >> On Thu, Jan 8, 2009 at 6:42 PM, Alexandre Dube wrote: >> >> >>> Andreas Hocevar wrote: >>> >>> >>>> Alexandre Dube wrote: >>>> It should be easy to customize the strategy you are using (I assume >>>> Fixed or BBOX) to change the url and/or params of the protocol on >>>> the zoomend event (similar to the moveend event handler in the BBOX >>>> strategy). This strategy would then have to know the urls/params for >>>> each zoom level, and you would just interact with one vector layer. >>>> >>>> >>>> >>> Exactly. It's a common practice on the web to have data normalized >>> by scales, so it would be quite useful to have such an upgrade. >>> >>> So, you would modify both BBOX and Fixed ? Do others have opinions >>> about it ? >>> >>> >> No, I'd encourage you to do this on the application level because it >> is less than 10 lines of code. If this is to become part of >> OpenLayers, it should be a separate strategy (a layer can have >> multiple strategies). >> >> Regards, >> Andreas. >> >> >> > > Understood. I'll try to write a new strategy then. Thanks a lot for the > tips. > > -- > Alexandre Dub? > Mapgears > www.mapgears.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 eduardovg at gmrcanarias.com Fri Jan 9 04:51:33 2009 From: eduardovg at gmrcanarias.com (=?iso-8859-1?Q?Eduardo_Jos=E9_Vilela_G=F3mez?=) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Changing extension and map size dinamically Message-ID: <19F9DBE2EBDEC34FA496558FB8E50A0664D16D@merco22.mercocanarias.intranet.com> Hi, I'm trying to change map extension to adapt it to the div container that i change from two predefined sizes dinamically (normal aspect and a large and a bit more panned size), when I change from small mode to large mode, i do a map.zoomToExtent with the large predefined bounds, but the map seems to be limited and dont want to adapt it to the new size, i tried changing the map.restrictedExtent too, but no luck. What is the normal way to do this size changes dinamically? Thanks!! Este mensaje y cualquier archivo adjunto al mismo son confidenciales y ata?e exclusivamente a las personas a las que va dirigido. Toda opini?n vertida en el mismo es exclusiva de su autor y no representa necesariamente la opini?n de Gesti?n del Medio Rural de Canarias S.A.U. Si usted no es el destinatario de este mensaje, consid?rese advertido de que lo ha recibido por error y que cualquier uso, difusi?n o copia est?n absolutamente prohibidos, recomend?ndole la comunicaci?n de este hecho a la siguiente direcci?n de e-mail: protecciondedatos@gmrcanarias.com .Asimismo, se le advierte que toda la informaci?n personal contenida en este mensaje se encuentra protegida por la Ley 15/1999, del 13 de Diciembre de protecci?n de datos de car?cter personal, quedando totalmente prohibido su uso y/o tratamiento, as? como la cesi?n de aquella a terceros al margen de lo dispuesto en la citada ley protectora de datos personales y de su normativa de desarrollo. This email and any files transmitted with it are confidential and regarding exclusively to the receiver. Any opinion or comment included in it belongs exclusively to its author and not necessarily to Gesti?n del Medio Rural de Canarias S.A.U. Wrong receivers are not allowed to use the information provided in any form (copy, publicity,...). In case of wrong receiver, I would appreciate if you let me know: e-mail address: protecciondedatos@gmrcanarias.com .All personal information contained in this message is protected by the Spanish law (Ley 15/1999, de 13 de Diciembre de proteccion de datos de caracter personal), and it?s no allowed to use or communicate it to anyone out of the legal situations. Antes de imprimir este mensaje, aseg?rese de que es necesario. El medio ambiente est? en nuestras manos. Before printing this message remember that taking care of our environment is everyone responsibility. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090109/4af08622/attachment.html From igrcic at gmail.com Fri Jan 9 06:46:53 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Changing extension and map size dinamically In-Reply-To: <19F9DBE2EBDEC34FA496558FB8E50A0664D16D@merco22.mercocanarias.intranet.com> References: <19F9DBE2EBDEC34FA496558FB8E50A0664D16D@merco22.mercocanarias.intranet.com> Message-ID: Hola, as far as i know, map automatically extends to 100% of its div size. After you change div size, you call map.updateSize(); to refresh map dimensions! something like: map.events.register('zoomend', map, function(e){ map.updateSize(); }); Ta lue' 2009/1/9 Eduardo Jos? Vilela G?mez : > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From donald.kerr at dkerr.co.uk Fri Jan 9 07:53:34 2009 From: donald.kerr at dkerr.co.uk (Donald Kerr) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] OpenLayers and asp.net asmx Service Message-ID: Hi all, I'd like to connect to an asp.net asmx service which returns an array of points in xml. I would then parse through this and add markers for each coordinate pair. Is it possible to connect to and parse through the results of an asp.net asmx service returning xml? In addition to the above, I would then like to be able to drag a marker and save the new coordinates back to the database using Ajax. Again, is this possible. I have an example using asp.net with Ajax (aspx) and google maps but I would like to be able to do the same with OpenLayers and a standard html page i.e. no requirement for the server side stuff to be written in asp.net ajax (aspx). Any help really appreciated. Many thanks. Regards, Donald From derek at cmainfo.co.za Fri Jan 9 08:16:07 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] openLayers User Guide / Tutorial Message-ID: <1231506967524-2133117.post@n2.nabble.com> Hi I am new to this list and relatively new to openLayers. We already have a site developed with ASP.NET (VB) / MySQL / AJAX and using Manifold GIS. Due to a rather slow and clunky map we are in the process of re-developing the mapping interface to use Web Services / obout Suite controls / TileCache / openLayers. I have got to the point of having a fairly functional map, but I am looking for some kind of User Guide / Tutorial to work me through the intermediate to advanced functionality of openLayers. Right now I have numerous questions / things I want to do, but don't know where to find the information. -- View this message in context: http://n2.nabble.com/openLayers-User-Guide---Tutorial-tp2133117p2133117.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ks at geograf.dk Fri Jan 9 08:20:51 2009 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] openLayers User Guide / Tutorial In-Reply-To: <1231506967524-2133117.post@n2.nabble.com> References: <1231506967524-2133117.post@n2.nabble.com> Message-ID: <49674F33.2050204@geograf.dk> Is this close to what you are looking for: http://workshops.opengeo.org/openlayers/intro/doc/ Regards, Kenneth Skovhede, GEOGRAF A/S Derek Watling skrev: > Hi > I am new to this list and relatively new to openLayers. We already have a > site developed with ASP.NET (VB) / MySQL / AJAX and using Manifold GIS. Due > to a rather slow and clunky map we are in the process of re-developing the > mapping interface to use Web Services / obout Suite controls / TileCache / > openLayers. > > I have got to the point of having a fairly functional map, but I am looking > for some kind of User Guide / Tutorial to work me through the intermediate > to advanced functionality of openLayers. > > Right now I have numerous questions / things I want to do, but don't know > where to find the information. > From derek at cmainfo.co.za Fri Jan 9 08:32:36 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] openLayers User Guide / Tutorial In-Reply-To: <49674F33.2050204@geograf.dk> References: <1231506967524-2133117.post@n2.nabble.com> <49674F33.2050204@geograf.dk> Message-ID: <1231507956951-2133163.post@n2.nabble.com> Thanks Kenneth This is a good start, but I would like something that goes into more detail. -- View this message in context: http://n2.nabble.com/openLayers-User-Guide---Tutorial-tp2133117p2133163.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Fri Jan 9 08:37:27 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <5ec103de0901082227w34d88dbbu8f9e01170b0f1330@mail.gmail.com> References: <49662138.4010300@mapgears.com> <496637EE.9010802@opengeo.org> <49663B21.9050201@mapgears.com> <5b021dd0901081004k73d0bc74y160715c54311016e@mail.gmail.com> <5ec103de0901082227w34d88dbbu8f9e01170b0f1330@mail.gmail.com> Message-ID: <49675317.6030200@mapgears.com> I just read an other interesting thread Andreas Hocevar posted : << You can make the BBOX strategy aggressive by instantiating your BBOX strategy like this: new OpenLayers.Strategy.BBOX(invalidBounds: function(){return true;}); This will cause features to be fetched also if you zoom in. >> That's a behavior I should keep in mind while creating the separate strategy, but I'm not sure about one thing : would the new strategy require a BBOX or Fixed one ? The main idea of the custom strategy is to change the params of the layer while zooming and depending on the zoom level, but while we zoom in, the layer doesn't fetch new features by default, it keeps old ones. So the above Andreas idea could do the trick, but it's applied to the BBOX strategy. So my final question is : should I have in mind that my custom strategy would be dependent ? Thanks, Alexandre Eric Lemoine wrote: > Yeah I agree, the re-configuration of the protocol could go in a > separate, custom strategy. > > Cheers, > > Eric > > 2009/1/8, Andreas Hocevar : > >> On Thu, Jan 8, 2009 at 6:42 PM, Alexandre Dube wrote: >> >>> Andreas Hocevar wrote: >>> >>>> Alexandre Dube wrote: >>>> It should be easy to customize the strategy you are using (I assume >>>> Fixed or BBOX) to change the url and/or params of the protocol on the >>>> zoomend event (similar to the moveend event handler in the BBOX >>>> strategy). This strategy would then have to know the urls/params for >>>> each zoom level, and you would just interact with one vector layer. >>>> >>>> >>> Exactly. It's a common practice on the web to have data normalized by >>> scales, so it would be quite useful to have such an upgrade. >>> >>> So, you would modify both BBOX and Fixed ? Do others have opinions >>> about it ? >>> >> No, I'd encourage you to do this on the application level because it >> is less than 10 lines of code. If this is to become part of >> OpenLayers, it should be a separate strategy (a layer can have >> multiple strategies). >> >> Regards, >> Andreas. >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> -- Alexandre Dub? Mapgears www.mapgears.com From arnd.wippermann at web.de Fri Jan 9 08:37:42 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <49671A6A.8010108@opengeo.org> Message-ID: Hi Andreas, I have no luck so far. The following code is from the example styles-context.html, added the getVisibility. If you paste the code into firebug console for the openlayers homepage http://openlayers.org/, it will add a vector layer with points. At zoomLevel 0 the red points are set to display:"none", etc. But you can see, that the display property have no effect. Do I miss something? Mit freundlichen Gr??en Arnd Wippermann // Strategy 2: Style features based on something besides attributes. // create 50 random features in the southern hemisphere var features = new Array(50); for (var i=0; i References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> Message-ID: <1231509667.6276.8.camel@dell-desktop.example.com> > You are probably referring to > http://n2.nabble.com/bbox-strategy-and-zooming-td1836240.html#a20489423 Yep. > > New features will only be fetched if you zoom out, not if you zoom in. I > had forgotten about this thread in my previous reply, sorry for the > confusion. I realized that indeed. > You can make the BBOX strategy aggressive by instantiating your BBOX > strategy like this: > > new OpenLayers.Strategy.BBOX(invalidBounds: function(){return true;}); This gives a syntax error. I replaced ":" with "=" and it works syntaxically but that's it. I understand you want me to force the invalidBounds function to return true by overloading it, but it doesn't seem to work. Looking in BBOX.js, there is this : /** * Method: update * Callback function called on "moveend" or "refresh" layer events. * * Parameters: * options - {Object} An object with a property named "force", this * property references a boolean value indicating if new data * must be incondtionally read. I don't know how to set that property to true in the code. I tried References: <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> Message-ID: <20090109140436.GC11702@metacarta.com> On Fri, Jan 09, 2009 at 09:01:07AM -0500, Yves Moisan wrote: > > > You are probably referring to > > http://n2.nabble.com/bbox-strategy-and-zooming-td1836240.html#a20489423 > > Yep. > > > > New features will only be fetched if you zoom out, not if you zoom in. I > > had forgotten about this thread in my previous reply, sorry for the > > confusion. > > I realized that indeed. > > > You can make the BBOX strategy aggressive by instantiating your BBOX > > strategy like this: > > > > new OpenLayers.Strategy.BBOX(invalidBounds: function(){return true;}); > > This gives a syntax error. I replaced ":" with "=" and it works > syntaxically but that's it. I understand you want me to force the > invalidBounds function to return true by overloading it, but it doesn't > seem to work. Looking in BBOX.js, there is this : .BBOX({invalidBounds: function() { return true; } }); Is probably what he meant to type. Regards, -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Fri Jan 9 09:29:33 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <49675317.6030200@mapgears.com> References: <49662138.4010300@mapgears.com> <496637EE.9010802@opengeo.org> <49663B21.9050201@mapgears.com> <5b021dd0901081004k73d0bc74y160715c54311016e@mail.gmail.com> <5ec103de0901082227w34d88dbbu8f9e01170b0f1330@mail.gmail.com> <49675317.6030200@mapgears.com> Message-ID: <5ec103de0901090629q611edd2ckfd7fa39fae60e3ae@mail.gmail.com> On Fri, Jan 9, 2009 at 2:37 PM, Alexandre Dube wrote: > I just read an other interesting thread Andreas Hocevar posted : > << > > You can make the BBOX strategy aggressive by instantiating your BBOX > strategy like this: > > new OpenLayers.Strategy.BBOX(invalidBounds: function(){return true;}); > > This will cause features to be fetched also if you zoom in. > >>> > > That's a behavior I should keep in mind while creating the separate > strategy, but I'm not sure about one thing : would the new strategy require > a BBOX or Fixed one ? Yes. > The main idea of the custom strategy is to change the > params of the layer while zooming and depending on the zoom level, but while > we zoom in, the layer doesn't fetch new features by default, it keeps old > ones. So the above Andreas idea could do the trick, but it's applied to the > BBOX strategy. > > So my final question is : should I have in mind that my custom strategy > would be dependent ? It's a custom strategy, so you can live with it working only with the bbox strategy, can't you? -- Eric From ahocevar at opengeo.org Fri Jan 9 09:32:51 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231509667.6276.8.camel@dell-desktop.example.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> Message-ID: <49676013.9090309@opengeo.org> Yves Moisan wrote: >> You are probably referring to >> http://n2.nabble.com/bbox-strategy-and-zooming-td1836240.html#a20489423 > > Yep. >> New features will only be fetched if you zoom out, not if you zoom in. I >> had forgotten about this thread in my previous reply, sorry for the >> confusion. > > I realized that indeed. > >> You can make the BBOX strategy aggressive by instantiating your BBOX >> strategy like this: >> >> new OpenLayers.Strategy.BBOX(invalidBounds: function(){return true;}); > > This gives a syntax error. I replaced ":" with "=" and it works My bad. It should read new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}}) Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From adube at mapgears.com Fri Jan 9 09:32:51 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <5ec103de0901090629q611edd2ckfd7fa39fae60e3ae@mail.gmail.com> References: <49662138.4010300@mapgears.com> <496637EE.9010802@opengeo.org> <49663B21.9050201@mapgears.com> <5b021dd0901081004k73d0bc74y160715c54311016e@mail.gmail.com> <5ec103de0901082227w34d88dbbu8f9e01170b0f1330@mail.gmail.com> <49675317.6030200@mapgears.com> <5ec103de0901090629q611edd2ckfd7fa39fae60e3ae@mail.gmail.com> Message-ID: <49676013.7030105@mapgears.com> Eric Lemoine wrote: > > It's a custom strategy, so you can live with it working only with the > bbox strategy, can't you? > > -- > Eric > Absolutely. I wasn't 100% confident about it, that's all. Thanks for the hints. -- Alexandre Dub? Mapgears www.mapgears.com From zac.spitzer at gmail.com Fri Jan 9 09:34:15 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <49676013.9090309@opengeo.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> <49676013.9090309@opengeo.org> Message-ID: <7a85053e0901090634odd2e96ahf73ed65d2eed23ce@mail.gmail.com> OpenLayers.Strategy.Tiled would be really performant :) On Sat, Jan 10, 2009 at 1:32 AM, Andreas Hocevar wrote: > Yves Moisan wrote: >>> You are probably referring to >>> http://n2.nabble.com/bbox-strategy-and-zooming-td1836240.html#a20489423 >> >> Yep. >>> New features will only be fetched if you zoom out, not if you zoom in. I >>> had forgotten about this thread in my previous reply, sorry for the >>> confusion. >> >> I realized that indeed. >> >>> You can make the BBOX strategy aggressive by instantiating your BBOX >>> strategy like this: >>> >>> new OpenLayers.Strategy.BBOX(invalidBounds: function(){return true;}); >> >> This gives a syntax error. I replaced ":" with "=" and it works > > My bad. It should read > new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}}) > > Regards, > Andreas. > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From psingler at gmx.de Fri Jan 9 10:08:05 2009 From: psingler at gmx.de (KartoPete) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] different DragControls on 2 different layers conflict! Message-ID: <1231513685546-2133595.post@n2.nabble.com> Hi guys, I#ve got two layers which are to be seen at the same time. For each layer I#ve got a different Control.DragFeature. If I activate both I get a conflict and not both are dragable. Is there any way to handle this? I tried to activate/deactivate on a mouseover at one of the features, but it doesn't work. thx, Pete -- View this message in context: http://n2.nabble.com/different-DragControls-on-2-different-layers-conflict%21-tp2133595p2133595.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Fri Jan 9 10:22:42 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: References: <49671A6A.8010108@opengeo.org> Message-ID: <5b021dd0901090722q6f36874fm7ec742f2adae6bd9@mail.gmail.com> Arnd, On Fri, Jan 9, 2009 at 2:37 PM, Arnd Wippermann wrote: > I have no luck so far. > > The following code is from the example styles-context.html, added the > getVisibility. If you paste the code into firebug console for the openlayers > homepage http://openlayers.org/, it will add a vector layer with points. At > zoomLevel 0 the red points are set to display:"none", etc. > > But you can see, that the display property have no effect. Do I miss > something? On the contrary! You have found a bug. See http://trac.openlayers.org/ticket/1898 for a fix. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From richard.greenwood at gmail.com Fri Jan 9 10:24:48 2009 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Google as non base layer Message-ID: Is it possible to use Google, or Virtual Earth, as a foreground layer rather than a background layer? I'd like to thematically map habitat polygons and then overlay them with Google's standard view to get roads and cities. Thanks, Rich -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From mc.prins at gmail.com Fri Jan 9 10:30:50 2009 From: mc.prins at gmail.com (Mark Prins) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Which Content Management System to use In-Reply-To: References: Message-ID: Drupal has the mapping kit http://drupal.org/project/mappingkit ready to go.. examples @ http://aardbodem.nl/node/26 I have a work in progress for Dokuwiki which you could use as a cms http://www.dokuwiki.org/plugin:openlayersmap From aboudreault at mapgears.com Fri Jan 9 10:33:21 2009 From: aboudreault at mapgears.com (Alan Boudreault) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] How to implement draggable Markers? In-Reply-To: <1231429663889-2128501.post@n2.nabble.com> References: <1231341589485-2122977.post@n2.nabble.com> <4964CA29.7060206@mapgears.com> <1231344327994-2123235.post@n2.nabble.com> <4964DE5E.7010709@mapgears.com> <008e01c97178$4ca2c640$e5e852c0$@c.duarte@co.sapo.pt> <1231429663889-2128501.post@n2.nabble.com> Message-ID: <49676E41.7010609@mapgears.com> I think that's why the "mouseup" event was register with Priority...... it's this event that stop the mousemove one. Just add a boolean member "DragEnabled" and the mousemove event will do it's work only if the this variable is set. Alan KartoPete wrote: > good idea, > I tried first version and can't stop the mousemove event. Any ideas? If it > would be my own code I would do it different, but I#m stuck in many code > from another author, who worked on the project before. My actuell > DraggableMarkerClass looks like this: > OpenLayers.Marker.DraggableMarker = OpenLayers.Class(OpenLayers.Marker, { > > layer: null, > currentEvent: null, > > registerEvents: function(){ > this.events.registerPriority('mousedown', this, this.onMarkerDown); > this.map.events.register('mouseup', this, this.onMarkerUp); > }, > > onMarkerDown: function(){ > this.map.events.register('mousemove', this, this.onMove); > }, > onMarkerUp: function(){ > > Event.stop(this.currentEvent); > > }, > onMove: function(e){ > var lonlat = this.map.getLonLatFromViewPortPx(e.xy); > var marker = new OpenLayers.Marker.DraggableMarker(new > OpenLayers.LonLat(lonlat.lon,lonlat.lat), markerIcon2.clone()); > this.layer.clearMarkers(); > this.layer.addMarker(marker); > this.currentEvent = e; > }, > > > CLASS_NAME: "OpenLayers.Marker.DraggableMarker" > }); > > As I already said, I can't stop the mousemove-Event! > Any ideas? > thx, > Pete > -- Alan Boudreault Mapgears http://www.mapgears.com From crschmidt at metacarta.com Fri Jan 9 10:37:05 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Google as non base layer In-Reply-To: References: Message-ID: <20090109153705.GD11702@metacarta.com> On Fri, Jan 09, 2009 at 08:24:48AM -0700, Richard Greenwood wrote: > Is it possible to use Google, or Virtual Earth, as a foreground layer > rather than a background layer? I'd like to thematically map habitat > polygons and then overlay them with Google's standard view to get > roads and cities. Not as OpenLayers stands. It might be possible to hack it -- I've seen it done -- but it's not easy. Regards, -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Fri Jan 9 12:01:20 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] different DragControls on 2 different layers conflict! In-Reply-To: <1231513685546-2133595.post@n2.nabble.com> References: <1231513685546-2133595.post@n2.nabble.com> Message-ID: <5ec103de0901090901udb270a0qbe8dfdf5826bf87c@mail.gmail.com> Hi. You won't be able to have two drag feature controls (configured with two different layers) working at the same time. For this to work we need support for feature selection with multiple layers, which we don't have at this point. Cheers, Eric 2009/1/9, KartoPete : > > Hi guys, > I#ve got two layers which are to be seen at the same time. For each layer > I#ve got a different Control.DragFeature. If I activate both I get a > conflict and not both are dragable. Is there any way to handle this? I tried > to activate/deactivate on a mouseover at one of the features, but it doesn't > work. > thx, > Pete > -- > View this message in context: > http://n2.nabble.com/different-DragControls-on-2-different-layers-conflict%21-tp2133595p2133595.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 eric.c2c at gmail.com Fri Jan 9 12:14:22 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <7a85053e0901090634odd2e96ahf73ed65d2eed23ce@mail.gmail.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> <49676013.9090309@opengeo.org> <7a85053e0901090634odd2e96ahf73ed65d2eed23ce@mail.gmail.com> Message-ID: <5ec103de0901090914oc6791bp6e7ed9ba4fc927aa@mail.gmail.com> Hi Zac I started working on a OpenLayers.Strategy.Grid strategy a while back. It works like the BBOX strategy except that features are arranged in a grid. I stopped this because of lack of funding, I hope I will continue it eventually. The code is in the vector-behavior sandbox if you're interested. Cheers, Eric Eric 2009/1/9, Zac Spitzer : > OpenLayers.Strategy.Tiled would be really performant :) > > On Sat, Jan 10, 2009 at 1:32 AM, Andreas Hocevar > wrote: >> Yves Moisan wrote: >>>> You are probably referring to >>>> http://n2.nabble.com/bbox-strategy-and-zooming-td1836240.html#a20489423 >>> >>> Yep. >>>> New features will only be fetched if you zoom out, not if you zoom in. I >>>> had forgotten about this thread in my previous reply, sorry for the >>>> confusion. >>> >>> I realized that indeed. >>> >>>> You can make the BBOX strategy aggressive by instantiating your BBOX >>>> strategy like this: >>>> >>>> new OpenLayers.Strategy.BBOX(invalidBounds: function(){return true;}); >>> >>> This gives a syntax error. I replaced ":" with "=" and it works >> >> My bad. It should read >> new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}}) >> >> Regards, >> Andreas. >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Zac Spitzer - > http://zacster.blogspot.com > +61 405 847 168 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From arnd.wippermann at web.de Fri Jan 9 12:54:16 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Layer.Vector with multiple data sources In-Reply-To: <5b021dd0901090722q6f36874fm7ec742f2adae6bd9@mail.gmail.com> Message-ID: Thanks Now it works as expected Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: andreas.hocevar@gmail.com [mailto:andreas.hocevar@gmail.com] Im Auftrag von Andreas Hocevar Gesendet: Freitag, 9. Januar 2009 16:23 An: Arnd Wippermann Cc: users@openlayers.org Betreff: Re: [OpenLayers-Users] Layer.Vector with multiple data sources Arnd, On Fri, Jan 9, 2009 at 2:37 PM, Arnd Wippermann wrote: > I have no luck so far. > > The following code is from the example styles-context.html, added the > getVisibility. If you paste the code into firebug console for the > openlayers homepage http://openlayers.org/, it will add a vector layer > with points. At zoomLevel 0 the red points are set to display:"none", etc. > > But you can see, that the display property have no effect. Do I miss > something? On the contrary! You have found a bug. See http://trac.openlayers.org/ticket/1898 for a fix. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From eric.c2c at gmail.com Fri Jan 9 12:55:41 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] BBOX strategy with scale In-Reply-To: <7a85053e0901071712u764d346dtc8d84338a351d2b5@mail.gmail.com> References: <7a85053e0901071712u764d346dtc8d84338a351d2b5@mail.gmail.com> Message-ID: <5ec103de0901090955y2a1f465cv4c892eb7d11943ab@mail.gmail.com> Hi You can write a custom strategy that register a zoomend listener on the map and have this listener change the protocol params. Go back to the list if you need more detail. Cheers, Eric 2009/1/8, Zac Spitzer : > Is there a way to pass the current scale within this request? > > poi_layer = new OpenLayers.Layer.Vector("POI", { > strategies: [new OpenLayers.Strategy.BBOX()], > protocol: new OpenLayers.Protocol.HTTP({ > url: "/explore/poi_json.cfm", > params: { scale: map.getZoom() }, > format: new OpenLayers.Format.GeoJSON() > }), > styleMap: new OpenLayers.StyleMap(style) > }); > > at the moment, the scale is only calculated once > and is always passed at the initial scale > > z > > -- > Zac Spitzer - > http://zacster.blogspot.com > +61 405 847 168 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From eric.c2c at gmail.com Fri Jan 9 12:58:12 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] How can i group layers In-Reply-To: <1231321791574-2121563.post@n2.nabble.com> References: <1231321791574-2121563.post@n2.nabble.com> Message-ID: <5ec103de0901090958i73ee9a7bm81977b5f97875eec@mail.gmail.com> Hi You want to group layer in the layer switcher? Please provide the list with more detail to get help. Cheers Eric 2009/1/7, worklikeadevil : > > Hi list, > I want to group some thematically similar layer under one "group layer". Is > there a possibility to do this? In the api i didn't find something similar > under "layer". > kindly > Albrecht > -- > View this message in context: > http://n2.nabble.com/How-can-i-group-layers-tp2121563p2121563.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 CHRISTOPHER.M.HEIDT at saic.com Fri Jan 9 13:28:24 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] different DragControls on 2 different layersconflict! References: <1231513685546-2133595.post@n2.nabble.com> <5ec103de0901090901udb270a0qbe8dfdf5826bf87c@mail.gmail.com> Message-ID: <1053B20F24D85F41B57F168351684E221F6B2F@0015-its-exmb04.us.saic.com> i implemented an external toggle btn that switchs which control is active. The good side effect of this is that the layer with the stuff ive chosen to select comes to the front of the stack, making it a nice way of dealing with overlaped items on dif layers as well. -----Original Message----- From: users-bounces@openlayers.org on behalf of Eric Lemoine Sent: Fri 1/9/2009 12:01 PM To: KartoPete; users@openlayers.org Subject: Re: [OpenLayers-Users] different DragControls on 2 different layersconflict! Hi. You won't be able to have two drag feature controls (configured with two different layers) working at the same time. For this to work we need support for feature selection with multiple layers, which we don't have at this point. Cheers, Eric 2009/1/9, KartoPete : > > Hi guys, > I#ve got two layers which are to be seen at the same time. For each layer > I#ve got a different Control.DragFeature. If I activate both I get a > conflict and not both are dragable. Is there any way to handle this? I tried > to activate/deactivate on a mouseover at one of the features, but it doesn't > work. > thx, > Pete > -- > View this message in context: > http://n2.nabble.com/different-DragControls-on-2-different-layers-conflict%21-tp2133595p2133595.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090109/f17430a6/attachment.html From tschaub at opengeo.org Fri Jan 9 13:44:39 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] setting the colour of a GML layer In-Reply-To: <496513FE.1020000@pinan.co.uk> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <496508EB.7070400@pinan.co.uk> <20090107202444.GO10452@metacarta.com> <496513FE.1020000@pinan.co.uk> Message-ID: <49679B17.4080701@opengeo.org> Hey- Dave Potts wrote: > Christopher Schmidt wrote: > Hi Chris > > Thank you for such a prompt answer, I had expect the colour information > to be kept in the gml file. But I have a play with this interface. If you really are delivering style data with your features (feature attributes with colors for example), you can use those attribute names in your symbolizers. See the doc Chris put together for this bit: var s = new OpenLayers.Style({ 'pointRadius': 10, 'externalGraphic': '${thumbnail}' }); That would assume you have a "thumbnail" attribute in on your feature (in your GML). You can imagine the same for fillColor etc. Also see the style related examples: http://openlayers.org/dev/examples/?q=style Tim > Dave. >> On Wed, Jan 07, 2009 at 07:56:27PM +0000, Dave Potts wrote: >> >>> Is there any way of setting the colour that is used to draw a gml >>> feature? >>> >> >> Yes. >> http://docs.openlayers.org/library/feature_styling >> >> >>> Dave >>> >> >> >>> begin:vcard >>> fn:David Potts >>> n:Potts;David >>> x-mozilla-html:FALSE >>> version:2.1 >>> end:vcard >>> >>> >> >> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> >> >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From tschaub at opengeo.org Fri Jan 9 13:51:02 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] How to implement draggable Markers? In-Reply-To: <49676E41.7010609@mapgears.com> References: <1231341589485-2122977.post@n2.nabble.com> <4964CA29.7060206@mapgears.com> <1231344327994-2123235.post@n2.nabble.com> <4964DE5E.7010709@mapgears.com> <008e01c97178$4ca2c640$e5e852c0$@c.duarte@co.sapo.pt> <1231429663889-2128501.post@n2.nabble.com> <49676E41.7010609@mapgears.com> Message-ID: <49679C96.7050008@opengeo.org> Or, consider resurrecting Chris' DragMarker control: http://trac.openlayers.org/browser/sandbox/tschaub/feature/lib/OpenLayers/Control/DragMarker.js Can't remember why that didn't work. Chris probably already replied and I missed it. Tim PS - I think we should start discussing an easier way to make things draggable. There are certainly plenty of good solutions in other frameworks. Dragging is a pretty primary operation in map related apps. Would be good to have an elegant solution that was reusable for various elements. Alan Boudreault wrote: > I think that's why the "mouseup" event was register with Priority...... > it's this event that stop the mousemove one. Just add a boolean member > "DragEnabled" and the mousemove event will do it's work only if the this > variable is set. > > Alan > > KartoPete wrote: >> good idea, >> I tried first version and can't stop the mousemove event. Any ideas? If it >> would be my own code I would do it different, but I#m stuck in many code >> from another author, who worked on the project before. My actuell >> DraggableMarkerClass looks like this: >> OpenLayers.Marker.DraggableMarker = OpenLayers.Class(OpenLayers.Marker, { >> >> layer: null, >> currentEvent: null, >> >> registerEvents: function(){ >> this.events.registerPriority('mousedown', this, this.onMarkerDown); >> this.map.events.register('mouseup', this, this.onMarkerUp); >> }, >> >> onMarkerDown: function(){ >> this.map.events.register('mousemove', this, this.onMove); >> }, >> onMarkerUp: function(){ >> >> Event.stop(this.currentEvent); >> >> }, >> onMove: function(e){ >> var lonlat = this.map.getLonLatFromViewPortPx(e.xy); >> var marker = new OpenLayers.Marker.DraggableMarker(new >> OpenLayers.LonLat(lonlat.lon,lonlat.lat), markerIcon2.clone()); >> this.layer.clearMarkers(); >> this.layer.addMarker(marker); >> this.currentEvent = e; >> }, >> >> >> CLASS_NAME: "OpenLayers.Marker.DraggableMarker" >> }); >> >> As I already said, I can't stop the mousemove-Event! >> Any ideas? >> thx, >> Pete >> > > -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From tschaub at opengeo.org Fri Jan 9 13:53:00 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] openLayers User Guide / Tutorial In-Reply-To: <1231507956951-2133163.post@n2.nabble.com> References: <1231506967524-2133117.post@n2.nabble.com> <49674F33.2050204@geograf.dk> <1231507956951-2133163.post@n2.nabble.com> Message-ID: <49679D0C.3020904@opengeo.org> Hey- Derek Watling wrote: > Thanks Kenneth > This is a good start, but I would like something that goes into more detail. My suggestion: Take notes as you learn. Contribute what you can. Thanks, Tim -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From rwburgholzer at deq.virginia.gov Fri Jan 9 14:00:02 2009 From: rwburgholzer at deq.virginia.gov (Burgholzer,Robert) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Online Dynamic Systems Modeling Suite - release 1.0 Message-ID: <6C097DA58429B743A67070F98BE73A370379B76C@deqex01.deq.local> (Sorry for cross-posting) This is an announcement of the official release of software for creating system dynamics models using nothing but a web-browser. This software is constructed of 100% Open Source software, and leverages such geospatial products as PostGIS, UMN MapServer and OpenLayers. User accounts are free, and registration is simple. The system can be accessed at: http://www.soulswimmer.net/wooomm/ A set of basic tutorials for using the system can be found at: http://www.soulswimmer.net/wooomm/doc/tutorials.html All feedback is welcome!! WOOOMM 1.0 (WOOOMM is Online Object Oriented Meta Modeling) is the initial release of a system for creating collaborative models of dynamic systems. This release was actually preceded by the WHO (Web Hydrology Objects) system, and is repackaged and renamed in recognition that the goals of the system extend far beyond the realm of hydrology. This modeling system aims to be a robust tool for creating models of dynamic systems in a collaborative web-based environment. These models may be created from scratch, using only the standard object components in WOOOMM, or by integrating other existing models that have been coupled with WOOOMM, and thus creating an integrated meta-model. -- Robert W. Burgholzer Home Page: http://www.soulswimmer.net/wooomm/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090109/4b49b766/attachment.html From tschaub at opengeo.org Fri Jan 9 14:08:17 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Map Labeling In-Reply-To: <20090107003518.GK10452@metacarta.com> References: <4963E8F4.1070609@gisnet.com> <20090107003518.GK10452@metacarta.com> Message-ID: <4967A0A1.7010708@opengeo.org> Hey- Christopher Schmidt wrote: > On Tue, Jan 06, 2009 at 04:27:48PM -0700, Bill Thoen wrote: >> I have a vector layer of points with associated attributes and I want to >> use one of those attributes as a label for the points. I thought this >> would be simple, but it's proving to be elusive. Can someone here >> explain how to do this in OpenLayers 2.7? > > This is not possible in OpenLayers. Yes, this is not functionality provided in OpenLayers 2.7. However, it is an enhancement that is entirely within reach. Features like this are typically contributed by developers who are paid to make specific contributions (or by those that find themselves with unexpected free time that coincides with unseasonably bad weather). Tim > > Regards, -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From tschaub at opengeo.org Fri Jan 9 14:55:03 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Map Labeling In-Reply-To: <4967A0A1.7010708@opengeo.org> References: <4963E8F4.1070609@gisnet.com> <20090107003518.GK10452@metacarta.com> <4967A0A1.7010708@opengeo.org> Message-ID: <4967AB97.8000509@opengeo.org> Hey- Tim Schaub wrote: > Hey- > > Christopher Schmidt wrote: >> On Tue, Jan 06, 2009 at 04:27:48PM -0700, Bill Thoen wrote: >>> I have a vector layer of points with associated attributes and I want to >>> use one of those attributes as a label for the points. I thought this >>> would be simple, but it's proving to be elusive. Can someone here >>> explain how to do this in OpenLayers 2.7? >> This is not possible in OpenLayers. > > Yes, this is not functionality provided in OpenLayers 2.7. However, it > is an enhancement that is entirely within reach. Features like this are > typically contributed by developers who are paid to make specific > contributions (or by those that find themselves with unexpected free > time that coincides with unseasonably bad weather). > Timely: http://trac.openlayers.org/ticket/1895 just got a patch. > Tim > >> Regards, > > -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From bthoen at gisnet.com Fri Jan 9 15:24:27 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Example Needed Demonstrating OpenLayers.Request Message-ID: <4967B27B.2010906@gisnet.com> Does anyone have a simple example showing how to use OpenLayers.Request to move data back and forth between an OL application and a PostgreSQL/PostGIS database? I got this to work using zXml library calls, but if I can do the same thing from within the OpenLayers framework, then I wouldn't need to load that library. Unfortunately, I'm still pretty new to AJAX, and the lack of detailed documentation on the OpenLayers.Request class puts this out of my reach without some help. TIA, - Bill Thoen From crschmidt at metacarta.com Fri Jan 9 15:22:04 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Example Needed Demonstrating OpenLayers.Request In-Reply-To: <4967B27B.2010906@gisnet.com> References: <4967B27B.2010906@gisnet.com> Message-ID: <20090109202204.GH11702@metacarta.com> On Fri, Jan 09, 2009 at 01:24:27PM -0700, Bill Thoen wrote: > Does anyone have a simple example showing how to use OpenLayers.Request > to move data back and forth between an OL application and a > PostgreSQL/PostGIS database? I got this to work using zXml library > calls, but if I can do the same thing from within the OpenLayers > framework, then I wouldn't need to load that library. Unfortunately, I'm > still pretty new to AJAX, and the lack of detailed documentation on the > OpenLayers.Request class puts this out of my reach without some help. More than: http://trac.openlayers.org/wiki/Request Isn't somethign I'd know how to write at this point anyway. Can you explain what that page doesn't tell you that you feel you need to know? Regards, -- Christopher Schmidt MetaCarta From eider at fh-bingen.de Fri Jan 9 15:46:07 2009 From: eider at fh-bingen.de (eider@fh-bingen.de) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Example Needed Demonstrating OpenLayers.Request In-Reply-To: <4967B27B.2010906@gisnet.com> References: <4967B27B.2010906@gisnet.com> Message-ID: <20090109214607.151444xkl2m1mqa7@mx1.fh-bingen.de> Just use WFS-T and GeoServer as components between OpenLayers and Postgis Quoting "Bill Thoen" : > Does anyone have a simple example showing how to use OpenLayers.Request > to move data back and forth between an OL application and a > PostgreSQL/PostGIS database? I got this to work using zXml library > calls, but if I can do the same thing from within the OpenLayers > framework, then I wouldn't need to load that library. Unfortunately, I'm > still pretty new to AJAX, and the lack of detailed documentation on the > OpenLayers.Request class puts this out of my reach without some help. > > TIA, > - Bill Thoen > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From bthoen at gisnet.com Fri Jan 9 16:16:00 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Example Needed Demonstrating OpenLayers.Request Message-ID: <4967BE90.7030106@gisnet.com> Christopher Schmidt wrote: > On Fri, Jan 09, 2009 at 01:24:27PM -0700, Bill Thoen wrote: > >> Does anyone have a simple example showing how to use OpenLayers.Request >> to move data back and forth between an OL application and a >> PostgreSQL/PostGIS database? I got this to work using zXml library >> calls, but if I can do the same thing from within the OpenLayers >> framework, then I wouldn't need to load that library. Unfortunately, I'm >> still pretty new to AJAX, and the lack of detailed documentation on the >> OpenLayers.Request class puts this out of my reach without some help. >> > > More than: > > http://trac.openlayers.org/wiki/Request > > Isn't somethign I'd know how to write at this point anyway. Can you > explain what that page doesn't tell you that you feel you need to know? > > Regards, > Thanks, I didn't see this. But even this is still too abstract for me because I don't yet have a good grip on how AJAX is supposed to work and what configuration settings I need to modify vs what's already set up as defaults. Here's what I've got using the zXml library (this works, but I'd rather not load the zXml library if I've got what I need in OpenLayers): var oXHR = zXmlHttp.createRequest(); oXHR.open( "POST", "sql.php", true ); oXHR.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); oXHR.setRequestHeader("Content-length", params.length); oXHR.setRequestHeader("Connection", "close"); oXHR.onreadystatechange = function() { if( oXHR.readyState == 4 ) { xmlDoc = oXHR.responseXML; // parse the results here } } oXHR.send( params ); What I want to know is how to modify this to use the OpenLayers library instead of the zXml one. Questions I have are: is it 'sql.php' that I set the url to? Are those headers standard with the default configuration or do I have to add them? The 'params' variable here holds a complete SQL query that I pass to the database via a PHP script called sql.php. Is that considered the 'data', or should it be specified under a different config parameter? I imagine that the callback is the onreadystatechange function which will probably have to be made into a named function, right? As you can probably tell, I don't really know enough yet about AJAX to even know what I don't know, so I'm sort of like a blind dog in a meat market, stabbing at anything that smells good. I don't even know if this is what I want to do, but it seems like the right track to take for accessing my PostgreSQL database from an OpenLayers application. I could use a clue or two if anyone has some advice or some pointers to more information about working with databases from OpenLayers. From yves.moisan at boreal-is.com Fri Jan 9 16:18:03 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <49676013.9090309@opengeo.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> <49676013.9090309@opengeo.org> Message-ID: <1231535883.6276.35.camel@dell-desktop.example.com> > My bad. It should read > new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}}) Well, I was dumb enough to stick it in the Cluster() strategy of my 2-strategy layer on my side of the story :-(. At any rate, I can confirm that an XHR is done on zoom in now. I still have issues though. One peculiar thing is that for some reason the BBOX issued by OL to the server is consistenly larger than the one specified in map.zoomToExtent. Here are numbers (HTML = map.zoomToExtent(new OpenLayers.Bounds()); and "Output BBOX" is sent out to the server) : Case 1 : specified CSS for map
: w X h = 512 X 256 HTML : 26.1925,-10.5710,26.1935,-10.5705 Output BBOX : 26.191626708984373,-10.571436645507813,26.194373291015623,-10.570063354492188 HTML = previous output BBOX = 26.191626708984373,-10.571436645507813,26.194373291015623,-10.570063354492188 Output BBOX : 26.190253417968748,-10.572123291015625,26.195746582031248,-10.569376708984375 HTML = previous output BBOX = 26.190253417968748,-10.572123291015625,26.195746582031248,-10.569376708984375 Output BBOX : 26.187506835937498,-10.57349658203125,26.198493164062498,-10.56800341796875 Case 2 : Map
CSS unspecified (defaults to screen width and some height) HTML = 26.1925,-10.5710,26.1935,-10.5705 Output BBOX : 26.18567756938934,-10.572552385597229,26.200322430610655,-10.56850761440277 HTML = previous output BBOX = 26.18567756938934,-10.572552385597229,26.200322430610655,-10.56850761440277 Output BBOX : 26.178355138778684,-10.574574771194458,26.20764486122131,-10.566485228805542 At first, I thought this had to do with me specifying BBOX values that didn't quite match the width/height of my div but taking the output BBOX and shoving it back into the HTML (which I thought to myself must be "OL-compliant" as it generated it) still shows a zooming out behaviour. I then figured there might be an interference between the two strategies so I tested with BBOX + Cluster and BBOX separately. Same behaviour. There are also issues with the masfeatures parameter : a small number of maxfeatures might bring in less features than maxfeatures even though the number of features definitely is more than maxfeatures. To illustrate results comparing BBOX alone and Cluster, see : http://www.flickr.com/photos/30818159@N05/3182451399/ shows BBOX + Cluster (maxFeatures = 200) on the left and BBOX alone on the right. Both return 101 features. Good http://www.flickr.com/photos/30818159@N05/3182451587/ shows BBOX + Cluster maxFeatures = 200 on the left (results in 101 features) and maxFeatures = 10 on the right (results in 9 features ???). There clearly should be 10 features returned. Same for BBOX alone (the 9 features are apparent on the right) : http://www.flickr.com/photos/30818159@N05/3182451511/ Thanx to you and Chris, Yves From crschmidt at metacarta.com Fri Jan 9 16:19:42 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231535883.6276.35.camel@dell-desktop.example.com> References: <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> <49676013.9090309@opengeo.org> <1231535883.6276.35.camel@dell-desktop.example.com> Message-ID: <20090109211942.GK11702@metacarta.com> On Fri, Jan 09, 2009 at 04:18:03PM -0500, Yves Moisan wrote: > > > My bad. It should read > > new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}}) > > Well, I was dumb enough to stick it in the Cluster() strategy of my > 2-strategy layer on my side of the story :-(. At any rate, I can > confirm that an XHR is done on zoom in now. > > I still have issues though. One peculiar thing is that for some reason > the BBOX issued by OL to the server is consistenly larger than the one > specified in map.zoomToExtent. Here are numbers (HTML = > map.zoomToExtent(new OpenLayers.Bounds()); and "Output BBOX" is sent out > to the server) : http://dev.openlayers.org/docs/files/OpenLayers/Strategy/BBOX-js.html#OpenLayers.Strategy.BBOX.ratio > Case 1 : specified CSS for map
: w X h = 512 X 256 > > HTML : 26.1925,-10.5710,26.1935,-10.5705 > > Output BBOX : > 26.191626708984373,-10.571436645507813,26.194373291015623,-10.570063354492188 > > HTML = previous output BBOX = > 26.191626708984373,-10.571436645507813,26.194373291015623,-10.570063354492188 > > Output BBOX : > 26.190253417968748,-10.572123291015625,26.195746582031248,-10.569376708984375 > > HTML = previous output BBOX = > 26.190253417968748,-10.572123291015625,26.195746582031248,-10.569376708984375 > > Output BBOX : > 26.187506835937498,-10.57349658203125,26.198493164062498,-10.56800341796875 > > Case 2 : Map
CSS unspecified (defaults to screen width and some > height) > > HTML = 26.1925,-10.5710,26.1935,-10.5705 > Output BBOX : > 26.18567756938934,-10.572552385597229,26.200322430610655,-10.56850761440277 > > HTML = previous output BBOX = > 26.18567756938934,-10.572552385597229,26.200322430610655,-10.56850761440277 > Output BBOX : > 26.178355138778684,-10.574574771194458,26.20764486122131,-10.566485228805542 > > At first, I thought this had to do with me specifying BBOX values that > didn't quite match the width/height of my div but taking the output BBOX > and shoving it back into the HTML (which I thought to myself must be > "OL-compliant" as it generated it) still shows a zooming out behaviour. > > I then figured there might be an interference between the two strategies > so I tested with BBOX + Cluster and BBOX separately. Same behaviour. > > There are also issues with the masfeatures parameter : a small number of > maxfeatures might bring in less features than maxfeatures even though > the number of features definitely is more than maxfeatures. To > illustrate results comparing BBOX alone and Cluster, see : > > http://www.flickr.com/photos/30818159@N05/3182451399/ shows BBOX + > Cluster (maxFeatures = 200) on the left and BBOX alone on the right. > Both return 101 features. Good > > http://www.flickr.com/photos/30818159@N05/3182451587/ shows BBOX + > Cluster maxFeatures = 200 on the left (results in 101 features) and > maxFeatures = 10 on the right (results in 9 features ???). There > clearly should be 10 features returned. > > Same for BBOX alone (the 9 features are apparent on the right) : > http://www.flickr.com/photos/30818159@N05/3182451511/ > > Thanx to you and Chris, > > Yves > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From ahocevar at opengeo.org Fri Jan 9 17:52:20 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <1231535883.6276.35.camel@dell-desktop.example.com> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> <49676013.9090309@opengeo.org> <1231535883.6276.35.camel@dell-desktop.example.com> Message-ID: <4967D524.1030403@opengeo.org> Yves Moisan wrote: >> My bad. It should read >> new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}}) > > Well, I was dumb enough to stick it in the Cluster() strategy of my > 2-strategy layer on my side of the story :-(. At any rate, I can > confirm that an XHR is done on zoom in now. > > I still have issues though. One peculiar thing is that for some reason > the BBOX issued by OL to the server is consistenly larger than the one > specified in map.zoomToExtent. Here are numbers (HTML = > map.zoomToExtent(new OpenLayers.Bounds()); and "Output BBOX" is sent out > to the server) : See the ratio property of the BBOX strategy. You may want to set it to 1 (the default is 2, which means it will request a bbox twice as large as the viewport). > There are also issues with the masfeatures parameter : a small number of > maxfeatures might bring in less features than maxfeatures even though > the number of features definitely is more than maxfeatures. To > illustrate results comparing BBOX alone and Cluster, see : > > http://www.flickr.com/photos/30818159@N05/3182451399/ shows BBOX + > Cluster (maxFeatures = 200) on the left and BBOX alone on the right. > Both return 101 features. Good > > http://www.flickr.com/photos/30818159@N05/3182451587/ shows BBOX + > Cluster maxFeatures = 200 on the left (results in 101 features) and > maxFeatures = 10 on the right (results in 9 features ???). There > clearly should be 10 features returned. This obviously has to do with the ratio property mentioned above: maxFeatures applies to the bbox requested from the server, which is twice as large as the visible viewport (if using the default ratio of 2). Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From zac.spitzer at gmail.com Fri Jan 9 18:03:24 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] BBOX strategy with scale In-Reply-To: <5ec103de0901090955y2a1f465cv4c892eb7d11943ab@mail.gmail.com> References: <7a85053e0901071712u764d346dtc8d84338a351d2b5@mail.gmail.com> <5ec103de0901090955y2a1f465cv4c892eb7d11943ab@mail.gmail.com> Message-ID: <7a85053e0901091503h2019e89h756794d366beb8cf@mail.gmail.com> thank's eric, i got it working now... I ended up adding poi.events.on({"featureadded":filterPoiFeature}) as well is it possible to link this to OpenLayers.Layer.Grid somehow? z On Sat, Jan 10, 2009 at 4:55 AM, Eric Lemoine wrote: > Hi > > You can write a custom strategy that register a zoomend listener on > the map and have this listener change the protocol params. Go back to > the list if you need more detail. > > Cheers, > > Eric > > 2009/1/8, Zac Spitzer : >> Is there a way to pass the current scale within this request? >> >> poi_layer = new OpenLayers.Layer.Vector("POI", { >> strategies: [new OpenLayers.Strategy.BBOX()], >> protocol: new OpenLayers.Protocol.HTTP({ >> url: "/explore/poi_json.cfm", >> params: { scale: map.getZoom() }, >> format: new OpenLayers.Format.GeoJSON() >> }), >> styleMap: new OpenLayers.StyleMap(style) >> }); >> >> at the moment, the scale is only calculated once >> and is always passed at the initial scale >> >> z >> >> -- >> Zac Spitzer - >> http://zacster.blogspot.com >> +61 405 847 168 >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From aweiser at gmx.de Sat Jan 10 04:44:00 2009 From: aweiser at gmx.de (aweiser@gmx.de) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] How can i group layers Message-ID: <29478405.451191231580640258.JavaMail.nabble@tervel.nabble.com> Hi Eric, thanks for replying. I want to do something like this: Now i added all Overlay layer under one group (called overlay). When i open layerswitcher it looks something like this: Base Layer Topo Map Overlays biketour1 biketour2 biketour3 nordic walking1 nordic walking2 ... I just want to group them thematically: Base Layer Topo Map Bike Tours biketour1 biketour2 biketour3 Nordic Walking Tours nordic walking1 nordic walking2 ... Is there something similar implemented? Best regards Albrecht From igrcic at gmail.com Sat Jan 10 04:48:51 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <4967D524.1030403@opengeo.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> <49676013.9090309@opengeo.org> <1231535883.6276.35.camel@dell-desktop.example.com> <4967D524.1030403@opengeo.org> Message-ID: Hi, setting dynamical ratio has proven quite usefull to me...something like: var strategyBBOX = new OpenLayers.Strategy.BBOX({ratio:1.4}); map.events.register('zoomend', map, function(e){ zoom = map.getZoom(); //calculating ratio depending on zoomlevel, based on what u need var ratio = zoom/4.0+0.75; if(ratio<1.4)ratio = 1.4; //im not sure which one has to be set excatly strategyBBOX.options.ratio=ratio; strategyBBOX.ratio=ratio; .... .... hope it helps, ivan On Fri, Jan 9, 2009 at 11:52 PM, Andreas Hocevar wrote: > Yves Moisan wrote: >>> My bad. It should read >>> new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}}) >> >> Well, I was dumb enough to stick it in the Cluster() strategy of my >> 2-strategy layer on my side of the story :-(. At any rate, I can >> confirm that an XHR is done on zoom in now. >> >> I still have issues though. One peculiar thing is that for some reason >> the BBOX issued by OL to the server is consistenly larger than the one >> specified in map.zoomToExtent. Here are numbers (HTML = >> map.zoomToExtent(new OpenLayers.Bounds()); and "Output BBOX" is sent out >> to the server) : > > See the ratio property of the BBOX strategy. You may want to set it to 1 > (the default is 2, which means it will request a bbox twice as large as > the viewport). > >> There are also issues with the masfeatures parameter : a small number of >> maxfeatures might bring in less features than maxfeatures even though >> the number of features definitely is more than maxfeatures. To >> illustrate results comparing BBOX alone and Cluster, see : >> >> http://www.flickr.com/photos/30818159@N05/3182451399/ shows BBOX + >> Cluster (maxFeatures = 200) on the left and BBOX alone on the right. >> Both return 101 features. Good >> >> http://www.flickr.com/photos/30818159@N05/3182451587/ shows BBOX + >> Cluster maxFeatures = 200 on the left (results in 101 features) and >> maxFeatures = 10 on the right (results in 9 features ???). There >> clearly should be 10 features returned. > > This obviously has to do with the ratio property mentioned above: > maxFeatures applies to the bbox requested from the server, which is > twice as large as the visible viewport (if using the default ratio of 2). > > Regards, > Andreas. > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From dave.potts at pinan.co.uk Sat Jan 10 07:06:04 2009 From: dave.potts at pinan.co.uk (David Potts) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Selectable features handlers Message-ID: <41051.81.242.191.223.1231589164.squirrel@dp2642.force9.co.uk> I have a map with two vector layers on points, each with a select handler But only one select handler ever gets called Q. Its it possible to have two vector of points and have two different select hanalder active at the same time ? Dave. -- Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Pinan Software From crschmidt at metacarta.com Sat Jan 10 07:45:25 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Selectable features handlers In-Reply-To: <41051.81.242.191.223.1231589164.squirrel@dp2642.force9.co.uk> References: <41051.81.242.191.223.1231589164.squirrel@dp2642.force9.co.uk> Message-ID: <20090110124525.GA721@metacarta.com> On Sat, Jan 10, 2009 at 12:06:04PM -0000, David Potts wrote: > I have a map with two vector layers on points, each with a select handler > > But only one select handler ever gets called > > Q. Its it possible to have two vector of points and have two different > select hanalder active at the same time ? Not at this time. (This is one of the features which is regularly described as being a potential candidate for OpenLayers 3.0; the stub wikipage for this is http://trac.openlayers.org/wiki/three/SingleRendererRoot .) Regards, -- Christopher Schmidt MetaCarta From alperd.liste at gmail.com Sat Jan 10 18:33:49 2009 From: alperd.liste at gmail.com (=?ISO-8859-1?Q?Alper_Din=E7er?=) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] New Project : PHPGeoCache For Local Storage and Google App Engine Message-ID: Hi, I have just released a new project named "PHPGeoCache", which is a tile proxy for WMS like TileCache or GeoWebCache. There is an extra feature that Google App Engine can be used as a storage option. I'm very glad to hear your comments, questions or bug reports about the project. Thanks. Alper Dincer. http://www.geowebdeveloper.com *Blog entry about the project :* http://www.geowebdeveloper.com/2009/01/11/phpgeocache-for-google-app-engine/ *Project page :* http://www.geowebdeveloper.com/phpgeocache/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090111/24de8fdf/attachment.html From bthoen at gisnet.com Sun Jan 11 14:47:31 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Need Help with OpenLayers.Request Message-ID: <496A4CD3.1040707@gisnet.com> Can somebody explain to me how to pass data to my server side program using OpenLayers.Request? The following example seems to work, only there are no variables in the $_POST array. My handler prints only: result is $_POST variables But apparently the array is empty. What am I missing here? Here's some sample code that illustrates the problem: AJAX Test

AJAX Test

// --------------------- // test_ajax.php $value){ echo $key.": ".$value; } ?> From arnd.wippermann at web.de Sun Jan 11 14:56:53 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Need Help with OpenLayers.Request In-Reply-To: <496A4CD3.1040707@gisnet.com> Message-ID: I would think, your Content-Type is wrong http://faq.openlayers.org/ajax/how-do-i-post-form-encoded-data/ Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Bill Thoen Gesendet: Sonntag, 11. Januar 2009 20:48 An: users@openlayers.org Betreff: [OpenLayers-Users] Need Help with OpenLayers.Request Can somebody explain to me how to pass data to my server side program using OpenLayers.Request? The following example seems to work, only there are no variables in the $_POST array. My handler prints only: result is $_POST variables But apparently the array is empty. What am I missing here? Here's some sample code that illustrates the problem: AJAX Test

AJAX Test

// --------------------- // test_ajax.php $value){ echo $key.": ".$value; } ?> _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From bthoen at gisnet.com Sun Jan 11 15:10:13 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Need Help with OpenLayers.Request In-Reply-To: References: Message-ID: <496A5225.2060908@gisnet.com> No, changing the header doesn't fix it. Arnd Wippermann wrote: > I would think, your Content-Type is wrong > > http://faq.openlayers.org/ajax/how-do-i-post-form-encoded-data/ > > Arnd Wippermann > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Bill Thoen > Gesendet: Sonntag, 11. Januar 2009 20:48 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Need Help with OpenLayers.Request > > Can somebody explain to me how to pass data to my server side program using > OpenLayers.Request? The following example seems to work, only there are no > variables in the $_POST array. My handler prints only: > > result is $_POST variables > > But apparently the array is empty. What am I missing here? > > Here's some sample code that illustrates the problem: > > > > > AJAX Test > > > > >

AJAX Test

> > > > > // --------------------- > // test_ajax.php > > > echo "\$_POST variables \n"; > > foreach($_POST as $key => $value){ > echo $key.": ".$value; > } > ?> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From bthoen at gisnet.com Sun Jan 11 15:18:47 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Need Help with OpenLayers.Request In-Reply-To: References: Message-ID: <496A5427.2080700@gisnet.com> Sorry, that DOES work. I had a typo. Thanks again! Arnd Wippermann wrote: > I would think, your Content-Type is wrong > > http://faq.openlayers.org/ajax/how-do-i-post-form-encoded-data/ > > Arnd Wippermann > > From woodbri at swoodbridge.com Sun Jan 11 15:23:26 2009 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] FAQ Home is Broken Message-ID: <496A553E.5000605@swoodbridge.com> http://faq.openlayers.org/ is broken and I get a horrible python crash and back trace. From crschmidt at metacarta.com Sun Jan 11 17:29:51 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] FAQ Home is Broken In-Reply-To: <496A553E.5000605@swoodbridge.com> References: <496A553E.5000605@swoodbridge.com> Message-ID: <20090111222951.GC9979@metacarta.com> On Sun, Jan 11, 2009 at 03:23:26PM -0500, Stephen Woodbridge wrote: > http://faq.openlayers.org/ > > is broken and I get a horrible python crash and back trace. "Horrible" feels a bit extreme to me, but it's fixed now in any case. Regards, -- Christopher Schmidt MetaCarta From rich at deluded.co.uk Sun Jan 11 19:10:59 2009 From: rich at deluded.co.uk (Deluded) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] All marker offsets are wrong when using features Message-ID: <1231719059617-2143419.post@n2.nabble.com> Hi everyone. I've just been improving a site of mine that used to use the text layer to overlay tracking points on a OSM map. I've updated it to use the following function: function addTripMarker(ll, popupContentHTML, img) { var feature = new OpenLayers.Feature(markers, ll); feature.closeBox = true; feature.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {'autoSize': true}); feature.data.popupContentHTML = popupContentHTML; feature.data.overflow = "auto"; var marker = feature.createMarker(); var markerClick = function (evt) { if (this.popup == null) { this.popup = this.createPopup(true); map.addPopup(this.popup); this.popup.show(); } else { this.popup.toggle(); } currentPopup = this.popup; OpenLayers.Event.stop(evt); }; marker.events.register("mousedown", feature, markerClick); marker.icon.url = img; marker.icon.size = new OpenLayers.Size(32,32); marker.icon.offset = new OpenLayers.Pixel(-160, -160); markers.addMarker(marker); } All the icons are drawn correctly, but without any offset. You can see I've put a silly 160,160 offset in to test this and it made no difference. Anyone got any ideas what I'm doing wrong?? I could go back to using the text layer, but I never figured out how to change the popup styles on that. Thanks in advance :) -- View this message in context: http://n2.nabble.com/All-marker-offsets-are-wrong-when-using-features-tp2143419p2143419.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Sun Jan 11 19:50:56 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] All marker offsets are wrong when using features In-Reply-To: <1231719059617-2143419.post@n2.nabble.com> References: <1231719059617-2143419.post@n2.nabble.com> Message-ID: <20090112005056.GD9979@metacarta.com> On Sun, Jan 11, 2009 at 04:10:59PM -0800, Deluded wrote: > > Hi everyone. > > I've just been improving a site of mine that used to use the text layer to > overlay tracking points on a OSM map. > I've updated it to use the following function: > > > function addTripMarker(ll, popupContentHTML, img) > { > var feature = new OpenLayers.Feature(markers, ll); > feature.closeBox = true; > feature.popupClass = > OpenLayers.Class(OpenLayers.Popup.FramedCloud, {'autoSize': true}); > feature.data.popupContentHTML = popupContentHTML; > feature.data.overflow = "auto"; > > var marker = feature.createMarker(); > > var markerClick = function (evt) { > if (this.popup == null) { > this.popup = this.createPopup(true); > map.addPopup(this.popup); > this.popup.show(); > } else { > this.popup.toggle(); > } > currentPopup = this.popup; > OpenLayers.Event.stop(evt); > }; > marker.events.register("mousedown", feature, markerClick); > marker.icon.url = img; > marker.icon.size = new OpenLayers.Size(32,32); > marker.icon.offset = new OpenLayers.Pixel(-160, -160); > markers.addMarker(marker); > } > > > All the icons are drawn correctly, but without any offset. You can see I've > put a silly 160,160 offset in to test this and it made no difference. You an't change the offset like this. (Or if you can, I don't know how.) Instead of using feature.createMarker, just create your icon and marker manually. -- Chris > Anyone got any ideas what I'm doing wrong?? I could go back to using the > text layer, but I never figured out how to change the popup styles on that. > > Thanks in advance :) > -- > View this message in context: http://n2.nabble.com/All-marker-offsets-are-wrong-when-using-features-tp2143419p2143419.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From brad at cubewerx.com.au Sun Jan 11 19:58:00 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Overview Map Problems Message-ID: <02c201c97450$d247db20$76d79160$@com.au> List, I am unable to make overview map control work in OL - no map inside. I must be doing something wrong. Can someone have a look at these two test links to help me please. http://demos.numaps.com.au/overview_4326.html http://demos.numaps.com.au/overview_900913.html Cheers, Brad.. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090112/489b4e0e/attachment.html From asufsc at gmail.com Mon Jan 12 05:43:41 2009 From: asufsc at gmail.com (Salvaro) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? Message-ID: <1231757021079-2145088.post@n2.nabble.com> Is possible hide a VectorFeature added in a Vector Layer? Thanks. -- View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rich at deluded.co.uk Mon Jan 12 06:30:13 2009 From: rich at deluded.co.uk (Deluded) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] All marker offsets are wrong when using features In-Reply-To: <20090112005056.GD9979@metacarta.com> References: <1231719059617-2143419.post@n2.nabble.com> <20090112005056.GD9979@metacarta.com> Message-ID: <1231759813117-2145220.post@n2.nabble.com> >You an't change the offset like this. (Or if you can, I don't know how.) > >Instead of using feature.createMarker, just create your icon and marker >manually. > >-- Chris Does anyone out there has a working example on how to do this? Ideally I want the ability to set the icon, icon offset, and html text that will go in a framed bubble popup with close box. I've been trying all weekend to get this working, and the closest I could get was by using features. -- View this message in context: http://n2.nabble.com/All-marker-offsets-are-wrong-when-using-features-tp2143419p2145220.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zac.spitzer at gmail.com Mon Jan 12 06:37:18 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] All marker offsets are wrong when using features In-Reply-To: <1231759813117-2145220.post@n2.nabble.com> References: <1231719059617-2143419.post@n2.nabble.com> <20090112005056.GD9979@metacarta.com> <1231759813117-2145220.post@n2.nabble.com> Message-ID: <7a85053e0901120337l72cef5f8jde6449ffc6cce5a4@mail.gmail.com> i've hit this one as well, playing around with styles after reading through some of the api code, i did this which seem to help offset the bottom of the marker directly on the point var style = new OpenLayers.Style({ externalGraphic: "images/openlayers/AQUA.png", pointRadius: 9, graphicYOffset : -15 }); z On Mon, Jan 12, 2009 at 10:30 PM, Deluded wrote: > > > > >>You an't change the offset like this. (Or if you can, I don't know how.) >> >>Instead of using feature.createMarker, just create your icon and marker >>manually. >> >>-- Chris > > Does anyone out there has a working example on how to do this? Ideally I > want the ability to set the icon, icon offset, and html text that will go in > a framed bubble popup with close box. > > I've been trying all weekend to get this working, and the closest I could > get was by using features. > > > > -- > View this message in context: http://n2.nabble.com/All-marker-offsets-are-wrong-when-using-features-tp2143419p2145220.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From zac.spitzer at gmail.com Mon Jan 12 06:38:35 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: <1231757021079-2145088.post@n2.nabble.com> References: <1231757021079-2145088.post@n2.nabble.com> Message-ID: <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> setting feature.style="display:none;" and redrawing it works for me On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: > > Is possible hide a VectorFeature added in a Vector Layer? > > Thanks. > -- > View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From asufsc at gmail.com Mon Jan 12 06:46:11 2009 From: asufsc at gmail.com (Salvaro) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> Message-ID: <1231760771738-2145259.post@n2.nabble.com> Thanks. But what you do to show after? Set display=false in the Style and redraw the Layer works and hide the feature. But when I try to set display=true and redraw didn't show the feature =/. zspitzer wrote: > > setting feature.style="display:none;" and redrawing it works for me > > On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: >> >> Is possible hide a VectorFeature added in a Vector Layer? >> >> Thanks. >> -- >> View this message in context: >> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Zac Spitzer - > http://zacster.blogspot.com > +61 405 847 168 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zac.spitzer at gmail.com Mon Jan 12 07:17:05 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: <1231760771738-2145259.post@n2.nabble.com> References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> Message-ID: <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> try feature.style=""; On Mon, Jan 12, 2009 at 10:46 PM, Salvaro wrote: > > Thanks. > But what you do to show after? > > Set display=false in the Style and redraw the Layer works and hide the > feature. > But when I try to set display=true and redraw didn't show the feature =/. > > > zspitzer wrote: >> >> setting feature.style="display:none;" and redrawing it works for me >> >> On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: >>> >>> Is possible hide a VectorFeature added in a Vector Layer? >>> >>> Thanks. >>> -- >>> View this message in context: >>> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html >>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> >> >> >> -- >> Zac Spitzer - >> http://zacster.blogspot.com >> +61 405 847 168 >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From andre.matos at co.sapo.pt Mon Jan 12 07:22:50 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> Message-ID: You can try this one too feature.style.pointRadius = 0; feature.layer.drawFeature(feature); To show the feature again: feature.style.pointRadius = lastPointRadius; feature.layer.drawFeature(feature); Regards Andr? Matos http://mapas.sapo.pt To -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Zac Spitzer Sent: segunda-feira, 12 de Janeiro de 2009 12:17 To: Salvaro Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Hide/Show a Vector Feature? try feature.style=""; On Mon, Jan 12, 2009 at 10:46 PM, Salvaro wrote: > > Thanks. > But what you do to show after? > > Set display=false in the Style and redraw the Layer works and hide the > feature. > But when I try to set display=true and redraw didn't show the feature =/. > > > zspitzer wrote: >> >> setting feature.style="display:none;" and redrawing it works for me >> >> On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: >>> >>> Is possible hide a VectorFeature added in a Vector Layer? >>> >>> Thanks. >>> -- >>> View this message in context: >>> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html >>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> >> >> >> -- >> Zac Spitzer - >> http://zacster.blogspot.com >> +61 405 847 168 >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From zac.spitzer at gmail.com Mon Jan 12 07:47:50 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> Message-ID: <7a85053e0901120447r596bd6d4p34320fc6b2816d09@mail.gmail.com> does that just make it invisble tho? Renderer/Elements.js line 473 does an explicit check for if (style.display != "none") z On Mon, Jan 12, 2009 at 11:22 PM, Andre Pereira de Matos wrote: > You can try this one too > > feature.style.pointRadius = 0; > feature.layer.drawFeature(feature); > > To show the feature again: > > feature.style.pointRadius = lastPointRadius; > feature.layer.drawFeature(feature); > > > Regards > Andr? Matos > http://mapas.sapo.pt > > > > To > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Zac Spitzer > Sent: segunda-feira, 12 de Janeiro de 2009 12:17 > To: Salvaro > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Hide/Show a Vector Feature? > > try feature.style=""; > > On Mon, Jan 12, 2009 at 10:46 PM, Salvaro wrote: >> >> Thanks. >> But what you do to show after? >> >> Set display=false in the Style and redraw the Layer works and hide the >> feature. >> But when I try to set display=true and redraw didn't show the feature =/. >> >> >> zspitzer wrote: >>> >>> setting feature.style="display:none;" and redrawing it works for me >>> >>> On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: >>>> >>>> Is possible hide a VectorFeature added in a Vector Layer? >>>> >>>> Thanks. >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html >>>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>> >>> >>> >>> -- >>> Zac Spitzer - >>> http://zacster.blogspot.com >>> +61 405 847 168 >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> -- >> View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Zac Spitzer - > http://zacster.blogspot.com > +61 405 847 168 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From andre.matos at co.sapo.pt Mon Jan 12 07:54:51 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: <7a85053e0901120447r596bd6d4p34320fc6b2816d09@mail.gmail.com> References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> <7a85053e0901120447r596bd6d4p34320fc6b2816d09@mail.gmail.com> Message-ID: I think so... And to turn it visible I think you just should assign the display property to "block": style.display = "block" I think this solve your problem Regards, Andr? Matos http://mapas.sapo.pt -----Original Message----- From: Zac Spitzer [mailto:zac.spitzer@gmail.com] Sent: segunda-feira, 12 de Janeiro de 2009 12:48 To: Andre Pereira de Matos Cc: Salvaro; users@openlayers.org Subject: Re: [OpenLayers-Users] Hide/Show a Vector Feature? does that just make it invisble tho? Renderer/Elements.js line 473 does an explicit check for if (style.display != "none") z On Mon, Jan 12, 2009 at 11:22 PM, Andre Pereira de Matos wrote: > You can try this one too > > feature.style.pointRadius = 0; > feature.layer.drawFeature(feature); > > To show the feature again: > > feature.style.pointRadius = lastPointRadius; > feature.layer.drawFeature(feature); > > > Regards > Andr? Matos > http://mapas.sapo.pt > > > > To > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Zac Spitzer > Sent: segunda-feira, 12 de Janeiro de 2009 12:17 > To: Salvaro > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Hide/Show a Vector Feature? > > try feature.style=""; > > On Mon, Jan 12, 2009 at 10:46 PM, Salvaro wrote: >> >> Thanks. >> But what you do to show after? >> >> Set display=false in the Style and redraw the Layer works and hide the >> feature. >> But when I try to set display=true and redraw didn't show the feature =/. >> >> >> zspitzer wrote: >>> >>> setting feature.style="display:none;" and redrawing it works for me >>> >>> On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: >>>> >>>> Is possible hide a VectorFeature added in a Vector Layer? >>>> >>>> Thanks. >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html >>>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>> >>> >>> >>> -- >>> Zac Spitzer - >>> http://zacster.blogspot.com >>> +61 405 847 168 >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> -- >> View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Zac Spitzer - > http://zacster.blogspot.com > +61 405 847 168 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From donald.kerr at dkerr.co.uk Mon Jan 12 08:02:47 2009 From: donald.kerr at dkerr.co.uk (Donald Kerr) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Best Practice In-Reply-To: Message-ID: Hi all, I've been working with OpenLayers for a short time and am a bit confused as to how to approach the task I have due to the fact that there appears to be so many ways of achieving my goal. Currently I get the data from an asp.net asmx web service and parse through the XML returned. This seems fine in terms of collecting the date but is very slow in Internet Explorer - no surprise. I want to add markers to a layer or layers with the ability to destroy each set of markers and reload them as the user drags the map. I am using the following code: //====================================== for(var i=0; i References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> Message-ID: <1231766108165-2145547.post@n2.nabble.com> The problem is: I can't lose the information of the vectorstyle. Thanks all. zspitzer wrote: > > try feature.style=""; > > On Mon, Jan 12, 2009 at 10:46 PM, Salvaro wrote: >> >> Thanks. >> But what you do to show after? >> >> Set display=false in the Style and redraw the Layer works and hide the >> feature. >> But when I try to set display=true and redraw didn't show the feature =/. >> >> >> zspitzer wrote: >>> >>> setting feature.style="display:none;" and redrawing it works for me >>> >>> On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: >>>> >>>> Is possible hide a VectorFeature added in a Vector Layer? >>>> >>>> Thanks. >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html >>>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>> >>> >>> >>> -- >>> Zac Spitzer - >>> http://zacster.blogspot.com >>> +61 405 847 168 >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> -- >> View this message in context: >> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Zac Spitzer - > http://zacster.blogspot.com > +61 405 847 168 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145547.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From asufsc at gmail.com Mon Jan 12 08:20:21 2009 From: asufsc at gmail.com (Salvaro) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> Message-ID: <1231766421555-2145559.post@n2.nabble.com> I'm using the vector feature with an icon (in the VectorStyle), so the radius didn't work. And set display=false or none only work if I delete the reference to the icon. Thanks. Andr? Matos wrote: > > You can try this one too > > feature.style.pointRadius = 0; > feature.layer.drawFeature(feature); > > To show the feature again: > > feature.style.pointRadius = lastPointRadius; > feature.layer.drawFeature(feature); > > > Regards > Andr? Matos > http://mapas.sapo.pt > > > > To > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Zac Spitzer > Sent: segunda-feira, 12 de Janeiro de 2009 12:17 > To: Salvaro > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Hide/Show a Vector Feature? > > try feature.style=""; > > On Mon, Jan 12, 2009 at 10:46 PM, Salvaro wrote: >> >> Thanks. >> But what you do to show after? >> >> Set display=false in the Style and redraw the Layer works and hide the >> feature. >> But when I try to set display=true and redraw didn't show the feature =/. >> >> >> zspitzer wrote: >>> >>> setting feature.style="display:none;" and redrawing it works for me >>> >>> On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: >>>> >>>> Is possible hide a VectorFeature added in a Vector Layer? >>>> >>>> Thanks. >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html >>>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>> >>> >>> >>> -- >>> Zac Spitzer - >>> http://zacster.blogspot.com >>> +61 405 847 168 >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> -- >> View this message in context: >> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Zac Spitzer - > http://zacster.blogspot.com > +61 405 847 168 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145559.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Mon Jan 12 08:54:13 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Best Practice In-Reply-To: References: Message-ID: <496B4B85.104@mapgears.com> Donald Kerr wrote: > Hi all, > > I've been working with OpenLayers for a short time and am a bit confused as > to how to approach the task I have due to the fact that there appears to be > so many ways of achieving my goal. > > Currently I get the data from an asp.net asmx web service and parse through > the XML returned. This seems fine in terms of collecting the date but is > very slow in Internet Explorer - no surprise. I want to add markers to a > layer or layers with the ability to destroy each set of markers and reload > them as the user drags the map. I am using the following code: > > //====================================== > for(var i=0; i var uniqueID = > nodes[i].getElementsByTagName('UniqueID')[0].firstChild.nodeValue; > var category > =nodes[i].getElementsByTagName('Category')[0].firstChild.nodeValue; > var description = > nodes[i].getElementsByTagName('Description')[0].firstChild.nodeValue; > var easting = > nodes[i].getElementsByTagName('GridRef')[0].getElementsByTagName('Easting')[ > 0].firstChild.nodeValue; > var northing = > nodes[i].getElementsByTagName('GridRef')[0].getElementsByTagName('Northing') > [0].firstChild.nodeValue; > var lonLat = new OpenLayers.LonLat(easting, northing); > var feature = new OpenLayers.Feature.Vector( > new OpenLayers.Geometry.Point(lonLat.lon, > lonLat.lat), > { > uniqueID: uniqueID, > category: category, > description: description > } > ); > features.push(feature); > } > myDataLayer.addFeatures(features); > //====================================== > > This all works fine and I am showing different icons based on a StyleMap > that has the following code: > > //====================================== > var lookup = { > 'Full': { externalGraphic: 'images/full.png' }, > 'Partial': { externalGraphic: 'images/partial.png' }, > 'Historic': { externalGraphic: 'images/historic.png' }, > 'MSF': { externalGraphic: 'images/msf.png', graphicWidth: > 25, graphicHeight: 25 } > } > vmdsDataStyleMap.addUniqueValueRules('default', 'category', lookup); > //====================================== > > I can detroy all features in the layer using the following code: > > //====================================== > myDataLayer.removeFeatures(vmdsDataLayer.features); > //====================================== > > I have a list of things that I need to do and I am not sure of the best way > to achieve this is. In the first instance, I want to be able to destroy only > those features that are tagged, for example, 'Full' under 'category'. So > that I can toggle on/off the features that I want to view. Is adding these > all to one layer the best way to achieve this or should I each category to a > new vector layer? Indeed, is a vector layer the best way to achieve this? > > In addidion to the above, I need to do the following: > > 1. Add a label to each icon that I can toggle on and off using some external > javascript. > > That's not currently possible with OpenLayers, but you could display a small popup instead. > 2. Change the css of the above label to show it bigger on mouseover or, if > the labels aren't toggled on, simply show the label onmouseover. > You could use a SelectFeature control for you vector layer with the option hover:true and changing the style of your selected features. The popup could appear as the feature gets selected. http://openlayers.org/dev/examples/select-feature.html http://openlayers.org/dev/examples/select-feature-openpopup.html > 3. Redirect the browser to a different url using the onclick of the icon. > You could do that with a Handler.Feature with the option {click: onFeatureClicked} and created your onFeatureClicked function that open a different url. > 4. I can already set the icon up to be draggable but I need to save new > coordinates to a database onmouseup. I need to capture the icon's 'UniqueID' > onmouseup to do that, I assume. How is this done. > > Is a vector layer suitable for what I am trying to do or is there a better > an easier way to do the above? > A vector layer is suitable, but you need to have you data in some database format, like PostGIS and to use a server application that supports transactions like Insert/Update/Delete, like GeoServer or TinyOWS. > Any help or advice would be very much appreciated. > > Many thanks. > > Regards, > > Donald > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > Hope this helps, -- Alexandre Dub? Mapgears www.mapgears.com From ahocevar at opengeo.org Mon Jan 12 09:12:34 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: <1231766421555-2145559.post@n2.nabble.com> References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> <1231766421555-2145559.post@n2.nabble.com> Message-ID: <5b021dd0901120612w243df22re8f1facbc6afb119@mail.gmail.com> On Mon, Jan 12, 2009 at 2:20 PM, Salvaro wrote: > > I'm using the vector feature with an icon (in the VectorStyle), so the radius > didn't work. You have to use display="none". False won't work. To show the feature again, you can either delete display or set it to anything but "none". > And set display=false or none only work if I delete the reference to the > icon. What do you mean by that? Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From andre.matos at co.sapo.pt Mon Jan 12 09:12:44 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: <1231766421555-2145559.post@n2.nabble.com> References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> <1231766421555-2145559.post@n2.nabble.com> Message-ID: Have you tried that? I used an icon in the feature and it worked... I set the style in the feature of course: this.feature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(coords.lon, coords.lat), null, { externalGraphic: this.markerImage, backgroundGraphic: this.markerShadow, backgroundXOffset: this.iconAnchor.x, backgroundYOffset: this.iconAnchor.y, graphicZIndex: 10, backgroundGraphicZIndex: 11, pointRadius: this.markerRadius }); And when I want to hide the feature I set the radius to zero. Regards, Andr? Matos http://mapas.sapo.pt -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Salvaro Sent: segunda-feira, 12 de Janeiro de 2009 13:20 To: users@openlayers.org Subject: Re: [OpenLayers-Users] Hide/Show a Vector Feature? I'm using the vector feature with an icon (in the VectorStyle), so the radius didn't work. And set display=false or none only work if I delete the reference to the icon. Thanks. Andr? Matos wrote: > > You can try this one too > > feature.style.pointRadius = 0; > feature.layer.drawFeature(feature); > > To show the feature again: > > feature.style.pointRadius = lastPointRadius; > feature.layer.drawFeature(feature); > > > Regards > Andr? Matos > http://mapas.sapo.pt > > > > To > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Zac Spitzer > Sent: segunda-feira, 12 de Janeiro de 2009 12:17 > To: Salvaro > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Hide/Show a Vector Feature? > > try feature.style=""; > > On Mon, Jan 12, 2009 at 10:46 PM, Salvaro wrote: >> >> Thanks. >> But what you do to show after? >> >> Set display=false in the Style and redraw the Layer works and hide the >> feature. >> But when I try to set display=true and redraw didn't show the feature =/. >> >> >> zspitzer wrote: >>> >>> setting feature.style="display:none;" and redrawing it works for me >>> >>> On Mon, Jan 12, 2009 at 9:43 PM, Salvaro wrote: >>>> >>>> Is possible hide a VectorFeature added in a Vector Layer? >>>> >>>> Thanks. >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.html >>>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>> >>> >>> >>> -- >>> Zac Spitzer - >>> http://zacster.blogspot.com >>> +61 405 847 168 >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> -- >> View this message in context: >> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Zac Spitzer - > http://zacster.blogspot.com > +61 405 847 168 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145559.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 yves.moisan at boreal-is.com Mon Jan 12 10:11:20 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: <4967D524.1030403@opengeo.org> References: <1231343680.6511.25.camel@dell-desktop.example.com> <20090107160604.GN10452@metacarta.com> <1231347707.6511.46.camel@dell-desktop.example.com> <1231349128.9131.280.camel@wardrobe.dhs.org> <1231352856.6511.61.camel@dell-desktop.example.com> <4964FAC0.2010803@opengeo.org> <1231362186.6511.71.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> <49676013.9090309@opengeo.org> <1231535883.6276.35.camel@dell-desktop.example.com> <4967D524.1030403@opengeo.org> Message-ID: <1231773080.6841.9.camel@dell-desktop.example.com> > > See the ratio property of the BBOX strategy. You may want to set it to 1 > (the default is 2, which means it will request a bbox twice as large as > the viewport). Thank you. > > > > http://www.flickr.com/photos/30818159@N05/3182451587/ shows BBOX + > > Cluster maxFeatures = 200 on the left (results in 101 features) and > > maxFeatures = 10 on the right (results in 9 features ???). There > > clearly should be 10 features returned. > > This obviously has to do with the ratio property mentioned above: > maxFeatures applies to the bbox requested from the server, which is > twice as large as the visible viewport (if using the default ratio of 2). I see now. One of the features was returned in the portion outside the viewport and obviously not clustered in the display. I forced ratio to 1 and I now see the expected behaviour. This problem is likely to manifest itself when maxFeatures is small so it can be tricky. May I ask why ratio defaults to 2 ? Is it a matter of minimizing calls to the server for small pan moves ? I believe most users will be puzzled by not seeing N = maxFeatures in the viewport when they know there are features. Thanx again for your explanations. Yves From yves.moisan at boreal-is.com Mon Jan 12 10:21:32 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] IE strategies In-Reply-To: References: <1231343680.6511.25.camel@dell-desktop.example.com> <49653144.2030008@opengeo.org> <1231422767.6555.26.camel@dell-desktop.example.com> <49661DBB.5020100@opengeo.org> <1231448634.7174.24.camel@dell-desktop.example.com> <496688BE.80803@opengeo.org> <1231509667.6276.8.camel@dell-desktop.example.com> <49676013.9090309@opengeo.org> <1231535883.6276.35.camel@dell-desktop.example.com> <4967D524.1030403@opengeo.org> Message-ID: <1231773692.6841.17.camel@dell-desktop.example.com> > Hi, setting dynamical ratio has proven quite usefull to me...something like: > > var strategyBBOX = new OpenLayers.Strategy.BBOX({ratio:1.4}); > > map.events.register('zoomend', map, function(e){ > zoom = map.getZoom(); > //calculating ratio depending on zoomlevel, based on what u need > var ratio = zoom/4.0+0.75; > if(ratio<1.4)ratio = 1.4; > > //im not sure which one has to be set excatly > strategyBBOX.options.ratio=ratio; > strategyBBOX.ratio=ratio; > .... Hi Ivan, Seems to me like this buttresses what I'm saying in my previous answer to Andreas e-mail : the issue is worse for maxfeatures small AND (if I use your trick) the zoom level is high. Suppose you setCenter on a feature with a high zoom level (e.g. 16), then you get ratio = 4.75. The probability that I end up with a number of clustered features < maxfeatures grows with zoom level ! If I ask for 2 features at a zoom level of 20, I may get nothing in my viewport. Could be rather puzzling. Thanx for sharing your trick. Yves > .... > hope it helps, > ivan > > On Fri, Jan 9, 2009 at 11:52 PM, Andreas Hocevar wrote: > > Yves Moisan wrote: > >>> My bad. It should read > >>> new OpenLayers.Strategy.BBOX({invalidBounds: function(){return true;}}) > >> > >> Well, I was dumb enough to stick it in the Cluster() strategy of my > >> 2-strategy layer on my side of the story :-(. At any rate, I can > >> confirm that an XHR is done on zoom in now. > >> > >> I still have issues though. One peculiar thing is that for some reason > >> the BBOX issued by OL to the server is consistenly larger than the one > >> specified in map.zoomToExtent. Here are numbers (HTML = > >> map.zoomToExtent(new OpenLayers.Bounds()); and "Output BBOX" is sent out > >> to the server) : > > > > See the ratio property of the BBOX strategy. You may want to set it to 1 > > (the default is 2, which means it will request a bbox twice as large as > > the viewport). > > > >> There are also issues with the masfeatures parameter : a small number of > >> maxfeatures might bring in less features than maxfeatures even though > >> the number of features definitely is more than maxfeatures. To > >> illustrate results comparing BBOX alone and Cluster, see : > >> > >> http://www.flickr.com/photos/30818159@N05/3182451399/ shows BBOX + > >> Cluster (maxFeatures = 200) on the left and BBOX alone on the right. > >> Both return 101 features. Good > >> > >> http://www.flickr.com/photos/30818159@N05/3182451587/ shows BBOX + > >> Cluster maxFeatures = 200 on the left (results in 101 features) and > >> maxFeatures = 10 on the right (results in 9 features ???). There > >> clearly should be 10 features returned. > > > > This obviously has to do with the ratio property mentioned above: > > maxFeatures applies to the bbox requested from the server, which is > > twice as large as the visible viewport (if using the default ratio of 2). > > > > Regards, > > Andreas. > > > > -- > > Andreas Hocevar > > OpenGeo - http://opengeo.org/ > > Expert service straight from the developers. > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > From Peter.Sykora at ooe.gv.at Mon Jan 12 11:00:19 2009 From: Peter.Sykora at ooe.gv.at (Peter.Sykora@ooe.gv.at) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] PropertyStyles not working in IE7 Message-ID: <05C80D686FDA0D4B811E25DFA72430D0041C2BE5@msli01-012.res01.ads.ooe.local> Hi everyone, I try to create a vector map with selectable polygons. Therefore I would like to define a default style and a select style. I tried to adapt the code, which is documented in http://trac.openlayers.org/wiki/Styles under "Using PropertyStyles", to my needs: var gemSymbolizer = new OpenLayers.Util.applyDefaults( { strokeColor: "black", strokeWidth: 1, strokeOpacity: 0.6, fillOpacity: 0.8 } ); var selSymbolizer = new OpenLayers.Util.applyDefaults( { strokeColor: "yellow", strokeWidth: 3, strokeOpacity: 0.9 } ); var gemStyle = new OpenLayers.StyleMap( { default: gemSymbolizer, select: selSymbolizer } ); This works fine in FF, but in IE7 I get an "Object expeced" error in the "var gemStyle ..." section. Am I doing something wrong? Thanks for any hints Peter Mag. Peter Sykora Amt der O?. Landesregierung Direktion Stra?enbau und Verkehr Abteilung Geoinformation und Liegenschaft - Gruppe DORIS 4021 Linz * Bahnhofplatz 1 Tel.: (+43 732) 77 20-12627 Fax: (+43 732) 77 20-212888 E-Mail: Peter.Sykora@ooe.gv.at B?ro: DORIS.GeoL.post@ooe.gv.at Internet:www.land-oberoesterreich.gv.at www.doris.eu DVR: 0069264 Der Austausch von Nachrichten mit dem oben angef?hrten Absender via E-Mail dient ausschlie?lich Informationszwecken. Rechtsg?ltige Erkl?rungen d?rfen ?ber dieses Medium nur im Wege von offiziellen Postf?chern (in unserem Fall ?ber DORIS.GeoL.post@ooe.gv.at) ?bermittelt werden. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090112/cc5c1d37/attachment.html From ahocevar at opengeo.org Mon Jan 12 11:14:01 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] PropertyStyles not working in IE7 In-Reply-To: <05C80D686FDA0D4B811E25DFA72430D0041C2BE5@msli01-012.res01.ads.ooe.local> References: <05C80D686FDA0D4B811E25DFA72430D0041C2BE5@msli01-012.res01.ads.ooe.local> Message-ID: <5b021dd0901120814u56440c30u90607dca1c0e1fa6@mail.gmail.com> Hi, 2009/1/12 : > I try to create a vector map with selectable polygons. Therefore I would > like to define a default style and a select style. I tried to adapt the > code, which is documented in http://trac.openlayers.org/wiki/Styles under > "Using PropertyStyles", to my needs: > > var gemSymbolizer = new > OpenLayers.Util.applyDefaults( > { > strokeColor: "black", > strokeWidth: 1, > strokeOpacity: 0.6, > fillOpacity: 0.8 > } > ); Not sure if this is the reason, but the API for Util.applyDefaults is: OpenLayers.Util.applyDefaults(target, source); You will want to add a second argument to applyDefaults, e.g. OpenLayers.Feature.Vector.style["default"]. See below. > > var selSymbolizer = new > OpenLayers.Util.applyDefaults( > { > strokeColor: > "yellow", > strokeWidth: 3, > strokeOpacity: 0.9 }, OpenLayers.Feature.vector.style["default"]; > ); > > var gemStyle = new OpenLayers.StyleMap( > { > default: gemSymbolizer, > select: selSymbolizer > } > ); Liebe Gr??e nach Ober?sterreich, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Mon Jan 12 11:15:16 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] PropertyStyles not working in IE7 In-Reply-To: <5b021dd0901120814u56440c30u90607dca1c0e1fa6@mail.gmail.com> References: <05C80D686FDA0D4B811E25DFA72430D0041C2BE5@msli01-012.res01.ads.ooe.local> <5b021dd0901120814u56440c30u90607dca1c0e1fa6@mail.gmail.com> Message-ID: <5b021dd0901120815i7fc1f84r22121b8d41744180@mail.gmail.com> Oops, a typo here: On Mon, Jan 12, 2009 at 5:14 PM, Andreas Hocevar wrote: > OpenLayers.Feature.vector.style["default"]; This should read: OpenLayers.Feature.Vector.style["default"]; Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Mon Jan 12 11:40:36 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] PropertyStyles not working in IE7 In-Reply-To: <05C80D686FDA0D4B811E25DFA72430D0041C2BE6@msli01-012.res01.ads.ooe.local> References: <05C80D686FDA0D4B811E25DFA72430D0041C2BE5@msli01-012.res01.ads.ooe.local> <5b021dd0901120814u56440c30u90607dca1c0e1fa6@mail.gmail.com> <05C80D686FDA0D4B811E25DFA72430D0041C2BE6@msli01-012.res01.ads.ooe.local> Message-ID: <496B7284.2050905@opengeo.org> Hi, Peter.Sykora@ooe.gv.at wrote: >> You will want to add a second argument to applyDefaults, e.g. >> OpenLayers.Feature.Vector.style["default"]. See below. > > thanks for your hint, but I tried that as well, same error. I also > tried: > > var gemSymbolizer = new > OpenLayers.Util.applyDefaults( > { > strokeColor: "black", > strokeWidth: 1, > strokeOpacity: 0.6, > fillOpacity: 0.8 > }, > > OpenLayers.Feature.Vector.style["default"] > ); > > var gemStyle = new OpenLayers.StyleMap( > { > default: gemSymbolizer, > select: { strokeColor: > "yellow", strokeWidth: 3, strokeOpacity: 0.9 } > } > ); > > Again, works fine in FF but not in IE7 Ok, now I see what's wrong: "default" is a keyword in IE, so you have to use quotes in the hash definition, like this: { "default": gemSymbolizer, "select": selectSymbolizer } Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From asufsc at gmail.com Mon Jan 12 12:16:57 2009 From: asufsc at gmail.com (Salvaro) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Hide/Show a Vector Feature? In-Reply-To: <5b021dd0901120612w243df22re8f1facbc6afb119@mail.gmail.com> References: <1231757021079-2145088.post@n2.nabble.com> <7a85053e0901120338r475c0aa2p50198cd2d28e31e5@mail.gmail.com> <1231760771738-2145259.post@n2.nabble.com> <7a85053e0901120417t66632efbtffcce8b2e2ebb66b@mail.gmail.com> <1231766421555-2145559.post@n2.nabble.com> <5b021dd0901120612w243df22re8f1facbc6afb119@mail.gmail.com> Message-ID: <1231780617495-2146746.post@n2.nabble.com> Andreas, you are right. Now is working. Thank you! Andr?, you are right, changing the point radius or external graphic size works too. I'm using OL with GWT and previously I didn't get the style before change the attribute. Thanks! Andreas Hocevar-2 wrote: > > On Mon, Jan 12, 2009 at 2:20 PM, Salvaro wrote: >> >> I'm using the vector feature with an icon (in the VectorStyle), so the >> radius >> didn't work. > > You have to use display="none". False won't work. To show the feature > again, you can either delete display or set it to anything but "none". > >> And set display=false or none only work if I delete the reference to the >> icon. > > What do you mean by that? > > Regards, > Andreas. > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2146746.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Jo.Simoes at cadcorp.com Mon Jan 12 12:50:03 2009 From: Jo.Simoes at cadcorp.com (Joana Simoes) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Question about WMTS Message-ID: <38D7001B29E62F469A4CB27B323584EFB471@dev011_ex.Dev.cadcorp.net> Hello, I was wondering if anyone is using OpenLayers with the latest OSGeo spec WMTS (Web Map Tiling Service)? If so, maybe we could exchange some impressions... cheers, Jo -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090112/4f8b2d67/attachment.html From stephane.poirier at usherbrooke.ca Mon Jan 12 15:56:38 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] draw-feature demo Message-ID: Hi All, I am running the OpenLayers-2.7/examples/draw-feature.html example program. Everything works fine in Firefox 3.0, but with Internet Explorer 7.0 the vector feautures do not display at all. Anyone knows why? Thanks, Stephane -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090112/64f42112/attachment.html From brad at cubewerx.com.au Mon Jan 12 17:00:52 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] FW: Overview Map Problems Message-ID: <032801c97501$3d78e500$b86aaf00$@com.au> Skipped content of type multipart/alternative-------------- next part -------------- _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From stephane.poirier at usherbrooke.ca Mon Jan 12 17:17:18 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] mousedown Message-ID: <4ABA845741D047F099903FEEC5B733BE@flshedu.usherbrooke.ca> Hi All, I would like to detect when the mouse left button is down over the map. I can detect mouseup and mousemove using map.events.register("mouseup", this, function(e){ ... }); and map.events.register("mousemove", this, function(e){ ... }); but not when the mouse left button is clicked down. Any tricks? Stephane -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090112/c12b43fe/attachment.html From bthoen at gisnet.com Mon Jan 12 17:30:36 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] XMLHttpRequest.open Error on WFS layer Message-ID: <496BC48C.1090301@gisnet.com> I'm trying to get a layer of lines to open as a WFS layer and I'm getting this error: uncaught exception: Permission denied to call method XMLHttpRequest.open When I issue a GetRequest directly to the server via the browser url window, I get an XML file with all the expected data. But when I try to open it with OpenLayers I get this error and no lines show up. Does anyone know what's wrong and how to fix it? The server is Mapserver 4.10.0 and I'm using OpenLayers 2.7. The relevant part of the script looks like this: ... ... The relevant part of the MapServer WFS map file looks like this: MAP SIZE 840 700 EXTENT -125 30 -65 50 UNITS DD SHAPEPATH /var/www/maps/data/ FONTSET /var/www/maps/fonts/fonts.txt SYMBOLSET "/var/www/maps/symbols/symbols.txt" WEB TEMPLATE "/var/www/html/piper/test.html" IMAGEPATH "/var/www/html/tmp/" IMAGEURL "/tmp/" METADATA "wfs_title" "Piper WFS Layers" "wfs_onlineresource" "http://192.168.0.250/cgi-bin/mapserv?" "wfs_srs" "EPSG:4326" END END PROJECTION "init=epsg:4326" END LAYER NAME pipes METADATA "wfs_title" "pipes" "gml_featureid" "arc_id" "gml_include_items" "all" END TYPE LINE STATUS ON CONNECTIONTYPE POSTGIS CONNECTION "user=bthoen dbname=piper host=192.168.0.250 port=5432" DATA "the_geom from pipes" DUMP TRUE PROJECTION "init=epsg:4326" END CLASS NAME pipes COLOR 0 0 0 END END ... From eric.c2c at gmail.com Mon Jan 12 17:36:36 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] XMLHttpRequest.open Error on WFS layer In-Reply-To: <496BC48C.1090301@gisnet.com> References: <496BC48C.1090301@gisnet.com> Message-ID: <5ec103de0901121436u3b3aba72pfed3fde8c2bed2b2@mail.gmail.com> Hi Bill Check this: . -- Eric On Mon, Jan 12, 2009 at 11:30 PM, Bill Thoen wrote: > I'm trying to get a layer of lines to open as a WFS layer and I'm > getting this error: > > uncaught exception: Permission denied to call method XMLHttpRequest.open > > When I issue a GetRequest directly to the server via the browser url > window, I get an XML file with all the expected data. But when I try to > open it with OpenLayers I get this error and no lines show up. Does > anyone know what's wrong and how to fix it? > > The server is Mapserver 4.10.0 and I'm using OpenLayers 2.7. The > relevant part of the script looks like this: > ... > > ... > > The relevant part of the MapServer WFS map file looks like this: > MAP > SIZE 840 700 > EXTENT -125 30 -65 50 > UNITS DD > SHAPEPATH /var/www/maps/data/ > FONTSET /var/www/maps/fonts/fonts.txt > SYMBOLSET "/var/www/maps/symbols/symbols.txt" > > WEB > TEMPLATE "/var/www/html/piper/test.html" > IMAGEPATH "/var/www/html/tmp/" > IMAGEURL "/tmp/" > METADATA > "wfs_title" "Piper WFS Layers" > "wfs_onlineresource" "http://192.168.0.250/cgi-bin/mapserv?" > "wfs_srs" "EPSG:4326" > END > END > > PROJECTION > "init=epsg:4326" > END > > LAYER > NAME pipes > METADATA > "wfs_title" "pipes" > "gml_featureid" "arc_id" > "gml_include_items" "all" > END > TYPE LINE > STATUS ON > CONNECTIONTYPE POSTGIS > CONNECTION "user=bthoen dbname=piper host=192.168.0.250 port=5432" > DATA "the_geom from pipes" > DUMP TRUE > PROJECTION > "init=epsg:4326" > END > CLASS > NAME pipes > COLOR 0 0 0 > END > END > ... > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From bthoen at gisnet.com Mon Jan 12 17:42:59 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] XMLHttpRequest.open Error on WFS layer Message-ID: <496BC773.1080407@gisnet.com> Never mind... I solved it by changing all references to the IP 192.168.0.250 to 'localhost'. Even though on my network localhost is 192.168.0.250, I guess if the URL says localhost, then all your data resources need to be referenced the same way. From rich at deluded.co.uk Mon Jan 12 18:04:27 2009 From: rich at deluded.co.uk (Deluded) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] All marker offsets are wrong when using features In-Reply-To: <7a85053e0901120337l72cef5f8jde6449ffc6cce5a4@mail.gmail.com> References: <1231719059617-2143419.post@n2.nabble.com> <20090112005056.GD9979@metacarta.com> <1231759813117-2145220.post@n2.nabble.com> <7a85053e0901120337l72cef5f8jde6449ffc6cce5a4@mail.gmail.com> Message-ID: <1231801467778-2148478.post@n2.nabble.com> zspitzer wrote: > > i've hit this one as well, playing around with styles after reading > through > some of the api code, > > i did this which seem to help offset the bottom of the marker directly > on the point > > var style = new OpenLayers.Style({ > externalGraphic: "images/openlayers/AQUA.png", > pointRadius: 9, > graphicYOffset : -15 > }); > > z > Sorry to be thick, but what do I apply this style object to? I've tried feature.style = style; but doesn't do anything. The docs reference the new styles layer - but this seems a bit excesive to simply move an icon a few pixels. Thanks, Rich. -- View this message in context: http://n2.nabble.com/All-marker-offsets-are-wrong-when-using-features-tp2143419p2148478.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zac.spitzer at gmail.com Mon Jan 12 19:27:24 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] All marker offsets are wrong when using features In-Reply-To: <1231801467778-2148478.post@n2.nabble.com> References: <1231719059617-2143419.post@n2.nabble.com> <20090112005056.GD9979@metacarta.com> <1231759813117-2145220.post@n2.nabble.com> <7a85053e0901120337l72cef5f8jde6449ffc6cce5a4@mail.gmail.com> <1231801467778-2148478.post@n2.nabble.com> Message-ID: <7a85053e0901121627j20858529h6701994ecd416eb@mail.gmail.com> var style = new OpenLayers.Style({ externalGraphic: "images/openlayers/AQUA.png", pointRadius: 9, graphicYOffset : -15 }); poi = new OpenLayers.Layer.Vector("poi", { strategies: [new OpenLayers.Strategy.BBOX({ratio: 1.1})], protocol: new OpenLayers.Protocol.HTTP({ url: "/poi.cfm", params: { scale: map.getScale() }, // this is static format: new OpenLayers.Format.GeoJSON() }), styleMap: new OpenLayers.StyleMap(style) }); On Tue, Jan 13, 2009 at 10:04 AM, Deluded wrote: > > > zspitzer wrote: >> >> i've hit this one as well, playing around with styles after reading >> through >> some of the api code, >> >> i did this which seem to help offset the bottom of the marker directly >> on the point >> >> var style = new OpenLayers.Style({ >> externalGraphic: "images/openlayers/AQUA.png", >> pointRadius: 9, >> graphicYOffset : -15 >> }); >> >> z >> > > Sorry to be thick, but what do I apply this style object to? > > I've tried feature.style = style; but doesn't do anything. > The docs reference the new styles layer - but this seems a bit excesive to > simply move an icon a few pixels. > > Thanks, > > Rich. > > -- > View this message in context: http://n2.nabble.com/All-marker-offsets-are-wrong-when-using-features-tp2143419p2148478.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From geotux06 at gmail.com Mon Jan 12 21:55:07 2009 From: geotux06 at gmail.com (GeoTux) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Thin web mapping clients comparison Message-ID: <9ed809d0901121855x7ed57dcbg8d9431c3b7970aa5@mail.gmail.com> Good evening OpenLayers developers and users. We are the GeoTux team [1] and we present to you a thin web mapping clients comparison [2]. Your project is there so we would like you to visit it. We recently translate the comparison, the page is originally in spanish. Any suggestions are welcome. ----------------- [1] http://geotux.tuxfamily.org [2] http://geotux.tuxfamily.org/index.php?option=com_myblog&show=comparaciF3n-de-clientes-ligeros-para-sig.html&Itemid=59&lang=en -- ----------- |\__ (:>__)( |/ Soluciones Geoinform?ticas Libres http://geotux.tuxfamily.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090112/a781778e/attachment.html From dave.potts at pinan.co.uk Tue Jan 13 03:05:54 2009 From: dave.potts at pinan.co.uk (David Potts) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] differences between firefox and IE/drawing problems Message-ID: <4956.193.123.19.10.1231833954.squirrel@dp2642.force9.co.uk> I am developing an openlayers application, its designed to draw gml points on a map and allow a user to click on them. Its works fine in firefox fox, but in IE it only draw the map, ie no gml points. Sometimes I have been able to get it draw things in IE by refreshing the display by randomly enabling/disabling the vector layers, so I known it partial works. For debuging firefox application there is Firebug and suggestions for a simalir IE tool? Can any suggest any reasons fire a openlayers app thats works within Firefox would not work in IE? Dave. -- Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Pinan Software From Peter.Sykora at ooe.gv.at Tue Jan 13 03:08:07 2009 From: Peter.Sykora at ooe.gv.at (Peter.Sykora@ooe.gv.at) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] PropertyStyles not working in IE7 Message-ID: <05C80D686FDA0D4B811E25DFA72430D0041C2BE9@msli01-012.res01.ads.ooe.local> >Ok, now I see what's wrong: "default" is a keyword in IE, so you have >to use quotes in the hash definition, like this: > >{ > "default": gemSymbolizer, > "select": selectSymbolizer >} That?s it! Thank?s for taking your time. I adapted the wiki documentation (http://trac.openlayers.org/wiki/Styles) Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090113/67b7426b/attachment.html From zac.spitzer at gmail.com Tue Jan 13 03:44:29 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] differences between firefox and IE/drawing problems In-Reply-To: <4956.193.123.19.10.1231833954.squirrel@dp2642.force9.co.uk> References: <4956.193.123.19.10.1231833954.squirrel@dp2642.force9.co.uk> Message-ID: <7a85053e0901130044k1bdcfc5eq1b9c74364b9c2623@mail.gmail.com> watch out for trailling comma's in structs { scale:9, whatever:12,} will break ie also because IE pollutes the variable name space you need to var your variables or it can get confused z On Tue, Jan 13, 2009 at 7:05 PM, David Potts wrote: > > > I am developing an openlayers application, its designed to draw gml points > on a map and allow a user to click on them. > > Its works fine in firefox fox, but in IE it only draw the map, ie no gml > points. Sometimes I have been able to get it draw things in IE by > refreshing the display by randomly enabling/disabling the vector layers, > so I known it partial works. > > For debuging firefox application there is Firebug and suggestions for a > simalir IE tool? > > Can any suggest any reasons fire a openlayers app thats works within > Firefox would not work in IE? > > Dave. > -- > Any views expressed in this message are those of the individual sender, > except where the sender specifically states them to be the views of the > Pinan Software > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From derek at cmainfo.co.za Tue Jan 13 04:00:25 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> Message-ID: <1231837225834-2150280.post@n2.nabble.com> I would definately buy such a book. Preferably something in a tutorial form that starts with a simple map and then adds advanced features and customisation of the map. A section on TileCache would also be appreciated, or am I just pushing my luck =) Kenny France wrote: > > Hi Guys, > > > > Who on the list would like to purchase a book on Openlayers? > > > > I know I would ;) > > > > Let?s see how much response there is and MAYBE Chris / the open layers > team > would write one > > > > Kenny > > > > PS: if you guys do, Please remember me in the credits > > > _____ > > I am using the free version of SPAMfighter for home users. > SPAMfighter has removed 2129 spam emails to date. > Paying users do not have this message in their emails. > Try SPAMfighter for free now! > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/OpenLayers-Book-tp1830526p2150280.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bianchimro at gmail.com Tue Jan 13 05:50:59 2009 From: bianchimro at gmail.com (Mauro Bianchi) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Google and UK grid vector overlay Message-ID: Dear all, I'm pretty new to OL and I want to do the following 1) have a google layer as a base layer 2) overlay a vector layer and add points programmatically. Points coordinates are given in the UK national grid system (OSGB , which should be EPSG:27700) I could convert points coordinates externally, but I'd prefer to do it directly into OpenLayers, if possibile. I tried different methods but cannot get it working. Any help would be really appreciated! Thank you Mauro My code is the following var 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) }; map = new OpenLayers.Map('map', options); //google maps layer, physical var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP, numZoomLevels: 20, 'sphericalMercator':true} ); map.addLayers([gphy]); //a vector layer where i want to add points programmatically var vectorLayer = new OpenLayers.Layer.Vector("My Geometry"); //this is a point that i want to add in UK grid coordinates var point = new OpenLayers.Geometry.Point(519000, 165222).transform( new OpenLayers.Projection("EPSG:27700"), map.projection); var pointFeature = new OpenLayers.Feature.Vector(point); vectorLayer.addFeatures([pointFeature]); map.addLayer(vectorLayer); //controls and centering map.addControl(new OpenLayers.Control.LayerSwitcher()); map.setCenter(new OpenLayers.LonLat(-0.126343,51.539502).transform(map.displayProjection, map.projection), 10); -- Mauro Bianchi bianchimro@gmail.com From derek at cmainfo.co.za Tue Jan 13 05:51:43 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Markers Message-ID: <1231843903109-2150609.post@n2.nabble.com> Any good references on adding markers in OpenLayers? I have tried in the past with no success and am now at a point where I need them. -- View this message in context: http://n2.nabble.com/Markers-tp2150609p2150609.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andre.matos at co.sapo.pt Tue Jan 13 06:19:14 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Markers In-Reply-To: <1231843903109-2150609.post@n2.nabble.com> References: <1231843903109-2150609.post@n2.nabble.com> Message-ID: You can add markers using a vector layer like this: markersLayer = new OpenLayers.Layer.Vector("Markers", { projection: new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ externalGraphic: "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: "http://openlayers.org/dev/examples/marker_shadow.png" graphicYOffset: -20, backgroundXOffset: 0, backgroundYOffset: -17, pointRadius: 10 }) } ); map.addLayer(markersLayer); feature1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); markersLayer.addFeatures([feature1]); Regards, Andr? Matos http://mapas.sapo.pt -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Derek Watling Sent: ter?a-feira, 13 de Janeiro de 2009 10:52 To: users@openlayers.org Subject: [OpenLayers-Users] Markers Any good references on adding markers in OpenLayers? I have tried in the past with no success and am now at a point where I need them. -- View this message in context: http://n2.nabble.com/Markers-tp2150609p2150609.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 andre.matos at co.sapo.pt Tue Jan 13 06:23:23 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Markers In-Reply-To: References: <1231843903109-2150609.post@n2.nabble.com> Message-ID: About the reference, you have the examples, at: http://openlayers.org/dev/examples/ Regards, Andr? Matos http://mapas.sapo.pt -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Andre Pereira de Matos Sent: ter?a-feira, 13 de Janeiro de 2009 11:19 To: Derek Watling; users@openlayers.org Subject: Re: [OpenLayers-Users] Markers You can add markers using a vector layer like this: markersLayer = new OpenLayers.Layer.Vector("Markers", { projection: new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ externalGraphic: "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: "http://openlayers.org/dev/examples/marker_shadow.png" graphicYOffset: -20, backgroundXOffset: 0, backgroundYOffset: -17, pointRadius: 10 }) } ); map.addLayer(markersLayer); feature1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); markersLayer.addFeatures([feature1]); Regards, Andr? Matos http://mapas.sapo.pt -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Derek Watling Sent: ter?a-feira, 13 de Janeiro de 2009 10:52 To: users@openlayers.org Subject: [OpenLayers-Users] Markers Any good references on adding markers in OpenLayers? I have tried in the past with no success and am now at a point where I need them. -- View this message in context: http://n2.nabble.com/Markers-tp2150609p2150609.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 From adube at mapgears.com Tue Jan 13 08:36:31 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] mousedown In-Reply-To: <4ABA845741D047F099903FEEC5B733BE@flshedu.usherbrooke.ca> References: <4ABA845741D047F099903FEEC5B733BE@flshedu.usherbrooke.ca> Message-ID: <496C98DF.6080400@mapgears.com> Hi St?phane, You could use a Click Handler to do this. See the example : http://openlayers.org/dev/examples/click-handler.html You could use the mousedown property in OpenLayers/Handler/Click.js to do what you want. Alexandre stephane.poirier@usherbrooke.ca wrote: > > Hi All, > > I would like to detect when the mouse left button is down over the map. > > I can detect mouseup and mousemove using > map.events.register("mouseup", this, function(e){ ... }); > and map.events.register("mousemove", this, function(e){ ... }); but > not when the mouse left button is clicked down. > > Any tricks? > > Stephane > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From donald.kerr at dkerr.co.uk Tue Jan 13 08:49:35 2009 From: donald.kerr at dkerr.co.uk (Donald Kerr) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Best Practice In-Reply-To: <496B4B85.104@mapgears.com> Message-ID: <95F9C56FD8614CEFA108614B2E4841F0@DELL> Alexandre, Thanks for your help. I will look through your suggestions most of which at first glance will solve my problems. I'll post back to hear with any subsequent issues. Thanks again. Regards, Donald -----Original Message----- From: Alexandre Dube [mailto:adube@mapgears.com] Sent: 12 January 2009 13:54 To: Donald Kerr Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Best Practice Donald Kerr wrote: > Hi all, > > I've been working with OpenLayers for a short time and am a bit confused as > to how to approach the task I have due to the fact that there appears to be > so many ways of achieving my goal. > > Currently I get the data from an asp.net asmx web service and parse through > the XML returned. This seems fine in terms of collecting the date but is > very slow in Internet Explorer - no surprise. I want to add markers to a > layer or layers with the ability to destroy each set of markers and reload > them as the user drags the map. I am using the following code: > > //====================================== > for(var i=0; i var uniqueID = > nodes[i].getElementsByTagName('UniqueID')[0].firstChild.nodeValue; > var category > =nodes[i].getElementsByTagName('Category')[0].firstChild.nodeValue; > var description = > nodes[i].getElementsByTagName('Description')[0].firstChild.nodeValue; > var easting = > nodes[i].getElementsByTagName('GridRef')[0].getElementsByTagName('Easting')[ > 0].firstChild.nodeValue; > var northing = > nodes[i].getElementsByTagName('GridRef')[0].getElementsByTagName('Northing') > [0].firstChild.nodeValue; > var lonLat = new OpenLayers.LonLat(easting, northing); > var feature = new OpenLayers.Feature.Vector( > new OpenLayers.Geometry.Point(lonLat.lon, > lonLat.lat), > { > uniqueID: uniqueID, > category: category, > description: description > } > ); > features.push(feature); > } > myDataLayer.addFeatures(features); > //====================================== > > This all works fine and I am showing different icons based on a StyleMap > that has the following code: > > //====================================== > var lookup = { > 'Full': { externalGraphic: 'images/full.png' }, > 'Partial': { externalGraphic: 'images/partial.png' }, > 'Historic': { externalGraphic: 'images/historic.png' }, > 'MSF': { externalGraphic: 'images/msf.png', graphicWidth: > 25, graphicHeight: 25 } > } > vmdsDataStyleMap.addUniqueValueRules('default', 'category', lookup); > //====================================== > > I can detroy all features in the layer using the following code: > > //====================================== > myDataLayer.removeFeatures(vmdsDataLayer.features); > //====================================== > > I have a list of things that I need to do and I am not sure of the best way > to achieve this is. In the first instance, I want to be able to destroy only > those features that are tagged, for example, 'Full' under 'category'. So > that I can toggle on/off the features that I want to view. Is adding these > all to one layer the best way to achieve this or should I each category to a > new vector layer? Indeed, is a vector layer the best way to achieve this? > > In addidion to the above, I need to do the following: > > 1. Add a label to each icon that I can toggle on and off using some external > javascript. > > That's not currently possible with OpenLayers, but you could display a small popup instead. > 2. Change the css of the above label to show it bigger on mouseover or, if > the labels aren't toggled on, simply show the label onmouseover. > You could use a SelectFeature control for you vector layer with the option hover:true and changing the style of your selected features. The popup could appear as the feature gets selected. http://openlayers.org/dev/examples/select-feature.html http://openlayers.org/dev/examples/select-feature-openpopup.html > 3. Redirect the browser to a different url using the onclick of the icon. > You could do that with a Handler.Feature with the option {click: onFeatureClicked} and created your onFeatureClicked function that open a different url. > 4. I can already set the icon up to be draggable but I need to save new > coordinates to a database onmouseup. I need to capture the icon's 'UniqueID' > onmouseup to do that, I assume. How is this done. > > Is a vector layer suitable for what I am trying to do or is there a better > an easier way to do the above? > A vector layer is suitable, but you need to have you data in some database format, like PostGIS and to use a server application that supports transactions like Insert/Update/Delete, like GeoServer or TinyOWS. > Any help or advice would be very much appreciated. > > Many thanks. > > Regards, > > Donald > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > Hope this helps, -- Alexandre Dub? Mapgears www.mapgears.com From donald.kerr at dkerr.co.uk Tue Jan 13 08:56:49 2009 From: donald.kerr at dkerr.co.uk (Donald Kerr) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Adding Features to Vector Array - The Time it Takes In-Reply-To: <496B4B85.104@mapgears.com> Message-ID: <18F737A1AC344FF5879D004FD75BF0EA@DELL> Hi list, I am using the following code to cycle through an array and then I add the features array to an OpenLayers Vector layer: //====================================== for(var i=0; i Hi list, I have done an example with a draggable feature (with DragFeatureControl). In Firefox, Google Chrome works fine... But when I drag it on IE it is very slow... The code used is: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// markersLayer = new OpenLayers.Layer.Vector("Markers", { projection: new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ externalGraphic: "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, backgroundXOffset: 0, backgroundYOffset: -17, pointRadius: 10 }) } ); map.addLayer(markersLayer); feature1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); feature2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-1504105.3415234375, 4392319.753066596)); markersLayer.addFeatures([feature1, feature2]); var ccontrol = new OpenLayers.Control.DragFeature(markersLayer); map.addControl(ccontrol); ccontrol.activate(); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Any suggestions? Is it a bug? Will it be fixed? Regards, Andr? Matos http://maps.sapo.pt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090113/6d47f91d/attachment.html From frederic.junod at camptocamp.com Tue Jan 13 10:02:35 2009 From: frederic.junod at camptocamp.com (=?UTF-8?B?RnLDqWTDqXJpYw==?= Junod) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Drag feature control slow in IE In-Reply-To: References: Message-ID: <20090113160235.635d3d82@kirishima.wrk.lsn.camptocamp.com> Hi, Do you have the same issue with http://openlayers.org/dev/examples/drag-feature.html ? Your code looks reasonable to me ... fredj Le Tue, 13 Jan 2009 14:43:46 +0000, Andre Pereira de Matos a ?crit : > Hi list, > > I have done an example with a draggable feature (with DragFeatureControl). In > Firefox, Google Chrome works fine... But when I drag it on IE it is very > slow... > > The code used is: > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > markersLayer = new OpenLayers.Layer.Vector("Markers", > { > projection: > new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ > externalGraphic: > "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: > "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, > backgroundXOffset: > 0, backgroundYOffset: -17, > pointRadius: > 10 }) > } > ); > > map.addLayer(markersLayer); > feature1 = new OpenLayers.Feature.Vector(new > OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); feature2 > = new OpenLayers.Feature.Vector(new > OpenLayers.Geometry.Point(-1504105.3415234375, 4392319.753066596)); > markersLayer.addFeatures([feature1, feature2]); > > var ccontrol = new > OpenLayers.Control.DragFeature(markersLayer); map.addControl(ccontrol); > ccontrol.activate(); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > Any suggestions? Is it a bug? Will it be fixed? > > Regards, > Andr? Matos > http://maps.sapo.pt > -- Fr?d?ric Junod Camptocamp SA From jvanulde at nrcan.gc.ca Tue Jan 13 11:45:58 2009 From: jvanulde at nrcan.gc.ca (Semantica) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Does anyone have an example of using the measure control in a toolbar? Message-ID: <1231865158477-2152008.post@n2.nabble.com> I am having issues with this. For some reason, my control won't activate/deactivate when the button is clicked. Here are a couple of snippets: var optionsLine = { handlerOptions: { style: "default", // this forces default render intent layerOptions: {styleMap: styleMap}, persist: true }, displayClass: 'olControlMeasureDistance' }; var optionsPolygon = { handlerOptions: { style: "default", // this forces default render intent layerOptions: {styleMap: styleMap}, persist: true }, displayClass: 'olControlMeasureArea' }; measureControls = { line: new OpenLayers.Control.Measure(OpenLayers.Handler.Path, optionsLine), polygon: new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon, optionsPolygon) }; // add the measure controls to the map var control; for(var key in measureControls) { control = measureControls[key]; control.events.on({ "measure": handleMeasurements, "measurepartial": handleMeasurements }); } panel.addControls([measureControls.line, measureControls.polygon]); // add the panel to the map map.addControl(panel); Any ideas on what the problem might be? Thank you in advance! -- View this message in context: http://n2.nabble.com/Does-anyone-have-an-example-of-using-the-measure-control-in-a-toolbar--tp2152008p2152008.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andre.matos at co.sapo.pt Tue Jan 13 12:56:01 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:03 2010 Subject: [OpenLayers-Users] Drag feature control slow in IE In-Reply-To: <20090113160235.635d3d82@kirishima.wrk.lsn.camptocamp.com> References: <20090113160235.635d3d82@kirishima.wrk.lsn.camptocamp.com> Message-ID: Yes, the same issue occurres when you used this example on IE. Is it a bug? Any plans/suggestions to fix it? Regards, Andr? Matos http://maps.sapo.pt -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Fr?d?ric Junod Sent: ter?a-feira, 13 de Janeiro de 2009 15:03 To: users@openlayers.org Subject: Re: [OpenLayers-Users] Drag feature control slow in IE Hi, Do you have the same issue with http://openlayers.org/dev/examples/drag-feature.html ? Your code looks reasonable to me ... fredj Le Tue, 13 Jan 2009 14:43:46 +0000, Andre Pereira de Matos a ?crit : > Hi list, > > I have done an example with a draggable feature (with DragFeatureControl). In > Firefox, Google Chrome works fine... But when I drag it on IE it is very > slow... > > The code used is: > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > markersLayer = new OpenLayers.Layer.Vector("Markers", > { > projection: > new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ > externalGraphic: > "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: > "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, > backgroundXOffset: > 0, backgroundYOffset: -17, > pointRadius: > 10 }) > } > ); > > map.addLayer(markersLayer); > feature1 = new OpenLayers.Feature.Vector(new > OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); feature2 > = new OpenLayers.Feature.Vector(new > OpenLayers.Geometry.Point(-1504105.3415234375, 4392319.753066596)); > markersLayer.addFeatures([feature1, feature2]); > > var ccontrol = new > OpenLayers.Control.DragFeature(markersLayer); map.addControl(ccontrol); > ccontrol.activate(); > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > Any suggestions? Is it a bug? Will it be fixed? > > Regards, > Andr? Matos > http://maps.sapo.pt > -- Fr?d?ric Junod Camptocamp SA _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From bthoen at gisnet.com Tue Jan 13 13:18:17 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <1231837225834-2150280.post@n2.nabble.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> Message-ID: <496CDAE9.3000706@gisnet.com> If we could get enough commitments at say, $45 each or more, then maybe there would be enough to pay the developers to put a technical writer to work on some electronic documentation that has more detail than the current short scope works and robo-generated stuff. I'm thinking of the same model for writing documentation that the OS community uses for getting code written -- i.e. sponsoring someone competent to do the work on contract. My guess is that because OpenLayers is still evolving so fast that it would be hard to convince a publisher that a printed book would pay for itself before it went out of date and people stopped buying it. But a digital version that fills in the gaps and presents the topics in book-scope detail would be a good first step and is probably a feasible goal. An e-doc could also evolve as fast as the code does because bits are more flexible than atoms. In the meanwhile, it'd be great if those who know how the system works would add pages to the wiki -- or even just an outline of what us newbies and knowlessmen want/need so that when we can inspire a technical writer to do some open source docs development for us that there's a framework ready to write the book. Derek Watling wrote: > I would definately buy such a book. Preferably something in a tutorial form > that starts with a simple map and then adds advanced features and > customisation of the map. A section on TileCache would also be appreciated, > or am I just pushing my luck =) > > > Kenny France wrote: > >> Hi Guys, >> >> >> >> Who on the list would like to purchase a book on Openlayers? >> >> >> >> I know I would ;) >> >> >> >> Let?s see how much response there is and MAYBE Chris / the open layers >> team >> would write one >> >> >> >> Kenny >> >> >> >> PS: if you guys do, Please remember me in the credits >> >> >> _____ >> >> I am using the free version of SPAMfighter for home users. >> SPAMfighter has removed 2129 spam emails to date. >> Paying users do not have this message in their emails. >> Try SPAMfighter for free now! >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > From mattxbart at gmail.com Tue Jan 13 13:24:34 2009 From: mattxbart at gmail.com (Matt Bartolome) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Layer.Tilecache does not match display projection Message-ID: <633d34560901131024r5c8de2e2veca2d8f1b22900f3@mail.gmail.com> Hi, I'm trying to use a static pre-generated Tilecache layer in my map. The projection is EPSG:2230. For some reason the layer is shifted about 18 miles to the west and south of what the display coordinates indicate (when I mouse over the map). For example if I do a map.setCenter with a known coordinate with the correct projection my layer display is off. When I use the same cache with a WMS layer in front of it (using tilecache server) everything looks perfect. Is there a trick to getting Layer.Tilecache to play nice or am I stuck using WMS Layers? I feel like I'm missing something really basic here. Thanks, Matt My projs def is set to: Proj4js.defs["EPSG:2230"] = "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"; From crschmidt at metacarta.com Tue Jan 13 13:59:00 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <496CDAE9.3000706@gisnet.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> Message-ID: <20090113185900.GH4568@metacarta.com> On Tue, Jan 13, 2009 at 11:18:17AM -0700, Bill Thoen wrote: > In the meanwhile, it'd be great if those who know how the system works > would add pages to the wiki -- or even just an outline of what us > newbies and knowlessmen want/need so that when we can inspire a > technical writer to do some open source docs development for us that > there's a framework ready to write the book. http://docs.openlayers.org/ is an attempt at more prose documentatin, combining things that were originally in the Wiki with new dcumentation and so on. Developing more documentatino in the wiki is reasonable, but I think that docs.openlayers.org should be the permanant location of book-like material, which is why I'ev spent a couple dozen hours of my 'free' time on it. If people don't like the way that site looks, then commenting now is a great idea so that I can top spending time on it. > Derek Watling wrote: > > I would definately buy such a book. Preferably something in a tutorial form > > that starts with a simple map and then adds advanced features and > > customisation of the map. A section on TileCache would also be appreciated, > > or am I just pushing my luck =) > > > > > > Kenny France wrote: > > > >> Hi Guys, > >> > >> > >> > >> Who on the list would like to purchase a book on Openlayers? > >> > >> > >> > >> I know I would ;) > >> > >> > >> > >> Let?s see how much response there is and MAYBE Chris / the open layers > >> team > >> would write one > >> > >> > >> > >> Kenny > >> > >> > >> > >> PS: if you guys do, Please remember me in the credits > >> > >> > >> _____ > >> > >> I am using the free version of SPAMfighter for home users. > >> SPAMfighter has removed 2129 spam emails to date. > >> Paying users do not have this message in their emails. > >> Try SPAMfighter for free now! > >> > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > >> > >> > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From andre.matos at co.sapo.pt Tue Jan 13 13:58:01 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] New DragFeature Control and SelectFeatureControl cross layers. Want to share Message-ID: Hi guys, I have made a Project with openlayers, and at some point I had to make a new handler and a new control to provide draggable feature and handle events like, click, mouseover, mouseout in features that was in different layers. The Openlayers control (DragFeature, SelectFeature) and handlers (Drag, Feature) only works if the features are all in the same layer and the layer is on the top. As I saw some people with the same problem, I want to share my new handler and controls to provide this functionality. How can I share it? Anyone interested? Regards, Andr? Matos http://maps.sapo.pt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090113/a9111630/attachment.html From mika at digikartta.net Tue Jan 13 14:20:17 2009 From: mika at digikartta.net (Mika Lehtonen) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <20090113185900.GH4568@metacarta.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> Message-ID: <496CE971.6080004@digikartta.net> Excellent work. I didn't know its existence. I have a habbit just using class documentation and examples.. I would definitely vote for carrying on your work, allthough it would be nice if you didn't need to use your free time on it. - mika - Christopher Schmidt kirjoitti: > On Tue, Jan 13, 2009 at 11:18:17AM -0700, Bill Thoen wrote: > >> In the meanwhile, it'd be great if those who know how the system works >> would add pages to the wiki -- or even just an outline of what us >> newbies and knowlessmen want/need so that when we can inspire a >> technical writer to do some open source docs development for us that >> there's a framework ready to write the book. >> > > http://docs.openlayers.org/ is an attempt at more prose documentatin, > combining things that were originally in the Wiki with new dcumentation > and so on. Developing more documentatino in the wiki is reasonable, but > I think that docs.openlayers.org should be the permanant location of > book-like material, which is why I'ev spent a couple dozen hours of my > 'free' time on it. If people don't like the way that site looks, then > commenting now is a great idea so that I can top spending time on it. > > >> Derek Watling wrote: >> >>> I would definately buy such a book. Preferably something in a tutorial form >>> that starts with a simple map and then adds advanced features and >>> customisation of the map. A section on TileCache would also be appreciated, >>> or am I just pushing my luck =) >>> >>> >>> Kenny France wrote: >>> >>> >>>> Hi Guys, >>>> >>>> >>>> >>>> Who on the list would like to purchase a book on Openlayers? >>>> >>>> >>>> >>>> I know I would ;) >>>> >>>> >>>> >>>> Let?s see how much response there is and MAYBE Chris / the open layers >>>> team >>>> would write one >>>> >>>> >>>> >>>> Kenny >>>> >>>> >>>> >>>> PS: if you guys do, Please remember me in the credits >>>> >>>> >>>> _____ >>>> >>>> I am using the free version of SPAMfighter for home users. >>>> SPAMfighter has removed 2129 spam emails to date. >>>> Paying users do not have this message in their emails. >>>> Try SPAMfighter for free now! >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>>> >>>> >>> >>> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > From arnd.wippermann at web.de Tue Jan 13 14:36:44 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Google and UK grid vector overlay In-Reply-To: Message-ID: The code is correct.Have you included proj4js in your page? Otherwise Transform depends on the proj4js library. If proj4js is not available, then this is just an empty stub. Arnd Wippermannn -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Mauro Bianchi Gesendet: Dienstag, 13. Januar 2009 11:51 An: users@openlayers.org Betreff: [OpenLayers-Users] Google and UK grid vector overlay Dear all, I'm pretty new to OL and I want to do the following 1) have a google layer as a base layer 2) overlay a vector layer and add points programmatically. Points coordinates are given in the UK national grid system (OSGB , which should be EPSG:27700) I could convert points coordinates externally, but I'd prefer to do it directly into OpenLayers, if possibile. I tried different methods but cannot get it working. Any help would be really appreciated! Thank you Mauro My code is the following var 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) }; map = new OpenLayers.Map('map', options); //google maps layer, physical var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP, numZoomLevels: 20, 'sphericalMercator':true} ); map.addLayers([gphy]); //a vector layer where i want to add points programmatically var vectorLayer = new OpenLayers.Layer.Vector("My Geometry"); //this is a point that i want to add in UK grid coordinates var point = new OpenLayers.Geometry.Point(519000, 165222).transform( new OpenLayers.Projection("EPSG:27700"), map.projection); var pointFeature = new OpenLayers.Feature.Vector(point); vectorLayer.addFeatures([pointFeature]); map.addLayer(vectorLayer); //controls and centering map.addControl(new OpenLayers.Control.LayerSwitcher()); map.setCenter(new OpenLayers.LonLat(-0.126343,51.539502).transform(map.displayProjection, map.projection), 10); -- Mauro Bianchi bianchimro@gmail.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From David.Kimball at state.ma.us Tue Jan 13 15:08:07 2009 From: David.Kimball at state.ma.us (Kimball, David (DCR)) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problems parsing simple XML file Message-ID: <2F05B5BD24C96942AAB4787FB6114FF202C96245@ES-MSG-007.es.govt.state.ma.us> Hi, I'm trying to load and parse a simple XML file [ http://maps.massgis.state.ma.us/dcr/line_field_lookup.xml ] that is formatted like this: [...etcetera...] The XML file basically represents a simple 3-column table I need to use. Through a bunch of sloppy code I have managed to load in the file, but I can't figure out how to loop through the elements and grab the 'Field_name' and 'English' attributes from each element. My HTML file is here [ http://maps.massgis.state.ma.us/dcr/DCR_RoadTrail04.html ] - the relevant parts are the beginning of the init() function and the lineXMLloadSuccess() function. Basically I can't figure out how to use getElementsByTagNameNS() and getAttributeNS() properly. Most of the code I have used so far came from [ http://openlayers.org/dev/examples/xml.html ]. Can anyone help me? If I could get to the point where I could loop through the tags and grab an attribute value from each one, I'd be golden. I'm guessing that one or two lines of code would do the trick, I just can't figure it out. Thanks, David Kimball ||||||| David Kimball ||||||| GIS Specialist ||||||| MA Department of Conservation and Recreation ||||||| http://www.mass.gov/dcr/stewardship/gis/ ||||||| david.kimball@state.ma.us ||||||| 617.626.1447 phone ||||||| 617.626.1349 fax From crschmidt at metacarta.com Tue Jan 13 15:20:16 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <496CE971.6080004@digikartta.net> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> Message-ID: <20090113202016.GI4568@metacarta.com> On Tue, Jan 13, 2009 at 09:20:17PM +0200, Mika Lehtonen wrote: > Excellent work. I didn't know its existence. I have a habbit just using > class documentation and examples.. > > I would definitely vote for carrying on your work, allthough it would be > nice if you didn't need to use your free time on it. I don't have to. Anyone else can contribute -- either by putting together a wikipage (a la http://trac.openlayers.org/wiki/Documentation/Dev/introduction) in RST, or by otherwise contributing documentation that I can toss into the framework. ReST is easy to learn and write, and migrates trivially to the documentation site. Alternatively, patches to the docs are welcome; feel free to file them as tickets in trac, assigned to me. (Of course, integrating them still hits against my 'free time', but much less so than writing the documentation myself, something I've already given up 4 beautiful Saturdays to. :)) > - mika - > > Christopher Schmidt kirjoitti: > >On Tue, Jan 13, 2009 at 11:18:17AM -0700, Bill Thoen wrote: > > > >>In the meanwhile, it'd be great if those who know how the system works > >>would add pages to the wiki -- or even just an outline of what us > >>newbies and knowlessmen want/need so that when we can inspire a > >>technical writer to do some open source docs development for us that > >>there's a framework ready to write the book. > >> > > > >http://docs.openlayers.org/ is an attempt at more prose documentatin, > >combining things that were originally in the Wiki with new dcumentation > >and so on. Developing more documentatino in the wiki is reasonable, but > >I think that docs.openlayers.org should be the permanant location of > >book-like material, which is why I'ev spent a couple dozen hours of my > >'free' time on it. If people don't like the way that site looks, then > >commenting now is a great idea so that I can top spending time on it. > > > > > >>Derek Watling wrote: > >> > >>>I would definately buy such a book. Preferably something in a tutorial > >>>form > >>>that starts with a simple map and then adds advanced features and > >>>customisation of the map. A section on TileCache would also be > >>>appreciated, > >>>or am I just pushing my luck =) > >>> > >>> > >>>Kenny France wrote: > >>> > >>> > >>>>Hi Guys, > >>>> > >>>> > >>>> > >>>>Who on the list would like to purchase a book on Openlayers? > >>>> > >>>> > >>>> > >>>>I know I would ;) > >>>> > >>>> > >>>> > >>>>Let?s see how much response there is and MAYBE Chris / the open layers > >>>>team > >>>>would write one > >>>> > >>>> > >>>> > >>>>Kenny > >>>> > >>>> > >>>> > >>>>PS: if you guys do, Please remember me in the credits > >>>> > >>>> > >>>> _____ > >>>> > >>>>I am using the free version of SPAMfighter for home users. > >>>>SPAMfighter has removed 2129 spam emails to date. > >>>>Paying users do not have this message in their emails. > >>>>Try SPAMfighter for free now! > >>>> > >>>> > >>>>_______________________________________________ > >>>>Users mailing list > >>>>Users@openlayers.org > >>>>http://openlayers.org/mailman/listinfo/users > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >>_______________________________________________ > >>Users mailing list > >>Users@openlayers.org > >>http://openlayers.org/mailman/listinfo/users > >> > > > > -- Christopher Schmidt MetaCarta From tschaub at opengeo.org Tue Jan 13 16:01:41 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <496CDAE9.3000706@gisnet.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> Message-ID: <496D0135.504@opengeo.org> Hey- Bill Thoen wrote: > If we could get enough commitments at say, $45 each or more, then maybe > there would be enough to pay the developers to put a technical writer to > work on some electronic documentation that has more detail than the > current short scope works and robo-generated stuff. I'm thinking of the > same model for writing documentation that the OS community uses for > getting code written -- i.e. sponsoring someone competent to do the work > on contract. My guess is that because OpenLayers is still evolving so > fast that it would be hard to convince a publisher that a printed book > would pay for itself before it went out of date and people stopped > buying it. But a digital version that fills in the gaps and presents the > topics in book-scope detail would be a good first step and is probably a > feasible goal. An e-doc could also evolve as fast as the code does > because bits are more flexible than atoms. > I think this is a good idea. As with other ideas, it will take someone to organize things, generate interest, bug people for money, etc. to get anything done. I don't think we should take it upon ourselves to waste beautiful Saturdays generating documentation for free (person opinion). So, please continue trying to generate interest (and money). And don't waste too many Saturdays doing it. I'd say a $500 sponsorship would be enough to convince a few power users/devs to spend some off time on docs (especially if it is raining). Tim > In the meanwhile, it'd be great if those who know how the system works > would add pages to the wiki -- or even just an outline of what us > newbies and knowlessmen want/need so that when we can inspire a > technical writer to do some open source docs development for us that > there's a framework ready to write the book. > > Derek Watling wrote: >> I would definately buy such a book. Preferably something in a tutorial form >> that starts with a simple map and then adds advanced features and >> customisation of the map. A section on TileCache would also be appreciated, >> or am I just pushing my luck =) >> >> >> Kenny France wrote: >> >>> Hi Guys, >>> >>> >>> >>> Who on the list would like to purchase a book on Openlayers? >>> >>> >>> >>> I know I would ;) >>> >>> >>> >>> Let?s see how much response there is and MAYBE Chris / the open layers >>> team >>> would write one >>> >>> >>> >>> Kenny >>> >>> >>> >>> PS: if you guys do, Please remember me in the credits >>> >>> >>> _____ >>> >>> I am using the free version of SPAMfighter for home users. >>> SPAMfighter has removed 2129 spam emails to date. >>> Paying users do not have this message in their emails. >>> Try SPAMfighter for free now! >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From gregor at hostgis.com Tue Jan 13 16:03:59 2009 From: gregor at hostgis.com (Gregor at HostGIS) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <496D0135.504@opengeo.org> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <496D0135.504@opengeo.org> Message-ID: <496D01BF.2090705@hostgis.com> >> If we could get enough commitments at say, $45 each or more, then maybe >> there would be enough to pay the developers to put a technical writer to >> work on some electronic documentation Sweet. When the pledge drive opens, we're in for $25. -- Gregor Mosheh / Greg Allensworth BS, A+, Network+, Security+, Server+ System Administrator, Lead Programmer HostGIS development & hosting services, http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From bthoen at gisnet.com Tue Jan 13 16:33:17 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Switching Layers Assigned to a SelectFeature Control Message-ID: <496D089D.2000509@gisnet.com> I've got three vector feature layers and I'd like to use the same tool to select any feature from any of these layers. But I understand that you can only have one layer selectable at a time. So I'm thinking that if I change the layer reference in the control as needed, that will do it. But it doesn't seem to work. I've tried changing the layer reference in both map.controls[n].layer and panel.controls[n].layer but the tool continues to select from the original layer that was assigned when the tool was created. What am I doing wrong? From ortelius at gmail.com Tue Jan 13 16:39:24 2009 From: ortelius at gmail.com (Jeffrey Johnson) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <496D0135.504@opengeo.org> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <496D0135.504@opengeo.org> Message-ID: Can't we just do this right and get O'reilly (or other) to commit to publishing a book on OL and advance the $ required to get it written? On Jan 13, 2009, at 13:01, Tim Schaub wrote: > Hey- > > Bill Thoen wrote: >> If we could get enough commitments at say, $45 each or more, then >> maybe >> there would be enough to pay the developers to put a technical >> writer to >> work on some electronic documentation that has more detail than the >> current short scope works and robo-generated stuff. I'm thinking of >> the >> same model for writing documentation that the OS community uses for >> getting code written -- i.e. sponsoring someone competent to do the >> work >> on contract. My guess is that because OpenLayers is still evolving so >> fast that it would be hard to convince a publisher that a printed >> book >> would pay for itself before it went out of date and people stopped >> buying it. But a digital version that fills in the gaps and >> presents the >> topics in book-scope detail would be a good first step and is >> probably a >> feasible goal. An e-doc could also evolve as fast as the code does >> because bits are more flexible than atoms. >> > > I think this is a good idea. As with other ideas, it will take > someone > to organize things, generate interest, bug people for money, etc. to > get > anything done. > > I don't think we should take it upon ourselves to waste beautiful > Saturdays generating documentation for free (person opinion). > > So, please continue trying to generate interest (and money). And > don't > waste too many Saturdays doing it. I'd say a $500 sponsorship would > be > enough to convince a few power users/devs to spend some off time on > docs > (especially if it is raining). > > Tim > >> In the meanwhile, it'd be great if those who know how the system >> works >> would add pages to the wiki -- or even just an outline of what us >> newbies and knowlessmen want/need so that when we can inspire a >> technical writer to do some open source docs development for us that >> there's a framework ready to write the book. >> >> Derek Watling wrote: >>> I would definately buy such a book. Preferably something in a >>> tutorial form >>> that starts with a simple map and then adds advanced features and >>> customisation of the map. A section on TileCache would also be >>> appreciated, >>> or am I just pushing my luck =) >>> >>> >>> Kenny France wrote: >>> >>>> Hi Guys, >>>> >>>> >>>> >>>> Who on the list would like to purchase a book on Openlayers? >>>> >>>> >>>> >>>> I know I would ;) >>>> >>>> >>>> >>>> Let?s see how much response there is and MAYBE Chris / the ope >>>> n layers >>>> team >>>> would write one >>>> >>>> >>>> >>>> Kenny >>>> >>>> >>>> >>>> PS: if you guys do, Please remember me in the credits >>>> >>>> >>>> _____ >>>> >>>> I am using the free version of SPAMfighter for home users. >>>> SPAMfighter has removed 2129 spam emails to date. >>>> Paying users do not have this message in their emails. >>>> Try SPAMfighter for free now! >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>>> >>> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > > -- > Tim Schaub > OpenGeo - http://opengeo.org > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From yves.moisan at boreal-is.com Tue Jan 13 16:50:17 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <496CE971.6080004@digikartta.net> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> Message-ID: <1231883417.6289.22.camel@dell-desktop.example.com> > allthough it would be > nice if you didn't need to use your free time on it. That's the unfortunate lot of most FOSS projects. One day governments, universities and all the other large or small bits of common infrastructure our taxpayer money can buy can turn themselves into money/resource suppliers. I'm extremely indebted to folks like Chris and countless others on other FOSS projects I know of but I do not find this is sustainable computing, at least not when you have 3 kids and a life beside work ;-). Tim is right : "I don't think we should take it upon ourselves to waste beautiful Saturdays generating documentation for free (person opinion)." Cheers, Yves From crschmidt at metacarta.com Tue Jan 13 17:04:52 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <496D0135.504@opengeo.org> Message-ID: <20090113220452.GK4568@metacarta.com> On Tue, Jan 13, 2009 at 01:39:24PM -0800, Jeffrey Johnson wrote: > Can't we just do this right and get O'reilly (or other) to commit to > publishing a book on OL and advance the $ required to get it written? The royalties for writing a book seldom compare in any way, shape, or form to the amount that you could make -- with significantly less effort -- from doing OpenLayers work as a developer. You'd need to find a potential author who has more need for glory than cash, enough knowledge to sell it, and probably a couple hundred hours of free time, in addition to the fact that the market for technical paper books is collapsing rapidly and would therefore be making a pittance in royalties on that investment. Add to that the fact that any paper book is likely to be out of date as soon as it is published, especially if it's not written by someone participating in mainline development, and you've got a disaster waiting to happen, even if you can publish simultaneously in user-editable electronic form alongside the nn-user editable paper form. Technical books for rapid development software are, in my opinino, going the way of the dinosaur. The new way to do it is collaborative electronic development + print on demand. Sufficient organizational support for OpenLayers could probably make this happen (though the sponsorship program is probably not the best path for it), but the organizations would not be able to look at it as an 'investment' designed to return cash, but instead as an investment designed to support the ecosystem around the OpenLayers project (and associated goodies that come along -- similar to sponsorship). I don't think talking to O'Reilly or any other paper book publisher is really going to be a way forward here, practically speaking... thugh glad to be proven wrong by anyone who wants to try :) Regards, -- Christopher Schmidt MetaCarta From huub.fleuren at geodan.nl Tue Jan 13 17:05:19 2009 From: huub.fleuren at geodan.nl (Huub Fleuren) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <20090113220452.GK4568@metacarta.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <496D0135.504@opengeo.org> <20090113220452.GK4568@metacarta.com> Message-ID: <496D101F.4080805@geodan.nl> An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090113/044d4e71/attachment.html From ctaylor at preparedresponse.com Tue Jan 13 17:31:14 2009 From: ctaylor at preparedresponse.com (Chip Taylor) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <1231883417.6289.22.camel@dell-desktop.example.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> Message-ID: <00b401c975ce$a5680420$f0380c60$@com> Just curious about your statement "I don't think we should take it upon ourselves to waste beautiful Saturdays generating documentation for free (person opinion)." Why would you "waste your beautiful Saturdays" generating code for free then? Code without good documentation is less than product and code without documentation at all is good only for the person who wrote it in the first place - and then only as long and that person can remember how they did things! Open Source is cool, Open Source is fun but there has to be a reason for a person to make that effort to develop the software. Most times that reason is the pride in a job well done and the appreciation one feels when you see your efforts being used. Without good documentation to accompany that immense effort of development, neither the pride nor satisfaction can be truly realized. My opinion only of course. (and I am grateful for what has been accomplished here!) Chip Taylor Lead Web Developer Prepared Response, Inc. 1142 Broadway Plaza, Suite 400 Tacoma, WA 98402 253-272-1483 office 253-948-2525 cell 253-272-1562 fax ctaylor@preparedresponse.com www.preparedresponse.com STATEMENT OF CONFIDENTIALITY The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify Prepared Response, Inc. immediately at (206) 223-5544 and destroy all copies of this message and any attachments From jvanulde at nrcan.gc.ca Tue Jan 13 17:36:26 2009 From: jvanulde at nrcan.gc.ca (Semantica) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Does anyone have an example of using the measure control in a toolbar? In-Reply-To: <1231865158477-2152008.post@n2.nabble.com> References: <1231865158477-2152008.post@n2.nabble.com> Message-ID: <1231886186924-2153773.post@n2.nabble.com> Found the solution. Please see: http://dev.openlayers.org/sandbox/jvanulden/openlayers/examples/extended-layerswitcher.html If anyone has any questions on how this was done please don't hesitate to ask. Cheers! -- View this message in context: http://n2.nabble.com/Does-anyone-have-an-example-of-using-the-measure-control-in-a-toolbar--tp2152008p2153773.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zac.spitzer at gmail.com Tue Jan 13 17:48:04 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Drag feature control slow in IE In-Reply-To: References: <20090113160235.635d3d82@kirishima.wrk.lsn.camptocamp.com> Message-ID: <7a85053e0901131448n5f8dd975ifdd9021796aa9082@mail.gmail.com> which version of IE, the example is fine for me in IE7 ? On Wed, Jan 14, 2009 at 4:56 AM, Andre Pereira de Matos wrote: > Yes, the same issue occurres when you used this example on IE. > > Is it a bug? Any plans/suggestions to fix it? > > Regards, > Andr? Matos > http://maps.sapo.pt > > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Fr?d?ric Junod > Sent: ter?a-feira, 13 de Janeiro de 2009 15:03 > To: users@openlayers.org > Subject: Re: [OpenLayers-Users] Drag feature control slow in IE > > Hi, > > Do you have the same issue with > http://openlayers.org/dev/examples/drag-feature.html ? > > Your code looks reasonable to me ... > > fredj > > Le Tue, 13 Jan 2009 14:43:46 +0000, > Andre Pereira de Matos a ?crit : > >> Hi list, >> >> I have done an example with a draggable feature (with DragFeatureControl). In >> Firefox, Google Chrome works fine... But when I drag it on IE it is very >> slow... >> >> The code used is: >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> markersLayer = new OpenLayers.Layer.Vector("Markers", >> { >> projection: >> new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ >> externalGraphic: >> "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: >> "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, >> backgroundXOffset: >> 0, backgroundYOffset: -17, >> pointRadius: >> 10 }) >> } >> ); >> >> map.addLayer(markersLayer); >> feature1 = new OpenLayers.Feature.Vector(new >> OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); feature2 >> = new OpenLayers.Feature.Vector(new >> OpenLayers.Geometry.Point(-1504105.3415234375, 4392319.753066596)); >> markersLayer.addFeatures([feature1, feature2]); >> >> var ccontrol = new >> OpenLayers.Control.DragFeature(markersLayer); map.addControl(ccontrol); >> ccontrol.activate(); >> >> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// >> >> Any suggestions? Is it a bug? Will it be fixed? >> >> Regards, >> Andr? Matos >> http://maps.sapo.pt >> > > > -- > Fr?d?ric Junod > Camptocamp SA > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From crschmidt at metacarta.com Tue Jan 13 17:49:25 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <00b401c975ce$a5680420$f0380c60$@com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b401c975ce$a5680420$f0380c60$@com> Message-ID: <20090113224925.GL4568@metacarta.com> On Tue, Jan 13, 2009 at 02:31:14PM -0800, Chip Taylor wrote: > Just curious about your statement "I don't think we should take it upon > ourselves to waste beautiful Saturdays generating documentation for free > (person opinion)." Why would you "waste your beautiful Saturdays" > generating code for free then? I think the same sentiment applies to code. The idea is that there should not be an expectation from the community that all this hard work comes for free -- a sentiment that many seem to express. (In fact, this whole thread started off by someone volunteering me to write a book.) > Open Source is cool, Open Source is fun but > there has to be a reason for a person to make that effort to develop the > software. Most times that reason is the pride in a job well done and the > appreciation one feels when you see your efforts being used. And sometimes, it needs to be more than that. In other words, "If you really love the software, support it: financially, documentation wise, code wise, or whatever, rather than expecting things to magically happen from the people who have supported the project in the past." I can't speak for Tim directly here, but that is the impression I get. Regards, -- Christopher Schmidt MetaCarta From joao.c.duarte at co.sapo.pt Tue Jan 13 17:53:09 2009 From: joao.c.duarte at co.sapo.pt (=?iso-8859-1?Q?Jo=E3o_Duarte?=) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Drag feature control slow in IE In-Reply-To: <7a85053e0901131448n5f8dd975ifdd9021796aa9082@mail.gmail.com> References: <20090113160235.635d3d82@kirishima.wrk.lsn.camptocamp.com> <7a85053e0901131448n5f8dd975ifdd9021796aa9082@mail.gmail.com> Message-ID: <006401c975d1$b5802a60$20807f20$@c.duarte@co.sapo.pt> In versions 7 and 8 that happens to me (and Andr?). You don't see any difference in the example behavior (regarding to speed), while dragging a feature? Regards, Jo?o Duarte http://maps.sapo.pt -----Mensagem original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Em nome de Zac Spitzer Enviada: ter?a-feira, 13 de Janeiro de 2009 22:48 Para: Andre Pereira de Matos Cc: users@openlayers.org Assunto: Re: [OpenLayers-Users] Drag feature control slow in IE which version of IE, the example is fine for me in IE7 ? On Wed, Jan 14, 2009 at 4:56 AM, Andre Pereira de Matos wrote: > Yes, the same issue occurres when you used this example on IE. > > Is it a bug? Any plans/suggestions to fix it? > > Regards, > Andr? Matos > http://maps.sapo.pt > > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Fr?d?ric Junod > Sent: ter?a-feira, 13 de Janeiro de 2009 15:03 > To: users@openlayers.org > Subject: Re: [OpenLayers-Users] Drag feature control slow in IE > > Hi, > > Do you have the same issue with > http://openlayers.org/dev/examples/drag-feature.html ? > > Your code looks reasonable to me ... > > fredj > > Le Tue, 13 Jan 2009 14:43:46 +0000, > Andre Pereira de Matos a ?crit : > >> Hi list, >> >> I have done an example with a draggable feature (with DragFeatureControl). In >> Firefox, Google Chrome works fine... But when I drag it on IE it is very >> slow... >> >> The code used is: >> >> //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////// >> >> markersLayer = new OpenLayers.Layer.Vector("Markers", >> { >> projection: >> new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ >> externalGraphic: >> "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: >> "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, >> backgroundXOffset: >> 0, backgroundYOffset: -17, >> pointRadius: >> 10 }) >> } >> ); >> >> map.addLayer(markersLayer); >> feature1 = new OpenLayers.Feature.Vector(new >> OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); feature2 >> = new OpenLayers.Feature.Vector(new >> OpenLayers.Geometry.Point(-1504105.3415234375, 4392319.753066596)); >> markersLayer.addFeatures([feature1, feature2]); >> >> var ccontrol = new >> OpenLayers.Control.DragFeature(markersLayer); map.addControl(ccontrol); >> ccontrol.activate(); >> >> //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////// >> >> Any suggestions? Is it a bug? Will it be fixed? >> >> Regards, >> Andr? Matos >> http://maps.sapo.pt >> > > > -- > Fr?d?ric Junod > Camptocamp SA > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From brad at cubewerx.com.au Tue Jan 13 18:21:51 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <20090113224925.GL4568@metacarta.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b401c975ce$a5680420$f0380c60$@com> <20090113224925.GL4568@metacarta.com> Message-ID: <001001c975d5$b854aa50$28fdfef0$@com.au> I think this is a great initiative and thanks to all those involved! Whilst documentation is important to have, I agree that the authors should not go unrewarded. I would be happy to pay an amount of dollars that I would otherwise pay for a book which ends up collecting dust (well most of them). Say a $US 50 to get access to the website? If all OL applications developers did this we would be collectively giving back just a small piece of the huge benefits of using OL in the first place. I wonder how many others out there would be prepared to donate this amount? Cheers, Brad.... -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Christopher Schmidt Sent: Wednesday, January 14, 2009 9:49 AM To: Chip Taylor Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] OpenLayers Book On Tue, Jan 13, 2009 at 02:31:14PM -0800, Chip Taylor wrote: > Just curious about your statement "I don't think we should take it upon > ourselves to waste beautiful Saturdays generating documentation for free > (person opinion)." Why would you "waste your beautiful Saturdays" > generating code for free then? I think the same sentiment applies to code. The idea is that there should not be an expectation from the community that all this hard work comes for free -- a sentiment that many seem to express. (In fact, this whole thread started off by someone volunteering me to write a book.) > Open Source is cool, Open Source is fun but > there has to be a reason for a person to make that effort to develop the > software. Most times that reason is the pride in a job well done and the > appreciation one feels when you see your efforts being used. And sometimes, it needs to be more than that. In other words, "If you really love the software, support it: financially, documentation wise, code wise, or whatever, rather than expecting things to magically happen from the people who have supported the project in the past." I can't speak for Tim directly here, but that is the impression I get. Regards, -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From david.fawcett at gmail.com Tue Jan 13 22:50:20 2009 From: david.fawcett at gmail.com (David Fawcett) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <001001c975d5$b854aa50$28fdfef0$@com.au> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b401c975ce$a5680420$f0380c60$@com> <20090113224925.GL4568@metacarta.com> <001001c975d5$b854aa50$28fdfef0$@com.au> Message-ID: I would be happy to kick in $25 - $50 to support the production of documentation. Instead of making access to documentation subject to a donation, I would rather have any donation money leveraged by making more documentation available to as many people as possible. People who have never used OpenLayers, people looking for a new solution, etc. Evangelism vs subscription. I understand what Chris is saying. Some people get off on coding and are willing to spend their personal time writing code for a project that they think is worth while. These same people may not find the same pleasure in writing documentation. (not many people do...) I think that the key to grass roots documentation development is to encourage people who are OpenLayers users who are not core developers, who want to give something back to the project to write documentation. While it would be cool to have a paper book, it would start to become out of date as soon as it was published. The same amount of resources and time, contributed by a larger group of people, could create (and maintain) some really great web-based documentation. David. On Tue, Jan 13, 2009 at 5:21 PM, Brad Spencer wrote: > I think this is a great initiative and thanks to all those involved! > > Whilst documentation is important to have, I agree that the authors should > not go unrewarded. I would be happy to pay an amount of dollars that I would > otherwise pay for a book which ends up collecting dust (well most of them). > Say a $US 50 to get access to the website? If all OL applications developers > did this we would be collectively giving back just a small piece of the huge > benefits of using OL in the first place. I wonder how many others out there > would be prepared to donate this amount? > > Cheers, Brad.... > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On > Behalf Of Christopher Schmidt > Sent: Wednesday, January 14, 2009 9:49 AM > To: Chip Taylor > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] OpenLayers Book > > On Tue, Jan 13, 2009 at 02:31:14PM -0800, Chip Taylor wrote: >> Just curious about your statement "I don't think we should take it upon >> ourselves to waste beautiful Saturdays generating documentation for free >> (person opinion)." Why would you "waste your beautiful Saturdays" >> generating code for free then? > > I think the same sentiment applies to code. The idea is that there > should not be an expectation from the community that all this hard work > comes for free -- a sentiment that many seem to express. (In fact, this > whole thread started off by someone volunteering me to write a book.) > >> Open Source is cool, Open Source is fun but >> there has to be a reason for a person to make that effort to develop the >> software. Most times that reason is the pride in a job well done and the >> appreciation one feels when you see your efforts being used. > > And sometimes, it needs to be more than that. In other words, "If you > really love the software, support it: financially, documentation wise, > code wise, or whatever, rather than expecting things to magically happen > from the people who have supported the project in the past." > > I can't speak for Tim directly here, but that is the impression I get. > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > 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 mika at digikartta.net Wed Jan 14 02:03:35 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b401c975ce$a5680420$f0380c60$@com> <20090113224925.GL4568@metacarta.com> <001001c975d5$b854aa50$28fdfef0$@com.au> Message-ID: <496D8E47.8060007@digikartta.net> I agree on financing model, absolutely. Making the access subscription based, in my opinion, would break the open source principle. But who would write the documentation? I have been noticing that the deeper you get in any thing, less you know what's happening on the surface. Are all the user-list members competent on writing documents (or code)? No they're not, at least I'm not. On the other hand who knows the most of the code? I think it's he/she who wrote it. I am 38 and started learning programming as a hobby when I was 35. Now I am getting my bread and butter of it. It's not so easy to learn any more in this age + kids + wife + life. Still, I have thought this open source issue so, that one day I will start contributing to the community. Until that time, I will be a party that gets more than gives. So people who have got deep should understand that they can't assume that everyone in the users list are able to write documentation and code. Why would we ask simple questions, if we were competent on writing documentation on our own? I personally like PostGIS documentation [ http://postgis.refractions.net/documentation/ ]. Could OpenLayers documentation be like it? For those who prefer more printed documentation, could be published e.g. PDF-versions, right? And if the format and the layout is proper, it's not so expensive to make some printing office to print books even the number of them would be small. They have digital printing presses nowadays. - mika - David Fawcett kirjoitti: > I would be happy to kick in $25 - $50 to support the production of > documentation. Instead of making access to documentation subject to a > donation, I would rather have any donation money leveraged by making > more documentation available to as many people as possible. People > who have never used OpenLayers, people looking for a new solution, > etc. Evangelism vs subscription. > > I understand what Chris is saying. Some people get off on coding and > are willing to spend their personal time writing code for a project > that they think is worth while. These same people may not find the > same pleasure in writing documentation. (not many people do...) > > I think that the key to grass roots documentation development is to > encourage people who are OpenLayers users who are not core developers, > who want to give something back to the project to write documentation. > While it would be cool to have a paper book, it would start to become > out of date as soon as it was published. The same amount of resources > and time, contributed by a larger group of people, could create (and > maintain) some really great web-based documentation. > > David. > From stuart.jones at jacobs.com Wed Jan 14 05:36:53 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] When drawing a point, how to clear the previous point? Message-ID: <1231929413199-2156139.post@n2.nabble.com> Dear all I'm sure this is simple but I'm not getting anywhere. I have a custom toolbar containing buttons such as "draw point", "draw line", "draw poly", etc. If the user selects "draw point" and clicks on the map, a point appears. What I need is for the next click on the map to clear the previous point, and draw a new one at the new location. How do I clear the previous point? I have investigated destroyFeatures() and if I tie that to the activate/deactivate function that I've written which is called as the user chooses a different button, that works fine. But is it possible to call this prior to each draw action if the current tool isn't deactivated? Hope this makes sense and that someone can point me in the right direction. Many thanks Stuart -- View this message in context: http://n2.nabble.com/When-drawing-a-point%2C-how-to-clear-the-previous-point--tp2156139p2156139.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From lists at dipole-consulting.com Wed Jan 14 06:00:22 2009 From: lists at dipole-consulting.com (Didrik Pinte) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] panel does not appear Message-ID: <1231930822.5724.95.camel@localhost> Hi, I'm trying to add a panel to my map. I have followed the example given here : http://workshops.opengeo.org/openlayers/intro/doc/en/controls.html But nothing shows on the map. The code is the following : --------------------------------------------------------- map.addLayer(vector_layer); var mypanel = new OpenLayers.Control.Panel({ //div: document.getElementById("panel"), //displayClass: "mypanel" }); var drawctrl = new OpenLayers.Control.DrawFeature(vector_layer, OpenLayers.Handler.Polygon); var modctrl = new OpenLayers.Control.ModifyFeature(vector_layer); var hist = new OpenLayers.Control.NavigationHistory(); map.addControl(hist); map.addControl(drawctrl); map.addControl(modctrl); mypanel.addControls([drawctrl, modctrl, hist.next, hist.previous]); mypanel.activateControl(drawctrl); map.addControl(mypanel); map.zoomToMaxExtent(); --------------------------------------------------------- I have tried with a simple EditingToolbar and it appears fine in the left corner of the map. What could be wrong ? Firebug lists everything but there is nothing appearing anywhere. I am using OpenLayers 2.7. Thanks in advance for any help. Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090114/2360d4d9/attachment.bin From lists at dipole-consulting.com Wed Jan 14 06:43:31 2009 From: lists at dipole-consulting.com (Didrik Pinte) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] panel does not appear In-Reply-To: <1231930822.5724.95.camel@localhost> References: <1231930822.5724.95.camel@localhost> Message-ID: <1231933411.5724.102.camel@localhost> On Wed, 2009-01-14 at 12:00 +0100, Didrik Pinte wrote: > Hi, > > I'm trying to add a panel to my map. > I have followed the example given here : > http://workshops.opengeo.org/openlayers/intro/doc/en/controls.html > > But nothing shows on the map. I found a first thing. The OpenLayers lib is integrated into a php framework called Akelos. Thus, the stylesheets, images and javascript is organized as following : /public/javascripts/openlayers.js /public/images/openlayers/ /public/stylesheets/openlayers.css Loading the CSS runs fine but it seems lots of images are pointing to "img/xxx.png". By redeclaring the corresponding css class, I can have the images show correctly. For example : -------------------------------------------------------------------------- .olControlNavToolbar .olControlNavigationItemInactive { background-image: url("/public/images/openlayers/panning-hand-off.png"); } -------------------------------------------------------------------------- Now, the question is how can I define the images to use for my DrawFeature and ModifyFeature ? What are the correct css class name I have to use ? Thanks Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090114/d1a32152/attachment.bin From lists at dipole-consulting.com Wed Jan 14 07:16:27 2009 From: lists at dipole-consulting.com (Didrik Pinte) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] [SOLVED] Re: panel does not appear In-Reply-To: <1231933411.5724.102.camel@localhost> References: <1231930822.5724.95.camel@localhost> <1231933411.5724.102.camel@localhost> Message-ID: <1231935387.5724.105.camel@localhost> On Wed, 2009-01-14 at 12:43 +0100, Didrik Pinte wrote: > Now, the question is how can I define the images to use for my > DrawFeature and ModifyFeature ? What are the correct css class name I > have to use ? And here is the answer ;-) : ------------------------------------------------------------------------- .olControlDrawFeatureItemActive { background-image: url("/public/images/openlayers/draw_polygon_on.png"); background-repeat: no-repeat; height: 24px; width:24px; } .olControlDrawFeatureItemInactive { background-image: url("/public/images/openlayers/draw_polygon_off.png"); background-repeat: no-repeat; height: 24px; width:24px; } ------------------------------------------------------------------------- Each control item added to the panel needs the two class "...ItemActive" and "...ItemInActive" to be displayed correctly. Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090114/3f818093/attachment.bin From crschmidt at metacarta.com Wed Jan 14 07:24:35 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] When drawing a point, how to clear the previous point? In-Reply-To: <1231929413199-2156139.post@n2.nabble.com> References: <1231929413199-2156139.post@n2.nabble.com> Message-ID: <20090114122435.GO4568@metacarta.com> On Wed, Jan 14, 2009 at 02:36:53AM -0800, gingerbbm wrote: > > Dear all > > I'm sure this is simple but I'm not getting anywhere. > > I have a custom toolbar containing buttons such as "draw point", "draw > line", "draw poly", etc. > If the user selects "draw point" and clicks on the map, a point appears. > What I need is for the next click on the map to clear the previous point, > and draw a new one at the new location. > > How do I clear the previous point? > > I have investigated destroyFeatures() and if I tie that to the > activate/deactivate function that I've written which is called as the user > chooses a different button, that works fine. But is it possible to call this > prior to each draw action if the current tool isn't deactivated? > > Hope this makes sense and that someone can point me in the right direction. Check out the createFeature function defined on these controls: http://crschmidt.net/mapping/save-feature.html In this case, the features each have a seperate layer, so you can have one of each filter; changing this behavior should be simple and is left as an excercise to the reader. > Many thanks > Stuart > -- > View this message in context: http://n2.nabble.com/When-drawing-a-point%2C-how-to-clear-the-previous-point--tp2156139p2156139.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From bianchimro at gmail.com Wed Jan 14 08:38:24 2009 From: bianchimro at gmail.com (Mauro Bianchi) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Google and UK grid vector overlay In-Reply-To: References: Message-ID: Hi Arnd. thank you for your response. No, i didn't include proj4js in my page. Now I've tried to include it in my html page (and include all the definitions), but it still does not work. Any other ideas? Thank you! Mauro 2009/1/13 Arnd Wippermann : > The code is correct.Have you included proj4js in your page? > > Otherwise > Transform depends on the proj4js library. > If proj4js is not available, then this is just an empty stub. > > > Arnd Wippermannn > > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Mauro Bianchi > Gesendet: Dienstag, 13. Januar 2009 11:51 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Google and UK grid vector overlay > > Dear all, > I'm pretty new to OL and I want to do the following > > 1) have a google layer as a base layer > 2) overlay a vector layer and add points programmatically. Points > coordinates are given in the UK national grid system (OSGB , which should be > EPSG:27700) > > I could convert points coordinates externally, but I'd prefer to do it > directly into OpenLayers, if possibile. > I tried different methods but cannot get it working. > Any help would be really appreciated! > > Thank you > Mauro > > > My code is the following > > > var 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) > }; > > map = new OpenLayers.Map('map', options); > > //google maps layer, physical > var gphy = new OpenLayers.Layer.Google( > "Google Physical", > {type: G_PHYSICAL_MAP, numZoomLevels: 20, 'sphericalMercator':true} > ); > > map.addLayers([gphy]); > > > //a vector layer where i want to add points programmatically var vectorLayer > = new OpenLayers.Layer.Vector("My Geometry"); > > //this is a point that i want to add in UK grid coordinates var point = new > OpenLayers.Geometry.Point(519000, 165222).transform( new > OpenLayers.Projection("EPSG:27700"), map.projection); var pointFeature = new > OpenLayers.Feature.Vector(point); > > vectorLayer.addFeatures([pointFeature]); > > map.addLayer(vectorLayer); > > //controls and centering > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.setCenter(new > OpenLayers.LonLat(-0.126343,51.539502).transform(map.displayProjection, > map.projection), 10); > > > > > -- > Mauro Bianchi > bianchimro@gmail.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Mauro Bianchi bianchimro@gmail.com From stuart.jones at jacobs.com Wed Jan 14 08:45:28 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] When drawing a point, how to clear the previous point? In-Reply-To: <20090114122435.GO4568@metacarta.com> References: <1231929413199-2156139.post@n2.nabble.com> <20090114122435.GO4568@metacarta.com> Message-ID: <1231940728568-2156931.post@n2.nabble.com> Perfect. Thanks! -- View this message in context: http://n2.nabble.com/When-drawing-a-point%2C-how-to-clear-the-previous-point--tp2156139p2156931.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From robe.dnd at cityofboston.gov Wed Jan 14 08:48:49 2009 From: robe.dnd at cityofboston.gov (Obe, Regina) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <00b401c975ce$a5680420$f0380c60$@com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com><496CE971.6080004@digikartta.net><1231883417.6289.22.camel@dell-desktop.example.com> <00b401c975ce$a5680420$f0380c60$@com> Message-ID: <53F9CF533E1AA14EA1F8C5C08ABC08D20547088F@ZDND.DND.boston.cob> I think Chris's point is that he would prefer coding than documenting and I imagine that is a great drive to doing OpenLayers because in addition to some monetary there is some pleasure in it. I find nothing wrong with that. I think for example I like documenting more than most people because it provides me an opportunity to look thru the code and exercise what I see is possible. For any successful project it takes all kinds. The point is if people find documentation useful, they should stop yapping about how important it is and just start doing it/funding it. I also tend to disagree that code is useless without documentation. Much of the power of open source is you start creating something great and someone else who has the need/energy to study the code uses it too. It builds until then lesser skilled people start looking at what others have done and realize "Hey this is great stuff and easy to use" and then we get to where we are where people start demanding for better documentation to push to the next level. I much prefer documentation heavy in examples. I think what Chris has is a good start. Just my 2 cents. Thanks, Regina -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Chip Taylor Sent: Tuesday, January 13, 2009 5:31 PM Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] OpenLayers Book Just curious about your statement "I don't think we should take it upon ourselves to waste beautiful Saturdays generating documentation for free (person opinion)." Why would you "waste your beautiful Saturdays" generating code for free then? Code without good documentation is less than product and code without documentation at all is good only for the person who wrote it in the first place - and then only as long and that person can remember how they did things! Open Source is cool, Open Source is fun but there has to be a reason for a person to make that effort to develop the software. Most times that reason is the pride in a job well done and the appreciation one feels when you see your efforts being used. Without good documentation to accompany that immense effort of development, neither the pride nor satisfaction can be truly realized. My opinion only of course. (and I am grateful for what has been accomplished here!) Chip Taylor Lead Web Developer Prepared Response, Inc. 1142 Broadway Plaza, Suite 400 Tacoma, WA 98402 253-272-1483 office 253-948-2525 cell 253-272-1562 fax ctaylor@preparedresponse.com www.preparedresponse.com STATEMENT OF CONFIDENTIALITY The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify Prepared Response, Inc. immediately at (206) 223-5544 and destroy all copies of this message and any attachments _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ----------------------------------------- The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. From joao.c.duarte at co.sapo.pt Wed Jan 14 08:48:41 2009 From: joao.c.duarte at co.sapo.pt (Joao Duarte) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problem with multiple SelectFeature controls Message-ID: <014401c9764e$cf264c10$6d72e430$@c.duarte@co.sapo.pt> Hi, I?ve added several GML layers to the map. Each layer contains data from a KML file. The layers are all displayed well, the problem is when I add the SelectFeature control. I tried adding one control to each layer but this has the problem of only the last added layer gets its control working properly. The problem seems to be caused by the Feature handler. If you have many Feature handlers, only the one assigned to the top layer will work. Any suggestions on how I can have multiple SelectFeature controls, each one associated with a different layer, all working? Best regards, Jo?o Duarte http://maps.sapo.pt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090114/b19b7cdf/attachment.html From adube at mapgears.com Wed Jan 14 08:53:48 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Switching Layers Assigned to a SelectFeature Control In-Reply-To: <496D089D.2000509@gisnet.com> References: <496D089D.2000509@gisnet.com> Message-ID: <496DEE6C.1060903@mapgears.com> Hi Bill, Keep in mind that only your top layer is the only one you can interact with. Plus, I'm not sure if what you're trying to do is a good practice. I would recommend on control per layer, only one usable at a time on the top most layer. You could register some visibilitychanged events to determine which layer is on top and activate the related control on the same time. Best of luck, Alexandre Bill Thoen wrote: > I've got three vector feature layers and I'd like to use the same tool > to select any feature from any of these layers. But I understand that > you can only have one layer selectable at a time. So I'm thinking that > if I change the layer reference in the control as needed, that will do > it. But it doesn't seem to work. I've tried changing the layer reference > in both map.controls[n].layer and panel.controls[n].layer but the tool > continues to select from the original layer that was assigned when the > tool was created. What am I doing wrong? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From guanxiaoyu at gmail.com Wed Jan 14 09:39:17 2009 From: guanxiaoyu at gmail.com (Xiaoyu Guan) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] how to set up proxy host? Message-ID: <552b56070901140639o12707387ic8c4552d173c0452@mail.gmail.com> Dear all: I have two server, Apache, and Tomcat, they are running at same server. Geoserver is running on Tomcat, TileCache running on Apache. for example, apache using port 2008, Tomcat using port 2009 When I use getFeatureinfo, I have error :uri deny. I try to solve the problem by using proxy.cgi, but I have no idea about cgi configuration. First at all, is it possible for me to solve this question by using cgi? Another question is, shall I using mod_jk of apache, which means intergrate Tomcat and Apache together Thanks in advace All the best Xiaoyu -- Xiaoyu Guan (Sam) http://guanxiaoyu.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090114/e79d56bf/attachment.html From grand.edgemaster at gmail.com Wed Jan 14 09:58:24 2009 From: grand.edgemaster at gmail.com (Thomas Wood) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Google and UK grid vector overlay In-Reply-To: References: Message-ID: <1231945104498-2157235.post@n2.nabble.com> I have an Ordnance Survey transformation class, for those that do not wish to use proj4js. It is available for download at http://ge.pythonmoo.co.uk/maps/OpenLayers.Projection.OrdnanceSurvey.js Please _do not_ hotlink to it. goliah wrote: > > Hi Arnd. > thank you for your response. > > No, i didn't include proj4js in my page. > Now I've tried to include it in my html page (and include all the > definitions), but it still does not work. > > Any other ideas? > Thank you! > > Mauro > > > > > > 2009/1/13 Arnd Wippermann : >> The code is correct.Have you included proj4js in your page? >> >> Otherwise >> Transform depends on the proj4js library. >> If proj4js is not available, then this is just an empty stub. >> >> >> Arnd Wippermannn >> >> >> >> -----Urspr?ngliche Nachricht----- >> Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] >> Im >> Auftrag von Mauro Bianchi >> Gesendet: Dienstag, 13. Januar 2009 11:51 >> An: users@openlayers.org >> Betreff: [OpenLayers-Users] Google and UK grid vector overlay >> >> Dear all, >> I'm pretty new to OL and I want to do the following >> >> 1) have a google layer as a base layer >> 2) overlay a vector layer and add points programmatically. Points >> coordinates are given in the UK national grid system (OSGB , which should >> be >> EPSG:27700) >> >> I could convert points coordinates externally, but I'd prefer to do it >> directly into OpenLayers, if possibile. >> I tried different methods but cannot get it working. >> Any help would be really appreciated! >> >> Thank you >> Mauro >> >> >> My code is the following >> >> >> var 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) >> }; >> >> map = new OpenLayers.Map('map', options); >> >> //google maps layer, physical >> var gphy = new OpenLayers.Layer.Google( >> "Google Physical", >> {type: G_PHYSICAL_MAP, numZoomLevels: 20, >> 'sphericalMercator':true} >> ); >> >> map.addLayers([gphy]); >> >> >> //a vector layer where i want to add points programmatically var >> vectorLayer >> = new OpenLayers.Layer.Vector("My Geometry"); >> >> //this is a point that i want to add in UK grid coordinates var point = >> new >> OpenLayers.Geometry.Point(519000, 165222).transform( new >> OpenLayers.Projection("EPSG:27700"), map.projection); var pointFeature = >> new >> OpenLayers.Feature.Vector(point); >> >> vectorLayer.addFeatures([pointFeature]); >> >> map.addLayer(vectorLayer); >> >> //controls and centering >> map.addControl(new OpenLayers.Control.LayerSwitcher()); >> map.setCenter(new >> OpenLayers.LonLat(-0.126343,51.539502).transform(map.displayProjection, >> map.projection), 10); >> >> >> >> >> -- >> Mauro Bianchi >> bianchimro@gmail.com >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- > Mauro Bianchi > bianchimro@gmail.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Google-and-UK-grid-vector-overlay-tp2150605p2157235.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From david.fawcett at gmail.com Wed Jan 14 10:15:55 2009 From: david.fawcett at gmail.com (David Fawcett) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <496D8E47.8060007@digikartta.net> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b401c975ce$a5680420$f0380c60$@com> <20090113224925.GL4568@metacarta.com> <001001c975d5$b854aa50$28fdfef0$@com.au> <496D8E47.8060007@digikartta.net> Message-ID: Mika, I think that you have pointed out the significant challenge for grass roots generated documentation for a quickly changing project like OpenLayers. Most of us who post questions to the list do not have enough knowledge of OpenLayers to write large parts of the documentation. (Definitely don't mistake me for someone who knows a lot about OpenLayers...) It often feels like I am reverse compiling the code and examples. It sounds like we are also in similar situations with life, young kids, etc. I think that the key is that if one wants to contribute to the project, as you learn something new, or create an example, if the functionality isn't in the documentation yet, take a little bit of time to add/submit it. I have contributed a fair amount of documentation/examples for the MapServer project. Often times, when I figured out how to do something new, I would submit it so someone else didn't have to spend the time discovering the same thing. Hopefully I can start doing the same thing for OpenLayers as time allows and as I learn more about the library. To me, an area of documentation that would be very useful would be the higher level stuff. (e.g. What are the current best practices? [vector layer with markers vs. marker layer] , How do all of these contexts, strategies, etc. fit together and when would you use them?) I can often/sometimes hack something together that works, but is it really the best way to do it? David. On Wed, Jan 14, 2009 at 1:03 AM, Lehtonen, Mika wrote: > I agree on financing model, absolutely. Making the access subscription > based, in my opinion, would break the open source principle. But who would > write the documentation? I have been noticing that the deeper you get in any > thing, less you know what's happening on the surface. Are all the user-list > members competent on writing documents (or code)? No they're not, at least > I'm not. On the other hand who knows the most of the code? I think it's > he/she who wrote it. > > I am 38 and started learning programming as a hobby when I was 35. Now I am > getting my bread and butter of it. It's not so easy to learn any more in > this age + kids + wife + life. Still, I have thought this open source issue > so, that one day I will start contributing to the community. Until that > time, I will be a party that gets more than gives. So people who have got > deep should understand that they can't assume that everyone in the users > list are able to write documentation and code. Why would we ask simple > questions, if we were competent on writing documentation on our own? > > I personally like PostGIS documentation [ > http://postgis.refractions.net/documentation/ ]. Could OpenLayers > documentation be like it? For those who prefer more printed documentation, > could be published e.g. PDF-versions, right? And if the format and the > layout is proper, it's not so expensive to make some printing office to > print books even the number of them would be small. They have digital > printing presses nowadays. > > - mika - > > David Fawcett kirjoitti: >> >> I would be happy to kick in $25 - $50 to support the production of >> documentation. Instead of making access to documentation subject to a >> donation, I would rather have any donation money leveraged by making >> more documentation available to as many people as possible. People >> who have never used OpenLayers, people looking for a new solution, >> etc. Evangelism vs subscription. >> >> I understand what Chris is saying. Some people get off on coding and >> are willing to spend their personal time writing code for a project >> that they think is worth while. These same people may not find the >> same pleasure in writing documentation. (not many people do...) >> >> I think that the key to grass roots documentation development is to >> encourage people who are OpenLayers users who are not core developers, >> who want to give something back to the project to write documentation. >> While it would be cool to have a paper book, it would start to become >> out of date as soon as it was published. The same amount of resources >> and time, contributed by a larger group of people, could create (and >> maintain) some really great web-based documentation. >> >> David. >> > From M.E.Dodd at open.ac.uk Wed Jan 14 10:24:34 2009 From: M.E.Dodd at open.ac.uk (M.E.Dodd) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC><496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com><496CE971.6080004@digikartta.net><1231883417.6289.22.camel@dell-desktop.example.com><00b401c975ce$a5680420$f0380c60$@com><20090113224925.GL4568@metacarta.com><001001c975d5$b854aa50$28fdfef0$@com.au><496D8E47.8060007@digikartta.net> Message-ID: I started off all keen on openlayers tried to put some pages together which sort of worked but then have more or less given up due to the lack of documentation. If you want a load of people to use openlayers then there does definitely need to be decent documentation or people will get fed up and use something else. -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of David Fawcett Sent: 14 January 2009 15:16 To: Lehtonen, Mika Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] OpenLayers Book Mika, I think that you have pointed out the significant challenge for grass roots generated documentation for a quickly changing project like OpenLayers. Most of us who post questions to the list do not have enough knowledge of OpenLayers to write large parts of the documentation. (Definitely don't mistake me for someone who knows a lot about OpenLayers...) It often feels like I am reverse compiling the code and examples. It sounds like we are also in similar situations with life, young kids, etc. I think that the key is that if one wants to contribute to the project, as you learn something new, or create an example, if the functionality isn't in the documentation yet, take a little bit of time to add/submit it. I have contributed a fair amount of documentation/examples for the MapServer project. Often times, when I figured out how to do something new, I would submit it so someone else didn't have to spend the time discovering the same thing. Hopefully I can start doing the same thing for OpenLayers as time allows and as I learn more about the library. To me, an area of documentation that would be very useful would be the higher level stuff. (e.g. What are the current best practices? [vector layer with markers vs. marker layer] , How do all of these contexts, strategies, etc. fit together and when would you use them?) I can often/sometimes hack something together that works, but is it really the best way to do it? David. On Wed, Jan 14, 2009 at 1:03 AM, Lehtonen, Mika wrote: > I agree on financing model, absolutely. Making the access subscription > based, in my opinion, would break the open source principle. But who would > write the documentation? I have been noticing that the deeper you get in any > thing, less you know what's happening on the surface. Are all the user-list > members competent on writing documents (or code)? No they're not, at least > I'm not. On the other hand who knows the most of the code? I think it's > he/she who wrote it. > > I am 38 and started learning programming as a hobby when I was 35. Now I am > getting my bread and butter of it. It's not so easy to learn any more in > this age + kids + wife + life. Still, I have thought this open source issue > so, that one day I will start contributing to the community. Until that > time, I will be a party that gets more than gives. So people who have got > deep should understand that they can't assume that everyone in the users > list are able to write documentation and code. Why would we ask simple > questions, if we were competent on writing documentation on our own? > > I personally like PostGIS documentation [ > http://postgis.refractions.net/documentation/ ]. Could OpenLayers > documentation be like it? For those who prefer more printed documentation, > could be published e.g. PDF-versions, right? And if the format and the > layout is proper, it's not so expensive to make some printing office to > print books even the number of them would be small. They have digital > printing presses nowadays. > > - mika - > > David Fawcett kirjoitti: >> >> I would be happy to kick in $25 - $50 to support the production of >> documentation. Instead of making access to documentation subject to a >> donation, I would rather have any donation money leveraged by making >> more documentation available to as many people as possible. People >> who have never used OpenLayers, people looking for a new solution, >> etc. Evangelism vs subscription. >> >> I understand what Chris is saying. Some people get off on coding and >> are willing to spend their personal time writing code for a project >> that they think is worth while. These same people may not find the >> same pleasure in writing documentation. (not many people do...) >> >> I think that the key to grass roots documentation development is to >> encourage people who are OpenLayers users who are not core developers, >> who want to give something back to the project to write documentation. >> While it would be cool to have a paper book, it would start to become >> out of date as soon as it was published. The same amount of resources >> and time, contributed by a larger group of people, could create (and >> maintain) some really great web-based documentation. >> >> David. >> > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users --------------------------------- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). From crschmidt at metacarta.com Wed Jan 14 11:13:15 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: References: <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b401c975ce$a5680420$f0380c60$@com> <20090113224925.GL4568@metacarta.com> <001001c975d5$b854aa50$28fdfef0$@com.au> <496D8E47.8060007@digikartta.net> Message-ID: <20090114161315.GR4568@metacarta.com> On Wed, Jan 14, 2009 at 09:15:55AM -0600, David Fawcett wrote: > To me, an area of documentation that would be very useful would be the > higher level stuff. (e.g. What are the current best practices? > [vector layer with markers vs. marker layer] , How do all of these > contexts, strategies, etc. fit together and when would you use them?) > I can often/sometimes hack something together that works, but is it > really the best way to do it? Part of the reason for this type of documentation not existing yet is because there is n best practice here. At the moment, strategies, protocols, etc. are not a strongly represented part of our API, but we have a dichotomy: People who are looking forward know that strategies and protocols will be the way to go, but people who want to write code right now have the possibility to get screwed by changes we make in the formats/protcols. (I dno't think it's likely, but it is possible.) I started work on a comparison of when/why you would use vectors vs. markers: http://docs.openlayers.org/library/overlays A month ago or so. The cnofusion between markers and vectors is probably one of our bigger stumbling blocks for users getting slightly beyond the 'newbie' level. A short paragraph from that doc that is relevant, for example: "In general, the Vector layer provides more capabilities, with the ability to draw lines, polygons, and more. The Vector-based Layers are better maintained, and are the place where most new OpenLayers development is taking place. There is more support for various styling options, and more configurability over layer behavior and interactions with remote servers. However, the Markers layer is maintained for backwards compatibility, because there are some things you can not do with vectors as they are currently implemented, and they provide a different type of interface for event registration." That type of text doesn't exist outside that document, I dn't think, and (I think) it may be valuable in answering questions like this. I'm assuming this is the kind of prose documentation you feel the OpenLayers project is currently lacking in some cases. I think one way to have a developer tell you "Is this the right way to do it" is to write up prose description of what you did, probably in a wikipage, and ask for feedback. I'm much more likely to look at something like that -- because it can feed directly into docs -- than I am to look at your applicatino code and offer a code review. Best Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Jan 14 11:25:12 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: References: Message-ID: <20090114162512.GS4568@metacarta.com> On Wed, Jan 14, 2009 at 03:24:34PM -0000, M.E.Dodd wrote: > I started off all keen on openlayers tried to put some pages together > which sort of worked but then have more or less given up due to the lack > of documentation. If you want a load of people to use openlayers then > there does definitely need to be decent documentation or people will get > fed up and use something else. I don't think there is a need from the developers for a 'load' of people to use OpenLayers. If OpenLayers does not meet your needs, then you should use something else. I would also say that the mailing list tends to be invaluable for answering questions that are asked; sometimes, you need to man-up and ask in front of an audience to get an answe. A quick search on your name shows me that you asked one question: http://openlayers.org/pipermail/users/2008-December/009134.html Which I responded with a followup, and never heard anything more. If this is the type of interaction that users attempt, then I'm not surprised to find out they find getting answers hard. There are three major types/sources of information about OpenLayers. In the order that I expect people will have to go through them in order to find answers: * Documentation API Docs, Prose documentation, wikipages * Code "Sometimes open source means you need to open the source." * Mailing List Archives first, then sending an email. These are identified relatively clearly on the http://trac.openlayers.org/wiki/GettingHelp page, and if you're unable to follow those steps, then it is unlikely that you will be able to use OpenLayers effectively. Very few people here are participating in OpenLayers for a sense of glory: we have jobs which require it, applications which need it, or projects which use it. Open Source is about scratching *developer* -- not 'user' -- itches, and the notion that "OpenLayers should try to take over all map usage everywhere" is impractical and not a realistic view of the desires of the developers, so far as I am aware. For the most part, we just write software; if people are interested in using it, more power to them. Regards, -- Christopher Schmidt MetaCarta From yves.moisan at boreal-is.com Wed Jan 14 11:28:11 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] [Fwd: RE: OpenLayers Book] Message-ID: <1231950491.6219.25.camel@dell-desktop.example.com> Since that was alson posted on the list ... -------------- next part -------------- An embedded message was scrubbed... From: Yves Moisan Subject: RE: [OpenLayers-Users] OpenLayers Book Date: Wed, 14 Jan 2009 11:27:27 -0500 Size: 2543 Url: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090114/af29a308/attachment.mht From bthoen at gisnet.com Wed Jan 14 11:42:38 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problem with multiple SelectFeature controls In-Reply-To: <014401c9764e$cf264c10$6d72e430$@c.duarte@co.sapo.pt> References: <014401c9764e$cf264c10$6d72e430$@c.duarte@co.sapo.pt> Message-ID: <496E15FE.9080700@gisnet.com> From the responses I'm getting in the "[OpenLayers-Users] Switching Layers Assigned to a SelectFeature Control" thread and some Googling it appears that handling multiple vector layers simultaneously in OpenLayers is not well supported. In fact, it basically won't work. Only one layer of features can be selectable at a time. What I'm trying is to create only one SelectFeature control, but then allow the user to pick which layer they want to be "active". After they choose, I destroy the current SelectFeature control and replace it with a new SelectFeature control that uses the new layer. It's not elegant, but it seems to work. Joao Duarte wrote: > > Hi, > > I?ve added several GML layers to the map. Each layer contains data > from a KML file. The layers are all displayed well, the problem is > when I add the SelectFeature control. I tried adding one control to > each layer but this has the problem of only the last added layer gets > its control working properly. > > The problem seems to be caused by the Feature handler. If you have > many Feature handlers, only the one assigned to the top layer will work. > > Any suggestions on how I can have multiple SelectFeature controls, > each one associated with a different layer, all working? > > Best regards, > > Jo?o Duarte > > http://maps.sapo.pt > From ctaylor at preparedresponse.com Wed Jan 14 11:46:07 2009 From: ctaylor at preparedresponse.com (Chip Taylor) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <1231950444.6219.23.camel@dell-desktop.example.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b301c975ce$3556e610$a004b230$@com> <1231950444.6219.23.camel@dell-desktop.example.com> Message-ID: <015601c97667$9986ff00$cc94fd00$@com> I agree with what most people here have to say about contributions and, if I were more than a developer at a company that uses OL, I'd be extremely happy to contribute financially. Unfortunately reality is that Open Source is not supported adequately by people and the very nature of Open Source is that it is there for the taking. That said, to consider otherwise is wishful thinking that, unless the OS model changes (and I don't see it doing that). I still stick by the statement that good code without good documentation is less than the product it should be. I also realize that given the model and the reluctance of programmers to document code I doubt the situation will change much. Hey, I totally understand that. Without the incentive of remaining employed I doubt I would do as much documentation in my job as I do. If indeed a book could be published I know I could convince my management to buy copies. But to ask them to spend money to have it created from scratch, well, it just ain't gonna happen. (especially in the present economic climate).. Chip Taylor Lead Web Developer Prepared Response, Inc. 1142 Broadway Plaza, Suite 400 Tacoma, WA 98402 253-272-1483 office 253-948-2525 cell 253-272-1562 fax ctaylor@preparedresponse.com www.preparedresponse.com STATEMENT OF CONFIDENTIALITY The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify Prepared Response, Inc. immediately at (206) 223-5544 and destroy all copies of this message and any attachments -----Original Message----- From: Yves Moisan [mailto:yves.moisan@boreal-is.com] Sent: January 14, 2009 08:27 To: Chip Taylor Subject: RE: [OpenLayers-Users] OpenLayers Book Hi Chip, Le mardi 13 janvier 2009 ? 14:28 -0800, Chip Taylor a ?crit : > Just curious about your statement "I don't think we should take it upon > ourselves to waste > beautiful Saturdays generating documentation for free (person opinion)." Well that statement isn't mine : it's Tim's (who has an email in the thread). > Why would you "waste your beautiful Saturdays" generating code for free > then? I'll give you the same answer : that's not sustainable development IMHO. I understand there are a lot of people with free time on their hands (or willing to nudge on their free time) to program, but I find it particularly sarcastic to consider that many of the main beneficiaries of FOSS projects do not engage in its development. I see countless universities using this and that and not developing anything in return, let alone put some dough into the project. I find it unfortunate that FOSS projects need to rely on people's spare time to evolve, be it for the paramount task of writing code and most paramount task of writing docs ;-). > Code without good documentation is less than product and code without > documentation at all is good only for the person who wrote it in the first > place - and then only as long and that person can remember how they did > things! Open Source is cool, Open Source is fun but there has to be a > reason for a person to make that effort to develop the software. Most times > that reason is the pride in a job well done and the appreciation one feels > when you see your efforts being used. Without good documentation to > accompany that immense effort of development, neither the pride nor > satisfaction can be truly realized. My opinion only of course. (and I am > grateful for what has been accomplished here!) + 100 ! Cheers, Yves No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.6/1891 - Release Date: 1/13/2009 8:04 PM From crschmidt at metacarta.com Wed Jan 14 11:54:43 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <015601c97667$9986ff00$cc94fd00$@com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b301c975ce$3556e610$a004b230$@com> <1231950444.6219.23.camel@dell-desktop.example.com> <015601c97667$9986ff00$cc94fd00$@com> Message-ID: <20090114165443.GU4568@metacarta.com> On Wed, Jan 14, 2009 at 08:46:07AM -0800, Chip Taylor wrote: > I still stick by the statement that good code without good > documentation is less than the product it should be. I also realize > that given the model and the reluctance of programmers to document > code I doubt the situation will change much. The OpenLayers project has a very strict requirement that the API level of the code *is* documented. Additionally, we maintain a library of more than 100 examples of code usage, demonstrating many major features of OpenLayers in ways that are relatively easy to copy and paste for any JavaScript programmer. You can criticize the documentation effort of the OpenLayers project, but we make a very strong effort to establish documentation of the *code itself* -- much more so than many other projects I've worked with. Documenting the code -- what it does, and how it does it -- is nt sufficient to answer all the questions of users, but it is a significant task, and one that we have put many many resources into, and is a requirement for any new code in the OpenLayers library. Clearly, is is not the only aspect of a product, but the project is not in the habit of creating unmaintainable code, something I'm very proud of, and want to ensure that we all are clear on. Regards, -- Christopher Schmidt MetaCarta From andre.matos at co.sapo.pt Wed Jan 14 13:13:48 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problem with multiple SelectFeature controls In-Reply-To: <496E15FE.9080700@gisnet.com> References: <014401c9764e$cf264c10$6d72e430$@c.duarte@co.sapo.pt> <496E15FE.9080700@gisnet.com> Message-ID: We have implemented another solution for this problem... We made a control that throws events (click, mouseover, mouseout) for a specific group of features, and we don't mind if the features are in different layers or not. It just works... If anyone want the code I can share it... I sent a mail to openlayers dev to contribut with it, and I am still waiting for any replay. Regards, Andr? Matos http://maps.sapo.pt -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Bill Thoen Sent: quarta-feira, 14 de Janeiro de 2009 16:43 To: Joao Campos Duarte (PRIMEIT) Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Problem with multiple SelectFeature controls From the responses I'm getting in the "[OpenLayers-Users] Switching Layers Assigned to a SelectFeature Control" thread and some Googling it appears that handling multiple vector layers simultaneously in OpenLayers is not well supported. In fact, it basically won't work. Only one layer of features can be selectable at a time. What I'm trying is to create only one SelectFeature control, but then allow the user to pick which layer they want to be "active". After they choose, I destroy the current SelectFeature control and replace it with a new SelectFeature control that uses the new layer. It's not elegant, but it seems to work. Joao Duarte wrote: > > Hi, > > I've added several GML layers to the map. Each layer contains data > from a KML file. The layers are all displayed well, the problem is > when I add the SelectFeature control. I tried adding one control to > each layer but this has the problem of only the last added layer gets > its control working properly. > > The problem seems to be caused by the Feature handler. If you have > many Feature handlers, only the one assigned to the top layer will work. > > Any suggestions on how I can have multiple SelectFeature controls, > each one associated with a different layer, all working? > > Best regards, > > Jo?o Duarte > > http://maps.sapo.pt > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From bianchimro at gmail.com Wed Jan 14 13:58:02 2009 From: bianchimro at gmail.com (Mauro Bianchi) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Google and UK grid vector overlay In-Reply-To: <1231945104498-2157235.post@n2.nabble.com> References: <1231945104498-2157235.post@n2.nabble.com> Message-ID: Hi Thomas, with your transformation class everything works perfect! So I think I stay this implementation, but I still can't understand why my proj4s version is not working. Thanks a lot Mauro 2009/1/14 Thomas Wood : > > I have an Ordnance Survey transformation class, for those that do not wish to > use proj4js. > > It is available for download at > http://ge.pythonmoo.co.uk/maps/OpenLayers.Projection.OrdnanceSurvey.js > Please _do not_ hotlink to it. > > > goliah wrote: >> >> Hi Arnd. >> thank you for your response. >> >> No, i didn't include proj4js in my page. >> Now I've tried to include it in my html page (and include all the >> definitions), but it still does not work. >> >> Any other ideas? >> Thank you! >> >> Mauro >> >> >> >> >> >> 2009/1/13 Arnd Wippermann : >>> The code is correct.Have you included proj4js in your page? >>> >>> Otherwise >>> Transform depends on the proj4js library. >>> If proj4js is not available, then this is just an empty stub. >>> >>> >>> Arnd Wippermannn >>> >>> >>> >>> -----Urspr?ngliche Nachricht----- >>> Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] >>> Im >>> Auftrag von Mauro Bianchi >>> Gesendet: Dienstag, 13. Januar 2009 11:51 >>> An: users@openlayers.org >>> Betreff: [OpenLayers-Users] Google and UK grid vector overlay >>> >>> Dear all, >>> I'm pretty new to OL and I want to do the following >>> >>> 1) have a google layer as a base layer >>> 2) overlay a vector layer and add points programmatically. Points >>> coordinates are given in the UK national grid system (OSGB , which should >>> be >>> EPSG:27700) >>> >>> I could convert points coordinates externally, but I'd prefer to do it >>> directly into OpenLayers, if possibile. >>> I tried different methods but cannot get it working. >>> Any help would be really appreciated! >>> >>> Thank you >>> Mauro >>> >>> >>> My code is the following >>> >>> >>> var 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) >>> }; >>> >>> map = new OpenLayers.Map('map', options); >>> >>> //google maps layer, physical >>> var gphy = new OpenLayers.Layer.Google( >>> "Google Physical", >>> {type: G_PHYSICAL_MAP, numZoomLevels: 20, >>> 'sphericalMercator':true} >>> ); >>> >>> map.addLayers([gphy]); >>> >>> >>> //a vector layer where i want to add points programmatically var >>> vectorLayer >>> = new OpenLayers.Layer.Vector("My Geometry"); >>> >>> //this is a point that i want to add in UK grid coordinates var point = >>> new >>> OpenLayers.Geometry.Point(519000, 165222).transform( new >>> OpenLayers.Projection("EPSG:27700"), map.projection); var pointFeature = >>> new >>> OpenLayers.Feature.Vector(point); >>> >>> vectorLayer.addFeatures([pointFeature]); >>> >>> map.addLayer(vectorLayer); >>> >>> //controls and centering >>> map.addControl(new OpenLayers.Control.LayerSwitcher()); >>> map.setCenter(new >>> OpenLayers.LonLat(-0.126343,51.539502).transform(map.displayProjection, >>> map.projection), 10); >>> >>> >>> >>> >>> -- >>> Mauro Bianchi >>> bianchimro@gmail.com >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> >> -- >> Mauro Bianchi >> bianchimro@gmail.com >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > View this message in context: http://n2.nabble.com/Google-and-UK-grid-vector-overlay-tp2150605p2157235.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Mauro Bianchi bianchimro@gmail.com From peteralen at earthlink.net Wed Jan 14 14:24:00 2009 From: peteralen at earthlink.net (plen) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers.Control.ScaleLine accuracy issue In-Reply-To: <1053B20F24D85F41B57F168351684E2202D16FE7@0015-its-exmb04.us.saic.com> References: <1231255820712-2117980.post@n2.nabble.com> <20090106154243.GJ10452@metacarta.com> <1231295832836-2120559.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2202D16FE7@0015-its-exmb04.us.saic.com> Message-ID: <1231961040459-2158692.post@n2.nabble.com> Christopher, Yes, currently I get the viewport bounds via: var coordArray = map.getBounds().toArray(); >From that I can get the SW and NE viewport coordinates. This is where the problem starts. The first issue was getting the proper distance between the SW point and the NE point. This is where I started to see a difference in the OL distanceTo function (flat map) and another algorithm that determines distances on a sphere. I needed to determine the distance in order to calculate another zoom level's SW & NE coordinates. This was done by determining the distance to the next level up (based on the current SW to NE distance) and determining the bearing. The second problem was that when the new SW & NE coordinates were determined, it only worked if the original distance between the current viewport's SW & NE points was derived using the algorithm that calculates distance on a sphere. - Peter -- View this message in context: http://n2.nabble.com/OpenLayers.Control.ScaleLine-accuracy-issue-tp2117980p2158692.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tschaub at opengeo.org Wed Jan 14 14:52:10 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <20090113224925.GL4568@metacarta.com> References: <5F438FAC8C1D46E69F7E08086F45997A@KennyPC> <1231837225834-2150280.post@n2.nabble.com> <496CDAE9.3000706@gisnet.com> <20090113185900.GH4568@metacarta.com> <496CE971.6080004@digikartta.net> <1231883417.6289.22.camel@dell-desktop.example.com> <00b401c975ce$a5680420$f0380c60$@com> <20090113224925.GL4568@metacarta.com> Message-ID: <496E426A.2000909@opengeo.org> Hey- Christopher Schmidt wrote: > On Tue, Jan 13, 2009 at 02:31:14PM -0800, Chip Taylor wrote: >> Just curious about your statement "I don't think we should take it upon >> ourselves to waste beautiful Saturdays generating documentation for free >> (person opinion)." Why would you "waste your beautiful Saturdays" >> generating code for free then? > > I think the same sentiment applies to code. The idea is that there > should not be an expectation from the community that all this hard work > comes for free -- a sentiment that many seem to express. (In fact, this > whole thread started off by someone volunteering me to write a book.) > >> Open Source is cool, Open Source is fun but >> there has to be a reason for a person to make that effort to develop the >> software. Most times that reason is the pride in a job well done and the >> appreciation one feels when you see your efforts being used. > > And sometimes, it needs to be more than that. In other words, "If you > really love the software, support it: financially, documentation wise, > code wise, or whatever, rather than expecting things to magically happen > from the people who have supported the project in the past." > > I can't speak for Tim directly here, but that is the impression I get. > Exactly. And we're largely responsible for propagating this expectation ourselves. Whether it is based on a desire for recognition, "love" of the software, or an impression that we are taking part in a grand philanthropic mission, our dedication to this project has resulted in an expectation that it moves without effort. I've seen this result in a couple things: 1) exhaustion, and 2) strained relations (based on the feeling that others aren't doing their part). Basically, I think this is BS. This is software worth paying for. The people making significant contributions (code or docs) should be compensated for their efforts. Obviously, nobody should be discouraged from volunteering. But the expectation should not be that the project runs on volunteer effort. Tim > Regards, -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From tschaub at opengeo.org Wed Jan 14 15:05:54 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] how to set up proxy host? In-Reply-To: <552b56070901140639o12707387ic8c4552d173c0452@mail.gmail.com> References: <552b56070901140639o12707387ic8c4552d173c0452@mail.gmail.com> Message-ID: <496E45A2.60504@opengeo.org> Hey- Xiaoyu Guan wrote: > Dear all: > I have two server, Apache, and Tomcat, they are running at same server. > Geoserver is running on Tomcat, TileCache running on Apache. for > example, apache using port 2008, Tomcat using port 2009 > When I use getFeatureinfo, I have error :uri deny. I try to solve the > problem by using proxy.cgi, but I have no idea about cgi configuration. > First at all, is it possible for me to solve this question by using cgi? > Another question is, shall I using mod_jk of apache, which means > intergrate Tomcat and Apache together One option is to proxy GeoServer with Apache. http://geoserver.org/display/GEOSDOC/How+to+proxy+Jetty+through+Apache+on+port+80 Though the title references Jetty, it is relevant to setting up a proxy to any domain:port. Basically, you want /geoserver (or other path) on the same origin as your application (or page.html). Same origin means same protocol (e.g. http), same domain (e.g. example.com), and same port (e.g. 80). Tim > Thanks in advace > > All the best > > Xiaoyu > > -- > Xiaoyu Guan (Sam) > http://guanxiaoyu.net > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From gsally at touchtown.us Wed Jan 14 15:46:27 2009 From: gsally at touchtown.us (Gene Sally) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Rookie problem with getting a map to draw with Drupal Message-ID: Hi, I'm trying to use openlayers in conjunction with Drupal and I'm having problems with the map rendering. The javascript code runs without error, but I don't see the map on the page. I've been fiddling with this to the point where I'm out of things to try. I used a debugger (along with trusty alert() :) to make sure that the code was running. All of the objects are instantiated and there aren't any run-time errors. All of the code appears to run without error. I experimented and called the OpenLayers.Map() constructor with an id that I knew wasn't on the page and it failed as expected, so I'm reasonably sure that OpenLayers can find the div with the ID of "map". The image in question for the image layer exists and I can put the URL in my browser and see the file, so I think that's not at issue. This appears to be some sort of drupal related problem as when I strip out all of the drupal code, things work... But, after struggling I can't seem to pinpoint the nature of the problem. Here's what I have (my apologies for the code dump, I tried to make it as minimal as possible) This code appears in a node that allows PHP code. If anyone can point me in the right direction, I'd really appreciate the help. Thanks much, gene
From jay.douillard at ubc.ca Wed Jan 14 16:36:54 2009 From: jay.douillard at ubc.ca (Jay Douillard) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OpenLayers Book In-Reply-To: <496E426A.2000909@opengeo.org> Message-ID: <15247845.235821231969014137.JavaMail.root@verrazzano> I think perhaps a way to approach this issue is through this list. My logic is as follows Search documentation ---> No answer ---> Ask List ---> Summarize and generalize responses and add to documentation. I know not everyone can even do that--as they might not be at the level to understand and synthesize all of the responses. But most of us should. I've be trying to follow this process on the mapnik project, applying the knowledge the list is kind enough to bestow upon me back into the wiki. ---- Jay ----- Original Message ----- From: "Tim Schaub" Cc: users@openlayers.org Sent: Wednesday, January 14, 2009 11:52:10 AM GMT -08:00 US/Canada Pacific Subject: Re: [OpenLayers-Users] OpenLayers Book Hey- Christopher Schmidt wrote: > On Tue, Jan 13, 2009 at 02:31:14PM -0800, Chip Taylor wrote: >> Just curious about your statement "I don't think we should take it upon >> ourselves to waste beautiful Saturdays generating documentation for free >> (person opinion)." Why would you "waste your beautiful Saturdays" >> generating code for free then? > > I think the same sentiment applies to code. The idea is that there > should not be an expectation from the community that all this hard work > comes for free -- a sentiment that many seem to express. (In fact, this > whole thread started off by someone volunteering me to write a book.) > >> Open Source is cool, Open Source is fun but >> there has to be a reason for a person to make that effort to develop the >> software. Most times that reason is the pride in a job well done and the >> appreciation one feels when you see your efforts being used. > > And sometimes, it needs to be more than that. In other words, "If you > really love the software, support it: financially, documentation wise, > code wise, or whatever, rather than expecting things to magically happen > from the people who have supported the project in the past." > > I can't speak for Tim directly here, but that is the impression I get. > Exactly. And we're largely responsible for propagating this expectation ourselves. Whether it is based on a desire for recognition, "love" of the software, or an impression that we are taking part in a grand philanthropic mission, our dedication to this project has resulted in an expectation that it moves without effort. I've seen this result in a couple things: 1) exhaustion, and 2) strained relations (based on the feeling that others aren't doing their part). Basically, I think this is BS. This is software worth paying for. The people making significant contributions (code or docs) should be compensated for their efforts. Obviously, nobody should be discouraged from volunteering. But the expectation should not be that the project runs on volunteer effort. Tim > Regards, -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From zer_matt at hotmail.com Wed Jan 14 17:24:59 2009 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OL 2.7 measure control questions Message-ID: <1231971899248-2159474.post@n2.nabble.com> Dear list, Is there a way to change to mouse pointer to a hair cross when using then measure control? Is there a way to always present the measured distance in meters? The distance shows in km as soon as a distance longer than 1000m is measured. Thanks, Z -- View this message in context: http://n2.nabble.com/OL-2.7-measure-control-questions-tp2159474p2159474.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bthoen at gisnet.com Wed Jan 14 17:56:56 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] WFS Layer Behavior Message-ID: <496E6DB8.6080902@gisnet.com> When you open a WFS layer does OL load the entire data file, or just the features that are visible in the map window? I tried feeding it a large table and it took quite a while to display, so I was wondering if that was because it had to dig into the table to find the features in the map window or if it just loaded everything. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090114/555e1a30/attachment.html From tschaub at opengeo.org Wed Jan 14 18:57:51 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] WFS Layer Behavior In-Reply-To: <496E6DB8.6080902@gisnet.com> References: <496E6DB8.6080902@gisnet.com> Message-ID: <496E7BFF.1040400@opengeo.org> Hey- Bill Thoen wrote: > When you open a WFS layer does OL load the entire data file, or just the > features that are visible in the map window? I tried feeding it a large > table and it took quite a while to display, so I was wondering if that > was because it had to dig into the table to find the features in the map > window or if it just loaded everything. > Use Firebug to monitor XMLHttpRequest traffic. You should see a GetFeature request with a bbox parameter in the query string. Your response should contain just those features that intersect the bbox (assuming the server works as a WFS). Tim > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From tschaub at opengeo.org Wed Jan 14 19:12:00 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OL 2.7 measure control questions In-Reply-To: <1231971899248-2159474.post@n2.nabble.com> References: <1231971899248-2159474.post@n2.nabble.com> Message-ID: <496E7F50.4020903@opengeo.org> Zer wrote: > Dear list, > > Is there a way to change to mouse pointer to a hair cross when using then > measure control? > control.events.on({ activate: function() { map.div.style.cursor = "crosshair"; }, deactivate: function() { map.div.style.cursor = "default"; } }); Of course you'll be better off if you use methods like: OpenLayers.Element.addClass(map.div, "cursor_cross"); and OpenLayers.Element.removeClass(map.div, "cursor_cross"); And then load up a stylesheet that has something like .cursor_cross { cursor: crosshair; } > Is there a way to always present the measured distance in meters? The > distance shows in km as soon as a distance longer than 1000m is measured. > var control = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, { displaySystemUnits: {metric: ["m"]} }); This property (displaySystemUnits) is not marked as part of the API - so you may have to change your app if it changes (don't imagine it will in 2.x). Tim > Thanks, > > Z -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From eric.c2c at gmail.com Thu Jan 15 02:10:57 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Switching Layers Assigned to a SelectFeature Control In-Reply-To: <496D089D.2000509@gisnet.com> References: <496D089D.2000509@gisnet.com> Message-ID: <5ec103de0901142310l2d73de52h86d5fa71df99985f@mail.gmail.com> Hi. Have you tried: deactivate control, change its layer, activate control. I'm not sure it'll work but it's worth trying. Eric 2009/1/13, Bill Thoen : > I've got three vector feature layers and I'd like to use the same tool > to select any feature from any of these layers. But I understand that > you can only have one layer selectable at a time. So I'm thinking that > if I change the layer reference in the control as needed, that will do > it. But it doesn't seem to work. I've tried changing the layer reference > in both map.controls[n].layer and panel.controls[n].layer but the tool > continues to select from the original layer that was assigned when the > tool was created. What am I doing wrong? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From andre.matos at co.sapo.pt Thu Jan 15 05:31:56 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Capture feature events on different layers: Solution and Code (Controls and Handlers) Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: Controls.rar Type: application/octet-stream Size: 7461 bytes Desc: Controls.rar Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090115/19a850ab/Controls.obj From wvick at europa-tech.com Thu Jan 15 07:46:02 2009 From: wvick at europa-tech.com (Warren Vick) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problem with overlays on VE In-Reply-To: <776B93361B7BEE4FAD9E720FFBC746B604EB6D9D@34093-EVS4C2.exchange.rackspace.com> References: <776B93361B7BEE4FAD9E720FFBC746B604EB6D9D@34093-EVS4C2.exchange.rackspace.com> Message-ID: <776B93361B7BEE4FAD9E720FFBC746B605026612@34093-EVS4C2.exchange.rackspace.com> Sadly no feedback on this. However, I've made available a demo illustrating the problem: http://europa.uk.com/demo/ve_tms_overlay_problem.html The purple roads overlay is a TMS layer. It sits perfectly over Google, Yahoo and OSM, but disappears when VE is selected as the base. You can see image placeholders appear for tiles that don't exist. Is this a bug in OL or have I done something stupid?! Regards, Warren Vick -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Warren Vick Sent: 06 January 2009 10:43 To: users@openlayers.org Subject: [OpenLayers-Users] Problem with overlays on VE I'm having problem with an overlay on a Virtual Earth base. The TMS overlay has been created with Mapnik/generate_tiles.py in ESPG:900913 and looks fine when placed as a base layer. However, when placed on a VE base, the overlay disappears. Just to check I wasn't going mad, I used SphericalMercator.html and found my overlay works fine over Google and Yahoo maps. It's just the VE base which shows the problem. Any thoughts on what's different with a VE base? Regards, Warren Vick _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From ahocevar at opengeo.org Thu Jan 15 10:10:37 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] New DragFeature Control and SelectFeatureControl cross layers. Want to share In-Reply-To: References: Message-ID: <5b021dd0901150710u37dd69a9p6e6631d3c3016ad3@mail.gmail.com> Hi Andre, 2009/1/13 Andre Pereira de Matos : > I have made a Project with openlayers, and at some point I had to make a new > handler and a new control to provide draggable feature and handle events > like, click, mouseover, mouseout in features that was in different layers. > > The Openlayers control (DragFeature, SelectFeature) and handlers (Drag, > Feature) only works if the features are all in the same layer and the layer > is on the top. I have no experience with the DragFeature control, but I have created a solution for feature selection that works with multiple layers recently [1]. An example is also avaialable [2]. You may want to check this out, and I'd be interested to see your approach. Also, it would be cool to see if my approach also works with the DragFeature control. Regards, Andreas. [1] http://trac.openlayers.org/ticket/1666 [2] http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Thu Jan 15 10:21:55 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problem with multiple SelectFeature controls In-Reply-To: <-2692040325117123101@unknownmsgid> References: <-2692040325117123101@unknownmsgid> Message-ID: <5b021dd0901150721k179d2b12pcb488eafe7c580cc@mail.gmail.com> Hi, On Wed, Jan 14, 2009 at 2:48 PM, Joao Duarte wrote: > I've added several GML layers to the map. Each layer contains data from a > KML file. The layers are all displayed well, the problem is when I add the > SelectFeature control. I tried adding one control to each layer but this has > the problem of only the last added layer gets its control working properly. You could try the patch "singleroot.3.patch" found at http://trac.openlayers.org/ticket/1666 (patch is against trunk). An example is online at http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html This uses a different approach: you have one SelectFeature control, and configure it with an array of layers instead of one layer. The events (e.g. featureselected) will still fire on the separate layers. If you decide to use that, please report how it works for you by commenting on the ticket. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From zer_matt at hotmail.com Thu Jan 15 10:43:54 2009 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problems with selectControl after upgrading from OL 2.6 to 2.7 Message-ID: <1232034234893-2163130.post@n2.nabble.com> Dear List, In OL 2.6 this code worked just fine. After upgrading to OL 2.7 I have some problems: 1. When loading the page, I get an error (?selectControl.handler is null?) on this row ?selectControl.handler.stopDown = false;?, so I tried to removed the lines? 2. Now the ?onSelect? never gets called. However, if I remove the activate-function, the onSelect gets called. But I need to do something every time the control is activated. Does anyone know what the problem could be? Thanks, Z var selectOptions = { hover :false, toggle :true, multiple :true, activate : function() { OpenLayers.Control.prototype.activate.apply(this, arguments); //here I call a function to do some initiation; }, deactivate : function() { OpenLayers.Control.prototype.deactivate.apply(this,arguments); }, onSelect : function(feature) { // here I call a function }, onUnselect : function(feature) { // here I call a function } }; var selectControl = new OpenLayers.Control.SelectFeature(wfsTeLayer,selectOptions); map.addControl(selectControl); selectControl.handler.stopDown = false; selectControl.handler.stopUp = false; -- View this message in context: http://n2.nabble.com/Problems-with-selectControl-after-upgrading-from-OL-2.6-to-2.7-tp2163130p2163130.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Thu Jan 15 11:04:57 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) Message-ID: <496F5EA9.2050203@mapgears.com> Hi list, I just want to share a sample of Handler.Hover usage I do. The result is a Control.Hover I use to change the style of features hover the mouse without selecting them and display a popup at the same time. You could also register events on "hoverfeatureset" and "hoverfeaturereset" to do more stuff if you want. See the example : http://dev.openlayers.org/sandbox/adube/openlayers/examples/hover-control.html See the code : http://dev.openlayers.org/sandbox/adube/openlayers/lib/OpenLayers/Control/Hover.js At first I wanted it to be a new OpenLayers feature, but then I thought that Handlers were created for the purpose of customizing our own controls depending of what our needs are. So this Hover control is one of many possible usage of Handlers, so IMHO it's not useful to make it a new feature. Sharing it is enough. Comments are welcomed, -- Alexandre Dub? Mapgears www.mapgears.com From jvanulde at nrcan.gc.ca Thu Jan 15 11:57:26 2009 From: jvanulde at nrcan.gc.ca (Semantica) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] How can I disable layerSwitcher redraw on measure tool select? Message-ID: <1232038646459-2163589.post@n2.nabble.com> When selecting the measure tool in my toolbar, the layerSwitcher redraw is being fired. Any way to skip this redraw? Thank you in advance! -- View this message in context: http://n2.nabble.com/How-can-I-disable-layerSwitcher-redraw-on-measure-tool-select--tp2163589p2163589.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Thu Jan 15 12:10:27 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <496F5EA9.2050203@mapgears.com> References: <496F5EA9.2050203@mapgears.com> Message-ID: <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> Thanks for sharing your code Alexandre. I thought about a Feature control in the past. That control would use a Feature handler internally and would be configured to work either in hover or click mode, just like the SelectFeature control. But, as yours, it wouldn't select features, but just trigger events when features are hovered or clicked. To avoid code duplication I also imagined that the SelectFeature control could be based on that control instead of relying directly on the Feature handler. But I had the same reasoning as you: why bother? Building a custom Feature handler-based control is easy enough... But, actually, there are so many people needing that thing that it may be valuable to have it in trunk. Cheers, Eric 2009/1/15, Alexandre Dube : > Hi list, > > I just want to share a sample of Handler.Hover usage I do. The result > is a Control.Hover I use to change the style of features hover the mouse > without selecting them and display a popup at the same time. You could > also register events on "hoverfeatureset" and "hoverfeaturereset" to do > more stuff if you want. > > See the example : > > http://dev.openlayers.org/sandbox/adube/openlayers/examples/hover-control.html > > See the code : > > http://dev.openlayers.org/sandbox/adube/openlayers/lib/OpenLayers/Control/Hover.js > > At first I wanted it to be a new OpenLayers feature, but then I > thought that Handlers were created for the purpose of customizing our > own controls depending of what our needs are. So this Hover control is > one of many possible usage of Handlers, so IMHO it's not useful to make > it a new feature. Sharing it is enough. > > Comments are welcomed, > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From eric.c2c at gmail.com Thu Jan 15 12:13:14 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problems with selectControl after upgrading from OL 2.6 to 2.7 In-Reply-To: <1232034234893-2163130.post@n2.nabble.com> References: <1232034234893-2163130.post@n2.nabble.com> Message-ID: <5ec103de0901150913p35e63410i7e5e0da0d5ffe0e@mail.gmail.com> Hi. Try: control.handlers.feature.stopDown = false; Cheers Eric 2009/1/15, Zer : > > Dear List, > > In OL 2.6 this code worked just fine. After upgrading to OL 2.7 I have some > problems: > > 1. When loading the page, I get an error ('selectControl.handler is null') > on this row 'selectControl.handler.stopDown = false;', so I tried to removed > the lines? > 2. Now the 'onSelect' never gets called. However, if I remove the > activate-function, the onSelect gets called. But I need to do something > every time the control is activated. Does anyone know what the problem could > be? > > Thanks, > > Z > > var selectOptions = > { > hover :false, > toggle :true, > multiple :true, > activate : function() > { > OpenLayers.Control.prototype.activate.apply(this, arguments); > //here I call a function to do some initiation; > }, > deactivate : function() > { > OpenLayers.Control.prototype.deactivate.apply(this,arguments); > }, > onSelect : function(feature) > { > // here I call a function > }, > onUnselect : function(feature) > { > // here I call a function > } > }; > var selectControl = new > OpenLayers.Control.SelectFeature(wfsTeLayer,selectOptions); > map.addControl(selectControl); > selectControl.handler.stopDown = false; > selectControl.handler.stopUp = false; > > -- > View this message in context: > http://n2.nabble.com/Problems-with-selectControl-after-upgrading-from-OL-2.6-to-2.7-tp2163130p2163130.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 Thu Jan 15 12:29:04 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> Message-ID: <5b021dd0901150929p6f4aa323vddfc4fd9b07dfe07@mail.gmail.com> Hi, On Thu, Jan 15, 2009 at 6:10 PM, Eric Lemoine wrote: > Thanks for sharing your code Alexandre. > > I thought about a Feature control in the past. That control would use > a Feature handler internally and would be configured to work either in > hover or click mode, just like the SelectFeature control. But, as > yours, it wouldn't select features, but just trigger events when > features are hovered or clicked. To avoid code duplication I also > imagined that the SelectFeature control could be based on that control > instead of relying directly on the Feature handler. just a quick note: I have chosen the same approach (a control that just triggers events) for the WFSGetFeature control [1]. See the example [2] for more details. I'll create a ticket with a patch during the process of getting the new WFS stuff from the topp/wfs sandbox into trunk. Regards, Andreas. [1] http://trac.openlayers.org/browser/sandbox/topp/wfs/lib/OpenLayers/Control/WFSGetFeature.js [2] http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From adube at mapgears.com Thu Jan 15 13:29:50 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> Message-ID: <496F809E.4020004@mapgears.com> Thanks Eric for your comments, As you said, it was not too hard to build. My first thought was that a SelectFeature control actually "select" the feature ( change its renderIntent to "select" ) so a selected feature gets drawn with the "select" style. That was not what I had in mind at first. I wanted to have an other color for that, or I could say that I actually wanted to know when I could click a feature to select it by changing its color first. I would be glad to create a ticket for this feature. Do you think "Hover" is a good name for what this control does ? ( changing the style of features when the mouse is over it, can also display a popup at the same time with all the features attributes/values ) Thanks again, Alexandre Eric Lemoine wrote: > Thanks for sharing your code Alexandre. > > I thought about a Feature control in the past. That control would use > a Feature handler internally and would be configured to work either in > hover or click mode, just like the SelectFeature control. But, as > yours, it wouldn't select features, but just trigger events when > features are hovered or clicked. To avoid code duplication I also > imagined that the SelectFeature control could be based on that control > instead of relying directly on the Feature handler. > > But I had the same reasoning as you: why bother? Building a custom > Feature handler-based control is easy enough... > > But, actually, there are so many people needing that thing that it may > be valuable to have it in trunk. > > Cheers, > > Eric > > 2009/1/15, Alexandre Dube : > >> Hi list, >> >> I just want to share a sample of Handler.Hover usage I do. The result >> is a Control.Hover I use to change the style of features hover the mouse >> without selecting them and display a popup at the same time. You could >> also register events on "hoverfeatureset" and "hoverfeaturereset" to do >> more stuff if you want. >> >> See the example : >> >> http://dev.openlayers.org/sandbox/adube/openlayers/examples/hover-control.html >> >> See the code : >> >> http://dev.openlayers.org/sandbox/adube/openlayers/lib/OpenLayers/Control/Hover.js >> >> At first I wanted it to be a new OpenLayers feature, but then I >> thought that Handlers were created for the purpose of customizing our >> own controls depending of what our needs are. So this Hover control is >> one of many possible usage of Handlers, so IMHO it's not useful to make >> it a new feature. Sharing it is enough. >> >> Comments are welcomed, >> >> -- >> Alexandre Dub? >> Mapgears >> www.mapgears.com >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Thu Jan 15 13:52:03 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5b021dd0901150929p6f4aa323vddfc4fd9b07dfe07@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <5b021dd0901150929p6f4aa323vddfc4fd9b07dfe07@mail.gmail.com> Message-ID: <496F85D3.3020700@mapgears.com> Yeah, I saw your example a couple of days ago. It's a great tool. As vector features are longer to draw than samples images generated by WMS requests I find this quite useful. The slow rendering of vector features has been one of my worries. A common practice is to normalize the geometry for a given scale or have different data per scale on the server side. With that in mind, I wanted my vector layer to load features from different data source. See the example : http://dev4.mapgears.com/bdga/options-by-zoom-hover-bdga.html This combine the above idea ( multiple data sources ) with the Hover control. The result is quite fast. What do you think ? Alexandre Andreas Hocevar wrote: > Hi, > > On Thu, Jan 15, 2009 at 6:10 PM, Eric Lemoine wrote: > >> Thanks for sharing your code Alexandre. >> >> I thought about a Feature control in the past. That control would use >> a Feature handler internally and would be configured to work either in >> hover or click mode, just like the SelectFeature control. But, as >> yours, it wouldn't select features, but just trigger events when >> features are hovered or clicked. To avoid code duplication I also >> imagined that the SelectFeature control could be based on that control >> instead of relying directly on the Feature handler. >> > > just a quick note: I have chosen the same approach (a control that > just triggers events) for the WFSGetFeature control [1]. See the > example [2] for more details. I'll create a ticket with a patch during > the process of getting the new WFS stuff from the topp/wfs sandbox > into trunk. > > Regards, > Andreas. > > [1] http://trac.openlayers.org/browser/sandbox/topp/wfs/lib/OpenLayers/Control/WFSGetFeature.js > [2] http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html > > -- Alexandre Dub? Mapgears www.mapgears.com From zer_matt at hotmail.com Thu Jan 15 15:46:42 2009 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problems with selectControl after upgrading from OL 2.6 to 2.7 In-Reply-To: <5ec103de0901150913p35e63410i7e5e0da0d5ffe0e@mail.gmail.com> References: <1232034234893-2163130.post@n2.nabble.com> <5ec103de0901150913p35e63410i7e5e0da0d5ffe0e@mail.gmail.com> Message-ID: <1232052402453-2164779.post@n2.nabble.com> Hi! Thanks! That fixed my first probelem! But the 'onSelect' still doesn't get called, unless I remove the activate function. Any ideas? -Z Eric Lemoine wrote: > > Hi. Try: > > control.handlers.feature.stopDown = false; > > Cheers > > Eric > > 2009/1/15, Zer : >> >> Dear List, >> >> In OL 2.6 this code worked just fine. After upgrading to OL 2.7 I have >> some >> problems: >> >> 1. When loading the page, I get an error ('selectControl.handler is >> null') >> on this row 'selectControl.handler.stopDown = false;', so I tried to >> removed >> the lines? >> 2. Now the 'onSelect' never gets called. However, if I remove the >> activate-function, the onSelect gets called. But I need to do something >> every time the control is activated. Does anyone know what the problem >> could >> be? >> >> Thanks, >> >> Z >> >> var selectOptions = >> { >> hover :false, >> toggle :true, >> multiple :true, >> activate : function() >> { >> OpenLayers.Control.prototype.activate.apply(this, arguments); >> //here I call a function to do some initiation; >> }, >> deactivate : function() >> { >> OpenLayers.Control.prototype.deactivate.apply(this,arguments); >> }, >> onSelect : function(feature) >> { >> // here I call a function >> }, >> onUnselect : function(feature) >> { >> // here I call a function >> } >> }; >> var selectControl = new >> OpenLayers.Control.SelectFeature(wfsTeLayer,selectOptions); >> map.addControl(selectControl); >> selectControl.handler.stopDown = false; >> selectControl.handler.stopUp = false; >> >> -- >> View this message in context: >> http://n2.nabble.com/Problems-with-selectControl-after-upgrading-from-OL-2.6-to-2.7-tp2163130p2163130.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Problems-with-OpenLayers.Control.SelectFeature-after-upgrading-from-OL-2.6-to-2.7-tp2163130p2164779.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu Jan 15 16:35:35 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <496F85D3.3020700@mapgears.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <5b021dd0901150929p6f4aa323vddfc4fd9b07dfe07@mail.gmail.com> <496F85D3.3020700@mapgears.com> Message-ID: <5b021dd0901151335n5d809655q2c846179e8f7abe@mail.gmail.com> Hi Alexandre, On Thu, Jan 15, 2009 at 7:52 PM, Alexandre Dube wrote: > Yeah, I saw your example a couple of days ago. It's a great tool. As > vector features are longer to draw than samples images generated by WMS > requests I find this quite useful. > > The slow rendering of vector features has been one of my worries. A > common practice is to normalize the geometry for a given scale or have > different data per scale on the server side. With that in mind, I > wanted my vector layer to load features from different data source. See > the example : > > http://dev4.mapgears.com/bdga/options-by-zoom-hover-bdga.html > > This combine the above idea ( multiple data sources ) with the Hover > control. The result is quite fast. What do you think ? This is a good idea! But it seems there is a lot of work to do on the server side to prepare all the different detail levels for a WFS. Are you using WPS for that? Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From adube at mapgears.com Thu Jan 15 17:10:08 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5b021dd0901151335n5d809655q2c846179e8f7abe@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <5b021dd0901150929p6f4aa323vddfc4fd9b07dfe07@mail.gmail.com> <496F85D3.3020700@mapgears.com> <5b021dd0901151335n5d809655q2c846179e8f7abe@mail.gmail.com> Message-ID: <496FB440.6000707@mapgears.com> Andreas Hocevar wrote: > Hi Alexandre, > > On Thu, Jan 15, 2009 at 7:52 PM, Alexandre Dube wrote: > >> Yeah, I saw your example a couple of days ago. It's a great tool. As >> vector features are longer to draw than samples images generated by WMS >> requests I find this quite useful. >> >> The slow rendering of vector features has been one of my worries. A >> common practice is to normalize the geometry for a given scale or have >> different data per scale on the server side. With that in mind, I >> wanted my vector layer to load features from different data source. See >> the example : >> >> http://dev4.mapgears.com/bdga/options-by-zoom-hover-bdga.html >> >> This combine the above idea ( multiple data sources ) with the Hover >> control. The result is quite fast. What do you think ? >> > > This is a good idea! But it seems there is a lot of work to do on the > server side to prepare all the different detail levels for a WFS. Are > you using WPS for that? > > Andreas. > > Unfortunately no. Everything is hardcoded. Yeah, such a tool would be great. Or, if it would be possible, given a specific database, to know every possibilities at once and if the number of possibilities doesn't go past 10, we could automatically create select boxes with the possibles results. Else, we leave a blank textbox the user has to fill. Plus, if only 1 possibility is available, no need to do anything. Plus date format doesn't need to be entered either, etc etc... ( It's good to dream ). Do you know if something like that is possible ? Cheers, Alexandre -- Alexandre Dub? Mapgears www.mapgears.com From zer_matt at hotmail.com Thu Jan 15 17:27:03 2009 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] OL 2.7 measure control questions In-Reply-To: <496E7F50.4020903@opengeo.org> References: <1231971899248-2159474.post@n2.nabble.com> <496E7F50.4020903@opengeo.org> Message-ID: <1232058423851-2165317.post@n2.nabble.com> Thanks! Cross hair works great! But the meter/kilometer thing is still a problem. Even though i use 'displaySystemUnits: {metric: ["m"]}', the control gives the result in km if lenght is more than 1000 meters. -Z Tim Schaub wrote: > > Zer wrote: >> Dear list, >> >> Is there a way to change to mouse pointer to a hair cross when using then >> measure control? >> > > control.events.on({ > activate: function() { > map.div.style.cursor = "crosshair"; > }, > deactivate: function() { > map.div.style.cursor = "default"; > } > }); > > Of course you'll be better off if you use methods like: > > OpenLayers.Element.addClass(map.div, "cursor_cross"); > > and > > OpenLayers.Element.removeClass(map.div, "cursor_cross"); > > And then load up a stylesheet that has something like > > .cursor_cross { > cursor: crosshair; > } > >> Is there a way to always present the measured distance in meters? The >> distance shows in km as soon as a distance longer than 1000m is measured. >> > > var control = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, { > displaySystemUnits: {metric: ["m"]} > }); > > This property (displaySystemUnits) is not marked as part of the API - so > you may have to change your app if it changes (don't imagine it will in > 2.x). > > Tim > >> Thanks, >> >> Z > > > -- > Tim Schaub > OpenGeo - http://opengeo.org > Expert service straight from the developers. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/OL-2.7-measure-control-questions-tp2159474p2165317.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ryan.feagin at PEACHTREEGEOGRAPHICS.COM Thu Jan 15 22:30:00 2009 From: ryan.feagin at PEACHTREEGEOGRAPHICS.COM (RFeagin) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] GML and GetFeatureInfo In-Reply-To: <9669748D6D82454F9923FA565CC041700464CCE0@perdcexch.nntt.gov.au> References: <9669748D6D82454F9923FA565CC041700464C9B4@perdcexch.nntt.gov.au> <9669748D6D82454F9923FA565CC041700464CCE0@perdcexch.nntt.gov.au> Message-ID: <1232076600642-2166382.post@n2.nabble.com> Andrew- I'm running into the same problem. Did you ever find another way to get it working? If not, then would you mind sharing your xsl stylesheet? Thanks Spencer, Andrew wrote: > >>mpriour wrote: >>> >>> For each attribute node get the attribute from the 'ref' attribute > and the >>> value from the innerText >>> >> >>I actually meant the innerHTML property of that node or the value of > its >>childText node. not the IE only innerText property. >> >>Matt > > > Thank you Matt, your response is greatly appreciated. I couldn't get it > to work by applying the MapInfo namespace, but it should do shouldn't > it, so I suspect I was doing something else wrong. I solved the > immediate problem by using an xsl stylesheet, which kind of gets me off > the hook at the moment! It's good to know where we are at though. > > Thanks again > > Andrew > If this email has been received in error, please delete all copies > and inform the National Native Title Tribunal by return email or > telephone 1800 640 501. > The Tribunal does not warrant that its email is virus free. > All emails sent to the Tribunal are filtered for viruses and > inappropriate content. Thus your email may not reach the person to > whom it is addressed. Seek confirmation of receipt of your email if you > consider the email important. > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/GML-and-GetFeatureInfo-tp1831488p2166382.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Fri Jan 16 00:04:54 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problems with selectControl after upgrading from OL 2.6 to 2.7 In-Reply-To: <1232052402453-2164779.post@n2.nabble.com> References: <1232034234893-2163130.post@n2.nabble.com> <5ec103de0901150913p35e63410i7e5e0da0d5ffe0e@mail.gmail.com> <1232052402453-2164779.post@n2.nabble.com> Message-ID: <5ec103de0901152104s4888469ch176007db3daa1aac@mail.gmail.com> On Thu, Jan 15, 2009 at 9:46 PM, Zer wrote: > > Hi! > > Thanks! That fixed my first probelem! > > But the 'onSelect' still doesn't get called, unless I remove the activate > function. Any ideas? Do not override the activate method, instead register an "activate" listener: var ctrl = new OpenLayers.Control.SelectFeature(layer, { eventListeners: { "activate": function() { alert("control activated"); } } }); or (after the control creation): ctrl.events.on({ "activate": function() { alert("control activated"); } }); Cheers, -- Eric From jatin.a at iworktech.com Fri Jan 16 01:22:26 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Problem related to names/labels of wards appearing multiple times (using map file) Message-ID: Hello Everyone, I have started using OpenLayers since some time now.... I am using a ".map" file to generate a map. Following is the code: * map = new OpenLayers.Map( $('center') ); var wmsurl = "** http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/OpenExtMap/MyShapeFiles/MyMap.map * *"; var wmsmdi = new OpenLayers.Layer.MapServer( "Wards", wmsurl, {layer:'Wards'}); map.addLayer(wmsmdi); * Now the map that is being displayed shows the ward numbers on each ward (since ward number is used as the value for attribute field called name). Well thats fine, thats not my problem. The real problem is that when we zoom in and as the area of each ward increases the ward numbers are repeated on each ward at some distances. This did not happen when we used the same ".map" file to generate map using C# mapscript API. Is it the problem of Openlayers or I need to do any changes in the map file. Following is the code for my map file: *NAME "iWork" UNITS Kilometers SIZE 700 600 IMAGECOLOR 250 250 210 IMAGETYPE gif SHAPEPATH "C:\ms4w\Apache\htdocs\OpenExtMap\MyShapeFiles" EXTENT 73.752230 18.424904 73.962774 18.614458 WEB IMAGEPATH "C:\ms4w\Apache\htdocs\OpenExtMap\MyShapeFiles\temp" IMAGEURL "C:\ms4w\Apache\htdocs\OpenExtMap\MyShapeFiles\temp" END QUERYMAP COLOR 255 0 0 STYLE hilite END LAYER NAME "Wards" DATA "My_Shape" STATUS on TYPE polygon LABELCACHE on LABELITEM "NAME" CLASS NAME "My Wards" STYLE COLOR 085 107 047 OUTLINECOLOR 240 230 140 END LABEL COLOR 255 255 255 SIZE small END #end LABEL END #end CLASS Ward Number END #end LAYER Wards LAYER :* *:* *:* *END #end * *END #end mapfile* -- Regards, Jatin Ambasana iWork Technologies Pvt. Ltd. Mobile:+91-9765394718 Visit us: www.iworktech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090116/7a3003d5/attachment.html From rahn at zhaw.ch Fri Jan 16 02:43:06 2009 From: rahn at zhaw.ch (Rahn Hanno (rahn)) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] mousemove should show attributes from database Message-ID: <3F643797A078EB4FB028800809680984011DFB54@langouste.zhaw.ch> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 19573 bytes Desc: image001.jpg Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090116/9463d470/attachment.jpe From igrcic at gmail.com Fri Jan 16 03:03:55 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] mousemove should show attributes from database In-Reply-To: <3F643797A078EB4FB028800809680984011DFB54@langouste.zhaw.ch> References: <3F643797A078EB4FB028800809680984011DFB54@langouste.zhaw.ch> Message-ID: Hi, take alook at http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html or use vector layer http://openlayers.org/dev/examples/openmnnd.html Cheers, Ivan On Fri, Jan 16, 2009 at 8:43 AM, Rahn Hanno (rahn) wrote: > Hello list, > > > > I have some questions about the mousemove event and mousePosition control. > In Openlayers it ist possible to show the coordinates of the mousposition in > the lower right of the map for example how you can see in the image. > > > > > > > > The text will dynamically change if you are moving the mouse of course. I > realised it like this: > > > > map.addControl(new OpenLayers.Control.MousePosition()); > > map.events.register("mousemove", map, function(e) { > > }); > > > > And now my question. I want to get the name of the region if I get over the > map. If I move the mouse over the map, the text in the lower right should > show the name of the right region instead of the coordinates. The names are > saved in a postgis database. I hope you understand what I will do, because > my english ist not very well and somebody can help me. I tried it so long, > but I didn't find a solution. Perhaps somebody had already realised it and > can give me some tipps and help. For your help a lot of thanks. I hope it > will be possible. > > > > Greetings > > Hanno Rahn > > > > ------------------------------------------ > > Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik > > ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche > Ressourcen > > Fachstelle Geoinformatik > > Gr?ental, Postfach CH-8820 W?denswil > > Tel +41 (0)58 934 5592 > > Fax +41 (0)58 934 5580 > > hanno.rahn@zhaw.ch > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From andre.matos at co.sapo.pt Fri Jan 16 06:01:39 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] New DragFeature Control and SelectFeatureControl cross layers. Want to share In-Reply-To: <5b021dd0901150710u37dd69a9p6e6631d3c3016ad3@mail.gmail.com> References: <5b021dd0901150710u37dd69a9p6e6631d3c3016ad3@mail.gmail.com> Message-ID: Hi, I sent the code and a short explanation to OpenLayers dev and users... I didn't see your code yet... But I promise that I will. Thanks for sharing ;) Here is the mail, that I sent: I have done controls and handlers to handle events in features that are in different layers (with OpenLayers controls you only can handle events in a single layer, and that layer must be on the top), and as I received on mail requests to share my code, I decided to send it for the list. With an explanation how it works. Actually I made two controls, FeatureEventHandlerControl and DragFeatureControl and an handler (FeatureHandler) to help the FeatureEventHandlerControl. This two controls works pretty like the SelectFeature and DragFeature OpenLayers controls, but they work cross layers. They don't care about the layers. When you want to get an event from a feature, you must register that feature on the control, and when that event occurres you will be notified. For example: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Var dragControl = new Sapo.Control.DragFeatureControl([], { 'dragstart': { callback: function(feacture, pixel){/*do something*/} context: this} 'drag': { callback: function(feacture, pixel){/*do something*/} context: this} 'dragend': { callback: function(feacture, pixel){/*do something*/} context: this} } ); Var featureEvtHandler = new Sapo.Control.FeatureEventHandlers([], { 'click': { callback: function(feacture, pixel){/*do something*/} context: this} 'mouseover': { callback: function(feacture, pixel){/*do something*/} context: this} 'mouseout': { callback: function(feacture, pixel){/*do something*/} context: this} } ); Map.addControl(dragControl); Map.addControl(featureEvtHandler); dragControl.activate(); featureEvtHandler.activate(); Var layer1 = new OpenLayers.Layer.Vector("Markers", { projection: new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ externalGraphic: "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, backgroundXOffset: 0, backgroundYOffset: -17, pointRadius: 10 }) } ); Var layer2 = new OpenLayers.Layer.Vector("Markers 2", { projection: new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ externalGraphic: "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, backgroundXOffset: 0, backgroundYOffset: -17, pointRadius: 10 }) } ); Map.addLayer(layer1); Map.addLayer(layer2); Var feature1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); Var feature2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-1504105.3415234375, 4392319.753066596)); Layer1.addFeatures([feature1]); Layer2.addFeatures([feature2]); dragControl.addFeature(feature1); featureEvtHandler.addFeature(feature2); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// When occurs an event(dragstart, drag, dragend, click, mouseover, mouseout) in any of this features, in different layers, the callbacks will be notified. If you have any questions just ask us (Andr? or Jo?o)! Regards, Andr? Matos http://maps.sapo.pt -----Original Message----- From: andreas.hocevar@gmail.com [mailto:andreas.hocevar@gmail.com] On Behalf Of Andreas Hocevar Sent: quinta-feira, 15 de Janeiro de 2009 15:11 To: Andre Pereira de Matos Cc: dev@openlayers.org; users@openlayers.org Subject: Re: [OpenLayers-Dev] New DragFeature Control and SelectFeatureControl cross layers. Want to share Hi Andre, 2009/1/13 Andre Pereira de Matos : > I have made a Project with openlayers, and at some point I had to make a new > handler and a new control to provide draggable feature and handle events > like, click, mouseover, mouseout in features that was in different layers. > > The Openlayers control (DragFeature, SelectFeature) and handlers (Drag, > Feature) only works if the features are all in the same layer and the layer > is on the top. I have no experience with the DragFeature control, but I have created a solution for feature selection that works with multiple layers recently [1]. An example is also avaialable [2]. You may want to check this out, and I'd be interested to see your approach. Also, it would be cool to see if my approach also works with the DragFeature control. Regards, Andreas. [1] http://trac.openlayers.org/ticket/1666 [2] http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From andre.matos at co.sapo.pt Fri Jan 16 06:03:04 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] New DragFeature Control and SelectFeatureControl cross layers. Want to share References: <5b021dd0901150710u37dd69a9p6e6631d3c3016ad3@mail.gmail.com> Message-ID: Forgot the code, sorry. Best Regards, Andr? Matos http://maps.sapo.pt -----Original Message----- From: Andre Pereira de Matos Sent: sexta-feira, 16 de Janeiro de 2009 11:02 To: 'Andreas Hocevar' Cc: dev@openlayers.org; users@openlayers.org Subject: RE: [OpenLayers-Dev] New DragFeature Control and SelectFeatureControl cross layers. Want to share Hi, I sent the code and a short explanation to OpenLayers dev and users... I didn't see your code yet... But I promise that I will. Thanks for sharing ;) Here is the mail, that I sent: I have done controls and handlers to handle events in features that are in different layers (with OpenLayers controls you only can handle events in a single layer, and that layer must be on the top), and as I received on mail requests to share my code, I decided to send it for the list. With an explanation how it works. Actually I made two controls, FeatureEventHandlerControl and DragFeatureControl and an handler (FeatureHandler) to help the FeatureEventHandlerControl. This two controls works pretty like the SelectFeature and DragFeature OpenLayers controls, but they work cross layers. They don't care about the layers. When you want to get an event from a feature, you must register that feature on the control, and when that event occurres you will be notified. For example: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Var dragControl = new Sapo.Control.DragFeatureControl([], { 'dragstart': { callback: function(feacture, pixel){/*do something*/} context: this} 'drag': { callback: function(feacture, pixel){/*do something*/} context: this} 'dragend': { callback: function(feacture, pixel){/*do something*/} context: this} } ); Var featureEvtHandler = new Sapo.Control.FeatureEventHandlers([], { 'click': { callback: function(feacture, pixel){/*do something*/} context: this} 'mouseover': { callback: function(feacture, pixel){/*do something*/} context: this} 'mouseout': { callback: function(feacture, pixel){/*do something*/} context: this} } ); Map.addControl(dragControl); Map.addControl(featureEvtHandler); dragControl.activate(); featureEvtHandler.activate(); Var layer1 = new OpenLayers.Layer.Vector("Markers", { projection: new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ externalGraphic: "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, backgroundXOffset: 0, backgroundYOffset: -17, pointRadius: 10 }) } ); Var layer2 = new OpenLayers.Layer.Vector("Markers 2", { projection: new OpenLayers.Projection("EPSG:4326"), styleMap: new OpenLayers.StyleMap({ externalGraphic: "http://openlayers.org/dev/img/marker-gold.png", backgroundGraphic: "http://openlayers.org/dev/examples/marker_shadow.png", graphicYOffset: -20, backgroundXOffset: 0, backgroundYOffset: -17, pointRadius: 10 }) } ); Map.addLayer(layer1); Map.addLayer(layer2); Var feature1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-1904105.3415234375, 4392319.753066596)); Var feature2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-1504105.3415234375, 4392319.753066596)); Layer1.addFeatures([feature1]); Layer2.addFeatures([feature2]); dragControl.addFeature(feature1); featureEvtHandler.addFeature(feature2); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// When occurs an event(dragstart, drag, dragend, click, mouseover, mouseout) in any of this features, in different layers, the callbacks will be notified. If you have any questions just ask us (Andr? or Jo?o)! Regards, Andr? Matos http://maps.sapo.pt -----Original Message----- From: andreas.hocevar@gmail.com [mailto:andreas.hocevar@gmail.com] On Behalf Of Andreas Hocevar Sent: quinta-feira, 15 de Janeiro de 2009 15:11 To: Andre Pereira de Matos Cc: dev@openlayers.org; users@openlayers.org Subject: Re: [OpenLayers-Dev] New DragFeature Control and SelectFeatureControl cross layers. Want to share Hi Andre, 2009/1/13 Andre Pereira de Matos : > I have made a Project with openlayers, and at some point I had to make a new > handler and a new control to provide draggable feature and handle events > like, click, mouseover, mouseout in features that was in different layers. > > The Openlayers control (DragFeature, SelectFeature) and handlers (Drag, > Feature) only works if the features are all in the same layer and the layer > is on the top. I have no experience with the DragFeature control, but I have created a solution for feature selection that works with multiple layers recently [1]. An example is also avaialable [2]. You may want to check this out, and I'd be interested to see your approach. Also, it would be cool to see if my approach also works with the DragFeature control. Regards, Andreas. [1] http://trac.openlayers.org/ticket/1666 [2] http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. -------------- next part -------------- A non-text attachment was scrubbed... Name: Controls.rar Type: application/octet-stream Size: 7461 bytes Desc: Controls.rar Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090116/a1cfc1fc/Controls.obj From jatin.a at iworktech.com Fri Jan 16 07:37:24 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] How to know the area of polygons falling under a circle? Message-ID: Hello Everyone, We are using 2 layers on our map. First layer is created using a map file and using Mapserver. Second layer is having same shape as the 1st layer since it is created from the gml file that I got after converting the shape to gml. Now I am creating the second layer using OpenLayers.Layer.GML class so that I can apply SLD to it and use it as the layer to do selection of polygons created on the layer. User is able to select the polygons on clicking and also able to get the information from the selected polygons like... featureid. We needed a functionality where in I could draw a circle on the map and determine which polygons fall under that circle. I am able to draw the circle right now. I came to know that I can do the comparison using the intersects() method of polygon but, that just gives me which polygons intersect and which don't. *What we needed was to know that how much area of the polygons from second layer (the one created using gml) was covered under the circle. Also along with that which polygons were covered under the circle.* Is there any method of doing so....? Can anyone give some suggestions or ideas.... Thanks in advance.... -- Regards, Jatin Ambasana iWork Technologies Pvt. Ltd. Mobile:+91-9765394718 Mail: jatin.a@iworktech.com Visit us: www.iworktech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090116/a4891d47/attachment.html From pascal.darre at laposte.net Fri Jan 16 07:37:59 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] FEatures orders Message-ID: <1232109479862-2167927.post@n2.nabble.com> Hi I have a GEoJson file with my feature inside. I am able to select feature with openlayers by clicking on it. Some features are over other, for example a small rectangle area is over a bigger rectangle. When it is in this order, there is no problem (I can select the small and the big rectangle) but when it is the reverse (=the small rectangle is below the big rectangle), I cannot select the small rectangle area. The problem is I do not master the ordering. I try to order the feature in the GeoJson file thinking that first written, first drawn, but whenever I select the big rectangle it seems to go back to front and so the small rectangle is no more accessible. Any idea on how to manage this? thanks -- View this message in context: http://n2.nabble.com/FEatures-orders-tp2167927p2167927.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Fri Jan 16 08:16:35 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <1232109479862-2167927.post@n2.nabble.com> References: <1232109479862-2167927.post@n2.nabble.com> Message-ID: <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> Hi, On Fri, Jan 16, 2009 at 1:37 PM, darrepac wrote: > I have a GEoJson file with my feature inside. I am able to select feature > with openlayers by clicking on it. > Some features are over other, for example a small rectangle area is over a > bigger rectangle. > When it is in this order, there is no problem (I can select the small and > the big rectangle) but when it is the reverse (=the small rectangle is below > the big rectangle), I cannot select the small rectangle area. > > The problem is I do not master the ordering. I try to order the feature in > the GeoJson file thinking that first written, first drawn, but whenever I > select the big rectangle it seems to go back to front and so the small > rectangle is no more accessible. > > Any idea on how to manage this? You could use z-indexing on the layer. See http://www.openlayers.org/dev/examples/ordering.html for an example. You would probably have to sort your features by size, and create ascending z-indices with descending size. This would ensure that smaller rectangles will be drawn on top of larger ones. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From adube at mapgears.com Fri Jan 16 08:33:37 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] mousemove should show attributes from database In-Reply-To: <3F643797A078EB4FB028800809680984011DFB54@langouste.zhaw.ch> References: <3F643797A078EB4FB028800809680984011DFB54@langouste.zhaw.ch> Message-ID: <49708CB1.7080609@mapgears.com> An other example using a vector layer, information displayed in a popup using a custom control "Hover". (click the "edit" button to see the popups): http://dev4.mapgears.com/bdga-mapfish/ Best of luck, Alexandre Rahn Hanno (rahn) wrote: > > Hello list, > > I have some questions about the mousemove event and mousePosition > control. In Openlayers it ist possible to show the coordinates of the > mousposition in the lower right of the map for example how you can see > in the image. > > The text will dynamically change if you are moving the mouse of > course. I realised it like this: > > map.addControl(new OpenLayers.Control.MousePosition()); > > map.events.register("mousemove", map, function(e) { > > }); > > And now my question. I want to get the name of the region if I get > over the map. If I move the mouse over the map, the text in the lower > right should show the name of the right region instead of the > coordinates. The names are saved in a postgis database. I hope you > understand what I will do, because my english ist not very well and > somebody can help me. I tried it so long, but I didn?t find a > solution. Perhaps somebody had already realised it and can give me > some tipps and help. For your help a lot of thanks. I hope it will be > possible. > > Greetings > > Hanno Rahn > > ------------------------------------------ > > Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik > > ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und > Nat?rliche Ressourcen > > Fachstelle Geoinformatik > > Gr?ental, Postfach CH-8820 W?denswil > > Tel +41 (0)58 934 5592 > > Fax +41 (0)58 934 5580 > > hanno.rahn@zhaw.ch > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From gissur at loftmyndir.is Fri Jan 16 09:36:49 2009 From: gissur at loftmyndir.is (=?ISO-8859-1?Q?Gissur_=DE=F3rhallsson?=) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Panning map and bbox/tile position bug? In-Reply-To: <5b61c6c50811031128o1f7e2c92s2680c8fb284ceaa@mail.gmail.com> References: <5b61c6c50811031128o1f7e2c92s2680c8fb284ceaa@mail.gmail.com> Message-ID: <497c70db0901160636l145920e2oa1dbbf798acc76d9@mail.gmail.com> Hi Ian, Nice bug coaching on your end, and yes I can verify that I am experiencing similar behavior, though I'm still not sure it's not something in my own config. I also discovered it while perusing the wiki printing code, and actually just posted a question to a thread discussing it before noticing your message. Were you able to fix the problem or find a work-around? Kind regards, Gissur On Mon, Nov 3, 2008 at 7:28 PM, Ian wrote: > The bounding box and extent of the viewport seems to be corrupted when > panning the map. The actual display of the data is fine, however the > underlying bbox and x/y values for tiles corrupt printed images when using > the Wiki Printing code. While panning the map and then printing will give an > incorrect image result, switching the base layer after panning fixes the > bbox and x/y values and any base layer will print correctly thereafter. > Additional panning does require additional base layer switches to fix the > extent again. > > Test map: > > function loadMap(){ > map = new OpenLayers.Map( 'map' ); > var lon = -119.2; > var lat = 37; > var zoom = 4; > var lyrSw = new OpenLayers.Control.LayerSwitcher(); > map.addControl(lyrSw); > var ol_wms = new OpenLayers.Layer.WMS("basic"," > http://labs.metacarta.com/wms/vmap0",{layers: 'basic'}); > var satellite = new OpenLayers.Layer.WMS("sat", " > http://hypercube.telascience.org/cgi-bin/landsat7?", {layers:'landsat7'}, > {format: 'image/jpeg', wrapDateLine: false}); > > map.addLayers([ol_wms,satellite]); > map.setCenter(new OpenLayers.LonLat(lon,lat),zoom); > } > > > To reproduce this behavior: > 1. Print the initial map (works correctly) > 2. Pan the map and print (incorrect map extent with vertical black band on > left side of image) > 3. Switch the base layer and print (works correctly) > 4. Switch back to initial base layer and print (now works correctly) > > Following are debugging excerpts of each tile's url and x/y positions from > printMap.php: > > Pan the map and print: > > > http://url?LAYERS=basic&BBOX=-123.75,50.625,-118.125,56.25&WIDTH=256&HEIGHT=256, > x: 43, y: -626 > > http://url?LAYERS=basic&BBOX=-118.125,50.625,-112.5,56.25&WIDTH=256&HEIGHT=256, > x: 299, y: -626 > > http://url?LAYERS=basic&BBOX=-112.5,50.625,-106.875,56.25&WIDTH=256&HEIGHT=256, > x: 555, y: -626 > > http://url?LAYERS=basic&BBOX=-106.875,50.625,-101.25,56.25&WIDTH=256&HEIGHT=256, > x: 811, y: -626 > > http://url?LAYERS=basic&BBOX=-101.25,50.625,-95.625,56.25&WIDTH=256&HEIGHT=256, > x: 1067, y: -626 > http://url?LAYERS=basic&BBOX=-95.625,50.625,-90,56.25&WIDTH=256&HEIGHT=256, > x: 1323, y: -626 > http://url?LAYERS=basic&BBOX=-90,50.625,-84.375,56.25&WIDTH=256&HEIGHT=256, > x: 1579, y: -626 > > http://url?LAYERS=basic&BBOX=-123.75,45,-118.125,50.625&WIDTH=256&HEIGHT=256, > x: 43, y: -370 > http://url?LAYERS=basic&BBOX=-118.125,45,-112.5,50.625&WIDTH=256&HEIGHT=256, > x: 299, y: -370 > http://url?LAYERS=basic&BBOX=-112.5,45,-106.875,50.625&WIDTH=256&HEIGHT=256, > x: 555, y: -370 > > http://url?LAYERS=basic&BBOX=-106.875,45,-101.25,50.625&WIDTH=256&HEIGHT=256, > x: 811, y: -370 > http://url?LAYERS=basic&BBOX=-101.25,45,-95.625,50.625&WIDTH=256&HEIGHT=256, > x: 1067, y: -370 > http://url?LAYERS=basic&BBOX=-95.625,45,-90,50.625&WIDTH=256&HEIGHT=256, > x: 1323, y: -370 > http://url?LAYERS=basic&BBOX=-90,45,-84.375,50.625&WIDTH=256&HEIGHT=256, > x: 1579, y: -370 > > Switch base layer to sat and print: > > > http://url?LAYERS=sat&BBOX=-129.375,56.25,-123.75,61.875&WIDTH=256&HEIGHT=256, > x: -652, y: -762 > > http://url?LAYERS=sat&BBOX=-123.75,56.25,-118.125,61.875&WIDTH=256&HEIGHT=256, > x: -396, y: -762 > > http://url?LAYERS=sat&BBOX=-118.125,56.25,-112.5,61.875&WIDTH=256&HEIGHT=256, > x: -140, y: -762 > > http://url?LAYERS=sat&BBOX=-112.5,56.25,-106.875,61.875&WIDTH=256&HEIGHT=256, > x: 116, y: -762 > > http://url?LAYERS=sat&BBOX=-106.875,56.25,-101.25,61.875&WIDTH=256&HEIGHT=256, > x: 372, y: -762 > > http://url?LAYERS=sat&BBOX=-101.25,56.25,-95.625,61.875&WIDTH=256&HEIGHT=256, > x: 628, y: -762 > http://url?LAYERS=sat&BBOX=-95.625,56.25,-90,61.875&WIDTH=256&HEIGHT=256, > x: 884, y: -762 > > http://url?LAYERS=sat&BOX=-129.375,50.625,-123.75,56.25&WIDTH=256&HEIGHT=256, > x: -652, y: -506 > > http://url?LAYERS=sat&BBOX=-123.75,50.625,-118.125,56.25&WIDTH=256&HEIGHT=256, > x: -396, y: -506 > > http://url?LAYERS=sat&BBOX=-118.125,50.625,-112.5,56.25&WIDTH=256&HEIGHT=256, > x: -140, y: -506 > > http://url?LAYERS=sat&BBOX=-112.5,50.625,-106.875,56.25&WIDTH=256&HEIGHT=256, > x: 116, y: -506 > > http://url?LAYERS=sat&BBOX=-106.875,50.625,-101.25,56.25&WIDTH=256&HEIGHT=256, > x: 372, y: -506 > > http://url?LAYERS=sat&BBOX=-101.25,50.625,-95.625,56.25&WIDTH=256&HEIGHT=256, > x: 628, y: -506 > http://url?LAYERS=sat&BBOX=-95.625,50.625,-90,56.25&WIDTH=256&HEIGHT=256, > x: 884, y: -506 > > Switch base layer back to basic and print: > > > http://url?LAYERS=basic&BBOX=-129.375,56.25,-123.75,61.875&WIDTH=256&HEIGHT=256, > x: -652, y: -762 > > http://url?LAYERS=basic&BBOX=-123.75,56.25,-118.125,61.875&WIDTH=256&HEIGHT=256, > x: -396, y: -762 > > http://url?LAYERS=basic&BBOX=-118.125,56.25,-112.5,61.875&WIDTH=256&HEIGHT=256, > x: -140, y: -762 > > http://url?LAYERS=basic&BBOX=-112.5,56.25,-106.875,61.875&WIDTH=256&HEIGHT=256, > x: 116, y: -762 > > http://url?LAYERS=basic&BBOX=-106.875,56.25,-101.25,61.875&WIDTH=256&HEIGHT=256, > x: 372, y: -762 > > http://url?LAYERS=basic&BBOX=-101.25,56.25,-95.625,61.875&WIDTH=256&HEIGHT=256, > x: 628, y: -762 > http://url?LAYERS=basic&BBOX=-95.625,56.25,-90,61.875&WIDTH=256&HEIGHT=256, > x: 884, y: -762 > > http://url?LAYERS=basic&BBOX=-129.375,50.625,-123.75,56.25&WIDTH=256&HEIGHT=256, > x: -652, y: -506 > > http://url?LAYERS=basic&BBOX=-123.75,50.625,-118.125,56.25&WIDTH=256&HEIGHT=256, > x: -396, y: -506 > > http://url?LAYERS=basic&BBOX=-118.125,50.625,-112.5,56.25&WIDTH=256&HEIGHT=256, > x: -140, y: -506 > > http://url?LAYERS=basic&BBOX=-112.5,50.625,-106.875,56.25&WIDTH=256&HEIGHT=256, > x: 116, y: -506 > > http://url?LAYERS=basic&BBOX=-106.875,50.625,-101.25,56.25&WIDTH=256&HEIGHT=256, > x: 372, y: -506 > > http://url?LAYERS=basic&BBOX=-101.25,50.625,-95.625,56.25&WIDTH=256&HEIGHT=256, > x: 628, y: -506 > http://url?LAYERS=basic&BBOX=-95.625,50.625,-90,56.25&WIDTH=256&HEIGHT=256, > x: 884, y: -506 > > I also noted that layer.getTilesBounds() gives different bounds for a layer > before/after "fixing" it via a base layer switch. If someone will confirm > that this is a bug and not the result of a glaring omission on my part, I > will file it. A quick look through known bugs didn't find anything along > these lines. > > _______________________________________________ > 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/20090116/9b16fa14/attachment.html From gissur at loftmyndir.is Fri Jan 16 09:37:12 2009 From: gissur at loftmyndir.is (=?ISO-8859-1?Q?Gissur_=DE=F3rhallsson?=) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Print / Saving Image In-Reply-To: <5b61c6c50810141252x47ce2d7t9b56b1bf427ebcb2@mail.gmail.com> References: <475DCECF.9000000@hostgis.com> <48E3FA29.1030407@hostgis.com> <19785548.post@talk.nabble.com> <48E51F39.2020606@hostgis.com> <19787832.post@talk.nabble.com> <48E5416E.7020804@hostgis.com> <19845049.post@talk.nabble.com> <5b61c6c50810101652v3089ac86xb700c3c1661b38b6@mail.gmail.com> <5b61c6c50810131526k2d68475ej39d856a720495697@mail.gmail.com> <5b61c6c50810141252x47ce2d7t9b56b1bf427ebcb2@mail.gmail.com> Message-ID: <497c70db0901160637k80c9d6ctb76ff681d5ee4549@mail.gmail.com> Hi guys, I've successfully gotten those nice snippets from http://trac.openlayers.org/wiki/Printing working, except that if I pan, it's like the image stays in the same (incorrect) place, but the layers are rendered correctly. I zoom in somewhere and print, and everything is fine: http://geoserver.loftmyndir.is/kortasja/print/TEMP_DIR/01e6825ce67e37ec2cc19a63bc73ed50.jpg then I pan half a screen the east and print again, getting this: http://geoserver.loftmyndir.is/kortasja/print/TEMP_DIR/584d8b8811bdae386a2d01a716eb1102.jpg The view I was looking at when I printed the latter image was nothing like what I printed out. Anybody have any ideas? ps. I also ran into some empty tiles problems in the printing, but I implemented a simple retryx3 on fail mechanism that worked wonders, should I add that to the wiki? Kind regards, Gissur On Tue, Oct 14, 2008 at 7:52 PM, Ian wrote: > Correction for the sake of the list: the tiles were being layered >> correctly, however MapServer background color settings to mimic the ocean >> made it appear otherwise (eg. IMAGECOLOR 60 100 145). The solution was to >> set this background color to transparent: >> >> $transparent = imagecolorallocatealpha($image,60,100,145,127); >> >> Now that this is working I've noticed that for overlays there is a >> consistent SE shift of the data. Has anyone else experienced this? >> > > > Again for the sake of the list: I was setting the "gutter" option on > several layers in OL and that was causing the shift in positions. > > Ian > > _______________________________________________ > 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/20090116/b1cc7825/attachment.html From gsally at touchtown.us Fri Jan 16 09:50:24 2009 From: gsally at touchtown.us (Gene Sally) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Understanding layers and popups Message-ID: Hi, I've been slogging through getting this to work (my map renders on the page now) and I'm having trouble getting my head around how layers and the click/hover callbacks work. The goal is to get a popup working on arbitrary points added to the map. I have a map with an Image baselayer and a Vector layer where the features have been added, like so var newPoint = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point()); var lonlat = map.getLonLatFromPixel(new OpenLayers.Pixel(x,y)); newPoint.geometry.x = lonlat.lon; newPoint.geometry.y = lonlat.lat; targetLayer.drawFeature(newPoint, OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'], {})); So far so good! The points appear in the targetLayer as expected. (But, when I use the zoom control, they don't zoom with the map, but that's another day's problem...) I added a OpenLayers.Control.SelectFeature selectControl = new OpenLayers.Control.SelectFeature( targetLayer, {onSelect: onTargetSelect, onUnselect: onTargetUnselect}); selectControl.activate(); map.addControl(selectControl); When click on a newPoint on the map, the reaction is like I'm selecting the baselayer. What I can't figure out is how to make the targetLayer the active layer, as from reading the mail logs, it appears like the SelectFeature works for the active layer. I've read/reread the sundials.html code (as that's close to the affect I want) and can't figure out what I'm doing wrong. With Regards, gene From yves.moisan at boreal-is.com Fri Jan 16 09:51:31 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> Message-ID: <1232117491.6390.18.camel@dell-desktop.example.com> > But, actually, there are so many people needing that thing that it may > be valuable to have it in trunk. Having a select control and a "highlight" control that just styles features so that you know which one you have info for without actually selecting it plus having an efficient strategy to display a large number of features would be well ... perfect :-). About the last issue, I was thinking this morning that since the rendering is the slow part, why not get all the features in a given viewport and shove them into some grid in a div and render a number of clusters much smaller than the number of features in the viewport (or BBOX). There are a couple of issues with that, like having a small number of clusters represent adequately enough the spatial distribution of a large number of features, but I thought the user could then clik on a row in the grid and the feature would be "highlighted". I would get for example the full set of features in say a GeoJSON object and then shove only a portion of those to a vector layer with or without a cluster strategy so I wouldn't need to use maxfeatures on the vector layer. That way I would have all the objects on the client side. Thinking out loud, without much clue as to how that would operate in code ... Yves From adube at mapgears.com Fri Jan 16 10:23:04 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <1232117491.6390.18.camel@dell-desktop.example.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> Message-ID: <4970A658.2020001@mapgears.com> Yves Moisan wrote: > > Having a select control and a "highlight" control > Control.Highlight : that's the obvious word I was looking for the class name. I haven't thought about it at all (). Thanks Yves, -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Fri Jan 16 10:49:31 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Understanding layers and popups In-Reply-To: References: Message-ID: <4970AC8B.2030003@mapgears.com> Hi Gene, Did you look this example : http://openlayers.org/dev/examples/select-feature-openpopup.html What you're trying to do seems to be displayed there. You should also look at the draw features example : http://openlayers.org/dev/examples/draw-feature.html Also, your vector layer must be on top of all others for this to work. Or, layers on top must not be visible or not inRange. Best of luck, Alexandre Gene Sally wrote: > Hi, > > I've been slogging through getting this to work (my map renders on the page now) and I'm having trouble getting my head around how layers and the click/hover callbacks work. The goal is to get a popup working on arbitrary points added to the map. > > I have a map with an Image baselayer and a Vector layer where the features have been added, like so > > var newPoint = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point()); > var lonlat = map.getLonLatFromPixel(new OpenLayers.Pixel(x,y)); > newPoint.geometry.x = lonlat.lon; > newPoint.geometry.y = lonlat.lat; > targetLayer.drawFeature(newPoint, OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'], {})); > > So far so good! The points appear in the targetLayer as expected. (But, when I use the zoom control, they don't zoom with the map, but that's another day's problem...) > > I added a OpenLayers.Control.SelectFeature > > selectControl = new OpenLayers.Control.SelectFeature( > targetLayer, > {onSelect: onTargetSelect, onUnselect: onTargetUnselect}); > selectControl.activate(); > map.addControl(selectControl); > > When click on a newPoint on the map, the reaction is like I'm selecting the baselayer. What I can't figure out is how to make the targetLayer the active layer, as from reading the mail logs, it appears like the SelectFeature works for the active layer. I've read/reread the sundials.html code (as that's close to the affect I want) and can't figure out what I'm doing wrong. > > With Regards, > gene > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From andy at planetnomad.com Fri Jan 16 10:50:59 2009 From: andy at planetnomad.com (coastalrocket) Date: Wed Sep 1 17:17:04 2010 Subject: [OpenLayers-Users] Antarctic OpenLayers Map Message-ID: <1232121059373-2168857.post@n2.nabble.com> I built an openlayers map of the antarctic i thought i would share with the list. http://www.teamqinetiq.com Team QinetiQ are involved in a race to the South Pole. I was responsible for the mapping. Map base layer came from the usgs via the british antarctic survey. A 2Gb tiff down to a 37 j2k file held on geoserver using oscache. The map shows the team's current position using kml. The team have a gps unit linked to a satellite phone. The position is picked up on our servers and the kml is updated if they've moved from last known position. There's also some nice 3D google earth plugin pages showing the same data. The openlayers map i originally thought was displaying universal polar stereographic coordinates but now i'm not so sure. I think it just might be crazy large lats and longs. Frankly time was pressing and once the data was being displayed correctly the map remained untouched. Some nice perl scripts read in the kml and produce a kml_ups file which is then served up in openlayers. The Google Earth version uses the preprocessed kml file. Gdal as a perl module was used to convert the coordinates. -- View this message in context: http://n2.nabble.com/Antarctic-OpenLayers-Map-tp2168857p2168857.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alexandre.ardhuin at deveryware.com Fri Jan 16 11:26:16 2009 From: alexandre.ardhuin at deveryware.com (Alexandre Ardhuin) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] baseLayer change problem In-Reply-To: <953f000f0901130554r469ef1e6j8e71968d3d2eec6a@mail.gmail.com> References: <953f000f0901130554r469ef1e6j8e71968d3d2eec6a@mail.gmail.com> Message-ID: <953f000f0901160826t357b5624t8e18915b0d7bac4f@mail.gmail.com> Hi, I have a strange behaviour when switching baseLayer in IE. The google layer (the target baselayer) is not really centered : map.getPixelFromLonLat(map. getCenter()) returns (0,0) I can observe the same behaviour in FF (with SpericalMercator example) by stopping the execution of script during some seconds with a breakpoint (in Firebug) on Map.js at the line : this.baseLayer.moveTo(bounds, zoomChanged, dragging); ( in moveTo() ) After resuming, map.getPixelFromLonLat(map.getCenter()) returns (0,0) Moreover, a resize of the window updates the map and resolves this problem... Regards, Alexandre. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090116/3fe3fe2f/attachment.html From pascal.darre at laposte.net Fri Jan 16 11:29:29 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Disable Zoom wheel Message-ID: <1232123369650-2169123.post@n2.nabble.com> Hi, I browse the user list to find how to disable the mouse wheel in the map. I think I find the way to do it but it doesn't work, here is my code: var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false}); map.addControl(movemap); movemap.activate(); thanks for the help -- View this message in context: http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169123.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alexandre.ardhuin at deveryware.com Fri Jan 16 11:32:48 2009 From: alexandre.ardhuin at deveryware.com (Alexandre Ardhuin) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Disable Zoom wheel In-Reply-To: <1232123369650-2169123.post@n2.nabble.com> References: <1232123369650-2169123.post@n2.nabble.com> Message-ID: <953f000f0901160832obf1aa49h9d0b00912a489d63@mail.gmail.com> Hi you can use : navigationControl.disableZoomWheel(); navigationControl.enableZoomWheel(); Alexandre. 2009/1/16 darrepac > > Hi, > > I browse the user list to find how to disable the mouse wheel in the map. > I think I find the way to do it but it doesn't work, here is my code: > > var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': > false}); > > map.addControl(movemap); > movemap.activate(); > > thanks for the help > -- > View this message in context: > http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169123.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/20090116/08552d0e/attachment.html From pascal.darre at laposte.net Fri Jan 16 11:46:00 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Disable Zoom wheel In-Reply-To: <953f000f0901160832obf1aa49h9d0b00912a489d63@mail.gmail.com> References: <1232123369650-2169123.post@n2.nabble.com> <953f000f0901160832obf1aa49h9d0b00912a489d63@mail.gmail.com> Message-ID: <1232124360555-2169239.post@n2.nabble.com> Hi Thanks for your help I did this: var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false}); map.addControl(movemap); movemap.activate(); navigationControl.disableZoomWheel(); and the wheel still work.... :( Alexandre Ardhuin wrote: > > Hi you can use : > > navigationControl.disableZoomWheel(); > navigationControl.enableZoomWheel(); > > Alexandre. > > 2009/1/16 darrepac > >> >> Hi, >> >> I browse the user list to find how to disable the mouse wheel in the map. >> I think I find the way to do it but it doesn't work, here is my code: >> >> var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': >> false}); >> >> map.addControl(movemap); >> movemap.activate(); >> >> thanks for the help >> -- >> View this message in context: >> http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169123.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169239.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alexandre.ardhuin at deveryware.com Fri Jan 16 11:53:17 2009 From: alexandre.ardhuin at deveryware.com (Alexandre Ardhuin) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Disable Zoom wheel In-Reply-To: <1232124360555-2169239.post@n2.nabble.com> References: <1232123369650-2169123.post@n2.nabble.com> <953f000f0901160832obf1aa49h9d0b00912a489d63@mail.gmail.com> <1232124360555-2169239.post@n2.nabble.com> Message-ID: <953f000f0901160853p2aab5d92x22cb2ac6262a7022@mail.gmail.com> Hi, By changing movemap in navigationControl, this should be OK. Alexandre 2009/1/16 darrepac > > Hi > > Thanks for your help > > I did this: > var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': > false}); > > map.addControl(movemap); > movemap.activate(); > movemap.disableZoomWheel(); > > and the wheel still work.... :( > > > > > > Alexandre Ardhuin wrote: > > > > Hi you can use : > > > > navigationControl.disableZoomWheel(); > > navigationControl.enableZoomWheel(); > > > > Alexandre. > > > > 2009/1/16 darrepac > > > >> > >> Hi, > >> > >> I browse the user list to find how to disable the mouse wheel in the > map. > >> I think I find the way to do it but it doesn't work, here is my code: > >> > >> var movemap = new > OpenLayers.Control.Navigation({'zoomWheelEnabled': > >> false}); > >> > >> map.addControl(movemap); > >> movemap.activate(); > >> > >> thanks for the help > >> -- > >> View this message in context: > >> http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169123.html > >> Sent from the OpenLayers Users mailing list archive at Nabble.com. > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > -- > View this message in context: > http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169239.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/20090116/f81ac1d0/attachment.html From crschmidt at metacarta.com Fri Jan 16 12:11:48 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] baseLayer change problem In-Reply-To: <953f000f0901160826t357b5624t8e18915b0d7bac4f@mail.gmail.com> References: <953f000f0901130554r469ef1e6j8e71968d3d2eec6a@mail.gmail.com> <953f000f0901160826t357b5624t8e18915b0d7bac4f@mail.gmail.com> Message-ID: <20090116171148.GA18773@metacarta.com> On Fri, Jan 16, 2009 at 05:26:16PM +0100, Alexandre Ardhuin wrote: > Hi, > > I have a strange behaviour when switching baseLayer in IE. The google layer > (the target baselayer) is not really centered : map.getPixelFromLonLat(map. > getCenter()) returns (0,0) Sounds like: http://trac.openlayers.org/ticket/1550 > I can observe the same behaviour in FF (with SpericalMercator example) by > stopping the execution of script during some seconds with a breakpoint (in > Firebug) on Map.js at the line : > this.baseLayer.moveTo(bounds, zoomChanged, dragging); ( in moveTo() ) > After resuming, map.getPixelFromLonLat(map.getCenter()) returns (0,0) > > Moreover, a resize of the window updates the map and resolves this > problem... > > Regards, > > Alexandre. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From andre.matos at co.sapo.pt Fri Jan 16 12:11:23 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Disable Zoom wheel In-Reply-To: <953f000f0901160853p2aab5d92x22cb2ac6262a7022@mail.gmail.com> References: <1232123369650-2169123.post@n2.nabble.com> <953f000f0901160832obf1aa49h9d0b00912a489d63@mail.gmail.com> <1232124360555-2169239.post@n2.nabble.com> <953f000f0901160853p2aab5d92x22cb2ac6262a7022@mail.gmail.com> Message-ID: Hi, Which controls do you have on your map? How are you initializing the map? That could be happening because there are some controls that are adding a new Navigation control to your map... If is it the only way you have to solve that problem is: controls = map.getControlsByClass('OpenLayers.Control.Navigation'); for(var I = 0; i> Hi Thanks for your help I did this: var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false}); map.addControl(movemap); movemap.activate(); movemap.disableZoomWheel(); and the wheel still work.... :( Alexandre Ardhuin wrote: > > Hi you can use : > > navigationControl.disableZoomWheel(); > navigationControl.enableZoomWheel(); > > Alexandre. > > 2009/1/16 darrepac > > >> >> Hi, >> >> I browse the user list to find how to disable the mouse wheel in the map. >> I think I find the way to do it but it doesn't work, here is my code: >> >> var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': >> false}); >> >> map.addControl(movemap); >> movemap.activate(); >> >> thanks for the help >> -- >> View this message in context: >> http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169123.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169239.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/20090116/6fb42b8d/attachment.html From stuart.jones at jacobs.com Fri Jan 16 12:19:11 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements Message-ID: <1232126351969-2169448.post@n2.nabble.com> Dear all I want to utilise OpenLayers.Layer.MapGuide to show overlay layers in my map. The documentation states that "for untiled overlay layers (singleTile=true and isBaseLayer=false), mapName and session are required parameters for the Layer constructor". Does anyone have any experience of doing this? I can easily create a PHP page that creates a MapGuide session, but is that all there is to it? Any help is greatly appreciated. Thanks Stuart -- View this message in context: http://n2.nabble.com/MapGuide-overlay-session-ID-requirements-tp2169448p2169448.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zer_matt at hotmail.com Fri Jan 16 12:44:19 2009 From: zer_matt at hotmail.com (Zer) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Problems with selectControl after upgrading from OL 2.6 to 2.7 In-Reply-To: <5ec103de0901152104s4888469ch176007db3daa1aac@mail.gmail.com> References: <1232034234893-2163130.post@n2.nabble.com> <5ec103de0901150913p35e63410i7e5e0da0d5ffe0e@mail.gmail.com> <1232052402453-2164779.post@n2.nabble.com> <5ec103de0901152104s4888469ch176007db3daa1aac@mail.gmail.com> Message-ID: <1232127859345-2169612.post@n2.nabble.com> Thanks Eric! The last alternative worked! -Z Eric Lemoine wrote: > > On Thu, Jan 15, 2009 at 9:46 PM, Zer wrote: >> >> Hi! >> >> Thanks! That fixed my first probelem! >> >> But the 'onSelect' still doesn't get called, unless I remove the activate >> function. Any ideas? > > Do not override the activate method, instead register an "activate" > listener: > > var ctrl = new OpenLayers.Control.SelectFeature(layer, { > eventListeners: { > "activate": function() { > alert("control activated"); > } > } > }); > > or (after the control creation): > > ctrl.events.on({ > "activate": function() { > alert("control activated"); > } > }); > > Cheers, > -- > Eric > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Problems-with-OpenLayers.Control.SelectFeature-after-upgrading-from-OL-2.6-to-2.7-tp2163130p2169612.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ks at geograf.dk Fri Jan 16 14:54:04 2009 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <1232126351969-2169448.post@n2.nabble.com> References: <1232126351969-2169448.post@n2.nabble.com> Message-ID: <4970E5DC.3030506@geograf.dk> Yes, that is all there is to it. I think there is a problem with browser cache, but other than that it works right away. Regards, Kenneth Skovhede, GEOGRAF A/S gingerbbm skrev: > Dear all > > I want to utilise OpenLayers.Layer.MapGuide to show overlay layers in my > map. > > The documentation states that "for untiled overlay layers (singleTile=true > and isBaseLayer=false), mapName and session are required parameters for the > Layer constructor". > > Does anyone have any experience of doing this? I can easily create a PHP > page that creates a MapGuide session, but is that all there is to it? > > Any help is greatly appreciated. > > Thanks > Stuart > From ryan.feagin at PEACHTREEGEOGRAPHICS.COM Fri Jan 16 16:12:33 2009 From: ryan.feagin at PEACHTREEGEOGRAPHICS.COM (RFeagin) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] VE base layer tiles are loading when they are not the active base layer Message-ID: <1232140353191-2170662.post@n2.nabble.com> I have an OL map with multiple base layers, two of which are Virtual Earth layers with sphericalMercator = true. I'm trying to have the map show one of my WMS base layers by default. I add the default base layer first and that is what is displayed on the map. But if I watch the tile requests being made on the page's initial load, I see that the VE layers are still being loaded behind my default base map. It does not continue requesting the VE tiles when panning or zooming, only on the intial page load. I have tried setting visibility: false but it doesn't seem to matter. Any suggestions would be much appreciated. -- View this message in context: http://n2.nabble.com/VE-base-layer-tiles-are-loading-when-they-are-not-the-active-base-layer-tp2170662p2170662.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gsally at touchtown.us Fri Jan 16 16:42:54 2009 From: gsally at touchtown.us (Gene Sally) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Understanding layers and popups In-Reply-To: <4970AC8B.2030003@mapgears.com> References: <4970AC8B.2030003@mapgears.com> Message-ID: Alexandre, Thanks for the help! After a bit of fiddling, I'm not plotting my own features on the map and getting the pop-ups to work. I started with the sample code and hacked that up a bit. At this point, I'm still not sure why it's working, but since it is, investigation is much easier. I spent some time understanding the source for OpenLayer.Handler.Point and family; that was very helpful. My complements to the authors (not sure if that's you), OpenLayers is very well thought-out & implemented. Regards, gene -----Original Message----- From: Alexandre Dube [mailto:adube@mapgears.com] Sent: Friday, January 16, 2009 10:50 AM To: Gene Sally Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Understanding layers and popups Hi Gene, Did you look this example : http://openlayers.org/dev/examples/select-feature-openpopup.html What you're trying to do seems to be displayed there. You should also look at the draw features example : http://openlayers.org/dev/examples/draw-feature.html Also, your vector layer must be on top of all others for this to work. Or, layers on top must not be visible or not inRange. Best of luck, Alexandre Gene Sally wrote: > Hi, > > I've been slogging through getting this to work (my map renders on the page now) and I'm having trouble getting my head around how layers and the click/hover callbacks work. The goal is to get a popup working on arbitrary points added to the map. > > I have a map with an Image baselayer and a Vector layer where the features have been added, like so > > var newPoint = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point()); > var lonlat = map.getLonLatFromPixel(new OpenLayers.Pixel(x,y)); > newPoint.geometry.x = lonlat.lon; > newPoint.geometry.y = lonlat.lat; > targetLayer.drawFeature(newPoint, OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'], {})); > > So far so good! The points appear in the targetLayer as expected. (But, when I use the zoom control, they don't zoom with the map, but that's another day's problem...) > > I added a OpenLayers.Control.SelectFeature > > selectControl = new OpenLayers.Control.SelectFeature( > targetLayer, > {onSelect: onTargetSelect, onUnselect: onTargetUnselect}); > selectControl.activate(); > map.addControl(selectControl); > > When click on a newPoint on the map, the reaction is like I'm selecting the baselayer. What I can't figure out is how to make the targetLayer the active layer, as from reading the mail logs, it appears like the SelectFeature works for the active layer. I've read/reread the sundials.html code (as that's close to the affect I want) and can't figure out what I'm doing wrong. > > With Regards, > gene > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090116/f87babe3/attachment.html From zac.spitzer at gmail.com Fri Jan 16 17:29:33 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <4970E5DC.3030506@geograf.dk> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> Message-ID: <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> have a look at http://trac.osgeo.org/mapguide/wiki/CodeSamples/JavaScript/OpenlayersExample Z On Sat, Jan 17, 2009 at 6:54 AM, Kenneth Skovhede, GEOGRAF A/S wrote: > Yes, that is all there is to it. > I think there is a problem with browser cache, but other than that it > works right away. > > Regards, Kenneth Skovhede, GEOGRAF A/S > > > > gingerbbm skrev: >> Dear all >> >> I want to utilise OpenLayers.Layer.MapGuide to show overlay layers in my >> map. >> >> The documentation states that "for untiled overlay layers (singleTile=true >> and isBaseLayer=false), mapName and session are required parameters for the >> Layer constructor". >> >> Does anyone have any experience of doing this? I can easily create a PHP >> page that creates a MapGuide session, but is that all there is to it? >> >> Any help is greatly appreciated. >> >> Thanks >> Stuart >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From ajayr.email at gmail.com Fri Jan 16 20:22:31 2009 From: ajayr.email at gmail.com (Ajay Ravichandran) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] VE base layer tiles are loading when they are not the active base layer In-Reply-To: <1232140353191-2170662.post@n2.nabble.com> References: <1232140353191-2170662.post@n2.nabble.com> Message-ID: <0DD53BE0-1A51-41DC-9BF1-A6F4C9F071A8@gmail.com> Have you tried setting isBaseLayer to false for your VE layer Regards Ajay Ravichandran On Jan 16, 2009, at 3:12 PM, RFeagin wrote: > > > I have an OL map with multiple base layers, two of which are Virtual > Earth > layers with sphericalMercator = true. I'm trying to have the map > show one > of my WMS base layers by default. I add the default base layer > first and > that is what is displayed on the map. But if I watch the tile > requests being > made on the page's initial load, I see that the VE layers are still > being > loaded behind my default base map. It does not continue requesting > the VE > tiles when panning or zooming, only on the intial page load. I have > tried > setting visibility: false but it doesn't seem to matter. > > Any suggestions would be much appreciated. > -- > View this message in context: http://n2.nabble.com/VE-base-layer-tiles-are-loading-when-they-are-not-the-active-base-layer-tp2170662p2170662.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 stuart.jones at jacobs.com Fri Jan 16 21:21:29 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> Message-ID: <1232158889629-2171721.post@n2.nabble.com> Brilliant. Thanks chaps :) The question now becomes: is there any preference between using OpenLayers.Layer.MapGuide and OpenLayers.Layer.WMS (which I've been using up until now)? The WMS is simpler to implement (no session ID required). Furthermore there's this warning from the MapGuide class's API documentation: "NOTE: untiled overlay layers issues a synchronous AJAX request before the image request can be issued so the users browser may lock up if the MG Web tier does not respond in a timely fashion." If the WMS call isn't synchronous (is it?), then there appears to be two good reasons to use it instead of the MapGuide class. Thoughts? -- View this message in context: http://n2.nabble.com/MapGuide-overlay-session-ID-requirements-tp2169448p2171721.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ashore3 at verizon.net Fri Jan 16 23:54:05 2009 From: ashore3 at verizon.net (Arnie Shore) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Generate Numbered Icons on the Fly In-Reply-To: <1232121059373-2168857.post@n2.nabble.com> References: <1232121059373-2168857.post@n2.nabble.com> Message-ID: <4971646D.9040001@verizon.net> Folks, for those of you working in PHP-land and can use numbered icons, the attached script may be of interest. I'm using this for a GMaps-based (for now) Open Source dispatch system that uses numbered icons rather extensively. Until recently, I've packaged the script with 400+ numbered and colored icons to accommodate busier sites. While that's worked, it's admittedly rather clumsy and really bloats the installation zipfile. The attached script generates numbered - or lettered - icons on the fly. It assumes eight colors and the usual teardrop shapes. It ain't hugely complex - to say the least - but mebbe useful, although you'll need some PHP chops to adapt it to yr own use. (See the application at http://www.saefern.org/tickets/ - guest login available.) Arnie Shore Annapolis, MD -------------- next part -------------- A non-text attachment was scrubbed... Name: gen_icon.php Type: application/x-php Size: 1331 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090116/9385d5a3/gen_icon.bin From zac.spitzer at gmail.com Sat Jan 17 03:06:18 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <1232158889629-2171721.post@n2.nabble.com> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> Message-ID: <7a85053e0901170006h2033b595y7c99fa34552522db@mail.gmail.com> depending on what your doing! wms ain't cached by mapguide whch s fine if your doing dynamic maps, but if you need to serve more than a few users, your gonna hit performance issues.... I remember that Mr adair has patches in place for addressing some of that, have a look at the OL trac the session id stuff is only required for dynamic maps... which is useful when your doing funky stuff with the map, of course when your not, it's a big old pain in the butt, catch-22 yosarian.... there's quite a case for a review of mapguide to make it more openlayers friendly, z On Sat, Jan 17, 2009 at 1:21 PM, gingerbbm wrote: > > Brilliant. Thanks chaps :) > > The question now becomes: is there any preference between using > OpenLayers.Layer.MapGuide and OpenLayers.Layer.WMS (which I've been using up > until now)? The WMS is simpler to implement (no session ID required). > Furthermore there's this warning from the MapGuide class's API > documentation: > > "NOTE: untiled overlay layers issues a synchronous AJAX request before the > image request can be issued so the users browser may lock up if the MG Web > tier does not respond in a timely fashion." > > If the WMS call isn't synchronous (is it?), then there appears to be two > good reasons to use it instead of the MapGuide class. > > Thoughts? > -- > View this message in context: http://n2.nabble.com/MapGuide-overlay-session-ID-requirements-tp2169448p2171721.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From ks at geograf.dk Sat Jan 17 06:53:32 2009 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <7a85053e0901170006h2033b595y7c99fa34552522db@mail.gmail.com> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> <7a85053e0901170006h2033b595y7c99fa34552522db@mail.gmail.com> Message-ID: <4971C6BC.6080401@geograf.dk> As Zac notes, it depends on what you want. If you want to use MapGuide tiles, turn layers on/off, use selection, etc. you should use the MapGuide variant. The MapGuide variant is also usable, without exposing the individual layers as WMS, so a map setup is easier to make and maintain. The synchronous call is not made with WMS. A fix is done for MapGuide to remove this requirement, which means that MapGuide 2.1 won't have this problem. I have used the MapGuide layer in OL for quite some time, and I have never had trouble with the call. Regard,. Kenneth Skovhede, GEOGRAF A/S Zac Spitzer skrev: > depending on what your doing! > > wms ain't cached by mapguide whch s fine if your doing dynamic maps, > but if you need > to serve more than a few users, your gonna hit performance issues.... > > I remember that Mr adair has patches in place for addressing some of that, have > a look at the OL trac > > the session id stuff is only required for dynamic maps... which is > useful when your > doing funky stuff with the map, of course when your not, it's a big > old pain in the butt, > catch-22 yosarian.... > > there's quite a case for a review of mapguide to make it more > openlayers friendly, > > z > > On Sat, Jan 17, 2009 at 1:21 PM, gingerbbm wrote: > >> Brilliant. Thanks chaps :) >> >> The question now becomes: is there any preference between using >> OpenLayers.Layer.MapGuide and OpenLayers.Layer.WMS (which I've been using up >> until now)? The WMS is simpler to implement (no session ID required). >> Furthermore there's this warning from the MapGuide class's API >> documentation: >> >> "NOTE: untiled overlay layers issues a synchronous AJAX request before the >> image request can be issued so the users browser may lock up if the MG Web >> tier does not respond in a timely fashion." >> >> If the WMS call isn't synchronous (is it?), then there appears to be two >> good reasons to use it instead of the MapGuide class. >> >> Thoughts? >> -- >> View this message in context: http://n2.nabble.com/MapGuide-overlay-session-ID-requirements-tp2169448p2171721.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/20090117/74954bb6/attachment.html From stuart.jones at jacobs.com Sat Jan 17 07:01:37 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <7a85053e0901170006h2033b595y7c99fa34552522db@mail.gmail.com> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> <7a85053e0901170006h2033b595y7c99fa34552522db@mail.gmail.com> Message-ID: <1232193697580-2172812.post@n2.nabble.com> In a rudimentary test I set up OpenLayers with a WMS layer and a MapGuide layer pointing to the same map on the MapGuide server that returns points from an Oracle database, and the MapGuide layer loads noticeably faster. If the MapGuide server caches this data too then that's even better. I have another map on the server that's built from WFS layers from a remote location. Using the OpenLayers WMS layer class to access these puts a real strain on the MapGuide server and in fact we get all sorts of memory problems. If I use the MapGuide layer class to access these, will MapGuide cache them? I suppose ideally we should access the remote WFS layers directly from OpenLayers, but that's not possible for security reasons. -- View this message in context: http://n2.nabble.com/MapGuide-overlay-session-ID-requirements-tp2169448p2172812.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zac.spitzer at gmail.com Sat Jan 17 10:23:17 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <1232193697580-2172812.post@n2.nabble.com> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> <7a85053e0901170006h2033b595y7c99fa34552522db@mail.gmail.com> <1232193697580-2172812.post@n2.nabble.com> Message-ID: <7a85053e0901170723k6828848he10538b2dd23d4d7@mail.gmail.com> if it's tiled it's cached, if it's dynamic with a session the config is cached so it's faster... wms in mg is more 'stateless' i think so there's more overhead... as mg needs to load everything each time per wms tile z On Sat, Jan 17, 2009 at 11:01 PM, gingerbbm wrote: > > In a rudimentary test I set up OpenLayers with a WMS layer and a MapGuide > layer pointing to the same map on the MapGuide server that returns points > from an Oracle database, and the MapGuide layer loads noticeably faster. If > the MapGuide server caches this data too then that's even better. > > I have another map on the server that's built from WFS layers from a remote > location. Using the OpenLayers WMS layer class to access these puts a real > strain on the MapGuide server and in fact we get all sorts of memory > problems. If I use the MapGuide layer class to access these, will MapGuide > cache them? > > I suppose ideally we should access the remote WFS layers directly from > OpenLayers, but that's not possible for security reasons. > -- > View this message in context: http://n2.nabble.com/MapGuide-overlay-session-ID-requirements-tp2169448p2172812.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From mc.prins at gmail.com Sat Jan 17 12:30:07 2009 From: mc.prins at gmail.com (Mark Prins) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] how to set up proxy host? In-Reply-To: <496E45A2.60504@opengeo.org> References: <552b56070901140639o12707387ic8c4552d173c0452@mail.gmail.com> <496E45A2.60504@opengeo.org> Message-ID: since they are on the same host you're best off using the mod_jk/ajp connector (see http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html) that way you don't need proxy for apache httpd will handel all requests From abuki at argo.in Sun Jan 18 06:04:12 2009 From: abuki at argo.in (Abuki) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Request data from static source Message-ID: <1232276652783-2176676.post@n2.nabble.com> Hello all, I was trying to solve my problem by posting on dev list, maybe I?m stupid but I still don?t find solution. Let me generalize it: 1) I?m not skilled in OpenLayers and the only server-side language I can use is PHP, so I want my application to be as much as possible browser-side. 2) Is there any possibility to re-load/request data from static source (KML/GML/XML.. or some other format) with no server-side action? I want to have static source (file) with many (thousand) vectors data (images will be wonderful too). And I want browser to view just the visible vectors and when I browse map the browser (client-side) will request additional visible vector features and draw it to map. Becaouse when I load the whole file bigger which is bigger than 500kb, browser is getting very slow. I dont need to have my data stored in some database/server, I can generate them just once for a long time and I?m finding installing some server-side services too hard to do for me. Is somethink like that possible, or will it be? I think that for less-skilled user like me, it would be great. 3) If it is possible, can someone of you post an example how to do it, this would be really great, becaouse I?m afraid, that I won?t understand it? Or at least description how to do it? My previous thread is there (the same question, but not so general): http://n2.nabble.com/Game-development-problem---speed-with-lot-of-objects-td2129189.html http://n2.nabble.com/Game-development-problem---speed-with-lot-of-objects-td2129189.html Thank you all very much Abuki -- View this message in context: http://n2.nabble.com/Request-data-from-static-source-tp2176676p2176676.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Sun Jan 18 06:28:18 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Request data from static source In-Reply-To: <1232276652783-2176676.post@n2.nabble.com> References: <1232276652783-2176676.post@n2.nabble.com> Message-ID: Hi Abuki, On Sun, Jan 18, 2009 at 12:04 PM, Abuki wrote: > > Hello all, > > I was trying to solve my problem by posting on dev list, maybe I?m stupid > but I still don?t find solution. > Let me generalize it: > > 1) I?m not skilled in OpenLayers and the only server-side language I can use > is PHP, so I want my application to be as much as possible browser-side. > > 2) Is there any possibility to re-load/request data from static source > (KML/GML/XML.. or some other format) with no server-side action? > I want to have static source (file) with many (thousand) vectors data > (images will be wonderful too). And I want browser to view just the visible > vectors and when I browse map the browser (client-side) will request > additional visible vector features and draw it to map. > Becaouse when I load the whole file bigger which is bigger than 500kb, > browser is getting very slow. > OL achieves this trough its Strategies, like BBOX strategy http://openlayers.org/dev/examples/strategy-bbox.html > I dont need to have my data stored in some database/server, I can generate > them just once for a long time and I?m finding installing some server-side > services too hard to do for me. > > Is somethink like that possible, or will it be? I think that for > less-skilled user like me, it would be great. > I think that strategy doesnt work if ur vector layer gets data from some GML file, it has to fetch it from some WFS server (correct me if im worng) Its not hard to make one, take a look at geoserver.org. You dont have to put date in database if u dont want, you can put it in one shape file, its easy try it. Hope it helps, Ivan > 3) If it is possible, can someone of you post an example how to do it, this > would be really great, becaouse I?m afraid, that I won?t understand it? Or > at least description how to do it? > > My previous thread is there (the same question, but not so general): > http://n2.nabble.com/Game-development-problem---speed-with-lot-of-objects-td2129189.html > http://n2.nabble.com/Game-development-problem---speed-with-lot-of-objects-td2129189.html > > Thank you all very much > > Abuki > > -- > View this message in context: http://n2.nabble.com/Request-data-from-static-source-tp2176676p2176676.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 abuki at argo.in Sun Jan 18 08:17:47 2009 From: abuki at argo.in (Abuki) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Request data from static source In-Reply-To: References: <1232276652783-2176676.post@n2.nabble.com> Message-ID: <1232284667090-2176983.post@n2.nabble.com> Yes, that can work, but as I said in the previous thread - I dont have my own server. I just want to build my own browser game (no big project). I have web hosting, but there is no GeoServer installed.. 1) Once more - is there any possibility to request it from file by browser? I assume no. If yes, can you please post an example? 2) Are there any web hosting servers, that have GeoServer installed, so I can use it remotely? Thank you very much Ivan Grcic-2 wrote: > > Hi Abuki, > > > > On Sun, Jan 18, 2009 at 12:04 PM, Abuki wrote: >> >> Hello all, >> >> I was trying to solve my problem by posting on dev list, maybe I?m stupid >> but I still don?t find solution. >> Let me generalize it: >> >> 1) I?m not skilled in OpenLayers and the only server-side language I can >> use >> is PHP, so I want my application to be as much as possible browser-side. >> >> 2) Is there any possibility to re-load/request data from static source >> (KML/GML/XML.. or some other format) with no server-side action? >> I want to have static source (file) with many (thousand) vectors data >> (images will be wonderful too). And I want browser to view just the >> visible >> vectors and when I browse map the browser (client-side) will request >> additional visible vector features and draw it to map. >> Becaouse when I load the whole file bigger which is bigger than 500kb, >> browser is getting very slow. >> > OL achieves this trough its Strategies, like BBOX strategy > http://openlayers.org/dev/examples/strategy-bbox.html > >> I dont need to have my data stored in some database/server, I can >> generate >> them just once for a long time and I?m finding installing some >> server-side >> services too hard to do for me. >> >> Is somethink like that possible, or will it be? I think that for >> less-skilled user like me, it would be great. >> > I think that strategy doesnt work if ur vector layer gets data from > some GML file, it has to fetch it from some WFS server (correct me if > im worng) > Its not hard to make one, take a look at geoserver.org. > You dont have to put date in database if u dont want, you can put it > in one shape file, its easy try it. > > Hope it helps, > Ivan >> 3) If it is possible, can someone of you post an example how to do it, >> this >> would be really great, becaouse I?m afraid, that I won?t understand it? >> Or >> at least description how to do it? >> >> My previous thread is there (the same question, but not so general): >> http://n2.nabble.com/Game-development-problem---speed-with-lot-of-objects-td2129189.html >> http://n2.nabble.com/Game-development-problem---speed-with-lot-of-objects-td2129189.html >> >> Thank you all very much >> >> Abuki >> >> -- >> View this message in context: >> http://n2.nabble.com/Request-data-from-static-source-tp2176676p2176676.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Request-data-from-static-source-tp2176676p2176983.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From George at muammar.net Sun Jan 18 12:04:58 2009 From: George at muammar.net (George Mu'ammar) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] FW: Overview Map Problems In-Reply-To: <032801c97501$3d78e500$b86aaf00$@com.au> References: <032801c97501$3d78e500$b86aaf00$@com.au> Message-ID: <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> Brad, this is a documented problem. We are all waiting for the next release of OL for the fix. If anybody has any workaround please shout out!!! -- George Mu'ammar Quoting Brad Spencer : > List, > > > > I have had no response to this so thought I would try once more. > > > > This is weird because it seems to generate a drag box in the overview window > with EPSG:4326 but the box is not dragable in EPSG:900913. > > > > However, in both cases there is no GoogleMap base which should be there > according to the examples and doco. > > > > Help appreciated. > > > > Cheers, Brad.. > > > > > > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On > Behalf Of Brad Spencer > Sent: Monday, January 12, 2009 11:58 AM > To: openlayers users > Subject: [OpenLayers-Users] Overview Map Problems > > > > List, > > > > I am unable to make overview map control work in OL - no map inside. I must > be doing something wrong. > > > > Can someone have a look at these two test links to help me please. > > > > http://demos.numaps.com.au/overview_4326.html > > http://demos.numaps.com.au/overview_900913.html > > > > Cheers, Brad.. > > > > From pascal.darre at laposte.net Sun Jan 18 15:10:13 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Disable Zoom wheel In-Reply-To: <953f000f0901160853p2aab5d92x22cb2ac6262a7022@mail.gmail.com> References: <1232123369650-2169123.post@n2.nabble.com> <953f000f0901160832obf1aa49h9d0b00912a489d63@mail.gmail.com> <1232124360555-2169239.post@n2.nabble.com> <953f000f0901160853p2aab5d92x22cb2ac6262a7022@mail.gmail.com> Message-ID: <1232309413969-2178395.post@n2.nabble.com> Oups...did it but do not work better: var movemap = new OpenLayers.Control.Navigation(); map.addControl(movemap); movemap.activate(); movemap.disableZoomWheel(); Alexandre Ardhuin wrote: > > Hi, > > By changing movemap in navigationControl, this should be OK. > > Alexandre > > > 2009/1/16 darrepac > >> >> Hi >> >> Thanks for your help >> >> I did this: >> var movemap = new >> OpenLayers.Control.Navigation({'zoomWheelEnabled': >> false}); >> >> map.addControl(movemap); >> movemap.activate(); >> movemap.disableZoomWheel(); >> >> and the wheel still work.... :( >> >> >> >> >> >> Alexandre Ardhuin wrote: >> > >> > Hi you can use : >> > >> > navigationControl.disableZoomWheel(); >> > navigationControl.enableZoomWheel(); >> > >> > Alexandre. >> > >> > 2009/1/16 darrepac >> > >> >> >> >> Hi, >> >> >> >> I browse the user list to find how to disable the mouse wheel in the >> map. >> >> I think I find the way to do it but it doesn't work, here is my code: >> >> >> >> var movemap = new >> OpenLayers.Control.Navigation({'zoomWheelEnabled': >> >> false}); >> >> >> >> map.addControl(movemap); >> >> movemap.activate(); >> >> >> >> thanks for the help >> >> -- >> >> View this message in context: >> >> http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169123.html >> >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> >> >> _______________________________________________ >> >> Users mailing list >> >> Users@openlayers.org >> >> http://openlayers.org/mailman/listinfo/users >> >> >> > >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> > >> >> -- >> View this message in context: >> http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169239.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2178395.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pascal.darre at laposte.net Sun Jan 18 15:13:11 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Disable Zoom wheel In-Reply-To: References: <1232123369650-2169123.post@n2.nabble.com> <953f000f0901160832obf1aa49h9d0b00912a489d63@mail.gmail.com> <1232124360555-2169239.post@n2.nabble.com> <953f000f0901160853p2aab5d92x22cb2ac6262a7022@mail.gmail.com> Message-ID: <1232309591150-2178414.post@n2.nabble.com> You got it Andre! I had a : map.addControl(new OpenLayers.Control.MouseDefaults()); above which was putting trouble. Re?oving it and adding the command given by Alexandre make things works! Thanks to both of you Andre Pereira de Matos wrote: > > Hi, > > Which controls do you have on your map? > How are you initializing the map? > > That could be happening because there are some controls that are adding a > new Navigation control to your map... > > If is it the only way you have to solve that problem is: > > controls = map.getControlsByClass('OpenLayers.Control.Navigation'); > for(var I = 0; i controls.disableZoomWheel(); > > Regards, > Andr? Matos > http://maps.sapo.pt > > > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Alexandre Ardhuin > Sent: sexta-feira, 16 de Janeiro de 2009 16:53 > To: darrepac > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] Disable Zoom wheel > > Hi, > > By changing movemap in navigationControl, this should be OK. > > Alexandre > > 2009/1/16 darrepac > > > > Hi > > Thanks for your help > > I did this: > var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled': > false}); > > map.addControl(movemap); > movemap.activate(); > movemap.disableZoomWheel(); > > and the wheel still work.... :( > > > > > > Alexandre Ardhuin wrote: >> >> Hi you can use : >> >> navigationControl.disableZoomWheel(); >> navigationControl.enableZoomWheel(); >> >> Alexandre. >> >> 2009/1/16 darrepac >> > >> >>> >>> Hi, >>> >>> I browse the user list to find how to disable the mouse wheel in the >>> map. >>> I think I find the way to do it but it doesn't work, here is my code: >>> >>> var movemap = new >>> OpenLayers.Control.Navigation({'zoomWheelEnabled': >>> false}); >>> >>> map.addControl(movemap); >>> movemap.activate(); >>> >>> thanks for the help >>> -- >>> View this message in context: >>> http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169123.html >>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > -- > View this message in context: > http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169239.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2178414.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From brad at cubewerx.com.au Sun Jan 18 15:40:44 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] FW: Overview Map Problems In-Reply-To: <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> References: <032801c97501$3d78e500$b86aaf00$@com.au> <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> Message-ID: <00e701c979ad$0a310e60$1e932b20$@com.au> George, OK that make sense to me. I also look forward to a fix. I think they should seriously look at trying to emulate GoogleMap here. Anyway, the best that I could do is the following with both ESPG:900913 and ESPG:4326 and both using OL base map instead of inheriting the GoogleMap base map! http://demos.numaps.com.au/overview_900913_ol.html http://demos.numaps.com.au/overview_4326_ol.html Cheers, Brad.. -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of George Mu'ammar Sent: Monday, January 19, 2009 4:05 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] FW: Overview Map Problems Brad, this is a documented problem. We are all waiting for the next release of OL for the fix. If anybody has any workaround please shout out!!! -- George Mu'ammar Quoting Brad Spencer : > List, > > > > I have had no response to this so thought I would try once more. > > > > This is weird because it seems to generate a drag box in the overview window > with EPSG:4326 but the box is not dragable in EPSG:900913. > > > > However, in both cases there is no GoogleMap base which should be there > according to the examples and doco. > > > > Help appreciated. > > > > Cheers, Brad.. > > > > > > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On > Behalf Of Brad Spencer > Sent: Monday, January 12, 2009 11:58 AM > To: openlayers users > Subject: [OpenLayers-Users] Overview Map Problems > > > > List, > > > > I am unable to make overview map control work in OL - no map inside. I must > be doing something wrong. > > > > Can someone have a look at these two test links to help me please. > > > > http://demos.numaps.com.au/overview_4326.html > > http://demos.numaps.com.au/overview_900913.html > > > > Cheers, Brad.. > > > > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Sun Jan 18 15:48:40 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] FW: Overview Map Problems In-Reply-To: <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> References: <032801c97501$3d78e500$b86aaf00$@com.au> <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> Message-ID: <20090118204840.GB1745@metacarta.com> On Sun, Jan 18, 2009 at 06:04:58PM +0100, George Mu'ammar wrote: > Brad, this is a documented problem. We are all waiting for the next > release of OL for the fix. > If anybody has any workaround please shout out!!! Is there some expectation that the next version of OpenLayers will fix the problem? I'm not aware of anyone working to fix this. Regards, -- Christopher Schmidt MetaCarta From pascal.darre at laposte.net Sun Jan 18 16:29:02 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> Message-ID: <1232314142183-2178707.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > You could use z-indexing on the layer. See > http://www.openlayers.org/dev/examples/ordering.html for an example. > > You would probably have to sort your features by size, and create > ascending z-indices with descending size. This would ensure that > smaller rectangles will be drawn on top of larger ones. > > Regards, > Andreas. > Sounds to me good, I want to give it a try. Can you tell me what should be the default z indice of my Geojson features? thanks -- View this message in context: http://n2.nabble.com/FEatures-orders-tp2167927p2178707.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From brad at cubewerx.com.au Sun Jan 18 16:38:51 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] FW: Overview Map Problems In-Reply-To: <20090118204840.GB1745@metacarta.com> References: <032801c97501$3d78e500$b86aaf00$@com.au> <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> <20090118204840.GB1745@metacarta.com> Message-ID: <00ee01c979b5$287e5820$797b0860$@com.au> Chris, How does this get into the schedule? Cheers, Brad.... -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Christopher Schmidt Sent: Monday, January 19, 2009 7:49 AM To: George Mu'ammar Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] FW: Overview Map Problems On Sun, Jan 18, 2009 at 06:04:58PM +0100, George Mu'ammar wrote: > Brad, this is a documented problem. We are all waiting for the next > release of OL for the fix. > If anybody has any workaround please shout out!!! Is there some expectation that the next version of OpenLayers will fix the problem? I'm not aware of anyone working to fix this. Regards, -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Sun Jan 18 18:07:14 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] FW: Overview Map Problems In-Reply-To: <00ee01c979b5$287e5820$797b0860$@com.au> References: <032801c97501$3d78e500$b86aaf00$@com.au> <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> <20090118204840.GB1745@metacarta.com> <00ee01c979b5$287e5820$797b0860$@com.au> Message-ID: <20090118230714.GC1745@metacarta.com> On Mon, Jan 19, 2009 at 08:38:51AM +1100, Brad Spencer wrote: > Chris, > > How does this get into the schedule? Somebody writes a patch. We don't generally block releases on bugs that aren't being worked on (or funded, potentially, though I don't thik we've had that come up yet, so no promises). Regards, -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Mon Jan 19 01:53:12 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <4970A658.2020001@mapgears.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> Message-ID: <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> Hi As I see it: The HighlightFeature control is configured with a renderIntent. When a feature is hovered or clicked, the control triggers a "beforefeaturehighlighted" event, redraws the feature (using the renderIntent), and trigger "featurehighlighted". What do you think? PS: I have to say that I haven't looked at Andreas' control yet. Will do. Thanks, Eric 2009/1/16, Alexandre Dube : > Yves Moisan wrote: >> >> Having a select control and a "highlight" control >> > > Control.Highlight : that's the obvious word I was looking for the class > name. I haven't thought about it at all (). > > Thanks Yves, > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > From jatin.a at iworktech.com Mon Jan 19 07:52:53 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] DrawFeature control not working properly Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090119/a267415f/polygons.html From jatin.a at iworktech.com Mon Jan 19 07:59:41 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] DrawFeature control not working properly Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: polygons.zip Type: application/zip Size: 1654 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090119/9780c294/polygons.zip From adube at mapgears.com Mon Jan 19 08:34:40 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> Message-ID: <49748170.3040907@mapgears.com> Hi Eric, I don't think we should use a renderIntent value. The main idea of the Highlight feature is to change the style of a feature only when the mouse is hover it and only that. If we change the renderIntent of a feature, when the mouse is no longer hover it, to what renderIntent we set it ? If it was "select", how do we know ? We would need to keep track of the previous renderIntent on hover. Also, I don't see the point of "highlighting" a feature on click. The same idea goes for the fact that I don't see the point of selecting a feature on hover having HighlightFeature I can use. When you select a feature, you want to interact with it : modify, delete, display a popup that stays on screen while the feature is selected, etc. When hover, you it's only temporary. We should not remove the hover option for selecting features, but having the aboves ideas in mind I would not use a renderIntent. What do you think ? Alexandre Eric Lemoine wrote: > Hi > > As I see it: > > The HighlightFeature control is configured with a renderIntent. When a > feature is hovered or clicked, the control triggers a > "beforefeaturehighlighted" event, redraws the feature (using the > renderIntent), and trigger "featurehighlighted". > > What do you think? > > PS: I have to say that I haven't looked at Andreas' control yet. Will do. > > Thanks, > > Eric > > 2009/1/16, Alexandre Dube : > >> Yves Moisan wrote: >> >>> Having a select control and a "highlight" control >>> >>> >> Control.Highlight : that's the obvious word I was looking for the class >> name. I haven't thought about it at all (). >> >> Thanks Yves, >> >> -- >> Alexandre Dub? >> Mapgears >> www.mapgears.com >> >> >> -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Mon Jan 19 08:43:19 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <496F5EA9.2050203@mapgears.com> References: <496F5EA9.2050203@mapgears.com> Message-ID: <49748377.6040906@mapgears.com> Hi list, I changed the name of this control for HighlightFeature ( thanks to Yves ). See the changes below : Alexandre Dube wrote: > Hi list, > > I just want to share a sample of Handler.Hover usage I do. The result > is a Control.Hover I use to change the style of features hover the mouse > without selecting them and display a popup at the same time. You could > also register events on "hoverfeatureset" and "hoverfeaturereset" to do > more stuff if you want. > > See the example : > > http://dev.openlayers.org/sandbox/adube/openlayers/examples/hover-control.html > http://dev.openlayers.org/sandbox/adube/openlayers/examples/highlight-feature.html See an other example of this control with the OptionByZoom strategy : http://dev4.mapgears.com/bdga/options-by-zoom-and-highlight-bdga.html > See the code : > > http://dev.openlayers.org/sandbox/adube/openlayers/lib/OpenLayers/Control/Hover.js > http://dev.openlayers.org/sandbox/adube/openlayers/lib/OpenLayers/Control/HighlightFeature.js > At first I wanted it to be a new OpenLayers feature, but then I > thought that Handlers were created for the purpose of customizing our > own controls depending of what our needs are. So this Hover control is > one of many possible usage of Handlers, so IMHO it's not useful to make > it a new feature. Sharing it is enough. > > Comments are welcomed, > > -- Alexandre Dub? Mapgears www.mapgears.com From eric.c2c at gmail.com Mon Jan 19 08:53:28 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <49748170.3040907@mapgears.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> Message-ID: <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> On Mon, Jan 19, 2009 at 2:34 PM, Alexandre Dube wrote: > Hi Eric, Hi Alexandre, > > I don't think we should use a renderIntent value. The main idea of the > Highlight feature is to change the style of a feature only when the mouse is > hover it and only that. I meant that when the feature is clicked or hovered it is redrawn using the render intent configured in the control: layer.drawFeature(feature, this.renderIntent); > If we change the renderIntent of a feature, when > the mouse is no longer hover it, to what renderIntent we set it ? If it was > "select", how do we know ? We would need to keep track of the previous > renderIntent on hover. I'm suggesting to change the feature's render intent. > > Also, I don't see the point of "highlighting" a feature on click. The same > idea goes for the fact that I don't see the point of selecting a feature on > hover having HighlightFeature I can use. When you select a feature, you > want to interact with it : modify, delete, display a popup that stays on > screen while the feature is selected, etc. When hover, you it's only > temporary. With the select feature control one can choose whether to use "hover" or "click". Why not applying this to the highlight feature control? Regards, -- Eric From eric.c2c at gmail.com Mon Jan 19 08:54:48 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> Message-ID: <5ec103de0901190554w7f03f8ev626701734c450f4a@mail.gmail.com> On Mon, Jan 19, 2009 at 2:53 PM, Eric Lemoine wrote: > On Mon, Jan 19, 2009 at 2:34 PM, Alexandre Dube wrote: >> Hi Eric, > > Hi Alexandre, > >> >> I don't think we should use a renderIntent value. The main idea of the >> Highlight feature is to change the style of a feature only when the mouse is >> hover it and only that. > > I meant that when the feature is clicked or hovered it is redrawn > using the render intent configured in the control: > > layer.drawFeature(feature, this.renderIntent); > >> If we change the renderIntent of a feature, when >> the mouse is no longer hover it, to what renderIntent we set it ? If it was >> "select", how do we know ? We would need to keep track of the previous >> renderIntent on hover. > > I'm suggesting to change the feature's render intent. Sorry, the above should read: "I'm not suggesting to change the feature's render intent". -- Eric From adube at mapgears.com Mon Jan 19 09:30:46 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> Message-ID: <49748E96.5020506@mapgears.com> Hi Eric, I took a look at the SelectFeature control. Now I understand what you meant and it makes sense. Also, it's also making sense to have this control have the possibility to highlight on hover or on click. "beforefeaturehighlighted" and "featurehighlighted" events make sense, but a "featureunhighlighted" (or some other term meaning that the feature was highlighted and is now no more) would also be useful. Alexandre Eric Lemoine wrote: > On Mon, Jan 19, 2009 at 2:34 PM, Alexandre Dube wrote: > >> Hi Eric, >> > > Hi Alexandre, > > >> I don't think we should use a renderIntent value. The main idea of the >> Highlight feature is to change the style of a feature only when the mouse is >> hover it and only that. >> > > I meant that when the feature is clicked or hovered it is redrawn > using the render intent configured in the control: > > layer.drawFeature(feature, this.renderIntent); > > >> If we change the renderIntent of a feature, when >> the mouse is no longer hover it, to what renderIntent we set it ? If it was >> "select", how do we know ? We would need to keep track of the previous >> renderIntent on hover. >> > > I'm suggesting to change the feature's render intent. > > >> Also, I don't see the point of "highlighting" a feature on click. The same >> idea goes for the fact that I don't see the point of selecting a feature on >> hover having HighlightFeature I can use. When you select a feature, you >> want to interact with it : modify, delete, display a popup that stays on >> screen while the feature is selected, etc. When hover, you it's only >> temporary. >> > > With the select feature control one can choose whether to use "hover" > or "click". Why not applying this to the highlight feature control? > > > Regards, > > -- > Eric > -- Alexandre Dub? Mapgears www.mapgears.com From mhjeong74 at gmail.com Mon Jan 19 09:35:04 2009 From: mhjeong74 at gmail.com (Myeong Hun Jeong) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] How to add ZoomOut in NavToolbar control? Message-ID: <6aaec8200901190635n27e14788wb5a07c8af314a249@mail.gmail.com> Dear list. I am a beginner at OpenLayers. I want to add ZoomOut Function in NavToolbar control. First of all, I load NavToolbar map.addControl( new OpenLayers.Control.NavToolbar() ); After loading it, I can see pan and zoomin tools in the control. Next, how to add zoomout tool in the NavToolbar. The function of zoomout is in ZoomBox.js. so, how to activate the fucnion? As I know, I should chnage out porperty in ZoomBox.js from false to true. but, I don't know how to change the property? Best regards, Jeong. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090119/a5d363ae/attachment.html From madair at dmsolutions.ca Mon Jan 19 10:10:34 2009 From: madair at dmsolutions.ca (Mike Adair) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <1232158889629-2171721.post@n2.nabble.com> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> Message-ID: <497497EA.4020006@dmsolutions.ca> I'm not sure of the performance differences between between WMS and the MapGuide layer, but there is a patch available for the OL MapGuide layer that removes the asynchronous behaviour in the MapGuide Layer. See: http://trac.openlayers.org/ticket/1756. This is currently marked for review in the OL Trac system. I'm not positive about the MGOS version numbers but I believe this works with MGOS2.0.2? Mike gingerbbm wrote: > Brilliant. Thanks chaps :) > > The question now becomes: is there any preference between using > OpenLayers.Layer.MapGuide and OpenLayers.Layer.WMS (which I've been using up > until now)? The WMS is simpler to implement (no session ID required). > Furthermore there's this warning from the MapGuide class's API > documentation: > > "NOTE: untiled overlay layers issues a synchronous AJAX request before the > image request can be issued so the users browser may lock up if the MG Web > tier does not respond in a timely fashion." > > If the WMS call isn't synchronous (is it?), then there appears to be two > good reasons to use it instead of the MapGuide class. > > Thoughts? > -- Michael Adair Senior Software Architect DM Solutions Group Inc. Office: (613) 565-5056 x26 madair@dmsolutions.ca http://www.dmsolutions.ca http://research.dmsolutions.ca From inspdr00 at gmail.com Mon Jan 19 11:56:21 2009 From: inspdr00 at gmail.com (Pablo =?ISO-8859-1?Q?D=EDaz?=) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Problem whit "Same-origin policy" Message-ID: <1232384181.6170.12.camel@janojano> Hello list, Well, excuse my English. I've an application with OpenLayers, Tomcat an Geoserver. When I try to connect my application in tomcat with vector layers in Geoserver, I've no problem if geoserver runs in port 80 (the same as tomcat), but when I try to connect when geoserver runs in port 8080 I get the next exception by firebug: Access to restricted URI denied" code: "1012 http://localhost/VisorOL/javascript/OpenLayers-2.7/OpenLayers.js Line 513 Seaching, I found that this error means that I broke the "Same-origin policy", but I don't know how arrange this problem. I need geoserver runs in port 8080 not in port 80. Some idea?. From ahayes at gcrc.carleton.ca Mon Jan 19 12:08:15 2009 From: ahayes at gcrc.carleton.ca (Amos Hayes) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Problem whit "Same-origin policy" In-Reply-To: <1232384181.6170.12.camel@janojano> References: <1232384181.6170.12.camel@janojano> Message-ID: It's a browser security feature. You'll need to set up a reverse proxy. If you run Apache on port 80 and use its reverse proxy features, you can put your various services under a port 80 path. -- Amos Hayes Geomatics and Cartographic Research Centre Carleton University ahayes@gcrc.carleton.ca +1.613.520.2600x8179 On 19-Jan-09, at 11:56 AM, Pablo D?az wrote: > Hello list, > > Well, excuse my English. > > I've an application with OpenLayers, Tomcat an Geoserver. > When I try to connect my application in tomcat with vector layers in > Geoserver, I've no problem if geoserver runs in port 80 (the same as > tomcat), but when I try to connect when geoserver runs in port 8080 I > get the next exception by firebug: > > Access to restricted URI denied" code: "1012 > http://localhost/VisorOL/javascript/OpenLayers-2.7/OpenLayers.js > Line 513 > > Seaching, I found that this error means that I broke the "Same-origin > policy", but I don't know how arrange this problem. > > I need geoserver runs in port 8080 not in port 80. > > Some idea?. > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From inspdr00 at gmail.com Mon Jan 19 13:38:39 2009 From: inspdr00 at gmail.com (Pablo =?ISO-8859-1?Q?D=EDaz?=) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Problem whit "Same-origin policy" In-Reply-To: References: <1232384181.6170.12.camel@janojano> Message-ID: <1232390319.6170.19.camel@janojano> Thanks so much!! But, how do I do that? I've tomcat rus on port 80, geoserver runs on port 8080 and I runs most of GETs with OpenLayers (I draw polygons, I put the result into a textarea, I select polygons) but I can't use GetFeatureInfo with diferent port. Thank you again!!. El lun, 19-01-2009 a las 12:08 -0500, Amos Hayes escribi?: > It's a browser security feature. You'll need to set up a reverse > proxy. If you run Apache on port 80 and use its reverse proxy > features, you can put your various services under a port 80 path. > > -- > Amos Hayes > Geomatics and Cartographic Research Centre > Carleton University > ahayes@gcrc.carleton.ca > +1.613.520.2600x8179 > > On 19-Jan-09, at 11:56 AM, Pablo D?az wrote: > > > Hello list, > > > > Well, excuse my English. > > > > I've an application with OpenLayers, Tomcat an Geoserver. > > When I try to connect my application in tomcat with vector layers in > > Geoserver, I've no problem if geoserver runs in port 80 (the same as > > tomcat), but when I try to connect when geoserver runs in port 8080 I > > get the next exception by firebug: > > > > Access to restricted URI denied" code: "1012 > > http://localhost/VisorOL/javascript/OpenLayers-2.7/OpenLayers.js > > Line 513 > > > > Seaching, I found that this error means that I broke the "Same-origin > > policy", but I don't know how arrange this problem. > > > > I need geoserver runs in port 8080 not in port 80. > > > > Some idea?. > > > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > From eric.c2c at gmail.com Mon Jan 19 16:19:23 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <49748E96.5020506@mapgears.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> Message-ID: <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube wrote: > Hi Eric, > > I took a look at the SelectFeature control. Now I understand what you > meant and it makes sense. Also, it's also making sense to have this control > have the possibility to highlight on hover or on click. > > "beforefeaturehighlighted" and "featurehighlighted" events make sense, but > a "featureunhighlighted" (or some other term meaning that the feature was > highlighted and is now no more) would also be useful. Alexandre, The more I think about this highlight feature control the more I think there's no room for both a select feature and a highlight feature controls. What causes people trouble is that they can't use two select feature controls, one in hover mode and the other in click mode. This is because once a feature is hovered it is selected, and cannot be selected again when it is clicked. Maybe we could modify the select feature control so that (1) it optionally uses its own selectedFeatures array, as opposed to relying on the layer's, and (b) defines its own "beforefeatureselected", "featureselected" and "featureunselected" event types. In this way, one should be able to use two select feature controls, and get "featureselected" events, from the first control when features are hovered and from the second control when features are clicked. Tell me what you think, -- Eric From eric.c2c at gmail.com Mon Jan 19 16:36:33 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] DrawFeature control not working properly In-Reply-To: References: Message-ID: <5ec103de0901191336o75c397edw695507101a74c792@mail.gmail.com> On Mon, Jan 19, 2009 at 1:52 PM, Jatin Ambasana wrote: > http://mail.google.com/mail/#label/openlayers/11eeef3d8dc95c53 > Hello everyone, > > I have added DrawFeature control to my map. > Whenever it is activated it will always draw a polygon of sides 40 i.e. an > approx circle. > This is its code: > > polyOptions = {sides: 40, radius: rad, angle: 0}; > polygonControl = new > OpenLayers.Control.DrawFeature(polygonLayer, > > OpenLayers.Handler.RegularPolygon, > {handlerOptions: polyOptions, > featureAdded:circleAdded}); > map.addControl(polygonControl); > > Now the problem is that the circleAdded function is not called when a circle > is drawn on map. What OpenLayers version do you use? Changeset 8616 () should fix it, give trunk a try. Regards, -- Eric From roald.dewit at lisasoft.com Mon Jan 19 19:52:52 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5b021dd0901151335n5d809655q2c846179e8f7abe@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <5b021dd0901150929p6f4aa323vddfc4fd9b07dfe07@mail.gmail.com> <496F85D3.3020700@mapgears.com> <5b021dd0901151335n5d809655q2c846179e8f7abe@mail.gmail.com> Message-ID: <1232412772.19737.134.camel@bender> Hi Alexandre and Andreas, A while ago I created a proof of concept where I simplify the features with FeatureServer (FS) [1] depending on the resolution. Chris Schmidt was so kind to point out that the tolerance for simplifying is directly related to the map resolution. What I do is add an extra parameter to my WFS request (to FS): tolerance=0.010986328125 for example. That value is the actual resolution. (In my FS configuration I have enabled the 'Simplify' WPS module) This works quite well for geometries with many vertices. It does not reduce the number of features though! Note that Simplify in FS does not support multigeometries atm. Regards, Roald [1] http://featureserver.org/ On Fri, 2009-01-16 at 08:05 +1030, Andreas Hocevar wrote: > Hi Alexandre, > > On Thu, Jan 15, 2009 at 7:52 PM, Alexandre Dube wrote: > > Yeah, I saw your example a couple of days ago. It's a great tool. As > > vector features are longer to draw than samples images generated by WMS > > requests I find this quite useful. > > > > The slow rendering of vector features has been one of my worries. A > > common practice is to normalize the geometry for a given scale or have > > different data per scale on the server side. With that in mind, I > > wanted my vector layer to load features from different data source. See > > the example : > > > > http://dev4.mapgears.com/bdga/options-by-zoom-hover-bdga.html > > > > This combine the above idea ( multiple data sources ) with the Hover > > control. The result is quite fast. What do you think ? > > This is a good idea! But it seems there is a lot of work to do on the > server side to prepare all the different detail levels for a WFS. Are > you using WPS for that? > > Andreas. > -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. From myjiang at yahoo.com Mon Jan 19 22:24:08 2009 From: myjiang at yahoo.com (Ming Ya Jiang) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] How to get WPServer to work behind Tomcat/Jython In-Reply-To: <20090118230714.GC1745@metacarta.com> Message-ID: <254977.56764.qm@web30803.mail.mud.yahoo.com> Chris and Forum, Sorry about intrusion on to this forum,? but I was unable to find a specific forum on WPServer/FeatureServer, and I find this forum to be tangentially related. I am looking at your wonderful WPServer to achieve the goal of doing some basic processing of geojson features like buffering and intersection. I need to get WPserver to work behind tomcat /Jython.?? I saw a older blog of yours (technical ramblings) that talked about Jython and featureserver that talked about that it is relatively easy to achieve this.? I was able to install Jython, and got basic Python servlet example working, so I know that my Jython and servlet installation is working with tomcat.? I also was able to get wpsdemo to work behind tomcat, so I know that my python and GDAL installation is working. Now the question is how do I get it to run in tomcat, perhaps there is a simple handler python script that need to be built ? Being a complete novice in Python/Jython, I'd like to get some quick pointers on how to do that. Thanks. Dukie. Raleigh, NC -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090119/96337f03/attachment.html From jatin.a at iworktech.com Tue Jan 20 00:52:24 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] DrawFeature control not working properly In-Reply-To: <5ec103de0901191336o75c397edw695507101a74c792@mail.gmail.com> References: <5ec103de0901191336o75c397edw695507101a74c792@mail.gmail.com> Message-ID: <1232430744510-2185143.post@n2.nabble.com> Hello Eric, >What OpenLayers version do you use? I use OpenLayers-2.7 latest version. >Changeset 8616 () should >fix it, give trunk a try. Yes Thank you very much Eric..... it has solved my problem....=) I am able to draw the polygon on single click and also add it in the layer..... Here is the code added in zip file that I have done to just draw a circle of specific size on just one click and also it provides a functionality that user can draw only one circle at a time..... it could be useful for someone else also..... But Eric, There is one problem that I think I need to inform you about... I updated both the files from http://trac.openlayers.org/changeset/8616 i.e. 1) trunk/openlayers/lib/OpenLayers/Handler/RegularPolygon.js (modified) (1 diff) 2) trunk/openlayers/tests/Handler/RegularPolygon.html (modified) (1 diff) Now when I tested the RegularPolygon.html in http://localhost/OpenLayers-2.7/tests/run-tests.html It gives one error while testing.... I am pasting the output in italics below: Handler/RegularPolygon.html: fail 1 ok 6 (detailed: fail 0 ok 25) test_Handler_RegularPolygon_constructor ok 3 ok constructor calls parent with the correct control ok constructor calls parent with the correct callbacks ok regular polygon constructor calls parent with the correct options test_Handler_RegularPolygon_activation ok 3 ok activate returns false if the handler was already active ok activate returns true if the handler was not already active ok deactivate returns true if the handler was active already test_Handler_RegularPolygon_deactivation ok 1 ok deactivate doesn't throw an error if layer was previously destroyed test_Handler_RegularPolygon_four_corners ok 7 ok correct bounds after move ok geometry has 5 components ok geometry is a polygon ok feature radius as set on handler ok correct bounds after move with a fixed radius ok bounds with manual radius setting ok bounds with manual radius setting and mousemove test_Handler_RegularPolygon_circle ok 7 ok correct bounds after move ok geometry has correct numbre of components ok geometry is a polygon ok feature radius as set on handler ok correct bounds after move with fixed radius ok bounds with manual radius setting ok bounds with manual radius setting and mousemove test_Handler_RegularPolygon_irregular ok 4 ok correct right ok correct bottom ok correct left ok correct top test_callbacks planned 1 assertions but got 0; fail 0 ok 0 exception: : object: 'bottom' is null or not an object Eric Lemoine wrote: > > On Mon, Jan 19, 2009 at 1:52 PM, Jatin Ambasana > wrote: >> http://mail.google.com/mail/#label/openlayers/11eeef3d8dc95c53 >> Hello everyone, >> >> I have added DrawFeature control to my map. >> Whenever it is activated it will always draw a polygon of sides 40 i.e. >> an >> approx circle. >> This is its code: >> >> polyOptions = {sides: 40, radius: rad, angle: 0}; >> polygonControl = new >> OpenLayers.Control.DrawFeature(polygonLayer, >> >> OpenLayers.Handler.RegularPolygon, >> {handlerOptions: polyOptions, >> featureAdded:circleAdded}); >> map.addControl(polygonControl); >> >> Now the problem is that the circleAdded function is not called when a >> circle >> is drawn on map. > > What OpenLayers version do you use? > > Changeset 8616 () should > fix it, give trunk a try. > > Regards, > > -- > Eric > http://n2.nabble.com/file/n2185143/polygons.zip polygons.zip -- View this message in context: http://n2.nabble.com/DrawFeature-control-not-working-properly-tp2181102p2185143.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tschaub at opengeo.org Tue Jan 20 01:26:54 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Problem whit "Same-origin policy" In-Reply-To: <1232384181.6170.12.camel@janojano> References: <1232384181.6170.12.camel@janojano> Message-ID: <49756EAE.1000408@opengeo.org> Pablo D?az wrote: > Hello list, > > Well, excuse my English. > > I've an application with OpenLayers, Tomcat an Geoserver. > When I try to connect my application in tomcat with vector layers in > Geoserver, I've no problem if geoserver runs in port 80 (the same as > tomcat), but when I try to connect when geoserver runs in port 8080 I > get the next exception by firebug: > > Access to restricted URI denied" code: "1012 > http://localhost/VisorOL/javascript/OpenLayers-2.7/OpenLayers.js > Line 513 > > Seaching, I found that this error means that I broke the "Same-origin > policy", but I don't know how arrange this problem. > > I need geoserver runs in port 8080 not in port 80. > If you want /geoserver on port 80, see http://geoserver.org/display/GEOSDOC/How+to+proxy+Jetty+through+Apache+on+port+80 This is useful if you use Apache (on port 80) to serve your application. Tim > Some idea?. > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From tschaub at opengeo.org Tue Jan 20 01:35:09 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] OL 2.7 measure control questions In-Reply-To: <1232058423851-2165317.post@n2.nabble.com> References: <1231971899248-2159474.post@n2.nabble.com> <496E7F50.4020903@opengeo.org> <1232058423851-2165317.post@n2.nabble.com> Message-ID: <4975709D.9020109@opengeo.org> Hey- Zer wrote: > Thanks! > > Cross hair works great! > > But the meter/kilometer thing is still a problem. Even though i use > 'displaySystemUnits: {metric: ["m"]}', the control gives the result in km if > lenght is more than 1000 meters. > Can you post a (relevant) bit of your application code? Adding the following property to the options (second argument) of the measure control constructor should do the trick: displaySystemUnits: {metric: ["m"]} Tim > > -Z > > > Tim Schaub wrote: >> Zer wrote: >>> Dear list, >>> >>> Is there a way to change to mouse pointer to a hair cross when using then >>> measure control? >>> >> control.events.on({ >> activate: function() { >> map.div.style.cursor = "crosshair"; >> }, >> deactivate: function() { >> map.div.style.cursor = "default"; >> } >> }); >> >> Of course you'll be better off if you use methods like: >> >> OpenLayers.Element.addClass(map.div, "cursor_cross"); >> >> and >> >> OpenLayers.Element.removeClass(map.div, "cursor_cross"); >> >> And then load up a stylesheet that has something like >> >> .cursor_cross { >> cursor: crosshair; >> } >> >>> Is there a way to always present the measured distance in meters? The >>> distance shows in km as soon as a distance longer than 1000m is measured. >>> >> var control = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, { >> displaySystemUnits: {metric: ["m"]} >> }); >> >> This property (displaySystemUnits) is not marked as part of the API - so >> you may have to change your app if it changes (don't imagine it will in >> 2.x). >> >> Tim >> >>> Thanks, >>> >>> Z >> >> -- >> Tim Schaub >> OpenGeo - http://opengeo.org >> Expert service straight from the developers. >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From eric.c2c at gmail.com Tue Jan 20 02:00:54 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] DrawFeature control not working properly In-Reply-To: <1232430744510-2185143.post@n2.nabble.com> References: <5ec103de0901191336o75c397edw695507101a74c792@mail.gmail.com> <1232430744510-2185143.post@n2.nabble.com> Message-ID: <5ec103de0901192300p7498cf55s3a86f1c7361d3ffe@mail.gmail.com> Hi Jatin Does the test also fail with trunk? (I can't check right now) Eric 2009/1/20, Jatin Ambasana : > > Hello Eric, > >>What OpenLayers version do you use? > > I use OpenLayers-2.7 latest version. > >>Changeset 8616 () should >>fix it, give trunk a try. > > Yes Thank you very much Eric..... it has solved my problem....=) > I am able to draw the polygon on single click and also add it in the > layer..... > > Here is the code added in zip file that I have done to just draw a circle of > specific size on just one click and also it provides a functionality that > user can draw only one circle at a time..... it could be useful for someone > else also..... > > But Eric, > There is one problem that I think I need to inform you about... > I updated both the files > from http://trac.openlayers.org/changeset/8616 > i.e. > 1) trunk/openlayers/lib/OpenLayers/Handler/RegularPolygon.js (modified) (1 > diff) > 2) trunk/openlayers/tests/Handler/RegularPolygon.html (modified) (1 diff) > > Now when I tested the RegularPolygon.html in > http://localhost/OpenLayers-2.7/tests/run-tests.html > > It gives one error while testing.... I am pasting the output in italics > below: > > Handler/RegularPolygon.html: fail 1 ok 6 (detailed: fail 0 ok 25) > test_Handler_RegularPolygon_constructor ok 3 > ok constructor calls parent with the correct control > ok constructor calls parent with the correct callbacks > ok regular polygon constructor calls parent with the correct options > > test_Handler_RegularPolygon_activation ok 3 > ok activate returns false if the handler was already active > ok activate returns true if the handler was not already active > ok deactivate returns true if the handler was active already > > test_Handler_RegularPolygon_deactivation ok 1 > ok deactivate doesn't throw an error if layer was previously destroyed > > test_Handler_RegularPolygon_four_corners ok 7 > ok correct bounds after move > ok geometry has 5 components > ok geometry is a polygon > ok feature radius as set on handler > ok correct bounds after move with a fixed radius > ok bounds with manual radius setting > ok bounds with manual radius setting and mousemove > > test_Handler_RegularPolygon_circle ok 7 > ok correct bounds after move > ok geometry has correct numbre of components > ok geometry is a polygon > ok feature radius as set on handler > ok correct bounds after move with fixed radius > ok bounds with manual radius setting > ok bounds with manual radius setting and mousemove > > test_Handler_RegularPolygon_irregular ok 4 > ok correct right > ok correct bottom > ok correct left > ok correct top > > test_callbacks planned 1 assertions but got 0; fail 0 ok 0 > exception: : object: 'bottom' is null or not an object > > > > > Eric Lemoine wrote: >> >> On Mon, Jan 19, 2009 at 1:52 PM, Jatin Ambasana >> wrote: >>> http://mail.google.com/mail/#label/openlayers/11eeef3d8dc95c53 >>> Hello everyone, >>> >>> I have added DrawFeature control to my map. >>> Whenever it is activated it will always draw a polygon of sides 40 i.e. >>> an >>> approx circle. >>> This is its code: >>> >>> polyOptions = {sides: 40, radius: rad, angle: 0}; >>> polygonControl = new >>> OpenLayers.Control.DrawFeature(polygonLayer, >>> >>> OpenLayers.Handler.RegularPolygon, >>> {handlerOptions: polyOptions, >>> featureAdded:circleAdded}); >>> map.addControl(polygonControl); >>> >>> Now the problem is that the circleAdded function is not called when a >>> circle >>> is drawn on map. >> >> What OpenLayers version do you use? >> >> Changeset 8616 () should >> fix it, give trunk a try. >> >> Regards, >> >> -- >> Eric >> http://n2.nabble.com/file/n2185143/polygons.zip polygons.zip > -- > View this message in context: > http://n2.nabble.com/DrawFeature-control-not-working-properly-tp2181102p2185143.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 jatin.a at iworktech.com Tue Jan 20 02:11:39 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] DrawFeature control not working properly In-Reply-To: <1232430744510-2185143.post@n2.nabble.com> References: <5ec103de0901191336o75c397edw695507101a74c792@mail.gmail.com> <1232430744510-2185143.post@n2.nabble.com> Message-ID: <1232435499359-2185299.post@n2.nabble.com> Hello Eric, I also had another problem that came to notice some what late..... The program that I had attached in last post (polygons.html) does work fine but it shows a error occurred symbol on left hand side of browser's status bar. On checking the symbol I get to see following error: Line: 379 Char: 9 Error: 'this.layer.renderer' is null or not an object Although it is not giving any problem in working of the code but I am not able to understand why it is giving such error. I feel I should take its care now itself since I am going to extend the code with some more functionalities. But I don't know where to look for and I don't know anything about Renderer and its working.... Jatin Ambasana wrote: > > Hello Eric, > > >What OpenLayers version do you use? > > I use OpenLayers-2.7 latest version. > > >Changeset 8616 () should >>fix it, give trunk a try. > > Yes Thank you very much Eric..... it has solved my problem....=) > I am able to draw the polygon on single click and also add it in the > layer..... > > Here is the code added in zip file that I have done to just draw a circle > of specific size on just one click and also it provides a functionality > that user can draw only one circle at a time..... it could be useful for > someone else also..... > > But Eric, > There is one problem that I think I need to inform you about... > I updated both the files > from http://trac.openlayers.org/changeset/8616 > i.e. > 1) trunk/openlayers/lib/OpenLayers/Handler/RegularPolygon.js (modified) (1 > diff) > 2) trunk/openlayers/tests/Handler/RegularPolygon.html (modified) (1 diff) > > Now when I tested the RegularPolygon.html in > http://localhost/OpenLayers-2.7/tests/run-tests.html > > It gives one error while testing.... I am pasting the output in italics > below: > > Handler/RegularPolygon.html: fail 1 ok 6 (detailed: fail 0 ok 25) > test_Handler_RegularPolygon_constructor ok 3 > ok constructor calls parent with the correct control > ok constructor calls parent with the correct callbacks > ok regular polygon constructor calls parent with the correct options > > test_Handler_RegularPolygon_activation ok 3 > ok activate returns false if the handler was already active > ok activate returns true if the handler was not already active > ok deactivate returns true if the handler was active already > > test_Handler_RegularPolygon_deactivation ok 1 > ok deactivate doesn't throw an error if layer was previously destroyed > > test_Handler_RegularPolygon_four_corners ok 7 > ok correct bounds after move > ok geometry has 5 components > ok geometry is a polygon > ok feature radius as set on handler > ok correct bounds after move with a fixed radius > ok bounds with manual radius setting > ok bounds with manual radius setting and mousemove > > test_Handler_RegularPolygon_circle ok 7 > ok correct bounds after move > ok geometry has correct numbre of components > ok geometry is a polygon > ok feature radius as set on handler > ok correct bounds after move with fixed radius > ok bounds with manual radius setting > ok bounds with manual radius setting and mousemove > > test_Handler_RegularPolygon_irregular ok 4 > ok correct right > ok correct bottom > ok correct left > ok correct top > > test_callbacks planned 1 assertions but got 0; fail 0 ok 0 > exception: : object: 'bottom' is null or not an object > > > > > Eric Lemoine wrote: >> >> On Mon, Jan 19, 2009 at 1:52 PM, Jatin Ambasana >> wrote: >>> http://mail.google.com/mail/#label/openlayers/11eeef3d8dc95c53 >>> Hello everyone, >>> >>> I have added DrawFeature control to my map. >>> Whenever it is activated it will always draw a polygon of sides 40 i.e. >>> an >>> approx circle. >>> This is its code: >>> >>> polyOptions = {sides: 40, radius: rad, angle: 0}; >>> polygonControl = new >>> OpenLayers.Control.DrawFeature(polygonLayer, >>> >>> OpenLayers.Handler.RegularPolygon, >>> {handlerOptions: >>> polyOptions, >>> featureAdded:circleAdded}); >>> map.addControl(polygonControl); >>> >>> Now the problem is that the circleAdded function is not called when a >>> circle >>> is drawn on map. >> >> What OpenLayers version do you use? >> >> Changeset 8616 () should >> fix it, give trunk a try. >> >> Regards, >> >> -- >> Eric >> http://n2.nabble.com/file/n2185143/polygons.zip polygons.zip > -- View this message in context: http://n2.nabble.com/DrawFeature-control-not-working-properly-tp2181102p2185299.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jatin.a at iworktech.com Tue Jan 20 02:32:10 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] DrawFeature control not working properly In-Reply-To: <5ec103de0901192300p7498cf55s3a86f1c7361d3ffe@mail.gmail.com> References: <5ec103de0901191336o75c397edw695507101a74c792@mail.gmail.com> <1232430744510-2185143.post@n2.nabble.com> <5ec103de0901192300p7498cf55s3a86f1c7361d3ffe@mail.gmail.com> Message-ID: <1232436730769-2185328.post@n2.nabble.com> Hi Eric, > Does the test also fail with trunk? (I can't check right now) Frankly speaking I don't understand your question..... I mean I don't know where to test the trunk? I just have OpenLayers-2.7 folder that I downloaded from OpenLayers website. I went to http://trac.openlayers.org/browser/ and got a view of the revisions and other things..... OpenLayers has nice support.... Thanks to you people... But I don't see anything over there to test the stuff or run the page run-tests.html.... Will I have to download the whole trunk part that is revised and then test it out? I mean I don't have much idea about the trunk and other things.... Can you please guide me on that so that I can make its proper use and also become helpful to others.... thank you..... Eric Lemoine wrote: > > Hi Jatin > > Does the test also fail with trunk? (I can't check right now) > > Eric > > 2009/1/20, Jatin Ambasana : >> >> Hello Eric, >> >>>What OpenLayers version do you use? >> >> I use OpenLayers-2.7 latest version. >> >>>Changeset 8616 () should >>>fix it, give trunk a try. >> >> Yes Thank you very much Eric..... it has solved my problem....=) >> I am able to draw the polygon on single click and also add it in the >> layer..... >> >> Here is the code added in zip file that I have done to just draw a circle >> of >> specific size on just one click and also it provides a functionality that >> user can draw only one circle at a time..... it could be useful for >> someone >> else also..... >> >> But Eric, >> There is one problem that I think I need to inform you about... >> I updated both the files >> from http://trac.openlayers.org/changeset/8616 >> i.e. >> 1) trunk/openlayers/lib/OpenLayers/Handler/RegularPolygon.js (modified) >> (1 >> diff) >> 2) trunk/openlayers/tests/Handler/RegularPolygon.html (modified) (1 diff) >> >> Now when I tested the RegularPolygon.html in >> http://localhost/OpenLayers-2.7/tests/run-tests.html >> >> It gives one error while testing.... I am pasting the output in italics >> below: >> >> Handler/RegularPolygon.html: fail 1 ok 6 (detailed: fail 0 ok 25) >> test_Handler_RegularPolygon_constructor ok 3 >> ok constructor calls parent with the correct control >> ok constructor calls parent with the correct callbacks >> ok regular polygon constructor calls parent with the correct options >> >> test_Handler_RegularPolygon_activation ok 3 >> ok activate returns false if the handler was already active >> ok activate returns true if the handler was not already active >> ok deactivate returns true if the handler was active already >> >> test_Handler_RegularPolygon_deactivation ok 1 >> ok deactivate doesn't throw an error if layer was previously destroyed >> >> test_Handler_RegularPolygon_four_corners ok 7 >> ok correct bounds after move >> ok geometry has 5 components >> ok geometry is a polygon >> ok feature radius as set on handler >> ok correct bounds after move with a fixed radius >> ok bounds with manual radius setting >> ok bounds with manual radius setting and mousemove >> >> test_Handler_RegularPolygon_circle ok 7 >> ok correct bounds after move >> ok geometry has correct numbre of components >> ok geometry is a polygon >> ok feature radius as set on handler >> ok correct bounds after move with fixed radius >> ok bounds with manual radius setting >> ok bounds with manual radius setting and mousemove >> >> test_Handler_RegularPolygon_irregular ok 4 >> ok correct right >> ok correct bottom >> ok correct left >> ok correct top >> >> test_callbacks planned 1 assertions but got 0; fail 0 ok 0 >> exception: : object: 'bottom' is null or not an object >> >> >> >> >> Eric Lemoine wrote: >>> >>> On Mon, Jan 19, 2009 at 1:52 PM, Jatin Ambasana >>> wrote: >>>> http://mail.google.com/mail/#label/openlayers/11eeef3d8dc95c53 >>>> Hello everyone, >>>> >>>> I have added DrawFeature control to my map. >>>> Whenever it is activated it will always draw a polygon of sides 40 i.e. >>>> an >>>> approx circle. >>>> This is its code: >>>> >>>> polyOptions = {sides: 40, radius: rad, angle: 0}; >>>> polygonControl = new >>>> OpenLayers.Control.DrawFeature(polygonLayer, >>>> >>>> OpenLayers.Handler.RegularPolygon, >>>> {handlerOptions: >>>> polyOptions, >>>> featureAdded:circleAdded}); >>>> map.addControl(polygonControl); >>>> >>>> Now the problem is that the circleAdded function is not called when a >>>> circle >>>> is drawn on map. >>> >>> What OpenLayers version do you use? >>> >>> Changeset 8616 () should >>> fix it, give trunk a try. >>> >>> Regards, >>> >>> -- >>> Eric >>> http://n2.nabble.com/file/n2185143/polygons.zip polygons.zip >> -- >> View this message in context: >> http://n2.nabble.com/DrawFeature-control-not-working-properly-tp2181102p2185143.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/DrawFeature-control-not-working-properly-tp2181102p2185328.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From inspdr00 at gmail.com Tue Jan 20 03:07:50 2009 From: inspdr00 at gmail.com (Pablo =?ISO-8859-1?Q?D=EDaz?=) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Problem whit "Same-origin policy" In-Reply-To: <8758004B-3040-4B24-B42E-5E095ECDFE51@gcrc.carleton.ca> References: <1232384181.6170.12.camel@janojano> <1232385507.6170.17.camel@janojano> <8758004B-3040-4B24-B42E-5E095ECDFE51@gcrc.carleton.ca> Message-ID: <1232438870.6179.2.camel@janojano> Thank you again!! I understood your solution, I'm going to search by the net. Thank you so much!!!! El lun, 19-01-2009 a las 14:58 -0500, Amos Hayes escribi?: > Hi Pablo. > > If you are running tomcat on port 80, then deploying GeoServer as a > WAR file under tomcat should allow you to access it on port 80 as well > and might be the easiest solution for you. See the geoserver docs for > information on deploying as a war file. > > If you need to run tomcat and geoserver separately, or you are running > both on ports that are different than the one serving the HTML page, > and you want to serve a page from one and get (non-image) content from > another, then you'll need to reverse proxy. See the Apache proxy > documentation. > > Either way, the URLs you use for loading vectors in openlayers need to > refer to the same host and port as the host/port combination the page > was loaded from. > > I'm sorry I can't be much more help. You're probably in for a bit of > googling and doc reading to sort out a solution for your environment. > > -- > Amos Hayes > Geomatics and Cartographic Research Centre > Carleton University > ahayes@gcrc.carleton.ca > +1.613.520.2600x8179 > > On 19-Jan-09, at 12:18 PM, Pablo D?az wrote: > > > Thanks so much!! > > > > But, how do I do that? > > > > I've tomcat rus on port 80, geoserver runs on port 8080 and I runs > > most > > of GETs with OpenLayers (I draw polygons, I put the result into a > > textarea, I select polygons) but I can't use GetFeatureInfo with > > diferent port. > > > > Thank you again!!. > > > > El lun, 19-01-2009 a las 12:08 -0500, Amos Hayes escribi?: > >> It's a browser security feature. You'll need to set up a reverse > >> proxy. If you run Apache on port 80 and use its reverse proxy > >> features, you can put your various services under a port 80 path. > >> > >> -- > >> Amos Hayes > >> Geomatics and Cartographic Research Centre > >> Carleton University > >> ahayes@gcrc.carleton.ca > >> +1.613.520.2600x8179 > >> > >> On 19-Jan-09, at 11:56 AM, Pablo D?az wrote: > >> > >>> Hello list, > >>> > >>> Well, excuse my English. > >>> > >>> I've an application with OpenLayers, Tomcat an Geoserver. > >>> When I try to connect my application in tomcat with vector layers in > >>> Geoserver, I've no problem if geoserver runs in port 80 (the same as > >>> tomcat), but when I try to connect when geoserver runs in port > >>> 8080 I > >>> get the next exception by firebug: > >>> > >>> Access to restricted URI denied" code: "1012 > >>> http://localhost/VisorOL/javascript/OpenLayers-2.7/OpenLayers.js > >>> Line 513 > >>> > >>> Seaching, I found that this error means that I broke the "Same- > >>> origin > >>> policy", but I don't know how arrange this problem. > >>> > >>> I need geoserver runs in port 8080 not in port 80. > >>> > >>> Some idea?. > >>> > >>> > >>> _______________________________________________ > >>> Users mailing list > >>> Users@openlayers.org > >>> http://openlayers.org/mailman/listinfo/users > >> > > > From listensammler at patzi.de Tue Jan 20 03:53:45 2009 From: listensammler at patzi.de (Fabian Patzke) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem? Message-ID: <49759119.7060305@patzi.de> Hi there, at the moment I am working on a university project. I am building a map and need to get the coordinates from my map to use them in a PHP script. There is no problem with getting them but they are in some way wrong. What I want is to get the coordinates in EPSG:32632 just like they are displayed in the lower left corner of the map. For example: I need: lat=5712116.63994 lon=565610.79249 but I get: lat=6720302.918434498 lon=1107203.4921313925 (they are not for exactly the same position) Has anyone an idea where my problem is? Thanks a lot in advance, greetings Fabian PS: my map html file: Rauminformationssystem Georg-August-Universit?t G?ttingen

Rauminformationssystem Uni G?ttingen

Infos

F?r Info in die Karte klicken

From antoni.vidal at icc.cat Tue Jan 20 04:13:46 2009 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] How to Get x,y of DragFeature Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D625E@CORRIOL.icc.local> Hello, How can I get the w,y when a feature is dragged ? Thanks in advance Antoni Vidal Institut Cartogr?fic de Catalunya Tel: +34-93 567 1500 Ext. 3228 Parc de Montju?c Fax: +34-93 567 1567 08038 Barcelona http://www.icc.cat Spain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090120/1a9826c3/attachment.html From joao.c.duarte at co.sapo.pt Tue Jan 20 04:45:18 2009 From: joao.c.duarte at co.sapo.pt (Joao Duarte) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem? In-Reply-To: <49759119.7060305@patzi.de> References: <49759119.7060305@patzi.de> Message-ID: <018701c97ae3$ce0be260$6a23a720$@c.duarte@co.sapo.pt> Hi Fabian, On your code, you've created the map with the projection set to EPSG:900913, so is normal that you get the coordinates in that same projection. You have two options: Or you change the projection to EPSG:900913 or after you get some coordinates, you must convert them to EPSG:32632. I leave you with an example of how doing the last option: var lonlat = map.getLonLatFromPixel(e.xy).transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:32632")); I see that you're already performing the transformation, but the source and destination projections are the same (EPSG:900913). Try the example I gave you. Hope it helps, Regards, Jo?o Duarte -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Fabian Patzke Sent: ter?a-feira, 20 de Janeiro de 2009 08:54 To: users@openlayers.org Subject: [OpenLayers-Users] Projection problem? Hi there, at the moment I am working on a university project. I am building a map and need to get the coordinates from my map to use them in a PHP script. There is no problem with getting them but they are in some way wrong. What I want is to get the coordinates in EPSG:32632 just like they are displayed in the lower left corner of the map. For example: I need: lat=5712116.63994 lon=565610.79249 but I get: lat=6720302.918434498 lon=1107203.4921313925 (they are not for exactly the same position) Has anyone an idea where my problem is? Thanks a lot in advance, greetings Fabian PS: my map html file: Rauminformationssystem Georg-August-Universit?t G?ttingen

Rauminformationssystem Uni G?ttingen

Infos

F?r Info in die Karte klicken

_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From joao.c.duarte at co.sapo.pt Tue Jan 20 04:50:34 2009 From: joao.c.duarte at co.sapo.pt (Joao Duarte) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] How to Get x,y of DragFeature In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D625E@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D625E@CORRIOL.icc.local> Message-ID: <019001c97ae4$89e3f540$9dabdfc0$@c.duarte@co.sapo.pt> Hi Antoni, Yes you can, on the DragFeature control you?re using for dragging the features, your must override the onDrag method. The signature of the method is: function(feature, pixel) {}, So you?ll be getting the pixel where the feature is being dragged. You can also override the onStart and onComplete methods. Take a look at DragFeature.js. You?ll find the onStart, onDrag and onComplete. They have some documentation, reading it should help. Regards, Jo?o Duarte From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Vidal, Antoni Sent: ter?a-feira, 20 de Janeiro de 2009 09:14 To: users@openlayers.org Subject: [OpenLayers-Users] How to Get x,y of DragFeature Hello, How can I get the w,y when a feature is dragged ? Thanks in advance Antoni Vidal Institut Cartogr?fic de Catalunya Tel: +34-93 567 1500 Ext. 3228 Parc de Montju?c Fax: +34-93 567 1567 08038 Barcelona http://www.icc.cat Spain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090120/0e1451e1/attachment.html From bascouwenberg at gmail.com Tue Jan 20 04:59:01 2009 From: bascouwenberg at gmail.com (Bas Couwenberg) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Change size multiple polygons Message-ID: <583aacb40901200159s3b7b954bu7c624db73b490906@mail.gmail.com> Hello, in my application I have a WFS layer which shows me all city borders. Now each city border must touch another one or there will be a piece of no man's land between them. Is it possible that when I change a border of one city (polygon) the other touching border automaticly changes too? So if I make one part smaller the touching polygons become bigger. Best Regards, Bas Couwenberg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090120/80b9d72b/attachment.html From igrcic at gmail.com Tue Jan 20 05:06:40 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> Message-ID: On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine wrote: > On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube wrote: >> Hi Eric, >> >> I took a look at the SelectFeature control. Now I understand what you >> meant and it makes sense. Also, it's also making sense to have this control >> have the possibility to highlight on hover or on click. >> >> "beforefeaturehighlighted" and "featurehighlighted" events make sense, but >> a "featureunhighlighted" (or some other term meaning that the feature was >> highlighted and is now no more) would also be useful. > > Alexandre, > > The more I think about this highlight feature control the more I think > there's no room for both a select feature and a highlight feature > controls. > Same opinion here. We already have a bunch of controls, and now adding two very similar ones... Currently im using slightly modified SelectFeature control, i added one more option to it: selectOnHover, thats how i quickly solved the problem of only highlighting feature without selecting it. If selectOnHover is true, feature is selected&higlighted (select method is called) on hover, if its false feature is only higlighted, not selected. > What causes people trouble is that they can't use two select feature > controls, one in hover mode and the other in click mode. This is > because once a feature is hovered it is selected, and cannot be > selected again when it is clicked. > > Maybe we could modify the select feature control so that (1) it > optionally uses its own selectedFeatures array, as opposed to relying > on the layer's, and (b) defines its own "beforefeatureselected", > "featureselected" and "featureunselected" event types. In this way, > one should be able to use two select feature controls, and get > "featureselected" events, from the first control when features are > hovered and from the second control when features are clicked. > > Tell me what you think, > > -- > Eric > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From stefano.bonnin at comai.to Tue Jan 20 05:24:17 2009 From: stefano.bonnin at comai.to (Stefano Bonnin) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Looking for Openlayers.js patched (Ticket #1666) Message-ID: <4975A651.7060609@comai.to> I'm looking for an Openlayers.js patched with singleroot.3.patch (see Ticket #1666) I have tryed to apply the patch but without success. Could you post a link where can I download an Openlayers patched version. Thanks in advance. -- Stefano Bonnin Comai Torino S.r.l Via Livorno 60, 10144 TORINO Italia http://www.comai.to From listensammler at patzi.de Tue Jan 20 05:25:51 2009 From: listensammler at patzi.de (Fabian Patzke) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem? In-Reply-To: <018701c97ae3$ce0be260$6a23a720$@c.duarte@co.sapo.pt> References: <49759119.7060305@patzi.de> <018701c97ae3$ce0be260$6a23a720$@c.duarte@co.sapo.pt> Message-ID: <4975A6AF.1040604@patzi.de> Joao Duarte schrieb: > ... > I leave you with an example of how doing the last option: > > var lonlat = map.getLonLatFromPixel(e.xy).transform(new > OpenLayers.Projection("EPSG:900913"), new > OpenLayers.Projection("EPSG:32632")); > > I see that you're already performing the transformation, but the source and > destination projections are the same (EPSG:900913). Try the example I gave > you. ...arghs, my fault wanted to do it in the way you told with the transformation, but somehow I messed it up. Without you pointing me on this it could have spend hours without finding it. > Hope it helps, Yes it did ;) Thanks a lot, Fabian From adube at mapgears.com Tue Jan 20 08:41:58 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> Message-ID: <4975D4A6.6000507@mapgears.com> Hi Ivan, Eric, I was actually thinking a similar idea. The more I thought about it, the more I thought about copying/pasting the SelectFeature control, make some changes to the copy and name it HighlightFeature. But Eric's idea is much better. Having the control itself know which feature it has selected + having its own events could enable the possibility of having multiple SelectFeature controls for a single layer. Having both selecting on hover and/or click won't matter except for the style and the renderIntent applied to the selected feature. I guess the last declared control would have the last word of determining those... About that, what if we want 2 different colors for each ctrl ? Having 2 selectfeature ctrls doing the same thing ( hover and click ) is not very logic, but let's say one select on hover, the other on click, it would be nice be able to have 2 different styles for each action. But how could we do that ? (I guess I don't fully understand the whole renderIntent stuff yet... Could we specify a specific renderIntent for the selectFeature ? Could "select" be the default value and we could be able to set our own ?) To do so without changing the renderIntent of the feature is to change its style only, without selecting it. Ivan's idea (selectOnHover:false) sounds good. I'd like to see the code and try it. Ivan, could you share what you've done ? At the same time, I'd like to try to add events to the control and its selectedFeatures array, like Eric said. Finally, I would like to know more about what you think about all this. Best regards, Alexandre Ivan Grcic wrote: > On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine wrote: > >> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube wrote: >> >>> Hi Eric, >>> >>> I took a look at the SelectFeature control. Now I understand what you >>> meant and it makes sense. Also, it's also making sense to have this control >>> have the possibility to highlight on hover or on click. >>> >>> "beforefeaturehighlighted" and "featurehighlighted" events make sense, but >>> a "featureunhighlighted" (or some other term meaning that the feature was >>> highlighted and is now no more) would also be useful. >>> >> Alexandre, >> >> The more I think about this highlight feature control the more I think >> there's no room for both a select feature and a highlight feature >> controls. >> >> > Same opinion here. We already have a bunch of controls, and now adding > two very similar ones... > > Currently im using slightly modified SelectFeature control, i added > one more option to it: selectOnHover, thats how i quickly solved the > problem of only highlighting feature without selecting it. > > If selectOnHover is true, feature is selected&higlighted (select > method is called) on hover, if its false feature is only higlighted, > not selected. > > >> What causes people trouble is that they can't use two select feature >> controls, one in hover mode and the other in click mode. This is >> because once a feature is hovered it is selected, and cannot be >> selected again when it is clicked. >> >> Maybe we could modify the select feature control so that (1) it >> optionally uses its own selectedFeatures array, as opposed to relying >> on the layer's, and (b) defines its own "beforefeatureselected", >> "featureselected" and "featureunselected" event types. In this way, >> one should be able to use two select feature controls, and get >> "featureselected" events, from the first control when features are >> hovered and from the second control when features are clicked. >> >> Tell me what you think, >> >> > > >> -- >> Eric >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Tue Jan 20 08:59:46 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Change size multiple polygons In-Reply-To: <583aacb40901200159s3b7b954bu7c624db73b490906@mail.gmail.com> References: <583aacb40901200159s3b7b954bu7c624db73b490906@mail.gmail.com> Message-ID: <4975D8D2.7080304@mapgears.com> Hi, This is currently not possible with Openlayers, but work in that way is currently being done by OL developers. See : http://dev.openlayers.org/sandbox/topp/editing/examples/snapping.html This tool will someday become available within OL. What you're trying to achieve might be possible with it. Best regards, Alexandre Bas Couwenberg wrote: > Hello, > > in my application I have a WFS layer which shows me all city borders. > Now each city border must touch another one or there will be a piece > of no man's land between them. Is it possible that when I change a > border of one city (polygon) the other touching border automaticly > changes too? So if I make one part smaller the touching polygons > become bigger. > > Best Regards, > > > Bas Couwenberg > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From lorenzetti at gis3w.it Tue Jan 20 09:32:18 2009 From: lorenzetti at gis3w.it (Walter Lorenzetti) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] SelectFeature control and click event on marker Message-ID: <4975E072.70500@gis3w.it> Hi,all is possible activate a SelectFeature control on a vector layer and a a mouseclick event on several marker at the same time? My problem is that is a I activate a SelectFeature control on a map with 'clickable' marke, after I can click on them... ... Thanks in advance Walter -- Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0583 926684 Via di Tofori 123a 55010, Camigliano-S.Gemma Lucca Italy From damarmo at gmail.com Tue Jan 20 10:52:28 2009 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem Message-ID: <9771eb540901200752r4d075deej1930973bda11fdfd@mail.gmail.com> Hello I have a little problem with projections. I create a WMS service for raster images with an EPSG code for Mapserver. "PROJECTION "init=epsg:27572" END" for the map file All layers are with: "wms_srs" "EPSG:27572 EPSG:27582 EPSG:4326" Metadata And my openlayers variable it's defined like: var georoute = new OpenLayers.Layer.WMS("Georoute", " http://10.192.160.148/cgi-bin/mapserv.exe?map=/ms4w/apps/IGN_GeoRoute_Raster_V2/maps/IGN_GeoRoute_Raster_V2.map&SERVICE=WMS&", {"layers": "RGV2_L2e_05kFR_Contenu","format":"png"},{"reproject": true, "isBaseLayer": true,"wrapDateLine": true}); But the only reponse I have it's a mapserver error like the SRS it's not a valid SRS. Can some one help me ? Thanks -- Martinez Morata David Thinking GIS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090120/831626f3/attachment.html From crschmidt at metacarta.com Tue Jan 20 11:09:18 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: <9771eb540901200752r4d075deej1930973bda11fdfd@mail.gmail.com> References: <9771eb540901200752r4d075deej1930973bda11fdfd@mail.gmail.com> Message-ID: <20090120160917.GA10998@metacarta.com> On Tue, Jan 20, 2009 at 04:52:28PM +0100, David Martinez Morata wrote: > Hello > > I have a little problem with projections. > > I create a WMS service for raster images with an EPSG code for Mapserver. > "PROJECTION > "init=epsg:27572" > END" > > for the map file > > All layers are with: > > "wms_srs" "EPSG:27572 EPSG:27582 EPSG:4326" > > Metadata > > And my openlayers variable it's defined like: > > var georoute = new OpenLayers.Layer.WMS("Georoute", " > http://10.192.160.148/cgi-bin/mapserv.exe?map=/ms4w/apps/IGN_GeoRoute_Raster_V2/maps/IGN_GeoRoute_Raster_V2.map&SERVICE=WMS&", > {"layers": "RGV2_L2e_05kFR_Contenu","format":"png"},{"reproject": true, > "isBaseLayer": true,"wrapDateLine": true}); > > But the only reponse I have it's a mapserver error like the SRS it's not a > valid SRS. You haven't shown any place where you declare a projection on your map or layer. Where are you declaring the projection? Regards, -- Christopher Schmidt MetaCarta From damarmo at gmail.com Tue Jan 20 11:15:10 2009 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: <20090120160917.GA10998@metacarta.com> References: <9771eb540901200752r4d075deej1930973bda11fdfd@mail.gmail.com> <20090120160917.GA10998@metacarta.com> Message-ID: <9771eb540901200815j1fe9acb2h3526269928e3e412@mail.gmail.com> All My layers are "PROJECTION "init=epsg:27572" END" definition in the mapfile And the MAP object have the same definition. It's for this I put the value in var georoute definition "reproject": true, in the var options for Openlayers map I define this var options = {numZoomLevels: 30, projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34)}; Thanks -- Martinez Morata David *Thinking GIS* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090120/a54a3bd6/attachment.html From crschmidt at metacarta.com Tue Jan 20 11:27:26 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: <9771eb540901200815j1fe9acb2h3526269928e3e412@mail.gmail.com> References: <9771eb540901200752r4d075deej1930973bda11fdfd@mail.gmail.com> <20090120160917.GA10998@metacarta.com> <9771eb540901200815j1fe9acb2h3526269928e3e412@mail.gmail.com> Message-ID: <20090120162726.GB10998@metacarta.com> On Tue, Jan 20, 2009 at 05:15:10PM +0100, David Martinez Morata wrote: > All My layers are > "PROJECTION > "init=epsg:27572" > END" > definition in the mapfile > > And the MAP object have the same definition. > > It's for this I put the value in var georoute definition > > "reproject": true, > > in the var options for Openlayers map I define this > > var options = {numZoomLevels: 30, > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: "m", > maxResolution: 156543.0339, > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, > 20037508.34)}; You're requesting the map tiles to be in EPSG:900913. EPSG:900913 is not an option in your wms_srs metadata, so the MapServer can't serve tiles inthat projection. If you want to use that projection, add it to wms_srs. Regards, -- Christopher Schmidt MetaCarta From damarmo at gmail.com Tue Jan 20 11:30:22 2009 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: <20090120162726.GB10998@metacarta.com> References: <9771eb540901200752r4d075deej1930973bda11fdfd@mail.gmail.com> <20090120160917.GA10998@metacarta.com> <9771eb540901200815j1fe9acb2h3526269928e3e412@mail.gmail.com> <20090120162726.GB10998@metacarta.com> Message-ID: <9771eb540901200830q259b8a3s249c28030ac08059@mail.gmail.com> I try this but doesn't work. Thnks 2009/1/20 Christopher Schmidt > On Tue, Jan 20, 2009 at 05:15:10PM +0100, David Martinez Morata wrote: > > All My layers are > > "PROJECTION > > "init=epsg:27572" > > END" > > definition in the mapfile > > > > And the MAP object have the same definition. > > > > It's for this I put the value in var georoute definition > > > > "reproject": true, > > > > in the var options for Openlayers map I define this > > > > var options = {numZoomLevels: 30, > > projection: new OpenLayers.Projection("EPSG:900913"), > > displayProjection: new OpenLayers.Projection("EPSG:4326"), > > units: "m", > > maxResolution: 156543.0339, > > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, > > 20037508.34)}; > > You're requesting the map tiles to be in EPSG:900913. EPSG:900913 is not > an option in your wms_srs metadata, so the MapServer can't serve tiles > inthat projection. If you want to use that projection, add it to > wms_srs. > > Regards, > -- > Christopher Schmidt > MetaCarta > -- Martinez Morata David Thinking GIS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090120/44b28926/attachment.html From bpederse at gmail.com Tue Jan 20 11:36:16 2009 From: bpederse at gmail.com (Brent Pedersen) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: <9771eb540901200830q259b8a3s249c28030ac08059@mail.gmail.com> References: <9771eb540901200752r4d075deej1930973bda11fdfd@mail.gmail.com> <20090120160917.GA10998@metacarta.com> <9771eb540901200815j1fe9acb2h3526269928e3e412@mail.gmail.com> <20090120162726.GB10998@metacarta.com> <9771eb540901200830q259b8a3s249c28030ac08059@mail.gmail.com> Message-ID: seems you're requesting the layer in 900913, but that's not listed in your wms_srs list. what happens if you add 900913 to the list? On Tue, Jan 20, 2009 at 8:30 AM, David Martinez Morata wrote: > I try this but doesn't work. > > Thnks > > > 2009/1/20 Christopher Schmidt >> >> On Tue, Jan 20, 2009 at 05:15:10PM +0100, David Martinez Morata wrote: >> > All My layers are >> > "PROJECTION >> > "init=epsg:27572" >> > END" >> > definition in the mapfile >> > >> > And the MAP object have the same definition. >> > >> > It's for this I put the value in var georoute definition >> > >> > "reproject": true, >> > >> > in the var options for Openlayers map I define this >> > >> > var options = {numZoomLevels: 30, >> > projection: new OpenLayers.Projection("EPSG:900913"), >> > displayProjection: new OpenLayers.Projection("EPSG:4326"), >> > units: "m", >> > maxResolution: 156543.0339, >> > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, >> > 20037508.34)}; >> >> You're requesting the map tiles to be in EPSG:900913. EPSG:900913 is not >> an option in your wms_srs metadata, so the MapServer can't serve tiles >> inthat projection. If you want to use that projection, add it to >> wms_srs. >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta > > > > -- > Martinez Morata David > Thinking GIS > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From damarmo at gmail.com Tue Jan 20 14:27:55 2009 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: References: <9771eb540901200752r4d075deej1930973bda11fdfd@mail.gmail.com> <20090120160917.GA10998@metacarta.com> <9771eb540901200815j1fe9acb2h3526269928e3e412@mail.gmail.com> <20090120162726.GB10998@metacarta.com> <9771eb540901200830q259b8a3s249c28030ac08059@mail.gmail.com> Message-ID: <9771eb540901201127o516f938frfba7b97e3b3bfef5@mail.gmail.com> I try this...But don't works What ever i continue tomoroww Thanks 2009/1/20 Brent Pedersen > seems you're requesting the layer in 900913, but that's not listed in > your wms_srs list. what happens if you add 900913 to the list? > > > On Tue, Jan 20, 2009 at 8:30 AM, David Martinez Morata > wrote: > > I try this but doesn't work. > > > > Thnks > > > > > > 2009/1/20 Christopher Schmidt > >> > >> On Tue, Jan 20, 2009 at 05:15:10PM +0100, David Martinez Morata wrote: > >> > All My layers are > >> > "PROJECTION > >> > "init=epsg:27572" > >> > END" > >> > definition in the mapfile > >> > > >> > And the MAP object have the same definition. > >> > > >> > It's for this I put the value in var georoute definition > >> > > >> > "reproject": true, > >> > > >> > in the var options for Openlayers map I define this > >> > > >> > var options = {numZoomLevels: 30, > >> > projection: new OpenLayers.Projection("EPSG:900913"), > >> > displayProjection: new OpenLayers.Projection("EPSG:4326"), > >> > units: "m", > >> > maxResolution: 156543.0339, > >> > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, > >> > 20037508.34)}; > >> > >> You're requesting the map tiles to be in EPSG:900913. EPSG:900913 is not > >> an option in your wms_srs metadata, so the MapServer can't serve tiles > >> inthat projection. If you want to use that projection, add it to > >> wms_srs. > >> > >> Regards, > >> -- > >> Christopher Schmidt > >> MetaCarta > > > > > > > > -- > > Martinez Morata David > > Thinking GIS > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > -- Martinez Morata David Thinking GIS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090120/14d713cc/attachment.html From arnd.wippermann at web.de Tue Jan 20 15:04:51 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: <9771eb540901201127o516f938frfba7b97e3b3bfef5@mail.gmail.com> Message-ID: Hi, perhaps the projection EPSG:900913 is not defined in your espg-file in the proj-directory for Mapserver Arnd Wippermann _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von David Martinez Morata Gesendet: Dienstag, 20. Januar 2009 20:28 An: Brent Pedersen Cc: users Betreff: Re: [OpenLayers-Users] Projection problem I try this... But don't works What ever i continue tomoroww Thanks 2009/1/20 Brent Pedersen seems you're requesting the layer in 900913, but that's not listed in your wms_srs list. what happens if you add 900913 to the list? On Tue, Jan 20, 2009 at 8:30 AM, David Martinez Morata wrote: > I try this but doesn't work. > > Thnks > > > 2009/1/20 Christopher Schmidt >> >> On Tue, Jan 20, 2009 at 05:15:10PM +0100, David Martinez Morata wrote: >> > All My layers are >> > "PROJECTION >> > "init=epsg:27572" >> > END" >> > definition in the mapfile >> > >> > And the MAP object have the same definition. >> > >> > It's for this I put the value in var georoute definition >> > >> > "reproject": true, >> > >> > in the var options for Openlayers map I define this >> > >> > var options = {numZoomLevels: 30, >> > projection: new OpenLayers.Projection("EPSG:900913"), >> > displayProjection: new OpenLayers.Projection("EPSG:4326"), >> > units: "m", >> > maxResolution: 156543.0339, >> > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, >> > 20037508.34)}; >> >> You're requesting the map tiles to be in EPSG:900913. EPSG:900913 is not >> an option in your wms_srs metadata, so the MapServer can't serve tiles >> inthat projection. If you want to use that projection, add it to >> wms_srs. >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta > > > > -- > Martinez Morata David > Thinking GIS > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Martinez Morata David Thinking GIS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090120/6623c8a4/attachment.html From eric.c2c at gmail.com Tue Jan 20 15:28:04 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] SelectFeature control and click event on marker In-Reply-To: <4975E072.70500@gis3w.it> References: <4975E072.70500@gis3w.it> Message-ID: <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> Hi You can configure your select feature control with multiple:true. Eric 2009/1/20, Walter Lorenzetti : > Hi,all > > is possible activate a SelectFeature control on a vector layer and a a > mouseclick event on several marker at the same time? > > My problem is that is a I activate a SelectFeature control on a map with > 'clickable' marke, after I can click on them... > > ... > > Thanks in advance > Walter > > -- > > Walter Lorenzetti > email: lorenzetti@gis3w.it > skype: aiki74 > Cell: (+39) 347-6597931 Tel+Fax: (+39) 0583 926684 > Via di Tofori 123a 55010, Camigliano-S.Gemma Lucca > Italy > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From crschmidt at metacarta.com Tue Jan 20 19:08:25 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] How to get WPServer to work behind Tomcat/Jython In-Reply-To: <254977.56764.qm@web30803.mail.mud.yahoo.com> References: <20090118230714.GC1745@metacarta.com> <254977.56764.qm@web30803.mail.mud.yahoo.com> Message-ID: <20090121000824.GD10998@metacarta.com> On Mon, Jan 19, 2009 at 07:24:08PM -0800, Ming Ya Jiang wrote: > Sorry about intrusion on to this forum,? but I was unable to find a specific > forum on WPServer/FeatureServer, and I find this forum to be tangentially related. http://openlayers.org/mailman/listinfo/featureserver > I am looking at your wonderful WPServer to achieve the goal of doing > some basic processing of geojson features like buffering and > intersection. > > I need to get WPserver to work behind tomcat /Jython. Good luck. I've never run Tomcat, have no experience with it, and don't have any advice. > ?? I saw a > older blog of yours (technical ramblings) that talked about Jython and > featureserver that talked about that it is relatively easy to achieve > this.? FeatureServer and WPServer are different, in that the 'core' functionality of WPServer primarily depends on C code (in GDAL), though if you wrote pure-Python actions, they could work under jython, I suppose. I suppose you could also write JTS bindings, I assume. > I was able to install Jython, and got basic Python servlet example > working, so I know that my Jython and servlet installation is working > with tomcat.? > > I also was able to get wpsdemo to work behind tomcat, so I know that > my python and GDAL installation is working. > > Now the question is how do I get it to run in tomcat, perhaps there is > a simple handler python script that need to be built ? I have no idea. > Being a complete novice in Python/Jython, I'd like to get some quick pointers on how to do that. At this point, you have about an order of magnitude more experience than me in Jython working with Tomcat, so I think you're on your own. Best of luck. Regards, -- Christopher Schmidt MetaCarta From dave.potts at pinan.co.uk Tue Jan 20 19:58:37 2009 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Appliaction loads the first google tile and then gives up In-Reply-To: <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> Message-ID: <4976733D.1070605@pinan.co.uk> Hi Am trying to load a google map via the gwt plug in and its not working. As far as I can tell openlayers is correctly requesting the map tiles from google maps(I have traced the net connection via firefox and you can see all the tiles being downloaded) When the program loads, a google map is shown in the left hand side of the viewport, but its cliped to about a 3rd of the viewport. If you scroll to the left or the right, the next tile is loaded, the image now takes up two thirds of the viewport. If you scroll to far to the right, the image drops back to left hand 1/3 of the viewport. As far as I can make out I have zoomed to Extends of the map(I do this after the map is loaded) I have the projection set to EPGS:900913 ie Sperical Mercator. The maxResolution is set. I have tried the program with displayOutsideMaxExtent set to both true or false, it does not appear to effect the result. Setting a listener for a map loaded finshed loading event, never gets called? If I chage to map, a wms server everything seems to work correctly Whap appears to be happening, is thats gives up after loading the first tile, had any body seen anything like this before? Dave. -------------- next part -------------- A non-text attachment was scrubbed... Name: dave_potts.vcf Type: text/x-vcard Size: 85 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090121/c9620ecb/dave_potts.vcf From jvanulde at nrcan.gc.ca Wed Jan 21 00:24:07 2009 From: jvanulde at nrcan.gc.ca (Semantica) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Request & ProxyHost Question Message-ID: <1232515447079-2190618.post@n2.nabble.com> Hi all, I am considering doing my getLegend requests via XMLHTTPRequest instead of img.src and have run into the common problem of cross-site scripting errors. Does someone have an example on how to work around this issue using a proxy-host or something else? Out of interest, what does OL use to load the map images from a WMS? Does it use the OpenLayers.ProxyHost? Thank you in advance! -- View this message in context: http://n2.nabble.com/Request---ProxyHost-Question-tp2190618p2190618.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Wed Jan 21 01:51:05 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <4975D4A6.6000507@mapgears.com> References: <496F5EA9.2050203@mapgears.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> <4975D4A6.6000507@mapgears.com> Message-ID: <5ec103de0901202251t17fd951m162839d4933e4098@mail.gmail.com> Hi A first note. The current select feature implementation should accomodate this use case: two controls on the same layer, one working on click and the other on hover, only one of them actually changing the feature style. This is achievable by registering a beforefeatureselected listener, and have this listener return false. Adding beforefeatureunselected might help fully accomodate that use case. Now if we want the two controls to do feature styling, we need the stuff I mentioned previously - per-control selectedFeatures arrays and events. But this is unfortunately not sufficient. Use case: two controls, one working on click and the other on hover, both doing feature styling but with different render intents. If we have this sequence "mouse goes over feature, mouse clicks feature, mouse goes out of feature", then the feature ends up being rendered with the "default" render intent, while it's still selected from the click control's perspective. In most cases, this isn't desirable I think. At this point I don't have a solution to the above issue. Eric 2009/1/20, Alexandre Dube : > Hi Ivan, Eric, > > I was actually thinking a similar idea. The more I thought about it, > the more I thought about copying/pasting the SelectFeature control, make > some changes to the copy and name it HighlightFeature. But Eric's idea > is much better. > > Having the control itself know which feature it has selected + having > its own events could enable the possibility of having multiple > SelectFeature controls for a single layer. Having both selecting on > hover and/or click won't matter except for the style and the > renderIntent applied to the selected feature. I guess the last declared > control would have the last word of determining those... > > About that, what if we want 2 different colors for each ctrl ? Having > 2 selectfeature ctrls doing the same thing ( hover and click ) is not > very logic, but let's say one select on hover, the other on click, it > would be nice be able to have 2 different styles for each action. But > how could we do that ? (I guess I don't fully understand the whole > renderIntent stuff yet... Could we specify a specific renderIntent for > the selectFeature ? Could "select" be the default value and we could be > able to set our own ?) To do so without changing the renderIntent of > the feature is to change its style only, without selecting it. > > Ivan's idea (selectOnHover:false) sounds good. I'd like to see the > code and try it. Ivan, could you share what you've done ? At the same > time, I'd like to try to add events to the control and its > selectedFeatures array, like Eric said. > > Finally, I would like to know more about what you think about all this. > > Best regards, > > Alexandre > > Ivan Grcic wrote: >> On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine wrote: >> >>> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube >>> wrote: >>> >>>> Hi Eric, >>>> >>>> I took a look at the SelectFeature control. Now I understand what you >>>> meant and it makes sense. Also, it's also making sense to have this >>>> control >>>> have the possibility to highlight on hover or on click. >>>> >>>> "beforefeaturehighlighted" and "featurehighlighted" events make sense, >>>> but >>>> a "featureunhighlighted" (or some other term meaning that the feature >>>> was >>>> highlighted and is now no more) would also be useful. >>>> >>> Alexandre, >>> >>> The more I think about this highlight feature control the more I think >>> there's no room for both a select feature and a highlight feature >>> controls. >>> >>> >> Same opinion here. We already have a bunch of controls, and now adding >> two very similar ones... >> >> Currently im using slightly modified SelectFeature control, i added >> one more option to it: selectOnHover, thats how i quickly solved the >> problem of only highlighting feature without selecting it. >> >> If selectOnHover is true, feature is selected&higlighted (select >> method is called) on hover, if its false feature is only higlighted, >> not selected. >> >> >>> What causes people trouble is that they can't use two select feature >>> controls, one in hover mode and the other in click mode. This is >>> because once a feature is hovered it is selected, and cannot be >>> selected again when it is clicked. >>> >>> Maybe we could modify the select feature control so that (1) it >>> optionally uses its own selectedFeatures array, as opposed to relying >>> on the layer's, and (b) defines its own "beforefeatureselected", >>> "featureselected" and "featureunselected" event types. In this way, >>> one should be able to use two select feature controls, and get >>> "featureselected" events, from the first control when features are >>> hovered and from the second control when features are clicked. >>> >>> Tell me what you think, >>> >>> >> >> >>> -- >>> Eric >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > From lorenzetti at gis3w.it Wed Jan 21 03:05:17 2009 From: lorenzetti at gis3w.it (Walter Lorenzetti) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] SelectFeature control and click event on marker In-Reply-To: <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> Message-ID: <4976D73D.50708@gis3w.it> Eric Lemoine ha scritto: > Hi > Hi Eric, and thanks for reply > You can configure your select feature control with multiple:true. > I try but nothing else... Sorry but I explain me bad: On my OL application I've a WFS layer and several MARKERS layer clickable with popup I'd like open a popup on select (or click) event on WFS features at the same time of mousedown feature MARKERS layer event... In my init() function I've: // ad my wfs and base layer map.addLayers([base,wfs]); // creation of select feature control selectControl = new OpenLayers.Control.SelectFeature(wfs,{onSelect: function(){alert('pippo')}, onUnselect: function(){}, hover:false, multiple:true}); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(selectControl); selectControl.activate(); // att this point I add my serveral MARKER layers for (var tp in legDbTipo){ map.addLayer(puntiInfo[tp]); } Now with this configuration I can select my feature on wfs layer but I can't select my wfs features.. I explain me better? What I want tot do is possible? Thanks Walter > Eric > > 2009/1/20, Walter Lorenzetti : > >> Hi,all >> >> is possible activate a SelectFeature control on a vector layer and a a >> mouseclick event on several marker at the same time? >> >> My problem is that is a I activate a SelectFeature control on a map with >> 'clickable' marke, after I can click on them... >> >> ... >> >> Thanks in advance >> Walter >> >> -- >> >> Walter Lorenzetti >> email: lorenzetti@gis3w.it >> skype: aiki74 >> Cell: (+39) 347-6597931 Tel+Fax: (+39) 0583 926684 >> Via di Tofori 123a 55010, Camigliano-S.Gemma Lucca >> Italy >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> -- Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0583 926684 Via di Tofori 123a 55010, Camigliano-S.Gemma Lucca Italy From lorenzetti at gis3w.it Wed Jan 21 03:05:31 2009 From: lorenzetti at gis3w.it (Walter Lorenzetti) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] SelectFeature control and click event on marker In-Reply-To: <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> Message-ID: <4976D74B.1000308@gis3w.it> Eric Lemoine ha scritto: > Hi > Hi Eric, and thanks for reply > You can configure your select feature control with multiple:true. > I try but nothing else... Sorry but I explain me bad: On my OL application I've a WFS layer and several MARKERS layer clickable with popup I'd like open a popup on select (or click) event on WFS features at the same time of mousedown feature MARKERS layer event... In my init() function I've: // ad my wfs and base layer map.addLayers([base,wfs]); // creation of select feature control selectControl = new OpenLayers.Control.SelectFeature(wfs,{onSelect: function(){alert('pippo')}, onUnselect: function(){}, hover:false, multiple:true}); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(selectControl); selectControl.activate(); // att this point I add my serveral MARKER layers for (var tp in legDbTipo){ map.addLayer(puntiInfo[tp]); } Now with this configuration I can select my feature on wfs layer but I can't select my wfs features.. I explain me better? What I want tot do is possible? Thanks Walter > Eric > > 2009/1/20, Walter Lorenzetti : > >> Hi,all >> >> is possible activate a SelectFeature control on a vector layer and a a >> mouseclick event on several marker at the same time? >> >> My problem is that is a I activate a SelectFeature control on a map with >> 'clickable' marke, after I can click on them... >> >> ... >> >> Thanks in advance >> Walter >> >> -- >> >> Walter Lorenzetti >> email: lorenzetti@gis3w.it >> skype: aiki74 >> Cell: (+39) 347-6597931 Tel+Fax: (+39) 0583 926684 >> Via di Tofori 123a 55010, Camigliano-S.Gemma Lucca >> Italy >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> -- Walter Lorenzetti email: lorenzetti@gis3w.it skype: aiki74 Cell: (+39) 347-6597931 Tel+Fax: (+39) 0583 926684 Via di Tofori 123a 55010, Camigliano-S.Gemma Lucca Italy From tschaub at opengeo.org Wed Jan 21 04:29:29 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] Request & ProxyHost Question In-Reply-To: <1232515447079-2190618.post@n2.nabble.com> References: <1232515447079-2190618.post@n2.nabble.com> Message-ID: <4976EAF9.8010602@opengeo.org> Hey- Semantica wrote: > Hi all, > > I am considering doing my getLegend requests via XMLHTTPRequest instead of > img.src and have run into the common problem of cross-site scripting errors. > Does someone have an example on how to work around this issue using a > proxy-host or something else? Out of interest, what does OL use to load the > map images from a WMS? Does it use the OpenLayers.ProxyHost? > The source for image tiles is set via the src attribute on Image objects. That is, img.src = "foo.png". Unless you are relying on the data url scheme (not in IE < 8 ) [1], how do you plan on using the image data you get from your XMLHttpRequest? Referrer spoofing and url caching? If you want to set up a proxy and use OpenLayers.ProxyHost, see if the FAQ helps [2]. [1] http://en.wikipedia.org/wiki/Data_URI_scheme#Web_browser_support [2] http://faq.openlayers.org/proxyhost/all/ > Thank you in advance! -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From jansen.marc at gmx.de Wed Jan 21 05:03:21 2009 From: jansen.marc at gmx.de (Marc Jansen) Date: Wed Sep 1 17:17:05 2010 Subject: [OpenLayers-Users] wrong PX-Coordinates in IE as result of getMousePosition? Message-ID: <4976F2E9.4020109@gmx.de> Hi list, I experienced differences in the returned values from getMousePosition in IE 6 compaired to FF 3. I am not 100% sure but it might be related to this bug: http://trac.openlayers.org/ticket/1268 My setup is as follows: a map without border, margin or text-align specified (but with regular changes in width). The x and y coordinates gathered by the trigger function below seem wrong in IE: /** * Feature Info */ OpenLayers.Control.FeatureInfoClick = OpenLayers.Class(OpenLayers.Control, { defaultHandlerOptions: { 'single': true, 'double': false, 'pixelTolerance': 3, 'stopSingle': false, 'stopDouble': false }, initialize: function(options) { this.handlerOptions = OpenLayers.Util.extend( {}, this.defaultHandlerOptions ); OpenLayers.Control.prototype.initialize.apply( this, arguments ); this.handler = new OpenLayers.Handler.Click( this, { 'click': this.trigger }, this.handlerOptions ); }, trigger: function(e) { // humpty is a WMS layer var url = humpty.getFullRequestString({ REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: humpty.map.getExtent().toBBOX(), X: e.xy.x, Y: e.xy.y, INFO_FORMAT: 'text/html', QUERY_LAYERS: humpty.params.LAYERS + "," + dumpty.params.LAYERS, WIDTH: humpty.map.size.w, HEIGHT: humpty.map.size.h}); OpenLayers.loadURL(url, '', this, setHTML); } }); Can anyone confirm my observed error is due to http://trac.openlayers.org/ticket/1268? Is there another (better) way of doing the above? Thanks in advance, Marc () From damarmo at gmail.com Wed Jan 21 05:43:44 2009 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: References: <9771eb540901201127o516f938frfba7b97e3b3bfef5@mail.gmail.com> Message-ID: <9771eb540901210243r6f4d96cel7d19d28e35082752@mail.gmail.com> Ok I test change the vector layer for a epsg:27572 code (my layers are in this SRS) ands i have the same problem I think I couldn't make two reprojections of my layers in the server.(?) Thnks for any other sugestion 2009/1/20 Arnd Wippermann > Hi, > > perhaps the projection EPSG:900913 is not defined in your espg-file in the > proj-directory for Mapserver > > Arnd Wippermann > > ------------------------------ > *Von:* users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > *Im Auftrag von *David Martinez Morata > *Gesendet:* Dienstag, 20. Januar 2009 20:28 > *An:* Brent Pedersen > *Cc:* users > *Betreff:* Re: [OpenLayers-Users] Projection problem > > I try this... But don't works > > What ever i continue tomoroww > Thanks > > > > 2009/1/20 Brent Pedersen > >> seems you're requesting the layer in 900913, but that's not listed in >> your wms_srs list. what happens if you add 900913 to the list? >> >> >> On Tue, Jan 20, 2009 at 8:30 AM, David Martinez Morata >> wrote: >> > I try this but doesn't work. >> > >> > Thnks >> > >> > >> > 2009/1/20 Christopher Schmidt >> >> >> >> On Tue, Jan 20, 2009 at 05:15:10PM +0100, David Martinez Morata wrote: >> >> > All My layers are >> >> > "PROJECTION >> >> > "init=epsg:27572" >> >> > END" >> >> > definition in the mapfile >> >> > >> >> > And the MAP object have the same definition. >> >> > >> >> > It's for this I put the value in var georoute definition >> >> > >> >> > "reproject": true, >> >> > >> >> > in the var options for Openlayers map I define this >> >> > >> >> > var options = {numZoomLevels: 30, >> >> > projection: new OpenLayers.Projection("EPSG:900913"), >> >> > displayProjection: new OpenLayers.Projection("EPSG:4326"), >> >> > units: "m", >> >> > maxResolution: 156543.0339, >> >> > maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, >> >> > 20037508.34)}; >> >> >> >> You're requesting the map tiles to be in EPSG:900913. EPSG:900913 is >> not >> >> an option in your wms_srs metadata, so the MapServer can't serve tiles >> >> inthat projection. If you want to use that projection, add it to >> >> wms_srs. >> >> >> >> Regards, >> >> -- >> >> Christopher Schmidt >> >> MetaCarta >> > >> > >> > >> > -- >> > Martinez Morata David >> > Thinking GIS >> > >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> > >> > > > > -- > Martinez Morata David > Thinking GIS > -- Martinez Morata David Thinking GIS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090121/8c503558/attachment.html From crschmidt at metacarta.com Wed Jan 21 06:45:06 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: <9771eb540901210243r6f4d96cel7d19d28e35082752@mail.gmail.com> References: <9771eb540901201127o516f938frfba7b97e3b3bfef5@mail.gmail.com> <9771eb540901210243r6f4d96cel7d19d28e35082752@mail.gmail.com> Message-ID: <20090121114506.GH10998@metacarta.com> On Wed, Jan 21, 2009 at 11:43:44AM +0100, David Martinez Morata wrote: > Ok > > I test change the vector layer for a epsg:27572 code (my layers are in this > SRS) ands i have the same problem > I think I couldn't make two reprojections of my layers in the server.(?) > Thnks for any other sugestion I think you're really not providing enough information to be helpful here. 1. Find a URL that isn't working. (Right click on an image, 'Copy URL'). 2. Find the SRS in that URL. 3. Find the WEB section of your mapfile as it is when you find that URL. My guess is that -- assuming the error message is the same as before -- the problem is that the SRS in that URL and the wms_srs string do not match. That is the *only* reason you get taht error message from MapServer. If they really do match, share the URL, and the full mapfile, with the list. If the error message or behavior has *changed*, you need to share what it has changed to. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Jan 21 06:48:58 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Request & ProxyHost Question In-Reply-To: <4976EAF9.8010602@opengeo.org> References: <1232515447079-2190618.post@n2.nabble.com> <4976EAF9.8010602@opengeo.org> Message-ID: <20090121114857.GI10998@metacarta.com> On Wed, Jan 21, 2009 at 02:29:29AM -0700, Tim Schaub wrote: > Hey- > > Semantica wrote: > > Hi all, > > > > I am considering doing my getLegend requests via XMLHTTPRequest instead of > > img.src and have run into the common problem of cross-site scripting errors. > > Does someone have an example on how to work around this issue using a > > proxy-host or something else? Out of interest, what does OL use to load the > > map images from a WMS? Does it use the OpenLayers.ProxyHost? > > > > The source for image tiles is set via the src attribute on Image > objects. That is, img.src = "foo.png". > > Unless you are relying on the data url scheme (not in IE < 8 ) [1], how > do you plan on using the image data you get from your XMLHttpRequest? > Referrer spoofing and url caching? http://code.google.com/support/bin/answer.py?answer=79663&topic=11366#scenario1 is a perfectly reasonable way to fetch image data via XMLHttpRequest. (This has come up in OpenLayers Dev discussions in the past: http://openlayers.org/pipermail/dev/2007-November/001932.html) Regards, -- Christopher Schmidt MetaCarta From adube at mapgears.com Wed Jan 21 08:34:30 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901202251t17fd951m162839d4933e4098@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> <4975D4A6.6000507@mapgears.com> <5ec103de0901202251t17fd951m162839d4933e4098@mail.gmail.com> Message-ID: <49772466.3020603@mapgears.com> Hey Eric, Ivan, That issue could occur if both controls would actually change the renderIntent of the feature ( without actually selecting the feature ). Let's assume that you can only have one feature hovered at a time ( only one feature can be hovered by the mouse). That said, we could have its renderIntent copied to a this.oldRenderIntent local property, then on "beforefeatureunselected" restore the feature with its old renderIntent. What do you think ? Simple but that could work. Also, can we agree on this : 2 SelectFeature controls both doing selection by click or both by hover are not compatible with multiple styling, so let's forget about this for now. I'll definitively have to try all this soon. Alexandre Eric Lemoine wrote: > Hi > > A first note. The current select feature implementation should > accomodate this use case: two controls on the same layer, one working > on click and the other on hover, only one of them actually changing > the feature style. This is achievable by registering a > beforefeatureselected listener, and have this listener return false. > Adding beforefeatureunselected might help fully accomodate that use > case. > > Now if we want the two controls to do feature styling, we need the > stuff I mentioned previously - per-control selectedFeatures arrays and > events. But this is unfortunately not sufficient. Use case: two > controls, one working on click and the other on hover, both doing > feature styling but with different render intents. If we have this > sequence "mouse goes over feature, mouse clicks feature, mouse goes > out of feature", then the feature ends up being rendered with the > "default" render intent, while it's still selected from the click > control's perspective. In most cases, this isn't desirable I think. > > At this point I don't have a solution to the above issue. > > Eric > > 2009/1/20, Alexandre Dube : > >> Hi Ivan, Eric, >> >> I was actually thinking a similar idea. The more I thought about it, >> the more I thought about copying/pasting the SelectFeature control, make >> some changes to the copy and name it HighlightFeature. But Eric's idea >> is much better. >> >> Having the control itself know which feature it has selected + having >> its own events could enable the possibility of having multiple >> SelectFeature controls for a single layer. Having both selecting on >> hover and/or click won't matter except for the style and the >> renderIntent applied to the selected feature. I guess the last declared >> control would have the last word of determining those... >> >> About that, what if we want 2 different colors for each ctrl ? Having >> 2 selectfeature ctrls doing the same thing ( hover and click ) is not >> very logic, but let's say one select on hover, the other on click, it >> would be nice be able to have 2 different styles for each action. But >> how could we do that ? (I guess I don't fully understand the whole >> renderIntent stuff yet... Could we specify a specific renderIntent for >> the selectFeature ? Could "select" be the default value and we could be >> able to set our own ?) To do so without changing the renderIntent of >> the feature is to change its style only, without selecting it. >> >> Ivan's idea (selectOnHover:false) sounds good. I'd like to see the >> code and try it. Ivan, could you share what you've done ? At the same >> time, I'd like to try to add events to the control and its >> selectedFeatures array, like Eric said. >> >> Finally, I would like to know more about what you think about all this. >> >> Best regards, >> >> Alexandre >> >> Ivan Grcic wrote: >> >>> On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine wrote: >>> >>> >>>> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube >>>> wrote: >>>> >>>> >>>>> Hi Eric, >>>>> >>>>> I took a look at the SelectFeature control. Now I understand what you >>>>> meant and it makes sense. Also, it's also making sense to have this >>>>> control >>>>> have the possibility to highlight on hover or on click. >>>>> >>>>> "beforefeaturehighlighted" and "featurehighlighted" events make sense, >>>>> but >>>>> a "featureunhighlighted" (or some other term meaning that the feature >>>>> was >>>>> highlighted and is now no more) would also be useful. >>>>> >>>>> >>>> Alexandre, >>>> >>>> The more I think about this highlight feature control the more I think >>>> there's no room for both a select feature and a highlight feature >>>> controls. >>>> >>>> >>>> >>> Same opinion here. We already have a bunch of controls, and now adding >>> two very similar ones... >>> >>> Currently im using slightly modified SelectFeature control, i added >>> one more option to it: selectOnHover, thats how i quickly solved the >>> problem of only highlighting feature without selecting it. >>> >>> If selectOnHover is true, feature is selected&higlighted (select >>> method is called) on hover, if its false feature is only higlighted, >>> not selected. >>> >>> >>> >>>> What causes people trouble is that they can't use two select feature >>>> controls, one in hover mode and the other in click mode. This is >>>> because once a feature is hovered it is selected, and cannot be >>>> selected again when it is clicked. >>>> >>>> Maybe we could modify the select feature control so that (1) it >>>> optionally uses its own selectedFeatures array, as opposed to relying >>>> on the layer's, and (b) defines its own "beforefeatureselected", >>>> "featureselected" and "featureunselected" event types. In this way, >>>> one should be able to use two select feature controls, and get >>>> "featureselected" events, from the first control when features are >>>> hovered and from the second control when features are clicked. >>>> >>>> Tell me what you think, >>>> >>>> >>>> >>> >>>> -- >>>> Eric >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>>> >>> >>> >>> >> -- >> Alexandre Dub? >> Mapgears >> www.mapgears.com >> >> >> -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Wed Jan 21 08:42:23 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] SelectFeature control and click event on marker In-Reply-To: <4976D73D.50708@gis3w.it> References: <4975E072.70500@gis3w.it> <5ec103de0901201228s399b78ffhd0a6d6122b97e128@mail.gmail.com> <4976D73D.50708@gis3w.it> Message-ID: <4977263F.1000602@mapgears.com> Currently, OpenLayers doesn't support feature selection from multiple layers with a unique selectfeature control. But developers are working on this. See Andreas last answer : http://n2.nabble.com/Problem-with-multiple-SelectFeature-controls-td2156949.html#a2156949 Best regards, Alexandre Walter Lorenzetti wrote: > Eric Lemoine ha scritto: > >> Hi >> >> > Hi Eric, and thanks for reply > >> You can configure your select feature control with multiple:true. >> >> > I try but nothing else... > > Sorry but I explain me bad: > On my OL application I've a WFS layer and several MARKERS layer > clickable with popup > I'd like open a popup on select (or click) event on WFS features at the > same time of mousedown feature MARKERS layer event... > > In my init() function I've: > > // ad my wfs and base layer > > map.addLayers([base,wfs]); > > // creation of select feature control > selectControl = new OpenLayers.Control.SelectFeature(wfs,{onSelect: > function(){alert('pippo')}, onUnselect: function(){}, hover:false, > multiple:true}); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(selectControl); > selectControl.activate(); > > // att this point I add my serveral MARKER layers > for (var tp in legDbTipo){ > > map.addLayer(puntiInfo[tp]); > > } > > Now with this configuration I can select my feature on wfs layer but I > can't select my wfs features.. > > I explain me better? > > What I want tot do is possible? > > Thanks > Walter > > >> Eric >> >> 2009/1/20, Walter Lorenzetti : >> >> >>> Hi,all >>> >>> is possible activate a SelectFeature control on a vector layer and a a >>> mouseclick event on several marker at the same time? >>> >>> My problem is that is a I activate a SelectFeature control on a map with >>> 'clickable' marke, after I can click on them... >>> >>> ... >>> >>> Thanks in advance >>> Walter >>> >>> -- >>> >>> Walter Lorenzetti >>> email: lorenzetti@gis3w.it >>> skype: aiki74 >>> Cell: (+39) 347-6597931 Tel+Fax: (+39) 0583 926684 >>> Via di Tofori 123a 55010, Camigliano-S.Gemma Lucca >>> Italy >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> > > > -- Alexandre Dub? Mapgears www.mapgears.com From damarmo at gmail.com Wed Jan 21 08:45:43 2009 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Projection problem In-Reply-To: <20090121114506.GH10998@metacarta.com> References: <9771eb540901201127o516f938frfba7b97e3b3bfef5@mail.gmail.com> <9771eb540901210243r6f4d96cel7d19d28e35082752@mail.gmail.com> <20090121114506.GH10998@metacarta.com> Message-ID: <9771eb540901210545q7af03002u27cedbb96417892c@mail.gmail.com> Thanks for your answere! But after a great War with all the logs files, html files, map files I WIN!!! Just a estrange space characters in javascript code. Thanks for every body Martinez Morata David *Thinking GIS* 2009/1/21 Christopher Schmidt > > I think you're really not providing enough information to be helpful > here. > > 1. Find a URL that isn't working. (Right click on an image, 'Copy URL'). > > 2. Find the SRS in that URL. > 3. Find the WEB section of your mapfile as it is when you find that > URL. > > My guess is that -- assuming the error message is the same as before -- > the problem is that the SRS in that URL and the wms_srs string do not > match. That is the *only* reason you get taht error message from > MapServer. > > If they really do match, share the URL, and the full mapfile, with the > list. > > If the error message or behavior has *changed*, you need to share what > it has changed to. > > Regards, > -- > Christopher Schmidt > MetaCarta > -- Martinez Morata David Thinking GIS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090121/c1d16a34/attachment.html From andre.matos at co.sapo.pt Wed Jan 21 09:40:45 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] SelectFeature Control Ticket #1666 (new feature) Message-ID: Hi devs and users, Does anyone know if this ticket about select feature control firing events on multiple layers (not just in the topmost layer) will be released soon? Can I use the patch now? What can I do to have this feature? Regards, Andr? Matos http://maps.sapo.pt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090121/1d1179ca/attachment.html From lacertosa_domenick at bah.com Wed Jan 21 09:54:24 2009 From: lacertosa_domenick at bah.com (Dizzle) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Programatically Select a Feature Message-ID: <1232549664468-2192485.post@n2.nabble.com> I have a modify control on a map, and there are multiple features on that map. I also have an associated option for each feature in a select box on the page. When the user changes the select box, I'm having trouble figuring out how to automatically select that feature on the map for use by the modify feature control. Am I missing something, or is this not possible? Thanks. - Dom -- View this message in context: http://n2.nabble.com/Programatically-Select-a-Feature-tp2192485p2192485.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahayes at gcrc.carleton.ca Wed Jan 21 09:56:37 2009 From: ahayes at gcrc.carleton.ca (Amos Hayes) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <49772466.3020603@mapgears.com> References: <496F5EA9.2050203@mapgears.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> <4975D4A6.6000507@mapgears.com> <5ec103de0901202251t17fd951m162839d4933e4098@mail.gmail.com> <49772466.3020603@mapgears.com> Message-ID: <7844F6BA-8627-4919-BE69-662E68814AD7@gcrc.carleton.ca> We've had to implement separate select and hover functionality on top of select feature. If you like, have a look at this work in progress: http://atlas.gcrc.carleton.ca/kitikmeot/ -- Amos Hayes Geomatics and Cartographic Research Centre Carleton University ahayes@gcrc.carleton.ca +1.613.520.2600x8179 On 21-Jan-09, at 8:34 AM, Alexandre Dube wrote: > Hey Eric, Ivan, > > That issue could occur if both controls would actually change the > renderIntent of the feature ( without actually selecting the > feature ). > > Let's assume that you can only have one feature hovered at a time ( > only one feature can be hovered by the mouse). That said, we could > have > its renderIntent copied to a this.oldRenderIntent local property, then > on "beforefeatureunselected" restore the feature with its old > renderIntent. What do you think ? Simple but that could work. > > Also, can we agree on this : 2 SelectFeature controls both doing > selection by click or both by hover are not compatible with multiple > styling, so let's forget about this for now. > > I'll definitively have to try all this soon. > > Alexandre > > Eric Lemoine wrote: >> Hi >> >> A first note. The current select feature implementation should >> accomodate this use case: two controls on the same layer, one working >> on click and the other on hover, only one of them actually changing >> the feature style. This is achievable by registering a >> beforefeatureselected listener, and have this listener return false. >> Adding beforefeatureunselected might help fully accomodate that use >> case. >> >> Now if we want the two controls to do feature styling, we need the >> stuff I mentioned previously - per-control selectedFeatures arrays >> and >> events. But this is unfortunately not sufficient. Use case: two >> controls, one working on click and the other on hover, both doing >> feature styling but with different render intents. If we have this >> sequence "mouse goes over feature, mouse clicks feature, mouse goes >> out of feature", then the feature ends up being rendered with the >> "default" render intent, while it's still selected from the click >> control's perspective. In most cases, this isn't desirable I think. >> >> At this point I don't have a solution to the above issue. >> >> Eric >> >> 2009/1/20, Alexandre Dube : >> >>> Hi Ivan, Eric, >>> >>> I was actually thinking a similar idea. The more I thought about >>> it, >>> the more I thought about copying/pasting the SelectFeature >>> control, make >>> some changes to the copy and name it HighlightFeature. But Eric's >>> idea >>> is much better. >>> >>> Having the control itself know which feature it has selected + >>> having >>> its own events could enable the possibility of having multiple >>> SelectFeature controls for a single layer. Having both selecting on >>> hover and/or click won't matter except for the style and the >>> renderIntent applied to the selected feature. I guess the last >>> declared >>> control would have the last word of determining those... >>> >>> About that, what if we want 2 different colors for each ctrl ? >>> Having >>> 2 selectfeature ctrls doing the same thing ( hover and click ) is >>> not >>> very logic, but let's say one select on hover, the other on click, >>> it >>> would be nice be able to have 2 different styles for each action. >>> But >>> how could we do that ? (I guess I don't fully understand the whole >>> renderIntent stuff yet... Could we specify a specific >>> renderIntent for >>> the selectFeature ? Could "select" be the default value and we >>> could be >>> able to set our own ?) To do so without changing the renderIntent >>> of >>> the feature is to change its style only, without selecting it. >>> >>> Ivan's idea (selectOnHover:false) sounds good. I'd like to see the >>> code and try it. Ivan, could you share what you've done ? At the >>> same >>> time, I'd like to try to add events to the control and its >>> selectedFeatures array, like Eric said. >>> >>> Finally, I would like to know more about what you think about all >>> this. >>> >>> Best regards, >>> >>> Alexandre >>> >>> Ivan Grcic wrote: >>> >>>> On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine >>>> wrote: >>>> >>>> >>>>> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube >>>> > >>>>> wrote: >>>>> >>>>> >>>>>> Hi Eric, >>>>>> >>>>>> I took a look at the SelectFeature control. Now I understand >>>>>> what you >>>>>> meant and it makes sense. Also, it's also making sense to have >>>>>> this >>>>>> control >>>>>> have the possibility to highlight on hover or on click. >>>>>> >>>>>> "beforefeaturehighlighted" and "featurehighlighted" events make >>>>>> sense, >>>>>> but >>>>>> a "featureunhighlighted" (or some other term meaning that the >>>>>> feature >>>>>> was >>>>>> highlighted and is now no more) would also be useful. >>>>>> >>>>>> >>>>> Alexandre, >>>>> >>>>> The more I think about this highlight feature control the more I >>>>> think >>>>> there's no room for both a select feature and a highlight feature >>>>> controls. >>>>> >>>>> >>>>> >>>> Same opinion here. We already have a bunch of controls, and now >>>> adding >>>> two very similar ones... >>>> >>>> Currently im using slightly modified SelectFeature control, i added >>>> one more option to it: selectOnHover, thats how i quickly solved >>>> the >>>> problem of only highlighting feature without selecting it. >>>> >>>> If selectOnHover is true, feature is selected&higlighted (select >>>> method is called) on hover, if its false feature is only >>>> higlighted, >>>> not selected. >>>> >>>> >>>> >>>>> What causes people trouble is that they can't use two select >>>>> feature >>>>> controls, one in hover mode and the other in click mode. This is >>>>> because once a feature is hovered it is selected, and cannot be >>>>> selected again when it is clicked. >>>>> >>>>> Maybe we could modify the select feature control so that (1) it >>>>> optionally uses its own selectedFeatures array, as opposed to >>>>> relying >>>>> on the layer's, and (b) defines its own "beforefeatureselected", >>>>> "featureselected" and "featureunselected" event types. In this >>>>> way, >>>>> one should be able to use two select feature controls, and get >>>>> "featureselected" events, from the first control when features are >>>>> hovered and from the second control when features are clicked. >>>>> >>>>> Tell me what you think, >>>>> >>>>> >>>>> >>>> >>>>> -- >>>>> Eric >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users@openlayers.org >>>>> http://openlayers.org/mailman/listinfo/users >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> -- >>> Alexandre Dub? >>> Mapgears >>> www.mapgears.com >>> >>> >>> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Wed Jan 21 10:17:41 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] SelectFeature Control Ticket #1666 (new feature) In-Reply-To: References: Message-ID: <20090121151740.GJ10998@metacarta.com> On Wed, Jan 21, 2009 at 02:40:45PM +0000, Andre Pereira de Matos wrote: > Can I use the patch now? What can I do to have this feature? This code is still in development. As with all code still in development, it is subject to change. The code is open source: you *can* do anything you want with it. (That said, I'm pretty sure that the sigleroot atch that andreas has been working on will be 'the solution' that I am most in favor of for multiple layer eature selection.) Regards, -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Wed Jan 21 12:17:31 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <7844F6BA-8627-4919-BE69-662E68814AD7@gcrc.carleton.ca> References: <496F5EA9.2050203@mapgears.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> <4975D4A6.6000507@mapgears.com> <5ec103de0901202251t17fd951m162839d4933e4098@mail.gmail.com> <49772466.3020603@mapgears.com> <7844F6BA-8627-4919-BE69-662E68814AD7@gcrc.carleton.ca> Message-ID: <5ec103de0901210917h62a1357cqd04cfa8fb2143c4@mail.gmail.com> Hi Amos What we're trying to do here is come up with code design that doesn't require creating new controls. Eric 2009/1/21, Amos Hayes : > > We've had to implement separate select and hover functionality on top > of select feature. If you like, have a look at this work in progress: > > http://atlas.gcrc.carleton.ca/kitikmeot/ > > -- > Amos Hayes > Geomatics and Cartographic Research Centre > Carleton University > ahayes@gcrc.carleton.ca > +1.613.520.2600x8179 > > On 21-Jan-09, at 8:34 AM, Alexandre Dube wrote: > >> Hey Eric, Ivan, >> >> That issue could occur if both controls would actually change the >> renderIntent of the feature ( without actually selecting the >> feature ). >> >> Let's assume that you can only have one feature hovered at a time ( >> only one feature can be hovered by the mouse). That said, we could >> have >> its renderIntent copied to a this.oldRenderIntent local property, then >> on "beforefeatureunselected" restore the feature with its old >> renderIntent. What do you think ? Simple but that could work. >> >> Also, can we agree on this : 2 SelectFeature controls both doing >> selection by click or both by hover are not compatible with multiple >> styling, so let's forget about this for now. >> >> I'll definitively have to try all this soon. >> >> Alexandre >> >> Eric Lemoine wrote: >>> Hi >>> >>> A first note. The current select feature implementation should >>> accomodate this use case: two controls on the same layer, one working >>> on click and the other on hover, only one of them actually changing >>> the feature style. This is achievable by registering a >>> beforefeatureselected listener, and have this listener return false. >>> Adding beforefeatureunselected might help fully accomodate that use >>> case. >>> >>> Now if we want the two controls to do feature styling, we need the >>> stuff I mentioned previously - per-control selectedFeatures arrays >>> and >>> events. But this is unfortunately not sufficient. Use case: two >>> controls, one working on click and the other on hover, both doing >>> feature styling but with different render intents. If we have this >>> sequence "mouse goes over feature, mouse clicks feature, mouse goes >>> out of feature", then the feature ends up being rendered with the >>> "default" render intent, while it's still selected from the click >>> control's perspective. In most cases, this isn't desirable I think. >>> >>> At this point I don't have a solution to the above issue. >>> >>> Eric >>> >>> 2009/1/20, Alexandre Dube : >>> >>>> Hi Ivan, Eric, >>>> >>>> I was actually thinking a similar idea. The more I thought about >>>> it, >>>> the more I thought about copying/pasting the SelectFeature >>>> control, make >>>> some changes to the copy and name it HighlightFeature. But Eric's >>>> idea >>>> is much better. >>>> >>>> Having the control itself know which feature it has selected + >>>> having >>>> its own events could enable the possibility of having multiple >>>> SelectFeature controls for a single layer. Having both selecting on >>>> hover and/or click won't matter except for the style and the >>>> renderIntent applied to the selected feature. I guess the last >>>> declared >>>> control would have the last word of determining those... >>>> >>>> About that, what if we want 2 different colors for each ctrl ? >>>> Having >>>> 2 selectfeature ctrls doing the same thing ( hover and click ) is >>>> not >>>> very logic, but let's say one select on hover, the other on click, >>>> it >>>> would be nice be able to have 2 different styles for each action. >>>> But >>>> how could we do that ? (I guess I don't fully understand the whole >>>> renderIntent stuff yet... Could we specify a specific >>>> renderIntent for >>>> the selectFeature ? Could "select" be the default value and we >>>> could be >>>> able to set our own ?) To do so without changing the renderIntent >>>> of >>>> the feature is to change its style only, without selecting it. >>>> >>>> Ivan's idea (selectOnHover:false) sounds good. I'd like to see the >>>> code and try it. Ivan, could you share what you've done ? At the >>>> same >>>> time, I'd like to try to add events to the control and its >>>> selectedFeatures array, like Eric said. >>>> >>>> Finally, I would like to know more about what you think about all >>>> this. >>>> >>>> Best regards, >>>> >>>> Alexandre >>>> >>>> Ivan Grcic wrote: >>>> >>>>> On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine >>>>> wrote: >>>>> >>>>> >>>>>> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube >>>>> > >>>>>> wrote: >>>>>> >>>>>> >>>>>>> Hi Eric, >>>>>>> >>>>>>> I took a look at the SelectFeature control. Now I understand >>>>>>> what you >>>>>>> meant and it makes sense. Also, it's also making sense to have >>>>>>> this >>>>>>> control >>>>>>> have the possibility to highlight on hover or on click. >>>>>>> >>>>>>> "beforefeaturehighlighted" and "featurehighlighted" events make >>>>>>> sense, >>>>>>> but >>>>>>> a "featureunhighlighted" (or some other term meaning that the >>>>>>> feature >>>>>>> was >>>>>>> highlighted and is now no more) would also be useful. >>>>>>> >>>>>>> >>>>>> Alexandre, >>>>>> >>>>>> The more I think about this highlight feature control the more I >>>>>> think >>>>>> there's no room for both a select feature and a highlight feature >>>>>> controls. >>>>>> >>>>>> >>>>>> >>>>> Same opinion here. We already have a bunch of controls, and now >>>>> adding >>>>> two very similar ones... >>>>> >>>>> Currently im using slightly modified SelectFeature control, i added >>>>> one more option to it: selectOnHover, thats how i quickly solved >>>>> the >>>>> problem of only highlighting feature without selecting it. >>>>> >>>>> If selectOnHover is true, feature is selected&higlighted (select >>>>> method is called) on hover, if its false feature is only >>>>> higlighted, >>>>> not selected. >>>>> >>>>> >>>>> >>>>>> What causes people trouble is that they can't use two select >>>>>> feature >>>>>> controls, one in hover mode and the other in click mode. This is >>>>>> because once a feature is hovered it is selected, and cannot be >>>>>> selected again when it is clicked. >>>>>> >>>>>> Maybe we could modify the select feature control so that (1) it >>>>>> optionally uses its own selectedFeatures array, as opposed to >>>>>> relying >>>>>> on the layer's, and (b) defines its own "beforefeatureselected", >>>>>> "featureselected" and "featureunselected" event types. In this >>>>>> way, >>>>>> one should be able to use two select feature controls, and get >>>>>> "featureselected" events, from the first control when features are >>>>>> hovered and from the second control when features are clicked. >>>>>> >>>>>> Tell me what you think, >>>>>> >>>>>> >>>>>> >>>>> >>>>>> -- >>>>>> Eric >>>>>> _______________________________________________ >>>>>> Users mailing list >>>>>> Users@openlayers.org >>>>>> http://openlayers.org/mailman/listinfo/users >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> -- >>>> Alexandre Dub? >>>> Mapgears >>>> www.mapgears.com >>>> >>>> >>>> >> >> >> -- >> Alexandre Dub? >> Mapgears >> www.mapgears.com >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > From eric.c2c at gmail.com Wed Jan 21 12:14:58 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <49772466.3020603@mapgears.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> <4975D4A6.6000507@mapgears.com> <5ec103de0901202251t17fd951m162839d4933e4098@mail.gmail.com> <49772466.3020603@mapgears.com> Message-ID: <5ec103de0901210914i4df41c26n66a6bc9ad96f6b9@mail.gmail.com> Yeah, we can't solve that issue without storing some state in a location shared by every control, the feature itself seems the good spot. Eric 2009/1/21, Alexandre Dube : > Hey Eric, Ivan, > > That issue could occur if both controls would actually change the > renderIntent of the feature ( without actually selecting the feature ). > > Let's assume that you can only have one feature hovered at a time ( > only one feature can be hovered by the mouse). That said, we could have > its renderIntent copied to a this.oldRenderIntent local property, then > on "beforefeatureunselected" restore the feature with its old > renderIntent. What do you think ? Simple but that could work. > > Also, can we agree on this : 2 SelectFeature controls both doing > selection by click or both by hover are not compatible with multiple > styling, so let's forget about this for now. > > I'll definitively have to try all this soon. > > Alexandre > > Eric Lemoine wrote: >> Hi >> >> A first note. The current select feature implementation should >> accomodate this use case: two controls on the same layer, one working >> on click and the other on hover, only one of them actually changing >> the feature style. This is achievable by registering a >> beforefeatureselected listener, and have this listener return false. >> Adding beforefeatureunselected might help fully accomodate that use >> case. >> >> Now if we want the two controls to do feature styling, we need the >> stuff I mentioned previously - per-control selectedFeatures arrays and >> events. But this is unfortunately not sufficient. Use case: two >> controls, one working on click and the other on hover, both doing >> feature styling but with different render intents. If we have this >> sequence "mouse goes over feature, mouse clicks feature, mouse goes >> out of feature", then the feature ends up being rendered with the >> "default" render intent, while it's still selected from the click >> control's perspective. In most cases, this isn't desirable I think. >> >> At this point I don't have a solution to the above issue. >> >> Eric >> >> 2009/1/20, Alexandre Dube : >> >>> Hi Ivan, Eric, >>> >>> I was actually thinking a similar idea. The more I thought about it, >>> the more I thought about copying/pasting the SelectFeature control, make >>> some changes to the copy and name it HighlightFeature. But Eric's idea >>> is much better. >>> >>> Having the control itself know which feature it has selected + having >>> its own events could enable the possibility of having multiple >>> SelectFeature controls for a single layer. Having both selecting on >>> hover and/or click won't matter except for the style and the >>> renderIntent applied to the selected feature. I guess the last declared >>> control would have the last word of determining those... >>> >>> About that, what if we want 2 different colors for each ctrl ? Having >>> 2 selectfeature ctrls doing the same thing ( hover and click ) is not >>> very logic, but let's say one select on hover, the other on click, it >>> would be nice be able to have 2 different styles for each action. But >>> how could we do that ? (I guess I don't fully understand the whole >>> renderIntent stuff yet... Could we specify a specific renderIntent for >>> the selectFeature ? Could "select" be the default value and we could be >>> able to set our own ?) To do so without changing the renderIntent of >>> the feature is to change its style only, without selecting it. >>> >>> Ivan's idea (selectOnHover:false) sounds good. I'd like to see the >>> code and try it. Ivan, could you share what you've done ? At the same >>> time, I'd like to try to add events to the control and its >>> selectedFeatures array, like Eric said. >>> >>> Finally, I would like to know more about what you think about all this. >>> >>> Best regards, >>> >>> Alexandre >>> >>> Ivan Grcic wrote: >>> >>>> On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine >>>> wrote: >>>> >>>> >>>>> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube >>>>> wrote: >>>>> >>>>> >>>>>> Hi Eric, >>>>>> >>>>>> I took a look at the SelectFeature control. Now I understand what >>>>>> you >>>>>> meant and it makes sense. Also, it's also making sense to have this >>>>>> control >>>>>> have the possibility to highlight on hover or on click. >>>>>> >>>>>> "beforefeaturehighlighted" and "featurehighlighted" events make >>>>>> sense, >>>>>> but >>>>>> a "featureunhighlighted" (or some other term meaning that the feature >>>>>> was >>>>>> highlighted and is now no more) would also be useful. >>>>>> >>>>>> >>>>> Alexandre, >>>>> >>>>> The more I think about this highlight feature control the more I think >>>>> there's no room for both a select feature and a highlight feature >>>>> controls. >>>>> >>>>> >>>>> >>>> Same opinion here. We already have a bunch of controls, and now adding >>>> two very similar ones... >>>> >>>> Currently im using slightly modified SelectFeature control, i added >>>> one more option to it: selectOnHover, thats how i quickly solved the >>>> problem of only highlighting feature without selecting it. >>>> >>>> If selectOnHover is true, feature is selected&higlighted (select >>>> method is called) on hover, if its false feature is only higlighted, >>>> not selected. >>>> >>>> >>>> >>>>> What causes people trouble is that they can't use two select feature >>>>> controls, one in hover mode and the other in click mode. This is >>>>> because once a feature is hovered it is selected, and cannot be >>>>> selected again when it is clicked. >>>>> >>>>> Maybe we could modify the select feature control so that (1) it >>>>> optionally uses its own selectedFeatures array, as opposed to relying >>>>> on the layer's, and (b) defines its own "beforefeatureselected", >>>>> "featureselected" and "featureunselected" event types. In this way, >>>>> one should be able to use two select feature controls, and get >>>>> "featureselected" events, from the first control when features are >>>>> hovered and from the second control when features are clicked. >>>>> >>>>> Tell me what you think, >>>>> >>>>> >>>>> >>>> >>>>> -- >>>>> Eric >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users@openlayers.org >>>>> http://openlayers.org/mailman/listinfo/users >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> -- >>> Alexandre Dub? >>> Mapgears >>> www.mapgears.com >>> >>> >>> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > From arnd.wippermann at web.de Wed Jan 21 13:52:06 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Programatically Select a Feature In-Reply-To: <1232549664468-2192485.post@n2.nabble.com> Message-ID: Hi, With the Select Control I do it this way: ctrlSelectFeatures = new OpenLayers.Control.SelectFeature(... ctrlSelectFeatures.select(vlyr.features[idx]); The reference to the feature have to come from your select box. An example for the Select Control can be seen here: http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/select-feature-with -function.html Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Dizzle Gesendet: Mittwoch, 21. Januar 2009 15:54 An: users@openlayers.org Betreff: [OpenLayers-Users] Programatically Select a Feature I have a modify control on a map, and there are multiple features on that map. I also have an associated option for each feature in a select box on the page. When the user changes the select box, I'm having trouble figuring out how to automatically select that feature on the map for use by the modify feature control. Am I missing something, or is this not possible? Thanks. - Dom -- View this message in context: http://n2.nabble.com/Programatically-Select-a-Feature-tp2192485p2192485.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 ahayes at gcrc.carleton.ca Wed Jan 21 13:58:38 2009 From: ahayes at gcrc.carleton.ca (Amos Hayes) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901210917h62a1357cqd04cfa8fb2143c4@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> <4975D4A6.6000507@mapgears.com> <5ec103de0901202251t17fd951m162839d4933e4098@mail.gmail.com> <49772466.3020603@mapgears.com> <7844F6BA-8627-4919-BE69-662E68814AD7@gcrc.carleton.ca> <5ec103de0901210917h62a1357cqd04cfa8fb2143c4@mail.gmail.com> Message-ID: <4960A7E9-C2A3-4557-8C82-404805C99CA0@gcrc.carleton.ca> Hi Eric. Yes, I realize that and would love to see it. Since interaction use cases were part of the conversation, I just thought you might be interested in an example of a select/hover/ styling use case that a built-in solution should be able to address. It seems to me it would be a very common use of a dual-mode capable control. -- Amos Hayes Geomatics and Cartographic Research Centre Carleton University ahayes@gcrc.carleton.ca +1.613.520.2600x8179 On 21-Jan-09, at 12:17 PM, Eric Lemoine wrote: > Hi Amos > > What we're trying to do here is come up with code design that doesn't > require creating new controls. > > Eric > > 2009/1/21, Amos Hayes : >> >> We've had to implement separate select and hover functionality on top >> of select feature. If you like, have a look at this work in progress: >> >> http://atlas.gcrc.carleton.ca/kitikmeot/ >> >> -- >> Amos Hayes >> Geomatics and Cartographic Research Centre >> Carleton University >> ahayes@gcrc.carleton.ca >> +1.613.520.2600x8179 >> >> On 21-Jan-09, at 8:34 AM, Alexandre Dube wrote: >> >>> Hey Eric, Ivan, >>> >>> That issue could occur if both controls would actually change the >>> renderIntent of the feature ( without actually selecting the >>> feature ). >>> >>> Let's assume that you can only have one feature hovered at a time ( >>> only one feature can be hovered by the mouse). That said, we could >>> have >>> its renderIntent copied to a this.oldRenderIntent local property, >>> then >>> on "beforefeatureunselected" restore the feature with its old >>> renderIntent. What do you think ? Simple but that could work. >>> >>> Also, can we agree on this : 2 SelectFeature controls both doing >>> selection by click or both by hover are not compatible with multiple >>> styling, so let's forget about this for now. >>> >>> I'll definitively have to try all this soon. >>> >>> Alexandre >>> >>> Eric Lemoine wrote: >>>> Hi >>>> >>>> A first note. The current select feature implementation should >>>> accomodate this use case: two controls on the same layer, one >>>> working >>>> on click and the other on hover, only one of them actually changing >>>> the feature style. This is achievable by registering a >>>> beforefeatureselected listener, and have this listener return >>>> false. >>>> Adding beforefeatureunselected might help fully accomodate that use >>>> case. >>>> >>>> Now if we want the two controls to do feature styling, we need the >>>> stuff I mentioned previously - per-control selectedFeatures arrays >>>> and >>>> events. But this is unfortunately not sufficient. Use case: two >>>> controls, one working on click and the other on hover, both doing >>>> feature styling but with different render intents. If we have this >>>> sequence "mouse goes over feature, mouse clicks feature, mouse goes >>>> out of feature", then the feature ends up being rendered with the >>>> "default" render intent, while it's still selected from the click >>>> control's perspective. In most cases, this isn't desirable I think. >>>> >>>> At this point I don't have a solution to the above issue. >>>> >>>> Eric >>>> >>>> 2009/1/20, Alexandre Dube : >>>> >>>>> Hi Ivan, Eric, >>>>> >>>>> I was actually thinking a similar idea. The more I thought about >>>>> it, >>>>> the more I thought about copying/pasting the SelectFeature >>>>> control, make >>>>> some changes to the copy and name it HighlightFeature. But Eric's >>>>> idea >>>>> is much better. >>>>> >>>>> Having the control itself know which feature it has selected + >>>>> having >>>>> its own events could enable the possibility of having multiple >>>>> SelectFeature controls for a single layer. Having both >>>>> selecting on >>>>> hover and/or click won't matter except for the style and the >>>>> renderIntent applied to the selected feature. I guess the last >>>>> declared >>>>> control would have the last word of determining those... >>>>> >>>>> About that, what if we want 2 different colors for each ctrl ? >>>>> Having >>>>> 2 selectfeature ctrls doing the same thing ( hover and click ) is >>>>> not >>>>> very logic, but let's say one select on hover, the other on click, >>>>> it >>>>> would be nice be able to have 2 different styles for each action. >>>>> But >>>>> how could we do that ? (I guess I don't fully understand the whole >>>>> renderIntent stuff yet... Could we specify a specific >>>>> renderIntent for >>>>> the selectFeature ? Could "select" be the default value and we >>>>> could be >>>>> able to set our own ?) To do so without changing the renderIntent >>>>> of >>>>> the feature is to change its style only, without selecting it. >>>>> >>>>> Ivan's idea (selectOnHover:false) sounds good. I'd like to see >>>>> the >>>>> code and try it. Ivan, could you share what you've done ? At the >>>>> same >>>>> time, I'd like to try to add events to the control and its >>>>> selectedFeatures array, like Eric said. >>>>> >>>>> Finally, I would like to know more about what you think about all >>>>> this. >>>>> >>>>> Best regards, >>>>> >>>>> Alexandre >>>>> >>>>> Ivan Grcic wrote: >>>>> >>>>>> On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine >>>>>> wrote: >>>>>> >>>>>> >>>>>>> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube >>>>>>> >>>>>>> wrote: >>>>>>> >>>>>>> >>>>>>>> Hi Eric, >>>>>>>> >>>>>>>> I took a look at the SelectFeature control. Now I understand >>>>>>>> what you >>>>>>>> meant and it makes sense. Also, it's also making sense to have >>>>>>>> this >>>>>>>> control >>>>>>>> have the possibility to highlight on hover or on click. >>>>>>>> >>>>>>>> "beforefeaturehighlighted" and "featurehighlighted" events make >>>>>>>> sense, >>>>>>>> but >>>>>>>> a "featureunhighlighted" (or some other term meaning that the >>>>>>>> feature >>>>>>>> was >>>>>>>> highlighted and is now no more) would also be useful. >>>>>>>> >>>>>>>> >>>>>>> Alexandre, >>>>>>> >>>>>>> The more I think about this highlight feature control the more I >>>>>>> think >>>>>>> there's no room for both a select feature and a highlight >>>>>>> feature >>>>>>> controls. >>>>>>> >>>>>>> >>>>>>> >>>>>> Same opinion here. We already have a bunch of controls, and now >>>>>> adding >>>>>> two very similar ones... >>>>>> >>>>>> Currently im using slightly modified SelectFeature control, i >>>>>> added >>>>>> one more option to it: selectOnHover, thats how i quickly solved >>>>>> the >>>>>> problem of only highlighting feature without selecting it. >>>>>> >>>>>> If selectOnHover is true, feature is selected&higlighted (select >>>>>> method is called) on hover, if its false feature is only >>>>>> higlighted, >>>>>> not selected. >>>>>> >>>>>> >>>>>> >>>>>>> What causes people trouble is that they can't use two select >>>>>>> feature >>>>>>> controls, one in hover mode and the other in click mode. This is >>>>>>> because once a feature is hovered it is selected, and cannot be >>>>>>> selected again when it is clicked. >>>>>>> >>>>>>> Maybe we could modify the select feature control so that (1) it >>>>>>> optionally uses its own selectedFeatures array, as opposed to >>>>>>> relying >>>>>>> on the layer's, and (b) defines its own "beforefeatureselected", >>>>>>> "featureselected" and "featureunselected" event types. In this >>>>>>> way, >>>>>>> one should be able to use two select feature controls, and get >>>>>>> "featureselected" events, from the first control when features >>>>>>> are >>>>>>> hovered and from the second control when features are clicked. >>>>>>> >>>>>>> Tell me what you think, >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>>> -- >>>>>>> Eric >>>>>>> _______________________________________________ >>>>>>> Users mailing list >>>>>>> Users@openlayers.org >>>>>>> http://openlayers.org/mailman/listinfo/users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>> -- >>>>> Alexandre Dub? >>>>> Mapgears >>>>> www.mapgears.com >>>>> >>>>> >>>>> >>> >>> >>> -- >>> Alexandre Dub? >>> Mapgears >>> www.mapgears.com >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >> >> From ahocevar at opengeo.org Wed Jan 21 16:22:16 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <1232314142183-2178707.post@n2.nabble.com> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> Message-ID: <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> On Sun, Jan 18, 2009 at 10:29 PM, darrepac wrote: > > > > Andreas Hocevar-2 wrote: >> >> You could use z-indexing on the layer. See >> http://www.openlayers.org/dev/examples/ordering.html for an example. >> >> You would probably have to sort your features by size, and create >> ascending z-indices with descending size. This would ensure that >> smaller rectangles will be drawn on top of larger ones. >> >> Regards, >> Andreas. >> > > Sounds to me good, I want to give it a try. > Can you tell me what should be the default z indice of my Geojson features? You decide. Not the absolute z-index, only the order is relevant (greater than / less than comparison). This z-index also has nothing to do with the CSS z-index. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Wed Jan 21 16:27:57 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Looking for Openlayers.js patched (Ticket #1666) In-Reply-To: <4975A651.7060609@comai.to> References: <4975A651.7060609@comai.to> Message-ID: <5b021dd0901211327r29a625can97119d61fc6e0e3a@mail.gmail.com> Hi, On Tue, Jan 20, 2009 at 11:24 AM, Stefano Bonnin wrote: > I'm looking for an Openlayers.js patched with singleroot.3.patch (see > Ticket #1666) > I have tryed to apply the patch but without success. The patch applies fine to the current trunk. See http://trac.openlayers.org/wiki/ApplyingPatches for instructions. > Could you post a link where can I download an Openlayers patched version. You could use the sandbox this was developed in. It is based on a trunk version from about 3 weeks ago: http://svn.openlayers.org/sandbox/ahocevar/singleroot/openlayers/ Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Wed Jan 21 16:37:38 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] SelectFeature Control Ticket #1666 (new feature) In-Reply-To: References: Message-ID: <5b021dd0901211337m732d9943hcf06de0d17759ff9@mail.gmail.com> 2009/1/21 Andre Pereira de Matos : > Does anyone know if this ticket about select feature control firing events > on multiple layers (not just in the topmost layer) will be released soon? It fires events *only* on the layer that the selected feature belongs to. Not in the topmost layer that the control creates, but in one of the layers the control is configured with. But, as Chris pointed out, the code is subject to change. > Can I use the patch now? What can I do to have this feature? Apply the patch to a current trunk version of OpenLayers (see [1] for instructions). Have a look at the example [2] to see how to use. Regards, Andreas. [1] http://trac.openlayers.org/wiki/ApplyingPatches for instructions [2] http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From pascal.darre at laposte.net Wed Jan 21 18:05:36 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> Message-ID: <1232579136236-2195173.post@n2.nabble.com> > You decide. Not the absolute z-index, only the order is relevant > (greater than / less than comparison). This z-index also has nothing > to do with the CSS z-index. > > Ok but I just want to know example value to not put stupid value which will make the features below the map for example...So for example if you tell me that features z-index value should be around 500, I will play around this number...but may-be it is 20, 2000.... thanks -- View this message in context: http://n2.nabble.com/FEatures-orders-tp2167927p2195173.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pascal.darre at laposte.net Wed Jan 21 18:37:44 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <1232579136236-2195173.post@n2.nabble.com> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> <1232579136236-2195173.post@n2.nabble.com> Message-ID: <1232581064192-2195282.post@n2.nabble.com> darrepac wrote: > > > > >> You decide. Not the absolute z-index, only the order is relevant >> (greater than / less than comparison). This z-index also has nothing >> to do with the CSS z-index. >> >> > > Ok but I just want to know example value to not put stupid value which > will make the features below the map for example...So for example if you > tell me that features z-index value should be around 500, I will play > around this number...but may-be it is 20, 2000.... > > thanks > Do you mean we can stay at the relative level and not putting absolute value may-be....if yes, how? thanks -- View this message in context: http://n2.nabble.com/FEatures-orders-tp2167927p2195282.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From shai_mus at hotmail.com Thu Jan 22 00:10:25 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How to add a an overlay on top of a map? Message-ID: <1232601025326-2196295.post@n2.nabble.com> Dear All, I am using geoserver and managed to put a sample shapefile and able to view my simple map well. The problem now is that on top that map I want to add a layer where I can like draw polygon and capture the coordinates accordingly. How can I do this ? Thanks. -- View this message in context: http://n2.nabble.com/How-to-add-a-an-overlay-on-top-of-a-map--tp2196295p2196295.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From gregor at hostgis.com Thu Jan 22 00:18:03 2009 From: gregor at hostgis.com (Gregor at HostGIS) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How to add a an overlay on top of a map? In-Reply-To: <1232601025326-2196295.post@n2.nabble.com> References: <1232601025326-2196295.post@n2.nabble.com> Message-ID: <4978018B.90604@hostgis.com> newbie wrote: > want to add a layer where I can like draw polygon and capture the > coordinates accordingly. How can I do this ? In my opinion, the #1 rule of "How do I... in OpenLayers" is to look over the rich set of examples. The examples include drawing and capturing shapes, rendering commercial datasets, popups, and a zillion other tricks. Look through the examples for a likely title, e.g. draw_vector.html, and pop it open in a browser nd in Notepad, and most of your questions should be answered. -- Gregor Mosheh / Greg Allensworth BS, A+, Network+, Security+, Server+ System Administrator, Lead Programmer HostGIS development & hosting services, http://www.HostGIS.com/ "Remember that no one cares if you can back up, only if you can restore." - AMANDA From ahocevar at opengeo.org Thu Jan 22 03:51:37 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <1232579136236-2195173.post@n2.nabble.com> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> <1232579136236-2195173.post@n2.nabble.com> Message-ID: <49783399.50902@opengeo.org> darrepac wrote: > > > >> You decide. Not the absolute z-index, only the order is relevant >> (greater than / less than comparison). This z-index also has nothing >> to do with the CSS z-index. >> >> >> > > Ok but I just want to know example value to not put stupid value which will > make the features below the map for example...So for example if you tell me > that features z-index value should be around 500, I will play around this > number...but may-be it is 20, 2000.... > Again, this is not the css z-index of the dom! It is totally independent of other layers. Vector rendering does not know about dom z-indices. Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From ahocevar at opengeo.org Thu Jan 22 04:04:53 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <1232581064192-2195282.post@n2.nabble.com> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> <1232579136236-2195173.post@n2.nabble.com> <1232581064192-2195282.post@n2.nabble.com> Message-ID: <497836B5.8030409@opengeo.org> darrepac wrote: > > darrepac wrote: > >> >> >> >>> You decide. Not the absolute z-index, only the order is relevant >>> (greater than / less than comparison). This z-index also has nothing >>> to do with the CSS z-index. >>> >>> >>> >> Ok but I just want to know example value to not put stupid value which >> will make the features below the map for example...So for example if you >> tell me that features z-index value should be around 500, I will play >> around this number...but may-be it is 20, 2000.... >> >> thanks >> >> > > Do you mean we can stay at the relative level and not putting absolute value > may-be....if yes, how? > You do not use CSS z-index here. All you have to do is set the graphicZIndex property of your symbolizer, as the ordering.html example shows: var layer = new OpenLayers.Layer.Vector( "Y-Order", { styleMap: new OpenLayers.StyleMap({ externalGraphic: "../img/marker-gold.png", pointRadius: 10, graphicZIndex: GOLD_Z_INDEX }), isBaseLayer: true, rendererOptions: {yOrdering: true} } ); You will not want the yOrdering renderer option, but instead: rendererOptions: {zIndexing: true} Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From pascal.darre at laposte.net Thu Jan 22 05:44:39 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <497836B5.8030409@opengeo.org> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> <1232579136236-2195173.post@n2.nabble.com> <1232581064192-2195282.post@n2.nabble.com> <497836B5.8030409@opengeo.org> Message-ID: <1232621079272-2197078.post@n2.nabble.com> So my question was, which value I put for GOLD_Z_INDEX ? thanks Andreas Hocevar-2 wrote: > > darrepac wrote: >> >> darrepac wrote: >> >>> >>> >>> >>>> You decide. Not the absolute z-index, only the order is relevant >>>> (greater than / less than comparison). This z-index also has nothing >>>> to do with the CSS z-index. >>>> >>>> >>>> >>> Ok but I just want to know example value to not put stupid value which >>> will make the features below the map for example...So for example if you >>> tell me that features z-index value should be around 500, I will play >>> around this number...but may-be it is 20, 2000.... >>> >>> thanks >>> >>> >> >> Do you mean we can stay at the relative level and not putting absolute >> value >> may-be....if yes, how? >> > > You do not use CSS z-index here. All you have to do is set the > graphicZIndex property of your symbolizer, as the ordering.html example > shows: > > var layer = new OpenLayers.Layer.Vector( > "Y-Order", > { > styleMap: new OpenLayers.StyleMap({ > externalGraphic: "../img/marker-gold.png", > pointRadius: 10, > graphicZIndex: GOLD_Z_INDEX > }), > isBaseLayer: true, > rendererOptions: {yOrdering: true} > } > ); > > You will not want the yOrdering renderer option, but instead: > > rendererOptions: {zIndexing: true} > > > Regards, > Andreas. > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/FEatures-orders-tp2167927p2197078.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ahocevar at opengeo.org Thu Jan 22 06:28:43 2009 From: ahocevar at opengeo.org (Andreas Hocevar) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <1232621079272-2197078.post@n2.nabble.com> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> <1232579136236-2195173.post@n2.nabble.com> <1232581064192-2195282.post@n2.nabble.com> <497836B5.8030409@opengeo.org> <1232621079272-2197078.post@n2.nabble.com> Message-ID: <4978586B.8050601@opengeo.org> darrepac wrote: > So my question was, which value I put for GOLD_Z_INDEX ? > Seems I'm unable to make myself clear. Last try: it really does not matter. If you have let's say 100 features, sorted descending by size, you give the first one a graphicZIndex of 1, and 100 for the last one. Andreas. > thanks > > > Andreas Hocevar-2 wrote: > >> darrepac wrote: >> >>> darrepac wrote: >>> >>> >>>> >>>> >>>>> You decide. Not the absolute z-index, only the order is relevant >>>>> (greater than / less than comparison). This z-index also has nothing >>>>> to do with the CSS z-index. >>>>> >>>>> >>>>> >>>>> >>>> Ok but I just want to know example value to not put stupid value which >>>> will make the features below the map for example...So for example if you >>>> tell me that features z-index value should be around 500, I will play >>>> around this number...but may-be it is 20, 2000.... >>>> >>>> thanks >>>> >>>> >>>> >>> Do you mean we can stay at the relative level and not putting absolute >>> value >>> may-be....if yes, how? >>> >>> >> You do not use CSS z-index here. All you have to do is set the >> graphicZIndex property of your symbolizer, as the ordering.html example >> shows: >> >> var layer = new OpenLayers.Layer.Vector( >> "Y-Order", >> { >> styleMap: new OpenLayers.StyleMap({ >> externalGraphic: "../img/marker-gold.png", >> pointRadius: 10, >> graphicZIndex: GOLD_Z_INDEX >> }), >> isBaseLayer: true, >> rendererOptions: {yOrdering: true} >> } >> ); >> >> You will not want the yOrdering renderer option, but instead: >> >> rendererOptions: {zIndexing: true} >> >> >> Regards, >> Andreas. >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. From pascal.darre at laposte.net Thu Jan 22 06:37:04 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <4978586B.8050601@opengeo.org> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> <1232579136236-2195173.post@n2.nabble.com> <1232581064192-2195282.post@n2.nabble.com> <497836B5.8030409@opengeo.org> <1232621079272-2197078.post@n2.nabble.com> <4978586B.8050601@opengeo.org> Message-ID: <1232624224504-2197257.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > darrepac wrote: >> So my question was, which value I put for GOLD_Z_INDEX ? >> > > Seems I'm unable to make myself clear. Last try: it really does not > matter. If you have let's say 100 features, sorted descending by size, > you give the first one a graphicZIndex of 1, and 100 for the last one. > > Andreas. > > :) now it's clear! many thanks! -- View this message in context: http://n2.nabble.com/FEatures-orders-tp2167927p2197257.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pascal.darre at laposte.net Thu Jan 22 07:08:59 2009 From: pascal.darre at laposte.net (darrepac) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FEatures orders In-Reply-To: <49783399.50902@opengeo.org> References: <1232109479862-2167927.post@n2.nabble.com> <5b021dd0901160516y55462902m57623d7092f7ce56@mail.gmail.com> <1232314142183-2178707.post@n2.nabble.com> <5b021dd0901211322j72666096qd05a5fb9d4154c13@mail.gmail.com> <1232579136236-2195173.post@n2.nabble.com> <49783399.50902@opengeo.org> Message-ID: <1232626139358-2197383.post@n2.nabble.com> Ok I just add this in the style of my GeoJson layer: aStyleMap.addUniqueValueRules("default", "zindex", {"low":{graphicZIndex: 50}, "high":{graphicZindex: 100}}); Plus the corresponding attribute in my feature..... Doesn't work...any idea? -- View this message in context: http://n2.nabble.com/FEatures-orders-tp2167927p2197383.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Kai-Behncke at gmx.de Thu Jan 22 08:56:54 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers Message-ID: <20090122135654.173980@gmx.net> Dear users, I`m a beginner in OpenLayers. I wonder which possibilities I have to bring my own Data in OpenLayers as a layer? I know WMS/WFS, are there other possibilities? Thank you very much in advance, Kai -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger From igrcic at gmail.com Thu Jan 22 09:15:53 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers In-Reply-To: <20090122135654.173980@gmx.net> References: <20090122135654.173980@gmx.net> Message-ID: Hi, http://dev.openlayers.org/docs/files/OpenLayers-js.html and click on Layer on the left ;) On Thu, Jan 22, 2009 at 2:56 PM, Kai Behncke wrote: > Dear users, > > I`m a beginner in OpenLayers. > I wonder which possibilities I have to bring my own Data in OpenLayers as a > layer? > I know WMS/WFS, are there other possibilities? > > Thank you very much in advance, Kai > -- > Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: > http://www.gmx.net/de/go/multimessenger > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090122/13be20d3/attachment.html From andre.matos at co.sapo.pt Thu Jan 22 09:15:28 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers In-Reply-To: <20090122135654.173980@gmx.net> References: <20090122135654.173980@gmx.net> Message-ID: Hi Kai, Which data do you want to put over the map? Images? Tiles? In OpenLayers there's implementations for a lot of standards... You have a GML layer, and parsers which reads the information in standards like GeoJson, GeoRss, GML, KML and so on. In a simple way you can put information over the map. Regards, Andr? Matos http://maps.sapo.pt -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Kai Behncke Sent: quinta-feira, 22 de Janeiro de 2009 13:57 To: users@openlayers.org Subject: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers Dear users, I`m a beginner in OpenLayers. I wonder which possibilities I have to bring my own Data in OpenLayers as a layer? I know WMS/WFS, are there other possibilities? Thank you very much in advance, Kai -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From bascouwenberg at gmail.com Thu Jan 22 09:29:03 2009 From: bascouwenberg at gmail.com (Bas Couwenberg) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Change size multiple polygons In-Reply-To: <4975D8D2.7080304@mapgears.com> References: <583aacb40901200159s3b7b954bu7c624db73b490906@mail.gmail.com> <4975D8D2.7080304@mapgears.com> Message-ID: <583aacb40901220629i5cb24ff7qe472d0660f482579@mail.gmail.com> Hello, does anyone know when the snapping feature will be implemented in OL? Best Regards, Bas Couwenberg On Tue, Jan 20, 2009 at 2:59 PM, Alexandre Dube wrote: > Hi, > > This is currently not possible with Openlayers, but work in that way is > currently being done by OL developers. See : > http://dev.openlayers.org/sandbox/topp/editing/examples/snapping.html > > This tool will someday become available within OL. What you're trying to > achieve might be possible with it. > > Best regards, > > Alexandre > > Bas Couwenberg wrote: > >> Hello, >> in my application I have a WFS layer which shows me all city borders. Now >> each city border must touch another one or there will be a piece of no man's >> land between them. Is it possible that when I change a border of one city >> (polygon) the other touching border automaticly changes too? So if I make >> one part smaller the touching polygons become bigger. >> Best Regards, >> Bas Couwenberg >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090122/5524423e/attachment.html From Kai-Behncke at gmx.de Thu Jan 22 09:30:47 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers In-Reply-To: References: <20090122135654.173980@gmx.net> Message-ID: <20090122143047.99600@gmx.net> Thank you very much, that`s what I was looking for. -------- Original-Nachricht -------- > Datum: Thu, 22 Jan 2009 14:15:28 +0000 > Von: Andre Pereira de Matos > An: Kai Behncke , "users@openlayers.org" > Betreff: RE: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers > Hi Kai, > > Which data do you want to put over the map? Images? Tiles? > > In OpenLayers there's implementations for a lot of standards... You have a > GML layer, and parsers which reads the information in standards like > GeoJson, GeoRss, GML, KML and so on. > > In a simple way you can put information over the map. > > Regards, > Andr? Matos > http://maps.sapo.pt > > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Kai Behncke > Sent: quinta-feira, 22 de Janeiro de 2009 13:57 > To: users@openlayers.org > Subject: [OpenLayers-Users] Which possibilities to bring own data in > OpenLayers > > Dear users, > > I`m a beginner in OpenLayers. > I wonder which possibilities I have to bring my own Data in OpenLayers as > a layer? > I know WMS/WFS, are there other possibilities? > > Thank you very much in advance, Kai > -- > Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: > http://www.gmx.net/de/go/multimessenger > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL f?r nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a From stuart.jones at jacobs.com Thu Jan 22 09:45:28 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <497497EA.4020006@dmsolutions.ca> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> <497497EA.4020006@dmsolutions.ca> Message-ID: <1232635528415-2198113.post@n2.nabble.com> Thanks Mike. Mike Adair wrote: > > there is a patch available for the OL MapGuide layer that removes the > asynchronous behaviour > How long is it likely to be before this patch is part of the official release? -- View this message in context: http://n2.nabble.com/MapGuide-overlay-session-ID-requirements-tp2169448p2198113.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andre.matos at co.sapo.pt Thu Jan 22 10:03:26 2009 From: andre.matos at co.sapo.pt (Andre Pereira de Matos) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers In-Reply-To: <20090122143047.99600@gmx.net> References: <20090122135654.173980@gmx.net> <20090122143047.99600@gmx.net> Message-ID: Kay, As a big picture about the Openlayers architecture, I recommend you the following OpenLayers uml diagram: http://trac.openlayers.org/attachment/wiki/UML/ClassDiagram_OL2.7RC2-20080916.pdf?format=raw Hope it helps. Regards, Andr? Matos http://maps.sapo.pt -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Kai Behncke Sent: quinta-feira, 22 de Janeiro de 2009 14:31 To: users@openlayers.org Subject: Re: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers Thank you very much, that`s what I was looking for. -------- Original-Nachricht -------- > Datum: Thu, 22 Jan 2009 14:15:28 +0000 > Von: Andre Pereira de Matos > An: Kai Behncke , "users@openlayers.org" > Betreff: RE: [OpenLayers-Users] Which possibilities to bring own data in OpenLayers > Hi Kai, > > Which data do you want to put over the map? Images? Tiles? > > In OpenLayers there's implementations for a lot of standards... You have a > GML layer, and parsers which reads the information in standards like > GeoJson, GeoRss, GML, KML and so on. > > In a simple way you can put information over the map. > > Regards, > Andr? Matos > http://maps.sapo.pt > > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Kai Behncke > Sent: quinta-feira, 22 de Janeiro de 2009 13:57 > To: users@openlayers.org > Subject: [OpenLayers-Users] Which possibilities to bring own data in > OpenLayers > > Dear users, > > I`m a beginner in OpenLayers. > I wonder which possibilities I have to bring my own Data in OpenLayers as > a layer? > I know WMS/WFS, are there other possibilities? > > Thank you very much in advance, Kai > -- > Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: > http://www.gmx.net/de/go/multimessenger > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL f?r nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Thu Jan 22 10:09:16 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] FW: Overview Map Problems In-Reply-To: <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> References: <032801c97501$3d78e500$b86aaf00$@com.au> <20090118180458.gzu7cgx2tcs0g8ks@webmail.muammar.net> Message-ID: <20090122150916.GY10998@metacarta.com> On Sun, Jan 18, 2009 at 06:04:58PM +0100, George Mu'ammar wrote: > Brad, this is a documented problem. We are all waiting for the next > release of OL for the fix. https://arrowsmith.mit.edu/ uses a Google Maps base layer in an OverviewMap with no problems. I asked the authors yesterday, and they said they have done no workarounds or anything else for this problem -- just used OpenLayers as is. I know there is a ticket open which reports that this doesn't work, but given that it clearly does work in this case, it seems clear that it is possible to set this up and have it work. Best Regards, -- Christopher Schmidt MetaCarta From madair at dmsolutions.ca Thu Jan 22 10:10:01 2009 From: madair at dmsolutions.ca (Mike Adair) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <1232635528415-2198113.post@n2.nabble.com> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> <497497EA.4020006@dmsolutions.ca> <1232635528415-2198113.post@n2.nabble.com> Message-ID: <49788C49.5040102@dmsolutions.ca> It's marked for review and with the 2.8 milestone, so hopefully this will get in the next release. Mike gingerbbm wrote: > Thanks Mike. > > Mike Adair wrote: > >> there is a patch available for the OL MapGuide layer that removes the >> asynchronous behaviour >> >> > > How long is it likely to be before this patch is part of the official > release? > -- Michael Adair Senior Software Architect DM Solutions Group Inc. Office: (613) 565-5056 x26 madair@dmsolutions.ca http://www.dmsolutions.ca http://research.dmsolutions.ca From stuart.jones at jacobs.com Thu Jan 22 10:53:48 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <49788C49.5040102@dmsolutions.ca> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> <497497EA.4020006@dmsolutions.ca> <1232635528415-2198113.post@n2.nabble.com> <49788C49.5040102@dmsolutions.ca> Message-ID: <1232639628482-2198462.post@n2.nabble.com> Is there an ETA on the 2.8 release? Don't get me wrong, I realise these things are fluid, I'm just after a ballpark guestimate. -- View this message in context: http://n2.nabble.com/MapGuide-overlay-session-ID-requirements-tp2169448p2198462.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stephane.poirier at usherbrooke.ca Thu Jan 22 11:59:16 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] rounding-off coordinate of feature geometry at creation Message-ID: <582C744B52D342A3BA35DF2F2468E613@flshedu.usherbrooke.ca> Hi All, I use the following code for handling point and rectangle creation. It works fine. Now, how can one round-off coordinates of the feature geometry before it is created (for point and rectangle)? And also, how can one restrict the drawing of a rectangle to discreet sizes? Stephane P.S.: considering the standard point and rectangle handler code drawControls = { point: new OpenLayers.Control.DrawFeature(rectangleLayer, OpenLayers.Handler.Point, {featureAdded: point_feature_added, handlerOptions: { createFeature: function() { this.control.layer.destroyFeatures(); OpenLayers.Handler.Point.prototype.createFeature.apply(this, arguments);}}}), rectangle: new OpenLayers.Control.DrawFeature(rectangleLayer, OpenLayers.Handler.RegularPolygon, {featureAdded: rectangle_feature_added, handlerOptions: { sides: 4, irregular: true, 'displayClass': 'olControlDrawFeatureRectangle', createGeometry: function() { this.control.layer.destroyFeatures(); OpenLayers.Handler.RegularPolygon.prototype.createGeometry.apply(this, arguments);}}}) }; for(var key in drawControls) { map.addControl(drawControls[key]); } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090122/2982b2ee/attachment.html From stuart.jones at jacobs.com Thu Jan 22 12:11:47 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Implementing OpenLayers in JavaScript object: scope issues Message-ID: <1232644307754-2198920.post@n2.nabble.com> Dear all I am implementing an OpenLayers map in an existing project and I want to separate the mapping functionality into its own JavaScript namespace, e.g. var MyProject.Mapping = { map: null, initialise: function() { this.map = new OpenLayers.Map('map', mapOptions); // etc }, // etc } The code is being moved from a working non-namespaced implementation, and I believe I'm getting problems to do with scope. I have a property of my namespace object defined as follows: drawTools: { toolDrawPolygon: new OpenLayers.Control.DrawFeature( this.layerVector, OpenLayers.Handler.Polygon, { featureAdded: function() { alert('Polygon drawn'); }, handlerOptions: { createFeature: function() { MyProject.Mapping.layerVector.destroyFeatures(); OpenLayers.Handler.Polygon.prototype.createFeature.apply(this, arguments); } } } ) }; On the click of a button I call MyProject.Mapping.drawTools.toolDrawPolygon.activate() after which I can happily draw a polygon on the map. But when I double-click to complete the shape I get an error: this.layer is undefined OpenLayers.js (line 1051) The question is, why? I appreciate this is specifically a JavaScript/scope problem but if you could give me any pointers I'd be very grateful. Thanks Stuart -- View this message in context: http://n2.nabble.com/Implementing-OpenLayers-in-JavaScript-object%3A-scope-issues-tp2198920p2198920.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From shai_mus at hotmail.com Thu Jan 22 12:14:31 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How to geofence and read the coordinates ? Message-ID: <1232644471180-2198943.post@n2.nabble.com> Dear, So for example I have a map and then I need to geofence and capture the geofence coordinates how can I do that in openlayer? Is there any sample of geofence where I can refer to learn from ? Thanks. -- View this message in context: http://n2.nabble.com/How-to-geofence-and-read-the-coordinates---tp2198943p2198943.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Thu Jan 22 12:44:14 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] MapGuide overlay session ID requirements In-Reply-To: <1232639628482-2198462.post@n2.nabble.com> References: <1232126351969-2169448.post@n2.nabble.com> <4970E5DC.3030506@geograf.dk> <7a85053e0901161429q6aa3756dk32d7a51b090dbae@mail.gmail.com> <1232158889629-2171721.post@n2.nabble.com> <497497EA.4020006@dmsolutions.ca> <1232635528415-2198113.post@n2.nabble.com> <49788C49.5040102@dmsolutions.ca> <1232639628482-2198462.post@n2.nabble.com> Message-ID: <20090122174414.GZ10998@metacarta.com> On Thu, Jan 22, 2009 at 07:53:48AM -0800, gingerbbm wrote: > > Is there an ETA on the 2.8 release? Don't get me wrong, I realise these > things are fluid, I'm just after a ballpark guestimate. Not really. In the past, we had 3-4 month release cycles, but that seems to have changed this time around. I wouldn't expect a release in the next couple months, based on what I have seen recently in development. Regards, -- Christopher Schmidt MetaCarta From stuart.jones at jacobs.com Thu Jan 22 13:15:42 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Implementing OpenLayers in JavaScript object: scope issues In-Reply-To: <1232644307754-2198920.post@n2.nabble.com> References: <1232644307754-2198920.post@n2.nabble.com> Message-ID: <1232648142411-2199249.post@n2.nabble.com> OK, I got it working, by sheer luck of twiddling (though I've been doing that for a while now). I changed two things and moved it all to a function. I think the key to it was ensuring that the function was called after the creation of the vector layer. MyProject.Mapping.drawTools = { // here toolDrawPolygon: new OpenLayers.Control.DrawFeature( MyProject.Mapping.layerVector, // here OpenLayers.Handler.Polygon, { featureAdded: function() { alert('Polygon drawn'); }, handlerOptions: { createFeature: function() { MyProject.Mapping.layerVector.destroyFeatures(); OpenLayers.Handler.Polygon.prototype.createFeature.apply(this, arguments); } } } ) }; -- View this message in context: http://n2.nabble.com/Implementing-OpenLayers-in-JavaScript-object%3A-scope-issues-tp2198920p2199249.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Thu Jan 22 14:47:59 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <5ec103de0901190554w7f03f8ev626701734c450f4a@mail.gmail.com> References: <496F5EA9.2050203@mapgears.com> <5ec103de0901150910g281d96dby874f6d16536c4be1@mail.gmail.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <5ec103de0901190554w7f03f8ev626701734c450f4a@mail.gmail.com> Message-ID: <4978CD6F.5020308@mapgears.com> Eric Lemoine wrote: > Sorry, the above should read: "I'm not suggesting to change the > feature's render intent". > > -- > Eric > Hey Eric, users, First question : How do change a feature's style with the renderIntent value without changing the feature's renderIntent ? layer.drawFeature(feature, intent), if intent is a string of the renderIntent, will actually change change the renderIntent of the feature in StyleMap.createSymbolizer : feature.renderIntent = intent. Giving a style object instead works, it doesn't change the feature's renderIntent. Second question : Is there a reason for this behavior ? I guess it's normal to assume that drawing a feature giving only a string of the intent means its renderIntent must change at the same time... What do you think ? -- Alexandre Dub? Mapgears www.mapgears.com From adube at mapgears.com Thu Jan 22 15:53:58 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Hover control sample (share) In-Reply-To: <49772466.3020603@mapgears.com> References: <496F5EA9.2050203@mapgears.com> <1232117491.6390.18.camel@dell-desktop.example.com> <4970A658.2020001@mapgears.com> <5ec103de0901182253y65437454ia7cdacefa28d401b@mail.gmail.com> <49748170.3040907@mapgears.com> <5ec103de0901190553w636ca028o49f821926154657c@mail.gmail.com> <49748E96.5020506@mapgears.com> <5ec103de0901191319w177df8a5u5b771342bcd6ef37@mail.gmail.com> <4975D4A6.6000507@mapgears.com> <5ec103de0901202251t17fd951m162839d4933e4098@mail.gmail.com> <49772466.3020603@mapgears.com> Message-ID: <4978DCE6.5000005@mapgears.com> I got it working : 2 select features, 1 select on click, the other highlight only on hover... Both could select, but select on hover and click at the same time is not useful. I didn't need to have each control to have their unique array of selected features to do so. The concept of "selected feature" is not the same as "highlighted feature" so I didn't want to touch that. Instead, the layer has a highlightedFeature property and corresponding events. The only issue remaining is how can I change the style of a feature given a renderIntent without changing the renderIntent of the feature. This changes the renderIntent of the feature : var highlightStyle = this.highlightStyle || this.renderIntent; this.layer.drawFeature(feature, highlightStyle); This doesn't change the renderIntent of the feature : var style = { fillColor:"purple", strokeColor: "black", strokeWidth: 2, strokeOpacity: 1, fillOpacity: 0.8 }; this.layer.drawFeature(feature, style); Any hint ? Alexandre Alexandre Dube wrote: > Hey Eric, Ivan, > > That issue could occur if both controls would actually change the > renderIntent of the feature ( without actually selecting the feature ). > > Let's assume that you can only have one feature hovered at a time ( > only one feature can be hovered by the mouse). That said, we could have > its renderIntent copied to a this.oldRenderIntent local property, then > on "beforefeatureunselected" restore the feature with its old > renderIntent. What do you think ? Simple but that could work. > > Also, can we agree on this : 2 SelectFeature controls both doing > selection by click or both by hover are not compatible with multiple > styling, so let's forget about this for now. > > I'll definitively have to try all this soon. > > Alexandre > > Eric Lemoine wrote: > >> Hi >> >> A first note. The current select feature implementation should >> accomodate this use case: two controls on the same layer, one working >> on click and the other on hover, only one of them actually changing >> the feature style. This is achievable by registering a >> beforefeatureselected listener, and have this listener return false. >> Adding beforefeatureunselected might help fully accomodate that use >> case. >> >> Now if we want the two controls to do feature styling, we need the >> stuff I mentioned previously - per-control selectedFeatures arrays and >> events. But this is unfortunately not sufficient. Use case: two >> controls, one working on click and the other on hover, both doing >> feature styling but with different render intents. If we have this >> sequence "mouse goes over feature, mouse clicks feature, mouse goes >> out of feature", then the feature ends up being rendered with the >> "default" render intent, while it's still selected from the click >> control's perspective. In most cases, this isn't desirable I think. >> >> At this point I don't have a solution to the above issue. >> >> Eric >> >> 2009/1/20, Alexandre Dube : >> >> >>> Hi Ivan, Eric, >>> >>> I was actually thinking a similar idea. The more I thought about it, >>> the more I thought about copying/pasting the SelectFeature control, make >>> some changes to the copy and name it HighlightFeature. But Eric's idea >>> is much better. >>> >>> Having the control itself know which feature it has selected + having >>> its own events could enable the possibility of having multiple >>> SelectFeature controls for a single layer. Having both selecting on >>> hover and/or click won't matter except for the style and the >>> renderIntent applied to the selected feature. I guess the last declared >>> control would have the last word of determining those... >>> >>> About that, what if we want 2 different colors for each ctrl ? Having >>> 2 selectfeature ctrls doing the same thing ( hover and click ) is not >>> very logic, but let's say one select on hover, the other on click, it >>> would be nice be able to have 2 different styles for each action. But >>> how could we do that ? (I guess I don't fully understand the whole >>> renderIntent stuff yet... Could we specify a specific renderIntent for >>> the selectFeature ? Could "select" be the default value and we could be >>> able to set our own ?) To do so without changing the renderIntent of >>> the feature is to change its style only, without selecting it. >>> >>> Ivan's idea (selectOnHover:false) sounds good. I'd like to see the >>> code and try it. Ivan, could you share what you've done ? At the same >>> time, I'd like to try to add events to the control and its >>> selectedFeatures array, like Eric said. >>> >>> Finally, I would like to know more about what you think about all this. >>> >>> Best regards, >>> >>> Alexandre >>> >>> Ivan Grcic wrote: >>> >>> >>>> On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine wrote: >>>> >>>> >>>> >>>>> On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube >>>>> wrote: >>>>> >>>>> >>>>> >>>>>> Hi Eric, >>>>>> >>>>>> I took a look at the SelectFeature control. Now I understand what you >>>>>> meant and it makes sense. Also, it's also making sense to have this >>>>>> control >>>>>> have the possibility to highlight on hover or on click. >>>>>> >>>>>> "beforefeaturehighlighted" and "featurehighlighted" events make sense, >>>>>> but >>>>>> a "featureunhighlighted" (or some other term meaning that the feature >>>>>> was >>>>>> highlighted and is now no more) would also be useful. >>>>>> >>>>>> >>>>>> >>>>> Alexandre, >>>>> >>>>> The more I think about this highlight feature control the more I think >>>>> there's no room for both a select feature and a highlight feature >>>>> controls. >>>>> >>>>> >>>>> >>>>> >>>> Same opinion here. We already have a bunch of controls, and now adding >>>> two very similar ones... >>>> >>>> Currently im using slightly modified SelectFeature control, i added >>>> one more option to it: selectOnHover, thats how i quickly solved the >>>> problem of only highlighting feature without selecting it. >>>> >>>> If selectOnHover is true, feature is selected&higlighted (select >>>> method is called) on hover, if its false feature is only higlighted, >>>> not selected. >>>> >>>> >>>> >>>> >>>>> What causes people trouble is that they can't use two select feature >>>>> controls, one in hover mode and the other in click mode. This is >>>>> because once a feature is hovered it is selected, and cannot be >>>>> selected again when it is clicked. >>>>> >>>>> Maybe we could modify the select feature control so that (1) it >>>>> optionally uses its own selectedFeatures array, as opposed to relying >>>>> on the layer's, and (b) defines its own "beforefeatureselected", >>>>> "featureselected" and "featureunselected" event types. In this way, >>>>> one should be able to use two select feature controls, and get >>>>> "featureselected" events, from the first control when features are >>>>> hovered and from the second control when features are clicked. >>>>> >>>>> Tell me what you think, >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>>> -- >>>>> Eric >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users@openlayers.org >>>>> http://openlayers.org/mailman/listinfo/users >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> -- >>> Alexandre Dub? >>> Mapgears >>> www.mapgears.com >>> >>> >>> >>> > > > -- Alexandre Dub? Mapgears www.mapgears.com From stefano.bonnin at comai.to Fri Jan 23 03:09:47 2009 From: stefano.bonnin at comai.to (Stefano Bonnin) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Looking for Openlayers.js patched (Ticket #1666) In-Reply-To: <5b021dd0901211327r29a625can97119d61fc6e0e3a@mail.gmail.com> References: <4975A651.7060609@comai.to> <5b021dd0901211327r29a625can97119d61fc6e0e3a@mail.gmail.com> Message-ID: <49797B4B.1030505@comai.to> Andreas Hocevar ha scritto: > Hi, > > On Tue, Jan 20, 2009 at 11:24 AM, Stefano Bonnin > wrote: > >> I'm looking for an Openlayers.js patched with singleroot.3.patch (see >> Ticket #1666) >> I have tryed to apply the patch but without success. >> > > The patch applies fine to the current trunk. See > http://trac.openlayers.org/wiki/ApplyingPatches for instructions. > > >> Could you post a link where can I download an Openlayers patched version. >> > > You could use the sandbox this was developed in. It is based on a > trunk version from about 3 weeks ago: > > http://svn.openlayers.org/sandbox/ahocevar/singleroot/openlayers/ > > Regards, > Andreas. > > thanks. I have already tryed to apply the patch to the svn trunc. But the patched version does not work. If I try it with the test page (select-feature-multilayer.html) I can see only the top layer objects. -- Stefano Bonnin Comai Torino S.r.l Via Livorno 60, 10144 TORINO Italia http://www.comai.to From stefano.bonnin at comai.to Fri Jan 23 03:18:18 2009 From: stefano.bonnin at comai.to (Stefano Bonnin) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Looking for Openlayers.js patched (Ticket #1666) In-Reply-To: <49797B4B.1030505@comai.to> References: <4975A651.7060609@comai.to> <5b021dd0901211327r29a625can97119d61fc6e0e3a@mail.gmail.com> <49797B4B.1030505@comai.to> Message-ID: <49797D4A.2010704@comai.to> Stefano Bonnin ha scritto: > Andreas Hocevar ha scritto: > >> Hi, >> >> On Tue, Jan 20, 2009 at 11:24 AM, Stefano Bonnin >> wrote: >> >> >>> I'm looking for an Openlayers.js patched with singleroot.3.patch (see >>> Ticket #1666) >>> I have tryed to apply the patch but without success. >>> >>> >> The patch applies fine to the current trunk. See >> http://trac.openlayers.org/wiki/ApplyingPatches for instructions. >> >> >> >>> Could you post a link where can I download an Openlayers patched version. >>> >>> >> You could use the sandbox this was developed in. It is based on a >> trunk version from about 3 weeks ago: >> >> http://svn.openlayers.org/sandbox/ahocevar/singleroot/openlayers/ >> >> Regards, >> Andreas. >> >> >> > > thanks. I have already tryed to apply the patch to the svn trunc. But > the patched version does not work. If I try it with the test page > (select-feature-multilayer.html) I can see only the top layer objects. > > I have attached my patched version ... if you try it you'll see that it doesn't work correctly. -- Stefano Bonnin Comai Torino S.r.l Via Livorno 60, 10144 TORINO Italia http://www.comai.to From fabiodovidio at gmail.com Fri Jan 23 03:42:16 2009 From: fabiodovidio at gmail.com (Fabio D'Ovidio) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] GeoBI blog Message-ID: <497982E8.8030606@gmail.com> Hello, I'd like to inform u about GeoBI blog [1]. The main iussue is "The integration of GeoSpatial Information in Business Intelligence processes". INOVA [2] is focused on Mapfish and OpenLayers for WebGIS client integration. Thanks all for you comments and suggestions! [1] www.geobi.org [2] www.inovaos.it -- Fabio D'Ovidio Geospatial solutions INOVA s.r.l. Web : http://www.inovaos.it Tel.: 081 197 57 600 mail: fabiodovidio@gmail.com From bianchimro at gmail.com Fri Jan 23 04:07:51 2009 From: bianchimro at gmail.com (Mauro Bianchi) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Thematic map and legend Message-ID: Dear list, here is the question: I'd like to have a thematic map in Openlayers, e.g. a map where the style of features is based on a classification of some attribute. For doing this it would be necessary to define a mapping between the attribute value and desired classes (1 class -> 1 attribute value range), and associate a color palette to classes (1 class -> 1 color) Moreover, it would be nice to have a legend showing the meaning of colors in terms of the original attribute value. Anyone has some experience related to this with OpenLayers? Is anyone interested in helping me with developement? I think this kind of feature would be very useful. Thanks for your time and help Mauro -- Mauro Bianchi bianchimro@gmail.com From osm222 at gmail.com Fri Jan 23 04:56:16 2009 From: osm222 at gmail.com (Roland) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How can I draw "Hello world"? Message-ID: <49799440.9060508@gmail.com> Hi, I have just started with OpenLayers and I have a maybe silly question: I managed to display markers, polygons, points, markers with a description which is displayed when the marker has been clicked ... but how can I draw a text like "Hello world" at a specific lonlat position (maybe with an offset in pixels) in a map? Thanks Roland From bartvde at osgis.nl Fri Jan 23 04:58:17 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How can I draw "Hello world"? In-Reply-To: <49799440.9060508@gmail.com> References: <49799440.9060508@gmail.com> Message-ID: <65435.145.50.39.11.1232704697.squirrel@webmail.hostingdiscounter.nl> Hi, this is not yet possible with OpenLayers. You might want to check out this though: http://trac.openlayers.org/ticket/1895 Best regards, Bart > Hi, > > I have just started with OpenLayers and I have a maybe silly question: > > I managed to display markers, polygons, points, markers with a > description which is displayed > when the marker has been clicked ... but how can I draw a text like > "Hello world" at a > specific lonlat position (maybe with an offset in pixels) in a map? > > Thanks > Roland > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From osm222 at gmail.com Fri Jan 23 05:03:01 2009 From: osm222 at gmail.com (Roland) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How can I draw "Hello world"? (2) Message-ID: <497995D5.3070309@gmail.com> (maybe sending did not work) Hi, I have just started with OpenLayers and I have a maybe silly question: I managed to display markers, polygons, points, markers with a description which is displayed when the marker has been clicked ... but how can I draw a text like "Hello world" at a specific lonlat position (maybe with an offset in pixels) in a map? Thanks Roland From asufsc at gmail.com Fri Jan 23 05:46:25 2009 From: asufsc at gmail.com (Salvaro) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Thematic map and legend In-Reply-To: References: Message-ID: <1232707585194-2202627.post@n2.nabble.com> Hehehe, the second class of Thematic Cartography on Geography course "you never should create a map without legend" =P. I used the lib Ext to create a window with the legend. Regards. goliah wrote: > > Dear list, > > here is the question: > I'd like to have a thematic map in Openlayers, e.g. a map where the > style of features is based on a classification of some attribute. > > For doing this it would be necessary to define a mapping between the > attribute value and desired classes (1 class -> 1 attribute value > range), and associate a color palette to classes (1 class -> 1 color) > Moreover, it would be nice to have a legend showing the meaning of > colors in terms of the original attribute value. > > Anyone has some experience related to this with OpenLayers? Is anyone > interested in helping me with developement? > I think this kind of feature would be very useful. > > Thanks for your time and help > Mauro > > > -- > Mauro Bianchi > bianchimro@gmail.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Thematic-map-and-legend-tp2202286p2202627.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From asufsc at gmail.com Fri Jan 23 05:47:37 2009 From: asufsc at gmail.com (Salvaro) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How can I draw "Hello world"? (2) In-Reply-To: <497995D5.3070309@gmail.com> References: <497995D5.3070309@gmail.com> Message-ID: <1232707657207-2202631.post@n2.nabble.com> You can use popups for that (more specifically AnchoredPopup). Regards. Roland-3 wrote: > > (maybe sending did not work) > > Hi, > > I have just started with OpenLayers and I have a maybe silly question: > > I managed to display markers, polygons, points, markers with a > description which is displayed when the marker has > been clicked ... but how can I draw a text like "Hello world" at a > specific lonlat position (maybe with an offset in pixels) in a map? > > Thanks > Roland > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/How-can-I-draw-%22Hello-world%22--%282%29-tp2202466p2202631.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bianchimro at gmail.com Fri Jan 23 06:36:58 2009 From: bianchimro at gmail.com (goliah) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Thematic map and legend In-Reply-To: <1232707585194-2202627.post@n2.nabble.com> References: <1232707585194-2202627.post@n2.nabble.com> Message-ID: <1232710618795-2202836.post@n2.nabble.com> Hi again, after some advice given me, I've come to a more precise specification. here it is. I'd like to develop a javascript implementation of the whole thing, featuring: *classifying a general vector layer (any type) based on attribute *mapping classification to a color palette *create automatically a legend widget. I think it should be possible. My idea is the following: given a vector layer and a feature attribute: - provide a couple of simple functions to extract classes *given an array of boundaries *with uniform distribution, given a number of classes toget - iterate through features and add a "class" attribute (or sth alike) calculating it with one of the above functions or another function defined onthe fly - create a stylemap using the class attribute. It would be nice to have a nice mechanism to use a predefined palette. And it would be nice to define a set of predefined palettes (which are just constant arrays or sth alike) - create a function that builds the legend for the given classes and palette. Do you think it is feasible? Regards Mauro -- View this message in context: http://n2.nabble.com/Thematic-map-and-legend-tp2202286p2202836.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From joost at shaw.ca Fri Jan 23 10:45:35 2009 From: joost at shaw.ca (jvanulden) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Thematic map and legend In-Reply-To: References: Message-ID: <1232725535847-2203890.post@n2.nabble.com> I may have gotten you part way there: http://dev.openlayers.org/sandbox/jvanulden/openlayers/examples/extended-layerswitcher.html I wouldn't contributing to the extent that I can. Perhaps we can use portions of: http://blog.geoserver.org/2008/12/23/geoext-based-sld-editor/ Cheers, Joost goliah wrote: > > Dear list, > > here is the question: > I'd like to have a thematic map in Openlayers, e.g. a map where the > style of features is based on a classification of some attribute. > > For doing this it would be necessary to define a mapping between the > attribute value and desired classes (1 class -> 1 attribute value > range), and associate a color palette to classes (1 class -> 1 color) > Moreover, it would be nice to have a legend showing the meaning of > colors in terms of the original attribute value. > > Anyone has some experience related to this with OpenLayers? Is anyone > interested in helping me with developement? > I think this kind of feature would be very useful. > > Thanks for your time and help > Mauro > > > -- > Mauro Bianchi > bianchimro@gmail.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Thematic-map-and-legend-tp2202286p2203890.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From osm222 at gmail.com Fri Jan 23 12:11:50 2009 From: osm222 at gmail.com (Roland) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] XAPI: Should the syntax node[shop|amenity=*][bbox=...] work? Message-ID: <4979FA56.7080605@gmail.com> Hi, when playing with XAPI, I could not make this syntax work: http://www.informationfreeway.org/api/0.5/map?node[shop|amenity=*][bbox=11.54,48.14,11.543,48.145] It seems that it reads all nodes. From the rules on page http://wiki.openstreetmap.org/wiki/Xapi someone could assume that it "should" work ... Thanks Roland From apw217 at MIT.EDU Fri Jan 23 12:59:37 2009 From: apw217 at MIT.EDU (alyssa wright) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] OpenLayers.ProxyHost Message-ID: <497A0589.6010705@mit.edu> Hi all, I know it's been asked before, but after hitting my head against many a wall I humbly ask again: I've been attempting to get the rss examples in general, and georss.html example, in particular to work with an HTTP URL. As instructed in the FAQ, I saved the proxy.cgi script from the svn download in a cgi-bin folder within my local examples folder. Then I set the proxyhost variable to OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; When I navigate to the script (http://localhost:8888/openlayers/examples/cgi-bin/proxy.cgi) the resulting content is the text of the script and not the openlayers site. (I do not know if this is a sign of a problem). When I attempt to load the feed (http://www.greenwich-church.net/GeoRSS.xml) in georss.html, "GeoRss.xml" shows up as an overlay, but no data registers on the map. When I load this same feed on the openlayers version (http://www.openlayers.org/dev/examples/georss.html) "Greenwich Church" shows an an overlay along with corresponding data. I have tried various combinations of where to save the proxy script (e.g., in the examples folder with the georss file and the variable as OpenLayers.ProxyHost = "";) and I have tried variations where the AddHandler section of my httpd.conf knows to call python (as instructed here http://gist.fas.harvard.edu/chgis/?p=14). Any help is greatly appreciated. Best, Alyssa. PS. I am not that interested in greenwich churches. . . it was just an easy test case. From igrcic at gmail.com Fri Jan 23 13:01:27 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] OpenLayers.ProxyHost In-Reply-To: <497A0589.6010705@mit.edu> References: <497A0589.6010705@mit.edu> Message-ID: hi, try chmod +x proxy.cgi cheers On Fri, Jan 23, 2009 at 6:59 PM, alyssa wright wrote: > Hi all, > > I know it's been asked before, but after hitting my head against many a > wall I humbly ask again: > > I've been attempting to get the rss examples in general, and georss.html > example, in particular to work with an HTTP URL. > > As instructed in the FAQ, I saved the proxy.cgi script from the svn > download in a cgi-bin folder within my local examples folder. Then I > set the proxyhost variable to OpenLayers.ProxyHost = > "/cgi-bin/proxy.cgi?url="; When I navigate to the script > (http://localhost:8888/openlayers/examples/cgi-bin/proxy.cgi) the > resulting content is the text of the script and not the openlayers > site. (I do not know if this is a sign of a problem). > > When I attempt to load the feed > (http://www.greenwich-church.net/GeoRSS.xml) in georss.html, > "GeoRss.xml" shows up as an overlay, but no data registers on the map. > When I load this same feed on the openlayers version > (http://www.openlayers.org/dev/examples/georss.html) "Greenwich Church" > shows an an overlay along with corresponding data. > > I have tried various combinations of where to save the proxy script > (e.g., in the examples folder with the georss file and the variable as > OpenLayers.ProxyHost = "";) and I have tried variations where the > AddHandler section of my httpd.conf knows to call python (as instructed > here http://gist.fas.harvard.edu/chgis/?p=14). > > Any help is greatly appreciated. > > Best, > Alyssa. > > PS. I am not that interested in greenwich churches. . . it was just an > easy test case. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From crschmidt at metacarta.com Fri Jan 23 13:11:41 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] XAPI: Should the syntax node[shop|amenity=*][bbox=...] work? In-Reply-To: <4979FA56.7080605@gmail.com> References: <4979FA56.7080605@gmail.com> Message-ID: <20090123181141.GK32107@metacarta.com> On Fri, Jan 23, 2009 at 06:11:50PM +0100, Roland wrote: > Hi, > > when playing with XAPI, I could not make this syntax work: > > http://www.informationfreeway.org/api/0.5/map?node[shop|amenity=*][bbox=11.54,48.14,11.543,48.145] > > It seems that it reads all nodes. Looks like you meant to target an OpenStreetMap, not an OpenLayers list. Regards, -- Christopher Schmidt MetaCarta From Steve.Lime at dnr.state.mn.us Fri Jan 23 19:40:12 2009 From: Steve.Lime at dnr.state.mn.us (Steve Lime) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Practical number of vector features... Message-ID: <497A0F0C.5157.008F.0@dnr.state.mn.us> Hi all: Are there any guidelines for the number of vector features that OL 2.7 can handle? I'm feeding is 450 point features as GeoJSON and IE 7 in particular takes forever (ok, just a minute or so) to render the interface. Firefox 2 is quicker but is jerky with pan and box zooms. If I make the GeoJSON feed smaller (say under 100) then things work as expected. These is are anecdotal ramblings from a XP window box and a crappy labtop (so it may just be me)... Steve From crschmidt at metacarta.com Fri Jan 23 20:32:19 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Practical number of vector features... In-Reply-To: <497A0F0C.5157.008F.0@dnr.state.mn.us> References: <497A0F0C.5157.008F.0@dnr.state.mn.us> Message-ID: <20090124013219.GO32107@metacarta.com> On Fri, Jan 23, 2009 at 06:40:12PM -0600, Steve Lime wrote: > Hi all: Are there any guidelines for the number of vector features that OL 2.7 can handle? I'm feeding is 450 point features > as GeoJSON and IE 7 in particular takes forever (ok, just a minute or so) to render the interface. Firefox 2 is quicker but is > jerky with pan and box zooms. If I make the GeoJSON feed smaller (say under 100) then things work as expected. These is > are anecdotal ramblings from a XP window box and a crappy labtop (so it may just be me)... This all sounds like pretty typical performance. 100 features is a good upper limit if you care about suppoting everyone reasonably. Regards, -- Christopher Schmidt MetaCarta From shai_mus at hotmail.com Sat Jan 24 04:33:36 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Drawing a polygon? Message-ID: <1232789616571-2208162.post@n2.nabble.com> Dear All, I have map now. So I want a tool to draw polygon on top of it? How can I do it? Any samples please? -- View this message in context: http://n2.nabble.com/Drawing-a-polygon--tp2208162p2208162.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Sat Jan 24 05:31:48 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Drawing a polygon? In-Reply-To: <1232789616571-2208162.post@n2.nabble.com> Message-ID: Hi, This is a good source: http://openlayers.org/dev/examples/ Look for draw, then you will find "OpenLayers Draw Feature Example". Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von newbie Gesendet: Samstag, 24. Januar 2009 10:34 An: users@openlayers.org Betreff: [OpenLayers-Users] Drawing a polygon? Dear All, I have map now. So I want a tool to draw polygon on top of it? How can I do it? Any samples please? -- View this message in context: http://n2.nabble.com/Drawing-a-polygon--tp2208162p2208162.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 dave.potts at pinan.co.uk Sat Jan 24 09:10:38 2009 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Problem with google maps redrawing issue In-Reply-To: <49797B4B.1030505@comai.to> References: <4975A651.7060609@comai.to> <5b021dd0901211327r29a625can97119d61fc6e0e3a@mail.gmail.com> <49797B4B.1030505@comai.to> Message-ID: <497B215E.30402@pinan.co.uk> I have openlayers application which draw a google map within a table. But when the browser (firefox) loads the google map, it appears to draw only the top left hand corner of the map, firebug indicates that all of the tiles are been downloaded. If you resize the broswer, the rest of the googe map tile appear Any suggestions as to what is going wrong ? Dave. -------------- next part -------------- A non-text attachment was scrubbed... Name: dave_potts.vcf Type: text/x-vcard Size: 85 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090124/23fceaf8/dave_potts.vcf From iain at g7iii.net Sat Jan 24 13:25:51 2009 From: iain at g7iii.net (Iain Young) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] "Lower" Overlays Not Showing When Map Is Zoomed Out Message-ID: <497B5D2F.3080201@g7iii.net> Hi All, I have just started experimenting and playing with OpenLayers, so this may well be a FAQ, or Newbie question, although I have tried searching, but to no avail. I have a scaled overall base layer, which is a PNG of the NASA Blue Marble Image covering the entire world. I have higher res (cropped/cut) versions for Europe, UK+Ireland, and the Southern United Kingdom. I've added the Europe, UK+Ireland, and Southern UK Maps as their own "Overlay" Layers, with their correct bounds. If I start at zoom level 0, then all 3 closer range maps are unavailable for selection. Zooming to level 3 makes Europe available, another zoom level, and UK+Ireland appears. Two more zoom levels, and Southern UK shows up. I guess I expected this, as it's related to the bounds of the induvidual maps. However, in order to get to the appropriate zoom level, the base layer (and "lower" layers for that matter) end up very blocky. How can I enable my "lower" layers to be rendered, while being zoomed out ? I'm guessing the answer has to do with minResolution, maxResolution, minZoomLevel, maxZoomLevel and friends, however, having fiddled with any and all related option, I can't seem to change the behaviour. Any help would be gratefully received, you can see what I mean here: http://hal.g7iii.net/openlayers/ol-bluemarble.html Best Regards Iain From arnd.wippermann at web.de Sat Jan 24 17:55:32 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] "Lower" Overlays Not Showing When Map Is ZoomedOut In-Reply-To: <497B5D2F.3080201@g7iii.net> Message-ID: Hi, I use this image layers options, when I add an image layer as overlay to my map: {'isBaseLayer': false, resolution : myBaseLayer.resolutions, 'maxResolution': myBaseLayer.resolutions[0]} myBaseLayer have to add to the map before the other layers are added to get the resolutions from myBaseLayer. ... map.addLayer(world); var eu = new OpenLayers.Layer.Image('Europe', 'maps/BlueMarble-Jan-Europe.png', new OpenLayers.Bounds(-13, 33, 65, 72), new OpenLayers.Size(0,0), //Size only needed if no resolutions declared {'isBaseLayer': false, resolution : world.resolutions, 'maxResolution': world.resolutions[0]} ); ... Then your layers should be availible as the baselayer. To add options to your layer you have to use { key0: value0, key1 : value1 } One hint : reduce the image size, your images have 5MB! to get better loading times. Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Iain Young Gesendet: Samstag, 24. Januar 2009 19:26 An: users@openlayers.org Betreff: [OpenLayers-Users] "Lower" Overlays Not Showing When Map Is ZoomedOut Hi All, I have just started experimenting and playing with OpenLayers, so this may well be a FAQ, or Newbie question, although I have tried searching, but to no avail. I have a scaled overall base layer, which is a PNG of the NASA Blue Marble Image covering the entire world. I have higher res (cropped/cut) versions for Europe, UK+Ireland, and the Southern United Kingdom. I've added the Europe, UK+Ireland, and Southern UK Maps as their own "Overlay" Layers, with their correct bounds. If I start at zoom level 0, then all 3 closer range maps are unavailable for selection. Zooming to level 3 makes Europe available, another zoom level, and UK+Ireland appears. Two more zoom levels, and Southern UK shows up. I guess I expected this, as it's related to the bounds of the induvidual maps. However, in order to get to the appropriate zoom level, the base layer (and "lower" layers for that matter) end up very blocky. How can I enable my "lower" layers to be rendered, while being zoomed out ? I'm guessing the answer has to do with minResolution, maxResolution, minZoomLevel, maxZoomLevel and friends, however, having fiddled with any and all related option, I can't seem to change the behaviour. Any help would be gratefully received, you can see what I mean here: http://hal.g7iii.net/openlayers/ol-bluemarble.html Best Regards Iain _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From shai_mus at hotmail.com Sun Jan 25 13:34:48 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Drawing a polygon? In-Reply-To: References: <1232789616571-2208162.post@n2.nabble.com> Message-ID: <1232908488208-2214121.post@n2.nabble.com> Dear Arnd, I have managed to assimilate the code into my map application. The draw points works perfectly fine. But both draw line and polygon is not working. When I am using either one and try to click the points appear and gone it doesnt stick to that location? Why this happends ya ? Arnd Wippermann wrote: > > Hi, > > This is a good source: > http://openlayers.org/dev/examples/ > > Look for draw, then you will find "OpenLayers Draw Feature Example". > > Arnd Wippermann > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von newbie > Gesendet: Samstag, 24. Januar 2009 10:34 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Drawing a polygon? > > > Dear All, > I have map now. So I want a tool to draw polygon on top of it? > How can I do it? Any samples please? > -- > View this message in context: > http://n2.nabble.com/Drawing-a-polygon--tp2208162p2208162.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Drawing-a-polygon--tp2208162p2214121.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Sun Jan 25 15:02:10 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Drawing a polygon? In-Reply-To: <1232908488208-2214121.post@n2.nabble.com> Message-ID: Hi, In this example drawing is by default in freehand mode. That means, you have to draw with mouse down or you use the shift key while drawing to change the mode. Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von newbie Gesendet: Sonntag, 25. Januar 2009 19:35 An: users@openlayers.org Betreff: Re: [OpenLayers-Users] Drawing a polygon? Dear Arnd, I have managed to assimilate the code into my map application. The draw points works perfectly fine. But both draw line and polygon is not working. When I am using either one and try to click the points appear and gone it doesnt stick to that location? Why this happends ya ? Arnd Wippermann wrote: > > Hi, > > This is a good source: > http://openlayers.org/dev/examples/ > > Look for draw, then you will find "OpenLayers Draw Feature Example". > > Arnd Wippermann > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org > [mailto:users-bounces@openlayers.org] Im Auftrag von newbie > Gesendet: Samstag, 24. Januar 2009 10:34 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Drawing a polygon? > > > Dear All, > I have map now. So I want a tool to draw polygon on top of it? > How can I do it? Any samples please? > -- > View this message in context: > http://n2.nabble.com/Drawing-a-polygon--tp2208162p2208162.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Drawing-a-polygon--tp2208162p2214121.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 bthoen at gisnet.com Sun Jan 25 21:18:08 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Querying Features on a WMS Layer Message-ID: <497D1D60.80403@gisnet.com> Has anyone here tried to hack a way into querying features from a WMS layer? I'm thinking it might be doable in a way similar to how MapSurfer does it. Basically, you capture a point click or box corners and send that back to a MapServer query template and then capture the results either into a querymap or a table template. Anyway, if anyone has done this and has an example they'd be willing to share, I'd like to see how it's done. If this technique actually works, I think it might be a good way to get the benefits of vector features without having to use feature objects. - Bill Thoen From richard.greenwood at gmail.com Sun Jan 25 22:32:19 2009 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Querying Features on a WMS Layer In-Reply-To: <497D1D60.80403@gisnet.com> References: <497D1D60.80403@gisnet.com> Message-ID: On Sun, Jan 25, 2009 at 7:18 PM, Bill Thoen wrote: > Has anyone here tried to hack a way into querying features from a WMS > layer? I'm thinking it might be doable in a way similar to how MapSurfer > does it. Basically, you capture a point click or box corners and send > that back to a MapServer query template and then capture the results > either into a querymap or a table template. Anyway, if anyone has done > this and has an example they'd be willing to share, I'd like to see how > it's done. If this technique actually works, I think it might be a good > way to get the benefits of vector features without having to use feature > objects. I'm using a MapServer layer, not a WMS layer, but it should be pretty similar. The info tool allows multiple select by dragging. Example: http://www.co.sweet.wy.us/mapserver/map.html -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From shai_mus at hotmail.com Sun Jan 25 22:48:43 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Drawing a polygon? In-Reply-To: References: <1232789616571-2208162.post@n2.nabble.com> <1232908488208-2214121.post@n2.nabble.com> Message-ID: <1232941723173-2216110.post@n2.nabble.com> Dear Arnd, Thank you for your help. I am actually new to openlayer. The reason I am learning how to draw is to be able to build geofencing. Do you think I am on the right track? After drawing I want to be able to send the coordinate to database via javascript is this possible? Thanks. Arnd Wippermann wrote: > > Hi, > > In this example drawing is by default in freehand mode. That means, you > have > to draw with mouse down or you use the shift key while drawing to change > the > mode. > > Arnd Wippermann > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von newbie > Gesendet: Sonntag, 25. Januar 2009 19:35 > An: users@openlayers.org > Betreff: Re: [OpenLayers-Users] Drawing a polygon? > > > Dear Arnd, > I have managed to assimilate the code into my map > application. > The draw points works perfectly fine. But both draw line and polygon is > not > working. When I am using either one and try to click the points appear and > gone it doesnt stick to that location? Why this happends ya ? > > Arnd Wippermann wrote: >> >> Hi, >> >> This is a good source: >> http://openlayers.org/dev/examples/ >> >> Look for draw, then you will find "OpenLayers Draw Feature Example". >> >> Arnd Wippermann >> >> >> -----Urspr?ngliche Nachricht----- >> Von: users-bounces@openlayers.org >> [mailto:users-bounces@openlayers.org] Im Auftrag von newbie >> Gesendet: Samstag, 24. Januar 2009 10:34 >> An: users@openlayers.org >> Betreff: [OpenLayers-Users] Drawing a polygon? >> >> >> Dear All, >> I have map now. So I want a tool to draw polygon on top of it? >> How can I do it? Any samples please? >> -- >> View this message in context: >> http://n2.nabble.com/Drawing-a-polygon--tp2208162p2208162.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > -- > View this message in context: > http://n2.nabble.com/Drawing-a-polygon--tp2208162p2214121.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Drawing-a-polygon--tp2208162p2216110.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bwoodall at bwoodall.org Mon Jan 26 00:05:56 2009 From: bwoodall at bwoodall.org (bwoodall) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Querying Features on a WMS Layer In-Reply-To: <497D1D60.80403@gisnet.com> References: <497D1D60.80403@gisnet.com> Message-ID: <1232946356.9131.421.camel@wardrobe.dhs.org> Howdy Bill, There are several ways, one can be found ( though maybe a bit outdated ) at http://trac.openlayers.org/wiki/GetFeatureInfo and another one ( a working example ) is at http://wardrobe.dhs.org/jrf/ using Hover I have several others, but they are currently offline at the moment. Hope that helps, ....Bill, On Sun, 2009-01-25 at 19:18 -0700, Bill Thoen wrote: > Has anyone here tried to hack a way into querying features from a WMS > layer? I'm thinking it might be doable in a way similar to how MapSurfer > does it. Basically, you capture a point click or box corners and send > that back to a MapServer query template and then capture the results > either into a querymap or a table template. Anyway, if anyone has done > this and has an example they'd be willing to share, I'd like to see how > it's done. If this technique actually works, I think it might be a good > way to get the benefits of vector features without having to use feature > objects. > > > - Bill Thoen > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From dave.potts at pinan.co.uk Mon Jan 26 01:11:27 2009 From: dave.potts at pinan.co.uk (Dave Potts) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Forcing a redraw within google layer In-Reply-To: <1232946356.9131.421.camel@wardrobe.dhs.org> References: <497D1D60.80403@gisnet.com> <1232946356.9131.421.camel@wardrobe.dhs.org> Message-ID: <497D540F.2090806@pinan.co.uk> I have a program with a google map image within a tabbed display. Only the first third of the map gets draw. If you resize the bnroswer display everything gets drawn correctly. Its possible to monitor what the google layer is doing via firefox, it appears to download all of the tiles correctly, but it just stops drawing them. From the way the display is drawn it appears to have only drawn the 3-4 tiles. Scrolling around results in the next tile being loaded in the top left hand corner. This seems to be a well known problem in the google world, ie http://groups.google.com.bz/group/Google-Maps-API/browse_thread/thread/02710b15f3d76ec2/67413d33e7fd0e74 http://groups.google.com/group/jquery-en/browse_thread/thread/484d6cd5fd2a64cd the suggestion is to call map.checkResize() There does'nt seem to be a way of doing this within openlayers. Calling redraw on the layer does'nt seem to do anything. The google map handle is correctly burried away within the openlayer software, so an external call to map.checkResize appears to be impossible. Any suggestions? is there a way to force a redraw off the image. David. -------------- next part -------------- A non-text attachment was scrubbed... Name: dave_potts.vcf Type: text/x-vcard Size: 85 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090126/e6f389aa/dave_potts.vcf From osm222 at gmail.com Mon Jan 26 03:58:08 2009 From: osm222 at gmail.com (Roland) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] XAPI: Should the syntax node[shop|amenity=*][bbox=...] work? (2) Message-ID: <497D7B20.6020008@gmail.com> (sorry for posting a second time ... I got a confirmation mail, however, the posting was not sent to the list, it seems) Hi, when playing with XAPI, I could not make this syntax work: http://www.informationfreeway.org/api/0.5/map?node[shop|amenity=*][bbox=11.54,48.14,11.543,48.145] It seems that this command reads _all_ nodes. From the rules on page http://wiki.openstreetmap.org/wiki/Xapi someone could assume that it "should" work ... Thanks Roland From osm222 at gmail.com Mon Jan 26 04:02:09 2009 From: osm222 at gmail.com (Roland) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Sorry, the wrong list, again -- XAPI: Should the syntax node[shop|amenity=*][bbox=...] work? (2) Message-ID: <497D7C11.8090803@gmail.com> Sorry, I wanted to send this to newbies@openstreetmap.org. Regards Roland ====================================================================== (sorry for posting a second time ... I got a confirmation mail, however, the posting was not sent to the list, it seems) Hi, when playing with XAPI, I could not make this syntax work: http://www.informationfreeway.org/api/0.5/map?node[shop|amenity=*][bbox=11.54,48.14,11.543,48.145] It seems that this command reads _all_ nodes. From the rules on page http://wiki.openstreetmap.org/wiki/Xapi someone could assume that it "should" work ... Thanks Roland From crschmidt at metacarta.com Mon Jan 26 07:23:33 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] XAPI: Should the syntax node[shop|amenity=*][bbox=...] work? (2) In-Reply-To: <497D7B20.6020008@gmail.com> References: <497D7B20.6020008@gmail.com> Message-ID: <20090126122333.GG485@metacarta.com> On Mon, Jan 26, 2009 at 09:58:08AM +0100, Roland wrote: > (sorry for posting a second time ... I got a > confirmation mail, however, the posting was not > sent to the list, it seems) Again, you're posting to an *OpenLayers* list. Please post to an OpenStreetMap list. -- Chris > Hi, > > when playing with XAPI, I could not make this syntax work: > > http://www.informationfreeway.org/api/0.5/map?node[shop|amenity=*][bbox=11.54,48.14,11.543,48.145] > > It seems that this command reads _all_ nodes. > > From the rules on page http://wiki.openstreetmap.org/wiki/Xapi someone > could assume that it "should" work ... > > Thanks > Roland > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From yves.moisan at boreal-is.com Mon Jan 26 08:46:56 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Practical number of vector features... In-Reply-To: <497A0F0C.5157.008F.0@dnr.state.mn.us> References: <497A0F0C.5157.008F.0@dnr.state.mn.us> Message-ID: <1232977616.6314.13.camel@dell-desktop.example.com> > Hi all: Are there any guidelines for the number of vector features that OL 2.7 can handle? I'm feeding is 450 point features > as GeoJSON and IE 7 in particular takes forever (ok, just a minute or so) to render the interface. Firefox 2 is quicker but is > jerky with pan and box zooms. Steve, Using a Cluster() strategy, I managed to have reasonable rendering times for 3000 points (GeoJSON). The key is the number of features to draw in a given BBOX (which defaults to 2X the viewport : look for previous thread on this list). In my case, if I can get to draw under 10 clusters it is relatively snappy (and yes those 10 clusters will contain my 3000 features). Zooming in, that's when problems occur because then even the clustering strategy will produce many features to draw. Sorry for not being more helpful. Yves From Aleda.Freeman at state.ma.us Mon Jan 26 11:02:25 2009 From: Aleda.Freeman at state.ma.us (Freeman, Aleda (EEA)) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] OpenLayers over dialup Message-ID: <024D3FC6993FB54DA18235F9CF9B2327FB06FC@ES-MSG-002.es.govt.state.ma.us> Does anyone have experience with serving a simple OpenLayers map over a dialup connection? My boss wants to make sure that our prospective users will be able to use the map. Aleda Freeman http://www.mass.gov/mgis - MassGIS http://lyceum.massgis.state.ma.us - Webservices Wiki MassGIS is the Commonwealth's Office of Geographic and Environmental Information, located in the Executive Office of Energy and Environmental Affairs -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090126/ab98672b/attachment.html From crschmidt at metacarta.com Mon Jan 26 11:28:00 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] OpenLayers over dialup In-Reply-To: <024D3FC6993FB54DA18235F9CF9B2327FB06FC@ES-MSG-002.es.govt.state.ma.us> References: <024D3FC6993FB54DA18235F9CF9B2327FB06FC@ES-MSG-002.es.govt.state.ma.us> Message-ID: <20090126162759.GI485@metacarta.com> On Mon, Jan 26, 2009 at 11:02:25AM -0500, Freeman, Aleda (EEA) wrote: > Does anyone have experience with serving a simple OpenLayers map over a > dialup connection? > My boss wants to make sure that our prospective users will be able to > use the map. Some tips for low bandwidth OpenLayers usage. 1. singleTile, with a small ratio (~1.1 or so) will appoximate the behavior typical of most ArcIMS web interfaces -- single tile loading whenever the bounds don't match. or If you expect users to come back to the application a lot, tiled + long caching headeres may be better. 2. Build a single file build with minimal JS file for a small OL lib. http://docs.openlayers.org/library/deploying has more info. 3. Caching headers for pages and so on is useful. 4. mod_deflate can shrink your OL lib significantly. 5. Make sure your tiles are as small as possible -- I believe GeoServer (which I assume you're using) has support for 256 color paletted images, which are much smaller than full 32 bit pngs. Regards, -- Christopher Schmidt MetaCarta From Brian.Walawender at noaa.gov Mon Jan 26 12:37:27 2009 From: Brian.Walawender at noaa.gov (Brian Walawender) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Problem using containsPoint or intersects Message-ID: <005101c97fdc$c2054df0$460fe9d0$%walawender@noaa.gov> Hello, I am trying to use the containsPoint function to check to see whether a point is within a polygon. Here is a snippet from my code: // create a polygon feature from a linear ring of points var pointList = []; var polyPoints = polygon.split(","); for (var i in polyPoints) { var pLonLat = polyPoints[i].split(" "); var newPoint = new OpenLayers.Geometry.Point(pLonLat[0], pLonLat[1]); pointList.push(newPoint); } var linearRing = new OpenLayers.Geometry.LinearRing(pointList); var warnPoly = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing])); var checkPoint = new OpenLayers.Geometry.Point(x, y); isIn = warnPoly.containsPoint(checkPoint); Unfortunately I get an error stating that containsPoint is not a function. I've also tried intersects with no success either. bw _________________________________________________ Brian Walawender Technique Development Meteorologist Scientific Services Division - Central Region Headquarters 816-268-3114 - Office 816-805-6497 - Cell -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090126/f9a41c7c/attachment.html From stephane.poirier at usherbrooke.ca Mon Jan 26 13:03:33 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] snaping to grid Message-ID: <8DA045D5938549E4AD976C18E31FF6DF@flshedu.usherbrooke.ca> Hi All, How can a point feature (or vertices of a rectangle feature), being inserted, be snaped to a grid? Stephane -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090126/f9586718/attachment.html From crschmidt at metacarta.com Mon Jan 26 13:11:21 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Problem using containsPoint or intersects In-Reply-To: <005101c97fdc$c2054df0$460fe9d0$%walawender@noaa.gov> References: <005101c97fdc$c2054df0$460fe9d0$%walawender@noaa.gov> Message-ID: <20090126181120.GJ485@metacarta.com> On Mon, Jan 26, 2009 at 11:37:27AM -0600, Brian Walawender wrote: > var warnPoly = new OpenLayers.Feature.Vector(new > OpenLayers.Geometry.Polygon([linearRing])); > > var checkPoint = new OpenLayers.Geometry.Point(x, y); > isIn = warnPoly.containsPoint(checkPoint); > > Unfortunately I get an error stating that containsPoint is not a function. > I've also tried intersects with no success either. Intersects (and containsPoint) are geometry methods, not feature methods. Try warnPoly.geometry.intersects(checkPoint). Regards, -- Christopher Schmidt MetaCarta From Brian.Walawender at noaa.gov Mon Jan 26 13:13:41 2009 From: Brian.Walawender at noaa.gov (Brian Walawender) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Problem using containsPoint or intersects In-Reply-To: <20090126181120.GJ485@metacarta.com> References: <005101c97fdc$c2054df0$460fe9d0$%walawender@noaa.gov> <20090126181120.GJ485@metacarta.com> Message-ID: <006a01c97fe1$d18fef50$74afcdf0$%walawender@noaa.gov> Christopher, That worked. Thank you very much. bw -----Original Message----- From: Christopher Schmidt [mailto:crschmidt@metacarta.com] Sent: Monday, January 26, 2009 12:11 PM To: Brian Walawender Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] Problem using containsPoint or intersects On Mon, Jan 26, 2009 at 11:37:27AM -0600, Brian Walawender wrote: > var warnPoly = new OpenLayers.Feature.Vector(new > OpenLayers.Geometry.Polygon([linearRing])); > > var checkPoint = new OpenLayers.Geometry.Point(x, y); > isIn = warnPoly.containsPoint(checkPoint); > > Unfortunately I get an error stating that containsPoint is not a function. > I've also tried intersects with no success either. Intersects (and containsPoint) are geometry methods, not feature methods. Try warnPoly.geometry.intersects(checkPoint). Regards, -- Christopher Schmidt MetaCarta From arnd.wippermann at web.de Mon Jan 26 14:27:35 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Forcing a redraw within google layer In-Reply-To: <497D540F.2090806@pinan.co.uk> Message-ID: Hi, Try map.updateSize, perhaps this solves your problem. Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Dave Potts Gesendet: Montag, 26. Januar 2009 07:11 An: users@openlayers.org Betreff: [OpenLayers-Users] Forcing a redraw within google layer I have a program with a google map image within a tabbed display. Only the first third of the map gets draw. If you resize the bnroswer display everything gets drawn correctly. Its possible to monitor what the google layer is doing via firefox, it appears to download all of the tiles correctly, but it just stops drawing them. From the way the display is drawn it appears to have only drawn the 3-4 tiles. Scrolling around results in the next tile being loaded in the top left hand corner. This seems to be a well known problem in the google world, ie http://groups.google.com.bz/group/Google-Maps-API/browse_thread/thread/02710 b15f3d76ec2/67413d33e7fd0e74 http://groups.google.com/group/jquery-en/browse_thread/thread/484d6cd5fd2a64 cd the suggestion is to call map.checkResize() There does'nt seem to be a way of doing this within openlayers. Calling redraw on the layer does'nt seem to do anything. The google map handle is correctly burried away within the openlayer software, so an external call to map.checkResize appears to be impossible. Any suggestions? is there a way to force a redraw off the image. David. From nm3456 at gmail.com Mon Jan 26 15:47:55 2009 From: nm3456 at gmail.com (nm3456@gmail.com) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] GetFeatureInfo not working Message-ID: <000001c97ff7$5e1369b0$0201a8c0@laptop> Hi everyone, Being newbies with Geoserver-Openlayers, we set up an application, on a machine with Windows Server 2003-IIS. Everything works fine apart from the GetFeatureInfo calls. >From firebug, we located the following request, when we click on the map, which works fine, when we use it at the browser's address bar: http://84.205.237.73:443/geoserver/wms?REQUEST=GetFeatureInfo &EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=2767167.493482%2C4505675.64645 1%2C2822912.470114%2C4540167.850742&X=469&Y=327&INFO_FORMAT=text%2Fhtml&QUER Y_LAYERS=Tinos%3Adimoi&FEATURE_COUNT=50&Layers=Tinos%3Adimoi&Styles=&Srs=EPS G%3A900913&WIDTH=800&HEIGHT=495&format=image%2Fpng >From the above we concluded that there is a browser security problem. So far, we followed: 1) http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost 2) http://n2.nabble.com/Solution-to-proxy-for-WFS-request-on-IIS-td1830924.html #a20353666 3) http://openlayers.org/dev/examples/getfeatureinfo.html 4) http://n2.nabble.com/GetFeatureInfo-requests-never-get-answers-td1824945.htm l#a11586620 But now, instead of getting an endless "Loading... please wait...", we get an "HTTP Error 404 - File or directory not found.", when we click on the map. For our demo map go to: http://84.205.237.73/default/demomap.aspx I apologize for the Greek language used, but you should be able to browse the code :)) I hope that someone has a suggestion. Nikos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090126/63270c16/attachment.html From apw217 at MIT.EDU Mon Jan 26 16:23:38 2009 From: apw217 at MIT.EDU (alyssa wright) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] OpenLayers.ProxyHost In-Reply-To: References: <497A0589.6010705@mit.edu> Message-ID: <497E29DA.2060605@mit.edu> hi all. with ivan's help i made some progress. but i am still wondering if anyone can help me fully resolve my proxyhost. i believe it's an apache/mac thing. i've gotten an url for georss.html to run in safari, but not firefox. the error says: "uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)" in XMLHttpRequest.js. the xhr requests says 0. here's a run down of what i did: 1) i saved proxy.cgi into /Library/webserver/CGI-Executables 2) then i did the chmod +x proxy.cgi 3) i was working apache through mamp, which i think was a problem. so i uninstalled mamp and i enabled websharing in the sharing preferences pane. 4) then i did http://localhost/cgi-bin/proxy.cgi which brought me to a local openlayers site in both firefox and safari (yay!!) 5) then i attempted to set the proxyhost variable. after a couple different tries, i saw that setting it to: OpenLayers.ProxyHost = ""; works in safari, but not in firefox. once figured out, i promise to write the greatest how to ever. thanks again, alyssa. Ivan Grcic wrote: > hi, try > chmod +x proxy.cgi > > cheers > > On Fri, Jan 23, 2009 at 6:59 PM, alyssa wright wrote: > >> Hi all, >> >> I know it's been asked before, but after hitting my head against many a >> wall I humbly ask again: >> >> I've been attempting to get the rss examples in general, and georss.html >> example, in particular to work with an HTTP URL. >> >> As instructed in the FAQ, I saved the proxy.cgi script from the svn >> download in a cgi-bin folder within my local examples folder. Then I >> set the proxyhost variable to OpenLayers.ProxyHost = >> "/cgi-bin/proxy.cgi?url="; When I navigate to the script >> (http://localhost:8888/openlayers/examples/cgi-bin/proxy.cgi) the >> resulting content is the text of the script and not the openlayers >> site. (I do not know if this is a sign of a problem). >> >> When I attempt to load the feed >> (http://www.greenwich-church.net/GeoRSS.xml) in georss.html, >> "GeoRss.xml" shows up as an overlay, but no data registers on the map. >> When I load this same feed on the openlayers version >> (http://www.openlayers.org/dev/examples/georss.html) "Greenwich Church" >> shows an an overlay along with corresponding data. >> >> I have tried various combinations of where to save the proxy script >> (e.g., in the examples folder with the georss file and the variable as >> OpenLayers.ProxyHost = "";) and I have tried variations where the >> AddHandler section of my httpd.conf knows to call python (as instructed >> here http://gist.fas.harvard.edu/chgis/?p=14). >> >> Any help is greatly appreciated. >> >> Best, >> Alyssa. >> >> PS. I am not that interested in greenwich churches. . . it was just an >> easy test case. >> >> _______________________________________________ >> 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/20090126/cac7bd3b/attachment.html From arnd.wippermann at web.de Mon Jan 26 16:28:49 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] GetFeatureInfo not working In-Reply-To: <000001c97ff7$5e1369b0$0201a8c0@laptop> Message-ID: Hi, The proxy script is not availible. This page cannot be found http://84.205.237.73/default/charta/proxy.py. Arnd Wippermann ________________________________ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von nm3456@gmail.com Gesendet: Montag, 26. Januar 2009 21:48 An: users@openlayers.org Betreff: [OpenLayers-Users] GetFeatureInfo not working Hi everyone, Being newbies with Geoserver-Openlayers, we set up an application, on a machine with Windows Server 2003-IIS. Everything works fine apart from the GetFeatureInfo calls. >From firebug, we located the following request, when we click on the map, which works fine, when we use it at the browser's address bar: http://84.205.237.73:443/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=app lication%2Fvnd.ogc.se_xml&BBOX=2767167.493482%2C4505675.646451%2C2822912.470 114%2C4540167.850742&X=469&Y=327&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=Tinos% 3Adimoi&FEATURE_COUNT=50&Layers=Tinos%3Adimoi&Styles=&Srs=EPSG%3A900913&WIDT H=800&HEIGHT=495&format=image%2Fpng >From the above we concluded that there is a browser security problem. So far, we followed: 1) http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost 2) http://n2.nabble.com/Solution-to-proxy-for-WFS-request-on-IIS-td1830924.html #a20353666 3) http://openlayers.org/dev/examples/getfeatureinfo.html 4) http://n2.nabble.com/GetFeatureInfo-requests-never-get-answers-td1824945.htm l#a11586620 But now, instead of getting an endless "Loading... please wait...", we get an "HTTP Error 404 - File or directory not found.", when we click on the map. For our demo map go to: http://84.205.237.73/default/demomap.aspx I apologize for the Greek language used, but you should be able to browse the code :)) I hope that someone has a suggestion. Nikos From ivan.grcic at geofoto.hr Mon Jan 26 17:38:21 2009 From: ivan.grcic at geofoto.hr (ivan.grcic@geofoto.hr) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] snaping to grid In-Reply-To: <8DA045D5938549E4AD976C18E31FF6DF@flshedu.usherbrooke.ca> References: <8DA045D5938549E4AD976C18E31FF6DF@flshedu.usherbrooke.ca> Message-ID: Hi, snapping is being developed now: http://n2.nabble.com/snapping-td2130848.html#a2130848 On 1/26/09, stephane.poirier@usherbrooke.ca wrote: > Hi All, > > How can a point feature (or vertices of a rectangle feature), being > inserted, be snaped to a grid? > > Stephane > -- Ivan Grcic From miles.togoe at gmail.com Mon Jan 26 20:07:55 2009 From: miles.togoe at gmail.com (MilesTogoe) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] native kml support Message-ID: <497E5E6B.7090503@gmail.com> since kml is now an open standard, are there any projects working on native kml rendering in OpenLayers (ie without having to connect to Google with their api keys,etc)? There seems to be an abundance of rendering options: KML, OL vector drawing, SVG, ... and it would be helpful to standardize more on one. From crschmidt at metacarta.com Mon Jan 26 20:36:50 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] native kml support In-Reply-To: <497E5E6B.7090503@gmail.com> References: <497E5E6B.7090503@gmail.com> Message-ID: <20090127013650.GL485@metacarta.com> On Mon, Jan 26, 2009 at 07:07:55PM -0600, MilesTogoe wrote: > since kml is now an open standard, are there any projects working on > native kml rendering in OpenLayers (ie without having to connect to > Google with their api keys,etc)? There seems to be an abundance of > rendering options: KML, OL vector drawing, SVG, ... and it would be > helpful to standardize more on one. http://openlayers.org/dev/examples/KMLParser.html http://openlayers.org/dev/examples/kml-layer.html http://dev.openlayers.org/apidocs/files/OpenLayers/Format/KML-js.html http://docs.openlayers.org/library/layers#gml http://crschmidt.net/mapping/kml It's not clear to me why you describe KML as a 'rendering option', or why you seperate "OL vector drawing" and "SVG". KML is a serialization format for geographic data with styling information. OpenLayers has support for parsing this format -- as well as many others. OpenLayers typically parses this information into Vector Features, which can then be drawn -- depending on the application, and the browser, in one of VML, SVG, or Canvas, using the Renderer framework. These are all components of a set of tools for interacting with serialized geography and turning it into an interactive map in a browser. "Picking one" is like saying "We should pick one: HTTP, HTML, or Javascript" -- they're all different components of a stack needed to make things happen. Regards, -- Christopher Schmidt MetaCarta From willsmithfield at gmail.com Mon Jan 26 20:40:10 2009 From: willsmithfield at gmail.com (smithfield) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Ancored Popup Autosize troubles Message-ID: <1233020410057-2221855.post@n2.nabble.com> Hello list. I have my map just about where I need it but the anchored popups are giving me a hard time. I have tried to include the autosize command with little luck. Any thoughts? Regards-WS World Map
any thoughts on disabling the scroll wheel would be great too! Thanks -- View this message in context: http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2221855.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jatin.a at iworktech.com Tue Jan 27 03:28:22 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How to add a an overlay on top of a map? In-Reply-To: <1232601025326-2196295.post@n2.nabble.com> References: <1232601025326-2196295.post@n2.nabble.com> Message-ID: <1233044902960-2222981.post@n2.nabble.com> hey newbie... For drawing vector features..... you can refer to http://openlayers.org/dev/examples/draw-feature.html http://openlayers.org/dev/examples/drag-feature.html To achieve the functionality you need you can follow any of 2 methods mentioned below: 1)Change the following code in draw-feature.html: // This lets you call a function when a feature is inserted on vector layer var lineLayer = new OpenLayers.Layer.Vector("Line Layer",{onFeatureInsert: featureIsAdded}); //Add this funtion in your code function featureIsAdded(feature){ alert("Feature with id: "+feature.id+", has following Geometry: "+feature.geometry); } I feel that would be sufficient for you...... 2)There is also another nice example but some what different that you can see from: http://openlayers.org/pipermail/users/2007-June/001998.html http://openlayers.org/pipermail/users/2007-June/001998.html I have modified that code and I am attaching that with this post.... But it has few problems.... It does show you the co-oridnates of all points of the line drawn but it does not add the line to the Line Layer... I don't understand why it works in the previous standard OpenLayers example and not in the second example that I downloaded from above link...... If someone has solution for that then that would nice of him/her..... newbie wrote: > > Dear All, > I am using geoserver and managed to put a sample shapefile and > able to view my simple map well. The problem now is that on top that map I > want to add a layer where I can like draw polygon and capture the > coordinates accordingly. How can I do this ? Thanks. > -- View this message in context: http://n2.nabble.com/How-to-add-a-an-overlay-on-top-of-a-map--tp2196295p2222981.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jatin.a at iworktech.com Tue Jan 27 03:30:56 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] How to add a an overlay on top of a map? In-Reply-To: <1233044902960-2222981.post@n2.nabble.com> References: <1232601025326-2196295.post@n2.nabble.com> <1233044902960-2222981.post@n2.nabble.com> Message-ID: <1233045056100-2222990.post@n2.nabble.com> Sorry I forgot to attach the file that I mentioned in my previous post.... I have named it as draw-feature2.html Jatin Ambasana wrote: > > hey newbie... > > For drawing vector features..... > you can refer to > http://openlayers.org/dev/examples/draw-feature.html > http://openlayers.org/dev/examples/drag-feature.html > > To achieve the functionality you need you can follow any of 2 methods > mentioned below: > > 1)Change the following code in draw-feature.html: > > // This lets you call a function when a feature is inserted on vector > layer > var lineLayer = new OpenLayers.Layer.Vector("Line Layer",{onFeatureInsert: > featureIsAdded}); > > //Add this funtion in your code > function featureIsAdded(feature){ > alert("Feature with id: "+feature.id+", has following Geometry: > "+feature.geometry); > } > > I feel that would be sufficient for you...... > > 2)There is also another nice example but some what different that you can > see from: > http://openlayers.org/pipermail/users/2007-June/001998.html > http://openlayers.org/pipermail/users/2007-June/001998.html > > I have modified that code and I am attaching that with this post.... But > it has few problems.... It does show you the co-oridnates of all points of > the line drawn but it does not add the line to the Line Layer... > > I don't understand why it works in the previous standard OpenLayers > example and not in the second example that I downloaded from above > link...... > > If someone has solution for that then that would nice of him/her..... > > > newbie wrote: >> >> Dear All, >> I am using geoserver and managed to put a sample shapefile and >> able to view my simple map well. The problem now is that on top that map >> I want to add a layer where I can like draw polygon and capture the >> coordinates accordingly. How can I do this ? Thanks. >> > > http://n2.nabble.com/file/n2222990/draw-feature2.html draw-feature2.html -- View this message in context: http://n2.nabble.com/How-to-add-a-an-overlay-on-top-of-a-map--tp2196295p2222990.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From inspdr00 at gmail.com Tue Jan 27 03:32:22 2009 From: inspdr00 at gmail.com (Pablo =?ISO-8859-1?Q?D=EDaz?=) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] GetFeatureInfo not working In-Reply-To: <000001c97ff7$5e1369b0$0201a8c0@laptop> References: <000001c97ff7$5e1369b0$0201a8c0@laptop> Message-ID: <1233045142.6240.11.camel@janojano> Hi This error maybe caused by security police (I don't remember the name) that don't allow transfer data between servers that don't run at the same port. I had the same problem in my application, I use tomcat(with java,jsp) + geoserver, both run separately. When I put geoserver as a war file into tomcat I had no problem, but when I put both separately (on different ports) I had the same problem. To arrange this problem, you have to make a connection proxy between geoserver and the application server (May be you use IIS + geoserver separately, doesn't it?). You should search into application server documentation to know how do this. Bye!!! El lun, 26-01-2009 a las 22:47 +0200, nm3456@gmail.com escribi?: > Hi everyone, > > Being newbies with Geoserver-Openlayers, we set up an application, on > a machine with Windows Server 2003-IIS. > > Everything works fine apart from the GetFeatureInfo calls. > > From firebug, we located the following request, when we click on the > map, which works fine, when we use it at the browser?s address bar: > > > > http://84.205.237.73:443/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=2767167.493482%2C4505675.646451%2C2822912.470114%2C4540167.850742&X=469&Y=327&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=Tinos%3Adimoi&FEATURE_COUNT=50&Layers=Tinos%3Adimoi&Styles=&Srs=EPSG%3A900913&WIDTH=800&HEIGHT=495&format=image%2Fpng > > > > From the above we concluded that there is a browser security problem? > > > > So far, we followed: > > 1) > http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost > > 2) > http://n2.nabble.com/Solution-to-proxy-for-WFS-request-on-IIS-td1830924.html#a20353666 > > 3) http://openlayers.org/dev/examples/getfeatureinfo.html > > 4) > http://n2.nabble.com/GetFeatureInfo-requests-never-get-answers-td1824945.html#a11586620 > > > > > > But now, instead of getting an endless ?Loading... please wait...", > > we get an ?HTTP Error 404 - File or directory not found.?, when we > click on the map? > > > > For our demo map go to: http://84.205.237.73/default/demomap.aspx > > I apologize for the Greek language used, but you should be able to > browse the code :)) > > > > I hope that someone has a suggestion? > > Nikos > > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From jatin.a at iworktech.com Tue Jan 27 04:48:01 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Drawing a polygon? In-Reply-To: <1232941723173-2216110.post@n2.nabble.com> References: <1232789616571-2208162.post@n2.nabble.com> <1232908488208-2214121.post@n2.nabble.com> <1232941723173-2216110.post@n2.nabble.com> Message-ID: Refer to http://n2.nabble.com/How-to-add-a-an-overlay-on-top-of-a-map--td2196295.html On Mon, Jan 26, 2009 at 9:18 AM, newbie wrote: > > Dear Arnd, > Thank you for your help. I am actually new to openlayer. The > reason I am learning how to draw is to be able to build geofencing. Do you > think I am on the right track? After drawing I want to be able to send the > coordinate to database via javascript is this possible? Thanks. > > Arnd Wippermann wrote: > > > > Hi, > > > > In this example drawing is by default in freehand mode. That means, you > > have > > to draw with mouse down or you use the shift key while drawing to change > > the > > mode. > > > > Arnd Wippermann > > > > > > -----Urspr?ngliche Nachricht----- > > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > Im > > Auftrag von newbie > > Gesendet: Sonntag, 25. Januar 2009 19:35 > > An: users@openlayers.org > > Betreff: Re: [OpenLayers-Users] Drawing a polygon? > > > > > > Dear Arnd, > > I have managed to assimilate the code into my map > > application. > > The draw points works perfectly fine. But both draw line and polygon is > > not > > working. When I am using either one and try to click the points appear > and > > gone it doesnt stick to that location? Why this happends ya ? > > > > Arnd Wippermann wrote: > >> > >> Hi, > >> > >> This is a good source: > >> http://openlayers.org/dev/examples/ > >> > >> Look for draw, then you will find "OpenLayers Draw Feature Example". > >> > >> Arnd Wippermann > >> > >> > >> -----Urspr?ngliche Nachricht----- > >> Von: users-bounces@openlayers.org > >> [mailto:users-bounces@openlayers.org] Im Auftrag von newbie > >> Gesendet: Samstag, 24. Januar 2009 10:34 > >> An: users@openlayers.org > >> Betreff: [OpenLayers-Users] Drawing a polygon? > >> > >> > >> Dear All, > >> I have map now. So I want a tool to draw polygon on top of > it? > >> How can I do it? Any samples please? > >> -- > >> View this message in context: > >> http://n2.nabble.com/Drawing-a-polygon--tp2208162p2208162.html > >> Sent from the OpenLayers Users mailing list archive at Nabble.com. > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > >> > > > > -- > > View this message in context: > > http://n2.nabble.com/Drawing-a-polygon--tp2208162p2214121.html > > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > -- > View this message in context: > http://n2.nabble.com/Drawing-a-polygon--tp2208162p2216110.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Regards, Jatin Ambasana iWork Technologies Pvt. Ltd. Mobile:+91-9765394718 Mail: jatin.a@iworktech.com Visit us: www.iworktech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090127/8f4e5f5e/attachment.html From damarmo at gmail.com Tue Jan 27 05:03:49 2009 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Printing the map Message-ID: <9771eb540901270203ybc54984i6cff954da101fa82@mail.gmail.com> Hello I need to print the outputs maps of my Openlayers application, but I don't know how to do it. Can anyone help me? Thanks -- Martinez Morata David *Thinking GIS* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090127/5b75ff34/attachment.html From jatin.a at iworktech.com Tue Jan 27 05:19:42 2009 From: jatin.a at iworktech.com (Jatin Ambasana) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] Printing the map In-Reply-To: <9771eb540901270203ybc54984i6cff954da101fa82@mail.gmail.com> References: <9771eb540901270203ybc54984i6cff954da101fa82@mail.gmail.com> Message-ID: I don't know of any way to directly print the contents of map output but yes..... I have found one way... may be it could be useful to you...... On any button click or any event you can capture the whole contents if the "div" tag in which you put your map.... Normally we name it as map. It will return you the whole map image contained in the div tag and then you can use it the way you want... On Tue, Jan 27, 2009 at 3:33 PM, David Martinez Morata wrote: > Hello > I need to print the outputs maps of my Openlayers application, but I don't > know how to do it. > Can anyone help me? > > Thanks > > -- > Martinez Morata David > *Thinking GIS* > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Regards, Jatin Ambasana *iWork Technologies Pvt. Ltd. **Mobile:+91-9765394718 Mail: jatin.a@iworktech.com Visit us: www.iworktech.com* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090127/ae9334ad/attachment.html From samuli.saarinen at remion.com Tue Jan 27 07:18:10 2009 From: samuli.saarinen at remion.com (Samuli Saarinen) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] custom feature markers Message-ID: <497EFB82.8030206@remion.com> Hello, I'm creating an application which uses OL to show objects on a map. I'm using OL to load KML file from the server using vector layer with BBOX strategy and HTTP protocol. It all works fine but there is one problem. I should be able to draw markers for the features dynamically based on some values on the kml data. I have tried to find an example that does this but so far I haven't been able to find one. All the examples I have found use the style framework with either the graphicName to show predifined symbols or externalGraphic to show custom static images. Can anybody tell me if it is possible to use other graphics than the predefined ones (circle, x, etc.). Thanks in advance, Samuli From crschmidt at metacarta.com Tue Jan 27 07:21:56 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:06 2010 Subject: [OpenLayers-Users] custom feature markers In-Reply-To: <497EFB82.8030206@remion.com> References: <497EFB82.8030206@remion.com> Message-ID: <20090127122156.GN485@metacarta.com> On Tue, Jan 27, 2009 at 02:18:10PM +0200, Samuli Saarinen wrote: > Hello, > > I'm creating an application which uses OL to show objects on a map. I'm > using OL to load KML file from the server using vector layer with BBOX > strategy and HTTP protocol. > > It all works fine but there is one problem. I should be able to draw > markers for the features dynamically based on some values on the kml > data. I have tried to find an example that does this but so far I > haven't been able to find one. All the examples I have found use the > style framework with either the graphicName to show predifined symbols > or externalGraphic to show custom static images. http://docs.openlayers.org/library/feature_styling "In this way, the style can contain rendering information which is dependant on the feature: for example, in a Style object, the string ${thumbnail} is replaced by the feature???s ???thumbnail??? attribute." However, OpenLayers KML support does not have support for any kind of attribute parsing from KML other than title and description. I would recommend that you should instead use KML > > > > > > > >
>
>
> > > > > any thoughts on disabling the scroll wheel would be great too! > > Thanks > -- > View this message in context: http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2221855.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 willsmithfield at gmail.com Wed Jan 28 10:12:37 2009 From: willsmithfield at gmail.com (smithfield) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Ancored Popup Autosize troubles In-Reply-To: <19B951DD4DF14843A0E7FE1D99110C3B@suen> References: <1233020410057-2221855.post@n2.nabble.com> <19B951DD4DF14843A0E7FE1D99110C3B@suen> Message-ID: <1233155557906-2232720.post@n2.nabble.com> Unfortunately, that didn't really answer the question. Could you be more specific? Thanks. ?? wrote: > > I just checked the content size and set the popup size dynamicly. > > Regards, > suen > > ----- Original Message ----- > From: "smithfield" > To: > Sent: Tuesday, January 27, 2009 9:40 AM > Subject: [OpenLayers-Users] Ancored Popup Autosize troubles > > >> >> Hello list. I have my map just about where I need it but the anchored >> popups >> are giving me a hard time. I have tried to include the autosize command >> with little luck. Any thoughts? >> >> Regards-WS >> >> >> >> World Map >> >> >> >> >> >> >> >> >>
>>
>>
>> >> >> >> >> any thoughts on disabling the scroll wheel would be great too! >> >> Thanks >> -- >> View this message in context: >> http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2221855.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2232720.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From seb at opengeo.org Wed Jan 28 11:03:30 2009 From: seb at opengeo.org (Sebastian Benthall) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Ancored Popup Autosize troubles In-Reply-To: <1233155557906-2232720.post@n2.nabble.com> References: <1233020410057-2221855.post@n2.nabble.com> <19B951DD4DF14843A0E7FE1D99110C3B@suen> <1233155557906-2232720.post@n2.nabble.com> Message-ID: <37716c5b0901280803n4503ed06ma6d7fd691eecc8be@mail.gmail.com> Ok. Looking at your application now, but I don't understand what it is that's giving you a hard time. What behavior do you want/expect that you aren't getting? On Wed, Jan 28, 2009 at 10:12 AM, smithfield wrote: > > Unfortunately, that didn't really answer the question. Could you be more > specific? > > Thanks. > > > ?? wrote: > > > > I just checked the content size and set the popup size dynamicly. > > > > Regards, > > suen > > > > ----- Original Message ----- > > From: "smithfield" > > To: > > Sent: Tuesday, January 27, 2009 9:40 AM > > Subject: [OpenLayers-Users] Ancored Popup Autosize troubles > > > > > >> > >> Hello list. I have my map just about where I need it but the anchored > >> popups > >> are giving me a hard time. I have tried to include the autosize command > >> with little luck. Any thoughts? > >> > >> Regards-WS > >> > >> > >> > >> World Map > >> > >> > >> > >> > >> > >> > >> > >> > >>
> >>
> >>
> >> > >> > >> > >> > >> any thoughts on disabling the scroll wheel would be great too! > >> > >> Thanks > >> -- > >> View this message in context: > >> > http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2221855.html > >> Sent from the OpenLayers Users mailing list archive at Nabble.com. > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > -- > View this message in context: > http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2232720.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Sebastian Benthall OpenGeo - http://opengeo.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090128/c4fc2f9c/attachment.html From bianchimro at gmail.com Wed Jan 28 11:06:47 2009 From: bianchimro at gmail.com (goliah) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Cannot cycle through vector layer features Message-ID: <1233158807168-2233009.post@n2.nabble.com> Dear all, I want to cycle through a vector layer (GML in my case) features. The layer loads and it's drawn, but i cannot access the features at all example: var overlay; //global variable overlay = new OpenLayers.Layer.GML("GML", 'file.gml'); var l = overlay.features.length; // this is ALWAYS 0! The strange thing is that, using firebug and watching the expression "overlay.features.length" gives me the right number of features. Any idea? Thanks Mauro -- View this message in context: http://n2.nabble.com/Cannot-cycle-through-vector-layer-features-tp2233009p2233009.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From willsmithfield at gmail.com Wed Jan 28 11:13:19 2009 From: willsmithfield at gmail.com (smithfield) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Ancored Popup Autosize troubles In-Reply-To: <37716c5b0901280803n4503ed06ma6d7fd691eecc8be@mail.gmail.com> References: <1233020410057-2221855.post@n2.nabble.com> <19B951DD4DF14843A0E7FE1D99110C3B@suen> <1233155557906-2232720.post@n2.nabble.com> <37716c5b0901280803n4503ed06ma6d7fd691eecc8be@mail.gmail.com> Message-ID: <1233159199412-2233062.post@n2.nabble.com> Thanks for the response. I am looking for the popup to autosize instead of size to 200 by 200. from the code.... popup = new OpenLayers.Popup.Anchored ("popup", >> feature.lonlat, new OpenLayers.Size(200,200), >> null, null, null, thanks for any input. -- View this message in context: http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2233062.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From giohappy at gmail.com Wed Jan 28 11:28:47 2009 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] how to deactivate editingtoolbar after featureadded Message-ID: Hello list, I'm using the editingtoolbar control panel. I need to disable it after any feature has been added (point, line or polygon), and reactivate it if the feature gets deleted. I've seen that calling: function locAdded(feature){ panel.controls[1].deactivate(); panel.controls[2].deactivate(); panel.controls[3].deactivate(); } deactivate the controls unitl the user click on the panel again... this is not what I need. In fact the panel control has an onClick handler that activate the control on which the onClick event has happened (line 212 in Panel.js). I've tried deactivating directly the panel, but the panel gets deleted. I need the panel to remain visible but "unclickable", until the unique feature has been deleted from the layer. I've tried to overload the onClick panel's method, but I couldn't get it to work... Thanks for any hint. giovanni From seb at opengeo.org Wed Jan 28 11:29:14 2009 From: seb at opengeo.org (Sebastian Benthall) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Ancored Popup Autosize troubles In-Reply-To: <1233159199412-2233062.post@n2.nabble.com> References: <1233020410057-2221855.post@n2.nabble.com> <19B951DD4DF14843A0E7FE1D99110C3B@suen> <1233155557906-2232720.post@n2.nabble.com> <37716c5b0901280803n4503ed06ma6d7fd691eecc8be@mail.gmail.com> <1233159199412-2233062.post@n2.nabble.com> Message-ID: <37716c5b0901280829y5f0f4bf9t5bb16c5453b8e351@mail.gmail.com> Ah, ok. Try this: popup.autoSize = true; some place after initializing the popup and before adding it to the map (like line 126), and pass null to the popup constructor instead of new OpenLayers.Size(200,200). What's going on is that autoSize is a boolean property of popups that gets checked by the popup code when the popup is rendered. It's an API property, so it's kosher to set it directly. What's weird is that unlike most OpenLayers classes, Popups don't take an options argument that would let you set in on initialization. Hope that helps. thanks for any input. > -- > View this message in context: > http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2233062.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Sebastian Benthall OpenGeo - http://opengeo.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090128/66b12201/attachment.html From igrcic at gmail.com Wed Jan 28 11:43:49 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Cannot cycle through vector layer features In-Reply-To: <1233158807168-2233009.post@n2.nabble.com> References: <1233158807168-2233009.post@n2.nabble.com> Message-ID: Hi, what happens if u do something like this: setTimeout(function(){alert(overlay.features.length), 3000}); On Wed, Jan 28, 2009 at 5:06 PM, goliah wrote: > > Dear all, > > I want to cycle through a vector layer (GML in my case) features. > The layer loads and it's drawn, but i cannot access the features at all > > example: > > var overlay; //global variable > > overlay = new OpenLayers.Layer.GML("GML", 'file.gml'); > > var l = overlay.features.length; // this is ALWAYS 0! > > The strange thing is that, using firebug and watching the expression > "overlay.features.length" gives me the right number of features. > > Any idea? > Thanks > Mauro > > > -- > View this message in context: http://n2.nabble.com/Cannot-cycle-through-vector-layer-features-tp2233009p2233009.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From giohappy at gmail.com Wed Jan 28 11:47:09 2009 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] how to deactivate editingtoolbar after featureadded In-Reply-To: References: Message-ID: Solved (somehow...): function locAdded(feature){ for(i=0;i<3;i++){ panel.controls[i+1].deactivate(); OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); } } giovanni 2009/1/28 G. Allegri : > Hello list, > I'm using the editingtoolbar control panel. I need to disable it after > any feature has been added (point, line or polygon), and reactivate it > if the feature gets deleted. > I've seen that calling: > > function locAdded(feature){ > panel.controls[1].deactivate(); > panel.controls[2].deactivate(); > panel.controls[3].deactivate(); > } > > deactivate the controls unitl the user click on the panel again... > this is not what I need. In fact the panel control has an onClick > handler that activate the control on which the onClick event has > happened (line 212 in Panel.js). > I've tried deactivating directly the panel, but the panel gets deleted. > > I need the panel to remain visible but "unclickable", until the unique > feature has been deleted from the layer. > > I've tried to overload the onClick panel's method, but I couldn't get > it to work... > Thanks for any hint. > > giovanni > From giohappy at gmail.com Wed Jan 28 11:49:51 2009 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] how to deactivate editingtoolbar after featureadded In-Reply-To: References: Message-ID: Sorry, I've sent too fast the solution. It works, but how can I overload the onClick event on the control to alert the user with "a feature has been already added"? In this case I don't have to stop observing the click but I need to handle it in a custom way... 2009/1/28 G. Allegri : > Solved (somehow...): > > function locAdded(feature){ > for(i=0;i<3;i++){ > panel.controls[i+1].deactivate(); > OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); > } > } > > giovanni > > 2009/1/28 G. Allegri : >> Hello list, >> I'm using the editingtoolbar control panel. I need to disable it after >> any feature has been added (point, line or polygon), and reactivate it >> if the feature gets deleted. >> I've seen that calling: >> >> function locAdded(feature){ >> panel.controls[1].deactivate(); >> panel.controls[2].deactivate(); >> panel.controls[3].deactivate(); >> } >> >> deactivate the controls unitl the user click on the panel again... >> this is not what I need. In fact the panel control has an onClick >> handler that activate the control on which the onClick event has >> happened (line 212 in Panel.js). >> I've tried deactivating directly the panel, but the panel gets deleted. >> >> I need the panel to remain visible but "unclickable", until the unique >> feature has been deleted from the layer. >> >> I've tried to overload the onClick panel's method, but I couldn't get >> it to work... >> Thanks for any hint. >> >> giovanni >> > From bartvde at osgis.nl Wed Jan 28 11:51:33 2009 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Cannot cycle through vector layer features In-Reply-To: References: <1233158807168-2233009.post@n2.nabble.com> Message-ID: <49808D15.7050500@osgis.nl> Instead, better use the loadend event for this. overlay.events.register('loadend', this, function() { alert(xxxx); }); Best regards, Bart Ivan Grcic wrote: > Hi, > > what happens if u do something like this: > > setTimeout(function(){alert(overlay.features.length), 3000}); > > > On Wed, Jan 28, 2009 at 5:06 PM, goliah wrote: > >> Dear all, >> >> I want to cycle through a vector layer (GML in my case) features. >> The layer loads and it's drawn, but i cannot access the features at all >> >> example: >> >> var overlay; //global variable >> >> overlay = new OpenLayers.Layer.GML("GML", 'file.gml'); >> >> var l = overlay.features.length; // this is ALWAYS 0! >> >> The strange thing is that, using firebug and watching the expression >> "overlay.features.length" gives me the right number of features. >> >> Any idea? >> Thanks >> Mauro >> >> >> -- >> View this message in context: http://n2.nabble.com/Cannot-cycle-through-vector-layer-features-tp2233009p2233009.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- Bart van den Eijnden OSGIS, Open Source GIS bartvde@osgis.nl http://www.osgis.nl From adube at mapgears.com Wed Jan 28 12:02:43 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] how to deactivate editingtoolbar after featureadded In-Reply-To: References: Message-ID: <49808FB3.6020206@mapgears.com> Hi, Take a look at this example (1). Zoom in and out the map. You will see that the buttons completely disappear. That could be an other option to your issue. (1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html Regards, Alexandre G. Allegri wrote: > Sorry, I've sent too fast the solution. It works, but how can I > overload the onClick event on the control to alert the user with "a > feature has been already added"? > In this case I don't have to stop observing the click but I need to > handle it in a custom way... > > 2009/1/28 G. Allegri : > >> Solved (somehow...): >> >> function locAdded(feature){ >> for(i=0;i<3;i++){ >> panel.controls[i+1].deactivate(); >> OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); >> } >> } >> >> giovanni >> >> 2009/1/28 G. Allegri : >> >>> Hello list, >>> I'm using the editingtoolbar control panel. I need to disable it after >>> any feature has been added (point, line or polygon), and reactivate it >>> if the feature gets deleted. >>> I've seen that calling: >>> >>> function locAdded(feature){ >>> panel.controls[1].deactivate(); >>> panel.controls[2].deactivate(); >>> panel.controls[3].deactivate(); >>> } >>> >>> deactivate the controls unitl the user click on the panel again... >>> this is not what I need. In fact the panel control has an onClick >>> handler that activate the control on which the onClick event has >>> happened (line 212 in Panel.js). >>> I've tried deactivating directly the panel, but the panel gets deleted. >>> >>> I need the panel to remain visible but "unclickable", until the unique >>> feature has been deleted from the layer. >>> >>> I've tried to overload the onClick panel's method, but I couldn't get >>> it to work... >>> Thanks for any hint. >>> >>> giovanni >>> >>> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From arnd.wippermann at web.de Wed Jan 28 12:06:55 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] getFeatureInfo() Only Works on One Layer? In-Reply-To: <497F83AE.1030702@gisnet.com> Message-ID: Hi Bill, You have to delete the blank in QUERY_LAYERS: "us_interstate,us_states" A documentation for WMS parameters are availible from OGC. They are responsibable for WMS, WFS and other standards. http://www.opengeospatial.org/standards/wms Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Bill Thoen Gesendet: Dienstag, 27. Januar 2009 22:59 An: users@openlayers.org Betreff: [OpenLayers-Users] getFeatureInfo() Only Works on One Layer? I've got a WMS layer that has two sub-layers in it and I'm trying to get attribute information from them via a getFeatureInfo request, but I can only get one of them to respond at a time. I've looked at the docs at http://trac.openlayers.org/wiki/GetFeatureInfo and noticed that you can specify several layers with the QUERY_LAYERS parameter, but I'm finding that only the one listed first is active. Also, it's not clear what layer you specify at the root of the request, but it looks like it's supposed to be different from the layers you're querying. Anyway, here's what I'm trying: I open and load the combined layer like so: base = new OpenLayers.Layer.WMS( "Base", "http://192.168.0.250/cgi-bin/mapserv?map=base.map", { layers: ["us_states", "us_interstate"] } ); map.addLayer(base); And here's the request string I'm sending to MapServer: var url = base.getFullRequestString({ REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", FORMAT: 'png', BBOX: map.getExtent().toBBOX(), X: event.xy.x, Y: event.xy.y, INFO_FORMAT: 'text/plain', QUERY_LAYERS: "us_interstate, us_states", FEATURE_COUNT: 1, WIDTH: map.size.w, HEIGHT: map.size.h}, "http://192.168.0.250/cgi-bin/mapserv?map=base.map&"); OpenLayers.loadURL(url, '', this, setHTML); Note the QUERY_LAYERS line. As shown here, it responds with interstate attributes only when I click on an interstate roadway feature, but I get nothing when I click on a state. If I reverse the order of these layers in the list, then clicking on a state returns attributes from the us_states table only. Even if I click on a spot where features in both layers coincide, it returns only the attributes for the layer listed first. So how do I use multiple layers in the QUERY_LAYERS parameter, or do I get only one at a time? Also, I just guessed at using the layer called 'base' for the getFeatureInfo oject, what is supposed to beused here? TIA, - Bill Thoen _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From giohappy at gmail.com Wed Jan 28 12:11:17 2009 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] how to deactivate editingtoolbar after featureadded In-Reply-To: <49808FB3.6020206@mapgears.com> References: <49808FB3.6020206@mapgears.com> Message-ID: Thansk Alexandre for the reply. This is not exatcly what I need to achieve. A first step is: OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); but the true behaviour I want is something like this: panel.onClick = function fn(c,e){alert('only one feature admitted');} but this way to overload the panel's onClick method doesn't work.... 2009/1/28 Alexandre Dube : > Hi, > > Take a look at this example (1). Zoom in and out the map. You will see that > the buttons completely disappear. That could be an other option to your > issue. > > (1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html > > Regards, > > Alexandre > > G. Allegri wrote: >> >> Sorry, I've sent too fast the solution. It works, but how can I >> overload the onClick event on the control to alert the user with "a >> feature has been already added"? >> In this case I don't have to stop observing the click but I need to >> handle it in a custom way... >> >> 2009/1/28 G. Allegri : >> >>> >>> Solved (somehow...): >>> >>> function locAdded(feature){ >>> for(i=0;i<3;i++){ >>> panel.controls[i+1].deactivate(); >>> >>> OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); >>> } >>> } >>> >>> giovanni >>> >>> 2009/1/28 G. Allegri : >>> >>>> >>>> Hello list, >>>> I'm using the editingtoolbar control panel. I need to disable it after >>>> any feature has been added (point, line or polygon), and reactivate it >>>> if the feature gets deleted. >>>> I've seen that calling: >>>> >>>> function locAdded(feature){ >>>> panel.controls[1].deactivate(); >>>> panel.controls[2].deactivate(); >>>> panel.controls[3].deactivate(); >>>> } >>>> >>>> deactivate the controls unitl the user click on the panel again... >>>> this is not what I need. In fact the panel control has an onClick >>>> handler that activate the control on which the onClick event has >>>> happened (line 212 in Panel.js). >>>> I've tried deactivating directly the panel, but the panel gets deleted. >>>> >>>> I need the panel to remain visible but "unclickable", until the unique >>>> feature has been deleted from the layer. >>>> >>>> I've tried to overload the onClick panel's method, but I couldn't get >>>> it to work... >>>> Thanks for any hint. >>>> >>>> giovanni >>>> >>>> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > From bianchimro at gmail.com Wed Jan 28 12:27:49 2009 From: bianchimro at gmail.com (Mauro Bianchi) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Cannot cycle through vector layer features In-Reply-To: <49808D15.7050500@osgis.nl> References: <1233158807168-2233009.post@n2.nabble.com> <49808D15.7050500@osgis.nl> Message-ID: Thanks Ivan, overlay.events.register('loadend', this, function() { alert(xxxx); }); is perfectly working. Best regards Mauro 2009/1/28 Bart van den Eijnden (OSGIS) : > Instead, better use the loadend event for this. > > overlay.events.register('loadend', this, function() { alert(xxxx); }); > > Best regards, > Bart > > Ivan Grcic wrote: >> >> Hi, >> >> what happens if u do something like this: >> >> setTimeout(function(){alert(overlay.features.length), 3000}); >> >> >> On Wed, Jan 28, 2009 at 5:06 PM, goliah wrote: >> >>> >>> Dear all, >>> >>> I want to cycle through a vector layer (GML in my case) features. >>> The layer loads and it's drawn, but i cannot access the features at all >>> >>> example: >>> >>> var overlay; //global variable >>> >>> overlay = new OpenLayers.Layer.GML("GML", 'file.gml'); >>> >>> var l = overlay.features.length; // this is ALWAYS 0! >>> >>> The strange thing is that, using firebug and watching the expression >>> "overlay.features.length" gives me the right number of features. >>> >>> Any idea? >>> Thanks >>> Mauro >>> >>> >>> -- >>> View this message in context: >>> http://n2.nabble.com/Cannot-cycle-through-vector-layer-features-tp2233009p2233009.html >>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> >> > > > -- > Bart van den Eijnden > OSGIS, Open Source GIS > bartvde@osgis.nl > http://www.osgis.nl > > -- Mauro Bianchi bianchimro@gmail.com From igrcic at gmail.com Wed Jan 28 12:49:04 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Cannot cycle through vector layer features In-Reply-To: References: <1233158807168-2233009.post@n2.nabble.com> <49808D15.7050500@osgis.nl> Message-ID: That was Bart ;) I was just trying to show you that GML loads in background, and it takes some time to load it..thats why you get features.length =0 Also check this example http://openlayers.org/dev/examples/GMLParser.html cheers On Wed, Jan 28, 2009 at 6:27 PM, Mauro Bianchi wrote: > Thanks Ivan, > > overlay.events.register('loadend', this, function() { alert(xxxx); }); > > is perfectly working. > > > Best regards > Mauro > > > > > > 2009/1/28 Bart van den Eijnden (OSGIS) : >> Instead, better use the loadend event for this. >> >> overlay.events.register('loadend', this, function() { alert(xxxx); }); >> >> Best regards, >> Bart >> >> Ivan Grcic wrote: >>> >>> Hi, >>> >>> what happens if u do something like this: >>> >>> setTimeout(function(){alert(overlay.features.length), 3000}); >>> >>> >>> On Wed, Jan 28, 2009 at 5:06 PM, goliah wrote: >>> >>>> >>>> Dear all, >>>> >>>> I want to cycle through a vector layer (GML in my case) features. >>>> The layer loads and it's drawn, but i cannot access the features at all >>>> >>>> example: >>>> >>>> var overlay; //global variable >>>> >>>> overlay = new OpenLayers.Layer.GML("GML", 'file.gml'); >>>> >>>> var l = overlay.features.length; // this is ALWAYS 0! >>>> >>>> The strange thing is that, using firebug and watching the expression >>>> "overlay.features.length" gives me the right number of features. >>>> >>>> Any idea? >>>> Thanks >>>> Mauro >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/Cannot-cycle-through-vector-layer-features-tp2233009p2233009.html >>>> Sent from the OpenLayers Users mailing list archive at Nabble.com. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>> >>> >>> >>> >> >> >> -- >> Bart van den Eijnden >> OSGIS, Open Source GIS >> bartvde@osgis.nl >> http://www.osgis.nl >> >> > > > > -- > Mauro Bianchi > bianchimro@gmail.com > -- Ivan Grcic From giohappy at gmail.com Wed Jan 28 12:56:59 2009 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] how to deactivate editingtoolbar after featureadded In-Reply-To: References: <49808FB3.6020206@mapgears.com> Message-ID: My last guess has been: var panel = new OpenLayers.Control.EditingToolbar(vettoriale); OpenLayers.Util.extend(panel,{ onClick: function (ctrl, evt) { alert('ohoh'); } }); but still the original behaviour happens... 2009/1/28 G. Allegri : > Thansk Alexandre for the reply. This is not exatcly what I need to achieve. > A first step is: > > OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); > > but the true behaviour I want is something like this: > > panel.onClick = function fn(c,e){alert('only one feature admitted');} > > but this way to overload the panel's onClick method doesn't work.... > > > > > > > 2009/1/28 Alexandre Dube : >> Hi, >> >> Take a look at this example (1). Zoom in and out the map. You will see that >> the buttons completely disappear. That could be an other option to your >> issue. >> >> (1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html >> >> Regards, >> >> Alexandre >> >> G. Allegri wrote: >>> >>> Sorry, I've sent too fast the solution. It works, but how can I >>> overload the onClick event on the control to alert the user with "a >>> feature has been already added"? >>> In this case I don't have to stop observing the click but I need to >>> handle it in a custom way... >>> >>> 2009/1/28 G. Allegri : >>> >>>> >>>> Solved (somehow...): >>>> >>>> function locAdded(feature){ >>>> for(i=0;i<3;i++){ >>>> panel.controls[i+1].deactivate(); >>>> >>>> OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); >>>> } >>>> } >>>> >>>> giovanni >>>> >>>> 2009/1/28 G. Allegri : >>>> >>>>> >>>>> Hello list, >>>>> I'm using the editingtoolbar control panel. I need to disable it after >>>>> any feature has been added (point, line or polygon), and reactivate it >>>>> if the feature gets deleted. >>>>> I've seen that calling: >>>>> >>>>> function locAdded(feature){ >>>>> panel.controls[1].deactivate(); >>>>> panel.controls[2].deactivate(); >>>>> panel.controls[3].deactivate(); >>>>> } >>>>> >>>>> deactivate the controls unitl the user click on the panel again... >>>>> this is not what I need. In fact the panel control has an onClick >>>>> handler that activate the control on which the onClick event has >>>>> happened (line 212 in Panel.js). >>>>> I've tried deactivating directly the panel, but the panel gets deleted. >>>>> >>>>> I need the panel to remain visible but "unclickable", until the unique >>>>> feature has been deleted from the layer. >>>>> >>>>> I've tried to overload the onClick panel's method, but I couldn't get >>>>> it to work... >>>>> Thanks for any hint. >>>>> >>>>> giovanni >>>>> >>>>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >> >> >> -- >> Alexandre Dub? >> Mapgears >> www.mapgears.com >> >> > From giohappy at gmail.com Wed Jan 28 13:04:15 2009 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] how to deactivate editingtoolbar after featureadded In-Reply-To: References: <49808FB3.6020206@mapgears.com> Message-ID: SOLUTION: OpenLayers.Control.EditingToolbar.prototype.onClick = function (ctrl, evt) { }; var panel = new OpenLayers.Control.EditingToolbar(vettoriale); . Maybe there's a cleaner way... but now it works as expected 2009/1/28 G. Allegri : > My last guess has been: > > var panel = new OpenLayers.Control.EditingToolbar(vettoriale); > OpenLayers.Util.extend(panel,{ > onClick: function (ctrl, evt) { > alert('ohoh'); > } > }); > > but still the original behaviour happens... > > 2009/1/28 G. Allegri : >> Thansk Alexandre for the reply. This is not exatcly what I need to achieve. >> A first step is: >> >> OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); >> >> but the true behaviour I want is something like this: >> >> panel.onClick = function fn(c,e){alert('only one feature admitted');} >> >> but this way to overload the panel's onClick method doesn't work.... >> >> >> >> >> >> >> 2009/1/28 Alexandre Dube : >>> Hi, >>> >>> Take a look at this example (1). Zoom in and out the map. You will see that >>> the buttons completely disappear. That could be an other option to your >>> issue. >>> >>> (1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html >>> >>> Regards, >>> >>> Alexandre >>> >>> G. Allegri wrote: >>>> >>>> Sorry, I've sent too fast the solution. It works, but how can I >>>> overload the onClick event on the control to alert the user with "a >>>> feature has been already added"? >>>> In this case I don't have to stop observing the click but I need to >>>> handle it in a custom way... >>>> >>>> 2009/1/28 G. Allegri : >>>> >>>>> >>>>> Solved (somehow...): >>>>> >>>>> function locAdded(feature){ >>>>> for(i=0;i<3;i++){ >>>>> panel.controls[i+1].deactivate(); >>>>> >>>>> OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); >>>>> } >>>>> } >>>>> >>>>> giovanni >>>>> >>>>> 2009/1/28 G. Allegri : >>>>> >>>>>> >>>>>> Hello list, >>>>>> I'm using the editingtoolbar control panel. I need to disable it after >>>>>> any feature has been added (point, line or polygon), and reactivate it >>>>>> if the feature gets deleted. >>>>>> I've seen that calling: >>>>>> >>>>>> function locAdded(feature){ >>>>>> panel.controls[1].deactivate(); >>>>>> panel.controls[2].deactivate(); >>>>>> panel.controls[3].deactivate(); >>>>>> } >>>>>> >>>>>> deactivate the controls unitl the user click on the panel again... >>>>>> this is not what I need. In fact the panel control has an onClick >>>>>> handler that activate the control on which the onClick event has >>>>>> happened (line 212 in Panel.js). >>>>>> I've tried deactivating directly the panel, but the panel gets deleted. >>>>>> >>>>>> I need the panel to remain visible but "unclickable", until the unique >>>>>> feature has been deleted from the layer. >>>>>> >>>>>> I've tried to overload the onClick panel's method, but I couldn't get >>>>>> it to work... >>>>>> Thanks for any hint. >>>>>> >>>>>> giovanni >>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>> >>> >>> -- >>> Alexandre Dub? >>> Mapgears >>> www.mapgears.com >>> >>> >> > From bianchimro at gmail.com Wed Jan 28 13:25:46 2009 From: bianchimro at gmail.com (Mauro Bianchi) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Cannot cycle through vector layer features In-Reply-To: References: <1233158807168-2233009.post@n2.nabble.com> <49808D15.7050500@osgis.nl> Message-ID: Sorry guys ;) Thanks Bart for your solution (and Ivan too). The lesson learned here is remebering that layer features arec loaded asynchrounously ...right? Cheers Mauro 2009/1/28 Ivan Grcic : > That was Bart ;) I was just trying to show you that GML loads in > background, and it takes some time to load it..thats why you get > features.length =0 > Also check this example > http://openlayers.org/dev/examples/GMLParser.html > > cheers > -- Mauro Bianchi bianchimro@gmail.com From willsmithfield at gmail.com Wed Jan 28 13:31:51 2009 From: willsmithfield at gmail.com (smithfield) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Ancored Popup Autosize troubles In-Reply-To: <37716c5b0901280829y5f0f4bf9t5bb16c5453b8e351@mail.gmail.com> References: <1233020410057-2221855.post@n2.nabble.com> <19B951DD4DF14843A0E7FE1D99110C3B@suen> <1233155557906-2232720.post@n2.nabble.com> <37716c5b0901280803n4503ed06ma6d7fd691eecc8be@mail.gmail.com> <1233159199412-2233062.post@n2.nabble.com> <37716c5b0901280829y5f0f4bf9t5bb16c5453b8e351@mail.gmail.com> Message-ID: <1233167511063-2233940.post@n2.nabble.com> Brilliant, The autosize now works but the popups are being placed all over the map. What could be causing this behavior? For the record here is what I have done... //creates popup win / removes old popup if it exists function createPopup(feature){ if (popup != null) { map.removePopup(popup); popup.destroy(); popup = null; } feature.lonlat = feature.geometry.getBounds().getCenterLonLat(); if (popup == null) { popup = new OpenLayers.Popup.Anchored ("popup", feature.lonlat, new OpenLayers.Size(null), null, null, null, function () { map.removePopup( popup ); popup.destroy(); popup = null;}); var content = "
"+ feature.attributes.CNTRY_NAME + "

" + "
" + "" + "" + "" + "" + "
Overall Rank: " + feature.attributes.Act_T + "
Government Rank: " + feature.attributes.Act_G + "
Industry Rank:" + feature.attributes.Act_I + "
Community Rank: " + feature.attributes.Act_C + "
"; popup.setContentHTML(content); popup.setBackgroundColor("white"); popup.setOpacity(1); popup.events.register('mousemove', popup, function (e) {try{e.stopPropagation();}catch(e){}}); map.addPopup(popup); popup.autoSize = true; } else { map.removePopup(popup); popup.destroy(); popup = null; } } // remove popup - set to null function unSelect(){ if (popup != null) { map.removePopup(popup); popup.destroy(); popup = null; } }
-- View this message in context: http://n2.nabble.com/Ancored-Popup-Autosize-troubles-tp2221855p2233940.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rafaelchacon at gmail.com Wed Jan 28 14:51:19 2009 From: rafaelchacon at gmail.com (=?ISO-8859-1?Q?Rafael_chac=F3n?=) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Doubt with layers Message-ID: <128785280901281151m78adb127j5ba2db3934c27291@mail.gmail.com> Hi, I have the following layers defined: roads = new OpenLayers.Layer.MapServer( "Roads", " http://192.168.1.103/cgi-bin/mapserv?map=us_states.map", {layers: 'us_roads', transparent:'true'}); gps = new OpenLayers.Layer.MapServer( "GPS", " http://192.168.1.103/cgi-bin/mapserv?map=us_states.map", {layers: 'gps_points', transparent: 'true'}); roads.setVisibility(false) gps.setVisisibility(false) Both layers work, but I have the following behavior: when one of the layers is active the other one disappears. Suppose I chose first the roads, then it show the roads. Then I select gps, then it shows the gps points but roads start to disappear. Any ideas why this happens?? Thanks in advance. -- Rafael Chacon, "El hombre es la medida de todas las cosas". Protagoras -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090129/79f1096d/attachment.html From igrcic at gmail.com Wed Jan 28 15:01:41 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Doubt with layers In-Reply-To: <128785280901281151m78adb127j5ba2db3934c27291@mail.gmail.com> References: <128785280901281151m78adb127j5ba2db3934c27291@mail.gmail.com> Message-ID: Hi, check options: layer.isBaseLayer(true/false) map.setBaseLayer(layer) Cheers On Wed, Jan 28, 2009 at 8:51 PM, Rafael chac?n wrote: > Hi, I have the following layers defined: > > roads = new OpenLayers.Layer.MapServer( "Roads", > > "http://192.168.1.103/cgi-bin/mapserv?map=us_states.map", > {layers: 'us_roads', transparent:'true'}); > gps = new OpenLayers.Layer.MapServer( "GPS", > > "http://192.168.1.103/cgi-bin/mapserv?map=us_states.map", > {layers: 'gps_points', transparent: 'true'}); > > roads.setVisibility(false) > gps.setVisisibility(false) > > > Both layers work, but I have the following behavior: when one of the layers > is active the other one disappears. Suppose I chose first the roads, then > it show the roads. Then I select gps, then it shows the gps points but roads > start to disappear. Any ideas why this happens?? > > Thanks in advance. > > > -- > Rafael Chacon, > > "El hombre es la medida de todas las cosas". Protagoras > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ivan Grcic From bthoen at gisnet.com Wed Jan 28 16:32:07 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] getFeatureInfo() Only Works on One Layer? In-Reply-To: References: Message-ID: <4980CED7.9000605@gisnet.com> Thanks, but it turned out that the real problem was running an old version (4.10.0) of MapServer. When I upgraded to 5.2.1 this morning, my application worked without a problem. Now I'm finding out new quirks of the getFeatureInfo procedure. For example, it searches for the *nearest* objects in each of the QUERY_LAYERS and returns FEATURE_COUNT records from each. You don't have to click on an object exactly to find it. Also, even if objects in a layer are not visible due to exceeding a maxscale or minscale setting, it still sees them and includes these records in what it returns if they are closer than records that are visible. But at least it's working now and will solve my problem of providing data attributes for features in WMS layers. - Bill Thoen Arnd Wippermann wrote: > Hi Bill, > > You have to delete the blank in QUERY_LAYERS: "us_interstate,us_states" > > A documentation for WMS parameters are availible from OGC. They are > responsibable for WMS, WFS and other standards. > > http://www.opengeospatial.org/standards/wms > > Arnd Wippermann > > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von Bill Thoen > Gesendet: Dienstag, 27. Januar 2009 22:59 > An: users@openlayers.org > Betreff: [OpenLayers-Users] getFeatureInfo() Only Works on One Layer? > > I've got a WMS layer that has two sub-layers in it and I'm trying to get > attribute information from them via a getFeatureInfo request, but I can only > get one of them to respond at a time. I've looked at the docs at > http://trac.openlayers.org/wiki/GetFeatureInfo and noticed that you can > specify several layers with the QUERY_LAYERS parameter, but I'm finding that > only the one listed first is active. Also, it's not clear what layer you > specify at the root of the request, but it looks like it's supposed to be > different from the layers you're querying. Anyway, here's what I'm trying: > > I open and load the combined layer like so: > base = new OpenLayers.Layer.WMS( > "Base", > "http://192.168.0.250/cgi-bin/mapserv?map=base.map", > { layers: ["us_states", "us_interstate"] } > ); > map.addLayer(base); > > > And here's the request string I'm sending to MapServer: > > var url = base.getFullRequestString({ > REQUEST: "GetFeatureInfo", > EXCEPTIONS: "application/vnd.ogc.se_xml", > FORMAT: 'png', > BBOX: map.getExtent().toBBOX(), > X: event.xy.x, > Y: event.xy.y, > INFO_FORMAT: 'text/plain', > QUERY_LAYERS: "us_interstate, us_states", > FEATURE_COUNT: 1, > WIDTH: map.size.w, > HEIGHT: map.size.h}, > "http://192.168.0.250/cgi-bin/mapserv?map=base.map&"); > OpenLayers.loadURL(url, '', this, setHTML); > > Note the QUERY_LAYERS line. As shown here, it responds with interstate > attributes only when I click on an interstate roadway feature, but I get > nothing when I click on a state. If I reverse the order of these layers in > the list, then clicking on a state returns attributes from the us_states > table only. Even if I click on a spot where features in both layers > coincide, it returns only the attributes for the layer listed first. > > So how do I use multiple layers in the QUERY_LAYERS parameter, or do I get > only one at a time? Also, I just guessed at using the layer called 'base' > for the getFeatureInfo oject, what is supposed to beused here? > > TIA, > - Bill Thoen > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From bjorn.harrtell at gmail.com Wed Jan 28 16:58:32 2009 From: bjorn.harrtell at gmail.com (=?UTF-8?Q?Bj=C3=B6rn_Harrtell?=) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] overlays goes stuck? Message-ID: In one certain app I'm building where the ref system EPSG:25832 is used (don't know if any relevance) I've encountered problems with overlays that get stuck. I have not been able to reproduce predictably or in a way I can explain what the cause, but the effect is that the overlay get "stuck" when zooming around. The stuck overlay pans as expected but never updates. The baselayer zooms and pans correctly as ususal. It happens both with WMS and Vector overlays. I was wondering if there is any known reasons for this happening or suggestions on what to look out for? I haven't encountered it before in my experience with OL. With regards, /Bj?rn Harrtell From SansonR at asurequality.com Wed Jan 28 17:12:39 2009 From: SansonR at asurequality.com (Robert Sanson) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] overlays goes stuck? In-Reply-To: References: Message-ID: <49818F27.379F.0037.0@asurequality.com> I have seen something like this occasionally with IE6 and OL2.7. I get a temporary misalignment between one of the overlays (a vector layer) and the base layer. Can't reproduce consistently. Seems to occur when zoomed in and making small pans. Robert Sanson >>> Bj?rn Harrtell 29/01/2009 10:58 a.m. >>> In one certain app I'm building where the ref system EPSG:25832 is used (don't know if any relevance) I've encountered problems with overlays that get stuck. I have not been able to reproduce predictably or in a way I can explain what the cause, but the effect is that the overlay get "stuck" when zooming around. The stuck overlay pans as expected but never updates. The baselayer zooms and pans correctly as ususal. It happens both with WMS and Vector overlays. I was wondering if there is any known reasons for this happening or suggestions on what to look out for? I haven't encountered it before in my experience with OL. With regards, /Bj?rn Harrtell _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ------------------------------------------------------------------ The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message. ------------------------------------------------------------------ This message has been scanned for malware by SurfControl plc. www.surfcontrol.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090129/73e2e4f9/attachment.html From derek at cmainfo.co.za Thu Jan 29 05:15:37 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Adding a vector feature from WKT Message-ID: <1233224137828-2238031.post@n2.nabble.com> I am trying to highlight the selected property on the map by adding a Vector Layer and then a Feature from WKT. I have the following code: ---------------------------- highlightLayer = new OpenLayers.Layer.Vector("Highlight"); map.addLayer(highlightLayer); SubjectProperty = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.fromWKT("POLYGON((-42590.5609 -3747526.1968, -42571.4706 -3747534.5561, -42558.4618 -3747504.8465, -42575.5821 -3747497.3472, -42582.472 -3747500.4773, -42590.5609 -3747526.1968))"); highlightLayer.addFeatures([SubjectProperty]); ---------------------------- The Geometry.fromWKT() keeps giving me an "Object expected" error. -- View this message in context: http://n2.nabble.com/Adding-a-vector-feature-from-WKT-tp2238031p2238031.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From derek at cmainfo.co.za Thu Jan 29 05:15:39 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Adding a vector feature from WKT Message-ID: <1233224139205-2238032.post@n2.nabble.com> I am trying to highlight the selected property on the map by adding a Vector Layer and then a Feature from WKT. I have the following code: ---------------------------- highlightLayer = new OpenLayers.Layer.Vector("Highlight"); map.addLayer(highlightLayer); SubjectProperty = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.fromWKT("POLYGON((-42590.5609 -3747526.1968, -42571.4706 -3747534.5561, -42558.4618 -3747504.8465, -42575.5821 -3747497.3472, -42582.472 -3747500.4773, -42590.5609 -3747526.1968))"); highlightLayer.addFeatures([SubjectProperty]); ---------------------------- The Geometry.fromWKT() keeps giving me an "Object expected" error. -- View this message in context: http://n2.nabble.com/Adding-a-vector-feature-from-WKT-tp2238032p2238032.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From derek at cmainfo.co.za Thu Jan 29 06:34:39 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Adding a vector feature from WKT In-Reply-To: <1233224137828-2238031.post@n2.nabble.com> References: <1233224137828-2238031.post@n2.nabble.com> Message-ID: <1233228879292-2238363.post@n2.nabble.com> First, sorry for the duplicate post. Keep getting "Gateway Timeout" on Nabble and hit refresh. Second, I seem to have come across dev documentation when searching. Geometry.fromWKT isn't listed in the 2.7 docs. Is this an upcoming feature and when is the next realease expected? -- View this message in context: http://n2.nabble.com/Adding-a-vector-feature-from-WKT-tp2238031p2238363.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Thu Jan 29 07:13:06 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Adding a vector feature from WKT In-Reply-To: <1233228879292-2238363.post@n2.nabble.com> References: <1233224137828-2238031.post@n2.nabble.com> <1233228879292-2238363.post@n2.nabble.com> Message-ID: <20090129121305.GL27414@metacarta.com> On Thu, Jan 29, 2009 at 03:34:39AM -0800, Derek Watling wrote: > > First, sorry for the duplicate post. Keep getting "Gateway Timeout" on Nabble > and hit refresh. > > Second, I seem to have come across dev documentation when searching. > Geometry.fromWKT isn't listed in the 2.7 docs. Is this an upcoming feature Yes. In the interim, you can use: var f = new OpenLayers.Format.WKT(); feature = f.read("POINT(0 0)"); fromWKT is just a convenience method for this functionality. > and when is the next realease expected? There is no timeline for when the next release will be available at this time. Regards, -- Christopher Schmidt MetaCarta From subha at gslab.com Thu Jan 29 08:13:22 2009 From: subha at gslab.com (Subha Ramakrishnan) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Z-index of layers In-Reply-To: <20090129125607.GM27414@metacarta.com> References: <200901290832.17871.patrick.valsecchi@camptocamp.com> <20090129125607.GM27414@metacarta.com> Message-ID: <4981AB72.60109@gslab.com> Hi all, I am facing some problem with the z-index of point layers. (a layer with point features drawn using OpenLayers) I've recently upgraded OpenLayers 2.5 to 2.7. Now, when I try to load layers on a base map( Google physical) , the z-indexes are not assigned sequentially in the order in which the layers are added. So, the layer that was added last has lesser z-index which makes the features not accessible. I tried setting the z-index of the layer using the setZIndex() method for the layer. But the value gets reset. I loop through the list of layers, and assign the z-index for the non-base layers. [*map.layers[i].setZIndex(POPUPZINDEX- 1)*] Can someone please tell me how to solve this problem? Thanks a lot for the help. Regards, Subha From derek at cmainfo.co.za Thu Jan 29 08:24:22 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Adding a vector feature from WKT In-Reply-To: <20090129121305.GL27414@metacarta.com> References: <1233224137828-2238031.post@n2.nabble.com> <1233228879292-2238363.post@n2.nabble.com> <20090129121305.GL27414@metacarta.com> Message-ID: <1233235462399-2238792.post@n2.nabble.com> Thanks Christopher By the time I got your reply I had already written my own function, but it is based on the assumption that the features will always be Linear Rings (they should be in my case), but I'm sure your function is a lot more roubust. function PolygonFromWKT(wkt) { if (wkt.substring(0, 7) == "POLYGON") { var geomLR = new OpenLayers.Geometry.LinearRing; var aPts = wkt.substring(9, wkt.length - 2).split(', '); for (var pt = 0; pt < aPts.length; pt++) { var aPt = aPts[pt].split(' '); var geomPt = new OpenLayers.Geometry.Point(aPt[0], aPt[1]); geomLR.addComponent(geomPt); } return geomLR; } return ''; } -- View this message in context: http://n2.nabble.com/Adding-a-vector-feature-from-WKT-tp2238031p2238792.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bjorn.harrtell at gmail.com Thu Jan 29 10:30:53 2009 From: bjorn.harrtell at gmail.com (=?UTF-8?Q?Bj=C3=B6rn_Harrtell?=) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] overlays goes stuck? In-Reply-To: <49818F27.379F.0037.0@asurequality.com> References: <49818F27.379F.0037.0@asurequality.com> Message-ID: That sounds more like a reference system problem I think? Anyhow, I found out what was wrong and it was me messing up the baselayers - in some cases I got multiple visible baselayers which seems to cause that behaviour. /Bj?rn On Wed, Jan 28, 2009 at 23:12, Robert Sanson wrote: > I have seen something like this occasionally with IE6 and OL2.7. I get a > temporary misalignment between one of the overlays (a vector layer) and the > base layer. Can't reproduce consistently. Seems to occur when zoomed in and > making small pans. > > Robert Sanson > >>>> Bj?rn Harrtell 29/01/2009 10:58 a.m. >>> > In one certain app I'm building where the ref system EPSG:25832 is > used (don't know if any relevance) I've encountered problems with > overlays that get stuck. I have not been able to reproduce predictably > or in a way I can explain what the cause, but the effect is that the > overlay get "stuck" when zooming around. The stuck overlay pans as > expected but never updates. The baselayer zooms and pans correctly as > ususal. It happens both with WMS and Vector overlays. > > I was wondering if there is any known reasons for this happening or > suggestions on what to look out for? I haven't encountered it before > in my experience with OL. > > With regards, > > /Bj?rn Harrtell > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > ------------------------------------------------------------------ > The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message. > ------------------------------------------------------------------ > > This message has been scanned for malware by SurfControl plc. > www.surfcontrol.com From bthoen at gisnet.com Thu Jan 29 13:24:30 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Communicating and Coordinating Maps Among Several Servers Message-ID: <4981F45E.1050204@gisnet.com> This is omewhat off-topic, but the getting the end result involves OpenLayers at both ends, so I thought I'd try here first and see if anyone has some good ideas or "best practices" advice they could share. In a nutshell, I've got a map server that displays maps using MapServer and OpenLayers and I have a large set of LIDAR elevation points. Also, I have a colleague who is building a SAS application that produces DEM files (and shaded relief, line of sight, ridgeline, 3D scenes and other digital 3D map products and map layers) from XYZ points. What we are wondering is what is the best way to design a system or a protocol whereby my system would take a client-defined rectangle and automatically send the XYZ point data and SRS to his server and get back one or more of these digital 3D products? Would this be done best by first sending a data file via FTP to his system and then issue an OpenLayers.loadURL() call with instructions as to what's wanted and the file name, then have it do its thing and send back a response with the necessary info that would allow my app to pick up the resulting file and display it in a map window? Does this make sense or am I barking up the wrong tree? I realize that this would not likely be an interactive process from the user's point of view, and it would be acceptable for the processing to be an overnight thing, but the fly in the ointment here is that the source data does not exist on the machine that is doing the heavy data crunching and so it has to be transferred first. I'm looking for ideas as how best to transfer a data set from machine to machine and coordinate it with a request for performing some service with it. We also want to this in as flexible a manner as possible, so we want to avoid platform-specific protocols. So does anyone have some suggestions as to what the best way to do this is, or where I could go to learn more about doing something like this? TIA, - Bill Thoen From adube at mapgears.com Thu Jan 29 15:00:01 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] setVisibility VS visibility:false Message-ID: <49820AC1.6090406@mapgears.com> Hi list, Is there a difference between layer.setVisibility(false) and the {visibility:false} option directly specified in the layer ? Is one a better practice than the other ? -- Alexandre Dub? Mapgears www.mapgears.com From eric.c2c at gmail.com Thu Jan 29 15:13:55 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] setVisibility VS visibility:false In-Reply-To: <49820AC1.6090406@mapgears.com> References: <49820AC1.6090406@mapgears.com> Message-ID: <5ec103de0901291213m424fbf38ibf9d9930b281d6b7@mail.gmail.com> On Thu, Jan 29, 2009 at 9:00 PM, Alexandre Dube wrote: > Hi list, > > Is there a difference between layer.setVisibility(false) and the > {visibility:false} option directly specified in the layer ? Is one a > better practice than the other ? You'll use setVisibility if you need to change the visibility after the layer creation, when some button is clicked for example. -- Eric From adube at mapgears.com Thu Jan 29 15:17:04 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] setVisibility VS visibility:false In-Reply-To: <5ec103de0901291213m424fbf38ibf9d9930b281d6b7@mail.gmail.com> References: <49820AC1.6090406@mapgears.com> <5ec103de0901291213m424fbf38ibf9d9930b281d6b7@mail.gmail.com> Message-ID: <49820EC0.6090009@mapgears.com> Sorry, I meant only on layer creation only. I see in some examples this kind of practice : var twms = new OpenLayers.Layer.WMS("base_world", "http://world.freemap.in/cgi-bin/mapserv?", { map: '/www/freemap.in/world/map/factbooktrans.map', layers: 'factbook', format: 'image/png' } ); twms.setVisibility(false); map.addLayer(twms); ... insead of using {visibility:false}. I guess there's no particular reason for that or did someone had an issue using {visibility:false} ? Eric Lemoine wrote: > On Thu, Jan 29, 2009 at 9:00 PM, Alexandre Dube wrote: > >> Hi list, >> >> Is there a difference between layer.setVisibility(false) and the >> {visibility:false} option directly specified in the layer ? Is one a >> better practice than the other ? >> > > You'll use setVisibility if you need to change the visibility after > the layer creation, when some button is clicked for example. > > -- > Eric > -- Alexandre Dub? Mapgears www.mapgears.com From David.Kimball at state.ma.us Thu Jan 29 15:58:56 2009 From: David.Kimball at state.ma.us (Kimball, David (DCR)) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point Message-ID: <2F05B5BD24C96942AAB4787FB6114FF202C964FC@ES-MSG-007.es.govt.state.ma.us> Hi everyone, I'm using a WMS GetFeatureInfo to simultaneously query the attributes of a line layer and a point layer (from GeoServer). Unfortunately you have to click *exactly* on the center of a point to get it to send you the point attributes. http://maps.massgis.state.ma.us/dcr/trails/DCR_RoadTrail10.html map.events.register('click', map, function (e) { var url = map.layers[0].getFullRequestString( { 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[8].params.LAYERS + "," + map.layers[9].params.LAYERS, FEATURE_COUNT: 50, WIDTH: map.size.w, HEIGHT: map.size.h }, "http://giswebservices.massgis.state.ma.us/geoserver/wms"); OpenLayers.loadURL(url, '', this, setHTML, setHTML); OpenLayers.Event.stop(e); I searched a bunch for this and all I could find were suggestions to do a WFS getfeature instead of a WMS GetFeatureInfo, or to set some options on the server (not an option in this case). I'd rather use the WMS request because I'd rather not rewrite all my parsing Javascript, and there might be a performance hit - some of the lines have hundreds of vertices, and when I tried a similar approach recently with large polygons it was slow because of the large amount of data sent back. So, is there any (client-side) radius/tolerance option for GetFeatureInfo? Thanks a lot, David ||||||| David Kimball ||||||| GIS Specialist ||||||| MA Department of Conservation and Recreation ||||||| http://www.mass.gov/dcr/stewardship/gis/ ||||||| david.kimball@state.ma.us ||||||| 617.626.1447 phone ||||||| 617.626.1349 fax From robhyx at gmail.com Thu Jan 29 16:18:34 2009 From: robhyx at gmail.com (Robert Hicks) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Problem when switching WMS layers on and off with Google Base Layer Message-ID: Hello all, I am having an issue when I have some WMS Layers over top of a Google base map. Basically what happens is when I toggle to layers on and off in the layer switcher the next time the layer appears it is shifted down relative to the Google map. It does not do this with the basic OpenLayers base map from http://labs.metacarta.com/wms/vmap0. Here are my layer definitions: var parcels = new OpenLayers.Layer.WMS( "Parcels", geoserverDomain, { //width: '800', srs: 'EPSG:4326', layers: 'mylayer_parcels', //height: '341', styles: '', format: 'image/png', transparent: 'true', attribution: "A Service" } ); var munic = new OpenLayers.Layer.WMS( "Municipality", geoserverDomain, { //width: '800', srs: 'EPSG:4326', layers: 'mylayer_munic', //height: '341', styles: '', format: 'image/png', transparent: 'true', attribution: "A Service" } ); var roadcenterlines = new OpenLayers.Layer.WMS( "Road Center Lines", geoserverDomain, { //width: '800', srs: 'EPSG:4326', layers: 'mylayer_roadcenterlines_ft', //height: '341', styles: '', format: 'image/png', transparent: 'true', attribution: "A Service" } ); var raster = new OpenLayers.Layer.WMS( "Defiance County Raster", geoserverDomain, { //width: '800', srs: 'EPSG:4326', layers: 'gv:county', //height: '341', styles: '', format: 'image/png', transparent: 'true', attribution: "A Service" } ); var vector = new OpenLayers.Layer.Vector( "GlobalView", { attribution:"A Service", displayInLayerSwitcher: false } ); map.addLayers([wms, raster, parcels, munic, roadcenterlines, vector]); // 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()); map.addControl(new OpenLayers.Control.Attribution()); map.setCenter(new OpenLayers.LonLat(-84.52,41.35),11,false,false); Has anyone encountered this? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090129/4db39c46/attachment.html From bthoen at gisnet.com Thu Jan 29 16:39:25 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point In-Reply-To: <2F05B5BD24C96942AAB4787FB6114FF202C964FC@ES-MSG-007.es.govt.state.ma.us> References: <2F05B5BD24C96942AAB4787FB6114FF202C964FC@ES-MSG-007.es.govt.state.ma.us> Message-ID: <4982220D.3050608@gisnet.com> David, I just had this problem myself and found that switching my MapServer from ver 4.10.0 to 5.2.1 solved the problem. Also, what appears to happen is that getFeatureInfo() returns the *nearest* object(s) to where you click (even if the layer is invisible.) And I suspect that you get the first FEATURE_COUNT objects from the layer that has the nearest object, then the closest FEATURE_COUNT objects in the layer that was second nearest. I'm not sure this is really what it does because the evidence at this point is anecdotal, but when I set FEATURE_COUNT to 1 and click on a polyline in one query layer crossing a polygon in another query layer, I get the nearest record from each, with the line record listed first only if I click very exactly on the line. Otherwise it appears second in the returned data. - Bill Thoen Kimball, David (DCR) wrote: > Hi everyone, > > I'm using a WMS GetFeatureInfo to simultaneously query the attributes of > a line layer and a point layer (from GeoServer). Unfortunately you have > to click *exactly* on the center of a point to get it to send you the > point attributes. > > http://maps.massgis.state.ma.us/dcr/trails/DCR_RoadTrail10.html > > > map.events.register('click', map, function (e) { > var url = map.layers[0].getFullRequestString( > { > 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[8].params.LAYERS + "," > + map.layers[9].params.LAYERS, > FEATURE_COUNT: 50, > WIDTH: map.size.w, > HEIGHT: map.size.h > }, > > "http://giswebservices.massgis.state.ma.us/geoserver/wms"); > OpenLayers.loadURL(url, '', this, setHTML, setHTML); > OpenLayers.Event.stop(e); > > > I searched a bunch for this and all I could find were suggestions to do > a WFS getfeature instead of a WMS GetFeatureInfo, or to set some options > on the server (not an option in this case). I'd rather use the WMS > request because I'd rather not rewrite all my parsing Javascript, and > there might be a performance hit - some of the lines have hundreds of > vertices, and when I tried a similar approach recently with large > polygons it was slow because of the large amount of data sent back. > > So, is there any (client-side) radius/tolerance option for > GetFeatureInfo? > > Thanks a lot, > > David > > > ||||||| David Kimball > ||||||| GIS Specialist > ||||||| MA Department of Conservation and Recreation > ||||||| http://www.mass.gov/dcr/stewardship/gis/ > ||||||| david.kimball@state.ma.us > ||||||| 617.626.1447 phone > ||||||| 617.626.1349 fax > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From crschmidt at metacarta.com Thu Jan 29 16:34:25 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Problem when switching WMS layers on and off with Google Base Layer In-Reply-To: References: Message-ID: <20090129213424.GQ27414@metacarta.com> On Thu, Jan 29, 2009 at 04:18:34PM -0500, Robert Hicks wrote: > Hello all, > I am having an issue when I have some WMS Layers over top of a Google base > map. Basically what happens is when I toggle to layers on and off in the > layer switcher the next time the layer appears it is shifted down relative > to the Google map. It does not do this with the basic OpenLayers base map > from http://labs.metacarta.com/wms/vmap0. Use spherical mercator. http://docs.openlayers.org/library/spherical_mercator http://openlayers.org/dev/examples/spherical-mercator.html -- Chris > Here are my layer definitions: > > var parcels = new OpenLayers.Layer.WMS( > "Parcels", geoserverDomain, > { > //width: '800', > srs: 'EPSG:4326', > layers: 'mylayer_parcels', > //height: '341', > styles: '', > format: 'image/png', > transparent: 'true', > attribution: "A Service" > } > ); > var munic = new OpenLayers.Layer.WMS( > "Municipality", geoserverDomain, > { > //width: '800', > srs: 'EPSG:4326', > layers: 'mylayer_munic', > //height: '341', > styles: '', > format: 'image/png', > transparent: 'true', > attribution: "A Service" > } > ); > var roadcenterlines = new OpenLayers.Layer.WMS( > "Road Center Lines", geoserverDomain, > { > //width: '800', > srs: 'EPSG:4326', > layers: 'mylayer_roadcenterlines_ft', > //height: '341', > styles: '', > format: 'image/png', > transparent: 'true', > attribution: "A Service" > } > ); > var raster = new OpenLayers.Layer.WMS( > "Defiance County Raster", geoserverDomain, > { > //width: '800', > srs: 'EPSG:4326', > layers: 'gv:county', > //height: '341', > styles: '', > format: 'image/png', > transparent: 'true', > attribution: "A Service" > } > ); > var vector = new OpenLayers.Layer.Vector( > "GlobalView", > { > attribution:"A Service", > displayInLayerSwitcher: false > } > ); > map.addLayers([wms, raster, parcels, munic, roadcenterlines, > vector]); > // 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()); > map.addControl(new OpenLayers.Control.Attribution()); > map.setCenter(new > OpenLayers.LonLat(-84.52,41.35),11,false,false); > > Has anyone encountered this? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From philotas at cs.tu-berlin.de Thu Jan 29 18:06:49 2009 From: philotas at cs.tu-berlin.de (Ivo Brodien) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Change layer after zooming? Message-ID: <011ADA59-FD3B-4946-A23A-D94538D1D47F@cs.tu-berlin.de> Hello, i was wondering how I could change the behaviour so that after the user zooms a different layer is requested from the WMS. I could not find the code, could anyone point me to it please? so for zoom level 18 want to have: http://localhost:8080/geoserver/wms?layers=level18..... and for level 4: http://localhost:8080/geoserver/wms?layers=level4..... Thanks! Ivo From richard.greenwood at gmail.com Thu Jan 29 21:20:38 2009 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point In-Reply-To: <4982220D.3050608@gisnet.com> References: <2F05B5BD24C96942AAB4787FB6114FF202C964FC@ES-MSG-007.es.govt.state.ma.us> <4982220D.3050608@gisnet.com> Message-ID: > Kimball, David (DCR) wrote: >> Hi everyone, >> >> I'm using a WMS GetFeatureInfo to simultaneously query the attributes of >> a line layer and a point layer (from GeoServer). Unfortunately you have >> to click *exactly* on the center of a point to get it to send you the >> point attributes. >> >> http://maps.massgis.state.ma.us/dcr/trails/DCR_RoadTrail10.html >> >> >> map.events.register('click', map, function (e) { >> var url = map.layers[0].getFullRequestString( >> { >> 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[8].params.LAYERS + "," >> + map.layers[9].params.LAYERS, >> FEATURE_COUNT: 50, >> WIDTH: map.size.w, >> HEIGHT: map.size.h >> }, >> >> "http://giswebservices.massgis.state.ma.us/geoserver/wms"); >> OpenLayers.loadURL(url, '', this, setHTML, setHTML); >> OpenLayers.Event.stop(e); >> >> >> I searched a bunch for this and all I could find were suggestions to do >> a WFS getfeature instead of a WMS GetFeatureInfo, or to set some options >> on the server (not an option in this case). I'd rather use the WMS >> request because I'd rather not rewrite all my parsing Javascript, and >> there might be a performance hit - some of the lines have hundreds of >> vertices, and when I tried a similar approach recently with large >> polygons it was slow because of the large amount of data sent back. >> >> So, is there any (client-side) radius/tolerance option for >> GetFeatureInfo? >> >> Thanks a lot, >> >> David Look at TOLERANCE in http://www.mapserver.org/mapfile/layer.html -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From crschmidt at metacarta.com Thu Jan 29 23:36:55 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point In-Reply-To: References: <2F05B5BD24C96942AAB4787FB6114FF202C964FC@ES-MSG-007.es.govt.state.ma.us> <4982220D.3050608@gisnet.com> Message-ID: <20090130043655.GR27414@metacarta.com> On Thu, Jan 29, 2009 at 07:20:38PM -0700, Richard Greenwood wrote: > > Kimball, David (DCR) wrote: > >> Hi everyone, > >> > >> I'm using a WMS GetFeatureInfo to simultaneously query the attributes of > >> a line layer and a point layer (from GeoServer). Unfortunately you have > >> to click *exactly* on the center of a point to get it to send you the > >> point attributes. > Look at TOLERANCE in http://www.mapserver.org/mapfile/layer.html The original poster said he was using GeoServer. Although MapServer does have a TOLERANCE parameter, I do not believe that there is a corresponding functionality in GeoServer. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Jan 30 00:04:03 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] FramedCloud with Layer.Text? In-Reply-To: <20080421175446.GB11748@metacarta.com> References: <20080421175446.GB11748@metacarta.com> Message-ID: <20090130050403.GS27414@metacarta.com> On Mon, Apr 21, 2008 at 01:54:46PM -0400, Christopher Schmidt wrote: > On Mon, Apr 21, 2008 at 10:39:56AM -0400, Bobby H. Braswell wrote: > > > > Hi- > > > > Is there an example of using the framed cloud popups with a text layer > > in 2.6? In general can we specify the popup type when constructing a > > text layer? > > Generally, the answer is 'no, and why are you still using a Layer.Text? > Use a Layer.GML with a format: OpenLayers.Format.Text and a > selectFeature control instead.' And now, only 8 months later, I've documented how to make that transition: http://docs.openlayers.org/library/overlays#transitioning-from-text-layer-or-georss-layer-to-vectors Feedback welcome. Regards, -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Fri Jan 30 00:40:55 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Change layer after zooming? In-Reply-To: <011ADA59-FD3B-4946-A23A-D94538D1D47F@cs.tu-berlin.de> References: <011ADA59-FD3B-4946-A23A-D94538D1D47F@cs.tu-berlin.de> Message-ID: <5ec103de0901292140k3595c788i3fb69a6cdf2469b8@mail.gmail.com> Hi One way to do that is to have two OpenLayers layers with disjoint resolution sets. To configure a layer with resolutions you pass its constructor a config object including a "resolutions" option referencing an array of resolutions. Hope this helps, Eric 2009/1/30, Ivo Brodien : > Hello, > > i was wondering how I could change the behaviour so that after the > user zooms a different layer is requested from the WMS. > > I could not find the code, could anyone point me to it please? > > so for zoom level 18 want to have: > > http://localhost:8080/geoserver/wms?layers=level18..... > > and for level 4: > > http://localhost:8080/geoserver/wms?layers=level4..... > > > Thanks! > Ivo > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From eric.c2c at gmail.com Fri Jan 30 00:45:24 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] setVisibility VS visibility:false In-Reply-To: <49820EC0.6090009@mapgears.com> References: <49820AC1.6090406@mapgears.com> <5ec103de0901291213m424fbf38ibf9d9930b281d6b7@mail.gmail.com> <49820EC0.6090009@mapgears.com> Message-ID: <5ec103de0901292145s2dffbbbcr1114914131b063ca@mail.gmail.com> Hi It does make any difference at creation time as far as I know. I personally find it more elegant to pass the initial visibility as a config option. Eric 2009/1/29, Alexandre Dube : > Sorry, I meant only on layer creation only. I see in some examples this > kind of practice : > > var twms = new OpenLayers.Layer.WMS("base_world", > "http://world.freemap.in/cgi-bin/mapserv?", > { > map: '/www/freemap.in/world/map/factbooktrans.map', > layers: 'factbook', > format: 'image/png' > } > ); > twms.setVisibility(false); > map.addLayer(twms); > > ... insead of using {visibility:false}. I guess there's no particular > reason for that or did someone had an issue using {visibility:false} ? > > > Eric Lemoine wrote: >> On Thu, Jan 29, 2009 at 9:00 PM, Alexandre Dube >> wrote: >> >>> Hi list, >>> >>> Is there a difference between layer.setVisibility(false) and the >>> {visibility:false} option directly specified in the layer ? Is one a >>> better practice than the other ? >>> >> >> You'll use setVisibility if you need to change the visibility after >> the layer creation, when some button is clicked for example. >> >> -- >> Eric >> > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > From eric.c2c at gmail.com Fri Jan 30 00:50:58 2009 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Cannot cycle through vector layer features In-Reply-To: References: <1233158807168-2233009.post@n2.nabble.com> <49808D15.7050500@osgis.nl> Message-ID: <5ec103de0901292150h47687393y213983a118489ef4@mail.gmail.com> Right. The Layer.GML constructor triggers an HTTP request and returns before the response is received. Cheers, Eric 2009/1/28, Mauro Bianchi : > Sorry guys ;) > > Thanks Bart for your solution (and Ivan too). > The lesson learned here is remebering that layer features arec loaded > asynchrounously ...right? > > Cheers > Mauro > > > > 2009/1/28 Ivan Grcic : >> That was Bart ;) I was just trying to show you that GML loads in >> background, and it takes some time to load it..thats why you get >> features.length =0 >> Also check this example >> http://openlayers.org/dev/examples/GMLParser.html >> >> cheers >> > > > -- > Mauro Bianchi > bianchimro@gmail.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From derek at cmainfo.co.za Fri Jan 30 04:25:26 2009 From: derek at cmainfo.co.za (Derek Watling) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Adding a vector feature from WKT In-Reply-To: <1233235462399-2238792.post@n2.nabble.com> References: <1233224137828-2238031.post@n2.nabble.com> <1233228879292-2238363.post@n2.nabble.com> <20090129121305.GL27414@metacarta.com> <1233235462399-2238792.post@n2.nabble.com> Message-ID: <1233307526506-2243915.post@n2.nabble.com> Hi Cristopher When using your Format.WKT the property gets highlighted as expected but when the Zoom Level changes I get a "'renderIntent' is null or not an object" followed by "'this.element.scrolls' is null or not an object" error messages. I'm fairly new to TileCache / OpenLayers but would like to take this opportunity to thank you and the MetaCarta team for a great product. Derek -- View this message in context: http://n2.nabble.com/Adding-a-vector-feature-from-WKT-tp2238031p2243915.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From igrcic at gmail.com Fri Jan 30 05:09:03 2009 From: igrcic at gmail.com (Ivan Grcic) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point In-Reply-To: <20090130043655.GR27414@metacarta.com> References: <2F05B5BD24C96942AAB4787FB6114FF202C964FC@ES-MSG-007.es.govt.state.ma.us> <4982220D.3050608@gisnet.com> <20090130043655.GR27414@metacarta.com> Message-ID: Hi, i think its 2px default in Geoserver and cant be configured still. You have to write ur own WFS request where u calculate BBOX.. Take a look at wfsgetfeature control, might help http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html cheers On Fri, Jan 30, 2009 at 5:36 AM, Christopher Schmidt wrote: > On Thu, Jan 29, 2009 at 07:20:38PM -0700, Richard Greenwood wrote: >> > Kimball, David (DCR) wrote: >> >> Hi everyone, >> >> >> >> I'm using a WMS GetFeatureInfo to simultaneously query the attributes of >> >> a line layer and a point layer (from GeoServer). Unfortunately you have >> >> to click *exactly* on the center of a point to get it to send you the >> >> point attributes. > >> Look at TOLERANCE in http://www.mapserver.org/mapfile/layer.html > > The original poster said he was using GeoServer. Although MapServer > does have a TOLERANCE parameter, I do not believe that there is a > corresponding functionality in GeoServer. > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic From dave.potts at pinan.co.uk Fri Jan 30 05:19:48 2009 From: dave.potts at pinan.co.uk (David Potts) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Projection object, use and documentation. Message-ID: <1462.193.123.19.10.1233310788.squirrel@dp2642.force9.co.uk> Hi List I have having some problems with the Projection object, I am trying to use it set up a layer ojbect on a google map layer. The projection object OpenLayers. Projection includes functions to return the SRS code units string for maps and takes an optional object with properties to set on the format. What is the syntax for this option argument ? http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Projection-js.html. I have seen the projection object set up via just quoting a SRS string, is this the valid or is something more complex like the map object exptected? Is a better solution to forget the Projection object and use the OpenLayers. Layer. SphericalMercator object instead? Dave. -- Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Pinan Software From crschmidt at metacarta.com Fri Jan 30 07:02:19 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Projection object, use and documentation. In-Reply-To: <1462.193.123.19.10.1233310788.squirrel@dp2642.force9.co.uk> References: <1462.193.123.19.10.1233310788.squirrel@dp2642.force9.co.uk> Message-ID: <20090130120218.GA7110@metacarta.com> On Fri, Jan 30, 2009 at 10:19:48AM -0000, David Potts wrote: > Hi List > > I have having some problems with the Projection object, I am trying to > use it set up a layer ojbect on a google map layer. David, By default, you may not need to use anything to accomplish this goal. Can you explain what you mean more by a 'layer object'? (Rasters, vectors, etc.) > The projection object OpenLayers. Projection includes functions to return > the SRS code units string for maps and takes an optional object with > properties to set on the format. The latter was a mistake in the documentation, now fixed: http://dev.openlayers.org/apidocs/files/OpenLayers/Projection-js.html#OpenLayers.Projection.OpenLayers.Projection > I have seen the projection object set up via just quoting a SRS string, is > this the valid Valid and expected. Have you read http://docs.openlayers.org/library/spherical_mercator ? Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Jan 30 07:04:13 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Cannot cycle through vector layer features In-Reply-To: <5ec103de0901292150h47687393y213983a118489ef4@mail.gmail.com> References: <1233158807168-2233009.post@n2.nabble.com> <49808D15.7050500@osgis.nl> <5ec103de0901292150h47687393y213983a118489ef4@mail.gmail.com> Message-ID: <20090130120413.GB7110@metacarta.com> On Fri, Jan 30, 2009 at 06:50:58AM +0100, Eric Lemoine wrote: > Right. The Layer.GML constructor triggers an HTTP request and returns > before the response is received. Actually, the constructor oesn't trigger an HTTP request; that happens the first time the layer is added to a map with a valid center (moveTo is called) and the layer is visible. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Jan 30 07:11:11 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Adding a vector feature from WKT In-Reply-To: <1233307526506-2243915.post@n2.nabble.com> References: <1233224137828-2238031.post@n2.nabble.com> <1233228879292-2238363.post@n2.nabble.com> <20090129121305.GL27414@metacarta.com> <1233235462399-2238792.post@n2.nabble.com> <1233307526506-2243915.post@n2.nabble.com> Message-ID: <20090130121111.GD7110@metacarta.com> On Fri, Jan 30, 2009 at 01:25:26AM -0800, Derek Watling wrote: > > Hi Cristopher > > When using your Format.WKT the property gets highlighted as expected but > when the Zoom Level changes I get a "'renderIntent' is null or not an > object" followed by "'this.element.scrolls' is null or not an object" error > messages. > > I'm fairly new to TileCache / OpenLayers but would like to take this > opportunity to thank you and the MetaCarta team for a great product. You'll need to share you code with the list. You haven't provided enough information to determine what the problem is. (If you have a link to a page demonstrating the error, that would probably be best.) Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri Jan 30 07:13:27 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] setVisibility VS visibility:false In-Reply-To: <5ec103de0901292145s2dffbbbcr1114914131b063ca@mail.gmail.com> References: <49820AC1.6090406@mapgears.com> <5ec103de0901291213m424fbf38ibf9d9930b281d6b7@mail.gmail.com> <49820EC0.6090009@mapgears.com> <5ec103de0901292145s2dffbbbcr1114914131b063ca@mail.gmail.com> Message-ID: <20090130121327.GE7110@metacarta.com> On Fri, Jan 30, 2009 at 06:45:24AM +0100, Eric Lemoine wrote: > Hi > > It does make any difference at creation time as far as I know. I > personally find it more elegant to pass the initial visibility as a > config option. Having perused the code, I don't see any evidence that passing it in the options has any different behavior than calling setVisibility after creating the layer. -- Christopher Schmidt MetaCarta From subha at gslab.com Fri Jan 30 08:10:56 2009 From: subha at gslab.com (Subha Ramakrishnan) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] SelectFeature usage in OpenLayers 2.7 In-Reply-To: <5ec103de0901271104v41c32e49s278e9a83911ffd97@mail.gmail.com> References: <9771eb540901270203ybc54984i6cff954da101fa82@mail.gmail.com> <5ec103de0901271104v41c32e49s278e9a83911ffd97@mail.gmail.com> Message-ID: <4982FC60.9060500@gslab.com> Hi I am using Openlayers with mapserver and recently upgraded to Openlayers 2.7. From the documentation and the mail archive, I found that there is a change with this control from 2.6 to 2.7. I've a vector layer with multiple points on it. And for every point i add a selectFeature to show a pop up on clicking it. The problem here is the z-index of the layer. The moment i add the first selectFeature to the layer, the z-index goes up to "725" from some value in 300 range. Then with every control's activate call [selectControl.activate()], the z-index of the layer increases by 1 and it goes beyond 750, resulting in problems with displaying pop up. This is my code: var point = new OpenLayers.Geometry.Point(parseFloat(loc1),parseFloat(loc2)); var pointFeature = new OpenLayers.Feature.Vector(point); vectorLayer.addFeatures([pointFeature]); selectControl = new OpenLayers.Control.SelectFeature(vectorLayer, {onSelect: onPointSelect, onUnselect: onPointUnselect,toggle : true}); map.addControl(selectControl); selectControl.activate(); Am i doing something wrong here? Is there any other way to show a pop up on clicking the point? Please help. Thanks a lot. Regards, Subha From crschmidt at metacarta.com Fri Jan 30 08:34:51 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] SelectFeature usage in OpenLayers 2.7 In-Reply-To: <4982FC60.9060500@gslab.com> References: <9771eb540901270203ybc54984i6cff954da101fa82@mail.gmail.com> <5ec103de0901271104v41c32e49s278e9a83911ffd97@mail.gmail.com> <4982FC60.9060500@gslab.com> Message-ID: <20090130133451.GG7110@metacarta.com> On Fri, Jan 30, 2009 at 06:40:56PM +0530, Subha Ramakrishnan wrote: > Hi > > I am using Openlayers with mapserver and recently upgraded to Openlayers > 2.7. > From the documentation and the mail archive, I found that there is a > change with this control from 2.6 to 2.7. > > I've a vector layer with multiple points on it. And for every point i > add a selectFeature to show a pop up on clicking it. > The problem here is the z-index of the layer. The moment i add the first > selectFeature to the layer, the z-index goes up to "725" from some value > in 300 range. Then with every control's activate call > [selectControl.activate()], the z-index of the layer increases by 1 and > it goes beyond 750, resulting in problems with displaying pop up. > > This is my code: > > var point = new > OpenLayers.Geometry.Point(parseFloat(loc1),parseFloat(loc2)); > var pointFeature = new OpenLayers.Feature.Vector(point); > vectorLayer.addFeatures([pointFeature]); > selectControl = new OpenLayers.Control.SelectFeature(vectorLayer, > {onSelect: onPointSelect, onUnselect: onPointUnselect,toggle : true}); > map.addControl(selectControl); > selectControl.activate(); > > Am i doing something wrong here? > Is there any other way to show a pop up on clicking the point? There is no need to register a selectFeature control per point. Instead, register a single selectFeature control for the layer. This is demonstrated in: http://openlayers.org/dev/examples/select-feature-openpopup.html http://openlayers.org/dev/examples/sundials-spherical-mercator.html It is also documented as pat of a tutorial in: http://docs.openlayers.org/library/overlays#displaying-popups Regards, -- Christopher Schmidt MetaCarta From adube at mapgears.com Fri Jan 30 08:41:09 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] setVisibility VS visibility:false In-Reply-To: <20090130121327.GE7110@metacarta.com> References: <49820AC1.6090406@mapgears.com> <5ec103de0901291213m424fbf38ibf9d9930b281d6b7@mail.gmail.com> <49820EC0.6090009@mapgears.com> <5ec103de0901292145s2dffbbbcr1114914131b063ca@mail.gmail.com> <20090130121327.GE7110@metacarta.com> Message-ID: <49830375.1090806@mapgears.com> Christopher Schmidt wrote: > > Having perused the code, I don't see any evidence that passing it in the > options has any different behavior than calling setVisibility after > creating the layer. > Got it. Thanks Eric, Christopher. -- Alexandre Dub? Mapgears www.mapgears.com From subha at gslab.com Fri Jan 30 08:45:00 2009 From: subha at gslab.com (Subha Ramakrishnan) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] SelectFeature usage in OpenLayers 2.7 In-Reply-To: <20090130133451.GG7110@metacarta.com> References: <9771eb540901270203ybc54984i6cff954da101fa82@mail.gmail.com> <5ec103de0901271104v41c32e49s278e9a83911ffd97@mail.gmail.com> <4982FC60.9060500@gslab.com> <20090130133451.GG7110@metacarta.com> Message-ID: <4983045C.1010605@gslab.com> Hi Thanks a lot for the help. It works fine now. Thanks again. Regards, Subha Christopher Schmidt wrote: > On Fri, Jan 30, 2009 at 06:40:56PM +0530, Subha Ramakrishnan wrote: > >> Hi >> >> I am using Openlayers with mapserver and recently upgraded to Openlayers >> 2.7. >> From the documentation and the mail archive, I found that there is a >> change with this control from 2.6 to 2.7. >> >> I've a vector layer with multiple points on it. And for every point i >> add a selectFeature to show a pop up on clicking it. >> The problem here is the z-index of the layer. The moment i add the first >> selectFeature to the layer, the z-index goes up to "725" from some value >> in 300 range. Then with every control's activate call >> [selectControl.activate()], the z-index of the layer increases by 1 and >> it goes beyond 750, resulting in problems with displaying pop up. >> >> This is my code: >> >> var point = new >> OpenLayers.Geometry.Point(parseFloat(loc1),parseFloat(loc2)); >> var pointFeature = new OpenLayers.Feature.Vector(point); >> vectorLayer.addFeatures([pointFeature]); >> selectControl = new OpenLayers.Control.SelectFeature(vectorLayer, >> {onSelect: onPointSelect, onUnselect: onPointUnselect,toggle : true}); >> map.addControl(selectControl); >> selectControl.activate(); >> >> Am i doing something wrong here? >> Is there any other way to show a pop up on clicking the point? >> > > There is no need to register a selectFeature control per point. Instead, > register a single selectFeature control for the layer. > > This is demonstrated in: > > http://openlayers.org/dev/examples/select-feature-openpopup.html > http://openlayers.org/dev/examples/sundials-spherical-mercator.html > > It is also documented as pat of a tutorial in: > > http://docs.openlayers.org/library/overlays#displaying-popups > > Regards, > From robhyx at gmail.com Fri Jan 30 09:04:04 2009 From: robhyx at gmail.com (Robert Hicks) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Problem when switching WMS layers on and off with Google Base Layer In-Reply-To: <20090129213424.GQ27414@metacarta.com> References: <20090129213424.GQ27414@metacarta.com> Message-ID: Thanks for the reply, does this mean I cannot use 4326 as an srs for my overlays? I have in the layer declaration srs: 'EPSG:4326', but in firebug I get a bad request 404 reported and in the call it says EPSG 900913. On Thu, Jan 29, 2009 at 4:34 PM, Christopher Schmidt < crschmidt@metacarta.com> wrote: > On Thu, Jan 29, 2009 at 04:18:34PM -0500, Robert Hicks wrote: > > Hello all, > > I am having an issue when I have some WMS Layers over top of a Google > base > > map. Basically what happens is when I toggle to layers on and off in the > > layer switcher the next time the layer appears it is shifted down > relative > > to the Google map. It does not do this with the basic OpenLayers base map > > from http://labs.metacarta.com/wms/vmap0. > > Use spherical mercator. > > http://docs.openlayers.org/library/spherical_mercator > http://openlayers.org/dev/examples/spherical-mercator.html > > -- Chris > > > Here are my layer definitions: > > > > var parcels = new OpenLayers.Layer.WMS( > > "Parcels", geoserverDomain, > > { > > //width: '800', > > srs: 'EPSG:4326', > > layers: 'mylayer_parcels', > > //height: '341', > > styles: '', > > format: 'image/png', > > transparent: 'true', > > attribution: "A Service" > > } > > ); > > var munic = new OpenLayers.Layer.WMS( > > "Municipality", geoserverDomain, > > { > > //width: '800', > > srs: 'EPSG:4326', > > layers: 'mylayer_munic', > > //height: '341', > > styles: '', > > format: 'image/png', > > transparent: 'true', > > attribution: "A Service" > > } > > ); > > var roadcenterlines = new OpenLayers.Layer.WMS( > > "Road Center Lines", geoserverDomain, > > { > > //width: '800', > > srs: 'EPSG:4326', > > layers: 'mylayer_roadcenterlines_ft', > > //height: '341', > > styles: '', > > format: 'image/png', > > transparent: 'true', > > attribution: "A Service" > > } > > ); > > var raster = new OpenLayers.Layer.WMS( > > "Defiance County Raster", geoserverDomain, > > { > > //width: '800', > > srs: 'EPSG:4326', > > layers: 'gv:county', > > //height: '341', > > styles: '', > > format: 'image/png', > > transparent: 'true', > > attribution: "A Service" > > } > > ); > > var vector = new OpenLayers.Layer.Vector( > > "GlobalView", > > { > > attribution:"A Service", > > displayInLayerSwitcher: false > > } > > ); > > map.addLayers([wms, raster, parcels, munic, roadcenterlines, > > vector]); > > // 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()); > > map.addControl(new OpenLayers.Control.Attribution()); > > map.setCenter(new > > OpenLayers.LonLat(-84.52,41.35),11,false,false); > > > > Has anyone encountered this? > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090130/a06d8082/attachment.html From bzrudi at centarea.com Fri Jan 30 09:19:50 2009 From: bzrudi at centarea.com (bzrudi) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Different icons for popups Message-ID: <49830C86.40201@centarea.com> Hi list! I have a strange problem with applying different icons to my markers/popups using addUniqueValueRules(). I see all the examples and read a lot but unfortunately it doesn't work as expected, so one may help me out here please ;-) So what I did. Defined a styleMap as below and bind my Vectorlayer to it. var markerStyle = new OpenLayers.StyleMap({ externalGraphic: '../museum.png', fillOpacity: 1, pointRadius: 10, }); vectorlayer = new OpenLayers.Layer.Vector('Infos', {displayInLayerSwitcher: true, styleMap: markerStyle}); This works as expected, all my markers have the "museum" icon instead of the circle/point. I now tried to apply differnt icons to the markers/popups using this as example: var lookup = { attraction: {externalGraphic: '../attraction.png', pointRadius: 15, $js .= "vectorlayer = new OpenLayers.Layer.Vector('Polygon Layer', {displayInLayerSwitcher: true, styleMap: markerStyle});\n"; fillOpacity: 1}, museum: {externalGraphic: '../museum.png'}, pointRadius: 15, fillOpacity: 1}, } and also add: markerStyle.addUniqueValueRules("default", "attraction", lookup); Now, instead of having all my markers using the "attraction" icon (what is what I expected) - the markers are no longer displayed. I tried lots of things to get rid of this but have no more idea how to. Unfortunately I'm a PHP programmer with just basic JS knowledge. So if there is anyone who can help, please let me know, thanks! cheers bzrudi From crschmidt at metacarta.com Fri Jan 30 09:21:00 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Problem when switching WMS layers on and off with Google Base Layer In-Reply-To: References: <20090129213424.GQ27414@metacarta.com> Message-ID: <20090130142100.GK7110@metacarta.com> On Fri, Jan 30, 2009 at 09:04:04AM -0500, Robert Hicks wrote: > Thanks for the reply, does this mean I cannot use 4326 as an srs for my > overlays? Yes. It is not possible to accurately overlay raster layers in differing projections in a Javascript application. You will need the server to reproject the data for you. REgards, -- Christopher Schmidt MetaCarta From joao.c.duarte at co.sapo.pt Fri Jan 30 11:53:52 2009 From: joao.c.duarte at co.sapo.pt (Joao Duarte) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Popup Property/Method Message-ID: <02cc01c982fb$54923540$fdb69fc0$@c.duarte@co.sapo.pt> Hi, I have a Vector Layer with one marker. Also, I have a click handler for that marker to open a popup. Each time the popup is opened its content may be different, so I?m creating a new popup for each click, passing it the content to display. However I would like to only create the popup once and the next time it should open, just change its content. I realize there is a contentHTML property in OpenLayers.Popup as well as setContentHTML method. But none of these are API Property/Method. Do you plan to ?promote? this property or method to API in the next release? Regards, -- Jo?o Duarte SAPO Maps ? http://maps.sapo.pt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090130/1be0266b/attachment.html From arnd.wippermann at web.de Fri Jan 30 12:12:08 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Different icons for popups In-Reply-To: <49830C86.40201@centarea.com> Message-ID: Hi, If your features have an attribute named attraction with the attribute value = "attraction" or "museum", your code should display the icon. var lookup = { "attraction": //value of attribute attraction {externalGraphic: '../attraction.png', pointRadius: 15, fillOpacity: 1}, "museum": //other value of attribute attraction {externalGraphic: '../museum.png'}, pointRadius: 15, fillOpacity: 1} } //here you name the attribute to look at and above you list the attribute values markerStyle.addUniqueValueRules("default", "attraction", lookup); Your lookup object have some strange lines (copy paste issue?) and for IE the last comma would fail. Regards Arnd Wippermann -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von bzrudi Gesendet: Freitag, 30. Januar 2009 15:20 An: users@openlayers.org Betreff: [OpenLayers-Users] Different icons for popups Hi list! I have a strange problem with applying different icons to my markers/popups using addUniqueValueRules(). I see all the examples and read a lot but unfortunately it doesn't work as expected, so one may help me out here please ;-) So what I did. Defined a styleMap as below and bind my Vectorlayer to it. var markerStyle = new OpenLayers.StyleMap({ externalGraphic: '../museum.png', fillOpacity: 1, pointRadius: 10, }); vectorlayer = new OpenLayers.Layer.Vector('Infos', {displayInLayerSwitcher: true, styleMap: markerStyle}); This works as expected, all my markers have the "museum" icon instead of the circle/point. I now tried to apply differnt icons to the markers/popups using this as example: var lookup = { attraction: {externalGraphic: '../attraction.png', pointRadius: 15, $js .= "vectorlayer = new OpenLayers.Layer.Vector('Polygon Layer', {displayInLayerSwitcher: true, styleMap: markerStyle});\n"; fillOpacity: 1}, museum: {externalGraphic: '../museum.png'}, pointRadius: 15, fillOpacity: 1}, } and also add: markerStyle.addUniqueValueRules("default", "attraction", lookup); Now, instead of having all my markers using the "attraction" icon (what is what I expected) - the markers are no longer displayed. I tried lots of things to get rid of this but have no more idea how to. Unfortunately I'm a PHP programmer with just basic JS knowledge. So if there is anyone who can help, please let me know, thanks! cheers bzrudi _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From euzuro at gmail.com Fri Jan 30 12:22:44 2009 From: euzuro at gmail.com (Erik Uzureau) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Popup Property/Method In-Reply-To: <-2626384367323407641@unknownmsgid> References: <-2626384367323407641@unknownmsgid> Message-ID: <6ae3fb590901300922q56f7b457o4cb8fa702d62a1d5@mail.gmail.com> I don't see any reason why setContentHTML shouldn't be API. anyone else? Erik On Fri, Jan 30, 2009 at 10:53, Joao Duarte wrote: > Hi, > > > > I have a Vector Layer with one marker. Also, I have a click handler for > that marker to open a popup. Each time the popup is opened its content may > be different, so I'm creating a new popup for each click, passing it the > content to display. > > > > However I would like to only create the popup once and the next time it > should open, just change its content. I realize there is a contentHTML > property in OpenLayers.Popup as well as setContentHTML method. But none of > these are API Property/Method. > > > > Do you plan to "promote" this property or method to API in the next > release? > > > > Regards, > > > > -- > > Jo?o Duarte > > SAPO Maps ? http://maps.sapo.pt > > > > _______________________________________________ > 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/20090130/65adb455/attachment.html From Aleda.Freeman at state.ma.us Fri Jan 30 12:28:47 2009 From: Aleda.Freeman at state.ma.us (Freeman, Aleda (EEA)) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Any options for an introductory OpenLayers training? Message-ID: <024D3FC6993FB54DA18235F9CF9B2327FB0754@ES-MSG-002.es.govt.state.ma.us> I think I have a number of users who would really love an OpenLayers training workshop (myself included). A hands-on few hours "how to get started with OpenLayers". The online examples are good, but sometimes it helps to have a training to get jump started. I went to a 4 hours "how to get started with Google Maps API" training earlier this week and I found it very helpful. The trainer did a Powerpoint and then let us work on a tutorial while he went around the room helping us as we got stuck. Maybe something similar to this: http://openlayers.org/blog/2008/10/29/openlayers-workshop-from-foss4g-20 08/ but with examples from MassGIS WMS. MassGIS has the GeoServer WMS, a web server where people could put their stuff in their own directories, and a training room. Now we just need a trainer. Is there anyone from the OpenLayers project who does this kind of training? Is there a fee involved? Thanks for any info you can give me. Aleda Freeman MassGIS 251 Causeway St. 5th floor Boston, MA 02114 phone: 617-626-1193 fax: 617-626-1249 http://www.mass.gov/mgis - MassGIS http://lyceum.massgis.state.ma.us - Webservices Wiki MassGIS is the Commonwealth's Office of Geographic and Environmental Information, located in the Executive Office of Energy and Environmental Affairs ------------------------------------------------------------------------ ------- if you send me mail and don't get the reply that you expect, your message may have been filtered as spam - please call me to let me know. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090130/e8f57f3c/attachment.html From David.Kimball at state.ma.us Fri Jan 30 16:48:12 2009 From: David.Kimball at state.ma.us (Kimball, David (DCR)) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point In-Reply-To: Message-ID: <2F05B5BD24C96942AAB4787FB6114FF202C9655F@ES-MSG-007.es.govt.state.ma.us> Thanks for your help everyone...you're right Chris, I'm using GeoServer not Mapserver. So on Ivan's suggestion (and with Aleda's help) I went with a WFS GetFeature request with a +/- 5 pixel BBOX (to make the points and lines easier to select) and a custom list of fields (not including the geometry), and parsed the GML2 response into what I needed. Actually easier-to-code and more functional than before! Here's the URL and some code snippets...there are actually separate loadURL requests for the line and point layer queries now; this is just the code for querying the line layer... http://maps.massgis.state.ma.us/dcr/trails/DCR_RoadTrail12.html // ======== THE EVENT CODE (PART OF THE INIT FUNCTION): map.events.register('click', map, function (e) { exy = e.xy; llMin = map.getLonLatFromPixel(new OpenLayers.Pixel(e.xy.x - 5,e.xy.y + 5)); // don't know why these have to be backwards on the Y coordinates... llMax = map.getLonLatFromPixel(new OpenLayers.Pixel(e.xy.x + 5,e.xy.y - 5)); // don't know why these have to be backwards on the Y coordinates... var url2 = map.layers[0].getFullRequestString( { SERVICE: 'WFS', VERSION: '1.0.0', REQUEST: "GetFeature", TYPENAME: 'massgis:DCR.ROADS_TRAILS_LINE', OUTPUTFORMAT: 'GML2', PROPERTYNAME: lineFieldListString, MAXFEATURES: 20, SRSNAME: 'EPSG:26986', BBOX: llMin.lon + "," + llMin.lat + "," + llMax.lon + "," + llMax.lat }, "http://giswebservices.massgis.state.ma.us/geoserver/wfs"); OpenLayers.loadURL(url2, '', this, setHTMLLine, setHTMLLine); OpenLayers.Event.stop(e); }); // ======== AND THE FUNCTION THAT IS CALLED WHEN THE GML IS RETURNED (most of this is specific to placing the values on the web page): function setHTMLLine(response) { var myGMLFormat = new OpenLayers.Format.GML(); var myGML = myGMLFormat.read(response.responseText); // ---- IF A LINE WAS CLICKED, FILL THE LINE BOX if ((myGML.length > 0) && (map.getScale() <= maxLineScale)) { for (var k in myGML[0].attributes) { // only uses the attributes of the first Line returned for now... // ----- This places the value into a new variable and truncates it if it's a long URL; this variable is used only for placing the text on the screen, not for href values. This way you can have a link with its actual href string separate from its truncated presentation on-screen var thisIsTheValue = myGML[0].attributes[k]; // ----- PLACE THE VALUES INTO THE CORRECT AREAS IN THE ATTRIBUTE DISPLAY AREA (if a place for them exists) // ----- This places the value onto the page if ((document.getElementById("LINE_" + k)) && (document.getElementById("LINEROW_" + k))) { // if a row for this attribute exists in the line table-box document.getElementById("LINE_" + k).innerHTML = thisIsTheValue; // write the attribute value into the table-box document.getElementById("LINEROW_" + k).style.display = ''; // make this table-box row visible } // end if } // end for (k) document.getElementById("lineTableHeader").innerHTML = "Road & Trail Line Attributes"; } // end of GPS LINE section else { document.getElementById("lineTableHeader").innerHTML = "No Road/Trail clicked"; } } // end of function setHTMLLine --David ||||||| David Kimball ||||||| GIS Specialist ||||||| MA Department of Conservation and Recreation ||||||| http://www.mass.gov/dcr/stewardship/gis/ ||||||| david.kimball@state.ma.us ||||||| 617.626.1447 phone ||||||| 617.626.1349 fax -----Original Message----- From: Ivan Grcic [mailto:igrcic@gmail.com] Sent: Friday, January 30, 2009 5:09 AM To: Christopher Schmidt Cc: Richard Greenwood; users@openlayers.org; Kimball, David (DCR) Subject: Re: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point Hi, i think its 2px default in Geoserver and cant be configured still. You have to write ur own WFS request where u calculate BBOX.. Take a look at wfsgetfeature control, might help http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html cheers On Fri, Jan 30, 2009 at 5:36 AM, Christopher Schmidt wrote: > On Thu, Jan 29, 2009 at 07:20:38PM -0700, Richard Greenwood wrote: >> > Kimball, David (DCR) wrote: >> >> Hi everyone, >> >> >> >> I'm using a WMS GetFeatureInfo to simultaneously query the attributes of >> >> a line layer and a point layer (from GeoServer). Unfortunately you have >> >> to click *exactly* on the center of a point to get it to send you the >> >> point attributes. > >> Look at TOLERANCE in http://www.mapserver.org/mapfile/layer.html > > The original poster said he was using GeoServer. Although MapServer > does have a TOLERANCE parameter, I do not believe that there is a > corresponding functionality in GeoServer. > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic > Kimball, David (DCR) wrote: >> Hi everyone, >> >> I'm using a WMS GetFeatureInfo to simultaneously query the attributes of >> a line layer and a point layer (from GeoServer). Unfortunately you have >> to click *exactly* on the center of a point to get it to send you the >> point attributes. >> >> http://maps.massgis.state.ma.us/dcr/trails/DCR_RoadTrail10.html >> >> >> map.events.register('click', map, function (e) { >> var url = map.layers[0].getFullRequestString( >> { >> 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[8].params.LAYERS + "," >> + map.layers[9].params.LAYERS, >> FEATURE_COUNT: 50, >> WIDTH: map.size.w, >> HEIGHT: map.size.h >> }, >> >> "http://giswebservices.massgis.state.ma.us/geoserver/wms"); >> OpenLayers.loadURL(url, '', this, setHTML, setHTML); >> OpenLayers.Event.stop(e); >> >> >> I searched a bunch for this and all I could find were suggestions to do >> a WFS getfeature instead of a WMS GetFeatureInfo, or to set some options >> on the server (not an option in this case). I'd rather use the WMS >> request because I'd rather not rewrite all my parsing Javascript, and >> there might be a performance hit - some of the lines have hundreds of >> vertices, and when I tried a similar approach recently with large >> polygons it was slow because of the large amount of data sent back. >> >> So, is there any (client-side) radius/tolerance option for >> GetFeatureInfo? >> >> Thanks a lot, >> >> David Look at TOLERANCE in http://www.mapserver.org/mapfile/layer.html -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From bzrudi at centarea.com Sat Jan 31 02:42:06 2009 From: bzrudi at centarea.com (bzrudi) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] Different icons for popups In-Reply-To: References: Message-ID: <498400CE.1030206@centarea.com> Hi, stupid me. I found the problem. Thanks to your advice that the code should work I looked around and found that I just forget to add the 'attraction' attribute to the 'propertyName' list of my WFS request. And thanks for your advice with the last comma, hopefully there are no more IE quirks to come around once I will test it;-) Thanks again! cheers bzrudi Arnd Wippermann wrote: > Hi, > > If your features have an attribute named attraction with the attribute value > = "attraction" or "museum", your code should display the icon. > > var lookup = { > "attraction": //value of attribute attraction > {externalGraphic: '../attraction.png', pointRadius: 15, > fillOpacity: 1}, > "museum": //other value of attribute attraction > {externalGraphic: '../museum.png'}, pointRadius: 15, > fillOpacity: 1} > } > > //here you name the attribute to look at and above you list the attribute > values > markerStyle.addUniqueValueRules("default", "attraction", lookup); > > Your lookup object have some strange lines (copy paste issue?) and for IE > the last comma would fail. > > Regards > Arnd Wippermann > > > -----Urspr?ngliche Nachricht----- > Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im > Auftrag von bzrudi > Gesendet: Freitag, 30. Januar 2009 15:20 > An: users@openlayers.org > Betreff: [OpenLayers-Users] Different icons for popups > > Hi list! > > I have a strange problem with applying different icons to my markers/popups > using addUniqueValueRules(). I see all the examples and read a lot but > unfortunately it doesn't work as expected, so one may help me out here > please ;-) > > So what I did. Defined a styleMap as below and bind my Vectorlayer to it. > > var markerStyle = new OpenLayers.StyleMap({ > externalGraphic: '../museum.png', > fillOpacity: 1, > pointRadius: 10, > }); > > vectorlayer = new OpenLayers.Layer.Vector('Infos', > {displayInLayerSwitcher: true, > styleMap: markerStyle}); > > This works as expected, all my markers have the "museum" icon instead of the > circle/point. I now tried to apply differnt icons to the markers/popups > using this as example: > > var lookup = { > attraction: {externalGraphic: '../attraction.png', pointRadius: 15, > $js .= "vectorlayer = new OpenLayers.Layer.Vector('Polygon > Layer', > {displayInLayerSwitcher: true, > styleMap: markerStyle});\n"; > fillOpacity: 1}, > museum: {externalGraphic: '../museum.png'}, pointRadius: 15, > fillOpacity: 1}, > } > > and also add: > > markerStyle.addUniqueValueRules("default", "attraction", lookup); > > Now, instead of having all my markers using the "attraction" icon (what is > what I expected) - the markers are no longer displayed. > I tried lots of things to get rid of this but have no more idea how to. > Unfortunately I'm a PHP programmer with just basic JS knowledge. So if there > is anyone who can help, please let me know, thanks! > > cheers bzrudi > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From mika at digikartta.net Sat Jan 31 05:42:57 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point In-Reply-To: <2F05B5BD24C96942AAB4787FB6114FF202C9655F@ES-MSG-007.es.govt.state.ma.us> References: <2F05B5BD24C96942AAB4787FB6114FF202C9655F@ES-MSG-007.es.govt.state.ma.us> Message-ID: <49842B31.2090202@digikartta.net> Hi David, you can also request json from Geoserver when using GetFeature. I find it easier to parse than GML, but that is only my opinion. I can provide you an example if you like. - mika - Kimball, David (DCR) kirjoitti: > Thanks for your help everyone...you're right Chris, I'm using GeoServer > not Mapserver. So on Ivan's suggestion (and with Aleda's help) I went > with a WFS GetFeature request with a +/- 5 pixel BBOX (to make the > points and lines easier to select) and a custom list of fields (not > including the geometry), and parsed the GML2 response into what I > needed. Actually easier-to-code and more functional than before! > > Here's the URL and some code snippets...there are actually separate > loadURL requests for the line and point layer queries now; this is just > the code for querying the line layer... > > http://maps.massgis.state.ma.us/dcr/trails/DCR_RoadTrail12.html > > > // ======== THE EVENT CODE (PART OF THE INIT FUNCTION): > > map.events.register('click', map, function (e) { > exy = e.xy; > > llMin = map.getLonLatFromPixel(new > OpenLayers.Pixel(e.xy.x - 5,e.xy.y + 5)); > // don't know why these have to be backwards on > the Y coordinates... > llMax = map.getLonLatFromPixel(new > OpenLayers.Pixel(e.xy.x + 5,e.xy.y - 5)); > // don't know why these have to be backwards on > the Y coordinates... > > var url2 = map.layers[0].getFullRequestString( > { > SERVICE: 'WFS', > VERSION: '1.0.0', > REQUEST: "GetFeature", > TYPENAME: 'massgis:DCR.ROADS_TRAILS_LINE', > OUTPUTFORMAT: 'GML2', > PROPERTYNAME: lineFieldListString, > MAXFEATURES: 20, > SRSNAME: 'EPSG:26986', > BBOX: llMin.lon + "," + llMin.lat + "," + > llMax.lon + "," + llMax.lat > }, > > "http://giswebservices.massgis.state.ma.us/geoserver/wfs"); > OpenLayers.loadURL(url2, '', this, setHTMLLine, > setHTMLLine); > > OpenLayers.Event.stop(e); > }); > > > > > // ======== AND THE FUNCTION THAT IS CALLED WHEN THE GML IS RETURNED > (most of this is specific to placing the values on the web page): > > function setHTMLLine(response) { > > var myGMLFormat = new OpenLayers.Format.GML(); > var myGML = myGMLFormat.read(response.responseText); > > // ---- IF A LINE WAS CLICKED, FILL THE LINE BOX > if ((myGML.length > 0) && (map.getScale() <= maxLineScale)) { > for (var k in myGML[0].attributes) { // only uses the > attributes of the first Line returned for now... > > // ----- This places the value into a new variable and truncates it if > it's a long URL; this variable is used only for placing the text on the > screen, not for href values. This way you can have a link with its > actual href string separate from its truncated presentation on-screen > var thisIsTheValue = myGML[0].attributes[k]; > > // ----- PLACE THE VALUES INTO THE CORRECT AREAS IN THE ATTRIBUTE > DISPLAY AREA (if a place for them exists) > > // ----- This places the value onto the page > if ((document.getElementById("LINE_" + k)) && > (document.getElementById("LINEROW_" + k))) { // if a row for this > attribute exists in the line table-box > document.getElementById("LINE_" + > k).innerHTML = thisIsTheValue; // write the attribute value into the > table-box > document.getElementById("LINEROW_" + > k).style.display = ''; // make this table-box row visible > } // end if > } // end for (k) > document.getElementById("lineTableHeader").innerHTML = > "Road & Trail Line Attributes"; > } // end of GPS LINE section > else { > document.getElementById("lineTableHeader").innerHTML = > "No Road/Trail clicked"; > } > } // end of function setHTMLLine > > > > > --David > > ||||||| David Kimball > ||||||| GIS Specialist > ||||||| MA Department of Conservation and Recreation > ||||||| http://www.mass.gov/dcr/stewardship/gis/ > ||||||| david.kimball@state.ma.us > ||||||| 617.626.1447 phone > ||||||| 617.626.1349 fax > > -----Original Message----- > From: Ivan Grcic [mailto:igrcic@gmail.com] > Sent: Friday, January 30, 2009 5:09 AM > To: Christopher Schmidt > Cc: Richard Greenwood; users@openlayers.org; Kimball, David (DCR) > Subject: Re: [OpenLayers-Users] WMS GetFeatureInfo - difficult to click > exactly on a point > > Hi, > i think its 2px default in Geoserver and cant be configured still. You > have to write ur own WFS request where u calculate BBOX.. > > Take a look at wfsgetfeature control, might help > http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html > > > cheers > On Fri, Jan 30, 2009 at 5:36 AM, Christopher Schmidt > wrote: > >> On Thu, Jan 29, 2009 at 07:20:38PM -0700, Richard Greenwood wrote: >> >>>> Kimball, David (DCR) wrote: >>>> >>>>> Hi everyone, >>>>> >>>>> I'm using a WMS GetFeatureInfo to simultaneously query the >>>>> > attributes of > >>>>> a line layer and a point layer (from GeoServer). Unfortunately >>>>> > you have > >>>>> to click *exactly* on the center of a point to get it to send you >>>>> > the > >>>>> point attributes. >>>>> >>> Look at TOLERANCE in http://www.mapserver.org/mapfile/layer.html >>> >> The original poster said he was using GeoServer. Although MapServer >> does have a TOLERANCE parameter, I do not believe that there is a >> corresponding functionality in GeoServer. >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- --------------------------------------- Mika Lehtonen XML-Scanning Littoinen Ky Lankakatu 2 E 13, 20660 Littoinen mika@digikartta.net mbl +358 (0)44 2908259 --------------------------------------- From richard.greenwood at gmail.com Sat Jan 31 10:34:53 2009 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] please test this site Message-ID: I have received an error report that I am unable to reproduce myself. The site is: http://www.co.sweet.wy.us/mapserver/map.html The reported error is: OpenLayers.Console is undefined - OpenLayers.js Line 260 I am using a custom build of OL 2.7 that excludes modules that I am not using, but othwise OL is unmodified. Thank you very much, Rich -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com From arnd.wippermann at web.de Sat Jan 31 11:14:03 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] please test this site In-Reply-To: Message-ID: Hi Richard, Thats line 260 from http://www.co.sweet.wy.us/mapserver/lib/OpenLayers-2.7/OpenLayers.js : if(!lang){OpenLayers.Console.warn('Failed to find OpenLayers.Lang.'+parts.join("-")+' dictionary, falling back to default language');lang=OpenLayers.Lang.defaultCode;} if i open your side. Fehler: OpenLayers.Console is undefined Quelldatei: http://www.co.sweet.wy.us/mapserver/lib/OpenLayers-2.7/OpenLayers.js Zeile: 260 That's the error message from FF error console, if i disable firebug for your side. Hope that helps Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Richard Greenwood Gesendet: Samstag, 31. Januar 2009 16:35 An: Users@openlayers.org Betreff: [OpenLayers-Users] please test this site I have received an error report that I am unable to reproduce myself. The site is: http://www.co.sweet.wy.us/mapserver/map.html The reported error is: OpenLayers.Console is undefined - OpenLayers.js Line 260 I am using a custom build of OL 2.7 that excludes modules that I am not using, but othwise OL is unmodified. Thank you very much, Rich -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From richard.greenwood at gmail.com Sat Jan 31 12:18:43 2009 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Wed Sep 1 17:17:07 2010 Subject: [OpenLayers-Users] please test this site In-Reply-To: References: Message-ID: Thank you! So it is language dependent. My compact build has left out the modules in lib/OpenLayers/Lang Thanks for providing the detailed error message. Rich On Sat, Jan 31, 2009 at 9:14 AM, Arnd Wippermann wrote: > > Hi Richard, > > Thats line 260 from > http://www.co.sweet.wy.us/mapserver/lib/OpenLayers-2.7/OpenLayers.js : > if(!lang){OpenLayers.Console.warn('Failed to find > OpenLayers.Lang.'+parts.join("-")+' dictionary, falling back to default > language');lang=OpenLayers.Lang.defaultCode;} > > if i open your side. > > Fehler: OpenLayers.Console is undefined > Quelldatei: > http://www.co.sweet.wy.us/mapserver/lib/OpenLayers-2.7/OpenLayers.js > Zeile: 260 > > That's the error message from FF error console, if i disable firebug for > your side. > > Hope that helps > > Arnd -- Richard Greenwood richard.greenwood@gmail.com www.greenwoodmap.com