Wasn't it JavaJive who wrote:
>       function createDragDirMarker( loc1, anAzim )
>               {
>               var rAzim = (90 - anAzim)*Math.PI/180;
>               var loc2  = new google.maps.LatLng( loc1.lat() +
>markerLength*Math.sin(rAzim), loc1.lng() + markerLength*Math.cos
>(rAzim) );
>               createDragLineMarker( loc1, loc2 );
>               }

That code would work if degrees of latitude and longitude had the same
length.

You might consider reverse engineering the OpenLayers .rotate() code:

rotate:function(angle,origin){
       angle*=Math.PI/180;
       var radius=this.distanceTo(origin);
       var theta=angle+Math.atan2(this.y-origin.y,this.x-origin.x);
       this.x=origin.x+(radius*Math.cos(theta));
       this.y=origin.y+(radius*Math.sin(theta));
       this.clearBounds();
}

Or you might consider using EOffsetBearing()
see http://econym.org.uk/gmap/eshapes.htm

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
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