I have the Lat/Long value of New York City, NY; 40.7560540,-73.9869510 and a flat image of the earth, 1000px × 446px.
I would like to be able to convert, using Javascript, the Lat/Long to an X,Y coordinate where the point would reflect the location.
So the X,Y coordinate form the Top-Left corner of the image would be; 289, 111
Things ...
I'm writing a script where icons rotate around a given pivot (or origin). I've been able to make this work for rotating the icons around an ellipse but I also want to have them move around the perimeter of a rectangle of a certain width, height and origin.
I'm doing it this way because my current code stores all the coords in an array ...
How can I calculate a point (X,Y) a specified distance away, on a rotated axis? I know what angle I'd like the point "moving" along (in degrees).
...
Hi guys, I'm implementing some boundary based clustering on the server end of markers to display on my google maps. What I'm doing is that I have a function that is called everytime the map is moves or panned or zoomed which takes the bound of the map and makes an ajax call which in turn the server side script runs a simple sql query to ...
Say I have a tile based system using 16x16 pixels. How would you find out what tiles are covered by a rectangle defined by floating point pixel units?
for eg,
rect(x=16.0,y=16.0, w=1.0, h=1.0) -> tile(x=1, y=1, w=1, h=1)
rect(x=16.0,y=16.0, w=16.0, h=16.0) -> tile(x=1, y=1, w=1, h=1) (still within same tile)
rect(x=24.0,y=24.0, w=8....
Trying to find a good name for a method swapping each coordinate X and Y values.
Is there a name for this operation?
Essentially, here's what is done
(1, 2) -> (2, 1)
On a polygon, this is the same as having a rotation of -90 degrees and doing a horizontal flip or mirror.
...
I'm trying to build a rectangular grid that can wrap around at the edges. Anyone who plays video games will probably be familiar with the concept: go far enough in one direction on the world map and you'll end up back where you started. This causes some difficulty in setting up the viewport, though, since the edges can scroll into nega...
Hi guys
I have a quite complex image map (made up of over 150 pieces) and I want to convert the coords within the map to SVG path standard format.
The reason why is I want to use the following instead of an image map http://raphaeljs.com/australia.html. But I need the coords to be in SVG path standard format.
How can I convert an imag...
I have x,y data coming in from a [coordinates1] database (GIS - but this could be any database). I have my application with it's own coordinate system, referencing THE SAME MAP.
I have established that a linear relationship exists between coordinates1(x,y) and coordinates2(x,y) as I have subtracted two different coordinates1 and coordin...
On the iPhone, I get the user's location in decimal degrees, for example: latitude 39.470920 and longitude = -0.373192; That's point A.
I need to create a line with another GPS coordinate, also in decimal degrees, point B. Then, calculate the distance (perpendicular) between the line from A to B and another point C.
The problem is I ge...
I'm creating a simple drawing application that adds new Shape objects to a MovieClip "canvas" every time the user clicks and drags. The problem is, I'm noticing that even though the MouseEvent listeners are set to the MovieClip, the child Shape objects are being returned as targets as well. This disrupts the localX and localY as well, ...
Let's say I have a fixed number (X) of points, e.g. coordinates within a given plane (I think you can call it a 2-D point cloud).
These points should be partitioned into Y polygons where Y < X. The polygons should not overlap. It would be wonderful if the polygons were konvex (like a Voronoi diagram).
Imagine it like locations formin...
Hi, does anyone know if you can get the coordinates of a window using the .NET framework or via pinvoking?
I would have the processID or mainwindowhandle.
...
Hi all,
I'm developing an web application (jsp/strtus2) which requires the GPS coordinates of a place. What I want to know is, whether there are any free web services that I can get GPS coordinates of a place by passing address or zip code to the server.
Thanks in advance,
Nuwan
...
Hi all,
I am writing a BHO object for IE.
I want the screen position of the top-left of the web-page. How can i get this position?
The topleft of the first element in DOM returns (0,0). The webBrowser.Left or Top returns the position of the browser but not the top-left of the page. I am using IWebBrowser2.
Thanks a million,
-anony.
...
Hey there!
I'd like to map from normalized device coordinates back to viewspace.
The other way arround works like this:
viewspace -> clip space : multiply the homogeneous coordinates by the projection matrix
clip space -> normalized device coordinates: divide the (x,y,z,w) by w
now in normalized device coordinates all coordinates wh...
I want to pull a list of coordinates from a database into an array (Before displaying them on a map). however, in the database they are of type Number, and I can't figure out how to convert them to coordinates.
This doesn't work:
Where I have an ATM object (The coordinates are for atm machines) with NSNumbers for latitude and longitude....
If i have a jpeg map with size sizeX, sizeY
and some calibration points on the map (X, Y, Lon, Lat)
What would be the algorithm for calculating the corresponding XY point in the map with a given Longitude / Latitude pair?
...
Hi everybody,
I´ve got a question concerning two sets of points in a 3d space.
I defined a volume by 40 coordinates in one cartesian coordinate system,
in another coordinate system with different (0,0,0) i have s slightly different volume also defined by 40 coordinates. I know the matching pairs of the point sets and I want to measure t...
Hi,
Anyone know how to create an OpenGL ES app that doesn't use the full iPhone screen dimensions as its drawing surface?
Everything I've seen so far has the EAGLView (or whatever) drawing to 0, 0, 320, 480.
I'd like to have my EAGLView at 100, 100, 100, 100.
Is this possible? It seems all I'd need to do is change the glViewport() c...