[OpenLayers-Users] Drawing in "screen coordinate space" rather than "map coordinate space"

Curtis Olson curtolson at gmail.com
Mon Apr 16 15:04:29 EDT 2012


I have another question for the list -- looking for advice or nudges in the
right direction if possible.

I have my little open-layers map application I have been experimenting
with.  I've been learning how to draw a point on the map in the correct
place given a lon/lat, I figured out how to create my own point icons, even
rotate them.  I figured out how to dive back down into my structures, find
the original points and update them as needed, I've figured out how to
label my points, even change colors and fonts -- all good stuff and I'm
really happy with the capabilities of openlayers and what I've been able to
do so far.

The next thing I'd like to tackle is drawing some things superimposed over
the map that are placed in absolute screen coordinates and don't scroll or
scale with the map.

I've seen a couple examples of drawing buttons using css -- but in my case
I (think I) want to do something slightly different.

For example: let's say I want to draw and animate an arrow showing the
current wind direction and speed and I want that always in the lower right
corner of the screen.  I know how to draw boxes and arrows in openlayers
and animate them, but so far everything I have done has been tied to
lon/lat coordinates.  Now I imagine using similar primitives but draw them
in screen / window coordinates rather than map coordinates.

What is the best strategy for drawing/animating things that should float
above the map and not be subject to scrolling or zooming?

Is there an example of doing something like this?  Is there a keyword or
object type I should search for?  I've been looking through the examples
and googling and haven't turned anything up yet.

Thanks in advance,

Curt.
-- 
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120416/4cc1c263/attachment.html


More information about the Users mailing list