Displaying Wind Direction with Arrows

4,314 views
Skip to first unread message

Chandra Miller

unread,
Jul 7, 2011, 12:53:05 PM7/7/11
to Google Maps JavaScript API v3
I am trying to get arrows to display on my map like windbarbs for our
wind direction for all our weather gauges. Here is the website
http://156.42.96.39/alert/Google/weather.html. I am currently
displaying data using mapiconmaker.js from a xml file we create off of
our ALERT database. The xml file is at http://156.42.96.39/alert/Google/xml/fcdmc_alert_wx.xml
and the wind data is comes in this field wind_dir="ESE" and is updated
every 15 minutes. I want to display an arrow for each 16 different
options (N, NNE, NE, ENE, etc). I already have the arrows saved in
http://156.42.96.39/alert/Google/arrows. I have been trying to add an
option to mapiconmarker.js but have been unsuccessful. Any
suggestions and/or ideas would be greatly appreciated.

Rossko

unread,
Jul 7, 2011, 2:22:19 PM7/7/11
to Google Maps JavaScript API v3
> Here is the websitehttp://156.42.96.39/alert/Google/weather.html.

It's a v2 map, this is the v3 group, try
http://groups.google.com/group/Google-Maps-API

QuentinUK

unread,
Jul 12, 2011, 5:33:46 PM7/12/11
to Google Maps JavaScript API v3
Here you'll find an example of arrows on a map
http://www.bdcc.co.uk/Gmaps/Services.htm

They are created dynamically not from a bitmap
http://www.bdcc.co.uk/Gmaps/BDCCArrow.js

Esa

unread,
Jul 12, 2011, 7:35:24 PM7/12/11
to Google Maps JavaScript API v3
You don't need mapiconmaker if you have icons of your own.

I already have the arrows saved in
http://156.42.96.39/alert/Google/arrows.

You should gather those to a single image file and use it as a sprite
as v3 provides that feature.

Chandra Miller

unread,
Jul 13, 2011, 10:55:14 AM7/13/11
to Google Maps JavaScript API v3
@QuentinUK - I could not find an example on the Services.htm webpage.
But thank you for the .js link. I have downloaded that code from Bill
Chadwick already. My data values are currently in N, S, W, E not
degrees and I dont know if I can get this code to work with that or if
I am going to need the degrees to be within my xml file.
@Esa - I do already have arrows that I have created. Can I not "use
it as a sprite" with my current map? I am not an expert programer but
I have figured out everything so far related to my maps. If you could
point me in a direction to research how to do this I can try to figure
it out. I really appreciate any feedback I can get. I just replied
to your email. Thank you so much.

Pil

unread,
Jul 13, 2011, 11:36:45 AM7/13/11
to Google Maps JavaScript API v3
A sprite image is one image instead of many. The intention behind is
to reduce the requests to the server: One request instead of many.

This is an example of a sprite image from Google Maps
http://maps.gstatic.com/mapfiles/hpimgs15.png

I looked at your xml file and noticed an unknown format of lats and
longs:

lat="033:32:36" long="112:11:36"

So you should know the format of these attributes, I'd guess they have
to be converted for Maps APi usage.

Chandra Miller

unread,
Jul 13, 2011, 2:37:08 PM7/13/11
to Google Maps JavaScript API v3
Phil - It is degrees, mintues, seconds. The lat longs are coming from
our ALERT database at Flood Control District of Maricopa County. We
run stat report every 15 mintues to update the data and lat/longs are
read off of the station information.

geoco...@gmail.com

unread,
Jul 13, 2011, 3:33:37 PM7/13/11
to Google Maps JavaScript API v3
On Jul 13, 2:37 pm, Chandra Miller <chandraleemil...@gmail.com> wrote:
> Phil - It is degrees, mintues, seconds.  

I think his point is that you will have to translate those into
decimal degrees to display them using the Google Maps API, you will
not be able to use them directly.

-- Larry
Reply all
Reply to author
Forward
0 new messages