Re: [OpenLayers-Users] Get point on line?

2009-05-01 Thread shane_china
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

Re: [OpenLayers-Users] Can't Convert Coordinates to Picels and Back Again

2009-05-01 Thread Christopher Schmidt
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

[OpenLayers-Users] Tiff file Calculation.

2009-05-01 Thread Kwong Hu Kiu
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

[OpenLayers-Users] Problem with Mapserver + PostGIS + Openlayers

2009-05-01 Thread cole gillespie
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

[OpenLayers-Users] Can't Convert Coordinates to Picels and Back Again

2009-05-01 Thread Bill Thoen
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 tha

Re: [OpenLayers-Users] Can't Convert Coordinates to Picels and Back Again

2009-05-01 Thread Bill Thoen
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

[OpenLayers-Users] SelectFeature.js right-click?

2009-05-01 Thread ashley_c_mort
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?

Re: [OpenLayers-Users] Point in parrallel with line formula

2009-05-01 Thread newbie
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

Re: [OpenLayers-Users] Point in parrallel with line formula

2009-05-01 Thread Chris Adams
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

Re: [OpenLayers-Users] Point in parrallel with line formula

2009-05-01 Thread newbie
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

Re: [OpenLayers-Users] Geojson input: why error on 3d points?

2009-05-01 Thread Christopher Schmidt
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 Ro

Re: [OpenLayers-Users] Circle Function

2009-05-01 Thread Kris Geusebroek
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, 1, 50) layer.addFeatures(new OpenLayers.Feature.Vector(circle)); the function expects 4 parame

Re: [OpenLayers-Users] Geojson input: why error on 3d points?

2009-05-01 Thread Peter Robins
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