This suggestion is similar to what I did at my runner maps site,
http://www.webtonix.com/maps/
I have a "generic" arrow icon with php, and, at map-load time I create
an arrow icon for each cardinal direction plus the in-betweens, e.g.
N, NNE, NE, ENE, E, etc.
Here's the source for the php:
http://www.webtonix.com/maps/arrowTurnPhpSource.htm

In the javascript (I really gotta clean up and streamline and
consolidate scripts!) I ascertain the angle of the final point of the
present polyline from the previous turn on said polyline and use the
arrow icon corresponding closest to that angle.

Paul Bruesch
Stillwater, MN

On Sep 7, 3:40 am, marcelo <[EMAIL PROTECTED]> wrote:
> On Sep 7, 12:14 am, neverever <[EMAIL PROTECTED]> wrote:
>
> > I have only two points (start & stop), and use GDirections to write
> > trace.
> > Rotate icon by defined angle - on php script
>
> You don't rotate the image on the fly in PHP. That would be a huge
> waste of resources.
>
> You create a set of icons already rotated, (say one icon for every 10
> degrees, meaning a total of 36 icons), and then you change the icon in
> the client by examining the individual road segments.
>
> Look at the getPolyline() method of 
> GDirections:http://code.google.com/apis/maps/documentation/reference.html#GDirect...
>
> Here's an example of how to parse GDirections results 
> 'manually':http://maps.forum.nu/gm_driving_directions2.html
>
> --
> Marcelo -http://maps.forum.nu
> --
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to