﻿/*
 * Clears all course points, course point 
 * CursorPosition is a GLatLng indicating the cursor position
 */
function RefreshMap(CursorPosition)
{
    // Make sure this method's being called correctly
    if(CursorPosition==null)
        CursorPosition=new GLatLng(0,0);

    // Clear all course points and sprites from the map
    // We don't clear PathPoints or Sprites! Just map objects
    map.clearOverlays();
    
    // Place path point markers and lines on the map
    RefreshMapPathPointsAndLines(CursorPosition);

    // Place sprite markers on the map
    RefreshMapSprites(CursorPosition);
        
    // Update the distance display
    UpdateDistanceDisplay();
    
    RefreshMapMarkersMenu();


    RefreshPathMileMarkers();    
    
    // Show some love to the user
//    UpdateContextSensitiveHelp();
}
