From kgeusebroek at xebia.com Fri May 1 02:01:22 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Locate objetcts in the maps In-Reply-To: <003801c9c9ab$d5c2e500$3998a8c0@deltha> References: <003801c9c9ab$d5c2e500$3998a8c0@deltha> Message-ID: Hi, You oculd create a wfs getFeature request with a Filter matching a unique value of your object to locate. You?ll get back a result with you can parse to find the geometry of the object and call setCentre on the map or so or zoomToExtent. Other way to do is is you have already a Vector Layer with wfs protocol added to it something like this: function findObject(propertyName, uniqueValue) { var uniqueFilter = new OpenLayers.Filter.Comparison( { type: OpenLayers.Filter.Comparison.EQUAL_TO, property: propertyName, value: uniqueValue } ); var response = wfsLayer.protocol.read({ maxFeatures: 1, filter: uniqueFilter, callback: function(result) {zoomToTheExtentOfTheResultingFeature(result);} }); } function zoomToTheExtentOfTheResultingFeature(result) { if (result.features.length > 0) { var feature = result.features[0]; //var center = feature.geometry.getBounds().getCenterLonLat(); //map.setCenter(center); var ext = feature.geometry.getBounds(); map.zoomToExtent(ext); } } Hope this helps Cheers Kris From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of fsalas Sent: Thursday, April 30, 2009 5:53 PM To: users@openlayers.org Subject: [OpenLayers-Users] Locate objetcts in the maps Importance: High Hi all, I have a little problem.. I need locate one objetcs Ej. lake,house , etc. by your fields value. And make a Zoom to extend this objects How impements this code , I have geoserver. Does anyone have a function for this task? Regards Francisco Salas ___________________________________ Direcci?n de Comunicaciones Grupo Empresarial GEOCUBA Este mensaje esta libre de virus. Revisado por Kaspersky Antivirus ---------------------------------------------------------------------- Definition count: 331867 Definition date: 6/18/2007 SecurityPlus version: 3.0.5 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090501/27b2c8b9/attachment.html From openlayers at peterrobins.co.uk Fri May 1 04:49:42 2009 From: openlayers at peterrobins.co.uk (Peter Robins) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Geojson input: why error on 3d points? In-Reply-To: <20090430112158.GF10418@metacarta.com> References: <200904290903.25041.openlayers@peterrobins.co.uk> <200904300934.25059.openlayers@peterrobins.co.uk> <20090430112158.GF10418@metacarta.com> Message-ID: <200905010949.43386.openlayers@peterrobins.co.uk> On Thursday 30 Apr 2009, Christopher Schmidt wrote: > On Thu, Apr 30, 2009 at 09:34:23AM +0100, Peter Robins wrote: > > On Wednesday 29 Apr 2009, Christopher Schmidt wrote: > > > On Wed, Apr 29, 2009 at 09:03:24AM +0100, Peter Robins wrote: > > > > I've been having a bizarre problem where the same data (from > > > > featureserver) has been displayed when in kml format, but not in > > > > geojson. Delving into the code, I find this is because geojson.read > > > > throws an error if there are more than 2 coords in a point. Why is > > > > this? 3d points are perfectly valid in geojson, and it seems > > > > illogical that the 2 formats should be handled differently. > > > > > > I believe, at the time, the logic was: > > > * OpenLayers can't do 3d > > > * If we read 3d, when we write it, we will write it wrong > > > * It is better to error at read time than fail silently at write time. > > > > > > I'd be willing to change this behavior, but it was originally > > > implemented by tschaub, so I'd prefer his buy-in as well. > > > > should I open a ticket and submit a patch removing this check? > > Yes, please do. It lets us keep a record, either way. http://trac.openlayers.org/ticket/2070 It would be nice if this could be included in 2.8, as it doesn't affect anything else, so doesn't need extensive testing. From kgeusebroek at xebia.com Fri May 1 08:43:36 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Circle Function In-Reply-To: <00ae01c9c9b0$a77e9e50$f67bdaf0$@com> References: <032001c9c957$f779c460$e66d4d20$@com> <20090430112248.GG10418@metacarta.com><49F995B1.1060803@verizon.net> <00ae01c9c9b0$a77e9e50$f67bdaf0$@com> Message-ID: Hi, I have found a much easier way to create a circle. There is a function in OpenLayers to do that. Works ike this: var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(feature.geometry, 10000, 50) layer.addFeatures(new OpenLayers.Feature.Vector(circle)); the function expects 4 parameters of which I supply 3: - 1. The point where circlecenter must be at - 2. The radius in unit's of the map (in my case meters) - 3. The number of sides (50 makes a nice circle) The 4th parameter is the angle to start drawing but that doesn't make sense for a circle Hope this is of use. Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Kenny Sent: Thursday, April 30, 2009 6:28 PM To: users@openlayers.org Subject: Re: [OpenLayers-Users] Circle Function Hi Guys, Thanks for your help so far, I have a function to create the circles, and it seems to be working fine :) What I can seem to do now is make them have a popup Please se my code so far.... Circle Test
Test 1  Test 2  Test 3  Test 4 Any advice Kenny _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Fri May 1 09:22:19 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Geojson input: why error on 3d points? In-Reply-To: <200905010949.43386.openlayers@peterrobins.co.uk> References: <200904290903.25041.openlayers@peterrobins.co.uk> <200904300934.25059.openlayers@peterrobins.co.uk> <20090430112158.GF10418@metacarta.com> <200905010949.43386.openlayers@peterrobins.co.uk> Message-ID: <20090501132219.GF29456@metacarta.com> On Fri, May 01, 2009 at 09:49:42AM +0100, Peter Robins wrote: > On Thursday 30 Apr 2009, Christopher Schmidt wrote: > > On Thu, Apr 30, 2009 at 09:34:23AM +0100, Peter Robins wrote: > > > On Wednesday 29 Apr 2009, Christopher Schmidt wrote: > > > > On Wed, Apr 29, 2009 at 09:03:24AM +0100, Peter Robins wrote: > > > > > I've been having a bizarre problem where the same data (from > > > > > featureserver) has been displayed when in kml format, but not in > > > > > geojson. Delving into the code, I find this is because geojson.read > > > > > throws an error if there are more than 2 coords in a point. Why is > > > > > this? 3d points are perfectly valid in geojson, and it seems > > > > > illogical that the 2 formats should be handled differently. > > > > > > > > I believe, at the time, the logic was: > > > > * OpenLayers can't do 3d > > > > * If we read 3d, when we write it, we will write it wrong > > > > * It is better to error at read time than fail silently at write time. > > > > > > > > I'd be willing to change this behavior, but it was originally > > > > implemented by tschaub, so I'd prefer his buy-in as well. > > > > > > should I open a ticket and submit a patch removing this check? > > > > Yes, please do. It lets us keep a record, either way. > > http://trac.openlayers.org/ticket/2070 > It would be nice if this could be included in 2.8, as it doesn't affect > anything else, so doesn't need extensive testing. Once an RC is released, only regressions from the previous release are fixed. This means that this change will not be included in 2.8. However, you can probably include the fix in a reasonably safe way in your app by doing something like the following: OpenLayers.Format.GeoJSON.prototype.parseCoords.point = function(array) { return new OpenLayers.Geometry.Point(array[0], array[1]); } Regards, -- Christopher Schmidt MetaCarta From shai_mus at hotmail.com Fri May 1 12:29:48 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Point in parrallel with line formula In-Reply-To: <49F9DAB0.7070708@genieknows.com> References: <1241028414559-2742247.post@n2.nabble.com> <49F8A835.1010807@genieknows.com> <1241093136728-2746662.post@n2.nabble.com> <49F9AD63.9060708@genieknows.com> <1241102772896-2747552.post@n2.nabble.com> <49F9DAB0.7070708@genieknows.com> Message-ID: <1241195388375-2754090.post@n2.nabble.com> Dear Chris, My data is in Latitude/Longitude. Ok I have used the java sample code giving in the exercise. Only thing now I need to confirm is that what is distance output in wat format ? Thank you. Chris Adams wrote: > > For the second part, you use this equation first, to find 'u': > > http://local.wasp.uwa.edu.au/~pbourke/geometry/pointline/pointline2.gif > (Where (x1,y1)-(x2,y2) is the line, and (x3,y3) is the point) > > Then, you use this equation: > > x = x1 + u (x2 - x1) > y = y1 + u (y2 - y1) > > to calculate the new point (x,y) > > Then you have to use some distance equation, to find the distance > between (x3,y3) and (x,y). > > Is your data in Latitude/Longitude? or Spherical Mercator? or something > else? > > newbie wrote: >> Dear Chris, >> So once I have I have decide whether is +1 or -1 then I >> must >> apply the other formula. So must I still apply the first formula to >> decide >> +1 or -1 or can I just go to the second formula. Secondly I still cant >> really see the implementation of the formula. So is there any example >> implementation of this formula cause I dont know to how to get the answer >> in >> metres? Thank you. >> >> Chris Adams wrote: >> >>> +1 means to the left >>> -1 means to the right >>> >>> before calling the 'ccw' function, you'll want to order p0 and p1 so >>> that p0 has the smaller latitude >>> >>> To get the distance on the left or right, use the formula linked from my >>> second response. It finds the closest point, on the line to the other >>> point, and then you need to take the distance between the two. If you >>> use Pythagorean theorem, it will give you distance in whatever >>> measurement the projection of your map is in. >>> >>> newbie wrote: >>> >>>> Dear Chris, I am a bit confuse. So the d will be in what measurement >>>> is it meter or km ? Then if is + or - what is the difference too. >>>> Thank you. >>>> >>>> Chris Adams wrote: >>>> Here's a C++ function (Should be easy to convert to JavaScript) /* >>>> Taken from Robert Sedgewick, Algorithms in C++ */ /* returns >>>> whether, in traveling from the first to the second to the third >>>> point, we turn counterclockwise (+1) or not (-1) */ int ccw( Point >>>> p0, Point p1, Point p2 ) { int dx1, dx2, dy1, dy2; dx1 = p1.x - >>>> p0.x; dy1 = p1.y - p0.y; dx2 = p2.x - p0.x; dy2 = p2.y - p0.y; if >>>> (dx1*dy2 > dy1*dx2) return +1; if (dx1*dy2 < dy1*dx2) return -1; >>>> if ((dx1*dx2 < 0) || (dy1*dy2 < 0)) return -1; if ((dx1*dx1 + >>>> dy1*dy1) < (dx2*dx2 + dy2*dy2)) return +1; return 0; } >From this >>>> post on GameDev.net >>>> http://www.gamedev.net/community/forums/topic.asp?topic_id=457450 >>>> Note it will also return 0 if the point is precisely on the line. >>>> The deals with turn directions, so it depends on the ordering of >>>> the points on the line. To get around this, you'll want to swap p0 >>>> and p1, if if p1 is below p0. (If p1's latitude is smaller than >>>> p0's) newbie wrote: > Dear All, > Just say I got a pair of lat and >>>> long p1 and p2 and I draw a line > based on both the points. So >>>> now I want to know if a particular point in the > parallel range >>>> of say 50m either on left or right sides of the line. How can > I >>>> decide this what is the formula please ? > >>>> _______________________________________________ Users mailing list >>>> Users@openlayers.org http://openlayers.org/mailman/listinfo/users >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> View this message in context: Re: Point in parrallel with line formula >>>> >>>> Sent from the OpenLayers Users mailing list archive >>>> at Nabble.com. >>>> ------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> >> >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Point-in-parrallel-with-line-formula-tp2742247p2754090.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From chris at genieknows.com Fri May 1 12:45:46 2009 From: chris at genieknows.com (Chris Adams) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Point in parrallel with line formula In-Reply-To: <1241195388375-2754090.post@n2.nabble.com> References: <1241028414559-2742247.post@n2.nabble.com> <49F8A835.1010807@genieknows.com> <1241093136728-2746662.post@n2.nabble.com> <49F9AD63.9060708@genieknows.com> <1241102772896-2747552.post@n2.nabble.com> <49F9DAB0.7070708@genieknows.com> <1241195388375-2754090.post@n2.nabble.com> Message-ID: <49FB273A.2030001@genieknows.com> Here is a JavaScript code which will calculate the distance in meters. The points are (lon1, lat1) and (lon2, lat2) var R = 6371*1000; // m var dLat = (lat2-lat1).toRad(); var dLon = (lon2-lon1).toRad(); var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) * Math.sin(dLon/2) * Math.sin(dLon/2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); var d = R * c; Also, if you are using Java, you will want to preform all the operations from previous equations sent to you from me, using floats or doubles. newbie wrote: > Dear Chris, > My data is in Latitude/Longitude. Ok I have used the java > sample code giving in the exercise. Only thing now I need to confirm is that > what is distance output in wat format ? Thank you. > > Chris Adams wrote: > >> For the second part, you use this equation first, to find 'u': >> >> http://local.wasp.uwa.edu.au/~pbourke/geometry/pointline/pointline2.gif >> (Where (x1,y1)-(x2,y2) is the line, and (x3,y3) is the point) >> >> Then, you use this equation: >> >> x = x1 + u (x2 - x1) >> y = y1 + u (y2 - y1) >> >> to calculate the new point (x,y) >> >> Then you have to use some distance equation, to find the distance >> between (x3,y3) and (x,y). >> >> Is your data in Latitude/Longitude? or Spherical Mercator? or something >> else? >> >> newbie wrote: >> >>> Dear Chris, >>> So once I have I have decide whether is +1 or -1 then I >>> must >>> apply the other formula. So must I still apply the first formula to >>> decide >>> +1 or -1 or can I just go to the second formula. Secondly I still cant >>> really see the implementation of the formula. So is there any example >>> implementation of this formula cause I dont know to how to get the answer >>> in >>> metres? Thank you. >>> >>> Chris Adams wrote: >>> >>> >>>> +1 means to the left >>>> -1 means to the right >>>> >>>> before calling the 'ccw' function, you'll want to order p0 and p1 so >>>> that p0 has the smaller latitude >>>> >>>> To get the distance on the left or right, use the formula linked from my >>>> second response. It finds the closest point, on the line to the other >>>> point, and then you need to take the distance between the two. If you >>>> use Pythagorean theorem, it will give you distance in whatever >>>> measurement the projection of your map is in. >>>> >>>> newbie wrote: >>>> >>>> >>>>> Dear Chris, I am a bit confuse. So the d will be in what measurement >>>>> is it meter or km ? Then if is + or - what is the difference too. >>>>> Thank you. >>>>> >>>>> Chris Adams wrote: >>>>> Here's a C++ function (Should be easy to convert to JavaScript) /* >>>>> Taken from Robert Sedgewick, Algorithms in C++ */ /* returns >>>>> whether, in traveling from the first to the second to the third >>>>> point, we turn counterclockwise (+1) or not (-1) */ int ccw( Point >>>>> p0, Point p1, Point p2 ) { int dx1, dx2, dy1, dy2; dx1 = p1.x - >>>>> p0.x; dy1 = p1.y - p0.y; dx2 = p2.x - p0.x; dy2 = p2.y - p0.y; if >>>>> (dx1*dy2 > dy1*dx2) return +1; if (dx1*dy2 < dy1*dx2) return -1; >>>>> if ((dx1*dx2 < 0) || (dy1*dy2 < 0)) return -1; if ((dx1*dx1 + >>>>> dy1*dy1) < (dx2*dx2 + dy2*dy2)) return +1; return 0; } >From this >>>>> post on GameDev.net >>>>> http://www.gamedev.net/community/forums/topic.asp?topic_id=457450 >>>>> Note it will also return 0 if the point is precisely on the line. >>>>> The deals with turn directions, so it depends on the ordering of >>>>> the points on the line. To get around this, you'll want to swap p0 >>>>> and p1, if if p1 is below p0. (If p1's latitude is smaller than >>>>> p0's) newbie wrote: > Dear All, > Just say I got a pair of lat and >>>>> long p1 and p2 and I draw a line > based on both the points. So >>>>> now I want to know if a particular point in the > parallel range >>>>> of say 50m either on left or right sides of the line. How can > I >>>>> decide this what is the formula please ? > >>>>> _______________________________________________ Users mailing list >>>>> Users@openlayers.org http://openlayers.org/mailman/listinfo/users >>>>> >>>>> >>>>> ------------------------------------------------------------------------ >>>>> View this message in context: Re: Point in parrallel with line formula >>>>> >>>>> Sent from the OpenLayers Users mailing list archive >>>>> at Nabble.com. >>>>> ------------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users@openlayers.org >>>>> http://openlayers.org/mailman/listinfo/users >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>>> >>>> >>> >>> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > From shai_mus at hotmail.com Fri May 1 12:56:20 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Point in parrallel with line formula In-Reply-To: <49FB273A.2030001@genieknows.com> References: <1241028414559-2742247.post@n2.nabble.com> <49F8A835.1010807@genieknows.com> <1241093136728-2746662.post@n2.nabble.com> <49F9AD63.9060708@genieknows.com> <1241102772896-2747552.post@n2.nabble.com> <49F9DAB0.7070708@genieknows.com> <1241195388375-2754090.post@n2.nabble.com> <49FB273A.2030001@genieknows.com> Message-ID: <1241196980997-2754192.post@n2.nabble.com> Dear Chris, I am actually using php at my backend is ok I will try to figure out how to convert your given javascript function. So this function is sufficient rite to decide in meters ? Thank you. Chris Adams wrote: > > Here is a JavaScript code which will calculate the distance in meters. The > points are (lon1, lat1) and (lon2, lat2) > > var R = 6371*1000; // m > var dLat = (lat2-lat1).toRad(); > var dLon = (lon2-lon1).toRad(); > var a = Math.sin(dLat/2) * Math.sin(dLat/2) + > Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) * > Math.sin(dLon/2) * Math.sin(dLon/2); > var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); > var d = R * c; > > Also, if you are using Java, you will want to preform all the operations > from previous equations sent to you from me, using floats or doubles. > > newbie wrote: >> Dear Chris, >> My data is in Latitude/Longitude. Ok I have used the java >> sample code giving in the exercise. Only thing now I need to confirm is >> that >> what is distance output in wat format ? Thank you. >> >> Chris Adams wrote: >> >>> For the second part, you use this equation first, to find 'u': >>> >>> http://local.wasp.uwa.edu.au/~pbourke/geometry/pointline/pointline2.gif >>> (Where (x1,y1)-(x2,y2) is the line, and (x3,y3) is the point) >>> >>> Then, you use this equation: >>> >>> x = x1 + u (x2 - x1) >>> y = y1 + u (y2 - y1) >>> >>> to calculate the new point (x,y) >>> >>> Then you have to use some distance equation, to find the distance >>> between (x3,y3) and (x,y). >>> >>> Is your data in Latitude/Longitude? or Spherical Mercator? or something >>> else? >>> >>> newbie wrote: >>> >>>> Dear Chris, >>>> So once I have I have decide whether is +1 or -1 then I >>>> must >>>> apply the other formula. So must I still apply the first formula to >>>> decide >>>> +1 or -1 or can I just go to the second formula. Secondly I still cant >>>> really see the implementation of the formula. So is there any example >>>> implementation of this formula cause I dont know to how to get the >>>> answer >>>> in >>>> metres? Thank you. >>>> >>>> Chris Adams wrote: >>>> >>>> >>>>> +1 means to the left >>>>> -1 means to the right >>>>> >>>>> before calling the 'ccw' function, you'll want to order p0 and p1 so >>>>> that p0 has the smaller latitude >>>>> >>>>> To get the distance on the left or right, use the formula linked from >>>>> my >>>>> second response. It finds the closest point, on the line to the other >>>>> point, and then you need to take the distance between the two. If you >>>>> use Pythagorean theorem, it will give you distance in whatever >>>>> measurement the projection of your map is in. >>>>> >>>>> newbie wrote: >>>>> >>>>> >>>>>> Dear Chris, I am a bit confuse. So the d will be in what measurement >>>>>> is it meter or km ? Then if is + or - what is the difference too. >>>>>> Thank you. >>>>>> >>>>>> Chris Adams wrote: >>>>>> Here's a C++ function (Should be easy to convert to JavaScript) >>>>>> /* >>>>>> Taken from Robert Sedgewick, Algorithms in C++ */ /* returns >>>>>> whether, in traveling from the first to the second to the third >>>>>> point, we turn counterclockwise (+1) or not (-1) */ int ccw( >>>>>> Point >>>>>> p0, Point p1, Point p2 ) { int dx1, dx2, dy1, dy2; dx1 = p1.x - >>>>>> p0.x; dy1 = p1.y - p0.y; dx2 = p2.x - p0.x; dy2 = p2.y - p0.y; if >>>>>> (dx1*dy2 > dy1*dx2) return +1; if (dx1*dy2 < dy1*dx2) return -1; >>>>>> if ((dx1*dx2 < 0) || (dy1*dy2 < 0)) return -1; if ((dx1*dx1 + >>>>>> dy1*dy1) < (dx2*dx2 + dy2*dy2)) return +1; return 0; } >From this >>>>>> post on GameDev.net >>>>>> http://www.gamedev.net/community/forums/topic.asp?topic_id=457450 >>>>>> Note it will also return 0 if the point is precisely on the line. >>>>>> The deals with turn directions, so it depends on the ordering of >>>>>> the points on the line. To get around this, you'll want to swap >>>>>> p0 >>>>>> and p1, if if p1 is below p0. (If p1's latitude is smaller than >>>>>> p0's) newbie wrote: > Dear All, > Just say I got a pair of lat >>>>>> and >>>>>> long p1 and p2 and I draw a line > based on both the points. So >>>>>> now I want to know if a particular point in the > parallel range >>>>>> of say 50m either on left or right sides of the line. How can > I >>>>>> decide this what is the formula please ? > >>>>>> _______________________________________________ Users mailing >>>>>> list >>>>>> Users@openlayers.org http://openlayers.org/mailman/listinfo/users >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------ >>>>>> View this message in context: Re: Point in parrallel with line >>>>>> formula >>>>>> >>>>>> Sent from the OpenLayers Users mailing list archive >>>>>> at Nabble.com. >>>>>> ------------------------------------------------------------------------ >>>>>> >>>>>> _______________________________________________ >>>>>> Users mailing list >>>>>> Users@openlayers.org >>>>>> http://openlayers.org/mailman/listinfo/users >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users@openlayers.org >>>>> http://openlayers.org/mailman/listinfo/users >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> >> >> > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Point-in-parrallel-with-line-formula-tp2742247p2754192.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From ashley_c_mort at raytheon.com Fri May 1 15:32:20 2009 From: ashley_c_mort at raytheon.com (ashley_c_mort) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] SelectFeature.js right-click? In-Reply-To: Message-ID: <004601c9ca93$8b4073b0$22099195@us.ray.com> I have another newbie question here. Has anyone implemented a way to detect a right-click on a feature (SelectFeature.js)? I currently pop up a menu when the user clicks on a feature but I'd like to display a different menu upon right click. Any ideas? Has anyone gone down this path? Thanks! From bthoen at gisnet.com Fri May 1 17:10:47 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Can't Convert Coordinates to Picels and Back Again Message-ID: <49FB6557.6040209@gisnet.com> Just trying to debug a box drawing routine, I got this error: *this.getViewPortPxFromLonLat is not a function* on Line #746 in file: http://mydomain.com/ol/OpenLayers.js What I did to produce it was this (I'm just taking a valid coordinate, converting it to a pixel and the trying to convert that pixel back to the original coordinate): var swpx = new map.getPixelFromLonLat( 2160077, 1575258 ); alert ( swpx.x + " " + swpx.y ); var sw = new map.getLonLatFromPixel( swpx ); alert( sw.x +" " + sw.y ); I'm using Colorado State Plane (ESPG 2232) and the map seems to be working just fine. The only weird problem is this happening deep in the OL code out of my reach, and I don't know why it's happening. I'm using OL 2.7.* * What am I not doing right here? Although the function says LonLat, the docs say x,y, so I assume that I can use these functions on projected coordinates... but maybe not? - Bill Thoen From bthoen at gisnet.com Fri May 1 17:41:26 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Can't Convert Coordinates to Picels and Back Again In-Reply-To: <49FB6557.6040209@gisnet.com> References: <49FB6557.6040209@gisnet.com> Message-ID: <49FB6C86.8000108@gisnet.com> Never mind, I think I got it. You don't use 'new' with these functions. Bill Thoen wrote: > Just trying to debug a box drawing routine, I got this error: > > *this.getViewPortPxFromLonLat is not a function* > > on Line #746 in file: http://mydomain.com/ol/OpenLayers.js > > What I did to produce it was this (I'm just taking a valid coordinate, > converting it to a pixel and the trying to convert that pixel back to > the original coordinate): > var swpx = new map.getPixelFromLonLat( 2160077, 1575258 ); > alert ( swpx.x + " " + swpx.y ); > var sw = new map.getLonLatFromPixel( swpx ); > alert( sw.x +" " + sw.y ); > > I'm using Colorado State Plane (ESPG 2232) and the map seems to be > working just fine. The only weird problem is this happening deep in the > OL code out of my reach, and I don't know why it's happening. I'm using > OL 2.7.* > * > > What am I not doing right here? Although the function says LonLat, the > docs say x,y, so I assume that I can use these functions on projected > coordinates... but maybe not? > > - Bill Thoen > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From mcg42387 at gmail.com Fri May 1 19:59:18 2009 From: mcg42387 at gmail.com (cole gillespie) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Problem with Mapserver + PostGIS + Openlayers Message-ID: Users, I am having trouble with my Openlayers map. I have a mapfile that I am trying to view inside of Openlayers. I feel like I am doing every thing right but all I am getting to show up inside of Openlayers is a white image. Below I will include both my map file and my openlayers html file. Any suggestions on what I am doing wrong would be greatly appreciated. ///////////////////////////////Mapfile/////////////////////////////////////////// MAP EXTENT -84.321869 33.752878 -75.400119 36.588157 FONTSET "fonts/fonts.list" IMAGECOLOR 255 255 255 IMAGETYPE png SHAPEPATH "/ms4w/apps/tutorial/data" SIZE 800 600 STATUS ON UNITS METERS NAME "MS" OUTPUTFORMAT NAME "png" MIMETYPE "image/png" DRIVER "GD/PNG" EXTENSION "png" IMAGEMODE "PC256" TRANSPARENT FALSE END OUTPUTFORMAT NAME "AGG" MIMETYPE "image/png; mode=24bit" DRIVER "AGG/PNG" EXTENSION "png" IMAGEMODE "RGB" TRANSPARENT FALSE END PROJECTION "init=epsg:32119" END LEGEND IMAGECOLOR 255 255 255 KEYSIZE 20 10 KEYSPACING 5 5 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL STATUS OFF END QUERYMAP COLOR 255 255 0 SIZE -1 -1 STATUS OFF STYLE HILITE END SCALEBAR ALIGN CENTER COLOR 0 0 0 IMAGECOLOR 255 255 255 INTERVALS 4 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL SIZE 200 3 STATUS OFF STYLE 0 UNITS MILES END WEB IMAGEPATH "/ms4w/apache/htdocs/tmp/ms_tmp" IMAGEURL "tmp/ms_tmp" QUERYFORMAT text/html LEGENDFORMAT text/html BROWSEFORMAT text/html END LAYER CONNECTION "user=postgres dbname=postgis password=help37546" CONNECTIONTYPE POSTGIS DATA "the_geom FROM ( SELECT Zipcodes.the_geom AS the_geom, Zipcodes.gid as gid, Zip.income as income FROM zipcodes JOIN zip ON zipcodes.zcta = zip.zcta) AS new_table USING UNIQUE gid USING SRID=-1" FILTER "income > 0 and income <= 200000" NAME "themelayer" PROJECTION "init=epsg:32119" END STATUS ON TYPE POLYGON UNITS METERS CLASS STYLE ANGLE 360 COLOR 255 228 181 OPACITY 100 SYMBOL 0 END END END END /////////////////////////////////////openlayers file/////////////////////////////////////////////////////// MapServer Layer
MapServer Layer
Shows MapServer Layer
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090501/e9247976/attachment.html From kwonghu at hotmail.com Fri May 1 23:36:13 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Tiff file Calculation. Message-ID: Hi, If anyone knows if Openlayers has any function to calculate the Tiff file ? double pixelHeight = (topLeftPoint.Y - lowerRightPoint.Y) / imageSize.Height; double pixelWidth = (lowerRightPoint.X - topLeftPoint.X) / imageSize.Width; I have done it before in c#. So openlayers has any utility that allow me to get the topleft point and image's width ? (Or) Someone must have already written a control for it and i just need to download from the trunk area. Cheers. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090502/24c523f7/attachment.html From crschmidt at metacarta.com Fri May 1 23:59:30 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Can't Convert Coordinates to Picels and Back Again In-Reply-To: <49FB6557.6040209@gisnet.com> References: <49FB6557.6040209@gisnet.com> Message-ID: <20090502035930.GL29456@metacarta.com> On Fri, May 01, 2009 at 03:10:47PM -0600, Bill Thoen wrote: > Just trying to debug a box drawing routine, I got this error: > > *this.getViewPortPxFromLonLat is not a function* > > on Line #746 in file: http://mydomain.com/ol/OpenLayers.js > > What I did to produce it was this (I'm just taking a valid coordinate, > converting it to a pixel and the trying to convert that pixel back to > the original coordinate): > var swpx = new map.getPixelFromLonLat( 2160077, 1575258 ); > alert ( swpx.x + " " + swpx.y ); > var sw = new map.getLonLatFromPixel( swpx ); ^^^ Don't put a new here. > alert( sw.x +" " + sw.y ); > > I'm using Colorado State Plane (ESPG 2232) and the map seems to be > working just fine. The only weird problem is this happening deep in the > OL code out of my reach, and I don't know why it's happening. I'm using > OL 2.7.* > * > > What am I not doing right here? Although the function says LonLat, the > docs say x,y, so I assume that I can use these functions on projected > coordinates... but maybe not? > > - Bill Thoen > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From xiaying4415139 at 163.com Sat May 2 00:00:53 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Get point on line? In-Reply-To: <49F98E5B.60702@gisnet.com> References: <1241003641682-2739966.post@n2.nabble.com> <49F8545A.3090801@gisnet.com> <1241018119591-2741167.post@n2.nabble.com> <49F98E5B.60702@gisnet.com> Message-ID: <1241236853347-2759313.post@n2.nabble.com> Hi, Bill Thoen, I go to the website and find the formulary I want. As following: Point(s) known distance from a great circle Let points A and B define a great circle route and D be a third point. Find the points on the great circle through A and B that lie a distance d from D, if they exist. A = crs_AD - crs_AB ( crs_AB and crs_AD are the initial GC bearings from A to B and D, respectively. Compute using Course between points) b = dist_AD (dist_AD is the distance from A to D. Compute using Distance between points) r=(cos(b)^2+sin(b)^2*cos(A)^2)^(1/2) (acos(r) is the XTD) p=atan2(sin(b)*cos(A),cos(b)) (p is the ATD) IF (cos(d)^2 > r^2) THEN No points exist ELSE Two points exist dp = p +- acos(cos(d)/r) ENDIF dp are the distances of the desired points from A along AB. Their lat/lons can be computed using Lat/lon given radial and distance But I want to know, Is there any such fomulary in OpenLayers to help me simplify the algorithm? For example, I know "OpenLayers.Util.distVencenty", this method can calculate the distance between two points. Does openlayers also have such functions can help me? Thank you. My math is not so good. Write the algorithm in js all by myself is so difficult for me. Bill Thoen wrote: > > Yes, it's a little different for the spherical (Lon/Lat) case. For those > formulas, check out Ed Williams' Aviation Formulary website at > http://williams.best.vwh.net/avform.htm. What you're looking for is > determining waypoint locations, i think. > > - Bill Thoen > > shane_china wrote: >> >> Bill Thoen wrote: >> >>> shane_china wrote: >>> >>>> In openlayers, >>>> I have a straight line with two endpoints. How could I get a point on >>>> the >>>> line with given distance to one endpoint? Thank you. >>>> >>>> >>> You can find a point anywhere on a line by using a ratio calculation. >>> Start with the distance to your point divided by the total distance of >>> your line, then your new X coordinate = the difference between the X >>> coordinates of the endpoints times the ratio (plus the X coordinate of >>> the starting line endpoint. For example, if your endpoints are at >>> coordinates (X0, Y0) and (X1,Y1) then the Cartesian distance is >>> >>> D = sqrt((X1-X0)*(X1-X0) + (Y1-Y0)*(Y1-Y0)) >>> >>> Then if the ratio between this and the distance to your point is d, your >>> new point's coordinates will be: >>> >>> X= X0+(X1-X0)*d/D >>> Y=Y0+(Y1-Y0)*d/D >>> >> >> So thank you for your answer. Your advise is in X-Y coodinates. Does this >> method also apply to lon lat coodinates? Our earth is a ball, so is it >> different? >> I haven't demonstrate it yet. >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Get-point-on-line--tp2739966p2759313.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From albin.blaschka at standortsanalyse.net Sat May 2 09:04:08 2009 From: albin.blaschka at standortsanalyse.net (Albin Blaschka) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Markers change position after zooming Message-ID: <49FC44C8.4070307@standortsanalyse.net> Dear List, I am putting together a small utility for a group of botanists on the basis of Openlayers (Trying 2.8 RC1, hosted version). Two simple usecases: * The user clicks on the map to set a marker * The user gives some coordinates via two input boxes - on this coordinate a marker should be set. So far, so good - or not quite: The markers are set accordingly, but after changing the zoom level the markers are not on the original place anymore. I found Ticket #1766, which seems at least related, but it is marked closed... I am following the examples on the Openlayers Website, just with small modifications for my region... I am setting the markers in this way: // Triggered after click... var proj = new OpenLayers.Projection("EPSG:4326"); var lonlat = map.getLonLatFromViewPortPx(e.xy,proj); addPoint(lonlat); function addPoint(point) { var url = 'http://boston.openguides.org/markers/YELLOW.png'; var sz = new OpenLayers.Size(10, 17); var calculateOffset = function(size) { return new OpenLayers.Pixel(-(size.w/2), -size.h); }; var icon = new OpenLayers.Icon(url, sz, null, calculateOffset); var marker = new OpenLayers.Marker(point, icon); markers.addMarker(marker); } Everything is online: http://maps.sabotag.at (sorry, everything is in german...and still in heavy development...) Any hints appreciated... Thanks in advance, Albin -- --------------------------------------------------------------------- | Albin Blaschka, Mag. rer.nat - Salzburg, Austria | http://www.albinblaschka.info http://www.thinkanimal.info | It's hard to live in the mountains, hard, but not hopeless! --------------------------------------------------------------------- From bthoen at gisnet.com Sat May 2 09:28:40 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Get point on line? In-Reply-To: <1241236853347-2759313.post@n2.nabble.com> References: <1241003641682-2739966.post@n2.nabble.com> <49F8545A.3090801@gisnet.com> <1241018119591-2741167.post@n2.nabble.com> <49F98E5B.60702@gisnet.com> <1241236853347-2759313.post@n2.nabble.com> Message-ID: <49FC4A88.1050804@gisnet.com> I put an article about great circle algorithms in the wiki some time ago that might help you. The links to the demos are down right now (that server needs a power supply I think) but the algorithms and formulas are shown on the wiki page at http://trac.openlayers.org/wiki/GreatCircleAlgorithms. Hopefully that will give you enough help to complete your task. Unfortunately, I'm swamped with my own OpenLayers problems right now, so I don't have any free time to help you much more than that. JavaScript and OpenLayers is so much fun that it's all too easy to program yourself into places you have no business being. But if you got the answers to all your problems immediately, your heart wouldn't become purified by the long quest. Good luck! - Bill Thoen shane_china wrote: > Hi, Bill Thoen, I go to the website and find the formulary I want. As > following: > Point(s) known distance from a great circle > Let points A and B define a great circle route and D be a third point. Find > the points on the great circle through A and B that lie a distance d from D, > if they exist. > A = crs_AD - crs_AB > > ( crs_AB and crs_AD are the initial GC bearings from A to B and D, > respectively. Compute using Course between points) > > b = dist_AD > > (dist_AD is the distance from A to D. Compute using Distance between points) > > r=(cos(b)^2+sin(b)^2*cos(A)^2)^(1/2) > > (acos(r) is the XTD) > > p=atan2(sin(b)*cos(A),cos(b)) > > (p is the ATD) > > IF (cos(d)^2 > r^2) THEN > No points exist > ELSE > Two points exist > dp = p +- acos(cos(d)/r) > ENDIF > > dp are the distances of the desired points from A along AB. Their lat/lons > can be computed using Lat/lon given radial and distance > > But I want to know, Is there any such fomulary in OpenLayers to help me > simplify the algorithm? For example, I know "OpenLayers.Util.distVencenty", > this method can calculate the distance between two points. Does openlayers > also have such functions can help me? Thank you. > > My math is not so good. Write the algorithm in js all by myself is so > difficult for me. > > > > > Bill Thoen wrote: > >> Yes, it's a little different for the spherical (Lon/Lat) case. For those >> formulas, check out Ed Williams' Aviation Formulary website at >> http://williams.best.vwh.net/avform.htm. What you're looking for is >> determining waypoint locations, i think. >> >> - Bill Thoen >> >> shane_china wrote: >> >>> Bill Thoen wrote: >>> >>> >>>> shane_china wrote: >>>> >>>> >>>>> In openlayers, >>>>> I have a straight line with two endpoints. How could I get a point on >>>>> the >>>>> line with given distance to one endpoint? Thank you. >>>>> >>>>> >>>>> >>>> You can find a point anywhere on a line by using a ratio calculation. >>>> Start with the distance to your point divided by the total distance of >>>> your line, then your new X coordinate = the difference between the X >>>> coordinates of the endpoints times the ratio (plus the X coordinate of >>>> the starting line endpoint. For example, if your endpoints are at >>>> coordinates (X0, Y0) and (X1,Y1) then the Cartesian distance is >>>> >>>> D = sqrt((X1-X0)*(X1-X0) + (Y1-Y0)*(Y1-Y0)) >>>> >>>> Then if the ratio between this and the distance to your point is d, your >>>> new point's coordinates will be: >>>> >>>> X= X0+(X1-X0)*d/D >>>> Y=Y0+(Y1-Y0)*d/D >>>> >>>> >>> So thank you for your answer. Your advise is in X-Y coodinates. Does this >>> method also apply to lon lat coodinates? Our earth is a ball, so is it >>> different? >>> I haven't demonstrate it yet. >>> >>> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> > > From paweluz at o2.pl Sat May 2 10:03:15 2009 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Get point on line? In-Reply-To: <1241003641682-2739966.post@n2.nabble.com> References: <1241003641682-2739966.post@n2.nabble.com> Message-ID: <1241272995135-2767539.post@n2.nabble.com> Hi! You can use this: select astext(ST_LINE_SUBSTRING( ST_LineMerge(the_geom), 0, 0.5)) from table (the_geom is the line geometry) This returns the line geometry equals half of the the_geom. If you have line geometry it returns half of it. Then you can get the last point of that geometry I guess. This: ST_line_locate_point(st_linemerge(the_geom),GeometryFromText('POINT(0 4)',900913))) This returns the value from 0 to 1 - how far is the point from the begining of the geometry I know this is not answer for you question fut you may look for similar function :) I have been using those and it works great :) Regards Paul -- View this message in context: http://n2.nabble.com/Get-point-on-line--tp2739966p2767539.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Sat May 2 10:11:29 2009 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Get point on line? In-Reply-To: <1241003641682-2739966.post@n2.nabble.com> References: <1241003641682-2739966.post@n2.nabble.com> Message-ID: <1241273489574-2767657.post@n2.nabble.com> well.. - get the length of all geometry - ST_Length(geometry) e.g length = 120.0 m - what distance you want your new point e.g in 45.0 m then you do : 120x=45 /120 x=0.375 - then you do select astext(ST_LINE_SUBSTRING( ST_LineMerge(the_geom), 0, 0.375)) from table - then get the last point of the new line geometry... I think that is all :) good luck :) -- View this message in context: http://n2.nabble.com/Get-point-on-line--tp2739966p2767657.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Sat May 2 13:43:20 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Problem with Mapserver + PostGIS + Openlayers In-Reply-To: Message-ID: Hi, add maxResolution and maxExtent to your map declaration, then it should work. map = new OpenLayers.Map('map', { ... maxResolution: Math.abs(117107.3758-940177.4915)/256, maxExtent: new OpenLayers.Bounds(117107.3758, 11491.8435, 940177.4915, 326719.7326), ... the bounds come from : http://spatialreference.org/ref/epsg/32119/ * WGS84 Bounds: -84.3200, 33.8000, -75.4300, 36.5800 * Projected Bounds: 117107.3758, 11491.8435, 940177.4915, 326719.7326 * Scope: Large and medium scale topographic mapping and engineering survey. * Last Revised: 2007-01-19 * Area: USA - North Carolina By the way. In the mapfile you should use extent in the same projection as your map projection, also it doesn't effect the output. Arnd _____ Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von cole gillespie Gesendet: Samstag, 2. Mai 2009 01:59 An: users@openlayers.org Betreff: [OpenLayers-Users] Problem with Mapserver + PostGIS + Openlayers Users, I am having trouble with my Openlayers map. I have a mapfile that I am trying to view inside of Openlayers. I feel like I am doing every thing right but all I am getting to show up inside of Openlayers is a white image. Below I will include both my map file and my openlayers html file. Any suggestions on what I am doing wrong would be greatly appreciated. ///////////////////////////////Mapfile////////////////////////////////////// ///// MAP EXTENT -84.321869 33.752878 -75.400119 36.588157 FONTSET "fonts/fonts.list" IMAGECOLOR 255 255 255 IMAGETYPE png SHAPEPATH "/ms4w/apps/tutorial/data" SIZE 800 600 STATUS ON UNITS METERS NAME "MS" OUTPUTFORMAT NAME "png" MIMETYPE "image/png" DRIVER "GD/PNG" EXTENSION "png" IMAGEMODE "PC256" TRANSPARENT FALSE END OUTPUTFORMAT NAME "AGG" MIMETYPE "image/png; mode=24bit" DRIVER "AGG/PNG" EXTENSION "png" IMAGEMODE "RGB" TRANSPARENT FALSE END PROJECTION "init=epsg:32119" END LEGEND IMAGECOLOR 255 255 255 KEYSIZE 20 10 KEYSPACING 5 5 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL STATUS OFF END QUERYMAP COLOR 255 255 0 SIZE -1 -1 STATUS OFF STYLE HILITE END SCALEBAR ALIGN CENTER COLOR 0 0 0 IMAGECOLOR 255 255 255 INTERVALS 4 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL SIZE 200 3 STATUS OFF STYLE 0 UNITS MILES END WEB IMAGEPATH "/ms4w/apache/htdocs/tmp/ms_tmp" IMAGEURL "tmp/ms_tmp" QUERYFORMAT text/html LEGENDFORMAT text/html BROWSEFORMAT text/html END LAYER CONNECTION "user=postgres dbname=postgis password=help37546" CONNECTIONTYPE POSTGIS DATA "the_geom FROM ( SELECT Zipcodes.the_geom AS the_geom, Zipcodes.gid as gid, Zip.income as income FROM zipcodes JOIN zip ON zipcodes.zcta = zip.zcta) AS new_table USING UNIQUE gid USING SRID=-1" FILTER "income > 0 and income <= 200000" NAME "themelayer" PROJECTION "init=epsg:32119" END STATUS ON TYPE POLYGON UNITS METERS CLASS STYLE ANGLE 360 COLOR 255 228 181 OPACITY 100 SYMBOL 0 END END END END /////////////////////////////////////openlayers file/////////////////////////////////////////////////////// MapServer Layer
MapServer Layer
Shows MapServer Layer
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090502/1fc7362f/attachment.html From bartvde at osgis.nl Sat May 2 15:24:22 2009 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] vector layer with WFS protocol: load wheninvisible? In-Reply-To: <12905.145.50.39.11.1241012845.squirrel@webmail.hostingdiscounter.nl> References: <44459.145.50.39.11.1241007966.squirrel@webmail.hostingdiscounter.nl> <38757.145.50.39.11.1241010562.squirrel@webmail.hostingdiscounter.nl> <51074.145.50.39.11.1241010801.squirrel@webmail.hostingdiscounter.nl> <12905.145.50.39.11.1241012845.squirrel@webmail.hostingdiscounter.nl> Message-ID: <49FC9DE6.6040905@osgis.nl> Okay, I finally found some time (and energy) to track this one down, I've opened up: http://trac.openlayers.org/ticket/2072#preview for further discussion. Best regards, Bart bartvde@osgis.nl wrote: > Could this have to do something with allOverlays: true which I am using? > > I've changed back the sequence of layers (should be up in 5 minutes) so > it's reproduceable in the following example (the GNIS population is the > WFS layer), switch it off and zoom to max extent you'll see the WFS > request for the whole world going off. > > http://dev.openlayers.org/sandbox/bartvde/owscontext/openlayers/examples/owscontext.html > > Best regards, > Bart > > >> It only happens if the WFS layer is the first one in the layers stack, so >> map.layers[0]. I'll try and investigate further. >> >> Best regards, >> Bart >> >> >>> Hey Kris, >>> >>> thanks for your reply. Strangely enough I cannot reproduce it anymore, >>> my >>> sandbox was created off trunk 2 days ago. >>> >>> http://dev.openlayers.org/sandbox/bartvde/owscontext/openlayers/examples/owscontext.html >>> >>> Best regards, >>> Bart >>> >>> >>>> Hi Bart, >>>> >>>> I have the same setup but when layer is created with visibility: false >>>> no requests are made until visibility is changed. >>>> Are you sure you use the last trunk version. I believe there has been >>>> some changes to activate protocol later than originally was done. >>>> >>>> Cheers Kris >>>> >>>> -----Original Message----- >>>> From: users-bounces@openlayers.org >>>> [mailto:users-bounces@openlayers.org] >>>> On Behalf Of bartvde@osgis.nl >>>> Sent: Wednesday, April 29, 2009 2:26 PM >>>> To: users@openlayers.org >>>> Subject: [OpenLayers-Users] vector layer with WFS protocol: load >>>> wheninvisible? >>>> >>>> Hi list, >>>> >>>> using trunk I see that a vector layer with a BBOX strategy and a WFS >>>> protocol does request data even if it is not visible in the map. >>>> >>>> Is this intentional / by design? >>>> >>>> Best regards, >>>> Bart >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@openlayers.org >>>> http://openlayers.org/mailman/listinfo/users >>>> >>>> >>> >>> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> > > > > > -- Bart van den Eijnden OSGIS, Open Source GIS bartvde@osgis.nl http://www.osgis.nl From crschmidt at metacarta.com Sat May 2 18:29:06 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] White House Website using OpenLayers Message-ID: <20090502222906.GB1510@metacarta.com> http://www.whitehouse.gov/change/ A map put together by the white house using OpenLayers, including stories of people who are "delivering on change". Regards, -- Christopher Schmidt MetaCarta From ashore3 at verizon.net Sat May 2 20:31:31 2009 From: ashore3 at verizon.net (Arnie Shore) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] White House Website using OpenLayers In-Reply-To: <20090502222906.GB1510@metacarta.com> References: <20090502222906.GB1510@metacarta.com> Message-ID: <49FCE5E3.8070002@verizon.net> That IS nice news. When DoD announced their new 'Open Source' initiative, the described it as using Flash and MS SqlServer. Sheeesh! (But who knows? Mebbe through some still-secret initiative DoD got the owners to open them as OS?) AS Christopher Schmidt wrote: > http://www.whitehouse.gov/change/ > > A map put together by the white house using OpenLayers, including > stories of people who are "delivering on change". > > Regards, > From kwonghu at hotmail.com Sun May 3 04:51:01 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Tiff file Calculation. In-Reply-To: References: Message-ID: I need this urgently. No one has any idea ? Cheers. From: kwonghu@hotmail.com To: users@openlayers.org Date: Sat, 2 May 2009 11:36:13 +0800 Subject: [OpenLayers-Users] Tiff file Calculation. Hi, If anyone knows if Openlayers has any function to calculate the Tiff file ? double pixelHeight = (topLeftPoint.Y - lowerRightPoint.Y) / imageSize.Height; double pixelWidth = (lowerRightPoint.X - topLeftPoint.X) / imageSize.Width; I have done it before in c#. So openlayers has any utility that allow me to get the topleft point and image's width ? (Or) Someone must have already written a control for it and i just need to download from the trunk area. Cheers. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090503/41b04502/attachment.html From bartvde at osgis.nl Sun May 3 05:03:12 2009 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Tiff file Calculation. In-Reply-To: References: Message-ID: <49FD5DD0.5080400@osgis.nl> Not sure if this is what you mean, but: topleft point -> map.getExtent().top and map.getExtent().left width -> map.getSize().w Best regards, Bart Kwong Hu Kiu wrote: > > > I need this urgently. > > No one has any idea ? > > Cheers. > > > ------------------------------------------------------------------------ > From: kwonghu@hotmail.com > To: users@openlayers.org > Date: Sat, 2 May 2009 11:36:13 +0800 > Subject: [OpenLayers-Users] Tiff file Calculation. > > Hi, > > If anyone knows if Openlayers has any function to calculate the Tiff > file ? > > double pixelHeight = (topLeftPoint.Y - lowerRightPoint.Y) / > imageSize.Height; > double pixelWidth = (lowerRightPoint.X - topLeftPoint.X) / > imageSize.Width; > > I have done it before in c#. So openlayers has any utility that allow > me to get the topleft point and image's width ? > > (Or) > > Someone must have already written a control for it and i just need to > download from the trunk area. > > Cheers. > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Bart van den Eijnden OSGIS, Open Source GIS bartvde@osgis.nl http://www.osgis.nl From albin.blaschka at standortsanalyse.net Sun May 3 05:53:46 2009 From: albin.blaschka at standortsanalyse.net (Albin Blaschka) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Markers change position after zooming In-Reply-To: <49FC44C8.4070307@standortsanalyse.net> References: <49FC44C8.4070307@standortsanalyse.net> Message-ID: <49FD69AA.3030607@standortsanalyse.net> Albin Blaschka schrieb: > So far, so good - or not quite: > The markers are set accordingly, but after changing the zoom level the > markers are not on the original place anymore. > Dear List, I have found a solution to the problem with the jumping markers: I have to use spherical mercator projected maps. On projected maps the markers stay on the spot. best wishes, Albin -- --------------------------------------------------------------------- | Albin Blaschka, Mag. rer.nat - Salzburg, Austria | http://www.albinblaschka.info http://www.thinkanimal.info | It's hard to live in the mountains, hard, but not hopeless! --------------------------------------------------------------------- From albin.blaschka at standortsanalyse.net Sun May 3 05:55:15 2009 From: albin.blaschka at standortsanalyse.net (Albin Blaschka) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Extent with Spherical Mercator Message-ID: <49FD6A03.8040706@standortsanalyse.net> Dear List, I have the following code: var map; function initMap() { var proj = new OpenLayers.Projection("EPSG:4326"); var options = { projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m" }; map = new OpenLayers.Map('map', options); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {type: G_SATELLITE_MAP, 'sphericalMercator': true, numZoomLevels: 22} ); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP, 'sphericalMercator': true} ); map.addLayers([gsat, ghyb]); var bounds = new OpenLayers.Bounds(12.5, 47.0, 13.5, 48.0); bounds.transform(proj, map.getProjectionObject()); var point = new OpenLayers.LonLat(13.0, 47.41); point.transform(proj, map.getProjectionObject()); map.setCenter(point); } I have the following problem: I do not get my wished extent, but the whole world two times... Online at http://maps.sabotag.at What did I wrong? Any tips appreciated... Thank you in advance, best wishes from Salzburg, Austria, Albin -- --------------------------------------------------------------------- | Albin Blaschka, Mag. rer.nat - Salzburg, Austria | http://www.albinblaschka.info http://www.thinkanimal.info | It's hard to live in the mountains, hard, but not hopeless! --------------------------------------------------------------------- From eric.lemoine at camptocamp.com Sun May 3 06:51:14 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Extent with Spherical Mercator In-Reply-To: <49FD6A03.8040706@standortsanalyse.net> References: <49FD6A03.8040706@standortsanalyse.net> Message-ID: On Sunday, May 3, 2009, Albin Blaschka wrote: > > Dear List, > > I have the following code: > > var map; > function initMap() { > ? ? var proj = new OpenLayers.Projection("EPSG:4326"); > > ? ? var options = { > ? ? ? ? projection: new OpenLayers.Projection("EPSG:900913"), > ? ? ? ? displayProjection: new OpenLayers.Projection("EPSG:4326"), > ? ? ? ? units: "m" > ? ? }; > > ? ? map = new OpenLayers.Map('map', options); > > ? ? var gsat = new OpenLayers.Layer.Google( > ? ? ? ? "Google Satellite", > ? ? ? ? {type: G_SATELLITE_MAP, > ? ? ? ?'sphericalMercator': true, > ? ? ? ? numZoomLevels: 22} > ? ? ); > ? ? var ghyb = new OpenLayers.Layer.Google( > ? ? ? ? "Google Hybrid", > ? ? ? ? {type: G_HYBRID_MAP, > ? ? ? ? 'sphericalMercator': true} > ? ? ); > ? ? map.addLayers([gsat, ghyb]); > > ? ? var bounds = new OpenLayers.Bounds(12.5, 47.0, 13.5, 48.0); > ? ? bounds.transform(proj, map.getProjectionObject()); > > ? ? var point = new OpenLayers.LonLat(13.0, 47.41); > ? ? point.transform(proj, map.getProjectionObject()); > ? ? map.setCenter(point); > } > I have the following problem: I do not get my wished extent, but the > whole world two times... Online at http://maps.sabotag.at > > What did I wrong? Any tips appreciated... > > Thank you in advance, > best wishes from Salzburg, Austria, Either use map.zoomToExtent(bounds) or map.setCenter(lonlat, zoomLevel) (you don't give setCenter a zoom level in the code you provided above) Hope this helps > > Albin > > -- > --------------------------------------------------------------------- > | Albin Blaschka, Mag. rer.nat - Salzburg, Austria > | http://www.albinblaschka.info ? http://www.thinkanimal.info > | It's hard to live in the mountains, hard, but not hopeless! > --------------------------------------------------------------------- > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From kwonghu at hotmail.com Sun May 3 07:37:45 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Tiff world file Calculation. In-Reply-To: <49FD5DD0.5080400@osgis.nl> References: <49FD5DD0.5080400@osgis.nl> Message-ID: Thanks. Looks like what I need for the calculation. But i would also like to include this tiff world file and the map (bitmap) that's currently displaying on the browser inside a zip archive so the user can download and view them later. This might requires some interaction with the server. Anyone knows how I can achieve that ? Cheers. > Date: Sun, 3 May 2009 11:03:12 +0200 > From: bartvde@osgis.nl > To: kwonghu@hotmail.com > CC: users@openlayers.org > Subject: Re: [OpenLayers-Users] Tiff file Calculation. > > Not sure if this is what you mean, but: > > topleft point -> map.getExtent().top and map.getExtent().left > width -> map.getSize().w > > Best regards, > Bart > > Kwong Hu Kiu wrote: > > > > > > I need this urgently. > > > > No one has any idea ? > > > > Cheers. > > > > > > ------------------------------------------------------------------------ > > From: kwonghu@hotmail.com > > To: users@openlayers.org > > Date: Sat, 2 May 2009 11:36:13 +0800 > > Subject: [OpenLayers-Users] Tiff file Calculation. > > > > Hi, > > > > If anyone knows if Openlayers has any function to calculate the Tiff > > file ? > > > > double pixelHeight = (topLeftPoint.Y - lowerRightPoint.Y) / > > imageSize.Height; > > double pixelWidth = (lowerRightPoint.X - topLeftPoint.X) / > > imageSize.Width; > > > > I have done it before in c#. So openlayers has any utility that allow > > me to get the topleft point and image's width ? > > > > (Or) > > > > Someone must have already written a control for it and i just need to > > download from the trunk area. > > > > Cheers. > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > -- > Bart van den Eijnden > OSGIS, Open Source GIS > bartvde@osgis.nl > http://www.osgis.nl > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090503/08bf3a67/attachment.html From paweluz at o2.pl Sun May 3 07:39:40 2009 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Problem with controls on map (SelectFeature, Drawfeature) - OpenLayers, pgRouting Message-ID: <1241350780711-2777336.post@n2.nabble.com> Hi! First sorry for my poor english :). I am having some problem with the OpenLayers I guess. My application looks like this: http://img245.imageshack.us/img245/3273/aplikacja.jpg http://img245.imageshack.us/img245/3273/aplikacja.jpg It provides searchinkg bus stops and bus lines in my city. Also I recently added finding the shortest path using the pgRouting. Before I add finding the shortest path my application worked fine. I chose the bus stop from the select element, like this: http://img6.imageshack.us/img6/6494/ptrzystanki.jpg http://img6.imageshack.us/img6/6494/ptrzystanki.jpg After I choose the bus stops, it appears on the map. When I click it shows the popup with the picture, name and the bus lines like this: http://img13.imageshack.us/img13/4089/popul.jpg http://img13.imageshack.us/img13/4089/popul.jpg Everything was fine upon the time I added the pgRouting part. Now the popul menu does not work unles I: - first click on select the start point radiobutton - second click on the navigation radiobutton When I do this everything is working fine. Without this I click, click and click on the bus stop and the popup menu does not appear!!!! So there must be somethink wrong with the controls. In my application it looks like this: - code for popul menu (vector layer): vector.events.register("featureselected", vector, onFeatureSelect); vector.events.register("featureunselected", vector, onFeatureUnselect); control = new OpenLayers.Control.SelectFeature(vector); map.addControl(control); control.activate(); - code for pgRouting controls = { start: new OpenLayers.Control.DrawFeature(start, SinglePoint), stop: new OpenLayers.Control.DrawFeature(stop, SinglePoint) } for (var key in controls) { map.addControl(controls[key]); } - html code for radiobuttons looks like this



- the toggleControl() function function toggleControl(element) { for (key in controls) { if (element.value == key && element.checked) { controls[key].activate(); } else { controls[key].deactivate(); } } } So I think there is probolem with OpenLayers.Control.SelectFeature and OpenLayers.Control.DrawFeature I guess. I try to force clicking on 'select start point' and 'navigate' from code like this: document.getElementById("startToggle").select(); document.getElementById("startToggle").focus(); document.getElementById("startToggle").click(); document.getElementById("noneToggle").select(); document.getElementById("noneToggle").focus(); document.getElementById("noneToggle").click(); But it does not work. Only clicking with mouse does it right. Does anyone please can help me? Maybe someone had similar issue? Please help ... Regards, Paul -- View this message in context: http://n2.nabble.com/Problem-with-controls-on-map-%28SelectFeature%2C-Drawfeature%29---OpenLayers%2C-pgRouting-tp2777336p2777336.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kwonghu at hotmail.com Sun May 3 07:42:05 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] FW: Download image(bitmap) In-Reply-To: References: Message-ID: Hi, Do you know how I can use the server-side scripting to do this ? How can I interact openlayers with the servers ? Any example ? Cheers. From: arnd.wippermann@web.de To: kwonghu@hotmail.com CC: users@openlayers.org Subject: AW: [OpenLayers-Users] FW: Download image(bitmap) Date: Sat, 18 Apr 2009 21:29:17 +0200 Hi, if you only want, that the user can download your singleTiled WMS, then inform the user, that they could save the image via right click and save as. There is no need to download the image, because it is already there. Otherwise you have to use serverside scripting and sending the image once again. Arnd Von: kwonghu@hotmail.com [mailto:kwonghu@hotmail.com] Gesendet: Samstag, 18. April 2009 16:55 An: arnd.wippermann@web.de; users@openlayers.org Betreff: RE: AW: [OpenLayers-Users] FW: Download image(bitmap) Hi, I have only one wms layer and is a single tile. I would like to make it user friendly. Want to have a button called 'generate bitmap' or similar. That zip up the bitmap and send it to the user so they can view at a later stage. Thanks. From: arnd.wippermann@web.de To: kwonghu@hotmail.com Subject: AW: [OpenLayers-Users] FW: Download image(bitmap) Date: Sat, 18 Apr 2009 16:33:51 +0200 Hi, if it's only one wms layer and singleTiled, then the easiest way should be to use right click on the map and save image. if it's not singleTiled you can try something like this: var wmsRequest=yourWMS.getFullRequestString() + "&BBOX=" + yourWMS.getExtent().toBBOX() + "&WIDTH=" + map.getSize().w + "&HEIGHT=" + map.getSize().h; window.open(wmsRequest); it generates the WMS request for your layer as singleTile, opens it in a new window and there you could save the image via right click. Arnd Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Kwong Hu Kiu Gesendet: Samstag, 18. April 2009 10:29 An: marco.ferretti@fermasoft.com; users@openlayers.org Betreff: Re: [OpenLayers-Users] FW: Download image(bitmap) Hi Very sorry about the lack of information. Yes, it's a single tile map (using the SingleTile option = true). I am expecting exactly what the browser can see. In this case i am displaying a single tile jpeg image on the browser requested through the wms service. I do not want download the base layer. Just those layers i have IsBaseLayer=false. In my case. I only have 1 baselayer and 1 non-baselayer. Thanks. > From: marco.ferretti@fermasoft.com > To: users@openlayers.org > Date: Sat, 18 Apr 2009 10:13:27 +0200 > Subject: Re: [OpenLayers-Users] FW: Download image(bitmap) > > Hi > > first of all you have to tell us a little bit more on how > you create your map : is it a single layer map or a > multilayer map ? then we need to know if you are getting the > map in single tile mode or in multi tile mode. Then we need > to know what you expect in the image(s) you download : do > you expect your users to be able to download exactly what > their browser show ( this would mean as many images as many > tiles * number of layers ) or do you expect to have one > single image that contains the layers merged together ? > > Regards, > > Marco > ----- Original Message ----- > Da : Kwong Hu Kiu > A : , > Oggetto : RE: [OpenLayers-Users] FW: Download image(bitmap) > Data : Sat, 18 Apr 2009 16:07:30 +0800 > > > Thanks for the reply. > > > > So how can i do that with javascript ? Yes, i have my own > > custom wms service. > > > > I want to be able to download the map using javascript > > like you said. > > > > Cheers. > > > > > From: marco.ferretti@fermasoft.com > > > To: kwonghu@hotmail.com > > > Subject: re: [OpenLayers-Users] FW: Download > > > image(bitmap) Date: Sat, 18 Apr 2009 09:52:43 +0200 > > > > > > Hi > > > > > > I don't think i understood your question .... if you > > > want to be able to download stuff that you see you have > > > several options ( depending on how you created the map > > > ... aka how many layers you have ) ; I think what you > > > are looking for is a link that has to contain the same > > > stuff you send to the WMS server . That shall be quite > > > easy using Javascript . As of C# : i don't think you > > > have to deal with it since what you see ( the maps ) is > > > the result of an http request made client side thus, > > > unless you create a wrapper that submits your server > > > side code all the infos you need, you can do very little > > > with that. > > > hope it helps > > > > > > Marco > > > ----- Original Message ----- > > > Da : Kwong Hu Kiu > > > A : , > > > Oggetto : [OpenLayers-Users] FW: Download image(bitmap) > > > Data : Sat, 18 Apr 2009 13:22:52 +0800 > > > > > > > Hi, > > > > > > > > Any solution to my question below? > > > > > > > > Sorry i have to send it to dev@openlayers.org. > > > > Hopefully, i can get some replies. > > > > > > > > Regards. > > > > > > > > From: kwonghu@hotmail.com > > > > To: users@openlayers.org > > > > Date: Thu, 16 Apr 2009 21:20:53 +0800 > > > > Subject: [OpenLayers-Users] Download image(bitmap) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > Currently, I am using WMS service to display maps on > > > > openlayers. I am wondering if it's possible to allow > > > > users to download the bitmap(Map) they are seeing. > > > > > > > > Is it supported with openlayers ? or is it possible to > > > > use c# code and interact with openlayers javascript? > > > > > > > > Interacting c# and javascript is something I have no > > > > idea. > > > > Please shed lights. > > > > > > > > Cheers. > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Users mailing list > > > > Users@openlayers.org > > > > http://openlayers.org/mailman/listinfo/users > > > > > > > > [Allegato : ATT00000] > > > _______________________________________________ > 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/20090503/d5453e81/attachment.html From paweluz at o2.pl Sun May 3 07:42:45 2009 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Problem with controls on map (SelectFeature, Drawfeature) - OpenLayers, pgRouting In-Reply-To: <1241350780711-2777336.post@n2.nabble.com> References: <1241350780711-2777336.post@n2.nabble.com> Message-ID: <1241350965658-2777346.post@n2.nabble.com> I am working with OpenLayers 2.7 and Geoserver on Windows XP -- View this message in context: http://n2.nabble.com/Problem-with-controls-on-map-%28SelectFeature%2C-Drawfeature%29---OpenLayers%2C-pgRouting-tp2777336p2777346.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From timrobertson100 at gmail.com Sun May 3 11:04:59 2009 From: timrobertson100 at gmail.com (tim robertson) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Mouse events on tiles Message-ID: <32120a6a0905030804kdf69fc4k846fdfef68e9ec39@mail.gmail.com> Hi all, I am trying to reproduce with openlayers, the same effect that maps.google.com has with overlaying wikipedia articles. I have a TMS layer, rendering the tiles server side and also have a web service providing the info about the pixels on the tile the features are (just like how google wikipedia overlay works). I am not that great a Javascript and have been trying to work out where to attach mouseover and onclick events to the Image Tiles but have not succeeded. I will need to detect mouseover and mouseout to make sure that I am not checking against the features for the whole map as the cursor moves over tiles as this would be much data to check. While a cursor is on a tile I was planning to check the data array and see if the cursor was over a feature. Can someone please advise me where best to attach mouse events to individual tiles? I have been playing with various options, all of which got messy quickly - currently I am trying to subclass OpenLayers.Layer.TMS and modifying addTileMonitoringHooks. Is this the correct way to proceed? Any advice is greatly appreciated. Many thanks, Tim From albin.blaschka at standortsanalyse.net Sun May 3 11:13:16 2009 From: albin.blaschka at standortsanalyse.net (Albin Blaschka) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Extent with Spherical Mercator In-Reply-To: References: <49FD6A03.8040706@standortsanalyse.net> Message-ID: <49FDB48C.9010404@standortsanalyse.net> Eric Lemoine schrieb: > On Sunday, May 3, 2009, Albin Blaschka > wrote: [snip] >> >> var bounds = new OpenLayers.Bounds(12.5, 47.0, 13.5, 48.0); >> bounds.transform(proj, map.getProjectionObject()); >> >> var point = new OpenLayers.LonLat(13.0, 47.41); >> point.transform(proj, map.getProjectionObject()); >> map.setCenter(point); >> } > Either use map.zoomToExtent(bounds) or map.setCenter(lonlat, > zoomLevel) (you don't give setCenter a zoom level in the code you > provided above) > Hello, Thank you very much - map.zoomToExtent(bounds) did it (did not try the other possibility) Those little, but important details... :-P best wishes, Albin -- --------------------------------------------------------------------- | Albin Blaschka, Mag. rer.nat - Salzburg, Austria | http://www.albinblaschka.info http://www.thinkanimal.info | It's hard to live in the mountains, hard, but not hopeless! --------------------------------------------------------------------- From cholmes at opengeo.org Sun May 3 11:32:15 2009 From: cholmes at opengeo.org (Chris Holmes) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Mouse events on tiles In-Reply-To: <32120a6a0905030804kdf69fc4k846fdfef68e9ec39@mail.gmail.com> References: <32120a6a0905030804kdf69fc4k846fdfef68e9ec39@mail.gmail.com> Message-ID: <49FDB8FF.6050906@opengeo.org> I'm not sure if they're doing it for the wikipedia layer, but one technique I believe Google uses is to use an html image map instead of javascript for onclick and mouseover events. I'm not sure exactly how that would interact with a tile cache, but I imagine it should, and that's probably how Google is doing it. See http://geoserver.org/display/GEOS/HTML+ImageMap+support and http://mapserver.org/output/imagemaps.html Though maybe performance would be fast enough checking with javascript, there probably is a correct way to do that for what you want to do. Chris tim robertson wrote: > Hi all, > > I am trying to reproduce with openlayers, the same effect that > maps.google.com has with overlaying wikipedia articles. I have a TMS > layer, rendering the tiles server side and also have a web service > providing the info about the pixels on the tile the features are (just > like how google wikipedia overlay works). I am not that great a > Javascript and have been trying to work out where to attach mouseover > and onclick events to the Image Tiles but have not succeeded. I will > need to detect mouseover and mouseout to make sure that I am not > checking against the features for the whole map as the cursor moves > over tiles as this would be much data to check. While a cursor is on > a tile I was planning to check the data array and see if the cursor > was over a feature. > > Can someone please advise me where best to attach mouse events to > individual tiles? I have been playing with various options, all of > which got messy quickly - currently I am trying to subclass > OpenLayers.Layer.TMS and modifying addTileMonitoringHooks. Is this > the correct way to proceed? Any advice is greatly appreciated. > > Many thanks, > > Tim > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Chris Holmes OpenGeo - http://opengeo.org Expert service straight from the developers. From tonidelacalle at gmail.com Sun May 3 11:36:33 2009 From: tonidelacalle at gmail.com (=?ISO-8859-1?Q?toni_hern=E1ndez?=) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] stop control propagation Message-ID: <6c28194c0905030836r6ca1e1d5i5d7f7c2435630782@mail.gmail.com> hi, I have a div with an input type text inside the main map div. The user can edit this input and put the new scale value of the map dynamically. the problem is that when I click on the input (to change the scale) it zooms in (zoom is the default control). As I need to stop propagation I added OpenLayers.Event.observe(elem, "mousedown", block); and the function block which is function block(evt) { OpenLayers.Event.stop(evt); } And now no zooms occurs but I can not change the value of the input text either. Any ideas? thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090503/d3cb49fd/attachment.html From joao.c.duarte at co.sapo.pt Sun May 3 11:49:35 2009 From: joao.c.duarte at co.sapo.pt (=?iso-8859-1?Q?Jo=E3o_Duarte?=) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Mouse events on tiles In-Reply-To: <49FDB8FF.6050906@opengeo.org> References: <32120a6a0905030804kdf69fc4k846fdfef68e9ec39@mail.gmail.com> <49FDB8FF.6050906@opengeo.org> Message-ID: <001901c9cc06$c2a23450$47e69cf0$@c.duarte@co.sapo.pt> Chris, in the past, Google Maps did it with image maps. But now, they only use image maps for the search results markers. For the other layers (YouTube, Wikipedia, Photos) they use the technique described by Tim. One way to confirm that is to turn on one of those layers and then disconnect yourself from the internet. You'll no longer be able to click on the features because a request can't be made to know where the features are on that tile. Jo?o Duarte SAPO Mapas - http://mapas.sapo.pt -----Mensagem original----- De: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Em nome de Chris Holmes Enviada: domingo, 3 de Maio de 2009 16:32 Para: tim robertson Cc: Users@openlayers.org Assunto: Re: [OpenLayers-Users] Mouse events on tiles I'm not sure if they're doing it for the wikipedia layer, but one technique I believe Google uses is to use an html image map instead of javascript for onclick and mouseover events. I'm not sure exactly how that would interact with a tile cache, but I imagine it should, and that's probably how Google is doing it. See http://geoserver.org/display/GEOS/HTML+ImageMap+support and http://mapserver.org/output/imagemaps.html Though maybe performance would be fast enough checking with javascript, there probably is a correct way to do that for what you want to do. Chris tim robertson wrote: > Hi all, > > I am trying to reproduce with openlayers, the same effect that > maps.google.com has with overlaying wikipedia articles. I have a TMS > layer, rendering the tiles server side and also have a web service > providing the info about the pixels on the tile the features are (just > like how google wikipedia overlay works). I am not that great a > Javascript and have been trying to work out where to attach mouseover > and onclick events to the Image Tiles but have not succeeded. I will > need to detect mouseover and mouseout to make sure that I am not > checking against the features for the whole map as the cursor moves > over tiles as this would be much data to check. While a cursor is on > a tile I was planning to check the data array and see if the cursor > was over a feature. > > Can someone please advise me where best to attach mouse events to > individual tiles? I have been playing with various options, all of > which got messy quickly - currently I am trying to subclass > OpenLayers.Layer.TMS and modifying addTileMonitoringHooks. Is this > the correct way to proceed? Any advice is greatly appreciated. > > Many thanks, > > Tim > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Chris Holmes OpenGeo - http://opengeo.org Expert service straight from the developers. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From dgertsch at gmuresearch.com Sun May 3 12:18:16 2009 From: dgertsch at gmuresearch.com (AmericanBwana) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Colons in layer names Message-ID: <1241367496391-2778148.post@n2.nabble.com> Good morning, I'd like to use a WMS layer, but it has a colon in it. How do escape it? Here is a snippet of my file var fsroads = new OpenLayers.Layer.WMS("FS Roads & Trails", "http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/USDA_Forest_Service_Geodata_Clearinghouse.wms?", {layers: '1:3', transparent: true, format: 'image/png'}, {isBaseLayer: false} I've tried '1:3', and "1:3" Here is the site I'm trying to use. http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/USDA_Forest_Service_Geodata_Clearinghouse.wms?SERVICE=WMS&REQUEST=GetCapabilities Thank you. -- View this message in context: http://n2.nabble.com/Colons-in-layer-names-tp2778148p2778148.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From arnd.wippermann at web.de Sun May 3 15:38:55 2009 From: arnd.wippermann at web.de (Arnd Wippermann) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Colons in layer names In-Reply-To: <1241367496391-2778148.post@n2.nabble.com> Message-ID: Hi, The colons should be ok, but the server wants transparent = TRUE. Try with transparent:'TRUE' in the layer params or afterwards fsroads.mergeNewParams({ transparent: "TRUE" }); Arnd -----Urspr?ngliche Nachricht----- Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von AmericanBwana Gesendet: Sonntag, 3. Mai 2009 18:18 An: users@openlayers.org Betreff: [OpenLayers-Users] Colons in layer names Good morning, I'd like to use a WMS layer, but it has a colon in it. How do escape it? Here is a snippet of my file var fsroads = new OpenLayers.Layer.WMS("FS Roads & Trails", "http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/USDA_Forest_Servic e_Geodata_Clearinghouse.wms?", {layers: '1:3', transparent: true, format: 'image/png'}, {isBaseLayer: false} I've tried '1:3', and "1:3" Here is the site I'm trying to use. http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/USDA_Forest_Service _Geodata_Clearinghouse.wms?SERVICE=WMS&REQUEST=GetCapabilities Thank you. -- View this message in context: http://n2.nabble.com/Colons-in-layer-names-tp2778148p2778148.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 paweluz at o2.pl Sun May 3 16:12:22 2009 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Problem with controls on map (SelectFeature, Drawfeature) - OpenLayers, pgRouting In-Reply-To: <1241350780711-2777336.post@n2.nabble.com> References: <1241350780711-2777336.post@n2.nabble.com> Message-ID: <1241381542850-2781747.post@n2.nabble.com> Can anyone please help me... I still can't figure it out. Please any idea? Anything .... I would really appreciate... Regards, Paul paweluz wrote: > > Hi! > > First sorry for my poor english :). I am having some problem with the > OpenLayers I guess. > My application looks like this: > > http://img245.imageshack.us/img245/3273/aplikacja.jpg > http://img245.imageshack.us/img245/3273/aplikacja.jpg > > It provides searchinkg bus stops and bus lines in my city. Also I recently > added finding the shortest path > using the pgRouting. Before I add finding the shortest path my application > worked fine. I chose the bus > stop from the select element, like this: > > http://img6.imageshack.us/img6/6494/ptrzystanki.jpg > http://img6.imageshack.us/img6/6494/ptrzystanki.jpg > > After I choose the bus stops, it appears on the map. When I click it shows > the popup with the picture, > name and the bus lines like this: > > http://img13.imageshack.us/img13/4089/popul.jpg > http://img13.imageshack.us/img13/4089/popul.jpg > > Everything was fine upon the time I added the pgRouting part. Now the > popul menu does not work unles I: > - first click on select the start point radiobutton > - second click on the navigation radiobutton > > > When I do this everything is working fine. > Without this I click, click and click on the bus stop and the popup menu > does not appear!!!! > So there must be somethink wrong with the controls. In my application it > looks like this: > > - code for popul menu (vector layer): > vector.events.register("featureselected", vector, onFeatureSelect); > vector.events.register("featureunselected", vector, onFeatureUnselect); > > control = new OpenLayers.Control.SelectFeature(vector); > > map.addControl(control); > control.activate(); > > > - code for pgRouting > > controls = { > start: new OpenLayers.Control.DrawFeature(start, > SinglePoint), > stop: new OpenLayers.Control.DrawFeature(stop, SinglePoint) > > } > for (var key in controls) { > map.addControl(controls[key]); > } > > - html code for radiobuttons looks like this > >
> value="navigation" > onclick="toggleControl(this);" /> >
> > id="startToggle" > onclick="toggleControl(this);" /> >
> > onclick="toggleControl(this);" /> >
>
> > - the toggleControl() function > > function toggleControl(element) { > for (key in controls) { > if (element.value == key && element.checked) { > controls[key].activate(); > } else { > controls[key].deactivate(); > } > } > } > > > So I think there is probolem with OpenLayers.Control.SelectFeature and > OpenLayers.Control.DrawFeature I > > guess. I try to force clicking on 'select start point' and 'navigate' from > code like this: > > document.getElementById("startToggle").select(); > document.getElementById("startToggle").focus(); > document.getElementById("startToggle").click(); > > document.getElementById("noneToggle").select(); > document.getElementById("noneToggle").focus(); > document.getElementById("noneToggle").click(); > > But it does not work. Only clicking with mouse does it right. > Does anyone please can help me? Maybe someone had similar issue? > Please help ... > > Regards, > Paul > -- View this message in context: http://n2.nabble.com/Problem-with-controls-on-map-%28SelectFeature%2C-Drawfeature%29---OpenLayers%2C-pgRouting-tp2777336p2781747.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From paweluz at o2.pl Sun May 3 18:29:49 2009 From: paweluz at o2.pl (paweluz) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] Problem with controls on map (SelectFeature, Drawfeature) - OpenLayers, pgRouting In-Reply-To: <1241381542850-2781747.post@n2.nabble.com> References: <1241350780711-2777336.post@n2.nabble.com> <1241381542850-2781747.post@n2.nabble.com> Message-ID: <1241389789959-2784629.post@n2.nabble.com> I managed with this!! It is working now! I changed the layers included in the map in init function. I had: map.addLayers([gmap,layer1,layer2,layer3,start,stop,result,edge_results]) I changed it to map.addLayers([gmap,layer1,layer2,layer3]) I removed my routing layers. Then in function toggleControl() I add line map.addLayers([start,stop,result,edge_results]); That is all :) -- View this message in context: http://n2.nabble.com/Problem-with-controls-on-map-%28SelectFeature%2C-Drawfeature%29---OpenLayers%2C-pgRouting-tp2777336p2784629.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From n.e.kendall at gmail.com Sun May 3 19:43:59 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] KML -Vector layer question Message-ID: <33fd44f90905031643k1c195e00v77d57c5aab9ad9c4@mail.gmail.com> Hi, I'm experimenting with KML files, and I've run into something a little strange. When using the ArcGIS toKML toolbox, and unzipping the KML file, it retains the points/features in the layer, but doesn't display them (i.e. their styling is lost). This happens in both Openlayers in Google Earth (that the vector style properties are lost). Obviously something got stripped in the unzipping of the KMZ file. How can I specify styling options for the KML file, so that it displays in OL? I know the points are being loaded because of Firebug. best, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090503/71e6b4c5/attachment.html From wilson.andrew.j at gmail.com Sun May 3 23:53:49 2009 From: wilson.andrew.j at gmail.com (Andrew Wilson) Date: Wed Sep 1 17:17:25 2010 Subject: [OpenLayers-Users] KML -Vector layer question In-Reply-To: <33fd44f90905031643k1c195e00v77d57c5aab9ad9c4@mail.gmail.com> References: <33fd44f90905031643k1c195e00v77d57c5aab9ad9c4@mail.gmail.com> Message-ID: <7ec20b100905032053q7537843au8b885141f4480ea0@mail.gmail.com> >From what I remember the ArcGIS Layer to KML tool renders a PNG image for each type of point symbology and those images are put somewhere in the directory that gets zipped up to become the .kmz file. So the .kmz file is a zipped directory that contains the KML file along with the symbology images. In the KML file, the styling information is described as an Icon tag that contains an href link to the images. You can unzip the .kmz file and extract just the KML file but if you move that KML file, then the links to the images are broken and that might explain why the styling is lost. Some ways of fixing it might be: 1) Copy the images along with the kml so that the href links actually point to the images 2) Modify the KML so that the Icon href tags point to a resolvable URI Possible caveat: I don't know if OL supports href'd Icons outside of the Google icon set. I've seen some old references (from about a year and a half ago) that imply that only Google icons were supported. On Sun, May 3, 2009 at 6:43 PM, Nicholas Efremov-Kendall wrote: > Hi, > > I'm experimenting with KML files, and I've run into something a little > strange. When using the ArcGIS toKML toolbox, and unzipping the KML file, it > retains the points/features in the layer, but doesn't display them (i.e. > their styling is lost). > > This happens in both Openlayers in Google Earth (that the vector style > properties are lost). Obviously something got stripped in the unzipping of > the KMZ file. How can I specify styling options for the KML file, so that it > displays in OL? I know the points are being loaded because of Firebug. > best, > Nick > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > From xiaying4415139 at 163.com Mon May 4 00:30:02 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Get point on line? In-Reply-To: <49FC4A88.1050804@gisnet.com> References: <1241003641682-2739966.post@n2.nabble.com> <49F8545A.3090801@gisnet.com> <1241018119591-2741167.post@n2.nabble.com> <49F98E5B.60702@gisnet.com> <1241236853347-2759313.post@n2.nabble.com> <49FC4A88.1050804@gisnet.com> Message-ID: <1241411402268-2785597.post@n2.nabble.com> Bill Thoen, Thank you! I'll try to complete the algorithm in javascript by myself reference the link you given me. And also thank paweluz. Your method is my second choise. If I can't finish the algorithm in javascript, I'll do it with the help of postgis db but also with another ajax request to server that's the reason why it is the second choise. I regret why I haven't learned Math so well. Bill Thoen wrote: > > I put an article about great circle algorithms in the wiki some time ago > that might help you. The links to the demos are down right now (that > server needs a power supply I think) but the algorithms and formulas are > shown on the wiki page at > http://trac.openlayers.org/wiki/GreatCircleAlgorithms. Hopefully that > will give you enough help to complete your task. > > Unfortunately, I'm swamped with my own OpenLayers problems right now, so > I don't have any free time to help you much more than that. JavaScript > and OpenLayers is so much fun that it's all too easy to program yourself > into places you have no business being. > > But if you got the answers to all your problems immediately, your heart > wouldn't become purified by the long quest. > > Good luck! > > - Bill Thoen > > > shane_china wrote: >> Hi, Bill Thoen, I go to the website and find the formulary I want. As >> following: >> Point(s) known distance from a great circle >> Let points A and B define a great circle route and D be a third point. >> Find >> the points on the great circle through A and B that lie a distance d from >> D, >> if they exist. >> A = crs_AD - crs_AB >> >> ( crs_AB and crs_AD are the initial GC bearings from A to B and D, >> respectively. Compute using Course between points) >> >> b = dist_AD >> >> (dist_AD is the distance from A to D. Compute using Distance between >> points) >> >> r=(cos(b)^2+sin(b)^2*cos(A)^2)^(1/2) >> >> (acos(r) is the XTD) >> >> p=atan2(sin(b)*cos(A),cos(b)) >> >> (p is the ATD) >> >> IF (cos(d)^2 > r^2) THEN >> No points exist >> ELSE >> Two points exist >> dp = p +- acos(cos(d)/r) >> ENDIF >> >> dp are the distances of the desired points from A along AB. Their >> lat/lons >> can be computed using Lat/lon given radial and distance >> >> But I want to know, Is there any such fomulary in OpenLayers to help me >> simplify the algorithm? For example, I know >> "OpenLayers.Util.distVencenty", >> this method can calculate the distance between two points. Does >> openlayers >> also have such functions can help me? Thank you. >> >> My math is not so good. Write the algorithm in js all by myself is so >> difficult for me. >> >> >> >> >> Bill Thoen wrote: >> >>> Yes, it's a little different for the spherical (Lon/Lat) case. For those >>> formulas, check out Ed Williams' Aviation Formulary website at >>> http://williams.best.vwh.net/avform.htm. What you're looking for is >>> determining waypoint locations, i think. >>> >>> - Bill Thoen >>> >>> shane_china wrote: >>> >>>> Bill Thoen wrote: >>>> >>>> >>>>> shane_china wrote: >>>>> >>>>> >>>>>> In openlayers, >>>>>> I have a straight line with two endpoints. How could I get a point on >>>>>> the >>>>>> line with given distance to one endpoint? Thank you. >>>>>> >>>>>> >>>>>> >>>>> You can find a point anywhere on a line by using a ratio calculation. >>>>> Start with the distance to your point divided by the total distance of >>>>> your line, then your new X coordinate = the difference between the X >>>>> coordinates of the endpoints times the ratio (plus the X coordinate of >>>>> the starting line endpoint. For example, if your endpoints are at >>>>> coordinates (X0, Y0) and (X1,Y1) then the Cartesian distance is >>>>> >>>>> D = sqrt((X1-X0)*(X1-X0) + (Y1-Y0)*(Y1-Y0)) >>>>> >>>>> Then if the ratio between this and the distance to your point is d, >>>>> your >>>>> new point's coordinates will be: >>>>> >>>>> X= X0+(X1-X0)*d/D >>>>> Y=Y0+(Y1-Y0)*d/D >>>>> >>>>> >>>> So thank you for your answer. Your advise is in X-Y coodinates. Does >>>> this >>>> method also apply to lon lat coodinates? Our earth is a ball, so is it >>>> different? >>>> I haven't demonstrate it yet. >>>> >>>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> >> >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Get-point-on-line--tp2739966p2785597.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From taraathan at gmail.com Mon May 4 00:57:06 2009 From: taraathan at gmail.com (Tara Athan) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] LonLat capture from click problem with IE zoom In-Reply-To: <7ec20b100905032053q7537843au8b885141f4480ea0@mail.gmail.com> References: <33fd44f90905031643k1c195e00v77d57c5aab9ad9c4@mail.gmail.com> <7ec20b100905032053q7537843au8b885141f4480ea0@mail.gmail.com> Message-ID: <49FE75A2.2060007@gmail.com> Sometime ago, about a year I think, I built an OpenLayers page to capture a mouse click as lon-lat and pass it to a form. I could swear that I tested it in IE as well as Firefox, although Firefox is what I normally use. I was just looking at the site in these two browsers and it is still working fine in Firefox, but there is a glitch in IE (the "latest" version, whatever that is- it appears to be impossible to actually figure that out from the browser window). A click event causes a marker and pop-up window to be displayed - in IE the marker is displaced from the click location if [CTRL+] or {CTRL-] have been used to adjust the zoom level of the webpage. The lon-lat values actually agree with the marker location, not the original click location. I checked on the OpenLayers website and found some code for handling click events that was somewhat different than the sample code that I had followed when I first built the site, but there was no change in the problem. The pages are given by URLs http://www.alt2is.com/imcwma/copy/php/weedpoints_database/map/index7.php and http://www.alt2is.com/imcwma/copy/php/weedpoints_database/map/index7b.php (the modified version based on newer example) The code involved in setting the lon-lat object is: var lonlat = map.getLonLatFromPixel(new OpenLayers.Pixel(evt.xy.x , evt.xy.y) ); OR var lonlat = map.getLonLatFromViewPortPx(e.xy); Is there some way to get this operation to be robust to the IE zoom level? Thanks, Tara From peter at peterse-uithuizen.com Mon May 4 04:29:04 2009 From: peter at peterse-uithuizen.com (Peter Peterse) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] KML refresh Message-ID: Hello, I'm trying to refresh my KML file in OL. There are two issues: * blinking when the new KML is loaded. * memory leak in IE. With blinking i mean. When I load the new KML the old KML is unloaded and will disapear, then the new KML is loaded and viewed. This look like the view is blinked. I've an example: Click on Next will unload the old KML and load the new one. When you do Next then the memory from IE will rise and will not be freed. For one time it's not a big deal, but if you repeatly do a new unload and load then the browser will crash. I hope someone can help me. Regards, Peter. From kgeusebroek at xebia.com Mon May 4 05:59:14 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Performance and Memoryusage measuring: How To Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2491 bytes Desc: image001.jpg Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090504/fd186aad/attachment.jpe From peter at peterse-uithuizen.com Mon May 4 06:18:30 2009 From: peter at peterse-uithuizen.com (Peter Peterse) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Performance and Memoryusage measuring: How To Message-ID: Hello, I've used sIEve to check memory leaks. Goodluck with it. Peter > Hi all, > > > > I've written an app with openLayers and Geoserver and created a lot of > functions in javascript. > > I want to measure performance and see if no memoryleaks are introduced > by me ;-) > > > > What is the best/easiest way to measure these things (in IE at least > since client depends on IE) > > > > Cheers > > > > Kris Geusebroek > > Consultant > > > > > > Email: kgeusebroek@xebia.com > > Tel: +31 (0)35 538 1921 > > Fax: +31 (0)35 538 1922 > > Mobile: +31 (0)6 30 697 223 > > http://www.xebia.com > > > > Utrechtseweg 49 > > 1213 TL Hilversum > > The Netherlands > > > > Xebia Blog ! http://blog.xebia.com/ > > Xebia Podcast! http://podcast.xebia.com/ > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From lischke at novacom.net Mon May 4 06:39:59 2009 From: lischke at novacom.net (Stefan Lischke) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Changing style of feature parsed by GeoJSON In-Reply-To: <20090429191505.GA10418@metacarta.com> References: <20090429191505.GA10418@metacarta.com> Message-ID: > On Wed, Apr 29, 2009 at 05:16:50PM +0200, Stefan Lischke wrote: > > Hi, > > > > I desperatly try to change the style of a OpenLayers.Feature.Vector > > that i parsed with OpenLayers.Format.GeoJSON. Since i > cannot not give > > the style in the Feature Constructor i'm searching for > another way to do it. > > Is it possible to include the style atrributes within the GeoJSON? > > > > I tried to use the old style by set the style attribute and > redraw the > > feature [1,2] but it did not work. Any other Ideas? > > http://docs.openlayers.org/library/feature_styling.html#stylemap Unfortunatly your link did not help me. To create a style-Map and gove it to the constructor of the vector is one solution that i cannot use because i do not call the constructor, the GeoJSON Parser creates the objects. Please help me, hoc i can set the StyleMap to a Feature created by the GeoJSON parser. Thanx Stefan From crschmidt at metacarta.com Mon May 4 06:46:31 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Changing style of feature parsed by GeoJSON In-Reply-To: References: <20090429191505.GA10418@metacarta.com> Message-ID: <20090504104630.GD1510@metacarta.com> On Mon, May 04, 2009 at 12:39:59PM +0200, Stefan Lischke wrote: > > On Wed, Apr 29, 2009 at 05:16:50PM +0200, Stefan Lischke wrote: > > > Hi, > > > > > > I desperatly try to change the style of a OpenLayers.Feature.Vector > > > that i parsed with OpenLayers.Format.GeoJSON. Since i > > cannot not give > > > the style in the Feature Constructor i'm searching for > > another way to do it. > > > Is it possible to include the style atrributes within the GeoJSON? > > > > > > I tried to use the old style by set the style attribute and > > redraw the > > > feature [1,2] but it did not work. Any other Ideas? > > > > http://docs.openlayers.org/library/feature_styling.html#stylemap > > Unfortunatly your link did not help me. To create a style-Map and gove it to > the constructor of the vector is one solution that i cannot use because i do > not call the constructor, the GeoJSON Parser creates the objects. The StyleMap is added to the constructor of the *layer*, not the features. It is specifcally designed to work when formats are being used to parse the data. -- Chris > Please help me, hoc i can set the StyleMap to a Feature created by the > GeoJSON parser. > > Thanx > > Stefan > -- Christopher Schmidt MetaCarta From lischke at novacom.net Mon May 4 07:00:59 2009 From: lischke at novacom.net (Stefan Lischke) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Changing style of feature parsed by GeoJSON In-Reply-To: <20090504104630.GD1510@metacarta.com> References: <20090429191505.GA10418@metacarta.com> <20090504104630.GD1510@metacarta.com> Message-ID: > On Mon, May 04, 2009 at 12:39:59PM +0200, Stefan Lischke wrote: > > > On Wed, Apr 29, 2009 at 05:16:50PM +0200, Stefan Lischke wrote: > > > > Hi, > > > > > > > > I desperatly try to change the style of a > > > > OpenLayers.Feature.Vector that i parsed with > > > > OpenLayers.Format.GeoJSON. Since i > > > cannot not give > > > > the style in the Feature Constructor i'm searching for > > > another way to do it. > > > > Is it possible to include the style atrributes within > the GeoJSON? > > > > > > > > I tried to use the old style by set the style attribute and > > > redraw the > > > > feature [1,2] but it did not work. Any other Ideas? > > > > > > http://docs.openlayers.org/library/feature_styling.html#stylemap > > > > Unfortunatly your link did not help me. To create a > style-Map and gove > > it to the constructor of the vector is one solution that i > cannot use > > because i do not call the constructor, the GeoJSON Parser > creates the objects. > > The StyleMap is added to the constructor of the *layer*, not > the features. It is specifcally designed to work when formats > are being used to parse the data. OK, so did i understand you right, i'm not able to display multiple features (polygons) parsed by GeoJSON on one Layer? So i have to create one layer per style/color of a polygon? But when creating the feature by hand (calling the constructor) i can set the style with the constructor and can create multiple polygons with different colors on one layer. Stefan From crschmidt at metacarta.com Mon May 4 09:28:51 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Changing style of feature parsed by GeoJSON In-Reply-To: References: <20090429191505.GA10418@metacarta.com> <20090504104630.GD1510@metacarta.com> Message-ID: <20090504132850.GF1510@metacarta.com> On Mon, May 04, 2009 at 01:00:59PM +0200, Stefan Lischke wrote: > > On Mon, May 04, 2009 at 12:39:59PM +0200, Stefan Lischke wrote: > > > > On Wed, Apr 29, 2009 at 05:16:50PM +0200, Stefan Lischke wrote: > > > > > Hi, > > > > > > > > > > I desperatly try to change the style of a > > > > > OpenLayers.Feature.Vector that i parsed with > > > > > OpenLayers.Format.GeoJSON. Since i > > > > cannot not give > > > > > the style in the Feature Constructor i'm searching for > > > > another way to do it. > > > > > Is it possible to include the style atrributes within > > the GeoJSON? > > > > > > > > > > I tried to use the old style by set the style attribute and > > > > redraw the > > > > > feature [1,2] but it did not work. Any other Ideas? > > > > > > > > http://docs.openlayers.org/library/feature_styling.html#stylemap > > > > > > Unfortunatly your link did not help me. To create a > > style-Map and gove > > > it to the constructor of the vector is one solution that i > > cannot use > > > because i do not call the constructor, the GeoJSON Parser > > creates the objects. > > > > The StyleMap is added to the constructor of the *layer*, not > > the features. It is specifcally designed to work when formats > > are being used to parse the data. > > OK, so did i understand you right, i'm not able to display multiple features > (polygons) parsed by GeoJSON on one Layer? Sure you can. > So i have to create one layer per > style/color of a polygon? No, you use rules to filter based on properties of the feature. See, for example, http://crschmidt.net/mapping/choropleth.html Regards, -- Christopher Schmidt MetaCarta From sajeertk15 at gmail.com Mon May 4 09:53:41 2009 From: sajeertk15 at gmail.com (saj) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] dynamic SLD for WMS layer In-Reply-To: <1238630599403-2572331.post@n2.nabble.com> References: <1238630599403-2572331.post@n2.nabble.com> Message-ID: <1241445221292-2787346.post@n2.nabble.com> Hi , Hope you got a solution for adding filters to the active SLD on fly, even I got stuck with the same problem, it would be very helpful for me if you can suggest a solution with the code segment for the same. Thanks.... floflo wrote: > > hi, > > I use a WMS polygon layer and want to apply different styles on it > depending on indicators... > > i know i can dynamicaly change the SLD of my layer with > layer.mergeNewParams({SLD:..}); but i had to have made all of my SLD > before. > That i want is to generate it dynamically.... > > Is there a way to add filter or parameter in the active SLD of my layer ? > Should I use the param "style" of my WMS layer instead (i saw there's one > but not present in the API Doc). > > thks for help > -- View this message in context: http://n2.nabble.com/dynamic-SLD-for-WMS-layer-tp2572331p2787346.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From greg at ergonosis.com Mon May 4 13:16:27 2009 From: greg at ergonosis.com (Greg Ederer) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] mousedown Message-ID: Hi, I need to capture mousedown events on a Map. I'm using a custom OpenLayers.Control.Click for click and dblclick. But, Click does not appear to handle mousedown events. Any suggestions? Thanks! Greg From greg at ergonosis.com Mon May 4 13:51:18 2009 From: greg at ergonosis.com (Greg Ederer) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] mousedown In-Reply-To: References: Message-ID: For reference, here's my code so far: OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { defaultHandlerOptions: { 'single': true, 'double': false, 'mousedown' : false, 'pixelTolerance': 0, 'stopSingle': false, 'stopDouble': false }, initialize: function(options) { this.handlerOptions = OpenLayers.Util.extend( {}, this.defaultHandlerOptions ); OpenLayers.Control.prototype.initialize.apply( this, arguments ); this.handler = new OpenLayers.Handler.Click( this, { 'click': this.onClick, 'dblclick': this.onDblclick, 'mousedown' : this.onMouseDown }, this.handlerOptions ); }, onMouseDown : function(evt) { alert('hi'); }, ... var controls = { "single": new OpenLayers.Control.Click({ hanlerOptions: { "single": true } }), "mousedown": new OpenLayers.Control.Click({ hanlerOptions: { "single": true } }), "double": new OpenLayers.Control.Click({ handlerOptions: { "single": false, "double": true } }), "both": new OpenLayers.Control.Click({ handlerOptions: { "single": true, "double": true } }), "drag": new OpenLayers.Control.Click({ handlerOptions: { "single": true, "pixelTolerance": null } }), "stopsingle": new OpenLayers.Control.Click({ handlerOptions: { "single": true, "stopSingle": true } }), "stopdouble": new OpenLayers.Control.Click({ handlerOptions: { "single": false, "double": true, "stopDouble": true } }) }; var control; for(var key in controls) { control = controls[key]; // only to route output here control.key = key; this.map.addControl(control); //console.log('added control: ' + key); } But, onMouseDown never gets called. Greg On May 4, 2009, at 10:16 AM, Greg Ederer wrote: > Hi, > > I need to capture mousedown events on a Map. I'm using a custom > OpenLayers.Control.Click for click and dblclick. But, Click does not > appear to handle mousedown events. Any suggestions? > > Thanks! > > Greg > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From lischke at novacom.net Mon May 4 14:17:51 2009 From: lischke at novacom.net (Stefan Lischke) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] mousedown In-Reply-To: References: Message-ID: > Hi, > > I need to capture mousedown events on a Map. I'm using a > custom OpenLayers.Control.Click for click and dblclick. But, > Click does not appear to handle mousedown events. Any suggestions? Crazy, just as i wanted to answer you, my code handling mouse events also did not work. Are you using a local Version or link to http://www.openlayers.org/api/OpenLayers.js Maybe there was an update which now fails? Stefan From greg at ergonosis.com Mon May 4 14:19:42 2009 From: greg at ergonosis.com (Greg Ederer) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] mousedown In-Reply-To: References: Message-ID: Hmm. Nope, mine's local 2.7. Thanks! Greg On May 4, 2009, at 11:17 AM, Stefan Lischke wrote: >> Hi, >> >> I need to capture mousedown events on a Map. I'm using a >> custom OpenLayers.Control.Click for click and dblclick. But, >> Click does not appear to handle mousedown events. Any suggestions? > > Crazy, just as i wanted to answer you, my code handling mouse events > also > did not work. > Are you using a local Version or link to > http://www.openlayers.org/api/OpenLayers.js > Maybe there was an update which now fails? > > Stefan > From taraathan at gmail.com Mon May 4 17:03:58 2009 From: taraathan at gmail.com (Tara Athan) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] LonLat capture from click problem with IE zoom Message-ID: <49FF583E.30607@gmail.com> I am reposting this because it somehow got linked with an existing thread, rather than starting a new one. ------------------------------------------------------------------------------------------------------------ Sometime ago, about a year I think, I built an OpenLayers page to capture a mouse click as lon-lat and pass it to a form. I could swear that I tested it in IE as well as Firefox, although Firefox is what I normally use. I was just looking at the site in these two browsers and it is still working fine in Firefox, but there is a glitch in IE (the "latest" version, whatever that is- it appears to be impossible to actually figure that out from the browser window). A click event causes a marker and pop-up window to be displayed - in IE the marker is displaced from the click location if [CTRL+] or {CTRL-] have been used to adjust the zoom level of the webpage. The lon-lat values actually agree with the marker location, not the original click location. I checked on the OpenLayers website and found some code for handling click events that was somewhat different than the sample code that I had followed when I first built the site, but there was no change in the problem. The pages are given by URLs http://www.alt2is.com/imcwma/copy/php/weedpoints_database/map/index7.php and http://www.alt2is.com/imcwma/copy/php/weedpoints_database/map/index7b.php (the modified version based on newer example) The code involved in setting the lon-lat object is: var lonlat = map.getLonLatFromPixel(new OpenLayers.Pixel(evt.xy.x , evt.xy.y) ); OR var lonlat = map.getLonLatFromViewPortPx(e.xy); Is there some way to get this operation to be robust to the IE zoom level? Thanks, Tara From brad at cubewerx.com.au Mon May 4 17:27:29 2009 From: brad at cubewerx.com.au (Brad Spencer) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] dynamic SLD for WMS layer In-Reply-To: <1241445221292-2787346.post@n2.nabble.com> References: <1238630599403-2572331.post@n2.nabble.com> <1241445221292-2787346.post@n2.nabble.com> Message-ID: <000f01c9ccff$222bea80$6683bf80$@com.au> Saj, I just build the SLD in a server-side PHP script, save the file and apply it. Probably not the best way to do it but it works a treat for me. Cheers, Brad... -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of saj Sent: Monday, May 04, 2009 11:54 PM To: users@openlayers.org Subject: Re: [OpenLayers-Users] dynamic SLD for WMS layer Hi , Hope you got a solution for adding filters to the active SLD on fly, even I got stuck with the same problem, it would be very helpful for me if you can suggest a solution with the code segment for the same. Thanks.... floflo wrote: > > hi, > > I use a WMS polygon layer and want to apply different styles on it > depending on indicators... > > i know i can dynamicaly change the SLD of my layer with > layer.mergeNewParams({SLD:..}); but i had to have made all of my SLD > before. > That i want is to generate it dynamically.... > > Is there a way to add filter or parameter in the active SLD of my layer ? > Should I use the param "style" of my WMS layer instead (i saw there's one > but not present in the API Doc). > > thks for help > -- View this message in context: http://n2.nabble.com/dynamic-SLD-for-WMS-layer-tp2572331p2787346.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 carreicm at hotmail.com Tue May 5 05:27:50 2009 From: carreicm at hotmail.com (Ivan Carreira) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Query only in visible layers Message-ID: Hi all, I have a problem. I need an expression to limit queries only to the layers that are visible at that time on the map. Queries are displayed via a popup. The code where queries are made and displayed in the popup is as follows: var showInfo = function(event) { var pixel = event.xy; var lonlat = this.getLonLatFromPixel(pixel); var message = null; var params = {}; params['service'] = 'wms'; params['request'] = 'GetFeatureInfo'; params['version'] = '1.1.1'; params['info_format'] = 'text/plain'; params['srs'] = this.getProjection(); params['bbox'] = this.getExtent().toBBOX(6); params['width'] = this.getSize().w; params['height'] = this.getSize().h; params['feature_count'] = 1; params['x'] = pixel.x; . params['y'] = pixel.y; params['layers'] = 'camino'; params['query_layers'] = 'camino'; new OpenLayers.Request.GET({ url: server, async: false, params: params, success: function(data) { message = data.responseText; } }); message = getHTML(message); var popup = new OpenLayers.Popup.FramedCloud('popup', lonlat, null, message, null, true, null); this.addPopup(popup); };//End of function showInfo() map.events.register('click', map, showInfo); _________________________________________________________________ Comparte, crea, disfruta? Descubre todo, en estos v?deos http://www.windowslive.es -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090505/5a3b41f2/attachment.html From djud at bas.ac.uk Tue May 5 06:04:10 2009 From: djud at bas.ac.uk (djud) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer Message-ID: <1241517850962-2792029.post@n2.nabble.com> Hi, I have a vector layer (OpenLayers.Layer.Vector) and have added a linear feature to it. If the user requests to temporarily hide the feature, I do that with: layer.drawFeature(feature, { display: "none"}); This works fine except if the user now changes the map zoom level, the linear feature magically re-appears. My questions are: 1) Am I using the correct technique to hide the feature? 2) Is there a trick that will hide the feature at all zoom levels? 3) Should I destroy the feature instead of just hiding it? Any help appreciated, Dave -- View this message in context: http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p2792029.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Tue May 5 08:31:30 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Query only in visible layers In-Reply-To: References: Message-ID: <4A0031A2.4090206@mapgears.com> Hi, Do you mean visible OpenLayers layers or server side-layers ? Do you use (1) one OL layer per server-side layer or (2) are they all in the same OL layer ? If (1) : loop through your map layers for each visible/inRange layer to get their params.['LAYERS'] property. If they come from the same server, you can merge them in a single request. If (2) : If you use MapServer and you have direct access to the mapfile, you could do the following. Please, anyone correct me if I'm wrong, but I think getfeatureinfo requests are made regardless of a layer's minscaledenom or maxscaledenom property. So you could create a template with leg_layer_minscale and leg_layer_maxscale values to get theses values from the server-side into a javascript array. Also, add the layer name at the same time (because that's the value to be added to the query_layers query property). Then, on click, you could loop through this array to check that the layers are currently visible (compare with current scale). See that (3) link for more details. Does that make sense ? (3) http://mapserver.org/output/html_legend.html Regards, Alexandre Ivan Carreira wrote: > Hi all, > > > > I have a problem. > > I need an expression to limit queries only to the layers that are visible at that time on the map. > Queries are displayed via a popup. > The code where queries are made and displayed in the popup is as follows: > > var showInfo = function(event) { > > var pixel = event.xy; > var lonlat = this.getLonLatFromPixel(pixel); > var message = null; > var params = {}; > params['service'] = 'wms'; > params['request'] = 'GetFeatureInfo'; > params['version'] = '1.1.1'; > params['info_format'] = 'text/plain'; > params['srs'] = this.getProjection(); > params['bbox'] = this.getExtent().toBBOX(6); > params['width'] = this.getSize().w; > params['height'] = this.getSize().h; > params['feature_count'] = 1; > params['x'] = pixel.x; . > params['y'] = pixel.y; > params['layers'] = 'camino'; > params['query_layers'] = 'camino'; > > new OpenLayers.Request.GET({ > url: server, > async: false, > params: params, > success: function(data) { > message = data.responseText; > } > }); > > > > message = getHTML(message); > > > var popup = new OpenLayers.Popup.FramedCloud('popup', lonlat, null, message, null, true, null); > > this.addPopup(popup); > > };//End of function showInfo() > > map.events.register('click', map, showInfo); > > > ------------------------------------------------------------------------ > ?Eres del Madrid, del Bar?a, del Atleti...? Apoya a tu equipo en la > Zona Fan de MSN Deportes > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From kwonghu at hotmail.com Tue May 5 08:31:52 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] FW: Download image(bitmap) In-Reply-To: References: Message-ID: I am still figuring out how to do this. I have a look at Mapfish. Using openlayers underneath. http://map.veloland.ch/ They have a way of displaying the bitmap in pdf when the print button is clicked. Anyone knows how that's done ? I want to incorporate that function into the openlayers. That's what I wanted to do. Click on Print. Looks cool. Thanks From: arnd.wippermann@web.de To: kwonghu@hotmail.com Subject: AW: [OpenLayers-Users] FW: Download image(bitmap) Date: Sun, 3 May 2009 20:02:29 +0200 Hi, sorry, but I cann't help you. I have an idea, how to request serverside the singleTile image. But how to force a download clientside for this image I have no clue. Perhaps you have to save the image serverside, that the image is reachable through the internet and then clientside force a download of the image. the url for the singleTile should be: singleTileLayer - your singleTile WMS layer singleTileRequestUrl = singleTileLayer.getFullRequestString() + "&BBOX=" + singleTileLayer.getExtent().toBBOX() + "&WIDTH=" + map.getSize().w + "&HEIGHT=" + map.getSize().h; Arnd Von: kwonghu@hotmail.com [mailto:kwonghu@hotmail.com] Gesendet: Sonntag, 3. Mai 2009 13:42 An: arnd.wippermann@web.de Cc: users@openlayers.org Betreff: RE: AW: [OpenLayers-Users] FW: Download image(bitmap) Hi, Do you know how I can use the server-side scripting to do this ? How can I interact openlayers with the servers ? Any example ? Cheers. From: arnd.wippermann@web.de To: kwonghu@hotmail.com CC: users@openlayers.org Subject: AW: [OpenLayers-Users] FW: Download image(bitmap) Date: Sat, 18 Apr 2009 21:29:17 +0200 Hi, if you only want, that the user can download your singleTiled WMS, then inform the user, that they could save the image via right click and save as. There is no need to download the image, because it is already there. Otherwise you have to use serverside scripting and sending the image once again. Arnd Von: kwonghu@hotmail.com [mailto:kwonghu@hotmail.com] Gesendet: Samstag, 18. April 2009 16:55 An: arnd.wippermann@web.de; users@openlayers.org Betreff: RE: AW: [OpenLayers-Users] FW: Download image(bitmap) Hi, I have only one wms layer and is a single tile. I would like to make it user friendly. Want to have a button called 'generate bitmap' or similar. That zip up the bitmap and send it to the user so they can view at a later stage. Thanks. From: arnd.wippermann@web.de To: kwonghu@hotmail.com Subject: AW: [OpenLayers-Users] FW: Download image(bitmap) Date: Sat, 18 Apr 2009 16:33:51 +0200 Hi, if it's only one wms layer and singleTiled, then the easiest way should be to use right click on the map and save image. if it's not singleTiled you can try something like this: var wmsRequest=yourWMS.getFullRequestString() + "&BBOX=" + yourWMS.getExtent().toBBOX() + "&WIDTH=" + map.getSize().w + "&HEIGHT=" + map.getSize().h; window.open(wmsRequest); it generates the WMS request for your layer as singleTile, opens it in a new window and there you could save the image via right click. Arnd Von: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] Im Auftrag von Kwong Hu Kiu Gesendet: Samstag, 18. April 2009 10:29 An: marco.ferretti@fermasoft.com; users@openlayers.org Betreff: Re: [OpenLayers-Users] FW: Download image(bitmap) Hi Very sorry about the lack of information. Yes, it's a single tile map (using the SingleTile option = true). I am expecting exactly what the browser can see. In this case i am displaying a single tile jpeg image on the browser requested through the wms service. I do not want download the base layer. Just those layers i have IsBaseLayer=false. In my case. I only have 1 baselayer and 1 non-baselayer. Thanks. > From: marco.ferretti@fermasoft.com > To: users@openlayers.org > Date: Sat, 18 Apr 2009 10:13:27 +0200 > Subject: Re: [OpenLayers-Users] FW: Download image(bitmap) > > Hi > > first of all you have to tell us a little bit more on how > you create your map : is it a single layer map or a > multilayer map ? then we need to know if you are getting the > map in single tile mode or in multi tile mode. Then we need > to know what you expect in the image(s) you download : do > you expect your users to be able to download exactly what > their browser show ( this would mean as many images as many > tiles * number of layers ) or do you expect to have one > single image that contains the layers merged together ? > > Regards, > > Marco > ----- Original Message ----- > Da : Kwong Hu Kiu > A : , > Oggetto : RE: [OpenLayers-Users] FW: Download image(bitmap) > Data : Sat, 18 Apr 2009 16:07:30 +0800 > > > Thanks for the reply. > > > > So how can i do that with javascript ? Yes, i have my own > > custom wms service. > > > > I want to be able to download the map using javascript > > like you said. > > > > Cheers. > > > > > From: marco.ferretti@fermasoft.com > > > To: kwonghu@hotmail.com > > > Subject: re: [OpenLayers-Users] FW: Download > > > image(bitmap) Date: Sat, 18 Apr 2009 09:52:43 +0200 > > > > > > Hi > > > > > > I don't think i understood your question .... if you > > > want to be able to download stuff that you see you have > > > several options ( depending on how you created the map > > > ... aka how many layers you have ) ; I think what you > > > are looking for is a link that has to contain the same > > > stuff you send to the WMS server . That shall be quite > > > easy using Javascript . As of C# : i don't think you > > > have to deal with it since what you see ( the maps ) is > > > the result of an http request made client side thus, > > > unless you create a wrapper that submits your server > > > side code all the infos you need, you can do very little > > > with that. > > > hope it helps > > > > > > Marco > > > ----- Original Message ----- > > > Da : Kwong Hu Kiu > > > A : , > > > Oggetto : [OpenLayers-Users] FW: Download image(bitmap) > > > Data : Sat, 18 Apr 2009 13:22:52 +0800 > > > > > > > Hi, > > > > > > > > Any solution to my question below? > > > > > > > > Sorry i have to send it to dev@openlayers.org. > > > > Hopefully, i can get some replies. > > > > > > > > Regards. > > > > > > > > From: kwonghu@hotmail.com > > > > To: users@openlayers.org > > > > Date: Thu, 16 Apr 2009 21:20:53 +0800 > > > > Subject: [OpenLayers-Users] Download image(bitmap) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > Currently, I am using WMS service to display maps on > > > > openlayers. I am wondering if it's possible to allow > > > > users to download the bitmap(Map) they are seeing. > > > > > > > > Is it supported with openlayers ? or is it possible to > > > > use c# code and interact with openlayers javascript? > > > > > > > > Interacting c# and javascript is something I have no > > > > idea. > > > > Please shed lights. > > > > > > > > Cheers. > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Users mailing list > > > > Users@openlayers.org > > > > http://openlayers.org/mailman/listinfo/users > > > > > > > > [Allegato : ATT00000] > > > _______________________________________________ > 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/20090505/233d1e81/attachment.html From lischke at novacom.net Tue May 5 08:39:38 2009 From: lischke at novacom.net (Stefan Lischke) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer In-Reply-To: <1241517850962-2792029.post@n2.nabble.com> References: <1241517850962-2792029.post@n2.nabble.com> Message-ID: <3B313F58D469480381FF083B09E8F891@novacom.office> Hi Dave, That was also exactly my problem. Maybe there is another solution (i also would like to hear it) But i used Layer.setVisibility(boolean) to show/hide features. So you have to put the features on different layers. Hopefully someone will come up with a better solution Hth Stefan > Hi > > I have a vector layer (OpenLayers.Layer.Vector) and have > added a linear feature to it. > > If the user requests to temporarily hide the feature, I do that with: > layer.drawFeature(feature, { display: "none"}); This works > fine except if the user now changes the map zoom level, the > linear feature magically re-appears. > > My questions are: > 1) Am I using the correct technique to hide the feature? > 2) Is there a trick that will hide the feature at all zoom levels? > 3) Should I destroy the feature instead of just hiding it? > > Any help appreciated, > Dave > -- > View this message in context: > http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp > 2792029p2792029.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 djud at bas.ac.uk Tue May 5 08:44:04 2009 From: djud at bas.ac.uk (djud) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer In-Reply-To: <3B313F58D469480381FF083B09E8F891@novacom.office> References: <1241517850962-2792029.post@n2.nabble.com> <3B313F58D469480381FF083B09E8F891@novacom.office> Message-ID: <1241527444211-2793488.post@n2.nabble.com> Hi Stefan, I did look at that option but, as you say, each feature has to be in a different layer - which I wasn't so keen on. Thanks for the reply, Dave -- View this message in context: http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p2793488.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eric.lemoine at camptocamp.com Tue May 5 08:48:42 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] FW: Download image(bitmap) In-Reply-To: References: Message-ID: On Tue, May 5, 2009 at 2:31 PM, Kwong Hu Kiu wrote: > > > I am still figuring out how to do this. > > I have a look at Mapfish. Using openlayers underneath. > http://map.veloland.ch/ > > They have a way of displaying the bitmap in pdf when the print button is > clicked. > > Anyone knows how that's done ? [dev@openlayers.org removed from the CC list] That uses the MapFish Print Module. This module is listed at the end of the OpenLayers Printing wiki page: Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From kwonghu at hotmail.com Tue May 5 08:54:49 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] FW: Download image(bitmap) In-Reply-To: References: Message-ID: For this link http://trac.openlayers.org/wiki/Printing Do I need mapfish to run the printing function ? Sorry, still new to openlayers. Thanks > Date: Tue, 5 May 2009 14:48:42 +0200 > Subject: Re: [OpenLayers-Dev] [OpenLayers-Users] FW: Download image(bitmap) > From: eric.lemoine@camptocamp.com > To: kwonghu@hotmail.com > CC: arnd.wippermann@web.de; users@openlayers.org > > On Tue, May 5, 2009 at 2:31 PM, Kwong Hu Kiu wrote: > > > > > > I am still figuring out how to do this. > > > > I have a look at Mapfish. Using openlayers underneath. > > http://map.veloland.ch/ > > > > They have a way of displaying the bitmap in pdf when the print button is > > clicked. > > > > Anyone knows how that's done ? > > [dev@openlayers.org removed from the CC list] > > That uses the MapFish Print Module. This module is listed at the end > of the OpenLayers Printing wiki page: > > > Cheers, > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090505/23f7af92/attachment.html From ahmed.soua at gmail.com Tue May 5 09:01:48 2009 From: ahmed.soua at gmail.com (ahmed soua) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] How to obtain the slippy map using tiles Message-ID: Hi all, I have the tiles generated by mapnik of my country and i wlould ti use them to have a slippy map of my country. I have used openLayers for this but the problem, i obtained always an empty map. My tiles are generated like this : tiles/18/138391/102113.png; 102114.png ..... /138392/102115.png;102.116.png;..... /138393/102117.png; 102.117.png....... ( 18 is a zoom generated by mapnik) so when i write in the html file "../tiles/, {numZoomLevels: 18}" , is this enough to openLayers to find the tiles of the zoom 18 .??? I will very grateful for any help Ahmed -- Le bonheur est comme l'?cho : il vous r?pond : mais il ne vient pas. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090505/c785fe3f/attachment.html From CHRISTOPHER.M.HEIDT at saic.com Tue May 5 09:10:34 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer In-Reply-To: <1241527444211-2793488.post@n2.nabble.com> References: <1241517850962-2792029.post@n2.nabble.com><3B313F58D469480381FF083B09E8F891@novacom.office> <1241527444211-2793488.post@n2.nabble.com> Message-ID: <1053B20F24D85F41B57F168351684E2203D6AB63@0015-its-exmb04.us.saic.com> Changing the opacity to zero instead might be a good solution. -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of djud Sent: Tuesday, May 05, 2009 8:44 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] Visibility of features in vector layer Hi Stefan, I did look at that option but, as you say, each feature has to be in a different layer - which I wasn't so keen on. Thanks for the reply, Dave -- View this message in context: http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p27 93488.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 djud at bas.ac.uk Tue May 5 09:16:01 2009 From: djud at bas.ac.uk (djud) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer In-Reply-To: <1053B20F24D85F41B57F168351684E2203D6AB63@0015-its-exmb04.us.saic.com> References: <1241517850962-2792029.post@n2.nabble.com> <3B313F58D469480381FF083B09E8F891@novacom.office> <1241527444211-2793488.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2203D6AB63@0015-its-exmb04.us.saic.com> Message-ID: <1241529361942-2794303.post@n2.nabble.com> Thanks Heidtmare, I will try this but I'm still concerned as to why drawing the feature with "display: none" doesn't work at all zoom levels. Dave -- View this message in context: http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p2794303.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From CHRISTOPHER.M.HEIDT at saic.com Tue May 5 09:32:52 2009 From: CHRISTOPHER.M.HEIDT at saic.com (Heidt, Christopher M.) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer In-Reply-To: <1241529361942-2794303.post@n2.nabble.com> References: <1241517850962-2792029.post@n2.nabble.com><3B313F58D469480381FF083B09E8F891@novacom.office><1241527444211-2793488.post@n2.nabble.com><1053B20F24D85F41B57F168351684E2203D6AB63@0015-its-exmb04.us.saic.com> <1241529361942-2794303.post@n2.nabble.com> Message-ID: <1053B20F24D85F41B57F168351684E2203D6ABAD@0015-its-exmb04.us.saic.com> I'm assuming that when you tell it to redraw you pass it params for that redraw but those params are for that redraw only. When you change your zoom lvl OL is redrawing the feature with its origional style settings. Try changing the features render intent(style setting) prior to redraw. var featureStyles = new OpenLayers.StyleMap({ "default": OpenLayers.Feature.Vector.style["default"], "select": OpenLayers.Feature.Vector.style.select, "hidden":{ fillOpacity: 0.0 strokeOpacity: 0.0 } }); //then later you can feature.renderIntent = 'hidden'; _featureLayer.drawFeature(feature); -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of djud Sent: Tuesday, May 05, 2009 9:16 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] Visibility of features in vector layer Thanks Heidtmare, I will try this but I'm still concerned as to why drawing the feature with "display: none" doesn't work at all zoom levels. Dave -- View this message in context: http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p27 94303.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 djud at bas.ac.uk Tue May 5 09:38:46 2009 From: djud at bas.ac.uk (djud) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer In-Reply-To: <1053B20F24D85F41B57F168351684E2203D6ABAD@0015-its-exmb04.us.saic.com> References: <1241517850962-2792029.post@n2.nabble.com> <3B313F58D469480381FF083B09E8F891@novacom.office> <1241527444211-2793488.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2203D6AB63@0015-its-exmb04.us.saic.com> <1241529361942-2794303.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2203D6ABAD@0015-its-exmb04.us.saic.com> Message-ID: <1241530726072-2794908.post@n2.nabble.com> Thanks again Heidtmare, I think you're right, the "display: none" is only getting set for the redraw. I'll experiment with making that style setting more permanent. Cheers -- View this message in context: http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p2794908.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From djud at bas.ac.uk Tue May 5 09:52:52 2009 From: djud at bas.ac.uk (djud) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer In-Reply-To: <1241530726072-2794908.post@n2.nabble.com> References: <1241517850962-2792029.post@n2.nabble.com> <3B313F58D469480381FF083B09E8F891@novacom.office> <1241527444211-2793488.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2203D6AB63@0015-its-exmb04.us.saic.com> <1241529361942-2794303.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2203D6ABAD@0015-its-exmb04.us.saic.com> <1241530726072-2794908.post@n2.nabble.com> Message-ID: <1241531572349-2795272.post@n2.nabble.com> Thanks Heidtmare, you're suggestion has fixed the problem! I now set the display style before calling drawfeature : feature.style.display = 'none'; layer.drawFeature(feature); This is now correct for all OL's internal redraws. I re-enable the feature's display setting by: feature.style.display = true; Not sure this is the correct setting but I think anything other than 'none' will work. Cheers, Dave djud wrote: > > Thanks again Heidtmare, > > I think you're right, the "display: none" is only getting set for the > redraw. I'll experiment with making that style setting more permanent. > > Cheers > > > > -- View this message in context: http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p2795272.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From yves.moisan at boreal-is.com Tue May 5 10:13:45 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] OSM Message-ID: <1241532825.3881.31.camel@yves-laptop> Hi All, I'm looking for documentation pointers that explain the differences between OSM Maphik and Tiles@Home. Specifically, I need to enable an OSM basemap on an OL 2.6 (in production) and looking at the source of the examples, I foud three different ways to have an OSM base map : 1) sundials-spherical-mercator.html : var mapnik = new OpenLayers.Layer.TMS( "OpenStreetMap (Mapnik)", "http://tile.openstreetmap.org/", { type: 'png', getURL: osm_getTileURL, 2-3) spherical-mercator.html : var mapnik = new OpenLayers.Layer.OSM(); var osmarender = new OpenLayers.Layer.OSM( "OpenStreetMap (Tiles@Home)", "http://tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png" ); I see there are two implementations for Tiles@Home, so is there a recommended one ? Thanx for pointers, yvesm From crschmidt at metacarta.com Tue May 5 10:40:19 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] OSM In-Reply-To: <1241532825.3881.31.camel@yves-laptop> References: <1241532825.3881.31.camel@yves-laptop> Message-ID: <20090505144019.GS1510@metacarta.com> On Tue, May 05, 2009 at 10:13:45AM -0400, Yves Moisan wrote: > Hi All, > > I'm looking for documentation pointers that explain the differences > between OSM Maphik and Tiles@Home. Specifically, I need to enable an > OSM basemap on an OL 2.6 (in production) and looking at the source of > the examples, I foud three different ways to have an OSM base map : > > 1) sundials-spherical-mercator.html : > > var mapnik = new OpenLayers.Layer.TMS( > "OpenStreetMap (Mapnik)", > "http://tile.openstreetmap.org/", > { > type: 'png', getURL: osm_getTileURL, > > 2-3) spherical-mercator.html : > > var mapnik = new OpenLayers.Layer.OSM(); > var osmarender = new OpenLayers.Layer.OSM( > "OpenStreetMap (Tiles@Home)", > "http://tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png" > ); > > I see there are two implementations for Tiles@Home, so is there a recommended one ? The latter is only available in OpenLayers 2.8. Regards, -- Christopher Schmidt MetaCarta From shai_mus at hotmail.com Tue May 5 11:11:12 2009 From: shai_mus at hotmail.com (newbie) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] need help with projection issues In-Reply-To: <20080118163145.GA26530@alta.metacarta.com> References: <7920d0190801140806x4e964c91w6e3c4774b2f95e06@mail.gmail.com> <20080114161456.GC20672@alta.metacarta.com> <7920d0190801140835l7b6673dbkf961a27aef556c40@mail.gmail.com> <20080114172208.GA22701@alta.metacarta.com> <6e9b30fb0801141208p7acb932coe6c0e4ac27e450ba@mail.gmail.com> <1e14d5320801141417ydac16d7ua8aa5891ff0e73c2@mail.gmail.com> <7920d0190801180804i5980cf09o96e28f8bbe229ecd@mail.gmail.com> <20080118163145.GA26530@alta.metacarta.com> Message-ID: <1241536272122-2797350.post@n2.nabble.com> Dear All, If I need a circle based on a radius of 50m which function must I use ? I just have a lat and long only. Thank you. Christopher Schmidt-2 wrote: > > On Fri, Jan 18, 2008 at 05:04:30PM +0100, O. Baum wrote: >> Hi Thomas, all, >> >> 2008/1/16, Thomas Wood : >> > Yes, you will. displayProjection just tells controls to reproject >> > before displaying or parsing coords they use. >> > >> > Reprojecting is fairly simple: [...] >> >> ok, that works. >> >> BUT if I want to draw a circle with the help of >> OpenLayers.Geometry.Polygon.createRegularPolygon() it becomes an >> ellipse. :( >> I'm using this code: >> >> ---8<--------------------------------- >> var circOrigin = new OpenLayers.Geometry.Point( 10.00, 49.50 ); >> var circStyle = OpenLayers.Util.extend( {}, >> OpenLayers.Feature.Vector.style["default"] ); >> var circleFeature = new OpenLayers.Feature.Vector( >> OpenLayers.Geometry.Polygon.createRegularPolygon( circOrigin, 0.001, 20, >> 0 ), >> null, >> circStyle ); >> circleFeature.geometry.transform( new >> OpenLayers.Projection("EPSG:4326"), new >> OpenLayers.Projection("EPSG:900913") ); >> vectors.addFeatures( [circleFeature] ); >> --->8--------------------------------- >> >> 2 questions: >> >> a) How and where can I apply the transformation so my circle is >> 'really' (i.e. on the map) a circle? >> b) In what units is the radius given? How can I calulate it from Meters? > > Both of these questions can be answered by reprojecting your poitn > *before* you create the polygon. > > var circOrigin = new OpenLayers.Geometry.Point( 10.00, 49.50 ); > circOrigin.geometry.transform( new > OpenLayers.Projection("EPSG:4326"), new > OpenLayers.Projection("EPSG:900913") ); > > var circStyle = OpenLayers.Util.extend( {}, > OpenLayers.Feature.Vector.style["default"] ); > var circleFeature = new OpenLayers.Feature.Vector( > OpenLayers.Geometry.Polygon.createRegularPolygon( circOrigin, 100 /* > meters */, 20, 0 ), > null, > circStyle ); > vectors.addFeatures( [circleFeature] ); > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/need-help-with-projection-issues-tp1827236p2797350.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From carreicm at hotmail.com Tue May 5 11:14:37 2009 From: carreicm at hotmail.com (Ivan Carreira) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Query only in visible layers In-Reply-To: <4A0031A2.4090206@mapgears.com> References: <4A0031A2.4090206@mapgears.com> Message-ID: Thanks for the help. I am starting to use openlayers and I do not know much about this. The idea is: -Deactivating a layer in the legend, make the query, and not display the popup -Activating a layer in the legend, make the query, and not display the popup Being tested with the following: var showInfo = function(event) { var layers = map.layers; if(event) { for (var i = 0; i < layers.length; i++) { if (!layers[i].getVisibility()) { but I do not know how to continue. Regards, Iv?n > > Hi, > > Do you mean visible OpenLayers layers or server side-layers ? Do you > use (1) one OL layer per server-side layer or (2) are they all in the > same OL layer ? > > If (1) : loop through your map layers for each visible/inRange layer > to get their params.['LAYERS'] property. If they come from the same > server, you can merge them in a single request. > > If (2) : If you use MapServer and you have direct access to the > mapfile, you could do the following. Please, anyone correct me if I'm > wrong, but I think getfeatureinfo requests are made regardless of a > layer's minscaledenom or maxscaledenom property. So you could create a > template with leg_layer_minscale and leg_layer_maxscale values to get > theses values from the server-side into a javascript array. Also, add > the layer name at the same time (because that's the value to be added to > the query_layers query property). Then, on click, you could loop through > this array to check that the layers are currently visible (compare with > current scale). See that (3) link for more details. Does that make sense ? > > (3) http://mapserver.org/output/html_legend.html > > Regards, > > Alexandre > > Ivan Carreira wrote: > > Hi all, > > > > > > > > I have a problem. > > > > I need an expression to limit queries only to the layers that are visible at that time on the map. > > Queries are displayed via a popup. > > The code where queries are made and displayed in the popup is as follows: > > > > var showInfo = function(event) { > > > > var pixel = event.xy; > > var lonlat = this.getLonLatFromPixel(pixel); > > var message = null; > > var params = {}; > > params['service'] = 'wms'; > > params['request'] = 'GetFeatureInfo'; > > params['version'] = '1.1.1'; > > params['info_format'] = 'text/plain'; > > params['srs'] = this.getProjection(); > > params['bbox'] = this.getExtent().toBBOX(6); > > params['width'] = this.getSize().w; > > params['height'] = this.getSize().h; > > params['feature_count'] = 1; > > params['x'] = pixel.x; . > > params['y'] = pixel.y; > > params['layers'] = 'camino'; > > params['query_layers'] = 'camino'; > > > > new OpenLayers.Request.GET({ > > url: server, > > async: false, > > params: params, > > success: function(data) { > > message = data.responseText; > > } > > }); > > > > > > > > message = getHTML(message); > > > > > > var popup = new OpenLayers.Popup.FramedCloud('popup', lonlat, null, message, null, true, null); > > > > this.addPopup(popup); > > > > };//End of function showInfo() > > > > map.events.register('click', map, showInfo); > > > > > _________________________________________________________________ Desc?rgate ahora el nuevo Internet Explorer 8 y ten a tu alcance todos los servicios de Windows Live ?Gratis! http://ie8.msn.com/microsoft/internet-explorer-8/es-es/ie8.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090505/84bd6c6f/attachment.html From adube at mapgears.com Tue May 5 11:27:22 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Query only in visible layers In-Reply-To: References: <4A0031A2.4090206@mapgears.com> Message-ID: <4A005ADA.2060607@mapgears.com> Are you using firebug ? If not, you should. It's a great javascript tool. Put breakpoints where needed and you'll see the functions and object properties available for what you need. Since you're starting with OpenLayers, you should try to make the query work for one layer only ( do no loop in the map layers yet ). It could looks like this : if(!event) return; if(!layer.getVisibility() || !layer.inRange) return; // carry on with your query Regards, Alexandre Ivan Carreira wrote: > Thanks for the help. I am starting to use openlayers and I do not know > much about this. > The idea is: > -Deactivating a layer in the legend, make the query, and not display > the popup > -Activating a layer in the legend, make the query, and not display the > popup > > Being tested with the following: > > var showInfo = function(event) { > var layers = map.layers; > > if(event) > { > for (var i = 0; i < layers.length; i++) { > > if (!layers[i].getVisibility()) > > { > > > but I do not know how to continue. > > Regards, > > Iv?n > > > > > > > > > Hi, > > > > Do you mean visible OpenLayers layers or server side-layers ? Do you > > use (1) one OL layer per server-side layer or (2) are they all in the > > same OL layer ? > > > > If (1) : loop through your map layers for each visible/inRange layer > > to get their params.['LAYERS'] property. If they come from the same > > server, you can merge them in a single request. > > > > If (2) : If you use MapServer and you have direct access to the > > mapfile, you could do the following. Please, anyone correct me if I'm > > wrong, but I think getfeatureinfo requests are made regardless of a > > layer's minscaledenom or maxscaledenom property. So you could create a > > template with leg_layer_minscale and leg_layer_maxscale values to get > > theses values from the server-side into a javascript array. Also, add > > the layer name at the same time (because that's the value to be > added to > > the query_layers query property). Then, on click, you could loop > through > > this array to check that the layers are currently visible (compare with > > current scale). See that (3) link for more details. Does that make > sense ? > > > > (3) http://mapserver.org/output/html_legend.html > > > > Regards, > > > > Alexandre > > > > Ivan Carreira wrote: > > > Hi all, > > > > > > > > > > > > I have a problem. > > > > > > I need an expression to limit queries only to the layers that are > visible at that time on the map. > > > Queries are displayed via a popup. > > > The code where queries are made and displayed in the popup is as > follows: > > > > > > var showInfo = function(event) { > > > > > > var pixel = event.xy; > > > var lonlat = this.getLonLatFromPixel(pixel); > > > var message = null; > > > var params = {}; > > > params['service'] = 'wms'; > > > params['request'] = 'GetFeatureInfo'; > > > params['version'] = '1.1.1'; > > > params['info_format'] = 'text/plain'; > > > params['srs'] = this.getProjection(); > > > params['bbox'] = this.getExtent().toBBOX(6); > > > params['width'] = this.getSize().w; > > > params['height'] = this.getSize().h; > > > params['feature_count'] = 1; > > > params['x'] = pixel.x; . > > > params['y'] = pixel.y; > > > params['layers'] = 'camino'; > > > params['query_layers'] = 'camino'; > > > > > > new OpenLayers.Request.GET({ > > > url: server, > > > async: false, > > > params: params, > > > success: function(data) { > > > message = data.responseText; > > > } > > > }); > > > > > > > > > > > > message = getHTML(message); > > > > > > > > > var popup = new OpenLayers.Popup.FramedCloud('popup', lonlat, > null, message, null, true, null); > > > > > > this.addPopup(popup); > > > > > > };//End of function showInfo() > > > > > > map.events.register('click', map, showInfo); > > > > > > > > > > > ------------------------------------------------------------------------ > Ahora, GRATIS Hotmail en tu m?vil ?Desc?brelo aqu?! > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From carreicm at hotmail.com Tue May 5 11:58:47 2009 From: carreicm at hotmail.com (Ivan Carreira) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Query only in visible layers In-Reply-To: <4A005ADA.2060607@mapgears.com> References: <4A0031A2.4090206@mapgears.com> <4A005ADA.2060607@mapgears.com> Message-ID: Thanks for the replies. I'll work on it. Regards, Iv?n > Are you using firebug ? If not, you should. It's a great javascript > tool. Put breakpoints where needed and you'll see the functions and > object properties available for what you need. > > Since you're starting with OpenLayers, you should try to make the > query work for one layer only ( do no loop in the map layers yet ). > > It could looks like this : > > if(!event) > return; > > if(!layer.getVisibility() || !layer.inRange) > return; > > // carry on with your query > > Regards, > > Alexandre > > > Ivan Carreira wrote: > > Thanks for the help. I am starting to use openlayers and I do not know > > much about this. > > The idea is: > > -Deactivating a layer in the legend, make the query, and not display > > the popup > > -Activating a layer in the legend, make the query, and not display the > > popup > > > > Being tested with the following: > > > > var showInfo = function(event) { > > var layers = map.layers; > > > > if(event) > > { > > for (var i = 0; i < layers.length; i++) { > > > > if (!layers[i].getVisibility()) > > > > { > > > > > > but I do not know how to continue. > > > > Regards, > > > > Iv?n > > > > > > > > > > > > > > > > Hi, > > > > > > Do you mean visible OpenLayers layers or server side-layers ? Do you > > > use (1) one OL layer per server-side layer or (2) are they all in the > > > same OL layer ? > > > > > > If (1) : loop through your map layers for each visible/inRange layer > > > to get their params.['LAYERS'] property. If they come from the same > > > server, you can merge them in a single request. > > > > > > If (2) : If you use MapServer and you have direct access to the > > > mapfile, you could do the following. Please, anyone correct me if I'm > > > wrong, but I think getfeatureinfo requests are made regardless of a > > > layer's minscaledenom or maxscaledenom property. So you could create a > > > template with leg_layer_minscale and leg_layer_maxscale values to get > > > theses values from the server-side into a javascript array. Also, add > > > the layer name at the same time (because that's the value to be > > added to > > > the query_layers query property). Then, on click, you could loop > > through > > > this array to check that the layers are currently visible (compare with > > > current scale). See that (3) link for more details. Does that make > > sense ? > > > > > > (3) http://mapserver.org/output/html_legend.html > > > > > > Regards, > > > > > > Alexandre > > > > > > Ivan Carreira wrote: > > > > Hi all, > > > > > > > > > > > > > > > > I have a problem. > > > > > > > > I need an expression to limit queries only to the layers that are > > visible at that time on the map. > > > > Queries are displayed via a popup. > > > > The code where queries are made and displayed in the popup is as > > follows: > > > > > > > > var showInfo = function(event) { > > > > > > > > var pixel = event.xy; > > > > var lonlat = this.getLonLatFromPixel(pixel); > > > > var message = null; > > > > var params = {}; > > > > params['service'] = 'wms'; > > > > params['request'] = 'GetFeatureInfo'; > > > > params['version'] = '1.1.1'; > > > > params['info_format'] = 'text/plain'; > > > > params['srs'] = this.getProjection(); > > > > params['bbox'] = this.getExtent().toBBOX(6); > > > > params['width'] = this.getSize().w; > > > > params['height'] = this.getSize().h; > > > > params['feature_count'] = 1; > > > > params['x'] = pixel.x; . > > > > params['y'] = pixel.y; > > > > params['layers'] = 'camino'; > > > > params['query_layers'] = 'camino'; > > > > > > > > new OpenLayers.Request.GET({ > > > > url: server, > > > > async: false, > > > > params: params, > > > > success: function(data) { > > > > message = data.responseText; > > > > } > > > > }); > > > > > > > > > > > > > > > > message = getHTML(message); > > > > > > > > > > > > var popup = new OpenLayers.Popup.FramedCloud('popup', lonlat, > > null, message, null, true, null); > > > > > > > > this.addPopup(popup); > > > > > > > > };//End of function showInfo() > > > > > > > > map.events.register('click', map, showInfo); > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > Ahora, GRATIS Hotmail en tu m?vil ?Desc?brelo aqu?! > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > _________________________________________________________________ ?Qu?tate unos clics! Ahora, Internet Explorer 8 tiene todo lo que te gusta de Windows Live ?Cons?guelo gratis! http://ie8.msn.com/microsoft/internet-explorer-8/es-es/ie8.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090505/ca1fcfdf/attachment.html From yves.moisan at boreal-is.com Tue May 5 12:10:28 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] OSM In-Reply-To: <20090505144019.GS1510@metacarta.com> References: <1241532825.3881.31.camel@yves-laptop> <20090505144019.GS1510@metacarta.com> Message-ID: <1241539828.3881.90.camel@yves-laptop> Thanx Chris. I bumped across a styleId parameter a few weeks ago that comes with the CloudMade API e.g. http://maps.cloudmade.com/?lat=37.337664&lng=-121.892087&zoom=17&styleId=1045 Are there OL maps out there that poke the CloudMade API ? I'm particularly interested in how one can make one's own style and use it to style OSM data. Easy basemap theming/customizing would be a big win. Yves From eric.lemoine at camptocamp.com Tue May 5 12:46:56 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Visibility of features in vector layer In-Reply-To: <1241531572349-2795272.post@n2.nabble.com> References: <1241517850962-2792029.post@n2.nabble.com> <3B313F58D469480381FF083B09E8F891@novacom.office> <1241527444211-2793488.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2203D6AB63@0015-its-exmb04.us.saic.com> <1241529361942-2794303.post@n2.nabble.com> <1053B20F24D85F41B57F168351684E2203D6ABAD@0015-its-exmb04.us.saic.com> <1241530726072-2794908.post@n2.nabble.com> <1241531572349-2795272.post@n2.nabble.com> Message-ID: On Tuesday, May 5, 2009, djud wrote: > > Thanks Heidtmare, > > you're suggestion has fixed the problem! I now set the display style before > calling drawfeature : > > feature.style.display = 'none'; > layer.drawFeature(feature); > > This is now correct for all OL's internal redraws. I re-enable the feature's > display setting by: > > feature.style.display = true; > > Not sure this is the correct setting but I think anything other than 'none' > will work. Indeed. display: "" may be somewhat preferred. Cheers, > > Cheers, > Dave > > > > > > > > > > djud wrote: >> >> Thanks again Heidtmare, >> >> I think you're right, the "display: none" is only getting set for the >> redraw. I'll experiment with making that style setting more permanent. >> >> Cheers >> >> >> >> > > -- > View this message in context: http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p2795272.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Tue May 5 12:59:38 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] mousedown In-Reply-To: References: Message-ID: On Monday, May 4, 2009, Greg Ederer wrote: > For reference, here's my code so far: > > ? ? ? OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { > ? ? ? ? defaultHandlerOptions: { > ? ? ? ? ? 'single': true, > ? ? ? ? ? 'double': false, > ? ? ? ? ? 'mousedown' : false, > ? ? ? ? ? 'pixelTolerance': 0, > ? ? ? ? ? 'stopSingle': false, > ? ? ? ? ? 'stopDouble': false > ? ? ? ? }, > > ? ? ? ? initialize: function(options) > ? ? ? ? { > ? ? ? ? ? this.handlerOptions = OpenLayers.Util.extend( > ? ? ? ? ? {}, this.defaultHandlerOptions > ? ? ? ? ? ? ); > ? ? ? ? ? OpenLayers.Control.prototype.initialize.apply( > ? ? ? ? ? ? this, arguments > ? ? ? ? ? ? ); > ? ? ? ? ? this.handler = new OpenLayers.Handler.Click( > ? ? ? ? ? ? this, { > ? ? ? ? ? ? ? 'click': this.onClick, > ? ? ? ? ? ? ? 'dblclick': this.onDblclick, > ? ? ? ? ? ? ? 'mousedown' : this.onMouseDown > ? ? ? ? ? ? }, this.handlerOptions > ? ? ? ? ? ? ); > ? ? ? ? }, > > ? ? ? ? onMouseDown : function(evt) > ? ? ? ? { > ? ? ? ? ? alert('hi'); > ? ? ? ? }, > > ? ? ? ? ... > > ? ? ? var controls = { > ? ? ? ? "single": new OpenLayers.Control.Click({ > ? ? ? ? ? hanlerOptions: { > ? ? ? ? ? ? "single": true > ? ? ? ? ? } > ? ? ? ? }), > ? ? ? ? "mousedown": new OpenLayers.Control.Click({ > ? ? ? ? ? hanlerOptions: { > ? ? ? ? ? ? "single": true > ? ? ? ? ? } > ? ? ? ? }), > ? ? ? ? "double": new OpenLayers.Control.Click({ > ? ? ? ? ? handlerOptions: { > ? ? ? ? ? ? "single": false, > ? ? ? ? ? ? "double": true > ? ? ? ? ? } > ? ? ? ? }), > ? ? ? ? "both": new OpenLayers.Control.Click({ > ? ? ? ? ? handlerOptions: { > ? ? ? ? ? ? "single": true, > ? ? ? ? ? ? "double": true > ? ? ? ? ? } > ? ? ? ? }), > ? ? ? ? "drag": new OpenLayers.Control.Click({ > ? ? ? ? ? handlerOptions: { > ? ? ? ? ? ? "single": true, > ? ? ? ? ? ? "pixelTolerance": null > ? ? ? ? ? } > ? ? ? ? }), > ? ? ? ? "stopsingle": new OpenLayers.Control.Click({ > ? ? ? ? ? handlerOptions: { > ? ? ? ? ? ? "single": true, > ? ? ? ? ? ? "stopSingle": true > ? ? ? ? ? } > ? ? ? ? }), > ? ? ? ? "stopdouble": new OpenLayers.Control.Click({ > ? ? ? ? ? handlerOptions: { > ? ? ? ? ? ? "single": false, > ? ? ? ? ? ? "double": true, > ? ? ? ? ? ? "stopDouble": true > ? ? ? ? ? } > ? ? ? ? }) > ? ? ? }; > > ? ? ? var control; > ? ? ? for(var key in controls) { > ? ? ? ? control = controls[key]; > ? ? ? ? // only to route output here > ? ? ? ? control.key = key; > ? ? ? ? this.map.addControl(control); > ? ? ? //console.log('added control: ' + key); > ? ? ? } > > But, onMouseDown never gets called. This is expected. The Click handler can be passed "click" and "dblclick" callbacks only. Cheers, > > Greg > > On May 4, 2009, at 10:16 AM, Greg Ederer wrote: > >> Hi, >> >> I need to capture mousedown events on a Map. ?I'm using a custom >> OpenLayers.Control.Click for click and dblclick. ?But, Click does not >> appear to handle mousedown events. ?Any suggestions? >> >> Thanks! >> >> Greg >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From greg at ergonosis.com Tue May 5 13:02:05 2009 From: greg at ergonosis.com (Greg Ederer) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] mousedown In-Reply-To: References: Message-ID: <16720D25-6B82-4392-9424-DE4FB5A07157@ergonosis.com> Is there some way to register a callback to handle mousedown? I really need this to get my user interface working properly. Cheers, Greg On May 5, 2009, at 9:59 AM, Eric Lemoine wrote: > On Monday, May 4, 2009, Greg Ederer wrote: >> For reference, here's my code so far: >> >> OpenLayers.Control.Click = >> OpenLayers.Class(OpenLayers.Control, { >> defaultHandlerOptions: { >> 'single': true, >> 'double': false, >> 'mousedown' : false, >> 'pixelTolerance': 0, >> 'stopSingle': false, >> 'stopDouble': false >> }, >> >> initialize: function(options) >> { >> this.handlerOptions = OpenLayers.Util.extend( >> {}, this.defaultHandlerOptions >> ); >> OpenLayers.Control.prototype.initialize.apply( >> this, arguments >> ); >> this.handler = new OpenLayers.Handler.Click( >> this, { >> 'click': this.onClick, >> 'dblclick': this.onDblclick, >> 'mousedown' : this.onMouseDown >> }, this.handlerOptions >> ); >> }, >> >> onMouseDown : function(evt) >> { >> alert('hi'); >> }, >> >> ... >> >> var controls = { >> "single": new OpenLayers.Control.Click({ >> hanlerOptions: { >> "single": true >> } >> }), >> "mousedown": new OpenLayers.Control.Click({ >> hanlerOptions: { >> "single": true >> } >> }), >> "double": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": false, >> "double": true >> } >> }), >> "both": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": true, >> "double": true >> } >> }), >> "drag": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": true, >> "pixelTolerance": null >> } >> }), >> "stopsingle": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": true, >> "stopSingle": true >> } >> }), >> "stopdouble": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": false, >> "double": true, >> "stopDouble": true >> } >> }) >> }; >> >> var control; >> for(var key in controls) { >> control = controls[key]; >> // only to route output here >> control.key = key; >> this.map.addControl(control); >> //console.log('added control: ' + key); >> } >> >> But, onMouseDown never gets called. > > This is expected. The Click handler can be passed "click" and > "dblclick" callbacks only. > > Cheers, > > > > >> >> Greg >> >> On May 4, 2009, at 10:16 AM, Greg Ederer wrote: >> >>> Hi, >>> >>> I need to capture mousedown events on a Map. I'm using a custom >>> OpenLayers.Control.Click for click and dblclick. But, Click does >>> not >>> appear to handle mousedown events. Any suggestions? >>> >>> Thanks! >>> >>> Greg >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > From weitstern at yahoo.com Tue May 5 13:04:18 2009 From: weitstern at yahoo.com (tanpopo) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] IE return 'Unhandled request return Not Found' In-Reply-To: Message-ID: <680157.95360.qm@web23802.mail.ird.yahoo.com> Hello, i tried to find why IE returns the error 'Unhandled request return Not Found' , but FW not, while 'OpenLayers.loadURL()' was running? How can i solve this problem? Is OpenLayers now cross-browser? Thank you! Best regards, Tanpopo From crschmidt at metacarta.com Tue May 5 14:07:31 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] OSM In-Reply-To: <1241539828.3881.90.camel@yves-laptop> References: <1241532825.3881.31.camel@yves-laptop> <20090505144019.GS1510@metacarta.com> <1241539828.3881.90.camel@yves-laptop> Message-ID: <20090505180731.GT1510@metacarta.com> On Tue, May 05, 2009 at 12:10:28PM -0400, Yves Moisan wrote: > Thanx Chris. > > I bumped across a styleId parameter a few weeks ago that comes with the > CloudMade API e.g. > http://maps.cloudmade.com/?lat=37.337664&lng=-121.892087&zoom=17&styleId=1045 > > Are there OL maps out there that poke the CloudMade API ? The OpenStreetMap homepage includes maps hosted by CloudMade. Regards, -- Christopher Schmidt MetaCarta From jncoign at Knology.net Tue May 5 15:20:25 2009 From: jncoign at Knology.net (joncoign) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] displacement of google satellite data compared to google streetmap In-Reply-To: <1208667373.2131271240823203701.JavaMail.root@mail.thehumanjourney.net> References: <1388040541.2031181240487404644.JavaMail.root@mail.thehumanjourney.net> <1208667373.2131271240823203701.JavaMail.root@mail.thehumanjourney.net> Message-ID: <1241551225792-2803669.post@n2.nabble.com> I have also seen some really odd behavior out of the Google layers if there is a DIV anywhere around the map with position:static. I am planning to do some more research into this, but as a quick workaround I have had to put the map outside of the popups layout and then dynamically position it on top of the content area on a higher z value to work around this. Jo Cook wrote: > > Hi Andreas, > > Yes, adding this code in a simple page with a fixed size map div worked > fine, no displacement. I will experiment more with the mapfish setup, and > bring this up on the mapfish list if I can't figure it out. > > Thanks for your help > > Jo > ----- Original Message ----- > From: "Andreas Hocevar (via Nabble)" > > To: "Jo Cook" > Sent: Friday, 24 April, 2009 21:35:30 GMT +00:00 GMT Britain, Ireland, > Portugal > Subject: Re: [OpenLayers-Users] displacement of google satellite data > compared to google streetmap > > Jo Cook wrote: >> Hi Andreas, >> >> I've tried your new patch for bug 1797 but it doesn't do anything for me. >> I >> don't know if it's because I'm not seeing this problem when I resize the >> map, but when I simply switch layers. I'm not using a vector layer over >> the >> top, just a WMS (non baselayer), so I haven't seen the issues with popup >> alignment. >> > > So it seems your issue is a different one. Maybe you have some weird css > on the page where you place the map? Try to use the code you posted > below in an empty html page without css and just a map div. > > Other than that, does the workaround to specify the map div's width and > height in pixels work for you? > > Regards, > Andreas. > > >> Andreas Hocevar-2 wrote: >> >>> Hi, >>> >>> this is a known issue, unfortunately without a good solution at the >>> moment: >>> http://trac.openlayers.org/ticket/1797 >>> http://trac.openlayers.org/ticket/2055 >>> >>> A workaround is to specify the map div's width and height in pixels. >>> >>> Regards, >>> Andreas. >>> >>> Joanne Cook wrote: >>> >>>> Hi List, >>>> >>>> I have a map that I thought was all correctly set up to use spherical >>>> mercator, and all my data (which is all projected in 900913) is >>>> correctly >>>> displaying on either open streetmap or google streets data. However, >>>> when >>>> I add a google satellite or hybrid layer, the initial load of the map >>>> shows the satellite layer displaced several hundred miles to the west. >>>> If >>>> I switch to the google streets layer without any zooming or panning, >>>> the >>>> displacement disappears. If I then switch back to the google satellite >>>> layer, again with no zooming or panning, it appears in the correct >>>> place. >>>> Throughout all of this, my data layer has no displacement. Furthermore, >>>> since all of this is set within mapfish, with extjs used for side >>>> panels, >>>> if I minimise the side panel while the displacement is occurring it >>>> also >>>> removes the displacement. I'm using the svn versions of openlayers and >>>> mapfish. >>>> >>>> This is the code relating to setting up the map and layers: >>>> >>>> function createMap() { >>>> var options = { >>>> projection: new OpenLayers.Projection("EPSG:900913"), >>>> displayProjection: new OpenLayers.Projection("EPSG:27700"), >>>> units: "m", >>>> maxResolution: 156543.0339, >>>> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, >>>> 20037508.34, >>>> 20037508.34) >>>> }; >>>> return new OpenLayers.Map('olmap',options); >>>> } //end createmap >>>> >>>> function addlayers(map){ >>>> >>>> >>>> // define wms >>>> layer = new OpenLayers.Layer.WMS("OA Sites WMS", >>>> " http://geoserver.thehumanjourney.net:80/geoserver/wms ?", >>>> {layers: 'oadigi:oasites', transparent: true, >>>> format: 'image/png', buffer:0}, >>>> {isBaseLayer: false}); >>>> >>>> >>>> >>>> // 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, >>>> numZoomLevels: 22} >>>> ); >>>> var ghyb = new OpenLayers.Layer.Google( >>>> "Google Hybrid", >>>> {type: G_HYBRID_MAP, 'sphericalMercator': true} >>>> ); >>>> >>>> >>>> // define pseudo-layer for highlighting selected features >>>> select = new OpenLayers.Layer.Vector("Selection", >>>> {protocol: new mapfish.Protocol.TriggerEventDecorator(protocol), >>>> strategies: [new mapfish.Strategy.ProtocolListener({append: true})], >>>> styleMap: new >>>> OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]), >>>> displayInLayerSwitcher: false}); >>>> >>>> >>>> // add layers >>>> map.addLayers([layer, select, gmap, gsat, ghyb]); >>>> >>>> } //end addlayers >>>> >>>> function setMapCenter() { >>>> //define a new projection object so map can be centred using latlong >>>> var proj = new OpenLayers.Projection("EPSG:4326"); >>>> var point = new OpenLayers.LonLat(-2.9, 53.6); >>>> this.setCenter(point.transform(proj, this.getProjectionObject()), 6); >>>> } //end setMapCenter >>>> >>>> I hope that's enough information for someone as it's hard for me to get >>>> this map accessible to the outside world yet. >>>> >>>> Many thanks >>>> >>>> Jo >>>> >>>> >>>> >>> -- >>> Andreas Hocevar >>> OpenGeo - http://opengeo.org/ >>> Expert service straight from the developers. >>> >>> _______________________________________________ >>> Users mailing list >>> Users@... >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> >> >> > _______________________________________________ > Users mailing list > Users@... > http://openlayers.org/mailman/listinfo/users > > > > > This email is a reply to your post @ > http://n2.nabble.com/displacement-of-google-satellite-data-compared-to-google-streetmap-tp2682471p2698857.html > You can reply by email or by visting the link above. > > -- > ----------------------------------------------------- > Joanne Cook > Senior IT Support and Development > Oxford Archaeology (North) > 01524 880212 > http://thehumanjourney.net > > > ------ > Files attached to this email may be in ISO 26300 format (OASIS Open > Document Format). If you have difficulty opening them, please visit > http://iso26300.info for more information. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/displacement-of-google-satellite-data-compared-to-google-streetmap-tp2682471p2803669.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From timmichelsen at gmx-topmail.de Tue May 5 16:07:50 2009 From: timmichelsen at gmx-topmail.de (Tim Michelsen) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Pyjamas & OL [was: Re: python wrapper to ol?] In-Reply-To: References: Message-ID: > Is there kind of a general python warpper for openlayers or does every > frmawork create it's own openlayers controller? The pyjamas guys claim to be able to wrap OL http://groups.google.com/group/pyjamas-dev/browse_thread/thread/639dffd00d6b7c7 From kgeusebroek at xebia.com Wed May 6 02:11:50 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] How to obtain the slippy map using tiles In-Reply-To: References: Message-ID: Hi, I don't think OpenLayers will automagically find the right tiles for you (or else I would like to know that option) You can create a subclass of the OpenLayers.Layer.TileCache class and override the method getUrl (and maybe the calculateGridLayout) to confirm to the layout of your tile structure Cheers Kris From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of ahmed soua Sent: Tuesday, May 05, 2009 3:02 PM To: Users@openlayers.org Subject: [OpenLayers-Users] How to obtain the slippy map using tiles Hi all, I have the tiles generated by mapnik of my country and i wlould ti use them to have a slippy map of my country. I have used openLayers for this but the problem, i obtained always an empty map. My tiles are generated like this : tiles/18/138391/102113.png; 102114.png ..... /138392/102115.png;102.116.png;..... /138393/102117.png; 102.117.png....... ( 18 is a zoom generated by mapnik) so when i write in the html file "../tiles/, {numZoomLevels: 18}" , is this enough to openLayers to find the tiles of the zoom 18 .??? I will very grateful for any help Ahmed -- Le bonheur est comme l'?cho : il vous r?pond : mais il ne vient pas. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090506/12c16015/attachment.html From kgeusebroek at xebia.com Wed May 6 02:15:29 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] need help with projection issues In-Reply-To: <1241536272122-2797350.post@n2.nabble.com> References: <7920d0190801140806x4e964c91w6e3c4774b2f95e06@mail.gmail.com><20080114161456.GC20672@alta.metacarta.com><7920d0190801140835l7b6673dbkf961a27aef556c40@mail.gmail.com><20080114172208.GA22701@alta.metacarta.com><6e9b30fb0801141208p7acb932coe6c0e4ac27e450ba@mail.gmail.com><1e14d5320801141417ydac16d7ua8aa5891ff0e73c2@mail.gmail.com><7920d0190801180804i5980cf09o96e28f8bbe229ecd@mail.gmail.com><20080118163145.GA26530@alta.metacarta.com> <1241536272122-2797350.post@n2.nabble.com> Message-ID: Hi, There is a function in OpenLayers to do that. Works like this: var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(feature.geometry, 50, 50) layer.addFeatures(new OpenLayers.Feature.Vector(circle)); the function expects 4 parameters of which I supply 3: - 1. The point where circlecenter must be at - 2. The radius in unit's of the map (in my case meters) - 3. The number of sides (50 makes a nice circle) The 4th parameter is the angle to start drawing but that doesn't make sense for a circle Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of newbie Sent: Tuesday, May 05, 2009 5:11 PM To: users@openlayers.org Subject: Re: [OpenLayers-Users] need help with projection issues Dear All, If I need a circle based on a radius of 50m which function must I use ? I just have a lat and long only. Thank you. Christopher Schmidt-2 wrote: > > On Fri, Jan 18, 2008 at 05:04:30PM +0100, O. Baum wrote: >> Hi Thomas, all, >> >> 2008/1/16, Thomas Wood : >> > Yes, you will. displayProjection just tells controls to reproject >> > before displaying or parsing coords they use. >> > >> > Reprojecting is fairly simple: [...] >> >> ok, that works. >> >> BUT if I want to draw a circle with the help of >> OpenLayers.Geometry.Polygon.createRegularPolygon() it becomes an >> ellipse. :( >> I'm using this code: >> >> ---8<--------------------------------- >> var circOrigin = new OpenLayers.Geometry.Point( 10.00, 49.50 ); >> var circStyle = OpenLayers.Util.extend( {}, >> OpenLayers.Feature.Vector.style["default"] ); >> var circleFeature = new OpenLayers.Feature.Vector( >> OpenLayers.Geometry.Polygon.createRegularPolygon( circOrigin, 0.001, 20, >> 0 ), >> null, >> circStyle ); >> circleFeature.geometry.transform( new >> OpenLayers.Projection("EPSG:4326"), new >> OpenLayers.Projection("EPSG:900913") ); >> vectors.addFeatures( [circleFeature] ); >> --->8--------------------------------- >> >> 2 questions: >> >> a) How and where can I apply the transformation so my circle is >> 'really' (i.e. on the map) a circle? >> b) In what units is the radius given? How can I calulate it from Meters? > > Both of these questions can be answered by reprojecting your poitn > *before* you create the polygon. > > var circOrigin = new OpenLayers.Geometry.Point( 10.00, 49.50 ); > circOrigin.geometry.transform( new > OpenLayers.Projection("EPSG:4326"), new > OpenLayers.Projection("EPSG:900913") ); > > var circStyle = OpenLayers.Util.extend( {}, > OpenLayers.Feature.Vector.style["default"] ); > var circleFeature = new OpenLayers.Feature.Vector( > OpenLayers.Geometry.Polygon.createRegularPolygon( circOrigin, 100 /* > meters */, 20, 0 ), > null, > circStyle ); > vectors.addFeatures( [circleFeature] ); > > Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/need-help-with-projection-issues-tp1827236p2797350. 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 simone.gadenz at jrc.it Wed May 6 05:44:43 2009 From: simone.gadenz at jrc.it (Simone Gadenz) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] OpenLayers conflict with prototype/scriptacolous/jquery? In-Reply-To: <1241532825.3881.31.camel@yves-laptop> References: <1241532825.3881.31.camel@yves-laptop> Message-ID: <013001c9ce2f$48e6cd80$dab46880$@gadenz@jrc.it> Hello everybody. I have been using OL successfully for long time. I really appreciate a lot this product for its flexibility and robustness. I am not a JS programmer but I always managed to implement the desired functionalities in my map...since yesterday at least...:-)) I tried to insert in one of my map a LightBox to manage the magnification of some images. I used first the LightBox based on prototype and scriptacolous and I experienced some conflicts with the Style class of OL. I tried also a second product, called Slimbox and working on the JQury and MooTools, but I experienced the same problem. Has anybody used successfully a lightbox together with an OL map? Can somebody give any advice or suggestions? Thanks Simone From zoegge at gmx.ch Wed May 6 07:14:59 2009 From: zoegge at gmx.ch (zoggo) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] KML and Attributs Message-ID: <1241608499439-2811856.post@n2.nabble.com> Hi, I'm importing a kml text file a a layer in my map: var Layer_Regionen = new OpenLayers.Layer.GML("KML", "geodaten/regionen.kml", { projection: new OpenLayers.Projection("EPSG:4326"), format: OpenLayers.Format.KML, formatOptions: { extractStyles: true, extractAttributes: true } }); Later in the code I'd like to extract some of the attribute out of a feature the Layer 'Layer_Regionen'. But i only get a whole string like this: "
Attributes
SHAPE_Area8.80217136597592
region14
SHAPE_Length15.2328377860413
OBJECTID2
" I only need the attribut 'region' with the value '14'. Could someone help me? -- View this message in context: http://n2.nabble.com/KML-and-Attributs-tp2811856p2811856.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed May 6 07:19:59 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] KML and Attributs In-Reply-To: <1241608499439-2811856.post@n2.nabble.com> References: <1241608499439-2811856.post@n2.nabble.com> Message-ID: <20090506111959.GA27692@metacarta.com> On Wed, May 06, 2009 at 04:14:59AM -0700, zoggo wrote: > > Hi, > > I'm importing a kml text file a a layer in my map: > > var Layer_Regionen = new OpenLayers.Layer.GML("KML", > "geodaten/regionen.kml", { > projection: new OpenLayers.Projection("EPSG:4326"), > format: OpenLayers.Format.KML, > formatOptions: { > extractStyles: true, > extractAttributes: true > } > }); > > Later in the code I'd like to extract some of the attribute out of a feature > the Layer 'Layer_Regionen'. But i only get a whole string like this: > > "
bgcolor='#E3E3F3'> bgcolor=''> bgcolor='#E3E3F3'> bgcolor=''>
align='center'>Attributes
SHAPE_Area8.80217136597592
region14
SHAPE_Length15.2328377860413
OBJECTID2
" > > I only need the attribut 'region' with the value '14'. > > Could someone help me? As far as OpenLayers is concerned, that is the attribute. This data is ulikely to be structured in any more useful way. You'll need to use regular rexpressions or something similar toparse the data out of that. If the data is included in some other tag in the KML as well, such as ExtendedData, you may have more options. you might check that first, but I wouldn't be surprisd if it doesn't. Regards, -- Christopher Schmidt MetaCarta From kruithoff at bareattention.com Wed May 6 10:01:46 2009 From: kruithoff at bareattention.com (Elmar Kruithoff) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] OpenLayers conflict with prototype/scriptacolous/jquery? In-Reply-To: Message-ID: Hi Simone, I used http://www.phatfusion.net/multibox/. No problems so far. Regards Elmar Message: 7 Date: Wed, 6 May 2009 11:44:43 +0200 From: "Simone Gadenz" Subject: [OpenLayers-Users] OpenLayers conflict with prototype/scriptacolous/jquery? To: "'users'" Message-ID: <013001c9ce2f$48e6cd80$dab46880$@gadenz@jrc.it> Content-Type: text/plain; charset="us-ascii" Hello everybody. I have been using OL successfully for long time. I really appreciate a lot this product for its flexibility and robustness. I am not a JS programmer but I always managed to implement the desired functionalities in my map...since yesterday at least...:-)) I tried to insert in one of my map a LightBox to manage the magnification of some images. I used first the LightBox based on prototype and scriptacolous and I experienced some conflicts with the Style class of OL. I tried also a second product, called Slimbox and working on the JQury and MooTools, but I experienced the same problem. Has anybody used successfully a lightbox together with an OL map? Can somebody give any advice or suggestions? Thanks Simone From eric.lemoine at camptocamp.com Wed May 6 12:25:01 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] OpenLayers conflict with prototype/scriptacolous/jquery? In-Reply-To: <394701299247538950@unknownmsgid> References: <1241532825.3881.31.camel@yves-laptop> <394701299247538950@unknownmsgid> Message-ID: On Wednesday, May 6, 2009, Simone Gadenz wrote: > Hello everybody. > > I have been using OL successfully for long time. I really appreciate a lot > this product for its flexibility and robustness. > > I am not a JS programmer but I always managed to implement the desired > functionalities in my map...since yesterday at least...:-)) > > I tried to insert in one of my map a LightBox to manage the magnification of > some images. I used first the LightBox based on prototype and scriptacolous > and I experienced some conflicts with the Style class of OL. > I tried also a second product, called Slimbox and working on the JQury and > MooTools, but I experienced the same problem. > > Has anybody used successfully a lightbox together with an OL map? Can > somebody give any advice or suggestions? Hi What kind of problems are you having? Any error to report? Cheers, > > Thanks > > Simone > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Wed May 6 12:32:01 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] mousedown In-Reply-To: <16720D25-6B82-4392-9424-DE4FB5A07157@ergonosis.com> References: <16720D25-6B82-4392-9424-DE4FB5A07157@ergonosis.com> Message-ID: On Tuesday, May 5, 2009, Greg Ederer wrote: > Is there some way to register a callback to handle mousedown? ?I really need this to get my user interface working properly. Have you tried something like: map.events.on({ "mousedown": function(e) { // do something on mousedown } }); ? > > Cheers, > > Greg > > > On May 5, 2009, at 9:59 AM, Eric Lemoine wrote: > > > On Monday, May 4, 2009, Greg Ederer wrote: > > For reference, here's my code so far: > > ? ? ?OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { > ? ? ? ?defaultHandlerOptions: { > ? ? ? ? ?'single': true, > ? ? ? ? ?'double': false, > ? ? ? ? ?'mousedown' : false, > ? ? ? ? ?'pixelTolerance': 0, > ? ? ? ? ?'stopSingle': false, > ? ? ? ? ?'stopDouble': false > ? ? ? ?}, > > ? ? ? ?initialize: function(options) > ? ? ? ?{ > ? ? ? ? ?this.handlerOptions = OpenLayers.Util.extend( > ? ? ? ? ?{}, this.defaultHandlerOptions > ? ? ? ? ? ?); > ? ? ? ? ?OpenLayers.Control.prototype.initialize.apply( > ? ? ? ? ? ?this, arguments > ? ? ? ? ? ?); > ? ? ? ? ?this.handler = new OpenLayers.Handler.Click( > ? ? ? ? ? ?this, { > ? ? ? ? ? ? ?'click': this.onClick, > ? ? ? ? ? ? ?'dblclick': this.onDblclick, > ? ? ? ? ? ? ?'mousedown' : this.onMouseDown > ? ? ? ? ? ?}, this.handlerOptions > ? ? ? ? ? ?); > ? ? ? ?}, > > ? ? ? ?onMouseDown : function(evt) > ? ? ? ?{ > ? ? ? ? ?alert('hi'); > ? ? ? ?}, > > ? ? ? ?... > > ? ? ?var controls = { > ? ? ? ?"single": new OpenLayers.Control.Click({ > ? ? ? ? ?hanlerOptions: { > ? ? ? ? ? ?"single": true > ? ? ? ? ?} > ? ? ? ?}), > ? ? ? ?"mousedown": new OpenLayers.Control.Click({ > ? ? ? ? ?hanlerOptions: { > ? ? ? ? ? ?"single": true > ? ? ? ? ?} > ? ? ? ?}), > ? ? ? ?"double": new OpenLayers.Control.Click({ > ? ? ? ? ?handlerOptions: { > ? ? ? ? ? ?"single": false, > ? ? ? ? ? ?"double": true > ? ? ? ? ?} > ? ? ? ?}), > ? ? ? ?"both": new OpenLayers.Control.Click({ > ? ? ? ? ?handlerOptions: { > ? ? ? ? ? ?"single": true, > ? ? ? ? ? ?"double": true > ? ? ? ? ?} > ? ? ? ?}), > ? ? ? ?"drag": new OpenLayers.Control.Click({ > ? ? ? ? ?handlerOptions: { > ? ? ? ? ? ?"single": true, > ? ? ? ? ? ?"pixelTolerance": null > ? ? ? ? ?} > ? ? ? ?}), > ? ? ? ?"stopsingle": new OpenLayers.Control.Click({ > ? ? ? ? ?handlerOptions: { > ? ? ? ? ? ?"single": true, > ? ? ? ? ? ?"stopSingle": true > ? ? ? ? ?} > ? ? ? ?}), > ? ? ? ?"stopdouble": new OpenLayers.Control.Click({ > ? ? ? ? ?handlerOptions: { > ? ? ? ? ? ?"single": false, > ? ? ? ? ? ?"double": true, > ? ? ? ? ? ?"stopDouble": true > ? ? ? ? ?} > ? ? ? ?}) > ? ? ?}; > > ? ? ?var control; > ? ? ?for(var key in controls) { > ? ? ? ?control = controls[key]; > ? ? ? ?// only to route output here > ? ? ? ?control.key = key; > ? ? ? ?this.map.addControl(control); > ? ? ?//console.log('added control: ' + key); > ? ? ?} > > But, onMouseDown never gets called. > > > This is expected. The Click handler can be passed "click" and > "dblclick" callbacks only. > > Cheers, > > > > > > > Greg > > On May 4, 2009, at 10:16 AM, Greg Ederer wrote: > > > Hi, > > I need to capture mousedown events on a Map. ?I'm using a custom > OpenLayers.Control.Click for click and dblclick. ?But, Click does not > appear to handle mousedown events. ?Any suggestions? > > Thanks! > > Greg > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From greg at ergonosis.com Wed May 6 13:24:44 2009 From: greg at ergonosis.com (Greg Ederer) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] mousedown In-Reply-To: References: <16720D25-6B82-4392-9424-DE4FB5A07157@ergonosis.com> Message-ID: <7EACD078-B1C5-44EE-983A-8B87B056DE72@ergonosis.com> I just tried your suggestion. No luck. I've also tried: this.map.events.register('mousedown', this, function() { alert('foo'); } ); But this doesn't do it either. I'm now considering just adding an event listener to the Map's outermost div, and managing the mousedown event myself. Does anyone happen to know how to get a reference to the right HTML element? Thanks! Greg On May 6, 2009, at 9:32 AM, Eric Lemoine wrote: > On Tuesday, May 5, 2009, Greg Ederer wrote: >> Is there some way to register a callback to handle mousedown? I >> really need this to get my user interface working properly. > > Have you tried something like: > > map.events.on({ > "mousedown": function(e) { > // do something on mousedown > } > }); > > ? > >> >> Cheers, >> >> Greg >> >> >> On May 5, 2009, at 9:59 AM, Eric Lemoine wrote: >> >> >> On Monday, May 4, 2009, Greg Ederer wrote: >> >> For reference, here's my code so far: >> >> OpenLayers.Control.Click = >> OpenLayers.Class(OpenLayers.Control, { >> defaultHandlerOptions: { >> 'single': true, >> 'double': false, >> 'mousedown' : false, >> 'pixelTolerance': 0, >> 'stopSingle': false, >> 'stopDouble': false >> }, >> >> initialize: function(options) >> { >> this.handlerOptions = OpenLayers.Util.extend( >> {}, this.defaultHandlerOptions >> ); >> OpenLayers.Control.prototype.initialize.apply( >> this, arguments >> ); >> this.handler = new OpenLayers.Handler.Click( >> this, { >> 'click': this.onClick, >> 'dblclick': this.onDblclick, >> 'mousedown' : this.onMouseDown >> }, this.handlerOptions >> ); >> }, >> >> onMouseDown : function(evt) >> { >> alert('hi'); >> }, >> >> ... >> >> var controls = { >> "single": new OpenLayers.Control.Click({ >> hanlerOptions: { >> "single": true >> } >> }), >> "mousedown": new OpenLayers.Control.Click({ >> hanlerOptions: { >> "single": true >> } >> }), >> "double": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": false, >> "double": true >> } >> }), >> "both": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": true, >> "double": true >> } >> }), >> "drag": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": true, >> "pixelTolerance": null >> } >> }), >> "stopsingle": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": true, >> "stopSingle": true >> } >> }), >> "stopdouble": new OpenLayers.Control.Click({ >> handlerOptions: { >> "single": false, >> "double": true, >> "stopDouble": true >> } >> }) >> }; >> >> var control; >> for(var key in controls) { >> control = controls[key]; >> // only to route output here >> control.key = key; >> this.map.addControl(control); >> //console.log('added control: ' + key); >> } >> >> But, onMouseDown never gets called. >> >> >> This is expected. The Click handler can be passed "click" and >> "dblclick" callbacks only. >> >> Cheers, >> >> >> >> >> >> >> Greg >> >> On May 4, 2009, at 10:16 AM, Greg Ederer wrote: >> >> >> Hi, >> >> I need to capture mousedown events on a Map. I'm using a custom >> OpenLayers.Control.Click for click and dblclick. But, Click does not >> appear to handle mousedown events. Any suggestions? >> >> Thanks! >> >> Greg >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> >> >> >> -- >> Eric Lemoine >> >> Camptocamp France SAS >> Savoie Technolac, BP 352 >> 73377 Le Bourget du Lac, Cedex >> >> Tel : 00 33 4 79 44 44 96 >> Mail : eric.lemoine@camptocamp.com >> http://www.camptocamp.com >> >> >> >> > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : eric.lemoine@camptocamp.com > http://www.camptocamp.com > From gary_wales at hotmail.com Thu May 7 04:33:23 2009 From: gary_wales at hotmail.com (gwales) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Markers incorrectly placed after pan Message-ID: <1241685203051-2826723.post@n2.nabble.com> I am working on a viewer for GPX data which is mostly operational. When loaded, a marker is placed at the start of the vector representing the GPX file. I have included a 'play' button which advances the marker along the track. All works well until the map is panned and then the marker is offset from the track by the amount of the pan. Zooming or changing the window size causes the marker to snap back into place. http://www.munromagic.com/dev/GPXMap.cfm?RouteLogID=134408 An ideas how to fix this? -- View this message in context: http://n2.nabble.com/Markers-incorrectly-placed-after-pan-tp2826723p2826723.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From brfr at metrico.lu Thu May 7 04:57:47 2009 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] selectcontrol and layers property Message-ID: <200905071057.47387.brfr@metrico.lu> I am currently trying to enable the querying of serveral GML (in fact KML) layers in my map. Just one result per click, but without choosing the query layer first. My preferred route was to use a selectcontrol and pass an array of layers in ( see http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature- js.html#OpenLayers.Control.SelectFeature.layers ). But that does not work. Firebug tells me that the script stops with an error: "this.layer.getZIndex is not a function". It is the selectControl.activate(); function that causes this. OL version 2.7 linked from the homepage ... So I came and searched the mailing lists for a solution just to find out, that querying multiple layers with the selectcontrol is currently not supported ( see http://n2.nabble.com/Several-selectFeature-control-tp1831251p1831256.html from Eric Lemoine for example ) Whats the purpose of this layers property then? And frankly I don't exactly understand the layer property description also (stupid me ;-)), especially "The vector layer with a common renderer root for all layers this control is configured with (if an array of layers was passed to the constructor)" I only can see that there is some kind of reference to the layers property -> "array of layers", but I fail to understand the meaning of this all ... If someone could shed some light onto the matter I would be grateful Frank -- Frank Broniewski Metrico s.?r.l. ( http://www.metrico.lu ) 36, rue des Romains L-5433 Niederdonven Luxembourg Fon: +352 26 74 94 28 Fax: +352 26 74 94 99 From kgeusebroek at xebia.com Thu May 7 05:19:00 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] selectcontrol and layers property In-Reply-To: <200905071057.47387.brfr@metrico.lu> References: <200905071057.47387.brfr@metrico.lu> Message-ID: Hi Frank, The multiple layers selectcontrol is supported in OpenLayers 2.8 (rc2 now). The docs you looked at are 2.8 and you are using 2.7 OpenLayers build. If you try with latest rc of 2.8 you will succeed. Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Frank Broniewski Sent: Thursday, May 07, 2009 10:58 AM To: users@openlayers.org Subject: [OpenLayers-Users] selectcontrol and layers property I am currently trying to enable the querying of serveral GML (in fact KML) layers in my map. Just one result per click, but without choosing the query layer first. My preferred route was to use a selectcontrol and pass an array of layers in ( see http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature- js.html#OpenLayers.Control.SelectFeature.layers ). But that does not work. Firebug tells me that the script stops with an error: "this.layer.getZIndex is not a function". It is the selectControl.activate(); function that causes this. OL version 2.7 linked from the homepage ... So I came and searched the mailing lists for a solution just to find out, that querying multiple layers with the selectcontrol is currently not supported ( see http://n2.nabble.com/Several-selectFeature-control-tp1831251p1831256.html from Eric Lemoine for example ) Whats the purpose of this layers property then? And frankly I don't exactly understand the layer property description also (stupid me ;-)), especially "The vector layer with a common renderer root for all layers this control is configured with (if an array of layers was passed to the constructor)" I only can see that there is some kind of reference to the layers property -> "array of layers", but I fail to understand the meaning of this all ... If someone could shed some light onto the matter I would be grateful Frank -- Frank Broniewski Metrico s.?r.l. ( http://www.metrico.lu ) 36, rue des Romains L-5433 Niederdonven Luxembourg Fon: +352 26 74 94 28 Fax: +352 26 74 94 99 _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From kwonghu at hotmail.com Thu May 7 08:28:31 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ? Message-ID: Hi, I am using OpenLayers.Request.GET to request a zip archive that I have generated on the server side. OpenLayers.Request.GET is working well. I can receive the request parameters on the server-side. These parameters are used by my wms service to return a zip archive with bitmap data zipped inside. But for some reasons when I send the zip file from the server to browser, It's not opening a download dialog like I expected that let users to download the zip file. Instead, nothing is happening on the browser side(no javascript error) but i know the bitmap data and zip archive is being created and passed onto the browser through debugging. Strangely, If I request from the browser by typing the url, it works. eg. http://localhost/wms.aspx?REQUEST=downloadZiparchive. I am wondering if this is a bug or I am not using it correctly ? Need to solve this asap. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090507/6d6c333d/attachment.html From crschmidt at metacarta.com Thu May 7 08:46:46 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ? In-Reply-To: References: Message-ID: <20090507124646.GC27692@metacarta.com> On Thu, May 07, 2009 at 08:28:31PM +0800, Kwong Hu Kiu wrote: This question is more appropriate for the users list. Please do *not* crosspost to both lists. > Hi, > > I am using OpenLayers.Request.GET to request a zip archive that I have generated on the server side. > > OpenLayers.Request.GET is working well. I can receive the request parameters on the server-side. > > These parameters are used by my wms service to return a zip archive with bitmap data zipped inside. > > But for some reasons when I send the zip file from the server to browser, > It's not opening a download dialog like I expected that let users to download the zip file. > > Instead, nothing is happening on the browser side(no javascript error) but i know the bitmap data and zip archive is being created and passed onto the browser through debugging. > > Strangely, > > If I request from the browser by typing the url, it works. > eg. http://localhost/wms.aspx?REQUEST=downloadZiparchive. > > I am wondering if this is a bug or I am not using it correctly ? Expecting that an XMLHttpRequest will trigger a file download is your mistake. If you want users browsers to download something, then send them to that ocation -- either by giving them a link to click, or by setting document.location. > Need to solve this asap. > > Thanks. > > > > > _______________________________________________ > Dev mailing list > Dev@openlayers.org > http://openlayers.org/mailman/listinfo/dev -- Christopher Schmidt MetaCarta From kwonghu at hotmail.com Thu May 7 09:00:35 2009 From: kwonghu at hotmail.com (Kwong Hu Kiu) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ? In-Reply-To: <20090507124646.GC27692@metacarta.com> References: <20090507124646.GC27692@metacarta.com> Message-ID: How am I crossposting ? I thought this 'might' be a bug. That's why i sent it to the dev list. Is this wrong ? Anyway... No, you don't understand my question. Once users clicked on a button called 'Download zip'. The wms-server will send a respond together with a zip file. I thought this will work if Openlayers.Request is behaving the same way as requesting from the browser. > Date: Thu, 7 May 2009 08:46:46 -0400 > To: kwonghu@hotmail.com > CC: users@openlayers.org > Subject: Re: [OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ? > From: crschmidt@metacarta.com > > On Thu, May 07, 2009 at 08:28:31PM +0800, Kwong Hu Kiu wrote: > > This question is more appropriate for the users list. Please do *not* > crosspost to both lists. > > > Hi, > > > > I am using OpenLayers.Request.GET to request a zip archive that I have generated on the server side. > > > > OpenLayers.Request.GET is working well. I can receive the request parameters on the server-side. > > > > These parameters are used by my wms service to return a zip archive with bitmap data zipped inside. > > > > But for some reasons when I send the zip file from the server to browser, > > It's not opening a download dialog like I expected that let users to download the zip file. > > > > Instead, nothing is happening on the browser side(no javascript error) but i know the bitmap data and zip archive is being created and passed onto the browser through debugging. > > > > Strangely, > > > > If I request from the browser by typing the url, it works. > > eg. http://localhost/wms.aspx?REQUEST=downloadZiparchive. > > > > I am wondering if this is a bug or I am not using it correctly ? > > Expecting that an XMLHttpRequest will trigger a file download is your > mistake. If you want users browsers to download something, then send > them to that ocation -- either by giving them a link to click, or by > setting document.location. > > > Need to solve this asap. > > > > Thanks. > > > > > > > > > > > _______________________________________________ > > 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/20090507/efaf611e/attachment.html From crschmidt at metacarta.com Thu May 7 09:08:03 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ? In-Reply-To: References: <20090507124646.GC27692@metacarta.com> Message-ID: <20090507130803.GD27692@metacarta.com> On Thu, May 07, 2009 at 09:00:35PM +0800, Kwong Hu Kiu wrote: > > > > How am I crossposting ? Your email was sent to both the users and dev lists. http://openlayers.org/pipermail/users/2009-May/011737.html http://openlayers.org/pipermail/dev/2009-May/004841.html > I thought this 'might' be a bug. That's why i sent it to the dev list. > Is this wrong ? The Dev list is, as described at the mailing list page, "Ideal if you're modifying OpenLayers classes, creating subclasses, or otherwise getting into the guts of OpenLayers." At this point, I see no evidence that you are 'getting into the guts of OpenLayers'. "I think I've found a bug" is oftentimes "I don't understand how something works" in disguise. If you haven't found the bug by reading the OpenLayers source code, then it is unlikely that the dev list is the most appopriate forum. > Anyway... > > No, you don't understand my question. No, you don't understand my answer. I am telling you that *what you thought is wrong*. XMLHttpRequest -- and the OpenLayers.Request that wraps it -- do not cause a Download dialog. The only way to do that is to cause the browser to request the zip file -- by, for example, including it in a new page, or possibly an iframe, though I'm not sure that this is true. > Once users clicked on a button called 'Download zip'. > The wms-server will send a respond together with a zip file. > I thought this will work if Openlayers.Request is behaving the same way as requesting from the browser. But it doesn't. Regards, -- Christopher Schmidt MetaCarta From michogar at gmail.com Thu May 7 11:22:28 2009 From: michogar at gmail.com (Micho Gar) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] ERROR: WMSGetFeatureInfo is not a constructor. Message-ID: <5b9547fb0905070822q2977043au5c1d950e525ab791@mail.gmail.com> Hi all, I am working with the Openlayers Feature Info example, I copy the example's code but dont work on my app, get this error: "Error: OpenLayers.Control.WMSGetFeatureInfo is not a constructor Archivo de origen: http://localhost:8080/geoserver/.... L?nea: 159" The code is the same that in examples, with my layers and server: infoControls = { click: new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://localhost:8080/geoserver/wms', title: 'Identify features by clicking', layers: [Instancias], queryVisible: true }), hover : new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://localhost:8080/geoserver/wms', title: 'Identify features by clicking', layers: [Instancias], hover: true, // defining a custom format options here formatOptions: { typeName: 'instancias', featureNS: 'http://www.openplans.org/topp' }, queryVisible: true }) } Do you know what happens??. Thanks. -- # michogar # Analista Programador SIG # GNU/Linux Counter 462666 Una visi?n personal: http://michogar.blogspot.com El dia a dia: http://twitter.com/michogar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090507/795d17bb/attachment.html From eric.lemoine at camptocamp.com Thu May 7 12:04:01 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] ERROR: WMSGetFeatureInfo is not a constructor. In-Reply-To: <5b9547fb0905070822q2977043au5c1d950e525ab791@mail.gmail.com> References: <5b9547fb0905070822q2977043au5c1d950e525ab791@mail.gmail.com> Message-ID: On Thursday, May 7, 2009, Micho Gar wrote: > Hi all, I am working with the Openlayers Feature Info example, I copy the example's code but dont work on my app, get this error: > > "Error: OpenLayers.Control.WMSGetFeatureInfo is not a constructor Most probably you're not on the right OL version? What OL version are you using? Cheers, > Archivo de origen: http://localhost:8080/geoserver/.... > L?nea: 159" > > The code is the same that in examples, with my layers and server: > > infoControls = { > ??????????? click: new OpenLayers.Control.WMSGetFeatureInfo({ > ??????????????? url: 'http://localhost:8080/geoserver/wms', > ??????????????? title: 'Identify features by clicking', > ??????????????? layers: [Instancias], > ??????????????? queryVisible: true > ??????????? }), > ??????????? hover : new OpenLayers.Control.WMSGetFeatureInfo({ > ??????????????? url: 'http://localhost:8080/geoserver/wms', > ??????????????? title: 'Identify features by clicking', > ??????????????? layers: [Instancias], > ??????????????? hover: true, > ??????????????? // defining a custom format options here > ??????????????? formatOptions: { > ??????????????????? typeName: 'instancias', > ??????????????????? featureNS: 'http://www.openplans.org/topp' > ??????????????? }, > ??????????????? queryVisible: true > ??????????? }) > ??????? } > Do you know what happens??. > > > Thanks. > > > > -- > # michogar > # Analista Programador SIG > # GNU/Linux Counter 462666 > > Una visi?n personal: > http://michogar.blogspot.com > > El dia a dia: > http://twitter.com/michogar > > > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Thu May 7 12:18:25 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] selectcontrol and layers property In-Reply-To: References: <200905071057.47387.brfr@metrico.lu> Message-ID: On Thursday, May 7, 2009, Kris Geusebroek wrote: > Hi Frank, > > The multiple layers selectcontrol is supported in OpenLayers 2.8 (rc2 now). > The docs you looked at are 2.8 and you are using 2.7 OpenLayers build. > > If you try with latest rc of 2.8 you will succeed. Yes, ahocevar (possibly with help from others) put an end to this "select control does not work on multiple layers" story :-) > > Cheers Kris > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Frank Broniewski > Sent: Thursday, May 07, 2009 10:58 AM > To: users@openlayers.org > Subject: [OpenLayers-Users] selectcontrol and layers property > > I am currently trying to enable the querying of serveral GML (in fact KML) > layers in my map. Just one result per click, but without choosing the query > layer first. > > My preferred route was to use a selectcontrol and pass an array of layers in ( > see http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature- > js.html#OpenLayers.Control.SelectFeature.layers ). But that does not work. > Firebug tells me that the script stops with an error: "this.layer.getZIndex is > not a function". It is the selectControl.activate(); function that causes > this. OL version 2.7 linked from the homepage ... > > So I came and searched the mailing lists for a solution just to find out, that > querying multiple layers with the selectcontrol is currently not supported ( > see http://n2.nabble.com/Several-selectFeature-control-tp1831251p1831256.html > from Eric Lemoine for example ) > > Whats the purpose of this layers property then? And frankly I don't exactly > understand the layer property description also (stupid me ;-)), especially > "The vector layer with a common renderer root for all layers this control is > configured with (if an array of layers was passed to the constructor)" > I only can see that there is some kind of reference to the layers property -> > "array of layers", but I fail to understand the meaning of this all ... > > If someone could shed some light onto the matter I would be grateful > > Frank > -- > Frank Broniewski > > Metrico s.?r.l. ( http://www.metrico.lu ) > 36, rue des Romains > L-5433 Niederdonven > Luxembourg > > Fon: +352 26 74 94 28 > Fax: +352 26 74 94 99 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From crschmidt at metacarta.com Thu May 7 12:44:09 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] ERROR: WMSGetFeatureInfo is not a constructor. In-Reply-To: <5b9547fb0905070822q2977043au5c1d950e525ab791@mail.gmail.com> References: <5b9547fb0905070822q2977043au5c1d950e525ab791@mail.gmail.com> Message-ID: <20090507164409.GC23674@metacarta.com> On Thu, May 07, 2009 at 05:22:28PM +0200, Micho Gar wrote: > Hi all, I am working with the Openlayers Feature Info example, I copy the > example's code but dont work on my app, get this error: > > "Error: OpenLayers.Control.WMSGetFeatureInfo is not a constructor > Archivo de origen: http://localhost:8080/geoserver/.... > L?nea: 159" You're not using OL 2.8. > The code is the same that in examples, with my layers and server: > > infoControls = { > click: new OpenLayers.Control.WMSGetFeatureInfo({ > url: 'http://localhost:8080/geoserver/wms', > title: 'Identify features by clicking', > layers: [Instancias], > queryVisible: true > }), > hover : new OpenLayers.Control.WMSGetFeatureInfo({ > url: 'http://localhost:8080/geoserver/wms', > title: 'Identify features by clicking', > layers: [Instancias], > hover: true, > // defining a custom format options here > formatOptions: { > typeName: 'instancias', > featureNS: 'http://www.openplans.org/topp' > }, > queryVisible: true > }) > } > > Do you know what happens??. > > > Thanks. > > > > -- > # michogar > # Analista Programador SIG > # GNU/Linux Counter 462666 > > Una visi?n personal: > http://michogar.blogspot.com > > El dia a dia: > http://twitter.com/michogar > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From laconical at gmail.com Thu May 7 21:22:19 2009 From: laconical at gmail.com (Andrew Smith) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Markers incorrectly placed after pan In-Reply-To: <1241685203051-2826723.post@n2.nabble.com> References: <1241685203051-2826723.post@n2.nabble.com> Message-ID: <300497a30905071822x11f24551yd14fa7c9bbaed4c7@mail.gmail.com> I'm an OL newbie so have no idea how to fix your problem, but thought I'd have a look to see what your map looked like. Ran into the following issues: - In Firefox 3.0.10 the Play button doesn't do anything at all. - In IE8 I get Webpage error: Line: 138 Error: 'console' is undefined Just thought you'd like to know. Andrew On Thu, May 7, 2009 at 4:33 PM, gwales wrote: > > I am working on a viewer for GPX data which is mostly operational. > > When loaded, a marker is placed at the start of the vector representing the > GPX file. > > I have included a 'play' button which advances the marker along the track. > > All works well until the map is panned and then the marker is offset from > the track by the amount of the pan. > > Zooming or changing the window size causes the marker to snap back into > place. > > http://www.munromagic.com/dev/GPXMap.cfm?RouteLogID=134408 > > An ideas how to fix this? > -- > View this message in context: > http://n2.nabble.com/Markers-incorrectly-placed-after-pan-tp2826723p2826723.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/20090508/636fdcfc/attachment.html From crschmidt at metacarta.com Fri May 8 00:34:50 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Markers incorrectly placed after pan In-Reply-To: <300497a30905071822x11f24551yd14fa7c9bbaed4c7@mail.gmail.com> References: <1241685203051-2826723.post@n2.nabble.com> <300497a30905071822x11f24551yd14fa7c9bbaed4c7@mail.gmail.com> Message-ID: <20090508043449.GI23674@metacarta.com> On Fri, May 08, 2009 at 09:22:19AM +0800, Andrew Smith wrote: > I'm an OL newbie so have no idea how to fix your problem, but thought I'd > have a look to see what your map looked like. Ran into the following issues: > > - In Firefox 3.0.10 the Play button doesn't do anything at all. > > - In IE8 I get > > Webpage error: Line: 138 Error: 'console' is undefined > > Just thought you'd like to know. Presumably you didn't turn on firebug on the site. The problem is that Marker.moveTo is *not* an API function, and is only intended to be used internally. It takes a LayerPx instead of a ViewPortPx, so you'll need to do some conversion there. I'd just use vectors intead of markers... -- Chris > Andrew > > On Thu, May 7, 2009 at 4:33 PM, gwales wrote: > > > > > I am working on a viewer for GPX data which is mostly operational. > > > > When loaded, a marker is placed at the start of the vector representing the > > GPX file. > > > > I have included a 'play' button which advances the marker along the track. > > > > All works well until the map is panned and then the marker is offset from > > the track by the amount of the pan. > > > > Zooming or changing the window size causes the marker to snap back into > > place. > > > > http://www.munromagic.com/dev/GPXMap.cfm?RouteLogID=134408 > > > > An ideas how to fix this? > > -- > > View this message in context: > > http://n2.nabble.com/Markers-incorrectly-placed-after-pan-tp2826723p2826723.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 -- Christopher Schmidt MetaCarta From peroc79 at gmail.com Fri May 8 02:54:03 2009 From: peroc79 at gmail.com (pere roca ristol) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] multiple layers... best performance? Message-ID: hi all, on my webapp I have distributed legends where you can switch on/off different layers. All of these layers refer to the same GeoServer. As far as I know, I can design my webapp in two ways: 1) Just an Openlayers layer and I add/remove layers from layers parameter when user switch on/off a layer layer = new OpenLayers.Layer( "OpenLayers WMS","http://myGeoServer/wms",{layers: layer1,layer2...} 2) create "on-the-fly" a new OpenLayers.Layer with a function when user selects a still not visible layer: var add_lay=function(layerName,lay) { var new_lay="edit_"+layerName+" =new OpenLayers.Layer.WMS( 'my WMS','http://myGeoserver',{layers:'topp:"+lay+"'} );"; eval(new_lay); eval("map.addLayer(edit_"+layerName+")"); } The problem of the first is that each time a layer is switched on/off or zoom in/out, a big GetMap request (what about 10 layers?) must be done and takes more time than usual. The problem of the second one is that the more layer we add on the top of an openlayer application, the more the application slow down. In terms of performance, which is the best option? thanks! Pere Roca -- Pere Roca Ristol Bi?leg i especialista GIS Museo Nacional de Ciencias Naturales (CSIC) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090508/ea9a92da/attachment.html From brfr at metrico.lu Fri May 8 02:55:14 2009 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] selectcontrol and layers property In-Reply-To: References: <200905071057.47387.brfr@metrico.lu> Message-ID: <200905080855.14534.brfr@metrico.lu> I didn't find the time to reply yesterday, but I want to confirm that the rc2 indeed solves this. And it works fine so far with my 5 KML Layers. Good work! And by comparing the two docs (for v2.7 and v2.8) I can see that a lot of work has been done at the Control.SelectFeature level. Frank On Thursday 07 May 2009 18:18:25 Eric Lemoine wrote: > On Thursday, May 7, 2009, Kris Geusebroek wrote: > > Hi Frank, > > > > The multiple layers selectcontrol is supported in OpenLayers 2.8 (rc2 > > now). The docs you looked at are 2.8 and you are using 2.7 OpenLayers > > build. > > > > If you try with latest rc of 2.8 you will succeed. > > Yes, ahocevar (possibly with help from others) put an end to this > "select control does not work on multiple layers" story :-) > > > Cheers Kris > > > > -----Original Message----- > > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > > On Behalf Of Frank Broniewski Sent: Thursday, May 07, 2009 10:58 AM > > To: users@openlayers.org > > Subject: [OpenLayers-Users] selectcontrol and layers property > > > > I am currently trying to enable the querying of serveral GML (in fact > > KML) layers in my map. Just one result per click, but without choosing > > the query layer first. > > > > My preferred route was to use a selectcontrol and pass an array of layers > > in ( see > > http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature- > > js.html#OpenLayers.Control.SelectFeature.layers ). But that does not > > work. Firebug tells me that the script stops with an error: > > "this.layer.getZIndex is not a function". It is the > > selectControl.activate(); function that causes this. OL version 2.7 > > linked from the homepage ... > > > > So I came and searched the mailing lists for a solution just to find out, > > that querying multiple layers with the selectcontrol is currently not > > supported ( see > > http://n2.nabble.com/Several-selectFeature-control-tp1831251p1831256.html > > from Eric Lemoine for example ) > > > > Whats the purpose of this layers property then? And frankly I don't > > exactly understand the layer property description also (stupid me ;-)), > > especially "The vector layer with a common renderer root for all layers > > this control is configured with (if an array of layers was passed to the > > constructor)" I only can see that there is some kind of reference to the > > layers property -> "array of layers", but I fail to understand the > > meaning of this all ... > > > > If someone could shed some light onto the matter I would be grateful > > > > Frank > > -- > > Frank Broniewski > > > > Metrico s.?r.l. ( http://www.metrico.lu ) > > 36, rue des Romains > > L-5433 Niederdonven > > Luxembourg > > > > Fon: +352 26 74 94 28 > > Fax: +352 26 74 94 99 > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users -- Frank Broniewski Metrico s.?r.l. ( http://www.metrico.lu ) 36, rue des Romains L-5433 Niederdonven Luxembourg Fon: +352 26 74 94 28 Fax: +352 26 74 94 99 From kgeusebroek at xebia.com Fri May 8 03:20:24 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] labels in IE Message-ID: Hi all, I'm using the new label functionality and modified it a bit to show a colored border around the label. This is successfully within IE6, but within IE7 the value of textbox.clientWidth is always 2 so my border is a 2px wide rectangle. The clientHeight is correctly set so I now have a label of 14px high and 2 px wide. Can somebody explain me why clientWidth is not working in IE7? Heres my adjusted code for the VML renderer: var label = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX, "olv:rect"); var textbox = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX + "_textbox", "olv:textbox"); var resolution = this.getResolution(); label.style.left = (location.x/resolution - this.offset.x).toFixed() + "px"; label.style.top = (location.y/resolution - this.offset.y).toFixed() + "px"; label.style.flip = "y"; textbox.innerText = style.label; if (style.fillColor) {textbox.style.color = style.fontColor;} if (style.fontFamily) {textbox.style.fontFamily = style.fontFamily;} if (style.fontSize) {textbox.style.fontSize = style.fontSize;} if (style.fontWeight) {textbox.style.fontWeight = style.fontWeight;} textbox.style.whiteSpace = "nowrap"; textbox.inset = "0px,0px,0px,0px"; if(!label.parentNode) { label.appendChild(textbox); this.textRoot.appendChild(label); } var align = style.labelAlign || "cm"; var xshift = textbox.clientWidth *(OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(0,1)]); if (style.pointRadius) {xshift += style.pointRadius * (OpenLayers.Renderer.VML.LABEL_RADIUS_SHIFT[align.substr(0,1)]);} var yshift = textbox.clientHeight * (OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(1,1)]); if (style.pointRadius) {yshift += style.pointRadius * (OpenLayers.Renderer.VML.LABEL_RADIUS_SHIFT[align.substr(1,1)]);} yshift -= index * (textbox.clientHeight); label.style.left = parseInt(label.style.left)-xshift+"px"; label.style.top = parseInt(label.style.top)+yshift+"px"; label.style.width = textbox.clientWidth + ((style.labelStrokeWidth) ? style.labelStrokeWidth : 0); label.style.height = textbox.clientHeight + ((style.labelStrokeWidth) ? style.labelStrokeWidth : 0); if (style.labelStrokeColor) { label.setAttribute("strokecolor", style.labelStrokeColor); label.setAttribute("strokeweight", style.labelStrokeWidth + "px"); } else {label.setAttribute("stroked", "false");} var strokes = label.getElementsByTagName("stroke"); var stroke = (strokes.length == 0) ? null : strokes[0]; if (!style.labelStrokeColor) { if (stroke) {label.removeChild(stroke);} else { if (!stroke) { stroke = this.createNode('olv:stroke', label.id + "_stroke"); label.appendChild(stroke); } stroke.setAttribute("opacity", style.labelStrokeOpacity); } } The index var is used to make multiple labels for clustered features BTW ;-) Also I'm not able to apply the same logic to the SVG renderer so help on that side is valued also. Cheers Kris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090508/04a410d9/attachment.html From gary_wales at hotmail.com Fri May 8 04:29:28 2009 From: gary_wales at hotmail.com (gwales) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Markers incorrectly placed after pan In-Reply-To: <20090508043449.GI23674@metacarta.com> References: <1241685203051-2826723.post@n2.nabble.com> <300497a30905071822x11f24551yd14fa7c9bbaed4c7@mail.gmail.com> <20090508043449.GI23674@metacarta.com> Message-ID: <1241771368075-2844175.post@n2.nabble.com> > > I'd just use vectors intead of markers... > > Will do, thanks. @Andrew: I haven't tested outside of Firefox and the console.log statement is a Firebug command (definately worth checking out if you haven't already). Cheers, Gary -- View this message in context: http://n2.nabble.com/Markers-incorrectly-placed-after-pan-tp2826723p2844175.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From brfr at metrico.lu Fri May 8 05:29:43 2009 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] IE7 popup problem with 2.8 rc2 Message-ID: <200905081129.43484.brfr@metrico.lu> Hi list, I recently tested my maps with the new OL 2.8 rc2 version in order to make the multiple selectcontrol work. I use framed popups in my maps to display the data. However I noticed in IE7 that the popup size is not adapted to the content size, however it is when using OL 2.7. System is Win Xp64, 32bit Browser version. I tried to find the css differences, but there aren't any apparent changes that might cause this behavior, well at least I couldn't find any. If necessary I can provide a test example. So I am just reporting this issue. Maybe someone else more skilled in JS and CSS is able to find out what's going on. I create my popups as following: var content = '

' + feature.attributes.name+'

' + feature.attributes.description + '

'; popup = new OpenLayers.Popup.FramedCloud("ptInfoPopup", feature.geometry.getBounds().getCenterLonLat(), null, content, null, true, function (evt) { selectControl.unselect(selectedFeature); }); popup.minSize = new OpenLayers.Size(100,150); popup.maxSize = new OpenLayers.Size(400,300); -- Frank Broniewski Metrico s.?r.l. ( http://www.metrico.lu ) 36, rue des Romains L-5433 Niederdonven Luxembourg Fon: +352 26 74 94 28 Fax: +352 26 74 94 99 From halext at gmail.com Fri May 8 06:51:24 2009 From: halext at gmail.com (Hugo Teixeira) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Help ! Message-ID: hi, i'm trying to do one search streets with openlayers. i have made the search, but i'm been abling to do the go to street, zoom to the selected street by the search. can anyone help me ??? Best Regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090508/3a356162/attachment.html From kildimo at gmail.com Fri May 8 07:04:46 2009 From: kildimo at gmail.com (protos) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] layer event transparency Message-ID: <1241780686361-2844713.post@n2.nabble.com> Hi, I have a map with a transparent vector overlay over it, which has some features. I want the features to pickup click events and apart from that I want the overlay to allow all other events to go through the vector layer and get picked up by the layers below (map / markers etc) The vector overlay z-index is higher than all other layers. There are no events registered on the vector layer. The features use the selectFeature to pick up events on them. (works fine) I've set vectorLayer.event.fallthrough to true I've set vectorLayer.style.pointerEvents to 'none' I can't get it to work though and the worst thing is that it's behaving very strangely. Some of the lower layers will pick up click events, some don't. dragging the map works. Events on all the map controls work. Basically the map and one other layer seem to pick up all events. 2 other layers don't pick up any events. If I remove the vector layer everything works fine so it definitely seems to be the culprit Can anyone see what the issue could be with this ? Is there problems / bugs with vector layer events - it seems to be very inconsistent. Any help appreciated. Cheers. -- View this message in context: http://n2.nabble.com/layer-event-transparency-tp2844713p2844713.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Fri May 8 07:44:00 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] IE7 popup problem with 2.8 rc2 In-Reply-To: <200905081129.43484.brfr@metrico.lu> References: <200905081129.43484.brfr@metrico.lu> Message-ID: <20090508114400.GK23674@metacarta.com> On Fri, May 08, 2009 at 11:29:43AM +0200, Frank Broniewski wrote: > Hi list, > > I recently tested my maps with the new OL 2.8 rc2 version in order to make the > multiple selectcontrol work. I use framed popups in my maps to display the > data. However I noticed in IE7 that the popup size is not adapted to the > content size, however it is when using OL 2.7. > System is Win Xp64, 32bit Browser version. > > I tried to find the css differences, but there aren't any apparent changes > that might cause this behavior, well at least I couldn't find any. If > necessary I can provide a test example. Please do, as minimal as possible. The only change that seems relevant is http://trac.openlayers.org/changeset/8906, and I can't imagine hwy that would be an issue. However, I don't have IE handy to test atm, and I want to fix any and all regressions in another RC. > So I am just reporting this issue. Maybe someone else more skilled in JS and > CSS is able to find out what's going on. > > I create my popups as following: > > var content = '

' + > feature.attributes.name+'

' + > feature.attributes.description + '

'; > > popup = new OpenLayers.Popup.FramedCloud("ptInfoPopup", > feature.geometry.getBounds().getCenterLonLat(), > null, > content, > null, true, function (evt) { > selectControl.unselect(selectedFeature); > }); > popup.minSize = new OpenLayers.Size(100,150); > popup.maxSize = new OpenLayers.Size(400,300); > -- > Frank Broniewski > > Metrico s.?r.l. ( http://www.metrico.lu ) > 36, rue des Romains > L-5433 Niederdonven > Luxembourg > > Fon: +352 26 74 94 28 > Fax: +352 26 74 94 99 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Fri May 8 07:46:02 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] layer event transparency In-Reply-To: <1241780686361-2844713.post@n2.nabble.com> References: <1241780686361-2844713.post@n2.nabble.com> Message-ID: <20090508114602.GL23674@metacarta.com> On Fri, May 08, 2009 at 04:04:46AM -0700, protos wrote: > > Hi, > > I have a map with a transparent vector overlay over it, which has some > features. > I want the features to pickup click events and apart from that I want the > overlay > to allow all other events to go through the vector layer and get picked up > by the > layers below (map / markers etc) Can't do it. Vector layers block clicks going through to lower layers. > The vector overlay z-index is higher than all other layers. > There are no events registered on the vector layer. > The features use the selectFeature to pick up events on them. (works fine) > I've set vectorLayer.event.fallthrough to true > I've set vectorLayer.style.pointerEvents to 'none' > > I can't get it to work though and the worst thing is that it's behaving very > strangely. > Some of the lower layers will pick up click events, some don't. dragging the > map > works. Events on all the map controls work. Map controls are all above the vector layers. The map *click* events will get through, but the markers will not get clicks. > Basically the map and one other layer seem to pick up all events. > 2 other layers don't pick up any events. > If I remove the vector layer everything works fine so it definitely seems > to be the culprit Yes. > Can anyone see what the issue could be with this ? > Is there problems / bugs with vector layer events - it seems to be very > inconsistent. I doubt it's inconsistent -- though it is likely to be the cae sthat it doesn't do what you want. -- Chris > Any help appreciated. > > Cheers. > > > > > -- > View this message in context: http://n2.nabble.com/layer-event-transparency-tp2844713p2844713.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From kgeusebroek at xebia.com Fri May 8 08:29:48 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] layer event transparency In-Reply-To: <20090508114602.GL23674@metacarta.com> References: <1241780686361-2844713.post@n2.nabble.com> <20090508114602.GL23674@metacarta.com> Message-ID: Hi, It might be worth a try to use the multiple layers feature of the new SelectFeature control. This way you can virtually combine multiple layers and define actions on hover over features on each of the layers. Only available in 2.8rc Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Christopher Schmidt Sent: Friday, May 08, 2009 1:46 PM To: protos Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] layer event transparency On Fri, May 08, 2009 at 04:04:46AM -0700, protos wrote: > > Hi, > > I have a map with a transparent vector overlay over it, which has some > features. > I want the features to pickup click events and apart from that I want the > overlay > to allow all other events to go through the vector layer and get picked up > by the > layers below (map / markers etc) Can't do it. Vector layers block clicks going through to lower layers. > The vector overlay z-index is higher than all other layers. > There are no events registered on the vector layer. > The features use the selectFeature to pick up events on them. (works fine) > I've set vectorLayer.event.fallthrough to true > I've set vectorLayer.style.pointerEvents to 'none' > > I can't get it to work though and the worst thing is that it's behaving very > strangely. > Some of the lower layers will pick up click events, some don't. dragging the > map > works. Events on all the map controls work. Map controls are all above the vector layers. The map *click* events will get through, but the markers will not get clicks. > Basically the map and one other layer seem to pick up all events. > 2 other layers don't pick up any events. > If I remove the vector layer everything works fine so it definitely seems > to be the culprit Yes. > Can anyone see what the issue could be with this ? > Is there problems / bugs with vector layer events - it seems to be very > inconsistent. I doubt it's inconsistent -- though it is likely to be the cae sthat it doesn't do what you want. -- Chris > Any help appreciated. > > Cheers. > > > > > -- > View this message in context: http://n2.nabble.com/layer-event-transparency-tp2844713p2844713.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From adube at mapgears.com Fri May 8 08:44:49 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] multiple layers... best performance? In-Reply-To: References: Message-ID: <4A042941.3080801@mapgears.com> Hi, It's faster to get one big getMap request than 10 small ones. I'm no GeoServer user, but I'm pretty sure you can set minscale/maxscale values to your server-side layers to display your layers only when necessary. That would be a gain of performance. Regards, Alexandre pere roca ristol wrote: > hi all, > on my webapp I have distributed legends where you can switch on/off > different layers. All of these layers refer to the same GeoServer. > As far as I know, I can design my webapp in two ways: > 1) Just an Openlayers layer and I add/remove layers from layers > parameter when user switch on/off a layer > > layer = new OpenLayers.Layer( "OpenLayers > WMS","http://myGeoServer/wms",{layers: layer1,layer2...} > > 2) create "on-the-fly" a new OpenLayers.Layer with a function when > user selects a still not visible layer: > var add_lay=function(layerName,lay) > { > var new_lay="edit_"+layerName+" =new > OpenLayers.Layer.WMS( 'my WMS','http://myGeoserver' > ,{layers:'topp:"+lay+"'} );"; > eval(new_lay); > eval("map.addLayer(edit_"+layerName+")"); > } > > The problem of the first is that each time a layer is switched on/off > or zoom in/out, a big GetMap request (what about 10 layers?) must be > done and takes more time than usual. > The problem of the second one is that the more layer we add on the top > of an openlayer application, the more the application slow down. > > In terms of performance, which is the best option? > > thanks! > Pere Roca > > -- > Pere Roca Ristol > Bi?leg i especialista GIS > Museo Nacional de Ciencias Naturales (CSIC) > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From brfr at metrico.lu Fri May 8 08:53:19 2009 From: brfr at metrico.lu (Frank Broniewski) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] IE7 popup problem with 2.8 rc2 In-Reply-To: <20090508114400.GK23674@metacarta.com> References: <200905081129.43484.brfr@metrico.lu> <20090508114400.GK23674@metacarta.com> Message-ID: <200905081453.19289.brfr@metrico.lu> Ok you can see a minimal example here: http://www.gis-hosting.lu/ietestcase/ol28.html for the 2.8 rc2 Openlayers release I downloaded yesterday http://www.gis-hosting.lu/ietestcase/ol27.html for the stable release It is just an openstreetmap baselayer and a kml overlay. No stylesheets or other javascript. Both files share the same data I just adopted the link to the openlayers library. The server is sometimes somewhat slow though at times ;-) On Friday 08 May 2009 13:44:00 Christopher Schmidt wrote: > On Fri, May 08, 2009 at 11:29:43AM +0200, Frank Broniewski wrote: > > Hi list, > > > > I recently tested my maps with the new OL 2.8 rc2 version in order to > > make the multiple selectcontrol work. I use framed popups in my maps to > > display the data. However I noticed in IE7 that the popup size is not > > adapted to the content size, however it is when using OL 2.7. > > System is Win Xp64, 32bit Browser version. > > > > I tried to find the css differences, but there aren't any apparent > > changes that might cause this behavior, well at least I couldn't find > > any. If necessary I can provide a test example. > > Please do, as minimal as possible. > > The only change that seems relevant is > http://trac.openlayers.org/changeset/8906, and I can't imagine hwy that > would be an issue. However, I don't have IE handy to test atm, and I > want to fix any and all regressions in another RC. > > > So I am just reporting this issue. Maybe someone else more skilled in JS > > and CSS is able to find out what's going on. > > > > I create my popups as following: > > > > var content = '

' + > > feature.attributes.name+'

' + > > feature.attributes.description + '

'; > > > > popup = new OpenLayers.Popup.FramedCloud("ptInfoPopup", > > feature.geometry.getBounds().getCenterLonLat(), > > null, > > content, > > null, true, function (evt) { > > selectControl.unselect(selectedFeature); > > }); > > popup.minSize = new OpenLayers.Size(100,150); > > popup.maxSize = new OpenLayers.Size(400,300); > > -- > > Frank Broniewski > > > > Metrico s.?r.l. ( http://www.metrico.lu ) > > 36, rue des Romains > > L-5433 Niederdonven > > Luxembourg > > > > Fon: +352 26 74 94 28 > > Fax: +352 26 74 94 99 > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users -- Frank Broniewski Metrico s.?r.l. ( http://www.metrico.lu ) 36, rue des Romains L-5433 Niederdonven Luxembourg Fon: +352 26 74 94 28 Fax: +352 26 74 94 99 From kgeusebroek at xebia.com Fri May 8 10:13:44 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Performance and Memoryusage measuring: How To In-Reply-To: References: Message-ID: Hi all, Ive tied out sIeve to measure leaks and memory usage of my OpenLayers client and see some strange things. I have a Vector layer with bbox strategy and wfs protocol that refreshes every 5 seconds. I have points wit h labels and some background image/stroke etc. If I zoom in on 1 feature every refresh 7 dom elements are added to the #inUse. If I check the in use elements I can see references to the previous id's marked orphan and some not marked orphan (the reason for them is the removeChild isn't called but they are mostly childs of orphan's). However memory is not freed at all. Memory is only freed as I browse to other page (about:blank for example). But not all of the used memory is freed. Also when unloading my client a few (23) leaks are reported but not more info. Few questions: How can I see what the memory is used for? are there other tools to see memory use of the app. Should I care about the orphaned dom elements and children of them? How can I see what the leaks are about? Any help Is much appreciated (been banging my head all day now) Cheers Kris From crschmidt at metacarta.com Fri May 8 10:56:38 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] IE7 popup problem with 2.8 rc2 In-Reply-To: <200905081453.19289.brfr@metrico.lu> References: <200905081129.43484.brfr@metrico.lu> <20090508114400.GK23674@metacarta.com> <200905081453.19289.brfr@metrico.lu> Message-ID: <20090508145638.GM23674@metacarta.com> On Fri, May 08, 2009 at 02:53:19PM +0200, Frank Broniewski wrote: > Ok you can see a minimal example here: > http://www.gis-hosting.lu/ietestcase/ol28.html for the 2.8 rc2 Openlayers > release I downloaded yesterday > http://www.gis-hosting.lu/ietestcase/ol27.html for the stable release > > It is just an openstreetmap baselayer and a kml overlay. No stylesheets or > other javascript. Both files share the same data I just adopted the link to > the openlayers library. The server is sometimes somewhat slow though at times > ;-) I have concerned that this problem was introduced by the previously mentioned change, and have reopened: http://trac.openlayers.org/ticket/1906 As a blocker for 2.8. -- Chris > On Friday 08 May 2009 13:44:00 Christopher Schmidt wrote: > > On Fri, May 08, 2009 at 11:29:43AM +0200, Frank Broniewski wrote: > > > Hi list, > > > > > > I recently tested my maps with the new OL 2.8 rc2 version in order to > > > make the multiple selectcontrol work. I use framed popups in my maps to > > > display the data. However I noticed in IE7 that the popup size is not > > > adapted to the content size, however it is when using OL 2.7. > > > System is Win Xp64, 32bit Browser version. > > > > > > I tried to find the css differences, but there aren't any apparent > > > changes that might cause this behavior, well at least I couldn't find > > > any. If necessary I can provide a test example. > > > > Please do, as minimal as possible. > > > > The only change that seems relevant is > > http://trac.openlayers.org/changeset/8906, and I can't imagine hwy that > > would be an issue. However, I don't have IE handy to test atm, and I > > want to fix any and all regressions in another RC. > > > > > So I am just reporting this issue. Maybe someone else more skilled in JS > > > and CSS is able to find out what's going on. > > > > > > I create my popups as following: > > > > > > var content = '

' + > > > feature.attributes.name+'

' + > > > feature.attributes.description + '

'; > > > > > > popup = new OpenLayers.Popup.FramedCloud("ptInfoPopup", > > > feature.geometry.getBounds().getCenterLonLat(), > > > null, > > > content, > > > null, true, function (evt) { > > > selectControl.unselect(selectedFeature); > > > }); > > > popup.minSize = new OpenLayers.Size(100,150); > > > popup.maxSize = new OpenLayers.Size(400,300); > > > -- > > > Frank Broniewski > > > > > > Metrico s.?r.l. ( http://www.metrico.lu ) > > > 36, rue des Romains > > > L-5433 Niederdonven > > > Luxembourg > > > > > > Fon: +352 26 74 94 28 > > > Fax: +352 26 74 94 99 > > > _______________________________________________ > > > Users mailing list > > > Users@openlayers.org > > > http://openlayers.org/mailman/listinfo/users > > > -- > Frank Broniewski > > Metrico s.?r.l. ( http://www.metrico.lu ) > 36, rue des Romains > L-5433 Niederdonven > Luxembourg > > Fon: +352 26 74 94 28 > Fax: +352 26 74 94 99 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From jeje_greffier at hotmail.com Fri May 8 13:29:47 2009 From: jeje_greffier at hotmail.com (Coiler) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Problem with multiple SelectFeature controls In-Reply-To: <5b021dd0901150721k179d2b12pcb488eafe7c580cc@mail.gmail.com> References: <014401c9764e$cf264c10$6d72e430$@c.duarte@co.sapo.pt> <5b021dd0901150721k179d2b12pcb488eafe7c580cc@mail.gmail.com> Message-ID: <1241803787180-2846585.post@n2.nabble.com> Andreas Hocevar-2 wrote: > > Anexample is online at > http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html > Is it able to display the marker layer over the vector layer. In this example it's seem not. As soon as I use OpenLayers.Control.SelectFeature, the vector layer is display as the top layer, and all my markers are behind polygon... I checked both z-index and they are always ok. If somebody has already found a solution ;) Thanks. -- View this message in context: http://n2.nabble.com/Problem-with-multiple-SelectFeature-controls-tp2156949p2846585.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jeje_greffier at hotmail.com Fri May 8 14:29:49 2009 From: jeje_greffier at hotmail.com (Coiler) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Problem with multiple SelectFeature controls In-Reply-To: <1241803787180-2846585.post@n2.nabble.com> References: <014401c9764e$cf264c10$6d72e430$@c.duarte@co.sapo.pt> <5b021dd0901150721k179d2b12pcb488eafe7c580cc@mail.gmail.com> <1241803787180-2846585.post@n2.nabble.com> Message-ID: <1241807389985-2846892.post@n2.nabble.com> Oups, I thought there were a markers layer, but it's only a vector layer with picture of markers. Sorry. -- View this message in context: http://n2.nabble.com/Problem-with-multiple-SelectFeature-controls-tp2156949p2846892.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Fri May 8 14:58:40 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Problem with multiple SelectFeature controls In-Reply-To: <1241803787180-2846585.post@n2.nabble.com> References: <5b021dd0901150721k179d2b12pcb488eafe7c580cc@mail.gmail.com> <1241803787180-2846585.post@n2.nabble.com> Message-ID: <20090508185840.GN23674@metacarta.com> On Fri, May 08, 2009 at 10:29:47AM -0700, Coiler wrote: > > > > Andreas Hocevar-2 wrote: > > > > Anexample is online at > > http://dev.openlayers.org/sandbox/ahocevar/singleroot/openlayers/examples/select-feature-multilayer.html > > > > Is it able to display the marker layer over the vector layer. In this > example it's seem not. Right. The suggestion was "Don't use markers." Use all vector layers. -- Chris > As soon as I use OpenLayers.Control.SelectFeature, the vector layer is > display as the top layer, and all my markers are behind polygon... > > I checked both z-index and they are always ok. > > If somebody has already found a solution ;) > > Thanks. > -- > View this message in context: http://n2.nabble.com/Problem-with-multiple-SelectFeature-controls-tp2156949p2846585.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From mcg42387 at gmail.com Fri May 8 16:04:03 2009 From: mcg42387 at gmail.com (cole gillespie) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Openlayers + Mapserver ZOOM problem Message-ID: hi, I have a real issue with one of my postgis map files loading into open layers. I have included a link to an HTML file that explains my problem. http://www.colegillespie.com/OLissue.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090508/acd2e0d9/attachment.html From crschmidt at metacarta.com Fri May 8 16:20:39 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:26 2010 Subject: [OpenLayers-Users] Openlayers + Mapserver ZOOM problem In-Reply-To: References: Message-ID: <20090508202039.GO23674@metacarta.com> On Fri, May 08, 2009 at 04:04:03PM -0400, cole gillespie wrote: > hi, > > I have a real issue with one of my postgis map files loading into open > layers. I have included a link to an HTML file that explains my problem. > > http://www.colegillespie.com/OLissue.html 1. Stop using Layer.MapServer. You're honly hurting yourself here. Instead, make your MapServer a WMS by adding: metadata wms_srs "epsg:32119 epsg:4326" end To your 'web' section of your mapfile, then change Layer.MapServer to Layer.WMS. (No other changes are needed.) 2. What projection do you want to work in: 4326, or 32119? Make a decision, then make your extents in that projection. Currently, they're in 4326. 3. For now, set your maxResolution to 'auto'. This will automatically make the map extents fit the window. 4. The maxResolution should be approximately equal to the width of your maxExtent in map units, divided by the width of your map display div. So, for example, a -180 -> 180 map is 360 degrees. dividing by 256, you get 1.40625. So for a lat/lon map, resolution defaults to that value. For you, you'll want something different if you want to go projected. The HTML page you put together was comprehensive. I appreciate it. It's only because you were so thorough that I was able ot quickly determine your problem :) Best Regards, -- Christopher Schmidt MetaCarta From andremalms at hotmail.com Sat May 9 08:28:34 2009 From: andremalms at hotmail.com (=?iso-8859-1?Q?Andr=E9_Mendon=E7a?=) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] creating a layer based on sql queries Message-ID: Greetings, I am a cartography/GIS student, making a research about tools for spatial analysis in webmaps. I use Postgis/Geoserver/Openlayers. I have two simple questions, trying to get ideas to solve these little problems: 1- I have a html form, the user selects two layers to make an intersect operation in postgis. This form generate a sql file. The question is: How can I, dinamically, display the result of this sql query in openlayers? I think I will need a new html, but how it would be constructed to display this new layer since the user has a considerable number of possible combinations to intersect? Does someone has a piece of code to exemplify how it can be done to me? 2- The other spatial analysis tool that I am evaluating is the measure tool. I am using an openlayers measure control and it?s working fine. The user can measure a distance to answer a simple question and send the answer to me in a html form. My question is: How can I know if this user has used the measure tool? Just like, when he/she activate the openlayers control, a hidden value must be added to his/her form. I?m starting with openlayers and it?s a great tool. Thank you a lot, best regards from Brazil. Andr? Mendon?a _________________________________________________________________ Descubra todas as novidades do novo Internet Explorer 8 http://brasil.microsoft.com.br/IE8/mergulhe/?utm_source=MSN%3BHotmail&utm_medium=Tagline&utm_campaign=IE8 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090509/d0b7c840/attachment.html From xiaying4415139 at 163.com Sun May 10 02:55:29 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Get point on line? In-Reply-To: <49FC4A88.1050804@gisnet.com> References: <1241003641682-2739966.post@n2.nabble.com> <49F8545A.3090801@gisnet.com> <1241018119591-2741167.post@n2.nabble.com> <49F98E5B.60702@gisnet.com> <1241236853347-2759313.post@n2.nabble.com> <49FC4A88.1050804@gisnet.com> Message-ID: <1241938529710-2853044.post@n2.nabble.com> Bill Thoen, Thank you very much. With the help of the wiki page you give, I success finish the function. The following is my code function getPointOnLineByDistance(p1, p2, distance) { var ppp1 = new Point(p1.x, p1.y); var ppp2 = new Point(p2.x, p2.y); var bearing = ppp1.geoBearingTo(ppp2); var ppp3 = ppp1.geoWaypoint(distance, bearing); return new OpenLayers.Geometry.Point(ppp3.x, ppp3.y); } Many points tested, this function works well. But I don't understand the bearing. What is the bearing meaning? In the wiki page, it describes bearing is the angle that p1 to p2 along a great circle route. So can a bearing determine a great circle route? If it can't, how does this function(geoWaypoint) work? On earth, there are many points to p1 have the same distance. Bill Thoen wrote: > > I put an article about great circle algorithms in the wiki some time ago > that might help you. The links to the demos are down right now (that > server needs a power supply I think) but the algorithms and formulas are > shown on the wiki page at > http://trac.openlayers.org/wiki/GreatCircleAlgorithms. Hopefully that > will give you enough help to complete your task. > > Unfortunately, I'm swamped with my own OpenLayers problems right now, so > I don't have any free time to help you much more than that. JavaScript > and OpenLayers is so much fun that it's all too easy to program yourself > into places you have no business being. > > But if you got the answers to all your problems immediately, your heart > wouldn't become purified by the long quest. > > Good luck! > > - Bill Thoen > > > shane_china wrote: >> Hi, Bill Thoen, I go to the website and find the formulary I want. As >> following: >> Point(s) known distance from a great circle >> Let points A and B define a great circle route and D be a third point. >> Find >> the points on the great circle through A and B that lie a distance d from >> D, >> if they exist. >> A = crs_AD - crs_AB >> >> ( crs_AB and crs_AD are the initial GC bearings from A to B and D, >> respectively. Compute using Course between points) >> >> b = dist_AD >> >> (dist_AD is the distance from A to D. Compute using Distance between >> points) >> >> r=(cos(b)^2+sin(b)^2*cos(A)^2)^(1/2) >> >> (acos(r) is the XTD) >> >> p=atan2(sin(b)*cos(A),cos(b)) >> >> (p is the ATD) >> >> IF (cos(d)^2 > r^2) THEN >> No points exist >> ELSE >> Two points exist >> dp = p +- acos(cos(d)/r) >> ENDIF >> >> dp are the distances of the desired points from A along AB. Their >> lat/lons >> can be computed using Lat/lon given radial and distance >> >> But I want to know, Is there any such fomulary in OpenLayers to help me >> simplify the algorithm? For example, I know >> "OpenLayers.Util.distVencenty", >> this method can calculate the distance between two points. Does >> openlayers >> also have such functions can help me? Thank you. >> >> My math is not so good. Write the algorithm in js all by myself is so >> difficult for me. >> >> >> >> >> Bill Thoen wrote: >> >>> Yes, it's a little different for the spherical (Lon/Lat) case. For those >>> formulas, check out Ed Williams' Aviation Formulary website at >>> http://williams.best.vwh.net/avform.htm. What you're looking for is >>> determining waypoint locations, i think. >>> >>> - Bill Thoen >>> >>> shane_china wrote: >>> >>>> Bill Thoen wrote: >>>> >>>> >>>>> shane_china wrote: >>>>> >>>>> >>>>>> In openlayers, >>>>>> I have a straight line with two endpoints. How could I get a point on >>>>>> the >>>>>> line with given distance to one endpoint? Thank you. >>>>>> >>>>>> >>>>>> >>>>> You can find a point anywhere on a line by using a ratio calculation. >>>>> Start with the distance to your point divided by the total distance of >>>>> your line, then your new X coordinate = the difference between the X >>>>> coordinates of the endpoints times the ratio (plus the X coordinate of >>>>> the starting line endpoint. For example, if your endpoints are at >>>>> coordinates (X0, Y0) and (X1,Y1) then the Cartesian distance is >>>>> >>>>> D = sqrt((X1-X0)*(X1-X0) + (Y1-Y0)*(Y1-Y0)) >>>>> >>>>> Then if the ratio between this and the distance to your point is d, >>>>> your >>>>> new point's coordinates will be: >>>>> >>>>> X= X0+(X1-X0)*d/D >>>>> Y=Y0+(Y1-Y0)*d/D >>>>> >>>>> >>>> So thank you for your answer. Your advise is in X-Y coodinates. Does >>>> this >>>> method also apply to lon lat coodinates? Our earth is a ball, so is it >>>> different? >>>> I haven't demonstrate it yet. >>>> >>>> >>> _______________________________________________ >>> Users mailing list >>> Users@openlayers.org >>> http://openlayers.org/mailman/listinfo/users >>> >>> >>> >> >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Get-point-on-line--tp2739966p2853044.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tommaso.lavoro at gmail.com Sun May 10 09:46:35 2009 From: tommaso.lavoro at gmail.com (totom) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Style context doesn't work Message-ID: <1241963195103-2855557.post@n2.nabble.com> Hi, I have a problem with style, stylemap and context. Wath I need is to use an image for a WFS layer specified in the feature's attributes. Here is my code: var pippo = { getImage: function(feature) { var fixPath = 'style/images/features/'; return fixPath+"$(_status)_image.png"; }, getSize: function(feature){return 10;} }; var style = new OpenLayers.Style( { pointRadius: "$(getSize)", externalGraphic: "$(getImage)" }, {context: pippo}); var selectedStyle = new OpenLayers.Style({pointRadius: 15}); var styleMap = new OpenLayers.StyleMap({'default': style, 'select': selectedStyle}); and in the layer definition I set styleMap: styleMap. Now, nothing is displayed in the map, and if I make a layer.styleMap.default.externalGraphic I get a funny "$(getImage)" -_- What I'm doing wrong? Is possible that mootools (that i'm using ) with is $ function creates some troubles? -- View this message in context: http://n2.nabble.com/Style-context-doesn%27t-work-tp2855557p2855557.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From tommaso.lavoro at gmail.com Sun May 10 09:55:38 2009 From: tommaso.lavoro at gmail.com (totom) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Style context doesn't work In-Reply-To: <1241963195103-2855557.post@n2.nabble.com> References: <1241963195103-2855557.post@n2.nabble.com> Message-ID: <1241963738404-2855765.post@n2.nabble.com> totom wrote: > > Hi, I have a problem with style, stylemap and context. > Wath I need is to use an image for a WFS layer specified in the feature's > attributes. > Here is my code: > > var pippo = { > getImage: function(feature) { > var fixPath = 'style/images/features/'; > return fixPath+"$(_status)_image.png"; > }, > getSize: function(feature){return 10;} > }; > var style = new OpenLayers.Style( > { > pointRadius: "$(getSize)", > externalGraphic: "$(getImage)" > }, > {context: pippo}); > var selectedStyle = new OpenLayers.Style({pointRadius: 15}); > var styleMap = new OpenLayers.StyleMap({'default': style, 'select': > selectedStyle}); > > and in the layer definition I set styleMap: styleMap. > > > Now, nothing is displayed in the map, and if I make a > layer.styleMap.default.externalGraphic I get a funny "$(getImage)" -_- > > What I'm doing wrong? Is possible that mootools (that i'm using ) with is > $ function creates some troubles? > > Ok, I'm an idiot....I was using () instead of {} ....:blush: -- View this message in context: http://n2.nabble.com/Style-context-doesn%27t-work-tp2855557p2855765.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From peroc79 at gmail.com Sun May 10 11:02:15 2009 From: peroc79 at gmail.com (Pere Roca Ristol) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] creating a layer based on sql queries In-Reply-To: References: Message-ID: <1241967735069-2857285.post@n2.nabble.com> hi Andr?, I think you should pass the layers params to a server-side script that creates the SQL sentence, execute it, update the postGIS table (or view) and "echoes" the path to the new SLD file. All that using Ajax. Then you take the result (path to SLD) and udpate the layer.params.SLD and redraw(). At least that's the way I do. The other good thing of creating physically the SLD is that can be used to create a legend (GetLegendGraphic WMS request). Openlayers provides Ajax tools; in my case I use JQuery (because I use it for many other actions) and would be like... $.ajax({url:'my_url.php',type:'GET',dataType:'text',data:'data='+to_insert,success:function(result) { //my php echoes SLD path my_Untiled_WMS.params.SLD=result; my_Untiled_WMS.redraw(); }) salut Pere Roca Andremalms wrote: > > > Greetings, > > I am a cartography/GIS student, making a research about tools for spatial > analysis in webmaps. I use Postgis/Geoserver/Openlayers. > > I have two simple questions, trying to get ideas to solve these little > problems: > > 1- I have a html form, the user selects two layers to make an intersect > operation in postgis. This form generate a sql file. The question is: How > can I, dinamically, display the result of this sql query in openlayers? > I think I will need a new html, but how it would be constructed to display > this new layer since the user has a considerable number of possible > combinations to intersect? Does someone has a piece of code to exemplify > how it can be done to me? > > 2- The other spatial analysis tool that I am evaluating is the measure > tool. I am using an openlayers measure control and it?s working fine. The > user can measure a distance to answer a simple question and send the > answer to me in a html form. > My question is: How can I know if this user has used the measure tool? > Just like, when he/she activate the openlayers control, a hidden value > must be added to his/her form. > > > I?m starting with openlayers and it?s a great tool. Thank you a lot, best > regards from Brazil. > > Andr? Mendon?a > > > > _________________________________________________________________ > Descubra todas as novidades do novo Internet Explorer 8 > http://brasil.microsoft.com.br/IE8/mergulhe/?utm_source=MSN%3BHotmail&utm_medium=Tagline&utm_campaign=IE8 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/creating-a-layer-based-on-sql-queries-tp2849852p2857285.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From c.stanton at niwa.co.nz Mon May 11 00:31:54 2009 From: c.stanton at niwa.co.nz (Craig Stanton) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] detecting zoom changes not center changes Message-ID: <4A085301.17E1.008F.0@niwa.co.nz> Hi All, I've got a few thousand features drawn on a map using the Clustering strategy. When the map is dragged around I'd like to keep the features on the map until the drag is over and then fetch new data using the new BBOX. But if the map is zoomed in a lot, the clustering strategy is incredibly slow, so I want to remove all features from the map before the re-clustering happens. Right now I can set up events for movestart, moveend and zoomend. "Movestart" is called at the right time, i.e. before the map has been zoomed and the clustering happens on the full data, but I can't determine if the map has been zoomed or dragged. The getZoom() function returns the same value as it had before the movestarted. I guess what I need falls into three i) An event called zoomstart, that is only fired when the zoom value is changed ii) a function called getSoonToBeZoomLevel() which gets the value that the map is being zoomed to iii) A way to stop the clustering from recalculating when the map is zoomed in, and to only occur when I tell it to. Surely someone solved this sort of thing before. How did you do it? Cheers, Craig NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090511/65cad121/attachment.html From hgnj_025 at 163.com Mon May 11 05:00:05 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. Message-ID: <1242032405929-2861920.post@n2.nabble.com> After i displayed a map from the geoserver, i want to add a marker whose position is changing. The position information(lat,lon) comes from the web server(JAVA) and it changes per second. How can I realize it? What is the code in the Brower and the web server? Or, which technology should i use? Ajax, HTTPRequest, or the other? -- View this message in context: http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-marker.-tp2861920p2861920.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Mon May 11 07:09:59 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. In-Reply-To: <1242032405929-2861920.post@n2.nabble.com> References: <1242032405929-2861920.post@n2.nabble.com> Message-ID: Hi, I'm using a Vector layer with BBOX strategy and WFS protocol with a layer.refresh({force:true}) to reload the data The refresh I perform every 5 seconds (with setInterval) So I don't know which format the lonlat is provided by the JAVA server but WFS or GML orso would be the easiest to work with I guess. Hope this helps you a bit. Cheers KRis -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of sasi Sent: Monday, May 11, 2009 11:00 AM To: users@openlayers.org Subject: [OpenLayers-Users] How can I display a map with a position changing marker. After i displayed a map from the geoserver, i want to add a marker whose position is changing. The position information(lat,lon) comes from the web server(JAVA) and it changes per second. How can I realize it? What is the code in the Brower and the web server? Or, which technology should i use? Ajax, HTTPRequest, or the other? -- View this message in context: http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-ma rker.-tp2861920p2861920.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 bdtyah at yahoo.fr Mon May 11 08:37:55 2009 From: bdtyah at yahoo.fr (bdtyah) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] WFS layer over Google Map layer projection problem Message-ID: <1242045475168-2862733.post@n2.nabble.com> Hi, I'm using geoserver to serve wfs features that uses EPSG:4326 projection. I want to display them over a GoogleMap layer (EPSG:900913projection). I uses Mercator Options as is mentionned in many topics but I still have superposition problems. It's seems that features coordinates are treated as mercator coordinates rather than degrees. There is my code : var mercatorOptions = { controls: [], projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", numZoomLevels: 18, maxResolution: 156543.0339, maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508.34) }; map = new OpenLayers.Map( 'map',mercatorOptions); var gmap = new OpenLayers.Layer.Google( "Google" , {"type": G_NORMAL_MAP, "maxZoomLevel":18,"sphericalMercator": true} ); map.addLayer(gmap); wfsLayer = new OpenLayers.Layer.WFS( "WFS layer", "/geoserver/ows", { typename: 'topp:roads } ); map.addLayer(wfsLayer); -- View this message in context: http://n2.nabble.com/WFS-layer-over-Google-Map-layer-projection-problem-tp2862733p2862733.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bdtyah at yahoo.fr Mon May 11 09:53:30 2009 From: bdtyah at yahoo.fr (bdtyah) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] WFS layer over Google Map layer projection problem In-Reply-To: <1242045475168-2862733.post@n2.nabble.com> References: <1242045475168-2862733.post@n2.nabble.com> Message-ID: <1242050010267-2863071.post@n2.nabble.com> Resolved, thanks bdtyah wrote: > > Hi, > I'm using geoserver to serve wfs features that uses EPSG:4326 projection. > I want to display them over a GoogleMap layer (EPSG:900913projection). I > uses Mercator Options as is mentionned in many topics but I still have > superposition problems. It's seems that features coordinates are treated > as mercator coordinates rather than degrees. > There is my code : > > var mercatorOptions = { > controls: [], > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units: "m", > numZoomLevels: 18, > maxResolution: 156543.0339, > maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, > 20037508.34) > }; > map = new OpenLayers.Map( 'map',mercatorOptions); > var gmap = new OpenLayers.Layer.Google( "Google" , {"type": G_NORMAL_MAP, > "maxZoomLevel":18,"sphericalMercator": true} ); > map.addLayer(gmap); > wfsLayer = new OpenLayers.Layer.WFS( "WFS layer", > "/geoserver/ows", > { typename: 'topp:roads } ); > map.addLayer(wfsLayer); > > > -- View this message in context: http://n2.nabble.com/WFS-layer-over-Google-Map-layer-projection-problem-tp2862733p2863071.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alessio.dilorenzo at gmail.com Mon May 11 11:52:11 2009 From: alessio.dilorenzo at gmail.com (Alessio Di Lorenzo) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Problem alternating google bases with my own wms bases In-Reply-To: <1233935339419-2284792.post@n2.nabble.com> References: <1233935339419-2284792.post@n2.nabble.com> Message-ID: <1242057131442-2863770.post@n2.nabble.com> Sorry... but I have to UP! :) Does exist a way to sync the zoom levels of Google base layers and WMS base layers without removing numZoomLevels and maxZoomLevel? Alessio Di Lorenzo wrote: > > Hi List, > > I have a map that uses Google layers as default base layers and I defined > some options to avoid zooming too close or too far on the map > > options = { > controls:[], > maxExtent: bounds, > restrictedExtent: restrBounds, > maxResolution: "156543.0339", > numZoomLevels:9, > minZoomLevel:6, > maxZoomLevel:15, > projection: new OpenLayers.Projection("EPSG:900913"), > displayProjection: new OpenLayers.Projection("EPSG:4326"), > units:"meters" > } > > I need to make available another base layer from my wms (cached with > TileCache) and/or with an empty layer. > > I noticed that when I use my wms or the empty map as base layer I can't > zoom in my overlays at the same level that I can reach with one of the > Google base and the same overlay... the zooming level appears "locked". > This problem disappear if I comment the numZoomLevels and maxZoomLevels > parameter... but I need them. > > Is there a way to fix this? > thx in advance, alessio > -- View this message in context: http://n2.nabble.com/Problem-alternating-google-bases-with-my-own-wms-bases-tp2284792p2863770.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Hans-Juergen.Gau at LGN.Niedersachsen.de Mon May 11 12:02:23 2009 From: Hans-Juergen.Gau at LGN.Niedersachsen.de (=?iso-8859-1?Q?=22Gau=2C_Hans-J=FCrgen=22?=) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] set Language Message-ID: Hello, i want to set the language to german, so i use only OpenLayers.Lang.setCode('de'); in the beginning of my init-function. but there is no effect. Is this a bug? (Povisional i edit the file lib\OpenLayers\Lang\en.js with defaults). thanking you in anticipation , Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090511/976b398e/attachment.html From crschmidt at metacarta.com Mon May 11 13:15:23 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] set Language In-Reply-To: References: Message-ID: <20090511171523.GD27059@metacarta.com> On Mon, May 11, 2009 at 06:02:23PM +0200, "Gau, Hans-J?rgen" wrote: > Hello, > > i want to set the language to german, so i use only > > OpenLayers.Lang.setCode('de'); > > in the beginning of my init-function. > > but there is no effect. Is this a bug? Did you include the German language files in your build, or in the page? -- Chris > (Povisional > i edit the file lib\OpenLayers\Lang\en.js with defaults). > > thanking you > in > anticipation > , Hans > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From david at rushtone.com Mon May 11 18:10:27 2009 From: david at rushtone.com (David Rush) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Projections Message-ID: <4A08A253.10505@rushtone.com> Hi. I'm new to OpenLayers, but have some experience with WMS and GIS in general. I've got a few layers set up in Geoserver, all using the same custom projection (an Albers projection with params chosen to suit our area). When I view them with the OpenLayers-fueled "Map Preview" in GeoServer they look "right" - lines of latitude are curved and the shape is good, as I'm used to with our projection. However, when I create a very simple .html page using OpenLayers, my layers are stretched horizontally with flat lines of latitude - I presume they're being rendered in EPSG:4326 (geographic). How can I get OpenLayers to use the native projection that my data's in? David From gregor at hostgis.com Mon May 11 18:13:19 2009 From: gregor at hostgis.com (Gregor at HostGIS) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Projections In-Reply-To: <4A08A253.10505@rushtone.com> References: <4A08A253.10505@rushtone.com> Message-ID: <4A08A2FF.4090703@hostgis.com> > How can I get OpenLayers to use the native projection that my data's in? Set the map's projection when it's created: myproj = new OpenLayers.Projection('EPSG:12345'); map = new OpenLayersMap('map', {projection:myproj}) http://dev.openlayers.org/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.projection -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ From crschmidt at metacarta.com Mon May 11 18:31:21 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Projections In-Reply-To: <4A08A2FF.4090703@hostgis.com> References: <4A08A253.10505@rushtone.com> <4A08A2FF.4090703@hostgis.com> Message-ID: <20090511223120.GE27059@metacarta.com> On Mon, May 11, 2009 at 03:13:19PM -0700, Gregor at HostGIS wrote: > > How can I get OpenLayers to use the native projection that my data's in? > > Set the map's projection when it's created: > > myproj = new OpenLayers.Projection('EPSG:12345'); > map = new OpenLayersMap('map', {projection:myproj}) Which does almost nothing. The key aspect of reprojecting is the setting of two parameters in addition to this one: * maxExtent - OpenLayesr.Bounds object, left, bottom, right, top of extent of data * maxResolution - number of map units per pixel at most zoomed out. "auto" works as a wawy to set this if you don't know what it should be set to. http://faq.openlayers.org/map/how-do-i-set-a-different-projection-on-my-map/ > > http://dev.openlayers.org/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.projection > > -- > HostGIS, Open Source solutions for the global GIS community > Greg Allensworth - SysAdmin, Programmer, GIS Person, Security > Network+ Server+ A+ Security+ > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From n.e.kendall at gmail.com Mon May 11 21:27:15 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Firebug Error: Invalid Object Initializer Message-ID: <33fd44f90905111827l91abb03w8d7369690d1e870e@mail.gmail.com> Hi all, I'm getting a firebug error, which is this: invalid object initializer var factory=null;if(typeof GearsFactory!...documentElement.appendChild(factory);}}} error line 224 Here's my code, basically, I'm just trying to get OL to display data in UTM Zone 32N, which I believe is EPSG:22332 (although there are several)) I apologize for the commented out lines of code. I'm pretty sure the error's with the mapserver layer. //Tricking OL's wms to setCenter var lon = 10.8804; var lat = 33.7817; var zoom = 10; var myproj = new OpenLayers.Projection("EPSG:22332"); //var myproj = new OpenLayers.Projection("EPSG:4326"); var map, layer; function init(){ // Default WMS from Metacarta map = new OpenLayers.Map('map', { maxExtent: new OpenLayers.Bounds (656782.661, 3720728.22, 693473.18, 3754557.09), maxResolution: "auto", projection: "myproj" }); // var myBaseLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", // "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); // map.addLayer(myBaseLayer); // var jerbaSites =(new OpenLayers.Layer.GML("Jerba_sites", "kml/doc.kml", // { // projection: new OpenLayers.Projection ("EPSG:4326"), // format: OpenLayers.Format.KML, // formatOptions: { // extractStyles: true, // extractAttributes: true, // maxDepth: 2 // } // })); // map.addLayer(jerbaSites); var mapserv = new OpenLayers.Layer.WMS( "Jerba", "http://localhost/cgi-bin/mapserv.exe", { map: 'C:/ms4w/apache/htdocs/oltest/Jerba.map', layers: "satt", "sites", "soils" } ); map.addLayer(mapserv); // var kmlTest = new OpenLayers.Layer.GML("KML_Test", "kml/jerba_site.kml", // { projection: new OpenLayers.Projection ("EPSG:4326"), format: OpenLayers.Format.KML, formatOptions: {extractStyles: true, // extractAttributes: true, // maxDepth: 2 // } // })); // map.addLayer(kmlTest); // Map Controls map.addControl( new OpenLayers.Control.LayerSwitcher()); map.addControl( new OpenLayers.Control.MousePosition()); map.addControl( new OpenLayers.Control.OverviewMap()); map.addControl( new OpenLayers.Control.ScaleLine()); map.addControl(new OpenLayers.Control.Permalink()); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); } // --> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090511/cdf94410/attachment.html From antoni.vidal at icc.cat Mon May 11 12:24:26 2009 From: antoni.vidal at icc.cat (Vidal, Antoni) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] One layer with two wms servers Message-ID: <784FAC631C0CB14CAE68764151D5DA41081D647C@CORRIOL.icc.local> Hi, I would like to have a layer.WMS witch displays data from two servers. Is this possble ? Thank's in advance. Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogr?fic de Catalunya Parc de Montju?c, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090511/5fcf8d80/attachment.html From no-reply at neogeo-online.net Tue May 12 04:39:29 2009 From: no-reply at neogeo-online.net (Guillaume Sueur) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] One layer with two wms servers In-Reply-To: <784FAC631C0CB14CAE68764151D5DA41081D647C@CORRIOL.icc.local> References: <784FAC631C0CB14CAE68764151D5DA41081D647C@CORRIOL.icc.local> Message-ID: <4A0935C1.7080506@neogeo-online.net> Hi Antoni, That sounds more like a server-side specific solution. You need to set up a WMS Server which will be a WMS client for both your datasources. Regards, Guillaume Vidal, Antoni a ?crit : > Hi, > > > > I would like to have a layer.WMS witch displays data from two servers. > Is this possble ? > > > > Thank?s in advance. > > > > *Antoni Vidal* > > Unitat d'Aplicacions SIG-WEB > Institut Cartogr?fic de Catalunya > > Parc de Montju?c, E-08038 Barcelona > Tel. (+34) 93 567 15 00 (ext. 3228) > www.icc.cat > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From hgnj_025 at 163.com Tue May 12 05:11:49 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. In-Reply-To: References: <1242032405929-2861920.post@n2.nabble.com> Message-ID: <1242119509537-2868140.post@n2.nabble.com> thank you for your reply. Can i store the lon&lat in the mysql and deploy this information through geoserver. And so, the brower can access geoserver and display these point. And, are there some documents about the use of layer.refresh. Kris Geusebroek wrote: > > Hi, > > I'm using a Vector layer with BBOX strategy and WFS protocol with a > layer.refresh({force:true}) to reload the data > The refresh I perform every 5 seconds (with setInterval) > > So I don't know which format the lonlat is provided by the JAVA server > but WFS or GML orso would be the easiest to work with I guess. > > Hope this helps you a bit. > > Cheers KRis > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of sasi > Sent: Monday, May 11, 2009 11:00 AM > To: users@openlayers.org > Subject: [OpenLayers-Users] How can I display a map with a position > changing marker. > > > After i displayed a map from the geoserver, i want to add a marker whose > position is changing. The position information(lat,lon) comes from the > web > server(JAVA) and it changes per second. > How can I realize it? What is the code in the Brower and the web server? > Or, which technology should i use? Ajax, HTTPRequest, or the other? > -- > View this message in context: > http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-ma > rker.-tp2861920p2861920.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-marker.-tp2861920p2868140.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Tue May 12 05:40:02 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. In-Reply-To: <1242119509537-2868140.post@n2.nabble.com> References: <1242032405929-2861920.post@n2.nabble.com> <1242119509537-2868140.post@n2.nabble.com> Message-ID: Hi, Yes that's the whole point. The lon, lan will be in your db, you configure your datastore and layer in geoserver In your openlayers based client you configure your layers as a vector layer with bbox strategy and wfs protocol Where the wfs protocol must be configured to connect to the right layer and geoserver instance. Something like this: var wfsLayerOptions = { url: GEOSERVER_WFS_URL,//something like http://localhost:8080/geoserver/wfs geometryName: "GEOMETRY", featureNS: FEATURENAMESPACE,//something like http://www.blah.org/topp version: "1.0.0" }; var layerOptions = { filter: filter, projection: RDPROJECTION }; wfsLayer = new OpenLayers.Layer.Vector("wfsLayerName", OpenLayers.Util.extend({ styleMap: styles[0], strategies: [ new OpenLayers.Strategy.BBOX(), new OpenLayers.Strategy.Cluster({ threshold: 2, distance: 30 }) ], protocol: new OpenLayers.Protocol.WFS( OpenLayers.Util.extend({ featureType: 'LAYER_NAME_IN_GEOSERVER' }, wfsLayerOptions) ) }, layerOptions) ); Cheers Kris From crschmidt at metacarta.com Tue May 12 07:16:14 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Firebug Error: Invalid Object Initializer In-Reply-To: <33fd44f90905111827l91abb03w8d7369690d1e870e@mail.gmail.com> References: <33fd44f90905111827l91abb03w8d7369690d1e870e@mail.gmail.com> Message-ID: <20090512111613.GG27059@metacarta.com> On Mon, May 11, 2009 at 09:27:15PM -0400, Nicholas Efremov-Kendall wrote: > Hi all, > > I'm getting a firebug error, which is this: > > > invalid object initializer > var factory=null;if(typeof > GearsFactory!...documentElement.appendChild(factory);}}} error line 224 I see this error message regularly. I believe it is related to Google Gears somehow, and I also think it's bogus -- not something wrong with your code. I've neve rseen it cause problems before. > Here's my code, basically, I'm just trying to get OL to display data in UTM > Zone 32N, which I believe is EPSG:22332 (although there are several)) > I apologize for the commented out lines of code. > > I'm pretty sure the error's with the mapserver layer. > > //Tricking OL's wms to setCenter > var lon = 10.8804; > var lat = 33.7817; > var zoom = 10; > var myproj = new OpenLayers.Projection("EPSG:22332"); > //var myproj = new OpenLayers.Projection("EPSG:4326"); > var map, layer; > function init(){ > // Default WMS from Metacarta > map = new OpenLayers.Map('map', > { > maxExtent: new OpenLayers.Bounds (656782.661, 3720728.22, > 693473.18, 3754557.09), > maxResolution: "auto", > projection: "myproj" > }); > > // var myBaseLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", > // "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} > ); > > // map.addLayer(myBaseLayer); > // var jerbaSites =(new OpenLayers.Layer.GML("Jerba_sites", > "kml/doc.kml", > // { > // projection: new OpenLayers.Projection ("EPSG:4326"), > // format: OpenLayers.Format.KML, > // formatOptions: { > // extractStyles: true, > // extractAttributes: true, > // maxDepth: 2 > // } > // })); > > // map.addLayer(jerbaSites); > var mapserv = new OpenLayers.Layer.WMS( "Jerba", > "http://localhost/cgi-bin/mapserv.exe", > { > map: 'C:/ms4w/apache/htdocs/oltest/Jerba.map', > layers: "satt", "sites", "soils" > } > ); > map.addLayer(mapserv); > > // var kmlTest = new OpenLayers.Layer.GML("KML_Test", > "kml/jerba_site.kml", > // { projection: new OpenLayers.Projection ("EPSG:4326"), format: > OpenLayers.Format.KML, formatOptions: {extractStyles: true, > // extractAttributes: true, > // maxDepth: 2 > // } > // })); > // map.addLayer(kmlTest); > // Map Controls > map.addControl( new OpenLayers.Control.LayerSwitcher()); > map.addControl( new OpenLayers.Control.MousePosition()); > map.addControl( new OpenLayers.Control.OverviewMap()); > map.addControl( new OpenLayers.Control.ScaleLine()); > map.addControl(new OpenLayers.Control.Permalink()); > map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); > > } > // --> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From emiliol at jccm.es Tue May 12 08:10:37 2009 From: emiliol at jccm.es (=?iso-8859-1?Q?Emilio_L=F3pez_Pasamontes?=) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] icons displaced in kml layer Message-ID: <9EA95D245BD64C12AB17DDA62864ABD8@cit.jclm.es> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: equipamientos_kml.kml Type: application/vnd.google-earth.kml+xml Size: 5127 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090512/77fed0cd/equipamientos_kml.bin From kildimo at gmail.com Tue May 12 08:25:07 2009 From: kildimo at gmail.com (protos) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] layer event transparency In-Reply-To: <1241780686361-2844713.post@n2.nabble.com> References: <1241780686361-2844713.post@n2.nabble.com> Message-ID: <1242131107874-2868792.post@n2.nabble.com> Thanks for your replies. Interesting that the vector layer won't allow events through. I moved the vector layer down to the bottom so that all other layers are on top. All the markers layers are working fine now but something is blocking events on the vector layer now ! There's three marker layers and events can be caught on all three marker layers, but not on the vector layer. Does this have something to do with the fact that I'm using selectFeature to pick up the events ? Another thing I've noticed is that when setting up z-index'es using the openLayers setLayerZIndex() function, if you then look at the html and the z-indexes assigned to the layer divs, they are completely different to what was assigned by setLayerZIndex. I don't mean the actual number but the layer indexes as they are related to each other. I'm sure there's a good reason for this but it's very confusing - Is there any documentation around on this ? protos wrote: > > Hi, > > I have a map with a transparent vector overlay over it, which has some > features. > I want the features to pickup click events and apart from that I want the > overlay > to allow all other events to go through the vector layer and get picked up > by the > layers below (map / markers etc) > > The vector overlay z-index is higher than all other layers. > There are no events registered on the vector layer. > The features use the selectFeature to pick up events on them. (works fine) > I've set vectorLayer.event.fallthrough to true > I've set vectorLayer.style.pointerEvents to 'none' > > I can't get it to work though and the worst thing is that it's behaving > very strangely. > Some of the lower layers will pick up click events, some don't. dragging > the map > works. Events on all the map controls work. > > Basically the map and one other layer seem to pick up all events. > 2 other layers don't pick up any events. > If I remove the vector layer everything works fine so it definitely seems > to be the culprit > > Can anyone see what the issue could be with this ? > Is there problems / bugs with vector layer events - it seems to be very > inconsistent. > > Any help appreciated. > > Cheers. > > > > > -- View this message in context: http://n2.nabble.com/layer-event-transparency-tp2844713p2868792.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Tue May 12 08:48:57 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] icons displaced in kml layer In-Reply-To: <9EA95D245BD64C12AB17DDA62864ABD8@cit.jclm.es> References: <9EA95D245BD64C12AB17DDA62864ABD8@cit.jclm.es> Message-ID: <20090512124857.GH27059@metacarta.com> On Tue, May 12, 2009 at 02:10:37PM +0200, Emilio L?pez Pasamontes wrote: > Hi, > > i`m using google and kml layer, The problem is that the icons that uses the > kml to refer the placemark are displaced in the coordinates upwards. > However, the ballon mark well the point. Anyone can help me. THis is probably http://faq.openlayers.org/vector-related-questions/why-dont-my-vector-features-work-over-google-yahoo-virtual-earth-etc/ . > Best Regards and sorry for my english > > > function init(){ > var options = { > controls: [] > }; > var map = new OpenLayers.Map('map', options); > > map.projection= new OpenLayers.Projection("EPSG:4326"); > map.maxExtent = new > OpenLayers.Bounds(-5.84473,38.11727,-0.40649,41.36032); > map.minScale=4000000; > map.maxScale=3000; > > > var gphy = new OpenLayers.Layer.Google( > "Google Physical", > {type: G_PHYSICAL_MAP} > ); > > > var gmap = new OpenLayers.Layer.Google( > "Google Streets" > // the default > ); > > > var ghyb = new OpenLayers.Layer.Google( > "Google Hybrid", > {type: G_HYBRID_MAP} > ); > > > var gsat = new OpenLayers.Layer.Google( > "Google Satellite", > {type: G_SATELLITE_MAP} > ); > > var pruebaKml = new OpenLayers.Layer.GML("Equipamientos", > "http://prej2ee.cit.jclm.es/CatalogoTIC/kml/", { > projection: map.projection, > format: OpenLayers.Format.KML, > formatOptions: { > extractStyles: true, > extractAttributes: true > } > }); > > pruebaKml.displayInLayerSwitcher=false; > map.addLayer(pruebaKml); > map.addLayers([gphy, gmap, ghyb, gsat]); > > var selectControl = new > OpenLayers.Control.SelectFeature(pruebaKml, > {onSelect: onFeatureSelect, onUnselect: > onFeatureUnselect}); > > map.addControl(selectControl); > selectControl.activate(); > > var nav = new OpenLayers.Control.NavigationHistory(); > map.addControl(nav); > var navegacion = new OpenLayers.Control.NavToolbar(); > var barraZoom = new OpenLayers.Control.PanZoomBar(); > var posicionPuntero = new OpenLayers.Control.MousePosition(); > var escalaNumero = new OpenLayers.Control.Scale(); > var escalaLinea = new OpenLayers.Control.ScaleLine(); > var panel = new OpenLayers.Control.Panel({defaultControl: > navegacion}); > > panel.addControls([nav.next, nav.previous]); > panel.addControls([posicionPuntero]); > panel.addControls(escalaNumero); > panel.addControls(escalaLinea); > panel.addControls(navegacion); > panel.addControls(barraZoom); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > map.addControl(panel); > > > > //************************************************************************** > ********** > /* var control = new OpenLayers.Control(); > OpenLayers.Util.extend(control, { > draw: function () { > // this Handler.Box will intercept the > shift-mousedown > // before Control.MouseDefault gets to see it > this.box = new OpenLayers.Handler.Box( control, > {"done": this.notice}, > {keyMask: OpenLayers.Handler.MOD_SHIFT}); > this.box.activate(); > }, > > notice: function (bounds) { > OpenLayers.Console.userError(bounds); > } > }); > map.addControl(control); */ > //*************************************************************** > > // map.setCenter(new OpenLayers.LonLat(-3, 39), 9); //Centrar > el mapa > map.zoomToMaxExtent(); > > function onFeatureSelect(feature) { > selectedFeature = feature; > popup = new OpenLayers.Popup.FramedCloud("chicken", > > feature.geometry.getBounds().getCenterLonLat(), > new OpenLayers.Size(100,100), > "

"+feature.attributes.name + > "

" + feature.attributes.description, > null, true, onPopupClose); > feature.popup = popup; > map.addPopup(popup); > } > > function onPopupClose(evt) { > selectControl.unselect(selectedFeature); > } > > > function onFeatureUnselect(feature) { > map.removePopup(feature.popup); > feature.popup.destroy(); > feature.popup = null; > } > } > > > > > > > > >
> > > > __________________________________ > Emilio L?pez Pasamontes > Dep. Desarrollo. Serv. Inform?tica > Consej. Industria, Energ?a y M.A. (JCCM) > emiliol@jccm.es > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From emiliol at jccm.es Tue May 12 09:22:41 2009 From: emiliol at jccm.es (=?iso-8859-1?Q?Emilio_L=F3pez_Pasamontes?=) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] icons displaced in kml layer In-Reply-To: <20090512124857.GH27059@metacarta.com> References: <9EA95D245BD64C12AB17DDA62864ABD8@cit.jclm.es> <20090512124857.GH27059@metacarta.com> Message-ID: <80943E784C8A4BC1AE44A065C384D048@cit.jclm.es> Thank?s Christopher, but What i do not understand then is why the ballon yes marks the exact point? > -----Mensaje original----- > De: Christopher Schmidt [mailto:crschmidt@metacarta.com] > Enviado el: martes, 12 de mayo de 2009 14:49 > Para: Emilio L?pez Pasamontes > CC: users@openlayers.org > Asunto: Re: [OpenLayers-Users] icons displaced in kml layer > > On Tue, May 12, 2009 at 02:10:37PM +0200, Emilio L?pez > Pasamontes wrote: > > Hi, > > > > i`m using google and kml layer, The problem is that the icons that > > uses the kml to refer the placemark are displaced in the > coordinates upwards. > > However, the ballon mark well the point. Anyone can help me. > > THis is probably > http://faq.openlayers.org/vector-related-questions/why-dont-my > -vector-features-work-over-google-yahoo-virtual-earth-etc/ > . > > > Best Regards and sorry for my english > > > > > > function init(){ > > var options = { > > controls: [] > > }; > > var map = new OpenLayers.Map('map', options); > > > > map.projection= new OpenLayers.Projection("EPSG:4326"); > > map.maxExtent = new > > OpenLayers.Bounds(-5.84473,38.11727,-0.40649,41.36032); > > map.minScale=4000000; > > map.maxScale=3000; > > > > > > var gphy = new OpenLayers.Layer.Google( > > "Google Physical", > > {type: G_PHYSICAL_MAP} > > ); > > > > > > var gmap = new OpenLayers.Layer.Google( > > "Google Streets" > > // the default > > ); > > > > > > var ghyb = new OpenLayers.Layer.Google( > > "Google Hybrid", > > {type: G_HYBRID_MAP} > > ); > > > > > > var gsat = new OpenLayers.Layer.Google( > > "Google Satellite", > > {type: G_SATELLITE_MAP} > > ); > > > > var pruebaKml = new OpenLayers.Layer.GML("Equipamientos", > > "http://prej2ee.cit.jclm.es/CatalogoTIC/kml/ $_GET['fichkml'];?>", { > > projection: map.projection, > > format: OpenLayers.Format.KML, > > formatOptions: { > > extractStyles: true, > > extractAttributes: true > > } > > }); > > > > pruebaKml.displayInLayerSwitcher=false; > > map.addLayer(pruebaKml); > > map.addLayers([gphy, gmap, ghyb, gsat]); > > > > var selectControl = new > > OpenLayers.Control.SelectFeature(pruebaKml, > > {onSelect: onFeatureSelect, onUnselect: > > onFeatureUnselect}); > > > > map.addControl(selectControl); > > selectControl.activate(); > > > > var nav = new OpenLayers.Control.NavigationHistory(); > > map.addControl(nav); > > var navegacion = new OpenLayers.Control.NavToolbar(); > > var barraZoom = new OpenLayers.Control.PanZoomBar(); > > var posicionPuntero = new > OpenLayers.Control.MousePosition(); > > var escalaNumero = new OpenLayers.Control.Scale(); > > var escalaLinea = new OpenLayers.Control.ScaleLine(); > > var panel = new OpenLayers.Control.Panel({defaultControl: > > navegacion}); > > > > panel.addControls([nav.next, nav.previous]); > > panel.addControls([posicionPuntero]); > > panel.addControls(escalaNumero); > > panel.addControls(escalaLinea); > > panel.addControls(navegacion); > > panel.addControls(barraZoom); > > > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > map.addControl(panel); > > > > > > > > > //******************************************************************** > > ****** > > ********** > > /* var control = new OpenLayers.Control(); > > OpenLayers.Util.extend(control, { > > draw: function () { > > // this Handler.Box will intercept the > > shift-mousedown > > // before Control.MouseDefault > gets to see it > > this.box = new > OpenLayers.Handler.Box( control, > > {"done": this.notice}, > > {keyMask: > OpenLayers.Handler.MOD_SHIFT}); > > this.box.activate(); > > }, > > > > notice: function (bounds) { > > OpenLayers.Console.userError(bounds); > > } > > }); > > map.addControl(control); */ > > > > //*************************************************************** > > > > // map.setCenter(new OpenLayers.LonLat(-3, > 39), 9); //Centrar > > el mapa > > map.zoomToMaxExtent(); > > > > function onFeatureSelect(feature) { > > selectedFeature = feature; > > popup = new > OpenLayers.Popup.FramedCloud("chicken", > > > > feature.geometry.getBounds().getCenterLonLat(), > > new > OpenLayers.Size(100,100), > > > > "

"+feature.attributes.name + "

" + > feature.attributes.description, > > null, true, > onPopupClose); > > feature.popup = popup; > > map.addPopup(popup); > > } > > > > function onPopupClose(evt) { > > selectControl.unselect(selectedFeature); > > } > > > > > > function onFeatureUnselect(feature) { > > map.removePopup(feature.popup); > > feature.popup.destroy(); > > feature.popup = null; > > } > > } > > > > > > > > > > > > > > > > > >
> > > > > > __________________________________ > > Emilio L?pez Pasamontes > > Dep. Desarrollo. Serv. Inform?tica > > Consej. Industria, Energ?a y M.A. (JCCM) emiliol@jccm.es > > > > > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta From crschmidt at metacarta.com Tue May 12 09:55:52 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] icons displaced in kml layer In-Reply-To: <80943E784C8A4BC1AE44A065C384D048@cit.jclm.es> References: <9EA95D245BD64C12AB17DDA62864ABD8@cit.jclm.es> <20090512124857.GH27059@metacarta.com> <80943E784C8A4BC1AE44A065C384D048@cit.jclm.es> Message-ID: <20090512135552.GI27059@metacarta.com> On Tue, May 12, 2009 at 03:22:41PM +0200, Emilio L?pez Pasamontes wrote: > Thank?s Christopher, but > > What i do not understand then is why the ballon yes marks the exact point? "Because it works differently." It uses a slower method of determining the location to get it in line with the base layer, but that slowdown is impractical when dealing with many locations. -- Chris > > > > -----Mensaje original----- > > De: Christopher Schmidt [mailto:crschmidt@metacarta.com] > > Enviado el: martes, 12 de mayo de 2009 14:49 > > Para: Emilio L?pez Pasamontes > > CC: users@openlayers.org > > Asunto: Re: [OpenLayers-Users] icons displaced in kml layer > > > > On Tue, May 12, 2009 at 02:10:37PM +0200, Emilio L?pez > > Pasamontes wrote: > > > Hi, > > > > > > i`m using google and kml layer, The problem is that the icons that > > > uses the kml to refer the placemark are displaced in the > > coordinates upwards. > > > However, the ballon mark well the point. Anyone can help me. > > > > THis is probably > > http://faq.openlayers.org/vector-related-questions/why-dont-my > > -vector-features-work-over-google-yahoo-virtual-earth-etc/ > > . > > > > > Best Regards and sorry for my english > > > > > > > > > function init(){ > > > var options = { > > > controls: [] > > > }; > > > var map = new OpenLayers.Map('map', options); > > > > > > map.projection= new OpenLayers.Projection("EPSG:4326"); > > > map.maxExtent = new > > > OpenLayers.Bounds(-5.84473,38.11727,-0.40649,41.36032); > > > map.minScale=4000000; > > > map.maxScale=3000; > > > > > > > > > var gphy = new OpenLayers.Layer.Google( > > > "Google Physical", > > > {type: G_PHYSICAL_MAP} > > > ); > > > > > > > > > var gmap = new OpenLayers.Layer.Google( > > > "Google Streets" > > > // the default > > > ); > > > > > > > > > var ghyb = new OpenLayers.Layer.Google( > > > "Google Hybrid", > > > {type: G_HYBRID_MAP} > > > ); > > > > > > > > > var gsat = new OpenLayers.Layer.Google( > > > "Google Satellite", > > > {type: G_SATELLITE_MAP} > > > ); > > > > > > var pruebaKml = new OpenLayers.Layer.GML("Equipamientos", > > > "http://prej2ee.cit.jclm.es/CatalogoTIC/kml/ > $_GET['fichkml'];?>", { > > > projection: map.projection, > > > format: OpenLayers.Format.KML, > > > formatOptions: { > > > extractStyles: true, > > > extractAttributes: true > > > } > > > }); > > > > > > pruebaKml.displayInLayerSwitcher=false; > > > map.addLayer(pruebaKml); > > > map.addLayers([gphy, gmap, ghyb, gsat]); > > > > > > var selectControl = new > > > OpenLayers.Control.SelectFeature(pruebaKml, > > > {onSelect: onFeatureSelect, onUnselect: > > > onFeatureUnselect}); > > > > > > map.addControl(selectControl); > > > selectControl.activate(); > > > > > > var nav = new OpenLayers.Control.NavigationHistory(); > > > map.addControl(nav); > > > var navegacion = new OpenLayers.Control.NavToolbar(); > > > var barraZoom = new OpenLayers.Control.PanZoomBar(); > > > var posicionPuntero = new > > OpenLayers.Control.MousePosition(); > > > var escalaNumero = new OpenLayers.Control.Scale(); > > > var escalaLinea = new OpenLayers.Control.ScaleLine(); > > > var panel = new OpenLayers.Control.Panel({defaultControl: > > > navegacion}); > > > > > > panel.addControls([nav.next, nav.previous]); > > > panel.addControls([posicionPuntero]); > > > panel.addControls(escalaNumero); > > > panel.addControls(escalaLinea); > > > panel.addControls(navegacion); > > > panel.addControls(barraZoom); > > > > > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > > map.addControl(panel); > > > > > > > > > > > > > > //******************************************************************** > > > ****** > > > ********** > > > /* var control = new OpenLayers.Control(); > > > OpenLayers.Util.extend(control, { > > > draw: function () { > > > // this Handler.Box will intercept the > > > shift-mousedown > > > // before Control.MouseDefault > > gets to see it > > > this.box = new > > OpenLayers.Handler.Box( control, > > > {"done": this.notice}, > > > {keyMask: > > OpenLayers.Handler.MOD_SHIFT}); > > > this.box.activate(); > > > }, > > > > > > notice: function (bounds) { > > > OpenLayers.Console.userError(bounds); > > > } > > > }); > > > map.addControl(control); */ > > > > > > //*************************************************************** > > > > > > // map.setCenter(new OpenLayers.LonLat(-3, > > 39), 9); //Centrar > > > el mapa > > > map.zoomToMaxExtent(); > > > > > > function onFeatureSelect(feature) { > > > selectedFeature = feature; > > > popup = new > > OpenLayers.Popup.FramedCloud("chicken", > > > > > > feature.geometry.getBounds().getCenterLonLat(), > > > new > > OpenLayers.Size(100,100), > > > > > > "

"+feature.attributes.name + "

" + > > feature.attributes.description, > > > null, true, > > onPopupClose); > > > feature.popup = popup; > > > map.addPopup(popup); > > > } > > > > > > function onPopupClose(evt) { > > > selectControl.unselect(selectedFeature); > > > } > > > > > > > > > function onFeatureUnselect(feature) { > > > map.removePopup(feature.popup); > > > feature.popup.destroy(); > > > feature.popup = null; > > > } > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > __________________________________ > > > Emilio L?pez Pasamontes > > > Dep. Desarrollo. Serv. Inform?tica > > > Consej. Industria, Energ?a y M.A. (JCCM) emiliol@jccm.es > > > > > > > > > > > > > _______________________________________________ > > > Users mailing list > > > Users@openlayers.org > > > http://openlayers.org/mailman/listinfo/users > > > > > > -- > > Christopher Schmidt > > MetaCarta > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From ChiefDan at gmail.com Tue May 12 13:35:03 2009 From: ChiefDan at gmail.com (ChiefDan) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] KML NetworkLink and auto-refresh In-Reply-To: <300497a30903250221v55a12f77rca715078f1cde872@mail.gmail.com> References: <300497a30903250221v55a12f77rca715078f1cde872@mail.gmail.com> Message-ID: <1242149703726-2870627.post@n2.nabble.com> Andrew, Not sure if you found a solution, if not, this is what I've done. In the map init function, set a timer: window.setInterval(raingaugeRefreshData, 600000, rainGauges); Then in the timer service function: function raingaugeRefreshData(layer) { layer.loaded = false; layer.setVisibility(true); } By setting loaded to false then calling setVisibility(), openlayers goes and grabs the kml file again. Hope this helps. Dan -- View this message in context: http://n2.nabble.com/KML-NetworkLink-and-auto-refresh-tp2531433p2870627.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bdtyah at yahoo.fr Tue May 12 13:47:42 2009 From: bdtyah at yahoo.fr (bdtyah) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] WFS layer over Google Map layer projection problem In-Reply-To: <1242061937517-2864249.post@n2.nabble.com> References: <1242045475168-2862733.post@n2.nabble.com> <1242050010267-2863071.post@n2.nabble.com> <1242061937517-2864249.post@n2.nabble.com> Message-ID: <1242150462418-2870700.post@n2.nabble.com> I add the projection attribute to my WFS layer like this : wfsLayer = new OpenLayers.Layer.WFS( "WFS layer", "/geoserver/ows", { typename: 'topp:roads, projection: new OpenLayers.Projection("EPSG:4326") } ); I found the response here : http://openlayers.org/dev/examples/wfs-reprojection.html http://openlayers.org/dev/examples/wfs-reprojection.html Skymota wrote: > > Please tell us how you resolved this problem, thanks > > > > > bdtyah wrote: >> >> Resolved, thanks >> >> >> bdtyah wrote: >>> >>> Hi, >>> I'm using geoserver to serve wfs features that uses EPSG:4326 >>> projection. I want to display them over a GoogleMap layer >>> (EPSG:900913projection). I uses Mercator Options as is mentionned in >>> many topics but I still have superposition problems. It's seems that >>> features coordinates are treated as mercator coordinates rather than >>> degrees. >>> There is my code : >>> >>> var mercatorOptions = { >>> controls: [], >>> projection: new OpenLayers.Projection("EPSG:900913"), >>> displayProjection: new OpenLayers.Projection("EPSG:4326"), >>> units: "m", >>> numZoomLevels: 18, >>> maxResolution: 156543.0339, >>> maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, >>> 20037508.34) >>> }; >>> map = new OpenLayers.Map( 'map',mercatorOptions); >>> var gmap = new OpenLayers.Layer.Google( "Google" , {"type": >>> G_NORMAL_MAP, "maxZoomLevel":18,"sphericalMercator": true} ); >>> map.addLayer(gmap); >>> wfsLayer = new OpenLayers.Layer.WFS( "WFS layer", >>> "/geoserver/ows", >>> { typename: 'topp:roads } ); >>> map.addLayer(wfsLayer); >>> >>> >>> >> >> > > -- View this message in context: http://n2.nabble.com/WFS-layer-over-Google-Map-layer-projection-problem-tp2862733p2870700.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From Stephane.Poirier at USherbrooke.CA Tue May 12 16:13:12 2009 From: Stephane.Poirier at USherbrooke.CA (=?iso-8859-1?b?U3TpcGhhbmU=?= Poirier) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How to override createGeometry Message-ID: <1242159192.4a09d8586f790@www.usherbrooke.ca> Hi All, In order to prevent creating rectangle that are too small, I would like to override createGeometry (that is, in my code, the function OpenLayers.Handler.RegularPolygon.prototype.createGeometry.apply(this, arguments);) How can I do this? Here is my code: drawControls = { point: new OpenLayers.Control.DrawFeature(rectangleLayer, OpenLayers.Handler.Point, {featureAdded: point_feature_added, handlerOptions: {createFeature: function() { this.control.layer.destroyFeatures(); OpenLayers.Handler.Point.prototype.createFeature.apply(this, arguments); }}}), rectangle: new OpenLayers.Control.DrawFeature(rectangleLayer, OpenLayers.Handler.RegularPolygon, {featureAdded: rectangle_feature_added, handlerOptions: {sides: 4, irregular: true,'displayClass': 'olControlDrawFeatureRectangle', createGeometry: function() { this.control.layer.destroyFeatures(); OpenLayers.Handler.RegularPolygon.prototype.createGeometry.apply(this, arguments); }}}) } Regards, St?phane Poirier Professionel de recherche au CARTEL Centre d'Applications et de Recherches en T?l?d?tection D?partement de g?omatique appliqu?e Universit? de Sherbrooke Sherbrooke (Qu?bec), CANADA J1K 2R1 Tel.: (+1 819) 821 8000 #61904 Fax.: (+1 819) 821 7944 Stephane.Poirier@USherbrooke.ca http://www.usherbrooke.ca/cartel St?phane Poirier Professionel de recherche au CARTEL Centre d'Applications et de Recherches en T?l?d?tection D?partement de g?omatique appliqu?e Universit? de Sherbrooke Sherbrooke (Qu?bec), CANADA J1K 2R1 Tel.: (+1 819) 821 8000 #61904 Fax.: (+1 819) 821 7944 Stephane.Poirier@USherbrooke.ca http://www.usherbrooke.ca/cartel From halext at gmail.com Tue May 12 17:03:31 2009 From: halext at gmail.com (Hugo Teixeira) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] help! In-Reply-To: References: Message-ID: hi, i'm trying to do one search streets with openlayers. i have made the search, but i'm been abling to do the go to street, zoom to the selected street by the search. can anyone help me ??? the project is here: http://84.91.20.142:82/webvias/index.php Best Regards, -- Hugo Teixeira -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090512/0bbb8422/attachment.html From tschaub at opengeo.org Tue May 12 17:15:44 2009 From: tschaub at opengeo.org (Tim Schaub) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How to override createGeometry In-Reply-To: <1242159192.4a09d8586f790@www.usherbrooke.ca> References: <1242159192.4a09d8586f790@www.usherbrooke.ca> Message-ID: <4A09E700.3070202@opengeo.org> Hey- St?phane Poirier wrote: > Hi All, > > In order to prevent creating rectangle that are too small, I would like to > override createGeometry (that is, in my code, the function > OpenLayers.Handler.RegularPolygon.prototype.createGeometry.apply(this, > arguments);) > Instead of overriding a non-API method, you could use the "sketchcomplete" event on your layer to stop the feature from being added if a specified condition is not met. e.g. rectangleLayer.events.on({ sketchcomplete: function(event) { var feature = event.feature; return (feature.geometry.getArea() > 10); // false to not add } }); If your "sketchcomplete" listener returns false, the feature will not be added to your layer. http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Vector-js.html#OpenLayers.Layer.Vector.EVENT_TYPES Tim > How can I do this? > > Here is my code: > > drawControls = > { > point: new OpenLayers.Control.DrawFeature(rectangleLayer, > OpenLayers.Handler.Point, {featureAdded: point_feature_added, > handlerOptions: {createFeature: function() { > this.control.layer.destroyFeatures(); > > OpenLayers.Handler.Point.prototype.createFeature.apply(this, arguments); > }}}), > rectangle: new OpenLayers.Control.DrawFeature(rectangleLayer, > OpenLayers.Handler.RegularPolygon, {featureAdded: > rectangle_feature_added, > handlerOptions: {sides: 4, irregular: true,'displayClass': > 'olControlDrawFeatureRectangle', > createGeometry: function() { > this.control.layer.destroyFeatures(); > > OpenLayers.Handler.RegularPolygon.prototype.createGeometry.apply(this, > arguments); > }}}) > } > > > Regards, > > > St?phane Poirier > Professionel de recherche au CARTEL > Centre d'Applications et de Recherches en T?l?d?tection > D?partement de g?omatique appliqu?e > Universit? de Sherbrooke > Sherbrooke (Qu?bec), CANADA J1K 2R1 > Tel.: (+1 819) 821 8000 #61904 > Fax.: (+1 819) 821 7944 > Stephane.Poirier@USherbrooke.ca > http://www.usherbrooke.ca/cartel > > St?phane Poirier > Professionel de recherche au CARTEL > Centre d'Applications et de Recherches en T?l?d?tection > D?partement de g?omatique appliqu?e > Universit? de Sherbrooke > Sherbrooke (Qu?bec), CANADA J1K 2R1 > Tel.: (+1 819) 821 8000 #61904 > Fax.: (+1 819) 821 7944 > Stephane.Poirier@USherbrooke.ca > http://www.usherbrooke.ca/cartel > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Tim Schaub OpenGeo - http://opengeo.org Expert service straight from the developers. From gregor at hostgis.com Tue May 12 17:22:29 2009 From: gregor at hostgis.com (Gregor at HostGIS) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] help! In-Reply-To: References: Message-ID: <4A09E895.8030408@hostgis.com> > i have made the search, but i'm been abling to do the go to street, zoom > to the selected street by the search. > can anyone help me ??? One approach which I use now and then: In the search results page, where I say "Found 1 result, blah blah" I also add some JavaScript to recenter the map as needed. There are a few approaches to that, probably the easiest being that the server side of your search also finds the bbox of the matching road, then supplies that in the HTML: var extent = new OpenLayers.Bounds(); map.zoomToExtent(extent); Is that enough to get you moving? -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ From xiaying4415139 at 163.com Tue May 12 20:33:26 2009 From: xiaying4415139 at 163.com (shane_china) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] help! In-Reply-To: References: Message-ID: <1242174806426-2877449.post@n2.nabble.com> First, my answer is no business about your question. I love your ext style. But ext + openlayers(1.5M or more), is it too big to internet? Hugo Teixeira wrote: > > hi, > > i'm trying to do one search streets with openlayers. > > i have made the search, but i'm been abling to do the go to street, zoom > to > the selected street by the search. > > can anyone help me ??? > > the project is here: http://84.91.20.142:82/webvias/index.php > > Best Regards, > > -- > Hugo Teixeira > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/help%21-tp2872401p2877449.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From shawn at niagarafalls.ca Tue May 12 20:49:51 2009 From: shawn at niagarafalls.ca (Shawn Oatley) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Google and WMS Layers - Projection help Message-ID: <4A09E0EF.D927.0016.0@niagarafalls.ca> Hello, Please bear with me as I am just getting into OpenLayers and I am a web programmer, not a GIS person. I am having difficulty getting different types of layers to work together. Our drawings are in UTM 17N and the WMS Server seems to work fine when using a projection of EPSG:4326. (Please forgive me if I am not speaking in the correct terms). I have been able to successfully get most of our drawing layers to work with OpenLayers, but have had tremendous problems with VE layers. I won't be surprised if it is a projection issue, but I don't know enough about GIS to know how to fix it. Here is a snip of my OpenLayers config: function init() { OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5; options = { projection: new OpenLayers.Projection("EPSG:4326"), displayProjection: new OpenLayers.Projection("EPSG:4326"), maxExtent: new OpenLayers.Bounds(-79.287519, 42.920835, -78.956522, 43.156), tileSize: new OpenLayers.Size(256, 256), maxResolution: 2 / 256, numZoomLevels: 15, controls: [new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.OverviewMap(), new OpenLayers.Control.KeyboardDefaults(), new OpenLayers.Control.Navigation(), new OpenLayers.Control.Permalink(), new OpenLayers.Control.ScaleBar()] }; map = new OpenLayers.Map('map', options); var bkgrd = new OpenLayers.Layer.WMS("Background", http://wmsServer, { layers: "BaseDrawing", format: "image/png", transparent: false }, { transitionEffect: "resize" } ); var nasa = new OpenLayers.Layer.WMS( "NASA Global Mosaic", "http://t1.hypercube.telascience.org/cgi-bin/landsat7", { layers: "landsat7" } ); var parcels = new OpenLayers.Layer.WMS("Parcels", "http://wmsServer", { layers: "ParcelsDrawing", format: "image/png", transparent: true }, { visibility: true, transitionEffect: "resize", minResolution: 0.00000095367431640625, maxResolution: 0.000244140625 } ); map.addLayers ([bkgrd,nasa,parcels]); if (!map.getCenter()) { map.zoomToMaxExtent(); } } There are a bunch of other layers that I add and controls, etc... but I didn't include them so that this won't be too long of a post. I have tried putting the projection as 900913 but all that does is make my coordinates go all screwy. Right now, the internal site works pretty good, the parcels layer respects the min/max res, but I can't get any imagery to work on it. Actually, the NASA imagery works fine, but I can't get any sort of Google/VE to work. I have tried including the sphericalMercator: true in the Google/VE layers, but that didn't seem to help. I have tried the examples on Openlayers' website for the VE examples but that didn't help either. Any suggestions or pointers in the right direction would be awesome. Thanks, Shawn -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090512/602d9bee/attachment.html From ben at ausvet.com.au Tue May 12 21:16:14 2009 From: ben at ausvet.com.au (Ben Madin) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How to turn MapServer Layer into WMS Layer In-Reply-To: <20090508202039.GO23674@metacarta.com> References: <20090508202039.GO23674@metacarta.com> Message-ID: <5AB44968-BBA2-464F-AC08-1A73E0DA1122@ausvet.com.au> G'day all, This is a very concise solution to turning a MapServer layer into a WMS layer - which took me ages to figure out last month - so I'm posting it back to the list in the hope it helps someone else one day. Thanks Christopher. cheers Ben On 09/05/2009, at 4:20 AM, Christopher Schmidt wrote: > 1. Stop using Layer.MapServer. You're honly hurting yourself here. > Instead, make your MapServer a WMS by adding: > > metadata > wms_srs "epsg:32119 epsg:4326" > end > > To your 'web' section of your mapfile, then change Layer.MapServer to > Layer.WMS. (No other changes are needed.) -- Ben Madin AusVet Animal Health Services Broome Western Australia t : +61 8 9192 5455 e : ben}{ausvet.com.au AusVet's website: http://www.ausvet.com.au From laconical at gmail.com Tue May 12 21:31:44 2009 From: laconical at gmail.com (Andrew Smith) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] KML NetworkLink and auto-refresh In-Reply-To: <1242149703726-2870627.post@n2.nabble.com> References: <300497a30903250221v55a12f77rca715078f1cde872@mail.gmail.com> <1242149703726-2870627.post@n2.nabble.com> Message-ID: <300497a30905121831r447d8e2aua4b0aca830929291@mail.gmail.com> Thanks Dan, I'll have to give this a try. I notice that your timer is going off every 10 minutes...how much data are you loading from the KML file? Is there much in the way of a noticeable flicker when you reload the layer (i.e. does all of the data completely disappear for a few seconds while the KML file is parsed and reloaded)? I'd be looking to reload a layer containing between 20-100 text objects every 5 seconds or so and I'm not sure what the performance will be like under those conditions. Cheers, Andrew On Wed, May 13, 2009 at 1:35 AM, ChiefDan wrote: > > Andrew, > Not sure if you found a solution, if not, this is what I've done. > > In the map init function, set a timer: > > window.setInterval(raingaugeRefreshData, 600000, rainGauges); > > Then in the timer service function: > function raingaugeRefreshData(layer) > { > layer.loaded = false; > layer.setVisibility(true); > } > By setting loaded to false then calling setVisibility(), openlayers goes > and > grabs the kml file again. > > Hope this helps. > > Dan > -- > View this message in context: > http://n2.nabble.com/KML-NetworkLink-and-auto-refresh-tp2531433p2870627.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/20090513/32f3e80b/attachment.html From hgnj_025 at 163.com Tue May 12 21:47:31 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. In-Reply-To: References: <1242032405929-2861920.post@n2.nabble.com> <1242119509537-2868140.post@n2.nabble.com> Message-ID: <1242179251694-2878521.post@n2.nabble.com> There is another thing I want to know. Which format is the Lon&Lat information stored in the mysql database? Is this a standard? Kris Geusebroek wrote: > > Hi, > > > Yes that's the whole point. > The lon, lan will be in your db, you configure your datastore and layer > in geoserver > In your openlayers based client you configure your layers as a vector > layer with bbox strategy and wfs protocol > Where the wfs protocol must be configured to connect to the right layer > and geoserver instance. > > Something like this: > > var wfsLayerOptions = { > url: GEOSERVER_WFS_URL,//something like > http://localhost:8080/geoserver/wfs > geometryName: "GEOMETRY", > featureNS: FEATURENAMESPACE,//something like > http://www.blah.org/topp > version: "1.0.0" > }; > > var layerOptions = { > filter: filter, > projection: RDPROJECTION > }; > > wfsLayer = new OpenLayers.Layer.Vector("wfsLayerName", > OpenLayers.Util.extend({ > styleMap: styles[0], > strategies: [ > new OpenLayers.Strategy.BBOX(), > new OpenLayers.Strategy.Cluster({ > threshold: 2, > distance: 30 > }) > ], > protocol: new OpenLayers.Protocol.WFS( > OpenLayers.Util.extend({ > featureType: > 'LAYER_NAME_IN_GEOSERVER' > }, wfsLayerOptions) > ) > }, layerOptions) > ); > > Cheers Kris > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-marker.-tp2861920p2878521.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roald.dewit at lisasoft.com Tue May 12 21:54:56 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] One layer with two wms servers In-Reply-To: <4A0935C1.7080506@neogeo-online.net> References: <784FAC631C0CB14CAE68764151D5DA41081D647C@CORRIOL.icc.local> <4A0935C1.7080506@neogeo-online.net> Message-ID: <4A0A2870.2060707@lisasoft.com> Hi, In addition to what Guillaume wrote: MapServer can do this and as far as I know, GeoServer can't. Not sure what other WMS servers are capable of acting as a WMS client. Regards, Roald Guillaume Sueur wrote: > Hi Antoni, > > That sounds more like a server-side specific solution. You need to set > up a WMS Server which will be a WMS client for both your datasources. > > Regards, > > Guillaume > > Vidal, Antoni a ?crit : > >> Hi, >> >> >> >> I would like to have a layer.WMS witch displays data from two servers. >> Is this possble ? >> >> >> >> Thank?s in advance. >> >> >> >> *Antoni Vidal* >> >> Unitat d'Aplicacions SIG-WEB >> Institut Cartogr?fic de Catalunya >> >> Parc de Montju?c, E-08038 Barcelona >> Tel. (+34) 93 567 15 00 (ext. 3228) >> www.icc.cat >> >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. From florent.gravin at bluecham.net Wed May 13 01:42:57 2009 From: florent.gravin at bluecham.net (Florent Gravin) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] WMS with Argis Server Tiled/Pyramid layer Message-ID: <002b01c9d38d$abd91570$ddac1fac@bluecham.net> Hello, i have an arcgis server which export WMS services.. i can connect to them with simple new Openlayers.WMS().. (i don't want to use rest api for now cos i mixe my map with geoserver wms also) but one of the arcgis server service export a map (tiled and pyramid) with different resolutions depending on the zoom level... and, the service works, but it always displays the lowest resolution image, even when i'm zooming in. i would like that when i zoom in, the new image with the right resolution appears, as should work pyramids thks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090513/687dcdd4/attachment.html From kgeusebroek at xebia.com Wed May 13 02:09:58 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. In-Reply-To: <1242179251694-2878521.post@n2.nabble.com> References: <1242032405929-2861920.post@n2.nabble.com><1242119509537-2868140.post@n2.nabble.com> <1242179251694-2878521.post@n2.nabble.com> Message-ID: In my case it is stored in WGS84 in separate columns. To help geoserver a bit I created an extra column with a SDO_GEOMETRY (using Oracle Spatial db) with EPSG:4326 projection and an extra column with Dutch RD projection (filled with a trigger) because the rest of the map is in Dutch RD projection and this way no reprojection needs to take place. Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of sasi Sent: Wednesday, May 13, 2009 3:48 AM To: users@openlayers.org Subject: Re: [OpenLayers-Users] How can I display a map with a position changing marker. There is another thing I want to know. Which format is the Lon&Lat information stored in the mysql database? Is this a standard? Kris Geusebroek wrote: > > Hi, > > > Yes that's the whole point. > The lon, lan will be in your db, you configure your datastore and layer > in geoserver > In your openlayers based client you configure your layers as a vector > layer with bbox strategy and wfs protocol > Where the wfs protocol must be configured to connect to the right layer > and geoserver instance. > > Something like this: > > var wfsLayerOptions = { > url: GEOSERVER_WFS_URL,//something like > http://localhost:8080/geoserver/wfs > geometryName: "GEOMETRY", > featureNS: FEATURENAMESPACE,//something like > http://www.blah.org/topp > version: "1.0.0" > }; > > var layerOptions = { > filter: filter, > projection: RDPROJECTION > }; > > wfsLayer = new OpenLayers.Layer.Vector("wfsLayerName", > OpenLayers.Util.extend({ > styleMap: styles[0], > strategies: [ > new OpenLayers.Strategy.BBOX(), > new OpenLayers.Strategy.Cluster({ > threshold: 2, > distance: 30 > }) > ], > protocol: new OpenLayers.Protocol.WFS( > OpenLayers.Util.extend({ > featureType: > 'LAYER_NAME_IN_GEOSERVER' > }, wfsLayerOptions) > ) > }, layerOptions) > ); > > Cheers Kris > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-ma rker.-tp2861920p2878521.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 tonidelacalle at gmail.com Wed May 13 02:48:00 2009 From: tonidelacalle at gmail.com (=?ISO-8859-1?Q?toni_hern=E1ndez?=) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] help! In-Reply-To: <1242174806426-2877449.post@n2.nabble.com> References: <1242174806426-2877449.post@n2.nabble.com> Message-ID: <6c28194c0905122348g258b8468n3e66f40df109ce44@mail.gmail.com> hi, Maybe this is already solved but.. assuming the layer is called streetslayer and that you have the street selected (and only one street) hope this works. var bound = streetslayer.features[0].geometry.getBounds(); map.zoomToExtent(bound,false); On Wed, May 13, 2009 at 2:33 AM, shane_china wrote: > > First, my answer is no business about your question. > I love your ext style. But ext + openlayers(1.5M or more), is it too big to > internet? > > > Hugo Teixeira wrote: > > > > hi, > > > > i'm trying to do one search streets with openlayers. > > > > i have made the search, but i'm been abling to do the go to street, zoom > > to > > the selected street by the search. > > > > can anyone help me ??? > > > > the project is here: http://84.91.20.142:82/webvias/index.php > > > > Best Regards, > > > > -- > > Hugo Teixeira > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > > -- > View this message in context: > http://n2.nabble.com/help%21-tp2872401p2877449.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/20090513/c700858b/attachment.html From alessio.dilorenzo at gmail.com Wed May 13 03:56:04 2009 From: alessio.dilorenzo at gmail.com (Alessio Di Lorenzo) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Loading Panel issue with IE Message-ID: <1242201364705-2879617.post@n2.nabble.com> Hi all, I have a problem with the loading panel in my webmapping application when using microsoft IE. I have Google maps layers for base and some WMS overlays via tilecache. The loading panel works very well in Firefox but in IE it does not disappear even if all my layers are loaded... I use OpenLayers-2.7 What can I do to fix this problem? Thanks in advance, alessio -- View this message in context: http://n2.nabble.com/Loading-Panel-issue-with-IE-tp2879617p2879617.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eider at fh-bingen.de Wed May 13 04:10:25 2009 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Mixing Projections and using Google/WMS/WFS Message-ID: <4A0A8071.9050706@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/20090513/bd83600d/eider.vcf From hgnj_025 at 163.com Wed May 13 04:33:22 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] problem about display two layers Message-ID: <1242203602102-2879776.post@n2.nabble.com> When i display two layers with openlayers, I can only see the second layer. After i set the second layer opacity=0.5, I can see the both layers. But the line in the second layer seems to be transparent too. And the first layers seems not be very visibility. So, can i change only the background to transparent, and keep the line to be opacity? The map comes from geoserver. Thanks! -- View this message in context: http://n2.nabble.com/problem-about-display-two-layers-tp2879776p2879776.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From talentp1982 at yahoo.com.cn Wed May 13 05:48:03 2009 From: talentp1982 at yahoo.com.cn (willson) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Virtual Earth Issue Message-ID: <1242208083715-2880849.post@n2.nabble.com> I try to use the "spherical-mercator" example in openlayers/example to display mycity. I just change the map options "maxResolution" and "maxExtent". The question is : the map doesn't display mycity but whole china, when I zoom in, the map center goes to africa, and the map can't pan. All seems strange. Here is the code, any help would be appreciate!

OpenLayers Spherical Mercator Example

-- View this message in context: http://n2.nabble.com/Virtual-Earth-Issue-tp2880849p2880849.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From peter at peterse-uithuizen.com Wed May 13 06:57:30 2009 From: peter at peterse-uithuizen.com (Peter Peterse) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] KML NetworkLink and auto-refresh In-Reply-To: <300497a30905121831r447d8e2aua4b0aca830929291@mail.gmail.com> References: <300497a30903250221v55a12f77rca715078f1cde872@mail.gmail.com> <1242149703726-2870627.post@n2.nabble.com> <300497a30905121831r447d8e2aua4b0aca830929291@mail.gmail.com> Message-ID: Hello, I've also tried this. In my case the old KML stays on the layer. So parts which are deleted stays on the map. Parts with a transparancy becomes darker and darker after every request. Can somebody help use? Peter. > Thanks Dan, I'll have to give this a try. > > I notice that your timer is going off every 10 minutes...how much data are > you loading from the KML file? Is there much in the way of a noticeable > flicker when you reload the layer (i.e. does all of the data completely > disappear for a few seconds while the KML file is parsed and reloaded)? > > I'd be looking to reload a layer containing between 20-100 text objects > every 5 seconds or so and I'm not sure what the performance will be like > under those conditions. > > Cheers, > > Andrew > > On Wed, May 13, 2009 at 1:35 AM, ChiefDan wrote: > >> >> Andrew, >> Not sure if you found a solution, if not, this is what I've done. >> >> In the map init function, set a timer: >> >> window.setInterval(raingaugeRefreshData, 600000, rainGauges); >> >> Then in the timer service function: >> function raingaugeRefreshData(layer) >> { >> layer.loaded = false; >> layer.setVisibility(true); >> } >> By setting loaded to false then calling setVisibility(), openlayers goes >> and >> grabs the kml file again. >> >> Hope this helps. >> >> Dan >> -- >> View this message in context: >> http://n2.nabble.com/KML-NetworkLink-and-auto-refresh-tp2531433p2870627.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From j.cook at oxfordarch.co.uk Wed May 13 07:11:32 2009 From: j.cook at oxfordarch.co.uk (Joanne Cook) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] openlayers single file librarry problem In-Reply-To: <1630588810.2776031242212865793.JavaMail.root@mail.thehumanjourney.net> Message-ID: <1709845177.2776601242213092726.JavaMail.root@mail.thehumanjourney.net> Hi All, I'm not totally sure if this is an openlayers issue or related to mapfish, but I am having problems building a single file version of the openlayers libraries. I start in /var/www/mapfish/client/mfbase/openlayers/build. The (mapfish) documentation suggests that I should be able to state the location of the file I am trying to create, so I run: sudo ./build.py full.cfg /var/www/scripts/openlayers_sfl.js This works to the extent that it creates the file, and most elements work OK in the web page. However, it can't find the image folder or the theme folder, so I don't have the navigation elements, and firebug shows me that it's looking for them in the root folder /var/www, so /var/www/theme and /var/www/img. The same happens if I change the build path to /var/www/mapfish/client/mfbase/openlayers/lib/openlayers_sfl.js. Clearly I can copy the img and theme folders into my root folder, but is there something I'm missing about building the library? Thanks Jo -- ----------------------------------------------------- Joanne Cook Senior IT Support and Development Oxford Archaeology (North) 01524 880212 http://thehumanjourney.net ------ Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. From crschmidt at metacarta.com Wed May 13 07:25:14 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Mixing Projections and using Google/WMS/WFS In-Reply-To: <4A0A8071.9050706@fh-bingen.de> References: <4A0A8071.9050706@fh-bingen.de> Message-ID: <20090513112514.GO27059@metacarta.com> On Wed, May 13, 2009 at 10:10:25AM +0200, Dipl. Inf. Carsten Eider wrote: > Hi list, > searching this list i have found several hints but no real solution to > my projection problem. > Even walking through the examples or docs did not enlighten me! > I uses OL2.7 and OL 2.8RC2 > > My problem is: > > * I have a map with wms and wfs/gml-layers using epsg:31467 working > fine. > * Now i want to use Google as my baselayer, assuming epsg:4326 as > the projection You can't do that. If you want WFS/GML layers, you have to use EPSG:900913. > Question: > How do i setup > > * my map using epsg.4326 as the main projection > * any wms-layer to uses epsg.31467 as srs in the request and being > automatically transformed It wouldn't use that SRS in the request. It would use EPSG:4326 in the request. Most WMS servers will reproject automatically. > * any wfs-layer tu use epsg:31467 for requesting the date and being > automatically transformed 'projection 31467' (pseudo-)option on the layer > I managed to setup a map > (https://tomcat1.agroconnect.fh-bingen.de/geoEditor3/googletest.html) > > * using epsg:4236 for map and wms > * using epsg:31467 for wfs and repojection, but there was a visible > offset depending on the level of zoom Yes, this is probably http://faq.openlayers.org/vector-related-questions/why-dont-my-vector-features-work-over-google-yahoo-virtual-earth-etc/ . > Any hints or working examples are appreciated. > > 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 > > begin:vcard > fn:Carsten Eider > n:Eider;Carsten > org:Fachhochschule Bingen;Kompetenzzentrum innovative Informationssysteme > adr;quoted-printable:;;berlinstra=C3=9Fe 109;Bingen;RLP;55411;Deutschland > email;internet:eider@fh-bingen.de > title:Dipl.-Inf. > tel;work:067214090179 > x-mozilla-html:TRUE > url:iis.fh-bingen.de > version:2.1 > end:vcard > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed May 13 07:25:39 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] problem about display two layers In-Reply-To: <1242203602102-2879776.post@n2.nabble.com> References: <1242203602102-2879776.post@n2.nabble.com> Message-ID: <20090513112539.GP27059@metacarta.com> On Wed, May 13, 2009 at 01:33:22AM -0700, sasi wrote: > > When i display two layers with openlayers, I can only see the second layer. > After i set the second layer opacity=0.5, I can see the both layers. But the > line > in the second layer seems to be transparent too. And the first layers seems > not be very visibility. > So, can i change only the background to transparent, and keep the line to be > opacity? transparent: true parameter in the WMS params. > The map comes from geoserver. > Thanks! > -- > View this message in context: http://n2.nabble.com/problem-about-display-two-layers-tp2879776p2879776.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed May 13 07:26:32 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Virtual Earth Issue In-Reply-To: <1242208083715-2880849.post@n2.nabble.com> References: <1242208083715-2880849.post@n2.nabble.com> Message-ID: <20090513112631.GQ27059@metacarta.com> On Wed, May 13, 2009 at 02:48:03AM -0700, willson wrote: > > I try to use the "spherical-mercator" example in openlayers/example to > display mycity. I just change the map options "maxResolution" and > "maxExtent". You can't do this -- at least not easily -- with spherical mercator layers. I recommend using 'restrictedExtent' for the latter, and I don't think there's a way to do the former. -- Chris > The question is : the map doesn't display mycity but whole > china, when I zoom in, the map center goes to africa, and the map can't pan. > All seems strange. > Here is the code, any help would be appreciate! > > > > /> > > > > > > > > > >

OpenLayers Spherical Mercator Example

> >
>
> >
> >
>
> > > > > > > -- > View this message in context: http://n2.nabble.com/Virtual-Earth-Issue-tp2880849p2880849.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed May 13 07:28:28 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] openlayers single file librarry problem In-Reply-To: <1709845177.2776601242213092726.JavaMail.root@mail.thehumanjourney.net> References: <1630588810.2776031242212865793.JavaMail.root@mail.thehumanjourney.net> <1709845177.2776601242213092726.JavaMail.root@mail.thehumanjourney.net> Message-ID: <20090513112828.GR27059@metacarta.com> On Wed, May 13, 2009 at 11:11:32AM +0000, Joanne Cook wrote: > Hi All, > > I'm not totally sure if this is an openlayers issue or related to mapfish, but I am having problems building a single file version of the openlayers libraries. > > I start in /var/www/mapfish/client/mfbase/openlayers/build. The (mapfish) documentation suggests that I should be able to state the location of the file I am trying to create, so I run: > sudo ./build.py full.cfg /var/www/scripts/openlayers_sfl.js > > This works to the extent that it creates the file, and most elements work OK in the web page. However, it can't find the image folder or the theme folder, so I don't have the navigation elements, and firebug shows me that it's looking for them in the root folder /var/www, so /var/www/theme and /var/www/img. The same happens if I change the build path to /var/www/mapfish/client/mfbase/openlayers/lib/openlayers_sfl.js. > > Clearly I can copy the img and theme folders into my root folder, but is there something I'm missing about building the library? OpenLayers can only automatically find images and theme if the OpenLayers file is *named* OpenLayers.js. The theme can be included manually (via a to theme/default/style.css), and the image path can be specified by setting OpenLayers.ImgPath. -- Chris > > > ------ > Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed May 13 07:33:57 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] KML NetworkLink and auto-refresh In-Reply-To: References: <300497a30903250221v55a12f77rca715078f1cde872@mail.gmail.com> <1242149703726-2870627.post@n2.nabble.com> <300497a30905121831r447d8e2aua4b0aca830929291@mail.gmail.com> Message-ID: <20090513113357.GS27059@metacarta.com> On Wed, May 13, 2009 at 12:57:30PM +0200, Peter Peterse wrote: > Hello, > > I've also tried this. In my case the old KML stays on the layer. So parts > which are deleted stays on the map. Parts with a transparancy becomes > darker and darker after every request. > > Can somebody help use? There is no way to delay the removal of features until the new data is loaded in the GML layer. If you don't mind a 'blink' while new data is loaded, you can simply use: layer.setUrl('foo.kml'); You may want to icnlude a 'random' parameter: layer.setUrl('foo.kml?_salt='+Math.random()) To break through caches. If you want to delay the removal of features until more are loaded, you should probably use an HTTP Protocol and a fixed strategy with a refresh() call. This will delay removing of features until more features are loaded (in my experience, at least), which seems like what you want. The documentation on this aspect of the project is currently somewhat limited. -- Chris > Peter. > > > > Thanks Dan, I'll have to give this a try. > > > > I notice that your timer is going off every 10 minutes...how much data are > > you loading from the KML file? Is there much in the way of a noticeable > > flicker when you reload the layer (i.e. does all of the data completely > > disappear for a few seconds while the KML file is parsed and reloaded)? > > > > I'd be looking to reload a layer containing between 20-100 text objects > > every 5 seconds or so and I'm not sure what the performance will be like > > under those conditions. > > > > Cheers, > > > > Andrew > > > > On Wed, May 13, 2009 at 1:35 AM, ChiefDan wrote: > > > >> > >> Andrew, > >> Not sure if you found a solution, if not, this is what I've done. > >> > >> In the map init function, set a timer: > >> > >> window.setInterval(raingaugeRefreshData, 600000, rainGauges); > >> > >> Then in the timer service function: > >> function raingaugeRefreshData(layer) > >> { > >> layer.loaded = false; > >> layer.setVisibility(true); > >> } > >> By setting loaded to false then calling setVisibility(), openlayers goes > >> and > >> grabs the kml file again. > >> > >> Hope this helps. > >> > >> Dan > >> -- > >> View this message in context: > >> http://n2.nabble.com/KML-NetworkLink-and-auto-refresh-tp2531433p2870627.html > >> Sent from the OpenLayers Users mailing list archive at Nabble.com. > >> > >> _______________________________________________ > >> Users mailing list > >> Users@openlayers.org > >> http://openlayers.org/mailman/listinfo/users > >> > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From j.cook at oxfordarch.co.uk Wed May 13 08:37:43 2009 From: j.cook at oxfordarch.co.uk (Joanne Cook) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] openlayers single file librarry problem In-Reply-To: <20090513112828.GR27059@metacarta.com> Message-ID: <1860632211.2784601242218263015.JavaMail.root@mail.thehumanjourney.net> Hi Chris, Thanks for that- adding the stylesheet link and the OpenLayers.ImgPath worked a treat (rather than risking over-writing the original OpenLayers.js file). Jo ----- Original Message ----- From: "Christopher Schmidt" To: "Joanne Cook" Cc: "users" Sent: Wednesday, 13 May, 2009 12:28:28 GMT +00:00 GMT Britain, Ireland, Portugal Subject: Re: [OpenLayers-Users] openlayers single file librarry problem On Wed, May 13, 2009 at 11:11:32AM +0000, Joanne Cook wrote: > Hi All, > > I'm not totally sure if this is an openlayers issue or related to mapfish, but I am having problems building a single file version of the openlayers libraries. > > I start in /var/www/mapfish/client/mfbase/openlayers/build. The (mapfish) documentation suggests that I should be able to state the location of the file I am trying to create, so I run: > sudo ./build.py full.cfg /var/www/scripts/openlayers_sfl.js > > This works to the extent that it creates the file, and most elements work OK in the web page. However, it can't find the image folder or the theme folder, so I don't have the navigation elements, and firebug shows me that it's looking for them in the root folder /var/www, so /var/www/theme and /var/www/img. The same happens if I change the build path to /var/www/mapfish/client/mfbase/openlayers/lib/openlayers_sfl.js. > > Clearly I can copy the img and theme folders into my root folder, but is there something I'm missing about building the library? OpenLayers can only automatically find images and theme if the OpenLayers file is *named* OpenLayers.js. The theme can be included manually (via a to theme/default/style.css), and the image path can be specified by setting OpenLayers.ImgPath. -- Chris > > > ------ > Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta -- ----------------------------------------------------- Joanne Cook Senior IT Support and Development Oxford Archaeology (North) 01524 880212 http://thehumanjourney.net ------ Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. From crschmidt at metacarta.com Wed May 13 08:51:05 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] openlayers single file librarry problem In-Reply-To: <1860632211.2784601242218263015.JavaMail.root@mail.thehumanjourney.net> References: <20090513112828.GR27059@metacarta.com> <1860632211.2784601242218263015.JavaMail.root@mail.thehumanjourney.net> Message-ID: <20090513125105.GT27059@metacarta.com> On Wed, May 13, 2009 at 12:37:43PM +0000, Joanne Cook wrote: > Hi Chris, > > Thanks for that- adding the stylesheet link and the OpenLayers.ImgPath worked a treat (rather than risking over-writing the original OpenLayers.js file). The intention is that a single file build should never live in the same place as the OpenLayers.js non-single file build that is inclued in trunk. Generally: /openlayers/ /openlayers/lib/OpenLayers.js <- non-singlefile /openlayers/OpenLayers.js <- single file The file -- if any -- in /build/ is irrelevant, and the file that 'ships' in /openlayers/OpenLayers.js can be rebuilt with a full build at any time. -- Chris > Jo > ----- Original Message ----- > From: "Christopher Schmidt" > To: "Joanne Cook" > Cc: "users" > Sent: Wednesday, 13 May, 2009 12:28:28 GMT +00:00 GMT Britain, Ireland, Portugal > Subject: Re: [OpenLayers-Users] openlayers single file librarry problem > > On Wed, May 13, 2009 at 11:11:32AM +0000, Joanne Cook wrote: > > Hi All, > > > > I'm not totally sure if this is an openlayers issue or related to mapfish, but I am having problems building a single file version of the openlayers libraries. > > > > I start in /var/www/mapfish/client/mfbase/openlayers/build. The (mapfish) documentation suggests that I should be able to state the location of the file I am trying to create, so I run: > > sudo ./build.py full.cfg /var/www/scripts/openlayers_sfl.js > > > > This works to the extent that it creates the file, and most elements work OK in the web page. However, it can't find the image folder or the theme folder, so I don't have the navigation elements, and firebug shows me that it's looking for them in the root folder /var/www, so /var/www/theme and /var/www/img. The same happens if I change the build path to /var/www/mapfish/client/mfbase/openlayers/lib/openlayers_sfl.js. > > > > Clearly I can copy the img and theme folders into my root folder, but is there something I'm missing about building the library? > > OpenLayers can only automatically find images and theme if the > OpenLayers file is *named* OpenLayers.js. The theme can be included > manually (via a to theme/default/style.css), and > the image path can be specified by setting OpenLayers.ImgPath. > > -- Chris > > > > > > > ------ > > Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > > > -- > ----------------------------------------------------- > Joanne Cook > Senior IT Support and Development > Oxford Archaeology (North) > 01524 880212 > http://thehumanjourney.net > > > ------ > Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. > -- Christopher Schmidt MetaCarta From j.cook at oxfordarch.co.uk Wed May 13 08:55:28 2009 From: j.cook at oxfordarch.co.uk (Joanne Cook) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] openlayers single file librarry problem In-Reply-To: <20090513125105.GT27059@metacarta.com> Message-ID: <25989302.2786421242219328373.JavaMail.root@mail.thehumanjourney.net> Hi Chris, If only I didn't make school-girl errors and occasionally over-write critical files :-) I like the idea of having separate ones for each map page too, so I can reduce the amount of included libraries to what is required in each case. Cheers Jo ----- Original Message ----- From: "Christopher Schmidt" To: "Joanne Cook" Cc: "users" Sent: Wednesday, 13 May, 2009 13:51:05 GMT +00:00 GMT Britain, Ireland, Portugal Subject: Re: [OpenLayers-Users] openlayers single file librarry problem On Wed, May 13, 2009 at 12:37:43PM +0000, Joanne Cook wrote: > Hi Chris, > > Thanks for that- adding the stylesheet link and the OpenLayers.ImgPath worked a treat (rather than risking over-writing the original OpenLayers.js file). The intention is that a single file build should never live in the same place as the OpenLayers.js non-single file build that is inclued in trunk. Generally: /openlayers/ /openlayers/lib/OpenLayers.js <- non-singlefile /openlayers/OpenLayers.js <- single file The file -- if any -- in /build/ is irrelevant, and the file that 'ships' in /openlayers/OpenLayers.js can be rebuilt with a full build at any time. -- Chris > Jo > ----- Original Message ----- > From: "Christopher Schmidt" > To: "Joanne Cook" > Cc: "users" > Sent: Wednesday, 13 May, 2009 12:28:28 GMT +00:00 GMT Britain, Ireland, Portugal > Subject: Re: [OpenLayers-Users] openlayers single file librarry problem > > On Wed, May 13, 2009 at 11:11:32AM +0000, Joanne Cook wrote: > > Hi All, > > > > I'm not totally sure if this is an openlayers issue or related to mapfish, but I am having problems building a single file version of the openlayers libraries. > > > > I start in /var/www/mapfish/client/mfbase/openlayers/build. The (mapfish) documentation suggests that I should be able to state the location of the file I am trying to create, so I run: > > sudo ./build.py full.cfg /var/www/scripts/openlayers_sfl.js > > > > This works to the extent that it creates the file, and most elements work OK in the web page. However, it can't find the image folder or the theme folder, so I don't have the navigation elements, and firebug shows me that it's looking for them in the root folder /var/www, so /var/www/theme and /var/www/img. The same happens if I change the build path to /var/www/mapfish/client/mfbase/openlayers/lib/openlayers_sfl.js. > > > > Clearly I can copy the img and theme folders into my root folder, but is there something I'm missing about building the library? > > OpenLayers can only automatically find images and theme if the > OpenLayers file is *named* OpenLayers.js. The theme can be included > manually (via a to theme/default/style.css), and > the image path can be specified by setting OpenLayers.ImgPath. > > -- Chris > > > > > > > ------ > > Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. > > > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > > > -- > ----------------------------------------------------- > Joanne Cook > Senior IT Support and Development > Oxford Archaeology (North) > 01524 880212 > http://thehumanjourney.net > > > ------ > Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. > -- Christopher Schmidt MetaCarta -- ----------------------------------------------------- Joanne Cook Senior IT Support and Development Oxford Archaeology (North) 01524 880212 http://thehumanjourney.net ------ Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information. From eider at fh-bingen.de Wed May 13 09:02:09 2009 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Mixing Projections and using Google/WMS/WFS In-Reply-To: <20090513112514.GO27059@metacarta.com> References: <4A0A8071.9050706@fh-bingen.de> <20090513112514.GO27059@metacarta.com> Message-ID: <4A0AC4D1.3050404@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/20090513/a41ff06c/eider.vcf From cabraham at openplans.org Wed May 13 10:56:16 2009 From: cabraham at openplans.org (Chris Abraham) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] swapping in custom panzoom images Message-ID: <7855CD13-8659-4D01-A820-B49197AF4BC6@openplans.org> Hi, I know I can swap in custom images for the panzoom control by replacing the image files in /img directory. Is there a way to do this without having to host my own copy of openlayers? That is, can I use custom images while still linking to http://openlayers.org/api/ 2.8-rc2/OpenLayers.js ? Thanks, Chris From eider at fh-bingen.de Wed May 13 10:56:26 2009 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] EPSG:4326 overlay EPSG:900913 as WMS Message-ID: <4A0ADF9A.2050209@fh-bingen.de> Hi list, as far as i understood by reading lots of mailings within this list and spending time on walking through different openlayer pages there seems to be no solution for using a wms in epsg:4326 on top of a google EPSG:900913. I tried lots of ways to tell my wms-layer to be requesting in EPSG:4326, but none worked. my problem ist, that the layers i want to use come from governmental servers not offering EPSG:900913 but EPSG:4326 or EPSG:31647. Can anyone comfirm this situation or show me a solution? Are there any Reprojection-Services available? Using EPSG:900913 overlayed with WFS in EPSG:31467 works great! Tia 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/20090513/490b87fa/eider.vcf From crschmidt at metacarta.com Wed May 13 11:02:14 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] EPSG:4326 overlay EPSG:900913 as WMS In-Reply-To: <4A0ADF9A.2050209@fh-bingen.de> References: <4A0ADF9A.2050209@fh-bingen.de> Message-ID: <20090513150214.GU27059@metacarta.com> On Wed, May 13, 2009 at 04:56:26PM +0200, Dipl. Inf. Carsten Eider wrote: > Hi list, > > as far as i understood by reading lots of mailings within this list and > spending time on walking through different openlayer pages > there seems to be no solution for using a > wms in epsg:4326 on top of a google EPSG:900913. Correct. All raster layers in OpenLayers must be in the same projection. Browsers can not reproject images. Therefore, if you wish to use a raster layer, it must support the projection fo the base layer -- in the case of google, that's spherical mercator. > I tried lots of ways to tell my wms-layer to be requesting in EPSG:4326, > but none worked. > my problem ist, that the layers i want to use come from governmental > servers not offering EPSG:900913 > but EPSG:4326 or EPSG:31647. Then you can't use them on top of Google Maps without making yourself a reprojecting service. You can use MapServer as a WMS server to 'cascade' -- load and reproject, in this case -- from the remote server. This would mean you would talk to your own MapServer, which would then talk to the government provided WMS. > Can anyone comfirm this situation or show me a solution? Yes, I can confirm that you are correct. > Are there any Reprojection-Services available? MapServer can act as a reprojection service. Regards, -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed May 13 11:03:03 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] swapping in custom panzoom images In-Reply-To: <7855CD13-8659-4D01-A820-B49197AF4BC6@openplans.org> References: <7855CD13-8659-4D01-A820-B49197AF4BC6@openplans.org> Message-ID: <20090513150303.GV27059@metacarta.com> On Wed, May 13, 2009 at 10:56:16AM -0400, Chris Abraham wrote: > Hi, > I know I can swap in custom images for the panzoom control by > replacing the image files in /img directory. Is there a way to do > this without having to host my own copy of openlayers? That is, can > I use custom images while still linking to http://openlayers.org/api/ > 2.8-rc2/OpenLayers.js ? The CSS can be included in the page, and specify 'theme: null' to your map options. The Image locations can be controlled via OpenLayers.ImgPath. Regards, -- Christopher Schmidt MetaCarta From Stephane.Poirier at USherbrooke.CA Wed May 13 11:13:38 2009 From: Stephane.Poirier at USherbrooke.CA (=?iso-8859-1?b?U3TpcGhhbmU=?= Poirier) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How to use layer.events.register() and layer.events.on()? Message-ID: <1242227618.4a0ae3a2dc8c0@www.usherbrooke.ca> Hi All (and Tim), Catching events using predefined function hook works fine for me (case 2 and 3), but I do not have any success catching events using layer.events.register (case 4) nor layer.events.on (case 5). What do I do wrong? Should layer.events.register and/or layer.events.on be used before the layer is created? And what is the difference between these two? //1) create layer rectangleLayer=new OpenLayers.Layer.Vector("Selection"); //2) works fine rectangleLayer.preFeatureInsert=function(feature) { feature_tobeinserted(); } //3) works fine rectangleLayer.onFeatureInsert=function(feature) { feature_inserted(); } //4) does not seem to catch event rectangleLayer.events.register("sketchcomplete",rectangleLayer, function(event){ var feature = event.feature; return (feature.geometry.getArea() > 10); // false to not add }); //5) does not seem to catch event rectangleLayer.events.on({ sketchcomplete: function(event) { var feature = event.feature; return (feature.geometry.getArea() > 10); // false to not add }}); Regards, St?phane Poirier Professionel de recherche au CARTEL Centre d'Applications et de Recherches en T?l?d?tection D?partement de g?omatique appliqu?e Universit? de Sherbrooke Sherbrooke (Qu?bec), CANADA J1K 2R1 Tel.: (+1 819) 821 8000 #61904 Fax.: (+1 819) 821 7944 Stephane.Poirier@USherbrooke.ca http://www.usherbrooke.ca/cartel From crschmidt at metacarta.com Wed May 13 11:28:57 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How to use layer.events.register() and layer.events.on()? In-Reply-To: <1242227618.4a0ae3a2dc8c0@www.usherbrooke.ca> References: <1242227618.4a0ae3a2dc8c0@www.usherbrooke.ca> Message-ID: <20090513152857.GW27059@metacarta.com> On Wed, May 13, 2009 at 11:13:38AM -0400, St?phane Poirier wrote: > Hi All (and Tim), > > Catching events using predefined function hook works fine for me (case 2 and 3), > but I do not have any success catching events using layer.events.register (case > 4) nor layer.events.on (case 5). What do I do wrong? Should > layer.events.register and/or layer.events.on be used before the layer is > created? And what is the difference between these two? > > //1) create layer > rectangleLayer=new OpenLayers.Layer.Vector("Selection"); > > //2) works fine > rectangleLayer.preFeatureInsert=function(feature) > { > feature_tobeinserted(); > } > > //3) works fine > rectangleLayer.onFeatureInsert=function(feature) > { > feature_inserted(); > } > > //4) does not seem to catch event > rectangleLayer.events.register("sketchcomplete",rectangleLayer, > function(event){ var feature = event.feature; > return (feature.geometry.getArea() > 10); // false to not add > }); The order of arguments in this one is wrong: it should be ("sketchcomplete", function(){}). (The rectangleLayer is totally unneccesary in the given function.) > //5) does not seem to catch event > rectangleLayer.events.on({ > sketchcomplete: function(event) { > var feature = event.feature; > return (feature.geometry.getArea() > 10); // false to not add > }}); > > Regards, > > > St?phane Poirier > Professionel de recherche au CARTEL > Centre d'Applications et de Recherches en T?l?d?tection > D?partement de g?omatique appliqu?e > Universit? de Sherbrooke > Sherbrooke (Qu?bec), CANADA J1K 2R1 > Tel.: (+1 819) 821 8000 #61904 > Fax.: (+1 819) 821 7944 > Stephane.Poirier@USherbrooke.ca > http://www.usherbrooke.ca/cartel > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From eider at fh-bingen.de Wed May 13 11:29:26 2009 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] EPSG:4326 overlay EPSG:900913 as WMS In-Reply-To: <20090513150214.GU27059@metacarta.com> References: <4A0ADF9A.2050209@fh-bingen.de> <20090513150214.GU27059@metacarta.com> Message-ID: <4A0AE756.1080803@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/20090513/6d2f7bbd/eider.vcf From crschmidt at metacarta.com Wed May 13 11:59:58 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] EPSG:4326 overlay EPSG:900913 as WMS In-Reply-To: <4A0AE756.1080803@fh-bingen.de> References: <4A0ADF9A.2050209@fh-bingen.de> <20090513150214.GU27059@metacarta.com> <4A0AE756.1080803@fh-bingen.de> Message-ID: <20090513155958.GX27059@metacarta.com> On Wed, May 13, 2009 at 05:29:26PM +0200, Dipl. Inf. Carsten Eider wrote: > Hi Christopher, > > thank you for your useful answers, but...... > > Christopher Schmidt schrieb: > > On Wed, May 13, 2009 at 04:56:26PM +0200, Dipl. Inf. Carsten Eider wrote: > > > >> Hi list, > >> > >> as far as i understood by reading lots of mailings within this list and > >> spending time on walking through different openlayer pages > >> there seems to be no solution for using a > >> wms in epsg:4326 on top of a google EPSG:900913. > >> > > > > Correct. All raster layers in OpenLayers must be in the same projection. > > Browsers can not reproject images. Therefore, if you wish to use a > > raster layer, it must support the projection fo the base layer -- in the > > case of google, that's spherical mercator. > > > why can a wms-layer not transform its coordinates in epsg:900913 to > epsg:4326 before doing its request for an image? > okay i never tried it but i suposse this could result in some horrible > images? The images don't match. You get 'stretching'. 900913 is not a special projection in any particular way. Ask the same question about a polar projection -- one centered on Antarctica, for example. North America is a 5 px smudge. Why can't OpenLayers take that 5 pixel smudge, and turn it into North America -- thedata isn't there. > > > >> I tried lots of ways to tell my wms-layer to be requesting in EPSG:4326, > >> but none worked. > >> my problem ist, that the layers i want to use come from governmental > >> servers not offering EPSG:900913 > >> but EPSG:4326 or EPSG:31647. > >> > > > > Then you can't use them on top of Google Maps without making yourself a > > reprojecting service. You can use MapServer as a WMS server to 'cascade' > > -- load and reproject, in this case -- from the remote server. This > > would mean you would talk to your own MapServer, which would then talk > > to the government provided WMS. > > > > > >> Can anyone comfirm this situation or show me a solution? > >> > > > > Yes, I can confirm that you are correct. > > > > > >> Are there any Reprojection-Services available? > >> > > > > MapServer can act as a reprojection service. > > > damn i would prefer geoserver :-) I know nothing about GeoServer. Regards, -- Christopher Schmidt MetaCarta From bartvde at osgis.nl Wed May 13 12:15:02 2009 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Loading Panel issue with IE In-Reply-To: <1242201364705-2879617.post@n2.nabble.com> References: <1242201364705-2879617.post@n2.nabble.com> Message-ID: <4A0AF206.2060809@osgis.nl> Hi, do you have an example which I can use to reproduce the issue? Best regards, Bart Alessio Di Lorenzo wrote: > Hi all, > > I have a problem with the loading panel in my webmapping application when > using microsoft IE. > I have Google maps layers for base and some WMS overlays via tilecache. > The loading panel works very well in Firefox but in IE it does not disappear > even if all my layers are loaded... > > I use OpenLayers-2.7 > > What can I do to fix this problem? > Thanks in advance, alessio > > > > -- Bart van den Eijnden OSGIS, Open Source GIS bartvde@osgis.nl http://www.osgis.nl From talentp1982 at yahoo.com.cn Wed May 13 12:57:54 2009 From: talentp1982 at yahoo.com.cn (willson) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Virtual Earth Issue In-Reply-To: <20090513112631.GQ27059@metacarta.com> References: <1242208083715-2880849.post@n2.nabble.com> <20090513112631.GQ27059@metacarta.com> Message-ID: <1242233874679-2885129.post@n2.nabble.com> I try the 'restrictedExtent' option, but nothing change. Maybe I need to use virtual earth alone without openlayers in my case? Christopher Schmidt-2 wrote: > > On Wed, May 13, 2009 at 02:48:03AM -0700, willson wrote: >> >> I try to use the "spherical-mercator" example in openlayers/example to >> display mycity. I just change the map options "maxResolution" and >> "maxExtent". > > You can't do this -- at least not easily -- with spherical mercator > layers. > I recommend using 'restrictedExtent' for the latter, and I don't think > there's a way to do the former. > > -- Chris > >> The question is : the map doesn't display mycity but whole >> china, when I zoom in, the map center goes to africa, and the map can't >> pan. >> All seems strange. >> Here is the code, any help would be appreciate! >> >> >> >> > type="text/css" >> /> >> >> >> >> >> >> >> >> >> >>

OpenLayers Spherical Mercator Example

>> >>
>>
>> >>
>> >>
>>
>> >> >> >> >> >> >> -- >> View this message in context: >> http://n2.nabble.com/Virtual-Earth-Issue-tp2880849p2880849.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Virtual-Earth-Issue-tp2880849p2885129.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed May 13 15:32:25 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How to use layer.events.register() and layer.events.on()? In-Reply-To: <20090513152857.GW27059@metacarta.com> References: <1242227618.4a0ae3a2dc8c0@www.usherbrooke.ca> <20090513152857.GW27059@metacarta.com> Message-ID: <20090513193225.GY27059@metacarta.com> On Wed, May 13, 2009 at 11:28:57AM -0400, Christopher Schmidt wrote: > On Wed, May 13, 2009 at 11:13:38AM -0400, St?phane Poirier wrote: > > Hi All (and Tim), > > > > Catching events using predefined function hook works fine for me (case 2 and 3), > > but I do not have any success catching events using layer.events.register (case > > 4) nor layer.events.on (case 5). What do I do wrong? Should > > layer.events.register and/or layer.events.on be used before the layer is > > created? And what is the difference between these two? > > > > //1) create layer > > rectangleLayer=new OpenLayers.Layer.Vector("Selection"); > > > > //2) works fine > > rectangleLayer.preFeatureInsert=function(feature) > > { > > feature_tobeinserted(); > > } > > > > //3) works fine > > rectangleLayer.onFeatureInsert=function(feature) > > { > > feature_inserted(); > > } > > > > //4) does not seem to catch event > > rectangleLayer.events.register("sketchcomplete",rectangleLayer, > > function(event){ var feature = event.feature; > > return (feature.geometry.getArea() > 10); // false to not add > > }); > > The order of arguments in this one is wrong: it should be > ("sketchcomplete", function(){}). (The rectangleLayer is totally > unneccesary in the given function.) Actually, my memory was playing tricks on me here. My statement is wrong. Out of curiousity, are you using OpenLayers 2.8? sketchcomplete doesn't exist in OpenLayers 2.7. > > //5) does not seem to catch event > > rectangleLayer.events.on({ > > sketchcomplete: function(event) { > > var feature = event.feature; > > return (feature.geometry.getArea() > 10); // false to not add > > }}); > > > > Regards, > > > > > > St?phane Poirier > > Professionel de recherche au CARTEL > > Centre d'Applications et de Recherches en T?l?d?tection > > D?partement de g?omatique appliqu?e > > Universit? de Sherbrooke > > Sherbrooke (Qu?bec), CANADA J1K 2R1 > > Tel.: (+1 819) 821 8000 #61904 > > Fax.: (+1 819) 821 7944 > > Stephane.Poirier@USherbrooke.ca > > http://www.usherbrooke.ca/cartel > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From simone.dalmasso at gmail.com Wed May 13 16:13:01 2009 From: simone.dalmasso at gmail.com (Simo D) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Popup problems on different GML layers with GeoRSS format Message-ID: <1242245581195-2886288.post@n2.nabble.com> Hi list, I'm trying to add custom popups on three GML layers which contains GeoRSS feed. My code is composed by three layers declarated like this. var gdacs_earth = new OpenLayers.Layer.GML("Earthquakes (GDACS)", "feedaddress", {format: georss_format, styleMap: createStyle('iconpath')}); Where georss_format is var georss_format = new OpenLayers.Format.GeoRSS(in_options); Then i attach three var eqpopups = new OpenLayers.Control.SelectFeature(gdacs_earth, GeorssPopups.init()); map.addControl(eqpopups); eqpopups.activate(); obviously with different variable names. GeorssPopups is a hash: var GeorssPopups = { init: function(){ return {onSelect: this.onFeatureSelect, onUnselect: this.onFeatureUnselect}; } , onFeatureSelect: function(feature){ var popup = new OpenLayers.Popup.FramedCloud("featurePopup", feature.geometry.getBounds().getCenterLonLat(), new OpenLayers.Size(100,100), "

"+feature.attributes.title + "

" + feature.attributes.description, null, true, function(){map.removePopup(feature.popup); feature.popup.destroy(); feature.popup = null;}); feature.popup = popup; map.addPopup(popup); }, onFeatureUnselect: function(feature) { if (feature.popup) { map.removePopup(feature.popup); feature.popup.destroy(); feature.popup = null; } } }; The problem is that on most browsers this solution works only for the last layer declarated except for Safari 4 where all works fine. It seems that the listener associated with the SelectFeture method listens only on the last GML layer declared. If I declare one layer with GML class and others with the GeoRSS class it works. I also tried to declare two layers from GML with only one having the selectFeature associated and it breaks, I can see the icons but no frameCloud appears. Can you help me? Having nice popups on GeoRSS it's important. -- View this message in context: http://n2.nabble.com/Popup-problems-on-different-GML-layers-with-GeoRSS-format-tp2886288p2886288.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Wed May 13 16:31:38 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Popup problems on different GML layers with GeoRSS format In-Reply-To: <1242245581195-2886288.post@n2.nabble.com> References: <1242245581195-2886288.post@n2.nabble.com> Message-ID: <20090513203138.GZ27059@metacarta.com> On Wed, May 13, 2009 at 01:13:01PM -0700, Simo D wrote: > > Hi list, I'm trying to add custom popups on three GML layers which contains > GeoRSS feed. > > My code is composed by three layers declarated like this. > > var gdacs_earth = new OpenLayers.Layer.GML("Earthquakes (GDACS)", > "feedaddress", {format: georss_format, styleMap: createStyle('iconpath')}); > > Where georss_format is var georss_format = new > OpenLayers.Format.GeoRSS(in_options); > > > Then i attach three var eqpopups = new > OpenLayers.Control.SelectFeature(gdacs_earth, GeorssPopups.init()); > map.addControl(eqpopups); eqpopups.activate(); Can't do that. Gotta do one, with three layers passed in the first arg, and that will only work in 2.8/trunk. -- Chris > obviously with different variable names. > > GeorssPopups is a hash: > var GeorssPopups = { > init: function(){ > return {onSelect: this.onFeatureSelect, onUnselect: > this.onFeatureUnselect}; > > } , > onFeatureSelect: function(feature){ > var popup = new OpenLayers.Popup.FramedCloud("featurePopup", > feature.geometry.getBounds().getCenterLonLat(), > new OpenLayers.Size(100,100), > "

"+feature.attributes.title + "

" + > feature.attributes.description, > null, true, > function(){map.removePopup(feature.popup); > feature.popup.destroy(); > feature.popup = null;}); > feature.popup = popup; > map.addPopup(popup); > }, > onFeatureUnselect: function(feature) { > if (feature.popup) { > map.removePopup(feature.popup); > feature.popup.destroy(); > feature.popup = null; > } > } > }; > > > The problem is that on most browsers this solution works only for the last > layer declarated except for Safari 4 where all works fine. Safari 4 is whacked. The former is the expected behavior. This is because browsers will not let us catch events through the top SVG element on the lower level elements. As a result, we've extended the SelectFeature control to be able to take efeatures from *all* layers and put them in the same SVG element. > It seems that the listener associated with the SelectFeture method listens > only on the last GML layer declared. > If I declare one layer with GML class > and others with the GeoRSS class it works. Yes, Because the GeoRSS class uses markers, and doens't have the same behavior because no SVG is involved. > I also tried to declare two > layers from GML with only one having the selectFeature associated and it > breaks, I can see the icons but no frameCloud appears. The clicks aren't getting there. > Can you help me? Having nice popups on GeoRSS it's important. > -- > View this message in context: http://n2.nabble.com/Popup-problems-on-different-GML-layers-with-GeoRSS-format-tp2886288p2886288.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Wed May 13 16:32:56 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Is it possible to get openlayers version 2.8? In-Reply-To: <1242246204.4a0b2c3ca88d2@www.usherbrooke.ca> References: <1242246204.4a0b2c3ca88d2@www.usherbrooke.ca> Message-ID: <20090513203256.GA27059@metacarta.com> On Wed, May 13, 2009 at 04:23:24PM -0400, St?phane Poirier wrote: > I am using the hosted version http://www.openlayers.org/api/OpenLayers.js, > is this 2.7 or 2.8? Is it possible to download the 2.8? 2.7. http://openlayers.org/download/OpenLayers-2.8-rc2.zip And, as described in : http://openlayers.org/pipermail/dev/2009-May/004807.html http://openlayers.org/api/2.8-rc2/OpenLayers.js > Thanks anyway for trying. > > Stephane > > > ----- Original Message ----- > From: "Christopher Schmidt" > To: "Christopher Schmidt" > Cc: "St?phane Poirier" ; > > Sent: Wednesday, May 13, 2009 15:32 > Subject: Re: [OpenLayers-Users] How to use layer.events.register() and > layer.events.on()? > > > On Wed, May 13, 2009 at 11:28:57AM -0400, Christopher Schmidt wrote: > > On Wed, May 13, 2009 at 11:13:38AM -0400, St?phane Poirier wrote: > > > Hi All (and Tim), > > > > > > Catching events using predefined function hook works fine for me (case 2 > > > and 3), > > > but I do not have any success catching events using > > > layer.events.register (case > > > 4) nor layer.events.on (case 5). What do I do wrong? Should > > > layer.events.register and/or layer.events.on be used before the layer is > > > created? And what is the difference between these two? > > > > > > //1) create layer > > > rectangleLayer=new OpenLayers.Layer.Vector("Selection"); > > > > > > //2) works fine > > > rectangleLayer.preFeatureInsert=function(feature) > > > { > > > feature_tobeinserted(); > > > } > > > > > > //3) works fine > > > rectangleLayer.onFeatureInsert=function(feature) > > > { > > > feature_inserted(); > > > } > > > > > > //4) does not seem to catch event > > > rectangleLayer.events.register("sketchcomplete",rectangleLayer, > > > function(event){ var feature = event.feature; > > > return (feature.geometry.getArea() > 10); // false to not add > > > }); > > > > The order of arguments in this one is wrong: it should be > > ("sketchcomplete", function(){}). (The rectangleLayer is totally > > unneccesary in the given function.) > > Actually, my memory was playing tricks on me here. My statement is > wrong. > > Out of curiousity, are you using OpenLayers 2.8? sketchcomplete doesn't > exist in OpenLayers 2.7. > > > > //5) does not seem to catch event > > > rectangleLayer.events.on({ > > > sketchcomplete: function(event) { > > > var feature = event.feature; > > > return (feature.geometry.getArea() > 10); // false to not add > > > }}); > > > > > > Regards, > > > > > > > > > St?phane Poirier > > > Professionel de recherche au CARTEL > > > Centre d'Applications et de Recherches en T?l?d?tection > > > D?partement de g?omatique appliqu?e > > > Universit? de Sherbrooke > > > Sherbrooke (Qu?bec), CANADA J1K 2R1 > > > Tel.: (+1 819) 821 8000 #61904 > > > Fax.: (+1 819) 821 7944 > > > Stephane.Poirier@USherbrooke.ca > > > http://www.usherbrooke.ca/cartel > > > _______________________________________________ > > > Users mailing list > > > Users@openlayers.org > > > http://openlayers.org/mailman/listinfo/users > > > > -- > > Christopher Schmidt > > MetaCarta > > _______________________________________________ > > Users mailing list > > Users@openlayers.org > > http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > -- Christopher Schmidt MetaCarta From ChiefDan at gmail.com Wed May 13 16:40:14 2009 From: ChiefDan at gmail.com (ChiefDan) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] KML NetworkLink and auto-refresh In-Reply-To: <300497a30905121831r447d8e2aua4b0aca830929291@mail.gmail.com> References: <300497a30903250221v55a12f77rca715078f1cde872@mail.gmail.com> <1242149703726-2870627.post@n2.nabble.com> <300497a30905121831r447d8e2aua4b0aca830929291@mail.gmail.com> Message-ID: <1242247214551-2886417.post@n2.nabble.com> Andrew, I honestly haven't done extensive testing to notice if it flickers or not. I did set the timer to 1000ms to test that it would go grab the file and it didn't seem to flicker, but I am not 100% confident I have it all working smoothly. If you don't mind, keep posting to this thread with anything you discover and I'll do the same. Dan Andrew Smith wrote: > > Thanks Dan, I'll have to give this a try. > > I notice that your timer is going off every 10 minutes...how much data are > you loading from the KML file? Is there much in the way of a noticeable > flicker when you reload the layer (i.e. does all of the data completely > disappear for a few seconds while the KML file is parsed and reloaded)? > > I'd be looking to reload a layer containing between 20-100 text objects > every 5 seconds or so and I'm not sure what the performance will be like > under those conditions. > > Cheers, > > Andrew > > On Wed, May 13, 2009 at 1:35 AM, ChiefDan wrote: > >> >> Andrew, >> Not sure if you found a solution, if not, this is what I've done. >> >> In the map init function, set a timer: >> >> window.setInterval(raingaugeRefreshData, 600000, rainGauges); >> >> Then in the timer service function: >> function raingaugeRefreshData(layer) >> { >> layer.loaded = false; >> layer.setVisibility(true); >> } >> By setting loaded to false then calling setVisibility(), openlayers goes >> and >> grabs the kml file again. >> >> Hope this helps. >> >> Dan >> -- >> View this message in context: >> http://n2.nabble.com/KML-NetworkLink-and-auto-refresh-tp2531433p2870627.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users >> > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/KML-NetworkLink-and-auto-refresh-tp2531433p2886417.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From alessio.dilorenzo at gmail.com Wed May 13 17:24:58 2009 From: alessio.dilorenzo at gmail.com (Alessio Di Lorenzo) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Loading Panel issue with IE In-Reply-To: <4A0AF206.2060809@osgis.nl> References: <1242201364705-2879617.post@n2.nabble.com> <4A0AF206.2060809@osgis.nl> Message-ID: <1242249898790-2886654.post@n2.nabble.com> Bart van den Eijnden (OSGIS)-2 wrote: > > Hi, > > do you have an example which I can use to reproduce the issue? > Sure :) http://oiebtnet.izs.it/OieMaps2/ -- View this message in context: http://n2.nabble.com/Loading-Panel-issue-with-IE-tp2879617p2886654.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From asle.benoni at gmail.com Wed May 13 17:59:00 2009 From: asle.benoni at gmail.com (Asle Benoni) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Configure ProxyHost and KML files In-Reply-To: <4FB05F7C-0AD2-48B2-9D45-A7621865D1E5@gmail.com> References: <2AAB86C0-B612-4D23-98A8-5D7A2E6981FE@gmail.com> <4FB05F7C-0AD2-48B2-9D45-A7621865D1E5@gmail.com> Message-ID: <5DF2D1C8-9EF0-4165-A1A0-057D3E8340C0@gmail.com> Hello again, Is anyone running proxy.cgi on Mac OS X 10.5 Server? I believe it must be a problem with server since I have tested it on OS X 10.5 Leopard client and it works fine there. /asle Den 13. mai. 2009 kl. 00.03 skrev Asle Benoni: > > Hello, > This problem is still not solved. I believe it has to do with > proxy.cgi. If I do a request from proxy.cgi on another linux server > it works fine but with the proxy.cgi on my Mac OS X Server it fails. > See the attached screenshots. > > The headers that are sent (from proxy.cgi?) is "application/ > vnd.ogc.se_xml" and it is ...kml... when proxy.cgi is on another > linux server. > So you see the response is not interpretable. Is there a another > version of proxy.cgi for Mac? I checked calling proxy.cgi directly > and it redirects to openayers.org. So it should work? > > Is there a way to rewrite the headers so the server will understand > it? > I am completely lost since I cannot use KML or WFS on this server. > > /asle > > > Den 26. mars. 2009 kl. 13.31 skrev Alexandre Dube: > >> OpenLayers.Format.KMZ doesn't exist. You should try KML instead >> and have &format=application/vnd.google-earth.kml+XML in your url >> instead. I never tried it thought, but that's what I would try. >> >> By the way, KMZ is a zipped version of a KML. You could replace a >> file.kmz to file.zip then unzip it and you would have your >> uncompressed KML. OpenLayers currently can't read KMZ files. >> >> Regards, >> >> Alexandre >> >> Asle Benoni wrote: >>> Yes, I have read that and configured proxy.cgi with the domains of >>> the server. >>> Now the layer I get from GeoServer is KMZ and not KML (don?t know >>> why) so I put the code like this in my html. >>> >>> OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; >>> >>> map.addLayer(new OpenLayers.Layer.GML("KML", "http://naturkart.no:8080/geoserver/wms/kml?layers=kulturminner_ns:gravminne&format=application/vnd.google-earth.kmz+XML& >>> ", >>> { >>> format: OpenLayers.Format.KMZ, >>> formatOptions: { >>> extractStyles: true, >>> extractAttributes: true >>> } >>> })); >>> >>> I see now in FireBug that a http request is done to the kmz file >>> but I do not see the layer in the map. >>> >>> /asle >>> >>> >> >> >> -- >> Alexandre Dub? >> Mapgears >> www.mapgears.com >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090513/4c3c14fa/attachment.html From gdt at ir.bbn.com Wed May 13 18:26:41 2009 From: gdt at ir.bbn.com (Greg Troxel) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] GML layer choice for putting photos on a map, clustering? Message-ID: (Sorry if this is OT.) I have a basic openlayers 2.8rc2 install on my server, with OSM/{mapnik,tah} and OAM. I have a bunch of geotagged photographs, and would like to render them on the map. My needs are pretty simple - basically I want: when there aren't too many photos, a small thumbnail click on thumbnail pops up a bigger one, maybe with some text when there are too many, some sort of clustering icon instead I think I want to user the cluster strategy in the examples as strategy-cluster*, and either georss from flickr example, GML, or KML. But, it would be a slightly plus, but not much, if I published the photos as WFS. I would also like to minimize work. What GML language do people recommend? I have a slight bias towards a truly open specification, so that makes me lean towards atom/georss. Are there tools I should use, given a directory of images with exif gps data, and perhaps caption files? I found http://code.google.com/apis/kml/articles/geotagsimple.html http://www.geowebguru.com/articles/108-technical-overview-georss and it seems like a simple perl script to write georss from a directory. Thanks, Greg -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 193 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090513/b74658b5/attachment.bin From gdt at ir.bbn.com Wed May 13 18:29:54 2009 From: gdt at ir.bbn.com (Greg Troxel) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] GML layer choice for putting photos on a map, clustering? In-Reply-To: (Greg Troxel's message of "Wed, 13 May 2009 18:26:41 -0400") References: Message-ID: Sorry, obviously a bit too tired to post. http://code.google.com/apis/kml/articles/geotagsimple.html http://www.geowebguru.com/articles/108-technical-overview-georss and it seems like a simple perl script to write georss from a directory. I meant "seem like it would be simple to write perl script to go from a dir of photos to georss". -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 193 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090513/77dd8d0a/attachment.bin From crschmidt at metacarta.com Wed May 13 18:30:14 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] GML layer choice for putting photos on a map, clustering? In-Reply-To: References: Message-ID: <20090513223014.GD27059@metacarta.com> On Wed, May 13, 2009 at 06:26:41PM -0400, Greg Troxel wrote: > > (Sorry if this is OT.) > > I have a basic openlayers 2.8rc2 install on my server, with > OSM/{mapnik,tah} and OAM. I have a bunch of geotagged photographs, and > would like to render them on the map. My needs are pretty simple - > basically I want: > > when there aren't too many photos, a small thumbnail > > click on thumbnail pops up a bigger one, maybe with some text > > when there are too many, some sort of clustering icon instead > > I think I want to user the cluster strategy in the examples as > strategy-cluster*, and either georss from flickr example, GML, or KML. > But, it would be a slightly plus, but not much, if I published the > photos as WFS. I would also like to minimize work. > > What GML language do people recommend? I have a slight bias towards a > truly open specification, so that makes me lean towards atom/georss. I always use GeoJSON. Easy, fast, openly specified, supported by a number of web-centric tools, and fits well with the Javascript model. -- Chris > Are there tools I should use, given a directory of images with exif gps > data, and perhaps caption files? I found > > http://code.google.com/apis/kml/articles/geotagsimple.html > http://www.geowebguru.com/articles/108-technical-overview-georss > > and it seems like a simple perl script to write georss from a directory. > > Thanks, > Greg > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From kgeusebroek at xebia.com Thu May 14 03:48:45 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Performance and Memoryusage measuring: How To In-Reply-To: References: Message-ID: Hi all, Sadly i didn't get any replies on this mail so I investigated further myself and found a partial solution. It seems that IE leaves a reference to the element which is removed with the removeChild method. Since this method is heavily used in OpenLayers refreshing a layer often will add Dom elements to the memory all the time. I created a patch to replace the removeChild method (at least the cases where an element can be removed really) by a utility method which really removes an element. I attached a patch file to this email for those who are in need of a solution. Still there's a small amount of memory added on every refresh (talking about 40-100 kB every refresh) which I'm not able to pinpoint. QUESTION: is there any tool which I can use to inspect the memory and see which elements are using memory?? Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Kris Geusebroek Sent: Friday, May 08, 2009 4:14 PM To: peter@peterse-uithuizen.com; OpenLayers mailinglijst Subject: Re: [OpenLayers-Users] Performance and Memoryusage measuring: How To Hi all, Ive tied out sIeve to measure leaks and memory usage of my OpenLayers client and see some strange things. I have a Vector layer with bbox strategy and wfs protocol that refreshes every 5 seconds. I have points wit h labels and some background image/stroke etc. If I zoom in on 1 feature every refresh 7 dom elements are added to the #inUse. If I check the in use elements I can see references to the previous id's marked orphan and some not marked orphan (the reason for them is the removeChild isn't called but they are mostly childs of orphan's). However memory is not freed at all. Memory is only freed as I browse to other page (about:blank for example). But not all of the used memory is freed. Also when unloading my client a few (23) leaks are reported but not more info. Few questions: How can I see what the memory is used for? are there other tools to see memory use of the app. Should I care about the orphaned dom elements and children of them? How can I see what the leaks are about? Any help Is much appreciated (been banging my head all day now) Cheers Kris _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -------------- next part -------------- A non-text attachment was scrubbed... Name: removeChild-memoryleak-version2-excl.patch Type: application/octet-stream Size: 24576 bytes Desc: removeChild-memoryleak-version2-excl.patch Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090514/dfe9a77f/removeChild-memoryleak-version2-excl.obj From goghi at o2.pl Thu May 14 04:08:59 2009 From: goghi at o2.pl (Paw3l) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Using AutoCAD files (DWG, DXF and similar) Message-ID: <1242288539620-2888808.post@n2.nabble.com> Hi, I'm wondering if it is possible to use Autocad format files directly in the OpenLayers. For now I am using a converted to PNG version of my DXF file: new OpenLayers.Layer.Image('Sem', 'http://localhost:8080/swanny/images/SektorVI.png', new OpenLayers.Bounds(-180, -88.759, 180, 88.759), new OpenLayers.Size(1024, 768), options ); but I would like to use a DXF file instead of PNG. I could not find any pointers anywhere. Regards, Pawel -- View this message in context: http://n2.nabble.com/Using-AutoCAD-files-%28DWG%2C-DXF-and-similar%29-tp2888808p2888808.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From bartvde at osgis.nl Thu May 14 04:12:50 2009 From: bartvde at osgis.nl (bartvde@osgis.nl) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Using AutoCAD files (DWG, DXF and similar) In-Reply-To: <1242288539620-2888808.post@n2.nabble.com> References: <1242288539620-2888808.post@n2.nabble.com> Message-ID: <41539.145.50.39.11.1242288770.squirrel@webmail.hostingdiscounter.nl> Nope. You can try and use a WMS, like Mapserver/GeoServer/Mapguide, to display those files, but most of the open source WMS products don't support DWG and DXF AFAIK. Best regards, Bart > > Hi, > > I'm wondering if it is possible to use Autocad format files directly in > the > OpenLayers. For now I am using a converted to PNG version of my DXF file: > > new OpenLayers.Layer.Image('Sem', > 'http://localhost:8080/swanny/images/SektorVI.png', > new OpenLayers.Bounds(-180, -88.759, 180, 88.759), > new OpenLayers.Size(1024, 768), > options > ); > > but I would like to use a DXF file instead of PNG. I could not find any > pointers anywhere. > > Regards, > Pawel > -- > View this message in context: > http://n2.nabble.com/Using-AutoCAD-files-%28DWG%2C-DXF-and-similar%29-tp2888808p2888808.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 zac.spitzer at gmail.com Thu May 14 04:13:10 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Using AutoCAD files (DWG, DXF and similar) In-Reply-To: <1242288539620-2888808.post@n2.nabble.com> References: <1242288539620-2888808.post@n2.nabble.com> Message-ID: <7a85053e0905140113p28db3dc4n144a1eacfd05e0cc@mail.gmail.com> you will need a mapserver, given your using autocad files, I would suggest trying out mapguide open source, have a look here http://ennoble.dreamhosters.com/mapguide-central/ z On Thu, May 14, 2009 at 6:08 PM, Paw3l wrote: > > Hi, > > I'm wondering if it is possible to use Autocad format files directly in the > OpenLayers. For now I am using a converted to PNG version of my DXF file: > > new OpenLayers.Layer.Image('Sem', > ? ? ? ? ? ? ? ?'http://localhost:8080/swanny/images/SektorVI.png', > ? ? ? ? ? ? ? ?new OpenLayers.Bounds(-180, -88.759, 180, 88.759), > ? ? ? ? ? ? ? ?new OpenLayers.Size(1024, 768), > ? ? ? ? ? ? ? ?options > ? ? ? ? ? ?); > > but I would like to use a DXF file instead of PNG. I could not find any > pointers anywhere. > > Regards, > Pawel > -- > View this message in context: http://n2.nabble.com/Using-AutoCAD-files-%28DWG%2C-DXF-and-similar%29-tp2888808p2888808.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From simone.dalmasso at gmail.com Thu May 14 06:53:56 2009 From: simone.dalmasso at gmail.com (Simo D) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] Popup problems on different GML layers with GeoRSS format In-Reply-To: <20090513203138.GZ27059@metacarta.com> References: <1242245581195-2886288.post@n2.nabble.com> <20090513203138.GZ27059@metacarta.com> Message-ID: <1242298436519-2889389.post@n2.nabble.com> Thanks Christopher. Now I downloaded the trunk SelectFeature, RootContainer and Openlayers.js. I modified my code like this: var popups = new OpenLayers.Control.SelectFeature([gdacs_earth,gdacs_flood,gdacs_cyclones], GeorssPopups.init()); map.addControl(popups); popups.activate(); But nothing changes...is there something wrong? Thanks in advance. Simone. Christopher Schmidt-2 wrote: > > On Wed, May 13, 2009 at 01:13:01PM -0700, Simo D wrote: >> >> Hi list, I'm trying to add custom popups on three GML layers which >> contains >> GeoRSS feed. >> >> My code is composed by three layers declarated like this. >> >> var gdacs_earth = new OpenLayers.Layer.GML("Earthquakes (GDACS)", >> "feedaddress", {format: georss_format, styleMap: >> createStyle('iconpath')}); >> >> Where georss_format is var georss_format = new >> OpenLayers.Format.GeoRSS(in_options); >> >> >> Then i attach three var eqpopups = new >> OpenLayers.Control.SelectFeature(gdacs_earth, GeorssPopups.init()); >> map.addControl(eqpopups); eqpopups.activate(); > > Can't do that. Gotta do one, with three layers passed in the first arg, > and that will only work in 2.8/trunk. > > -- Chris > >> obviously with different variable names. >> >> GeorssPopups is a hash: >> var GeorssPopups = { >> init: function(){ >> return {onSelect: this.onFeatureSelect, onUnselect: >> this.onFeatureUnselect}; >> >> } , >> onFeatureSelect: function(feature){ >> var popup = new OpenLayers.Popup.FramedCloud("featurePopup", >> >> feature.geometry.getBounds().getCenterLonLat(), >> new OpenLayers.Size(100,100), >> "

"+feature.attributes.title + "

" + >> feature.attributes.description, >> null, true, >> function(){map.removePopup(feature.popup); >> feature.popup.destroy(); >> feature.popup = null;}); >> feature.popup = popup; >> map.addPopup(popup); >> }, >> onFeatureUnselect: function(feature) { >> if (feature.popup) { >> map.removePopup(feature.popup); >> feature.popup.destroy(); >> feature.popup = null; >> } >> } >> }; >> >> >> The problem is that on most browsers this solution works only for the >> last >> layer declarated except for Safari 4 where all works fine. > > Safari 4 is whacked. The former is the expected behavior. This is > because browsers will not let us catch events through the top SVG > element on the lower level elements. As a result, we've extended the > SelectFeature control to be able to take efeatures from *all* layers and > put them in the same SVG element. > >> It seems that the listener associated with the SelectFeture method >> listens >> only on the last GML layer declared. > >> If I declare one layer with GML class >> and others with the GeoRSS class it works. > > Yes, Because the GeoRSS class uses markers, and doens't have the same > behavior because no SVG is involved. > >> I also tried to declare two >> layers from GML with only one having the selectFeature associated and it >> breaks, I can see the icons but no frameCloud appears. > > The clicks aren't getting there. > > >> Can you help me? Having nice popups on GeoRSS it's important. >> -- >> View this message in context: >> http://n2.nabble.com/Popup-problems-on-different-GML-layers-with-GeoRSS-format-tp2886288p2886288.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Popup-problems-on-different-GML-layers-with-GeoRSS-format-tp2886288p2889389.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From eider at fh-bingen.de Thu May 14 07:07:38 2009 From: eider at fh-bingen.de (Dipl. Inf. Carsten Eider) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] EPSG:4326 overlay EPSG:900913 as WMS In-Reply-To: <20090513155958.GX27059@metacarta.com> References: <4A0ADF9A.2050209@fh-bingen.de> <20090513150214.GU27059@metacarta.com> <4A0AE756.1080803@fh-bingen.de> <20090513155958.GX27059@metacarta.com> Message-ID: <4A0BFB7A.5020807@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/20090514/cecd4120/eider.vcf From hgnj_025 at 163.com Thu May 14 11:11:30 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] problem about display two layers In-Reply-To: <20090513112539.GP27059@metacarta.com> References: <1242203602102-2879776.post@n2.nabble.com> <20090513112539.GP27059@metacarta.com> Message-ID: <1242313890808-2892598.post@n2.nabble.com> transparent: true parameter in the WMS params. can you tell me some details about the above? I'm a fresher in openlayers. -- View this message in context: http://n2.nabble.com/problem-about-display-two-layers-tp2879776p2892598.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From hgnj_025 at 163.com Thu May 14 11:17:35 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:27 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. In-Reply-To: References: <1242032405929-2861920.post@n2.nabble.com> <1242119509537-2868140.post@n2.nabble.com> <1242179251694-2878521.post@n2.nabble.com> Message-ID: <1242314255934-2892765.post@n2.nabble.com> thank you very much! I have stored the point information(lon lat) in the mysql and deployed the map by geoserver. I can see the point on the map now. But can I displayed the point as a marker? And can i generate a popup for the marker? How can I do it? The vector? -- View this message in context: http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-marker.-tp2861920p2892765.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mika at digikartta.net Thu May 14 15:25:48 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Using AutoCAD files (DWG, DXF and similar) In-Reply-To: <1242288539620-2888808.post@n2.nabble.com> References: <1242288539620-2888808.post@n2.nabble.com> Message-ID: <4A0C703C.1040703@digikartta.net> Hi Pawel, depends on how complex your cad geometries/files are. You could also try OpenJUMP (www.openjump.org) with separately downloaded DXF-import plugin. With that package, you can convert your dxfs' into some other format and use them directly in OL or better, serve them throug some map server. If your files are complex, you'd better stick to some raster format. Main question might be; do you need vectors or just an image of them? - mika - Paw3l kirjoitti: > Hi, > > I'm wondering if it is possible to use Autocad format files directly in the > OpenLayers. For now I am using a converted to PNG version of my DXF file: > > new OpenLayers.Layer.Image('Sem', > 'http://localhost:8080/swanny/images/SektorVI.png', > new OpenLayers.Bounds(-180, -88.759, 180, 88.759), > new OpenLayers.Size(1024, 768), > options > ); > > but I would like to use a DXF file instead of PNG. I could not find any > pointers anywhere. > > Regards, > Pawel > From n.e.kendall at gmail.com Thu May 14 16:34:28 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Using AutoCAD files (DWG, DXF and similar) In-Reply-To: <4A0C703C.1040703@digikartta.net> References: <1242288539620-2888808.post@n2.nabble.com> <4A0C703C.1040703@digikartta.net> Message-ID: <33fd44f90905141334wbb88d1evc4bbf9189873a80a@mail.gmail.com> or, just try the ogr2ogr and convert the file to one of the natively supported vector formats. On Thu, May 14, 2009 at 3:25 PM, Lehtonen, Mika wrote: > Hi Pawel, > depends on how complex your cad geometries/files are. You could also try > OpenJUMP (www.openjump.org) with separately downloaded DXF-import > plugin. With that package, you can convert your dxfs' into some other > format and use them directly in OL or better, serve them throug some map > server. If your files are complex, you'd better stick to some raster > format. Main question might be; do you need vectors or just an image of > them? > > - mika - > > Paw3l kirjoitti: > > Hi, > > > > I'm wondering if it is possible to use Autocad format files directly in > the > > OpenLayers. For now I am using a converted to PNG version of my DXF file: > > > > new OpenLayers.Layer.Image('Sem', > > 'http://localhost:8080/swanny/images/SektorVI.png', > > new OpenLayers.Bounds(-180, -88.759, 180, 88.759), > > new OpenLayers.Size(1024, 768), > > options > > ); > > > > but I would like to use a DXF file instead of PNG. I could not find any > > pointers anywhere. > > > > Regards, > > Pawel > > > _______________________________________________ > 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/20090514/e852c9e1/attachment.html From halext at gmail.com Thu May 14 18:54:08 2009 From: halext at gmail.com (Hugo Teixeira) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] help ! Message-ID: how can i hilight one line in openlayers ??? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090514/330b7794/attachment.html From ryan.feagin at PEACHTREEGEOGRAPHICS.COM Thu May 14 20:23:21 2009 From: ryan.feagin at PEACHTREEGEOGRAPHICS.COM (RFeagin) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] SingleTile TMS Layer - Suggestion Message-ID: <1242347001014-2905137.post@n2.nabble.com> I have been playing around a little bit with the singleTile option and have a suggestion for a change. Unfortuanatly I haven't had the time to dig into the code to try making the change or to see how much work it would take. But I thought that maybe someone else has already done this or that there might be a reason why no one has. I think it would be better if the bounds used for a singleTile layer were the bounds of the loaded tiles in the base layer instead of only the visible part of the map. This way panning a few pixels one way or another wouldn't need to refresh the layer and more importantly, we can take more advantage of browser caching. If someone has already done this, please respond with a link to a patch or sample of the code changes. And if this can't be done for some reason or if it is a much bigger can of worms than it seems to be, I'd appreciate being told that too. Thanks -- View this message in context: http://n2.nabble.com/SingleTile-TMS-Layer---Suggestion-tp2905137p2905137.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From orkney at gmx.de Thu May 14 20:43:51 2009 From: orkney at gmx.de (Daniel Kastl) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] "hover: true" together with callback "over" problem Message-ID: <4A0CBAC7.2070504@gmx.de> Hi list, I have a problem with hovering over features of my vector layer. When moving over a feature with the mouse, the icon should resize, so I did this in StyleMap: var myLayer = new OpenLayers.Layer.Vector( "Vector Layer", { styleMap: new OpenLayers.StyleMap({ 'default': new OpenLayers.Style({ pointRadius: 20, externalGraphic: 'img/icon.png' }), 'select': new OpenLayers.Style({ pointRadius: 24 }) }) }); Additionally I wanted to open a popup (or do something else) when my mouse is over a feature, so I add this control: var select = new OpenLayers.Control.SelectFeature( myLayer, { hover: true, callbacks: { over: function(e){ console.info(e); } }, }); map.addControl(select); select.activate(); Resizing the icon works fine if I only set "hover: true". But when I use "hover" together with "callbacks + over" it just calls the function, but doesn't resize anymore. I'm using GeoExt, so OpenLayers version should be the current 2.8 branch. Can anyone give me an advice what I'm doing wrong or how to solve this? Thanks in advance, Daniel From crschmidt at metacarta.com Thu May 14 20:44:23 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] SingleTile TMS Layer - Suggestion In-Reply-To: <1242347001014-2905137.post@n2.nabble.com> References: <1242347001014-2905137.post@n2.nabble.com> Message-ID: <20090515004423.GD19547@metacarta.com> On Thu, May 14, 2009 at 05:23:21PM -0700, RFeagin wrote: > > I have been playing around a little bit with the singleTile option and have a > suggestion for a change. Unfortuanatly I haven't had the time to dig into > the code to try making the change or to see how much work it would take. > But I thought that maybe someone else has already done this or that there > might be a reason why no one has. > > I think it would be better if the bounds used for a singleTile layer were > the bounds of the loaded tiles in the base layer instead of only the visible > part of the map. This way panning a few pixels one way or another wouldn't > need to refresh the layer and more importantly, we can take more advantage > of browser caching. What you're describing sounds vaugely like a 'snap to grid' setting for singleTile mode. Out of curiousity, why not simply... use tiles, if what you want is a gridded output which takes advantage of the browser cache? Also, the 'ratio' parameter allows you to prevent a re-request of tiles when you only drag 'a few pixels'. -- Chris > If someone has already done this, please respond with a link to a patch or > sample of the code changes. And if this can't be done for some reason or if > it is a much bigger can of worms than it seems to be, I'd appreciate being > told that too. > > Thanks > -- > View this message in context: http://n2.nabble.com/SingleTile-TMS-Layer---Suggestion-tp2905137p2905137.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From crschmidt at metacarta.com Thu May 14 20:46:08 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] "hover: true" together with callback "over" problem In-Reply-To: <4A0CBAC7.2070504@gmx.de> References: <4A0CBAC7.2070504@gmx.de> Message-ID: <20090515004608.GE19547@metacarta.com> On Fri, May 15, 2009 at 09:43:51AM +0900, Daniel Kastl wrote: > Hi list, > > I have a problem with hovering over features of my vector layer. > When moving over a feature with the mouse, the icon should resize, so I > did this in StyleMap: > > var myLayer = new OpenLayers.Layer.Vector( "Vector Layer", { > styleMap: new OpenLayers.StyleMap({ > 'default': new OpenLayers.Style({ > pointRadius: 20, > externalGraphic: 'img/icon.png' > }), > 'select': new OpenLayers.Style({ > pointRadius: 24 > }) > }) > }); > > Additionally I wanted to open a popup (or do something else) when my > mouse is over a feature, so I add this control: > > var select = new OpenLayers.Control.SelectFeature( myLayer, { > hover: true, > callbacks: { > over: function(e){ > console.info(e); > } > }, > }); > map.addControl(select); > select.activate(); > > Resizing the icon works fine if I only set "hover: true". But when I use > "hover" together with "callbacks + over" it just calls the function, but > doesn't resize anymore. > > I'm using GeoExt, so OpenLayers version should be the current 2.8 branch. > > Can anyone give me an advice what I'm doing wrong or how to solve this? > Thanks in advance, In general, I'd recommend using the featureselected event on the layer. The callbacks are likely to be used internally, and you're overriding the behavior that ctually does what you want. http://docs.openlayers.org/library/overlays#interaction For example. Best Regards, -- Christopher Schmidt MetaCarta From ryan.feagin at PEACHTREEGEOGRAPHICS.COM Thu May 14 21:11:59 2009 From: ryan.feagin at PEACHTREEGEOGRAPHICS.COM (RFeagin) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] SingleTile TMS Layer - Suggestion In-Reply-To: <20090515004423.GD19547@metacarta.com> References: <1242347001014-2905137.post@n2.nabble.com> <20090515004423.GD19547@metacarta.com> Message-ID: <1242349919169-2905304.post@n2.nabble.com> Yes a 'snap to grid' setting for singleTile is what I'm looking for. I can't (efficiently) use tiles for this layer because it is a dynamically generated 'heat map' that I'm creating in a wms-like .net web service. Rendering it as individual tiles returns a very different image and I'd rather not render the entire image over and over only to clip it to the part I need. I guess I could expand the bounding box to half of each of the surrounding tiles and clip it, but that seems like a waste of resources. Probably not the best explaination, but here is a link to the basic concept (I changed mine to cluster and aggregate the data using the layer resolution in the database to avoid all the looping). http://dylanvester.com/post/Creating-Heat-Maps-with-NET-20-(C-Sharp).aspx Thanks for the 'ratio' tip... I'll check it out. Christopher Schmidt-2 wrote: > > On Thu, May 14, 2009 at 05:23:21PM -0700, RFeagin wrote: >> >> I have been playing around a little bit with the singleTile option and >> have a >> suggestion for a change. Unfortuanatly I haven't had the time to dig >> into >> the code to try making the change or to see how much work it would take. >> But I thought that maybe someone else has already done this or that there >> might be a reason why no one has. >> >> I think it would be better if the bounds used for a singleTile layer were >> the bounds of the loaded tiles in the base layer instead of only the >> visible >> part of the map. This way panning a few pixels one way or another >> wouldn't >> need to refresh the layer and more importantly, we can take more >> advantage >> of browser caching. > > What you're describing sounds vaugely like a 'snap to grid' setting for > singleTile mode. Out of curiousity, why not simply... use tiles, if what > you want is a gridded output which takes advantage of the browser cache? > > Also, the 'ratio' parameter allows you to prevent a re-request of tiles > when you only drag 'a few pixels'. > > -- Chris > >> If someone has already done this, please respond with a link to a patch >> or >> sample of the code changes. And if this can't be done for some reason or >> if >> it is a much bigger can of worms than it seems to be, I'd appreciate >> being >> told that too. >> >> Thanks >> -- >> View this message in context: >> http://n2.nabble.com/SingleTile-TMS-Layer---Suggestion-tp2905137p2905137.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/SingleTile-TMS-Layer---Suggestion-tp2905137p2905304.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From orkney at gmx.de Thu May 14 21:35:53 2009 From: orkney at gmx.de (Daniel Kastl) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] "hover: true" together with callback "over" problem In-Reply-To: <20090515004608.GE19547@metacarta.com> References: <4A0CBAC7.2070504@gmx.de> <20090515004608.GE19547@metacarta.com> Message-ID: <4A0CC6F9.4070009@gmx.de> Christopher Schmidt schrieb: > On Fri, May 15, 2009 at 09:43:51AM +0900, Daniel Kastl wrote: > >> Hi list, >> >> I have a problem with hovering over features of my vector layer. >> When moving over a feature with the mouse, the icon should resize, so I >> did this in StyleMap: >> >> var myLayer = new OpenLayers.Layer.Vector( "Vector Layer", { >> styleMap: new OpenLayers.StyleMap({ >> 'default': new OpenLayers.Style({ >> pointRadius: 20, >> externalGraphic: 'img/icon.png' >> }), >> 'select': new OpenLayers.Style({ >> pointRadius: 24 >> }) >> }) >> }); >> >> Additionally I wanted to open a popup (or do something else) when my >> mouse is over a feature, so I add this control: >> >> var select = new OpenLayers.Control.SelectFeature( myLayer, { >> hover: true, >> callbacks: { >> over: function(e){ >> console.info(e); >> } >> }, >> }); >> map.addControl(select); >> select.activate(); >> >> Resizing the icon works fine if I only set "hover: true". But when I use >> "hover" together with "callbacks + over" it just calls the function, but >> doesn't resize anymore. >> >> I'm using GeoExt, so OpenLayers version should be the current 2.8 branch. >> >> Can anyone give me an advice what I'm doing wrong or how to solve this? >> Thanks in advance, >> > > In general, I'd recommend using the featureselected event on the layer. > The callbacks are likely to be used internally, and you're overriding > the behavior that ctually does what you want. > > http://docs.openlayers.org/library/overlays#interaction > > For example. > > Best Regards, > Hi Chris, Thank you for this. It seems to work better now, at least when I click on the feature. Daniel From adube at mapgears.com Fri May 15 08:51:09 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] help ! In-Reply-To: References: Message-ID: <4A0D653D.2080207@mapgears.com> Hi Hugo, What type of layer are you using ? The easiest way to achieve this is to use a vector layer with a selectFeature control hover:true and highlightOnly:true. See the example (1). You need OpenLayers 2.8 or trunk for the highlightOnly property Regards, Alexandre (1) http://openlayers.org/dev/examples/highlight-feature.html Hugo Teixeira wrote: > how can i hilight one line in openlayers ??? > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From yves.moisan at boreal-is.com Fri May 15 10:05:08 2009 From: yves.moisan at boreal-is.com (Yves Moisan) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] OpenAerialMap Message-ID: <1242396308.3863.19.camel@yves-laptop> Hi All, Maybe this is not the right mailing list to ask, but since I saw a post about the state of OAM a while back on this list I'll post here (please redirect me to a better place to post if there is one). We are looking at the possibility of offering OSM data to some customers. However, AFAIK there are no equivalent of Google Satellite (and Hybrid) in the world of OSM, so I went looking for OAM. I found two sites : http://www.openaerialmap.org/map/ (http://www.openaerialmap.org/ fails with an error) and http://openaerialmap.hypercube.telascience.org/map with the spectacular example of Fort Collins : http://openaerialmap.hypercube.telascience.org/map/?lat=40.58272&lon=-105.10451&zoom=17&layers=BF www.openaerialmap has a tendency to show up pink tiles but the other site seems more stable. The question is : where should I point someone who'd like to view OSM data together with some imagery and in particular what is the status/direction of OAM ? I wish all cities did like Fort Collins ... Cheers, Yves From ortelius at gmail.com Fri May 15 10:09:16 2009 From: ortelius at gmail.com (Jeffrey Johnson) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] OpenAerialMap In-Reply-To: <1242396308.3863.19.camel@yves-laptop> References: <1242396308.3863.19.camel@yves-laptop> Message-ID: They are the same site. The project is mostly dead at this point, but the cache continues to exist. The project has a mailing list here. http://openaerialmap.org/mailman/listinfo/talk_openaerialmap.org Jeff On Fri, May 15, 2009 at 7:05 AM, Yves Moisan wrote: > Hi All, > > Maybe this is not the right mailing list to ask, but since I saw a post > about the state of OAM a while back on this list I'll post here (please > redirect me to a better place to post if there is one). > > We are looking at the possibility of offering OSM data to some > customers. ?However, AFAIK there are no equivalent of Google Satellite > (and Hybrid) in the world of OSM, so I went looking for OAM. ?I found > two sites : > > http://www.openaerialmap.org/map/ (http://www.openaerialmap.org/ fails > with an error) and http://openaerialmap.hypercube.telascience.org/map > with the spectacular example of Fort Collins : > http://openaerialmap.hypercube.telascience.org/map/?lat=40.58272&lon=-105.10451&zoom=17&layers=BF > > www.openaerialmap has a tendency to show up pink tiles but the other > site seems more stable. > > The question is : where should I point someone who'd like to view OSM > data together with some imagery and in particular what is the > status/direction of OAM ? ?I wish all cities did like Fort Collins ... > > Cheers, > > Yves > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > From damarmo at gmail.com Fri May 15 11:05:55 2009 From: damarmo at gmail.com (David Martinez Morata) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Problem With Popups Message-ID: <9771eb540905150805k6c3769c4g559be639b2c90fc5@mail.gmail.com> Hello. I define a popup like this: popup = new OpenLayers.Popup.FramedCloud('popup', map.getLonLatFromPixel(helper.mouse_loc), new OpenLayers.Size(this.addQueryResult.innerHTML), text, null, true, null ); And I have problem with, because I can't see the closeBox image, and I found it in the default folder of OpenLayers.. and other probleme it's I define a html content dinamicaly with GetFeatureRequest (html header and body), but I don't have scroll bars and the window of the pop au it's so small to show all the information Any help please? Thanks -- Martinez Morata David Thinking GIS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090515/05f47130/attachment.html From hgnj_025 at 163.com Fri May 15 12:06:29 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem about display two layers In-Reply-To: <1242313890808-2892598.post@n2.nabble.com> References: <1242203602102-2879776.post@n2.nabble.com> <20090513112539.GP27059@metacarta.com> <1242313890808-2892598.post@n2.nabble.com> Message-ID: <1242403589883-2908590.post@n2.nabble.com> Thank you very much! The problem has been solved. Why I can only see the top layer is that IE6 don't support the transparent of the pgn image. I use the firefox and can see all the layers. -- View this message in context: http://n2.nabble.com/problem-about-display-two-layers-tp2879776p2908590.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Fri May 15 12:21:54 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Getting Help Faster: Minimize Your Code Message-ID: <20090515162153.GG19547@metacarta.com> Hi, (Cross-posted to dev and users: please send all replies to the users list.) Many times, users have come to me, or asked questions in IRC, related to getting help with a particular behavior. Whether that behavior is a bug or user error, there is one thing that you can do to make it more likely that a developer will be able to quickly help you with your problem. (In some cases, this is the difference between getting help at all, and simply not receiving any.) I have never seen any situation where this rule does not apply, and so I want to share it publicly with the users and dev communities so that we can all learn from it, and learn how to help each other more quickly and easily. (Throughout this post, I use the terms 'developers' and 'users'. By these terms, I mean "persons who have knowledge of the code inside of the OpenLayers library" and "persons who have knowledge of using the OpenLayers library, but not what is inside the library itself.") Minimizing Test Cases --------------------- In order for developers to help fix a problem, they first have to understand it. In order to do that, they need to understand everything thati s going on in a situation where the problem is reproducible. Oftentimes, the particular behavior is only existing in a certain type of situation, or in a limited case that is not exploited by the commonly used code. (In addition, some problems are the result of user error in some way.) In order to help developers help you, the best thing to do is to minimize the error to the *smallest amount of code that can cause it to happen*. Additionally, when attempting to reproduce, any developer will need to set up the code so that it is possible to run in the developer's test environment. This means that it is ideal to remove external references to other Javascript files, and external files at all, where possible. (Clearly, this is not always possible: WFS server bugs can't typically be demonstrated inside of a single page, for example -- but you should minimize external dependancies as much as possible.) Once you've done this, you should remove *all non-neccesary lines of code* from your example. Does the problem require the ScaleBar control in order to manifest itself? If not, toss it. Does it need multiple layers? If not, toss them. In short, any line of code that is not directly related to reproducing the problem should be removed, as each line will need to be read by the developer -- and in the case of multiple developers working on a problem, read by *each* developer -- in order to determine whether the problem is related to that. This minimization step should include removing any unneccesary Javascript, unneccesary CSS files, unneccesary HTML, etc. until the resulting code is as small as possible. Many times, in doing this, you will come across a particular minimization step that causes the problem to go away. This is a good sign, because it means you have narrowed the problem down to that particular aspect of code. Put it back, and keep minimizing. Additionally, many times in doing this, you find a particular construct in your code that can help you understand how to work around the problem. If not, then continue onto the next section. OpenLayers Library References ============================= There are multiple hosted versions of the OpenLayers library. http://openlayers.org/api/OpenLayers.js This will always represent the most recent released 'stable' version of the OpenLayers API. http://openlayers.org/dev/OpenLayers.js This is always a 10-minute delayed build of OpenLayers trunk. To simplify allowing developers to set up the code on their own testing environments, it is often beneficial to point directly to one of these library URLs. In addition, this also ensures that the problem is not something specific to your build of OpenLayers. Publishing your Problem ----------------------- Once you have minimized your test case, you need to publish it. In general, it is easiest if you publish an HTML page on a web accessible URL. Even if your project is not yet public, you can likely put a page up on another server which demonstrates the problem. Doing this is much more likely to have a developer actually follow the link and explore your problem. This is *especially* true for things like WFS which require a proxy to work correctly: Downloading the page, setting up a proxy, and testing locally is a lot of work for a developer simply to confirm that a problem exists. If you do not have *any* place to publish webpages, you can attempt to paste your code to a public site like 'nopaste.com'. However, be aware that doing so means that a developer has to perform more steps to reproduce your problem -- and every step is one that makes the problem less likely to be solved quickly and easily. Communicating about your Problem -------------------------------- The best way to communicate your problem is to send an email to the users list demonstrating the problem. Oftentimes other users will be able to point out a particular flaw in your code that is causing the error, or explain that the behavior is a known lack of functionality in OpenLayers. *Be clear on steps for reproduction*. Users who don't know what they're supposed to do to cause the bug will not be able to see it, and if they can't see it, they can't help you. If you have determined the particular change in the OpenLayers source code which is required to change the behavior, then it is more likely that the Developers list is the best place to go. Any discussion which involves code from OpenLayers itself is probably better suited for the dev list. Finally, -------- By following the steps: * Simplify/Minimize * Publish * Communicate (If you'd like, you can toss a "???, Profit!" at the end of this.) You can ensure that it is as easy as possible for a developer to determine whether the problem you're having is with the library. You also make it easier for develpoers and users to find potential problems in your usage of the library and suggest solutions. Finally, you may find in the process that you find the bug yourself, thus saving yourself and everyone else time in trying to debug. The end result is a more workable system for everyone. The easier it is to understand the problem you're having, the faster, and more easily, you will be able to get help. Best Regards, -- Christopher Schmidt MetaCarta From ted.scott at concept-solutions.com Fri May 15 15:50:00 2009 From: ted.scott at concept-solutions.com (Ted Scott) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem about display two layers In-Reply-To: <20090513112539.GP27059@metacarta.com> References: <1242203602102-2879776.post@n2.nabble.com> <20090513112539.GP27059@metacarta.com> Message-ID: <4A0DC768.3090501@concept-solutions.com> I'm having the same problem with all layers having the transparent: true attribute set. The lower layers are not visible in IE 6. The map renders fine in FFx. Christopher Schmidt wrote: > On Wed, May 13, 2009 at 01:33:22AM -0700, sasi wrote: >> When i display two layers with openlayers, I can only see the second layer. >> After i set the second layer opacity=0.5, I can see the both layers. But the >> line >> in the second layer seems to be transparent too. And the first layers seems >> not be very visibility. >> So, can i change only the background to transparent, and keep the line to be >> opacity? > > transparent: true parameter in the WMS params. > >> The map comes from geoserver. >> Thanks! >> -- >> View this message in context: http://n2.nabble.com/problem-about-display-two-layers-tp2879776p2879776.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 crschmidt at metacarta.com Fri May 15 16:06:56 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem about display two layers In-Reply-To: <4A0DC768.3090501@concept-solutions.com> References: <1242203602102-2879776.post@n2.nabble.com> <20090513112539.GP27059@metacarta.com> <4A0DC768.3090501@concept-solutions.com> Message-ID: <20090515200656.GI19547@metacarta.com> On Fri, May 15, 2009 at 03:50:00PM -0400, Ted Scott wrote: > I'm having the same problem with all layers having the transparent: true > attribute set. The lower layers are not visible in IE 6. The map renders > fine in FFx. Yes. 32-bit PNGs (alpha transparency) are not visible in IE6. Use 8-bit PNGs or gifs, or don't support IE6. (Microsoft doesn't.) -- Chris > > Christopher Schmidt wrote: > > On Wed, May 13, 2009 at 01:33:22AM -0700, sasi wrote: > >> When i display two layers with openlayers, I can only see the second layer. > >> After i set the second layer opacity=0.5, I can see the both layers. But the > >> line > >> in the second layer seems to be transparent too. And the first layers seems > >> not be very visibility. > >> So, can i change only the background to transparent, and keep the line to be > >> opacity? > > > > transparent: true parameter in the WMS params. > > > >> The map comes from geoserver. > >> Thanks! > >> -- > >> View this message in context: http://n2.nabble.com/problem-about-display-two-layers-tp2879776p2879776.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 -- Christopher Schmidt MetaCarta From kgeusebroek at xebia.com Fri May 15 17:07:01 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem about display two layers In-Reply-To: <20090515200656.GI19547@metacarta.com> References: <1242203602102-2879776.post@n2.nabble.com><20090513112539.GP27059@metacarta.com><4A0DC768.3090501@concept-solutions.com> <20090515200656.GI19547@metacarta.com> Message-ID: OpenLayers supports IE6 transparency through the alphaHack method. layer.alpha = setAlpha('image/png'); function setAlpha(imageformat) { var filter = false; if (imageformat.toLowerCase().indexOf("png") > -1) { filter = OpenLayers.Util.alphaHack(); } return filter; } Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Christopher Schmidt Sent: Friday, May 15, 2009 10:07 PM To: Ted Scott Cc: users@openlayers.org Subject: Re: [OpenLayers-Users] problem about display two layers On Fri, May 15, 2009 at 03:50:00PM -0400, Ted Scott wrote: > I'm having the same problem with all layers having the transparent: true > attribute set. The lower layers are not visible in IE 6. The map renders > fine in FFx. Yes. 32-bit PNGs (alpha transparency) are not visible in IE6. Use 8-bit PNGs or gifs, or don't support IE6. (Microsoft doesn't.) -- Chris > > Christopher Schmidt wrote: > > On Wed, May 13, 2009 at 01:33:22AM -0700, sasi wrote: > >> When i display two layers with openlayers, I can only see the second layer. > >> After i set the second layer opacity=0.5, I can see the both layers. But the > >> line > >> in the second layer seems to be transparent too. And the first layers seems > >> not be very visibility. > >> So, can i change only the background to transparent, and keep the line to be > >> opacity? > > > > transparent: true parameter in the WMS params. > > > >> The map comes from geoserver. > >> Thanks! > >> -- > >> View this message in context: http://n2.nabble.com/problem-about-display-two-layers-tp2879776p2879776. 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 -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users From crschmidt at metacarta.com Fri May 15 23:04:13 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem about display two layers In-Reply-To: References: <20090515200656.GI19547@metacarta.com> Message-ID: <20090516030413.GA11123@metacarta.com> On Fri, May 15, 2009 at 11:07:01PM +0200, Kris Geusebroek wrote: > OpenLayers supports IE6 transparency through the alphaHack method. > > layer.alpha = setAlpha('image/png'); > function setAlpha(imageformat) > { > var filter = false; > if (imageformat.toLowerCase().indexOf("png") > -1) { > filter = OpenLayers.Util.alphaHack(); > } > return filter; > } But the performance is terrible, and will not be usable in any tiled circumstances. We have deprecated the use of this parameter for that reason, and I would not encourage anyone to use it without a lot of testing to be sure it actually works -- in pretty much all situations I've tested it in, it doesn't. -- Chris > Cheers Kris > > > -----Original Message----- > From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] > On Behalf Of Christopher Schmidt > Sent: Friday, May 15, 2009 10:07 PM > To: Ted Scott > Cc: users@openlayers.org > Subject: Re: [OpenLayers-Users] problem about display two layers > > On Fri, May 15, 2009 at 03:50:00PM -0400, Ted Scott wrote: > > I'm having the same problem with all layers having the transparent: > true > > attribute set. The lower layers are not visible in IE 6. The map > renders > > fine in FFx. > > Yes. 32-bit PNGs (alpha transparency) are not visible in IE6. Use 8-bit > PNGs or gifs, or don't support IE6. (Microsoft doesn't.) > > -- Chris > > > > > Christopher Schmidt wrote: > > > On Wed, May 13, 2009 at 01:33:22AM -0700, sasi wrote: > > >> When i display two layers with openlayers, I can only see the > second layer. > > >> After i set the second layer opacity=0.5, I can see the both > layers. But the > > >> line > > >> in the second layer seems to be transparent too. And the first > layers seems > > >> not be very visibility. > > >> So, can i change only the background to transparent, and keep the > line to be > > >> opacity? > > > > > > transparent: true parameter in the WMS params. > > > > > >> The map comes from geoserver. > > >> Thanks! > > >> -- > > >> View this message in context: > http://n2.nabble.com/problem-about-display-two-layers-tp2879776p2879776. > 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 > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From n.e.kendall at gmail.com Sat May 16 15:58:38 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem loading GML Message-ID: <33fd44f90905161258i4f697620x1de06176a85eb602@mail.gmail.com> Hi All, I'm trying to load a GML file as an overlay. My localhost implementation does not produce an error, but will not show the GML points. The live version on angeloelmi.com gives me a pop-up error, which says that the GML file can't be loaded. I produced the GML file from a SHP file in UTM zone 32 N, I didn't do anything to reproject it. 1) why don't my points show up (is it styling?)? is it projection issues? 2) why don't I get the error in my localhost implementation? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090516/550018bb/attachment.html From roald.dewit at lisasoft.com Sat May 16 22:42:38 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem loading GML In-Reply-To: <33fd44f90905161258i4f697620x1de06176a85eb602@mail.gmail.com> References: <33fd44f90905161258i4f697620x1de06176a85eb602@mail.gmail.com> Message-ID: <4A0F799E.3090301@lisasoft.com> Hi Nicholas, Nicholas Efremov-Kendall wrote: > I'm trying to load a GML file as an overlay. My localhost > implementation does not produce an error, but will not show the GML > points. The live version on angeloelmi.com > gives me a pop-up error, which says that the GML file can't be loaded. > > I produced the GML file from a SHP file in UTM zone 32 N, I didn't do > anything to reproject it. > > 1) why don't my points show up (is it styling?)? is it projection issues? > 2) why don't I get the error in my localhost implementation? Did you try to load the KML file directly in the browser as well? http://angeloelmi.com/kml/sites.kml You'll get a 404 error. If your web server can't find it, how can anyone find it? ;-) However, http://angeloelmi.com/kml/ does give a directory listing. It seems that you have a permission issue: IIS is not allowed to read the files in the /kml directory (yes, it is allowed to list them but not read them). Once you have solved this issue, it will be easier for others to see what causes 1). Regards, Roald From roald.dewit at lisasoft.com Sat May 16 23:05:58 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem loading GML In-Reply-To: <33fd44f90905161956i65c28478q7511b1171574614c@mail.gmail.com> References: <33fd44f90905161258i4f697620x1de06176a85eb602@mail.gmail.com> <4A0F799E.3090301@lisasoft.com> <33fd44f90905161956i65c28478q7511b1171574614c@mail.gmail.com> Message-ID: <4A0F7F16.8050707@lisasoft.com> Hi Nicholas, First of all: please reply to the list instead of directly to me! :-) Nicholas Efremov-Kendall wrote: > Hi Roald, > > The issue is that in the localhost (which is apache not IIS) it > doesn't give an error, and then does not show the points. I thought > the issue was because I didn't specify a coordinate system for the GML > file, which may still be the case, but I'll cross that bridge in time. > The IIS server is a friend of mine's, and I've asked him to give read > permissions. For the moment, I've moved the files to the index, and I > get the same error. Any suggestions? Again: the file cannot be found by your web server: http://angeloelmi.com/sites.gml If your browser gets a 404 error, then surely OpenLayers won't be able to read the file. Regards, Roald From tonidelacalle at gmail.com Sun May 17 07:02:06 2009 From: tonidelacalle at gmail.com (=?ISO-8859-1?Q?toni_hern=E1ndez?=) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] problem loading GML In-Reply-To: <33fd44f90905161258i4f697620x1de06176a85eb602@mail.gmail.com> References: <33fd44f90905161258i4f697620x1de06176a85eb602@mail.gmail.com> Message-ID: <6c28194c0905170402u66b7d784u17f83f2fa13d155b@mail.gmail.com> hi, I had a similar problem. I gml layer didn't show up because there were some xml tags missing. On Sat, May 16, 2009 at 9:58 PM, Nicholas Efremov-Kendall < n.e.kendall@gmail.com> wrote: > Hi All, > > > I'm trying to load a GML file as an overlay. My localhost implementation > does not produce an error, but will not show the GML points. The live > version on angeloelmi.com gives me a pop-up error, which says that the GML > file can't be loaded. > > I produced the GML file from a SHP file in UTM zone 32 N, I didn't do > anything to reproject it. > > 1) why don't my points show up (is it styling?)? is it projection issues? > 2) why don't I get the error in my localhost implementation? > > _______________________________________________ > 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/20090517/74ce43ea/attachment.html From hgnj_025 at 163.com Sun May 17 11:10:51 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] How to show the point in mysql as a marker? Message-ID: <1242573051185-2917420.post@n2.nabble.com> I have stored the point information in mysql and deployed it in geoserver. I can see the point in the map layer using Openlayers.layer.WMS(). How can I show the point as a marker and make a popup for it? -- View this message in context: http://n2.nabble.com/How-to-show-the-point-in-mysql-as-a-marker--tp2917420p2917420.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From DeDuikertjes at xs4all.nl Sun May 17 11:37:13 2009 From: DeDuikertjes at xs4all.nl (DeDuikertjes) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] zooming on large local vector maps behaves very odd Message-ID: <4A102F29.5010802@xs4all.nl> Dear all, I've made an application which shows maps on the basis of local WKT (well known text) files, so there is no mapserver involved. Performance is surprisingly well, even for large amounts of data (at least in Firefox and IE8). The application shows several layers, all in same projection. Now the problem: if the dataset is small, zooming behaves as expected: follow this link to see that: http://tercera-go.tercera-ro.nl/help/voorbeeldplannen/NL.IMRO.0999.BP2008000001-0005/showmap.html?id=Agrarisch, if the dataset is large, zooming is only performed on some of the layers, others are not zoomed, so the layers don't line up anymore as expected. Also the zoombox "sticks to the mouse". if layers are turned off first, the zoomed and then turned on agaia. layers line up as expected. follow this link to see the odd zooming behaviour (same link as before, only more layers): http://tercera-go.tercera-ro.nl/help/voorbeeldplannen/NL.IMRO.0999.BP2008000001-0005/showmap.html?id=Detailhandel,Bedrijventerrein,Agrarisch_met_waarden,Maatschappelijk,Gemengd_-_2,Wonen,Gemengd_-_1,Bedrijf_-_Nutsvoorziening,bouwvlak, problem is more severe on this one: http://tercera-go.tercera-ro.nl/help/voorbeeldplannen/NL.IMRO.0999.BP2008000001-0005/showmap.html?id=Verkeer_-_Parkeren,Verkeer,Maatschappelijk,Verkeer_-_Verblijf,Water,Agrarisch,Wonen_-_uit_te_werken,Wonen,Groen_-_Speelterrein,Groen_-_Beplantingsstrook,Bedrijventerrein,Bedrijf_-_Nutsvoorziening,Agrarisch_met_waarden,Detailhandel,Gemengd_-_1,Groen,Gemengd_-_2,Waarde_-_Archeologie,Leiding_-_Gas,bouwvlak,specifieke_bouwaanduiding_-_aaneengebouwd_%2F_twee-aaneen,vrijstaand,specifieke_bouwaanduiding_-_twee-aaneen_%2F_vrijstaand,gestapeld,onderwijs,bedrijf_tot_en_met_categorie_3,bedrijf_tot_en_met_categorie_2,specifieke_vorm_van_maatschappelijk_-_buurthuis,geluidwal,maximum_bebouwingspercentage_%28%25%29,maximum_aantal_wooneenheden,maximale_goot-_en_bouwhoogte_%28m%29,dwarsprofiel,hartlijn_leiding_-_gas,wro-zone_-_wijzigingsgebied,vrijwaringszone_-_molenbiotoop, (It's easy to experiment with the amount of data by removing some of the layers from the query.) any help and all other suggestions greatly appreciated, MArco From wayne at platoscave.net Sun May 17 12:26:23 2009 From: wayne at platoscave.net (Wayne Dyck) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Vector layer refresh - Popup will not close Message-ID: <4A103AAF.30004@platoscave.net> I am performing a refresh on a vector layer at certain time intervals to update the data on the map. The problem is that if I issue a 'refresh' call when a 'FramedCloud' popup is open I believe the reference to the popup that feature is based on is lost. Is there a way I can force the popup to be closed before calling the 'refresh'? Is there a specific event I should be listening to? Thanks for any assistance. Wayne From asle.benoni at gmail.com Sun May 17 16:17:55 2009 From: asle.benoni at gmail.com (Asle Benoni) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Open Layers on OS X Server? In-Reply-To: <5DF2D1C8-9EF0-4165-A1A0-057D3E8340C0@gmail.com> References: <2AAB86C0-B612-4D23-98A8-5D7A2E6981FE@gmail.com> <4FB05F7C-0AD2-48B2-9D45-A7621865D1E5@gmail.com> <5DF2D1C8-9EF0-4165-A1A0-057D3E8340C0@gmail.com> Message-ID: Hello, Is anyone here running OpenLayers on OS X Server 10.5? I know there are some running on OS X Leopard client. But my problem seems to be on OS X Server. I have confirmed that proxy.cgi works like it should on OS X Leopard when I run Apache locally. When I do a request to proxy.cgi running on OS X Server, the request is malformed as you can see by the discussion under. the response headers show "application/vnd.ogc.se_xml" while it should be: application/vnd.google-earth.kml+XML This has nothing to do with the openlayers code as I have checked this several times. So if anyone has any idea what could be the difference in Apache or the python modules needed for proxy.cgi I can get working with the OL solution. If not I will have to reinstall the OS X Server to OS X Client. And that should not be necessary?? /asle Den 13. mai. 2009 kl. 23.59 skrev Asle Benoni: > Hello again, > Is anyone running proxy.cgi on Mac OS X 10.5 Server? I believe it > must be a problem with server since I have tested it on OS X 10.5 > Leopard client and it works fine there. > > /asle > > Den 13. mai. 2009 kl. 00.03 skrev Asle Benoni: > >> >> Hello, >> This problem is still not solved. I believe it has to do with >> proxy.cgi. If I do a request from proxy.cgi on another linux >> server it works fine but with the proxy.cgi on my Mac OS X Server >> it fails. See the attached screenshots. >> >> The headers that are sent (from proxy.cgi?) is "application/ >> vnd.ogc.se_xml" and it is ...kml... when proxy.cgi is on another >> linux server. >> So you see the response is not interpretable. Is there a another >> version of proxy.cgi for Mac? I checked calling proxy.cgi directly >> and it redirects to openayers.org. So it should work? >> >> Is there a way to rewrite the headers so the server will >> understand it? >> I am completely lost since I cannot use KML or WFS on this server. >> >> /asle >> >> >> Den 26. mars. 2009 kl. 13.31 skrev Alexandre Dube: >> >>> OpenLayers.Format.KMZ doesn't exist. You should try KML instead >>> and have &format=application/vnd.google-earth.kml+XML in your url >>> instead. I never tried it thought, but that's what I would try. >>> >>> By the way, KMZ is a zipped version of a KML. You could replace a >>> file.kmz to file.zip then unzip it and you would have your >>> uncompressed KML. OpenLayers currently can't read KMZ files. >>> >>> Regards, >>> >>> Alexandre >>> >>> Asle Benoni wrote: >>>> Yes, I have read that and configured proxy.cgi with the domains >>>> of the server. >>>> Now the layer I get from GeoServer is KMZ and not KML (don?t know >>>> why) so I put the code like this in my html. >>>> >>>> OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; >>>> >>>> map.addLayer(new OpenLayers.Layer.GML("KML", "http://naturkart.no:8080/geoserver/wms/kml?layers=kulturminner_ns:gravminne&format=application/vnd.google-earth.kmz+XML& >>>> ", >>>> { >>>> format: OpenLayers.Format.KMZ, >>>> formatOptions: { >>>> extractStyles: true, >>>> extractAttributes: true >>>> } >>>> })); >>>> >>>> I see now in FireBug that a http request is done to the kmz file >>>> but I do not see the layer in the map. >>>> >>>> /asle >>>> >>>> >>> >>> >>> -- >>> Alexandre Dub? >>> Mapgears >>> www.mapgears.com >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090517/0aee84e0/attachment.html From roald.dewit at lisasoft.com Sun May 17 20:28:58 2009 From: roald.dewit at lisasoft.com (Roald de Wit) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. In-Reply-To: <1242314255934-2892765.post@n2.nabble.com> References: <1242032405929-2861920.post@n2.nabble.com> <1242119509537-2868140.post@n2.nabble.com> <1242179251694-2878521.post@n2.nabble.com> <1242314255934-2892765.post@n2.nabble.com> Message-ID: <4A10ABCA.2000808@lisasoft.com> Hi sasi, sasi wrote: > thank you very much! > I have stored the point information(lon lat) in the mysql > and deployed the map by geoserver. I can see the point on the map now. > But can I displayed the point as a marker? And can i generate a popup for > the marker? > How can I do it? The vector? > Now is the time to look at the OL examples: http://openlayers.org/dev/examples/ :-) Regards, Roald -- Roald de Wit Software Engineer roald.dewit@lisasoft.com Commercial Support for Open Source GIS Software http://lisasoft.com/LISAsoft/SupportedProducts/ The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. From hgnj_025 at 163.com Mon May 18 01:39:51 2009 From: hgnj_025 at 163.com (sasi) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] How can I display a map with a position changing marker. In-Reply-To: <4A10ABCA.2000808@lisasoft.com> References: <1242032405929-2861920.post@n2.nabble.com> <1242119509537-2868140.post@n2.nabble.com> <1242179251694-2878521.post@n2.nabble.com> <1242314255934-2892765.post@n2.nabble.com> <4A10ABCA.2000808@lisasoft.com> Message-ID: <1242625191424-2930767.post@n2.nabble.com> Thank you. But which example should I refer to? -- View this message in context: http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-marker.-tp2861920p2930767.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From devloic at gmail.com Mon May 18 10:24:36 2009 From: devloic at gmail.com (loic devaux) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] exportGge 0.93 released, supports OpenLayers and Google Earth Plug-in Message-ID: <1242656676330-2933411.post@n2.nabble.com> Dear users, I would like to introduce you version 0.93 of the CartoWeb 3 export plugin exportGge. http://www.cartoweb.org CartoWeb 3 is an open source web mapping software based on UMN MapServer and published by Camptocamp. exportGge allows to view CartoWeb layers with KML, Virtual Earth, Yahoo Maps, geoRSS, geoJSON and now also with OpenLayers and in Google Earth inside the browser with the Google Earth Plug-in . check http://exportgge.sourceforge.net/kml/en for changelog, download and documentation. demo here : http://exportgge.sourceforge.net/kml/en/cartoweb/demo Lo?c -- View this message in context: http://n2.nabble.com/exportGge-0.93-released%2C-supports-OpenLayers-and-Google-Earth-Plug-in-tp2933411p2933411.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From jsanz at osgeo.org Mon May 18 11:24:43 2009 From: jsanz at osgeo.org (Jorge Gaspar Sanz Salinas) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Scale control outside the map Message-ID: Hi, this is my first post on this list, I'm starting to develop with OL and the first think I've to say is that Open Layers (code and docs) is amazing. Well I've been in trouble with the scale control so I want to share the topic, for your interest. Working with OL 2.7, if I create a control passing a div parameter to draw the scale text outside the map, it doesn't place it right. I have to create the control and afterwards set the div parameter in order to have it working. I've debugged a little bit and I think OL is overwriting the custom div with the default one but I'm not an experienced JS dev and I don't know how to resolve this issue. May I create a ticket for 2.8 on trac? Cheers -- Jorge Gaspar Sanz Salinas Ingeniero en Geodesia y Cartograf?a http://wiki.osgeo.org/wiki/Jorge_Sanz From stephane.poirier at usherbrooke.ca Mon May 18 12:10:24 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Error in MSIE 8 creating a vector layer using OpenLayers 2.8 rc2 Message-ID: Hi All, I get an error in new MSIE 8 when adding a layer with the line: var daigridLayer=new OpenLayers.Layer.Vector("DAI Grid"); I use the library OpenLayers 2.8 rc2 and MSIE8 complains with the internal line: style.addRule('olv\\:*',"behavior: url(#default#VML); "+"position: absolute; display: inline-block;") This error does not happen in compatibility mode (MSIE7 and earliers). This error does not happen with Mozilla Firefox. This error does not happen in Google Chrome neither. Regards, St?phane Poirier Professionel de recherche au CARTEL Centre d'Applications et de Recherches en T?l?d?tection D?partement de g?omatique appliqu?e Universit? de Sherbrooke Sherbrooke (Qu?bec), CANADA J1K 2R1 Tel.: (+1 819) 821 8000 #61904 Fax.: (+1 819) 821 7944 Stephane.Poirier@USherbrooke.ca http://www.usherbrooke.ca/cartel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090518/4df65dee/attachment.html From stephane.poirier at usherbrooke.ca Mon May 18 13:41:28 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] How can one programmatically resize a rectangular feature right after it has been drawn? Message-ID: <468333426FC7444D8734FD53665FA5C3@flshedu.usherbrooke.ca> Hi All, How can one programmatically resize a rectangular feature right after it has been drawn? Stephane -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090518/cee3917a/attachment.html From adube at mapgears.com Mon May 18 14:39:05 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Vector layer refresh - Popup will not close In-Reply-To: <4A103AAF.30004@platoscave.net> References: <4A103AAF.30004@platoscave.net> Message-ID: <4A11AB49.4020309@mapgears.com> Hi Wayne, You could try to register a "loadend" listener to the layer. Then, you could destroy all popups on map. Alexandre Wayne Dyck wrote: > I am performing a refresh on a vector layer at certain time intervals to > update the data on the map. The problem is that if I issue a 'refresh' > call when a 'FramedCloud' popup is open I believe the reference to the > popup that feature is based on is lost. > > Is there a way I can force the popup to be closed before calling the > 'refresh'? Is there a specific event I should be listening to? > > Thanks for any assistance. > > Wayne > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From stephane.poirier at usherbrooke.ca Mon May 18 14:50:47 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Anyone has experience using the layers provided by atlas.gc.ca WMS? Message-ID: <4B78162D86174815B330E4A2A15433B1@flshedu.usherbrooke.ca> Hi All, Anyone has experience using the layers provided by atlas.gc.ca WMS? What are the available layers, names and parameters? Stephane Poirier -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090518/0fa5c4b7/attachment.html From adube at mapgears.com Mon May 18 14:53:59 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] help ! In-Reply-To: References: <4A0D653D.2080207@mapgears.com> Message-ID: <4A11AEC7.50805@mapgears.com> Hi Hugo, I understand more what you want to do. Please reply to the list so that users and developers can help you too. I see that you use GeoServer. I'm pretty sure that you can use filters/cql/other (I never used GeoServer but heard about it) to have a specific feature rendered differently. You should ask the GeoServer list for that. You could also have a Vector layer instead of a WMS layer for your roads and define a different style for your results. See http://trac.openlayers.org/wiki/Styles Best regards, Alexandre Hugo Teixeira wrote: > hi, > > i'm using a polyline, this is what i'm doin'g > :http://84.91.20.142:82/webvias/index.php > > try search : rua vale verde > > i found the street and i goes to it, but now i need to highlight the > street to the user ... > > regards, > > hugo > > 2009/5/15 Alexandre Dube > > > Hi Hugo, > > What type of layer are you using ? The easiest way to achieve > this is to use a vector layer with a selectFeature control > hover:true and highlightOnly:true. See the example (1). You need > OpenLayers 2.8 or trunk for the highlightOnly property > > Regards, > > Alexandre > > (1) http://openlayers.org/dev/examples/highlight-feature.html > > Hugo Teixeira wrote: > > how can i hilight one line in openlayers ??? > ------------------------------------------------------------------------ > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com > > > > > -- > Pestinha -- Alexandre Dub? Mapgears www.mapgears.com From stephane.poirier at usherbrooke.ca Mon May 18 16:54:30 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] conversion of bounding boxes to various projections References: <1242246204.4a0b2c3ca88d2@www.usherbrooke.ca> <20090513203256.GA27059@metacarta.com> Message-ID: <159F00196BA148158C64DF979208A754@flshedu.usherbrooke.ca> Hi All, Is it easy to use openlayers to convert bounding boxes from one EPSG to another. With WGS84 world geodesic datum projection EPSG:4326, North America has a bounding box of defaultBounds=new OpenLayers.Bounds(-180, 5, -10, 85); //north america, working with google, nasa, metacarta, etc. var myproj=new OpenLayers.Projection(myepsg); With Lambert Conic Conformal projection EPSG:42304, Canada has a bounding box of defaultBounds=new OpenLayers.Bounds(-2750564.75,-936638.5,3583872.5,4673125); //canada var myepsg="EPSG:42304"; //Lambert Conic Conformal, working with http://atlas.gc.ca/cgi-bin/atlaswms_en var myproj=new OpenLayers.Projection(myepsg); Q: How can I have the bounding box for North America in EPSG:42304? Stephane Stephane Poirier - Research professional Center of Applications in Remote Sensing Applied Geomatics Department University of Sherbrooke Sherbrooke (Quebec), CANADA J1K 2R1 Tel.: (+1 819) 821 8000 #61904 Fax.: (+1 819) 821 7944 Stephane.Poirier@USherbrooke.ca http://www.usherbrooke.ca/cartel P.S.: //works fine defaultBounds=new OpenLayers.Bounds(-180, 5, -10, 85); //north america var myepsg="EPSG:4326"; //working with google, nasa, metacarta, etc.) //works fine //BBOX=-2750564.75,-936638.5,3583872.5,4673125 //for canada defaultBounds=new OpenLayers.Bounds(-2750564.75,-936638.5,3583872.5,4673125); //north america var myepsg="EPSG:42304"; //Lambert Conic Conformal, working with http://atlas.gc.ca/cgi-bin/atlaswms_en var myproj=new OpenLayers.Projection(myepsg); //How to specify northern hemisphere //defaultBounds=new OpenLayers.Bounds(-180, 0, +180, 90); //north hemisphere? defaultBounds=new OpenLayers.Bounds(?, ?,?,?); //north hemisphere var myepsg="EPSG:102018"; //North Pole Stereographic, working with http://atlas.gc.ca/cgi-bin/atlaswms_en var myproj=new OpenLayers.Projection(myepsg); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090518/79f225af/attachment.html From eric.lemoine at camptocamp.com Mon May 18 18:02:09 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] [OpenLayers-Dev] Getting Help Faster: Minimize Your Code In-Reply-To: <20090515162153.GG19547@metacarta.com> References: <20090515162153.GG19547@metacarta.com> Message-ID: thanks a lot for putting this email together Chris, shall we copy&paste it somewhere for future reference? -- Eric On Friday, May 15, 2009, Christopher Schmidt wrote: > Hi, > > (Cross-posted to dev and users: please send all replies to the users list.) > > Many times, users have come to me, or asked questions in IRC, related to > getting help with a particular behavior. Whether that behavior is a bug > or user error, there is one thing that you can do to make it more > likely that a developer will be able to quickly help you with your > problem. (In some cases, this is the difference between getting help at > all, and simply not receiving any.) I have never seen any situation > where this rule does not apply, and so I want to share it publicly with > the users and dev communities so that we can all learn from it, and > learn how to help each other more quickly and easily. > > (Throughout this post, I use the terms 'developers' and 'users'. By > these terms, I mean "persons who have knowledge of the code inside of > the OpenLayers library" and "persons who have knowledge of using the > OpenLayers library, but not what is inside the library itself.") > > Minimizing Test Cases > --------------------- > > In order for developers to help fix a problem, they first have to > understand it. In order to do that, they need to understand everything > thati s going on in a situation where the problem is reproducible. > Oftentimes, the particular behavior is only existing in a certain type > of situation, or in a limited case that is not exploited by the commonly > used code. (In addition, some problems are the result of user error in > some way.) > > In order to help developers help you, the best thing to do is to > minimize the error to the *smallest amount of code that can cause it to > happen*. Additionally, when attempting to reproduce, any developer will > need to set up the code so that it is possible to run in the developer's > test environment. This means that it is ideal to remove external > references to other Javascript files, and external files at all, where > possible. (Clearly, this is not always possible: WFS server bugs can't > typically be demonstrated inside of a single page, for example -- but > you should minimize external dependancies as much as possible.) > > Once you've done this, you should remove *all non-neccesary lines of > code* from your example. Does the problem require the ScaleBar control > in order to manifest itself? If not, toss it. Does it need multiple > layers? If not, toss them. In short, any line of code that is not > directly related to reproducing the problem should be removed, as each > line will need to be read by the developer -- and in the case of > multiple developers working on a problem, read by *each* developer -- in > order to determine whether the problem is related to that. > > This minimization step should include removing any unneccesary > Javascript, unneccesary CSS files, unneccesary HTML, etc. until the > resulting code is as small as possible. > > Many times, in doing this, you will come across a particular > minimization step that causes the problem to go away. This is a good > sign, because it means you have narrowed the problem down to that > particular aspect of code. Put it back, and keep minimizing. > > Additionally, many times in doing this, you find a particular construct > in your code that can help you understand how to work around the > problem. > > If not, then continue onto the next section. > > OpenLayers Library References > ============================= > > There are multiple hosted versions of the OpenLayers library. > > ?http://openlayers.org/api/OpenLayers.js > > This will always represent the most recent released 'stable' version of > the OpenLayers API. > > ?http://openlayers.org/dev/OpenLayers.js > > This is always a 10-minute delayed build of OpenLayers trunk. > > To simplify allowing developers to set up the code on their own testing > environments, it is often beneficial to point directly to one of these > library URLs. In addition, this also ensures that the problem is not > something specific to your build of OpenLayers. > > Publishing your Problem > ----------------------- > > Once you have minimized your test case, you need to publish it. In > general, it is easiest if you publish an HTML page on a web accessible > URL. Even if your project is not yet public, you can likely put a page > up on another server which demonstrates the problem. Doing this is much > more likely to have a developer actually follow the link and explore > your problem. This is *especially* true for things like WFS which > require a proxy to work correctly: ?Downloading the page, setting up a > proxy, and testing locally is a lot of work for a developer simply to > confirm that a problem exists. > > If you do not have *any* place to publish webpages, you can attempt to > paste your code to a public site like 'nopaste.com'. However, be aware > that doing so means that a developer has to perform more steps to > reproduce your problem -- and every step is one that makes the problem > less likely to be solved quickly and easily. > > Communicating about your Problem > -------------------------------- > > The best way to communicate your problem is to send an email to the > users list demonstrating the problem. Oftentimes other users will be > able to point out a particular flaw in your code that is causing the > error, or explain that the behavior is a known lack of functionality in > OpenLayers. > > *Be clear on steps for reproduction*. Users who don't know what they're > supposed to do to cause the bug will not be able to see it, and if they > can't see it, they can't help you. > > If you have determined the particular change in the OpenLayers source > code which is required to change the behavior, then it is more likely > that the Developers list is the best place to go. Any discussion which > involves code from OpenLayers itself is probably better suited for the > dev list. > > Finally, > -------- > > By following the steps: > ?* Simplify/Minimize > ?* Publish > ?* Communicate > > (If you'd like, you can toss a "???, Profit!" at the end of this.) > > You can ensure that it is as easy as possible for a developer to > determine whether the problem you're having is with the library. You > also make it easier for develpoers and users to find potential problems > in your usage of the library and suggest solutions. Finally, you may > find in the process that you find the bug yourself, thus saving yourself > and everyone else time in trying to debug. > > The end result is a more workable system for everyone. The easier it is > to understand the problem you're having, the faster, and more easily, > you will be able to get help. > > Best Regards, > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Dev mailing list > Dev@openlayers.org > http://openlayers.org/mailman/listinfo/dev > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From ijturton at gmail.com Mon May 18 18:09:55 2009 From: ijturton at gmail.com (Ian Turton) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] Anyone has experience using the layers provided by atlas.gc.ca WMS? In-Reply-To: <4B78162D86174815B330E4A2A15433B1@flshedu.usherbrooke.ca> References: <4B78162D86174815B330E4A2A15433B1@flshedu.usherbrooke.ca> Message-ID: 2009/5/18 : > Hi All, > > Anyone has experience using the layers provided by atlas.gc.ca WMS? > What are the available layers, names and parameters? http://atlas.nrcan.gc.ca/site/english/dataservices/web_map_service.html Ian > > Stephane Poirier > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- Ian Turton http://www.geotools.org http://pennspace.blogspot.com/ From n.e.kendall at gmail.com Mon May 18 18:21:21 2009 From: n.e.kendall at gmail.com (Nicholas Efremov-Kendall) Date: Wed Sep 1 17:17:28 2010 Subject: [OpenLayers-Users] maxExent is Null. Message-ID: <33fd44f90905181521n7399e300v30697a231defb32e@mail.gmail.com> Hi All, Again, newbie issues, but maybe someone can suggest something for clarity. I'm trying to set up a map in Epsg:22332 (utm 32n). However, I'm getting a firebug error maxExtent is null. here is the short version of my code
____________________________ ____________________ ____________________________ -- View this message in context: http://n2.nabble.com/ZoomToExtent-works-in-Firefox%2C-Safari-and-IE7%2C-but-not-in-IE6-tp2969934p2969934.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From peroc79 at gmail.com Mon May 25 13:46:12 2009 From: peroc79 at gmail.com (Pere Roca Ristol) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] show/hide WFS layer without multiple WFS requests Message-ID: <1243273572098-2970877.post@n2.nabble.com> hi all, I just want to hide/show a wfs layer but I see that, even using wfs.setVisibility(false/true) or applying a transparent style (and then wfs.redraw), each time the WFS request is sent again. It has its own logic... but maybe there is a way to avoid these requests again and again? thanks! Pere -- View this message in context: http://n2.nabble.com/show-hide-WFS-layer-without-multiple-WFS-requests-tp2970877p2970877.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From George at muammar.net Mon May 25 16:36:39 2009 From: George at muammar.net (Geo-rge) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] beforefeatureremoved event causes CLASS_NAME is null error Message-ID: <1243283799780-2971548.post@n2.nabble.com> Dear list, I am attempting to use the beforefeatureremoved event on a layer. I must admit it is not very clear to me which of the following I should use (I am not sure why the 2nd para is needed anyway). layer.events.register("beforefeatureremoved", layer, function) or layer.events.register("beforefeatureremoved", layer.events, function) in either case I get a CLASS_NAME is null or not an object error. Any help is appreciated. PS suprised I found nothing on this event in this forum. Has deleting gone out of fashion ? Regards George Mu'ammar -- View this message in context: http://n2.nabble.com/beforefeatureremoved-event-causes-CLASS_NAME-is-null-error-tp2971548p2971548.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From halext at gmail.com Mon May 25 19:53:43 2009 From: halext at gmail.com (Hugo Teixeira) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] wfs ! Message-ID: hi, i'm trying to create like the example below, one way to save the point that i made to the postgres/postgis database. i can make the point but it dosent save anything. i used the example of openlayers but nothing, i't dosen't save, how can i save tha point that i made to the data base ?? http://84.91.20.142:82/weblinhaverde/index.php -- best regards, hugo teixeira -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090526/29be4ace/attachment.html From andre at covaluate.com Mon May 25 20:04:58 2009 From: andre at covaluate.com (Andre Lockhart) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Best way to add/move/delete icons on map by users In-Reply-To: <1243283799780-2971548.post@n2.nabble.com> References: <1243283799780-2971548.post@n2.nabble.com> Message-ID: <009001c9dd95$9bffd4b0$d3ff7e10$@com> Hi, It has been a while since we've used OpenLayers for any dynamic behavior. What is the current recommended way to enable users to: 1. Drop icons on the map 2. Click on (new) icons to open a popup and add more info 3. Drag to change the locations of icons 4. Delete icons We are pretty comfortable with PostGIS, but are hoping to avoid using GeoServer if there's a more simple way that doesn't assume WFS. Thanks! Dre From petedawn at gmail.com Mon May 25 21:03:27 2009 From: petedawn at gmail.com (Peter Dawn) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] IE6 GIF transparency issue Message-ID: <5dd88dab0905251803k3c7a987ev4d51c42583e7e5d8@mail.gmail.com> hi everyone, am trying to implement a geoserver/open layer solution. now i need to use IE6, hence my image format needs to be GIF (as you know PNG is not supported by IE6). so my question is how can i achieve layer transparency with IE6 and GIF format. i have tried untiled = new OpenLayers.Layer.WMS( "Locality", "http://localhost:8080/geoserver/wms", { height: '600', width: '600', layers: 'my_layer', styles: '', transparent: 'TRUE', format: format, tiled: 'true', }, but am still not able to achieve transparency. if i use PNG and use firefox it works. but i need to use IE6 and hence GIF. any help. thanks. pete. From SansonR at asurequality.com Mon May 25 22:22:52 2009 From: SansonR at asurequality.com (Robert Sanson) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] IE6 GIF transparency issue In-Reply-To: <5dd88dab0905251803k3c7a987ev4d51c42583e7e5d8@mail.gmail.com> References: <5dd88dab0905251803k3c7a987ev4d51c42583e7e5d8@mail.gmail.com> Message-ID: <4A1BFB3A.379F.0037.0@asurequality.com> Hi Peter Try opacity setting as per below. Cheers, Robert >>> Peter Dawn 26/05/2009 1:03 p.m. >>> hi everyone, am trying to implement a geoserver/open layer solution. now i need to use IE6, hence my image format needs to be GIF (as you know PNG is not supported by IE6). so my question is how can i achieve layer transparency with IE6 and GIF format. i have tried untiled = new OpenLayers.Layer.WMS( "Locality", "http://localhost:8080/geoserver/wms", { height: '600', width: '600', layers: 'my_layer', styles: '', transparent: 'TRUE', format: format, tiled: 'true', }, {singleTile: true, isBaseLayer: false, opacity: 0.5, maxResolution: 500000, visibility: false} ); but am still not able to achieve transparency. if i use PNG and use firefox it works. but i need to use IE6 and hence GIF. any help. thanks. pete. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ------------------------------------------------------------------ The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message. ------------------------------------------------------------------ This message has been scanned for malware by SurfControl plc. www.surfcontrol.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090526/abdc5533/attachment.html From petedawn at gmail.com Mon May 25 23:34:51 2009 From: petedawn at gmail.com (Peter Dawn) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Check and uncheck layers Message-ID: <5dd88dab0905252034s49e508f2wc1096fd93b58bc1c@mail.gmail.com> hi everyone, this is related to the plus sign on my open layer which i use to hide and unhide layers. after i have unchecked a layer and i re-check it, the layer is a bit off on the google map. i mean the layer isn't exactly at the right place. but if i move google maps a little bit, the layer realigns properly. would anybody know the solution to this. thanks again. pete. From kgeusebroek at xebia.com Tue May 26 02:32:27 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] show/hide WFS layer without multiple WFS requests In-Reply-To: <1243273572098-2970877.post@n2.nabble.com> References: <1243273572098-2970877.post@n2.nabble.com> Message-ID: Hi Pere, I don't know which version you use but i'm successfully using the 2.8 rc3 version with a vector layer, a bbox strategie and a wfs protocol which when visibility is false doesn't fire reuests. I'm using refresh on the vector layer instead of redraw by the way If you need a code example feel free to ask. Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Pere Roca Ristol Sent: Monday, May 25, 2009 7:46 PM To: users@openlayers.org Subject: [OpenLayers-Users] show/hide WFS layer without multiple WFS requests hi all, I just want to hide/show a wfs layer but I see that, even using wfs.setVisibility(false/true) or applying a transparent style (and then wfs.redraw), each time the WFS request is sent again. It has its own logic... but maybe there is a way to avoid these requests again and again? thanks! Pere -- View this message in context: http://n2.nabble.com/show-hide-WFS-layer-without-multiple-WFS-requests-t p2970877p2970877.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 k_karo at web.de Tue May 26 04:49:16 2009 From: k_karo at web.de (moony) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Overlay on Google Message-ID: <1243327756675-2973539.post@n2.nabble.com> Hello, I have two baselayers. When I use basemap as baselayer, I could add the overlay, but with google as baselayer I got a error message "Paramenter 'src' contains unacceptable value". The services are delivered by arcgis server 9.3. I cannot see my mistake. What did I forget? Below is my code. The services are only available within intranet. Thanks! var map; var webproj = "EPSG:102113"; var webextent = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34); var webunits= "m"; function init(){ var options = { maxExtent : webextent, projection: webproj, units: webunits, maxResolution: 156543.0339, numZoomLevels: 9 }; map = new OpenLayers.Map( $('map') , options); var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_HYBRID_MAP, 'sphericalMercator': true} ); map.addLayer(gphy); var basemap = new OpenLayers.Layer.WMS( "Basemap", "http://xen1ags:8399/arcgis/services/Monitor/Bevoelkerung_Bundesland_Web_Mercator/MapServer/WMSServer", {layers: '0', format: 'image/png', transparent: 'true'}, {singleTile: true, isBaseLayer: true}); map.addLayer(basemap); var wms = new OpenLayers.Layer.WMS( "WMS", "http://xen1ags:8399/arcgis/services/Monitor/Bevoelkerung_Bundesland_Web_Mercator/MapServer/WMSServer", {layers: '1', srs: 'EPSG:102113', format: 'image/png', transparent: 'true'}, {'reproject': false, 'opacity': 0.4, isBaseLayer: false}); map.addLayer(wms); map.setCenter(OpenLayers.Layer.SphericalMercator.forwardMercator(10.205188,51.457593), 6); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.MousePosition()); } -- View this message in context: http://n2.nabble.com/Overlay-on-Google-tp2973539p2973539.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From martijnsendenspam at gmail.com Tue May 26 04:51:44 2009 From: martijnsendenspam at gmail.com (sendeman) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] ZoomToExtent works in Firefox, Safari and IE7, but not in IE6 In-Reply-To: <1243262420790-2969934.post@n2.nabble.com> References: <1243262420790-2969934.post@n2.nabble.com> Message-ID: <1243327904016-2973551.post@n2.nabble.com> Hi All, Does anybody have any ideas that might be of help for the problem I described previously? Thanks a lot in advance for any help. If I didn't explain the problem well enough, please let me know, so I can clarify it. Best regards, Martijn Senden. sendeman wrote: > > Hi all, > > I'm trying to make a 'fluid' layout, in which the viewport of the map > changes with changes in the size of the browser window. I have some html > and css worked out that do this without javascript in IE6. The only > problem I have is that the initial zoom level doesn't work in IE 6. IE 6 > zooms in to the maximum level. Other browsers (IE7, FF, Safari, Chrome) do > set the zoom level correctly. > > I set the zoom level as follows: > > map.zoomToExtent(new > OpenLayers.Bounds(3.27392578125,50.69471783819287,7.294921875,53.67068019347264)); > > What is it that makes IE 6 go wrong? > > Any help would be greatly appreciated! > > Below is the entire code of my test-site. > > Best regards, > Martijn Senden. > > ____________________________ > ____________________ > ____________________________ > > "http://www.w3.org/TR/html4/strict.dtd"> > > > > minOpenLayers.aspx > > > > > > > > > > > > > > > > > >
> > > > > ____________________________ > ____________________ > ____________________________ > -- View this message in context: http://n2.nabble.com/ZoomToExtent-works-in-Firefox%2C-Safari-and-IE7%2C-but-not-in-IE6-tp2969934p2973551.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roselinda.ackermans at ec.europa.eu Tue May 26 05:17:53 2009 From: roselinda.ackermans at ec.europa.eu (Linde Ackermans) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] How to get list of all Layers from a wms servoce? In-Reply-To: <20090416171752.pnbvt6nn8qogwk40@webmail.muammar.net> References: <1239886955589-2642660.post@n2.nabble.com> <43336.145.50.39.11.1239887242.squirrel@webmail.hostingdiscounter.nl> <20090416171752.pnbvt6nn8qogwk40@webmail.muammar.net> Message-ID: <1243329473787-2973649.post@n2.nabble.com> Hi, An example for WMSCapabilities ( but I don't know how to expose all of the properties, like srs, etc...) Hope it is helpfull. Read WMS Capabilities Geo-rge wrote: > > Hello list, > > Does anybody have a good sample regarding WMSCapabilities, > WMSDescribeLayer and WMSGetFeatureInfo ? It would be very useful! > > -- View this message in context: http://n2.nabble.com/How-to-get-a-list-of-all-layers-from-a-wms-service--tp2642660p2973649.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From roselinda.ackermans at ec.europa.eu Tue May 26 05:43:41 2009 From: roselinda.ackermans at ec.europa.eu (Linde Ackermans) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] IE6 GIF transparency issue In-Reply-To: <5dd88dab0905251803k3c7a987ev4d51c42583e7e5d8@mail.gmail.com> References: <5dd88dab0905251803k3c7a987ev4d51c42583e7e5d8@mail.gmail.com> Message-ID: <1243331021442-2973736.post@n2.nabble.com> Pete, I managed to do this in 2 different ways : 1. Use the alpha hack on .png var boundaries = new OpenLayers.Layer.WMS("Layer1", "http://your-url", { layers: "0,1,2" ,transparent: "true" ,srs: "EPSG:3035" }, {'buffer':0, 'format':"image/png", 'isBaseLayer':false, 'transparent':true}, {'alpha':true} ); 2. Specify "image/gif" as the format ( but I think you specify your format in the wrong place !! ) var boundaries = new OpenLayers.Layer.WMS("Layer1", "http://your-url", { layers: "0,1,2" ,transparent: "true" ,srs: "EPSG:3035" }, {'buffer':0, 'format':"image/gif", 'isBaseLayer':false, 'transparent':true} ); Both work in Firefox, IE6 and IE7 Peter Dawn wrote: > > > now i need to use IE6, hence my image format needs to be GIF (as you > know PNG is not supported by IE6). > > so my question is how can i achieve layer transparency with IE6 and > GIF format. i have tried > > untiled = new OpenLayers.Layer.WMS( > "Locality", "http://localhost:8080/geoserver/wms", > { > height: '600', > width: '600', > layers: 'my_layer', > styles: '', > transparent: 'TRUE', > format: format, > tiled: 'true', > }, > > but am still not able to achieve transparency. if i use PNG and use > firefox it works. but i need to use IE6 and hence GIF. > > any help. > > thanks. > pete. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/IE6-GIF-transparency-issue-tp2972366p2973736.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From stuart.jones at jacobs.com Tue May 26 06:34:36 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] MapGuide useHttpTile with IIS Message-ID: <1243334076816-2973909.post@n2.nabble.com> Dear all I've been goofing around with the new "useHttpTile" flag to allow direct access to pre-generated MapGuide tiles and it's brilliant - so thanks to all those who have contributed. Although I'm successfully accessing the tiles via HTTP, I now need to implement a custom 404 in IIS to redirect to the MapGuide server should the requested tile be missing. I had a look at the Apache version... http://trac.osgeo.org/mapguide/wiki/CodeSamples/Tiles/ServingTilesViaHttp http://trac.osgeo.org/mapguide/wiki/CodeSamples/Tiles/ServingTilesViaHttp ...but the "REDIRECT_URL" server parameter is not supported in IIS. I will work on an alternative but in the meantime thought I'd see whether anyone else has developed an equivalent script which they're happy to share? The other question I have is over the new "querystring" parameter option. I can't find any explanation of suitable values for this. Can anyone help? FYI this is the patch page: http://trac.openlayers.org/changeset/9004 http://trac.openlayers.org/changeset/9004 Thanks Stuart -- View this message in context: http://n2.nabble.com/MapGuide-useHttpTile-with-IIS-tp2973909p2973909.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From zac.spitzer at gmail.com Tue May 26 06:40:47 2009 From: zac.spitzer at gmail.com (Zac Spitzer) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] MapGuide useHttpTile with IIS In-Reply-To: <1243334076816-2973909.post@n2.nabble.com> References: <1243334076816-2973909.post@n2.nabble.com> Message-ID: <7a85053e0905260340r3b937091rd68de15c46c6ecb6@mail.gmail.com> try googling IIS errordocument :) but I would suggest try using nginx rather than IIS, it's waaaayy faster querystring was added to allow additional params to be passed, as noted in http://trac.openlayers.org/ticket/1622 z On Tue, May 26, 2009 at 8:34 PM, gingerbbm wrote: > > Dear all > > I've been goofing around with the new "useHttpTile" flag to allow direct > access to pre-generated MapGuide tiles and it's brilliant - so thanks to all > those who have contributed. Although I'm successfully accessing the tiles > via HTTP, I now need to implement a custom 404 in IIS to redirect to the > MapGuide server should the requested tile be missing. > > I had a look at the Apache version... > > http://trac.osgeo.org/mapguide/wiki/CodeSamples/Tiles/ServingTilesViaHttp > http://trac.osgeo.org/mapguide/wiki/CodeSamples/Tiles/ServingTilesViaHttp > > ...but the "REDIRECT_URL" server parameter is not supported in IIS. I will > work on an alternative but in the meantime thought I'd see whether anyone > else has developed an equivalent script which they're happy to share? > > The other question I have is over the new "querystring" parameter option. I > can't find any explanation of suitable values for this. Can anyone help? > > FYI this is the patch page: > > http://trac.openlayers.org/changeset/9004 > http://trac.openlayers.org/changeset/9004 > > Thanks > Stuart > -- > View this message in context: http://n2.nabble.com/MapGuide-useHttpTile-with-IIS-tp2973909p2973909.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Zac Spitzer - http://zacster.blogspot.com +61 405 847 168 From stuart.jones at jacobs.com Tue May 26 07:44:23 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] MapGuide useHttpTile with IIS In-Reply-To: <7a85053e0905260340r3b937091rd68de15c46c6ecb6@mail.gmail.com> References: <1243334076816-2973909.post@n2.nabble.com> <7a85053e0905260340r3b937091rd68de15c46c6ecb6@mail.gmail.com> Message-ID: <1243338263163-2974190.post@n2.nabble.com> Under ticket 1622 which you linked to it says "To support on-the-fly generation, the querystring should also include the name of the mapdefiniton". Presumably this is as opposed to hard-coding this information in the redirect PHP script? -- View this message in context: http://n2.nabble.com/MapGuide-useHttpTile-with-IIS-tp2973909p2974190.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From crschmidt at metacarta.com Tue May 26 08:42:40 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Check and uncheck layers In-Reply-To: <5dd88dab0905252034s49e508f2wc1096fd93b58bc1c@mail.gmail.com> References: <5dd88dab0905252034s49e508f2wc1096fd93b58bc1c@mail.gmail.com> Message-ID: <20090526124239.GB28547@metacarta.com> On Tue, May 26, 2009 at 01:34:51PM +1000, Peter Dawn wrote: > hi everyone, > > this is related to the plus sign on my open layer which i use to hide > and unhide layers. after i have unchecked a layer and i re-check it, > the layer is a bit off on the google map. i mean the layer isn't > exactly at the right place. but if i move google maps a little bit, > the layer realigns properly. > > would anybody know the solution to this. What type of layer? What is the other setup? What OpenLayers version? Have you produced a minimized example? (http://openlayers.org/pipermail/users/2009-May/011865.html) Regards, -- Christopher Schmidt MetaCarta From barbara.fiederer at web.de Tue May 26 08:57:43 2009 From: barbara.fiederer at web.de (Barbara Fiederer) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] WFS-T example won't work because of error in gears_init.js line 51 Message-ID: <970342611@web.de> Hi out there, I'm new to OpenLayers, so this might be an easy problem, but I can't get it solved on my own. At the moment I try to understand the examples on the OpenLayers.org-Site and to adjust them to my data. The easier ones worked out fine. But now I cannot get a WFS-T example to work. I tried two of them in the examples list of OpenLayers.org and for a last try the WFS-T Demo provided by Geoserver. Two examples throw the same error in gears_init.js line 51 "factory = new ActiveXObject('Gears.Factory'); ". I tried to install it, but since I do not have Autocad installed it won't work. In the end I tried to copy the source text of the geoserver example, that works fine on the geoserver I use and I adjust only the pathnames to css, openLayers-Library and geodata (tasmania) on the same geoserver, but get the same error. Has anyone got an idea that could help me. I use FF 3.0.10, OL 2.7 on windows XP Thanks, Barbara ____________________________________________________________________ Neu: WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und Telefonanschluss f?r 17,95 Euro/mtl.!* http://produkte.web.de/go/02/ From adube at mapgears.com Tue May 26 09:06:02 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] WFS-T example won't work because of error in gears_init.js line 51 In-Reply-To: <970342611@web.de> References: <970342611@web.de> Message-ID: <4A1BE93A.6000903@mapgears.com> Hi Barbara, Have you tried to look "step-by-step" at what's going on in the code using firebug ? Do you see the request sent ? Do you get a response ? Is there a server-side error message ? Try to figure exactly where the error occurs by putting breakpoints. That might helps a lot, Alexandre Barbara Fiederer wrote: > Hi out there, > > I'm new to OpenLayers, so this might be an easy problem, but I can't get it solved on my own. > > At the moment I try to understand the examples on the OpenLayers.org-Site and to adjust them to my data. The easier ones worked out fine. But now I cannot get a WFS-T example to work. I tried two of them in the examples list of OpenLayers.org and for a last try the WFS-T Demo provided by Geoserver. > > Two examples throw the same error in gears_init.js line 51 "factory = new ActiveXObject('Gears.Factory'); ". > I tried to install it, but since I do not have Autocad installed it won't work. > > In the end I tried to copy the source text of the geoserver example, that works fine on the geoserver I use and I adjust only the pathnames to css, openLayers-Library and geodata (tasmania) on the same geoserver, but get the same error. > > Has anyone got an idea that could help me. > > I use FF 3.0.10, OL 2.7 on windows XP > > Thanks, Barbara > ____________________________________________________________________ > Neu: WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und > Telefonanschluss f?r 17,95 Euro/mtl.!* http://produkte.web.de/go/02/ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dub? Mapgears www.mapgears.com From eric.lemoine at camptocamp.com Tue May 26 09:12:32 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] WFS-T example won't work because of error in gears_init.js line 51 In-Reply-To: <970342611@web.de> References: <970342611@web.de> Message-ID: On Tue, May 26, 2009 at 2:57 PM, Barbara Fiederer wrote: > Hi out there, > > I'm new to OpenLayers, so this might be an easy problem, but I can't get it solved on my own. > > At the moment I try to understand the examples on the OpenLayers.org-Site and to adjust them to my data. The easier ones worked out fine. But now I cannot get a WFS-T example to work. I tried two of them in the examples list of OpenLayers.org and for a last try the WFS-T Demo provided by Geoserver. > > Two examples throw the same error in gears_init.js line 51 "factory = new ActiveXObject('Gears.Factory'); ". It may be that the error you're seeing in the FireBug console is actually unrelated to Gears. Try removing the gears_init.js entry from the jsfiles array in OpenLayers.js. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From michogar at gmail.com Tue May 26 11:31:13 2009 From: michogar at gmail.com (Micho Gar) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Problems with WMS filter Message-ID: <5b9547fb0905260831w747c5a1cs20fe0eb39d5957ee@mail.gmail.com> Hi to all, I have a strange problem in my application. I have 2 WMS layers, make with the next code: var Servicios = new OpenLayers.Layer.WMS( "Servicios", "http://localhost:8080/geoserver/wms", { layers: 'osmius:usuarios_servicios', srs: 'EPSG:4326', format: format, transparent : 'true', projection: "EPSG:4326" }, {buffer: 0,singleTile: true, ratio: 1} ); I also have 2 Google Layers, make to this form: var gmap = new OpenLayers.Layer.Google( "Google Streets", // the default {numZoomLevels: 20} ); After I have a Javascript function where I filter the WMS data: function cargaTodasInstanciasServicio(filtro){ //carga todas las instancias del servicio cargaServicios(filtro); var filtro_temp = "IDN_SERVICE='" + filtro + "'" ; var filterParams = { cql_filter: null }; if (OpenLayers.String.trim(filtro_temp) != "") { filterParams["cql_filter"] = filtro_temp; } //aplico el filtro pero a la capa instancias; var a_wms = wmses[1]; a_wms.mergeNewParams(filterParams); } My problem is that the filter result is not in the same position that the origin, and when I move the map they back to the good position. Do you know, with my short explanation, which would the problem?? Thanks. -- # michogar # Analista Programador SIG # GNU/Linux Counter 462666 Una visi?n personal: http://michogar.blogspot.com El dia a dia: http://twitter.com/michogar Sent from Madrid, Spain -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090526/0cf8b301/attachment.html From stephane.poirier at usherbrooke.ca Tue May 26 13:27:24 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] seeking more degrees of freedom when modifying rectangle feature Message-ID: Hi All, To modify a feature, I currently use the drawcontrols code here below. When I have rectangle feature, I would like to have more flexibility when resizing (i.e. proportions not conserved). Do I have to switch to another type of feature to have more dregree of freedom when modifying the feature? drawControls = { modify: new OpenLayers.Control.ModifyFeature(rectangleLayer, {'displayClass': 'olControlModifyFeature', onModification: rectangle_feature_modified, mode: //OpenLayers.Control.ModifyFeature.RESHAPE | OpenLayers.Control.ModifyFeature.DRAG | OpenLayers.Control.ModifyFeature.RESIZE}) }; Regards, St?phane Poirier Professionel de recherche au CARTEL Centre d'Applications et de Recherches en T?l?d?tection D?partement de g?omatique appliqu?e Universit? de Sherbrooke Sherbrooke (Qu?bec), CANADA J1K 2R1 Tel.: (+1 819) 821 8000 #61904 Fax.: (+1 819) 821 7944 Stephane.Poirier@USherbrooke.ca http://www.usherbrooke.ca/cartel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090526/9315b161/attachment.html From bthoen at gisnet.com Tue May 26 16:50:36 2009 From: bthoen at gisnet.com (Bill Thoen) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Comparision between MapServer/OpenLayers and ESRI ArcIMS Message-ID: <4A1C561C.3050209@gisnet.com> I need to make a case for developing a map and data server using Open Source software such as MapServer, Open Layers, PostgereSQL/PostGIS to counter a proposal to go with ESRI's solutions. The client who this would be directed to manages a lot of land parcels on which some development is planned. As part of the support for this, the object is to build an Internet-accessible server that maintains about 800Gb of spatial and tabular data, that can provide interactive maps of the properties, data downloads of selected areas and layers in shapefile, AutoCAD and other formats. It also needs to generate 3D surfaces from dense LiDAR data that's available. It also needs a database cataloging system that can be searched for data held in the system. Finally, it needs to provide different access privileges to various personnel who will be using restricted data sets. So what I need are some *current* facts about what packages are needed to do this completely with ESRI software and what it will cost. Have any of you had to address this 800-lb gorilla problem recently and do you have any advice or facts I can use to keep my contract? I have to present my case to people who don't know much about GIS so I think price is going to be my best argument. So far, all I've been able to ascertain is that an Internet license for ArcIMS costs about $9 - $10K per dual core machine. Is that true? And don't you also need ArcSDE for the database connection, and some Arc3D for surface generation from LiDAR and copies of ArcGIS all around, and is data downloading even available through ArcIMS? What functionality comes "out-of-the-box" with ESRI's tools that meets what I've listed above? Is there something in the ESRI stable that can maintain differential, password-protected user access? How much would still have to be developed? And what about training and staff to maintain the system? What's that cost? If anyone has answers to any of these questions I'd be grateful if you could give me some facts. As it stands I can put those questions out for consideration, but I'd like to know the answers too. Thanks, - Bill Thoen From crschmidt at metacarta.com Tue May 26 17:49:57 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Comparision between MapServer/OpenLayers and ESRI ArcIMS In-Reply-To: <4A1C561C.3050209@gisnet.com> References: <4A1C561C.3050209@gisnet.com> Message-ID: <20090526214957.GI28547@metacarta.com> On Tue, May 26, 2009 at 02:50:36PM -0600, Bill Thoen wrote: > I need to make a case for developing a map and data server using Open > Source software such as MapServer, Open Layers, PostgereSQL/PostGIS to > counter a proposal to go with ESRI's solutions. The client who this > would be directed to manages a lot of land parcels on which some > development is planned. As part of the support for this, the object is > to build an Internet-accessible server that maintains about 800Gb of > spatial and tabular data, that can provide interactive maps of the > properties, data downloads of selected areas and layers in shapefile, > AutoCAD and other formats. It also needs to generate 3D surfaces from > dense LiDAR data that's available. It also needs a database cataloging > system that can be searched for data held in the system. Finally, it > needs to provide different access privileges to various personnel who > will be using restricted data sets. > > So what I need are some *current* facts about what packages are needed > to do this completely with ESRI software and what it will cost. Have any > of you had to address this 800-lb gorilla problem recently and do you > have any advice or facts I can use to keep my contract? I'd strongly recommend, if you haven't done this already, sending this to the osgeo-discuss list -- though I'd frame it less as a "how can I keep my job" and more as a "Does anyone have any comparisons of this type?" (List is at http://lists.osgeo.org/mailman/listinfo/discuss ). In this type of question, for the record, it seems to me like you'd need to do a pretty significant amount of custom development. It's possible that neither ESRI nor open source can do everything you need to do, but that if you're making a purely "$$" based argument, ESRI could win, simply becaues ESRI *is* packaged to do more of these things out of the box without any development effort. Good luck, and Best Regards, -- Christopher Schmidt MetaCarta From stephane.poirier at usherbrooke.ca Tue May 26 18:40:53 2009 From: stephane.poirier at usherbrooke.ca (stephane.poirier@usherbrooke.ca) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Invalid argument. OpenLayers.js, line 599 character 110 version 2.8 rc2 Message-ID: <95DDBD4B404245C4853B6D2A85F59431@flshedu.usherbrooke.ca> Hi All, Running my code in IE80, I get an Invalid argument in OpenLayers-2-8rc2_OpenLayers.js, line 599 character 110 (right after var style=document.createStyleSheet(); and before using style). Burn when I turn IE80 compatibility mode, it all works as fine as when using Mozilla Firefox. Any idea if there is an update of the openlayers style.css files? St?phane Poirier Professionel de recherche au CARTEL Centre d'Applications et de Recherches en T?l?d?tection D?partement de g?omatique appliqu?e Universit? de Sherbrooke Sherbrooke (Qu?bec), CANADA J1K 2R1 Tel.: (+1 819) 821 8000 #61904 Fax.: (+1 819) 821 7944 Stephane.Poirier@USherbrooke.ca http://www.usherbrooke.ca/cartel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090526/a1d45d48/attachment.html From aeskreis at gmail.com Tue May 26 21:16:42 2009 From: aeskreis at gmail.com (Adam Eskreis) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Background image on a vector Message-ID: Is it possible to put a background image to a vector? Also, is there a list somewhere of all the viable style keys for vectors? I can't seem to find it in the OpenLayers documentation. Thank you -Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090526/c6cc2468/attachment.html From pagameba at gmail.com Tue May 26 21:32:30 2009 From: pagameba at gmail.com (Paul Spencer) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Background image on a vector In-Reply-To: References: Message-ID: <0E077251-3357-40C5-9370-803E2CE1519D@gmail.com> I'm just playing with this too ... all the styles that you can set are listed at the bottom of Layer/Vector.js It is possible to specify a backgroundGraphic but I don't know if it only applies if you are using an externalGraphic or if it will be rendered for all vectors. Cheers Paul On 26-May-09, at 9:16 PM, Adam Eskreis wrote: > Is it possible to put a background image to a vector? > > Also, is there a list somewhere of all the viable style keys for > vectors? I can't seem to find it in the OpenLayers documentation. > > Thank you > > -Adam > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users From petedawn at gmail.com Wed May 27 00:24:38 2009 From: petedawn at gmail.com (Peter Dawn) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Fwd: Check and uncheck layers In-Reply-To: <20090527025538.GK28547@metacarta.com> References: <5dd88dab0905252034s49e508f2wc1096fd93b58bc1c@mail.gmail.com> <20090526124239.GB28547@metacarta.com> <5dd88dab0905261704x5b39339bm49e5cf0590a778d7@mail.gmail.com> <20090527025538.GK28547@metacarta.com> Message-ID: <5dd88dab0905262124q3c191c17u82a0c2e076fcceb5@mail.gmail.com> Hi Chris, Am attaching my file. Could you please advise me on what could be wrong here. if i check and uncheck layers, my layers are off. Thanks. > > "DTD/xhtml1-strict.dtd"> > > > Server > ? ? ? href="script/OpenLayers-2.7/theme/default/style.css" /> > > > > > > > >
Server

>
>
>
> >
>
>
>
>
> > > > From eric.lemoine at camptocamp.com Wed May 27 00:28:43 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Fwd: Check and uncheck layers In-Reply-To: <5dd88dab0905262124q3c191c17u82a0c2e076fcceb5@mail.gmail.com> References: <5dd88dab0905252034s49e508f2wc1096fd93b58bc1c@mail.gmail.com> <20090526124239.GB28547@metacarta.com> <5dd88dab0905261704x5b39339bm49e5cf0590a778d7@mail.gmail.com> <20090527025538.GK28547@metacarta.com> <5dd88dab0905262124q3c191c17u82a0c2e076fcceb5@mail.gmail.com> Message-ID: On Wed, May 27, 2009 at 6:24 AM, Peter Dawn wrote: > Hi Chris, > > Am attaching my file. Could you please advise me on what could be > wrong here. if i check and uncheck layers, my layers are off. Thanks. Hi, you must use sphericalMercator if you want overlays atop Google layers. See . Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From eric.lemoine at camptocamp.com Wed May 27 00:32:19 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Problems with WMS filter In-Reply-To: <5b9547fb0905260831w747c5a1cs20fe0eb39d5957ee@mail.gmail.com> References: <5b9547fb0905260831w747c5a1cs20fe0eb39d5957ee@mail.gmail.com> Message-ID: On Tue, May 26, 2009 at 5:31 PM, Micho Gar wrote: > Hi to all, > > I have a strange problem in my application. I have 2 WMS layers, make with > the next code: Hi, you must use sphericalMercator if you want overlays atop Google layers. See . Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From aeskreis at gmail.com Wed May 27 01:57:39 2009 From: aeskreis at gmail.com (Adam Eskreis) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] ZoomToExtent works in Firefox, Safari and IE7, but not in IE6 In-Reply-To: <1243327904016-2973551.post@n2.nabble.com> References: <1243262420790-2969934.post@n2.nabble.com> <1243327904016-2973551.post@n2.nabble.com> Message-ID: IE6 compatibility is a mess, no matter what you are dealing with. I feel your pain. My first suggestion would be to try to convince your client that IE6 compatibility is unnecessary. If that fails, try to find something that works with IE6. Anything. Do whatever you can to get it to work. Then put in a browser test in the javascript. If the browser is IE6, use the compatible code. Otherwise, use the default code. -Adam On Tue, May 26, 2009 at 4:51 AM, sendeman wrote: > > Hi All, > > Does anybody have any ideas that might be of help for the problem I > described previously? Thanks a lot in advance for any help. > > If I didn't explain the problem well enough, please let me know, so I can > clarify it. > > Best regards, > Martijn Senden. > > > > sendeman wrote: > > > > Hi all, > > > > I'm trying to make a 'fluid' layout, in which the viewport of the map > > changes with changes in the size of the browser window. I have some html > > and css worked out that do this without javascript in IE6. The only > > problem I have is that the initial zoom level doesn't work in IE 6. IE 6 > > zooms in to the maximum level. Other browsers (IE7, FF, Safari, Chrome) > do > > set the zoom level correctly. > > > > I set the zoom level as follows: > > > > map.zoomToExtent(new > > > OpenLayers.Bounds(3.27392578125,50.69471783819287,7.294921875,53.67068019347264)); > > > > What is it that makes IE 6 go wrong? > > > > Any help would be greatly appreciated! > > > > Below is the entire code of my test-site. > > > > Best regards, > > Martijn Senden. > > > > ____________________________ > > ____________________ > > ____________________________ > > > > > "http://www.w3.org/TR/html4/strict.dtd"> > > > > > > > > minOpenLayers.aspx > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > ____________________________ > > ____________________ > > ____________________________ > > > > -- > View this message in context: > http://n2.nabble.com/ZoomToExtent-works-in-Firefox%2C-Safari-and-IE7%2C-but-not-in-IE6-tp2969934p2973551.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/20090527/be536283/attachment.html From ks at geograf.dk Wed May 27 02:46:53 2009 From: ks at geograf.dk (Kenneth Skovhede, GEOGRAF A/S) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Invalid argument. OpenLayers.js, line 599 character 110 version 2.8 rc2 In-Reply-To: <95DDBD4B404245C4853B6D2A85F59431@flshedu.usherbrooke.ca> References: <95DDBD4B404245C4853B6D2A85F59431@flshedu.usherbrooke.ca> Message-ID: <4A1CE1DD.2040803@geograf.dk> It sounds like this: http://trac.openlayers.org/ticket/1910 There is a quick fix mentioned: http://trac.openlayers.org/ticket/1910#comment:20 Regards, Kenneth Skovhede, GEOGRAF A/S stephane.poirier@usherbrooke.ca skrev: > Hi All, > > Running my code in IE80, I get an Invalid argument in > OpenLayers-2-8rc2_OpenLayers.js, line 599 character 110 > (right after var style=document.createStyleSheet(); and before using > style). > > Burn when I turn IE80 compatibility mode, it all works as fine as when > using Mozilla Firefox. > > Any idea if there is an update of the openlayers style.css files? > > > St?phane Poirier > Professionel de recherche au CARTEL > Centre d'Applications et de Recherches en T?l?d?tection > D?partement de g?omatique appliqu?e > Universit? de Sherbrooke > Sherbrooke (Qu?bec), CANADA J1K 2R1 > Tel.: (+1 819) 821 8000 #61904 > Fax.: (+1 819) 821 7944 > Stephane.Poirier@USherbrooke.ca > http://www.usherbrooke.ca/cartel > ------------------------------------------------------------------------ > > _______________________________________________ > 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/20090527/22e7b928/attachment.html From olivier.ertz at heig-vd.ch Wed May 27 03:21:08 2009 From: olivier.ertz at heig-vd.ch (Olivier ERTZ) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] OGRS2009 : pre-program & registration Message-ID: <4A1CE9E4.5020604@heig-vd.ch> ---------------------------------------------- OGRS2009 : pre-program is available & registration is open First International Opensource Geospatial Research Symposium 2009 Dates & place: July 8th to 10th, 2009, Ecole Centrale de Nantes (France) Website: http://www.ogrs2009.org ---------------------------------------------- First international Open source Geospatial Research Symposium (OGRS2009), that will be in Nantes, France 8-10 July, 2009, is now open for registration and the pre-progam is available. See http://www.ogrs2009.org During the tenth edition of Libre Software Meeting (RMLL - http://www.rmll.info), the Research Institute on Urban Sciences and Techniques (IRSTV) in partnership with the University Of Applied Sciences Western Switzerland, Prefecture and Council of Region Pays de La Loire will organize a Research and Innovation Symposium about free and open source geospatial methods and technologies. Main goals of this symposium are : * to build a panel of new scientific works built on open source models or using open source tools * to build and discuss a scientific framework about open source technology usage (benefits and limitations) * to provide a platform to network and develop ideas for future collaborative works between the academic research world and the everyday operational world (companies, local authorities ...) The symposium is composed of scientific presentations, companies and authority testimonies (showcases) and training sessions (labs). Thus, we invite you to go to http://www.ogrs2009.org where you will find : * a pre-program containing talks from 3 keynote speakers, 20 scientific talks, 14 showcases and 12 lab sessions * a registration form to fill in so as to attend to this unique event : fees are about 50?, one price for one, two or three days including an access badge to attend all presentations and labs, a conference bag, proceedings, coffee breaks and lunch for each day. Get more information on our website and if you want a direct contact, use : * registration@ogrs2009.org for specific questions concerning your attending * info@ogrs2009.org for all other questions We would appreciate if you could kindly distribute this announcement to other interested parties of your acquaintance. Hope to see you soon in Nantes for this event. OGRS2009 organizing committee. -- HEIG-VD, University Of Applied Sciences Western Switzerland IICT, Institute for Information and Communication Technologies Olivier ERTZ Avenue des Sports 20 CH-1401 Yverdon-les-Bains olivier.ertz@heig-vd.ch +41 24 55 77570 -> http://www.heig-vd.ch -> http://geosysin.iict.ch -------------- next part -------------- A non-text attachment was scrubbed... Name: olivier_ertz.vcf Type: text/x-vcard Size: 247 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090527/d1292735/olivier_ertz.vcf From barbara.fiederer at web.de Wed May 27 04:08:56 2009 From: barbara.fiederer at web.de (Barbara Fiederer) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] =?iso-8859-15?q?WFS-T_example_won=27t_work_bec?= =?iso-8859-15?q?ause_of_error_in=09gears=5Finit=2Ejs_line_51?= Message-ID: <971349375@web.de> Hi Alexandre and Eric! It wasn't gears_init.js. It has got something to do with the WFS I use, because the error does not occur when I delete the pieces of code related to it. By chance I tried to open the same html-file with IE 7.0 and it worked. So, at the moment, just for testing and learning, I accept it as it is. Thanks for your help from Barbara >It may be that the error you're seeing in the FireBug console is >actually unrelated to Gears. Try removing the gears_init.js entry from >the jsfiles array in OpenLayers.js. >Cheers, >-- >Eric Lemoine > Hi Barbara, > > Have you tried to look "step-by-step" at what's going on in the code > using firebug ? Do you see the request sent ? Do you get a response ? > Is there a server-side error message ? > > Try to figure exactly where the error occurs by putting breakpoints. > That might helps a lot, > > Alexandre > > Barbara Fiederer wrote: > > Hi out there, > > > > I'm new to OpenLayers, so this might be an easy problem, but I can't get it solved on my own. > > > > At the moment I try to understand the examples on the OpenLayers.org-Site and to adjust them to my data. The easier ones worked out fine. But now I cannot get a WFS-T example to work. I tried two of them in the examples list of OpenLayers.org and for a last try the WFS-T Demo provided by Geoserver. > > > > Two examples throw the same error in gears_init.js line 51 "factory = new ActiveXObject('Gears.Factory'); ". > > I tried to install it, but since I do not have Autocad installed it won't work. > > > > In the end I tried to copy the source text of the geoserver example, that works fine on the geoserver I use and I adjust only the pathnames to css, openLayers-Library and geodata (tasmania) on the same geoserver, but get the same error. > > > > Has anyone got an idea that could help me. > > > > I use FF 3.0.10, OL 2.7 on windows XP > > > > Thanks, Barbara ____________________________________________________________________ Neu: WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und Telefonanschluss f?r 17,95 Euro/mtl.!* http://produkte.web.de/go/02/ From Kai-Behncke at gmx.de Wed May 27 04:08:53 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Question to OpenLayers and printing Message-ID: <20090527080853.115700@gmx.net> Dear users, I would like to know how you handle print outs in OpenLayers? Do you use OL and an application like this: http://trac.openlayers.org/wiki/Printing Or is it better to integrate OL in a framework like Mapfish? Thank you very much, Kai -- Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss f?r nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02 From martijnsendenspam at gmail.com Wed May 27 04:46:47 2009 From: martijnsendenspam at gmail.com (sendeman) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] ZoomToExtent works in Firefox, Safari and IE7, but not in IE6 In-Reply-To: References: <1243262420790-2969934.post@n2.nabble.com> <1243327904016-2973551.post@n2.nabble.com> Message-ID: <1243414007875-2979821.post@n2.nabble.com> Adam Eskreis wrote: > > If that fails, try to find something that works with IE6. Anything. Do > whatever you can to get it to work. > Thanks. I'll do that. I do really have to get it to work in IE6 though. There are still too many users around to ignore it. So, to put my words into action: does anyone have any solution to this issue? Someone must have bumped into this error (or similar behaviour) of IE6 as well...? Best regards, Martijn. -- View this message in context: http://n2.nabble.com/ZoomToExtent-works-in-Firefox%2C-Safari-and-IE7%2C-but-not-in-IE6-tp2969934p2979821.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From mika at digikartta.net Wed May 27 04:42:21 2009 From: mika at digikartta.net (Lehtonen, Mika) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Question to OpenLayers and printing In-Reply-To: <20090527080853.115700@gmx.net> References: <20090527080853.115700@gmx.net> Message-ID: <4A1CFCED.1030106@digikartta.net> Hi Kai, I built my own printing framework (or actually still am building) with Apache FOP (and Cocoon). But actually it's just a wms-printing tool. I can choose an area of my map, scale, paper size and so on and the "printing framework" creates a wms request out of the parameters. The response is then embedded into PDF with using XSLT-template. I can provide you an example privately, if you like. - mika - Kai Behncke kirjoitti: > Dear users, > > I would like to know how you handle print outs in OpenLayers? > > Do you use OL and an application like this: > http://trac.openlayers.org/wiki/Printing > > Or is it better to integrate OL in a framework like Mapfish? > > Thank you very much, Kai > > > From stuart.jones at jacobs.com Wed May 27 08:17:10 2009 From: stuart.jones at jacobs.com (gingerbbm) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] MapGuide useHttpTile with IIS In-Reply-To: <1243338263163-2974190.post@n2.nabble.com> References: <1243334076816-2973909.post@n2.nabble.com> <7a85053e0905260340r3b937091rd68de15c46c6ecb6@mail.gmail.com> <1243338263163-2974190.post@n2.nabble.com> Message-ID: <1243426630281-2980684.post@n2.nabble.com> FYI I've created an IIS version of the example Apache script. I've uploaded it and edited the following accordingly: http://trac.osgeo.org/mapguide/wiki/CodeSamples/Tiles/ServingTilesViaHttp http://trac.osgeo.org/mapguide/wiki/CodeSamples/Tiles/ServingTilesViaHttp My script works slightly differently to the Apache one because it uses a different server variable, and it works out the various requisite components by working from the right-hand side of the URL. The rest of it is pretty much identical though. Thanks Stuart -- View this message in context: http://n2.nabble.com/MapGuide-useHttpTile-with-IIS-tp2973909p2980684.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From adube at mapgears.com Wed May 27 08:18:51 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Question to OpenLayers and printing In-Reply-To: <20090527080853.115700@gmx.net> References: <20090527080853.115700@gmx.net> Message-ID: <4A1D2FAB.9080909@mapgears.com> Hi Kai, I also made a wms-only printing tool for OpenLayers. It currently has no framework though, I used a customized Ext.FormPanel for that. See (1) if you're interested. Regards, Alexandre (1) http://dev4.mapgears.com/wmsprint/ Kai Behncke wrote: > Dear users, > > I would like to know how you handle print outs in OpenLayers? > > Do you use OL and an application like this: > http://trac.openlayers.org/wiki/Printing > > Or is it better to integrate OL in a framework like Mapfish? > > Thank you very much, Kai > > > -- Alexandre Dub? Mapgears www.mapgears.com From Kai-Behncke at gmx.de Wed May 27 08:26:40 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Question to OpenLayers and printing In-Reply-To: <4A1D2FAB.9080909@mapgears.com> References: <20090527080853.115700@gmx.net> <4A1D2FAB.9080909@mapgears.com> Message-ID: <20090527122640.309780@gmx.net> Thank you very much for that help. WMS is fine, but I also would like to print Open Street Map-Layer and Google Satellite-Layer. I think for that the most elegant way should be via mapfish, right? Best regards, Kai -------- Original-Nachricht -------- > Datum: Wed, 27 May 2009 08:18:51 -0400 > Von: Alexandre Dube > An: Kai Behncke > CC: users@openlayers.org > Betreff: Re: [OpenLayers-Users] Question to OpenLayers and printing > Hi Kai, > > I also made a wms-only printing tool for OpenLayers. It currently has > no framework though, I used a customized Ext.FormPanel for that. See > (1) if you're interested. > > Regards, > > Alexandre > > (1) http://dev4.mapgears.com/wmsprint/ > > Kai Behncke wrote: > > Dear users, > > > > I would like to know how you handle print outs in OpenLayers? > > > > Do you use OL and an application like this: > > http://trac.openlayers.org/wiki/Printing > > > > Or is it better to integrate OL in a framework like Mapfish? > > > > Thank you very much, Kai > > > > > > > > > -- > Alexandre Dub? > Mapgears > www.mapgears.com -- Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss f?r nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02 From crschmidt at metacarta.com Wed May 27 08:42:09 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Question to OpenLayers and printing In-Reply-To: <20090527122640.309780@gmx.net> References: <20090527080853.115700@gmx.net> <4A1D2FAB.9080909@mapgears.com> <20090527122640.309780@gmx.net> Message-ID: <20090527124209.GM28547@metacarta.com> On Wed, May 27, 2009 at 02:26:40PM +0200, Kai Behncke wrote: > Thank you very much for that help. > > WMS is fine, but I also would like to print Open Street Map-Layer and Google Satellite-Layer. I'm not aware of any existing printing tool that can use Google Maps data n the printout in a way that is allowed unde rthe Google Maps terms of service. (You're not allowed to download the tiles directly, and the alternative export service is somewhat limited.) -- Chris > I think for that the most elegant way should be via mapfish, right? > > Best regards, Kai > > > > > -------- Original-Nachricht -------- > > Datum: Wed, 27 May 2009 08:18:51 -0400 > > Von: Alexandre Dube > > An: Kai Behncke > > CC: users@openlayers.org > > Betreff: Re: [OpenLayers-Users] Question to OpenLayers and printing > > > Hi Kai, > > > > I also made a wms-only printing tool for OpenLayers. It currently has > > no framework though, I used a customized Ext.FormPanel for that. See > > (1) if you're interested. > > > > Regards, > > > > Alexandre > > > > (1) http://dev4.mapgears.com/wmsprint/ > > > > Kai Behncke wrote: > > > Dear users, > > > > > > I would like to know how you handle print outs in OpenLayers? > > > > > > Do you use OL and an application like this: > > > http://trac.openlayers.org/wiki/Printing > > > > > > Or is it better to integrate OL in a framework like Mapfish? > > > > > > Thank you very much, Kai > > > > > > > > > > > > > > > -- > > Alexandre Dub? > > Mapgears > > www.mapgears.com > > -- > Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss f?r nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02 > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From Kai-Behncke at gmx.de Wed May 27 09:58:23 2009 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Question to OpenLayers and printing In-Reply-To: <20090527124209.GM28547@metacarta.com> References: <20090527080853.115700@gmx.net> <4A1D2FAB.9080909@mapgears.com> <20090527122640.309780@gmx.net> <20090527124209.GM28547@metacarta.com> Message-ID: <20090527135823.80230@gmx.net> > I'm not aware of any existing printing tool that can use Google Maps > data n the printout in a way that is allowed unde rthe Google Maps terms > of service. (You're not allowed to download the tiles directly, and > the alternative export service is somewhat limited.) > I found that application: http://www.kkgeo.ch/go/ I wonder how they realize the print-out. Best regards, Kai -- Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss f?r nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02 From kgeusebroek at xebia.com Wed May 27 10:49:15 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] How to make panzoombar invisible Message-ID: Hi all, I want to make the panzoombar control invisible when I deactivate it so that I can make it visible again if activated. I found issue 1764 stating this won't be released soon. But is there a way I can do it programmatically. I already tried setting the display of the control.div to none but that doesn't work Cheers Kris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090527/0b5f9fc1/attachment.html From crschmidt at metacarta.com Wed May 27 10:53:55 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] How to make panzoombar invisible In-Reply-To: References: Message-ID: <20090527145355.GQ28547@metacarta.com> On Wed, May 27, 2009 at 04:49:15PM +0200, Kris Geusebroek wrote: > Hi all, > > > > I want to make the panzoombar control invisible when I deactivate it so > that I can make it visible again if activated. > > I found issue 1764 stating this won't be released soon. > > > > But is there a way I can do it programmatically. > > I already tried setting the display of the control.div to none but that > doesn't work Opening controls.html, and typing in: map.controls[1].div.style.display="none"; into firebug successfully hides the panzoombar for me. -- Chris > > > > Cheers Kris > > > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From adube at mapgears.com Wed May 27 10:53:03 2009 From: adube at mapgears.com (Alexandre Dube) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Question to OpenLayers and printing In-Reply-To: <20090527135823.80230@gmx.net> References: <20090527080853.115700@gmx.net> <4A1D2FAB.9080909@mapgears.com> <20090527122640.309780@gmx.net> <20090527124209.GM28547@metacarta.com> <20090527135823.80230@gmx.net> Message-ID: <4A1D53CF.4050002@mapgears.com> Hi, Kai Behncke wrote: >> I'm not aware of any existing printing tool that can use Google Maps >> data n the printout in a way that is allowed unde rthe Google Maps terms >> of service. (You're not allowed to download the tiles directly, and >> the alternative export service is somewhat limited.) >> >> > I found that application: > > http://www.kkgeo.ch/go/ > > I wonder how they realize the print-out. > > Best regards, Kai > > One of the common problems with printing is that not all printers support transparency of div elements. That example only uses a OpenLayers map that stack layers with transparency. What our WMS print does is return one image by a server-side script to resolve that issue. But like Christopher said, you can't have a google layer rendered that way. Regards, Alexandre -- Alexandre Dub? Mapgears www.mapgears.com From ventolinmono at yahoo.com.mx Wed May 27 12:52:37 2009 From: ventolinmono at yahoo.com.mx (ventolinmono) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Saving Input Message-ID: <198556.77034.qm@web57005.mail.re3.yahoo.com> Hello ?How can i write pois on click to an xml on the server? I asked this question at dev and been told it belongs to users. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090527/25164a42/attachment.html From maxime.phaneuf at usherbrooke.ca Wed May 27 15:11:29 2009 From: maxime.phaneuf at usherbrooke.ca (Maxime Phaneuf) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Apply CSS style to popup content Message-ID: <1243451489671-2983101.post@n2.nabble.com> Hi guys, Based on this example: http://openlayers.org/dev/examples/getfeatureinfo-control.html, I succeeded in querying a WMS layer with WMSGetFeatureInfo. The only difference is that I make a pop-up appear instead of a
on the page. The only problem I encounter is that I want to apply CSS style to the content of that pop-up, but I can't seem to do it. Does any of you know how this can be done? Thank you Maxime Phaneuf -- View this message in context: http://n2.nabble.com/Apply-CSS-style-to-popup-content-tp2983101p2983101.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From kgeusebroek at xebia.com Wed May 27 15:35:46 2009 From: kgeusebroek at xebia.com (Kris Geusebroek) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Apply CSS style to popup content In-Reply-To: <1243451489671-2983101.post@n2.nabble.com> References: <1243451489671-2983101.post@n2.nabble.com> Message-ID: Hi Maxime AutoSizeAnchored = OpenLayers.Class(OpenLayers.Popup.Anchored, { 'autoSize': true, 'contentDisplayClass': 'olPopupLabelContent' }); Creates a subclass of popupAnchored with a different content style. In your css you can specify the specifics of this style Cheers Kris -----Original Message----- From: users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] On Behalf Of Maxime Phaneuf Sent: Wednesday, May 27, 2009 9:11 PM To: users@openlayers.org Subject: [OpenLayers-Users] Apply CSS style to popup content Hi guys, Based on this example: http://openlayers.org/dev/examples/getfeatureinfo-control.html, I succeeded in querying a WMS layer with WMSGetFeatureInfo. The only difference is that I make a pop-up appear instead of a
on the page. The only problem I encounter is that I want to apply CSS style to the content of that pop-up, but I can't seem to do it. Does any of you know how this can be done? Thank you Maxime Phaneuf -- View this message in context: http://n2.nabble.com/Apply-CSS-style-to-popup-content-tp2983101p2983101. 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 imirene at gmail.com Wed May 27 16:31:48 2009 From: imirene at gmail.com (ir0s) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] htmlfile: unspecified error in IE6+7 when creating new map Message-ID: <1243456308538-2983547.post@n2.nabble.com> Hello, Any chance someone could shed some light on why I might be getting the error: "htmlfile: unspecified error" in IE6/7when creating a new map? The issue appears to be in the call document.namespaces. I am creating a map on the document.observe("dom:loaded"..) callback (using prototype) so in theory, my dom should be loaded by that point ....any suggestions? Thanks! -- View this message in context: http://n2.nabble.com/htmlfile%3A-unspecified-error-in-IE6%2B7-when-creating-new-map-tp2983547p2983547.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From George at muammar.net Wed May 27 16:41:14 2009 From: George at muammar.net (Geo-rge) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Control activate and deactivate events Message-ID: <1243456874670-2983592.post@n2.nabble.com> Dear List, I am having trouble trying to capture events when the ModifyFeature control is activated and deactivated. I define my control as such: modify = new OpenLayers.Control.ModifyFeature(lyrPlanning,{'displayClass': 'olControlModifyFeature', 'mode': OpenLayers.Control.ModifyFeature.RESHAPE | OpenLayers.Control.ModifyFeature.DRAG | OpenLayers.Control.ModifyFeature.ROTATE}); I try to register the event like this: modify.events.register('deactivate',modify,modify_deactivated); this last line causes a syntax error! I had already defined function modify_deactivated() {alert('!');}" I have that feeling that I am doing something so silly I will never get it. Appreciate any help George Mu'ammar -- View this message in context: http://n2.nabble.com/Control-activate-and-deactivate-events-tp2983592p2983592.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From SansonR at asurequality.com Wed May 27 17:13:34 2009 From: SansonR at asurequality.com (Robert Sanson) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Control activate and deactivate events In-Reply-To: <1243456874670-2983592.post@n2.nabble.com> References: <1243456874670-2983592.post@n2.nabble.com> Message-ID: <4A1E55BE.379F.0037.0@asurequality.com> Hi George Here is how I specify the controls: //Select, Draw and Modify controls - these are specific to the layer controls = { select: new OpenLayers.Control.SelectFeature(crops, {callbacks: {'over':feature_info}}), dpolygon: new OpenLayers.Control.DrawFeature(crops,OpenLayers.Handler.Polygon), modify: new OpenLayers.Control.ModifyFeature(crops), delf: new OpenLayers.Control.SelectFeature(crops, {onSelect: function(feature) {crops.destroyFeatures([feature])}}) //delf: new OpenLayers.Control.SelectFeature(crops, {onSelect: function(feature) {feature.geometry.destroy();crops.eraseFeatures([feature])}}) }; for(var key in controls) { map.addControl(controls[key]); } Then I have a function that responds to radio buttons in a div outside the map that sets the mode and activates or deactivates the controls: function toggleControl(element) { mode = element.value; OpenLayers.Util.getElement('comments').innerHTML = "Mode:" + mode; if ((mode == "select") || (mode == "modify")){ crop_style.strokeColor = "#0000ff"; } else { crop_style.strokeColor = "#ff0000"; } for(key in controls) { var control = controls[key]; if(element.value == key && element.checked) { control.activate(); } else { control.deactivate(); } } crops.onFeatureInsert = function(feature) { feature.attributes.prop0 = 'new'; //This should be modified to get actual ID alert("New crop area inserted"); } } Hope that helps. Robert S >>> Geo-rge 28/05/2009 8:41 a.m. >>> Dear List, I am having trouble trying to capture events when the ModifyFeature control is activated and deactivated. I define my control as such: modify = new OpenLayers.Control.ModifyFeature(lyrPlanning,{'displayClass': 'olControlModifyFeature', 'mode': OpenLayers.Control.ModifyFeature.RESHAPE | OpenLayers.Control.ModifyFeature.DRAG | OpenLayers.Control.ModifyFeature.ROTATE}); I try to register the event like this: modify.events.register('deactivate',modify,modify_deactivated); this last line causes a syntax error! I had already defined function modify_deactivated() {alert('!');}" I have that feeling that I am doing something so silly I will never get it. Appreciate any help George Mu'ammar -- View this message in context: http://n2.nabble.com/Control-activate-and-deactivate-events-tp2983592p2983592.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ------------------------------------------------------------------ The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message. ------------------------------------------------------------------ This message has been scanned for malware by SurfControl plc. www.surfcontrol.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090528/f75d6f56/attachment.html From crschmidt at metacarta.com Wed May 27 18:17:34 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] htmlfile: unspecified error in IE6+7 when creating new map In-Reply-To: <1243456308538-2983547.post@n2.nabble.com> References: <1243456308538-2983547.post@n2.nabble.com> Message-ID: <20090527221734.GT28547@metacarta.com> On Wed, May 27, 2009 at 01:31:48PM -0700, ir0s wrote: > > Hello, > > Any chance someone could shed some light on why I might be getting the > error: "htmlfile: unspecified error" in IE6/7when creating a new map? The > issue appears to be in the call document.namespaces. > > I am creating a map on the document.observe("dom:loaded"..) callback (using > prototype) so in theory, my dom should be loaded by that point ....any > suggestions? The DOM isn't loaded at that point. Use the body 'onload' instead. -- Chris > Thanks! > -- > View this message in context: http://n2.nabble.com/htmlfile%3A-unspecified-error-in-IE6%2B7-when-creating-new-map-tp2983547p2983547.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta From seileef at gmail.com Wed May 27 19:09:30 2009 From: seileef at gmail.com (Tom B) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Saving with a Google Maps base layer In-Reply-To: <49F85F45.6020102@genieknows.com> References: <1240950718331-2736685.post@n2.nabble.com> <49F76C8A.3030800@genieknows.com> <49F76E19.7000201@hostgis.com> <49F85F45.6020102@genieknows.com> Message-ID: <1243465770078-2984287.post@n2.nabble.com> Has anyone had a chance to try this out? Gregor, any luck with getting R&D funding, by any chance? If not, I might go ahead and take a crack at it, since it is something our map will eventually need. Thanks, Tom Chris Adams wrote: > > Gregor at HostGIS wrote: >> Chris Adams wrote: >>> How about this? >>> http://code.google.com/apis/maps/documentation/staticmaps/ >> >> Hey, nice! >> >> I do see 1 issue with some uses: "640x640 is the largest image size >> allowed" So you may have to figure up, say, 4 references points within >> the image and make those queries to get the images. Of course, that >> means multiple "Powered by Google" texts. >> >> The use of viewport, looks as if it would return an image not matching >> your requested bounds, so computing how to blit that into your final >> product may not be feasible. >> >> Fascinating idea, though. I will contact one of our customers who does >> use Google Maps under OL and who has been wanting to print them, and >> see whether he'll fund 1-3 hours of R&D. If he does, I'll be updating >> the Printing page. >> > One possibility, is to align the 640x640 tiles to the bottom left of the > viewport, blit the bottom left most one fully, and underneath that one > display the other tiles with enough overlap as too remove the extra > Google copyright messages. Once the images have been combined, you're > only distributing a single image, which has the proper copyright. So I > don't think it would violate the TOS, although I'm by no means a legal > expert. > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://n2.nabble.com/Saving-with-a-Google-Maps-base-layer-tp2736685p2984287.html Sent from the OpenLayers Users mailing list archive at Nabble.com. From matthewkenny at gmail.com Wed May 27 19:18:34 2009 From: matthewkenny at gmail.com (Matt Kenny) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Cluster Strategy Based on Attribute Message-ID: <4bac7a0a0905271618u3fd5ff2fhe64056c0faee7170@mail.gmail.com> Hello, I've got a quick question that I'm hoping someone knows the answer to. I've got a single vector layer containing both point and line features. All features have a 'TYPE' attribute. Points are either 'TYPE:COMPANY' or 'TYPE:AIRPORT', and lines are always 'TYPE:ROUTE'. I'm wondering if it is possible to create a cluster strategy that only clusters features in my vector layer that are of an attribute, 'TYPE:COMPANY'? Thanks, Matt -- m a t t h e w k e n n y http://www.mkgeomatics.com Sent from Tempe, AZ, United States -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090527/211447e2/attachment.html From chrismwild at gmail.com Wed May 27 20:38:04 2009 From: chrismwild at gmail.com (chris Wild) Date: Wed Sep 1 17:17:29 2010 Subject: [OpenLayers-Users] Fwd: geowebcached images In-Reply-To: <49b7ef710905271730n29cd162fl99fdf9b75d0812b2@mail.gmail.com> References: <49b7ef710905271730n29cd162fl99fdf9b75d0812b2@mail.gmail.com> Message-ID: <49b7ef710905271738j2432a479qabb51cbcd5cc347@mail.gmail.com> Hi, Im using Geoserserver 1.7.4 and Openlayers 2.8. Im wondering if anyone else has had problems displaying geowebcached images in OpenLayers. The Mrsid images display fine as a cached images singularly but if more than one cached image is added to the map only the first one displays. They don't display as a combined group layer either. Any suggestion much appreciated. Thanks