From eric.c2c at gmail.com Sun Jun 1 05:39:07 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Z-Index of Markers Layer In-Reply-To: References: <5ec103de0805290419l2524a69l574415ee5b9ed422@mail.gmail.com> Message-ID: <5ec103de0806010239h69324f7obd1b8566bc635866@mail.gmail.com> On Fri, May 30, 2008 at 1:13 AM, bradleyspencer wrote: > Eric, > > The hack suggestion did not work, or at least I am unable to make it work :( > > My latest attempt to sort this almost worked. > > Given that the OL defaults are Z_INDEX_BASE: { BaseLayer: 100, Overlay: 325, Popup: 750, Control: 1000 }, I made sure that all my user layers were set in the correct overlay levels within the range 325 thru 700 Zindex. Then I set the levels of the two markers to be offset from the Popup default level by -1 and -2 by using 'myMarkerLayer'.setZIndex(map.Z_INDEX_BASE['Popup'] - 1 & 2). This worked fine if I just wanted to see the marker layers and the popups together. However, once I plotted my other layers they simply stamped over the top of the markers and popup layers. I dont see why the following wouldn't work: myMakerLayer0 = new OpenLayer.Layer.Markers(); myMakerLayer1 = new OpenLayer.Layer.Markers(); map.addLayers([myMarkerLayer0, myMarkerLayer1]); // set the zindex after the layers are added to the map myMakerLayer0.setZIndex(map.Z_INDEX_BASE['Popup'] - 1); myMakerLayer1.setZIndex(map.Z_INDEX_BASE['Popup'] - 2); myOverlayLayer0 = new OpenLayers.Layer(); myOverlayLayer1 = new OpenLayers.Layer(); map.addLayers([myOverlayLayer0, myOverlayLayer1]); > Is there a way to interrogate the ZIndex of any given layer so that I can check what is going on? layer.div.style.zIndex Hope this is helping... -- Eric From eric.c2c at gmail.com Sun Jun 1 08:10:46 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Tiles outside maxExtent being loaded In-Reply-To: <20080530142411.GB23107@metacarta.com> References: <2bb6ee950805300548s4733b9d1t48f6899acb3aadb0@mail.gmail.com> <20080530142411.GB23107@metacarta.com> Message-ID: <5ec103de0806010510j390e8db8nf9f2f0374bd87939@mail.gmail.com> On Fri, May 30, 2008 at 4:24 PM, Christopher Schmidt wrote: > On Fri, May 30, 2008 at 01:48:36PM +0100, Jon Blower wrote: >> I've noticed that in my application OpenLayers is requesting tiles >> outside the maximum extent of my overlay layer (which is in EPSG:4326 >> and hence has a maxExtent of -180,-90,180,90). I've checked using the >> Firebug console that the maxExtent is correctly set. wrapDateLine is >> set true. > > wrapDateLine forces displayOutsideMaxExtent, which is why you are seeing > the behavior you are seeing. Chris, sorry for the stupid question but why does wrapDateLine force displayOutsideMaxExtent? What would not function if one creates a layer with wrapeDateLine:true and then does layer.displayOutsideMaxExtent = false? One will end up with missing tiles? Thanks, -- Eric From eric.c2c at gmail.com Sun Jun 1 08:19:43 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Draw Feature from Form field In-Reply-To: References: Message-ID: <5ec103de0806010519o1c5a3809q46e5ca48784d1653@mail.gmail.com> On Wed, May 28, 2008 at 12:54 PM, Levii Smith wrote: > > > I'm looking to allow someone to enter a lat/long and distance in NM into a > form field, which would then draw a circle as a vector on screen at that > location? Check out the OpenLayers.Geometry.Polygon.createRegularPolygon func: > I'd also like to be able to destroy that feature with a > double-click or something. Anyone done anything like this, or got a good > starting point for me? You can use the select feature control to allow your users to select features. Then, you can add a button which on click will destroy the selected feature(s). Your button may be be based on OpenLayers.Control.Button. Hope this helps, -- Eric From brad at cubewerx.com.au Sun Jun 1 08:32:20 2008 From: brad at cubewerx.com.au (bradleyspencer) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Z-Index of Markers Layer In-Reply-To: <5ec103de0806010239h69324f7obd1b8566bc635866@mail.gmail.com> Message-ID: Eric, Its all sorted now. Thanks for the layer.div.style.zIndex thingy it helped me see that I was assigning the layers to a Zindex that was not what I wanted. So these other layers were always set above the markers layers! To make it work for me, i.e. so that the layers were going in the correct band below the Markers (and the Popup), I had to set the index to an increment above the Z_INDEX_BASE[Overlay] and not an absolute number which I was doing. So now when I do this 'map.setLayerZIndex(LanduseHighlight, 0)' it sets the ZIndex of this layer to 325 which is where I want it. Anyway, it now works just fine so thanks for your help. Cheers, Brad Spencer -----Original Message----- From: Eric Lemoine [mailto:eric.c2c@gmail.com] Sent: Sunday, 1 June 2008 7:39 PM To: brad@cubewerx.com.au Cc: openlayers users Subject: Re: [OpenLayers-Users] Z-Index of Markers Layer On Fri, May 30, 2008 at 1:13 AM, bradleyspencer wrote: > Eric, > > The hack suggestion did not work, or at least I am unable to make it work :( > > My latest attempt to sort this almost worked. > > Given that the OL defaults are Z_INDEX_BASE: { BaseLayer: 100, Overlay: 325, Popup: 750, Control: 1000 }, I made sure that all my user layers were set in the correct overlay levels within the range 325 thru 700 Zindex. Then I set the levels of the two markers to be offset from the Popup default level by -1 and -2 by using 'myMarkerLayer'.setZIndex(map.Z_INDEX_BASE['Popup'] - 1 & 2). This worked fine if I just wanted to see the marker layers and the popups together. However, once I plotted my other layers they simply stamped over the top of the markers and popup layers. I dont see why the following wouldn't work: myMakerLayer0 = new OpenLayer.Layer.Markers(); myMakerLayer1 = new OpenLayer.Layer.Markers(); map.addLayers([myMarkerLayer0, myMarkerLayer1]); // set the zindex after the layers are added to the map myMakerLayer0.setZIndex(map.Z_INDEX_BASE['Popup'] - 1); myMakerLayer1.setZIndex(map.Z_INDEX_BASE['Popup'] - 2); myOverlayLayer0 = new OpenLayers.Layer(); myOverlayLayer1 = new OpenLayers.Layer(); map.addLayers([myOverlayLayer0, myOverlayLayer1]); > Is there a way to interrogate the ZIndex of any given layer so that I can check what is going on? layer.div.style.zIndex Hope this is helping... -- Eric From crschmidt at metacarta.com Sun Jun 1 09:53:26 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Tiles outside maxExtent being loaded In-Reply-To: <5ec103de0806010510j390e8db8nf9f2f0374bd87939@mail.gmail.com> References: <2bb6ee950805300548s4733b9d1t48f6899acb3aadb0@mail.gmail.com> <20080530142411.GB23107@metacarta.com> <5ec103de0806010510j390e8db8nf9f2f0374bd87939@mail.gmail.com> Message-ID: <20080601135325.GA6429@metacarta.com> On Sun, Jun 01, 2008 at 02:10:46PM +0200, Eric Lemoine wrote: > On Fri, May 30, 2008 at 4:24 PM, Christopher Schmidt > wrote: > > On Fri, May 30, 2008 at 01:48:36PM +0100, Jon Blower wrote: > >> I've noticed that in my application OpenLayers is requesting tiles > >> outside the maximum extent of my overlay layer (which is in EPSG:4326 > >> and hence has a maxExtent of -180,-90,180,90). I've checked using the > >> Firebug console that the maxExtent is correctly set. wrapDateLine is > >> set true. > > > > wrapDateLine forces displayOutsideMaxExtent, which is why you are seeing > > the behavior you are seeing. > > Chris, sorry for the stupid question but why does wrapDateLine force > displayOutsideMaxExtent? What would not function if one creates a > layer with wrapeDateLine:true and then does > layer.displayOutsideMaxExtent = false? One will end up with missing > tiles? The 'wrapped' tiles are, in actuality, still going from (for example) -360 to -180 in the 'mind' of OpenLayers. We just fake the *request* bbox, not the place the tile actually thinks of itself as being: without displayOutsideMaxExtent, this obviously wouldn't work. Regards, -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Sun Jun 1 14:34:12 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Tiles outside maxExtent being loaded In-Reply-To: <20080601135325.GA6429@metacarta.com> References: <2bb6ee950805300548s4733b9d1t48f6899acb3aadb0@mail.gmail.com> <20080530142411.GB23107@metacarta.com> <5ec103de0806010510j390e8db8nf9f2f0374bd87939@mail.gmail.com> <20080601135325.GA6429@metacarta.com> Message-ID: <5ec103de0806011134u1482e4at9f0e5823a4999cb0@mail.gmail.com> On Sun, Jun 1, 2008 at 3:53 PM, Christopher Schmidt wrote: > On Sun, Jun 01, 2008 at 02:10:46PM +0200, Eric Lemoine wrote: >> On Fri, May 30, 2008 at 4:24 PM, Christopher Schmidt >> wrote: >> > On Fri, May 30, 2008 at 01:48:36PM +0100, Jon Blower wrote: >> >> I've noticed that in my application OpenLayers is requesting tiles >> >> outside the maximum extent of my overlay layer (which is in EPSG:4326 >> >> and hence has a maxExtent of -180,-90,180,90). I've checked using the >> >> Firebug console that the maxExtent is correctly set. wrapDateLine is >> >> set true. >> > >> > wrapDateLine forces displayOutsideMaxExtent, which is why you are seeing >> > the behavior you are seeing. >> >> Chris, sorry for the stupid question but why does wrapDateLine force >> displayOutsideMaxExtent? What would not function if one creates a >> layer with wrapeDateLine:true and then does >> layer.displayOutsideMaxExtent = false? One will end up with missing >> tiles? > > The 'wrapped' tiles are, in actuality, still going from (for example) > -360 to -180 in the 'mind' of OpenLayers. We just fake the *request* > bbox, not the place the tile actually thinks of itself as being: without > displayOutsideMaxExtent, this obviously wouldn't work. I'm not familiar with the wrapdateline code, thanks for the explanation Chris. Cheers, -- Eric From hcan at hotmail.com Sun Jun 1 17:38:48 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Map and Dojo Progressbar stops rendering Message-ID: <15838930.post@talk.nabble.com> Hi, I add a lot of features into a vector layer. Since it takes a few seconds to add all the features (using vectorLayer.addFeatures(features)), it appears to the user that the browser hangs. May plan was to load the features one by one instead (using vectorLayer.addFeatures(features[i]) inside a loop). So that the users can see that something is going on. Inside the loop I also update a Dojo ProgressBar. However, the ProgressBar never gets updated and the vector features do not render one by one. Instead, it still looks like the browser hangs until all features show up in the map at the same time, and the ProgressBars shows 100%. But... if I add an alert() inside the loop, the ProgressBar works as expected and the features show up one by one every time I dismiss the alert. Does anyone have a solution to this behaviour? Thanks, -Z- -- View this message in context: http://www.nabble.com/Map-and-Dojo-Progressbar-stops-rendering-tp15838930p15838930.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Mon Jun 2 01:35:50 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Map and Dojo Progressbar stops rendering In-Reply-To: <15838930.post@talk.nabble.com> References: <15838930.post@talk.nabble.com> Message-ID: <5ec103de0806012235j26a807ecjf8ededbbc2f7982c@mail.gmail.com> Hi. Are you sure addFeatures is the one to blame? Given that you don't see the progress bar progressing i'd tend to think that adding the features to the layer is fast. Where do you get the features from? Are they de-serialized before being added to the layer (for example using an OpenLayers.Format object)? If so, have you checked that the deserialization is not the source of slowness? Eric 2008/6/1, Zer : > > Hi, > > I add a lot of features into a vector layer. Since it takes a few seconds to > add all the features (using vectorLayer.addFeatures(features)), it appears > to the user that the browser hangs. May plan was to load the features one by > one instead (using vectorLayer.addFeatures(features[i]) inside a loop). So > that the users can see that something is going on. Inside the loop I also > update a Dojo ProgressBar. However, the ProgressBar never gets updated and > the vector features do not render one by one. Instead, it still looks like > the browser hangs until all features show up in the map at the same time, > and the ProgressBars shows 100%. But... if I add an alert() inside the loop, > the ProgressBar works as expected and the features show up one by one every > time I dismiss the alert. Does anyone have a solution to this behaviour? > > Thanks, > > -Z- > -- > View this message in context: > http://www.nabble.com/Map-and-Dojo-Progressbar-stops-rendering-tp15838930p15838930.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 jdb at mail.nerc-essc.ac.uk Mon Jun 2 07:06:40 2008 From: jdb at mail.nerc-essc.ac.uk (Jon Blower) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Tiles outside maxExtent being loaded In-Reply-To: <5ec103de0806011134u1482e4at9f0e5823a4999cb0@mail.gmail.com> References: <2bb6ee950805300548s4733b9d1t48f6899acb3aadb0@mail.gmail.com> <20080530142411.GB23107@metacarta.com> <5ec103de0806010510j390e8db8nf9f2f0374bd87939@mail.gmail.com> <20080601135325.GA6429@metacarta.com> <5ec103de0806011134u1482e4at9f0e5823a4999cb0@mail.gmail.com> Message-ID: <2bb6ee950806020406y244a9ddbv4c944f0b97ca4219@mail.gmail.com> Hi Chris, Thanks for the clarification. FYI, I worked around this issue by creating a subclass of OpenLayers.Layer.WMS and overriding the getURL() method. The new method checks the latitude bounds, setting the URL to that of a fixed blank image if out of bounds. This blank image is cached by the browser, reducing server round-trips significantly. See http://behemoth.nerc-essc.ac.uk/ncWMS/js/WMS1_1_1.js. (You might also notice that I've added a little extra sophistication to allow different values of the key used for SRS. WMS1.1.1 uses "SRS" while WMS1.3.0 uses "CRS". I also have a WMS1_3 class that subclasses WMS1_1_1 and takes advantage of this). Cheers, Jon On Sun, Jun 1, 2008 at 7:34 PM, Eric Lemoine wrote: > On Sun, Jun 1, 2008 at 3:53 PM, Christopher Schmidt > wrote: >> On Sun, Jun 01, 2008 at 02:10:46PM +0200, Eric Lemoine wrote: >>> On Fri, May 30, 2008 at 4:24 PM, Christopher Schmidt >>> wrote: >>> > On Fri, May 30, 2008 at 01:48:36PM +0100, Jon Blower wrote: >>> >> I've noticed that in my application OpenLayers is requesting tiles >>> >> outside the maximum extent of my overlay layer (which is in EPSG:4326 >>> >> and hence has a maxExtent of -180,-90,180,90). I've checked using the >>> >> Firebug console that the maxExtent is correctly set. wrapDateLine is >>> >> set true. >>> > >>> > wrapDateLine forces displayOutsideMaxExtent, which is why you are seeing >>> > the behavior you are seeing. >>> >>> Chris, sorry for the stupid question but why does wrapDateLine force >>> displayOutsideMaxExtent? What would not function if one creates a >>> layer with wrapeDateLine:true and then does >>> layer.displayOutsideMaxExtent = false? One will end up with missing >>> tiles? >> >> The 'wrapped' tiles are, in actuality, still going from (for example) >> -360 to -180 in the 'mind' of OpenLayers. We just fake the *request* >> bbox, not the place the tile actually thinks of itself as being: without >> displayOutsideMaxExtent, this obviously wouldn't work. > > I'm not familiar with the wrapdateline code, thanks for the explanation Chris. > > Cheers, > > -- > Eric > -- -------------------------------------------------------------- Dr Jon Blower Tel: +44 118 378 5213 (direct line) Technical Director Tel: +44 118 378 8741 (ESSC) Reading e-Science Centre Fax: +44 118 378 6413 ESSC Email: jdb@mail.nerc-essc.ac.uk University of Reading 3 Earley Gate Reading RG6 6AL, UK -------------------------------------------------------------- From arnaud.sig at gmail.com Mon Jun 2 08:11:57 2008 From: arnaud.sig at gmail.com (Arnaud Vandecasteele) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Get the object layer on an 'changelayer' events Message-ID: <166b86070806020511ifb17accn34388c8a17851443@mail.gmail.com> Hello, I use the events 'changelayer' on my map to know if one of my layers have been activate or unactivate. I would like to be able to get the layer object when a user activate or unactivate it. Tought the OL AI specify : *changelayer* triggered after a layer name change, order change, or visibility change (due to resolution thresholds). Listeners will receive an event object with *layer* and *property* properties. The *layer* property will be a reference to the changed layer. The *property* property will be a key to the changed property (name, visibility, or order). How i can manage my application to get the layer that have been changed. Thanks for your help. Arnaud -- ------------------------------------------------------------------------------ Van De Casteele Arnaud 72 Rue de la colline des cam?lias 97400 Saint-Denis 0262 30 67 79 - 0692 23 73 17 Site internet : http://cataloguesig.c-webhosting.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080602/9c6f123f/attachment.html From bartvde at osgis.nl Mon Jun 2 08:16:32 2008 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Get the object layer on an 'changelayer' events In-Reply-To: <166b86070806020511ifb17accn34388c8a17851443@mail.gmail.com> References: <166b86070806020511ifb17accn34388c8a17851443@mail.gmail.com> Message-ID: Something like: this.map.events.register("changelayer", this, function(evt) { var layer = evt.layer; }); Best regards, Bart On Mon, 2 Jun 2008 12:11:57 +0000, "Arnaud Vandecasteele" wrote: > Hello, > > I use the events 'changelayer' on my map to know if one of my layers have > been activate or unactivate. > I would like to be able to get the layer object when a user activate or > unactivate it. > > Tought the OL AI specify : > > *changelayer* triggered after a layer name change, order change, or > visibility change (due to resolution thresholds). Listeners will receive > an > event object with *layer* and *property* properties. The *layer* property > will be a reference to the changed layer. The *property* property will be > a > key to the changed property (name, visibility, or order). > > How i can manage my application to get the layer that have been changed. > > Thanks for your help. > > Arnaud > > > From c.seewald at ees-gmbh.de Mon Jun 2 11:41:21 2008 From: c.seewald at ees-gmbh.de (Christian Seewald) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Website relaunch using OpenLayers as mapping frontend Message-ID: <7B8D6BAD849D5548AC7F00C0190709393C47E40324@ees11.ees.loc> Hi, Our company has relaunched the website containing an openlayers map of a major customer. I have added an entry to the gallery on http://gallery.openlayers.org/. Here is the summary I put on the gallery: PegelOnline is a map-enabled information system on data related to waterbodies in Germany. It features a rich set of interactive functionality extending the OpenLayers' core code. Live data collected at measurement stations all over Germany can be easily viewed, stations can be selected and deselected and a quick search box is embedded right into the map. At the backend Tiles are served by TileCache which are rendered with Umn-Mapserverscript. Is it still possible to get on http://www.openlayers.org/gallery/ or is it already obsolete ? Christian Seewald EES GmbH -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080602/980d94cb/attachment.html From ddudognon at anyware-tech.com Mon Jun 2 12:40:36 2008 From: ddudognon at anyware-tech.com (Damien Dudognon) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] OpenLayers.Control.TYPE_TOGGLE with DragFeature In-Reply-To: <53F9CF533E1AA14EA1F8C5C08ABC08D2042086B3@ZDND.DND.boston.cob> References: <53F9CF533E1AA14EA1F8C5C08ABC08D2042086B3@ZDND.DND.boston.cob> Message-ID: <48442284.2000703@anyware-tech.com> Hi, I want to use TYPE_TOGGLE to activate/desactivate draw and drag controls. It works well with DrawFeature, but fails with DragFeature and I don't understand why... Do you know how to solve this problem ? --------------------------------------------------------------- var containerDraw = document.getElementById("panelDraw"); var drawpanel = new OpenLayers.Control.Panel({div: containerDraw}); c_point = new OpenLayers.Control.DrawFeature ( v_edit, OpenLayers.Handler.Point, { type: OpenLayers.Control.TYPE_TOGGLE, 'displayClass': 'olControlDrawFeaturePoint' } ); c_ligne = new OpenLayers.Control.DrawFeature ( v_edit, OpenLayers.Handler.Path, { type: OpenLayers.Control.TYPE_TOGGLE, handlerOptions: {freehand: true}, 'displayClass': 'olControlDrawFeaturePath' } ); c_polygone = new OpenLayers.Control.DrawFeature ( v_edit, OpenLayers.Handler.Polygon, { type: OpenLayers.Control.TYPE_TOGGLE, 'displayClass': 'olControlDrawFeaturePolygon' } ); /* * In this case, TYPE_TOGGLE doesn't work */ c_deplacement = new OpenLayers.Control.DragFeature ( v_edit, OpenLayers.Handler.Drag, { type: OpenLayers.Control.TYPE_TOGGLE, 'displayClass': 'olControlMoveItem' } ); drawpanel.addControls([c_point,c_ligne,c_polygone,c_deplacement]); map.addControl(drawpanel); ----------------------------------------------------------------------- Regards, Damien From eric.c2c at gmail.com Mon Jun 2 13:11:07 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] OpenLayers.Control.TYPE_TOGGLE with DragFeature In-Reply-To: <48442284.2000703@anyware-tech.com> References: <53F9CF533E1AA14EA1F8C5C08ABC08D2042086B3@ZDND.DND.boston.cob> <48442284.2000703@anyware-tech.com> Message-ID: <5ec103de0806021011p610b1d3dh3b6fe29c6300d908@mail.gmail.com> On Mon, Jun 2, 2008 at 6:40 PM, Damien Dudognon wrote: > Hi, > > I want to use TYPE_TOGGLE to activate/desactivate draw and drag > controls. It works well with DrawFeature, but fails with DragFeature and > I don't understand why... Do you know how to solve this problem ? > > --------------------------------------------------------------- > var containerDraw = document.getElementById("panelDraw"); > var drawpanel = new OpenLayers.Control.Panel({div: containerDraw}); > > c_point = new OpenLayers.Control.DrawFeature > ( > v_edit, OpenLayers.Handler.Point, > { > type: OpenLayers.Control.TYPE_TOGGLE, > 'displayClass': 'olControlDrawFeaturePoint' > } > ); > > c_ligne = new OpenLayers.Control.DrawFeature > ( > v_edit, OpenLayers.Handler.Path, > { > type: OpenLayers.Control.TYPE_TOGGLE, > handlerOptions: {freehand: true}, > 'displayClass': 'olControlDrawFeaturePath' > } > ); > > c_polygone = new OpenLayers.Control.DrawFeature > ( > v_edit, OpenLayers.Handler.Polygon, > { > type: OpenLayers.Control.TYPE_TOGGLE, > 'displayClass': 'olControlDrawFeaturePolygon' > } > ); > > /* > * In this case, TYPE_TOGGLE doesn't work > */ > c_deplacement = new OpenLayers.Control.DragFeature > ( > v_edit, OpenLayers.Handler.Drag, > { > type: OpenLayers.Control.TYPE_TOGGLE, > 'displayClass': 'olControlMoveItem' > } > ); > > drawpanel.addControls([c_point,c_ligne,c_polygone,c_deplacement]); > map.addControl(drawpanel); Probably because you don't have CSS for DragFeature, do you? -- Eric From wendell at enflight.com Mon Jun 2 14:26:47 2008 From: wendell at enflight.com (Wendell Turner) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] pixel units to lat/lon units & nexrad Message-ID: <20080602182647.GA26839@q.rho.net> I have tiled maps generated by gdal2tile.py which load into OpenLayers very nicely using units:'pixel'. I would like to change the layout to lat/lon and am having trouble, and request assistance (I've flailed around with various options settings, but really don't know what I'm doing). Q1) The reason for doing this is to (hopefully) be able to overlay nexrad weather by referencing a layer from http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/AccuWeather_Maps.wms Is this timely data? How often is this data refreshed? Is there a better source for nexrad data? Q2) I assume that I need to change from pixel-units to lat/lon-units in order to layer the AccuWeather_Maps on the display, correct? Q3) Is gdal2tile.py still used in OL 2.6 (it seemed to be based on 2.4), or is there a better way to have OpenLayers generate the tiles? Does it pre-generate them, or do it on-the-fly? Q4) Do I need to fully understand all of the extents vs. resoultion vs. maxResolution etc, or is there an easy way to capture the gdalinfo data from a GeoTiff file and import that into the options array needed by OpenLayers? I think OpenLayers is a terrific tool, I'm just not a cartographer (yet). Thanks, Wendell From Steve.Lime at dnr.state.mn.us Tue Jun 3 01:50:13 2008 From: Steve.Lime at dnr.state.mn.us (Steve Lime) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Couple of DrawFeature control question Message-ID: <484495450200008F000184C9@co5.dnr.state.mn.us> Hi all: Is it possible to clear the current set of features in a vector layer before adding a new one? Basically I want the user to be able to define only one rectangle or polygon. I figured I could simply intervene in the mousedown event and clear the vector layer but I can't get that event to fire in 2.6. There seem to be plenty of opportunities to do things after a feature is created but not before. Thanks... Steve From smithlev at levii.com Tue Jun 3 04:49:55 2008 From: smithlev at levii.com (Levii Smith) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Create/Destroy Layers or Show/Hide Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080603/a5f051fa/attachment.html From bartvde at osgis.nl Tue Jun 3 04:58:36 2008 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Create/Destroy Layers or Show/Hide In-Reply-To: References: Message-ID: You need to iterate over the map.layers array. The number of layers: map.layers.length Best regards, Bart On Tue, 3 Jun 2008 04:49:55 -0400, "Levii Smith" wrote: > > > I need to have a custom layerswitcher [radio buttons, etc], and am > having a hard time finding examples on modifying layer visibility or > creating layers on the fly. So I have 2 questions. > > How do I determine the number of current layers? > > Given a layer I just created by clicking a checkbox (or one that > already existed)...how do I grab the layer to modify visibility? > > OpenLayers.Layer.[layername].setVisibility(true); doesn't work since > it says the layer doesn't exist. > > Thanks, > Levii From rnvishwa at gmail.com Tue Jun 3 07:57:50 2008 From: rnvishwa at gmail.com (Vishwa) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Issues with Yahoo layer Message-ID: <197d6ebf0806030457g57ab469fx79e1fcd92b7bff78@mail.gmail.com> Hi, While using the openlayers map with yahoo base layer, if you pan (move around) across the map after a while you get a JavaScript error. This happens only in Internet Explorer (6 and 7). *The error reads*: "Invalid Argument" *Line number*: 579 in OpenLayers.js *After enabling script debugging, the browser pointed at this line:* this.dragging=!!dragging;},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=Math.round(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=Math.round(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel Anyone knows why this is happening and how to get around the problem? Regards, Vishwa -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080603/f53fc129/attachment.html From barney_holmes at yahoo.co.uk Tue Jun 3 09:04:47 2008 From: barney_holmes at yahoo.co.uk (barney holmes) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Browser hang on large KML markers layer. Message-ID: <592579.65571.qm@web26603.mail.ukl.yahoo.com> Hello, I have an issue with my browser hanging when I feed in a large number of KML markers. *warning the following link may freeze your browser* http://djbarney.silentflame.com/hirise/ol_popups.html Both Firefox 2 and 3 have problems (hangs, window whites out). The following link is the same code but without a large KML file. http://djbarney.silentflame.com/hirise/ol_popups_small.html You can see a few markers over South America. I have based my code on the "KML Layer Example". http://openlayers.org/dev/examples/sundials.html The larger KML file that I use is 3.5 mb. http://djbarney.silentflame.com/hirise/doc.kml It is taken from a compressed version that is published by a member of the MRO HiRise team. http://pirlwww.lpl.arizona.edu/~rbeyer/kml/HiRISE_PDS.kml Any help appreciated, and thanks to the devs for Open Layers :) DJ Barney Portal, SpaceDataWiki: SourceForge Project. __________________________________________________________ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080603/5e6d1d2f/attachment.html From crschmidt at metacarta.com Tue Jun 3 13:17:01 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Browser hang on large KML markers layer. In-Reply-To: <592579.65571.qm@web26603.mail.ukl.yahoo.com> References: <592579.65571.qm@web26603.mail.ukl.yahoo.com> Message-ID: <20080603171701.GA22217@metacarta.com> On Tue, Jun 03, 2008 at 01:04:47PM +0000, barney holmes wrote: > The larger KML file that I use is 3.5 mb. Loading 3.5 MB of XML into a browser is simply not going to work. You'll have to find a different solution. Browsers just don't deal well with XML that big. Just getting the XML out is a lion's share of the time (determined by profiling). Regards, -- Christopher Schmidt MetaCarta From hcan at hotmail.com Tue Jun 3 13:38:23 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] OpenLayers.Ajax.Request 2.6 VS 2.5 Message-ID: <17629265.post@talk.nabble.com> Hi All, In OL 2.5 the I had the OpenLayers.Ajax.Request like this working: function sendTestRequest(queryStr) { var uri = "http://10.0.1.2:8080/demo/service/ var success = (onComplete) ?OpenLayers.Function.bind(onComplete, this) : OpenLayers.nullHandler; var failure = (onFailure) ? OpenLayers.Function.bind(onFailure, this) : OpenLayers.nullHandler; var request = new OpenLayers.Ajax.Request(uri, { method: 'get', parameters: queryStr, contentType: 'text/xml', onComplete: success, onFailure: failure } ); } Where queryStr is an ordinary URL querystring (request=GetFeature&version=1.0.0&typeName=topp:States&outputFormat=GML2&FILTER=...) This does not work in OL 2.6. The servlet that receives the request gets "null" as querystring. I tried the same code using OL 2.5 and it still works then. Anyone has a bug fix or work around? Thanks, -Z -- View this message in context: http://www.nabble.com/OpenLayers.Ajax.Request-2.6-VS-2.5-tp17629265p17629265.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Tue Jun 3 13:58:42 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] OpenLayers.Ajax.Request 2.6 VS 2.5 In-Reply-To: <17629265.post@talk.nabble.com> References: <17629265.post@talk.nabble.com> Message-ID: <5ec103de0806031058s5e3a22fdy3bee125481747c5@mail.gmail.com> Hey. Try adding a question mark to the front of the query string. Hope it'll do the trick.. 2008/6/3, Zer : > > Hi All, > > In OL 2.5 the I had the OpenLayers.Ajax.Request like this working: > > function sendTestRequest(queryStr) { > var uri = "http://10.0.1.2:8080/demo/service/ > var success = (onComplete) ?OpenLayers.Function.bind(onComplete, this) > : OpenLayers.nullHandler; > > var failure = (onFailure) ? OpenLayers.Function.bind(onFailure, this) > : OpenLayers.nullHandler; > var request = new OpenLayers.Ajax.Request(uri, > { method: 'get', > parameters: queryStr, > contentType: 'text/xml', > onComplete: success, > onFailure: failure > } > ); > } > > Where queryStr is an ordinary URL querystring > (request=GetFeature&version=1.0.0&typeName=topp:States&outputFormat=GML2&FILTER=...) > > This does not work in OL 2.6. The servlet that receives the request gets > "null" as querystring. I tried the same code using OL 2.5 and it still works > then. Anyone has a bug fix or work around? > > Thanks, > > -Z > -- > View this message in context: > http://www.nabble.com/OpenLayers.Ajax.Request-2.6-VS-2.5-tp17629265p17629265.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 philippep62 at gmail.com Tue Jun 3 15:10:09 2008 From: philippep62 at gmail.com (PhilippeP) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Using Openlayers.layer.text makes the map disappear Message-ID: <17622607.post@talk.nabble.com> Hi, I'm trying to use openlayers and a dynamically created markers textfile. For the testing purpose I use a basic (only point coordonnates) static file : http://www.lessines.net/bizz_result_text_2007.txt , the map is on the following page : http://www.lessines.net/?page=9a . Hit in 'Recherche' in the right column, then the 'We're Open' picture to get to the map ... The map alone works perfectly, but when I try to link the textfile, the map stays blank ... Any ideas ?? Is there a way to force Openlayers to display debugging error messages perhaps ?? Thanks Philippe -- View this message in context: http://www.nabble.com/Using-Openlayers.layer.text-makes-the-map-disappear-tp17622607p17622607.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hcan at hotmail.com Tue Jun 3 16:51:44 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] OpenLayers.Ajax.Request 2.6 VS 2.5 In-Reply-To: <5ec103de0806031058s5e3a22fdy3bee125481747c5@mail.gmail.com> References: <17629265.post@talk.nabble.com> <5ec103de0806031058s5e3a22fdy3bee125481747c5@mail.gmail.com> Message-ID: <17633375.post@talk.nabble.com> Ahh...! Of course! Sometimes it just seems like one is working with blindfolds... P-( Thanks Eric! Eric Lemoine-3 wrote: > > Hey. Try adding a question mark to the front of the query string. Hope > it'll do the trick.. > > > -- View this message in context: http://www.nabble.com/OpenLayers.Ajax.Request-2.6-VS-2.5-tp17629265p17633375.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From linda.rawson at gmail.com Tue Jun 3 17:02:34 2008 From: linda.rawson at gmail.com (Linda Rawson) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Help with 2.6 strokeWidth and strokeweight on linestring on IE Message-ID: <6e9b30fb0806031402t474fee22wf0648647fbd374e9@mail.gmail.com> I am just getting back to trying to get my application to run in 2.6. I cannot see linestring vector objects at the lowest scales. I am beating my head against the wall. I get some of them to show up, those with only 4 points by setting the StrokeWidth to 1 on the style. The rest....don't work. I step through the code. At these lines in VML.JS if (options.isStroked) { node.setAttribute("strokecolor", style.strokeColor); node.setAttribute("strokeweight", style.strokeWidth + "px"); } else { node.setAttribute("stroked", "false"); } node.getAttribute("strokeweight") before is 0.75. On the first zoom levels it changes to "1px". Anytime I zoom further it will not change the value of strokeweight no matter how hard I try to change the value using hardcoded attributes or whatever. What has changed in this area between version 2.5 and 2.6. Where is .75 coming from? Where can I override that? -- Linda Rawson From eric.c2c at gmail.com Wed Jun 4 00:28:16 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Using Openlayers.layer.text makes the map disappear In-Reply-To: <17622607.post@talk.nabble.com> References: <17622607.post@talk.nabble.com> Message-ID: <5ec103de0806032128o48dfaf34gd8b3d33122aa423a@mail.gmail.com> On Tue, Jun 3, 2008 at 9:10 PM, PhilippeP wrote: > > Hi, > > I'm trying to use openlayers and a dynamically created markers textfile. > > For the testing purpose I use a basic (only point coordonnates) static file > : http://www.lessines.net/bizz_result_text_2007.txt , the map is on the > following page : http://www.lessines.net/?page=9a . > > Hit in 'Recherche' in the right column, then the 'We're Open' picture to get > to the map ... > > The map alone works perfectly, but when I try to link the textfile, the map > stays blank ... > > Any ideas ?? > Is there a way to force Openlayers to display debugging error messages > perhaps ?? > > Thanks > Philippe Hi Philippe, What's the projection system of your coords in the text file? Is it also EPSG:41001? -- Eric From rnvishwa at gmail.com Wed Jun 4 02:21:25 2008 From: rnvishwa at gmail.com (Vishwa) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Javascript error with yahoo base layer Message-ID: <197d6ebf0806032321r573815e9gfdebdd891446fd8@mail.gmail.com> Hi, While using the openlayers map with yahoo base layer, if you pan (move around) across the map after a while you get a JavaScript error. This happens only in Internet Explorer (6 and 7). This also occurs with the yahoo base layer example on the openlayers website: http://www.openlayers.org/dev/examples/yahoo.html *The error reads*: "Invalid Argument" *Line number*: 579 in OpenLayers.js *After enabling script debugging, the browser pointed at this line:* this.dragging=!!dragging;},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=Math.round(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=Math.round(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel Anyone knows why this is happening and how to get around the problem? Regards, Vishwa -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080604/530d2640/attachment.html From philippep62 at gmail.com Wed Jun 4 02:42:14 2008 From: philippep62 at gmail.com (PhilippeP) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Using Openlayers.layer.text makes the map disappear In-Reply-To: <5ec103de0806032128o48dfaf34gd8b3d33122aa423a@mail.gmail.com> References: <17622607.post@talk.nabble.com> <5ec103de0806032128o48dfaf34gd8b3d33122aa423a@mail.gmail.com> Message-ID: <17640226.post@talk.nabble.com> Hmmmm good question, I'm not good with projections (too many of them) , they are plain coordonates (latitude,longitude in degrees) Hi Philippe, What's the projection system of your coords in the text file? Is it also EPSG:41001? -- Eric _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- View this message in context: http://www.nabble.com/Using-Openlayers.layer.text-makes-the-map-disappear-tp17622607p17640226.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andreas.hocevar at gmail.com Wed Jun 4 05:46:20 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] width+height 100% in standards-compliant mode Message-ID: <5b021dd0806040246q42ebd517u98bc5e81422256f1@mail.gmail.com> Hi, I need some advice on how to style an OpenLayers map that should have a 1-pixel border and fill 100% of the view port. This is no problem in quirks mode, but in standards compliant mode it won't work in IE. This is the CSS I have now: html, body { width: 100%; height: 100%; overflow: hidden; margin: 0px; } #map { border: 1px solid black; position: absolute; bottom: 0px; top: 0px; left: 0px; right: 0px; } In IE (6+7), I see the borders, but no map. If I add "height:100%" to #map, I see the map (with all borders in IE6+7, without bottom border in FF), but when opening a popup in IE 7, the map disappears. It works fine in quirks mode, but I need standards compliant mode for this application. Any help would be highly appreciated. Thanks Andreas. From aparna0123 at gmail.com Wed Jun 4 07:28:14 2008 From: aparna0123 at gmail.com (Aparna Sriram) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Help with layers. Message-ID: <2bbc4860806040428t208568bbkdf03fc6c19903a88@mail.gmail.com> Hi, I'm a new user here and I'm looking for some help. I see that in the examples, the map layers used are WMS [ from labs.metacarta.com]/Google/Yahoo. I am wondering if the map tiles from maps.metacarta.com could be served from our local server instead of being served from the metacarta website. Also can anyone please suggest any other alternative map layer? Appreciate you help. Thanks Aparna -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080604/c12267f2/attachment.html From barney_holmes at yahoo.co.uk Wed Jun 4 07:45:31 2008 From: barney_holmes at yahoo.co.uk (barney holmes) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Browser hang on large KML markers layer. Message-ID: <346367.95019.qm@web26606.mail.ukl.yahoo.com> >On Tue, Jun 03, 2008 at 01:04:47PM +0000, barney holmes >wrote: >> The larger KML file that I use is 3.5 mb. > Loading 3.5 MB of XML into a browser is simply not going to > work. You'll > have to find a different solution. > Browsers just don't deal well with XML that big. Just getting the > XML > out is a lion's share of the time (determined by profiling). Thanks, but I don't really understand your statement. Google Earth can load huge KML layers, although I think it might be using some kind of scaling. See... http://maps.google.co.uk/?ie=UTF8&ll=13.923404,-7.03125&spn=170.980165,360&t=h&z=1&lci=lmc:panoramio,lmc:wikipedia_en If OL cannot load large KML layers is there anything already in the code I can use ? Or maybe future development will include a scaling function for large layers ? Anyone else have any ideas ? > Regards, > -- > Christopher Schmidt > MetaCarta Barney Holmes Portal, SpaceDataWiki: SourceForge Project. __________________________________________________________ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080604/57558854/attachment.html From crschmidt at metacarta.com Wed Jun 4 07:52:38 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:20 2010 Subject: [OpenLayers-Users] Browser hang on large KML markers layer. In-Reply-To: <346367.95019.qm@web26606.mail.ukl.yahoo.com> References: <346367.95019.qm@web26606.mail.ukl.yahoo.com> Message-ID: <20080604115238.GD7209@metacarta.com> On Wed, Jun 04, 2008 at 11:45:31AM +0000, barney holmes wrote: > >On Tue, Jun 03, 2008 at 01:04:47PM +0000, barney holmes >wrote: > >> The larger KML file that I use is 3.5 mb. > > > Loading 3.5 MB of XML into a browser is simply not going to > > work. You'll > > have to find a different solution. > > > Browsers just don't deal well with XML that big. Just getting the > > XML > > out is a lion's share of the time (determined by profiling). > > Thanks, but I don't really understand your statement. Google Earth can > load huge KML layers, although I think it might be using some kind of > scaling. See... > > http://maps.google.co.uk/?ie=UTF8&ll=13.923404,-7.03125&spn=170.980165,360&t=h&z=1&lci=lmc:panoramio,lmc:wikipedia_en 1. That's Google Maps, not Google Earth. 2. That's not a KML layer. 3. Google loads all KML to a server, and delivers only compacted JSON to the client, not XML, so XML parsing size is not involved. If you want to involve a server, you can do many things that you can't without a server. > If OL cannot load large KML layers is there anything already in the code I can use ? Or maybe future development will include a scaling function for large layers ? Large XML files *can not be parsed by the browser*: OpenLayers can not cahnge this. The answer to this is to change it so that you are not loading large KML files. Simplify your geometries, load based on visible bounding box/area, etc. etc. There are many optimizations to the way you load data from the server -- loading 4 MB of XML is simply not going to work in a browser. Regards, -- Christopher Schmidt MetaCarta From robe.dnd at cityofboston.gov Wed Jun 4 07:58:30 2008 From: robe.dnd at cityofboston.gov (Obe, Regina) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Browser hang on large KML markers layer. In-Reply-To: <346367.95019.qm@web26606.mail.ukl.yahoo.com> References: <346367.95019.qm@web26606.mail.ukl.yahoo.com> Message-ID: <53F9CF533E1AA14EA1F8C5C08ABC08D2042FA60F@ZDND.DND.boston.cob> Barney, I think the loading that Google is doing of the KML is being done on the server side and its merely dishing out tiled images and javascript to the browser. This is very different from loading KML in OpenLayers where its done on the client side. On the server side - you have complete control of the technologies you use and lets face it client-side javascript is not the fastest thing. For this type of thing you would be best to mix a bit of WMS with WFS. For heavy image stuff do WMS calls which OpenLayers does very well and then use WFS calls for clicks, mouseovers etc. Hope that helps, Regina >Thanks, but I don't really understand your statement. Google Earth can load huge KML layers, >although I think it might be using some kind of scaling. See... > http://maps.google.co.uk/?ie=UTF8&ll=13.923404,-7.03125&spn=170.980165,3 60&t=h&z=1&lci=lmc:panoramio,lmc:wikipedia_en > If OL cannot load large KML layers is there anything already in the code I can use ? Or > maybe future development will include a scaling function for large layers ? > Anyone else have any ideas ? > Barney Holmes ----------------------------------------- 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 ngerber999 at gmail.com Wed Jun 4 08:00:43 2008 From: ngerber999 at gmail.com (Nathan Gerber) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] width+height 100% in standards-compliant mode In-Reply-To: <5b021dd0806040246q42ebd517u98bc5e81422256f1@mail.gmail.com> References: <5b021dd0806040246q42ebd517u98bc5e81422256f1@mail.gmail.com> Message-ID: The quickest way I found to do this and to keep the website standards compliant is to implement JavaScript to do my resizing for me. The following code is what I use (please note that I only tested in the major web browsers): On Wed, Jun 4, 2008 at 5:46 AM, Andreas Hocevar wrote: > Hi, > > I need some advice on how to style an OpenLayers map that should have > a 1-pixel border and fill 100% of the view port. This is no problem in > quirks mode, but in standards compliant mode it won't work in IE. This > is the CSS I have now: > > html, body { > width: 100%; > height: 100%; > overflow: hidden; > margin: 0px; > } > #map { > border: 1px solid black; > position: absolute; > bottom: 0px; > top: 0px; > left: 0px; > right: 0px; > } > > In IE (6+7), I see the borders, but no map. If I add "height:100%" to > #map, I see the map (with all borders in IE6+7, without bottom border > in FF), but when opening a popup in IE 7, the map disappears. It works > fine in quirks mode, but I need standards compliant mode for this > application. > > Any help would be highly appreciated. > > Thanks > Andreas. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- -- Nathan Gerber -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080604/fce5da5b/attachment.html From philippep62 at gmail.com Wed Jun 4 08:17:54 2008 From: philippep62 at gmail.com (PhilippeP) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Using Openlayers.layer.text makes the map disappear In-Reply-To: <5ec103de0806032128o48dfaf34gd8b3d33122aa423a@mail.gmail.com> References: <17622607.post@talk.nabble.com> <5ec103de0806032128o48dfaf34gd8b3d33122aa423a@mail.gmail.com> Message-ID: <17645334.post@talk.nabble.com> Hi again, I tried removing all unnecessary properties (projection included) and it doen'st change a thing...(so I did put them back) Hi Philippe, What's the projection system of your coords in the text file? Is it also EPSG:41001? -- Eric _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- View this message in context: http://www.nabble.com/Using-Openlayers.layer.text-makes-the-map-disappear-tp17622607p17645334.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kwegezeder at web.de Wed Jun 4 09:49:17 2008 From: kwegezeder at web.de (2StepForward) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] WFS-T update problem with namespaces Message-ID: <17647200.post@talk.nabble.com> Hello List, if have read many posts about WFS-T transaction and update/delete features, but can't solve my problem. If i try the transaction_update demo request in GeoServer demo with some manipulations to my featuretype, everything works fine. Like this: this is the import of my own namespace from GS xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs"> xmlns:gml="http://www.opengis.net/gml" the_geom 662043.2646366811,5798981.532771344 But if I take a commit of my WFS layer and that feature type, than i can sniff these xml transaction code: the_geom 662043.2646366811,5798981.532771344 and i get, I think this might be right, a error window which said "WFS is not bind to a namespace". If I think right, it meens the WFS namespace prefix of my featuretype which should bind to the: xmlns:WFS="http://www.own-namespace.de/wfs" namespace definition. But there isn't any definition of my own in GS defined namespace. Where I can set a option in the WFS Layer, who bind this prefix to the namespace in the request? Or is any logic, where I understand this model of xml request wrong? I have tried to set the featureNS to my own namespace, but this option I think has no effect, isn't it? The solved problem with the layerName in WFS-Format-JS, which is set to the featuretype. Has anyone a idea, I'm shortly befor to hit my head on the wall.... Thanks Klaus -- View this message in context: http://www.nabble.com/WFS-T-update-problem-with-namespaces-tp17647200p17647200.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From barney_holmes at yahoo.co.uk Wed Jun 4 09:59:51 2008 From: barney_holmes at yahoo.co.uk (barney holmes) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Browser hang on large KML markers layer. In-Reply-To: <20080604115238.GD7209@metacarta.com> Message-ID: <39994.95396.qm@web26608.mail.ukl.yahoo.com> Christopher Schmidt ... > If you want to involve a server, you can do many things that you > can't without a server. Regina ... > For this type of thing you would be best to mix a bit of WMS > with WFS. Thanks. I'll look into that :) DJ Barney Portal, SpaceDataWiki: SourceForge Project. __________________________________________________________ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080604/1b9e46bb/attachment.html From pagameba at gmail.com Wed Jun 4 12:30:10 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Help with layers. In-Reply-To: <2bbc4860806040428t208568bbkdf03fc6c19903a88@mail.gmail.com> References: <2bbc4860806040428t208568bbkdf03fc6c19903a88@mail.gmail.com> Message-ID: <356B89EF-ACE6-4D78-B793-CF72567587EF@gmail.com> Yes. You need to: * find a source of data (in the case of the metacarta served tiles, it is vmap0 which is freely available), * pick a way to render that data into maps (mapserver, mapnik, mapguide, geoserver, ...) * set up the renderer to apply your cartography * set up a way to turn rendered maps into tiles (tilecache) for performance or pick a package in the previous step that does WMS Cheers Paul On 4-Jun-08, at 7:28 AM, Aparna Sriram wrote: > Hi, > I'm a new user here and I'm looking for some help. I see that in the > examples, the map layers used are WMS [ from labs.metacarta.com ]/ > Google/Yahoo. > I am wondering if the map tiles from maps.metacarta.com could be > served from our local server instead of being served from the > metacarta website. > Also can anyone please suggest any other alternative map layer? > > Appreciate you help. > > Thanks > Aparna > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From scott at pawprint.net Wed Jun 4 12:55:40 2008 From: scott at pawprint.net (Scott Baker) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] pixel units to lat/lon units & nexrad In-Reply-To: <20080602182647.GA26839@q.rho.net> References: <20080602182647.GA26839@q.rho.net> Message-ID: <4846C90C.8050200@pawprint.net> I was trying to do something similar to this when I first started - I asked here in the list about it too - but received no response. So I spent 3 months figuring it out myself... Correct me if I'm wrong, but I couldn't find any way to use gdal2tiles for anything other then a single map - always in pixel coordinates and not suitable for any sort of overlays. It's a great method for creating a standalone OL viewer of a raster map but that's about it. As soon as you want to get into mixing layers, overlaying stuff - etc... you will need a mapserver to do it. I ended up with mapserver running and then implementing tilecache (mapserver is incredibly slow directly) then an OL display. The combination of the three is the only way I found to get nice looking maps and have floexibility enough to include raster, vector, and public data in OL. You might get by if all your data is coming from other WMS servers by just using tilecache. Again - I'm pretty new at this myself - but this, through months of trial and error, is the only solution I could find. Wendell Turner wrote: > I have tiled maps generated by gdal2tile.py which load into > OpenLayers very nicely using units:'pixel'. I would like to > change the layout to lat/lon and am having trouble, and > request assistance (I've flailed around with various options > settings, but really don't know what I'm doing). > > Q1) The reason for doing this is to (hopefully) be able to > overlay nexrad weather by referencing a layer from > http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/AccuWeather_Maps.wms > Is this timely data? How often is this data refreshed? Is > there a better source for nexrad data? > > Q2) I assume that I need to change from pixel-units to > lat/lon-units in order to layer the AccuWeather_Maps on the > display, correct? > > Q3) Is gdal2tile.py still used in OL 2.6 (it seemed to be > based on 2.4), or is there a better way to have OpenLayers > generate the tiles? Does it pre-generate them, or do it > on-the-fly? > > Q4) Do I need to fully understand all of the extents vs. > resoultion vs. maxResolution etc, or is there an easy way to > capture the gdalinfo data from a GeoTiff file and import > that into the options array needed by OpenLayers? > > I think OpenLayers is a terrific tool, I'm just not a > cartographer (yet). > > Thanks, > > Wendell > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- skype pawprint_net telephone 604.885.7449 toll-free 1.888.493.2360 Scott W. Baker B.A.Sc *President*, PawPrint.net From richard at winwaed.com Wed Jun 4 13:07:03 2008 From: richard at winwaed.com (Richard Marsden) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Legend for KML Layers? Message-ID: <4846CBB7.8070405@winwaed.com> Well, the maps at EcoMapCostaRica.com are now up and running! Alas we couldn't get the differential correction data so we only had 6m accuracy. Still, the maps are probably the most complete that have ever been produced for the area. Most of the map content comes from three KML layers. It would be good if I could add a key (or legend). Is there a way to add a key/legend using OpenLayers? Or would it just be quicker to create one in a graphics editor? (the other layers are MapServer WMS and Javascript-drawn - these don't need a key) I looked in the docs and samples, so it looks like there isn't a way to do it? Richard Marsden Winwaed Software Technology LLC http://www.winwaed.com http://www.mapping-tools.com From linda.rawson at gmail.com Wed Jun 4 13:24:17 2008 From: linda.rawson at gmail.com (Linda Rawson) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) Message-ID: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> I have a problem with upgrading to 2.6. I need some of the other features and I cannot get this to work. I have tried to find out where in the code it has changed but I cannot find it. ONLY in IE does this not work. Extract this example. You will see a green line and an aqua marker on the screen. Push the button that says Zoom 5. You still have a green line and an aqua marker on the screen. Push the button that says Zoom 6. No lines. Not for Zoom 7 or Zoom 8 either. I have attached the example but in case it gets stripped. Here is the example: Linda Rawson Test Case

Linda's Example. Push Zoom 5. You see lines. Push Zoom 6. No lines.

My Maps
Delete Selected
-- Linda Rawson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080604/3efd8ec9/testvector-features.html From crschmidt at metacarta.com Wed Jun 4 14:07:03 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] pixel units to lat/lon units & nexrad In-Reply-To: <4846C90C.8050200@pawprint.net> References: <20080602182647.GA26839@q.rho.net> <4846C90C.8050200@pawprint.net> Message-ID: <20080604180702.GA12876@metacarta.com> On Wed, Jun 04, 2008 at 09:55:40AM -0700, Scott Baker wrote: > I was trying to do something similar to this when I first started - I > asked here in the list about it too - but received no response. So I > spent 3 months figuring it out myself... Correct me if I'm wrong, but I > couldn't find any way to use gdal2tiles for anything other then a single > map - always in pixel coordinates and not suitable for any sort of > overlays. I think I responded to that claim from another user here: http://www.nabble.com/GDAL2Tiles-td16458672.html http://openlayers.org/pipermail/users/2008-April/005362.html > It's a great method for creating a standalone OL viewer of a raster map > but that's about it. I would tend to disagree. > As soon as you want to get into mixing layers, overlaying stuff - etc... > you will need a mapserver to do it. This is definitely not true -- even if you can't use gdal2tiles, you could always write another tool that did something similar. > I ended up with mapserver running and then implementing tilecache > (mapserver is incredibly slow directly) I doubt this is true. It is more likely that your data is poorly prepared for serving dynamically. (Properly preparing data for dynamic serving is hard. For vector data, it requires intelligent cartographic decisions. For Raster data, it requires effort to be put into ensuring that your data is properly overlay-ed, tiled, not-compressed, etc.) > then an OL display. The > combination of the three is the only way I found to get nice looking > maps and have floexibility enough to include raster, vector, and public > data in OL. Sure, but that's not related to the question at hand. gdal2tiles can't draw vector data into tiles, so you'll need to set up a server for that part of it. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Jun 4 14:08:37 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Legend for KML Layers? In-Reply-To: <4846CBB7.8070405@winwaed.com> References: <4846CBB7.8070405@winwaed.com> Message-ID: <20080604180837.GB12876@metacarta.com> On Wed, Jun 04, 2008 at 12:07:03PM -0500, Richard Marsden wrote: > Most of the map content comes from three KML layers. It would be good if > I could add a key (or legend). > Is there a way to add a key/legend using OpenLayers? Or would it just > be quicker to create one in a graphics editor? I don't know specifically what you are using OpenLayers to do that it could build the legend itself, but I expect the answer is probably "The latter." (Maybe you're using Styles/Rules to style your features?) Regards, -- Christopher Schmidt MetaCarta From aaime at openplans.org Wed Jun 4 14:09:24 2008 From: aaime at openplans.org (Andrea Aime) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] WFS-T update problem with namespaces In-Reply-To: <17647200.post@talk.nabble.com> References: <17647200.post@talk.nabble.com> Message-ID: <4846DA54.9060207@openplans.org> 2StepForward ha scritto: > Hello List, > > if have read many posts about WFS-T transaction and update/delete features, > but can't solve my problem. > If i try the transaction_update demo request in GeoServer demo with some > manipulations to my featuretype, everything works fine. > > Like this: > > xmlns:WFS="http://www.own-namespace.de/wfs" -> this is the import of > my own namespace from GS > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:wfs="http://www.opengis.net/wfs"> > xmlns:gml="http://www.opengis.net/gml" > > > the_geom > > > 662043.2646366811,5798981.532771344 > > > > > > > > > > But if I take a commit of my WFS layer and that feature type, than i can > sniff these xml transaction code: > > xmlns:wfs="http://www.opengis.net/wfs"> > > > the_geom > > > 662043.2646366811,5798981.532771344 > > > > > > > > > > and i get, I think this might be right, a error window which said "WFS is > not bind to a namespace". > If I think right, it meens the WFS namespace prefix of my featuretype which > should bind to the: > > xmlns:WFS="http://www.own-namespace.de/wfs" > > namespace definition. But there isn't any definition of my own in GS defined > namespace. Yeah, the error comes up from Xerces-J during the xml validation, it should be something like the following (I used another layer): Invalid request UndeclaredPrefix: Cannot resolve 'topp:tasmania_roads' as a QName: the prefix 'topp' is not declared. cvc-attribute.3: The value 'topp:tasmania_roads' of attribute 'typeName' on element 'wfs:Update' is not valid with respect to its type. The problem is that typeName is an xs:QName, and its namespace must be declared in order for the XML to be schema compliant. I believe you'll need to open a ticket with OL. In the meantime, the way to make the request work anyways, is to disable XML validation in GeoServer: disable "strict cite compliance" in wfs configuraton or post your requests to http://host:port/geoserver/wfs?strict=false Of course when you do that the validation goes bye bye and the parser is left at your mercy, if you submit invalid xml it will just ignore the xml parts it does not understand, making debugging of hand made requests harder. Cheers Andrea From tschaub at opengeo.org Wed Jun 4 14:13:04 2008 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] WFS-T update problem with namespaces In-Reply-To: <17647200.post@talk.nabble.com> References: <17647200.post@talk.nabble.com> Message-ID: <4846DB30.6030207@opengeo.org> Hey- 2StepForward wrote: > Hello List, > > if have read many posts about WFS-T transaction and update/delete features, > but can't solve my problem. > If i try the transaction_update demo request in GeoServer demo with some > manipulations to my featuretype, everything works fine. > > Like this: > > xmlns:WFS="http://www.own-namespace.de/wfs" -> this is the import of > my own namespace from GS > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:wfs="http://www.opengis.net/wfs"> > xmlns:gml="http://www.opengis.net/gml" > > > the_geom > > > 662043.2646366811,5798981.532771344 > > > > > > > > > > But if I take a commit of my WFS layer and that feature type, than i can > sniff these xml transaction code: > > xmlns:wfs="http://www.opengis.net/wfs"> > > > the_geom > > > 662043.2646366811,5798981.532771344 > > > > > > > > > > and i get, I think this might be right, a error window which said "WFS is > not bind to a namespace". > If I think right, it meens the WFS namespace prefix of my featuretype which > should bind to the: > > xmlns:WFS="http://www.own-namespace.de/wfs" > > namespace definition. But there isn't any definition of my own in GS defined > namespace. > Yes, you are hitting a known bug with the WFS stuff in OpenLayers. This particular problem will be solved with the new WFS protocol (which will write out the xmlns attribute for the feature type namespace alias). > Where I can set a option in the WFS Layer, who bind this prefix to the > namespace in the request? > Or is any logic, where I understand this model of xml request wrong? > I have tried to set the featureNS to my own namespace, but this option I > think has no effect, isn't it? > The solved problem with the layerName in WFS-Format-JS, which is set to the > featuretype. > > Has anyone a idea, I'm shortly befor to hit my head on the wall.... So, with apologies for the frustration, you'll have to wait a while before the WFS/GML facelift makes it in to the trunk. Tim > > Thanks Klaus From crschmidt at metacarta.com Wed Jun 4 14:18:24 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] WFS-T update problem with namespaces In-Reply-To: <4846DA54.9060207@openplans.org> References: <17647200.post@talk.nabble.com> <4846DA54.9060207@openplans.org> Message-ID: <20080604181823.GA12906@metacarta.com> On Wed, Jun 04, 2008 at 08:09:24PM +0200, Andrea Aime wrote: > Yeah, the error comes up from Xerces-J during the xml validation, it > should be something like the following (I used another layer): > > Invalid request > UndeclaredPrefix: Cannot resolve 'topp:tasmania_roads' as a QName: the > prefix 'topp' is not declared. > cvc-attribute.3: The value 'topp:tasmania_roads' of attribute 'typeName' > on element 'wfs:Update' is not valid with respect to its type. > > The problem is that typeName is an xs:QName, and its namespace must > be declared in order for the XML to be schema compliant. You've got to be kidding me. I don't even know if there's a way to *do* this in any of the OpenLayers code: I don't think the browser DOM neccesarily has a way to add namespaces which aren't actually used in the XML... Tim would probably know more. (I know I can't do it from my Python XML parser/creator, but that's obviously a slightly different case.) > I believe you'll need to open a ticket with OL. In the meantime, the way > to make the request work anyways, is to disable XML validation in > GeoServer: disable "strict cite compliance" in wfs configuraton or > post your requests to http://host:port/geoserver/wfs?strict=false Regards, -- Christopher Schmidt MetaCarta From aaime at openplans.org Wed Jun 4 14:35:21 2008 From: aaime at openplans.org (Andrea Aime) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] WFS-T update problem with namespaces In-Reply-To: <20080604181823.GA12906@metacarta.com> References: <17647200.post@talk.nabble.com> <4846DA54.9060207@openplans.org> <20080604181823.GA12906@metacarta.com> Message-ID: <4846E069.4070607@openplans.org> Christopher Schmidt ha scritto: > On Wed, Jun 04, 2008 at 08:09:24PM +0200, Andrea Aime wrote: >> Yeah, the error comes up from Xerces-J during the xml validation, it >> should be something like the following (I used another layer): >> >> Invalid request >> UndeclaredPrefix: Cannot resolve 'topp:tasmania_roads' as a QName: the >> prefix 'topp' is not declared. >> cvc-attribute.3: The value 'topp:tasmania_roads' of attribute 'typeName' >> on element 'wfs:Update' is not valid with respect to its type. >> >> The problem is that typeName is an xs:QName, and its namespace must >> be declared in order for the XML to be schema compliant. > > You've got to be kidding me. I'm not... I did not make up that error message, the xml parser is throwing it the moment you enable the schema validation. > I don't even know if there's a way to *do* > this in any of the OpenLayers code: I don't think the browser DOM > neccesarily has a way to add namespaces which aren't actually used in > the XML... Tim would probably know more. (I know I can't do it from my > Python XML parser/creator, but that's obviously a slightly different > case.) The issue is with the xs:QName usage as an attribute. See this book: http://books.xmlschemata.org/relaxng/ch19-77287.html "he lexical space of xsd:QName is a qualified name according to Namespaces in XML. It is a local name (which is an xsd:NCName) with an optional prefix (itself an xsd:NCName), separated by a colon. The prefix is declared a namespace prefix in the scope of the element carrying the value. Its value space comprises the pairs (namespace URI, local name) in which the namespace URI is the URI associated to the prefix in the namespace declaration." and: "W3C XML Schema itself has already provided some examples of QNames. When I wrote "", the type attribute was a xsd:QName, and its value was the tuple {"http://www.w3.org/2001/XMLSchema", "language"}, because the URI "http://www.w3.org/2001/XMLSchema" had been assigned to the prefix "xsd:". If there is no namespace declaration for this prefix, the type attribute is considered invalid." See also: http://www.w3.org/TR/2000/CR-xmlschema-2-20001024/#QName Cheers Andrea From crschmidt at metacarta.com Wed Jun 4 14:43:22 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] WFS-T update problem with namespaces In-Reply-To: <4846E069.4070607@openplans.org> References: <17647200.post@talk.nabble.com> <4846DA54.9060207@openplans.org> <20080604181823.GA12906@metacarta.com> <4846E069.4070607@openplans.org> Message-ID: <20080604184322.GA13750@metacarta.com> On Wed, Jun 04, 2008 at 08:35:21PM +0200, Andrea Aime wrote: > Christopher Schmidt ha scritto: > >You've got to be kidding me. > > I'm not... I did not make up that error message, the xml parser is > throwing it the moment you enable the schema validation. Sorry, that was a bit rude of me. It was my frustration at XML being big, difficult and confusing. Why we ever decided that we should use it for so many things... :) Regards, -- Christopher Schmidt MetaCarta From richard at winwaed.com Wed Jun 4 14:51:04 2008 From: richard at winwaed.com (Richard Marsden) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Legend for KML Layers? In-Reply-To: <20080604180837.GB12876@metacarta.com> References: <4846CBB7.8070405@winwaed.com> <20080604180837.GB12876@metacarta.com> Message-ID: <4846E418.5060104@winwaed.com> Christopher Schmidt wrote: > I don't know specifically what you are using OpenLayers to do that it > could build the legend itself, but I expect the answer is probably "The > latter." > > (Maybe you're using Styles/Rules to style your features?) > > I am using KML styles but these are defined locally in the individual KML files. I'm not using rules. I'll get on with making some bitmaps! Regards, Richard From Matthew.Atkins at loyola.com Wed Jun 4 16:07:38 2008 From: Matthew.Atkins at loyola.com (Matthew Atkins) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] OpenLayers.Util.getRenderedDimensions bug/fix Message-ID: <121089CD850A6C428D442011256BC5CC0205BD65@scorpio2.loyola.com> I believe that there is a small glitch in the OpenLayers.Util.getRenderedDimensions function. Within the "if" statement on line 1376 it assigns container's width (line 1378) and height (line 1380) but it neglects to append the unit ("px"). This was causing us some issues with popups in FireFox but adding the units worked. Wally Atkins From scott at pawprint.net Wed Jun 4 17:35:44 2008 From: scott at pawprint.net (Scott Baker) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] pixel units to lat/lon units & nexrad In-Reply-To: <20080604180702.GA12876@metacarta.com> References: <20080602182647.GA26839@q.rho.net> <4846C90C.8050200@pawprint.net> <20080604180702.GA12876@metacarta.com> Message-ID: <48470AB0.1070506@pawprint.net> Guess I got that one totally wrong (I'm very new to all this) I had looked at those posts - but they still show just a single TMS layer - not TMS and WMS combined. The bit I was looking for was an example of using a TMS on top of a WMS layer - for example - say a small custom raster map (not of the whole world) split into TMS tiles that should sit at a certain spot on a world basemap. I'd still love to see an example of that if you know of any. As for the popper prep of data for serving and mapserver speed - yes the data probably could be much better - I'd just doing my best trying to learn way more about GIS and these systems then I ever intended to do :) It's all converted to shapefiles and only 2 TIFs - large shapefiles are split into tiles, everything has tile indexes, limits for various layers by scale, and all the unused data has been stripped out - but I'm really just fumbling to make it work - that said there are 27 layers (about 8GB) of data I need to combine into a nice map - I was happy I got it to work at all :) PS: Please don't get me wrong - I hope that last email didn't come across as being angry or negative about OL or this group (email sometimes comes across that way even when not intended) - I was just trying to help someone with seemingly the same problem. There is an immense amount of knowledge built up inside many of the people here - I am truly in awe of how much people know about all this stuff - I think there are a lot of us just trying to catch up enough to get something to work - please bear with our/my ignorance. For example suggesting writing another tool to do something like what gdal2tiles does - I wouldn't ever even think of embarking upon a task like that until I finally manage, for example, to wrap my head around how a bounding box can be specified using metres instead of Lat/Long for units (still stumps me - and yes I have read the posts about it) "@^# it jim, I'm a programmer not a cartographer!" ;) Christopher Schmidt wrote: > On Wed, Jun 04, 2008 at 09:55:40AM -0700, Scott Baker wrote: > >> I was trying to do something similar to this when I first started - I >> asked here in the list about it too - but received no response. So I >> spent 3 months figuring it out myself... Correct me if I'm wrong, but I >> couldn't find any way to use gdal2tiles for anything other then a single >> map - always in pixel coordinates and not suitable for any sort of >> overlays. >> > > I think I responded to that claim from another user here: > > http://www.nabble.com/GDAL2Tiles-td16458672.html > > http://openlayers.org/pipermail/users/2008-April/005362.html > > >> It's a great method for creating a standalone OL viewer of a raster map >> but that's about it. >> > > I would tend to disagree. > > >> As soon as you want to get into mixing layers, overlaying stuff - etc... >> you will need a mapserver to do it. >> > > This is definitely not true -- even if you can't use gdal2tiles, you > could always write another tool that did something similar. > > >> I ended up with mapserver running and then implementing tilecache >> (mapserver is incredibly slow directly) >> > > I doubt this is true. It is more likely that your data is poorly > prepared for serving dynamically. (Properly preparing data for dynamic > serving is hard. For vector data, it requires intelligent cartographic > decisions. For Raster data, it requires effort to be put into ensuring > that your data is properly overlay-ed, tiled, not-compressed, etc.) > > >> then an OL display. The >> combination of the three is the only way I found to get nice looking >> maps and have floexibility enough to include raster, vector, and public >> data in OL. >> > > Sure, but that's not related to the question at hand. gdal2tiles can't > draw vector data into tiles, so you'll need to set up a server for that > part of it. > > Regards, > -- skype pawprint_net telephone 604.885.7449 toll-free 1.888.493.2360 Scott W. Baker B.A.Sc *President*, PawPrint.net From bwoodall at bwoodall.org Wed Jun 4 18:31:22 2008 From: bwoodall at bwoodall.org (bwoodall) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] pixel units to lat/lon units & nexrad In-Reply-To: <48470AB0.1070506@pawprint.net> References: <20080602182647.GA26839@q.rho.net> <4846C90C.8050200@pawprint.net> <20080604180702.GA12876@metacarta.com> <48470AB0.1070506@pawprint.net> Message-ID: <1212618682.6491.25.camel@wardrobe.dhs.org> For those that are new to OL/TC and might not have heard about OSGeo "Service Providers" page at http://www.osgeo.org/search_profile which contains many talented people/companies. On Wed, 2008-06-04 at 14:35 -0700, Scott Baker wrote: > Guess I got that one totally wrong (I'm very new to all this) > > I had looked at those posts - but they still show just a single TMS > layer - not TMS and WMS combined. The bit I was looking for was an > example of using a TMS on top of a WMS layer - for example - say a small > custom raster map (not of the whole world) split into TMS tiles that > should sit at a certain spot on a world basemap. I'd still love to see > an example of that if you know of any. > > As for the popper prep of data for serving and mapserver speed - yes the > data probably could be much better - I'd just doing my best trying to > learn way more about GIS and these systems then I ever intended to do > :) It's all converted to shapefiles and only 2 TIFs - large shapefiles > are split into tiles, everything has tile indexes, limits for various > layers by scale, and all the unused data has been stripped out - but I'm > really just fumbling to make it work - that said there are 27 layers > (about 8GB) of data I need to combine into a nice map - I was happy I > got it to work at all :) > > PS: Please don't get me wrong - I hope that last email didn't come > across as being angry or negative about OL or this group (email > sometimes comes across that way even when not intended) - I was just > trying to help someone with seemingly the same problem. > > There is an immense amount of knowledge built up inside many of the > people here - I am truly in awe of how much people know about all this > stuff - I think there are a lot of us just trying to catch up enough to > get something to work - please bear with our/my ignorance. For example > suggesting writing another tool to do something like what gdal2tiles > does - I wouldn't ever even think of embarking upon a task like that > until I finally manage, for example, to wrap my head around how a > bounding box can be specified using metres instead of Lat/Long for units > (still stumps me - and yes I have read the posts about it) > "@^# it jim, > I'm a programmer not a cartographer!" ;) > ^^^ love that part! :) ..... Bill, From eric.c2c at gmail.com Thu Jun 5 00:57:07 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Using Openlayers.layer.text makes the map disappear In-Reply-To: <17640226.post@talk.nabble.com> References: <17622607.post@talk.nabble.com> <5ec103de0806032128o48dfaf34gd8b3d33122aa423a@mail.gmail.com> <17640226.post@talk.nabble.com> Message-ID: <5ec103de0806042157q18634a42pf7ce83bb6e434927@mail.gmail.com> On Wed, Jun 4, 2008 at 8:42 AM, PhilippeP wrote: > > Hmmmm good question, I'm not good with projections (too many of them) , they > are plain coordonates (latitude,longitude in degrees) Looking at your code your map projection is EPSG:41001, so you won't be able to display WGS84 (lon/lat) points on your map. You need to use proj4.js (hopefully it has support for 41001) and reproject your points before adding them to the map. Search the mailing list for help with using proj4.js with OpenLayers. -- Eric From rnvishwa at gmail.com Thu Jun 5 03:23:20 2008 From: rnvishwa at gmail.com (Vishwa) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Javascript error with Yahoo layer on IE Message-ID: <197d6ebf0806050023w22cae1a3xbcae720e42f98e4f@mail.gmail.com> Hi, While using the openlayers map with yahoo base layer, if you pan (move around) across the map after a while you get a JavaScript error. This happens only in Internet Explorer (6 and 7). This also occurs with the yahoo base layer example on the openlayers website: http://www.openlayers.org/dev/examples/yahoo.html *The error reads*: "Invalid Argument" *Line number*: 579 in OpenLayers.js *After enabling script debugging, the browser pointed at this line:* this.dragging=!!dragging;},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=Math.round(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=Math.round(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel Anyone knows why this is happening and how to get around the problem? Regards, Vishwa -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080605/13e0adef/attachment.html From grand.edgemaster at gmail.com Thu Jun 5 04:43:56 2008 From: grand.edgemaster at gmail.com (Thomas Wood) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Using Openlayers.layer.text makes the map disappear In-Reply-To: <5ec103de0806042157q18634a42pf7ce83bb6e434927@mail.gmail.com> References: <17622607.post@talk.nabble.com> <5ec103de0806032128o48dfaf34gd8b3d33122aa423a@mail.gmail.com> <17640226.post@talk.nabble.com> <5ec103de0806042157q18634a42pf7ce83bb6e434927@mail.gmail.com> Message-ID: <1e14d5320806050143w71da5d87l794850f39c7ad9e7@mail.gmail.com> EPSG:41001 is a user defined projection, at one time referred to the Google spherical mercator projection, but has now been renamed EPSG:900913. I see you're using OSM tiles, which are projected in 900913. Changing the projection option on the map to: new OpenLayers.Projection("EPSG:900913") You can then add a projection: new OpenLayers.Projection("EPSG:4326") to the options of the Text layer, and it should reproject it for you. (No need for proj4js) On 6/5/08, Eric Lemoine wrote: > On Wed, Jun 4, 2008 at 8:42 AM, PhilippeP wrote: >> >> Hmmmm good question, I'm not good with projections (too many of them) , >> they >> are plain coordonates (latitude,longitude in degrees) > > Looking at your code your map projection is EPSG:41001, so you won't > be able to display WGS84 (lon/lat) points on your map. You need to use > proj4.js (hopefully it has support for 41001) and reproject your > points before adding them to the map. Search the mailing list for help > with using proj4.js with OpenLayers. > > -- > Eric > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Regards, Thomas Wood (Edgemaster) From smithlev at levii.com Thu Jun 5 04:58:41 2008 From: smithlev at levii.com (Levii Smith) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Loading bar Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080605/e524a2ab/attachment.html From ddudognon at anyware-tech.com Thu Jun 5 05:13:50 2008 From: ddudognon at anyware-tech.com (Damien Dudognon) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] OpenLayers.Control.TYPE_TOGGLE with DragFeature In-Reply-To: <5ec103de0806021011p610b1d3dh3b6fe29c6300d908@mail.gmail.com> References: <53F9CF533E1AA14EA1F8C5C08ABC08D2042086B3@ZDND.DND.boston.cob> <48442284.2000703@anyware-tech.com> <5ec103de0806021011p610b1d3dh3b6fe29c6300d908@mail.gmail.com> Message-ID: <4847AE4E.80505@anyware-tech.com> My CSS was correct. To solve my problem, I have replaced : ------------------------------------------------- c_deplacement = new OpenLayers.Control.DragFeature ( v_edit, OpenLayers.Handler.Drag, { type: OpenLayers.Control.TYPE_TOGGLE, 'displayClass': 'olControlMoveItem' } ); ------------------------------------------------- with ------------------------------------------------- c_deplacement = new OpenLayers.Control.DragFeature ( v_edit, { type: OpenLayers.Control.TYPE_TOGGLE, 'displayClass': 'olControlMoveItem' } ); ------------------------------------------------- Eric Lemoine a ?crit : > On Mon, Jun 2, 2008 at 6:40 PM, Damien Dudognon > wrote: > >> Hi, >> >> I want to use TYPE_TOGGLE to activate/desactivate draw and drag >> controls. It works well with DrawFeature, but fails with DragFeature and >> I don't understand why... Do you know how to solve this problem ? >> >> --------------------------------------------------------------- >> var containerDraw = document.getElementById("panelDraw"); >> var drawpanel = new OpenLayers.Control.Panel({div: containerDraw}); >> >> c_point = new OpenLayers.Control.DrawFeature >> ( >> v_edit, OpenLayers.Handler.Point, >> { >> type: OpenLayers.Control.TYPE_TOGGLE, >> 'displayClass': 'olControlDrawFeaturePoint' >> } >> ); >> >> c_ligne = new OpenLayers.Control.DrawFeature >> ( >> v_edit, OpenLayers.Handler.Path, >> { >> type: OpenLayers.Control.TYPE_TOGGLE, >> handlerOptions: {freehand: true}, >> 'displayClass': 'olControlDrawFeaturePath' >> } >> ); >> >> c_polygone = new OpenLayers.Control.DrawFeature >> ( >> v_edit, OpenLayers.Handler.Polygon, >> { >> type: OpenLayers.Control.TYPE_TOGGLE, >> 'displayClass': 'olControlDrawFeaturePolygon' >> } >> ); >> >> /* >> * In this case, TYPE_TOGGLE doesn't work >> */ >> c_deplacement = new OpenLayers.Control.DragFeature >> ( >> v_edit, OpenLayers.Handler.Drag, >> { >> type: OpenLayers.Control.TYPE_TOGGLE, >> 'displayClass': 'olControlMoveItem' >> } >> ); >> >> drawpanel.addControls([c_point,c_ligne,c_polygone,c_deplacement]); >> map.addControl(drawpanel); >> > > Probably because you don't have CSS for DragFeature, do you? > > -- > Eric > From bartvde at osgis.nl Thu Jun 5 05:18:19 2008 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Loading bar In-Reply-To: References: Message-ID: Hi, see: http://trac.openlayers.org/wiki/Addins/LoadingPanel And the sandbox with code and example (since the code is not yet in the addins part of svn): http://openlayers.org/pipermail/dev/2008-April/002722.html Best regards, Bart On Thu, 5 Jun 2008 04:58:41 -0400, "Levii Smith" wrote: > > > I see the example on how to capture start and stop events, but I was > wondering if this (http://trac.openlayers.org/ticket/102 [1]) as an > API "loading indicator" ever made it into source. > > If anyone has seen an example link with a 'loading' bar, I can figure > out how it works....I'm using the YUI framework for layout and would > like to tie it to that functionality. > > Thanks, > Levii > > > > Links: > ------ > [1] http://trac.openlayers.org/ticket/102 > From kwegezeder at web.de Thu Jun 5 05:34:01 2008 From: kwegezeder at web.de (2StepForward) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] WFS-T update problem with namespaces In-Reply-To: <4846DB30.6030207@opengeo.org> References: <17647200.post@talk.nabble.com> <4846DB30.6030207@opengeo.org> Message-ID: <17665915.post@talk.nabble.com> Hi List, and thanks for answers on my questions. I agree with you, that it's realy hard to deal with XML.... I have yesterday tried to write a work around for that namespace problem like this: Defines in my OL-code: var wfs4 = new OpenLayers.Layer.WFS( "Info", "http://server/geoserver/wfs?", { typename:'WFS:info', geometry_column:'the_geom'}, { maxResolution:'auto', typename:'WFS:info', featureNS:'http://www.own-namespace.de/wfs' -> my own ns of GeoServer for xml-schema featurePrefix:'WFS', -> additionaly definition of the prefix }); Changes in WFS-Layer.js by commit function: if(!this.writer) { ........................................... } options.layerName = this.typename; -> new options.featureNS = this.featureNS; -> new options.featurePrefix = this.featurePrefix; -> new Changes in WFS-Format.js by update function: if(!feature.fid) {......} updateNode.setAttribute("xmlns:"+this.featurePrefix, this.featureNS); -> new updateNode.setAttribute("typename", this.layerName); I now, it doesn't lock nice, but it works....... It will be good, if anyone write if it's a good way to change it like I have above wrote it. Thanks Klaus Tim Schaub-3 wrote: > > Hey- > > 2StepForward wrote: >> Hello List, >> >> if have read many posts about WFS-T transaction and update/delete >> features, >> but can't solve my problem. >> If i try the transaction_update demo request in GeoServer demo with some >> manipulations to my featuretype, everything works fine. >> >> Like this: >> >> > xmlns:WFS="http://www.own-namespace.de/wfs" -> this is the import >> of >> my own namespace from GS >> xmlns:ogc="http://www.opengis.net/ogc" >> xmlns:wfs="http://www.opengis.net/wfs"> >> xmlns:gml="http://www.opengis.net/gml" >> >> >> the_geom >> >> >> 662043.2646366811,5798981.532771344 >> >> >> >> >> >> >> >> >> >> But if I take a commit of my WFS layer and that feature type, than i can >> sniff these xml transaction code: >> >> > xmlns:wfs="http://www.opengis.net/wfs"> >> >> >> the_geom >> >> > srsName="EPSG:23032"> >> 662043.2646366811,5798981.532771344 >> >> >> >> >> >> >> >> >> >> and i get, I think this might be right, a error window which said "WFS is >> not bind to a namespace". >> If I think right, it meens the WFS namespace prefix of my featuretype >> which >> should bind to the: >> >> xmlns:WFS="http://www.own-namespace.de/wfs" >> >> namespace definition. But there isn't any definition of my own in GS >> defined >> namespace. >> > > Yes, you are hitting a known bug with the WFS stuff in OpenLayers. This > particular problem will be solved with the new WFS protocol (which will > write out the xmlns attribute for the feature type namespace alias). > >> Where I can set a option in the WFS Layer, who bind this prefix to the >> namespace in the request? >> Or is any logic, where I understand this model of xml request wrong? >> I have tried to set the featureNS to my own namespace, but this option I >> think has no effect, isn't it? >> The solved problem with the layerName in WFS-Format-JS, which is set to >> the >> featuretype. >> >> Has anyone a idea, I'm shortly befor to hit my head on the wall.... > > So, with apologies for the frustration, you'll have to wait a while > before the WFS/GML facelift makes it in to the trunk. > > Tim > >> >> Thanks Klaus > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://www.nabble.com/WFS-T-update-problem-with-namespaces-tp17647200p17665915.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Thu Jun 5 07:18:01 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] Javascript error with Yahoo layer on IE In-Reply-To: <197d6ebf0806050023w22cae1a3xbcae720e42f98e4f@mail.gmail.com> References: <197d6ebf0806050023w22cae1a3xbcae720e42f98e4f@mail.gmail.com> Message-ID: <20080605111801.GB3504@metacarta.com> On Thu, Jun 05, 2008 at 12:53:20PM +0530, Vishwa wrote: > Hi, > > While using the openlayers map with yahoo base layer, if you pan (move > around) across the map after a while you get a JavaScript error. This > happens only in Internet Explorer (6 and 7). This also occurs with the yahoo > base layer example on the openlayers website: > http://www.openlayers.org/dev/examples/yahoo.html You have now sent the same email three times. If no one answered the first two times, there is a relatively limited likelihood that anyone is going to answer this time. You'll need to attempt to work out why this is a problem on your own. Please don't send this email again. -- Chris > *The error reads*: "Invalid Argument" > *Line number*: 579 in OpenLayers.js > > *After enabling script debugging, the browser pointed at this line:* > this.dragging=!!dragging;},centerLayerContainer:function(lonlat){var > originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var > newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=Math.round(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=Math.round(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel > > Anyone knows why this is happening and how to get around the problem? > > Regards, > Vishwa > _______________________________________________ > Dev mailing list > Dev@openlayers.org > http://openlayers.org/mailman/listinfo/dev -- Christopher Schmidt MetaCarta From rnvishwa at gmail.com Thu Jun 5 07:34:37 2008 From: rnvishwa at gmail.com (Vishwa) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] Javascript error with Yahoo layer on IE In-Reply-To: <20080605111801.GB3504@metacarta.com> References: <197d6ebf0806050023w22cae1a3xbcae720e42f98e4f@mail.gmail.com> <20080605111801.GB3504@metacarta.com> Message-ID: <197d6ebf0806050434k5f1b675ai66bc3d1ef8d0e003@mail.gmail.com> Sorry, although i have set settings to receive my own posts, I never received the my posts and hence I assumed that it might not have been delivered. - Vishwa On Thu, Jun 5, 2008 at 4:48 PM, Christopher Schmidt wrote: > On Thu, Jun 05, 2008 at 12:53:20PM +0530, Vishwa wrote: > > Hi, > > > > While using the openlayers map with yahoo base layer, if you pan (move > > around) across the map after a while you get a JavaScript error. This > > happens only in Internet Explorer (6 and 7). This also occurs with the > yahoo > > base layer example on the openlayers website: > > http://www.openlayers.org/dev/examples/yahoo.html > > You have now sent the same email three times. If no one answered the > first two times, there is a relatively limited likelihood that anyone is > going to answer this time. You'll need to attempt to work out why this > is a problem on your own. > > Please don't send this email again. > > -- Chris > > > > *The error reads*: "Invalid Argument" > > *Line number*: 579 in OpenLayers.js > > > > *After enabling script debugging, the browser pointed at this line:* > > this.dragging=!!dragging;},centerLayerContainer:function(lonlat){var > > originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var > > > newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=Math.round(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=Math.round(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel > > > > Anyone knows why this is happening and how to get around the problem? > > > > Regards, > > Vishwa > > > _______________________________________________ > > Dev mailing list > > Dev@openlayers.org > > http://openlayers.org/mailman/listinfo/dev > > > -- > Christopher Schmidt > MetaCarta > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080605/6ce32d85/attachment.html From lazygun at gmx.de Thu Jun 5 08:05:41 2008 From: lazygun at gmx.de (LazyGun) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] need help displaying a vector Message-ID: <17668316.post@talk.nabble.com> Hi everyone, i'm new to openlayers. on my webpage i want to display a number of markers which represent gps positions which are stored in a database. These markers then should be connected by a line. (in order) To achieve this i dynamically create a script which uses the gps coordinates i need. So far i have successfully created the markers but haven't been able to create a line between them. To draw a line between the markers, i want to use a OpenLayers.Feature.Vector object. here is an example of a generated script for two points/markers that i use so far: As i said, it shows the markers but not the vecctor. Any advice would be welcome. ps: sorry for bad english. -- View this message in context: http://www.nabble.com/need-help-displaying-a-vector-tp17668316p17668316.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From lazygun at gmx.de Thu Jun 5 09:24:10 2008 From: lazygun at gmx.de (LazyGun) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] need help displaying a vector In-Reply-To: <17668316.post@talk.nabble.com> References: <17668316.post@talk.nabble.com> Message-ID: <17669708.post@talk.nabble.com> Got it to work now. I had to use a LineString instead of a Curve and added tranformation for the Geography.Point(s). LazyGun wrote: > > Hi everyone, > > i'm new to openlayers. on my webpage i want to display a number of markers > which represent gps positions which are stored in a database. These > markers then should be connected by a line. (in order) > > To achieve this i dynamically create a script which uses the gps > coordinates i need. So far i have successfully created the markers but > haven't been able to create a line between them. > > To draw a line between the markers, i want to use a > OpenLayers.Feature.Vector object. > > here is an example of a generated script for two points/markers that i use > so far: > > > > > As i said, it shows the markers but not the vecctor. > > Any advice would be welcome. > > ps: sorry for bad english. > -- View this message in context: http://www.nabble.com/need-help-displaying-a-vector-tp17668316p17669708.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jmpalk at gmail.com Thu Jun 5 10:13:16 2008 From: jmpalk at gmail.com (Justin Palk) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] wms query frustration Message-ID: Hi all -- I'm just starting out with openlayers, and I'm a little frustrated. I've been trying for a few days now to set up a simple map that will let me query some hypothetical election results, but I keep running into two snags: 1) When I first go to my test.html page, I'll get: "An error occurred: can't find resolution index for 0.002231. Available resolutions are: [0.0011154260000000001, 0.00055771300000000005, 0.00027885650000000002, 0.00013942825000000001 (etc.)" I can't figure out why I'm starting at a resolution of 0.002231 when I set a maxResolution of 0.001115426. 2) If I zoom in one step (to resolution 0.001115426) I get the following error: "An error occurred: Current x value -77.535047 is too far from tile corner x -77.677821" The "Current x value" never seems to change regardless of where I click on the map. I can only assume this is some sort of projection error, but I've been beating my head against the wall checking and double-checking my srs's and resolutions, but I can't seem to find a solution. Any suggestions would be greatly appreciated. I'm working with a map in EPSG:4326 ogrinfo -so returns: INFO: Open of `election_4326.shp' using driver `ESRI Shapefile' successful. Layer name: election_4326 Geometry: Polygon Feature Count: 61 Extent: (-77.677821, 39.219771) - (-77.106723, 39.719845) Layer SRS WKT: GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]] ED_NUM: Integer (10.0) ED_NAME: String (16.0) PRECINCT: String (6.0) LEGIS_DIST: String (3.0) POLL_NAME: String (50.0) POLL_TYPE: String (40.0) POLL_ADDRE: String (40.0) CITY: String (25.0) ZIP_CODE: String (15.0) SHAPE_area: Real (19.11) SHAPE_len: Real (19.11) Here's the relevant bit from my tilecache.cfg: [election_results] type=MapnikLayer mapfile=/tmp/ed.xml extent_type=loose bbox=-77.677821,39.219771,-77.106723,39.719845 maxResolution = 0.001115426 The map line from ed.xml: and my script: -- "News is what people want to keep hidden, and everything else is publicity" --Bill Moyers From crschmidt at metacarta.com Thu Jun 5 10:24:57 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] wms query frustration In-Reply-To: References: Message-ID: <20080605142457.GA7381@metacarta.com> On Thu, Jun 05, 2008 at 10:13:16AM -0400, Justin Palk wrote: > Hi all -- I'm just starting out with openlayers, and I'm a little frustrated. It looks like you're trying to query TileCache. TileCache isn't a WMS. You can't query it. > Here's the relevant bit from my tilecache.cfg: > [election_results] > type=MapnikLayer > mapfile=/tmp/ed.xml > extent_type=loose > bbox=-77.677821,39.219771,-77.106723,39.719845 > maxResolution = 0.001115426 It looks like you're using Mapnik. Mapnik provides a wms server with its code, but I don't think it supports queries. (You should ask the mapnik list that question.) If it doens't, you'll need to set up a different server with your data in it for querying. MapServer and GeoServer are both good. Regards, -- Christopher Schmidt MetaCarta From tschaub at opengeo.org Thu Jun 5 11:56:50 2008 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] OpenLayers.Util.getRenderedDimensions bug/fix In-Reply-To: <121089CD850A6C428D442011256BC5CC0205BD65@scorpio2.loyola.com> References: <121089CD850A6C428D442011256BC5CC0205BD65@scorpio2.loyola.com> Message-ID: <48480CC2.6060704@opengeo.org> Hey- Matthew Atkins wrote: > I believe that there is a small glitch in the > OpenLayers.Util.getRenderedDimensions function. Within the "if" > statement on line 1376 it assigns container's width (line 1378) and > height (line 1380) but it neglects to append the unit ("px"). Yes, you are correct. Thanks for pointing this out. We use Trac for tracking issues like this. Please feel free to add tickets with good descriptions like this when you find a problem. It is generally easier than tracking issues by email. http://trac.openlayers.org/wiki/FilingTickets I've created a ticket and attached a patch that corrects this. http://trac.openlayers.org/ticket/1570 Tim > > This was causing us some issues with popups in FireFox but adding the > units worked. > > Wally Atkins > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > !DSPAM:4033,4846f880261901439371379! > From drrobison at openroadsconsulting.com Thu Jun 5 12:18:12 2008 From: drrobison at openroadsconsulting.com (David R Robison) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Problem clicking on a map (OL-2.5) In-Reply-To: <4846CBB7.8070405@winwaed.com> References: <4846CBB7.8070405@winwaed.com> Message-ID: <484811C4.7040405@openroadsconsulting.com> We are having a pecular problem when clicking on a map. The map is on a large web page. If the page is scrolled partway down (not positioned at the top of the map), clicking on the map will return an XY position that is above the actual click. If we scroll the page back to the top, then the clicking works. We are using OL-2.5. Has anyone else experienced this? Was it fixed in 2.6? Thanks, David Robison -- David R Robison Open Roads Consulting, Inc. 708 S. Battlefield Blvd., Chesapeake, VA 23322 phone: (757) 546-3401 e-mail: drrobison@openroadsconsulting.com web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/book_detail.php?id=2579 From tschaub at opengeo.org Thu Jun 5 13:11:33 2008 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] WFS-T update problem with namespaces In-Reply-To: <17665915.post@talk.nabble.com> References: <17647200.post@talk.nabble.com> <4846DB30.6030207@opengeo.org> <17665915.post@talk.nabble.com> Message-ID: <48481E45.7070704@opengeo.org> Hey- 2StepForward wrote: > Hi List, > > and thanks for answers on my questions. I agree with you, that it's realy > hard to deal with XML.... > I have yesterday tried to write a work around for that namespace problem > like this: > > Defines in my OL-code: > > var wfs4 = new OpenLayers.Layer.WFS( > "Info", "http://server/geoserver/wfs?", { > typename:'WFS:info', geometry_column:'the_geom'}, > { > maxResolution:'auto', > typename:'WFS:info', > featureNS:'http://www.own-namespace.de/wfs' -> my own ns > of GeoServer for xml-schema > featurePrefix:'WFS', > -> additionaly definition of the prefix > }); > > > Changes in WFS-Layer.js by commit function: > > if(!this.writer) { > ........................................... > } > options.layerName = this.typename; -> new > options.featureNS = this.featureNS; -> new > options.featurePrefix = this.featurePrefix; -> new > > > Changes in WFS-Format.js by update function: > > if(!feature.fid) {......} > updateNode.setAttribute("xmlns:"+this.featurePrefix, this.featureNS); -> new > updateNode.setAttribute("typename", this.layerName); > > I now, it doesn't lock nice, but it works....... > It will be good, if anyone write if it's a good way to change it like I have > above wrote it. Yes, the new WFS protocol will effectively do the same thing. Tim > > Thanks Klaus > > > Tim Schaub-3 wrote: >> Hey- >> >> 2StepForward wrote: >>> Hello List, >>> >>> if have read many posts about WFS-T transaction and update/delete >>> features, >>> but can't solve my problem. >>> If i try the transaction_update demo request in GeoServer demo with some >>> manipulations to my featuretype, everything works fine. >>> >>> Like this: >>> >>> >> xmlns:WFS="http://www.own-namespace.de/wfs" -> this is the import >>> of >>> my own namespace from GS >>> xmlns:ogc="http://www.opengis.net/ogc" >>> xmlns:wfs="http://www.opengis.net/wfs"> >>> xmlns:gml="http://www.opengis.net/gml" >>> >>> >>> the_geom >>> >>> >>> 662043.2646366811,5798981.532771344 >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> But if I take a commit of my WFS layer and that feature type, than i can >>> sniff these xml transaction code: >>> >>> >> xmlns:wfs="http://www.opengis.net/wfs"> >>> >>> >>> the_geom >>> >>> >> srsName="EPSG:23032"> >>> 662043.2646366811,5798981.532771344 >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> and i get, I think this might be right, a error window which said "WFS is >>> not bind to a namespace". >>> If I think right, it meens the WFS namespace prefix of my featuretype >>> which >>> should bind to the: >>> >>> xmlns:WFS="http://www.own-namespace.de/wfs" >>> >>> namespace definition. But there isn't any definition of my own in GS >>> defined >>> namespace. >>> >> Yes, you are hitting a known bug with the WFS stuff in OpenLayers. This >> particular problem will be solved with the new WFS protocol (which will >> write out the xmlns attribute for the feature type namespace alias). >> >>> Where I can set a option in the WFS Layer, who bind this prefix to the >>> namespace in the request? >>> Or is any logic, where I understand this model of xml request wrong? >>> I have tried to set the featureNS to my own namespace, but this option I >>> think has no effect, isn't it? >>> The solved problem with the layerName in WFS-Format-JS, which is set to >>> the >>> featuretype. >>> >>> Has anyone a idea, I'm shortly befor to hit my head on the wall.... >> So, with apologies for the frustration, you'll have to wait a while >> before the WFS/GML facelift makes it in to the trunk. >> >> Tim >> >>> Thanks Klaus >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > From aschwartz at solidworks.com Thu Jun 5 13:38:15 2008 From: aschwartz at solidworks.com (aschwartz) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] panTo() outside of the extents Message-ID: <17675692.post@talk.nabble.com> Hello all, In the map.panTo Example, it says "If the new random center is in the current extent, the map will pan smoothly. " Is there a way to change it so that panTo will pan smoothly no matter what? Also is the extent referring to the bounds of your current view of the map, or is it referring to the actual extent set in code with Openlayers.bounds? It seems like it is the view area extents, based on my testing. Check out the page, I'd like to fix the panTo behavior - http://gtproductions.net/solidworks/TileCache-2.0/ (I'm not actually using TileCache, just ignore that part. It's just the folder name from before.) You can click on the "Pan test1" and "Pan test2" buttons underneath the map. Any ideas? -- View this message in context: http://www.nabble.com/panTo%28%29-outside-of-the-extents-tp17675692p17675692.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hkmhrns at gmail.com Thu Jun 5 13:39:58 2008 From: hkmhrns at gmail.com (hkmhrns) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Displaying Multiple Markers from Database In-Reply-To: <15515022.post@talk.nabble.com> References: <15515022.post@talk.nabble.com> Message-ID: <17675731.post@talk.nabble.com> Heir guys. I tried to post a new thread, but I didn't know how to, so in advance- sorry. I have something very similar to this project going on right now and I need some help. We are using MS Access atm, but we're in the process of moving all our db side to MySQL.. With Access we were using MapInfo for the mapping side of our systems and we're able to change the lat/long of any given point in both Access and MapInfo, and it reflects these changes in both. Our MapInfo programs road maps are pretty outdated, and our Access program is growing too big for it to function properly- hints the change to MySQL & ??Mapping program that's not 10 jillion dollars, but has tools that are similar to what MapInfo has?? (tools: zoom, selector, radius generator, has layers, able to pull info from the map program and read in the MySQL. side, etc. Nothing too crazy- just some basic stuff, a lot of which I've already seen in some OpenLayers examples. In some of our tables we may have a couple thousand points, but we wouldn't want to see them all at once necessarily. All's I need to find is a mapping program that will work well with MySQL. tables to where one will reflect the other, and if something needs to be changed (data point with lat/long you can do it in either the mapping side, or the db side. Cost is of course an issue as well- not too pricey, or free like OpenLayers, but just needs to be slapped together. I'd appreciate any comments on what to use, or where to go from here. Also, if this isn't quite clear please let me know. -- View this message in context: http://www.nabble.com/Displaying-Multiple-Markers-from-Database-tp15515022p17675731.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From oscar.fonts.lists at gmail.com Thu Jun 5 14:18:00 2008 From: oscar.fonts.lists at gmail.com (Oscar Fonts) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Loading bar In-Reply-To: References: Message-ID: Hi, I was wondering if, instead of an animated gif, we could make a more realistic progress bar (dis)counting the remaining tiles as loaded. I remember seeing a "remaining tiles" message on http://www.openlayers.org/dev/examples/layerLoadMonitoring.html, but that example seems to be broken now. Anyway, does it make any sense? Has anyone tried? Tkanks, Oscar. 2008/6/5 : > Hi, > > see: > > http://trac.openlayers.org/wiki/Addins/LoadingPanel > > And the sandbox with code and example (since the code is not yet in the > addins part of svn): > > http://openlayers.org/pipermail/dev/2008-April/002722.html > > Best regards, > Bart > > On Thu, 5 Jun 2008 04:58:41 -0400, "Levii Smith" > wrote: > > > > > > I see the example on how to capture start and stop events, but I was > > wondering if this (http://trac.openlayers.org/ticket/102 [1]) as an > > API "loading indicator" ever made it into source. > > > > If anyone has seen an example link with a 'loading' bar, I can figure > > out how it works....I'm using the YUI framework for layout and would > > like to tie it to that functionality. > > > > Thanks, > > Levii > > > > > > > > Links: > > ------ > > [1] http://trac.openlayers.org/ticket/102 > > > > _______________________________________________ > 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/20080605/0e714d6d/attachment.html From michael.langford at rowdylabs.com Thu Jun 5 18:43:23 2008 From: michael.langford at rowdylabs.com (Michael Langford) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Aspect Ratio/Projection Problem Message-ID: <11fb08580806051543h599ac2ecw59b07bfdfb4f8707@mail.gmail.com> After switching to openlayers.org from google maps, we're almost ready to launch my customer's new site. One problem though: His overlay image is "squished" on OpenLayers, where it looks great using the image overlay of Google Maps API. It involves way too many hours of hand lettered text on it to contemplate redoing in the new aspect ratio, so I need to find a technical solution to make OpenLayers.org display it properly. I've been fiddling with projections, and have not seen a way out of this forest, as nothing appears to change the display of the image. When I look, I keep finding pointers on the web to the extremely brief comment about projections on the FAQ, which doesn't help me at all. It seems like I'd like to display in EPSG:900313 as that is what Google uses (that may not be the exact name, I deleted it after it seemed clear it wasn't working). I'm not exactly sure the role the proj4js plays in this, but it seems like it probably does. I've attached the picture of what the overlay looks like when applied to google's map, and what the overlay looks like when applied to open layers. In addition, it is available at http://rowdylabs.com/ng/RightAndWrong.GIF in case the mailing list doesn't like attachments. Hopefully someone can provide something like the following: You properly include proj4js at the top of your html file like so, and you create your map with arguments like so. --Michael Langford -- Michael Langford Phone: 404-386-0495 Web: http://www.RowdyLabs.com From eric.c2c at gmail.com Fri Jun 6 01:58:20 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] panTo() outside of the extents In-Reply-To: <17675692.post@talk.nabble.com> References: <17675692.post@talk.nabble.com> Message-ID: <5ec103de0806052258g2345dbc7h5eb72c1981809abd@mail.gmail.com> On Thu, Jun 5, 2008 at 7:38 PM, aschwartz wrote: > > Hello all, Hello > > In the map.panTo Example, it says "If the new random center is in the > current extent, the map will pan smoothly. " > > Is there a way to change it so that panTo will pan smoothly no matter what? No. You'd need to look at the panTo code and implement your own panTo method. > Also is the extent referring to the bounds of your current view of the map, > or is it referring to the actual extent set in code with Openlayers.bounds? The former. -- Eric From eric.c2c at gmail.com Fri Jun 6 02:29:21 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Problem clicking on a map (OL-2.5) In-Reply-To: <484811C4.7040405@openroadsconsulting.com> References: <4846CBB7.8070405@winwaed.com> <484811C4.7040405@openroadsconsulting.com> Message-ID: <5ec103de0806052329y132922b6hbe904455a6316fdd@mail.gmail.com> On Thu, Jun 5, 2008 at 6:18 PM, David R Robison wrote: > We are having a pecular problem when clicking on a map. The map is on a > large web page. If the page is scrolled partway down (not positioned at > the top of the map), clicking on the map will return an XY position that > is above the actual click. If we scroll the page back to the top, then > the clicking works. We are using OL-2.5. Has anyone else experienced > this? No. Do you a public page where we can see that, or some code for someone to reproduce? > Was it fixed in 2.6? Dunno. > > Thanks, David Robison -- Eric From eric.c2c at gmail.com Fri Jun 6 02:22:53 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Aspect Ratio/Projection Problem In-Reply-To: <11fb08580806051543h599ac2ecw59b07bfdfb4f8707@mail.gmail.com> References: <11fb08580806051543h599ac2ecw59b07bfdfb4f8707@mail.gmail.com> Message-ID: <5ec103de0806052322q72c88e95hd479cbf1a7301a3e@mail.gmail.com> On Fri, Jun 6, 2008 at 12:43 AM, Michael Langford wrote: > After switching to openlayers.org from google maps, we're almost ready > to launch my customer's new site. > > One problem though: His overlay image is "squished" on OpenLayers, > where it looks great using the image overlay of Google Maps API. It > involves way too many hours of hand lettered text on it to contemplate > redoing in the new aspect ratio, so I need to find a technical > solution to make OpenLayers.org display it properly. > > I've been fiddling with projections, and have not seen a way out of > this forest, as nothing appears to change the display of the image. > > When I look, I keep finding pointers on the web to the extremely brief > comment about projections on the FAQ, which doesn't help me at all. > > It seems like I'd like to display in EPSG:900313 as that is what > Google uses (that may not be the exact name, I deleted it after it > seemed clear it wasn't working). > > I'm not exactly sure the role the proj4js plays in this, but it seems > like it probably does. > > I've attached the picture of what the overlay looks like when applied > to google's map, and what the overlay looks like when applied to open > layers. In addition, it is available at > http://rowdylabs.com/ng/RightAndWrong.GIF in case the mailing list > doesn't like attachments. > > Hopefully someone can provide something like the following: > > You properly include proj4js at the top of your html file like so, > and you create your map with arguments like so. Hello I'm not sure I understand your problem. But if what you want is have overlays over google maps you'll need to use SphericalMercator. See some doc here and some example there . Hope this will help you do what you want. Cheers, -- Eric From michael.langford at rowdylabs.com Fri Jun 6 03:33:28 2008 From: michael.langford at rowdylabs.com (Michael Langford) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Aspect Ratio/Projection Problem In-Reply-To: <5ec103de0806052322q72c88e95hd479cbf1a7301a3e@mail.gmail.com> References: <11fb08580806051543h599ac2ecw59b07bfdfb4f8707@mail.gmail.com> <5ec103de0806052322q72c88e95hd479cbf1a7301a3e@mail.gmail.com> Message-ID: <11fb08580806060033x2992631ejbb1e9add52843380@mail.gmail.com> I tried Paul's suggestion and it didn't change anything. I'll try to clarify and add code. If you take OpenLayers out of the picture entirely, and you use GMaps instead to do what we're trying to do, you'd use a GGroundOverlay on google maps to plop say a custom map of New York City down on top (completely obscuring their map). When you do this, the google does not in any way stretch, modify, reproject, etc, the images we are using. It might with other images, but ours come out the same as they go in, probably indicating we have the same projection as Google Maps, or at least close enough these areas overlay correctly. Here is an example of using GGroundOverlay: http://www.usnaviguide.com/ws-2008-02/ggroundoverlay_example.htm Notice his picture *IS* reprojected to fit on the google map (ours is not). If we port our GGroundOverlay example from GMaps to open layers, we throw down our custom map of say New York, then OpenLayers decides (at least in the default setup), that it would like to stretch our custom map overlay. Sure, it reports the correct lats and longs after doing so, but it looks horrible, as there is lots of lettering and symbols on the map which are stretched to near illegibility. We want to mimic the projection that the screen map is in on Google Maps so as to avoid any distortion. When we use an OpenLayer.Layer.Image on top of the default map that you get when you go new OpenLayers.Map("map"), the picture is distorted as OpenLayers reprojects the image or something like that, elongating it in the east west direction. How can I use an image layer in OpenLayers to achieve the same appearance as a GGroundOverlay in google maps, with no squishing and stretching of the image overlay? As a further modification, we're actually just using the image as the base map. We're not using a google map, WMS server or anything like that, nor are we tiling our image. We're justing using the single image that we were overlaying now as the "base layer" of the map. We're just interested in the controls, markers, and nice map pixel->coordinate translations, as well as your wonderful vector drawing api. Remember when I say terms like "base layer" etc, I probably don't have the same OpenLayers concepts you do, and I just mean its the map on the bottom, we're not putting any pictures under it. Sorry if I used terms different than they are in the Open Layers community. --Michael Here is the code that initializes the map: var mapbounds = new OpenLayers.Bounds(-74.766667, 39.166666667, -71.88333, 40.88333); g_map = new OpenLayers.Map('map', options); var graphic = new OpenLayers.Layer.Image( 'Overlay of Temperature Data', 'http://www.rowdylabs.com/gmaps/oceantemp/area-ne06.gif', mapbounds, new OpenLayers.Size(1030,796), {maxExtext:mapbounds}); g_map.addLayers([graphic]); g_map.setCenter(new OpenLayers.LonLat(-73,40), -1); g_markers = new OpenLayers.Layer.Markers( "Markers" ); g_map.addLayer(g_markers); On Fri, Jun 6, 2008 at 2:22 AM, Eric Lemoine wrote: > On Fri, Jun 6, 2008 at 12:43 AM, Michael Langford > wrote: >> After switching to openlayers.org from google maps, we're almost ready >> to launch my customer's new site. >> >> One problem though: His overlay image is "squished" on OpenLayers, >> where it looks great using the image overlay of Google Maps API. It >> involves way too many hours of hand lettered text on it to contemplate >> redoing in the new aspect ratio, so I need to find a technical >> solution to make OpenLayers.org display it properly. >> >> I've been fiddling with projections, and have not seen a way out of >> this forest, as nothing appears to change the display of the image. >> >> When I look, I keep finding pointers on the web to the extremely brief >> comment about projections on the FAQ, which doesn't help me at all. >> >> It seems like I'd like to display in EPSG:900313 as that is what >> Google uses (that may not be the exact name, I deleted it after it >> seemed clear it wasn't working). >> >> I'm not exactly sure the role the proj4js plays in this, but it seems >> like it probably does. >> >> I've attached the picture of what the overlay looks like when applied >> to google's map, and what the overlay looks like when applied to open >> layers. In addition, it is available at >> http://rowdylabs.com/ng/RightAndWrong.GIF in case the mailing list >> doesn't like attachments. >> >> Hopefully someone can provide something like the following: >> >> You properly include proj4js at the top of your html file like so, >> and you create your map with arguments like so. > > Hello > > I'm not sure I understand your problem. But if what you want is have > overlays over google maps you'll need to use SphericalMercator. See > some doc here and > some example there > . Hope > this will help you do what you want. > > Cheers, > > -- > Eric > -- Michael Langford Phone: 404-386-0495 Web: http://www.RowdyLabs.com From mtd at bom.gov.au Fri Jun 6 03:45:25 2008 From: mtd at bom.gov.au (Matthew Doyle) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Customising the OL interface In-Reply-To: <17506906.post@talk.nabble.com> References: <17506906.post@talk.nabble.com> Message-ID: <17686454.post@talk.nabble.com> Thank you Richard for your suggestion to check panel.html in the examples, but this doesn't fulfill exactly what I am trying to do. I wish to re-position and re-size (the former being the more important, rather than the latter) the PanZoomBar controls so that they are laid out like in http://img511.imageshack.us/img511/8654/exampleinterfacepc0.jpg this image . I have attempted to do this with CSS, but I see that the PanZoomBar controls are heavily hardcoded (size, filename, position) within the OpenLayers JS library: (PanZoomBar.js) var sz = new OpenLayers.Size(18,18); (...) this._addButton("panup", "north-mini.png", centered, sz); px.y = centered.y+sz.h; this._addButton("panleft", "west-mini.png", px, sz); if (this.zoomWorldIcon) { this._addButton("zoomworld", "zoom-world-mini.png", px.add(sz.w, 0), sz); wposition *= 2; } this._addButton("panright", "east-mini.png", px.add(wposition, 0), sz); this._addButton("pandown", "south-mini.png", centered.add(0, sz.h*2), sz); this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, sz.h*3+5), sz); (...) It doesn't seem immediately able to customise these controls. So, I ask; how, if at all possible, can I do this? Cheers and regards, Matt Matthew Doyle wrote: > > Hi OL users, > > We have designed a new set of icons to replace the basic set in the > OpenLayers theme and now wish to redesign some of the aspects on where > these should be and how they should work. > > I assumed this to be an easy process which is completely controlled via > CSS, but have spent the day scratching my head at how some aspects of the > interface is driven. Simply replacing a few images with the new icons does > work for the current interface, but we wish to change the position of, > say, the top left panning buttons and change the size of the increase zoom > 'plus' button. It doesn't seem immediately obvious how to do this, and > looks as though some on-the-fly processing of icons is done through the JS > via element.style="..." > > I'm sure there have been many others who have already been through this > process, so i am ask you, is there any FAQ or "how to" on customising the > OpenLayers interface? > > I apologise if this is an easy one, but trawling through the style.css > didn't define some aspects i thought it would. > > Many thanks in advance, > Matt > > > -- View this message in context: http://www.nabble.com/Customising-the-OL-interface-tp17506906p17686454.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jdb at mail.nerc-essc.ac.uk Fri Jun 6 06:12:20 2008 From: jdb at mail.nerc-essc.ac.uk (Jon Blower) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Lots of spurious tiles get loaded when changing base layer In-Reply-To: <5ec103de0805282153l4d45e9a8r832ef4910a7f2b1f@mail.gmail.com> References: <2bb6ee950805270542wcd0da46yd100caa959b1c67e@mail.gmail.com> <5ec103de0805281306p24af1cadj39909c281ed09f77@mail.gmail.com> <20080528204628.GC12361@metacarta.com> <2bb6ee950805281354t17e2e095h7f1e1bb4009d214@mail.gmail.com> <5ec103de0805282153l4d45e9a8r832ef4910a7f2b1f@mail.gmail.com> Message-ID: <2bb6ee950806060312s6c64995fw9b096797fe1a2ccc@mail.gmail.com> Bug filed (http://trac.openlayers.org/ticket/1574). Cheers, Jon On Thu, May 29, 2008 at 5:53 AM, Eric Lemoine wrote: > On Wed, May 28, 2008 at 10:54 PM, Jon Blower wrote: >>> Those extents are in degrees, not projected units. >> That's right. The extent of -180,60,180,90 is just an approximation >> (and not a very good one) in lat-lon. The extent in the units of the >> projection (metres, notionally) is -10700000, -10700000, 14700000, >> 14700000. So I think I'm doing the right thing. >> >> Regarding the spurious tiles it seems to be that a load of new tiles >> get loaded before the maximum extent of the layer can be changed. >> Presumably the bounding boxes of the tiles need to be recalculated as >> soon as the projection changes and before any new tiles are loaded. > > I think this is an OL bug and therefore deserves a ticket. Jon, would > you mind filing one out? Thanks, > > -- > Eric > -- -------------------------------------------------------------- Dr Jon Blower Tel: +44 118 378 5213 (direct line) Technical Director Tel: +44 118 378 8741 (ESSC) Reading e-Science Centre Fax: +44 118 378 6413 ESSC Email: jdb@mail.nerc-essc.ac.uk University of Reading 3 Earley Gate Reading RG6 6AL, UK -------------------------------------------------------------- From kusum at infobase.in Fri Jun 6 06:38:13 2008 From: kusum at infobase.in (Kusum) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Smooth panning and zoom problem References: <2bb6ee950805270542wcd0da46yd100caa959b1c67e@mail.gmail.com><5ec103de0805281306p24af1cadj39909c281ed09f77@mail.gmail.com><20080528204628.GC12361@metacarta.com><2bb6ee950805281354t17e2e095h7f1e1bb4009d214@mail.gmail.com><5ec103de0805282153l4d45e9a8r832ef4910a7f2b1f@mail.gmail.com> <2bb6ee950806060312s6c64995fw9b096797fe1a2ccc@mail.gmail.com> Message-ID: <2A5D4D7755854566B00E74173E03053F@kusum> Hiii All I am migrating from Openlayers 5.0 to Openlayers 6.0. In last version I changed some settings in openlayers.js for smooth panning (so that map disappear on panning) and to give a blue effect on zoom in as in google But I don't remember that setting to to change the Ver 6.0 Openlayers.js file. Pls help if someone knows those settings Thanks in advance Kusum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080606/ce608009/attachment.html From kusum at infobase.in Fri Jun 6 06:41:07 2008 From: kusum at infobase.in (Kusum) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Smooth panning and zoom problem References: <2bb6ee950805270542wcd0da46yd100caa959b1c67e@mail.gmail.com><5ec103de0805281306p24af1cadj39909c281ed09f77@mail.gmail.com><20080528204628.GC12361@metacarta.com><2bb6ee950805281354t17e2e095h7f1e1bb4009d214@mail.gmail.com><5ec103de0805282153l4d45e9a8r832ef4910a7f2b1f@mail.gmail.com><2bb6ee950806060312s6c64995fw9b096797fe1a2ccc@mail.gmail.com> <2A5D4D7755854566B00E74173E03053F@kusum> Message-ID: correction to mail below I want help regarding smooth panning (so that map does not disappear on panning) actually by mistake I wrote smooth panning (so that map disappear on panning) From: Kusum Sent: Friday, June 06, 2008 4:08 PM To: Openlayers Users Subject: [OpenLayers-Users] Smooth panning and zoom problem Hiii All I am migrating from Openlayers 5.0 to Openlayers 6.0. In last version I changed some settings in openlayers.js for smooth panning (so that map disappear on panning) and to give a blue effect on zoom in as in google But I don't remember that setting to to change the Ver 6.0 Openlayers.js file. Pls help if someone knows those settings Thanks in advance Kusum -------------------------------------------------------------------------------- _______________________________________________ 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/20080606/46684e87/attachment.html From pagameba at gmail.com Fri Jun 6 06:52:14 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Smooth panning and zoom problem In-Reply-To: <2A5D4D7755854566B00E74173E03053F@kusum> References: <2bb6ee950805270542wcd0da46yd100caa959b1c67e@mail.gmail.com><5ec103de0805281306p24af1cadj39909c281ed09f77@mail.gmail.com><20080528204628.GC12361@metacarta.com><2bb6ee950805281354t17e2e095h7f1e1bb4009d214@mail.gmail.com><5ec103de0805282153l4d45e9a8r832ef4910a7f2b1f@mail.gmail.com> <2bb6ee950806060312s6c64995fw9b096797fe1a2ccc@mail.gmail.com> <2A5D4D7755854566B00E74173E03053F@kusum> Message-ID: add transitionEffect: 'resize' to your layer options (the fourth parameter) Cheers Paul On 6-Jun-08, at 6:38 AM, Kusum wrote: > Hiii All > > I am migrating from Openlayers 5.0 to Openlayers 6.0. > In last version I changed some settings in openlayers.js for smooth > panning (so that map disappear on panning) > and to give a blue effect on zoom in as in google > But I don't remember that setting to to change the Ver 6.0 > Openlayers.js file. > > Pls help if someone knows those settings > > Thanks in advance > > Kusum > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From pagameba at gmail.com Fri Jun 6 08:05:48 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Customising the OL interface In-Reply-To: <17686454.post@talk.nabble.com> References: <17506906.post@talk.nabble.com> <17686454.post@talk.nabble.com> Message-ID: Probably your only option at this time is to copy OpenLayers/Control/ PanZoomBar.js to OpenLayers/Control/PanZoomBarCustom.js, make the appropriate changes to replace PanZoomBar with PanZoomBarCustom and then make the changes to hard code your new images/positions. Cheers Paul On 6-Jun-08, at 3:45 AM, Matthew Doyle wrote: > > Thank you Richard for your suggestion to check panel.html in the > examples, > but this doesn't fulfill exactly what I am trying to do. > > I wish to re-position and re-size (the former being the more > important, > rather than the latter) the PanZoomBar controls so that they are > laid out > like in http://img511.imageshack.us/img511/8654/exampleinterfacepc0.jpg > this image . > > I have attempted to do this with CSS, but I see that the PanZoomBar > controls > are heavily hardcoded (size, filename, position) within the > OpenLayers JS > library: (PanZoomBar.js) > > var sz = new OpenLayers.Size(18,18); > (...) > this._addButton("panup", "north-mini.png", centered, sz); > px.y = centered.y+sz.h; > this._addButton("panleft", "west-mini.png", px, sz); > if (this.zoomWorldIcon) { > this._addButton("zoomworld", "zoom-world-mini.png", > px.add(sz.w, > 0), sz); > wposition *= 2; > } > this._addButton("panright", "east-mini.png", > px.add(wposition, 0), > sz); > this._addButton("pandown", "south-mini.png", centered.add(0, > sz.h*2), sz); > this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, > sz.h*3+5), sz); > (...) > > It doesn't seem immediately able to customise these controls. > > So, I ask; how, if at all possible, can I do this? > > Cheers and regards, > Matt > > > > > > Matthew Doyle wrote: >> >> Hi OL users, >> >> We have designed a new set of icons to replace the basic set in the >> OpenLayers theme and now wish to redesign some of the aspects on >> where >> these should be and how they should work. >> >> I assumed this to be an easy process which is completely controlled >> via >> CSS, but have spent the day scratching my head at how some aspects >> of the >> interface is driven. Simply replacing a few images with the new >> icons does >> work for the current interface, but we wish to change the position >> of, >> say, the top left panning buttons and change the size of the >> increase zoom >> 'plus' button. It doesn't seem immediately obvious how to do this, >> and >> looks as though some on-the-fly processing of icons is done through >> the JS >> via element.style="..." >> >> I'm sure there have been many others who have already been through >> this >> process, so i am ask you, is there any FAQ or "how to" on >> customising the >> OpenLayers interface? >> >> I apologise if this is an easy one, but trawling through the >> style.css >> didn't define some aspects i thought it would. >> >> Many thanks in advance, >> Matt >> >> >> > > -- > View this message in context: http://www.nabble.com/Customising-the-OL-interface-tp17506906p17686454.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 pagameba at gmail.com Fri Jun 6 08:09:45 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Aspect Ratio/Projection Problem In-Reply-To: <11fb08580806060033x2992631ejbb1e9add52843380@mail.gmail.com> References: <11fb08580806051543h599ac2ecw59b07bfdfb4f8707@mail.gmail.com> <5ec103de0806052322q72c88e95hd479cbf1a7301a3e@mail.gmail.com> <11fb08580806060033x2992631ejbb1e9add52843380@mail.gmail.com> Message-ID: <18863669-D43D-4E88-8B24-6535E076A6F0@gmail.com> Michael, I tried your code, you have omitted a critical piece which is the options object you are passing to the map constructor - please send so I can see what is going on. Cheers Paul On 6-Jun-08, at 3:33 AM, Michael Langford wrote: > I tried Paul's suggestion and it didn't change anything. > > I'll try to clarify and add code. > > If you take OpenLayers out of the picture entirely, and you use GMaps > instead to do what we're trying to do, you'd use a GGroundOverlay on > google maps to plop say a custom map of New York City down on top > (completely obscuring their map). When you do this, the google does > not in any way stretch, modify, reproject, etc, the images we are > using. It might with other images, but ours come out the same as they > go in, probably indicating we have the same projection as Google Maps, > or at least close enough these areas overlay correctly. Here is an > example of using GGroundOverlay: > http://www.usnaviguide.com/ws-2008-02/ggroundoverlay_example.htm > Notice his picture *IS* reprojected to fit on the google map (ours is > not). > > If we port our GGroundOverlay example from GMaps to open layers, we > throw down our custom map of say New York, then OpenLayers decides (at > least in the default setup), that it would like to stretch our custom > map overlay. Sure, it reports the correct lats and longs after doing > so, but it looks horrible, as there is lots of lettering and symbols > on the map which are stretched to near illegibility. We want to mimic > the projection that the screen map is in on Google Maps so as to avoid > any distortion. > > When we use an OpenLayer.Layer.Image on top of the default map that > you get when you go new OpenLayers.Map("map"), the picture is > distorted as OpenLayers reprojects the image or something like that, > elongating it in the east west direction. > > How can I use an image layer in OpenLayers to achieve the same > appearance as a GGroundOverlay in google maps, with no squishing and > stretching of the image overlay? > > As a further modification, we're actually just using the image as the > base map. We're not using a google map, WMS server or anything like > that, nor are we tiling our image. We're justing using the single > image that we were overlaying now as the "base layer" of the map. > We're just interested in the controls, markers, and nice map > pixel->coordinate translations, as well as your wonderful vector > drawing api. > > Remember when I say terms like "base layer" etc, I probably don't have > the same OpenLayers concepts you do, and I just mean its the map on > the bottom, we're not putting any pictures under it. Sorry if I used > terms different than they are in the Open Layers community. > > --Michael > > Here is the code that initializes the map: > var mapbounds = new OpenLayers.Bounds(-74.766667, > 39.166666667, > -71.88333, > 40.88333); > > g_map = new OpenLayers.Map('map', options); > > var graphic = new OpenLayers.Layer.Image( > 'Overlay of Temperature Data', > 'http://www.rowdylabs.com/gmaps/oceantemp/area-ne06.gif', > mapbounds, > new OpenLayers.Size(1030,796), > {maxExtext:mapbounds}); > > g_map.addLayers([graphic]); > g_map.setCenter(new OpenLayers.LonLat(-73,40), -1); > > g_markers = new OpenLayers.Layer.Markers( "Markers" ); > g_map.addLayer(g_markers); > > > On Fri, Jun 6, 2008 at 2:22 AM, Eric Lemoine > wrote: >> On Fri, Jun 6, 2008 at 12:43 AM, Michael Langford >> wrote: >>> After switching to openlayers.org from google maps, we're almost >>> ready >>> to launch my customer's new site. >>> >>> One problem though: His overlay image is "squished" on OpenLayers, >>> where it looks great using the image overlay of Google Maps API. It >>> involves way too many hours of hand lettered text on it to >>> contemplate >>> redoing in the new aspect ratio, so I need to find a technical >>> solution to make OpenLayers.org display it properly. >>> >>> I've been fiddling with projections, and have not seen a way out of >>> this forest, as nothing appears to change the display of the image. >>> >>> When I look, I keep finding pointers on the web to the extremely >>> brief >>> comment about projections on the FAQ, which doesn't help me at all. >>> >>> It seems like I'd like to display in EPSG:900313 as that is what >>> Google uses (that may not be the exact name, I deleted it after it >>> seemed clear it wasn't working). >>> >>> I'm not exactly sure the role the proj4js plays in this, but it >>> seems >>> like it probably does. >>> >>> I've attached the picture of what the overlay looks like when >>> applied >>> to google's map, and what the overlay looks like when applied to >>> open >>> layers. In addition, it is available at >>> http://rowdylabs.com/ng/RightAndWrong.GIF in case the mailing list >>> doesn't like attachments. >>> >>> Hopefully someone can provide something like the following: >>> >>> You properly include proj4js at the top of your html file like so, >>> and you create your map with arguments like so. >> >> Hello >> >> I'm not sure I understand your problem. But if what you want is have >> overlays over google maps you'll need to use SphericalMercator. See >> some doc here and >> some example there >> . >> Hope >> this will help you do what you want. >> >> Cheers, >> >> -- >> Eric >> > > > > -- > Michael Langford > Phone: 404-386-0495 > Web: http://www.RowdyLabs.com > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From SnapeM at rpsgroup.com Fri Jun 6 08:28:17 2008 From: SnapeM at rpsgroup.com (Matthew Snape) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] wms query frustration References: <1a2d31974cad86e8e2808bcc0754990aaf7ddb59@localhost> Message-ID: <605F55D8070C094AA2E2A9CBA2767A3CA71FDA@EXMB1.eur.rpsgroup.com> Have you set the correct tile size in openlayers? The resolution it is showing is double the max resolution. This is probably because openlayers is generating extents based on a particular tile size. If this size does not match what tilecache is using the resulting resolution that tilecache calculates based on your extents will be wrong. Try explicitly setting the tile size in both openlayers and tilecache to make sure. Matthew -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Justin Palk Sent: 05 June 2008 15:13 To: users@openlayers.org Subject: [OpenLayers-Users] wms query frustration Hi all -- I'm just starting out with openlayers, and I'm a little frustrated. I've been trying for a few days now to set up a simple map that will let me query some hypothetical election results, but I keep running into two snags: 1) When I first go to my test.html page, I'll get: "An error occurred: can't find resolution index for 0.002231. Available resolutions are: [0.0011154260000000001, 0.00055771300000000005, 0.00027885650000000002, 0.00013942825000000001 (etc.)" I can't figure out why I'm starting at a resolution of 0.002231 when I set a maxResolution of 0.001115426. 2) If I zoom in one step (to resolution 0.001115426) I get the following error: "An error occurred: Current x value -77.535047 is too far from tile corner x -77.677821" The "Current x value" never seems to change regardless of where I click on the map. I can only assume this is some sort of projection error, but I've been beating my head against the wall checking and double-checking my srs's and resolutions, but I can't seem to find a solution. Any suggestions would be greatly appreciated. I'm working with a map in EPSG:4326 ogrinfo -so returns: INFO: Open of `election_4326.shp' using driver `ESRI Shapefile' successful. Layer name: election_4326 Geometry: Polygon Feature Count: 61 Extent: (-77.677821, 39.219771) - (-77.106723, 39.719845) Layer SRS WKT: GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]] ED_NUM: Integer (10.0) ED_NAME: String (16.0) PRECINCT: String (6.0) LEGIS_DIST: String (3.0) POLL_NAME: String (50.0) POLL_TYPE: String (40.0) POLL_ADDRE: String (40.0) CITY: String (25.0) ZIP_CODE: String (15.0) SHAPE_area: Real (19.11) SHAPE_len: Real (19.11) Here's the relevant bit from my tilecache.cfg: [election_results] type=MapnikLayer mapfile=/tmp/ed.xml extent_type=loose bbox=-77.677821,39.219771,-77.106723,39.719845 maxResolution = 0.001115426 The map line from ed.xml: and my script: -- "News is what people want to keep hidden, and everything else is publicity" --Bill Moyers _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users This e-mail message and any attached file is the property of the sender and is sent in confidence to the addressee only. The contents are not to be disclosed to anyone other than the addressee. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. If you experience difficulty with opening any attachments to this message, or with sending a reply by email, please telephone on + 44-(0)1235 438151 or fax on + 44-(0)1235 438188. Any advice contained in this e-mail or any accompanying file attached hereto is for information purposes only. RPS do not take any responsibility for differences between the original and the transmission copy or any amendments made thereafter. If the addressee requires RPS to be responsible for the contents of this e-mail, RPS will be pleased to issue a signed hard copy of the document upon request. RPS Group Plc, company number: 208 7786 (England). Registered office: Centurion Court, 85 Milton Park Abingdon Oxfordshire OX14 4RY. RPS Group Plc web link: From marcello.brunaldi at student.unife.it Fri Jun 6 09:07:46 2008 From: marcello.brunaldi at student.unife.it (Marcello Brunaldi) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Open a popup-existing with a text link Message-ID: Hello everyone, wanted to know if there is a way to open a popup already existing through a text link. Let me explain better, I'm implementing a virtual map style google maps, a set amount of data and information from database to create the file georss.xml going to draw the various markers on the map and which contains the information that appear in popup. I have also implemented a search function for points on the map that I returns links to various points. I can not associate with these links a feature that I opened his popup correspondent. Thank you, Marcello Brunaldi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080606/ac77cc54/attachment.html From oscar.fonts.lists at gmail.com Fri Jun 6 10:46:40 2008 From: oscar.fonts.lists at gmail.com (Oscar Fonts) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Customising the OL interface In-Reply-To: References: <17506906.post@talk.nabble.com> <17686454.post@talk.nabble.com> Message-ID: That's what we did at http://www.icc.cat/vissir2/ Extend PanZoomBar and override draw() method. Code at http://www.icc.cat/vissir2/js/vissir_lib/PanZoomBar.class.js Regards, Oscar. 2008/6/6 Paul Spencer : > Probably your only option at this time is to copy OpenLayers/Control/ > PanZoomBar.js to OpenLayers/Control/PanZoomBarCustom.js, make the > appropriate changes to replace PanZoomBar with PanZoomBarCustom and > then make the changes to hard code your new images/positions. > > Cheers > > Paul > > On 6-Jun-08, at 3:45 AM, Matthew Doyle wrote: > > > > > Thank you Richard for your suggestion to check panel.html in the > > examples, > > but this doesn't fulfill exactly what I am trying to do. > > > > I wish to re-position and re-size (the former being the more > > important, > > rather than the latter) the PanZoomBar controls so that they are > > laid out > > like in http://img511.imageshack.us/img511/8654/exampleinterfacepc0.jpg > > this image . > > > > I have attempted to do this with CSS, but I see that the PanZoomBar > > controls > > are heavily hardcoded (size, filename, position) within the > > OpenLayers JS > > library: (PanZoomBar.js) > > > > var sz = new OpenLayers.Size(18,18); > > (...) > > this._addButton("panup", "north-mini.png", centered, sz); > > px.y = centered.y+sz.h; > > this._addButton("panleft", "west-mini.png", px, sz); > > if (this.zoomWorldIcon) { > > this._addButton("zoomworld", "zoom-world-mini.png", > > px.add(sz.w, > > 0), sz); > > wposition *= 2; > > } > > this._addButton("panright", "east-mini.png", > > px.add(wposition, 0), > > sz); > > this._addButton("pandown", "south-mini.png", centered.add(0, > > sz.h*2), sz); > > this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, > > sz.h*3+5), sz); > > (...) > > > > It doesn't seem immediately able to customise these controls. > > > > So, I ask; how, if at all possible, can I do this? > > > > Cheers and regards, > > Matt > > > > > > > > > > > > Matthew Doyle wrote: > >> > >> Hi OL users, > >> > >> We have designed a new set of icons to replace the basic set in the > >> OpenLayers theme and now wish to redesign some of the aspects on > >> where > >> these should be and how they should work. > >> > >> I assumed this to be an easy process which is completely controlled > >> via > >> CSS, but have spent the day scratching my head at how some aspects > >> of the > >> interface is driven. Simply replacing a few images with the new > >> icons does > >> work for the current interface, but we wish to change the position > >> of, > >> say, the top left panning buttons and change the size of the > >> increase zoom > >> 'plus' button. It doesn't seem immediately obvious how to do this, > >> and > >> looks as though some on-the-fly processing of icons is done through > >> the JS > >> via element.style="..." > >> > >> I'm sure there have been many others who have already been through > >> this > >> process, so i am ask you, is there any FAQ or "how to" on > >> customising the > >> OpenLayers interface? > >> > >> I apologise if this is an easy one, but trawling through the > >> style.css > >> didn't define some aspects i thought it would. > >> > >> Many thanks in advance, > >> Matt > >> > >> > >> > > > > -- > > View this message in context: > http://www.nabble.com/Customising-the-OL-interface-tp17506906p17686454.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/20080606/47162f12/attachment.html From michael.langford at rowdylabs.com Fri Jun 6 10:57:14 2008 From: michael.langford at rowdylabs.com (Michael Langford) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Aspect Ratio/Projection Problem In-Reply-To: <18863669-D43D-4E88-8B24-6535E076A6F0@gmail.com> References: <11fb08580806051543h599ac2ecw59b07bfdfb4f8707@mail.gmail.com> <5ec103de0806052322q72c88e95hd479cbf1a7301a3e@mail.gmail.com> <11fb08580806060033x2992631ejbb1e9add52843380@mail.gmail.com> <18863669-D43D-4E88-8B24-6535E076A6F0@gmail.com> Message-ID: <11fb08580806060757u46fd7a1ex5c40a2672446d51d@mail.gmail.com> The options at that time was just {} now it as this. Now it is as the following, still behaves the same.... var options = { 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) }; g_map = new OpenLayers.Map('map', options); var mapbounds = new OpenLayers.Bounds(-74.766667, 39.166666667, -71.88333, 40.88333) var graphic = new OpenLayers.Layer.Image( 'Oceantemp.com Temperatures', 'http://www.rowdylabs.com/gmaps/oceantemp/area-ne06.gif', mapbounds, new OpenLayers.Size(1030,796), {maxExtext:mapbounds}); g_map.addLayers([graphic]); g_map.setCenter(new OpenLayers.LonLat(-73,40), -1); g_markers = new OpenLayers.Layer.Markers( "Markers" ); g_map.addLayer(g_markers) On Fri, Jun 6, 2008 at 8:09 AM, Paul Spencer wrote: > Michael, > > I tried your code, you have omitted a critical piece which is the options > object you are passing to the map constructor - please send so I can see > what is going on. > > Cheers > > Paul > > On 6-Jun-08, at 3:33 AM, Michael Langford wrote: > >> I tried Paul's suggestion and it didn't change anything. >> >> I'll try to clarify and add code. >> >> If you take OpenLayers out of the picture entirely, and you use GMaps >> instead to do what we're trying to do, you'd use a GGroundOverlay on >> google maps to plop say a custom map of New York City down on top >> (completely obscuring their map). When you do this, the google does >> not in any way stretch, modify, reproject, etc, the images we are >> using. It might with other images, but ours come out the same as they >> go in, probably indicating we have the same projection as Google Maps, >> or at least close enough these areas overlay correctly. Here is an >> example of using GGroundOverlay: >> http://www.usnaviguide.com/ws-2008-02/ggroundoverlay_example.htm >> Notice his picture *IS* reprojected to fit on the google map (ours is >> not). >> >> If we port our GGroundOverlay example from GMaps to open layers, we >> throw down our custom map of say New York, then OpenLayers decides (at >> least in the default setup), that it would like to stretch our custom >> map overlay. Sure, it reports the correct lats and longs after doing >> so, but it looks horrible, as there is lots of lettering and symbols >> on the map which are stretched to near illegibility. We want to mimic >> the projection that the screen map is in on Google Maps so as to avoid >> any distortion. >> >> When we use an OpenLayer.Layer.Image on top of the default map that >> you get when you go new OpenLayers.Map("map"), the picture is >> distorted as OpenLayers reprojects the image or something like that, >> elongating it in the east west direction. >> >> How can I use an image layer in OpenLayers to achieve the same >> appearance as a GGroundOverlay in google maps, with no squishing and >> stretching of the image overlay? >> >> As a further modification, we're actually just using the image as the >> base map. We're not using a google map, WMS server or anything like >> that, nor are we tiling our image. We're justing using the single >> image that we were overlaying now as the "base layer" of the map. >> We're just interested in the controls, markers, and nice map >> pixel->coordinate translations, as well as your wonderful vector >> drawing api. >> >> Remember when I say terms like "base layer" etc, I probably don't have >> the same OpenLayers concepts you do, and I just mean its the map on >> the bottom, we're not putting any pictures under it. Sorry if I used >> terms different than they are in the Open Layers community. >> >> --Michael >> >> Here is the code that initializes the map: >> var mapbounds = new OpenLayers.Bounds(-74.766667, >> 39.166666667, >> -71.88333, >> 40.88333); >> >> g_map = new OpenLayers.Map('map', options); >> >> var graphic = new OpenLayers.Layer.Image( >> 'Overlay of Temperature Data', >> >> 'http://www.rowdylabs.com/gmaps/oceantemp/area-ne06.gif', >> mapbounds, >> new OpenLayers.Size(1030,796), >> {maxExtext:mapbounds}); >> >> g_map.addLayers([graphic]); >> g_map.setCenter(new OpenLayers.LonLat(-73,40), -1); >> >> g_markers = new OpenLayers.Layer.Markers( "Markers" ); >> g_map.addLayer(g_markers); >> >> >> On Fri, Jun 6, 2008 at 2:22 AM, Eric Lemoine wrote: >>> >>> On Fri, Jun 6, 2008 at 12:43 AM, Michael Langford >>> wrote: >>>> >>>> After switching to openlayers.org from google maps, we're almost ready >>>> to launch my customer's new site. >>>> >>>> One problem though: His overlay image is "squished" on OpenLayers, >>>> where it looks great using the image overlay of Google Maps API. It >>>> involves way too many hours of hand lettered text on it to contemplate >>>> redoing in the new aspect ratio, so I need to find a technical >>>> solution to make OpenLayers.org display it properly. >>>> >>>> I've been fiddling with projections, and have not seen a way out of >>>> this forest, as nothing appears to change the display of the image. >>>> >>>> When I look, I keep finding pointers on the web to the extremely brief >>>> comment about projections on the FAQ, which doesn't help me at all. >>>> >>>> It seems like I'd like to display in EPSG:900313 as that is what >>>> Google uses (that may not be the exact name, I deleted it after it >>>> seemed clear it wasn't working). >>>> >>>> I'm not exactly sure the role the proj4js plays in this, but it seems >>>> like it probably does. >>>> >>>> I've attached the picture of what the overlay looks like when applied >>>> to google's map, and what the overlay looks like when applied to open >>>> layers. In addition, it is available at >>>> http://rowdylabs.com/ng/RightAndWrong.GIF in case the mailing list >>>> doesn't like attachments. >>>> >>>> Hopefully someone can provide something like the following: >>>> >>>> You properly include proj4js at the top of your html file like so, >>>> and you create your map with arguments like so. >>> >>> Hello >>> >>> I'm not sure I understand your problem. But if what you want is have >>> overlays over google maps you'll need to use SphericalMercator. See >>> some doc here and >>> some example there >>> . Hope >>> this will help you do what you want. >>> >>> Cheers, >>> >>> -- >>> Eric >>> >> >> >> >> -- >> Michael Langford >> Phone: 404-386-0495 >> Web: http://www.RowdyLabs.com >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > -- Michael Langford Phone: 404-386-0495 Web: http://www.RowdyLabs.com From pagameba at gmail.com Fri Jun 6 11:22:16 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Aspect Ratio/Projection Problem In-Reply-To: <11fb08580806060757u46fd7a1ex5c40a2672446d51d@mail.gmail.com> References: <11fb08580806051543h599ac2ecw59b07bfdfb4f8707@mail.gmail.com> <5ec103de0806052322q72c88e95hd479cbf1a7301a3e@mail.gmail.com> <11fb08580806060033x2992631ejbb1e9add52843380@mail.gmail.com> <18863669-D43D-4E88-8B24-6535E076A6F0@gmail.com> <11fb08580806060757u46fd7a1ex5c40a2672446d51d@mail.gmail.com> Message-ID: functional code attached. The problem is that you are mixing coordinate systems and while Google automatically assumes you are using lon/lat and transforms them internally, OpenLayers doesn't. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080606/062b0c47/test.html -------------- next part -------------- Cheers Paul On 6-Jun-08, at 10:57 AM, Michael Langford wrote: > The options at that time was just {} now it as this. > > Now it is as the following, still behaves the same.... > > var options = { > 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) > }; > > g_map = new OpenLayers.Map('map', options); > > var mapbounds = new OpenLayers.Bounds(-74.766667, > 39.166666667, > -71.88333, > 40.88333) > var graphic = new OpenLayers.Layer.Image( > 'Oceantemp.com Temperatures', > 'http://www.rowdylabs.com/gmaps/oceantemp/area-ne06.gif', > mapbounds, > new OpenLayers.Size(1030,796), > {maxExtext:mapbounds}); > > g_map.addLayers([graphic]); > g_map.setCenter(new OpenLayers.LonLat(-73,40), -1); > > g_markers = new OpenLayers.Layer.Markers( "Markers" ); > g_map.addLayer(g_markers) > > On Fri, Jun 6, 2008 at 8:09 AM, Paul Spencer > wrote: >> Michael, >> >> I tried your code, you have omitted a critical piece which is the >> options >> object you are passing to the map constructor - please send so I >> can see >> what is going on. >> >> Cheers >> >> Paul >> >> On 6-Jun-08, at 3:33 AM, Michael Langford wrote: >> >>> I tried Paul's suggestion and it didn't change anything. >>> >>> I'll try to clarify and add code. >>> >>> If you take OpenLayers out of the picture entirely, and you use >>> GMaps >>> instead to do what we're trying to do, you'd use a GGroundOverlay on >>> google maps to plop say a custom map of New York City down on top >>> (completely obscuring their map). When you do this, the google does >>> not in any way stretch, modify, reproject, etc, the images we are >>> using. It might with other images, but ours come out the same as >>> they >>> go in, probably indicating we have the same projection as Google >>> Maps, >>> or at least close enough these areas overlay correctly. Here is an >>> example of using GGroundOverlay: >>> http://www.usnaviguide.com/ws-2008-02/ggroundoverlay_example.htm >>> Notice his picture *IS* reprojected to fit on the google map (ours >>> is >>> not). >>> >>> If we port our GGroundOverlay example from GMaps to open layers, we >>> throw down our custom map of say New York, then OpenLayers decides >>> (at >>> least in the default setup), that it would like to stretch our >>> custom >>> map overlay. Sure, it reports the correct lats and longs after doing >>> so, but it looks horrible, as there is lots of lettering and symbols >>> on the map which are stretched to near illegibility. We want to >>> mimic >>> the projection that the screen map is in on Google Maps so as to >>> avoid >>> any distortion. >>> >>> When we use an OpenLayer.Layer.Image on top of the default map that >>> you get when you go new OpenLayers.Map("map"), the picture is >>> distorted as OpenLayers reprojects the image or something like that, >>> elongating it in the east west direction. >>> >>> How can I use an image layer in OpenLayers to achieve the same >>> appearance as a GGroundOverlay in google maps, with no squishing and >>> stretching of the image overlay? >>> >>> As a further modification, we're actually just using the image as >>> the >>> base map. We're not using a google map, WMS server or anything like >>> that, nor are we tiling our image. We're justing using the single >>> image that we were overlaying now as the "base layer" of the map. >>> We're just interested in the controls, markers, and nice map >>> pixel->coordinate translations, as well as your wonderful vector >>> drawing api. >>> >>> Remember when I say terms like "base layer" etc, I probably don't >>> have >>> the same OpenLayers concepts you do, and I just mean its the map on >>> the bottom, we're not putting any pictures under it. Sorry if I used >>> terms different than they are in the Open Layers community. >>> >>> --Michael >>> >>> Here is the code that initializes the map: >>> var mapbounds = new OpenLayers.Bounds(-74.766667, >>> 39.166666667, >>> -71.88333, >>> 40.88333); >>> >>> g_map = new OpenLayers.Map('map', options); >>> >>> var graphic = new OpenLayers.Layer.Image( >>> 'Overlay of Temperature Data', >>> >>> 'http://www.rowdylabs.com/gmaps/oceantemp/area-ne06.gif', >>> mapbounds, >>> new OpenLayers.Size(1030,796), >>> {maxExtext:mapbounds}); >>> >>> g_map.addLayers([graphic]); >>> g_map.setCenter(new OpenLayers.LonLat(-73,40), -1); >>> >>> g_markers = new OpenLayers.Layer.Markers( "Markers" ); >>> g_map.addLayer(g_markers); >>> >>> >>> On Fri, Jun 6, 2008 at 2:22 AM, Eric Lemoine >>> wrote: >>>> >>>> On Fri, Jun 6, 2008 at 12:43 AM, Michael Langford >>>> wrote: >>>>> >>>>> After switching to openlayers.org from google maps, we're almost >>>>> ready >>>>> to launch my customer's new site. >>>>> >>>>> One problem though: His overlay image is "squished" on OpenLayers, >>>>> where it looks great using the image overlay of Google Maps API. >>>>> It >>>>> involves way too many hours of hand lettered text on it to >>>>> contemplate >>>>> redoing in the new aspect ratio, so I need to find a technical >>>>> solution to make OpenLayers.org display it properly. >>>>> >>>>> I've been fiddling with projections, and have not seen a way out >>>>> of >>>>> this forest, as nothing appears to change the display of the >>>>> image. >>>>> >>>>> When I look, I keep finding pointers on the web to the extremely >>>>> brief >>>>> comment about projections on the FAQ, which doesn't help me at >>>>> all. >>>>> >>>>> It seems like I'd like to display in EPSG:900313 as that is what >>>>> Google uses (that may not be the exact name, I deleted it after it >>>>> seemed clear it wasn't working). >>>>> >>>>> I'm not exactly sure the role the proj4js plays in this, but it >>>>> seems >>>>> like it probably does. >>>>> >>>>> I've attached the picture of what the overlay looks like when >>>>> applied >>>>> to google's map, and what the overlay looks like when applied to >>>>> open >>>>> layers. In addition, it is available at >>>>> http://rowdylabs.com/ng/RightAndWrong.GIF in case the mailing list >>>>> doesn't like attachments. >>>>> >>>>> Hopefully someone can provide something like the following: >>>>> >>>>> You properly include proj4js at the top of your html file like so, >>>>> and you create your map with arguments like so. >>>> >>>> Hello >>>> >>>> I'm not sure I understand your problem. But if what you want is >>>> have >>>> overlays over google maps you'll need to use SphericalMercator. See >>>> some doc here >>>> and >>>> some example there >>>> . >>>> Hope >>>> this will help you do what you want. >>>> >>>> Cheers, >>>> >>>> -- >>>> Eric >>>> >>> >>> >>> >>> -- >>> Michael Langford >>> Phone: 404-386-0495 >>> Web: http://www.RowdyLabs.com >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >> >> > > > > -- > Michael Langford > Phone: 404-386-0495 > Web: http://www.RowdyLabs.com From jmpmcmanus at yahoo.com Fri Jun 6 12:27:44 2008 From: jmpmcmanus at yahoo.com (James McManus) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo and overlays Message-ID: <48496580.6080807@yahoo.com> Is there a standard way to enable GetFeatureInfo to only query from the current overlay being displayed? QUERY_LAYERS enables you to query more than one layer, but if FEATURE_COUNT is set to 1 then the info from the last layer on the list is displayed. You can set FEATURE_COUNT to a higher number, but I do not want to do that. Is there a standard way of linking LayerSwitcher with GetFeatureInfo? Thanks Jim From michael.langford at rowdylabs.com Fri Jun 6 12:31:21 2008 From: michael.langford at rowdylabs.com (Michael Langford) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Aspect Ratio/Projection Problem In-Reply-To: References: <11fb08580806051543h599ac2ecw59b07bfdfb4f8707@mail.gmail.com> <5ec103de0806052322q72c88e95hd479cbf1a7301a3e@mail.gmail.com> <11fb08580806060033x2992631ejbb1e9add52843380@mail.gmail.com> <18863669-D43D-4E88-8B24-6535E076A6F0@gmail.com> <11fb08580806060757u46fd7a1ex5c40a2672446d51d@mail.gmail.com> Message-ID: <11fb08580806060931t4627c7a0i636f2bfac52c6386@mail.gmail.com> This worked perfectly. Thank you so very much. --Michael On Fri, Jun 6, 2008 at 11:22 AM, Paul Spencer wrote: > functional code attached. The problem is that you are mixing coordinate > systems and while Google automatically assumes you are using lon/lat and > transforms them internally, OpenLayers doesn't. > > > > > > Cheers > > Paul > > On 6-Jun-08, at 10:57 AM, Michael Langford wrote: > >> The options at that time was just {} now it as this. >> >> Now it is as the following, still behaves the same.... >> >> var options = { >> 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) >> }; >> >> g_map = new OpenLayers.Map('map', options); >> >> var mapbounds = new OpenLayers.Bounds(-74.766667, >> 39.166666667, >> -71.88333, >> 40.88333) >> var graphic = new OpenLayers.Layer.Image( >> 'Oceantemp.com Temperatures', >> >> 'http://www.rowdylabs.com/gmaps/oceantemp/area-ne06.gif', >> mapbounds, >> new OpenLayers.Size(1030,796), >> {maxExtext:mapbounds}); >> >> g_map.addLayers([graphic]); >> g_map.setCenter(new OpenLayers.LonLat(-73,40), -1); >> >> g_markers = new OpenLayers.Layer.Markers( "Markers" ); >> g_map.addLayer(g_markers) >> >> On Fri, Jun 6, 2008 at 8:09 AM, Paul Spencer wrote: >>> >>> Michael, >>> >>> I tried your code, you have omitted a critical piece which is the options >>> object you are passing to the map constructor - please send so I can see >>> what is going on. >>> >>> Cheers >>> >>> Paul >>> >>> On 6-Jun-08, at 3:33 AM, Michael Langford wrote: >>> >>>> I tried Paul's suggestion and it didn't change anything. >>>> >>>> I'll try to clarify and add code. >>>> >>>> If you take OpenLayers out of the picture entirely, and you use GMaps >>>> instead to do what we're trying to do, you'd use a GGroundOverlay on >>>> google maps to plop say a custom map of New York City down on top >>>> (completely obscuring their map). When you do this, the google does >>>> not in any way stretch, modify, reproject, etc, the images we are >>>> using. It might with other images, but ours come out the same as they >>>> go in, probably indicating we have the same projection as Google Maps, >>>> or at least close enough these areas overlay correctly. Here is an >>>> example of using GGroundOverlay: >>>> http://www.usnaviguide.com/ws-2008-02/ggroundoverlay_example.htm >>>> Notice his picture *IS* reprojected to fit on the google map (ours is >>>> not). >>>> >>>> If we port our GGroundOverlay example from GMaps to open layers, we >>>> throw down our custom map of say New York, then OpenLayers decides (at >>>> least in the default setup), that it would like to stretch our custom >>>> map overlay. Sure, it reports the correct lats and longs after doing >>>> so, but it looks horrible, as there is lots of lettering and symbols >>>> on the map which are stretched to near illegibility. We want to mimic >>>> the projection that the screen map is in on Google Maps so as to avoid >>>> any distortion. >>>> >>>> When we use an OpenLayer.Layer.Image on top of the default map that >>>> you get when you go new OpenLayers.Map("map"), the picture is >>>> distorted as OpenLayers reprojects the image or something like that, >>>> elongating it in the east west direction. >>>> >>>> How can I use an image layer in OpenLayers to achieve the same >>>> appearance as a GGroundOverlay in google maps, with no squishing and >>>> stretching of the image overlay? >>>> >>>> As a further modification, we're actually just using the image as the >>>> base map. We're not using a google map, WMS server or anything like >>>> that, nor are we tiling our image. We're justing using the single >>>> image that we were overlaying now as the "base layer" of the map. >>>> We're just interested in the controls, markers, and nice map >>>> pixel->coordinate translations, as well as your wonderful vector >>>> drawing api. >>>> >>>> Remember when I say terms like "base layer" etc, I probably don't have >>>> the same OpenLayers concepts you do, and I just mean its the map on >>>> the bottom, we're not putting any pictures under it. Sorry if I used >>>> terms different than they are in the Open Layers community. >>>> >>>> --Michael >>>> >>>> Here is the code that initializes the map: >>>> var mapbounds = new OpenLayers.Bounds(-74.766667, >>>> 39.166666667, >>>> -71.88333, >>>> 40.88333); >>>> >>>> g_map = new OpenLayers.Map('map', options); >>>> >>>> var graphic = new OpenLayers.Layer.Image( >>>> 'Overlay of Temperature Data', >>>> >>>> 'http://www.rowdylabs.com/gmaps/oceantemp/area-ne06.gif', >>>> mapbounds, >>>> new OpenLayers.Size(1030,796), >>>> {maxExtext:mapbounds}); >>>> >>>> g_map.addLayers([graphic]); >>>> g_map.setCenter(new OpenLayers.LonLat(-73,40), -1); >>>> >>>> g_markers = new OpenLayers.Layer.Markers( "Markers" ); >>>> g_map.addLayer(g_markers); >>>> >>>> >>>> On Fri, Jun 6, 2008 at 2:22 AM, Eric Lemoine wrote: >>>>> >>>>> On Fri, Jun 6, 2008 at 12:43 AM, Michael Langford >>>>> wrote: >>>>>> >>>>>> After switching to openlayers.org from google maps, we're almost ready >>>>>> to launch my customer's new site. >>>>>> >>>>>> One problem though: His overlay image is "squished" on OpenLayers, >>>>>> where it looks great using the image overlay of Google Maps API. It >>>>>> involves way too many hours of hand lettered text on it to contemplate >>>>>> redoing in the new aspect ratio, so I need to find a technical >>>>>> solution to make OpenLayers.org display it properly. >>>>>> >>>>>> I've been fiddling with projections, and have not seen a way out of >>>>>> this forest, as nothing appears to change the display of the image. >>>>>> >>>>>> When I look, I keep finding pointers on the web to the extremely brief >>>>>> comment about projections on the FAQ, which doesn't help me at all. >>>>>> >>>>>> It seems like I'd like to display in EPSG:900313 as that is what >>>>>> Google uses (that may not be the exact name, I deleted it after it >>>>>> seemed clear it wasn't working). >>>>>> >>>>>> I'm not exactly sure the role the proj4js plays in this, but it seems >>>>>> like it probably does. >>>>>> >>>>>> I've attached the picture of what the overlay looks like when applied >>>>>> to google's map, and what the overlay looks like when applied to open >>>>>> layers. In addition, it is available at >>>>>> http://rowdylabs.com/ng/RightAndWrong.GIF in case the mailing list >>>>>> doesn't like attachments. >>>>>> >>>>>> Hopefully someone can provide something like the following: >>>>>> >>>>>> You properly include proj4js at the top of your html file like so, >>>>>> and you create your map with arguments like so. >>>>> >>>>> Hello >>>>> >>>>> I'm not sure I understand your problem. But if what you want is have >>>>> overlays over google maps you'll need to use SphericalMercator. See >>>>> some doc here and >>>>> some example there >>>>> . Hope >>>>> this will help you do what you want. >>>>> >>>>> Cheers, >>>>> >>>>> -- >>>>> Eric >>>>> >>>> >>>> >>>> >>>> -- >>>> Michael Langford >>>> Phone: 404-386-0495 >>>> Web: http://www.RowdyLabs.com >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>> >>> >> >> >> >> -- >> Michael Langford >> Phone: 404-386-0495 >> Web: http://www.RowdyLabs.com > > > -- Michael Langford Phone: 404-386-0495 Web: http://www.RowdyLabs.com From todd.nemanich at gmail.com Fri Jun 6 13:28:53 2008 From: todd.nemanich at gmail.com (Todd Nemanich) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Vector layer positioning problem Message-ID: Hello, I'm having a problem with a vector layer displaying incorrectly in IE (works fine in firefox). I have a marker and a vector showing the path taken. In IE6, the vector is drawn in the wrong position (the path appears correct, but in the wrong spot). The problem appears to be related to the zoom, as the difference between the marker and the endpoint of the vector increases as you zoom out. I tried using the nightly build of OpenLayers.js, but that didn't fix the vector. The map is using the mercator projection. I did some checking on the lists, and it sounded like it might be related to a margin element in the CSS http://www.nabble.com/GML-vector-layers-in-IE-to14623748.html#a14623748 I tried setting margin: 0px on the map div, but that didn't correct the problem. When I looked into the output, it seems to pickup a margin attribute at the group tag inside the vector layer but before my linestring. According to IE, these are the styles on the group tag: display: inline-block font-family: verdana,sans-serif font-size: 8pt hasLayout: -1 height: 134217.727pt margin: -1.5pt auto auto 132pt margin-left: 132pt margin-top: -1.5pt position: absolute text-align: center visibility: visible width: 134217.727pt I've included below the applied stylesheets according to IE. I have no idea how the margin, height, or width attributes are being set to these values. Has anyone else seen this, or have any suggestions to correct it? Thanks! /****************************************************************************/ /* Matches for node: group id=OpenLayers.Layer.Vector_345_root */ /****************************************************************************/ /* Inline style */ { VISIBILITY: visible; WIDTH: 913px; HEIGHT: 500px } /****************************************************************************/ /* Matches for node: DIV id=OpenLayers.Layer.Vector_345_vmlRoot */ /****************************************************************************/ /* Inline style */ { WIDTH: 913px; HEIGHT: 500px } /****************************************************************************/ /* Matches for node: DIV class=olLayerDiv id=OpenLayers.Layer.Vector_345 */ /****************************************************************************/ /* Inline style */ { Z-INDEX: 340; LEFT: 199px; WIDTH: 100%; POSITION: absolute; TOP: -111px; HEIGHT: 100% } /* Rule 1 of /js/theme/default/style.css */ DIV.olLayerDiv { moz-user-select: none } /****************************************************************************/ /* Matches for node: DIV id=olmap_OpenLayers_Container */ /****************************************************************************/ /* Inline style */ { Z-INDEX: 749; LEFT: -199px; POSITION: absolute; TOP: 111px } /****************************************************************************/ /* Matches for node: DIV class=olMapViewport id=olmap_OpenLayers_ViewPort */ /****************************************************************************/ /* Inline style */ { OVERFLOW: hidden; WIDTH: 100%; POSITION: relative; HEIGHT: 100% } /****************************************************************************/ /* Matches for node: DIV id=olmap */ /****************************************************************************/ /* Inline style */ { WIDTH: 913px; HEIGHT: 500px } /****************************************************************************/ /* Matches for node: TD */ /****************************************************************************/ /* Inline style */ { BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid } /* Rule 9 of embedded stylesheet */ TD { FONT-SIZE: 8pt; FONT-FAMILY: verdana,sans-serif } /****************************************************************************/ /* Matches for node: TD */ /****************************************************************************/ /* Rule 9 of embedded stylesheet */ TD { FONT-SIZE: 8pt; FONT-FAMILY: verdana,sans-serif } /****************************************************************************/ /* Matches for node: TD class=frameStyle */ /****************************************************************************/ /* Inline style */ { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT-SIZE: 7pt; PADDING-BOTTOM: 5px; PADDING-TOP: 0px } /* Rule 21 of embedded stylesheet */ .frameStyle { BORDER-RIGHT: #555555 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #555555 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: #555555 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #555555 1px solid; BACKGROUND-COLOR: #f7f9f9 } /* Rule 9 of embedded stylesheet */ TD { FONT-SIZE: 8pt; FONT-FAMILY: verdana,sans-serif } /****************************************************************************/ /* Matches for node: TABLE class=contentTableFrame */ /****************************************************************************/ /* Rule 20 of embedded stylesheet */ .contentTableFrame { MARGIN-TOP: 10px; WIDTH: 90%; HEIGHT: 600px } /****************************************************************************/ /* Matches for node: TD */ /****************************************************************************/ /* Inline style */ { HEIGHT: 100% } /* Rule 9 of embedded stylesheet */ TD { FONT-SIZE: 8pt; FONT-FAMILY: verdana,sans-serif } /****************************************************************************/ /* Matches for node: BODY */ /****************************************************************************/ /* Rule 1 of embedded stylesheet */ BODY { BACKGROUND-IMAGE: url(./images/background.png) } /* Rule 8 of embedded stylesheet */ BODY { FONT-SIZE: 8pt; FONT-FAMILY: verdana,sans-serif } From eric.c2c at gmail.com Sat Jun 7 08:46:55 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo and overlays In-Reply-To: <48496580.6080807@yahoo.com> References: <48496580.6080807@yahoo.com> Message-ID: <5ec103de0806070546tab858fdr6f34bb012e5e90e@mail.gmail.com> Hi James On Fri, Jun 6, 2008 at 6:27 PM, James McManus wrote: > Is there a standard way to enable GetFeatureInfo to only query from the > current overlay being displayed? QUERY_LAYERS enables you to query more > than one layer, but if FEATURE_COUNT is set to 1 then the info from the > last layer on the list is displayed. You can set FEATURE_COUNT to a > higher number, but I do not want to do that. Is there a standard way of > linking LayerSwitcher with GetFeatureInfo? You can have your "click on map" handler get the list of visible overlays and use that list in the GetFeatureInfo request, with something like the following: var QUERY_LAYERS=[]; for (var i = 0; i < map.layers.length; i++) { var layer = map.layers[i]; if (!layer.isBaseLayer && layer.getVisibility()) { QUERY_LAYERS.push(layer.name); } } Would that work for you? Cheers, -- Eric From alessio.dilorenzo at gmail.com Sun Jun 8 08:03:08 2008 From: alessio.dilorenzo at gmail.com (Alessio Di Lorenzo) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup Message-ID: <484BCA7C.8060006@gmail.com> Hi list, I'd like to obtain the WMS GetFeatureInfo response in a framecloud popup instead in a separate frame/div (as displayed in the example at http://openlayers.org/dev/examples/example-list.html ). Is it possible? Are there any working examples that I can view? thaks in advance, alessio From eric.c2c at gmail.com Sun Jun 8 09:09:51 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup In-Reply-To: <484BCA7C.8060006@gmail.com> References: <484BCA7C.8060006@gmail.com> Message-ID: <5ec103de0806080609nbcfbf28h5e5b1ad23ca8d865@mail.gmail.com> On Sun, Jun 8, 2008 at 2:03 PM, Alessio Di Lorenzo wrote: > Hi list, > > I'd like to obtain the WMS GetFeatureInfo response in a framecloud popup > instead in a separate frame/div (as displayed in the example at > http://openlayers.org/dev/examples/example-list.html ). You probably mean: . > Is it possible? Sure, just create a framedcloud popup in the OpenLayers.loadURL() callback. > Are there any working examples that I can view? Not that I know. Cheers, -- Eric From alessio.dilorenzo at gmail.com Sun Jun 8 09:36:19 2008 From: alessio.dilorenzo at gmail.com (Alessio Di Lorenzo) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup In-Reply-To: <5ec103de0806080609nbcfbf28h5e5b1ad23ca8d865@mail.gmail.com> References: <484BCA7C.8060006@gmail.com> <5ec103de0806080609nbcfbf28h5e5b1ad23ca8d865@mail.gmail.com> Message-ID: <484BE053.9010009@gmail.com> Hi Eric > You probably mean: . > Yes... sorry for the wrong link > >> Is it possible? >> > > Sure, just create a framedcloud popup in the OpenLayers.loadURL() callback. > Thank you very much. I'll try as soon as! Could you show me a quick example of the code I need to get it working? I'll appreciate a lot :) alessio From eric.c2c at gmail.com Sun Jun 8 10:18:16 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup In-Reply-To: <484BE053.9010009@gmail.com> References: <484BCA7C.8060006@gmail.com> <5ec103de0806080609nbcfbf28h5e5b1ad23ca8d865@mail.gmail.com> <484BE053.9010009@gmail.com> Message-ID: <5ec103de0806080718o768d4096tfe6957dfcd12b54b@mail.gmail.com> On Sun, Jun 8, 2008 at 3:36 PM, Alessio Di Lorenzo wrote: > Hi Eric > >> You probably mean: . >> > > Yes... sorry for the wrong link > >> >>> Is it possible? >>> >> >> Sure, just create a framedcloud popup in the OpenLayers.loadURL() callback. >> > > Thank you very much. I'll try as soon as! > Could you show me a quick example of the code I need to get it working? > I'll appreciate a lot :) The code should look like this (untested): var createPopup = function(response) { // this refers to the event object var lonlat = map.getLonLatFromViewPortPx(this.xy); var popup = new OpenLayers.Popup.FramedCloud( "__popup", // popup id lonlat, // OpenLayers.LonLat object null, // popup is autosized response, // html string null, // no anchor true // close button ); map.addPopup(popup, true /* exclusive */); }; map.events.register('click', map, function (e) { var url = wms.getFullRequestString({ REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: wms.map.getExtent().toBBOX(), X: e.xy.x, Y: e.xy.y, INFO_FORMAT: 'text/html', QUERY_LAYERS: wms.params.LAYERS, WIDTH: wms.map.size.w, HEIGHT: wms.map.size.h }); OpenLayers.loadURL(url, '', e, createPopup); OpenLayers.Event.stop(e); }); Hope this helps, -- Eric From alessio.dilorenzo at gmail.com Sun Jun 8 15:32:14 2008 From: alessio.dilorenzo at gmail.com (Alessio Di Lorenzo) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup In-Reply-To: <5ec103de0806080718o768d4096tfe6957dfcd12b54b@mail.gmail.com> References: <484BCA7C.8060006@gmail.com> <5ec103de0806080609nbcfbf28h5e5b1ad23ca8d865@mail.gmail.com> <484BE053.9010009@gmail.com> <5ec103de0806080718o768d4096tfe6957dfcd12b54b@mail.gmail.com> Message-ID: <484C33BE.3040503@gmail.com> Thank you a lot Eric > > (untested) this will be my care! :) From eric.c2c at gmail.com Sun Jun 8 16:11:55 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> Message-ID: <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson wrote: > I have a problem with upgrading to 2.6. I need some of the other > features and I cannot get this to work. I have tried to find out > where in the code it has changed but I cannot find it. > > ONLY in IE does this not work. > > Extract this example. You will see a green line and an aqua marker on > the screen. > > Push the button that says Zoom 5. > > You still have a green line and an aqua marker on the screen. > > Push the button that says Zoom 6. > > No lines. Not for Zoom 7 or Zoom 8 either. With FF2 I see the line after Zoom 6, but its coords seem to have changed. I don't see line after Zoom 7 and 8. Is this expected? -- Eric From linda.rawson at gmail.com Sun Jun 8 17:07:44 2008 From: linda.rawson at gmail.com (Linda Rawson) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> Message-ID: <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> No. With 2.5 you see the lines at all zoom levels in both IE and Firefox. This must be a problem in Firefox as well. Maybe that will help you guys trouble shoot. Linda On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine wrote: > On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson wrote: >> I have a problem with upgrading to 2.6. I need some of the other >> features and I cannot get this to work. I have tried to find out >> where in the code it has changed but I cannot find it. >> >> ONLY in IE does this not work. >> >> Extract this example. You will see a green line and an aqua marker on >> the screen. >> >> Push the button that says Zoom 5. >> >> You still have a green line and an aqua marker on the screen. >> >> Push the button that says Zoom 6. >> >> No lines. Not for Zoom 7 or Zoom 8 either. > > With FF2 I see the line after Zoom 6, but its coords seem to have > changed. I don't see line after Zoom 7 and 8. Is this expected? > > -- > Eric > -- Linda Rawson From smengl at mit.edu Sun Jun 8 17:45:16 2008 From: smengl at mit.edu (smengl) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] markers + popup problem Message-ID: <17701070.post@talk.nabble.com> Hi I am trying to create info box popups when there is a click on a marker. See below for my javascript code. The problem is that only the first click will generate a popup box and after that, nothing happens. I think the problem is that i declare the popup variable inside the for loops, but cannot figure out how to solve the problem. Could some one please help me with this problem? for(var i=0; i References: <48496580.6080807@yahoo.com> <5ec103de0806070546tab858fdr6f34bb012e5e90e@mail.gmail.com> Message-ID: <484C6588.2080005@yahoo.com> Eric, Thanks! Eric Lemoine wrote: > Hi James > > On Fri, Jun 6, 2008 at 6:27 PM, James McManus wrote: > >> Is there a standard way to enable GetFeatureInfo to only query from the >> current overlay being displayed? QUERY_LAYERS enables you to query more >> than one layer, but if FEATURE_COUNT is set to 1 then the info from the >> last layer on the list is displayed. You can set FEATURE_COUNT to a >> higher number, but I do not want to do that. Is there a standard way of >> linking LayerSwitcher with GetFeatureInfo? >> > > You can have your "click on map" handler get the list of visible > overlays and use that list in the GetFeatureInfo request, with > something like the following: > > var QUERY_LAYERS=[]; > for (var i = 0; i < map.layers.length; i++) { > var layer = map.layers[i]; > if (!layer.isBaseLayer && layer.getVisibility()) { > QUERY_LAYERS.push(layer.name); > } > } > > Would that work for you? > > Cheers, > -- > Eric > > From f.vanderbiest at gmail.com Mon Jun 9 03:39:15 2008 From: f.vanderbiest at gmail.com (=?ISO-8859-1?Q?Fran=E7ois_Van_Der_Biest?=) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Vector layer positioning problem In-Reply-To: References: Message-ID: <86169bba0806090039p379c640fhb618897ff46538c4@mail.gmail.com> Hi Todd, Try removing "text-align: center" from your CSS... F. 2008/6/6, Todd Nemanich : > > Hello, > I'm having a problem with a vector layer displaying > incorrectly in IE (works fine in firefox) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080609/ad2bd19e/attachment.html From robe.dnd at cityofboston.gov Mon Jun 9 08:12:54 2008 From: robe.dnd at cityofboston.gov (Obe, Regina) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup In-Reply-To: <484BCA7C.8060006@gmail.com> References: <484BCA7C.8060006@gmail.com> Message-ID: <53F9CF533E1AA14EA1F8C5C08ABC08D20434FD2C@ZDND.DND.boston.cob> I'm sure there is probably one around but don't seem to find it. The Popup Matrix and Popup Mayhem examples provide sample use of FrameCloud among other popup types. Anyrate for FrameCloud() its pretty much like using any popup. Below is a snippet from one of my apps (this goes into your event handler function). Unfortunately can't give away more than this. Basically you declare a global variable popup at the top of your page. Where I have the innerhtmlgoeshere is where you would stuff the html you normally stuff in the div.innerHTML (I think the rest of the code in the FeatureInfo stays pretty much the same) var tolerance = new OpenLayers.Pixel(6, 6); var min_px = new OpenLayers.Pixel( e.xy.x - tolerance.x, e.xy.y + tolerance.y); var max_px = new OpenLayers.Pixel( e.xy.x + tolerance.x, e.xy.y - tolerance.y); var min_ll = map.getLonLatFromPixel(min_px); var max_ll = map.getLonLatFromPixel(max_px); if (popup){ popup.destroy(); popup = null; } popup = new OpenLayers.Popup.FramedCloud("property", new OpenLayers.LonLat(min_ll.lon,min_ll.lat), new OpenLayers.Size(400,500), innerhtmlgoeshere, null, true); map.addPopup(popup); Hope that helps, Regina -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Alessio Di Lorenzo Sent: Sunday, June 08, 2008 8:03 AM To: OpenLayers ML Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup Hi list, I'd like to obtain the WMS GetFeatureInfo response in a framecloud popup instead in a separate frame/div (as displayed in the example at http://openlayers.org/dev/examples/example-list.html ). Is it possible? Are there any working examples that I can view? thaks in advance, alessio _______________________________________________ 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 ks at geograf.dk Mon Jun 9 09:02:38 2008 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Handling double click In-Reply-To: <5ec103de0805190954g1f274a91se643a9f92af8de4@mail.gmail.com> References: <483169A4.3040201@geograf.dk> <5ec103de0805190954g1f274a91se643a9f92af8de4@mail.gmail.com> Message-ID: <484D29EE.3050907@geograf.dk> Hi Eric. (I think my "DoubleClick" is an old version of the "Click" handler). I have now figured out the problem. I have a DragHandler registered. That means the "mousedown" / "mouseup" events are triggered. Since the "mouseup" is correctly handled, the "click" is never fired, and neither is "dblclick". Do you have any suggestion on how to deal with this problem? Regards, Kenneth Skovhede, GEOGRAF A/S Eric Lemoine skrev: > Hi. I'm not sure i understand. Do you use OL click handler or have you > implemented your own double click handler? OL click handler supports > double click. So use that handler with appropriate options, in part > use stopClick:true and make sure you activate the handler after the OL > controls. Tell me how it goes. Eric > > 2008/5/19, Kenneth Skovhede, GEOGRAF A/S : > >> I have a map where several features have links attached. >> A script checks the current cursor position against the server to >> determine if there is a link at the current location. >> If there is, the cursor changes to the hand cursor. >> This all works fine. >> >> Regardless of what tool the user has, I would like to intercept a >> double-click. >> I can do that with the doubleclick handler: >> doubleClick = new OpenLayers.Handler.DoubleClick(this, {dblclick: >> this.OnDoubleClick}, {single: false, 'double': true, stopSingle: false, >> stopDouble: true}); >> doubleClick.activate(); >> >> And it works, but the original tool also gets activated. >> Ea., if the zoom tool is activated, it zooms twice for a double click, >> as well as activating the custom doubleclick handler. >> >> Is there any way to achieve this? >> >> It seems that the "click" event is fired before the "doubleclick" event >> happens, so it is difficult to filter the click. >> My handler looks like this: >> >> OnDoubleClick: function(evt) >> { >> if (this.activeLink != null) >> { >> window.open(this.activeLink, this.target); >> OpenLayers.Event.stop(evt); >> return false; >> } >> else >> return true; >> }, >> >> The "return false" does not prevent the click events from occuring. >> Stopping the single click events makes the current tool useless. >> >> -- >> Regards, Kenneth Skovhede, GEOGRAF A/S >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> From jordandrsn at gmail.com Mon Jun 9 10:52:34 2008 From: jordandrsn at gmail.com (Jordan Anderson) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] New site that uses OpenLayers: ridethecity.com Message-ID: Hi all, I just launched a website that provides that provides point-to-point bicycle routing instructions in New York City. Its backend is PostGIS, uses pgRouting to find the best routes, and then uses OpenLayers to draw them. The javascript is ugly, but isn't compressed at the moment in case you want to see what it looks like under the hood... The website is www.ridethecity.com Thanks, Jordan From eric.c2c at gmail.com Mon Jun 9 12:49:50 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Handling double click In-Reply-To: <484D29EE.3050907@geograf.dk> References: <483169A4.3040201@geograf.dk> <5ec103de0805190954g1f274a91se643a9f92af8de4@mail.gmail.com> <484D29EE.3050907@geograf.dk> Message-ID: <5ec103de0806090949l4de8252ale24c46527a743279@mail.gmail.com> On Mon, Jun 9, 2008 at 3:02 PM, Kenneth Skovhede, GEOGRAF A/S wrote: > Hi Eric. > > (I think my "DoubleClick" is an old version of the "Click" handler). > > I have now figured out the problem. > I have a DragHandler registered. > That means the "mousedown" / "mouseup" events are triggered. > Since the "mouseup" is correctly handled, the "click" is never fired, and > neither is "dblclick". > > Do you have any suggestion on how to deal with this problem? Do you still have the problem if you make sure the click handler is activated after the drag handler? Can you share your code so that we can reproduce? -- Eric From smengl at mit.edu Mon Jun 9 12:59:38 2008 From: smengl at mit.edu (smengl) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] problem with popups once a marker is clicked Message-ID: <17737221.post@talk.nabble.com> Hi i have many markers on my map, and they all show up fine. However, once I register the click event to every marker, I face another problem. Please see the code below. Once I click on the markers, the popup will show up but the information inside the popup is wrong, it will show the same name all the time. Could someone please help me solve the problem? I look forward to hearing from you as soon as possible. Many thanks Seak Meng Lay function makemarker(){ var markersLayer = new OpenLayers.Layer.Markers("Oil Wells"); var iconSize = new OpenLayers.Size(20,20); var iconOffset= new OpenLayers.Pixel(-(iconSize.w/2),-iconSize.h); for(var i=0; i Hi all, I have a tilecache baselayer in a custom projection (epsg:42105). For the overview map, I have defined a WMS layer (in the same projection than the baselayer of course). But at startup, I always get the javascript error: "bounds has no properties" and when I zoom in the map: "maxExtent has no properties" any advice on this? MartinO -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080609/cb20b406/attachment.html From tschaub at opengeo.org Mon Jun 9 13:42:07 2008 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] overviewmap problem: bounds & maxExtent has no properties In-Reply-To: <28d70b140806091021o597f4794pa6de5fab75691dc9@mail.gmail.com> References: <28d70b140806091021o597f4794pa6de5fab75691dc9@mail.gmail.com> Message-ID: <484D6B6F.9080000@opengeo.org> Hey- Martin Ouellet wrote: > Hi all, > > I have a tilecache baselayer in a custom projection (epsg:42105). For > the overview map, I have defined a WMS layer (in the same projection > than the baselayer of course). > > But at startup, I always get the javascript error: "bounds has no > properties" > and when I zoom in the map: "maxExtent has no > properties" > > any advice on this? Depends on how you have configured things. Have you taken a look at the wiki page for the OverviewMap control? http://trac.openlayers.org/wiki/Control/OverviewMap Specifically, take a look at the section on non-default projections. http://trac.openlayers.org/wiki/Control/OverviewMap#Custommapoptions-projectionsextentsetc. Tim > > MartinO > !DSPAM:4033,484d669061892085621377! > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > !DSPAM:4033,484d669061892085621377! From tschaub at opengeo.org Mon Jun 9 13:51:24 2008 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] New site that uses OpenLayers: ridethecity.com In-Reply-To: References: Message-ID: <484D6D9C.70800@opengeo.org> Hey- Jordan Anderson wrote: > Hi all, > > I just launched a website that provides that provides point-to-point > bicycle routing instructions in New York City. Its backend is PostGIS, > uses pgRouting to find the best routes, and then uses OpenLayers to > draw them. > > The javascript is ugly, but isn't compressed at the moment in case you > want to see what it looks like under the hood... > > The website is www.ridethecity.com Nice! Would make a good addition to the growing gallery. http://gallery.openlayers.org/ Tim > > Thanks, > Jordan > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > !DSPAM:4033,484d43b8294612090977483! > From ks at geograf.dk Mon Jun 9 14:20:37 2008 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Handling double click In-Reply-To: <5ec103de0806090949l4de8252ale24c46527a743279@mail.gmail.com> References: <483169A4.3040201@geograf.dk> <5ec103de0805190954g1f274a91se643a9f92af8de4@mail.gmail.com> <484D29EE.3050907@geograf.dk> <5ec103de0806090949l4de8252ale24c46527a743279@mail.gmail.com> Message-ID: <484D7475.3020100@geograf.dk> Yes. I have the problem even though I always activate the click handler last. As always, the actual code is deep within a lot of unrelated code. I have constructed the following example to illustrate my point. I would expect that "doubleclick" and "click" would override the draghandler, but it does not.
Regards, Kenneth Skovhede, GEOGRAF A/S Eric Lemoine skrev: > On Mon, Jun 9, 2008 at 3:02 PM, Kenneth Skovhede, GEOGRAF A/S > wrote: > >> Hi Eric. >> >> (I think my "DoubleClick" is an old version of the "Click" handler). >> >> I have now figured out the problem. >> I have a DragHandler registered. >> That means the "mousedown" / "mouseup" events are triggered. >> Since the "mouseup" is correctly handled, the "click" is never fired, and >> neither is "dblclick". >> >> Do you have any suggestion on how to deal with this problem? >> > > Do you still have the problem if you make sure the click handler is > activated after the drag handler? > > Can you share your code so that we can reproduce? > > -- > Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080609/5e5a3084/attachment.html From eric.c2c at gmail.com Mon Jun 9 14:59:03 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Handling double click In-Reply-To: <484D7475.3020100@geograf.dk> References: <483169A4.3040201@geograf.dk> <5ec103de0805190954g1f274a91se643a9f92af8de4@mail.gmail.com> <484D29EE.3050907@geograf.dk> <5ec103de0806090949l4de8252ale24c46527a743279@mail.gmail.com> <484D7475.3020100@geograf.dk> Message-ID: <5ec103de0806091159u2998eac0uf02f9253c997ef5f@mail.gmail.com> On Mon, Jun 9, 2008 at 8:20 PM, Kenneth Skovhede, GEOGRAF A/S wrote: > Yes. I have the problem even though I always activate the click handler > last. > > As always, the actual code is deep within a lot of unrelated code. > > I have constructed the following example to illustrate my point. > I would expect that "doubleclick" and "click" would override the > draghandler, but it does not. Thanks for the example, this helped me understand why you want. And I think that what you want cannot be achieved. The click handler doesn't care about the mousedown event so it lets it propagate. If the click handler prevented the mousedown event from propaging that wouldn't help you either, because (once the click handler activated) the box handler will *never* see mousedown events. Try the following to understand the latter: // append these lines after creating the click handler var clickhandler_mousedown = dblclick.mousedown; clickhandler.mousedown = function(evt) { clickhandler_mousedown.call(clickhandler, evt); return false; // prevent propagation }; -- Eric From chris at genieknows.com Mon Jun 9 15:13:24 2008 From: chris at genieknows.com (Chris Adams) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] kaMap -> OpenLayers Message-ID: <484D80D4.6060003@genieknows.com> Hi, I'm switching this site: http://local.genieknows.com from using kaMap, to open layers. I have noticed a significant speed decrease in my tests, and it seems as though the instance running on http://www.openstreetmap.org suffers the same. What sorts of things can I do (either from api, or by editing OL code) to make OL as fast as possible? (while preserving functionality of equivalence or better to kaMap) From tschaub at opengeo.org Mon Jun 9 15:23:17 2008 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] overviewmap problem: bounds & maxExtent has no properties In-Reply-To: <28d70b140806091208x2a2f2667mc4e3f6ee20ba0fe@mail.gmail.com> References: <28d70b140806091021o597f4794pa6de5fab75691dc9@mail.gmail.com> <484D6B6F.9080000@opengeo.org> <28d70b140806091100i65697789qcefa303b76c040f1@mail.gmail.com> <484D72A6.4@opengeo.org> <28d70b140806091208x2a2f2667mc4e3f6ee20ba0fe@mail.gmail.com> Message-ID: <484D8325.8090306@opengeo.org> Hey - (Martin, copying this back to the users list in case it is of use to someone else.) The overview map control takes an options argument. The properties of that options argument configure the control. The overview map control is a control. It has a reference to a map that acts as the actual overview. Some of the properties in the options argument configure the control, and *one* of them configures the map, the mapOptions property. If you want to pass an options argument in that has properties for both configuring the control and configuring the map that the control has, do so with something like: var options = { layers: [somelayer], minRatio: 8, // just an example mapOptions: { projection: someproj, units: someunits, maxExtent: somebounds // etc. } }; var control = new OpenLayers.Control.OverviewMap(options); Make sense? Tim PS - The one bit of weirdness you might notice is that you configure the layers as a property on the control, but they become a property of the map that the control creates. This is consistent with the OpenLayers.Map constructor - which doesn't allow you to specify layers in the options argument. No particular reason for that, it just doesn't work currently. Martin Ouellet wrote: > First, thanks for your comments and you were right about some useless > parameter in my code, Ive changed that... > > For the rest, I still cannot make it work??? > > If I understand correctly, the custom layer (different from the > baselayer) must be specify in the "options" tag og the overview control? > So this would be: > > var jpl_wms = new OpenLayers.Layer.WMS( "wms", > "my url", > {layers: "muncipipalite"}); > var options = {layers: [jpl_wms]}; > > map.addControl(new OpenLayers.Control.OverviewMap(options)); > > In second part, since I'am using a custom projection (map and overview), > I have to specify my parameter in the "mapOptions" tag of the overview > control? > In my case: > > // Construct overview map with non-default projection, units, and extent > var options = { > projection: "EPSG:42105", > units: 'm', > maxExtent: new OpenLayers.Bounds(30000, 75000, 1709360, 2120440) > > }; > > map.addControl(new OpenLayers.Control.OverviewMap({mapOptions: options})); > > > So how can I combine those 2 options when adding the overview control to > the map? > > Thank you in advance for your patience! > > MartinO > > > > > 2008/6/9 Tim Schaub: > > Hey- > > Take a closer look at those wiki docs. The solution is there. > > A few other comments below... > > > Martin Ouellet wrote: > > Yes Tim, I have tried every examples on the overview wiki page. > Here's my actual config: > > *Note that if I used the WMS layer below as the baselayer, the > overviewmap work just fine. But with the tilecache layer, I > stil got the two error mentionned earlier... > > //BASELAYER MAP OPTIONS > var map_options = {maxExtent: new OpenLayers.Bounds(30000, > 75000, 1709360, 2120440), > maxResolution: 800, > numZoomLevels: 9, > projection:"EPSG:42105", > units: "m", > controls: [new > OpenLayers.Control.MouseDefaults()]}; > > > The MouseDefaults control is very deprecated. If you want to > explicitly set controls, use the Navigation control (you may also > want PanZoom). > > > > map = new OpenLayers.Map( 'map', map_options); > > //BASELAYER DEFINITION > baseLayer = new OpenLayers.Layer.WMS ( "Carte de base", > > ["http://osl1:8080/tilecache/tilecache.py?", > > "http://osl2:8080/tilecache/tilecache.py?", > > "http://osl3:8080/tilecache/tilecache.py?", > > "http://osl4:8080/tilecache/tilecache.py?"], > { layers : "osl_baselayer", > map_projection: > "init=epsg:42105", > transparent: "true" }, > { isBaseLayer: true } > ); > > > map_projection is not a WMS query string parameter. Unless you have > done something custom with your TileCache, I think this is of no use > (I could have missed a change in TileCache). > > > > > // WMS OVERVIEW LAYER DEFINITION > var ovwms = new OpenLayers.Layer.WMS ( "overview", > "http://blablabla", > { layers : "municipalite", > map_projection: > "init=epsg:42105"}, > { isBaseLayer: false, > singleTile: true } > ); > > // OVERVIEW MAP OPTIONS > var ov_options = { layers: [ovwms], > maxExtent: new OpenLayers.Bounds(30000, > 75000, 1709360, 2120440), > projection:"EPSG:42105", > units: "m" > }; > > // ADDING THE CONTROL > map.addControl(new OpenLayers.Control.OverviewMap(ov_options)); > > > Keep in mind that the OverviewMap is a control. This control *has* > a map (it is not a map itself). > > When you construct the control, you can set control related options > and map related options. All map related options go in the > mapOptions property of the control options. (See the wiki and > examples for reference.) > > Tim > > > does this help? > > MartinO > > 2008/6/9 Tim Schaub: > > > Hey- > > Martin Ouellet wrote: > > Hi all, > > > > I have a tilecache baselayer in a custom projection > (epsg:42105). > For > > the overview map, I have defined a WMS layer (in the same > projection > > than the baselayer of course). > > > > But at startup, I always get the javascript error: > "bounds has no > > properties" > > and when I zoom in the map: > "maxExtent > has no > > properties" > > > > any advice on this? > > Depends on how you have configured things. > > Have you taken a look at the wiki page for the OverviewMap > control? > > http://trac.openlayers.org/wiki/Control/OverviewMap > > Specifically, take a look at the section on non-default > projections. > > > http://trac.openlayers.org/wiki/Control/OverviewMap#Custommapoptions-projectionsextentsetc. > > Tim > > > > > > MartinO > > > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > > > > http://openlayers.org/mailman/listinfo/users > > > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > > > > http://openlayers.org/mailman/listinfo/users > > > !DSPAM:4033,484d6fb885321015089218! > > > > !DSPAM:4033,484d7fc4120487180515871! From alessio.dilorenzo at gmail.com Mon Jun 9 17:09:24 2008 From: alessio.dilorenzo at gmail.com (Alessio Di Lorenzo) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] New site that uses OpenLayers: ridethecity.com In-Reply-To: <484D6D9C.70800@opengeo.org> References: <484D6D9C.70800@opengeo.org> Message-ID: <484D9C04.6050702@gmail.com> The routing feature is simply grate! very good job alessio Tim Schaub ha scritto: > Hey- > > Jordan Anderson wrote: > >> Hi all, >> >> I just launched a website that provides that provides point-to-point >> bicycle routing instructions in New York City. Its backend is PostGIS, >> uses pgRouting to find the best routes, and then uses OpenLayers to >> draw them. >> >> The javascript is ugly, but isn't compressed at the moment in case you >> want to see what it looks like under the hood... >> >> The website is www.ridethecity.com >> > > Nice! > > Would make a good addition to the growing gallery. > http://gallery.openlayers.org/ > > Tim > > > >> Thanks, >> Jordan >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> !DSPAM:4033,484d43b8294612090977483! >> >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From alessio.dilorenzo at gmail.com Mon Jun 9 17:16:03 2008 From: alessio.dilorenzo at gmail.com (Alessio Di Lorenzo) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup In-Reply-To: <53F9CF533E1AA14EA1F8C5C08ABC08D20434FD2C@ZDND.DND.boston.cob> References: <484BCA7C.8060006@gmail.com> <53F9CF533E1AA14EA1F8C5C08ABC08D20434FD2C@ZDND.DND.boston.cob> Message-ID: <484D9D93.8060202@gmail.com> Thanks also to you! :) I have not enough time to try your code suggestions in these days (unexpected things to do...) but I'll try to do some experiments as soon as possible thx again, alessio Obe, Regina ha scritto: > > I'm sure there is probably one around but don't seem to find it. The > Popup Matrix and Popup Mayhem examples provide sample use of FrameCloud > among other popup types. > > > Anyrate for FrameCloud() its pretty much like using any popup. > > Below is a snippet from one of my apps (this goes into your event > handler function). Unfortunately can't give away more than this. > Basically you declare a global variable popup at the top of your page. > > Where I have the innerhtmlgoeshere is where you would stuff the html you > normally stuff in the div.innerHTML (I think the rest of the code in > the FeatureInfo stays pretty much the same) > > var tolerance = new OpenLayers.Pixel(6, 6); > var min_px = new OpenLayers.Pixel( > e.xy.x - tolerance.x, e.xy.y + > tolerance.y); > var max_px = new OpenLayers.Pixel( > e.xy.x + tolerance.x, e.xy.y - > tolerance.y); > var min_ll = map.getLonLatFromPixel(min_px); > var max_ll = map.getLonLatFromPixel(max_px); > > > if (popup){ > popup.destroy(); > popup = null; > } > popup = new OpenLayers.Popup.FramedCloud("property", > > new > OpenLayers.LonLat(min_ll.lon,min_ll.lat), > new OpenLayers.Size(400,500), > innerhtmlgoeshere, null, true); > map.addPopup(popup); > > > Hope that helps, > Regina > > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Alessio Di Lorenzo > Sent: Sunday, June 08, 2008 8:03 AM > To: OpenLayers ML > Subject: [OpenLayers-Users] GetFeatureInfo in a FrameCloud popup > > Hi list, > > I'd like to obtain the WMS GetFeatureInfo response in a framecloud popup > > instead in a separate frame/div (as displayed in the example at > http://openlayers.org/dev/examples/example-list.html ). > > Is it possible? Are there any working examples that I can view? > > thaks in advance, alessio > > _______________________________________________ > 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 aschwartz at solidworks.com Mon Jun 9 22:34:22 2008 From: aschwartz at solidworks.com (aschwartz) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Externally toggle a marker's popup Message-ID: <17746551.post@talk.nabble.com> Hello all, I am trying to figure out how to toggle a marker's popup externally by clicking a link. I'm hoping to use javascript: notation to accomplish this, either by using entirely inline javascript or by calling some other function (that I'm not sure how to write.) Thanks in advance. -Alex -- View this message in context: http://www.nabble.com/Externally-toggle-a-marker%27s-popup-tp17746551p17746551.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From smithlev at levii.com Tue Jun 10 04:09:46 2008 From: smithlev at levii.com (Levii Smith) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Problem with Loadingpanel and GeoRSS Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080610/a0c119d2/attachment.html From bartvde at osgis.nl Tue Jun 10 04:44:18 2008 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Problem with Loadingpanel and GeoRSS In-Reply-To: References: Message-ID: This seems to be a bug in the GeoRSS Layer. It triggers the loadstart event twice. The loadRSS function does this already, but the moveTo does it as well. I've changed the code below (comment out the loadstart triggerEvent call in moveTo). moveTo:function(bounds, zoomChanged, minor) { OpenLayers.Layer.Markers.prototype.moveTo.apply(this, arguments); if(this.visibility && !this.loaded){ //this.events.triggerEvent("loadstart"); this.loadRSS(); } I'll open up a bug for this. Let me know if this works for you as well. Best regards, Bart On Tue, 10 Jun 2008 04:09:46 -0400, "Levii Smith" wrote: > > > I'm having a problem with the LoadingPanel from the Addins. I'm > loading like > > ??var loadingpanel = new OpenLayers.Control.LoadingPanel(); > ???map.addControl(loadingpanel); > > It works great for WMS layers and normal panning, but when I add a > GeoRSS layer to the map, it never stops with the loading graphic. > > Any ideas? > > Thanks, > Levii > > From ks at geograf.dk Tue Jun 10 06:44:52 2008 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Handling double click In-Reply-To: <5ec103de0806091159u2998eac0uf02f9253c997ef5f@mail.gmail.com> References: <483169A4.3040201@geograf.dk> <5ec103de0805190954g1f274a91se643a9f92af8de4@mail.gmail.com> <484D29EE.3050907@geograf.dk> <5ec103de0806090949l4de8252ale24c46527a743279@mail.gmail.com> <484D7475.3020100@geograf.dk> <5ec103de0806091159u2998eac0uf02f9253c997ef5f@mail.gmail.com> Message-ID: <484E5B24.9020800@geograf.dk> Yes, that seems to be the problem. The mousedown/mouseup should not be handled if the event is a click or double click. But the code cannot determine if it is a click or double click when the mouseup/down occurs. Delaying the event will likely cause a very bad user experience. Well, the conclusion is: It cannot be done. Thank you for looking at it. Regards, Kenneth Skovhede, GEOGRAF A/S Eric Lemoine skrev: > On Mon, Jun 9, 2008 at 8:20 PM, Kenneth Skovhede, GEOGRAF A/S > wrote: > >> Yes. I have the problem even though I always activate the click handler >> last. >> >> As always, the actual code is deep within a lot of unrelated code. >> >> I have constructed the following example to illustrate my point. >> I would expect that "doubleclick" and "click" would override the >> draghandler, but it does not. >> > > Thanks for the example, this helped me understand why you want. And I > think that what you want cannot be achieved. The click handler doesn't > care about the mousedown event so it lets it propagate. If the click > handler prevented the mousedown event from propaging that wouldn't > help you either, because (once the click handler activated) the box > handler will *never* see mousedown events. Try the following to > understand the latter: > > // append these lines after creating the click handler > var clickhandler_mousedown = dblclick.mousedown; > clickhandler.mousedown = function(evt) { > clickhandler_mousedown.call(clickhandler, evt); > return false; // prevent propagation > }; > > -- > Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080610/cca6c763/attachment.html From alperd.liste at gmail.com Tue Jun 10 06:48:32 2008 From: alperd.liste at gmail.com (=?ISO-8859-1?Q?Alper_Din=E7er?=) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Projection support Message-ID: Hi, I have a google map as a base in OpenLayers 2.6. I want to get the lat/lng value on the map in EPSG 23036 (ED50 - UTM Zone 36N) projection. I google it, but I didn't find any example about this issue. Is there any example for projection support? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080610/82cb35cb/attachment.html From pagameba at gmail.com Tue Jun 10 07:40:05 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Projection support In-Reply-To: References: Message-ID: Hi, you need to include proj4js.js (http://proj4js.org/) in your web page and then you can do something like: var position = map.getCenter(); position.transform(new OpenLayers.Projection('EPSG:900913'), new OpenLayers.Projection('EPSG:23036')); I'm not sure if proj4js will automatically know that 23036 is a UTM projection or not, you may need to set it up (a question for the proj4js perhaps) Cheers Paul On 10-Jun-08, at 6:48 AM, Alper Din?er wrote: > Hi, > > I have a google map as a base in OpenLayers 2.6. I want to get the > lat/lng value on the map in EPSG 23036 (ED50 - UTM Zone 36N) > projection. > > I google it, but I didn't find any example about this issue. > > Is there any example for projection support? > > Thanks. > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From smithlev at levii.com Tue Jun 10 08:42:44 2008 From: smithlev at levii.com (Levii Smith) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] [OPENLAYERS-USERS] PROBLEM WITH LOADINGPANEL AND GEORSS In-Reply-To: <355723eff4b1131936299ac35cac40d0@pop02.backbone.tiscomhosting.nl> Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080610/44d606f7/attachment.html From drrobison at openroadsconsulting.com Tue Jun 10 10:31:49 2008 From: drrobison at openroadsconsulting.com (David R Robison) Date: Wed Sep 1 17:16:21 2010 Subject: [OpenLayers-Users] Problem clicking on a map (OL-2.5) - RESOLVED In-Reply-To: <5ec103de0806052329y132922b6hbe904455a6316fdd@mail.gmail.com> References: <4846CBB7.8070405@winwaed.com> <484811C4.7040405@openroadsconsulting.com> <5ec103de0806052329y132922b6hbe904455a6316fdd@mail.gmail.com> Message-ID: <484E9055.8050900@openroadsconsulting.com> I found the problem... On my page I have a fixed header and footer and a client region with the style "overflow: scroll". The problem is in getMousePosition: getMousePosition: function (evt) { if (!this.element.offsets) { this.element.offsets = OpenLayers.Util.pagePosition(this.element); this.element.offsets[0] += (document.documentElement.scrollLeft || document.body.scrollLeft); this.element.offsets[1] += (document.documentElement.scrollTop || document.body.scrollTop); } return new OpenLayers.Pixel( (evt.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft)) - this.element.offsets[0] - (document.documentElement.clientLeft || 0), (evt.clientY + (document.documentElement.scrollTop || document.body.scrollTop)) - this.element.offsets[1] - (document.documentElement.clientTop || 0) ); }, The first conditional "caches" the offsets. However, if the client area is scrolled, the new positions are not recalculated. If I comment out the conditional, then everything works great. I'm not sure this is clear... Any thoughts? David Eric Lemoine wrote: > On Thu, Jun 5, 2008 at 6:18 PM, David R Robison > wrote: > >> We are having a pecular problem when clicking on a map. The map is on a >> large web page. If the page is scrolled partway down (not positioned at >> the top of the map), clicking on the map will return an XY position that >> is above the actual click. If we scroll the page back to the top, then >> the clicking works. We are using OL-2.5. Has anyone else experienced >> this? >> > > No. Do you a public page where we can see that, or some code for > someone to reproduce? > > >> Was it fixed in 2.6? >> > > Dunno. > > >> Thanks, David Robison >> > > -- > Eric > -- David R Robison Open Roads Consulting, Inc. 708 S. Battlefield Blvd., Chesapeake, VA 23322 phone: (757) 546-3401 e-mail: drrobison@openroadsconsulting.com web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/book_detail.php?id=2579 This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited. If you have received this communication in error, please notify us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080610/6b615d46/attachment.html From crschmidt at metacarta.com Tue Jun 10 10:36:59 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Problem clicking on a map (OL-2.5) - RESOLVED In-Reply-To: <484E9055.8050900@openroadsconsulting.com> References: <4846CBB7.8070405@winwaed.com> <484811C4.7040405@openroadsconsulting.com> <5ec103de0806052329y132922b6hbe904455a6316fdd@mail.gmail.com> <484E9055.8050900@openroadsconsulting.com> Message-ID: <20080610143659.GA19762@metacarta.com> On Tue, Jun 10, 2008 at 10:31:49AM -0400, David R Robison wrote: > I found the problem... On my page I have a fixed header and footer and a > client region with the style "overflow: scroll". The problem is in > getMousePosition: > > getMousePosition: function (evt) { > if (!this.element.offsets) { > this.element.offsets = > OpenLayers.Util.pagePosition(this.element); > this.element.offsets[0] += (document.documentElement.scrollLeft > || document.body.scrollLeft); > this.element.offsets[1] += (document.documentElement.scrollTop > || document.body.scrollTop); > } > return new OpenLayers.Pixel( > (evt.clientX + (document.documentElement.scrollLeft > || document.body.scrollLeft)) - > this.element.offsets[0] > - (document.documentElement.clientLeft || 0), > (evt.clientY + (document.documentElement.scrollTop > || document.body.scrollTop)) - > this.element.offsets[1] > - (document.documentElement.clientTop || 0) > ); > }, > > The first conditional "caches" the offsets. However, if the client area > is scrolled, the new positions are not recalculated. If I comment out > the conditional, then everything works great. I'm not sure this is > clear... Any thoughts? David If the position of the map within the page changes, call 'map.updateSize()' (which clears out the offsets). The offsets are cached for performance reasons -- though I'll admit that that was originally done in the FF 1.0 series, and may no longer be particularly important. If you could figure out a way to have the map figure out when it has changed positions, and update the cache accordingly, a patch would be great. > > Eric Lemoine wrote: > >On Thu, Jun 5, 2008 at 6:18 PM, David R Robison > > wrote: > > > >>We are having a pecular problem when clicking on a map. The map is on a > >>large web page. If the page is scrolled partway down (not positioned at > >>the top of the map), clicking on the map will return an XY position that > >>is above the actual click. If we scroll the page back to the top, then > >>the clicking works. We are using OL-2.5. Has anyone else experienced > >>this? > >> > > > >No. Do you a public page where we can see that, or some code for > >someone to reproduce? > > > > > >>Was it fixed in 2.6? > >> > > > >Dunno. > > > > > >>Thanks, David Robison > >> > > > >-- > >Eric > > > > -- > > David R Robison > Open Roads Consulting, Inc. > 708 S. Battlefield Blvd., Chesapeake, VA 23322 > phone: (757) 546-3401 > e-mail: drrobison@openroadsconsulting.com > web: http://openroadsconsulting.com > blog: http://therobe.blogspot.com > book: http://www.xulonpress.com/book_detail.php?id=2579 > > This e-mail communication (including any attachments) may contain > confidential and/or privileged material intended solely for the individual > or entity to which it is addressed. If you are not the intended recipient, > you should immediately stop reading this message and delete it from all > computers that it resides on. Any unauthorized reading, distribution, > copying or other use of this communication (or its attachments) is strictly > prohibited. If you have received this communication in error, please > notify us immediately. > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From drrobison at openroadsconsulting.com Tue Jun 10 10:39:21 2008 From: drrobison at openroadsconsulting.com (David R Robison) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Problem clicking on a map (OL-2.5) - RESOLVED In-Reply-To: <20080610143659.GA19762@metacarta.com> References: <4846CBB7.8070405@winwaed.com> <484811C4.7040405@openroadsconsulting.com> <5ec103de0806052329y132922b6hbe904455a6316fdd@mail.gmail.com> <484E9055.8050900@openroadsconsulting.com> <20080610143659.GA19762@metacarta.com> Message-ID: <484E9219.6000405@openroadsconsulting.com> For now, I have just removed the "if" condition and calculate the offset every time. I'll look to see if performance suffers. David Christopher Schmidt wrote: > On Tue, Jun 10, 2008 at 10:31:49AM -0400, David R Robison wrote: > >> I found the problem... On my page I have a fixed header and footer and a >> client region with the style "overflow: scroll". The problem is in >> getMousePosition: >> >> getMousePosition: function (evt) { >> if (!this.element.offsets) { >> this.element.offsets = >> OpenLayers.Util.pagePosition(this.element); >> this.element.offsets[0] += (document.documentElement.scrollLeft >> || document.body.scrollLeft); >> this.element.offsets[1] += (document.documentElement.scrollTop >> || document.body.scrollTop); >> } >> return new OpenLayers.Pixel( >> (evt.clientX + (document.documentElement.scrollLeft >> || document.body.scrollLeft)) - >> this.element.offsets[0] >> - (document.documentElement.clientLeft || 0), >> (evt.clientY + (document.documentElement.scrollTop >> || document.body.scrollTop)) - >> this.element.offsets[1] >> - (document.documentElement.clientTop || 0) >> ); >> }, >> >> The first conditional "caches" the offsets. However, if the client area >> is scrolled, the new positions are not recalculated. If I comment out >> the conditional, then everything works great. I'm not sure this is >> clear... Any thoughts? David >> > > If the position of the map within the page changes, call > 'map.updateSize()' (which clears out the offsets). > > The offsets are cached for performance reasons -- though I'll admit that > that was originally done in the FF 1.0 series, and may no longer be > particularly important. If you could figure out a way to have the map > figure out when it has changed positions, and update the cache > accordingly, a patch would be great. > > >> Eric Lemoine wrote: >> >>> On Thu, Jun 5, 2008 at 6:18 PM, David R Robison >>> wrote: >>> >>> >>>> We are having a pecular problem when clicking on a map. The map is on a >>>> large web page. If the page is scrolled partway down (not positioned at >>>> the top of the map), clicking on the map will return an XY position that >>>> is above the actual click. If we scroll the page back to the top, then >>>> the clicking works. We are using OL-2.5. Has anyone else experienced >>>> this? >>>> >>>> >>> No. Do you a public page where we can see that, or some code for >>> someone to reproduce? >>> >>> >>> >>>> Was it fixed in 2.6? >>>> >>>> >>> Dunno. >>> >>> >>> >>>> Thanks, David Robison >>>> >>>> >>> -- >>> Eric >>> >>> >> -- >> >> David R Robison >> Open Roads Consulting, Inc. >> 708 S. Battlefield Blvd., Chesapeake, VA 23322 >> phone: (757) 546-3401 >> e-mail: drrobison@openroadsconsulting.com >> web: http://openroadsconsulting.com >> blog: http://therobe.blogspot.com >> book: http://www.xulonpress.com/book_detail.php?id=2579 >> >> This e-mail communication (including any attachments) may contain >> confidential and/or privileged material intended solely for the individual >> or entity to which it is addressed. If you are not the intended recipient, >> you should immediately stop reading this message and delete it from all >> computers that it resides on. Any unauthorized reading, distribution, >> copying or other use of this communication (or its attachments) is strictly >> prohibited. If you have received this communication in error, please >> notify us immediately. >> >> >> >> >> > > >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > > -- David R Robison Open Roads Consulting, Inc. 708 S. Battlefield Blvd., Chesapeake, VA 23322 phone: (757) 546-3401 e-mail: drrobison@openroadsconsulting.com web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/book_detail.php?id=2579 This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited. If you have received this communication in error, please notify us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080610/e73543a0/attachment.html From hcan at hotmail.com Tue Jun 10 16:55:32 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] minResolution and maxResolution not working for base layer Message-ID: <17764454.post@talk.nabble.com> Hi List! I have two wms base layers. I want one of them to be enabled only within a specific zoom range. This is working for my overlays, but I can not get it to work for the base layer. For the overlays I just set the properites like this: wmsLayer.minResolution = 1.0; wmsLayer.maxResolution = 10.0; Is there somthing eles that I have to do to get it working for the base layer? -Z -- View this message in context: http://www.nabble.com/minResolution-and-maxResolution-not-working-for-base-layer-tp17764454p17764454.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From rajchundur at gmail.com Wed Jun 11 00:53:24 2008 From: rajchundur at gmail.com (Raj Chundur) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Map Destroy Call generating error Message-ID: <21fcb6f90806102153v5183268j842663a482b764ac@mail.gmail.com> I have incorporated openlayers in a rich internet application with the map inside a dialog window that can be opened and closed without page refresh.I have been getting some heavy memory leaks even though I had dereferenced the openayers map object. In order to avoid memory leak and ensure that the openlayers map is destroyed when the dialog hosting the openlayers map is closed i tried calling the map.destroy. However the call to map.destroy fails at two places. One is on the overview map which has a single layer of type openlayers.layer.image. So removed the overview conrol. The second is on a tiled kamap layer though other kamap layers are destroyed without error. (The base layer is of type openlayers.layer.iamge type)) Trying to debug leads upto the clear grid on the httprequest..js where the error happens with "element has no property". Have spent considerable time trying to figure out the cause. Any help? RC -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080611/d08196a9/attachment.html From smithlev at levii.com Wed Jun 11 04:22:55 2008 From: smithlev at levii.com (Levii Smith) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080611/cb69538b/attachment.html From grimm at geops.de Wed Jun 11 04:48:27 2008 From: grimm at geops.de (Kirsten Grimm [geOps]) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Delete polygon/line vertices in IE Message-ID: <484F915B.7060903@geops.de> Hello, when trying to delete polygon or line vertices with the ModifyFeature Control in IE7, nothing happens, the keypress event isn't fired. In FF everything works fine. Is there a solution for this problem? Thanks, Kirsten From crschmidt at metacarta.com Wed Jun 11 07:10:30 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Delete polygon/line vertices in IE In-Reply-To: <484F915B.7060903@geops.de> References: <484F915B.7060903@geops.de> Message-ID: <20080611111030.GC14467@metacarta.com> On Wed, Jun 11, 2008 at 10:48:27AM +0200, Kirsten Grimm [geOps] wrote: > Hello, > when trying to delete polygon or line vertices with the ModifyFeature > Control in IE7, nothing happens, the keypress event isn't fired. In > FF everything works fine. Is there a solution for this problem? No, but there is a Trac ticket -- and patches are welcome. #864 KeyboardDefaults broken in IE #1292 keyboardDefaults broken in Safari 3 Regards, -- Christopher Schmidt MetaCarta From aschwartz at solidworks.com Wed Jun 11 10:17:50 2008 From: aschwartz at solidworks.com (aschwartz) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Externally toggle a marker's popup In-Reply-To: <17746551.post@talk.nabble.com> References: <17746551.post@talk.nabble.com> Message-ID: <17778863.post@talk.nabble.com> Sorry, Nabble stripped my code line. What i wrote was I'm hoping to use < a href="javascript:" < /a > notation or something of that nature. -Alex aschwartz wrote: > > Hello all, > > I am trying to figure out how to toggle a marker's popup externally by > clicking a link. > > I'm hoping to use javascript: notation to accomplish this, either by > using entirely inline javascript or by calling some other function (that > I'm not sure how to write.) > > Thanks in advance. > > -Alex > -- View this message in context: http://www.nabble.com/Externally-toggle-a-marker%27s-popup-tp17746551p17778863.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From oscar.fonts.lists at gmail.com Wed Jun 11 13:44:22 2008 From: oscar.fonts.lists at gmail.com (Oscar Fonts) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Delete polygon/line vertices in IE In-Reply-To: <20080611111030.GC14467@metacarta.com> References: <484F915B.7060903@geops.de> <20080611111030.GC14467@metacarta.com> Message-ID: Kirsten, This code will work, at least for ModifyFeature in IE6 & IE7 (just changed "window" to "document", see #1108): // Patch on Keyboard Handler for IE OpenLayers.Handler.Keyboard.prototype.activate = function() { if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) { for (var i = 0; i < this.KEY_EVENTS.length; i++) { OpenLayers.Event.observe( document, this.KEY_EVENTS[i], this.eventListener); } return true; } else { return false; } }; OpenLayers.Handler.Keyboard.prototype.deactivate = function() { var deactivated = false; if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { for (var i = 0; i < this.KEY_EVENTS.length; i++) { OpenLayers.Event.stopObserving( document, this.KEY_EVENTS[i], this.eventListener); } deactivated = true; } return deactivated; }; Working example: http://www.icc.cat/vissir2/?lang=en_UK => measure tools. I don't know how to create/use patches, yet. Oscar. 2008/6/11 Christopher Schmidt : > On Wed, Jun 11, 2008 at 10:48:27AM +0200, Kirsten Grimm [geOps] wrote: > > Hello, > > when trying to delete polygon or line vertices with the ModifyFeature > > Control in IE7, nothing happens, the keypress event isn't fired. In > > FF everything works fine. Is there a solution for this problem? > > No, but there is a Trac ticket -- and patches are welcome. > > #864 > KeyboardDefaults broken in IE > #1292 > keyboardDefaults broken in Safari 3 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080611/1f4d01a9/attachment.html From kusum at infobase.in Thu Jun 12 01:26:29 2008 From: kusum at infobase.in (Kusum) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Addition of grid Message-ID: <65B7E30B0A214913A1094999A3C0D17B@kusum> Hii All Can somebody please suggest me how to add grid on map?? Also how can we change projection of map?? please provide path of some example or some code for help as I have already messed a lot with this. Regards Kusum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080612/c6623759/attachment.html From smithlev at levii.com Thu Jun 12 04:23:25 2008 From: smithlev at levii.com (Levii Smith) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Has anyone tried animation / or how to? Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080612/0094fcb9/attachment.html From pagameba at gmail.com Thu Jun 12 07:18:59 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Addition of grid In-Reply-To: <65B7E30B0A214913A1094999A3C0D17B@kusum> References: <65B7E30B0A214913A1094999A3C0D17B@kusum> Message-ID: <50A7B26C-9DFD-4BE3-8190-DF7DD2B35B2C@gmail.com> Hi Kusum, Producing maps in different projections is not part of OpenLayers mandate - it just displays them. OpenLayers doesn't really care about projections much, so its pretty easy to pull in maps that are in different projections. You just need to know some stuff about what you are pulling in. * when creating a new OpenLayers.Map instance, you can specify a projection parameter in the options to say what projection the map is in - this is not absolutely necessary, OpenLayers will not use this to reproject your map, but it can be used with some controls to reproject output of, say mouse coordinates, from the map projection into something more recognizable (usually lon/lat values). You probably need to include proj4js (http://proj4js.org/) if you want to reproject coordinates. * you should specify the 'units' for the map (or the base layer) correctly. OpenLayers assumes a unit value of 'dd' (decimal degrees) but projected maps often have units in 'm' (meters) or 'ft' etc. It depends on the projection of the map, this is something you have to know. * you should specify the minResolution and maxResolution, and the maxExtent of the map (or the base layer). Resolution is a measure of ground units per pixel. The defaults are reasonable for decimal degrees so if your projection is not in decimal degrees then the defaults will be wildly wrong and you'll have problems. Same for maxExtent (by default this is new OpenLayers.Bounds(-180,-90,180,90)) As to examples, I suggest that you spend some time reviewing the extensive examples provided with the source - there are several examples of working with maps in other projections (specifically with SphericalMercator projection) Cheers Paul On 12-Jun-08, at 1:26 AM, Kusum wrote: > Hii All > > Can somebody please suggest me how to add grid on map?? > Also how can we change projection of map?? > > please provide path of some example or some code for help as I have > already messed a lot with this. > > Regards > Kusum > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From eider at fh-bingen.de Thu Jun 12 07:50:35 2008 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Callbacks on DrawFeature and Polygon Message-ID: <48510D8B.5010105@fh-bingen.de> Hi Folks, I tried to setup a callback when drawing a new polygon is finished, but polygon: new OpenLayers.Control.DrawFeature(bridge.fieldLayer, OpenLayers.Handler.Polygon,{done:newFieldEnd,point:newFieldEnd}) doesn't work, where as modify: new OpenLayers.Control.ModifyFeature(bridge.fieldLayer,{onModificationEnd:newFieldEnd}) works great. Any suggestions? Thx Carsten -- Mit freundlichen Gr??en / Yours faithfully Carsten Eider Dipl. Inf. (FH) Kompetenzzentrum f?r Innovative Informationssysteme c/o Fachhochschhule Bingen / University of applied sciences Bingen Berlinstra?e 109 55411 Bingen Tel: +49 (0) 6721 / 409-179 Fax: +49 (0) 6721 / 409-158 email: eider@fh-bingen.de Internet: iis.fh-bingen.de -------------- 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/20080612/ba6eb021/eider.vcf From giohappy at gmail.com Thu Jun 12 07:54:31 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs Message-ID: Hello list. I need to call a wfs to retrieve a multipolygon vector layer. As it's quite huge (about 15000 vertices), I'd like to call it once (full extent) and then "copy" it in a vector object to avoid calling wfs when zooming and panning. I've taken a look to the featureClass option, but it doesn't seem to make my work. Maybe the right way should to store the parsed GML in a vector feature, but I haven't understood well the workflow between Layer.WFS, Feature.WFS, Format.WFS and Tile.WFS... Could anyone give me an advice on how to solve it (if it's reasonable)? Thanks Giovanni From eric.c2c at gmail.com Thu Jun 12 07:59:46 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Callbacks on DrawFeature and Polygon In-Reply-To: <48510D8B.5010105@fh-bingen.de> References: <48510D8B.5010105@fh-bingen.de> Message-ID: <5ec103de0806120459j7c7faf26i32299a813e5ac9fd@mail.gmail.com> On Thu, Jun 12, 2008 at 1:50 PM, Dipl. Inf. Carsten Eider wrote: > Hi Folks, > > I tried to setup a callback when drawing a new polygon is finished, but > > polygon: new OpenLayers.Control.DrawFeature(bridge.fieldLayer, > > OpenLayers.Handler.Polygon,{done:newFieldEnd,point:newFieldEnd}) Try: new OpenLayers.Control.DrawFeature( bridge.fieldLayer, OpenLayers.Handler.Polygon, { 'featureAdded': function(feature) { console.log(feature); } }); -- Eric From crschmidt at metacarta.com Thu Jun 12 08:31:18 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: References: Message-ID: <20080612123118.GC9288@metacarta.com> On Thu, Jun 12, 2008 at 01:54:31PM +0200, G. Allegri wrote: > Hello list. > I need to call a wfs to retrieve a multipolygon vector layer. As it's > quite huge (about 15000 vertices), I'd like to call it once (full > extent) and then "copy" it in a vector object to avoid calling wfs > when zooming and panning. In this case, you probably just want to use Layer.GML. Layer.GML takes a single URL and loads remote data based on it, and does not update when the map extent changes. Layer.WFS is really "Layer.LoadDataWhenDraggingAround": if you just want Layer.LoadData, then use Layer.GML. Regards, -- Christopher Schmidt MetaCarta From giohappy at gmail.com Thu Jun 12 08:34:49 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: <20080612123118.GC9288@metacarta.com> References: <20080612123118.GC9288@metacarta.com> Message-ID: Ok, I had already tried Layer.GML putting the whole wfs request url inside it, but it didn't seem to work... OpenLayers.Layer.GML("IET_GML","http://localhost/IETclient/wxsIET.php?TYPENAME=ammsimple3&FORMAT=GML&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A3003&BBOX=1612519,5108846.747534517,1661798.7475345167,5158126.495069034") What's wrong with this? 2008/6/12 Christopher Schmidt : > On Thu, Jun 12, 2008 at 01:54:31PM +0200, G. Allegri wrote: >> Hello list. >> I need to call a wfs to retrieve a multipolygon vector layer. As it's >> quite huge (about 15000 vertices), I'd like to call it once (full >> extent) and then "copy" it in a vector object to avoid calling wfs >> when zooming and panning. > > In this case, you probably just want to use Layer.GML. Layer.GML takes a > single URL and loads remote data based on it, and does not update when > the map extent changes. Layer.WFS is really > "Layer.LoadDataWhenDraggingAround": if you just want Layer.LoadData, > then use Layer.GML. > > Regards, > -- > Christopher Schmidt > MetaCarta > From f.vanderbiest at gmail.com Thu Jun 12 08:36:56 2008 From: f.vanderbiest at gmail.com (=?ISO-8859-1?Q?Fran=E7ois_Van_Der_Biest?=) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: References: Message-ID: <86169bba0806120536s4d14f480xf42ac39e701795bb@mail.gmail.com> 2008/6/12, G. Allegri : > > Hello list. > I need to call a wfs to retrieve a multipolygon vector layer. As it's > quite huge (about 15000 vertices), I'd like to call it once (full > extent) and then "copy" it in a vector object to avoid calling wfs > when zooming and panning. Just one question : will browsers be able to handle such an amount of data ? I'm interested in some feedback on this. F. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080612/1d5d5053/attachment.html From giohappy at gmail.com Thu Jun 12 08:38:35 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: <86169bba0806120536s4d14f480xf42ac39e701795bb@mail.gmail.com> References: <86169bba0806120536s4d14f480xf42ac39e701795bb@mail.gmail.com> Message-ID: AFAIK the SVG engine limit in Firefox is about 25.000 points. I heard something about it months ago, but I don't know if there are official benchmarks. Anyway, my GML is dispplaying correctly, and hover selection is quite responsive... 2008/6/12 Fran?ois Van Der Biest : > > 2008/6/12, G. Allegri : >> >> Hello list. >> I need to call a wfs to retrieve a multipolygon vector layer. As it's >> quite huge (about 15000 vertices), I'd like to call it once (full >> extent) and then "copy" it in a vector object to avoid calling wfs >> when zooming and panning. > > Just one question : will browsers be able to handle such an amount of data ? > I'm interested in some feedback on this. > > F. > From crschmidt at metacarta.com Thu Jun 12 08:41:23 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: <86169bba0806120536s4d14f480xf42ac39e701795bb@mail.gmail.com> References: <86169bba0806120536s4d14f480xf42ac39e701795bb@mail.gmail.com> Message-ID: <20080612124123.GA9340@metacarta.com> On Thu, Jun 12, 2008 at 02:36:56PM +0200, Fran?ois Van Der Biest wrote: > 2008/6/12, G. Allegri : > > > > Hello list. > > I need to call a wfs to retrieve a multipolygon vector layer. As it's > > quite huge (about 15000 vertices), I'd like to call it once (full > > extent) and then "copy" it in a vector object to avoid calling wfs > > when zooming and panning. > > > Just one question : will browsers be able to handle such an amount of data ? > I'm interested in some feedback on this. Depending on the browser, 'sort of'. FF3 and Safari3 should handle this reasonably well. FF2 will work *okay* for display, but dragging the map will be slow: as you are more zoomed in on a large shape (less vertices in view) the rendering gets quicker. If you don't do map dragging, it's not noticably slow to do most of these things. For an example of a pretty complex vector map, you can check out http://crschmidt.net/mapping/choropleth.html -- I don't know the exact number of vertices, but 'large' is not an understatement :) I expect that parsing an XML document that large may prove problematic: anything larger than 500k is somewhat 'danger, danger', in my mind. If it were 7500 features of two vertices, it would be much slower than if it were 1 feature with 15000 vertices. In any case, in IE, you wouldn't even bother trying at this size. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Thu Jun 12 08:42:27 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: References: <20080612123118.GC9288@metacarta.com> Message-ID: <20080612124227.GB9340@metacarta.com> On Thu, Jun 12, 2008 at 02:34:49PM +0200, G. Allegri wrote: > Ok, I had already tried Layer.GML putting the whole wfs request url > inside it, but it didn't seem to work... > > OpenLayers.Layer.GML("IET_GML","http://localhost/IETclient/wxsIET.php?TYPENAME=ammsimple3&FORMAT=GML&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A3003&BBOX=1612519,5108846.747534517,1661798.7475345167,5158126.495069034") > > What's wrong with this? Looks fine to me. You'll need to be more explicit about what 'doesn't work' means -- preferably, by puttin together a simple xaple. One thing that I would try would be to downloada the WFS data to a file, and try loading just that file, to see if it works any better for you. Regards, -- Christopher Schmidt MetaCarta From besse.pb at gmail.com Thu Jun 12 08:46:12 2008 From: besse.pb at gmail.com (Faldor) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Changing parameters on the fly on MapServer layers Message-ID: <17799139.post@talk.nabble.com> Hi all, I need to let users customize the display of some layers without reloading the entire page. Is there any way to change parameters on the fly to MapServer layers ? I did not find it in the OpenLayers API. Best Regards -- View this message in context: http://www.nabble.com/Changing-parameters-on-the-fly-on-MapServer-layers-tp17799139p17799139.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jdb at mail.nerc-essc.ac.uk Thu Jun 12 08:47:05 2008 From: jdb at mail.nerc-essc.ac.uk (Jon Blower) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Has anyone tried animation / or how to? Message-ID: <2bb6ee950806120547k374d0d8eic141a8683cd6942a@mail.gmail.com> Hi Levii, Our OpenLayers-based site (http://www.reading.ac.uk/godiva2) supports animation of WMS layers but does so because the WMS in question can generate animated GIFs if you give it a time range. This is not ideal because if you want to synchronize some other UI feature with the animation (e.g. a time indicator or another animation) you can't because you have no control over animation rates etc. I think the only way to have this synchronization is to do animation in javascript but I haven't investigated this in detail. I'd be interested in anything you come up with and perhaps we could work together if we end up wanting the same thing? Cheers, Jon ---------- Forwarded message ---------- From: "Levii Smith" To: users@openlayers.org Date: Thu, 12 Jun 2008 04:23:25 -0400 Subject: [OpenLayers-Users] Has anyone tried animation / or how to? Just a thought as I work on this...I'm going to attempt to run an animation of WMS layers. I've seen the example of using TIME in WMS...has anyone tried animating WMS layers in time (I'm trying to loop satellite imagery if you're curious)...any ideas how to do it - or how to keep multiple layers in sync while doing it? //Levii -- -------------------------------------------------------------- Dr Jon Blower Tel: +44 118 378 5213 (direct line) Technical Director Tel: +44 118 378 8741 (ESSC) Reading e-Science Centre Fax: +44 118 378 6413 ESSC Email: jdb@mail.nerc-essc.ac.uk University of Reading 3 Earley Gate Reading RG6 6AL, UK -------------------------------------------------------------- From giohappy at gmail.com Thu Jun 12 08:52:41 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: <20080612124227.GB9340@metacarta.com> References: <20080612123118.GC9288@metacarta.com> <20080612124227.GB9340@metacarta.com> Message-ID: I get the following error: this.initialize has no properties It's the same if I save the GML locally. I could reach my task creating a Vector layer inside Tile.WFS.requestSuccess(), but I prefer to solve it using GML layer as it's more clear and it saves lines of code. Following I attached a little excerpt from my code... 2008/6/12 Christopher Schmidt : > On Thu, Jun 12, 2008 at 02:34:49PM +0200, G. Allegri wrote: >> Ok, I had already tried Layer.GML putting the whole wfs request url >> inside it, but it didn't seem to work... >> >> OpenLayers.Layer.GML("IET_GML","http://localhost/IETclient/wxsIET.php?TYPENAME=ammsimple3&FORMAT=GML&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A3003&BBOX=1612519,5108846.747534517,1661798.7475345167,5158126.495069034") >> >> What's wrong with this? > > > Looks fine to me. You'll need to be more explicit about what 'doesn't > work' means -- preferably, by puttin together a simple xaple. One thing > that I would try would be to downloada the WFS data to a file, and try > loading just that file, to see if it works any better for you. > > Regards, > -- > Christopher Schmidt > MetaCarta > From giohappy at gmail.com Thu Jun 12 08:55:29 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: <20080612124123.GA9340@metacarta.com> References: <86169bba0806120536s4d14f480xf42ac39e701795bb@mail.gmail.com> <20080612124123.GA9340@metacarta.com> Message-ID: > If it were 7500 features of two vertices, it would be much slower than > if it were 1 feature with 15000 vertices. In my case I have 254 polygons with about 15000 points, coming from a generalization of th original 220000 points (!!!). The resulting GML is about 150Kb, and eveything works very well, but I prefer to avoid wfs calls as much as possible, as they aren't needed when zooming or panning on the datas... From besse.pb at gmail.com Thu Jun 12 09:26:07 2008 From: besse.pb at gmail.com (Pierre-Benoit Besse) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Changing parameters on the fly on MapServer layers In-Reply-To: <17799139.post@talk.nabble.com> References: <17799139.post@talk.nabble.com> Message-ID: Nevermind, I have it, mergeNewParam from HTTPRequest... Sorry for the trouble 2008/6/12 Faldor : > > Hi all, > > I need to let users customize the display of some layers without reloading > the entire page. > > Is there any way to change parameters on the fly to MapServer layers ? > I did not find it in the OpenLayers API. > > Best Regards > -- > View this message in context: > http://www.nabble.com/Changing-parameters-on-the-fly-on-MapServer-layers-tp17799139p17799139.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/20080612/013fde46/attachment.html From giohappy at gmail.com Thu Jun 12 09:33:49 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: References: <20080612123118.GC9288@metacarta.com> <20080612124227.GB9340@metacarta.com> Message-ID: Maybe it can help: the WFS service is provided by Mapserver, so The GML produced contains wfs elements (i.e. : > I get the fo > > this.initialize has no properties > > It's the same if I save the GML locally. > I could reach my task creating a Vector layer inside > Tile.WFS.requestSuccess(), but I prefer to solve it using GML layer as > it's more clear and it saves lines of code. > Following I attached a little excerpt from my code... > > > > 2008/6/12 Christopher Schmidt : >> On Thu, Jun 12, 2008 at 02:34:49PM +0200, G. Allegri wrote: >>> Ok, I had already tried Layer.GML putting the whole wfs request url >>> inside it, but it didn't seem to work... >>> >>> OpenLayers.Layer.GML("IET_GML","http://localhost/IETclient/wxsIET.php?TYPENAME=ammsimple3&FORMAT=GML&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A3003&BBOX=1612519,5108846.747534517,1661798.7475345167,5158126.495069034") >>> >>> What's wrong with this? >> >> >> Looks fine to me. You'll need to be more explicit about what 'doesn't >> work' means -- preferably, by puttin together a simple xaple. One thing >> that I would try would be to downloada the WFS data to a file, and try >> loading just that file, to see if it works any better for you. >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta >> > From madair at dmsolutions.ca Thu Jun 12 09:48:23 2008 From: madair at dmsolutions.ca (Mike Adair) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Has anyone tried animation / or how to? In-Reply-To: <2bb6ee950806120547k374d0d8eic141a8683cd6942a@mail.gmail.com> References: <2bb6ee950806120547k374d0d8eic141a8683cd6942a@mail.gmail.com> Message-ID: <48512927.90703@dmsolutions.ca> WMS animations is implemented in the MapBuilder project (which uses the OpenLayers library). See: http://demo.communitymapbuilder.org/demo/mapbuilder/demo/timeSeries/index.html (one of the WMS servers used by the demo is down, but the animation layers are up). Mike Jon Blower wrote: > Hi Levii, > > Our OpenLayers-based site (http://www.reading.ac.uk/godiva2) supports > animation of WMS layers but does so because the WMS in question can > generate animated GIFs if you give it a time range. This is not ideal > because if you want to synchronize some other UI feature with the > animation (e.g. a time indicator or another animation) you can't > because you have no control over animation rates etc. > > I think the only way to have this synchronization is to do animation > in javascript but I haven't investigated this in detail. I'd be > interested in anything you come up with and perhaps we could work > together if we end up wanting the same thing? > > Cheers, Jon > > ---------- Forwarded message ---------- > From: "Levii Smith" > To: users@openlayers.org > Date: Thu, 12 Jun 2008 04:23:25 -0400 > Subject: [OpenLayers-Users] Has anyone tried animation / or how to? > > Just a thought as I work on this...I'm going to attempt to run an > animation of WMS layers. I've seen the example of using TIME in > WMS...has anyone tried animating WMS layers in time (I'm trying to > loop satellite imagery if you're curious)...any ideas how to do it - > or how to keep multiple layers in sync while doing it? > > //Levii > > From giohappy at gmail.com Thu Jun 12 09:54:26 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] creating a persistent vector/feature object from wfs In-Reply-To: References: <20080612123118.GC9288@metacarta.com> <20080612124227.GB9340@metacarta.com> Message-ID: Damn! It was a typo: ayerGML = *new* OpenLayers.Layer.GML("IET_GML","IET.gml",{isBaseLayer:true}) I forgot the *new* Thanks anyway :-) 2008/6/12 G. Allegri : > Maybe it can help: > the WFS service is provided by Mapserver, so The GML produced contains > wfs elements (i.e. xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > xmlns:wfs="http://www.opengis.net/wfs") > Does the GML parser need a "pure" GML? > > > 2008/6/12 G. Allegri : >> I get the fo >> >> this.initialize has no properties >> >> It's the same if I save the GML locally. >> I could reach my task creating a Vector layer inside >> Tile.WFS.requestSuccess(), but I prefer to solve it using GML layer as >> it's more clear and it saves lines of code. >> Following I attached a little excerpt from my code... >> >> >> >> 2008/6/12 Christopher Schmidt : >>> On Thu, Jun 12, 2008 at 02:34:49PM +0200, G. Allegri wrote: >>>> Ok, I had already tried Layer.GML putting the whole wfs request url >>>> inside it, but it didn't seem to work... >>>> >>>> OpenLayers.Layer.GML("IET_GML","http://localhost/IETclient/wxsIET.php?TYPENAME=ammsimple3&FORMAT=GML&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A3003&BBOX=1612519,5108846.747534517,1661798.7475345167,5158126.495069034") >>>> >>>> What's wrong with this? >>> >>> >>> Looks fine to me. You'll need to be more explicit about what 'doesn't >>> work' means -- preferably, by puttin together a simple xaple. One thing >>> that I would try would be to downloada the WFS data to a file, and try >>> loading just that file, to see if it works any better for you. >>> >>> Regards, >>> -- >>> Christopher Schmidt >>> MetaCarta >>> >> > From kobben at itc.nl Thu Jun 12 09:38:06 2008 From: kobben at itc.nl (Barend Kobben) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Has anyone tried animation / or how to? In-Reply-To: <2bb6ee950806120547k374d0d8eic141a8683cd6942a@mail.gmail.com> Message-ID: HI, We actually have an MSc student just started on seeing how to do this using WMS-T and SVG. SVG enables an integrated animation/interface, using SMIL animation and javascript interactivity. We hope to present some results at the upcoming SVGopen conference in Nurnberg (Germany, august 26-29)). See the abstract "SVG and Geo Web Services for visualization of time series data of flood risk" on the Proceedings page at http://svgopen.org/2008/ -- Barend K?bben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6 7500AA Enschede, The Netherlands +31 (0)53 4874253 On 12-06-08 14:47, "Jon Blower" wrote: > Hi Levii, > > Our OpenLayers-based site (http://www.reading.ac.uk/godiva2) supports > animation of WMS layers but does so because the WMS in question can > generate animated GIFs if you give it a time range. This is not ideal > because if you want to synchronize some other UI feature with the > animation (e.g. a time indicator or another animation) you can't > because you have no control over animation rates etc. > > I think the only way to have this synchronization is to do animation > in javascript but I haven't investigated this in detail. I'd be > interested in anything you come up with and perhaps we could work > together if we end up wanting the same thing? > > Cheers, Jon > > ---------- Forwarded message ---------- > From: "Levii Smith" > To: users@openlayers.org > Date: Thu, 12 Jun 2008 04:23:25 -0400 > Subject: [OpenLayers-Users] Has anyone tried animation / or how to? > > Just a thought as I work on this...I'm going to attempt to run an > animation of WMS layers. I've seen the example of using TIME in > WMS...has anyone tried animating WMS layers in time (I'm trying to > loop satellite imagery if you're curious)...any ideas how to do it - > or how to keep multiple layers in sync while doing it? > > //Levii International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. From giohappy at gmail.com Thu Jun 12 10:16:18 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Sardegna (Italian region) extended OL version Message-ID: Sardegna Region has developed a WebGIS for its services with an extended library (roja) including support for AXL requests (ArcInfo WMS), XML-XLS transformation, and many more features. A few days ago the source and documentation has benn released. The page is in italian but the docs are in english: http://webgis.regione.sardegna.it/roja/ From smithlev at levii.com Thu Jun 12 10:18:32 2008 From: smithlev at levii.com (Levii Smith) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] KML Layer Opacity Message-ID: An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080612/0e57b4b5/attachment.html From juozas.urbonas at teltonika.lt Thu Jun 12 10:29:12 2008 From: juozas.urbonas at teltonika.lt (Juozas Urbonas) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Missing tiles Message-ID: Hello, My problem is: sometimes some tiles are not shown on map, and when you zoom in, then zoom back out, or in reverse, or pan far to one side, and when pan back, the missing tiles are shown in most cases, but not always. I can repeat this behavior on IE7, but cannot repeat it on Firefox 2.0 (I was told, that it happens on Firefox to). I did some investigation, and it looks like it is clearly client side problem. Using IE Developer Toolbar I can find missing tile's div in DOM and it have it's style "Display" property set to "none". So maybe some one have any ideas why it's happening? We are currently using OL v2.6. Maps are hosted using TileCache and served using https. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080612/0b343254/attachment.html From giohappy at gmail.com Thu Jun 12 10:45:49 2008 From: giohappy at gmail.com (G. Allegri) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] avoid hover selection with shiftKey Message-ID: Hello again, I still haven't a good control over OL... I need to use the SelectFeature control with the hover switch active, but I want to deactivate it when shifKey is pressed (to allow zooming). I think I should extend the overFeature() method declared inside the OL.Control.SelectFeature. I don't want to put the hands in the source, so what's the best way to do it outside of it? During the control instantiation/initialization? Should I use Util.Extend (somehow)? I need to understand better OO programming in OL... I want to use this simple case to improve my knowledget. Would you help me? Thanks, Giovanni From drrobison at openroadsconsulting.com Thu Jun 12 10:51:53 2008 From: drrobison at openroadsconsulting.com (David R Robison) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] OL-2.6 and IE7 problems In-Reply-To: <484E9219.6000405@openroadsconsulting.com> References: <4846CBB7.8070405@winwaed.com> <484811C4.7040405@openroadsconsulting.com> <5ec103de0806052329y132922b6hbe904455a6316fdd@mail.gmail.com> <484E9055.8050900@openroadsconsulting.com> <20080610143659.GA19762@metacarta.com> <484E9219.6000405@openroadsconsulting.com> Message-ID: <48513809.1030406@openroadsconsulting.com> IE7 is reporting some problems when leaving a page with OL-2.6. I have been anle to fix these problems by placing try/catch around the offending code. Here is a list of what I changed: Control/PanZoomBar.js: destroy function - place a try/catch around the two removeChild calls. Map.js: removeLayer function - place a try/catch around the two removeChild calls. Map.js: destroy function - place a try/catch around this.div.removeChild(this.viewPortDiv); Events.js: stopObservingElement function - added after first statement: if (!element) return; David -- David R Robison Open Roads Consulting, Inc. 708 S. Battlefield Blvd., Chesapeake, VA 23322 phone: (757) 546-3401 e-mail: drrobison@openroadsconsulting.com web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/book_detail.php?id=2579 From crschmidt at metacarta.com Thu Jun 12 21:08:55 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] OpenLayers Gallery Items: RSS Message-ID: <20080613010855.GA10559@metacarta.com> http://gallery.openlayers.org/feed/latest/ Last 15 items added to the gallery, with title/description/thumbnail. Regards, -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Fri Jun 13 01:03:14 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] avoid hover selection with shiftKey In-Reply-To: References: Message-ID: <5ec103de0806122203s1876684doa91d2d1e58f08a7a@mail.gmail.com> On Thu, Jun 12, 2008 at 4:45 PM, G. Allegri wrote: > Hello again, > I still haven't a good control over OL... > I need to use the SelectFeature control with the hover switch active, > but I want to deactivate it when shifKey is pressed (to allow > zooming). > I think I should extend the overFeature() method declared inside the > OL.Control.SelectFeature. I don't want to put the hands in the source, > so what's the best way to do it outside of it? > During the control instantiation/initialization? Should I use > Util.Extend (somehow)? > I need to understand better OO programming in OL... I want to use this > simple case to improve my knowledget. Would you help me? Hi, first thing you can try is: selectFeatureControl.handler.stopDown = false; right after the activation of the select feature control. This should prevent the select feature control from stopping mousedown events which the zoom box control needs. Note that this will not disable feature selection. -- Eric From eric.c2c at gmail.com Fri Jun 13 03:15:18 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] KML Layer Opacity In-Reply-To: References: Message-ID: <5ec103de0806130015l5ac75aebn5286e0d845f47fa5@mail.gmail.com> Hi. Your code looks good to me. As for the styling, you can probably rely on the styling framework - search for 'style' in the wiki to learn about that framework, and look at the various examples. Cheers, Eric 2008/6/12, Levii Smith : > Just a question: Can an opacity be set to the KML or vector layers without > individually modifying each marker? > > Current method of creating the KML layer below (it works, don't know if I > should be doing it differently though). > > /* Begin KML handling functions */ > function createKMLLayer(id, url, name) { > if(document.getElementById(id).disabled == false) { > if ( document.getElementById(id).checked == true ) { > window[id] = new OpenLayers.Layer.GML(name, url,{format: > OpenLayers.Format.KML,formatOptions: > {extractStyles:true,extractAttributes:true}}); > map.addLayer(window[id]); > selectControl = new OpenLayers.Control.SelectFeature(window[id], > {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect}); > map.addControl(selectControl); > selectControl.activate(); > } else { > map.removeLayer(window[id]); > } > } > } > > > > Thanks, > > Levii From eric.c2c at gmail.com Fri Jun 13 03:23:24 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] OL-2.6 and IE7 problems In-Reply-To: <48513809.1030406@openroadsconsulting.com> References: <4846CBB7.8070405@winwaed.com> <484811C4.7040405@openroadsconsulting.com> <5ec103de0806052329y132922b6hbe904455a6316fdd@mail.gmail.com> <484E9055.8050900@openroadsconsulting.com> <20080610143659.GA19762@metacarta.com> <484E9219.6000405@openroadsconsulting.com> <48513809.1030406@openroadsconsulting.com> Message-ID: <5ec103de0806130023k29458064o65362fdb79d8b609@mail.gmail.com> Hi David. Thanks for reporting this. Could you create a ticket so that we can keep track of those issues. Thanks, Eric 2008/6/12, David R Robison : > IE7 is reporting some problems when leaving a page with OL-2.6. I have > been anle to fix these problems by placing try/catch around the > offending code. Here is a list of what I changed: > > Control/PanZoomBar.js: destroy function - place a try/catch around the > two removeChild calls. > Map.js: removeLayer function - place a try/catch around the two > removeChild calls. > Map.js: destroy function - place a try/catch around > this.div.removeChild(this.viewPortDiv); > Events.js: stopObservingElement function - added after first statement: > if (!element) return; > > David > > -- > > David R Robison > Open Roads Consulting, Inc. > 708 S. Battlefield Blvd., Chesapeake, VA 23322 > phone: (757) 546-3401 > e-mail: drrobison@openroadsconsulting.com > web: http://openroadsconsulting.com > blog: http://therobe.blogspot.com > book: http://www.xulonpress.com/book_detail.php?id=2579 > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From eider at fh-bingen.de Fri Jun 13 04:24:53 2008 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] OL-Based GeoEditor Message-ID: <48522ED5.2010308@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/20080613/04990400/eider.vcf From john.pulles at geodan.nl Fri Jun 13 07:31:33 2008 From: john.pulles at geodan.nl (John Pulles) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] OL-Based GeoEditor In-Reply-To: <48522ED5.2010308@fh-bingen.de> References: <48522ED5.2010308@fh-bingen.de> Message-ID: <48525A95.70604@geodan.nl> Dipl. Inf. Carsten Eider schreef: > Hi folks, > > i am working on a small geo-editor for an agricultural project in > rhine-palatinat/germany, visit http://www.agroconnect.de for more > information. > Upto now my editor has the following features: > > * new polygon, plain OL > * edit polgon, plain OL > * delete polygon, plain OL > * union polygon, OL with a javaserver in the backend > > Coming feaures: > > * split polygon into 2 elements, OL with server backend > * group polygons > > At the moment i am hanging a bit with the split-feature. > My idea is > > 1. select polygon > 2. select first point/vertix as starting point > 3. select second point as ending point > 4. do split > 5. remove polygon and add the new ones > > Step 4 will be done on serverside,but could also be done on clientside. > > Any ideas how to realize steps 1-3. Should i use several controls > (Select and Modify) or > should i subclass Control.ModifyFeature ? > > Any hints will be appreciated. A hint: you could have a look at http://majas.dfc.be/majas-1.2/applications/samples/html/6.html (in Dutch). It shows very sophisticated feature editing, using the right mouse button for context menus. Gr??en, John > > -- > Mit freundlichen Gr??en / Yours faithfully > Carsten Eider > > Dipl. Inf. (FH) > > Kompetenzzentrum f?r Innovative Informationssysteme > > c/o Fachhochschhule Bingen / University of applied sciences Bingen > > Berlinstra?e 109 > 55411 Bingen > > Tel: +49 (0) 6721 / 409-179 > Fax: +49 (0) 6721 / 409-158 > email: eider@fh-bingen.de > Internet: iis.fh-bingen.de > ------------------------------------------------------------------------ > > _______________________________________________ > 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 rwburgholzer at deq.virginia.gov Fri Jun 13 08:30:52 2008 From: rwburgholzer at deq.virginia.gov (Burgholzer,Robert) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] OL-Based GeoEditor Message-ID: <6C097DA58429B743A67070F98BE73A370379B5E2@deqex01.deq.local> For step 1) The Openlayers example "./examples/select-feature.html" shows how to select a vector feature. For step 2-3, ,f you are using postgis server side, there was a thread recently on the PostGIS listserv that involved some code for splitting a polygon with a line. I think this might work for you. Since you already have the capability to draw new shapes you may wish to change steps 2-3 to: 2) draw a line and then simply use the function from PostGIS to split your selected polygon. The thread pertaining to this is here: http://postgis.refractions.net/pipermail/postgis-users/2008-May/019892.html Robert W. Burgholzer Surface Water Modeler Office of Water Supply and Planning Virginia Department of Environmental Quality rwburgholzer@deq.virginia.gov 804-698-4405 Open Source Modeling Tools: http://sourceforge.net/projects/npsource/ -----Original Message----- From: dev-bounces@openlayers.org [mailto:dev-bounces@openlayers.org] On Behalf Of Dipl. Inf. Carsten Eider Sent: Friday, June 13, 2008 4:25 AM To: users@openlayers.org; dev@openlayers.org Subject: [OpenLayers-Dev] OL-Based GeoEditor Hi folks, i am working on a small geo-editor for an agricultural project in rhine-palatinat/germany, visit http://www.agroconnect.de for more information. Upto now my editor has the following features: * new polygon, plain OL * edit polgon, plain OL * delete polygon, plain OL * union polygon, OL with a javaserver in the backend Coming feaures: * split polygon into 2 elements, OL with server backend * group polygons At the moment i am hanging a bit with the split-feature. My idea is 1. select polygon 2. select first point/vertix as starting point 3. select second point as ending point 4. do split 5. remove polygon and add the new ones Step 4 will be done on serverside,but could also be done on clientside. Any ideas how to realize steps 1-3. Should i use several controls (Select and Modify) or should i subclass Control.ModifyFeature ? Any hints will be appreciated. -- Mit freundlichen Gr??en / Yours faithfully Carsten Eider Dipl. Inf. (FH) Kompetenzzentrum f?r Innovative Informationssysteme c/o Fachhochschhule Bingen / University of applied sciences Bingen Berlinstra?e 109 55411 Bingen Tel: +49 (0) 6721 / 409-179 Fax: +49 (0) 6721 / 409-158 email: eider@fh-bingen.de Internet: iis.fh-bingen.de -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080613/b96f5729/attachment.html From aschwartz at solidworks.com Fri Jun 13 11:55:56 2008 From: aschwartz at solidworks.com (aschwartz) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Externally toggle a marker's popup In-Reply-To: <17778863.post@talk.nabble.com> References: <17746551.post@talk.nabble.com> <17778863.post@talk.nabble.com> Message-ID: <17826645.post@talk.nabble.com> So I've been hunting around trying to figure this out, and I've been looking in Firebug for some information on that popup. The first thing i noticed is that a popup has an optional field for 'id'... this could come in handy. I also saw it was given a numbered id (see screenshot - http://gtproductions.net/uploads/firebug.jpg ) How do I call this thing, in OO JS style? Openlayers.Feature_95_popup.toggle(); ?? make an array of markers and do markerArray[i].Openlayers.Feature_95_popup.toggle(); ?? I have no idea. Any help would be appreciated. -Alex -- View this message in context: http://www.nabble.com/Externally-toggle-a-marker%27s-popup-tp17746551p17826645.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hcan at hotmail.com Fri Jun 13 15:11:56 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] SAXParsing error in OpenLayers and/or Geoserver Message-ID: <17830193.post@talk.nabble.com> Dear List, When I send the following request from OpenLayers to Geoserver, I receive an error message regarding SAXParsing ("document structures must start and end within the same entity"). I have tried to sent this request using both POST and GET, but I receive the same error. The strange part is that when I try the same request from Geoserver's DeomRequest page, everything is fine. If i type in the request URL into the web browsers address field, I also receives a correct GML! When checking then request parameters in Firefox, it seems like the Filer parameter is cut off just at the first "="-sign. Is the Filter parameter not encoded correctly? Or is there i bug somewhere? If so, in OpenLayers och Geosever? Request: http://10.0.1.2:8080/geoserver/wfs?request=GetFeature&version=1.0.0&typeName=topp:states&outputFormat=GML2&FILTER=the_geom-74.817265,40.5296504 Error msg: "\n\n \n org.xml.sax.SAXParseException: XML\n document structures must start and end within the same\n entity. XML document structures must start and end\n within the same entity.\n \n\n" Thanks, -Z -- View this message in context: http://www.nabble.com/SAXParsing-error-in-OpenLayers-and-or-Geoserver-tp17830193p17830193.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From aboudreault at mapgears.com Fri Jun 13 16:15:20 2008 From: aboudreault at mapgears.com (Alan Boudreault) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Externally toggle a marker's popup In-Reply-To: <17826645.post@talk.nabble.com> References: <17746551.post@talk.nabble.com> <17778863.post@talk.nabble.com> <17826645.post@talk.nabble.com> Message-ID: <4852D558.9030900@mapgears.com> Hi aschwartz, First of all, you'll need to access this marker. A simple way is to keep a trace of it. How do you add it to your map ? If you create/add this marker in a function at the load of your page, you can just create a global variable and assign to it the marker. In this case, you'll be able to create a JS function to toggle this marker easily by setting something like: href="javascript:toggleMyMarker();". There is a lot of way to do what you want. Regards, Alan aschwartz wrote: > So I've been hunting around trying to figure this out, and I've been looking > in Firebug for some information on that popup. The first thing i noticed is > that a popup has an optional field for 'id'... this could come in handy. > > I also saw it was given a numbered id (see screenshot - > http://gtproductions.net/uploads/firebug.jpg ) > How do I call this thing, in OO JS style? > > Openlayers.Feature_95_popup.toggle(); ?? > make an array of markers and do > markerArray[i].Openlayers.Feature_95_popup.toggle(); ?? > I have no idea. Any help would be appreciated. > > -Alex > -- Alan Boudreault Mapgears http://www.mapgears.com From aschwartz at solidworks.com Fri Jun 13 16:25:56 2008 From: aschwartz at solidworks.com (aschwartz) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Externally toggle a marker's popup In-Reply-To: <4852D558.9030900@mapgears.com> References: <17746551.post@talk.nabble.com> <17778863.post@talk.nabble.com> <17826645.post@talk.nabble.com> <4852D558.9030900@mapgears.com> Message-ID: <17831366.post@talk.nabble.com> Alan Boudreault wrote: > > create a JS function to toggle this marker easily by setting > something like: href="javascript:toggleMyMarker();" > Hi Alan, I understand what I need to get done, like to keep track of the markers in an array, and access them and tell them to toggle their popup, but I just cannot figure out how to call that popup's toggle() method. I have put the code up here (http://solidworks.pastebin.com/f76b5d6ed) . You can see line 67 calls addmarkers() on body load. Also line 135 is where the link to the person is created in that while loop, for each positive search result. I already have it calling a method in that tag using javascript, "javascript:popupOnClick()" , but am not sure what to put in that method to properly drill down to the level of being able to call toggle. Any help would be appreciated. -Alex -- View this message in context: http://www.nabble.com/Externally-toggle-a-marker%27s-popup-tp17746551p17831366.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alperd.liste at gmail.com Fri Jun 13 17:54:13 2008 From: alperd.liste at gmail.com (=?ISO-8859-1?Q?Alper_Din=E7er?=) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] missing tiles are still showing on map Message-ID: Hi, We have custom Google Like Tile sets. They have seen good at the existing zoom factors, but outside, maps can be seen different as seen from the link below. At first it gives pink tiles, then I found the solution for that but there is still a problem outside zoom factors? What is your solution for that? http://www.mekansal.com/OL-error.jpg Thanks. A. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080614/cbb18e63/attachment.html From hcan at hotmail.com Sun Jun 15 11:29:09 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Map is shifted to the right, click gets wrong position Message-ID: <17851229.post@talk.nabble.com> Dear List, I have a problem with my Vector Layer. When a user clicks in the map, a new GML request is sent to Geoserver requesting an object intersecting the clicked point. The first vector is drawn correctly on the map and the map is centred correctly. When the user continues to click in the map, the position he clicks on is shifted to the right. What happens is that a request that is sent to the server contains the wrong coordinates. When that object is drawn on the map, the map gets repositioned and shifted to the right. This only happens in IE7, not in Firefox. The map is inside a Dojo Layout container div, and the the right of the map there is another Dojo container div showing text information. It seems like the map get shifted to the right the same amount of pixels as the right hand side div is. if I zoom out and then back again, the map gets repositioned and the vector object shows up in the centre of the map. I have tried to call map.updateSize(), but the problem didn't get fixed. Is there anyone out there that has a clue of what is causing this problem? And how to solve it? Thanks, -z -- View this message in context: http://www.nabble.com/Map-is-shifted-to-the-right%2C-click-gets-wrong-position-tp17851229p17851229.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From christian.schanz at gmail.com Sun Jun 15 11:55:32 2008 From: christian.schanz at gmail.com (Christian Schanz) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] dynamic generated kml-layer Message-ID: <479F7ED0-294E-4D5D-9598-AA7165D00849@gmail.com> Hello, what is the best way to add a dynamically generated kml-layer to a map? The kml is generated by passing the current extent of the view and so the layer should be updated after zooming or moving. Thanks, Christian From geoff.hopson at gmail.com Sun Jun 15 12:05:26 2008 From: geoff.hopson at gmail.com (Geoff Hopson) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Map is shifted to the right, click gets wrong position In-Reply-To: <17851229.post@talk.nabble.com> References: <17851229.post@talk.nabble.com> Message-ID: Is the div centered? That caught me out on IE...take off the center, see if that helps... Geoff 2008/6/15 Zer : > > Dear List, > > I have a problem with my Vector Layer. When a user clicks in the map, a new > GML request is sent to Geoserver requesting an object intersecting the > clicked point. The first vector is drawn correctly on the map and the map is > centred correctly. When the user continues to click in the map, the position > he clicks on is shifted to the right. What happens is that a request that is > sent to the server contains the wrong coordinates. When that object is > drawn on the map, the map gets repositioned and shifted to the right. > > This only happens in IE7, not in Firefox. The map is inside a Dojo Layout > container div, and the the right of the map there is another Dojo container > div showing text information. It seems like the map get shifted to the right > the same amount of pixels as the right hand side div is. if I zoom out and > then back again, the map gets repositioned and the vector object shows up in > the centre of the map. > > I have tried to call map.updateSize(), but the problem didn't get fixed. Is > there anyone out there that has a clue of what is causing this problem? And > how to solve it? > > Thanks, > > -z > -- > View this message in context: http://www.nabble.com/Map-is-shifted-to-the-right%2C-click-gets-wrong-position-tp17851229p17851229.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Mario Kart Wii: 2320 6406 5974 From hcan at hotmail.com Sun Jun 15 16:45:23 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Map is shifted to the right, click gets wrong position In-Reply-To: References: <17851229.post@talk.nabble.com> Message-ID: <17854435.post@talk.nabble.com> Hi Geoff! I just checked, and the div is NOT centered. :-( Also what I have seen is that in Firefox and Safari, the map seems to fill the whole browser, and seems to be hidden under the right-hand-side Dojo Layout Container. If I "swipe away" (that is hide) the right hand container the map is not resized or repositioned in FF and Safari, but in IE7 the map is repositioned and resized..... Could this have something to do with this problem? -Z Geoff Hopson wrote: > > Is the div centered? That caught me out on IE...take off the center, > see if that helps... > > Geoff > > > -- View this message in context: http://www.nabble.com/Map-is-shifted-to-the-right%2C-click-gets-wrong-position-tp17851229p17854435.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From linda.rawson at gmail.com Mon Jun 16 00:13:51 2008 From: linda.rawson at gmail.com (Linda Rawson) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> Message-ID: <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> Any 2.6 vector author's out there? I still have this issue. Thanks, Linda On Sun, Jun 8, 2008 at 3:07 PM, Linda Rawson wrote: > No. With 2.5 you see the lines at all zoom levels in both IE and > Firefox. This must be a problem in Firefox as well. Maybe that will > help you guys trouble shoot. > > Linda > > On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine wrote: > > On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson > wrote: > >> I have a problem with upgrading to 2.6. I need some of the other > >> features and I cannot get this to work. I have tried to find out > >> where in the code it has changed but I cannot find it. > >> > >> ONLY in IE does this not work. > >> > >> Extract this example. You will see a green line and an aqua marker on > >> the screen. > >> > >> Push the button that says Zoom 5. > >> > >> You still have a green line and an aqua marker on the screen. > >> > >> Push the button that says Zoom 6. > >> > >> No lines. Not for Zoom 7 or Zoom 8 either. > > > > With FF2 I see the line after Zoom 6, but its coords seem to have > > changed. I don't see line after Zoom 7 and 8. Is this expected? > > > > -- > > Eric > > > > > > -- > Linda Rawson > -- Linda Rawson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080615/4b002cec/attachment.html From eider at fh-bingen.de Mon Jun 16 02:26:00 2008 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] OL-Based GeoEditor In-Reply-To: <6C097DA58429B743A67070F98BE73A370379B5E2@deqex01.deq.local> References: <6C097DA58429B743A67070F98BE73A370379B5E2@deqex01.deq.local> Message-ID: <48560778.805@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/20080616/a38b21c1/eider.vcf From simone.gadenz at jrc.it Mon Jun 16 05:35:46 2008 From: simone.gadenz at jrc.it (Simone Gadenz) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Printing the viewport In-Reply-To: <48560778.805@fh-bingen.de> References: <6C097DA58429B743A67070F98BE73A370379B5E2@deqex01.deq.local> <48560778.805@fh-bingen.de> Message-ID: <006001c8cf94$5b215640$116402c0$@gadenz@jrc.it> Hi all! Reading previous posts I see most of OLers use a server based procedure to prepare a page to print. In fact when I try to print using the browser print command I cannot see any map in the viewport. I wonder if somebody manage to do something similar GoogleMaps to print directly from the viewer. Thanks Simone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080616/54fdd0f8/attachment.html From jax at schildmos.nl Mon Jun 16 05:52:05 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Help needed with vectors Message-ID: <17860852.post@talk.nabble.com> Hi everyone, I'm struggling with vectors at the moment, got most issues tackled but I would really appreciate help a few things. First a short description of how I use OL, I need to draw a *large* number of vectors on a map. We are talking 300 to 2000 vectors. Drawing the features as true vectors is not an option because of (obvious) performance reasons, but I have found that when creating the vector as an icon the performance is relatively acceptable. Now I know that having so many features on one map is not recommendable -I'll fight my managers about it at some later time :-) - but truth is, it is not likely to go below 300 ever so I just have to squeeze the most out of the browsers. Further requirements: all vectors(icons) need to respond to a left mouse click, and a right mouse click (different handler from left click) and the icon must be rotatable. It all works very nice with firefox: 160 (rotated) 'vectors' on screen in less then 500 milliseconds, panning is still smooth and so are all other controls. The handlers for left and right clicking are also in place. Two things though: - Internet Explorer 6 is approx. fourteen times (!) slower then firefox. It takes over 7000 milliseconds to do the same here. Since I can't find a decent profiler for IE I have no idea where this lag is coming from. Can anybody shed some light on this? Is there a bottleneck in the VML rendering maybe ? - In order to get the icon rotation working I had to get the latest version from the trunk. (maybe a note about this needs to be added to the sample provided online at http://openlayers.org/dev/examples/styles-rotation.html ?). This works great, but Firefox (2.0.0.14) 'loses' some objects now and then when panning the map. One moment a vector is shown, pan a little and it is gone, pan further and it might reappear.. Has anyone else seen this behavior and if so, is there a patch ? Thanks in advance and keep up the good work, OpenLayers is awesome!! -- View this message in context: http://www.nabble.com/Help-needed-with-vectors-tp17860852p17860852.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andrew at andrewlarcombe.co.uk Mon Jun 16 06:40:25 2008 From: andrew at andrewlarcombe.co.uk (Andrew Larcombe) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Geographic CMS like open source app In-Reply-To: <447460.40266.qm@web51712.mail.re2.yahoo.com> References: <447460.40266.qm@web51712.mail.re2.yahoo.com> Message-ID: On Tue, 27 May 2008 02:50:56 +0100, Juan Jose Del Toro Madrue?o wrote: > Dear list; > > > We are on the early stages to develop a kind of geographic cms system > that > would allow users to manage on their website basic geographic information > integrated into a MySQL database; map?ng customers with routes, houses in > a real estate company, etc. > > similar apps are already there but none of them are open spurce projects > > Before we embark on this task; does anyone know of a similar app that is > open source and works as a cms like using OL/OSM/Google Maps? I've just put together a preview of my soon-to-be-release OpenLayers module for Drupal over at http://drupal.andrewl.net - not sure whether it will meet your needs or not. Cheers, Andrew -- Andrew Larcombe Freelance Geospatial, Database & Web Programming web: http://www.andrewlarcombe.co.uk : http://blog.andrewl.net email: andrew@andrewlarcombe.co.uk icq: 306690163 From ale.pas at tiscali.it Mon Jun 16 07:45:23 2008 From: ale.pas at tiscali.it (Alessandro Pasotti) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Geographic CMS like open source app In-Reply-To: References: <447460.40266.qm@web51712.mail.re2.yahoo.com> Message-ID: <200806161345.23627.ale.pas@tiscali.it> Il luned? 16 giugno 2008, Andrew Larcombe ha scritto: > On Tue, 27 May 2008 02:50:56 +0100, Juan Jose Del Toro Madrue?o > > wrote: > > Dear list; > > > > > > We are on the early stages to develop a kind of geographic cms system > > that > > would allow users to manage on their website basic geographic information > > integrated into a MySQL database; map?ng customers with routes, houses in > > a real estate company, etc. > > > > similar apps are already there but none of them are open spurce projects > > > > Before we embark on this task; does anyone know of a similar app that is > > open source and works as a cms like using OL/OSM/Google Maps? Not (yet) related with OL but I'm writing a Joomla 1.5 component that uses Google Maps (using OL instead of GM would not require great efforts). With that component you will be able to add WKT features to every content item (=article in Joomla slang). Features will be added by direct drawing on the map or through GPX (or KML) import. You will be able to add complex fatures such as GEOMETRYCOLLECTION, organize them in layers and serve the whole as MKL/KMZ or in the integrated GM viewer. Final licence will be AGPL (Affero GPL) but I'm not sure it will be free (as in beer) from the very beginning. Regards. -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502 From roald.dewit at lisasoft.com Mon Jun 16 07:54:22 2008 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] dynamic generated kml-layer In-Reply-To: <479F7ED0-294E-4D5D-9598-AA7165D00849@gmail.com> References: <479F7ED0-294E-4D5D-9598-AA7165D00849@gmail.com> Message-ID: <4856546E.2070803@lisasoft.com> Hi Christian, Christian Schanz wrote: > what is the best way to add a dynamically generated kml-layer to a map? > The kml is generated by passing the current extent of the view and so > the layer should be updated after zooming or moving. > What you describe here is effectively the behaviour of a WFS layer. If I remember correctly, since 2.6 (current stable release) you can create a WFS layer and define what the format should be. In your case, that would be OpenLayers.Format.KML: var layer = new OpenLayers.Layer.WFS( "KML Layer ", url, params, {format: OpenLayers.Format.KML, extractStyles: true, extractAttributes: true} ); It will automatically add a bbox parameter to the request string. If that is enough for you, then you're ready to go. If not: in your params parameter you can put anything you'd like to send to the server. Not sure how to dynamically add the current zoomlevel etc. Make sure you use Firebug in Firefox to test what requests are sent to your server. I hope this helps you in the right direction. Kind regards, Roald -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ From eider at fh-bingen.de Mon Jun 16 08:15:35 2008 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] [OpenLayers-Trac] [OpenLayers] #1483: ModifyFeature control makes SelectFeature control to modify features In-Reply-To: <044.aa2cad2e2fa0e0e5bb3ae69c24aa426e@openlayers.org> References: <044.aa2cad2e2fa0e0e5bb3ae69c24aa426e@openlayers.org> Message-ID: <48565967.6030406@fh-bingen.de> Has anyone developed a solution or found a workaround? OpenLayers schrieb: > #1483: ModifyFeature control makes SelectFeature control to modify features > -----------------------------------+---------------------------------------- > Reporter: openlayers | Owner: tschaub > Type: bug | Status: new > Priority: minor | Milestone: > Component: Control.ModifyFeature | Version: 2.6 RC1 > Keywords: | State: > -----------------------------------+---------------------------------------- > If I add ModifyFeature and SelectFeature controls to a map and connect > them to the same layers, selection too becomes modification tool. When I > select a feature with SelectFeature control I can see and change > modification points(vertex) around the feature. The problem seems to be on > ModifyFeature control. It connect events to the layer when it is > initialized instead of when it is activated. Should those events be > connected and disconnect on activate and deactivate operations instead? I > attached a file that demonstrates this bug, it is modified from modify- > feature.html example. Create polygon and click "select" radiobutton and > select created polygon from map. > > -- Mit freundlichen Gr??en / Yours faithfully Carsten Eider Dipl. Inf. (FH) Kompetenzzentrum f?r Innovative Informationssysteme c/o Fachhochschhule Bingen / University of applied sciences Bingen Berlinstra?e 109 55411 Bingen Tel: +49 (0) 6721 / 409-179 Fax: +49 (0) 6721 / 409-158 email: eider@fh-bingen.de Internet: iis.fh-bingen.de -------------- 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/20080616/817a906c/eider.vcf From aboudreault at mapgears.com Mon Jun 16 09:50:07 2008 From: aboudreault at mapgears.com (Alan Boudreault) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Externally toggle a marker's popup In-Reply-To: <17831366.post@talk.nabble.com> References: <17746551.post@talk.nabble.com> <17778863.post@talk.nabble.com> <17826645.post@talk.nabble.com> <4852D558.9030900@mapgears.com> <17831366.post@talk.nabble.com> Message-ID: <48566F8F.9030000@mapgears.com> Hi Alex, If i assume that your popup is displayed when you click on your marker, marker.events.register("mousedown", feature, markerClick); you could keep an global array of all your features and do the same thing that in your markerClick function. ( aFeatures[i].popup.toggle(); ) Alan aschwartz wrote: > > Alan Boudreault wrote: > >> create a JS function to toggle this marker easily by setting >> something like: href="javascript:toggleMyMarker();" >> >> > > Hi Alan, > > I understand what I need to get done, like to keep track of the markers in > an array, and access them and tell them to toggle their popup, but I just > cannot figure out how to call that popup's toggle() method. I have put the > code up here (http://solidworks.pastebin.com/f76b5d6ed) . > > You can see line 67 calls addmarkers() on body load. Also line 135 is where > the link to the person is created in that while loop, for each positive > search result. I already have it calling a method in that tag using > javascript, "javascript:popupOnClick()" , but am not sure what to put in > that method to properly drill down to the level of being able to call > toggle. Any help would be appreciated. > > -Alex > -- Alan Boudreault Mapgears http://www.mapgears.com From pinizsi.magdolna at innoteq.hu Mon Jun 16 10:15:14 2008 From: pinizsi.magdolna at innoteq.hu (Pinizsi Magdolna) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Overview map projection problem Message-ID: <004101c8cfbb$6549f9c0$2fdded40$@magdolna@innoteq.hu> Dear List! I have got a problem about my Overview map. My map is in EPSG:23700, the map is working fine, but the overview map just displays the upper-right part of my full map. Strange thing is that the rectangle in the overview map appears in the suitable place (like the background image was the full map). I tried every method what I can find in the list, but nothing helped. My code is: map = new OpenLayers.Map('map', {maxExtent: new OpenLayers.Bounds(426412.5,43772.7890625,937405.625,362941.71875),maxResolut ion: 'auto', units:'m', projection:'EPSG:23700',controls:[]}); var overview = new OpenLayers.Control.OverviewMap( { mapOptions: { maxExtent: new OpenLayers.Bounds(426412.5,43772.7890625,937405.625,362941.71875),projection : "EPSG:23700" } }); I also tried this: var options = { projection:"EPSG:23700", units: 'm', maxExtent: new OpenLayers.Bounds(426412,43772,937405.625,362941.71875), numZoomLevels:1 }; var overview = new OpenLayers.Control.OverviewMap({mapOptions: options}); ..but the result was the same. Can anyone help? Thanks: Magdi p.s: Here is a sample image about my problem : ftp://itqrt.dyndns.org user, pass: guest -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080616/74de259f/attachment.html From crschmidt at metacarta.com Mon Jun 16 10:17:14 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Overview map projection problem In-Reply-To: <004101c8cfbb$6549f9c0$2fdded40$@magdolna@innoteq.hu> References: <004101c8cfbb$6549f9c0$2fdded40$@magdolna@innoteq.hu> Message-ID: <20080616141714.GA5441@metacarta.com> On Mon, Jun 16, 2008 at 04:15:14PM +0200, Pinizsi Magdolna wrote: > Dear List! > > > > I have got a problem about my Overview map. > > > > My map is in EPSG:23700, the map is working fine, but the overview map just > displays the upper-right part of my full map. Strange thing is that the > rectangle in the overview map appears in the suitable place (like the > background image was the full map). > > > > I tried every method what I can find in the list, but nothing helped. > > > > > > My code is: > > > > map = new OpenLayers.Map('map', {maxExtent: new > OpenLayers.Bounds(426412.5,43772.7890625,937405.625,362941.71875),maxResolut > ion: 'auto', units:'m', projection:'EPSG:23700',controls:[]}); > > > > > > var overview = new OpenLayers.Control.OverviewMap( { mapOptions: { > maxExtent: new > OpenLayers.Bounds(426412.5,43772.7890625,937405.625,362941.71875),projection > : "EPSG:23700" } }); Your overview map doesn't have a maxResolution. Maybe you should try to set one. -- Chris > > > I also tried this: > > > > var options = { > > projection:"EPSG:23700", > > units: 'm', > > maxExtent: new > OpenLayers.Bounds(426412,43772,937405.625,362941.71875), > > numZoomLevels:1 > > }; > > > > var overview = new OpenLayers.Control.OverviewMap({mapOptions: > options}); > > > > ..but the result was the same. > > > > Can anyone help? > > > > Thanks: > > > > Magdi > > > > p.s: Here is a sample image about my problem : ftp://itqrt.dyndns.org user, > pass: guest > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From oscar.fonts.lists at gmail.com Mon Jun 16 12:51:44 2008 From: oscar.fonts.lists at gmail.com (Oscar Fonts) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] [OpenLayers-Trac] [OpenLayers] #1483: ModifyFeature control makes SelectFeature control to modify features In-Reply-To: <48565967.6030406@fh-bingen.de> References: <044.aa2cad2e2fa0e0e5bb3ae69c24aa426e@openlayers.org> <48565967.6030406@fh-bingen.de> Message-ID: As ticket says, the code to register events: this.layer.events.on({ "featureselected": this.selectFeature, "featureunselected": this.unselectFeature, scope: this }); Should be moved from "initialize" to "activate" methods, and: this.layer.events.un({ "featureselected": this.selectFeature, "featureunselected": this.unselectFeature, scope: this }); from "destroy" to "deactivate". Working at http://www.icc.cat/vissir2/js/vissir_lib/ModifyFeature.js. Oscar. 2008/6/16 Dipl. Inf. Carsten Eider : > Has anyone developed a solution or found a workaround? > > > OpenLayers schrieb: > >> #1483: ModifyFeature control makes SelectFeature control to modify >> features >> >> -----------------------------------+---------------------------------------- >> Reporter: openlayers | Owner: tschaub >> Type: bug | Status: new Priority: minor >> | Milestone: Component: Control.ModifyFeature | >> Version: 2.6 RC1 >> Keywords: | State: >> -----------------------------------+---------------------------------------- >> If I add ModifyFeature and SelectFeature controls to a map and connect >> them to the same layers, selection too becomes modification tool. When I >> select a feature with SelectFeature control I can see and change >> modification points(vertex) around the feature. The problem seems to be >> on >> ModifyFeature control. It connect events to the layer when it is >> initialized instead of when it is activated. Should those events be >> connected and disconnect on activate and deactivate operations instead? I >> attached a file that demonstrates this bug, it is modified from modify- >> feature.html example. Create polygon and click "select" radiobutton and >> select created polygon from map. >> >> >> > > -- > Mit freundlichen Gr??en / Yours faithfully > Carsten Eider > > Dipl. Inf. (FH) > > Kompetenzzentrum f?r Innovative Informationssysteme > > c/o Fachhochschhule Bingen / University of applied sciences Bingen > > Berlinstra?e 109 > 55411 Bingen > > Tel: +49 (0) 6721 / 409-179 > Fax: +49 (0) 6721 / 409-158 > email: eider@fh-bingen.de > Internet: iis.fh-bingen.de > > _______________________________________________ > Dev mailing list > Dev@openlayers.org > http://openlayers.org/mailman/listinfo/dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080616/c8f4e580/attachment.html From crschmidt at metacarta.com Mon Jun 16 13:52:06 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] GeoJSON 1.0 Release Message-ID: <20080616175206.GB8442@metacarta.com> The GeoJSON Authors are proud to announce the finalization of the GeoJSON 1.0 Specification. Representing more than a year's worth of community discussion and development, the GeoJSON specification describes an easy to use, extensible format for transferring geographic data over the web. With support in more than 20 different applications, GeoJSON is already quickly becoming a de facto standard for transferring geographic data in a JSON format. The finalization of the spec represents the final step in formalizing the GeoJSON format for encoding this data. OpenLayers is one of the early supporters in reading GeoJSON. More information on GeoJSON can be found at http://geojson.org/ , or from the GeoJSON mailing list at http://lists.geojson.org/listinfo.cgi/geojson-geojson.org . Regards, -- Christopher Schmidt MetaCarta From wendell at enflight.com Mon Jun 16 17:14:30 2008 From: wendell at enflight.com (Wendell Turner) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] FramedCloud and autoSize Message-ID: <20080616211430.GA1464@q.rho.net> It seems that having lots of html (h2 headers, tables, font size changes) inside a FramedCloud pop-up does not get autoSize'd properly. I've tried various combinations of setting autoSize to false, max/minSize, etc, but either the size is still not right or there are ghost images of pop-up box artifacts around the outside of the pop-up box. Is this a real problem? How can I get the pop-up to use a scroll bar on the inside? Will that take care of the problem? Thanks, Wendell From eric.c2c at gmail.com Mon Jun 16 17:21:25 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] dynamic generated kml-layer In-Reply-To: <4856546E.2070803@lisasoft.com> References: <479F7ED0-294E-4D5D-9598-AA7165D00849@gmail.com> <4856546E.2070803@lisasoft.com> Message-ID: <5ec103de0806161421q35f80f9di951c1dcdfbf67560@mail.gmail.com> Roald, using Layer.WFS with Format.KML requires having a WFS service sending features represented in the KML format. Are you aware of any server capable of that? Maybe GeoServer? Hmm or FeatureServer? Thanks. Eric 2008/6/16, Roald de Wit : > Hi Christian, > > Christian Schanz wrote: >> what is the best way to add a dynamically generated kml-layer to a map? >> The kml is generated by passing the current extent of the view and so >> the layer should be updated after zooming or moving. >> > What you describe here is effectively the behaviour of a WFS layer. If I > remember correctly, since 2.6 (current stable release) you can create a > WFS layer and define what the format should be. In your case, that would > be OpenLayers.Format.KML: > > var layer = new OpenLayers.Layer.WFS( "KML Layer ", url, params, > {format: OpenLayers.Format.KML, extractStyles: true, > extractAttributes: true} ); > > It will automatically add a bbox parameter to the request string. If > that is enough for you, then you're ready to go. If not: in your params > parameter you can put anything you'd like to send to the server. Not > sure how to dynamically add the current zoomlevel etc. Make sure you use > Firebug in Firefox to test what requests are sent to your server. > > I hope this helps you in the right direction. > > Kind regards, > > Roald > > -- > Roald de Wit > Software Engineer > roald.dewit@lisasoft.com > > Commercial Support for Open Source GIS Software > http://lisasoft.com/LISAsoft/SupportedProducts/ > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From eric.c2c at gmail.com Mon Jun 16 17:30:20 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] OL-Based GeoEditor In-Reply-To: <48560778.805@fh-bingen.de> References: <6C097DA58429B743A67070F98BE73A370379B5E2@deqex01.deq.local> <48560778.805@fh-bingen.de> Message-ID: <5ec103de0806161430g75f1469w1def76f50d1f4562@mail.gmail.com> Hi. Have you tried using two select feature control instances, one with geometryType set to polygon and one with geometryType set to point. Just a guess, i've never tried this myself. Cheers. Eric 2008/6/16, Dipl. Inf. Carsten Eider : > my problem is not the algorithm how to split the field, > it is more the way how to select one polygon, then select two corners > > which control should i use? > a modified modifycontrol or can i reuse a selectcontrol? > > > Burgholzer,Robert schrieb: >> >> For step 1) The Openlayers example "./examples/select-feature.html" >> shows how to select a vector feature. >> >> For step 2-3, ,f you are using postgis server side, there was a thread >> recently on the PostGIS listserv that involved some code for splitting >> a polygon with a line. I think this might work for you. Since you >> already have the capability to draw new shapes you may wish to change >> steps 2-3 to: >> >> 2) draw a line >> >> >> >> and then simply use the function from PostGIS to split your selected >> polygon. >> >> >> >> The thread pertaining to this is here: >> >> >> >> http://postgis.refractions.net/pipermail/postgis-users/2008-May/019892.html >> >> >> >> >> >> >> >> Robert W. Burgholzer >> >> Surface Water Modeler >> >> Office of Water Supply and Planning >> >> Virginia Department of Environmental Quality >> >> rwburgholzer@deq.virginia.gov >> >> 804-698-4405 >> >> Open Source Modeling Tools: >> >> http://sourceforge.net/projects/npsource/ >> >> -----Original Message----- >> *From:* dev-bounces@openlayers.org [mailto:dev-bounces@openlayers.org] >> *On Behalf Of *Dipl. Inf. Carsten Eider >> *Sent:* Friday, June 13, 2008 4:25 AM >> *To:* users@openlayers.org; dev@openlayers.org >> *Subject:* [OpenLayers-Dev] OL-Based GeoEditor >> >> >> >> Hi folks, >> >> i am working on a small geo-editor for an agricultural project in >> rhine-palatinat/germany, visit http://www.agroconnect.de for more >> information. >> Upto now my editor has the following features: >> >> ? new polygon, plain OL >> >> ? edit polgon, plain OL >> >> ? delete polygon, plain OL >> >> ? union polygon, OL with a javaserver in the backend >> >> Coming feaures: >> >> ? split polygon into 2 elements, OL with server backend >> >> ? group polygons >> >> At the moment i am hanging a bit with the split-feature. >> My idea is >> >> 1. select polygon >> >> 2. select first point/vertix as starting point >> >> 3. select second point as ending point >> >> 4. do split >> >> 5. remove polygon and add the new ones >> >> Step 4 will be done on serverside,but could also be done on clientside. >> >> Any ideas how to realize steps 1-3. Should i use several controls >> (Select and Modify) or >> should i subclass Control.ModifyFeature ? >> >> Any hints will be appreciated. >> >> >> -- >> Mit freundlichen Gr??en / Yours faithfully >> Carsten Eider >> >> Dipl. Inf. (FH) >> >> Kompetenzzentrum f?r Innovative Informationssysteme >> >> c/o Fachhochschhule Bingen / University of applied sciences Bingen >> >> Berlinstra?e 109 >> 55411 Bingen >> >> Tel: +49 (0) 6721 / 409-179 >> Fax: +49 (0) 6721 / 409-158 >> email: eider@fh-bingen.de >> Internet: iis.fh-bingen.de >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Mit freundlichen Gr??en / Yours faithfully > Carsten Eider > > Dipl. Inf. (FH) > > Kompetenzzentrum f?r Innovative Informationssysteme > > c/o Fachhochschhule Bingen / University of applied sciences Bingen > > Berlinstra?e 109 > 55411 Bingen > > Tel: +49 (0) 6721 / 409-179 > Fax: +49 (0) 6721 / 409-158 > email: eider@fh-bingen.de > Internet: iis.fh-bingen.de > > From crschmidt at metacarta.com Mon Jun 16 21:01:19 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] dynamic generated kml-layer In-Reply-To: <5ec103de0806161421q35f80f9di951c1dcdfbf67560@mail.gmail.com> References: <479F7ED0-294E-4D5D-9598-AA7165D00849@gmail.com> <4856546E.2070803@lisasoft.com> <5ec103de0806161421q35f80f9di951c1dcdfbf67560@mail.gmail.com> Message-ID: <20080617010119.GA20058@metacarta.com> On Mon, Jun 16, 2008 at 11:21:25PM +0200, Eric Lemoine wrote: > Roald, using Layer.WFS with Format.KML requires having a WFS service > sending features represented in the KML format. Are you aware of any > server capable of that? Maybe GeoServer? Hmm or FeatureServer? Thanks. Both FeatureServer and GeoServer should be able to do this without too much trouble. Regards, -- Christopher Schmidt MetaCarta From hz20040 at 126.com Mon Jun 16 23:34:25 2008 From: hz20040 at 126.com (hz20040) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] How to use more than one 'SelectFeature' controls Message-ID: <32437314.187511213673665628.JavaMail.coremail@bj126app14.126.com> Dear List! I have got a problem about 'SelectFeature' control. There are two gml layers.I want to use two 'SelectFeature' to select them. But I found only the SelectFeature control which's gml layer is added last will work. In the code,if I use myMap.addLayers([gmlLayer1,gmlLayer2]),the gml2Control will work well,but gml1Control will not work. If I use myMap.addLayers([gmlLayer2,gmlLayer1]), the gml1Control will work well,but gml2 not. It looks like which gml layer is added last , the select control to it will work. Can I use more then one 'SelectFeature' controls to more then one gml layers? Thank you ! My code is: function init() { myMap = new OpenLayers.Map('map3d'); var opt= {numZoomLevels:1}; var graphic = new OpenLayers.Layer.Image( 'name', '/Images/Maps/chunxi.jpg', //new OpenLayers.Bounds(-450, -289, 450, 289), new OpenLayers.Bounds(-320, -240, 320, 240), new OpenLayers.Size(1600, 1200), opt); var userstyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['userselect']); //add an image layer myMap.addLayers([graphic]); //one gml layer var gmlOption = { style:userstyle }; var gmlLayer1= new OpenLayers.Layer.GML("GML1", "url",gmlOption); //another gml layer var toolTipsOption = { //style:userstyle }; var gmlLayer2 = new OpenLayers.Layer.GML("GML2","url",toolTipsOption); myMap.addLayers([gmlLayer2,gmlLayer1]); // myMap.addLayers([gmlLayer1,gmlLayer2]); //one SelectFeature control:gml1Control gml1Control = new OpenLayers.Control.SelectFeature(gmlLayer1, {onSelect: onFeatureSelect, onUnselect:onFeatureUnselect, hover:false }); myMap.addControl(gml1Control); gml1Control.activate(); //another SelectFeature control:gml2Control gml2Control = new OpenLayers.Control.SelectFeature(gmlLayer2, { onSelect:onToolTipsFeatureSelect, onUnselect:onToolTipsFeatureUnselect, hover:false } ); myMap.addControl(gml2Control ); gml2Control.activate(); myMap.setCenter(new OpenLayers.LonLat(0, 0), 1); myMap.zoomToMaxExtent(); } function onToolTipsFeatureSelect(feature) { alert("onToolTipsFeatureSelect"); } function onToolTipsFeatureUnselect(feature) { alert("onToolTipsFeatureUnselect"); } function onFeatureSelect(feature) { alert("onFeatureSelect"); } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080617/0779b7e0/attachment.html From roald.dewit at lisasoft.com Tue Jun 17 00:27:40 2008 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] dynamic generated kml-layer In-Reply-To: <20080617010119.GA20058@metacarta.com> References: <479F7ED0-294E-4D5D-9598-AA7165D00849@gmail.com> <4856546E.2070803@lisasoft.com> <5ec103de0806161421q35f80f9di951c1dcdfbf67560@mail.gmail.com> <20080617010119.GA20058@metacarta.com> Message-ID: <1213676860.2312.30.camel@bender> Hi Eric, On Tue, 2008-06-17 at 10:31 +0930, Christopher Schmidt wrote: > Both FeatureServer and GeoServer should be able to do this without too > much trouble. GeoServer can output KML in a WMS request. So in OL you'd need to adjust your WFS layer to send WMS like parameters including 'format=kml'. The tricky bit is that you need to add width, height and styles parameters. For more info, see [1] Cheers, Roald [1] http://geoserver.org/display/GEOSDOC/How+do+I+set+output+format+for +KML P.S. Christian Schanz sent an email off-list saying that he had things working for him (dunno what he has running server side). -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ From eric.c2c at gmail.com Tue Jun 17 01:59:57 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] dynamic generated kml-layer In-Reply-To: <1213676860.2312.30.camel@bender> References: <479F7ED0-294E-4D5D-9598-AA7165D00849@gmail.com> <4856546E.2070803@lisasoft.com> <5ec103de0806161421q35f80f9di951c1dcdfbf67560@mail.gmail.com> <20080617010119.GA20058@metacarta.com> <1213676860.2312.30.camel@bender> Message-ID: <5ec103de0806162259p1800624fpc44375e3f41fed0@mail.gmail.com> I forgot about GeoServer supporting KML. Thanks for reminding this to me. Cheers. Eric 2008/6/17, Roald de Wit : > Hi Eric, > > On Tue, 2008-06-17 at 10:31 +0930, Christopher Schmidt wrote: >> Both FeatureServer and GeoServer should be able to do this without too >> much trouble. > > GeoServer can output KML in a WMS request. So in OL you'd need to adjust > your WFS layer to send WMS like parameters including 'format=kml'. The > tricky bit is that you need to add width, height and styles parameters. > > For more info, see [1] > > Cheers, Roald > > [1] http://geoserver.org/display/GEOSDOC/How+do+I+set+output+format+for > +KML > > P.S. Christian Schanz sent an email off-list saying that he had things > working for him (dunno what he has running server side). > > -- > Roald de Wit > Software Engineer > roald.dewit@lisasoft.com > > Commercial Support for Open Source GIS Software > http://lisasoft.com/LISAsoft/SupportedProducts/ > > From eric.c2c at gmail.com Tue Jun 17 02:05:15 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] How to use more than one 'SelectFeature' controls In-Reply-To: <32437314.187511213673665628.JavaMail.coremail@bj126app14.126.com> References: <32437314.187511213673665628.JavaMail.coremail@bj126app14.126.com> Message-ID: <5ec103de0806162305m7dd48420sf9fb2aa3a9436f74@mail.gmail.com> Hi. Feature selection doesn't work with multiple layers. As you mentioned only the layer on the top will work. See ticket 434. For now, if possible, you'll have to put everything in the same vector layer. Eric 2008/6/17, hz20040 : > Dear List! > > I have got a problem about 'SelectFeature' control. > There are two gml layers.I want to use two 'SelectFeature' to select them. > But I found only the SelectFeature control which's gml layer is added last > will work. > > In the code,if I use myMap.addLayers([gmlLayer1,gmlLayer2]),the gml2Control > will > work well,but gml1Control will not work. If I use > myMap.addLayers([gmlLayer2,gmlLayer1]), the gml1Control will work well,but > gml2 not. > > It looks like which gml layer is added last , the select control to it will > work. > Can I use more then one 'SelectFeature' controls to more then one gml > layers? > > Thank you ! > > > My code is: > > function init() > { > myMap = new OpenLayers.Map('map3d'); > var opt= {numZoomLevels:1}; > var graphic = new OpenLayers.Layer.Image( > 'name', > '/Images/Maps/chunxi.jpg', > //new OpenLayers.Bounds(-450, -289, 450, > 289), > new OpenLayers.Bounds(-320, -240, 320, 240), > new OpenLayers.Size(1600, 1200), > opt); > > var userstyle = OpenLayers.Util.extend({}, > OpenLayers.Feature.Vector.style['userselect']); > > > //add an image layer > myMap.addLayers([graphic]); > > //one gml layer > var gmlOption = { > style:userstyle > }; > var gmlLayer1= new OpenLayers.Layer.GML("GML1", > "url",gmlOption); > > > //another gml layer > var toolTipsOption = { > //style:userstyle > }; > var gmlLayer2 = new > OpenLayers.Layer.GML("GML2","url",toolTipsOption); > > myMap.addLayers([gmlLayer2,gmlLayer1]); > // myMap.addLayers([gmlLayer1,gmlLayer2]); > > > //one SelectFeature control:gml1Control > gml1Control = new OpenLayers.Control.SelectFeature(gmlLayer1, > {onSelect: onFeatureSelect, > onUnselect:onFeatureUnselect, > hover:false > }); > myMap.addControl(gml1Control); > gml1Control.activate(); > > //another SelectFeature control:gml2Control > gml2Control = new OpenLayers.Control.SelectFeature(gmlLayer2, > { > onSelect:onToolTipsFeatureSelect, > onUnselect:onToolTipsFeatureUnselect, > hover:false > } > ); > myMap.addControl(gml2Control ); > gml2Control.activate(); > > myMap.setCenter(new OpenLayers.LonLat(0, 0), 1); > myMap.zoomToMaxExtent(); > > > } > > function onToolTipsFeatureSelect(feature) > { > alert("onToolTipsFeatureSelect"); > } > > function onToolTipsFeatureUnselect(feature) > { > alert("onToolTipsFeatureUnselect"); > } > > function onFeatureSelect(feature) > { > alert("onFeatureSelect"); > } From mifan at opensource.lk Tue Jun 17 03:22:05 2008 From: mifan at opensource.lk (Mifan Careem) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Extending callback function of Handler.Path Message-ID: <1213687325.6181.30.camel@mordor> Hi All, I'm trying to get the coordinates from line vectors drawn by users using Control.storeFeature and store them in the database. I intend to do this using a solution posted in the lists sometime back by using the "done" callback of Handler.Path, and doing the required processing within it. My problem is that the drawn vector line disappears at the end of drawing it. I'm assuming this is because I'm overriding the default "done" handler with my own? - since it works OK when I do not have a callback handler. Is there a way I can extend the default callback handler instead of replacing it? (I hope the terminology I use is correct here), so that the drawn vector lines do not disappear? My code is attached below, and a hosted version is at: http://talksahana.com/sandbox/ol-draw.html Appreciate any help with this. Thanks. Regards Mifan http://talksahana.com http://techmania.wordpress.com --------- var map, drawControls; OpenLayers.Util.onImageLoadErrorColor = "transparent"; function init(){ map = new OpenLayers.Map('map'); var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); var lineLayer = new OpenLayers.Layer.Vector("Line Layer"); map.addLayers([wmsLayer, lineLayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.MousePosition()); var options = {handlerOptions: {freehand: true}}; //Callback var pathDrawFeatureOptions = { callbacks : {"done": doneHandler}, handlerOptions: {freehand: true} }; drawControls = { line: new OpenLayers.Control.DrawFeature(lineLayer, OpenLayers.Handler.Path, pathDrawFeatureOptions) }; for(var key in drawControls) { map.addControl(drawControls[key]); } map.setCenter(new OpenLayers.LonLat(0, 0), 3); document.getElementById('noneToggle').checked = true; } function doneHandler(lineGeom) { // do processing .... //alert("doneHandler:" + lineGeom.getComponentsString()); //var linecontrol = drawControls['line']; //linecontrol.deactivate(); } function toggleControl(element) { for(key in drawControls) { var control = drawControls[key]; if(element.value == key && element.checked) { control.activate(); } else { control.deactivate(); } } } ------------ From rwburgholzer at deq.virginia.gov Tue Jun 17 08:33:00 2008 From: rwburgholzer at deq.virginia.gov (Burgholzer,Robert) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] OL-Based GeoEditor Message-ID: <6C097DA58429B743A67070F98BE73A3702B13DE3@deqex01.deq.local> Sorry to delay the response, I have been offline for a few days. The reason I sent the PG thread was that I thought that it would be easier to use that method to split the line, since select-feature.html has the "select" part, and the "draw a line" part. Then, using the pg function, you could manage the "split" part. Robert W. Burgholzer Surface Water Modeler Office of Water Supply and Planning Virginia Department of Environmental Quality rwburgholzer@deq.virginia.gov 804-698-4405 Open Source Modeling Tools: http://sourceforge.net/projects/npsource/ -----Original Message----- From: Eric Lemoine [mailto:eric.c2c@gmail.com] Sent: Monday, June 16, 2008 5:30 PM To: Dipl. Inf. Carsten Eider; Burgholzer,Robert; users@openlayers.org; dev@openlayers.org Subject: Re: [OpenLayers-Dev] OL-Based GeoEditor Hi. Have you tried using two select feature control instances, one with geometryType set to polygon and one with geometryType set to point. Just a guess, i've never tried this myself. Cheers. Eric 2008/6/16, Dipl. Inf. Carsten Eider : > my problem is not the algorithm how to split the field, > it is more the way how to select one polygon, then select two corners > > which control should i use? > a modified modifycontrol or can i reuse a selectcontrol? > > > Burgholzer,Robert schrieb: >> >> For step 1) The Openlayers example "./examples/select-feature.html" >> shows how to select a vector feature. >> >> For step 2-3, ,f you are using postgis server side, there was a thread >> recently on the PostGIS listserv that involved some code for splitting >> a polygon with a line. I think this might work for you. Since you >> already have the capability to draw new shapes you may wish to change >> steps 2-3 to: >> >> 2) draw a line >> >> >> >> and then simply use the function from PostGIS to split your selected >> polygon. >> >> >> >> The thread pertaining to this is here: >> >> >> >> http://postgis.refractions.net/pipermail/postgis-users/2008-May/019892.html >> >> >> >> >> >> >> >> Robert W. Burgholzer >> >> Surface Water Modeler >> >> Office of Water Supply and Planning >> >> Virginia Department of Environmental Quality >> >> rwburgholzer@deq.virginia.gov >> >> 804-698-4405 >> >> Open Source Modeling Tools: >> >> http://sourceforge.net/projects/npsource/ >> >> -----Original Message----- >> *From:* dev-bounces@openlayers.org [mailto:dev-bounces@openlayers.org] >> *On Behalf Of *Dipl. Inf. Carsten Eider >> *Sent:* Friday, June 13, 2008 4:25 AM >> *To:* users@openlayers.org; dev@openlayers.org >> *Subject:* [OpenLayers-Dev] OL-Based GeoEditor >> >> >> >> Hi folks, >> >> i am working on a small geo-editor for an agricultural project in >> rhine-palatinat/germany, visit http://www.agroconnect.de for more >> information. >> Upto now my editor has the following features: >> >> ? new polygon, plain OL >> >> ? edit polgon, plain OL >> >> ? delete polygon, plain OL >> >> ? union polygon, OL with a javaserver in the backend >> >> Coming feaures: >> >> ? split polygon into 2 elements, OL with server backend >> >> ? group polygons >> >> At the moment i am hanging a bit with the split-feature. >> My idea is >> >> 1. select polygon >> >> 2. select first point/vertix as starting point >> >> 3. select second point as ending point >> >> 4. do split >> >> 5. remove polygon and add the new ones >> >> Step 4 will be done on serverside,but could also be done on clientside. >> >> Any ideas how to realize steps 1-3. Should i use several controls >> (Select and Modify) or >> should i subclass Control.ModifyFeature ? >> >> Any hints will be appreciated. >> >> >> -- >> Mit freundlichen Gr??en / Yours faithfully >> Carsten Eider >> >> Dipl. Inf. (FH) >> >> Kompetenzzentrum f?r Innovative Informationssysteme >> >> c/o Fachhochschhule Bingen / University of applied sciences Bingen >> >> Berlinstra?e 109 >> 55411 Bingen >> >> Tel: +49 (0) 6721 / 409-179 >> Fax: +49 (0) 6721 / 409-158 >> email: eider@fh-bingen.de >> Internet: iis.fh-bingen.de >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Mit freundlichen Gr??en / Yours faithfully > Carsten Eider > > Dipl. Inf. (FH) > > Kompetenzzentrum f?r Innovative Informationssysteme > > c/o Fachhochschhule Bingen / University of applied sciences Bingen > > Berlinstra?e 109 > 55411 Bingen > > Tel: +49 (0) 6721 / 409-179 > Fax: +49 (0) 6721 / 409-158 > email: eider@fh-bingen.de > Internet: iis.fh-bingen.de > > From simone.gadenz at jrc.it Tue Jun 17 11:03:10 2008 From: simone.gadenz at jrc.it (Simone Gadenz) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] ScalLine control In-Reply-To: <6C097DA58429B743A67070F98BE73A3702B13DE3@deqex01.deq.local> References: <6C097DA58429B743A67070F98BE73A3702B13DE3@deqex01.deq.local> Message-ID: <004e01c8d08b$422965e0$c67c31a0$@gadenz@jrc.it> Hi! I tried to use the ScaleLine control to my OL map but apparentrly there something strange. This is the syntax I used: map.addControl(new OpenLayers.Control.ScaleLine()); and the result is this new div:
100 km
50 mi
Shouldn't appear a scalimeter? Simone -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Burgholzer,Robert Sent: 17 June 2008 14:33 To: Eric Lemoine; Dipl. Inf. Carsten Eider; users@openlayers.org; dev@openlayers.org Subject: Re: [OpenLayers-Users] [OpenLayers-Dev] OL-Based GeoEditor Sorry to delay the response, I have been offline for a few days. The reason I sent the PG thread was that I thought that it would be easier to use that method to split the line, since select-feature.html has the "select" part, and the "draw a line" part. Then, using the pg function, you could manage the "split" part. Robert W. Burgholzer Surface Water Modeler Office of Water Supply and Planning Virginia Department of Environmental Quality rwburgholzer@deq.virginia.gov 804-698-4405 Open Source Modeling Tools: http://sourceforge.net/projects/npsource/ -----Original Message----- From: Eric Lemoine [mailto:eric.c2c@gmail.com] Sent: Monday, June 16, 2008 5:30 PM To: Dipl. Inf. Carsten Eider; Burgholzer,Robert; users@openlayers.org; dev@openlayers.org Subject: Re: [OpenLayers-Dev] OL-Based GeoEditor Hi. Have you tried using two select feature control instances, one with geometryType set to polygon and one with geometryType set to point. Just a guess, i've never tried this myself. Cheers. Eric 2008/6/16, Dipl. Inf. Carsten Eider : > my problem is not the algorithm how to split the field, > it is more the way how to select one polygon, then select two corners > > which control should i use? > a modified modifycontrol or can i reuse a selectcontrol? > > > Burgholzer,Robert schrieb: >> >> For step 1) The Openlayers example "./examples/select-feature.html" >> shows how to select a vector feature. >> >> For step 2-3, ,f you are using postgis server side, there was a thread >> recently on the PostGIS listserv that involved some code for splitting >> a polygon with a line. I think this might work for you. Since you >> already have the capability to draw new shapes you may wish to change >> steps 2-3 to: >> >> 2) draw a line >> >> >> >> and then simply use the function from PostGIS to split your selected >> polygon. >> >> >> >> The thread pertaining to this is here: >> >> >> >> http://postgis.refractions.net/pipermail/postgis-users/2008-May/019892.html >> >> >> >> >> >> >> >> Robert W. Burgholzer >> >> Surface Water Modeler >> >> Office of Water Supply and Planning >> >> Virginia Department of Environmental Quality >> >> rwburgholzer@deq.virginia.gov >> >> 804-698-4405 >> >> Open Source Modeling Tools: >> >> http://sourceforge.net/projects/npsource/ >> >> -----Original Message----- >> *From:* dev-bounces@openlayers.org [mailto:dev-bounces@openlayers.org] >> *On Behalf Of *Dipl. Inf. Carsten Eider >> *Sent:* Friday, June 13, 2008 4:25 AM >> *To:* users@openlayers.org; dev@openlayers.org >> *Subject:* [OpenLayers-Dev] OL-Based GeoEditor >> >> >> >> Hi folks, >> >> i am working on a small geo-editor for an agricultural project in >> rhine-palatinat/germany, visit http://www.agroconnect.de for more >> information. >> Upto now my editor has the following features: >> >> ? new polygon, plain OL >> >> ? edit polgon, plain OL >> >> ? delete polygon, plain OL >> >> ? union polygon, OL with a javaserver in the backend >> >> Coming feaures: >> >> ? split polygon into 2 elements, OL with server backend >> >> ? group polygons >> >> At the moment i am hanging a bit with the split-feature. >> My idea is >> >> 1. select polygon >> >> 2. select first point/vertix as starting point >> >> 3. select second point as ending point >> >> 4. do split >> >> 5. remove polygon and add the new ones >> >> Step 4 will be done on serverside,but could also be done on clientside. >> >> Any ideas how to realize steps 1-3. Should i use several controls >> (Select and Modify) or >> should i subclass Control.ModifyFeature ? >> >> Any hints will be appreciated. >> >> >> -- >> Mit freundlichen Gr??en / Yours faithfully >> Carsten Eider >> >> Dipl. Inf. (FH) >> >> Kompetenzzentrum f?r Innovative Informationssysteme >> >> c/o Fachhochschhule Bingen / University of applied sciences Bingen >> >> Berlinstra?e 109 >> 55411 Bingen >> >> Tel: +49 (0) 6721 / 409-179 >> Fax: +49 (0) 6721 / 409-158 >> email: eider@fh-bingen.de >> Internet: iis.fh-bingen.de >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Mit freundlichen Gr??en / Yours faithfully > Carsten Eider > > Dipl. Inf. (FH) > > Kompetenzzentrum f?r Innovative Informationssysteme > > c/o Fachhochschhule Bingen / University of applied sciences Bingen > > Berlinstra?e 109 > 55411 Bingen > > Tel: +49 (0) 6721 / 409-179 > Fax: +49 (0) 6721 / 409-158 > email: eider@fh-bingen.de > Internet: iis.fh-bingen.de > > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From iansgis at gmail.com Tue Jun 17 16:07:40 2008 From: iansgis at gmail.com (Ian) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Overview map resolution difficulties Message-ID: <5b61c6c50806171307v53db7d49u5f56f3989b0d1e97@mail.gmail.com> I am using OpenLayers and TileCache (mod_python), and the only way I've gotten them to work together is by defining the same resolutions in both. These resolutions are defined in the overview map as well, which I just want to be a static, full extent/global map. My overview map is currently zoomed too far in on the map center, and from this post: http://www.nabble.com/OverviewMapControl-config-tips--to14598136.html#a14601624 it sounds like the issue is resolution. However when I change the resolution values in TileCache or OpenLayers the map stops working. I've tried using maxResolution as well, without luck. OL: var options = {controls:[], maxExtent:new OpenLayers.Bounds(-180, -90, 180, 90), resolutions: [0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625, 0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125], restrictedExtent:new OpenLayers.Bounds(-180, -90, 180, 90)} var ovOptions = {mapOptions:{numZoomLevels:1, maxExtent:new OpenLayers.Bounds(-180, -90, 180, 90), resolutions: [0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625, 0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125], maxResolution:1}} var map = new OpenLayers.Map('map', options); var ovm = new OpenLayers.Control.OverviewMap(ovOptions); map.addControl(ovm); TC: [basic] type=WMS url= http://geomap.ucsd.edu/cgi-bin/mapserv?map=/var/www/html/maps/tileCacheWMS.map& layers=worldCountriesPolys,mexico_states_poly,mexico_states_line,us_states_poly,us_states_line bbox=-180, -90, 180, 90 resolutions=0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125, 0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125 maxResolution=1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080617/0de20aea/attachment.html From miles.togoe at gmail.com Tue Jun 17 23:20:58 2008 From: miles.togoe at gmail.com (MilesTogoe) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] map not showing - are there tests ? Message-ID: <48587F1A.4050705@gmail.com> I'm trying to use 2.6 - if I put an alert box in my map function it works so javascript and function is working okay. But I can't get any openlayers code to show up. Are there any simple functions in OpenLayers to test to be sure the library is being called ? Or that it is recognizing the
okay ? From eric.c2c at gmail.com Wed Jun 18 02:32:44 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Extending callback function of Handler.Path In-Reply-To: <1213687325.6181.30.camel@mordor> References: <1213687325.6181.30.camel@mordor> Message-ID: <5ec103de0806172332g3bd98397sa9c0507cffe1eded@mail.gmail.com> Hi. I haven't looked at your code but it's no surprise that the feature disappears once drawn - the point handler, which the path handler inherits from, uses a temporary vector layer. It is the responsibility of your control to actually add drawn features to a permanent layer, which control users will provide. Look at the draw feature control code to understand how this works. Hope this helps. Cheers. Eric 2008/6/17, Mifan Careem : > Hi All, > > I'm trying to get the coordinates from line vectors drawn by users using > Control.storeFeature and store them in the database. I intend to do this > using a solution posted in the lists sometime back by using the "done" > callback of Handler.Path, and doing the required processing within it. > > My problem is that the drawn vector line disappears at the end of > drawing it. I'm assuming this is because I'm overriding the default > "done" handler with my own? - since it works OK when I do not have a > callback handler. Is there a way I can extend the default callback > handler instead of replacing it? (I hope the terminology I use is > correct here), so that the drawn vector lines do not disappear? > > My code is attached below, and a hosted version is at: > http://talksahana.com/sandbox/ol-draw.html > > Appreciate any help with this. Thanks. > > > Regards > > Mifan > > http://talksahana.com > http://techmania.wordpress.com > > > --------- > var map, drawControls; > OpenLayers.Util.onImageLoadErrorColor = "transparent"; > function init(){ > map = new OpenLayers.Map('map'); > var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers > WMS", > "http://labs.metacarta.com/wms/vmap0?", {layers: > 'basic'}); > var lineLayer = new OpenLayers.Layer.Vector("Line > Layer"); > map.addLayers([wmsLayer, lineLayer]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new OpenLayers.Control.MousePosition()); > var options = {handlerOptions: {freehand: true}}; > //Callback > var pathDrawFeatureOptions = { > callbacks : {"done": doneHandler}, > handlerOptions: {freehand: true} > }; > drawControls = { > line: new OpenLayers.Control.DrawFeature(lineLayer, > OpenLayers.Handler.Path, > pathDrawFeatureOptions) > }; > for(var key in drawControls) { > map.addControl(drawControls[key]); > } > map.setCenter(new OpenLayers.LonLat(0, 0), 3); > document.getElementById('noneToggle').checked = true; > } > > > function doneHandler(lineGeom) { > // do processing .... > //alert("doneHandler:" + > lineGeom.getComponentsString()); > //var linecontrol = drawControls['line']; > //linecontrol.deactivate(); > } > > function toggleControl(element) { > for(key in drawControls) { > var control = drawControls[key]; > if(element.value == key && element.checked) { > control.activate(); > } else { > control.deactivate(); > } > } > } > ------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From andreas.hocevar at gmail.com Wed Jun 18 03:47:48 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> Message-ID: <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> Linda, it would be easier to help you if you provide a more stripped down example that reproduces your problem. Regards, Andreas. On Mon, Jun 16, 2008 at 6:13 AM, Linda Rawson wrote: > Any 2.6 vector author's out there? I still have this issue. > > Thanks, > Linda > > On Sun, Jun 8, 2008 at 3:07 PM, Linda Rawson wrote: >> >> No. With 2.5 you see the lines at all zoom levels in both IE and >> Firefox. This must be a problem in Firefox as well. Maybe that will >> help you guys trouble shoot. >> >> Linda >> >> On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine wrote: >> > On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson >> > wrote: >> >> I have a problem with upgrading to 2.6. I need some of the other >> >> features and I cannot get this to work. I have tried to find out >> >> where in the code it has changed but I cannot find it. >> >> >> >> ONLY in IE does this not work. >> >> >> >> Extract this example. You will see a green line and an aqua marker on >> >> the screen. >> >> >> >> Push the button that says Zoom 5. >> >> >> >> You still have a green line and an aqua marker on the screen. >> >> >> >> Push the button that says Zoom 6. >> >> >> >> No lines. Not for Zoom 7 or Zoom 8 either. >> > >> > With FF2 I see the line after Zoom 6, but its coords seem to have >> > changed. I don't see line after Zoom 7 and 8. Is this expected? >> > >> > -- >> > Eric >> > >> >> >> >> -- >> Linda Rawson > > > > -- > Linda Rawson > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From jax at schildmos.nl Wed Jun 18 03:52:47 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Help needed with vectors In-Reply-To: <17860852.post@talk.nabble.com> References: <17860852.post@talk.nabble.com> Message-ID: <17961533.post@talk.nabble.com> realjax wrote: > > ... Firefox (2.0.0.14) 'loses' some objects now and then when panning the > map. One moment a vector is shown, pan a little and it is gone, pan > further and it might reappear.. Has anyone else seen this behavior and if > so, is there a patch ? > For anywone interested: >From the looks of it, this was due to a SVG bug in Firefox 2. The just released Firefox 3 works ok. -- View this message in context: http://www.nabble.com/Help-needed-with-vectors-tp17860852p17961533.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andreas.hocevar at gmail.com Wed Jun 18 03:58:56 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Help needed with vectors In-Reply-To: <17860852.post@talk.nabble.com> References: <17860852.post@talk.nabble.com> Message-ID: <5b021dd0806180058l1ef3ff45y4b55c372cdd4cc97@mail.gmail.com> Hi, On Mon, Jun 16, 2008 at 11:52 AM, realjax wrote: > I need to draw a *large* number of vectors on a map. We are talking 300 to > 2000 vectors. > Drawing the features as true vectors is not an option because of (obvious) > performance reasons, but I have found that when creating the vector as an > icon the performance is relatively acceptable. Now I know that having so > many features on one map is not recommendable -I'll fight my managers about > it at some later time :-) - but truth is, it is not likely to go below 300 > ever so I just have to squeeze the most out of the browsers. An option would be to use Layer.WMS for your vectors. I doubt that the average human will be able to perceive a map with that many features. If you use WFS, only the features for the current map extent will be loaded. > - Internet Explorer 6 is approx. fourteen times (!) slower then firefox. It > takes over 7000 milliseconds to do the same here. Since I can't find a > decent profiler for IE I have no idea where this lag is coming from. Can > anybody shed some light on this? Is there a bottleneck in the VML rendering > maybe ? First of all, VML renders slower than SVG. And because rotation in VML is much more expensive than in SVG. If you try to use unrotated features, you will see that it is faster, but still slower than SVG. But I suspect most of the time is eaten up by the rotation. A workaround would be to provide separate icons for e.g. 12 or 16 angles. More different angles usually don't make sense in terms of human perception. Regards, Andreas. From jax at schildmos.nl Wed Jun 18 04:06:36 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? Message-ID: <17961729.post@talk.nabble.com> Hi, Since drawing rotated features (with an icon) in IE 6 is painstakingly slow (14 times slower then Firefox), I was trying to see if I could have features painted on the screen one by one, so the user has at least some visual feedback, instead of looking at what seems a dead application for several seconds. When using the addFeatures method of the Vector class, IE -and Firefox as well for that matter- only show all features at once, *after* all features have been added. Even when I create a loop to add only one feature at a time, the layer is only redrawn after completion of the loop. When I attach a function to the event onFeatureAdded and for instance log something to the console, things work as I'd expect and IE draws the features one by one.. Can anyone comment on this, am I missing something ? Thanks in advance! -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p17961729.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jax at schildmos.nl Wed Jun 18 04:48:21 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Help needed with vectors In-Reply-To: <5b021dd0806180058l1ef3ff45y4b55c372cdd4cc97@mail.gmail.com> References: <17860852.post@talk.nabble.com> <5b021dd0806180058l1ef3ff45y4b55c372cdd4cc97@mail.gmail.com> Message-ID: <17971931.post@talk.nabble.com> Hi Andreas, Thanks for your reply! Andreas Hocevar-2 wrote: > > An option would be to use Layer.WMS for your vectors. > Should that be wFs ? If not, how is the wms layer involved here? could you elaborate? Andreas Hocevar-2 wrote: > > First of all, VML renders slower than SVG. And because rotation in VML > is much more expensive than in SVG. If you try to use unrotated > features, you will see that it is faster, but still slower than SVG. > But I suspect most of the time is eaten up by the rotation. A > workaround would be to provide separate icons for e.g. 12 or 16 > angles. More different angles usually don't make sense in terms of > human perception. > Ah true, I have already experimented with this, and rotating is indeed expensive. When not rotating, IE is only 8 times slower, versus 14 times with rotating. :-) I was hoping I could get away with only one icon though. :-) Cheers and thanks! -- View this message in context: http://www.nabble.com/Help-needed-with-vectors-tp17860852p17971931.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andreas.hocevar at gmail.com Wed Jun 18 04:58:13 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Help needed with vectors In-Reply-To: <17971931.post@talk.nabble.com> References: <17860852.post@talk.nabble.com> <5b021dd0806180058l1ef3ff45y4b55c372cdd4cc97@mail.gmail.com> <17971931.post@talk.nabble.com> Message-ID: <5b021dd0806180158k339bf02br293896d6198adb3a@mail.gmail.com> On Wed, Jun 18, 2008 at 10:48 AM, realjax wrote: > Andreas Hocevar-2 wrote: >> >> An option would be to use Layer.WMS for your vectors. >> > > Should that be wFs ? If not, how is the wms layer involved here? could you > elaborate? You are absolutely right. I meant WFS. Regards, Andreas. From andreas.hocevar at gmail.com Wed Jun 18 06:24:20 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Help with 2.6 strokeWidth and strokeweight on linestring on IE In-Reply-To: <6e9b30fb0806031402t474fee22wf0648647fbd374e9@mail.gmail.com> References: <6e9b30fb0806031402t474fee22wf0648647fbd374e9@mail.gmail.com> Message-ID: <5b021dd0806180324t61a0afd1o310a44fb48248994@mail.gmail.com> Can you please provide a stripped down example that shows the problem? Regards, Andreas. On Tue, Jun 3, 2008 at 11:02 PM, Linda Rawson wrote: > I am just getting back to trying to get my application to run in 2.6. > I cannot see linestring vector objects at the lowest scales. I am > beating my head against the wall. I get some of them to show up, > those with only 4 points by setting the StrokeWidth to 1 on the style. > > The rest....don't work. I step through the code. At these lines in VML.JS > > if (options.isStroked) { > node.setAttribute("strokecolor", style.strokeColor); > node.setAttribute("strokeweight", style.strokeWidth + "px"); > } else { > node.setAttribute("stroked", "false"); > } > > node.getAttribute("strokeweight") before is 0.75. On the first zoom > levels it changes to "1px". Anytime I zoom further it will not change > the value of strokeweight no matter how hard I try to change the value > using hardcoded attributes or whatever. > > What has changed in this area between version 2.5 and 2.6. Where is > .75 coming from? Where can I override that? > > -- > Linda Rawson > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From gilles.bassiere at makina-corpus.com Wed Jun 18 07:43:06 2008 From: gilles.bassiere at makina-corpus.com (=?ISO-8859-15?Q?Gilles_Bassi=E8re?=) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Dynamically change a control handler Message-ID: <4858F4CA.6080803@makina-corpus.com> Hi list, I'd like to know if there is a cross-browser way to change the mouse handler associated to a control. Context: I want to query the server for a given area. This area may be a point, a box or a any polygon. The user can choose the type of area with simple html radiobuttons. My control is set up with the following draw() method: draw: function() { switch (this.handlerType) { case 'POINT': this.handler = new OpenLayers.Handler.Point( this, {done: this.selectGeom}, {keyMask: this.keyMask} ); break; case 'BOX': this.handler = new OpenLayers.Handler.RegularPolygon( this, {done: this.selectGeom}, {keyMask: this.keyMask, sides: 4, irregular: true} ); break; ... } }, I added a custom method in order to set the "handlerType" property: setHandlerType: function(handlerType) { this.handlerType = handlerType; if (this.active) { this.deactivate(); this.draw(); this.activate(); } }, All this works pretty fine in Firefox but does not in IE... The behavior in IE is the following: - when the control is selected, the default point handler works fine and the user can click on the map to fire a data request. - if the user change the handler type (using html radiobuttons and so, the control setHandlerType method), the mouse handler is lost until the first click on the map. Right after the call to setHandlerType(), I expect is to see my new handler but in IE, there is just no handler. The user needs to click once on the map and then the handler appears... Is it simply possible to achieve dynamic replacement of a control handler? If so, can anyone point me in the right direction? Regards Gilles -- Gilles Bassiere MAKINA CORPUS 30 rue des Jeuneurs FR-75002 PARIS +33 (0) 1 44 82 00 80 http://www.makina-corpus.com -------------- next part -------------- A non-text attachment was scrubbed... Name: gilles_bassiere.vcf Type: text/x-vcard Size: 368 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080618/bb7001be/gilles_bassiere.vcf From alaincourivaud at gmail.com Wed Jun 18 08:53:01 2008 From: alaincourivaud at gmail.com (alinux) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Has anyone tried animation / or how to? References: <2bb6ee950806120547k374d0d8eic141a8683cd6942a@mail.gmail.com> Message-ID: Barend Kobben writes: > > HI, > > We actually have an MSc student just started on seeing how to do this using > WMS-T and SVG. SVG enables an integrated animation/interface, using SMIL > animation and javascript interactivity. We hope to present some results at > the upcoming SVGopen conference in Nurnberg (Germany, august 26-29)). See > the abstract "SVG and Geo Web Services for visualization of time series data > of flood risk" on the Proceedings page at http://svgopen.org/2008/ > Hello sorry for my anglish ... I tried to do an animation and i used it : . . . var loaded = "FALSE"; var madate = new Date("June 18, 2008 00:00:00"); . . . radar = new OpenLayers.Layer.WMS( "animation radar", "http://monServeur:8080/wms", {layers: "radar:"+madate.dateFormat('YmdHis')+":M:FRANCE_5MN", transparent: "TRUE", format: "image/png"} , { singleTile: true, transitionEffect: 'resize'}); syn_radar_wms.events.register('loadend', radar ,function(e){ if (loaded=="TRUE"){ play_minute(); } }); . . . function play_minute(){ madate.setMinutes(madate.getMinutes()+5); madate_formate = madate.dateFormat('YmdHis'); string = "radar:"+madate_formate+":M:FRANCE_5MN"; radar.mergeNewParams({'layers':string}); } . . .
Play (animation Minute + 5)
And that's good What do you think about it ? From linda.rawson at gmail.com Wed Jun 18 10:48:33 2008 From: linda.rawson at gmail.com (Linda Rawson) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> Message-ID: <6e9b30fb0806180748n659e5b17w1cc60044be1fed40@mail.gmail.com> Absolutely. Anything to help me here! I so want to go the new version. In this example, if I remove the first line I add then all of the zoom buttons work perfectly. The line appears at all zoom levels. The minute I add more than one line the problem occurs. I had all the style sheet stuff in the first example because I noticed you changed from relative positioning to absolute so I thought maybe that was causing the problem but that is not the case. It looks complex but all I am doing is adding 2 lines and a marker to a spherical mercator projection map. This works in 2.5 just not in 2.6. Linda Rawson Test Case

Linda's Example. Push Zoom 5. You see lines. Push Zoom 6. No lines.

On Wed, Jun 18, 2008 at 1:47 AM, Andreas Hocevar wrote: > > Linda, > > it would be easier to help you if you provide a more stripped down > example that reproduces your problem. > > Regards, > Andreas. > > On Mon, Jun 16, 2008 at 6:13 AM, Linda Rawson wrote: > > Any 2.6 vector author's out there? I still have this issue. > > > > Thanks, > > Linda > > > > On Sun, Jun 8, 2008 at 3:07 PM, Linda Rawson wrote: > >> > >> No. With 2.5 you see the lines at all zoom levels in both IE and > >> Firefox. This must be a problem in Firefox as well. Maybe that will > >> help you guys trouble shoot. > >> > >> Linda > >> > >> On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine wrote: > >> > On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson > >> > wrote: > >> >> I have a problem with upgrading to 2.6. I need some of the other > >> >> features and I cannot get this to work. I have tried to find out > >> >> where in the code it has changed but I cannot find it. > >> >> > >> >> ONLY in IE does this not work. > >> >> > >> >> Extract this example. You will see a green line and an aqua marker on > >> >> the screen. > >> >> > >> >> Push the button that says Zoom 5. > >> >> > >> >> You still have a green line and an aqua marker on the screen. > >> >> > >> >> Push the button that says Zoom 6. > >> >> > >> >> No lines. Not for Zoom 7 or Zoom 8 either. > >> > > >> > With FF2 I see the line after Zoom 6, but its coords seem to have > >> > changed. I don't see line after Zoom 7 and 8. Is this expected? > >> > > >> > -- > >> > Eric > >> > > >> > >> > >> > >> -- > >> Linda Rawson > > > > > > > > -- > > Linda Rawson > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > -- Linda Rawson From linda.rawson at gmail.com Wed Jun 18 10:52:09 2008 From: linda.rawson at gmail.com (Linda Rawson) Date: Wed Sep 1 17:16:22 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <6e9b30fb0806180748n659e5b17w1cc60044be1fed40@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> <6e9b30fb0806180748n659e5b17w1cc60044be1fed40@mail.gmail.com> Message-ID: <6e9b30fb0806180752w35a1de9cq19443910da1624c4@mail.gmail.com> I forgot a line in the example. I forgot to set the pointlist to a new array. Please add this line: pointList = []; Right before this line: newPoint = new OpenLayers.Geometry.Point(-12250153.3626406,4852001.6114048); Thanks so much for looking at this! Linda On Wed, Jun 18, 2008 at 8:48 AM, Linda Rawson wrote: > Absolutely. Anything to help me here! I so want to go the new > version. In this example, if I remove the first line I add then all > of the zoom buttons work perfectly. The line appears at all zoom > levels. The minute I add more than one line the problem occurs. I > had all the style sheet stuff in the first example because I noticed > you changed from relative positioning to absolute so I thought maybe > that was causing the problem but that is not the case. It looks > complex but all I am doing is adding 2 lines and a marker to a > spherical mercator projection map. This works in 2.5 just not in 2.6. > > > > Linda Rawson Test Case href="http://www.openlayers.org/api/theme/default/style.css" > rel="stylesheet" type="text/css"> > > > > > > >

Linda's Example. Push Zoom 5. You see lines. Push > Zoom 6. No lines.

>
>
> > > > > > > > > > On Wed, Jun 18, 2008 at 1:47 AM, Andreas Hocevar > wrote: >> >> Linda, >> >> it would be easier to help you if you provide a more stripped down >> example that reproduces your problem. >> >> Regards, >> Andreas. >> >> On Mon, Jun 16, 2008 at 6:13 AM, Linda Rawson wrote: >> > Any 2.6 vector author's out there? I still have this issue. >> > >> > Thanks, >> > Linda >> > >> > On Sun, Jun 8, 2008 at 3:07 PM, Linda Rawson wrote: >> >> >> >> No. With 2.5 you see the lines at all zoom levels in both IE and >> >> Firefox. This must be a problem in Firefox as well. Maybe that will >> >> help you guys trouble shoot. >> >> >> >> Linda >> >> >> >> On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine wrote: >> >> > On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson >> >> > wrote: >> >> >> I have a problem with upgrading to 2.6. I need some of the other >> >> >> features and I cannot get this to work. I have tried to find out >> >> >> where in the code it has changed but I cannot find it. >> >> >> >> >> >> ONLY in IE does this not work. >> >> >> >> >> >> Extract this example. You will see a green line and an aqua marker on >> >> >> the screen. >> >> >> >> >> >> Push the button that says Zoom 5. >> >> >> >> >> >> You still have a green line and an aqua marker on the screen. >> >> >> >> >> >> Push the button that says Zoom 6. >> >> >> >> >> >> No lines. Not for Zoom 7 or Zoom 8 either. >> >> > >> >> > With FF2 I see the line after Zoom 6, but its coords seem to have >> >> > changed. I don't see line after Zoom 7 and 8. Is this expected? >> >> > >> >> > -- >> >> > Eric >> >> > >> >> >> >> >> >> >> >> -- >> >> Linda Rawson >> > >> > >> > >> > -- >> > Linda Rawson >> > _______________________________________________ >> > Users mailing list >> > Users@openlayers.org >> > http://openlayers.org/mailman/listinfo/users >> > >> > > > > > -- > Linda Rawson > -- Linda Rawson From linda.rawson at gmail.com Wed Jun 18 10:54:52 2008 From: linda.rawson at gmail.com (Linda Rawson) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Help with 2.6 strokeWidth and strokeweight on linestring on IE In-Reply-To: <5b021dd0806180324t61a0afd1o310a44fb48248994@mail.gmail.com> References: <6e9b30fb0806031402t474fee22wf0648647fbd374e9@mail.gmail.com> <5b021dd0806180324t61a0afd1o310a44fb48248994@mail.gmail.com> Message-ID: <6e9b30fb0806180754j1d031a09y698d2d2c569c7cac@mail.gmail.com> Please see this post -> http://openlayers.org/pipermail/users/2008-June/006154.html for example. Thanks, Linda On Wed, Jun 18, 2008 at 4:24 AM, Andreas Hocevar wrote: > Can you please provide a stripped down example that shows the problem? > > Regards, > Andreas. > > On Tue, Jun 3, 2008 at 11:02 PM, Linda Rawson wrote: >> I am just getting back to trying to get my application to run in 2.6. >> I cannot see linestring vector objects at the lowest scales. I am >> beating my head against the wall. I get some of them to show up, >> those with only 4 points by setting the StrokeWidth to 1 on the style. >> >> The rest....don't work. I step through the code. At these lines in VML.JS >> >> if (options.isStroked) { >> node.setAttribute("strokecolor", style.strokeColor); >> node.setAttribute("strokeweight", style.strokeWidth + "px"); >> } else { >> node.setAttribute("stroked", "false"); >> } >> >> node.getAttribute("strokeweight") before is 0.75. On the first zoom >> levels it changes to "1px". Anytime I zoom further it will not change >> the value of strokeweight no matter how hard I try to change the value >> using hardcoded attributes or whatever. >> >> What has changed in this area between version 2.5 and 2.6. Where is >> .75 coming from? Where can I override that? >> >> -- >> Linda Rawson >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > -- Linda Rawson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080618/d336f3d5/attachment.html From eric.c2c at gmail.com Wed Jun 18 16:48:18 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <6e9b30fb0806180752w35a1de9cq19443910da1624c4@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> <6e9b30fb0806180748n659e5b17w1cc60044be1fed40@mail.gmail.com> <6e9b30fb0806180752w35a1de9cq19443910da1624c4@mail.gmail.com> Message-ID: <5ec103de0806181348h2310bfa7j3fe50c807095a0b@mail.gmail.com> Hi, On FF2 the line disappears on zoom #16. The line disappears in drawLineString() (SVG.js) when calling setAttributeNS(). I couldn't get any further. -- Eric From christian.schanz at gmail.com Wed Jun 18 16:51:28 2008 From: christian.schanz at gmail.com (Christian Schanz) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] dynamic generated kml-layer In-Reply-To: <1213676860.2312.30.camel@bender> References: <479F7ED0-294E-4D5D-9598-AA7165D00849@gmail.com> <4856546E.2070803@lisasoft.com> <5ec103de0806161421q35f80f9di951c1dcdfbf67560@mail.gmail.com> <20080617010119.GA20058@metacarta.com> <1213676860.2312.30.camel@bender> Message-ID: > > P.S. Christian Schanz sent an email off-list saying that he had things > working for him (dunno what he has running server side). > Hello, well, I forgot to answer to the list but the javascript example from Roald worked just fine. I have no real server running. It is just a little php-Script (I did it in python, too) that delivers a kml-File with photos I have taken in the given extent. Regards, Christian From eric.c2c at gmail.com Wed Jun 18 16:59:43 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <5ec103de0806181348h2310bfa7j3fe50c807095a0b@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> <6e9b30fb0806180748n659e5b17w1cc60044be1fed40@mail.gmail.com> <6e9b30fb0806180752w35a1de9cq19443910da1624c4@mail.gmail.com> <5ec103de0806181348h2310bfa7j3fe50c807095a0b@mail.gmail.com> Message-ID: <5ec103de0806181359g669f63bevea6bcea691892131@mail.gmail.com> On Wed, Jun 18, 2008 at 10:48 PM, Eric Lemoine wrote: > Hi, > > On FF2 the line disappears on zoom #16. The line disappears in > drawLineString() (SVG.js) when calling setAttributeNS(). I couldn't > get any further. The problem comes from the fact SVG.inValidRange() returns false. Hope that can help you debug this Andreas. -- Eric From bmcbride at cha-llp.com Wed Jun 18 17:44:42 2008 From: bmcbride at cha-llp.com (bmcbride) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Newbie Projection Troubles Message-ID: <17157211.post@talk.nabble.com> Hello, I'm working with the spherical-mercator example and trying to add a WMS layer, which is in EPSG:4326. The WMS (NYC Imagery) layer will not render on the map and I'm sure it has to do with either projection, maxResolution, or maxExtent variables, but I cannot figure it out. Any help would be greatly appreciated. The code is below: // make map available for easy debugging var map; // avoid pink tiles OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; OpenLayers.Util.onImageLoadErrorColor = "transparent"; function init(){ var options = { 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) }; map = new OpenLayers.Map('map', options); // create Google Mercator layers var gmap = new OpenLayers.Layer.Google( "Google Streets", {'sphericalMercator': true} ); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {type: G_SATELLITE_MAP, 'sphericalMercator': true} ); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP, 'sphericalMercator': true} ); // create Virtual Earth layers var veroad = new OpenLayers.Layer.VirtualEarth( "Virtual Earth Roads", {'type': VEMapStyle.Road, 'sphericalMercator': true} ); var veaer = new OpenLayers.Layer.VirtualEarth( "Virtual Earth Aerial", {'type': VEMapStyle.Aerial, 'sphericalMercator': true} ); var vehyb = new OpenLayers.Layer.VirtualEarth( "Virtual Earth Hybrid", {'type': VEMapStyle.Hybrid, 'sphericalMercator': true} ); // create Yahoo layer var yahoo = new OpenLayers.Layer.Yahoo( "Yahoo Street", {'sphericalMercator': true} ); var yahoosat = new OpenLayers.Layer.Yahoo( "Yahoo Satellite", {'type': YAHOO_MAP_SAT, 'sphericalMercator': true} ); var yahoohyb = new OpenLayers.Layer.Yahoo( "Yahoo Hybrid", {'type': YAHOO_MAP_HYB, 'sphericalMercator': true} ); // create OSM layer var mapnik = new OpenLayers.Layer.TMS( "OpenStreetMap (Mapnik)", "http://tile.openstreetmap.org/", { type: 'png', getURL: osm_getTileURL, displayOutsideMaxExtent: true, attribution: ' http://www.openstreetmap.org/ OpenStreetMap ' } ); // create OSM layer var osmarender = new OpenLayers.Layer.TMS( "OpenStreetMap (Tiles@Home)", "http://tah.openstreetmap.org/Tiles/tile.php/", { type: 'png', getURL: osm_getTileURL, displayOutsideMaxExtent: true, attribution: ' http://www.openstreetmap.org/ OpenStreetMap ' } ); // create WMS layer var wms = new OpenLayers.Layer.WMS( "World Map", "http://world.freemap.in/tiles/", {'layers': 'factbook-overlay', 'format':'png'}, { 'opacity': 0.4, 'isBaseLayer': false,'wrapDateLine': true } ); var nysdop = new OpenLayers.Layer.WMS( "NYSDOP", "http://imsortho.cr.usgs.gov/servlet/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid?", {'layers': "NY_NYC_2006_2FT_NC"},{projection:"EPSG:4326"} ); // create a vector layer for drawing var vector = new OpenLayers.Layer.Vector("Editable Vectors"); map.addLayers([gmap, gsat, ghyb, nysdop, veroad, veaer, vehyb, yahoo, yahoosat, yahoohyb, mapnik, osmarender, wms, vector]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.EditingToolbar(vector)); map.addControl(new OpenLayers.Control.Permalink()); map.addControl(new OpenLayers.Control.MousePosition()); if (!map.getCenter()) {map.zoomToMaxExtent()} } function osm_getTileURL(bounds) { var res = this.map.getResolution(); var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)); var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = Math.pow(2, z); if (y < 0 || y >= limit) { return OpenLayers.Util.getImagesLocation() + "404.png"; } else { x = ((x % limit) + limit) % limit; return this.url + z + "/" + x + "/" + y + "." + this.type; } } The following example works fine, but I need the commercial imagery and OSM mapnik data available... var map = null; function init(){ map = new OpenLayers.Map('map'); var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); var nysdop = new OpenLayers.Layer.WMS( "NYSDOP", "http://imsortho.cr.usgs.gov/servlet/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid?", {layers: "NY_NYC_2006_2FT_NC"} ); map.addLayers([ol_wms, nysdop]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); } -- View this message in context: http://www.nabble.com/Newbie-Projection-Troubles-tp17157211p17157211.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From pagameba at gmail.com Wed Jun 18 21:14:53 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Newbie Projection Troubles In-Reply-To: <17157211.post@talk.nabble.com> References: <17157211.post@talk.nabble.com> Message-ID: Hi, unfortunately you cannot overlay 4326 tiles on a spherical mercator basemap. OpenLayers does not reproject your tiles. If your basemap is using spherical mercator (as is the case with the commercial services) then your overlay layers (i.e. your WMS) need to support the spherical mercator projection. If it doesn't, then you will not be able to put them on the spherical mercator map. You have a couple of choices at this point. If you control the WMS, then you can probably modify it to add support for the spherical mercator projection. If you know who does run it then you can contact them to see if they will do it. Finally, if you can't change the WMS then you could set up a mapping server as a WMS Server and WMS Client where the WMS client ingests the WMS layer in 4326 and republishes it in 900913 - but you need a mapping server that can reproject (warp) rasters on the fly, such as MapServer. Probably not good news for you, but I hope that helps. Cheers Paul On 18-Jun-08, at 5:44 PM, bmcbride wrote: > > Hello, > I'm working with the spherical-mercator example and trying to add a > WMS > layer, which is in EPSG:4326. The WMS (NYC Imagery) layer will not > render > on the map and I'm sure it has to do with either projection, > maxResolution, > or maxExtent variables, but I cannot figure it out. Any help would be > greatly appreciated. The code is below: > > // make map available for easy debugging > var map; > > // avoid pink tiles > OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; > OpenLayers.Util.onImageLoadErrorColor = "transparent"; > > function init(){ > var options = { > 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) > }; > map = new OpenLayers.Map('map', options); > > // create Google Mercator layers > var gmap = new OpenLayers.Layer.Google( > "Google Streets", > {'sphericalMercator': true} > ); > var gsat = new OpenLayers.Layer.Google( > "Google Satellite", > {type: G_SATELLITE_MAP, 'sphericalMercator': true} > ); > var ghyb = new OpenLayers.Layer.Google( > "Google Hybrid", > {type: G_HYBRID_MAP, 'sphericalMercator': true} > ); > > > // create Virtual Earth layers > var veroad = new OpenLayers.Layer.VirtualEarth( > "Virtual Earth Roads", > {'type': VEMapStyle.Road, 'sphericalMercator': true} > ); > var veaer = new OpenLayers.Layer.VirtualEarth( > "Virtual Earth Aerial", > {'type': VEMapStyle.Aerial, 'sphericalMercator': true} > ); > var vehyb = new OpenLayers.Layer.VirtualEarth( > "Virtual Earth Hybrid", > {'type': VEMapStyle.Hybrid, 'sphericalMercator': true} > ); > > // create Yahoo layer > var yahoo = new OpenLayers.Layer.Yahoo( > "Yahoo Street", > {'sphericalMercator': true} > ); > var yahoosat = new OpenLayers.Layer.Yahoo( > "Yahoo Satellite", > {'type': YAHOO_MAP_SAT, 'sphericalMercator': true} > ); > var yahoohyb = new OpenLayers.Layer.Yahoo( > "Yahoo Hybrid", > {'type': YAHOO_MAP_HYB, 'sphericalMercator': true} > ); > > // create OSM layer > var mapnik = new OpenLayers.Layer.TMS( > "OpenStreetMap (Mapnik)", > "http://tile.openstreetmap.org/", > { > type: 'png', getURL: osm_getTileURL, > displayOutsideMaxExtent: true, > attribution: ' http://www.openstreetmap.org/ > OpenStreetMap ' > } > ); > > // create OSM layer > var osmarender = new OpenLayers.Layer.TMS( > "OpenStreetMap (Tiles@Home)", > "http://tah.openstreetmap.org/Tiles/tile.php/", > { > type: 'png', getURL: osm_getTileURL, > displayOutsideMaxExtent: true, > attribution: ' http://www.openstreetmap.org/ > OpenStreetMap ' > } > ); > > > // create WMS layer > var wms = new OpenLayers.Layer.WMS( > "World Map", > "http://world.freemap.in/tiles/", > {'layers': 'factbook-overlay', 'format':'png'}, > { > 'opacity': 0.4, > 'isBaseLayer': false,'wrapDateLine': true > } > ); > > var nysdop = new OpenLayers.Layer.WMS( > "NYSDOP", > > "http://imsortho.cr.usgs.gov/servlet/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid? > ", > {'layers': "NY_NYC_2006_2FT_NC"},{projection:"EPSG: > 4326"} > ); > > // create a vector layer for drawing > var vector = new OpenLayers.Layer.Vector("Editable > Vectors"); > > map.addLayers([gmap, gsat, ghyb, nysdop, veroad, veaer, > vehyb, > yahoo, yahoosat, yahoohyb, mapnik, > osmarender, > wms, vector]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new > OpenLayers.Control.EditingToolbar(vector)); > map.addControl(new OpenLayers.Control.Permalink()); > map.addControl(new OpenLayers.Control.MousePosition()); > if (!map.getCenter()) {map.zoomToMaxExtent()} > } > > function osm_getTileURL(bounds) { > var res = this.map.getResolution(); > var x = Math.round((bounds.left - this.maxExtent.left) / > (res * > this.tileSize.w)); > var y = Math.round((this.maxExtent.top - bounds.top) / > (res * > this.tileSize.h)); > var z = this.map.getZoom(); > var limit = Math.pow(2, z); > > if (y < 0 || y >= limit) { > return OpenLayers.Util.getImagesLocation() + "404.png"; > } else { > x = ((x % limit) + limit) % limit; > return this.url + z + "/" + x + "/" + y + "." + > this.type; > } > } > > The following example works fine, but I need the commercial imagery > and OSM > mapnik data available... > > var map = null; > > function init(){ > > map = new OpenLayers.Map('map'); > > var ol_wms = new OpenLayers.Layer.WMS( > "OpenLayers WMS", > "http://labs.metacarta.com/wms/vmap0", > {layers: 'basic'} > ); > > var nysdop = new OpenLayers.Layer.WMS( > "NYSDOP", > > "http://imsortho.cr.usgs.gov/servlet/com.esri.wms.Esrimap/USGS_EDC_Ortho_NYSDOP_Grid? > ", > {layers: "NY_NYC_2006_2FT_NC"} > ); > > map.addLayers([ol_wms, nysdop]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.zoomToMaxExtent(); > } > > -- > View this message in context: http://www.nabble.com/Newbie-Projection-Troubles-tp17157211p17157211.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 indika85 at gmail.com Thu Jun 19 01:50:47 2008 From: indika85 at gmail.com (Indika Tantrigoda) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Layer Groups and hierarchy Message-ID: <4390fbee0806182250v4383db94vf45bf60cd8072644@mail.gmail.com> Hello, I'd like to know, if theres anyway that I can group layers into a hierarchy. Thanks in advance Regards, Indika -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080619/daa06db2/attachment.html From juozas.urbonas at teltonika.lt Thu Jun 19 02:56:32 2008 From: juozas.urbonas at teltonika.lt (Juozas Urbonas) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Missing tiles Message-ID: <8BAEF80472DB48C0A4FA482C2A4CB6DA@JUOZASURBONAS> After moving TileCache from Apache to IIS problem disappeared, but exact reason is stil unknown. Note, that this problem appeared only using https. ----- Original Message ----- From: Juozas Urbonas To: users@openlayers.org Sent: Thursday, June 12, 2008 5:29 PM Subject: Missing tiles Hello, My problem is: sometimes some tiles are not shown on map, and when you zoom in, then zoom back out, or in reverse, or pan far to one side, and when pan back, the missing tiles are shown in most cases, but not always. I can repeat this behavior on IE7, but cannot repeat it on Firefox 2.0 (I was told, that it happens on Firefox to). I did some investigation, and it looks like it is clearly client side problem. Using IE Developer Toolbar I can find missing tile's div in DOM and it have it's style "Display" property set to "none". So maybe some one have any ideas why it's happening? We are currently using OL v2.6. Maps are hosted using TileCache and served using https. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080619/155539b2/attachment.html From mynature at gmail.com Thu Jun 19 03:21:33 2008 From: mynature at gmail.com (Adorian Ardelean) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] browser does not support vector rendering message Message-ID: Hi, I have been playing with openlayers merging some examples from openlayers site (especially code for drawing points, lines, polygons etc.). All worked fine under FF 2. However, under the new FF3 I receive a message telling: "Your browser does not support vector rendering. Currently supported renderers are: SVG VML" I am using the OL 2.6. The message particularly gets triggered when I choose one of the tools for drawing vectors on map. I understood that a similar message occured in Safari. Are solutions around this? Or things that I should avoid in code so this message does not appear? Thank you, Adi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080619/23a3d19f/attachment.html From bluecarto at gmail.com Thu Jun 19 05:07:31 2008 From: bluecarto at gmail.com (Pierre GIRAUD) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Dynamically change a control handler In-Reply-To: <4858F4CA.6080803@makina-corpus.com> References: <4858F4CA.6080803@makina-corpus.com> Message-ID: I had a quick test with your code snippets and this worked well with a custom drawFeature control. My feeling is that the code you provided is not responsible for the issue encountered on IE. Regards, Pierre Here's my code (tested in IE6 and IE7) : {{{ Draw Feature Example

OpenLayers Draw Feature Example

Demonstrate on-screen digitizing tools for point, line, and polygon creation.

    Controls
    Draw Handlers
}}} On Wed, Jun 18, 2008 at 1:43 PM, Gilles Bassi?re wrote: > Hi list, > > I'd like to know if there is a cross-browser way to change the mouse handler > associated to a control. > > Context: I want to query the server for a given area. This area may be a > point, a box or a any polygon. The user can choose the type of area with > simple html radiobuttons. > > My control is set up with the following draw() method: > > draw: function() { > switch (this.handlerType) { > case 'POINT': > this.handler = new OpenLayers.Handler.Point( > this, > {done: this.selectGeom}, > {keyMask: this.keyMask} > ); > break; > case 'BOX': > this.handler = new OpenLayers.Handler.RegularPolygon( > this, > {done: this.selectGeom}, > {keyMask: this.keyMask, sides: 4, irregular: true} > ); > break; > ... > } > }, > > I added a custom method in order to set the "handlerType" property: > > setHandlerType: function(handlerType) { > this.handlerType = handlerType; > if (this.active) { > this.deactivate(); > this.draw(); > this.activate(); > } > }, > > All this works pretty fine in Firefox but does not in IE... > The behavior in IE is the following: > - when the control is selected, the default point handler works fine and the > user can click on the map to fire a data request. > - if the user change the handler type (using html radiobuttons and so, the > control setHandlerType method), the mouse handler is lost until the first > click on the map. > > Right after the call to setHandlerType(), I expect is to see my new handler > but in IE, there is just no handler. The user needs to click once on the map > and then the handler appears... > > Is it simply possible to achieve dynamic replacement of a control handler? > If so, can anyone point me in the right direction? > > Regards > Gilles > > -- > Gilles Bassiere > MAKINA CORPUS > 30 rue des Jeuneurs > FR-75002 PARIS > +33 (0) 1 44 82 00 80 > http://www.makina-corpus.com > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From helle at sdac.hannover.bgr.de Thu Jun 19 05:27:55 2008 From: helle at sdac.hannover.bgr.de (Nina Helle-Mildt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GetFeatureInfo request displayed in popup Message-ID: <485A269B.6080301@sdac.hannover.bgr.de> Hi to all, I'm trying to get a GetFeatureInfo request displayed in an AnchoredBubble popup. But all I can achieve at the moment is a popup with a placeholder for my GetFeaturInfo request saying [object Object]. var createPopup = function(response) { var lonlat = seis.map.getLonLatFromViewPortPx(this.xy); var popup = new OpenLayers.Popup.AnchoredBubble( " ",lonlat, null, response, null, true); map.addPopup(popup, true /* exclusive */); popup.setBackgroundColor("#c1cdc1"); }; map.events.register('click', map, function (e) { OpenLayers.Util.getElement('nodeList').innerHTML = "Einen Moment bitte ..."; var url = seis.getFullRequestString({ REQUEST: "GetFeatureInfo", EXCEPTIONS: "application/vnd.ogc.se_xml", BBOX: seis.map.getExtent().toBBOX(), X: e.xy.x, Y: e.xy.y, INFO_FORMAT: 'text/html', QUERY_LAYERS: seis.params.LAYERS, WIDTH: seis.map.size.w, HEIGHT: seis.map.size.h }); OpenLayers.loadURL(url, '', e, createPopup); OpenLayers.Event.stop(e); }); How I can achieve that? By the way, is it possible to use a google maps base layer as map in the OverviewMap control? Thanks a lot, Nina From crschmidt at metacarta.com Thu Jun 19 08:31:56 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] browser does not support vector rendering message In-Reply-To: References: Message-ID: <20080619123156.GA15314@metacarta.com> On Thu, Jun 19, 2008 at 09:21:33AM +0200, Adorian Ardelean wrote: > Hi, > > I have been playing with openlayers merging some examples from openlayers > site (especially code for drawing points, lines, polygons etc.). All worked > fine under FF 2. However, under the new FF3 I receive a message telling: > > "Your browser does not support vector rendering. Currently supported > renderers are: > SVG VML" > > I am using the OL 2.6. > > The message particularly gets triggered when I choose one of the tools for > drawing vectors on map. > > I understood that a similar message occured in Safari. > Are solutions around this? Or things that I should avoid in code so this > message does not appear? Are you *sure* you're using 2.6? Does it happen on the examples, like http://openlayers.org/dev/examples/vector-features.html ? This would be a problem in 2.6-rc1, but should not be in the 2.6 final release. For the record, that page seems to open fine in Firefox 3 for me. Regards, -- Christopher Schmidt MetaCarta From rdmailings at duif.net Thu Jun 19 08:52:37 2008 From: rdmailings at duif.net (Richard Duivenvoorde) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] browser does not support vector rendering message In-Reply-To: References: Message-ID: <485A5695.8070908@duif.net> Hi Adorian, I've coded site using vector-editing functionality, and had the same error after installing ff3, BUT was running OL-2.5. After upgrading to 2.6 the error was gone (though off course there were some other 'upgrading-issues' in my code ;-) So: I think you're still on 2.6. In firebug, if you 'Watch' the variable OpenLayers.VERSION_NUMBER it shows '$Revision 6819' with me (this is a 2.6 release downloaded yesterday). Regards, Richard Duivenvoorde Adorian Ardelean wrote: > Hi, > > I have been playing with openlayers merging some examples from > openlayers site (especially code for drawing points, lines, polygons > etc.). All worked fine under FF 2. However, under the new FF3 I receive > a message telling: > > "Your browser does not support vector rendering. Currently supported > renderers are: > SVG VML" > > I am using the OL 2.6. > > The message particularly gets triggered when I choose one of the tools > for drawing vectors on map. > > I understood that a similar message occured in Safari. > Are solutions around this? Or things that I should avoid in code so this > message does not appear? > > Thank you, > Adi > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From mynature at gmail.com Thu Jun 19 09:27:17 2008 From: mynature at gmail.com (Adorian Ardelean) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] browser does not support vector rendering message In-Reply-To: <485A5695.8070908@duif.net> References: <485A5695.8070908@duif.net> Message-ID: Hi to all and thanx for the prompt reply, I looks like I am not using the last version. Revision number in one of the files I have used is 6088 and I see from the last download that this number is currently 6819. Sorry for trouble. The code worked perfectly under FF2 but under FF3 failed...and then suggestion from Kenneth helped. Now switching to last download (2.6. stable) the whole thing is not functional again (no error message I can trace yet) but since the application is large and uses prototype and other libraries I think I will have to separate all and test where is the conflict or if this is due to "my" ol code. But this is another story... This is indeed a very active project a key to its success. I am so impressed. All the best, Adorian On Thu, Jun 19, 2008 at 2:52 PM, Richard Duivenvoorde wrote: > Hi Adorian, > > I've coded site using vector-editing functionality, and had the same error > after installing ff3, BUT was running OL-2.5. > > After upgrading to 2.6 the error was gone (though off course there were > some other 'upgrading-issues' in my code ;-) > > So: I think you're still on 2.6. > > In firebug, if you 'Watch' the variable OpenLayers.VERSION_NUMBER it shows > '$Revision 6819' with me (this is a 2.6 release downloaded yesterday). > > Regards, > > Richard Duivenvoorde > > Adorian Ardelean wrote: > >> Hi, >> >> I have been playing with openlayers merging some examples from openlayers >> site (especially code for drawing points, lines, polygons etc.). All worked >> fine under FF 2. However, under the new FF3 I receive a message telling: >> >> "Your browser does not support vector rendering. Currently supported >> renderers are: >> SVG VML" >> >> I am using the OL 2.6. >> >> The message particularly gets triggered when I choose one of the tools for >> drawing vectors on map. >> >> I understood that a similar message occured in Safari. >> Are solutions around this? Or things that I should avoid in code so this >> message does not appear? >> >> Thank you, >> Adi >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- Dr. Adorian Ardelean coordinator of myNature Project http://mybiosis.info/nature/portal.php?pagename=firstpage [a Romanian biodiversity-database] http://mybiosis.info/nature/portal.php?pagename=adorian [CV] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080619/1b7ff5a6/attachment.html From myjiang at yahoo.com Thu Jun 19 09:51:12 2008 From: myjiang at yahoo.com (dukie) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] How to use the SelectFeature Control's select method without triggering onSelect Message-ID: <17983515.post@talk.nabble.com> I am relatively new to OpenLayers, and having fun with it. I run into an issue that I am sure someone here may have already run into. I am trying to set up 2-way communication between a vector layer and a query results list. What happens is that hovering over a feature (hover:true) or click on a feature, the onSelect event is triggered, which enables me to triggers a select (highlight) on a row in my feature list. Selecting multiple features (using clicks) allows me to select multiple rows in my list. Now I want to get the reverse done. When selecting rows from my feature list, I want the corresponding features to become selected. The problem is that every time a feature become selected, it triggers its onSelect AGAIN, interfering with what I am doing on the list. Is there a way to use the SelectFeature's select method from code without triggering the onSelect event ? Thanks in Advance. -- View this message in context: http://www.nabble.com/How-to-use-the-SelectFeature-Control%27s-select-method-without-triggering-onSelect-tp17983515p17983515.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From myjiang at yahoo.com Thu Jun 19 10:49:05 2008 From: myjiang at yahoo.com (dukie) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GetFeatureInfo request displayed in popup Message-ID: <18007243.post@talk.nabble.com> Nina, you need to pass in the response.reponseText instead of just response. var popup = new OpenLayers.Popup.AnchoredBubble( " ",lonlat, null, response.responseText, null, true); -- View this message in context: http://www.nabble.com/GetFeatureInfo-request-displayed-in-popup-tp18000914p18007243.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From claudius.h at gmx.de Thu Jun 19 12:18:28 2008 From: claudius.h at gmx.de (Claudius Henrichs) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Custom drag:done handler interferes with map-dragging Message-ID: <485A86D4.3050001@gmx.de> Hello there, I want to perform a map update (getting new markers) each time dragging the map has finished. What i tried so far ended up in the map-dragging getting disabled: // Create a drag handler var draghandler = new OpenLayers.Handler.Drag(this, {done: function() {this, updatemarkers();}} ); // Attaching the draghandler to the map draghandler.setMap(map); // Activate draghandler draghandler.activate(); What can I do better? Regards, Claudius From crschmidt at metacarta.com Thu Jun 19 12:21:02 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Custom drag:done handler interferes with map-dragging In-Reply-To: <485A86D4.3050001@gmx.de> References: <485A86D4.3050001@gmx.de> Message-ID: <20080619162102.GA19593@metacarta.com> On Thu, Jun 19, 2008 at 06:18:28PM +0200, Claudius Henrichs wrote: > Hello there, > > I want to perform a map update (getting new markers) each time dragging > the map has finished. What i tried so far ended up in the map-dragging > getting disabled: > > // Create a drag handler > var draghandler = new OpenLayers.Handler.Drag(this, {done: function() > {this, updatemarkers();}} ); > > // Attaching the draghandler to the map > draghandler.setMap(map); > > // Activate draghandler > draghandler.activate(); > > What can I do better? map.events.register("moveend", null, updatemarkers); Regards, -- Christopher Schmidt MetaCarta From wolgri at ya.ru Thu Jun 19 16:58:06 2008 From: wolgri at ya.ru (Volodymer Grigorenko) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] How to extract attributes on layer load ? Message-ID: <20080619205806.GA31837@deblap> Hi list . I`m trying to make my first OL app . The idea is to get WFS features for extend display it on map and theire attributes parsed and sorted in div zone . Ok i`ve made my function based on http://world.freemap.in/ whitch do the job on mouse click event but how to run it on layer load ? From kenichi.ueda at gmail.com Thu Jun 19 17:14:39 2008 From: kenichi.ueda at gmail.com (Ken-ichi) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] How to extract attributes on layer load ? In-Reply-To: <20080619205806.GA31837@deblap> References: <20080619205806.GA31837@deblap> Message-ID: <1a9849d0806191414s6db9b48bxd837af39adbfe1cf@mail.gmail.com> Hi, Have you tried listening for the loadend or featuresadded events? I haven't worked with WFS layers yet, so I don't know if this would work, but you could try yourWFSLayer.events.on({ 'loadend': function() { alert('foo'); } }); map.addLayer(yourWFSLayer); -ken-ichi On Thu, Jun 19, 2008 at 1:58 PM, Volodymer Grigorenko wrote: > Hi list . > I`m trying to make my first OL app . The idea is to get WFS features for > extend display it on map and theire attributes parsed and sorted in div > zone . Ok i`ve made my function based on http://world.freemap.in/ whitch do > the job on mouse click event but how to run it on layer load ? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From iansgis at GMAIL.COM Thu Jun 19 19:05:07 2008 From: iansgis at GMAIL.COM (youknowho) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Overview map resolution difficulties In-Reply-To: <5b61c6c50806171307v53db7d49u5f56f3989b0d1e97@mail.gmail.com> References: <5b61c6c50806171307v53db7d49u5f56f3989b0d1e97@mail.gmail.com> Message-ID: <18019995.post@talk.nabble.com> I'm still struggling with this. I cannot change the resolution in tilecache or openlayers without interfering with my main map and causing shifted/incorrectly positioned data. I changed the overview to use the isSuitableOverview function as well but this has not solved the problem. OL: var options = {controls:[], maxExtent:new OpenLayers.Bounds(-180, -90, 180, 90), resolutions: [0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125], restrictedExtent:new OpenLayers.Bounds(-180, -90, 180, 90)} var ovOptions = {isSuitableOverview: function() {return true;}, mapOptions:{maxExtent:new OpenLayers.Bounds(-180, -90, 180, 90), numZoomLevels:1, maxResolution:2.0}} var map = new OpenLayers.Map('map', options); var ovm = new OpenLayers.Control.OverviewMap(ovOptions); map.addControl(ovm); TC: [basic] type=WMS url=http://host/cgi-bin/mapserv?map=/path/to/maps/WMS.map& layers=worldCountriesPolys,mexico_states_poly,mexico_states_line,us_states_poly,us_states_line bbox=-180, -90, 180, 90 resolutions=0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125, 0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125 I get the usual resolution index error: An error occurred: can't find resolution index for 2.000000. Available resolutions are: [0.3515625, 0.17578125, 0.087890625, 0.0439453125, 0.02197265625, 0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625, 0.0006866455078125, 0.00034332275390625, 0.000171661376953125, 8.58306884765625e-05, 4.291534423828125e-05] and I understand why it happens, but if I cannot change the resolution in openlayers or tilecache I do not see how to resolve this. -- View this message in context: http://www.nabble.com/Overview-map-resolution-difficulties-tp17936211p18019995.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From leonel.rocha at altasur.com.uy Thu Jun 19 19:21:31 2008 From: leonel.rocha at altasur.com.uy (lrocha) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Somebody can help me with setbaselayer? Message-ID: <18019634.post@talk.nabble.com> I need to set a new base layer acording to received parameter. The URL is as follow: http://localhost/track_mobile/viewer/tracking_onl.html?layers=roadup,google&blayer=Google Roads But the base layer always is ROADUP. The code is as follows: . . var mapGIS = new OpenLayers.Map('map', { controls: [], maxResolution: 'auto', eventListeners: { "moveend": mapEvent, "zoomend": mapEvent, "changebaselayer": mapBaseLayerChanged } }); for(var i = 0; i < Args.layers.length; i++) { switch(Args.layers[i]) { case 'roadup': mapGIS.addLayer( new OpenLayers.Layer.WMS( "RoadUP", "http://localhost:8080/geoserver/wms", {layers: 'TM_Mvdeo'}, {singleTile: true }) ); break; case 'google': mapGIS.addLayers([ new OpenLayers.Layer.Google( "Google Roads" ), new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP }), new OpenLayers.Layer.Google( "Google Physical" , {type: G_PHYSICAL_MAP }), new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP })] ); break; } if (Args.layers[i] == Args.blayer) { var baseL = mapGIS.layers[i]; } } mapGIS.setBaseLayer(baseL); . . -- View this message in context: http://www.nabble.com/Somebody-can-help-me-with-setbaselayer--tp18019634p18019634.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From euzuro at gmail.com Thu Jun 19 22:42:24 2008 From: euzuro at gmail.com (Erik Uzureau) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] FramedCloud and autoSize In-Reply-To: <20080616211430.GA1464@q.rho.net> References: <20080616211430.GA1464@q.rho.net> Message-ID: <6ae3fb590806191942ua311afbv926b840bc4873fe2@mail.gmail.com> Dear Wendell, There is a bug in the getRenderedDimensions() function which was found, reported, and fixed by a superstar member from the community, one Wally somethingerother. The fix is here: http://trac.openlayers.org/ticket/1570 ... and in trunk as well. Hopefully that will help getting those sizes fixed up right. Let us know if it works, Erik On Mon, Jun 16, 2008 at 4:14 PM, Wendell Turner wrote: > It seems that having lots of html (h2 headers, tables, font > size changes) inside a FramedCloud pop-up does not get > autoSize'd properly. I've tried various combinations of > setting autoSize to false, max/minSize, etc, but either the > size is still not right or there are ghost images of pop-up > box artifacts around the outside of the pop-up box. > > Is this a real problem? How can I get the pop-up to use a > scroll bar on the inside? Will that take care of the > problem? > > Thanks, > > Wendell > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From crschmidt at metacarta.com Thu Jun 19 23:19:58 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] FramedCloud and autoSize In-Reply-To: <6ae3fb590806191942ua311afbv926b840bc4873fe2@mail.gmail.com> References: <20080616211430.GA1464@q.rho.net> <6ae3fb590806191942ua311afbv926b840bc4873fe2@mail.gmail.com> Message-ID: <20080620031958.GA9440@metacarta.com> On Thu, Jun 19, 2008 at 09:42:24PM -0500, Erik Uzureau wrote: > Dear Wendell, > > There is a bug in the getRenderedDimensions() function which was > found, reported, and fixed by a superstar member from the community, > one Wally somethingerother. > > The fix is here: > http://trac.openlayers.org/ticket/1570 > > ... and in trunk as well. Hopefully that will help getting those sizes > fixed up right. I actually sort of doubt that this is the entire solution. One problem is that paddings (or maybe it's margins) on elements aren't neccesarily included in the calculations of scrollWidth. I typically do something like: .olPopupContent h2 { margin: 0px; padding: 0px; } to minimize the padding around my headers so that they don't get included. -- Chris > Let us know if it works, > Erik > > On Mon, Jun 16, 2008 at 4:14 PM, Wendell Turner wrote: > > It seems that having lots of html (h2 headers, tables, font > > size changes) inside a FramedCloud pop-up does not get > > autoSize'd properly. I've tried various combinations of > > setting autoSize to false, max/minSize, etc, but either the > > size is still not right or there are ghost images of pop-up > > box artifacts around the outside of the pop-up box. > > > > Is this a real problem? How can I get the pop-up to use a > > scroll bar on the inside? Will that take care of the > > problem? > > > > Thanks, > > > > Wendell > > > > _______________________________________________ > > 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 eric.c2c at gmail.com Fri Jun 20 01:34:23 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] How to use the SelectFeature Control's select method without triggering onSelect In-Reply-To: <17983515.post@talk.nabble.com> References: <17983515.post@talk.nabble.com> Message-ID: <5ec103de0806192234kbd853d7m89f371b3715294a7@mail.gmail.com> Hi. What call do you use to select the feature when a list element is selected? I think using layer.drawFeature(feature, 'select') should do the trick. Cheers. Eric 2008/6/19, dukie : > > I am relatively new to OpenLayers, and having fun with it. > > I run into an issue that I am sure someone here may have already run into. > > I am trying to set up 2-way communication between a vector layer and a query > results list. > > What happens is that hovering over a feature (hover:true) or click on a > feature, the onSelect > event is triggered, which enables me to triggers a select (highlight) on a > row in my feature list. > Selecting multiple features (using clicks) allows me to select multiple rows > in my list. > > Now I want to get the reverse done. When selecting rows from my feature > list, I want the > corresponding features to become selected. The problem is that every time a > feature > become selected, it triggers its onSelect AGAIN, interfering with what I > am doing on the list. > > Is there a way to use the SelectFeature's select method from code without > triggering the onSelect > event ? > > Thanks in Advance. > -- > View this message in context: > http://www.nabble.com/How-to-use-the-SelectFeature-Control%27s-select-method-without-triggering-onSelect-tp17983515p17983515.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 damien.lecole at gmail.com Fri Jun 20 05:45:52 2008 From: damien.lecole at gmail.com (=?UTF-8?Q?Damien_L=C3=A9cole?=) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Proj4js and IE Message-ID: <18025067.post@talk.nabble.com> Hi list, I have a map in EPSG:4326. I would like the coordinates displayed by my Control.MousePosition in EPSG:27582. So I am using Proj4js and I have written the following code : var pop = new OpenLayers.Projection('EPSG:4326'); var dpop = new OpenLayers.Projection('EPSG:27582'); var extent = new OpenLayers.Bounds(-5,40,8,52 ); var options = {theme: null, maxResolution:'auto', maxExtent: extent, numZoomLevels:12, controls:[], projection: pop, displayProjection: dpop, units:"m"}; map = new OpenLayers.Map('map',options); This works fine with Firefox but not with Internet Explorer : coordinates are still in EPSG:4326. Am I missing something? Thanks. Regards, Damien L?cole -- View this message in context: http://www.nabble.com/Proj4js-and-IE-tp18025067p18025067.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From wendell at enflight.com Fri Jun 20 09:01:12 2008 From: wendell at enflight.com (Wendell Turner) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] FramedCloud and autoSize In-Reply-To: <20080620031958.GA9440@metacarta.com> References: <20080616211430.GA1464@q.rho.net> <6ae3fb590806191942ua311afbv926b840bc4873fe2@mail.gmail.com> <20080620031958.GA9440@metacarta.com> Message-ID: <20080620130112.GA21656@q.rho.net> On Thu, Jun 19, 2008 at 11:19:58PM -0400, Christopher Schmidt wrote: > On Thu, Jun 19, 2008 at 09:42:24PM -0500, Erik Uzureau wrote: > > Dear Wendell, > > > > There is a bug in the getRenderedDimensions() function which was > > found, reported, and fixed by a superstar member from the community, > > one Wally somethingerother. > > > > The fix is here: > > http://trac.openlayers.org/ticket/1570 > > > > ... and in trunk as well. Hopefully that will help getting those sizes > > fixed up right. > > I actually sort of doubt that this is the entire solution. One problem > is that paddings (or maybe it's margins) on elements aren't neccesarily > included in the calculations of scrollWidth. > > I typically do something like: > .olPopupContent h2 { margin: 0px; padding: 0px; } > > to minimize the padding around my headers so that they don't get > included. > > -- Chris > > > Let us know if it works, Yes, the patch works great! Thanks to Wally Atkins and the rest. I'll also try the margin padding, that should help. Wendell From damarmo at gmail.com Fri Jun 20 09:13:14 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Problems with WFS marker override object Message-ID: <9771eb540806200613s7d56db6brbbf7ad5711cce7bd@mail.gmail.com> Hi List! I'm new in OpenLayers and JavaScript :S! I'm creating a web aplication with OpenLayers and I have two problems. 1. Why my html page don't work in InternetExplorer 6 ? 2. I need to show a pop up window with elemnts of a wfs layer and I try to override the featureClass:OpenLayers.Feature.WFS with the code I found in the UsersList but that nots works for me. I show a vector points in my window, but the points are not static, if I pam or zoom in the map the points change the position. This is my code of the Script: and any sugestion are wellcome! // make map available for easy debugging var map; // avoid pink tiles OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; OpenLayers.Util.onImageLoadErrorColor = "transparent"; function init(){ var options = {numZoomLevels: 20, projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326") }; // Create a map Object map = new OpenLayers.Map('map', options); // Create Google Mercator layers var gmap = new OpenLayers.Layer.Google( "Google Streets" // the default ); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {type: G_SATELLITE_MAP} ); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP} ); var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP} ); // Create a WFS Sites Layer var sites = new OpenLayers.Layer.WFS( "Sites", " http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map", {typename: "Sites",maxfeatures: 100 },{ featureClass: OpenLayers.Feature.WFS }); var sitesconsul = new OpenLayers.Layer.WFS( "Consulte des Sites", " http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map", {typename: "Sites",maxfeatures: 100 },{ featureClass: OpenLayers.Feature.WFS.Marker}); function DumpResult(source, result){ var s = ""; s = s + source + " " + "\n"; for (var x in result) { s = s + x + "=" + result[x] + "\n"; } if (result.get_stackTrace) s = s + result.get_stackTrace() + "\n"; s = s + "</pre>"; document.getElementById("DebugDiv").innerHTML = s; } OpenLayers.Feature.WFS.Marker = OpenLayers.Class.create(); OpenLayers.Feature.WFS.Marker.prototype = OpenLayers.Class.inherit( OpenLayers.Feature.WFS, { /** * @constructor * * @param {OpenLayers.Layer} layer * @param {XMLNode} xmlNode */ initialize: function(layer, xmlNode) { var newArguments = arguments; var data = this.processXMLNode(xmlNode); newArguments = new Array(layer, data.lonlat, data) OpenLayers.Feature.prototype.initialize.apply(this, newArguments); DumpResult("initialize", this); this.createMarker(); this.marker.events.register('click', this, this.markerClick); this.layer.addMarker(this.marker); }, /** * @param {XMLNode} xmlNode * * @returns Data Object with 'id', 'lonlat', and private properties set * @type Object */ processXMLNode: function(xmlNode) { //this should be overridden by subclasses // must return an Object with 'id' and 'lonlat' values set var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, "http://www.opengis.net/gml", "gml", "Point"); var text = OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(point [0], "http://www.opengis.net/gml","gml", "coordinates")[0]); var floats = text.split(","); var gid = OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, "http://mapserver.gis.umn.edu/mapserver", "ms", "gid")[0]); //DumpResult("processXMLNode", text); //document.getElementById("DebugDiv").innerHTML = gid; return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]), parseFloat(floats[1])),id: gid, gid: gid}; }, /** * @param {Event} evt */ markerClick: function(evt) { DumpResult("markerClick", evt); OpenLayers.Event.stop(evt); }, /** @final @type String */ CLASS_NAME: "OpenLayers.Feature.WFS.Marker" }); // Create a vector layer for drawing // var vector = new OpenLayers.Layer.Vector("Editable Vectors"); map.addLayers([gmap, gsat, ghyb, gphy, //veroad, veaer, vehyb, sites, sitesconsul]); //, cables]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.ScaleLine); // map.addControl(new OpenLayers.Control.EditingToolbar(vector)); map.addControl(new OpenLayers.Control.MousePosition()); if (!map.getCenter()) {map.zoomToMaxExtent()} } function changezoom(x,y,z) { map.setCenter(new OpenLayers.LonLat(x, y), z); } function showAddress(address) { var geocoder = new GClientGeocoder(); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) {alert(address + " not found");} else {map.setCenter(new OpenLayers.LonLat(point.x,point.y),15);} } ); } } THANKS!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080620/7ba4bcc0/attachment.html From gwennael.matot.ext at makina-corpus.com Fri Jun 20 09:26:46 2008 From: gwennael.matot.ext at makina-corpus.com (=?UTF-8?B?R3dlbm5hw6tsIG1hdG90?=) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Style, Rule and Comparison In-Reply-To: <18025067.post@talk.nabble.com> References: <18025067.post@talk.nabble.com> Message-ID: <485BB016.5010606@makina-corpus.com> Hi list ! I'd like some clarification on the use of the "Comparison" class. I have many feature defined with GeoJSON. I want to change style of feature according to an attribute "nb_voyage". Here a part of my test : /* DATA */ var waypoints = { type: "FeatureCollection", features: [{ type: "Feature", geometry: { type: "LineString", coordinates: [ [ 0.04863281249999929, 40.00107421875 ] , [ 0.3452636718749993, 38.81455078125 ] ] }, crs: { type: "OGC", properties: { urn: "urn:ogc:def:crs:OGC:1.3:CRS84" } }, properties: { nb_voyage: 3, from: "Point 1", to: "Point 10" } },{ type: "Feature", geometry: { type: "LineString", coordinates: [ [ -0.3139160156250007, 39.495703125 ] , [ 0.3452636718749993, 38.81455078125 ] ] }, crs: { type: "OGC", properties: { urn: "urn:ogc:def:crs:OGC:1.3:CRS84" } }, properties: { nb_voyage: 18, from: "Point 5", to: "Point 8" } }] }; /* BUILD STYLE */ var style = new OpenLayers.Style({strokeOpacity: 1, strokeLinecap: "round", strokeWidth: 2}); var ruleLow = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LESS_THAN, property: "nb_voyage", value: 15, symbolizer: {strokeColor: "#FF0000" } }); var ruleHigh = new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, property: "nb_voyage", value: 15, symbolizer: {strokeColor: "#00FF00" } }); var elseRule = new OpenLayers.Rule({ elseFilter: true, symbolizer: {strokeColor: "#0000FF" } }); style.addRules([ruleLow, ruleHigh, elseRule]); /* ADD DATA TO LAYER */ var geojson_format = new OpenLayers.Format.GeoJSON(); var layer = new OpenLayers.Layer.Vector("mylayer", { styleMap: new OpenLayers.StyleMap({ default: style }) }); layer.addFeatures(geojson_format.read(waypoints)); map.addLayer(layer); But the elseFilter rule is always applied ! After many trackback I saw in Comparison.evaluate(context) function that "context" is the feature. The comparison is done on the root properties of the feature (feature.nb_voyage), but my attribute is in "attributes" (feature.attributes.nb_voyage). Can i change this way ? Thanks for your help Gwenna?l Matot PS : the features are like to : feature: { CLASS_NAME: "OpenLayers.Feature.Vector", attributes: { from: "Point 1" to: "Point 2" nb_voyage: 5 }, data: { from: "Point 1" to: "Point 2" nb_voyage: 5 }, geometry: ..., renderIntent: "default", style: null, ... } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080620/e520c87b/attachment.html From gilles.bassiere at makina-corpus.com Fri Jun 20 09:36:00 2008 From: gilles.bassiere at makina-corpus.com (=?ISO-8859-15?Q?Gilles_Bassi=E8re?=) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Proj4js and IE In-Reply-To: <18025067.post@talk.nabble.com> References: <18025067.post@talk.nabble.com> Message-ID: <485BB240.5030103@makina-corpus.com> Hi Damien, Have you tried setting the displayProjection in the MousePosition control instead? Something like : var extent = new OpenLayers.Bounds(-5,40,8,52 ); var options = {theme: null, maxResolution:'auto', maxExtent: extent, numZoomLevels:12, controls:[], projection: 'EPSG:4326', units:"m"}; map = new OpenLayers.Map('map',options); controlMP = new OpenLayers.MousePosition({displayProjection: 'EPSG:27582'}) map.addControls([controlMP]); OpenLayers API doc may be useful (though incomplete sometimes...). See: http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Control/MousePosition-js.html Regards Gilles Damien L?cole wrote: > Hi list, > > I have a map in EPSG:4326. I would like the coordinates displayed by my > Control.MousePosition in EPSG:27582. So I am using Proj4js and I have > written the following code : > > > var pop = new OpenLayers.Projection('EPSG:4326'); > var dpop = new OpenLayers.Projection('EPSG:27582'); > var extent = new OpenLayers.Bounds(-5,40,8,52 ); > var options = {theme: null, maxResolution:'auto', maxExtent: extent, > numZoomLevels:12, controls:[], projection: pop, displayProjection: dpop, > units:"m"}; > map = new OpenLayers.Map('map',options); > > This works fine with Firefox but not with Internet Explorer : coordinates > are still in EPSG:4326. Am I missing something? Thanks. > > Regards, > Damien L?cole > -- Gilles Bassiere MAKINA CORPUS 30 rue des Jeuneurs FR-75002 PARIS +33 (0) 1 44 82 00 80 http://www.makina-corpus.com -------------- next part -------------- A non-text attachment was scrubbed... Name: gilles_bassiere.vcf Type: text/x-vcard Size: 368 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080620/953bd8c7/gilles_bassiere.vcf From bluecarto at gmail.com Fri Jun 20 09:44:21 2008 From: bluecarto at gmail.com (Pierre GIRAUD) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Style, Rule and Comparison In-Reply-To: <485BB016.5010606@makina-corpus.com> References: <18025067.post@talk.nabble.com> <485BB016.5010606@makina-corpus.com> Message-ID: <d50f50e60806200644i6bd69cj5241f4ba8d3dae42@mail.gmail.com> Stupid question but, shouldn't this look like ? > var ruleLow = new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.LESS_THAN, > property: "nb_voyage", > value: 15, > symbolizer: {strokeColor: "#FF0000" } > }); var ruleLow = new OpenLayers.Rule({ symbolizer : {strokeColor: "#FF0000" } filter : new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.LESS_THAN, property: "nb_voyage", value: 15 } }); I don't think you can give a Filter as argument to the addRules() method. Hope this helps. Best regards, Pierre From gwennael.matot.ext at makina-corpus.com Fri Jun 20 09:56:52 2008 From: gwennael.matot.ext at makina-corpus.com (=?ISO-8859-1?Q?Gwenna=EBl_matot?=) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Style, Rule and Comparison In-Reply-To: <d50f50e60806200644i6bd69cj5241f4ba8d3dae42@mail.gmail.com> References: <18025067.post@talk.nabble.com> <485BB016.5010606@makina-corpus.com> <d50f50e60806200644i6bd69cj5241f4ba8d3dae42@mail.gmail.com> Message-ID: <485BB724.40504@makina-corpus.com> Shame on me, it's working ! Thanks Pierre ! Gwenna?l Matot > Stupid question but, shouldn't this look like ? > > >> var ruleLow = new OpenLayers.Filter.Comparison({ >> type: OpenLayers.Filter.Comparison.LESS_THAN, >> property: "nb_voyage", >> value: 15, >> symbolizer: {strokeColor: "#FF0000" } >> }); >> > > > var ruleLow = new OpenLayers.Rule({ > symbolizer : {strokeColor: "#FF0000" } > filter : new OpenLayers.Filter.Comparison({ > type: OpenLayers.Filter.Comparison.LESS_THAN, > property: "nb_voyage", > value: 15 > } > }); > > I don't think you can give a Filter as argument to the addRules() method. > > Hope this helps. > > Best regards, > Pierre > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080620/5eddf20b/attachment.html From bluecarto at gmail.com Fri Jun 20 10:00:03 2008 From: bluecarto at gmail.com (Pierre GIRAUD) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Proj4js and IE In-Reply-To: <830cef7b0806200653h2eb015d9na5af3afecfd8de70@mail.gmail.com> References: <18025067.post@talk.nabble.com> <d50f50e60806200502n131935afl78be60a9b09912bc@mail.gmail.com> <830cef7b0806200653h2eb015d9na5af3afecfd8de70@mail.gmail.com> Message-ID: <d50f50e60806200700p731eb071x9dbdd8afa446e7b@mail.gmail.com> This is the code working for me. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> <link rel="stylesheet" href="style.css" type="text/css" /> <style type="text/css"> .olControlAttribution { bottom: 0px!important } #map { height: 512px; } </style> <script src="../lib/OpenLayers.js"></script> <script src="http://svn.codehaus.org/mapbuilder/cscs/trunk/proj4js/lib/proj4js-compressed.js"></script> <script type="text/javascript"> // make map available for easy debugging var map, layer; // avoid pink tiles OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; OpenLayers.Util.onImageLoadErrorColor = "transparent"; function init(){ Proj4js.defs["EPSG:27582"] = "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=-2.33722917 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"; var pop = new OpenLayers.Projection('EPSG:4326'); var dpop = new OpenLayers.Projection('EPSG:27582'); var extent = new OpenLayers.Bounds(-5,40,8,52 ); var options = { theme: null, maxResolution:'auto', maxExtent: extent, numZoomLevels:12, controls:[], projection: pop, displayProjection: dpop, units:"m" }; map = new OpenLayers.Map('map',options); // create WMS layer layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); map.addLayers([layer]); map.addControl(new OpenLayers.Control.MousePosition()); if (!map.getCenter()) {map.zoomToMaxExtent()} } </script> </head> <body onload="init()"> <h1 id="title">OpenLayers displayProjection Example</h1> <div id="map" class="smallmap"></div> <div id="docs"> </div> </body> </html> Hope this helps. On Fri, Jun 20, 2008 at 3:53 PM, Damien L?cole <damien.lecole@gmail.com> wrote: > Hi Pierre, > > Thanks for help. Unfortunately my code is too long to be posted here. I > have also tried with only basic code as following : > > function initialisation() > { > > ////////////////////////////////////////////// initialisation des > options pour la carte > var longi = 2.3; > var lati = 48.7; > var lonlat = new OpenLayers.LonLat(longi,lati); > var zoom = 2; > > > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > /////////////////////////////////////////////////////////////////// > cr?ation de la carte > > var extent = new OpenLayers.Bounds(-5,40,8,52 ); > var pop = new OpenLayers.Projection('EPSG:4326'); > var dpop = new OpenLayers.Projection('EPSG:27582'); > var options = {theme: null, maxResolution:'auto', maxExtent: extent, > numZoomLevels:20, projection: pop, displayProjection: dpop,controls:[]}; > map = new OpenLayers.Map('map',options); > > ///////////////////////////////////////// cr?ation et ajout des layers a > la carte > var geosignal_wms = new OpenLayers.Layer.WMS( "Plans de > ville","http://www.geosignal.org/cgi-bin/wmsmap?",{layers: > 'RASTER1000K,RASTER500K,RASTER250K,RASTER100K,RASTER50K,RASTER25K,RASTER5K'}); > map.addLayer(geosignal_wms); > > // cr?ation des controls > var mouse = new OpenLayers.Control.MousePosition(); > map.addControl(mouse); > map.addControl(new OpenLayers.Control.Navigation()); > map.setCenter(lonlat, zoom,false,false); > } > > > and the result is still the same. Maybe the map.setCenter() function or the > initialisation of the variables longi, lati or extent get some issues... > > > > > 2008/6/20 Pierre GIRAUD <bluecarto@gmail.com>: >> >> I just add a try in both IE6 and IE7 and it seems like it worked well for >> me. >> >> Can you give us more code so that we can test it in the same context as >> yours ? >> >> Regards, >> Pierre >> >> On Fri, Jun 20, 2008 at 11:45 AM, Damien L?cole <damien.lecole@gmail.com> >> wrote: >> > >> > Hi list, >> > >> > I have a map in EPSG:4326. I would like the coordinates displayed by my >> > Control.MousePosition in EPSG:27582. So I am using Proj4js and I have >> > written the following code : >> > >> > >> > var pop = new OpenLayers.Projection('EPSG:4326'); >> > var dpop = new OpenLayers.Projection('EPSG:27582'); >> > var extent = new OpenLayers.Bounds(-5,40,8,52 ); >> > var options = {theme: null, maxResolution:'auto', maxExtent: extent, >> > numZoomLevels:12, controls:[], projection: pop, displayProjection: dpop, >> > units:"m"}; >> > map = new OpenLayers.Map('map',options); >> > >> > This works fine with Firefox but not with Internet Explorer : >> > coordinates >> > are still in EPSG:4326. Am I missing something? Thanks. >> > >> > Regards, >> > Damien L?cole >> > -- >> > View this message in context: >> > http://www.nabble.com/Proj4js-and-IE-tp18025067p18025067.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 damien.lecole at gmail.com Fri Jun 20 10:23:04 2008 From: damien.lecole at gmail.com (=?UTF-8?Q?Damien_L=C3=A9cole?=) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Proj4js and IE In-Reply-To: <d50f50e60806200700p731eb071x9dbdd8afa446e7b@mail.gmail.com> References: <18025067.post@talk.nabble.com> <d50f50e60806200700p731eb071x9dbdd8afa446e7b@mail.gmail.com> Message-ID: <18030625.post@talk.nabble.com> Hi Gilles, I have tried your solution (and a lot of others permutation) but it doesn't work yet. The code gaven by Pierre is working on my computer. So that's a programming issue... I will try to add some functionalities to the code of Pierre and to replace his data with mines. Thanks for helping. PS (message personnel pour Gilles) : euh ?a va Gilles depuis Singapour ? ;) -- View this message in context: http://www.nabble.com/Proj4js-and-IE-tp18025067p18030625.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Matthew.Atkins at loyola.com Fri Jun 20 10:34:38 2008 From: Matthew.Atkins at loyola.com (Matthew Atkins) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] FramedCloud and autoSize In-Reply-To: <20080620130112.GA21656@q.rho.net> References: <20080616211430.GA1464@q.rho.net> <6ae3fb590806191942ua311afbv926b840bc4873fe2@mail.gmail.com> <20080620031958.GA9440@metacarta.com> <20080620130112.GA21656@q.rho.net> Message-ID: <121089CD850A6C428D442011256BC5CC0205BDCC@scorpio2.loyola.com> Wendell, As Chris mentioned the patch to ticket 1570 is not the entire solution. You will need to watch out for how you are defining your CSS with the FramedCloud content. The getRenderedDimensions() function creates a new DIV off-screen in order to calculate the size of the HTML content dynamically but it does not inherit the CSS rules like ".olFramedCloudPopupContent" and it is not inserted at the same level in the DOM hierarchy (it's appended to the document's BODY). So if you write CSS for your popup's content with selectors like: .olFramedCloudPopupContent h2 { /* rules */ } .olFramedCloudPopupContent table { /* rules */ } .olFramedCloudPopupContent p { /* rules */ } The styles will be applied to the content when it shows within the popup on-screen but the calculated size will be incorrect because the CSS rules were not applied (do not match) off-screen. Wally Atkins -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Wendell Turner Sent: Friday, June 20, 2008 9:01 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] FramedCloud and autoSize On Thu, Jun 19, 2008 at 11:19:58PM -0400, Christopher Schmidt wrote: > On Thu, Jun 19, 2008 at 09:42:24PM -0500, Erik Uzureau wrote: > > Dear Wendell, > > > > There is a bug in the getRenderedDimensions() function which was > > found, reported, and fixed by a superstar member from the community, > > one Wally somethingerother. > > > > The fix is here: > > http://trac.openlayers.org/ticket/1570 > > > > ... and in trunk as well. Hopefully that will help getting those sizes > > fixed up right. > > I actually sort of doubt that this is the entire solution. One problem > is that paddings (or maybe it's margins) on elements aren't neccesarily > included in the calculations of scrollWidth. > > I typically do something like: > .olPopupContent h2 { margin: 0px; padding: 0px; } > > to minimize the padding around my headers so that they don't get > included. > > -- Chris > > > Let us know if it works, Yes, the patch works great! Thanks to Wally Atkins and the rest. I'll also try the margin padding, that should help. Wendell _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From damien.lecole at gmail.com Fri Jun 20 11:25:12 2008 From: damien.lecole at gmail.com (=?UTF-8?Q?Damien_L=C3=A9cole?=) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Proj4js and IE In-Reply-To: <18030625.post@talk.nabble.com> References: <18025067.post@talk.nabble.com> <d50f50e60806200700p731eb071x9dbdd8afa446e7b@mail.gmail.com> <18030625.post@talk.nabble.com> Message-ID: <18031978.post@talk.nabble.com> Hi, I have found the solution : I was misssing to include the definition file of my projection in the HTML file :thinking:. Since it was working with Firefox, I thought that the definition file was automatically included by pro4js.js. It seems that's not the case. So I just have to add this line : <script src="../OL/proj4js/defs/EPSG27582.js"></script> in the following code : <html debug="true"> <head> <title>Pr?sentation des capacit?s d'OpenLayers</title> <link rel="stylesheet" href="../OL/OpenLayers-2.6/theme/default/style.css" type="text/css"/> <script src="../OL/OpenLayers-2.6/lib/OpenLayers.js"></script> <script src="../OL/proj4js/proj4js.js"></script> <script type="text/javascript" src="essai_init.js"></script> <script language="javascript" type="text/javascript" src="firebug/firebug.js"></script> <script type="text/javascript"> var map = null; var mysqlv = null; var travaux = null; var dessin = null; var mysqlf = null; var popup, info = null; var modif = null; var position = null; var nom, etat, com = null; // r?cup?ration de valeur de popup /*var panel,downtown,draggable,mysqlf,position,style_red,dessin; var osm_wms,mysqlv,mysqlv_ba,markers; var drags,drags_ba,modif,modif_ba; var popup,poulet; var icon_ec,icon_tra;*/ </script> </head> <body onload="initialisation()"> <div id="id_search"> <textarea id="in_search" rows=2></textarea> <button type="button" onclick="cherche_ajax()">Chercher</button> </div> <div id="map"></div> <div id="edit" class="olControlEditingToolbar"></div> <input type="checkbox" id="modif" onclick="modifier()" /> <label for="modif">Modifier une feature</label> <div> <textarea id="output"></textarea> </div> </body> </html> Thanks to Gilles and Pierre for helping me =) -- View this message in context: http://www.nabble.com/Proj4js-and-IE-tp18025067p18031978.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Fri Jun 20 13:30:45 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] How to extract attributes on layer load ? In-Reply-To: <20080619205806.GA31837@deblap> References: <20080619205806.GA31837@deblap> Message-ID: <5ec103de0806201030g5fac9c6fy39293464ae66dbce@mail.gmail.com> Hi. Use OpenLayers.Layer.WFS to get from some WFS service the features that the current extent contains. If the map is moved the layer will fetch and display new features. The WFS layer object includes a feature array, each feature in this array has a property named attributes which is an object with the actual feature attributes. Hope this helps. Eric 2008/6/19, Volodymer Grigorenko <wolgri@ya.ru>: > Hi list . > I`m trying to make my first OL app . The idea is to get WFS features for > extend display it on map and theire attributes parsed and sorted in div > zone . Ok i`ve made my function based on http://world.freemap.in/ whitch do > the job on mouse click event but how to run it on layer load ? > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From ivaxoyar at hotmail.com Fri Jun 20 15:13:14 2008 From: ivaxoyar at hotmail.com (Xavier Rayo) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] OPENLAYERS AND ARCIMS In-Reply-To: <48565967.6030406@fh-bingen.de> References: <044.aa2cad2e2fa0e0e5bb3ae69c24aa426e@openlayers.org> <48565967.6030406@fh-bingen.de> Message-ID: <BAY127-W1504DF8A1C8039445CFCECCA50@phx.gbl> HI ALL, is there any way to load arcims services with openlayers. I want to add a password to my layers and i don't know how to do it (and if it is possible) with mapserver, so i can do it with arcims, but i don't know how to add arcims layers into openlayers, thanks in advanced! xavi _________________________________________________________________ Connect to the next generation of MSN Messenger? http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080620/c5a424a0/attachment.html From Matthew.Atkins at loyola.com Fri Jun 20 15:11:26 2008 From: Matthew.Atkins at loyola.com (Matthew Atkins) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] OPENLAYERS AND ARCIMS In-Reply-To: <BAY127-W1504DF8A1C8039445CFCECCA50@phx.gbl> References: <044.aa2cad2e2fa0e0e5bb3ae69c24aa426e@openlayers.org> <48565967.6030406@fh-bingen.de> <BAY127-W1504DF8A1C8039445CFCECCA50@phx.gbl> Message-ID: <121089CD850A6C428D442011256BC5CC0205BDD5@scorpio2.loyola.com> Xavi, OpenLayers does not currently support ArcXML (http://trac.openlayers.org/ticket/213) but you can install and use the wmsconnector (which is an option in the ArcIMS install) to output WMS for your ArcIMS services. Then you can consume the WMS into OpenLayers. Wally Atkins ________________________________________ From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Xavier Rayo Sent: Friday, June 20, 2008 3:13 PM To: openlayers users Subject: [OpenLayers-Users] OPENLAYERS AND ARCIMS HI ALL, is there any way to load arcims services with openlayers. I want to add a password to my layers and i don't know how to do it (and if it is possible) with mapserver, so i can do it with arcims, but i don't know how to add arcims layers into openlayers, ? ? thanks in advanced! ? xavi ________________________________________ Connect to the next generation of MSN Messenger? Get it now! From hcan at hotmail.com Fri Jun 20 19:52:38 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <17961729.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> Message-ID: <18039318.post@talk.nabble.com> Hi! I have also seen this when trying to add a progress bar inside the loop. Nothing was drawn on then map until the loop was finished, and the prgogress bara was never updated. Sorry to say, but I never found a solution to this.... -Z realjax wrote: > > Hi, > > Since drawing rotated features (with an icon) in IE 6 is painstakingly > slow (14 times slower then Firefox), I was trying to see if I could have > features painted on the screen one by one, so the user has at least some > visual feedback, instead of looking at what seems a dead application for > several seconds. > > When using the addFeatures method of the Vector class, IE -and Firefox as > well for that matter- only show all features at once, *after* all features > have been added. Even when I create a loop to add only one feature at a > time, the layer is only redrawn after completion of the loop. > > When I attach a function to the event onFeatureAdded and for instance log > something to the console, things work as I'd expect and IE draws the > features one by one.. > > Can anyone comment on this, am I missing something ? > > Thanks in advance! > > > > > -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18039318.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From woodbri at swoodbridge.com Sat Jun 21 10:44:10 2008 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] New list us_tiger Message-ID: <485D13BA.1010103@swoodbridge.com> Hello all, Sorry for the cross postings but I want to let people know that I have created a new list that you might be interested in: us_tiger list was created for discussions regarding the US Census Tiger data and how to use and manipulate it. This list, despite its name, also welcomes discussion of similar national data set for other countries. You can subscribe here: http://lists.osgeo.org/mailman/listinfo/us_tiger Please send a message after you have subscribed with a short intro and include what you are doing or would like to do with the Tiger data. Best regards, -Stephen Woodbridge From eric.c2c at gmail.com Sat Jun 21 09:50:19 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <17961729.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> Message-ID: <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> On Wed, Jun 18, 2008 at 10:06 AM, realjax <jax@schildmos.nl> wrote: > > Hi, > > Since drawing rotated features (with an icon) in IE 6 is painstakingly slow > (14 times slower then Firefox), I was trying to see if I could have features > painted on the screen one by one, so the user has at least some visual > feedback, instead of looking at what seems a dead application for several > seconds. > > When using the addFeatures method of the Vector class, IE -and Firefox as > well for that matter- only show all features at once, *after* all features > have been added. Even when I create a loop to add only one feature at a > time, the layer is only redrawn after completion of the loop. > > When I attach a function to the event onFeatureAdded and for instance log > something to the console, things work as I'd expect and IE draws the > features one by one.. > > Can anyone comment on this, am I missing something ? Hi Do you unserialize the features (using some Format object) before you add them to the vector layer? If so have you verified that it is not that unserialization process that actually takes time in IE6? Given that addFeatures seem to draw all features at once it seems to me that addFeatures is very fast. addFeatures gets slower when you write to the console for each feature, hence the "features drawn one by one" effect. If that's indeed the unserialization process that takes time, one could imagine requesting features page by page (possibly using the paging strategy that's being developed in the vector-behavior sandbox). Hope this helps, -- Eric From woodbri at swoodbridge.com Sat Jun 21 11:30:22 2008 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] us_tiger moving to geodata list Message-ID: <485D1E8E.2060405@swoodbridge.com> Hi all, OK, is seems that we already have a list for these discussions and I have been asked to move the discussion over to geodata list. So, if you are not subscribed to the geodata list and want to talk about Tiger data please join us at: http://lists.osgeo.org/mailman/listinfo/geodata I will be closing the us_tiger list. Sorry for the noise and confusion. -Steve From hcan at hotmail.com Sat Jun 21 19:54:41 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Map is shifted to the right, click gets wrong position In-Reply-To: <17854435.post@talk.nabble.com> References: <17851229.post@talk.nabble.com> <e2a75bd70806150905w54a85822xfccb69ac1c63a5cb@mail.gmail.com> <17854435.post@talk.nabble.com> Message-ID: <18049874.post@talk.nabble.com> I have still not been able to solve this problem. Anyone? Please if you have any ideas let me know! Could this have something to do with bug #817??? -Z Zer wrote: > > Hi Geoff! > > I just checked, and the div is NOT centered. :-( > > Also what I have seen is that in Firefox and Safari, the map seems to fill > the whole browser, and seems to be hidden under the right-hand-side Dojo > Layout Container. If I "swipe away" (that is hide) the right hand > container the map is not resized or repositioned in FF and Safari, but in > IE7 the map is repositioned and resized..... Could this have something to > do with this problem? > > -Z > > > Geoff Hopson wrote: >> >> Is the div centered? That caught me out on IE...take off the center, >> see if that helps... >> >> Geoff >> >> >> > > -- View this message in context: http://www.nabble.com/Map-is-shifted-to-the-right%2C-click-gets-wrong-position-tp17851229p18049874.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jax at schildmos.nl Sun Jun 22 08:50:45 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> Message-ID: <18054250.post@talk.nabble.com> Eric Lemoine-3 wrote: > > Do you unserialize the features (using some Format object) before you > add them to the vector layer? If so have you verified that it is not > that unserialization process that actually takes time in IE6? Given > that addFeatures seem to draw all features at once it seems to me that > addFeatures is very fast. addFeatures gets slower when you write to > the console for each feature, hence the "features drawn one by one" > effect. If that's indeed the unserialization process that takes time, > one could imagine requesting features page by page (possibly using the > paging strategy that's being developed in the vector-behavior > sandbox). > Hi Eric, No unfortunately. I measured the addfeatures method to be the bottleneck here. It receives an array with features and then the delay starts.. I did a test with 800 objects. That took IE over 200,000 ms, while Firefox was done in 4000... Anyway, looks like I need to do some more research.. Thanks for your help sofar! -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18054250.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kusum at infobase.in Mon Jun 23 01:19:38 2008 From: kusum at infobase.in (Kusum) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? References: <17961729.post@talk.nabble.com><5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> Message-ID: <89BCEDC434D34895B9F2A76C617DC325@kusum> Hiii I faced the same problem in IE. Thought it was problem on my end the results for requested polygon features came fast but the add features took much time to draw them in IE where as in Mozilla it took much lesser time than this. If you guys get any solution do pass it here too Regards Kusum -------------------------------------------------- From: "realjax" <jax@schildmos.nl> Sent: Sunday, June 22, 2008 6:20 PM To: <users@openlayers.org> Subject: Re: [OpenLayers-Users] Draw features one by one in IE? > > > > Eric Lemoine-3 wrote: >> >> Do you unserialize the features (using some Format object) before you >> add them to the vector layer? If so have you verified that it is not >> that unserialization process that actually takes time in IE6? Given >> that addFeatures seem to draw all features at once it seems to me that >> addFeatures is very fast. addFeatures gets slower when you write to >> the console for each feature, hence the "features drawn one by one" >> effect. If that's indeed the unserialization process that takes time, >> one could imagine requesting features page by page (possibly using the >> paging strategy that's being developed in the vector-behavior >> sandbox). >> > > Hi Eric, > > No unfortunately. I measured the addfeatures method to be the bottleneck > here. It receives an array with features and then the delay starts.. > I did a test with 800 objects. That took IE over 200,000 ms, while > Firefox > was done in 4000... > > Anyway, looks like I need to do some more research.. > Thanks for your help sofar! > -- > View this message in context: > http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18054250.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 mifan at opensource.lk Mon Jun 23 07:52:55 2008 From: mifan at opensource.lk (Mifan Careem) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Extending callback function of Handler.Path In-Reply-To: <5ec103de0806172332g3bd98397sa9c0507cffe1eded@mail.gmail.com> References: <1213687325.6181.30.camel@mordor> <5ec103de0806172332g3bd98397sa9c0507cffe1eded@mail.gmail.com> Message-ID: <1214221975.19047.10.camel@mordor> Hi Eric, Thanks. I added the following within my handler after going through the DrawFeature code - works fine now :-) var feature = new OpenLayers.Feature.Vector(lineGeom); lineLayer.addFeatures([feature]); Regards Mifan http://talksahana.com http://techmania.wordpress.com --- You'll feel devilish tonight. Toss dynamite caps under a flamenco dancer's heel. On Wed, 2008-06-18 at 08:32 +0200, Eric Lemoine wrote: > Hi. I haven't looked at your code but it's no surprise that the > feature disappears once drawn - the point handler, which the path > handler inherits from, uses a temporary vector layer. It is the > responsibility of your control to actually add drawn features to a > permanent layer, which control users will provide. Look at the draw > feature control code to understand how this works. Hope this helps. > Cheers. Eric > > 2008/6/17, Mifan Careem <mifan@opensource.lk>: > > Hi All, > > > > I'm trying to get the coordinates from line vectors drawn by users using > > Control.storeFeature and store them in the database. I intend to do this > > using a solution posted in the lists sometime back by using the "done" > > callback of Handler.Path, and doing the required processing within it. > > > > My problem is that the drawn vector line disappears at the end of > > drawing it. I'm assuming this is because I'm overriding the default > > "done" handler with my own? - since it works OK when I do not have a > > callback handler. Is there a way I can extend the default callback > > handler instead of replacing it? (I hope the terminology I use is > > correct here), so that the drawn vector lines do not disappear? > > > > My code is attached below, and a hosted version is at: > > http://talksahana.com/sandbox/ol-draw.html > > > > Appreciate any help with this. Thanks. > > > > > > Regards > > > > Mifan > > > > http://talksahana.com > > http://techmania.wordpress.com > > > > > > --------- > > var map, drawControls; > > OpenLayers.Util.onImageLoadErrorColor = "transparent"; > > function init(){ > > map = new OpenLayers.Map('map'); > > var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers > > WMS", > > "http://labs.metacarta.com/wms/vmap0?", {layers: > > 'basic'}); > > var lineLayer = new OpenLayers.Layer.Vector("Line > > Layer"); > > map.addLayers([wmsLayer, lineLayer]); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > map.addControl(new OpenLayers.Control.MousePosition()); > > var options = {handlerOptions: {freehand: true}}; > > //Callback > > var pathDrawFeatureOptions = { > > callbacks : {"done": doneHandler}, > > handlerOptions: {freehand: true} > > }; > > drawControls = { > > line: new OpenLayers.Control.DrawFeature(lineLayer, > > OpenLayers.Handler.Path, > > pathDrawFeatureOptions) > > }; > > for(var key in drawControls) { > > map.addControl(drawControls[key]); > > } > > map.setCenter(new OpenLayers.LonLat(0, 0), 3); > > document.getElementById('noneToggle').checked = true; > > } > > > > > > function doneHandler(lineGeom) { > > // do processing .... > > //alert("doneHandler:" + > > lineGeom.getComponentsString()); > > //var linecontrol = drawControls['line']; > > //linecontrol.deactivate(); > > } > > > > function toggleControl(element) { > > for(key in drawControls) { > > var control = drawControls[key]; > > if(element.value == key && element.checked) { > > control.activate(); > > } else { > > control.deactivate(); > > } > > } > > } > > ------------ > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > From eric.c2c at gmail.com Mon Jun 23 08:48:29 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Layer Groups and hierarchy In-Reply-To: <4390fbee0806182250v4383db94vf45bf60cd8072644@mail.gmail.com> References: <4390fbee0806182250v4383db94vf45bf60cd8072644@mail.gmail.com> Message-ID: <5ec103de0806230548i17977ff2jc15228e0f77d496f@mail.gmail.com> On Thu, Jun 19, 2008 at 7:50 AM, Indika Tantrigoda <indika85@gmail.com> wrote: > Hello, Hello Indika > I'd like to know, if theres anyway that I can group layers into a hierarchy. OpenLayers' layer switcher does not support layer hierarchy and will probably never do. I'd recommend checking out the layer tree of MapFish (http://www.mapfish.org). MapFish layer tree is either auto-configured based on the layers configured in OpenLayers or configured through a user-specified model. See <http://demo.mapfish.org/mapfishsample/trunk/examples/tree/tree_automatic.html> for a basic example. Cheers, -- Eric From jax at schildmos.nl Mon Jun 23 09:34:37 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <18054250.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> Message-ID: <18068377.post@talk.nabble.com> realjax wrote: > > > No unfortunately. I measured the addfeatures method to be the bottleneck > here. It receives an array with features and then the delay starts.. > I did a test with 800 objects. That took IE over 200,000 ms, while > Firefox was done in 4000... > > Anyway, looks like I need to do some more research.. > Thanks for your help sofar! > Small update: Changed a few things around in OL and that took the 200.000ms addFeatures took in IE down to 10.000ms. Not bad, but the problem remains. IE still needs an incredible amount of time to render the vectors.. The change also improved performance in firefox by 40 to 50 percent by the way.. I will post the changes asap. -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18068377.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Mon Jun 23 09:41:30 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <18068377.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> Message-ID: <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> On Mon, Jun 23, 2008 at 3:34 PM, realjax <jax@schildmos.nl> wrote: > > > > realjax wrote: >> >> >> No unfortunately. I measured the addfeatures method to be the bottleneck >> here. It receives an array with features and then the delay starts.. >> I did a test with 800 objects. That took IE over 200,000 ms, while >> Firefox was done in 4000... >> >> Anyway, looks like I need to do some more research.. >> Thanks for your help sofar! >> > > > Small update: > Changed a few things around in OL and that took the 200.000ms addFeatures > took in IE down to 10.000ms. Great! > Not bad, but the problem remains. IE still needs an incredible amount of > time to render the vectors.. You mean 10.000ms is still unacceptable compared to the 4.000ms FF takes? > The change also improved performance in firefox by 40 to 50 percent by the > way.. > > I will post the changes asap. I'm eager to see your changes. Thanks, -- Eric From damarmo at gmail.com Mon Jun 23 09:48:42 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Incompativili with IE 6 Message-ID: <9771eb540806230648l3de4778ibe503b6fe9ffa8ea@mail.gmail.com> Hi list! I'm developing a Openlayers environement and I fund a problem. I used FireFox v2 to develop and every thing it's OK but when I try the URL in InternetExplorer v6 I have and error . They says the error it's in <body onload="init()"> but I don't have any Idea of the problem! Can enayone help me please? Thanks this is my code: <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test OpenLayers</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> scripts </script> </head> <body onload="init()"> <div id="header"> <h1 id="title">Test OpenLayers</h1> <form action="#" onsubmit="showAddress(this.address.value, this.countrycode.value); return false"> <p>Recherchez un adresse: <input type="text" size="60" id="address" value="" /> &nbsp; <input type="submit" onclick="showAddress(document.getElementById('address').value); return false;" value="Go!" /> </p> </form> </div> <div style="width:100%; height:85%" id="map"></div> </body> </html> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080623/689da1c0/attachment.html From ks at geograf.dk Mon Jun 23 10:05:09 2008 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Incompativili with IE 6 In-Reply-To: <9771eb540806230648l3de4778ibe503b6fe9ffa8ea@mail.gmail.com> References: <9771eb540806230648l3de4778ibe503b6fe9ffa8ea@mail.gmail.com> Message-ID: <485FAD95.5050506@geograf.dk> Most likely it means that the browser is unable to parse your javascript. This results in a call to a missing function "init". I'm guessing that you have code like this: var x = { x: 1, y = 2, } Notice the trailing "," after 2. Firefox accepts it, IE does not. If you can't find the error, you might want to try installing a Javascript debugger for IE (like Visual Studio). Regards, Kenneth Skovhede, GEOGRAF A/S David Martinez Morata skrev: > Hi list! > > I'm developing a Openlayers environement and I fund a problem. I used > FireFox v2 to develop and every thing it's OK but when I try the URL > in InternetExplorer v6 I have and error . > They says the error it's in <body onload="init()"> but I don't have > any Idea of the problem! > Can enayone help me please? > Thanks > > > this is my code: > <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Test OpenLayers</title> > <meta http-equiv="content-type" content="text/html; charset=utf-8"/> > > > > scripts > > > > </script> > </head> > <body onload="init()"> > <div id="header"> > <h1 id="title">Test OpenLayers</h1> > <form action="#" onsubmit="showAddress(this.address.value, > this.countrycode.value); return false"> > <p>Recherchez un adresse: <input type="text" size="60" > id="address" value="" /> > &nbsp; <input type="submit" > onclick="showAddress(document.getElementById('address').value); return > false;" value="Go!" /> > </p> > </form> > </div> > <div style="width:100%; height:85%" id="map"></div> > </body> > </html> > ------------------------------------------------------------------------ > > _______________________________________________ > 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/20080623/98f0b38c/attachment.html From wouter.schaubroeck at gmail.com Mon Jun 23 10:05:35 2008 From: wouter.schaubroeck at gmail.com (Wouter Schaubroeck) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Has anyone tried animation / or how to? In-Reply-To: <loom.20080618T124322-453@post.gmane.org> References: <2bb6ee950806120547k374d0d8eic141a8683cd6942a@mail.gmail.com> <C476F35E.328C%kobben@itc.nl> <loom.20080618T124322-453@post.gmane.org> Message-ID: <a39757c10806230705m320e3361y55bda7b82bf13a2f@mail.gmail.com> I've made something similar, but without openlayers, so: no overlays, and no baselayer either... but it does the trick, this is how i've done it: i grab the current extent, and the parameters of the current layer (luckilly i have only one...), and i build my own wms - getmaprequest. Then i've created an imagepreloader, that (surprise surprise) preloades all my images, and stores them in the memory of the browser. When they're all loaded, i loop over them (setinterval), and that's it, i have my animation!! grtz, Wouter Schaubroeck Geo Solutions www.geosolutions.be On Wed, Jun 18, 2008 at 2:53 PM, alinux <alaincourivaud@gmail.com> wrote: > > > Barend Kobben <kobben@...> writes: > >> >> HI, >> >> We actually have an MSc student just started on seeing how to do this using >> WMS-T and SVG. SVG enables an integrated animation/interface, using SMIL >> animation and javascript interactivity. We hope to present some results at >> the upcoming SVGopen conference in Nurnberg (Germany, august 26-29)). See >> the abstract "SVG and Geo Web Services for visualization of time series data >> of flood risk" on the Proceedings page at http://svgopen.org/2008/ >> > > Hello > sorry for my anglish ... > > I tried to do an animation and i used it : > > . > . > . > > var loaded = "FALSE"; > var madate = new Date("June 18, 2008 00:00:00"); > . > . > . > > radar = new OpenLayers.Layer.WMS( "animation radar", > "http://monServeur:8080/wms", {layers: > "radar:"+madate.dateFormat('YmdHis')+":M:FRANCE_5MN", transparent: "TRUE", > format: "image/png"} , { singleTile: true, transitionEffect: 'resize'}); > > syn_radar_wms.events.register('loadend', radar ,function(e){ > if (loaded=="TRUE"){ > play_minute(); > } > > }); > > . > . > . > > function play_minute(){ > madate.setMinutes(madate.getMinutes()+5); > madate_formate = madate.dateFormat('YmdHis'); > string = "radar:"+madate_formate+":M:FRANCE_5MN"; > radar.mergeNewParams({'layers':string}); > } > > . > . > . > > <div onclick="loaded='TRUE'; play_minute()">Play (animation Minute + 5)</div> > > > And that's good > > What do you think about it ? > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Groucho Marx - "A child of five would understand this. Send someone to fetch a child of five." From jax at schildmos.nl Mon Jun 23 10:29:04 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> Message-ID: <18070439.post@talk.nabble.com> Eric Lemoine-3 wrote: > > You mean 10.000ms is still unacceptable compared to the 4.000ms FF takes? > :-) no 10 seconds would be acceptible (with firefox now pulling it off at 1.4 seconds by the way,including rendering), but the problem remains in the sense that IE still needs as much time to render.. So all though addFeatures is now done in 10 secs, IE still needs *many* more seconds to render... -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18070439.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Mon Jun 23 10:39:46 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <18070439.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> Message-ID: <5ec103de0806230739h2e0426d7jee3428cc630d4a39@mail.gmail.com> On Mon, Jun 23, 2008 at 4:29 PM, realjax <jax@schildmos.nl> wrote: > > > > Eric Lemoine-3 wrote: >> >> You mean 10.000ms is still unacceptable compared to the 4.000ms FF takes? >> > > :-) no 10 seconds would be acceptible (with firefox now pulling it off at > 1.4 seconds by the way,including rendering), but the problem remains in the > sense that IE still needs as much time to render.. > So all though addFeatures is now done in 10 secs, IE still needs *many* more > seconds to render. I don't get it because to me the rendering occurs as part of the addFeatures call. What am I missing? -- Eric From jax at schildmos.nl Mon Jun 23 10:50:19 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <5ec103de0806230739h2e0426d7jee3428cc630d4a39@mail.gmail.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <5ec103de0806230739h2e0426d7jee3428cc630d4a39@mail.gmail.com> Message-ID: <18070898.post@talk.nabble.com> Eric Lemoine-3 wrote: > > > I don't get it because to me the rendering occurs as part of the > addFeatures call. What am I missing? > I took the (per feature) rendering out of addfeatures :-) Instead of adding the VML root in renderer/elements.js constructor to the renderRoot, I created a fragment and add all vml nodes to this fragment, this fragment is only added at the end of the addFeatures loop. Saves a bunch of dom traversing. But this does nothing for IE it seems.. it speeds up addfeatures allright, but rendering is still as slow :-( I have no complete idea yet what the implications are of this change though, so wanted to do some further testing first. -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18070898.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Mon Jun 23 11:08:04 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <18070439.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> Message-ID: <20080623150804.GA28926@metacarta.com> On Mon, Jun 23, 2008 at 07:29:04AM -0700, realjax wrote: > > > > Eric Lemoine-3 wrote: > > > > You mean 10.000ms is still unacceptable compared to the 4.000ms FF takes? > > > > :-) no 10 seconds would be acceptible (with firefox now pulling it off at > 1.4 seconds by the way,including rendering), but the problem remains in the > sense that IE still needs as much time to render.. > So all though addFeatures is now done in 10 secs, IE still needs *many* more > seconds to render... Welcome to the world of VML. Seriously, I doubt there's going to be much you can do in OL to help yourself here: IE's rendering is much much slower than FF. The order of slowness is probably something like: Safari 3.1 (SVG) > FF3 (SVG) / Opera 9.5 SVG > Opera 9.0 SVG > FF2 SVG > IE 7 VML > IE 6 VML I would not be at all surprised to find out that complex VML rendering is too slow to be usable for many people. Regards, -- Christopher Schmidt MetaCarta From indika85 at gmail.com Mon Jun 23 12:29:03 2008 From: indika85 at gmail.com (Indika Tantrigoda) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Layer Groups and hierarchy In-Reply-To: <5ec103de0806230548i17977ff2jc15228e0f77d496f@mail.gmail.com> References: <4390fbee0806182250v4383db94vf45bf60cd8072644@mail.gmail.com> <5ec103de0806230548i17977ff2jc15228e0f77d496f@mail.gmail.com> Message-ID: <4390fbee0806230929y4b99c26hae7a13341e3a451d@mail.gmail.com> Hello Eric, Thank you very much for the info. I managed to find something close to what I wanted. http://dev.openlayers.org/sandbox/jachym/openlayers/examples/layer-groups.html However I still need the layers to be collapsible, and Mapfish would be a better choice. Thank you, Regards, Indika 2008/6/23 Eric Lemoine <eric.c2c@gmail.com>: > On Thu, Jun 19, 2008 at 7:50 AM, Indika Tantrigoda <indika85@gmail.com> > wrote: > > Hello, > > Hello Indika > > > I'd like to know, if theres anyway that I can group layers into a > hierarchy. > > OpenLayers' layer switcher does not support layer hierarchy and will > probably never do. I'd recommend checking out the layer tree of > MapFish (http://www.mapfish.org). MapFish layer tree is either > auto-configured based on the layers configured in OpenLayers or > configured through a user-specified model. See > < > http://demo.mapfish.org/mapfishsample/trunk/examples/tree/tree_automatic.html > > > for a basic example. > > Cheers, > > -- > Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080623/efc12a03/attachment.html From lancelot at inetnebr.com Mon Jun 23 19:58:34 2008 From: lancelot at inetnebr.com (Lance Dyas) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <20080623150804.GA28926@metacarta.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <20080623150804.GA28926@metacarta.com> Message-ID: <486038AA.3010001@inetnebr.com> Christopher Schmidt wrote: > On Mon, Jun 23, 2008 at 07:29:04AM -0700, realjax wrote: > >> >> Eric Lemoine-3 wrote: >> >>> You mean 10.000ms is still unacceptable compared to the 4.000ms FF takes? >>> >>> >> :-) no 10 seconds would be acceptible (with firefox now pulling it off at >> 1.4 seconds by the way,including rendering), but the problem remains in the >> sense that IE still needs as much time to render.. >> So all though addFeatures is now done in 10 secs, IE still needs *many* more >> seconds to render... >> > > Welcome to the world of VML. > > Seriously, I doubt there's going to be much you can do in OL to help > yourself here: IE's rendering is much much slower than FF. The order of > slowness is probably something like: > > Safari 3.1 (SVG) > FF3 (SVG) / Opera 9.5 SVG > Opera 9.0 SVG > FF2 SVG > > IE 7 VML > IE 6 VML > Heh that order corresponds exactly with the JavaScript speed tests results I have done, though Opera 9.5 and FF3 were neck and neck .... From crschmidt at metacarta.com Mon Jun 23 23:28:10 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <486038AA.3010001@inetnebr.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <20080623150804.GA28926@metacarta.com> <486038AA.3010001@inetnebr.com> Message-ID: <20080624032810.GA13223@metacarta.com> On Mon, Jun 23, 2008 at 06:58:34PM -0500, Lance Dyas wrote: > > Safari 3.1 (SVG) > FF3 (SVG) / Opera 9.5 SVG > Opera 9.0 SVG > FF2 SVG > > > IE 7 VML > IE 6 VML > > > Heh that order corresponds exactly with the JavaScript speed tests results > I have done, though Opera 9.5 and FF3 were neck and neck .... Right, if your speed tests are DOM intensive, you're likely accurately representing the speed differences as far as OL rendering is concerned. The SunSpider speed tests actually favor FF3, in some cases significantly, but they are almost entirely computation: the DOM-heavy nature of OpenLayers still lends itself better to Safari3 by a factor of two or so. Regards, -- Christopher Schmidt MetaCarta From kusum at infobase.in Tue Jun 24 00:47:46 2008 From: kusum at infobase.in (Kusum) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? References: <17961729.post@talk.nabble.com><5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com><18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> Message-ID: <51F1A9B81D554274879A4212AE773B16@kusum> I am eager too as this had taken a lot of time of mine also....... Cheers kusum -------------------------------------------------- From: "Eric Lemoine" <eric.c2c@gmail.com> Sent: Monday, June 23, 2008 7:11 PM To: "realjax" <jax@schildmos.nl> Cc: <users@openlayers.org> Subject: Re: [OpenLayers-Users] Draw features one by one in IE? > On Mon, Jun 23, 2008 at 3:34 PM, realjax <jax@schildmos.nl> wrote: >> >> >> >> realjax wrote: >>> >>> >>> No unfortunately. I measured the addfeatures method to be the bottleneck >>> here. It receives an array with features and then the delay starts.. >>> I did a test with 800 objects. That took IE over 200,000 ms, while >>> Firefox was done in 4000... >>> >>> Anyway, looks like I need to do some more research.. >>> Thanks for your help sofar! >>> >> >> >> Small update: >> Changed a few things around in OL and that took the 200.000ms addFeatures >> took in IE down to 10.000ms. > > Great! > >> Not bad, but the problem remains. IE still needs an incredible amount of >> time to render the vectors.. > > You mean 10.000ms is still unacceptable compared to the 4.000ms FF takes? > > >> The change also improved performance in firefox by 40 to 50 percent by >> the >> way.. >> >> I will post the changes asap. > > I'm eager to see your changes. > > Thanks, > > -- > Eric > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From euzuro at gmail.com Tue Jun 24 02:52:53 2008 From: euzuro at gmail.com (Erik Uzureau) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] FramedCloud and autoSize In-Reply-To: <121089CD850A6C428D442011256BC5CC0205BDCC@scorpio2.loyola.com> References: <20080616211430.GA1464@q.rho.net> <6ae3fb590806191942ua311afbv926b840bc4873fe2@mail.gmail.com> <20080620031958.GA9440@metacarta.com> <20080620130112.GA21656@q.rho.net> <121089CD850A6C428D442011256BC5CC0205BDCC@scorpio2.loyola.com> Message-ID: <6ae3fb590806232352k782c70fbn8b4a134b90760575@mail.gmail.com> I think this is something worthy of fixing. I apologize upfront that I have been horribly horribly behind on OL affairs... but has anyone put this specific bug into a ticket in trac? If not, could someone do it. Sometime in the very near future I am going to sit down and do some working fixing these. Certainly pre-2.7 On 6/20/08, Matthew Atkins <Matthew.Atkins@loyola.com> wrote: > Wendell, > > As Chris mentioned the patch to ticket 1570 is not the entire solution. > You will need to watch out for how you are defining your CSS with the > FramedCloud content. The getRenderedDimensions() function creates a new > DIV off-screen in order to calculate the size of the HTML content > dynamically but it does not inherit the CSS rules like > ".olFramedCloudPopupContent" and it is not inserted at the same level in > the DOM hierarchy (it's appended to the document's BODY). > > So if you write CSS for your popup's content with selectors like: > > .olFramedCloudPopupContent h2 { /* rules */ } > .olFramedCloudPopupContent table { /* rules */ } > .olFramedCloudPopupContent p { /* rules */ } > > The styles will be applied to the content when it shows within the popup > on-screen but the calculated size will be incorrect because the CSS > rules were not applied (do not match) off-screen. > > Wally Atkins > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Wendell Turner > Sent: Friday, June 20, 2008 9:01 AM > To: users@openlayers.org > Subject: Re: [OpenLayers-Users] FramedCloud and autoSize > > On Thu, Jun 19, 2008 at 11:19:58PM -0400, Christopher Schmidt wrote: > > On Thu, Jun 19, 2008 at 09:42:24PM -0500, Erik Uzureau wrote: > > > Dear Wendell, > > > > > > There is a bug in the getRenderedDimensions() function which was > > > found, reported, and fixed by a superstar member from the community, > > > one Wally somethingerother. > > > > > > The fix is here: > > > http://trac.openlayers.org/ticket/1570 > > > > > > ... and in trunk as well. Hopefully that will help getting those > sizes > > > fixed up right. > > > > I actually sort of doubt that this is the entire solution. One problem > > is that paddings (or maybe it's margins) on elements aren't > neccesarily > > included in the calculations of scrollWidth. > > > > I typically do something like: > > .olPopupContent h2 { margin: 0px; padding: 0px; } > > > > to minimize the padding around my headers so that they don't get > > included. > > > > -- Chris > > > > > Let us know if it works, > > Yes, the patch works great! Thanks to Wally Atkins and the > rest. I'll also try the margin padding, that should help. > > Wendell > > _______________________________________________ > 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 piebe.de.vries at geodan.nl Tue Jun 24 04:35:18 2008 From: piebe.de.vries at geodan.nl (Piebe de Vries) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <18070898.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <5ec103de0806230739h2e0426d7jee3428cc630d4a39@mail.gmail.com> <18070898.post@talk.nabble.com> Message-ID: <4860B1C6.5050702@geodan.nl> An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080624/67e39dc2/attachment.html From damarmo at gmail.com Tue Jun 24 07:47:14 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Incompativili with IE 6 In-Reply-To: <485FAD95.5050506@geograf.dk> References: <9771eb540806230648l3de4778ibe503b6fe9ffa8ea@mail.gmail.com> <485FAD95.5050506@geograf.dk> Message-ID: <9771eb540806240447m6f5b43femffbc5d33f6cd44ac@mail.gmail.com> Thanks 2008/6/23 Kenneth Skovhede, GEOGRAF A/S <ks@geograf.dk>: > Most likely it means that the browser is unable to parse your javascript. > This results in a call to a missing function "init". > > I'm guessing that you have code like this: > > var x = { > x: 1, > y = 2, > } > > Notice the trailing "," after 2. > Firefox accepts it, IE does not. > > If you can't find the error, you might want to try installing a Javascript > debugger for IE (like Visual Studio). > > Regards, Kenneth Skovhede, GEOGRAF A/S > > > > David Martinez Morata skrev: > > Hi list! > > I'm developing a Openlayers environement and I fund a problem. I used > FireFox v2 to develop and every thing it's OK but when I try the URL in > InternetExplorer v6 I have and error . > They says the error it's in <body onload="init()"> but I don't have any > Idea of the problem! > Can enayone help me please? > Thanks > > > this is my code: > <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Test OpenLayers</title> > <meta http-equiv="content-type" content="text/html; charset=utf-8"/> > > > > scripts > > > > </script> > </head> > <body onload="init()"> > <div id="header"> > <h1 id="title">Test OpenLayers</h1> > <form action="#" onsubmit="showAddress(this.address.value, > this.countrycode.value); return false"> > <p>Recherchez un adresse: <input type="text" size="60" > id="address" value="" /> > &nbsp; <input type="submit" > onclick="showAddress(document.getElementById('address').value); return > false;" value="Go!" /> > </p> > </form> > </div> > <div style="width:100%; height:85%" id="map"></div> > </body> > </html> > > ------------------------------ > > _______________________________________________ > Users mailing listUsers@openlayers.orghttp://openlayers.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080624/388ae75e/attachment.html From damarmo at gmail.com Tue Jun 24 07:59:58 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Not image in IE Message-ID: <9771eb540806240459t71c19845t2a39808f13efd97d@mail.gmail.com> Thanks for the answers for my question, but now... I don't have a error message in IE, but I don't have the image too!!! This is my script: <script type="text/javascript"> // make map available for easy debugging var map; // avoid pink tiles OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; //OpenLayers.Util.onImageLoadErrorColor = "transparent"; function init(){ var options = {numZoomLevels: 20, 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), //}; // Create a map Object map = new OpenLayers.Map('map', options); // Create Google Mercator layers var gmap = new OpenLayers.Layer.Google( "Google Streets"); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {type: G_SATELLITE_MAP}); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP}); var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP}); // Create a WFS Sites Layer var sites = new OpenLayers.Layer.WFS( "Sites", " http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map", {typename: "Sites",maxfeatures: 100 },{ featureClass: OpenLayers.Feature.WFS }); // Create a WFS Cables Layer var cables = new OpenLayers.Layer.WFS( "Cables", " http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map", {typename: "Cables", maxfeatures: 100});//,{ //featureClass: OpenLayers.Feature.Vector}); map.addLayers([gsat, gmap, ghyb, gphy, sites, cables]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.ScaleLine); map.addControl(new OpenLayers.Control.MousePosition()); if (!map.getCenter()) {map.zoomToMaxExtent()} } function changezoom(x,y,z) { map.setCenter(new OpenLayers.LonLat(x, y), z); } function showAddress(address) { var geocoder = new GClientGeocoder(); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) {alert(address + " not found");} else {map.setCenter(new OpenLayers.LonLat(point.x,point.y),15);} } ); } } Thanks for help me! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080624/75b75546/attachment.html From damarmo at gmail.com Tue Jun 24 10:26:56 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Problem with lines. Message-ID: <9771eb540806240726p430d2c1eudd6dcbb154088c60@mail.gmail.com> Hello list! Sorry, but I have an other problem. I put one gml layer in a google map layer, but... This layer change localization with zoom level!!! any sugestion? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080624/d173ef8c/attachment.html From eric.c2c at gmail.com Tue Jun 24 11:08:59 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Problem with lines. In-Reply-To: <9771eb540806240726p430d2c1eudd6dcbb154088c60@mail.gmail.com> References: <9771eb540806240726p430d2c1eudd6dcbb154088c60@mail.gmail.com> Message-ID: <5ec103de0806240808k4b583a7gd4f127fbd2f6675d@mail.gmail.com> On Tue, Jun 24, 2008 at 4:26 PM, David Martinez Morata <damarmo@gmail.com> wrote: > Hello list! > > Sorry, but I have an other problem. > > I put one gml layer in a google map layer, but... > This layer change localization with zoom level!!! > any sugestion? Do you set the sphericalMercator option to true when creating the google layers? You need that option if you want to have vector geometries on top of google layers. Also the coordinates of your GML data must be in EPSG:900913. If not you'll need to reprojected your data, either at the server side or at the client side. Note that OL can natively do 4326 to 900913 reprojections (and vice-versa), but if your data doesn't use 4326 you will need proj4js in addition to OpenLayers; see the numerous posts on the subject. Regards, -- Eric From eric.c2c at gmail.com Tue Jun 24 17:59:47 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <E1K6Lbb-000412-9M@detroit.securenet-server.net> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> Message-ID: <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> On Wed, Jun 11, 2008 at 10:22 AM, Levii Smith <smithlev@levii.com> wrote: > Ok, so I'm trying to use the ICON tag out of a GeoRSS feed to display the > ICONS on the map. > > I've added to the /format/georss.js and it returns either the value of the > icon path (URL) or NULL back into feature.attributes.icon, > > /* Provide icon data and default */ > var iconURL = this.getChildValue(item, "*", "icon", this.iconURL); > if(!iconURL) { > iconURL = null; > } > > Now I'm stuck at modifying the function in /layer/GeoRSS.js (line 183)... > > Anyone that can provide a pointer on how to fix this > > data.icon = this.icon == null ? > OpenLayers.Marker.defaultIcon() : > this.icon.clone(); > > to use the icon in the feature, and the default if none is defined? > > I've tried setting OpenLayers.Marker.Icon(feature.attributes.icon); but keep > getting an object expected error. Hello If I were you I wouldn't use Layer.GeoRSS. Instead I would trigger my own Ajax request to get the GeoRSS document, use Format.GeoRSS to unserialize the GeoRSS doc into features, and add the resulting features to a simple vector layer (Layer.Vector). And I would rely on OpenLayers' styling framework to style the features based on their attributes. See the georss-flickr.html example which more or less does this. Sorry if this response is coming a bit late, -- Eric Sorry if this response is coming From eric.c2c at gmail.com Tue Jun 24 18:07:05 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Map Destroy Call generating error In-Reply-To: <21fcb6f90806102153v5183268j842663a482b764ac@mail.gmail.com> References: <21fcb6f90806102153v5183268j842663a482b764ac@mail.gmail.com> Message-ID: <5ec103de0806241507k25a79d7cw10a9980218c45edb@mail.gmail.com> On Wed, Jun 11, 2008 at 6:53 AM, Raj Chundur <rajchundur@gmail.com> wrote: > I have incorporated openlayers in a rich internet application with the map > inside a dialog window that can be opened and closed without page refresh.I > have been getting some heavy memory leaks even though I had dereferenced the > openayers map object. In order to avoid memory leak and ensure that the > openlayers map is destroyed when the dialog hosting the openlayers map is > closed i tried calling the map.destroy. However the call to map.destroy > fails at two places. One is on the overview map which has a single layer of > type openlayers.layer.image. So removed the overview conrol. The second is > on a tiled kamap layer though other kamap layers are destroyed without > error. (The base layer is of type openlayers.layer.iamge type)) Trying to > debug leads upto the clear grid on the httprequest..js where the error > happens with "element has no property". Have spent considerable time trying > to figure out the cause. Any help? Hi Raj, with no example showing the problem it's very unlikely that you get assistance on the mailing list. Regards, -- Eric From arnd.wippermann at web.de Tue Jun 24 18:54:16 2008 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] OpenLayers.Projection and transform of features Message-ID: <E1KBHP5-0005hm-00@smtp05.web.de> Hi, i have a problem with OpenLayers.Projection and transform of features. I want to create a KML-file (GML, ...) from the features of a vector layer and at once transform the geometry from the map projection to an other projection (see the function features2KML). But this works only, when I have drawn the features with the editing tools or added features to the map with OpenLayers.Layer.GML without the parameter projection (no transformation of the geometry). With features from an OpenLayers.Layer.GML etc., added to the map with parameter projection (works great!), features2KML() returns always the KML (GML, ...) with the geometry in the map projection. The same is for vector layers with features added with formats[type].read(element.value). In short: I am not able to transform features, that are added to the map with projection transformation, from the map projection (fromProjection) to an other projection (toProjection). I hope someone can help. I use OL 2.6 stable. Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ function features2KML() { fromProjection = winFeatures.document.getElementById('epsgFrom').value; toProjection = winFeatures.document.getElementById('epsgTo').value; var vlyr = map.layers[map.aktLayer]; var msg = ""; if(vlyr.isVector && typeof vlyr.isVector != 'undefined') { if(vlyr.features.length>0) { var type = winFeatures.document.getElementById("formatType").value; var features = vlyr.features; if(features.constructor != Array) features = [features]; var myArr = []; for(var i=0; i<features.length; ++i) { myArr[i] = features[i].clone(); myArr[i].geometry.transform(new OpenLayers.Projection(fromProjection), new OpenLayers.Projection(toProjection)); } try{ var derString = formats[type].write(myArr, true); msg = derString; }catch(e){ msg = "formats[type].write(myArr, true)\r\n<br>" + e.message; } } else msg = vlyr.name + " enth?lt keine features"; } else msg = vlyr.name + " ist kein Vektorlayer"; return msg; } Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ From arnd.wippermann at web.de Tue Jun 24 20:34:24 2008 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] OpenLayers.Projection and transform of features In-Reply-To: <E1KBHP5-0005hm-00@smtp05.web.de> Message-ID: <E1KBIxz-0003x7-00@smtp05.web.de> Hi, Some digging into the code shows this: Proj4js added to each transformed point the property 'transformed=true'. (1) id - OpenLayers.Geometry.LineString_2418 ################D (Level:1) components object #################### ##############D (Level:2) 0 object #################### (2) id - OpenLayers.Geometry.Point_2277 (2) x - 796329.5433605171 (2) y - 6665813.389469861 (3) parent - #object# ############ Level > maxLevel= 2 ################### (2) transformed - true (3) bounds - #object# ############ Level > maxLevel= 2 ################### (2) CLASS_NAME - OpenLayers.Geometry.Point ###################################### This is the reason for not transform the geometry a second time (part from pro4js.js): if (point.transformed) { this.log("point already transformed"); return; } This means, features added to the map with proj4js in use cann't exported with proj4js to an new projection. Have someone an idea how to set the property transformed to false. Or where this function features.geometry.transform is declared? Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ From carole.zieler at gmail.com Wed Jun 25 00:14:45 2008 From: carole.zieler at gmail.com (czieler) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Overlay Aligment changing on Pan Message-ID: <18099824.post@talk.nabble.com> Has anyone had any issues where Overlay Alignment is slightly changed when you pan the map? I have a Google Hybrid map as my base layer, and I then have a WFS layer on top of this, as well as a Vector layer. I'm zoomed in to level 19 ( although this happens at other zoom levels ), and when I pan the map, my WFS and Vector layers seem to become slightly offset each time I pan ( so it becomes progressively worse ). Edit: I just thought to include sample code, as I thought that would be the first question people would respond with: var options = { 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) }; map = new OpenLayers.Map( 'map',{controls: [new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar()], numZoomLevels:30},options); var google = new OpenLayers.Layer.Google( "Google", {"sphericalMercator": true}); var google_hy = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP}, {"sphericalMercator": true}); var yahoo_hy = new OpenLayers.Layer.Yahoo( "Yahoo Hybrid",{type:YAHOO_MAP_HYB}, {"sphericalMercator": true}); map.setCenter(new OpenLayers.LonLat(lat,lon), 19); // lat lon are passed into this function wfs = new OpenLayers.Layer.WFS("MyWFSLayer", url, {maxfeatures: "200"}, {extractAttributes: true, displayInLayerSwitcher: true,sphericalMercator:true}); // url is passed into this function wfs.markers = new OpenLayers.Layer.Markers(""); // if I don't put this here, I get a js error wfs.setOpacity(0.9); map.addLayer(wfs); -- View this message in context: http://www.nabble.com/Overlay-Aligment-changing-on-Pan-tp18099824p18099824.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From carole.zieler at gmail.com Wed Jun 25 00:39:59 2008 From: carole.zieler at gmail.com (czieler) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Overlay Aligment changing on Pan In-Reply-To: <18099824.post@talk.nabble.com> References: <18099824.post@talk.nabble.com> Message-ID: <18104866.post@talk.nabble.com> I wanted to post a link to a sample of this problem: http://webgirlunleashed.com/openlayers/test/test.html If you click and drag the map, or just pan, you'll notice that the 'car' feature is moved a few pixels each time you drag the map or pan. If anyone can give me any insight on what might be causing the problem...that would be great. I'm using Firefox 2.0, but I've checked it on several versions as well as Firefox 3.0 and it occurs on all of them. czieler wrote: > > Has anyone had any issues where Overlay Alignment is slightly changed when > you pan the map? > > I have a Google Hybrid map as my base layer, and I then have a WFS layer > on top of this, as well as a Vector layer. I'm zoomed in to level 19 ( > although this happens at other zoom levels ), and when I pan the map, my > WFS and Vector layers seem to become slightly offset each time I pan ( so > it becomes progressively worse ). > > Edit: > I just thought to include sample code, as I thought that would be the > first question people would respond with: > > var options = { > 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) > }; > map = new OpenLayers.Map( 'map',{controls: [new > OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar()], > numZoomLevels:30},options); > > > var google = new OpenLayers.Layer.Google( "Google", {"sphericalMercator": > true}); > var google_hy = new OpenLayers.Layer.Google( "Google Hybrid" , {type: > G_HYBRID_MAP}, {"sphericalMercator": true}); > var yahoo_hy = new OpenLayers.Layer.Yahoo( "Yahoo > Hybrid",{type:YAHOO_MAP_HYB}, {"sphericalMercator": true}); > map.setCenter(new OpenLayers.LonLat(lat,lon), 19); // lat lon are passed > into this function > > wfs = new OpenLayers.Layer.WFS("MyWFSLayer", url, {maxfeatures: "200"}, > {extractAttributes: true, displayInLayerSwitcher: > true,sphericalMercator:true}); // url is passed into this function > wfs.markers = new OpenLayers.Layer.Markers(""); // if I don't put this > here, I get a js error > wfs.setOpacity(0.9); > map.addLayer(wfs); > -- View this message in context: http://www.nabble.com/Overlay-Aligment-changing-on-Pan-tp18099824p18104866.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andreas.hocevar at gmail.com Wed Jun 25 04:33:08 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> Message-ID: <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> Hi, On Tue, Jun 24, 2008 at 11:59 PM, Eric Lemoine <eric.c2c@gmail.com> wrote: > On Wed, Jun 11, 2008 at 10:22 AM, Levii Smith <smithlev@levii.com> wrote: > If I were you I wouldn't use Layer.GeoRSS. Instead I would trigger my > own Ajax request to get the GeoRSS document, use Format.GeoRSS to > unserialize the GeoRSS doc into features, and add the resulting > features to a simple vector layer (Layer.Vector). And I would rely on > OpenLayers' styling framework to style the features based on their > attributes. See the georss-flickr.html example which more or less does > this. In OpenLayer 2.6 you can also use OpenLayers.Layer.GML with an option format: OpenLayers.Format.GeoRSS. That will issue the Ajax request, create features from the response and add those to the layer. I just modified the georss-flickr example to make use of that, which saves some amount of custom code. Regards, Andreas. From simone.gadenz at jrc.it Wed Jun 25 05:00:03 2008 From: simone.gadenz at jrc.it (Simone Gadenz) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS lines doesn't show up Message-ID: <002c01c8d6a1$db48f710$91dae530$@gadenz@jrc.it> Hi all, I try to load a GeoRSS file containing line elements as a GML layer(GeoRSS format). All the loading process seems to be fine since I can see the layer loaded into Firebug but I cannot see any feature on the map. The function to load the GeoRss file is following: function loadGeoRss(){ var georssurl = OpenLayers.Util.getElement('txtGeoRssUrl').value; var georssname = OpenLayers.Util.getElement('txtGeoRssName').value; var georss_options = { 'internalProjection': new OpenLayers.Projection("EPSG:900913"), 'externalProjection': new OpenLayers.Projection("EPSG:4326") }; var styleMap = new OpenLayers.StyleMap({ "fillOpacity": 1, "pointRadius": 8, "fillColor" : "yellow", "stroke-width" : 2, "stroke" : "rgb(99,99,99)" }); var georssformat2 = new OpenLayers.Format.GeoRSS(georss_options); var georsslayer = new OpenLayers.Layer.GML(georssname, georssurl, {'format': georssformat2, styleMap: styleMap}); OpenLayers.Util.getElement('Results').style.visibility="hidden"; map.addLayers([georsslayer]); selectControl3 = new OpenLayers.Control.SelectFeature(georsslayer, {onSelect: onRSSSelect, onUnselect: onRSSUnselect}); map.addControl(selectControl3); selectControl3.activate(); } What am I doing wrong? Cheers Simone PS: This is the firebug response <svg id="OpenLayers.Layer.GML_1089_svgRoot" width="1584" height="549" viewBox="0 0 1584 549"> <g id="OpenLayers.Layer.GML_1089_root" style="visibility: visible;"> <polyline id="OpenLayers.Geometry.LineString_1372" points="798.946,319.369 798.946,319.369 798.655,319.415 798.626,319.442 798.701,319.387 798.808,319.329 798.881,319.264 798.956,319.202 798.997,319.097 799.052,318.969 799.099,318.849 799.185,318.818 799.258,318.894 799.325,318.961 799.418,319.024 799.507,318.907 799.58,318.789 799.675,318.677 799.784,318.568 799.875,318.476 799.986,318.51 800.11,318.622 800.199,318.674 800.308,318.719 800.43,318.766 800.55,318.813 800.667,318.855 800.834,318.951 800.942,319.024 801.044,319.1 801.147,319.175 801.237,319.249 801.317,319.303 801.433,319.35 801.521,319.353 801.621,319.324 801.734,319.282 801.846,319.251 801.934,319.228 802.041,319.215 802.145,319.249 802.23,319.353 802.294,319.439 802.369,319.528 802.449,319.622 802.533,319.716 802.616,319.815 802.738,319.956 802.849,320.089 802.944,320.198 803.006,320.292 803.004,320.412 802.942,320.55 802.893,320.699 802.851,320.845 802.835,320.994 802.826,321.231 802.829,321.411 802.851,321.597 802.879,321.792 802.9,321.985 802.926,322.186 802.951,322.429 802.977,322.609 803.041,322.755 803.126,322.901 803.244,323.091 803.328,323.243 803.403,323.444 803.399,323.6 803.25,323.77 803.115,323.887 803.021,324.004 802.937,324.119 802.875,324.205 802.786,324.33 802.758,324.448 802.784,324.56 802.869,324.552 802.982,324.539 803.082,324.549 803.175,324.539 803.31,324.518 803.454,324.51 803.605,324.531 803.749,324.562 803.88,324.56 803.996,324.547 804.1,324.51 804.193,324.492 804.273,324.609 804.36,324.709 804.513,324.771 804.601,324.8 804.684,324.829 804.766,324.855 804.854,324.881 804.941,324.912 805.063,324.948 805.212,324.972 805.298,324.982 805.382,325.042 805.376,325.225 805.292,325.329 805.194,325.376 805.09,325.423 804.979,325.53 804.916,325.64 804.861,325.739 804.808,325.846 804.721,326.013 804.643,326.169 804.581,326.289 804.51,326.425 804.448,326.545 804.386,326.667 804.317,326.805 804.251,326.944 804.2,327.051 804.142,327.165 804.089,327.267 804.02,327.405 803.973,327.502 803.885,327.635 803.851,327.749 803.953,327.755 804.115,327.773 804.198,327.789 804.282,327.802 804.366,327.815 804.481,327.835 804.603,327.859 804.71,327.867 804.792,327.88 804.952,327.908 805.054,327.935 805.167,327.953 805.271,327.976 805.44,328.013 805.533,328.026 805.637,328.044 805.74,328.06 805.837,328.081 805.962,328.101 806.134,328.135 806.265,328.159 806.359,328.177 806.512,328.206 806.678,328.237 806.854,328.263 807.095,328.297 807.277,328.326 807.395,328.347 807.51,328.373 807.672,328.407 807.776,328.43 807.874,328.448 807.974,328.461 808.07,328.48 808.163,328.508 808.262,328.521 808.358,328.529 808.456,328.524 808.629,328.506 808.762,328.48 808.844,328.529 808.708,328.636 808.622,328.639 808.486,328.644 808.4,328.68 808.258,328.808 808.127,328.912 808.045,328.946 807.959,328.975 807.817,329.04 807.754,329.155 807.876,329.332 808.029,329.41 808.149,329.444 808.273,329.429 808.32,329.298 808.327,329.131 808.425,328.978 808.542,328.905 808.644,328.85 808.76,328.795 808.891,328.748 809.106,328.696 809.425,328.652 809.596,328.646 809.683,328.652 809.858,328.667 810.031,328.68 810.288,328.709 810.373,328.717 810.546,328.73 810.716,328.743 810.89,328.761 810.978,328.769 811.149,328.787 811.234,328.792 811.409,328.803 811.497,328.811 811.584,328.819 811.671,328.824 811.844,328.837 811.93,328.845 812.015,328.85 812.101,328.855 812.185,328.86 812.436,328.871 812.685,328.894 812.769,328.897 812.938,328.902 813.186,328.92 813.428,328.962 813.743,329.079 813.961,329.217 814.105,329.314 814.247,329.408 814.386,329.502 814.524,329.585 814.66,329.676 814.801,329.765 814.937,329.856 815.079,329.95 815.221,330.041 815.363,330.135 815.505,330.234 815.643,330.333 815.855,330.477 815.997,330.573 816.142,330.662 816.282,330.761 816.426,330.852 816.639,330.993 816.85,331.129 816.992,331.222 817.134,331.314 817.275,331.402 817.493,331.546" fill="none" stroke="none"/> <polyline id="OpenLayers.Geometry.LineString_1377" points="798.741,319.387 798.741,319.387" fill="none" stroke="none"/> </g> </svg> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/5d59737a/attachment.html From andreas.hocevar at gmail.com Wed Jun 25 05:46:07 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Overlay Aligment changing on Pan In-Reply-To: <18104866.post@talk.nabble.com> References: <18099824.post@talk.nabble.com> <18104866.post@talk.nabble.com> Message-ID: <5b021dd0806250246i44ed4b29v9998a5ff959c6b6f@mail.gmail.com> Hi, your code has several errors regarding map projection. I attached a modified version that works: * the OpenLayers.Map constructor takes two arguments: the name of the map and the options. You had 3 arguments. Instead of adding controls and numZoomLevels as 3rd argument, you should include those in the options. * same for the layer definition of google_hy. The sphericalMercator: true option was ignored because you added it as 3rd argument. * map.setCenter: you cannot use the displayProjection here. displayProjection is only for controls that work with coordinates (e.g. MousePosition). So you have to transform the center coordinates to the map projection. * vector feature coordinates: unless you use Layer.GML or Layer.WFS, you also have to provide your coordinates in the correct projection. Regards, Andreas. On Wed, Jun 25, 2008 at 6:39 AM, czieler <carole.zieler@gmail.com> wrote: > > I wanted to post a link to a sample of this problem: > http://webgirlunleashed.com/openlayers/test/test.html > > If you click and drag the map, or just pan, you'll notice that the 'car' > feature is moved a few pixels each time you drag the map or pan. > > If anyone can give me any insight on what might be causing the > problem...that would be great. I'm using Firefox 2.0, but I've checked it > on several versions as well as Firefox 3.0 and it occurs on all of them. > > czieler wrote: >> >> Has anyone had any issues where Overlay Alignment is slightly changed when >> you pan the map? >> >> I have a Google Hybrid map as my base layer, and I then have a WFS layer >> on top of this, as well as a Vector layer. I'm zoomed in to level 19 ( >> although this happens at other zoom levels ), and when I pan the map, my >> WFS and Vector layers seem to become slightly offset each time I pan ( so >> it becomes progressively worse ). >> >> Edit: >> I just thought to include sample code, as I thought that would be the >> first question people would respond with: >> >> var options = { >> 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) >> }; >> map = new OpenLayers.Map( 'map',{controls: [new >> OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar()], >> numZoomLevels:30},options); >> >> >> var google = new OpenLayers.Layer.Google( "Google", {"sphericalMercator": >> true}); >> var google_hy = new OpenLayers.Layer.Google( "Google Hybrid" , {type: >> G_HYBRID_MAP}, {"sphericalMercator": true}); >> var yahoo_hy = new OpenLayers.Layer.Yahoo( "Yahoo >> Hybrid",{type:YAHOO_MAP_HYB}, {"sphericalMercator": true}); >> map.setCenter(new OpenLayers.LonLat(lat,lon), 19); // lat lon are passed >> into this function >> >> wfs = new OpenLayers.Layer.WFS("MyWFSLayer", url, {maxfeatures: "200"}, >> {extractAttributes: true, displayInLayerSwitcher: >> true,sphericalMercator:true}); // url is passed into this function >> wfs.markers = new OpenLayers.Layer.Markers(""); // if I don't put this >> here, I get a js error >> wfs.setOpacity(0.9); >> map.addLayer(wfs); >> > > -- > View this message in context: http://www.nabble.com/Overlay-Aligment-changing-on-Pan-tp18099824p18104866.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/20080625/3fc5e493/new_file.html From arnd.wippermann at web.de Wed Jun 25 07:10:04 2008 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] OpenLayers.Projection and transform offeatures In-Reply-To: <E1KBIxz-0003x7-00@smtp05.web.de> Message-ID: <E1KBSt9-0002E9-00@smtp05.web.de> Hi as a workaround I overwrite Proj4js.transform(). I declared a property Proj4js.readTransformed and if this is set to false, the transformation takes place. changed part in Proj4js.transform(): if (point.transformed && Proj4js.readTransformed) { this.log("point already transformed"); return; } I don't know, if there are sideeffects, because I have no clue, what the reason is for the property transformed. Also I have seen, it is possibly to declare projections for the format parser read: var theParser = formats[type]; theParser.internalProjection = new OpenLayers.Projection(toProjection); theParser.externalProjection = new OpenLayers.Projection(fromProjection); var features = theParser.read(element.value); write: var theParser = formats[type]; theParser.internalProjection = new OpenLayers.Projection(fromProjection); theParser.externalProjection = new OpenLayers.Projection(toProjection); var derString = theParser.write(features, true); The projection transformation is a great enhancement for OpenLayers and I like it. I'm always astonished of the large capabilities of OpenLayers and the relative easy use of it. Thanks to all the developers. Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ From eric.c2c at gmail.com Wed Jun 25 07:54:42 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> Message-ID: <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> Although i find it weird to use a GML layer with a format different than GML i agree that it's good to avoid code at the application level. Thanks Andreas. Eric 2008/6/25, Andreas Hocevar <andreas.hocevar@gmail.com>: > Hi, > > On Tue, Jun 24, 2008 at 11:59 PM, Eric Lemoine <eric.c2c@gmail.com> wrote: >> On Wed, Jun 11, 2008 at 10:22 AM, Levii Smith <smithlev@levii.com> wrote: >> If I were you I wouldn't use Layer.GeoRSS. Instead I would trigger my >> own Ajax request to get the GeoRSS document, use Format.GeoRSS to >> unserialize the GeoRSS doc into features, and add the resulting >> features to a simple vector layer (Layer.Vector). And I would rely on >> OpenLayers' styling framework to style the features based on their >> attributes. See the georss-flickr.html example which more or less does >> this. > > In OpenLayer 2.6 you can also use OpenLayers.Layer.GML with an option > format: OpenLayers.Format.GeoRSS. That will issue the Ajax request, > create features from the response and add those to the layer. I just > modified the georss-flickr example to make use of that, which saves > some amount of custom code. > > Regards, > Andreas. > From arnd.wippermann at web.de Wed Jun 25 07:57:41 2008 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS lines doesn't show up In-Reply-To: <002c01c8d6a1$db48f710$91dae530$@gadenz@jrc.it> Message-ID: <E1KBTdG-0007ib-00@smtp05.web.de> Hi. try strokeWidth Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Simone Gadenz Gesendet: Mittwoch, 25. Juni 2008 11:00 An: users@openlayers.org Betreff: [OpenLayers-Users] GeoRSS lines doesn't show up Hi all, I try to load a GeoRSS file containing line elements as a GML layer(GeoRSS format). All the loading process seems to be fine since I can see the layer loaded into Firebug but I cannot see any feature on the map. The function to load the GeoRss file is following: function loadGeoRss(){ var georssurl = OpenLayers.Util.getElement('txtGeoRssUrl').value; var georssname = OpenLayers.Util.getElement('txtGeoRssName').value; var georss_options = { 'internalProjection': new OpenLayers.Projection("EPSG:900913"), 'externalProjection': new OpenLayers.Projection("EPSG:4326") }; var styleMap = new OpenLayers.StyleMap({ "fillOpacity": 1, "pointRadius": 8, "fillColor" : "yellow", "stroke-width" : 2, "stroke" : "rgb(99,99,99)" }); var georssformat2 = new OpenLayers.Format.GeoRSS(georss_options); var georsslayer = new OpenLayers.Layer.GML(georssname, georssurl, {'format': georssformat2, styleMap: styleMap}); OpenLayers.Util.getElement('Results').style.visibility="hidden"; map.addLayers([georsslayer]); selectControl3 = new OpenLayers.Control.SelectFeature(georsslayer, {onSelect: onRSSSelect, onUnselect: onRSSUnselect}); map.addControl(selectControl3); selectControl3.activate(); } What am I doing wrong? Cheers Simone PS: This is the firebug response <svg id="OpenLayers.Layer.GML_1089_svgRoot" width="1584" height="549" viewBox="0 0 1584 549"> <g id="OpenLayers.Layer.GML_1089_root" style="visibility: visible;"> <polyline id="OpenLayers.Geometry.LineString_1372" points="798.946,319.369 798.946,319.369 798.655,319.415 798.626,319.442 798.701,319.387 798.808,319.329 798.881,319.264 798.956,319.202 798.997,319.097 799.052,318.969 799.099,318.849 799.185,318.818 799.258,318.894 799.325,318.961 799.418,319.024 799.507,318.907 799.58,318.789 799.675,318.677 799.784,318.568 799.875,318.476 799.986,318.51 800.11,318.622 800.199,318.674 800.308,318.719 800.43,318.766 800.55,318.813 800.667,318.855 800.834,318.951 800.942,319.024 801.044,319.1 801.147,319.175 801.237,319.249 801.317,319.303 801.433,319.35 801.521,319.353 801.621,319.324 801.734,319.282 801.846,319.251 801.934,319.228 802.041,319.215 802.145,319.249 802.23,319.353 802.294,319.439 802.369,319.528 802.449,319.622 802.533,319.716 802.616,319.815 802.738,319.956 802.849,320.089 802.944,320.198 803.006,320.292 803.004,320.412 802.942,320.55 802.893,320.699 802.851,320.845 802.835,320.994 802.826,321.231 802.829,321.411 802.851,321.597 802.879,321.792 802.9,321.985 802.926,322.186 802.951,322.429 802.977,322.609 803.041,322.755 803.126,322.901 803.244,323.091 803.328,323.243 803.403,323.444 803.399,323.6 803.25,323.77 803.115,323.887 803.021,324.004 802.937,324.119 802.875,324.205 802.786,324.33 802.758,324.448 802.784,324.56 802.869,324.552 802.982,324.539 803.082,324.549 803.175,324.539 803.31,324.518 803.454,324.51 803.605,324.531 803.749,324.562 803.88,324.56 803.996,324.547 804.1,324.51 804.193,324.492 804.273,324.609 804.36,324.709 804.513,324.771 804.601,324.8 804.684,324.829 804.766,324.855 804.854,324.881 804.941,324.912 805.063,324.948 805.212,324.972 805.298,324.982 805.382,325.042 805.376,325.225 805.292,325.329 805.194,325.376 805.09,325.423 804.979,325.53 804.916,325.64 804.861,325.739 804.808,325.846 804.721,326.013 804.643,326.169 804.581,326.289 804.51,326.425 804.448,326.545 804.386,326.667 804.317,326.805 804.251,326.944 804.2,327.051 804.142,327.165 804.089,327.267 804.02,327.405 803.973,327.502 803.885,327.635 803.851,327.749 803.953,327.755 804.115,327.773 804.198,327.789 804.282,327.802 804.366,327.815 804.481,327.835 804.603,327.859 804.71,327.867 804.792,327.88 804.952,327.908 805.054,327.935 805.167,327.953 805.271,327.976 805.44,328.013 805.533,328.026 805.637,328.044 805.74,328.06 805.837,328.081 805.962,328.101 806.134,328.135 806.265,328.159 806.359,328.177 806.512,328.206 806.678,328.237 806.854,328.263 807.095,328.297 807.277,328.326 807.395,328.347 807.51,328.373 807.672,328.407 807.776,328.43 807.874,328.448 807.974,328.461 808.07,328.48 808.163,328.508 808.262,328.521 808.358,328.529 808.456,328.524 808.629,328.506 808.762,328.48 808.844,328.529 808.708,328.636 808.622,328.639 808.486,328.644 808.4,328.68 808.258,328.808 808.127,328.912 808.045,328.946 807.959,328.975 807.817,329.04 807.754,329.155 807.876,329.332 808.029,329.41 808.149,329.444 808.273,329.429 808.32,329.298 808.327,329.131 808.425,328.978 808.542,328.905 808.644,328.85 808.76,328.795 808.891,328.748 809.106,328.696 809.425,328.652 809.596,328.646 809.683,328.652 809.858,328.667 810.031,328.68 810.288,328.709 810.373,328.717 810.546,328.73 810.716,328.743 810.89,328.761 810.978,328.769 811.149,328.787 811.234,328.792 811.409,328.803 811.497,328.811 811.584,328.819 811.671,328.824 811.844,328.837 811.93,328.845 812.015,328.85 812.101,328.855 812.185,328.86 812.436,328.871 812.685,328.894 812.769,328.897 812.938,328.902 813.186,328.92 813.428,328.962 813.743,329.079 813.961,329.217 814.105,329.314 814.247,329.408 814.386,329.502 814.524,329.585 814.66,329.676 814.801,329.765 814.937,329.856 815.079,329.95 815.221,330.041 815.363,330.135 815.505,330.234 815.643,330.333 815.855,330.477 815.997,330.573 816.142,330.662 816.282,330.761 816.426,330.852 816.639,330.993 816.85,331.129 816.992,331.222 817.134,331.314 817.275,331.402 817.493,331.546" fill="none" stroke="none"/> <polyline id="OpenLayers.Geometry.LineString_1377" points="798.741,319.387 798.741,319.387" fill="none" stroke="none"/> </g> </svg> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/6ad79225/attachment.html From christian.braun at tudor.lu Wed Jun 25 08:36:10 2008 From: christian.braun at tudor.lu (Christian Braun) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Overlay and BaseLayer problem Message-ID: <1214397370.6424.10.camel@t60> Hi List, I am just starting with OpenLayers and I am a looser ;-) in Javascript, so please be patient. I want to overlay different png images in a rudimentary map. Therefore I created the following code embedded in my standard html: var map; function init(){ map = new OpenLayers.Map ("map", { controls:[ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.Attribution(), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.ScaleLine(), ], numZoomLevels: 5, maxExtent: new OpenLayers.Bounds(57500, 57500, 106600, 101800), maxResolution: 'auto', units: 'm', projection: new OpenLayers.Projection("EPSG:2169") } ); layer1 = newOpenLayers.Layer.Image('LAN1','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_den.png', new OpenLayers.Bounds(57500, 57500, 106600, 101800), new OpenLayers.Projection("EPSG:2169"), new OpenLayers.Size(491,443) ); layer2 = new OpenLayers.Layer.Image( 'LAN2','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_day.png', new OpenLayers.Bounds(57500, 57500, 106600, 101800), new OpenLayers.Projection("EPSG:2169"), new OpenLayers.Size(491,443) ); map.addLayers([layer1, layer2]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); I want to show the images as overlays rather than with an "or" checkbox. Furthermore a need a flag to set transparency of some png's. I found some flags dealing with 'isBaseLayer' and 'opacity' but I dont know how to incorporate them correctly. Hopefully someone of you could post some code that I could use. A soultion by WMS isnt an option because of the nature of the datasets. Thanks in advance, Christian From andreas.hocevar at gmail.com Wed Jun 25 08:37:46 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> Message-ID: <5b021dd0806250537p57add459qf10745b159e888bd@mail.gmail.com> Eric, On Wed, Jun 25, 2008 at 1:54 PM, Eric Lemoine <eric.c2c@gmail.com> wrote: > Although i find it weird to use a GML layer with a format different > than GML i agree that it's good to avoid code at the application > level. Thanks Andreas. Eric The one thing I learned from cr5 is that Layer.GML is for fetching vector datasets at once, and Layer.WFS for fetching parts of it based on a bbox filter connected to the map extent. No matter what data format. Regards, Andreas. From bartvde at osgis.nl Wed Jun 25 08:44:29 2008 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <5b021dd0806250537p57add459qf10745b159e888bd@mail.gmail.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> Message-ID: <20080625124429.B964415EBAA@webmail-beta.tiscomhosting.nl> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <5b021dd0806250537p57add459qf10745b159e888bd@mail.gmail.com> Message-ID: <ce53157afe60ea82acaf4b4c5b2858c4@pop02.backbone.tiscomhosting.nl> X-Sender: bartvde@osgis.nl Received: from b50-11.minvenw.nl [145.50.39.11] with HTTP/1.1 (POST); Wed, 25 Jun 2008 14:44:29 +0200 User-Agent: RoundCube Webmail/0.1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit I think most of the confusion comes from the name "Layer.GML". It almost implies that the data comes from a GML file. Maybe Layer.File would be more logical and generic? Best regards, Bart On Wed, 25 Jun 2008 14:37:46 +0200, "Andreas Hocevar" <andreas.hocevar@gmail.com> wrote: > Eric, > > On Wed, Jun 25, 2008 at 1:54 PM, Eric Lemoine <eric.c2c@gmail.com> wrote: >> Although i find it weird to use a GML layer with a format different >> than GML i agree that it's good to avoid code at the application >> level. Thanks Andreas. Eric > > The one thing I learned from cr5 is that Layer.GML is for fetching > vector datasets at once, and Layer.WFS for fetching parts of it based > on a bbox filter connected to the map extent. No matter what data > format. > > Regards, > Andreas. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From damarmo at gmail.com Wed Jun 25 08:52:19 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Problem with gml layer. Message-ID: <9771eb540806250552k36cb2dcfv6aef9e3c78056b43@mail.gmail.com> Hello, I try to put this layer in a map but... map.addLayer(new OpenLayers.Layer.GML("GML", " http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", {format: OpenLayers.Format.KML}, {formatOptions: { extractAttributes: true, internalProjection: new OpenLayers.Projection('EPSG:900913'), externalProjection: new OpenLayers.Projection('EPSG:4326')} } ) ); I don't have a graphical image of the elements!!! You have a sugestion? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/cce5c03c/attachment.html From crschmidt at metacarta.com Wed Jun 25 09:09:02 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> Message-ID: <20080625130901.GA15504@metacarta.com> On Wed, Jun 25, 2008 at 01:54:42PM +0200, Eric Lemoine wrote: > Although i find it weird to use a GML layer with a format different > than GML i agree that it's good to avoid code at the application > level. Thanks Andreas. Eric As Andreas pointed out, this is a flaw in naming. This is simply for 'historical reasons' -- It was named that way early on, before I really knew what I was doing. (It was named, for example, before we had formats, back when it really *was* about GML.) The GML and WFS layers can essentially be thought of two different strategies: GML is a Layer which uses a "Fixed" strategy, and WFS is a Layer which uses a "BBOX" strategy. Both of them are tied to the HTTP Protocol. It's unfortunate that they're named this way, but that's one of the things that the vector behavior work is changing: once we've refactored things, we can start creating layers that actually make sense for their names :) So yeah, using another format with Layer.GML or Layer.WFS is totally expected and encouraged -- even though the names are pretty bad. Regards, -- Christopher Schmidt MetaCarta From jax at schildmos.nl Wed Jun 25 09:10:15 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <20080623150804.GA28926@metacarta.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <20080623150804.GA28926@metacarta.com> Message-ID: <18112063.post@talk.nabble.com> Christopher Schmidt-4 wrote: > > > Welcome to the world of VML. > > Seriously, I doubt there's going to be much you can do in OL to help > yourself here: IE's rendering is much much slower than FF. > Indeed, I tried all I could think of, but the performance in IE 6 (and 7) remained too slow. I've left vectors for what they are and am now investigating markers. Tweaked it a little and allthough still too slow for IE 6, IE 7 is acceptable Firefox is faster and Opera and Safari are very fast (calc and rendering 800+ markers in just over a second, whereas IE7 takes 5.) Doesn't look like WFS is the answer either because of the (sometimes) very large number of features. (1000+) I can also not render them into a WMS layer, because the data is not static (moving ships) Thanks for all the tips and help people! -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18112063.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.c2c at gmail.com Wed Jun 25 09:13:40 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Problem with gml layer. In-Reply-To: <9771eb540806250552k36cb2dcfv6aef9e3c78056b43@mail.gmail.com> References: <9771eb540806250552k36cb2dcfv6aef9e3c78056b43@mail.gmail.com> Message-ID: <5ec103de0806250613p48b18931xed8fa99e58ff5993@mail.gmail.com> On Wed, Jun 25, 2008 at 2:52 PM, David Martinez Morata <damarmo@gmail.com> wrote: > Hello, > I try to put this layer in a map but... > > map.addLayer(new OpenLayers.Layer.GML("GML", > > "http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", > {format: OpenLayers.Format.KML}, > {formatOptions: { > extractAttributes: true, > internalProjection: new OpenLayers.Projection('EPSG:900913'), > externalProjection: new OpenLayers.Projection('EPSG:4326')} > } > ) > ); > I don't have a graphical image of the elements!!! > You have a sugestion? The format and formatOptions options should be in the same object. And that object should be passed as the third argument to the GML layer constructor. -- Eric From crschmidt at metacarta.com Wed Jun 25 09:13:46 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Problem with gml layer. In-Reply-To: <9771eb540806250552k36cb2dcfv6aef9e3c78056b43@mail.gmail.com> References: <9771eb540806250552k36cb2dcfv6aef9e3c78056b43@mail.gmail.com> Message-ID: <20080625131346.GB15504@metacarta.com> On Wed, Jun 25, 2008 at 02:52:19PM +0200, David Martinez Morata wrote: > Hello, > I try to put this layer in a map but... > > map.addLayer(new OpenLayers.Layer.GML("GML", > " > http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", > {format: OpenLayers.Format.KML}, > {formatOptions: { > extractAttributes: true, > internalProjection: new OpenLayers.Projection('EPSG:900913'), > externalProjection: new OpenLayers.Projection('EPSG:4326')} > } > ) > ); > I don't have a graphical image of the elements!!! > You have a sugestion? format and formatOptions are both options to the layer. They belong in the same hash/argument, not two different ones. You don't have extractStyles in your formatOptions. You may need that to actually get the styles. You don't need to define internalProjection and externalProjection: instead, just put in a 'projection: new OpenLayers.Projection(4326)' option. Your filename is GML, but your foramt is KML. That seems weird. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed Jun 25 09:14:56 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <18112063.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <20080623150804.GA28926@metacarta.com> <18112063.post@talk.nabble.com> Message-ID: <20080625131456.GC15504@metacarta.com> On Wed, Jun 25, 2008 at 06:10:15AM -0700, realjax wrote: > I can also not render them into a WMS layer, because the data is not static > (moving ships) This isn't a reason not to use WMS; just a reason not to use cached WMS. People use WMS for dynamic data all the time. regularly scheduled (setInterval) layer.reload(true) events will update your images. Regards, -- Christopher Schmidt MetaCarta From jax at schildmos.nl Wed Jun 25 09:23:00 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <20080625131456.GC15504@metacarta.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <20080623150804.GA28926@metacarta.com> <18112063.post@talk.nabble.com> <20080625131456.GC15504@metacarta.com> Message-ID: <18112360.post@talk.nabble.com> Christopher Schmidt-4 wrote: > > > This isn't a reason not to use WMS; just a reason not to use cached WMS. > People use WMS for dynamic data all the time. regularly scheduled > (setInterval) layer.reload(true) events will update your images. > Maybe I should have said: I can not render them into a WMS layer, because the features need to respond to click and hover events. Using a WMS layer would require a round trip for at least the click events (what position was clicked and is there a feature there?) and maybe hover events would not be feasible at all.. :-) -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18112360.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From damarmo at gmail.com Wed Jun 25 09:29:04 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Problem with gml layer. In-Reply-To: <20080625131346.GB15504@metacarta.com> References: <9771eb540806250552k36cb2dcfv6aef9e3c78056b43@mail.gmail.com> <20080625131346.GB15504@metacarta.com> Message-ID: <9771eb540806250629m213cbdd1g1a26ea7ef38cbe25@mail.gmail.com> Thanks for your answeres! :) but now in the same point with gml features changing coordinates in the map. In options for the mep object I define this projections: var options = {numZoomLevels: 20, projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4623")}; and for my GML layer i try with: map.addLayer(new OpenLayers.Layer.GML("GML", "http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", {format: OpenLayers.Format.GML, formatOptions: { extractStyles: true, extractAttributes: true} } ) ); And defining the external and internal projection and alwais the same problem...my layer in the middle of Atlantic ocean, when I zoom to a village, the error its minimal, but if I pam to the map the layer chages location!!! Any sugestion to fix it? Thanks 2008/6/25 Christopher Schmidt <crschmidt@metacarta.com>: > On Wed, Jun 25, 2008 at 02:52:19PM +0200, David Martinez Morata wrote: > > Hello, > > I try to put this layer in a map but... > > > > map.addLayer(new OpenLayers.Layer.GML("GML", > > " > > http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", > > {format: OpenLayers.Format.KML}, > > {formatOptions: { > > extractAttributes: true, > > internalProjection: new > OpenLayers.Projection('EPSG:900913'), > > externalProjection: new OpenLayers.Projection('EPSG:4326')} > > } > > ) > > ); > > I don't have a graphical image of the elements!!! > > You have a sugestion? > > format and formatOptions are both options to the layer. They belong in > the same hash/argument, not two different ones. > > You don't have extractStyles in your formatOptions. You may need that to > actually get the styles. > > You don't need to define internalProjection and externalProjection: > instead, just put in a 'projection: new OpenLayers.Projection(4326)' > option. > > Your filename is GML, but your foramt is KML. That seems weird. > > Regards, > -- > Christopher Schmidt > MetaCarta > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/d2f04bbc/attachment.html From eric.c2c at gmail.com Wed Jun 25 09:53:33 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <20080625130901.GA15504@metacarta.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <20080625130901.GA15504@metacarta.com> Message-ID: <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> On Wed, Jun 25, 2008 at 3:09 PM, Christopher Schmidt <crschmidt@metacarta.com> wrote: > On Wed, Jun 25, 2008 at 01:54:42PM +0200, Eric Lemoine wrote: >> Although i find it weird to use a GML layer with a format different >> than GML i agree that it's good to avoid code at the application >> level. Thanks Andreas. Eric > > As Andreas pointed out, this is a flaw in naming. This is simply for > 'historical reasons' -- It was named that way early on, before I really > knew what I was doing. (It was named, for example, before we had > formats, back when it really *was* about GML.) > > The GML and WFS layers can essentially be thought of two different > strategies: GML is a Layer which uses a "Fixed" strategy, and WFS is a > Layer which uses a "BBOX" strategy. > > Both of them are tied to the HTTP Protocol. The WFS layer is tied to the "WFS" protocol. > It's unfortunate that they're named this way, but that's one of the > things that the vector behavior work is changing: once we've refactored > things, we can start creating layers that actually make sense for their > names :) Ok, but what will we do with the WFS and GML layers? Will we keep them with the same names and behaviors to maintain backward compatibility? Thanks, -- Eric From eric.c2c at gmail.com Wed Jun 25 10:00:43 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Problem with gml layer. In-Reply-To: <9771eb540806250629m213cbdd1g1a26ea7ef38cbe25@mail.gmail.com> References: <9771eb540806250552k36cb2dcfv6aef9e3c78056b43@mail.gmail.com> <20080625131346.GB15504@metacarta.com> <9771eb540806250629m213cbdd1g1a26ea7ef38cbe25@mail.gmail.com> Message-ID: <5ec103de0806250700v5b0f9662o26ee2cce05f722aa@mail.gmail.com> On Wed, Jun 25, 2008 at 3:29 PM, David Martinez Morata <damarmo@gmail.com> wrote: > Thanks for your answeres! :) > but now in the same point with gml features changing coordinates in the map. > > In options for the mep object I define this projections: > > var options = {numZoomLevels: 20, > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4623")}; > > and for my GML layer i try with: > > map.addLayer(new OpenLayers.Layer.GML("GML", > "http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", > {format: OpenLayers.Format.GML, > formatOptions: { > extractStyles: true, > extractAttributes: true} > } > ) > ); > > And defining the external and internal projection and alwais the same > problem...my layer in the middle of Atlantic ocean, when I zoom to a > village, the error its minimal, but if I pam to the map the layer chages > location!!! > Any sugestion to fix it? Christopher told you to pass a "projection" option to your GML layer constructor: map.addLayer(new OpenLayers.Layer.GML("GML", "http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", {format: OpenLayers.Format.GML, formatOptions: { extractStyles: true, extractAttributes: true} }, projection: new OpenLayers.Projection('EPSG:4326') ) ); Have you tried that? -- Eric From eric.c2c at gmail.com Wed Jun 25 10:04:43 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:23 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <18112360.post@talk.nabble.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <20080623150804.GA28926@metacarta.com> <18112063.post@talk.nabble.com> <20080625131456.GC15504@metacarta.com> <18112360.post@talk.nabble.com> Message-ID: <5ec103de0806250704s24b6e62cob67d1f365e554fbb@mail.gmail.com> On Wed, Jun 25, 2008 at 3:23 PM, realjax <jax@schildmos.nl> wrote: > > > > Christopher Schmidt-4 wrote: >> >> >> This isn't a reason not to use WMS; just a reason not to use cached WMS. >> People use WMS for dynamic data all the time. regularly scheduled >> (setInterval) layer.reload(true) events will update your images. >> > > Maybe I should have said: > I can not render them into a WMS layer, because the features need to respond > to click and hover events. Using a WMS layer would require a round trip for > at least the click events (what position was clicked and is there a feature > there?) and maybe hover events would not be feasible at all.. > :-) With OpenLayers' hover handler GetFeatureInfo requests can be sent as the mouse goes over the map. -- Eric From simone.gadenz at jrc.it Wed Jun 25 10:18:04 2008 From: simone.gadenz at jrc.it (Simone Gadenz) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS lines doesn't show up In-Reply-To: <E1KBTdG-0007ib-00@smtp05.web.de> References: <002c01c8d6a1$db48f710$91dae530$@gadenz@jrc.it> <E1KBTdG-0007ib-00@smtp05.web.de> Message-ID: <002101c8d6ce$48c92d10$da5b8730$@gadenz@jrc.it> I still miss the line because the stroke is undefined in the Firebug. Is there another property than stroke to set it? S. From: arnd.wippermann@web.de [mailto:arnd.wippermann@web.de] Sent: 25 June 2008 13:58 To: 'Simone Gadenz' Cc: users@openlayers.org Subject: AW: [OpenLayers-Users] GeoRSS lines doesn't show up Hi. try strokeWidth Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Simone Gadenz Gesendet: Mittwoch, 25. Juni 2008 11:00 An: users@openlayers.org Betreff: [OpenLayers-Users] GeoRSS lines doesn't show up Hi all, I try to load a GeoRSS file containing line elements as a GML layer(GeoRSS format). All the loading process seems to be fine since I can see the layer loaded into Firebug but I cannot see any feature on the map. The function to load the GeoRss file is following: function loadGeoRss(){ var georssurl = OpenLayers.Util.getElement('txtGeoRssUrl').value; var georssname = OpenLayers.Util.getElement('txtGeoRssName').value; var georss_options = { 'internalProjection': new OpenLayers.Projection("EPSG:900913"), 'externalProjection': new OpenLayers.Projection("EPSG:4326") }; var styleMap = new OpenLayers.StyleMap({ "fillOpacity": 1, "pointRadius": 8, "fillColor" : "yellow", "stroke-width" : 2, "stroke" : "rgb(99,99,99)" }); var georssformat2 = new OpenLayers.Format.GeoRSS(georss_options); var georsslayer = new OpenLayers.Layer.GML(georssname, georssurl, {'format': georssformat2, styleMap: styleMap}); OpenLayers.Util.getElement('Results').style.visibility="hidden"; map.addLayers([georsslayer]); selectControl3 = new OpenLayers.Control.SelectFeature(georsslayer, {onSelect: onRSSSelect, onUnselect: onRSSUnselect}); map.addControl(selectControl3); selectControl3.activate(); } What am I doing wrong? Cheers Simone PS: This is the firebug response <svg id="OpenLayers.Layer.GML_1089_svgRoot" width="1584" height="549" viewBox="0 0 1584 549"> <g id="OpenLayers.Layer.GML_1089_root" style="visibility: visible;"> <polyline id="OpenLayers.Geometry.LineString_1372" points="798.946,319.369 798.946,319.369 798.655,319.415 798.626,319.442 798.701,319.387 798.808,319.329 798.881,319.264 798.956,319.202 798.997,319.097 799.052,318.969 799.099,318.849 799.185,318.818 799.258,318.894 799.325,318.961 799.418,319.024 799.507,318.907 799.58,318.789 799.675,318.677 799.784,318.568 799.875,318.476 799.986,318.51 800.11,318.622 800.199,318.674 800.308,318.719 800.43,318.766 800.55,318.813 800.667,318.855 800.834,318.951 800.942,319.024 801.044,319.1 801.147,319.175 801.237,319.249 801.317,319.303 801.433,319.35 801.521,319.353 801.621,319.324 801.734,319.282 801.846,319.251 801.934,319.228 802.041,319.215 802.145,319.249 802.23,319.353 802.294,319.439 802.369,319.528 802.449,319.622 802.533,319.716 802.616,319.815 802.738,319.956 802.849,320.089 802.944,320.198 803.006,320.292 803.004,320.412 802.942,320.55 802.893,320.699 802.851,320.845 802.835,320.994 802.826,321.231 802.829,321.411 802.851,321.597 802.879,321.792 802.9,321.985 802.926,322.186 802.951,322.429 802.977,322.609 803.041,322.755 803.126,322.901 803.244,323.091 803.328,323.243 803.403,323.444 803.399,323.6 803.25,323.77 803.115,323.887 803.021,324.004 802.937,324.119 802.875,324.205 802.786,324.33 802.758,324.448 802.784,324.56 802.869,324.552 802.982,324.539 803.082,324.549 803.175,324.539 803.31,324.518 803.454,324.51 803.605,324.531 803.749,324.562 803.88,324.56 803.996,324.547 804.1,324.51 804.193,324.492 804.273,324.609 804.36,324.709 804.513,324.771 804.601,324.8 804.684,324.829 804.766,324.855 804.854,324.881 804.941,324.912 805.063,324.948 805.212,324.972 805.298,324.982 805.382,325.042 805.376,325.225 805.292,325.329 805.194,325.376 805.09,325.423 804.979,325.53 804.916,325.64 804.861,325.739 804.808,325.846 804.721,326.013 804.643,326.169 804.581,326.289 804.51,326.425 804.448,326.545 804.386,326.667 804.317,326.805 804.251,326.944 804.2,327.051 804.142,327.165 804.089,327.267 804.02,327.405 803.973,327.502 803.885,327.635 803.851,327.749 803.953,327.755 804.115,327.773 804.198,327.789 804.282,327.802 804.366,327.815 804.481,327.835 804.603,327.859 804.71,327.867 804.792,327.88 804.952,327.908 805.054,327.935 805.167,327.953 805.271,327.976 805.44,328.013 805.533,328.026 805.637,328.044 805.74,328.06 805.837,328.081 805.962,328.101 806.134,328.135 806.265,328.159 806.359,328.177 806.512,328.206 806.678,328.237 806.854,328.263 807.095,328.297 807.277,328.326 807.395,328.347 807.51,328.373 807.672,328.407 807.776,328.43 807.874,328.448 807.974,328.461 808.07,328.48 808.163,328.508 808.262,328.521 808.358,328.529 808.456,328.524 808.629,328.506 808.762,328.48 808.844,328.529 808.708,328.636 808.622,328.639 808.486,328.644 808.4,328.68 808.258,328.808 808.127,328.912 808.045,328.946 807.959,328.975 807.817,329.04 807.754,329.155 807.876,329.332 808.029,329.41 808.149,329.444 808.273,329.429 808.32,329.298 808.327,329.131 808.425,328.978 808.542,328.905 808.644,328.85 808.76,328.795 808.891,328.748 809.106,328.696 809.425,328.652 809.596,328.646 809.683,328.652 809.858,328.667 810.031,328.68 810.288,328.709 810.373,328.717 810.546,328.73 810.716,328.743 810.89,328.761 810.978,328.769 811.149,328.787 811.234,328.792 811.409,328.803 811.497,328.811 811.584,328.819 811.671,328.824 811.844,328.837 811.93,328.845 812.015,328.85 812.101,328.855 812.185,328.86 812.436,328.871 812.685,328.894 812.769,328.897 812.938,328.902 813.186,328.92 813.428,328.962 813.743,329.079 813.961,329.217 814.105,329.314 814.247,329.408 814.386,329.502 814.524,329.585 814.66,329.676 814.801,329.765 814.937,329.856 815.079,329.95 815.221,330.041 815.363,330.135 815.505,330.234 815.643,330.333 815.855,330.477 815.997,330.573 816.142,330.662 816.282,330.761 816.426,330.852 816.639,330.993 816.85,331.129 816.992,331.222 817.134,331.314 817.275,331.402 817.493,331.546" fill="none" stroke="none"/> <polyline id="OpenLayers.Geometry.LineString_1377" points="798.741,319.387 798.741,319.387" fill="none" stroke="none"/> </g> </svg> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/38fbd783/attachment.html From eric.c2c at gmail.com Wed Jun 25 10:27:38 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Overlay and BaseLayer problem In-Reply-To: <1214397370.6424.10.camel@t60> References: <1214397370.6424.10.camel@t60> Message-ID: <5ec103de0806250727n5315fb89m5cd8907d9d9ffc9@mail.gmail.com> On Wed, Jun 25, 2008 at 2:36 PM, Christian Braun <christian.braun@tudor.lu> wrote: > Hi List, Hello, > I am just starting with OpenLayers and I am a looser ;-) in Javascript, > so please be patient. > > I want to overlay different png images in a rudimentary map. Therefore I > created the following code embedded in my standard html: > > var map; > function init(){ > map = new OpenLayers.Map ("map", { > controls:[ > new OpenLayers.Control.Navigation(), > new OpenLayers.Control.PanZoomBar(), > new OpenLayers.Control.Attribution(), > new OpenLayers.Control.MousePosition(), > new OpenLayers.Control.ScaleLine(), > ], > numZoomLevels: 5, > maxExtent: new OpenLayers.Bounds(57500, 57500, 106600, > 101800), > maxResolution: 'auto', > units: 'm', > projection: new OpenLayers.Projection("EPSG:2169") > } ); > > layer1 = > newOpenLayers.Layer.Image('LAN1','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_den.png', > new OpenLayers.Bounds(57500, 57500, > 106600, 101800), > new OpenLayers.Projection("EPSG:2169"), > new OpenLayers.Size(491,443) > ); > > layer2 = new OpenLayers.Layer.Image( > > 'LAN2','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_day.png', > new OpenLayers.Bounds(57500, 57500, > 106600, 101800), > new OpenLayers.Projection("EPSG:2169"), The third argument should be the size. Furthermore you don't need to pass a projection object to the layer as it's already set in the map options. > new OpenLayers.Size(491,443) > ); > map.addLayers([layer1, layer2]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.zoomToMaxExtent(); > > > > I want to show the images as overlays rather than with an "or" checkbox. So you don't want your image layers to be "baselayers", you want them to be "overlays". To make them overlays you need to set the isBaseLayer option to false: layer2 = new OpenLayers.Layer.Image( 'LAN2', '/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_day.png', new OpenLayers.Bounds(57500, 57500, 106600, 101800), new OpenLayers.Size(491,443), { isBaseLayer: false } ); That being said, it is to be noted that OpenLayers works with at least one base layer. If you don't want really need one you can create a fake one using: var fake = new OpenLayers.Layer('fake', {displayInLayerSwitcher: false}); map.addLayer(fake); > Furthermore a need a flag to set transparency of some png's. It seems to me that either your png images are transparent or they aren't. OpenLayers can't help you with that. Hope this helps, -- Eric From damarmo at gmail.com Wed Jun 25 10:34:38 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Problem with gml layer. In-Reply-To: <5ec103de0806250700v5b0f9662o26ee2cce05f722aa@mail.gmail.com> References: <9771eb540806250552k36cb2dcfv6aef9e3c78056b43@mail.gmail.com> <20080625131346.GB15504@metacarta.com> <9771eb540806250629m213cbdd1g1a26ea7ef38cbe25@mail.gmail.com> <5ec103de0806250700v5b0f9662o26ee2cce05f722aa@mail.gmail.com> Message-ID: <9771eb540806250734m26037d01xfa3e784f465616c4@mail.gmail.com> I define the projection like and option and I have the same problem. Thanks 2008/6/25 Eric Lemoine <eric.c2c@gmail.com>: > On Wed, Jun 25, 2008 at 3:29 PM, David Martinez Morata > <damarmo@gmail.com> wrote: > > Thanks for your answeres! :) > > but now in the same point with gml features changing coordinates in the > map. > > > > In options for the mep object I define this projections: > > > > var options = {numZoomLevels: 20, > > projection: new OpenLayers.Projection("EPSG:900913"), > > displayProjection: new > OpenLayers.Projection("EPSG:4623")}; > > > > and for my GML layer i try with: > > > > map.addLayer(new OpenLayers.Layer.GML("GML", > > " > http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", > > {format: OpenLayers.Format.GML, > > formatOptions: { > > extractStyles: true, > > extractAttributes: true} > > } > > ) > > ); > > > > And defining the external and internal projection and alwais the same > > problem...my layer in the middle of Atlantic ocean, when I zoom to a > > village, the error its minimal, but if I pam to the map the layer chages > > location!!! > > Any sugestion to fix it? > > Christopher told you to pass a "projection" option to your GML layer > constructor: > > map.addLayer(new OpenLayers.Layer.GML("GML", > "http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", > {format: OpenLayers.Format.GML, > formatOptions: { > extractStyles: true, > extractAttributes: true} > }, > projection: new OpenLayers.Projection('EPSG:4326') > ) > ); > > Have you tried that? > > -- > Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/4370f0cd/attachment.html From christian.braun at tudor.lu Wed Jun 25 10:52:16 2008 From: christian.braun at tudor.lu (Christian Braun) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Overlay and BaseLayer problem In-Reply-To: <5ec103de0806250727n5315fb89m5cd8907d9d9ffc9@mail.gmail.com> References: <1214397370.6424.10.camel@t60> <5ec103de0806250727n5315fb89m5cd8907d9d9ffc9@mail.gmail.com> Message-ID: <1214405536.6424.11.camel@t60> Thx very much, this solved my problem! cheers, Christian On Wed, 2008-06-25 at 16:27 +0200, Eric Lemoine wrote: > On Wed, Jun 25, 2008 at 2:36 PM, Christian Braun > <christian.braun@tudor.lu> wrote: > > Hi List, > > Hello, > > > > > I am just starting with OpenLayers and I am a looser ;-) in Javascript, > > so please be patient. > > > > I want to overlay different png images in a rudimentary map. Therefore I > > created the following code embedded in my standard html: > > > > var map; > > function init(){ > > map = new OpenLayers.Map ("map", { > > controls:[ > > new OpenLayers.Control.Navigation(), > > new OpenLayers.Control.PanZoomBar(), > > new OpenLayers.Control.Attribution(), > > new OpenLayers.Control.MousePosition(), > > new OpenLayers.Control.ScaleLine(), > > ], > > numZoomLevels: 5, > > maxExtent: new OpenLayers.Bounds(57500, 57500, 106600, > > 101800), > > maxResolution: 'auto', > > units: 'm', > > projection: new OpenLayers.Projection("EPSG:2169") > > } ); > > > > layer1 = > > newOpenLayers.Layer.Image('LAN1','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_den.png', > > new OpenLayers.Bounds(57500, 57500, > > 106600, 101800), > > new OpenLayers.Projection("EPSG:2169"), > > new OpenLayers.Size(491,443) > > ); > > > > layer2 = new OpenLayers.Layer.Image( > > > > 'LAN2','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_day.png', > > new OpenLayers.Bounds(57500, 57500, > > 106600, 101800), > > new OpenLayers.Projection("EPSG:2169"), > > The third argument should be the size. Furthermore you don't need to > pass a projection object to the layer as it's already set in the map > options. > > > new OpenLayers.Size(491,443) > > ); > > map.addLayers([layer1, layer2]); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > map.zoomToMaxExtent(); > > > > > > > > I want to show the images as overlays rather than with an "or" checkbox. > > So you don't want your image layers to be "baselayers", you want them > to be "overlays". To make them overlays you need to set the > isBaseLayer option to false: > > layer2 = new OpenLayers.Layer.Image( > 'LAN2', > '/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_day.png', > new OpenLayers.Bounds(57500, 57500, 106600, 101800), > new OpenLayers.Size(491,443), { > isBaseLayer: false > } > ); > > That being said, it is to be noted that OpenLayers works with at least > one base layer. If you don't want really need one you can create a > fake one using: > > var fake = new OpenLayers.Layer('fake', {displayInLayerSwitcher: false}); > map.addLayer(fake); > > > Furthermore a need a flag to set transparency of some png's. > > It seems to me that either your png images are transparent or they > aren't. OpenLayers can't help you with that. > > Hope this helps, > > -- > Eric From andreas.hocevar at gmail.com Wed Jun 25 10:56:39 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS lines doesn't show up In-Reply-To: <-8826235405431214092@unknownmsgid> References: <E1KBTdG-0007ib-00@smtp05.web.de> <-8826235405431214092@unknownmsgid> Message-ID: <5b021dd0806250756j1dbe49adl8ae77c9cfb17d0ee@mail.gmail.com> Hi, On Wed, Jun 25, 2008 at 4:18 PM, Simone Gadenz <simone.gadenz@jrc.it> wrote: > I still miss the line because the stroke is undefined in the Firebug. Is > there another property than stroke to set it? strokeColor instead of stroke. See http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Feature/Vector-js.html#OpenLayers.Feature.Vector.Constants for all properties. Regards, Andreas. From arnd.wippermann at web.de Wed Jun 25 11:13:23 2008 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS lines doesn't show up In-Reply-To: <002101c8d6ce$48c92d10$da5b8730$@gadenz@jrc.it> Message-ID: <E1KBWgc-0004nY-00@smtp05.web.de> Hi Simone, try this for your styleMap declaration var styleMap = new OpenLayers.StyleMap({ "fillOpacity": 1, "pointRadius": 8, "fillColor" : "yellow", "strokeWidth" : 2, "strokeColor" : "rgb(99,99,99)" }); This are the default styles properties, which can be set: OpenLayers.Feature.Vector.style = { 'default': { fillColor: "#ee9900", fillOpacity: 0.4, hoverFillColor: "white", hoverFillOpacity: 0.8, strokeColor: "#ee9900", strokeOpacity: 1, strokeWidth: 1, strokeLinecap: "round", hoverStrokeColor: "red", hoverStrokeOpacity: 1, hoverStrokeWidth: 0.2, pointRadius: 6, hoverPointRadius: 1, hoverPointUnit: "%", pointerEvents: "visiblePainted", cursor: "" }, Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/b0bd8d12/attachment.html From crschmidt at metacarta.com Wed Jun 25 11:32:59 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <20080625130901.GA15504@metacarta.com> <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> Message-ID: <20080625153259.GA19311@metacarta.com> On Wed, Jun 25, 2008 at 03:53:33PM +0200, Eric Lemoine wrote: > On Wed, Jun 25, 2008 at 3:09 PM, Christopher Schmidt > <crschmidt@metacarta.com> wrote: > > On Wed, Jun 25, 2008 at 01:54:42PM +0200, Eric Lemoine wrote: > >> Although i find it weird to use a GML layer with a format different > >> than GML i agree that it's good to avoid code at the application > >> level. Thanks Andreas. Eric > > > > As Andreas pointed out, this is a flaw in naming. This is simply for > > 'historical reasons' -- It was named that way early on, before I really > > knew what I was doing. (It was named, for example, before we had > > formats, back when it really *was* about GML.) > > > > The GML and WFS layers can essentially be thought of two different > > strategies: GML is a Layer which uses a "Fixed" strategy, and WFS is a > > Layer which uses a "BBOX" strategy. > > > > Both of them are tied to the HTTP Protocol. > > The WFS layer is tied to the "WFS" protocol. More so than the HTTP protocol, I'll admit; but the entire reason for the vector behavior work is just that the protocol stuff really isn't well encapsulated, so we'll just put it this way: "The WFS layer is a fscking mess" :) > > It's unfortunate that they're named this way, but that's one of the > > things that the vector behavior work is changing: once we've refactored > > things, we can start creating layers that actually make sense for their > > names :) > > Ok, but what will we do with the WFS and GML layers? Will we keep them > with the same names and behaviors to maintain backward compatibility? I don't know exactly what we'll do: if we can change the underlying implementation of these to just be simple wrappers around a vector layer without changing API-supported behavior, that would be preferable: otherwise, we may have to maintain the existing code. For example, the WFS layer has support to render with Markers, something that the vector behavior changes won't give us, so we can't really just dump the Layer.WFS code that does that and depend on the vector behavior instead. Regards, -- Christopher Schmidt MetaCarta From simone.gadenz at jrc.it Wed Jun 25 11:53:41 2008 From: simone.gadenz at jrc.it (Simone Gadenz) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS format limits to 4k size the XML node into FF Message-ID: <004801c8d6db$a417e370$ec47aa50$@gadenz@jrc.it> Hi all, probably you guys knew that Firefox has a limit of 4k on XML node content. I have just realised because some of the lines I had loaded from a GeoRSS file were cut after 4096 chars. I have been said to use the line[0].textContent instead of the line[0].firstChild.nodeValue but it works only in FF and not in IE. How did you cope with it? Thanks Simone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/c84c59c9/attachment.html From simone.gadenz at jrc.it Wed Jun 25 12:02:22 2008 From: simone.gadenz at jrc.it (Simone Gadenz) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS lines doesn't show up In-Reply-To: <E1KBWgc-0004nY-00@smtp05.web.de> References: <002101c8d6ce$48c92d10$da5b8730$@gadenz@jrc.it> <E1KBWgc-0004nY-00@smtp05.web.de> Message-ID: <005301c8d6dc$dabb5b40$903211c0$@gadenz@jrc.it> Thanks all, it works now! S. From: arnd.wippermann@web.de [mailto:arnd.wippermann@web.de] Sent: 25 June 2008 17:13 To: simone.gadenz@jrc.it Cc: users@openlayers.org Subject: AW: [OpenLayers-Users] GeoRSS lines doesn't show up Hi Simone, try this for your styleMap declaration var styleMap = new OpenLayers.StyleMap({ "fillOpacity": 1, "pointRadius": 8, "fillColor" : "yellow", "strokeWidth" : 2, "strokeColor" : "rgb(99,99,99)" }); This are the default styles properties, which can be set: OpenLayers.Feature.Vector.style = { 'default': { fillColor: "#ee9900", fillOpacity: 0.4, hoverFillColor: "white", hoverFillOpacity: 0.8, strokeColor: "#ee9900", strokeOpacity: 1, strokeWidth: 1, strokeLinecap: "round", hoverStrokeColor: "red", hoverStrokeOpacity: 1, hoverStrokeWidth: 0.2, pointRadius: 6, hoverPointRadius: 1, hoverPointUnit: "%", pointerEvents: "visiblePainted", cursor: "" }, Mit freundlichen Gr?ssen Arnd Wippermann http://gis.ibbeck.de/ginfo/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/763fc201/attachment.html From miles.togoe at gmail.com Wed Jun 25 12:57:15 2008 From: miles.togoe at gmail.com (MilesTogoe) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] changing div size and openlayers size command Message-ID: <486278EB.2090402@gmail.com> having trouble with OpenLayers in terms of window sizing. What is the correct way to specify the relationship between the div and the size command in OpenLayers, especially when it goes into a div that may change size according to any changes in the browser window size. I have tried without much success: #map { width: 100%; height: auto; } function init() { map = new OpenLayers.Map('map'); map.Size(100%,100%); layer1 = new OpenLayers.Layer.Image('citymap','/static/maps/citymap.png', From chris at genieknows.com Wed Jun 25 13:53:33 2008 From: chris at genieknows.com (Chris Adams) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] changing div size and openlayers size command In-Reply-To: <486278EB.2090402@gmail.com> References: <486278EB.2090402@gmail.com> Message-ID: <4862861D.7050408@genieknows.com> If you want the map size to change with the window, then you'll need to set at least the height of your body and html tags to 100%. Otherwise, I think you should be able to set pixel values directly to the div in order to resize. I.e. html, body { width: 100%; height: 100%; } #map { width: 100%; height: 100% } . . . To set your size using JS: var div = OpenLayers.Util.getElement("map"); div.style.width = width + "px"; div.style.height = height + "px"; MilesTogoe wrote: > having trouble with OpenLayers in terms of window sizing. What is the > correct way to specify the relationship between the div and the size > command in OpenLayers, especially when it goes into a div that may > change size according to any changes in the browser window size. > I have tried without much success: > #map { > width: 100%; > height: auto; > } > > function init() { > map = new OpenLayers.Map('map'); > map.Size(100%,100%); > layer1 = new OpenLayers.Layer.Image('citymap','/static/maps/citymap.png', > > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From chris at genieknows.com Wed Jun 25 13:56:00 2008 From: chris at genieknows.com (Chris Adams) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] changing div size and openlayers size command In-Reply-To: <4862861D.7050408@genieknows.com> References: <486278EB.2090402@gmail.com> <4862861D.7050408@genieknows.com> Message-ID: <486286B0.90209@genieknows.com> Correction: var div = OpenLayers.Util.getElement("map"); div.style.width = width + "px"; div.style.height = height + "px"; map.updateSize(); Chris Adams wrote: > If you want the map size to change with the window, then you'll need to > set at least the height of your body and html tags to 100%. Otherwise, I > think you should be able to set pixel values directly to the div in > order to resize. > > I.e. > > html, body { > width: 100%; > height: 100%; > } > > #map { > width: 100%; > height: 100% > } > > . > . > . > > To set your size using JS: > > var div = OpenLayers.Util.getElement("map"); > div.style.width = width + "px"; > div.style.height = height + "px"; > > MilesTogoe wrote: > >> having trouble with OpenLayers in terms of window sizing. What is the >> correct way to specify the relationship between the div and the size >> command in OpenLayers, especially when it goes into a div that may >> change size according to any changes in the browser window size. >> I have tried without much success: >> #map { >> width: 100%; >> height: auto; >> } >> >> function init() { >> map = new OpenLayers.Map('map'); >> map.Size(100%,100%); >> layer1 = new OpenLayers.Layer.Image('citymap','/static/maps/citymap.png', >> >> >> >> >> >> _______________________________________________ >> 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 andrew.deklerk at gmail.com Wed Jun 25 16:58:09 2008 From: andrew.deklerk at gmail.com (Andrew de klerk) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] TextLayer with Framecloud popup Message-ID: <18121640.post@talk.nabble.com> Hi all I have been searching for a way to implement the frameclod popup for a text layer (as in the "markerstextlayer.html" example). Has this been done? I am even willing to modify the Text.js file, but do not know where to start :). Any guidance or pointers would be appreciated - thanks Andrew -- View this message in context: http://www.nabble.com/TextLayer-with-Framecloud-popup-tp18121640p18121640.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Jun 25 17:05:56 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] TextLayer with Framecloud popup In-Reply-To: <18121640.post@talk.nabble.com> References: <18121640.post@talk.nabble.com> Message-ID: <20080625210555.GA20945@metacarta.com> On Wed, Jun 25, 2008 at 01:58:09PM -0700, Andrew de klerk wrote: > > Hi all > > I have been searching for a way to implement the frameclod popup for a text > layer (as in the "markerstextlayer.html" example). Has this been done? I am > even willing to modify the Text.js file, but do not know where to start :). > Any guidance or pointers would be appreciated - thanks Andrew By searching google for: openlayers layer.text framed cloud One of the first hits I get is: http://openlayers.org/pipermail/users/2008-April/005694.html "[OpenLayers-Users] FramedCloud with Layer.Text?" Regards, -- Christopher Schmidt MetaCarta From andrew.deklerk at gmail.com Wed Jun 25 17:28:20 2008 From: andrew.deklerk at gmail.com (Andrew de klerk) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] TextLayer with Framecloud popup In-Reply-To: <20080625210555.GA20945@metacarta.com> References: <18121640.post@talk.nabble.com> <20080625210555.GA20945@metacarta.com> Message-ID: <18122118.post@talk.nabble.com> Ok, please forgive my late night googling skills (tired eyes!), and thanks for the prompt response. If i look at that link you have said: "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.' The reason why I am using Layer.text is because I specifically don't want my end users to have to select a tool to click on a feature/marker. Layer.Text incorporates this nicely, but of course with the old style popup. SO, as the post says..the answer is no...but, I have applied the hack and it all works well Thanks Chris - that's the answer i was looking for! -- View this message in context: http://www.nabble.com/TextLayer-with-Framecloud-popup-tp18121640p18122118.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed Jun 25 17:54:37 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] TextLayer with Framecloud popup In-Reply-To: <18122118.post@talk.nabble.com> References: <18121640.post@talk.nabble.com> <20080625210555.GA20945@metacarta.com> <18122118.post@talk.nabble.com> Message-ID: <20080625215437.GA21946@metacarta.com> On Wed, Jun 25, 2008 at 02:28:20PM -0700, Andrew de klerk wrote: > > Ok, please forgive my late night googling skills (tired eyes!), and thanks > for the prompt response. If i look at that link you have said: > > "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.' > > The reason why I am using Layer.text is because I specifically don't want my > end users to have to select a tool to click on a feature/marker. They shouldn't need to. var control = new OpenLayers.Control.SelectFeature(layer); map.addControl(control); control.activate(); Now the select control is active, and clicks on the features will activate a popup. See, for example: http://openlayers.org/dev/examples/sundials.html Regards, -- Christopher Schmidt MetaCarta From leorochadecastro at gmail.com Wed Jun 25 19:22:01 2008 From: leorochadecastro at gmail.com (leorochadecastro@gmail.com) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] RV: IE7 screen resizing and map center.... Message-ID: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAZ3mCN1T41BGYZwDgRmAKTcKAAAAQAAAAAcIZimxy4USEtoM+X8WL3AEAAAAA@altasur.com.uy> Hello, this is my first app with openlayers. I've 4 layers and this function: "map.setCenter(new OpenLayers.LonLat(actLon, actLat), actZoom);" is working fine. But when I change size of the browser window and select other base layer, it seems that the center moves downwards and to the right. How can I fix this problem? LEONEL ROCHA ALTASUR S.A. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080625/d0d1877e/attachment.html From ks at geograf.dk Thu Jun 26 03:13:16 2008 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Not image in IE In-Reply-To: <9771eb540806240459t71c19845t2a39808f13efd97d@mail.gmail.com> References: <9771eb540806240459t71c19845t2a39808f13efd97d@mail.gmail.com> Message-ID: <4863418C.5030403@geograf.dk> How much of the code runs? Have you tried inserting "alert("1");" statements around the code to see if it actually executes? Regards, Kenneth Skovhede, GEOGRAF A/S David Martinez Morata skrev: > Thanks for the answers for my question, but now... > > I don't have a error message in IE, but I don't have the image too!!! > > This is my script: > > <script type="text/javascript"> > > // make map available for easy debugging > var map; > > // avoid pink tiles > OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; > //OpenLayers.Util.onImageLoadErrorColor = "transparent"; > > > function init(){ > var options = {numZoomLevels: 20, > 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), > //}; > // Create a map Object > map = new OpenLayers.Map('map', options); > > // Create Google Mercator layers > var gmap = new OpenLayers.Layer.Google( > "Google Streets"); > var gsat = new OpenLayers.Layer.Google( > "Google Satellite", > {type: G_SATELLITE_MAP}); > var ghyb = new OpenLayers.Layer.Google( > "Google Hybrid", > {type: G_HYBRID_MAP}); > var gphy = new OpenLayers.Layer.Google( > "Google Physical", > {type: > G_PHYSICAL_MAP}); > > // Create a WFS Sites Layer > var sites = new OpenLayers.Layer.WFS( "Sites", > > "http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map", > {typename: "Sites",maxfeatures: 100 },{ > featureClass: OpenLayers.Feature.WFS }); > // Create a WFS Cables Layer > var cables = new OpenLayers.Layer.WFS( "Cables", > > "http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map", > {typename: "Cables", maxfeatures: 100});//,{ > //featureClass: OpenLayers.Feature.Vector}); > > map.addLayers([gsat, gmap, ghyb, gphy, sites, cables]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new OpenLayers.Control.ScaleLine); > map.addControl(new OpenLayers.Control.MousePosition()); > if (!map.getCenter()) {map.zoomToMaxExtent()} > } > > function changezoom(x,y,z) > { > map.setCenter(new OpenLayers.LonLat(x, y), z); > } > function showAddress(address) { > var geocoder = new GClientGeocoder(); > if (geocoder) { > geocoder.getLatLng( > address, > function(point) { > if (!point) {alert(address + " not found");} > else {map.setCenter(new > OpenLayers.LonLat(point.x,point.y),15);} > } > ); > } > } > > Thanks for help me! > > ------------------------------------------------------------------------ > > _______________________________________________ > 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/20080626/a6aa9968/attachment.html From jax at schildmos.nl Thu Jun 26 03:53:08 2008 From: jax at schildmos.nl (realjax) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <5ec103de0806250704s24b6e62cob67d1f365e554fbb@mail.gmail.com> References: <17961729.post@talk.nabble.com> <5ec103de0806210650m6ac175a1ia575d554aa53124d@mail.gmail.com> <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <20080623150804.GA28926@metacarta.com> <18112063.post@talk.nabble.com> <20080625131456.GC15504@metacarta.com> <18112360.post@talk.nabble.com> <5ec103de0806250704s24b6e62cob67d1f365e554fbb@mail.gmail.com> Message-ID: <18128374.post@talk.nabble.com> Eric Lemoine-3 wrote: > > With OpenLayers' hover handler GetFeatureInfo requests can be sent as > the mouse goes over the map. > I know that it is possible, but firing GetFeatureInfo requests for every mouse movement is hardly what I'd call feasible ;-) Don't get me wrong here though! I love OL and I think you guys have created something outstanding! I'm just bitching about Internet Explorer. :-) Cheers -- View this message in context: http://www.nabble.com/Draw-features-one-by-one-in-IE--tp17961729p18128374.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From christian.braun at tudor.lu Thu Jun 26 04:58:39 2008 From: christian.braun at tudor.lu (christian.braun@tudor.lu) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Firefox vs. IE error Message-ID: <OF569CE121.4CA2E99C-ONC1257474.003068A9-C1257474.003199AB@tudor.lu> Hi list I created a really small OpenLayer application. In Firefox it is working flawlessly, even Firebug isnt aware of errors. In Internet Expolorer I get the following error message without any image displayed: "Line: 537" "Char: 204" "Error: 'undefined' is null or not an object" "Code: 0" I am using this code: var map; function init(){ map = new OpenLayers.Map ("map", { controls:[ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.Attribution(), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.ScaleLine(), ], numZoomLevels: 5, maxExtent: new OpenLayers.Bounds(57500, 57500, 106600, 101800), maxResolution: 'auto', units: 'm', projection: new OpenLayers.Projection("EPSG:2169") } ); layer1 = new OpenLayers.Layer.Image( 'LAN1','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_den.png', new OpenLayers.Bounds(57500, 57500, 106600, 101800), //new OpenLayers.Projection("EPSG:2169"), new OpenLayers.Size(491,443) ); layer2 = new OpenLayers.Layer.Image( 'LAN2','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_day.png', new OpenLayers.Bounds(57500, 57500, 106600, 101800), //new OpenLayers.Projection("EPSG:2169"), new OpenLayers.Size(491,443), { isBaseLayer: false} ); roads = new OpenLayers.Layer.Image( 'roads','/lan_output/roads.png', new OpenLayers.Bounds(57500, 57500, 106600, 101800), //new OpenLayers.Projection("EPSG:2169"), new OpenLayers.Size(491,443), { isBaseLayer: false} ); /* gml_roads = new OpenLayers.Layer.GML( 'Roadnetwork', '/lan_output/roadnetwork.gml', new OpenLayers.Bounds(57500, 57500, 106600, 101800), {isBaseLayer: false} ); */ map.addLayers([layer1, layer2, roads]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.zoomToMaxExtent(); } Any ideas? Thanks in advance, Christian _________________________________________ Dipl. Geogr. Christian Braun Tel: +352- 425991-608 Mobil: +49-179-6845896 Mail: christian.braun@tudor.lu Resource Centre for Environmental Technologies, Public Research Centre Henri Tudor, Technoport Schlassgoart, 66 rue de Luxembourg, P.O. BOX 144, L-4002 Esch-sur-Alzette, Luxembourg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/6d2c1753/attachment.html From rdmailings at duif.net Thu Jun 26 05:06:44 2008 From: rdmailings at duif.net (Richard Duivenvoorde) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Firefox vs. IE error In-Reply-To: <OF569CE121.4CA2E99C-ONC1257474.003068A9-C1257474.003199AB@tudor.lu> References: <OF569CE121.4CA2E99C-ONC1257474.003068A9-C1257474.003199AB@tudor.lu> Message-ID: <48635C24.80007@duif.net> Hi Cristian, try removing the comma after new OpenLayers.Control.ScaleLine(), IE doesn't accept an array of objects to end on a comma (while FF finds that ok) Hope this helps, Richard Duivenvoorde christian.braun@tudor.lu wrote: > > Hi list I created a really small OpenLayer application. > In Firefox it is working flawlessly, even Firebug isnt aware of errors. > > In Internet Expolorer I get the following error message without any > image displayed: > "Line: 537" > "Char: 204" > "Error: 'undefined' is null or not an object" > "Code: 0" > > > I am using this code: > > /var map;/ > / function init(){/ > / map = new OpenLayers.Map ("map", {/ > / controls:[/ > / new OpenLayers.Control.Navigation(),/ > / new OpenLayers.Control.PanZoomBar(),/ > / new OpenLayers.Control.Attribution(),/ > / new OpenLayers.Control.MousePosition(),/ > / new OpenLayers.Control.ScaleLine(),/ > / ],/ > / numZoomLevels: 5,/ > / maxExtent: new OpenLayers.Bounds(57500, 57500, 106600, > 101800),/ > / maxResolution: 'auto',/ > / units: 'm',/ > / projection: new OpenLayers.Projection("EPSG:2169")/ > / } );/ > > / layer1 = new OpenLayers.Layer.Image(/ > / > 'LAN1','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_den.png',/ > > / new OpenLayers.Bounds(57500, 57500, > 106600, 101800),/ > / //new OpenLayers.Projection("EPSG:2169"),/ > / new OpenLayers.Size(491,443)/ > / );/ > > / layer2 = new OpenLayers.Layer.Image(/ > / > 'LAN2','/lan_output/schedule_baseline_normal_weather/schedule_baseline_normal_weather_L_day.png',/ > > / new OpenLayers.Bounds(57500, 57500, > 106600, 101800),/ > / //new OpenLayers.Projection("EPSG:2169"),/ > / new OpenLayers.Size(491,443), {/ > / isBaseLayer: false}/ > / );/ > > / roads = new OpenLayers.Layer.Image(/ > / 'roads','/lan_output/roads.png',/ > / new OpenLayers.Bounds(57500, 57500, > 106600, 101800),/ > / //new OpenLayers.Projection("EPSG:2169"),/ > / new OpenLayers.Size(491,443), {/ > / isBaseLayer: false}/ > / );/ > > //* / > / gml_roads = new OpenLayers.Layer.GML(/ > / 'Roadnetwork', > '/lan_output/roadnetwork.gml',/ > / new OpenLayers.Bounds(57500, 57500, > 106600, 101800),/ > / {isBaseLayer: false}/ > / );/ > /*// > > / map.addLayers([layer1, layer2, roads]);/ > / map.addControl(new OpenLayers.Control.LayerSwitcher());/ > / map.zoomToMaxExtent();/ > / }/ > > > Any ideas? > Thanks in advance, > Christian > > > _________________________________________ > > Dipl. Geogr. Christian Braun > Tel: +352- 425991-608 > Mobil: +49-179-6845896 > Mail: christian.braun@tudor.lu > > Resource Centre for Environmental Technologies, > Public Research Centre Henri Tudor, > Technoport Schlassgoart, > 66 rue de Luxembourg, > P.O. BOX 144, > L-4002 Esch-sur-Alzette, Luxembourg > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From christian.braun at tudor.lu Thu Jun 26 05:14:03 2008 From: christian.braun at tudor.lu (christian.braun@tudor.lu) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Firefox vs. IE error In-Reply-To: <48635C24.80007@duif.net> Message-ID: <OF03D214A2.CB6C101E-ONC1257474.0032B340-C1257474.003302D4@tudor.lu> Thx, worked! Thread closed;-) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/366f09b0/attachment.html From yjacolin at free.fr Thu Jun 26 05:32:46 2008 From: yjacolin at free.fr (Jacolin Yves) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Firefox vs. IE error In-Reply-To: <OF569CE121.4CA2E99C-ONC1257474.003068A9-C1257474.003199AB@tudor.lu> References: <OF569CE121.4CA2E99C-ONC1257474.003068A9-C1257474.003199AB@tudor.lu> Message-ID: <200806261132.46713.yjacolin@free.fr> Hi, I think you should not use a ',' at the end of your array. I often get an error in IE with this ;) > controls:[ > new OpenLayers.Control.Navigation(), > new OpenLayers.Control.PanZoomBar(), > new OpenLayers.Control.Attribution(), > new OpenLayers.Control.MousePosition(), > new OpenLayers.Control.ScaleLine(), <---------- > ] Y. -- Yves Jacolin --- http://softlibre.gloobe.org From crschmidt at metacarta.com Thu Jun 26 08:04:40 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <18128374.post@talk.nabble.com> References: <18054250.post@talk.nabble.com> <18068377.post@talk.nabble.com> <5ec103de0806230641v7d868faaoe5880b1f63d259e2@mail.gmail.com> <18070439.post@talk.nabble.com> <20080623150804.GA28926@metacarta.com> <18112063.post@talk.nabble.com> <20080625131456.GC15504@metacarta.com> <18112360.post@talk.nabble.com> <5ec103de0806250704s24b6e62cob67d1f365e554fbb@mail.gmail.com> <18128374.post@talk.nabble.com> Message-ID: <20080626120439.GA12019@metacarta.com> On Thu, Jun 26, 2008 at 12:53:08AM -0700, realjax wrote: > > With OpenLayers' hover handler GetFeatureInfo requests can be sent as > > the mouse goes over the map. > > > > I know that it is possible, but firing GetFeatureInfo requests for every > mouse movement is hardly what I'd call feasible ;-) It's not every mouse movement -- just when the mouse stops for more than a tenth of a second. I do it for an application at work and find it works brilliantly -- in fact, I actually like the behavior better when there's lots of data than using a hover handler on a selectFeature control. A selectFeature control will *always* 'do the needful' -- even if you're just passing by. A hover handler requires *intention*, and I think that works very well. The round trip request time for talking to a server for the equivilant of a getfeatureinfo request against a table of 7 million rows is something like 130ms (hooray for PostGIS) and then we can display information in a little popup. I really find it works well. "Don't knock it til you try it." Regards, -- Christopher Schmidt MetaCarta From lists at dipole-consulting.com Thu Jun 26 09:11:40 2008 From: lists at dipole-consulting.com (Didrik Pinte) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] link with gps Message-ID: <1214485900.4016.13.camel@ddp.simpson> Hi, One of my client asked me if it was possible to control the center of an openlayer map by an external GPS connected to it's laptop ... I have googled a bit about this but found nothing. Does anybody have an interesting suggestion ? link ? idea ? 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/20080626/d69ab547/attachment.bin From damarmo at gmail.com Thu Jun 26 09:20:45 2008 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] I'm stupid? Message-ID: <9771eb540806260620o13925949v7cff7ab605e39134@mail.gmail.com> Hy list, I start With OL " dais ago :S and I don't know javascript :SS!! But I start to developing some simple application... And at the first time was easy to start (copy paste the code)... But now I have some problems with a gml layer, and I have the impression tha OL it's not more stable (maybe because I don't know javascript)... It's my 5 or 6 email to the list asking for a the same question. Problem with GML layer pan, they change the coordinates?!!! I start to play with projections and now the problem it's bigger. When I change the base layer... the map changes too!!! I don't understand anything:S this is the code i write: <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test OpenLayers</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <script type="text/javascript" src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAu_VBBdBvqz5BLcs7nrzUXBTtRbNeTxVoAy20KSc4Ig34aflRRhQFn5FeqUpODActln3OKR2UQ_14vg'></script> <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script> <script type="text/javascript"> // make map available for easy debugging var map; // avoid pink tiles OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; OpenLayers.Util.onImageLoadErrorColor = "transparent"; function init(){ var options = {numZoomLevels: 20, projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4623")}; // Create a map Object map = new OpenLayers.Map('map', options); // Create Google Mercator layers var gmap = new OpenLayers.Layer.Google("Google Streets",{type: G_NORMAL_MAP},{"sphericalMercator": true}); var gsat = new OpenLayers.Layer.Google("Google Satellite",{type: G_SATELLITE_MAP},{"sphericalMercator": true}); var ghyb = new OpenLayers.Layer.Google("Google Hybrid",{type: G_HYBRID_MAP},{"sphericalMercator": true}); var gphy = new OpenLayers.Layer.Google("Google Physical",{type: G_PHYSICAL_MAP},{"sphericalMercator": true}); // Create a WFS Sites Layer var sites = new OpenLayers.Layer.WFS( "Sites", "http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map", {typename: "Sites",maxfeatures: 100 },{ featureClass: OpenLayers.Feature.WFS}); map.addLayer(new OpenLayers.Layer.GML("GML", "http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", {format: OpenLayers.Format.GML, formatOptions: { extractStyles: true, extractAttributes: true} },{projection: new OpenLayers.Projection("EPSG:4623")} ) ); map.addLayers([gmap,gsat,ghyb,gphy,sites]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.ScaleLine); map.addControl(new OpenLayers.Control.MousePosition()); if (!map.getCenter()) {map.zoomToMaxExtent()} } function changezoom(x,y,z) { map.setCenter(new OpenLayers.LonLat(x, y), z); } function showAddress(address) { var geocoder = new GClientGeocoder(); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) {alert(address + " not found");} else {map.setCenter(new OpenLayers.LonLat(point.x,point.y),15);}});}} </script> </head> <body onload="init()"> <div id="header"> <h1 id="title">Test OpenLayers</h1> <form action="#" onsubmit="showAddress(this.address.value, this.countrycode.value); return false" > <p>Recherchez un adresse: <input type="text" size="60" id="address" value="" /> &nbsp; <input type="submit" onclick="showAddress(document.getElementById('address').value); return false;" value="Go!" /> </p> </form> </div> <div style="width:100%; height:85%" id="map"></div> <div id="docs"> </div> </body> </html> And I don't know Wat to do... PLeeeeeeeeeeeeaaaaseeeeee help me! Thanks a lot for your patience! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/ef0b77bf/attachment.html From ks at geograf.dk Thu Jun 26 09:45:33 2008 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] link with gps In-Reply-To: <1214485900.4016.13.camel@ddp.simpson> References: <1214485900.4016.13.camel@ddp.simpson> Message-ID: <48639D7D.6080401@geograf.dk> Its fairly easy. These are the steps: 1. Set up OL map (I assume you have this) 2. Read data from GPS 3. call map.setCenter with the GPS data Step 2 varies, depending on the GPS brand. Usually you can tweak the device to put out NMEA compliant data on a COM port. NMEA is human readable, and specs can be found online. Step 3 may cause trouble, because you have to interact with a javascript inside a page. On way is to simply host the page in an application, ie. a .Net form, then the access is there. Another way is to create a webservice / micro webserver that returns the current position. A javascript inside the page can then poll the position (via AJAX), and update the center. You may run into trouble if your map is projected into something thats not Lat/Lon compatible. In that case, take a look at the Proj.4 library, avalible for both javascript and regular programming. Regards, Kenneth Skovhede, GEOGRAF A/S Didrik Pinte skrev: > Hi, > > One of my client asked me if it was possible to control the center of an > openlayer map by an external GPS connected to it's laptop ... > > I have googled a bit about this but found nothing. > > Does anybody have an interesting suggestion ? link ? idea ? > > Thanks > > Didrik > > ------------------------------------------------------------------------ > > _______________________________________________ > 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/20080626/5fdfb0ea/attachment.html From lists at dipole-consulting.com Thu Jun 26 09:55:33 2008 From: lists at dipole-consulting.com (Didrik Pinte) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] link with gps In-Reply-To: <48639D7D.6080401@geograf.dk> References: <1214485900.4016.13.camel@ddp.simpson> <48639D7D.6080401@geograf.dk> Message-ID: <1214488533.4016.24.camel@ddp.simpson> On Thu, 2008-06-26 at 15:45 +0200, Kenneth Skovhede, GEOGRAF A/S wrote: > Its fairly easy. > > These are the steps: > > 1. Set up OL map (I assume you have this) > 2. Read data from GPS > 3. call map.setCenter with the GPS data > > Step 2 varies, depending on the GPS brand. > Usually you can tweak the device to put out NMEA compliant data on a > COM port. > NMEA is human readable, and specs can be found online. > > Step 3 may cause trouble, because you have to interact with a > javascript inside a page. > On way is to simply host the page in an application, ie. a .Net form, > then the access is there. > > Another way is to create a webservice / micro webserver that returns > the current position. > A javascript inside the page can then poll the position (via AJAX), > and update the center. > > You may run into trouble if your map is projected into something thats > not Lat/Lon compatible. > In that case, take a look at the Proj.4 library, avalible for both > javascript and regular programming. > Regards, Kenneth Skovhede, GEOGRAF A/S Hi Kenneth, Thank you for your answer. I have just found some things for the step 2 : - Garmin seem to provide a closed source plugin with an open source javascript library that allows to communicate easily with the gps - another closed source application called gpsgate that can interface with a lot of gps and expose kind of webserver to it's javascript api. Nothing fully opensource for the moment ;-) There is some potential for a new projet. Best regards, 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/20080626/f9f0050b/attachment.bin From woodbri at swoodbridge.com Thu Jun 26 11:07:03 2008 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] link with gps In-Reply-To: <1214488533.4016.24.camel@ddp.simpson> References: <1214485900.4016.13.camel@ddp.simpson> <48639D7D.6080401@geograf.dk> <1214488533.4016.24.camel@ddp.simpson> Message-ID: <4863B097.7030005@swoodbridge.com> Didrik Pinte wrote: > On Thu, 2008-06-26 at 15:45 +0200, Kenneth Skovhede, GEOGRAF A/S wrote: >> Its fairly easy. >> >> These are the steps: >> >> 1. Set up OL map (I assume you have this) >> 2. Read data from GPS >> 3. call map.setCenter with the GPS data >> >> Step 2 varies, depending on the GPS brand. >> Usually you can tweak the device to put out NMEA compliant data on a >> COM port. >> NMEA is human readable, and specs can be found online. >> >> Step 3 may cause trouble, because you have to interact with a >> javascript inside a page. >> On way is to simply host the page in an application, ie. a .Net form, >> then the access is there. >> >> Another way is to create a webservice / micro webserver that returns >> the current position. >> A javascript inside the page can then poll the position (via AJAX), >> and update the center. >> >> You may run into trouble if your map is projected into something thats >> not Lat/Lon compatible. >> In that case, take a look at the Proj.4 library, avalible for both >> javascript and regular programming. >> Regards, Kenneth Skovhede, GEOGRAF A/S > > Hi Kenneth, > > Thank you for your answer. > > I have just found some things for the step 2 : > - Garmin seem to provide a closed source plugin with an open source > javascript library that allows to communicate easily with the gps > - another closed source application called gpsgate that can interface > with a lot of gps and expose kind of webserver to it's javascript api. > > Nothing fully opensource for the moment ;-) There is some potential for > a new projet. http://freshmeat.net/projects/gpsd/ http://www.google.com/search?num=100&hl=en&newwindow=1&q=gpsd+windows Maybe these will help. -Steve W From jax at schildmos.nl Thu Jun 26 10:42:26 2008 From: jax at schildmos.nl (jax@schildmos.nl) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Draw features one by one in IE? In-Reply-To: <20080626120439.GA12019@metacarta.com> Message-ID: <20080626144226.2c8dcc1e@Avee> > It's not every mouse movement -- just when the mouse stops for more than > a tenth of a second. I do it for an application at work and find it > works brilliantly -- in fact, I actually like the behavior better when > there's lots of data than using a hover handler on a selectFeature > control. A selectFeature control will *always* 'do the needful' -- even > if you're just passing by. A hover handler requires *intention*, and I > think that works very well. > > The round trip request time for talking to a server for the equivilant > of a getfeatureinfo request against a table of 7 million rows is > something like 130ms (hooray for PostGIS) and then we can display > information in a little popup. > > I really find it works well. "Don't knock it til you try it." That sounds good! I did indeed knock it a little too early it seems.. I learned this morning that 'every mouse movement' as I put it, is far from correct. Quick question: I have a database (Mysql) I can query about the position of objects. It is not needed to have realtime data, that is: I can cache for 5 minutes or so on the server side. What would be the way to go if I want to use the objects as a WMS layer ? Thanks and regards Jax From matthew.white at accenture.com Thu Jun 26 10:29:30 2008 From: matthew.white at accenture.com (matthew.white@accenture.com) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] link with gps In-Reply-To: <48639D7D.6080401@geograf.dk> References: <1214485900.4016.13.camel@ddp.simpson> <48639D7D.6080401@geograf.dk> Message-ID: <99CA244408AA1A4F845EEFA14156CE9803234BD3@AMRXM2112.dir.svc.accenture.com> One variation to the steps Kenneth provided which you may also want to consider is to use a Java applet to read the NMEA data from the COM port connected to the GPS. You'll need to deal with the applet permissions, so depending on your intended user base this may or may not be an issue. Since applets can integrate with Java Script it makes setting the center point on the map straightforward when new position data is read from the GPS. We've done this on a past project (pre-OL) and it worked out well. Regards, Matt ________________________________ From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Kenneth Skovhede, GEOGRAF A/S Sent: Thursday, June 26, 2008 9:46 AM To: Didrik Pinte Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] link with gps Its fairly easy. These are the steps: 1. Set up OL map (I assume you have this) 2. Read data from GPS 3. call map.setCenter with the GPS data Step 2 varies, depending on the GPS brand. Usually you can tweak the device to put out NMEA compliant data on a COM port. NMEA is human readable, and specs can be found online. Step 3 may cause trouble, because you have to interact with a javascript inside a page. On way is to simply host the page in an application, ie. a .Net form, then the access is there. Another way is to create a webservice / micro webserver that returns the current position. A javascript inside the page can then poll the position (via AJAX), and update the center. You may run into trouble if your map is projected into something thats not Lat/Lon compatible. In that case, take a look at the Proj.4 library, avalible for both javascript and regular programming. Regards, Kenneth Skovhede, GEOGRAF A/S Didrik Pinte skrev: Hi, One of my client asked me if it was possible to control the center of an openlayer map by an external GPS connected to it's laptop ... I have googled a bit about this but found nothing. Does anybody have an interesting suggestion ? link ? idea ? Thanks Didrik ________________________________ _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/25bd2d0f/attachment.html From crschmidt at metacarta.com Thu Jun 26 10:48:05 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] I'm stupid? In-Reply-To: <9771eb540806260620o13925949v7cff7ab605e39134@mail.gmail.com> References: <9771eb540806260620o13925949v7cff7ab605e39134@mail.gmail.com> Message-ID: <20080626144805.GE14947@metacarta.com> On Thu, Jun 26, 2008 at 03:20:45PM +0200, David Martinez Morata wrote: > Hy list, I start With OL " dais ago :S and I don't know javascript :SS!! > But I start to developing some simple application... And at the first time > was easy to start (copy paste the code)... > But now I have some problems with a gml layer, and I have the impression tha > OL it's not more stable (maybe because I don't know javascript)... > It's my 5 or 6 email to the list asking for a the same question. Problem > with GML layer pan, they change the coordinates?!!! > I start to play with projections and now the problem it's bigger. > When I change the base layer... the map changes too!!! You didn't follow the instructions previously given to you in email, of moving the spherical mercator option into the correct place in your GOogle Layer init. Until you do this, you will continue to have problems. > I don't understand anything:S this is the code i write: > > <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Test OpenLayers</title> > <meta http-equiv="content-type" content="text/html; charset=utf-8"/> > > <script type="text/javascript" > src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAu_VBBdBvqz5BLcs7nrzUXBTtRbNeTxVoAy20KSc4Ig34aflRRhQFn5FeqUpODActln3OKR2UQ_14vg'></script> > <script type="text/javascript" > src="http://openlayers.org/api/OpenLayers.js"></script> > <script type="text/javascript"> > > // make map available for easy debugging > var map; > > // avoid pink tiles > OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; > OpenLayers.Util.onImageLoadErrorColor = "transparent"; > > > function init(){ > var options = {numZoomLevels: 20, > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4623")}; > > // Create a map Object > map = new OpenLayers.Map('map', options); > > // Create Google Mercator layers > var gmap = new OpenLayers.Layer.Google("Google > Streets",{type: G_NORMAL_MAP},{"sphericalMercator": true}); > var gsat = new OpenLayers.Layer.Google("Google > Satellite",{type: G_SATELLITE_MAP},{"sphericalMercator": true}); > var ghyb = new OpenLayers.Layer.Google("Google > Hybrid",{type: G_HYBRID_MAP},{"sphericalMercator": true}); > var gphy = new OpenLayers.Layer.Google("Google > Physical",{type: G_PHYSICAL_MAP},{"sphericalMercator": true}); > // Create a WFS Sites Layer > var sites = new OpenLayers.Layer.WFS( "Sites", > "http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map", > {typename: "Sites",maxfeatures: 100 },{ > featureClass: OpenLayers.Feature.WFS}); > > map.addLayer(new OpenLayers.Layer.GML("GML", > "http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml", > {format: OpenLayers.Format.GML, > formatOptions: { > extractStyles: true, > extractAttributes: true} > },{projection: new OpenLayers.Projection("EPSG:4623")} > ) > ); > > map.addLayers([gmap,gsat,ghyb,gphy,sites]); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(new OpenLayers.Control.ScaleLine); > map.addControl(new OpenLayers.Control.MousePosition()); > if (!map.getCenter()) {map.zoomToMaxExtent()} > } > > function changezoom(x,y,z) > { > map.setCenter(new OpenLayers.LonLat(x, y), z); > } > function showAddress(address) { > var geocoder = new GClientGeocoder(); > if (geocoder) { > geocoder.getLatLng( > address, > function(point) { > if (!point) {alert(address + " not found");} > else {map.setCenter(new OpenLayers.LonLat(point.x,point.y),15);}});}} > </script> > > </head> > <body onload="init()"> > <div id="header"> > <h1 id="title">Test OpenLayers</h1> > <form action="#" onsubmit="showAddress(this.address.value, > this.countrycode.value); return false" > > <p>Recherchez un adresse: <input type="text" size="60" > id="address" value="" /> > &nbsp; <input type="submit" > onclick="showAddress(document.getElementById('address').value); return > false;" value="Go!" /> > </p> > > </form> > </div> > <div style="width:100%; height:85%" id="map"></div> > <div id="docs"> > </div> > </body> > </html> > > And I don't know Wat to do... > PLeeeeeeeeeeeeaaaaseeeeee help me! > > Thanks a lot for your patience! > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From lists at dipole-consulting.com Thu Jun 26 11:05:06 2008 From: lists at dipole-consulting.com (Didrik Pinte) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] link with gps In-Reply-To: <99CA244408AA1A4F845EEFA14156CE9803234BD3@AMRXM2112.dir.svc.accenture.com> References: <1214485900.4016.13.camel@ddp.simpson> <48639D7D.6080401@geograf.dk> <99CA244408AA1A4F845EEFA14156CE9803234BD3@AMRXM2112.dir.svc.accenture.com> Message-ID: <1214492706.4016.38.camel@ddp.simpson> On Thu, 2008-06-26 at 09:29 -0500, matthew.white@accenture.com wrote: > One variation to the steps Kenneth provided which you may also want to > consider is to use a Java applet to read the NMEA data from the COM > port connected to the GPS. You?ll need to deal with the applet > permissions, so depending on your intended user base this may or may > not be an issue. Since applets can integrate with Java Script it makes > setting the center point on the map straightforward when new position > data is read from the GPS. We?ve done this on a past project (pre-OL) > and it worked out well. > > > > Regards, > > Matt Hi Matt, This is another good option. Just discussing on the COM port should prevent us from using a specific application between the gps and the browser. I will investigate on that too. 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/20080626/a8f83d5d/attachment.bin From eric.c2c at gmail.com Thu Jun 26 11:10:47 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] I'm stupid? In-Reply-To: <20080626144805.GE14947@metacarta.com> References: <9771eb540806260620o13925949v7cff7ab605e39134@mail.gmail.com> <20080626144805.GE14947@metacarta.com> Message-ID: <5ec103de0806260810j54c813cayf21eb7027f7148ea@mail.gmail.com> On Thu, Jun 26, 2008 at 4:48 PM, Christopher Schmidt <crschmidt@metacarta.com> wrote: > On Thu, Jun 26, 2008 at 03:20:45PM +0200, David Martinez Morata wrote: >> Hy list, I start With OL " dais ago :S and I don't know javascript :SS!! >> But I start to developing some simple application... And at the first time >> was easy to start (copy paste the code)... >> But now I have some problems with a gml layer, and I have the impression tha >> OL it's not more stable (maybe because I don't know javascript)... >> It's my 5 or 6 email to the list asking for a the same question. Problem >> with GML layer pan, they change the coordinates?!!! >> I start to play with projections and now the problem it's bigger. >> When I change the base layer... the map changes too!!! > > You didn't follow the instructions previously given to you in email, > of moving the spherical mercator option into the correct place in your > GOogle Layer init. Until you do this, you will continue to have > problems. The same comment applies to the options passed to the GML object constructor - the 'projection' option must be in the same same object as the 'format' and 'formatOptions' options. Moreover, you certainly want to use EPSG:4326 rather than EPSG:4623! Regards, -- Eric From carole.zieler at gmail.com Thu Jun 26 11:52:23 2008 From: carole.zieler at gmail.com (czieler) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] LayerSwitcher/WFS Layer with Yahoo Hybrid error Message-ID: <18137309.post@talk.nabble.com> I have three base layers on my map, Google, Google Hybrid, and Yahoo Hybrid. I also have a couple of WMS layers, a Vector Layer, and a WFS layer. Switching layers works fine between all of them until I activate my WFS layer. Once I've done this, I can swap between Google and Google Hybrid, but switching to Yahoo Hybrid gives me an error of: Error: position has no properties Source File: {internalurlhere}/lib/OpenLayers/Tile.js Line: 130 Has anyone seen anything similar to this before? -- View this message in context: http://www.nabble.com/LayerSwitcher-WFS-Layer-with-Yahoo-Hybrid-error-tp18137309p18137309.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From andreas.hocevar at gmail.com Thu Jun 26 13:54:23 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <5ec103de0806181359g669f63bevea6bcea691892131@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> <6e9b30fb0806180748n659e5b17w1cc60044be1fed40@mail.gmail.com> <6e9b30fb0806180752w35a1de9cq19443910da1624c4@mail.gmail.com> <5ec103de0806181348h2310bfa7j3fe50c807095a0b@mail.gmail.com> <5ec103de0806181359g669f63bevea6bcea691892131@mail.gmail.com> Message-ID: <5b021dd0806261054g2f902350w7156666c0c5fd9de@mail.gmail.com> Ok, I did some investigation. The reason why this testcase fails is that the two features are far away from each other. So the SVG renderer will find that the coordinates are not in valid range (because too large), and the VML renderer fails for reasons not clear to me. Two separate workarounds are needed, one for IE and one for FF. In IE, we have to modify renderer.drawFeature to only draw features that intersect the map extent. The FF workaround is to just return always true in renderer.inValidRange. Be warned that the FF workaround will likely cause FF2 to crash, but as I hear from Linda, her users do not use FF anyway. Ok, attached is a working version of the test case. The relevant code snippet (to be put in the init function, after instantiation of the vector layer) is: vectorLayer.renderer.inValidRange = function() { return true; }; vectorLayer.renderer.drawFeature = function(feature, style) { if(!feature.geometry.intersects(feature.layer.map.getExtent().toGeometry())) { return; } OpenLayers.Renderer.prototype.drawFeature.apply(this, arguments); }; We might consider to add the second workaround to trunk, because it will reduce the number of features to be rendered. On the other hand, the intersects check is quite expensive. Linda, please let us know if this fix works for you. Regards, Andreas. On Wed, Jun 18, 2008 at 10:59 PM, Eric Lemoine <eric.c2c@gmail.com> wrote: > On Wed, Jun 18, 2008 at 10:48 PM, Eric Lemoine <eric.c2c@gmail.com> wrote: >> Hi, >> >> On FF2 the line disappears on zoom #16. The line disappears in >> drawLineString() (SVG.js) when calling setAttributeNS(). I couldn't >> get any further. > > The problem comes from the fact SVG.inValidRange() returns false. Hope > that can help you debug this Andreas. > > -- > Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/ba7a4c2e/smalltestcase.html From crschmidt at metacarta.com Thu Jun 26 14:05:15 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <5b021dd0806261054g2f902350w7156666c0c5fd9de@mail.gmail.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <5ec103de0806081311l4e1fa116i2d326fe7b9a4baf2@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> <6e9b30fb0806180748n659e5b17w1cc60044be1fed40@mail.gmail.com> <6e9b30fb0806180752w35a1de9cq19443910da1624c4@mail.gmail.com> <5ec103de0806181348h2310bfa7j3fe50c807095a0b@mail.gmail.com> <5ec103de0806181359g669f63bevea6bcea691892131@mail.gmail.com> <5b021dd0806261054g2f902350w7156666c0c5fd9de@mail.gmail.com> Message-ID: <20080626180515.GA17999@metacarta.com> On Thu, Jun 26, 2008 at 07:54:23PM +0200, Andreas Hocevar wrote: > Ok, I did some investigation. > > The reason why this testcase fails is that the two features are far > away from each other. So the SVG renderer will find that the > coordinates are not in valid range (because too large), and the VML > renderer fails for reasons not clear to me. > > Two separate workarounds are needed, one for IE and one for FF. In IE, > we have to modify renderer.drawFeature to only draw features that > intersect the map extent. The FF workaround is to just return always > true in renderer.inValidRange. Be warned that the FF workaround will > likely cause FF2 to crash, but as I hear from Linda, her users do not > use FF anyway. > > Ok, attached is a working version of the test case. The relevant code > snippet (to be put in the init function, after instantiation of the > vector layer) is: > > vectorLayer.renderer.inValidRange = function() { > return true; > }; > vectorLayer.renderer.drawFeature = function(feature, style) { > if(!feature.geometry.intersects(feature.layer.map.getExtent().toGeometry())) > { > return; > } > OpenLayers.Renderer.prototype.drawFeature.apply(this, arguments); > }; > > > We might consider to add the second workaround to trunk, because it > will reduce the number of features to be rendered. On the other hand, > the intersects check is quite expensive. If we were going to do this, I'd say we should instead use geometry.getBounds() and map.getBounds() and check intersectsBounds() on them, rather than using the (more expensive) geometry.intersects(), since mostly what we care about here is bbox intersection. Regards, -- Christopher Schmidt MetaCarta From iansgis at gmail.com Thu Jun 26 14:20:37 2008 From: iansgis at gmail.com (Ian) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Map controls properties Message-ID: <5b61c6c50806261120y4bc6c85eoda0348bc0f649351@mail.gmail.com> I'm working off of http://openlayers.org/dev/examples/custom-control.htmland I'd like to send the bbox result to a WMS query for multiple feature selection. I'm using a radio list to let the user switch between zoom and multiple feature query drag box behavior, which activates/deactivates the custom control: var query = new OpenLayers.Control(); OpenLayers.Util.extend(query, { draw: function () { // this Handler.Box will intercept the shift-mousedown // before Control.MouseDefault gets to see it this.box = new OpenLayers.Handler.Box(query, {"done": this.notice}, {keyMask: OpenLayers.Handler.MOD_SHIFT}); this.box.activate(); }, notice: function (bounds) { var ll = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom)); var ur = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top)); alert(ll.lon.toFixed(4) + ", " + ll.lat.toFixed(4) + ", " + ur.lon.toFixed(4) + ", " + ur.lat.toFixed(4)); } }); function toggleControl (control) { if (control.value == 'query') { map.controls. ? .activate(); } else { map.controls. ? .deactivate(); } } I looked in the source but didn't see any property such as 'name','value',etc that I could reference in the toggleControl function. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/3e266925/attachment.html From andreas.hocevar at gmail.com Thu Jun 26 14:25:27 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated) In-Reply-To: <20080626180515.GA17999@metacarta.com> References: <6e9b30fb0806041024v751625fepae7841aa6a623b60@mail.gmail.com> <6e9b30fb0806081407u3abc66cbia9db175c7380917e@mail.gmail.com> <6e9b30fb0806152113t48a63ffehaf04f4f6babac22c@mail.gmail.com> <5b021dd0806180047p4e8d3042k6c8fcdc606e28a36@mail.gmail.com> <6e9b30fb0806180748n659e5b17w1cc60044be1fed40@mail.gmail.com> <6e9b30fb0806180752w35a1de9cq19443910da1624c4@mail.gmail.com> <5ec103de0806181348h2310bfa7j3fe50c807095a0b@mail.gmail.com> <5ec103de0806181359g669f63bevea6bcea691892131@mail.gmail.com> <5b021dd0806261054g2f902350w7156666c0c5fd9de@mail.gmail.com> <20080626180515.GA17999@metacarta.com> Message-ID: <5b021dd0806261125s34fc4c82u60e97f8de5704b08@mail.gmail.com> On Thu, Jun 26, 2008 at 8:05 PM, Christopher Schmidt <crschmidt@metacarta.com> wrote: > On Thu, Jun 26, 2008 at 07:54:23PM +0200, Andreas Hocevar wrote: >> We might consider to add the second workaround to trunk, because it >> will reduce the number of features to be rendered. On the other hand, >> the intersects check is quite expensive. > > If we were going to do this, I'd say we should instead use > geometry.getBounds() and map.getBounds() and check intersectsBounds() on > them, rather than using the (more expensive) geometry.intersects(), > since mostly what we care about here is bbox intersection. Absolutely right. So the less expensive second workaround would look like this: vectorLayer.renderer.drawFeature = function(feature, style) { if(feature.geometry.getBounds().intersectsBounds( feature.layer.map.getExtent())) { OpenLayers.Renderer.prototype.drawFeature.apply(this, arguments); } }; Chris, should I create a ticket? We might want to do some profiling before moving this to trunk though. Regards, Andreas. From pagameba at gmail.com Thu Jun 26 15:34:00 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Map controls properties In-Reply-To: <5b61c6c50806261120y4bc6c85eoda0348bc0f649351@mail.gmail.com> References: <5b61c6c50806261120y4bc6c85eoda0348bc0f649351@mail.gmail.com> Message-ID: <AC80598C-B50C-4288-A6CB-16B041E9EE15@gmail.com> can you not just make 'query' a global variable and reference directly? var query; window.onload = function() { query = ... } function toggleQuery() { if (this.value == 'query') { query.activate(); } else { query.deactivate(); } } On 26-Jun-08, at 2:20 PM, Ian wrote: > I'm working off of http://openlayers.org/dev/examples/custom-control.html > and I'd like to send the bbox result to a WMS query for multiple > feature selection. I'm using a radio list to let the user switch > between zoom and multiple feature query drag box behavior, which > activates/deactivates the custom control: > > var query = new OpenLayers.Control(); > OpenLayers.Util.extend(query, { > draw: function () { > // this Handler.Box will intercept the shift- > mousedown > // before Control.MouseDefault gets to see it > this.box = new OpenLayers.Handler.Box(query, > {"done": this.notice}, > {keyMask: OpenLayers.Handler.MOD_SHIFT}); > this.box.activate(); > }, > > notice: function (bounds) { > var ll = map.getLonLatFromPixel(new > OpenLayers.Pixel(bounds.left, bounds.bottom)); > var ur = map.getLonLatFromPixel(new > OpenLayers.Pixel(bounds.right, bounds.top)); > alert(ll.lon.toFixed(4) + ", " + > ll.lat.toFixed(4) + ", " + > ur.lon.toFixed(4) + ", " + > ur.lat.toFixed(4)); > } > }); > > function toggleControl (control) { > if (control.value == 'query') { > map.controls. ? .activate(); > } else { > map.controls. ? .deactivate(); > } > } > > I looked in the source but didn't see any property such as > 'name','value',etc that I could reference in the toggleControl > function. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From matthew.pettis at gmail.com Thu Jun 26 17:54:49 2008 From: matthew.pettis at gmail.com (Matthew Pettis) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Using Yahoo Layer with Mapserver Layer Message-ID: <82ba77b80806261454y494a9e42pa4b17e48bcbb3db7@mail.gmail.com> Hi, I'm trying to add a Yahoo baselayer to my map so that I may toggle between layers. My code is below. The mapserver layer renders correctly (state of Minnesota in gray), but when I try to toggle to the Yahoo layer, I get something that has a scale and Yahoo info at the bottom of the image, but the whole rest of the image is just gray. Can someone help me figure out how to make these things integrate? The webpage code is below. Thanks, Matt ================================================ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OpenLayers Example</title> <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></script> --> <script src="http://localhost/_common//OpenLayers-2.6/OpenLayers.js "></script> <script src=" http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script> <script type="text/javascript"> var map = null; function init(){ map = new OpenLayers.Map( 'map', { maxResolution: 'auto' , maxExtent: new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75) , units: 'm' , projection: "EPGS:26915" } ); var ol_ms = new OpenLayers.Layer.MapServer( "Mapserver Untiled" , " http://localhost/cgi-bin/mapserv.exe?map=C:\\ms4w\\Apache\\htdocs\\ol\\map.map " , {layers: 'state'} , {singleTile: true} ); map.addLayer(ol_ms); var yahoo = new OpenLayers.Layer.Yahoo( "Yahoo" ); map.addLayer(yahoo); map.zoomToMaxExtent(); map.addControl(new OpenLayers.Control.LayerSwitcher()); } </script> </head> <body onload="init()"> <div id="map" class="smallmap" style="width:400;height:300"></div> </body> </html> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/81c46d3d/attachment.html From iansgis at gmail.com Thu Jun 26 19:00:03 2008 From: iansgis at gmail.com (Ian) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Map controls properties In-Reply-To: <AC80598C-B50C-4288-A6CB-16B041E9EE15@gmail.com> References: <5b61c6c50806261120y4bc6c85eoda0348bc0f649351@mail.gmail.com> <AC80598C-B50C-4288-A6CB-16B041E9EE15@gmail.com> Message-ID: <5b61c6c50806261600ude44e49j2d4422ea78bb8786@mail.gmail.com> Thank you! Using a global variable plus changing this.box to this.handler (per http://www.nabble.com/get-feature-info-select-box-to14263698.html#a14263698) got this working. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/96bf5957/attachment.html From matthew.pettis at gmail.com Fri Jun 27 01:16:37 2008 From: matthew.pettis at gmail.com (Matthew Pettis) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 In-Reply-To: <82ba77b80806262210l7bb327a6x41effd3eb507bd7b@mail.gmail.com> References: <82ba77b80806262210l7bb327a6x41effd3eb507bd7b@mail.gmail.com> Message-ID: <82ba77b80806262216l4cce6820r5b511f226eebf06e@mail.gmail.com> Hi List, I'm trying to put 2 baselayers in my OpenLayers web object. One layer is my political map of Minnesota, which has data in epsg:26915. The other object I want to use is a Google Maps street view layer. What I am having trouble doing is making them agree on the projection and having Google Maps use that projection to render it's layer. I thought the code below (at end of email) should work, but I am obviously missing something. If I use the ol_ms layer with the map object without the gmap layer, it renders fine. If I use the gmap layer by itself, and define map like: map = new OpenLayers.Map('map'); that is, same as the first one but with no configuration information, that too works fine. However, putting them as base layers on the same map as laid out below doesn't work. When I switch to the google map, I get some gray rectangle and the standard google branding stuff at the bottom, but no real map. I would like it so the same bounds that were being used for the mapserver map were used. I suspect it is a projection thing that I am not understanding that is in the way. I note that the Bounds object I use for the mapserver map has bounds like: new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75) which is obviously in meters. But when I dump out the bounds for the working google map by itself, the 4 numbers are in latlon (-180,-90,180,90). I suspect it is trying to read the epsg:26915 bounds, which are in meters, as latlon bounds, and making the display with the map as some orders of magnitude large scale map that has the entire world mapped to a pixel on my screen. Question: how do I make Google realize that the map is in epsg:26915 and give me its map in commensurate units? I thought that by defining the projection of the map with epsg:26915, that when I added the google layer to the map that it would know to project itself correctly. Do I have to somehow manually coerce these things, and if so, how? Thanks for your time and help, Matt ======================================================================== <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OpenLayers Example</title> <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></script> --> <script src="http://localhost/_common//OpenLayers-2.6/OpenLayers.js "></script> <script src=" http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw<http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw> " type="text/javascript"></script> <script type="text/javascript"> var map = null; function init(){ map = new OpenLayers.Map( 'map', { maxResolution: 'auto' , maxExtent: new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75) , units: 'm' , projection: "EPSG:26915" } ); var ol_ms = new OpenLayers.Layer.MapServer( "Mapserver Untiled" , " http://localhost/cgi-bin/mapserv.exe?map=C:\\ms4w\\Apache\\htdocs\\ol\\map.map<http://localhost/cgi-bin/mapserv.exe?map=C:%5C%5Cms4w%5C%5CApache%5C%5Chtdocs%5C%5Col%5C%5Cmap.map> " , {layers: 'state'} , {singleTile: true} ); map.addLayer(ol_ms); var gmap = new OpenLayers.Layer.Google("Google Streets"); map.addLayer(gmap); map.zoomToMaxExtent(); map.addControl(new OpenLayers.Control.LayerSwitcher()); } </script> </head> <body onload="init()"> <div id="map" class="smallmap" style="width:400;height:300"></div> </body> </html> ======================================================================== -- It is from the wellspring of our despair and the places that we are broken that we come to repair the world. -- Murray Waas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080627/e9dd685c/attachment.html From pagameba at gmail.com Fri Jun 27 08:43:31 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 In-Reply-To: <82ba77b80806262216l4cce6820r5b511f226eebf06e@mail.gmail.com> References: <82ba77b80806262210l7bb327a6x41effd3eb507bd7b@mail.gmail.com> <82ba77b80806262216l4cce6820r5b511f226eebf06e@mail.gmail.com> Message-ID: <F951D241-DC7F-4D1B-9222-0DB87D3A9ECC@gmail.com> You can't change the projection of the Google layer - it comes in one projection, spherical mercator. If you want to overlay your data on the Google base data, you have to serve it up in a spherical mercator projection. There is an ad-hoc EPSG code for this, EPSG:900913 and you can find the actual projection parameters at: http://spatialreference.org/ref/user/google-mapsmicrosoft-live/ I believe that there is now a real EPSG code for this projection in the latest EPSG release but I am not sure how widely supported it is yet. I would suggest starting with the spherical mercator examples. Cheers Paul On 27-Jun-08, at 1:16 AM, Matthew Pettis wrote: > Hi List, > > I'm trying to put 2 baselayers in my OpenLayers web object. One > layer is my political map of Minnesota, which has data in epsg: > 26915. The other object I want to use is a Google Maps street view > layer. What I am having trouble doing is making them agree on the > projection and having Google Maps use that projection to render it's > layer. I thought the code below (at end of email) should work, but > I am obviously missing something. > > If I use the ol_ms layer with the map object without the gmap layer, > it renders fine. If I use the gmap layer by itself, and define map > like: > > map = new OpenLayers.Map('map'); > > that is, same as the first one but with no configuration > information, that too works fine. > > However, putting them as base layers on the same map as laid out > below doesn't work. When I switch to the google map, I get some > gray rectangle and the standard google branding stuff at the bottom, > but no real map. I would like it so the same bounds that were being > used for the mapserver map were used. > > I suspect it is a projection thing that I am not understanding that > is in the way. I note that the Bounds object I use for the > mapserver map has bounds like: > > new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75) > > which is obviously in meters. But when I dump out the bounds for > the working google map by itself, the 4 numbers are in latlon > (-180,-90,180,90). I suspect it is trying to read the epsg:26915 > bounds, which are in meters, as latlon bounds, and making the > display with the map as some orders of magnitude large scale map > that has the entire world mapped to a pixel on my screen. > > Question: how do I make Google realize that the map is in epsg:26915 > and give me its map in commensurate units? I thought that by > defining the projection of the map with epsg:26915, that when I > added the google layer to the map that it would know to project > itself correctly. Do I have to somehow manually coerce these > things, and if so, how? > > Thanks for your time and help, > Matt > > > = > = > ====================================================================== > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>OpenLayers Example</title> > <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></ > script> --> > <script src="http://localhost/_common//OpenLayers-2.6/OpenLayers.js > "></script> > <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw > " > type="text/javascript"></script> > <script type="text/javascript"> > var map = null; > function init(){ > > map = new OpenLayers.Map( > 'map', > { > maxResolution: 'auto' > , maxExtent: new > OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75) > , units: 'm' > , projection: "EPSG:26915" > } > ); > > var ol_ms = new OpenLayers.Layer.MapServer( > "Mapserver Untiled" > , "http://localhost/cgi-bin/mapserv.exe?map=C:\\ms4w\ > \Apache\\htdocs\\ol\\map.map" > , {layers: 'state'} > , {singleTile: true} > ); > map.addLayer(ol_ms); > > var gmap = new OpenLayers.Layer.Google("Google Streets"); > map.addLayer(gmap); > > map.zoomToMaxExtent(); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > } > </script> > </head> > > <body onload="init()"> > <div id="map" class="smallmap" style="width:400;height:300"></div> > </body> > > </html> > = > = > ====================================================================== > > -- > It is from the wellspring of our despair and the places that we are > broken that we come to repair the world. > -- Murray Waas _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Fri Jun 27 09:17:53 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 In-Reply-To: <F951D241-DC7F-4D1B-9222-0DB87D3A9ECC@gmail.com> References: <82ba77b80806262210l7bb327a6x41effd3eb507bd7b@mail.gmail.com> <82ba77b80806262216l4cce6820r5b511f226eebf06e@mail.gmail.com> <F951D241-DC7F-4D1B-9222-0DB87D3A9ECC@gmail.com> Message-ID: <20080627131753.GA4214@metacarta.com> On Fri, Jun 27, 2008 at 08:43:31AM -0400, Paul Spencer wrote: > You can't change the projection of the Google layer - it comes in one > projection, spherical mercator. If you want to overlay your data on > the Google base data, you have to serve it up in a spherical mercator > projection. There is an ad-hoc EPSG code for this, EPSG:900913 and > you can find the actual projection parameters at: > > http://spatialreference.org/ref/user/google-mapsmicrosoft-live/ Actually, http://spatialreference.org/ref/user/google-projection/ > I believe that there is now a real EPSG code for this projection in > the latest EPSG release but I am not sure how widely supported it is > yet. It's not, in OpenLayers. Regards, -- Christopher Schmidt MetaCarta From carl.r.morgan at noaa.gov Fri Jun 27 14:28:59 2008 From: carl.r.morgan at noaa.gov (Carl Morgan) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] TextLayer with Framecloud popup In-Reply-To: <20080625215437.GA21946@metacarta.com> References: <18121640.post@talk.nabble.com> <20080625210555.GA20945@metacarta.com> <18122118.post@talk.nabble.com> <20080625215437.GA21946@metacarta.com> Message-ID: <4865316B.9020704@noaa.gov> I'm attempting to get my points to plot based on the example Christopher referenced (http://openlayers.org/dev/examples/sundials.html). Although it appears to plot ok initially, if I pan up and down on the map, the points will move up or down as well. Is this a problem in the javascript or could the problem be in the kml file? I've included the code below hoping someone might see the problem, and here's a link to the page: http://www.erh.noaa.gov/ilm/viewer/plotLSR.html?lat=34.20&lon=-78.8&zoom=8&kmlfile=lsr080626.kml <http://www.erh.noaa.gov/ilm/viewer/plotLSR.html?lat=34.20&lon=-78.8&zoom=8&kmlfile=lsr080626.kml> Thanks, Carl function init(){ map = new OpenLayers.Map('map'); var gmap = new OpenLayers.Layer.Google( "Google Streets" // the default ); // var ghyb = new OpenLayers.Layer.Google( // "Google Hydrid", // {type: G_HYBRID_MAP} // ); map.addLayer(gmap); map.addLayer(new OpenLayers.Layer.GML("Reports", "archive/LSR/KML/lsr080626.kml", { format: OpenLayers.Format.KML, formatOptions: { extractStyles: true, extractAttributes: true } })); selectControl = new OpenLayers.Control.SelectFeature(map.layers[1], {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect}); map.addControl(selectControl); selectControl.activate(); } function onPopupClose(evt) { selectControl.unselect(selectedFeature); } function onFeatureSelect(feature) { selectedFeature = feature; popup = new OpenLayers.Popup.FramedCloud("chicken", feature.geometry.getBounds().getCenterLonLat(), new OpenLayers.Size(100,100), "<h2>"+feature.attributes.name + "</h2>" + feature.attributes.description, null, true, onPopupClose); feature.popup = popup; map.addPopup(popup); } function onFeatureUnselect(feature) { map.removePopup(feature.popup); feature.popup.destroy(); feature.popup = null; } Christopher Schmidt wrote: > On Wed, Jun 25, 2008 at 02:28:20PM -0700, Andrew de klerk wrote: > >> Ok, please forgive my late night googling skills (tired eyes!), and thanks >> for the prompt response. If i look at that link you have said: >> >> "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.' >> >> The reason why I am using Layer.text is because I specifically don't want my >> end users to have to select a tool to click on a feature/marker. >> > > They shouldn't need to. > > var control = new OpenLayers.Control.SelectFeature(layer); > map.addControl(control); > control.activate(); > > Now the select control is active, and clicks on the features will > activate a popup. > > See, for example: http://openlayers.org/dev/examples/sundials.html > > Regards, > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080627/be300d34/attachment.html From madair at dmsolutions.ca Fri Jun 27 14:39:58 2008 From: madair at dmsolutions.ca (Mike Adair) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Proj4js and IE In-Reply-To: <18025067.post@talk.nabble.com> References: <18025067.post@talk.nabble.com> Message-ID: <486533FE.1080308@dmsolutions.ca> I'm not aware of any problems using Proj4js in IE and it's difficult to say what else may be wrong without looking at a web site or more code. Make sure that the definition for EPSG:27582 is loaded. Mike Damien L?cole wrote: > Hi list, > > I have a map in EPSG:4326. I would like the coordinates displayed by my > Control.MousePosition in EPSG:27582. So I am using Proj4js and I have > written the following code : > > > var pop = new OpenLayers.Projection('EPSG:4326'); > var dpop = new OpenLayers.Projection('EPSG:27582'); > var extent = new OpenLayers.Bounds(-5,40,8,52 ); > var options = {theme: null, maxResolution:'auto', maxExtent: extent, > numZoomLevels:12, controls:[], projection: pop, displayProjection: dpop, > units:"m"}; > map = new OpenLayers.Map('map',options); > > This works fine with Firefox but not with Internet Explorer : coordinates > are still in EPSG:4326. Am I missing something? Thanks. > > Regards, > Damien L?cole > From wendell at enflight.com Fri Jun 27 15:04:47 2008 From: wendell at enflight.com (Wendell Turner) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] can openlayers mix projections? Message-ID: <20080627190447.GA18616@q.rho.net> I'm using geoserver+openlayers but ran into a problem about projections. I would like to use nexrad radar data as an overlay. This works fine when the OpenLayers.Map is projection: "EPSG:4326" However, the map, when converted to that format (with gdalwarp) looks somewhat fuzzy, and the circles on the map are not circular. When I convert them to EPSG:3395 (WGS84 World Mercator) and use that in the OpenLayers.Map, the map looks much sharper, and the circles now look circular. However, I can't change the base layer to anything else (e.g., NASA Global Mosaic), and the nexrad data (from http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi) doesn't load either. Can OpenLayers do this? That is, have a base map that is 3395 and still use nexrad overlays? Is there somewhere else that supplies nexrad radar data in different projections? Thanks, Wendell From matthew.pettis at gmail.com Fri Jun 27 19:23:35 2008 From: matthew.pettis at gmail.com (Matthew Pettis) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 Message-ID: <82ba77b80806271623vae2918aj77ccc49de5593a8d@mail.gmail.com> Hi All, I added the projection from http://spatialreference.org/ref/user/google-projection/mapfile/ into my mapfile. I then used the file below. The weird thing is that I am getting a google maps projection, but instead of for Minnesota (which is where my ol_ms layer gets me, I get some region of Europe between Barcelona, Sp and Marseilles, Fr. Any further suggestions? Thanks, Matt ========================================================================= <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OpenLayers Example</title> <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></script> --> <script src="http://localhost/_common//OpenLayers-2.6/OpenLayers.js "></script> <script src=" http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw " type="text/javascript"></script> <script type="text/javascript"> var map = null; function init(){ map = new OpenLayers.Map( 'map', { maxResolution: 'auto' , maxExtent: new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75) } ); var ol_ms = new OpenLayers.Layer.MapServer( "Mapserver Untiled" , " http://localhost/cgi-bin/mapserv.exe?map=C:\\ms4w\\Apache\\htdocs\\ol\\map.map " , {layers: 'state'} , {singleTile: true} ); map.addLayer(ol_ms); var gmap = new OpenLayers.Layer.Google( "Google Streets" , {sphericalMercator: true} ); map.addLayer(gmap); map.zoomToMaxExtent(); map.addControl(new OpenLayers.Control.LayerSwitcher()); } </script> </head> <body onload="init()"> <div id="map" class="smallmap" style="width:400;height:300"></div> </body> </html> ========================================================================= -- It is from the wellspring of our despair and the places that we are broken that we come to repair the world. -- Murray Waas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080627/b2ed2091/attachment.html From michael.langford at rowdylabs.com Fri Jun 27 20:01:22 2008 From: michael.langford at rowdylabs.com (Michael Langford) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Anyone up for some contract work? Message-ID: <11fb08580806271701g436a7f10ib27709adb20776c3@mail.gmail.com> I have a customer who'd be interested in finding a skilled open layers developer for a nautical mapping project he has. Contact me for details. --Michael -- Michael Langford Phone: 404-386-0495 Web: http://www.RowdyLabs.com From reena at indiamail.com Sat Jun 28 07:14:32 2008 From: reena at indiamail.com (Reena Singh) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] include quesry in data source in map file Message-ID: <20080628111432.17E2711581F@ws1-7.us4.outblaze.com> I want to use query in the map file like ........ DATA "the_geom FROM my_table WHERE name like 'abc' " but this is not working accr to the format. Can ne1 hlp? -- Be Yourself @ mail.com! Choose From 200+ Email Addresses Get a Free Account at www.mail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080628/135f6a01/attachment.html From pagameba at gmail.com Sat Jun 28 10:24:53 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] include quesry in data source in map file In-Reply-To: <20080628111432.17E2711581F@ws1-7.us4.outblaze.com> References: <20080628111432.17E2711581F@ws1-7.us4.outblaze.com> Message-ID: <8ABD08D1-1FA8-49DE-9B9F-BAE2E9B484A5@gmail.com> this is definitely the wrong list for this question, you should be asking on mapserver-users or even the postgis list. In any case, the correct way to specify a sub-select for postgis is: DATA "the_geom from (select * from my_table WHERE name like 'abc') as foo using unique gid using srid=-1" Things to note: your sub-select must return the_geom, gid and any other attributes that you are using elsewhere (for labelitem, classitem, etc). gid might be called something else, it just needs to be a unique value such as the primary key of your table. Cheers Paul On 28-Jun-08, at 7:14 AM, Reena Singh wrote: > I want to use query in the map file like ........ > > DATA "the_geom FROM my_table WHERE name like 'abc' " > > but this is not working accr to the format. > > Can ne1 hlp? > > -- > Be Yourself @ mail.com! > Choose From 200+ Email Addresses > Get a Free Account at www.mail.com! > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From mynature at gmail.com Sat Jun 28 10:39:19 2008 From: mynature at gmail.com (Adorian Ardelean) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoJSON layer on top of google Message-ID: <a25fb840806280739m40621355je20231bdb81ea4b5@mail.gmail.com> Hi, I am trying to load a GeoJSON file in a layer on top of a google map (OpenLayers 2.6). I used for now: var colfeatures = new OpenLayers.Layer.GML("specimens", "geojson.php", {format: OpenLayers.Format.GeoJSON}); map.addLayer(colfeatures); Entities show up on the map somewhere close to 0,0. For other vector entities (coordinates) I push through code this is solved with var g = new OpenLayers.Projection("EPSG:4326"); var p = new OpenLayers.Projection("EPSG:900913"); and .tranform(g,p) but I do not know how to apply this directly on features read from GeoJSON. Is there a way to loop through all entities in colfeatures and apply transform(g.p) or can somebody suggest me a better approach? All the best, Adorian http://mybiosis.info -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080628/2d857948/attachment.html From pagameba at gmail.com Sat Jun 28 10:46:27 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 In-Reply-To: <82ba77b80806271623vae2918aj77ccc49de5593a8d@mail.gmail.com> References: <82ba77b80806271623vae2918aj77ccc49de5593a8d@mail.gmail.com> Message-ID: <B1CAA031-7D03-4AD4-81BE-A3F718F599E8@gmail.com> Take a look at the spherical_mercator.html example in the OpenLayers examples. I'm not sure, but I think you should be adding a projection and units to your map options map = new OpenLayers.Map( 'map', { maxResolution: 'auto', maxExtent: new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75), projection: new OpenLayers.Projection("EPSG:900913"), units: "m" } ); Note that your mapserver WMS will then need to be set up to serve EPSG: 900913 correctly too, see the mapserver WMS Server how to for metadata relating to this. The other thing you should confirm is that your maxExtent is defined in spherical mercator units and not in the UTM coordinates of your data (assuming this is the same example as your postgis question on the mapserver list) - it looks okay to me but it is very hard to tell :) Cheers Paul On 27-Jun-08, at 7:23 PM, Matthew Pettis wrote: > Hi All, > > I added the projection from http://spatialreference.org/ref/user/google-projection/mapfile/ > into my mapfile. I then used the file below. The weird thing is > that I am getting a google maps projection, but instead of for > Minnesota (which is where my ol_ms layer gets me, I get some region > of Europe between Barcelona, Sp and Marseilles, Fr. Any further > suggestions? > > Thanks, > Matt > > = > = > = > ====================================================================== > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>OpenLayers Example</title> > <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></ > script> --> > <script src="http://localhost/_common//OpenLayers-2.6/OpenLayers.js > "></script> > <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw > " > type="text/javascript"></script> > <script type="text/javascript"> > var map = null; > function init(){ > > map = new OpenLayers.Map( > 'map', > { > maxResolution: 'auto' > , maxExtent: new > OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75) > } > ); > > var ol_ms = new OpenLayers.Layer.MapServer( > "Mapserver Untiled" > , "http://localhost/cgi-bin/mapserv.exe?map=C:\\ms4w\ > \Apache\\htdocs\\ol\\map.map" > , {layers: 'state'} > , {singleTile: true} > ); > map.addLayer(ol_ms); > > var gmap = new OpenLayers.Layer.Google( > "Google Streets" > , {sphericalMercator: true} > ); > map.addLayer(gmap); > > map.zoomToMaxExtent(); > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > } > </script> > </head> > > <body onload="init()"> > <div id="map" class="smallmap" style="width:400;height:300"></div> > </body> > > </html> > = > = > = > ====================================================================== > > -- > It is from the wellspring of our despair and the places that we are > broken that we come to repair the world. > -- Murray Waas _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Sat Jun 28 11:32:42 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoJSON layer on top of google In-Reply-To: <a25fb840806280739m40621355je20231bdb81ea4b5@mail.gmail.com> References: <a25fb840806280739m40621355je20231bdb81ea4b5@mail.gmail.com> Message-ID: <20080628153242.GB30916@metacarta.com> On Sat, Jun 28, 2008 at 04:39:19PM +0200, Adorian Ardelean wrote: > Hi, > > I am trying to load a GeoJSON file in a layer on top of a google map > (OpenLayers 2.6). > > I used for now: > var colfeatures = new OpenLayers.Layer.GML("specimens", "geojson.php", > {format: OpenLayers.Format.GeoJSON}); > map.addLayer(colfeatures); > > Entities show up on the map somewhere close to 0,0. For other vector > entities (coordinates) I push through code this is solved with > > var g = new OpenLayers.Projection("EPSG:4326"); > var p = new OpenLayers.Projection("EPSG:900913"); > > and .tranform(g,p) > > but I do not know how to apply this directly on features read from GeoJSON. > Is there a way to loop through all entities in colfeatures and apply > transform(g.p) or can somebody suggest me a better approach? {format: OpenLayers.Format.GeoJSON} -> { format: OpenLayers.Format.GeoJSON, projection: new OpenLayers.Projection("EPSG:4326") } Regards, -- Christopher Schmidt MetaCarta From matthew.pettis at gmail.com Sat Jun 28 14:04:20 2008 From: matthew.pettis at gmail.com (Matthew Pettis) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 Message-ID: <82ba77b80806281104m594516f5j1dfe86e02065601e@mail.gmail.com> Thanks Paul for your response ( http://openlayers.org/pipermail/users/2008-June/006474.html). Truth is, my bounds are not in spherical mercator (they are in epsg:26915), so i will need to convert them. If you, in addition, happen to know some examples of casting bounds from one projection to another, I'd appreciate that as well. Thanks again, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080628/50c90319/attachment.html From rdmailings at duif.net Sat Jun 28 16:02:18 2008 From: rdmailings at duif.net (Richard Duivenvoorde) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 In-Reply-To: <82ba77b80806281104m594516f5j1dfe86e02065601e@mail.gmail.com> References: <82ba77b80806281104m594516f5j1dfe86e02065601e@mail.gmail.com> Message-ID: <486698CA.2050709@duif.net> Hi Matthew, I don't know the OS your running, but there is the commandline util cs2cs in the 'proj'-package. If you install proj in any debian(-derivative) or ms4w/fwtools on windows, you can do for example the following to 'cast' one x,y to another: C:\ms4w>cs2cs +init=epsg:4326 +to +init=epsg:28992 this will wait for a line of input of two points. So if you follow with: 5.172167 52.245417 it will give: 140313.91 473062.48 -43.21 you can also feed it a list/file with x,y-pairs, or do some formatting: cs2cs +init=epsg:900913 +to +init=epsg:4326 -f "%.2f" 500738 6859019 4.50 52.32 0.00 Another option is to use the spatial functions of a postgres/postgis db if you have that laying around, eg. tranform from a 4326 point to a 28992 point: SELECT AsText(Transform(GeomFromText('POINT(5.172167 52.245417)', 4326), 28992)) or the other way around SELECT AsText(Transform(GeomFromText('POINT(140313.905612639 473062.480785896)', 28992), 4326)) HTH, Regards, Richard Duivenvoorde ps, both options above will only work when you have the right epsg codes in your proj/postgis configuration Matthew Pettis wrote: > Thanks Paul for your response > (http://openlayers.org/pipermail/users/2008-June/006474.html). > > Truth is, my bounds are not in spherical mercator (they are in > epsg:26915), so i will need to convert them. If you, in addition, > happen to know some examples of casting bounds from one projection to > another, I'd appreciate that as well. > > Thanks again, > Matt > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From matthew.pettis at gmail.com Sat Jun 28 17:20:13 2008 From: matthew.pettis at gmail.com (Matthew Pettis) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers.Projection and proj4js.js Message-ID: <82ba77b80806281420v2e3a650dl754991af2442ea8d@mail.gmail.com> Hi, I'm trying to cast a point in one projection into another, and I think I have some issues with OpenLayers.Projection. Below is html/javascript code I'm using and the rendered browser ouput. In this example, I'm trying to cast the point (184056.505, 4809728.250) in epsg:26915 to epgs:4326. My expectation is that point p, which is this point in epsg:26915, should display as something on the order of (-100,43), or something close to that range. However, as the output shows, the point is not changed. Can someone explain why? Thanks, matt P.S. - Is there an error in the documentation for the constructor of OpenLayers.Projection (at: http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Projection-js.html#OpenLayers.Projection.OpenLayers.Projection)? It says that the constructor takes an object to set parameters, but every example I see of the constructor is passing a string in the way I am setting it here. Am I not understanding the documentation conventions correctly, or is this not correctly or completely documented? === html/javascript code === <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OpenLayers Example</title> <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></script> --> <script src="http://localhost/_common//OpenLayers-2.6/OpenLayers.js "></script> </head> <body> <pre> <script type="text/javascript"> var p = new OpenLayers.Geometry.Point(184056.505, 4809728.250); var proj_src = new OpenLayers.Projection("EPSG:26915"); var proj_tgt = new OpenLayers.Projection("EPSG:4326"); document.writeln(); document.writeln("Point p [before OpenLayers.Projection.transform] is: " + p); OpenLayers.Projection.transform(p,proj_src,proj_tgt); document.writeln("Point p [after OpenLayers.Projection.transform] is: " + p); document.writeln("proj_src is: " + proj_src); document.writeln(); document.writeln("prj_src walk of properties is:"); document.writeln("------------------------------"); for (prop in proj_src) { document.writeln(prop + " => " + proj_src[prop]); }; document.writeln("------------------------------"); </script> </pre> </body> </html> ======================================================================== === browser rendered output === Point p [before OpenLayers.Projection.transform] is: POINT(184056.505 4809728.25) Point p [after OpenLayers.Projection.transform] is: POINT(184056.505 4809728.25) proj_src is: EPSG:26915 prj_src walk of properties is: ------------------------------ projCode => EPSG:26915 proj => null initialize => function (projCode, options) { OpenLayers.Util.extend(this, options); this.projCode = projCode; if (window.Proj4js) { this.proj = new Proj4js.Proj(projCode); } } getCode => function () { return this.proj ? this.proj.srsCode : this.projCode; } getUnits => function () { return this.proj ? this.proj.units : null; } toString => function () { return this.getCode(); } equals => function (projection) { if (projection && projection.getCode) { return this.getCode() == projection.getCode(); } else { return false; } } destroy => function () { delete this.proj; delete this.projCode; } CLASS_NAME => OpenLayers.Projection ------------------------------ ======================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080628/351ffd54/attachment.html From pagameba at gmail.com Sat Jun 28 17:47:54 2008 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 In-Reply-To: <486698CA.2050709@duif.net> References: <82ba77b80806281104m594516f5j1dfe86e02065601e@mail.gmail.com> <486698CA.2050709@duif.net> Message-ID: <47378B85-1CC4-4296-844F-FC8969B73CBB@gmail.com> I would personally use one of Richard's methods, although you should note that you would be using 26915 where he uses 4326 in the examples below. 29615 is a standard EPSG code that is normally in the postgis spatial reference system if you have initialized your database in the standard way, so you shouldn't have any problems. There is another option which would allow you to use OpenLayers to do the conversion, you need to include the proj4js script in your web page and define the UTM projection for 26915 appropriately, then you could convert your maxExtent there. The home of proj4js is http://trac.osgeo.org/proj4js/ where you can download (actually get from svn) the latest version - you just need this file: https://svn.codehaus.org/mapbuilder/cscs/trunk/proj4js/lib/proj4js-combined.js The proj4js definition of you projection is found at: http://spatialreference.org/ref/epsg/26915/proj4js/ The final result in your original example would look like: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OpenLayers Example</title> <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></ script> --> <script src="http://localhost/_common//OpenLayers-2.6/ OpenLayers.js"></script> <script src="http://localhost/_common//proj4js-combined.js"></ script> <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw " type="text/javascript"></script> <script type="text/javascript"> var map = null; function init(){ Proj4js.defs["EPSG:26915"] = "+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs "; var mapProj = new OpenLayers.Projection('EPSG:900913'); var utmProj = new OpenLayers.Projection('EPSG:26915'); var displayProj = new OpenLayers.Projection('EPSG:4326'); var bounds = new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75); bounds.transform(utmProj, mapProj); map = new OpenLayers.Map( 'map', { maxResolution: 'auto', maxExtent: bounds, projection: mapProj, displayProjection: displayProj } ); var ol_ms = new OpenLayers.Layer.MapServer( "Mapserver Untiled" , "http://localhost/cgi-bin/mapserv.exe?map=C:\\ms4w\ \Apache\\htdocs\\ol\\map.map" , {layers: 'state'} , {singleTile: true} ); map.addLayer(ol_ms); var gmap = new OpenLayers.Layer.Google( "Google Streets" , {sphericalMercator: true} ); map.addLayer(gmap); map.zoomToMaxExtent(); map.addControl(new OpenLayers.Control.LayerSwitcher()); } </script> </head> <body onload="init()"> <div id="map" class="smallmap" style="width:400;height:300"></div> </body> </html> Cheers Paul On 28-Jun-08, at 4:02 PM, Richard Duivenvoorde wrote: > Hi Matthew, > I don't know the OS your running, but there is the commandline util > cs2cs in the 'proj'-package. > If you install proj in any debian(-derivative) or ms4w/fwtools on > windows, you can do for example the following to 'cast' one x,y to > another: > > C:\ms4w>cs2cs +init=epsg:4326 +to +init=epsg:28992 > this will wait for a line of input of two points. > So if you follow with: > 5.172167 52.245417 > it will give: > 140313.91 473062.48 -43.21 > > you can also feed it a list/file with x,y-pairs, or do some > formatting: > cs2cs +init=epsg:900913 +to +init=epsg:4326 -f "%.2f" > 500738 6859019 > 4.50 52.32 0.00 > > Another option is to use the spatial functions of a postgres/postgis > db > if you have that laying around, > eg. tranform from a 4326 point to a 28992 point: > SELECT AsText(Transform(GeomFromText('POINT(5.172167 52.245417)', > 4326), > 28992)) > or the other way around > SELECT AsText(Transform(GeomFromText('POINT(140313.905612639 > 473062.480785896)', 28992), 4326)) > > HTH, > Regards, > Richard Duivenvoorde > > ps, both options above will only work when you have the right epsg > codes > in your proj/postgis configuration > > Matthew Pettis wrote: >> Thanks Paul for your response >> (http://openlayers.org/pipermail/users/2008-June/006474.html). >> >> Truth is, my bounds are not in spherical mercator (they are in >> epsg:26915), so i will need to convert them. If you, in addition, >> happen to know some examples of casting bounds from one projection to >> another, I'd appreciate that as well. >> >> Thanks again, >> Matt >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 matthew.pettis at gmail.com Sat Jun 28 23:00:02 2008 From: matthew.pettis at gmail.com (Matthew Pettis) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers Question: Google Physical Projections and epsg:26915 In-Reply-To: <82ba77b80806281632o722c3404k2d4a47ba7cbd2d38@mail.gmail.com> References: <82ba77b80806281632o722c3404k2d4a47ba7cbd2d38@mail.gmail.com> Message-ID: <82ba77b80806282000y3d18e66et3631208470c98915@mail.gmail.com> Thanks Paul, I think this last post you put up also may have answered a post under a different thread I just posted to this list ( http://openlayers.org/pipermail/users/2008-June/006478.html). I will be trying this later this evening. Thanks again, Matt -- It is from the wellspring of our despair and the places that we are broken that we come to repair the world. -- Murray Waas -- It is from the wellspring of our despair and the places that we are broken that we come to repair the world. -- Murray Waas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080628/9dadf9e0/attachment.html From eric.c2c at gmail.com Sun Jun 29 05:17:51 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] LayerSwitcher/WFS Layer with Yahoo Hybrid error In-Reply-To: <18137309.post@talk.nabble.com> References: <18137309.post@talk.nabble.com> Message-ID: <5ec103de0806290217u6aff9377oacc380d997835253@mail.gmail.com> Hi. I think this is an unknown problem. Having code allowing to reproduce the problem would be great. Regards. Eric 2008/6/26, czieler <carole.zieler@gmail.com>: > > I have three base layers on my map, Google, Google Hybrid, and Yahoo Hybrid. > > I also have a couple of WMS layers, a Vector Layer, and a WFS layer. > Switching layers works fine between all of them until I activate my WFS > layer. Once I've done this, I can swap between Google and Google Hybrid, > but switching to Yahoo Hybrid gives me an error of: > > Error: position has no properties > Source File: {internalurlhere}/lib/OpenLayers/Tile.js > Line: 130 > > Has anyone seen anything similar to this before? > -- > View this message in context: > http://www.nabble.com/LayerSwitcher-WFS-Layer-with-Yahoo-Hybrid-error-tp18137309p18137309.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 Sun Jun 29 05:26:27 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] RV: IE7 screen resizing and map center.... In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAZ3mCN1T41BGYZwDgRmAKTcKAAAAQAAAAAcIZimxy4USEtoM+X8WL3AEAAAAA@altasur.com.uy> References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAZ3mCN1T41BGYZwDgRmAKTcKAAAAQAAAAAcIZimxy4USEtoM+X8WL3AEAAAAA@altasur.com.uy> Message-ID: <5ec103de0806290226m5c1083eag62c78d64eafe5727@mail.gmail.com> Please provide a test case where this happens. It is hard to help you out with so little information. Cheers. Eric 2008/6/26, leorochadecastro@gmail.com <leorochadecastro@gmail.com>: > Hello, this is my first app with openlayers. I've 4 layers and this > function: "map.setCenter(new OpenLayers.LonLat(actLon, actLat), actZoom);" > is working fine. But when I change size of the browser window and select > other base layer, it seems that the center moves downwards and to the right. > > How can I fix this problem? > > > LEONEL ROCHA > ALTASUR S.A. > > > From eric.c2c at gmail.com Sun Jun 29 05:34:23 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <20080625153259.GA19311@metacarta.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <20080625130901.GA15504@metacarta.com> <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> <20080625153259.GA19311@metacarta.com> Message-ID: <5ec103de0806290234m37a2d874o34b1c8918e4185a4@mail.gmail.com> Hi. Regarding Protocol.HTTP maybe the naming isn't really appropriate since any OL network protocol is HTTP-based. Since Protocol.HTTP uses GET, POST, PUT, DELETE, Protocol.REST might be a better name. Regards. Eric 2008/6/25, Christopher Schmidt <crschmidt@metacarta.com>: > On Wed, Jun 25, 2008 at 03:53:33PM +0200, Eric Lemoine wrote: >> On Wed, Jun 25, 2008 at 3:09 PM, Christopher Schmidt >> <crschmidt@metacarta.com> wrote: >> > On Wed, Jun 25, 2008 at 01:54:42PM +0200, Eric Lemoine wrote: >> >> Although i find it weird to use a GML layer with a format different >> >> than GML i agree that it's good to avoid code at the application >> >> level. Thanks Andreas. Eric >> > >> > As Andreas pointed out, this is a flaw in naming. This is simply for >> > 'historical reasons' -- It was named that way early on, before I really >> > knew what I was doing. (It was named, for example, before we had >> > formats, back when it really *was* about GML.) >> > >> > The GML and WFS layers can essentially be thought of two different >> > strategies: GML is a Layer which uses a "Fixed" strategy, and WFS is a >> > Layer which uses a "BBOX" strategy. >> > >> > Both of them are tied to the HTTP Protocol. >> >> The WFS layer is tied to the "WFS" protocol. > > More so than the HTTP protocol, I'll admit; but the entire reason for > the vector behavior work is just that the protocol stuff really isn't > well encapsulated, so we'll just put it this way: "The WFS layer is a > fscking mess" :) > >> > It's unfortunate that they're named this way, but that's one of the >> > things that the vector behavior work is changing: once we've refactored >> > things, we can start creating layers that actually make sense for their >> > names :) >> >> Ok, but what will we do with the WFS and GML layers? Will we keep them >> with the same names and behaviors to maintain backward compatibility? > > I don't know exactly what we'll do: if we can change the underlying > implementation of these to just be simple wrappers around a vector layer > without changing API-supported behavior, that would be preferable: > otherwise, we may have to maintain the existing code. For example, the > WFS layer has support to render with Markers, something that the vector > behavior changes won't give us, so we can't really just dump the > Layer.WFS code that does that and depend on the vector behavior instead. > > Regards, > -- > Christopher Schmidt > MetaCarta > From crschmidt at metacarta.com Sun Jun 29 09:13:36 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <5ec103de0806290234m37a2d874o34b1c8918e4185a4@mail.gmail.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <20080625130901.GA15504@metacarta.com> <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> <20080625153259.GA19311@metacarta.com> <5ec103de0806290234m37a2d874o34b1c8918e4185a4@mail.gmail.com> Message-ID: <20080629131335.GA18577@metacarta.com> On Sun, Jun 29, 2008 at 11:34:23AM +0200, Eric Lemoine wrote: > Hi. Regarding Protocol.HTTP maybe the naming isn't really appropriate > since any OL network protocol is HTTP-based. The Google Gears protocol is HTTP based? :) > Since Protocol.HTTP uses > GET, POST, PUT, DELETE, Protocol.REST might be a better name. That depends what we put in the HTTP protocol. My assumption was that something like OSM and something like FeatureServer could both be based on subclasses of the HTTP Protocol -- that the HTTP Protocol wouldn't actually embed any write information, only reading from bounding boxes. If the plan is to have the HTTP Protocol do more than that, then yes, perhaps REST makes sense, but I think there is still a class of HTTP-centric, non-SimpleFeatures REST that could be usefully subclassed from a smaller protocol. -- Chris > > 2008/6/25, Christopher Schmidt <crschmidt@metacarta.com>: > > On Wed, Jun 25, 2008 at 03:53:33PM +0200, Eric Lemoine wrote: > >> On Wed, Jun 25, 2008 at 3:09 PM, Christopher Schmidt > >> <crschmidt@metacarta.com> wrote: > >> > On Wed, Jun 25, 2008 at 01:54:42PM +0200, Eric Lemoine wrote: > >> >> Although i find it weird to use a GML layer with a format different > >> >> than GML i agree that it's good to avoid code at the application > >> >> level. Thanks Andreas. Eric > >> > > >> > As Andreas pointed out, this is a flaw in naming. This is simply for > >> > 'historical reasons' -- It was named that way early on, before I really > >> > knew what I was doing. (It was named, for example, before we had > >> > formats, back when it really *was* about GML.) > >> > > >> > The GML and WFS layers can essentially be thought of two different > >> > strategies: GML is a Layer which uses a "Fixed" strategy, and WFS is a > >> > Layer which uses a "BBOX" strategy. > >> > > >> > Both of them are tied to the HTTP Protocol. > >> > >> The WFS layer is tied to the "WFS" protocol. > > > > More so than the HTTP protocol, I'll admit; but the entire reason for > > the vector behavior work is just that the protocol stuff really isn't > > well encapsulated, so we'll just put it this way: "The WFS layer is a > > fscking mess" :) > > > >> > It's unfortunate that they're named this way, but that's one of the > >> > things that the vector behavior work is changing: once we've refactored > >> > things, we can start creating layers that actually make sense for their > >> > names :) > >> > >> Ok, but what will we do with the WFS and GML layers? Will we keep them > >> with the same names and behaviors to maintain backward compatibility? > > > > I don't know exactly what we'll do: if we can change the underlying > > implementation of these to just be simple wrappers around a vector layer > > without changing API-supported behavior, that would be preferable: > > otherwise, we may have to maintain the existing code. For example, the > > WFS layer has support to render with Markers, something that the vector > > behavior changes won't give us, so we can't really just dump the > > Layer.WFS code that does that and depend on the vector behavior instead. > > > > Regards, > > -- > > Christopher Schmidt > > MetaCarta > > -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Sun Jun 29 09:38:20 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <20080629131335.GA18577@metacarta.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <20080625130901.GA15504@metacarta.com> <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> <20080625153259.GA19311@metacarta.com> <5ec103de0806290234m37a2d874o34b1c8918e4185a4@mail.gmail.com> <20080629131335.GA18577@metacarta.com> Message-ID: <5ec103de0806290638v13414c76j91770afc2c459b2d@mail.gmail.com> Chris, I said every OL *network* protocol is HTTP-based. Eric 2008/6/29, Christopher Schmidt <crschmidt@metacarta.com>: > On Sun, Jun 29, 2008 at 11:34:23AM +0200, Eric Lemoine wrote: >> Hi. Regarding Protocol.HTTP maybe the naming isn't really appropriate >> since any OL network protocol is HTTP-based. > > The Google Gears protocol is HTTP based? :) > >> Since Protocol.HTTP uses >> GET, POST, PUT, DELETE, Protocol.REST might be a better name. > > That depends what we put in the HTTP protocol. My assumption was that > something like OSM and something like FeatureServer could both be based > on subclasses of the HTTP Protocol -- that the HTTP Protocol wouldn't > actually embed any write information, only reading from bounding boxes. > > If the plan is to have the HTTP Protocol do more than that, then yes, > perhaps REST makes sense, but I think there is still a class of > HTTP-centric, non-SimpleFeatures REST that could be usefully subclassed > from a smaller protocol. > > -- Chris > >> >> 2008/6/25, Christopher Schmidt <crschmidt@metacarta.com>: >> > On Wed, Jun 25, 2008 at 03:53:33PM +0200, Eric Lemoine wrote: >> >> On Wed, Jun 25, 2008 at 3:09 PM, Christopher Schmidt >> >> <crschmidt@metacarta.com> wrote: >> >> > On Wed, Jun 25, 2008 at 01:54:42PM +0200, Eric Lemoine wrote: >> >> >> Although i find it weird to use a GML layer with a format different >> >> >> than GML i agree that it's good to avoid code at the application >> >> >> level. Thanks Andreas. Eric >> >> > >> >> > As Andreas pointed out, this is a flaw in naming. This is simply for >> >> > 'historical reasons' -- It was named that way early on, before I >> >> > really >> >> > knew what I was doing. (It was named, for example, before we had >> >> > formats, back when it really *was* about GML.) >> >> > >> >> > The GML and WFS layers can essentially be thought of two different >> >> > strategies: GML is a Layer which uses a "Fixed" strategy, and WFS is >> >> > a >> >> > Layer which uses a "BBOX" strategy. >> >> > >> >> > Both of them are tied to the HTTP Protocol. >> >> >> >> The WFS layer is tied to the "WFS" protocol. >> > >> > More so than the HTTP protocol, I'll admit; but the entire reason for >> > the vector behavior work is just that the protocol stuff really isn't >> > well encapsulated, so we'll just put it this way: "The WFS layer is a >> > fscking mess" :) >> > >> >> > It's unfortunate that they're named this way, but that's one of the >> >> > things that the vector behavior work is changing: once we've >> >> > refactored >> >> > things, we can start creating layers that actually make sense for >> >> > their >> >> > names :) >> >> >> >> Ok, but what will we do with the WFS and GML layers? Will we keep them >> >> with the same names and behaviors to maintain backward compatibility? >> > >> > I don't know exactly what we'll do: if we can change the underlying >> > implementation of these to just be simple wrappers around a vector layer >> > without changing API-supported behavior, that would be preferable: >> > otherwise, we may have to maintain the existing code. For example, the >> > WFS layer has support to render with Markers, something that the vector >> > behavior changes won't give us, so we can't really just dump the >> > Layer.WFS code that does that and depend on the vector behavior instead. >> > >> > Regards, >> > -- >> > Christopher Schmidt >> > MetaCarta >> > > > -- > Christopher Schmidt > MetaCarta > From eric.c2c at gmail.com Sun Jun 29 09:54:48 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <20080629131335.GA18577@metacarta.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <20080625130901.GA15504@metacarta.com> <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> <20080625153259.GA19311@metacarta.com> <5ec103de0806290234m37a2d874o34b1c8918e4185a4@mail.gmail.com> <20080629131335.GA18577@metacarta.com> Message-ID: <5ec103de0806290654s30256c1ayf86b6b4f395a37d5@mail.gmail.com> Current HTTP Protocol does CRUD through HTTP POST, GET, PUT, DELETE. It should be generic enough for implementing Protocol.FeatureServer and Protocol.OSM based upon it. So if we keep it as-is i tend to think we should rename it REST. However i like your idea of having a simple read-only, HTTP GET-based Protocol that other network Protocols will use internally. Thanks. Eric 2008/6/29, Christopher Schmidt <crschmidt@metacarta.com>: > On Sun, Jun 29, 2008 at 11:34:23AM +0200, Eric Lemoine wrote: >> Hi. Regarding Protocol.HTTP maybe the naming isn't really appropriate >> since any OL network protocol is HTTP-based. > > The Google Gears protocol is HTTP based? :) > >> Since Protocol.HTTP uses >> GET, POST, PUT, DELETE, Protocol.REST might be a better name. > > That depends what we put in the HTTP protocol. My assumption was that > something like OSM and something like FeatureServer could both be based > on subclasses of the HTTP Protocol -- that the HTTP Protocol wouldn't > actually embed any write information, only reading from bounding boxes. > > If the plan is to have the HTTP Protocol do more than that, then yes, > perhaps REST makes sense, but I think there is still a class of > HTTP-centric, non-SimpleFeatures REST that could be usefully subclassed > from a smaller protocol. > > -- Chris > >> >> 2008/6/25, Christopher Schmidt <crschmidt@metacarta.com>: >> > On Wed, Jun 25, 2008 at 03:53:33PM +0200, Eric Lemoine wrote: >> >> On Wed, Jun 25, 2008 at 3:09 PM, Christopher Schmidt >> >> <crschmidt@metacarta.com> wrote: >> >> > On Wed, Jun 25, 2008 at 01:54:42PM +0200, Eric Lemoine wrote: >> >> >> Although i find it weird to use a GML layer with a format different >> >> >> than GML i agree that it's good to avoid code at the application >> >> >> level. Thanks Andreas. Eric >> >> > >> >> > As Andreas pointed out, this is a flaw in naming. This is simply for >> >> > 'historical reasons' -- It was named that way early on, before I >> >> > really >> >> > knew what I was doing. (It was named, for example, before we had >> >> > formats, back when it really *was* about GML.) >> >> > >> >> > The GML and WFS layers can essentially be thought of two different >> >> > strategies: GML is a Layer which uses a "Fixed" strategy, and WFS is >> >> > a >> >> > Layer which uses a "BBOX" strategy. >> >> > >> >> > Both of them are tied to the HTTP Protocol. >> >> >> >> The WFS layer is tied to the "WFS" protocol. >> > >> > More so than the HTTP protocol, I'll admit; but the entire reason for >> > the vector behavior work is just that the protocol stuff really isn't >> > well encapsulated, so we'll just put it this way: "The WFS layer is a >> > fscking mess" :) >> > >> >> > It's unfortunate that they're named this way, but that's one of the >> >> > things that the vector behavior work is changing: once we've >> >> > refactored >> >> > things, we can start creating layers that actually make sense for >> >> > their >> >> > names :) >> >> >> >> Ok, but what will we do with the WFS and GML layers? Will we keep them >> >> with the same names and behaviors to maintain backward compatibility? >> > >> > I don't know exactly what we'll do: if we can change the underlying >> > implementation of these to just be simple wrappers around a vector layer >> > without changing API-supported behavior, that would be preferable: >> > otherwise, we may have to maintain the existing code. For example, the >> > WFS layer has support to render with Markers, something that the vector >> > behavior changes won't give us, so we can't really just dump the >> > Layer.WFS code that does that and depend on the vector behavior instead. >> > >> > Regards, >> > -- >> > Christopher Schmidt >> > MetaCarta >> > > > -- > Christopher Schmidt > MetaCarta > From crschmidt at metacarta.com Sun Jun 29 10:31:01 2008 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <5ec103de0806290654s30256c1ayf86b6b4f395a37d5@mail.gmail.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5ec103de0806241459r3b286bf6j9eaf6d51ce07a5b5@mail.gmail.com> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <20080625130901.GA15504@metacarta.com> <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> <20080625153259.GA19311@metacarta.com> <5ec103de0806290234m37a2d874o34b1c8918e4185a4@mail.gmail.com> <20080629131335.GA18577@metacarta.com> <5ec103de0806290654s30256c1ayf86b6b4f395a37d5@mail.gmail.com> Message-ID: <20080629143101.GA20377@metacarta.com> On Sun, Jun 29, 2008 at 03:54:48PM +0200, Eric Lemoine wrote: > Current HTTP Protocol does CRUD through HTTP POST, GET, PUT, DELETE. > It should be generic enough for implementing Protocol.FeatureServer > and Protocol.OSM based upon it. Er, I don't think this is likely to be true. FeatureServer/MapFish use a protocol where you post an entire feature to the server, and it saves that feature. OSM uses a topological model, so editing is different: you don't edit linestrings, you edit individual nodes along them. So, although OSM is RESTful, the objects are lower level: a FeatureServer-friendly HTTP protocol and an OSM-friendly one would be significantly different. Maybe I don't know what I'm talking about, as per usual :) But it seems unlikely that OSM + FeatureServer protocols could share much code in terms of writing; only reading would be sanely sharable, I think. Regards, -- Christopher Schmidt MetaCarta From eric.c2c at gmail.com Sun Jun 29 11:09:15 2008 From: eric.c2c at gmail.com (Eric Lemoine) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] GeoRSS and Custom Icons In-Reply-To: <20080629143101.GA20377@metacarta.com> References: <E1K6Lbb-000412-9M@detroit.securenet-server.net> <5b021dd0806250133t17487e06y96a06541a8845e3e@mail.gmail.com> <5ec103de0806250454j2b52faa8y1706a32173abb6fa@mail.gmail.com> <20080625130901.GA15504@metacarta.com> <5ec103de0806250653u1563ed62ld6f555d783a6d109@mail.gmail.com> <20080625153259.GA19311@metacarta.com> <5ec103de0806290234m37a2d874o34b1c8918e4185a4@mail.gmail.com> <20080629131335.GA18577@metacarta.com> <5ec103de0806290654s30256c1ayf86b6b4f395a37d5@mail.gmail.com> <20080629143101.GA20377@metacarta.com> Message-ID: <5ec103de0806290809k6b7c8694k97c2e6759085e6a7@mail.gmail.com> Oh no it's me talking about things i dont know: OSM. Eric 2008/6/29, Christopher Schmidt <crschmidt@metacarta.com>: > On Sun, Jun 29, 2008 at 03:54:48PM +0200, Eric Lemoine wrote: >> Current HTTP Protocol does CRUD through HTTP POST, GET, PUT, DELETE. >> It should be generic enough for implementing Protocol.FeatureServer >> and Protocol.OSM based upon it. > > Er, I don't think this is likely to be true. > > FeatureServer/MapFish use a protocol where you post an entire feature to > the server, and it saves that feature. > > OSM uses a topological model, so editing is different: you don't edit > linestrings, you edit individual nodes along them. So, although OSM is > RESTful, the objects are lower level: a FeatureServer-friendly HTTP > protocol and an OSM-friendly one would be significantly different. > > Maybe I don't know what I'm talking about, as per usual :) But it seems > unlikely that OSM + FeatureServer protocols could share much code in > terms of writing; only reading would be sanely sharable, I think. > > Regards, > -- > Christopher Schmidt > MetaCarta > From arnd.wippermann at web.de Sun Jun 29 11:26:59 2008 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] OpenLayers.Projection and proj4js.js In-Reply-To: <82ba77b80806281420v2e3a650dl754991af2442ea8d@mail.gmail.com> Message-ID: <E1KCynt-0003IX-00@smtp05.web.de> Hi Matt, you must load the proj4js library and if you use IE also the other projection declarations. Otherwise is the OpenLayers.Projection only an empty function. I use this to work with proj4js and it's wonderful to see how it works. <script type="text/javascript" src="proj4js/proj4js-compressed.js"></script> <SCRIPT type="text/javascript" src="proj4js/projCode/tmerc.js"></SCRIPT> <SCRIPT type="text/javascript" src="proj4js/projCode/merc.js"></SCRIPT> <SCRIPT type="text/javascript" src="proj4js/defs/EPSG31466.js"></SCRIPT> <SCRIPT type="text/javascript" src="proj4js/defs/EPSG31467.js"></SCRIPT> <SCRIPT type="text/javascript" src="proj4js/defs/EPSG900913.js"></SCRIPT> Mit freundlichen Gr?ssen Arnd Wippermann <http://gis.ibbeck.de/ginfo/> http://gis.ibbeck.de/ginfo/ _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Matthew Pettis Gesendet: Samstag, 28. Juni 2008 23:20 An: users@openlayers.org Betreff: [OpenLayers-Users] OpenLayers.Projection and proj4js.js Hi, I'm trying to cast a point in one projection into another, and I think I have some issues with OpenLayers.Projection. Below is html/javascript code I'm using and the rendered browser ouput. In this example, I'm trying to cast the point (184056.505, 4809728.250) in epsg:26915 to epgs:4326. My expectation is that point p, which is this point in epsg:26915, should display as something on the order of (-100,43), or something close to that range. However, as the output shows, the point is not changed. Can someone explain why? Thanks, matt P.S. - Is there an error in the documentation for the constructor of OpenLayers.Projection (at: http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLaye rs/Projection-js.html#OpenLayers.Projection.OpenLayers.Projection)? It says that the constructor takes an object to set parameters, but every example I see of the constructor is passing a string in the way I am setting it here. Am I not understanding the documentation conventions correctly, or is this not correctly or completely documented? === html/javascript code === <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OpenLayers Example</title> <!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></script> --> <script src="http://localhost/_common//OpenLayers-2.6/OpenLayers.js"></script> </head> <body> <pre> <script type="text/javascript"> var p = new OpenLayers.Geometry.Point(184056.505, 4809728.250); var proj_src = new OpenLayers.Projection("EPSG:26915"); var proj_tgt = new OpenLayers.Projection("EPSG:4326"); document.writeln(); document.writeln("Point p [before OpenLayers.Projection.transform] is: " + p); OpenLayers.Projection.transform(p,proj_src,proj_tgt); document.writeln("Point p [after OpenLayers.Projection.transform] is: " + p); document.writeln("proj_src is: " + proj_src); document.writeln(); document.writeln("prj_src walk of properties is:"); document.writeln("------------------------------"); for (prop in proj_src) { document.writeln(prop + " => " + proj_src[prop]); }; document.writeln("------------------------------"); </script> </pre> </body> </html> ======================================================================== === browser rendered output === Point p [before OpenLayers.Projection.transform] is: POINT(184056.505 4809728.25) Point p [after OpenLayers.Projection.transform] is: POINT(184056.505 4809728.25) proj_src is: EPSG:26915 prj_src walk of properties is: ------------------------------ projCode => EPSG:26915 proj => null initialize => function (projCode, options) { OpenLayers.Util.extend(this, options); this.projCode = projCode; if (window.Proj4js) { this.proj = new Proj4js.Proj(projCode); } } getCode => function () { return this.proj ? this.proj.srsCode : this.projCode; } getUnits => function () { return this.proj ? this.proj.units : null; } toString => function () { return this.getCode(); } equals => function (projection) { if (projection && projection.getCode) { return this.getCode() == projection.getCode(); } else { return false; } } destroy => function () { delete this.proj; delete this.projCode; } CLASS_NAME => OpenLayers.Projection ------------------------------ ======================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080629/d8761acf/attachment.html From hcan at hotmail.com Sun Jun 29 11:58:24 2008 From: hcan at hotmail.com (Zer) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Show polygon vectors as points Message-ID: <18182330.post@talk.nabble.com> Hi! Is there anyone that knows if it is possible to "convert" or just show vector polygons (from GML) as points instead of vectors? I would like to present the center coordinate aswell as the polygon. Thanks, -Z -- View this message in context: http://www.nabble.com/Show-polygon-vectors-as-points-tp18182330p18182330.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From reena at indiamail.com Mon Jun 30 02:51:43 2008 From: reena at indiamail.com (S.Reena) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] include quesry in data source in map file In-Reply-To: <8ABD08D1-1FA8-49DE-9B9F-BAE2E9B484A5@gmail.com> References: <20080628111432.17E2711581F@ws1-7.us4.outblaze.com> <8ABD08D1-1FA8-49DE-9B9F-BAE2E9B484A5@gmail.com> Message-ID: <18189663.post@talk.nabble.com> hey Paul.......I will take care about this from the next time ...n Thanks 4 the solution ...it worked :) Regards, Reena. Paul Spencer-5 wrote: > > this is definitely the wrong list for this question, you should be > asking on mapserver-users or even the postgis list. > > In any case, the correct way to specify a sub-select for postgis is: > > DATA "the_geom from (select * from my_table WHERE name like 'abc') as > foo using unique gid using srid=-1" > > Things to note: > > your sub-select must return the_geom, gid and any other attributes > that you are using elsewhere (for labelitem, classitem, etc). > > gid might be called something else, it just needs to be a unique value > such as the primary key of your table. > > Cheers > > Paul > > On 28-Jun-08, at 7:14 AM, Reena Singh wrote: > >> I want to use query in the map file like ........ >> >> DATA "the_geom FROM my_table WHERE name like 'abc' " >> >> but this is not working accr to the format. >> >> Can ne1 hlp? >> >> -- >> Be Yourself @ mail.com! >> Choose From 200+ Email Addresses >> Get a Free Account at www.mail.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://www.nabble.com/include-quesry-in-data-source-in-map-file-tp18169693p18189663.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From lorenzetti at faunalia.it Mon Jun 30 03:38:21 2008 From: lorenzetti at faunalia.it (Walter Lorenzetti) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Zooming transition Message-ID: <48688D6D.1080009@faunalia.it> Hi all, I've to do a simple question... What have I to do for activate zooming transtion effect on OL 2.6? Because I don't see anithing on normal installation Thanks in advance.. Walter -- Please no .doc, .xls, .ppt, .dwg: https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats Walter Lorenzetti email+jabber: lorenzetti@faunalia.it www.faunalia.it Cell: (+39) 347-6597931 Tel+Fax: (+39) 0587-213742 Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy From bartvde at osgis.nl Mon Jun 30 03:45:23 2008 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Zooming transition In-Reply-To: <48688D6D.1080009@faunalia.it> References: <48688D6D.1080009@faunalia.it> Message-ID: <5b89d159bc6866358a2988effafb71d0@pop02.backbone.tiscomhosting.nl> Pass a transitionEffect parameter to your layer object with value 'resize', see also: http://www.openlayers.org/dev/examples/transition.html Best regards, Bart On Mon, 30 Jun 2008 09:38:21 +0200, Walter Lorenzetti <lorenzetti@faunalia.it> wrote: > Hi all, > > I've to do a simple question... > What have I to do for activate zooming transtion effect on OL 2.6? > Because I don't see anithing on normal installation > > Thanks in advance.. > Walter > > -- > Please no .doc, .xls, .ppt, .dwg: > https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats > > Walter Lorenzetti > email+jabber: lorenzetti@faunalia.it > www.faunalia.it > Cell: (+39) 347-6597931 Tel+Fax: (+39) 0587-213742 > Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From lorenzetti at faunalia.it Mon Jun 30 03:59:47 2008 From: lorenzetti at faunalia.it (Walter Lorenzetti) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] Zooming transition In-Reply-To: <48688D6D.1080009@faunalia.it> References: <48688D6D.1080009@faunalia.it> Message-ID: <48689273.1080706@faunalia.it> Walter Lorenzetti ha scritto: > Hi all, > > I've to do a simple question... > What have I to do for activate zooming transtion effect on OL 2.6? > Because I don't see anithing on normal installation > > Thanks in advance.. > Walter > > Soory, I found transition.html in examples Bye Walter -- Please no .doc, .xls, .ppt, .dwg: https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats Walter Lorenzetti email+jabber: lorenzetti@faunalia.it www.faunalia.it Cell: (+39) 347-6597931 Tel+Fax: (+39) 0587-213742 Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy From kusum at infobase.in Mon Jun 30 07:34:05 2008 From: kusum at infobase.in (Kusum) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] PopUp Problem Message-ID: <C7D3D37C518A41989C62B18E4EB4FA0A@kusum> Hiii All I am confused about a problem. In My application There are around five point layers. When I switch on a layer, points are shown and for each point information is fetched and shown in popups. everything goes fine until three layers but when I switch on fourth layer, points are plotted and information is also fetched but popups don't show up Is there a limit that only for some number of points popups will be shown......... the url for my application is http://mapxl.com/interactive-maps/world-registration.php the layers are shown as you click on themes button on page... Regards, Kusum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080630/f1064d9d/attachment.html From fabiodovidio at gmail.com Mon Jun 30 10:41:43 2008 From: fabiodovidio at gmail.com (Fabio D'Ovidio) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] wfs-t insert alphanumeric values Message-ID: <4868F0A7.5010403@gmail.com> Hi! After drwing my feature trought openlayers and wfs-t protocol in Geoserver, I'd like to update alphanumeric fileds of that feature reading some variables in query string. Something like this: // Javascript function function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } alert('Query Variable ' + variable + ' not found'); } // wfs-t update request: "importo" and "nome" will be my query_string variables.... <wfs:Transaction service="WFS" version="1.0.0" xmlns:topp="http://www.openplans.org/topp" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs"> <wfs:Update typeName="topp:poligono"> <wfs:Property> <wfs:Name>nome</wfs:Name> <wfs:Value>"my query_string variable value"</wfs:Value> </wfs:Property> <wfs:Property> <wfs:Name>importo</wfs:Name> <wfs:Value>"my query_string variable value"</wfs:Value> </wfs:Property> <ogc:Filter> <ogc:FeatureId fid="poligono.1"/> </ogc:Filter> </wfs:Update> </wfs:Transaction> How can I do it? Thanks -- Ing. Fabio D'Ovidio INOVA Open Solutions s.r.l. Web : http://www.inovaos.it Tel.: 081 197 57 600 mail: fabiodovidio@gmail.com From andreas.hocevar at gmail.com Mon Jun 30 11:18:08 2008 From: andreas.hocevar at gmail.com (Andreas Hocevar) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] wfs-t insert alphanumeric values In-Reply-To: <4868F0A7.5010403@gmail.com> References: <4868F0A7.5010403@gmail.com> Message-ID: <5b021dd0806300818y7e606676h3e055ab080ef20d8@mail.gmail.com> Hi Fabio, On Mon, Jun 30, 2008 at 4:41 PM, Fabio D'Ovidio <fabiodovidio@gmail.com> wrote: > Hi! > After drwing my feature trought openlayers and wfs-t protocol in > Geoserver, I'd like to update alphanumeric fileds of that feature > reading some variables in query string. Wouldn't it save you a roundtrip if you set the attribute values right after drawing the feature, before posting it to the server? All you have to do is give your feature the according attributes, e.g.: features.attributes = { "importo": "my query_string variable value", "nome": "my query_string variable value" } > // Javascript function > function getQueryVariable(variable) { > var query = window.location.search.substring(1); > var vars = query.split("&"); > for (var i=0;i<vars.length;i++) { > var pair = vars[i].split("="); > if (pair[0] == variable) { > return pair[1]; > } > } > alert('Query Variable ' + variable + ' not found'); > } This is much simpler with OpenLayers.Util.getParameters: If the query string of your url looks like ?importo=1&nome=my query string nome you can simply say feature.attributes = OpenLayers.Util.getParameters(); > // wfs-t update request: "importo" and "nome" will be my query_string > variables.... > > <wfs:Transaction service="WFS" version="1.0.0" > xmlns:topp="http://www.openplans.org/topp" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:wfs="http://www.opengis.net/wfs"> > <wfs:Update typeName="topp:poligono"> > <wfs:Property> > <wfs:Name>nome</wfs:Name> > <wfs:Value>"my query_string variable value"</wfs:Value> > > </wfs:Property> > <wfs:Property> > <wfs:Name>importo</wfs:Name> > <wfs:Value>"my query_string variable value"</wfs:Value> > > </wfs:Property> > <ogc:Filter> > <ogc:FeatureId fid="poligono.1"/> > </ogc:Filter> > </wfs:Update> > </wfs:Transaction> > > How can I do it? No need to code it like that. It's very simple, assuming you have your wfs layer set up like in http://www.openlayers.org/dev/examples/wfst.html: feature.state = OpenLayers.State.UPDATE; wfs.commit(); Regards, Andreas. From carole.zieler at gmail.com Mon Jun 30 11:21:34 2008 From: carole.zieler at gmail.com (czieler) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] LayerSwitcher/WFS Layer with Yahoo Hybrid error In-Reply-To: <5ec103de0806290217u6aff9377oacc380d997835253@mail.gmail.com> References: <18137309.post@talk.nabble.com> <5ec103de0806290217u6aff9377oacc380d997835253@mail.gmail.com> Message-ID: <18197954.post@talk.nabble.com> I have created a sample here: http://webgirlunleashed.com/openlayers/test/test3.html The error is triggered when you swap to the Yahoo Hybrid layer. Eric Lemoine-3 wrote: > > Hi. I think this is an unknown problem. Having code allowing to > reproduce the problem would be great. Regards. Eric > > 2008/6/26, czieler <carole.zieler@gmail.com>: >> >> I have three base layers on my map, Google, Google Hybrid, and Yahoo >> Hybrid. >> >> I also have a couple of WMS layers, a Vector Layer, and a WFS layer. >> Switching layers works fine between all of them until I activate my WFS >> layer. Once I've done this, I can swap between Google and Google >> Hybrid, >> but switching to Yahoo Hybrid gives me an error of: >> >> Error: position has no properties >> Source File: {internalurlhere}/lib/OpenLayers/Tile.js >> Line: 130 >> >> Has anyone seen anything similar to this before? >> -- >> View this message in context: >> http://www.nabble.com/LayerSwitcher-WFS-Layer-with-Yahoo-Hybrid-error-tp18137309p18137309.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://www.nabble.com/LayerSwitcher-WFS-Layer-with-Yahoo-Hybrid-error-tp18137309p18197954.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From fabiodovidio at gmail.com Mon Jun 30 11:43:44 2008 From: fabiodovidio at gmail.com (Fabio D'Ovidio) Date: Wed Sep 1 17:16:24 2010 Subject: [OpenLayers-Users] wfs-t insert alphanumeric values In-Reply-To: <5b021dd0806300818y7e606676h3e055ab080ef20d8@mail.gmail.com> References: <4868F0A7.5010403@gmail.com> <5b021dd0806300818y7e606676h3e055ab080ef20d8@mail.gmail.com> Message-ID: <4868FF30.8080600@gmail.com> Thanks it works !! Andreas Hocevar ha scritto: > Hi Fabio, > > On Mon, Jun 30, 2008 at 4:41 PM, Fabio D'Ovidio <fabiodovidio@gmail.com> wrote: > >> Hi! >> After drwing my feature trought openlayers and wfs-t protocol in >> Geoserver, I'd like to update alphanumeric fileds of that feature >> reading some variables in query string. >> > > Wouldn't it save you a roundtrip if you set the attribute values right > after drawing the feature, before posting it to the server? All you > have to do is give your feature the according attributes, e.g.: > > features.attributes = { > "importo": "my query_string variable value", > "nome": "my query_string variable value" > } > > >> // Javascript function >> function getQueryVariable(variable) { >> var query = window.location.search.substring(1); >> var vars = query.split("&"); >> for (var i=0;i<vars.length;i++) { >> var pair = vars[i].split("="); >> if (pair[0] == variable) { >> return pair[1]; >> } >> } >> alert('Query Variable ' + variable + ' not found'); >> } >> > > This is much simpler with OpenLayers.Util.getParameters: > > If the query string of your url looks like > ?importo=1&nome=my query string nome > > you can simply say > > feature.attributes = OpenLayers.Util.getParameters(); > > >> // wfs-t update request: "importo" and "nome" will be my query_string >> variables.... >> >> <wfs:Transaction service="WFS" version="1.0.0" >> xmlns:topp="http://www.openplans.org/topp" >> xmlns:ogc="http://www.opengis.net/ogc" >> xmlns:wfs="http://www.opengis.net/wfs"> >> <wfs:Update typeName="topp:poligono"> >> <wfs:Property> >> <wfs:Name>nome</wfs:Name> >> <wfs:Value>"my query_string variable value"</wfs:Value> >> >> </wfs:Property> >> <wfs:Property> >> <wfs:Name>importo</wfs:Name> >> <wfs:Value>"my query_string variable value"</wfs:Value> >> >> </wfs:Property> >> <ogc:Filter> >> <ogc:FeatureId fid="poligono.1"/> >> </ogc:Filter> >> </wfs:Update> >> </wfs:Transaction> >> >> How can I do it? >> > > No need to code it like that. It's very simple, assuming you have your > wfs layer set up like in > http://www.openlayers.org/dev/examples/wfst.html: > > feature.state = OpenLayers.State.UPDATE; > wfs.commit(); > > Regards, > Andreas. > > -- Ing. Fabio D'Ovidio INOVA Open Solutions s.r.l. Web : http://www.inovaos.it Tel.: 081 197 57 600 mail: fabiodovidio@gmail.com