[Talk-de] OT: Displaying Color Encoded Information in Track
Sarah Hoffmann
lonvia at denofr.de
So Jun 5 19:18:07 UTC 2011
Hi,
On Sun, Jun 05, 2011 at 05:50:45PM +0200, Rainer Dorsch wrote:
> I would like to display color encoded information in a track. In my particular
> case right now, I would like to record signal strength with my cellphone. The
> easiest way to collect the data is for me a gps track and a table containing
> time and signal strenght.
>
> My end goal is to have the signal strength encoded in the color of the track
> (similarly like josm may encode velocity in the color of the track).
Die StyleMaps von Openlayers sollten genau das tun, was du brauchst. Fuer
ein Beispiel siehe http://openlayers.org/dev/examples/stylemap.html
Grob gesagt musst du die Signalstaerke in die passende Farbe umwandeln und
als zusaetzliche Eigenschaft zum Trackpunkt speichern. Dann musst du eine
Stylemap laden mit:
[...]
fillColor: "${signalcolor}"
[...]
Wenn du die Farbe direkt in Javascript berechnen willst, musst du Style-Regeln
schreiben. Siehe http://openlayers.org/dev/examples/style-rules.html
Gruss
Sarah
Mehr Informationen über die Mailingliste Talk-de