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

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

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

2009-04-30 Thread Chris Adams
o 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 >> >

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

2009-04-30 Thread Chris Adams
er 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 firs

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

2009-04-29 Thread Chris Adams
To compute the minimum distance to the line, you can use the formula described here: http://local.wasp.uwa.edu.au/~pbourke/geometry/pointline/ At one point, it will compute the point along the line which is closest to the other point, you can use the haversine formula with these two points. ne

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

2009-04-29 Thread Chris Adams
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 ) {

Re: [OpenLayers-Users] Saving with a Google Maps base layer

2009-04-29 Thread Chris Adams
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

Re: [OpenLayers-Users] Saving with a Google Maps base layer

2009-04-29 Thread Chris Adams
The google scales are given in the open layers code, you should be able to calculate it easily. Christopher Schmidt wrote: > On Tue, Apr 28, 2009 at 01:59:05PM -0700, Gregor at HostGIS wrote: > >> Chris Adams wrote: >> >>> How about this? >>&

Re: [OpenLayers-Users] Saving with a Google Maps base layer

2009-04-28 Thread Chris Adams
How about this? http://code.google.com/apis/maps/documentation/staticmaps/ Tom B wrote: > Hi, > > I'm trying to give users the option of saving/printing a map, and I'm > currently working off the "tile stitching" code to create a composite image > of the map's layers: > http://trac.openlayers.org

Re: [OpenLayers-Users] Mapserver and Openlayers - Pink Tiles

2009-04-15 Thread Chris Adams
Try using wget to download one of the tiles, mapserv will often put error messages in place of the image (i.e. maybe your paths to mapserv & the map file are correct). Also, you need to specify each layer by name when you create your OpenLayers.Layer.MapServer, or at least I have not found a wa

Re: [OpenLayers-Users] Mapserver and Openlayers - Pink Tiles

2009-04-15 Thread Chris Adams
The path to the 'mapserv' application should be in fact a URL, which can be accessed from any computer suitable for viewing the map. The path to your map file is a file path within the server. i.e. layer = new OpenLayers.Layer.MapServer("MyMap","http://myserver/cgi-bin/mapserv";, {map: "c:\ma

Re: [OpenLayers-Users] How to add many(>400) markers to the map?

2009-04-14 Thread Chris Adams
Yes, that was the idea. It was just that the solution that came too mind immediately when he described the basics of the algorithm was inefficient.(Probably O(N^2), or worse) Christopher Schmidt wrote: > On Tue, Apr 14, 2009 at 10:09:43AM -0300, Chris Adams wrote: > >> I don'

Re: [OpenLayers-Users] How to add many(>400) markers to the map?

2009-04-14 Thread Chris Adams
I don't think a lot of experimentation is required, I would implement it as such: g = [view port width / cell size][view port height / cell size] For each point, p: px <- convert p to view port PX px <- floor(px / cell size) if px in g is valid and g[px.x][px.y] not defined: g[px.x

[OpenLayers-Users] Internet Explorer 8

2009-03-20 Thread Chris Adams
So IE 8 was release just a couple days ago, this may be too soon to ask -- But how long until a fully functional version of OL is released which supports it? - Chris Adams ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman

Re: [OpenLayers-Users] Map wrapping?

2009-01-08 Thread Chris Adams
Paul Stevenson wrote: > I have NZ earthquake data in KML format. These data often span the dateline > and are rendered on the map in 2 sets, each side of the date line. As I > scroll the map eastward the set of data west of the dateline disappears as > the set east of the dateline appears. It looks

Re: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options?

2009-01-02 Thread Chris Adams
Sorry for the double post, I hit send by accident... Could you clarify what you mean by setting the layer color? Perhaps you mean adding a tint to colour of the tiles, or changing the colour of tile backgrounds before they load? Chris Adams wrote: > Bill Thoen wrote: > >> In se

Re: [OpenLayers-Users] Where Do I Find A List of Available Hashtable Options?

2009-01-02 Thread Chris Adams
Bill Thoen wrote: > In several places in the OpenLayers Constructor functions there is a > parameter that is an object consisting of a "Hashtable of extra > options...", but I can't find a list of what those choices might be. For > example, the fourth parameter for OpenLayers. Layer. MapServer()

Re: [OpenLayers-Users] Drag performance tweaker...

2008-12-16 Thread Chris Adams
Should I forward this to the Dev list instead? Thanks, - Chris Chris Adams wrote: > In Handler/Drag.js > > line 70-78: > > /** > * Property: interval > * {Integer} In order to increase performance, an interval (in > * milliseconds) can be set to r

[OpenLayers-Users] Drag performance tweaker...

2008-12-15 Thread Chris Adams
In Handler/Drag.js line 70-78: /** * Property: interval * {Integer} In order to increase performance, an interval (in * milliseconds) can be set to reduce the number of drag events * called. If set, a new drag event will not be set until the * interval has

Re: [OpenLayers-Users] OL custom api builder?

2008-09-23 Thread Chris Adams
When you say compressed, do you mean JSMin, GZip, or both? If only JSMin, Here's a link you might find useful: http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/ Deli Soetiawan wrote: > Hi list, > > I need to create OpenLayers application for use with handset (Nokia >

Re: [OpenLayers-Users] resoloution and tile x and y

2008-08-29 Thread Chris Adams
as y decreases.. lat = (-tiley + 0.5) * 300 * res lon = (tilex + 0.5) * 300 * res Kenny France wrote: > Hi Guys, > > Im finally getting somewhere with the help of Chris Adams (Thanks Again) > > I have a map gererated, that is going to ultimatly grab image tiles > from my serve

Re: [OpenLayers-Users] lat lng from tile

2008-08-29 Thread Chris Adams
resolution = latLongSize/pixelSize so if your tile is 300 by 300, and you want this zoom level to exactly fit each tile within 2.56 degrees then, res = 2.56/300 res = 0.00853 Kenny France wrote: > Hi Guys, > > I am busy with my first OpenLayers App, and have run into a question, > I hope

Re: [OpenLayers-Users] send cross-site credentials to a secure WMS via OL

2008-08-29 Thread Chris Adams
I think what you want is a method (?) called "JSONP", see this link: http://events.ccc.de/congress/2006/Fahrplan/attachments/1198-jsonrpcmesch.pdf Carolin Wengerter wrote: > Hello, > > I've got a secure WMS (apache, basic authentication) and I want to > include the credentials in the http-header.

Re: [OpenLayers-Users] Map won't zoom to full extent

2008-08-22 Thread Chris Adams
This is because your resolutions do not allow for it. If you want your the whole map to fit the visible extents, you will either need to adjust the size of your map so it fits, or adjust your highest resolution. Even adjusting your resolution, you may still need to change the width or height of

Re: [OpenLayers-Users] register "loadend" for kml layer doesn't work with IE6

2008-07-24 Thread Chris Adams
I'm not sure if this is your problem, however there is an error in your code. .. lyr.events.register("loadend", lyr, function (e) { var objFs = lyr.features; for(var i=0;i Hi. What doesn't work? Do you get an error? Does IE load the page? Is > your problem just that your loadend callbac

Re: [OpenLayers-Users] proj4js question

2008-07-23 Thread Chris Adams
Christopher Schmidt wrote: > On Wed, Jul 23, 2008 at 10:15:43AM -0400, Mike Adair wrote: > >> Yes that check was put in there for the case where the last point in a >> polygon is the same object as the first one to prevent it from getting >> transformed again. It is safe to remove that, but t

Re: [OpenLayers-Users] changing div size and openlayers size command

2008-06-25 Thread Chris Adams
Correction: var div = OpenLayers.Util.getElement("map"); div.style.width = width + "px"; div.style.height = height + "px"; map.updateSize(); Chris Adams wrote: > If you want the map size to change with the window, then you'll need to > set at least the

Re: [OpenLayers-Users] changing div size and openlayers size command

2008-06-25 Thread Chris Adams
If you want the map size to change with the window, then you'll need to set at least the height of your body and html tags to 100%. Otherwise, I think you should be able to set pixel values directly to the div in order to resize. I.e. html, body { width: 100%; height: 100%; } #map { width:

[OpenLayers-Users] kaMap -> OpenLayers

2008-06-09 Thread Chris Adams
Hi, I'm switching this site: http://local.genieknows.com from using kaMap, to open layers. I have noticed a significant speed decrease in my tests, and it seems as though the instance running on http://www.openstreetmap.org suffers the same. What sorts of things can I do (either from api, or by ed