This file will be optimized and embedded in the HTML that is returned for a meeting search map result. More...
Functions | |
| function | LoadMapMain () |
| This fills the entire window with a map. The scale (zoom) is automatically determined, based upon the radius. | |
| function | MarkerSetCallback (in_result) |
| This is a callback that comes from the Google Bar being used to do a map search. What it does is hide the default search result marker (for the first result), and moves the center marker (and the search itself) to the location of the first result. | |
| function | ChooseZoom (in_radius) |
| This chooses a zoom level that should accommodate the the given radius. | |
| function | MapClicked (overlay, in_point) |
| If the map is clicked, the main marker is moved there, and a new AJAX search is performed. | |
| function | DragStart () |
| This "clears the decks" before a drag is started. | |
| function | ZoomEnd () |
| This redraws the circle, and starts a new AJAX search. | |
| function | DragEnd () |
| This redraws the circle, and starts a new AJAX search. | |
| function | ChangeRadius (in_radius) |
| This responds to the popup menu in the main marker window. | |
| function | CreateCenterMarkerHTML (filter_message) |
| This creates the info window HTML for the main marker. | |
| function | CreateCenterMarker (in_lat, in_lng) |
| This creates the central marker on the map. | |
| function | ClearCircularOverlay () |
| This clears the circular overlay. | |
| function | CreateCircularOverlay () |
| This creates a translucent circular overlay that represents the radius of the search. | |
| function | ClearMarkers () |
| Clears all the current meeting markers. | |
| function | DisplayMapMeetings () |
| This calls an AJAX function to fetch the search results and display them. | |
| function | DisplayMapSearchCallback (in_text, in_param_1, in_param_2, in_last_call) |
| This is the AJAX callback for the map search. The AJAX handler returns a JSON object with the basic meeting data. This creates a number of markers, each representing a meeting. | |
| function | CreateMapMarker (in_mtg_obj_array) |
| This creates a single meeting's marker on the map. | |
| function | MapOverlappingMarkers (in_meeting_array) |
| This returns an array, mapping out markers that overlap. | |
| function | openMarkerInfoWindow (in_marker) |
| This simply opens whatever window was assigned to a marker. | |
| function | destVincenty (inGLatLng, dist, brng) |
| Calculate destination point given start point lat/long (numeric degrees), bearing (numeric degrees) & distance (in m). | |
| function | GetPixelsPerMile (inPoint) |
Variables | |
| var | main_lat = null |
| var | main_lng = null |
| var | main_map = null |
| var | main_overlay = null |
| var | main_marker = null |
| var | main_radius = null |
| var | main_kbh = null |
| var | main_allocated_markers = null |
| var | g_last_callback_result = null |
| Number prototype | toRad |
| Number prototype | toDeg |
This file will be optimized and embedded in the HTML that is returned for a meeting search map result.
This file is part of the Basic Meeting List Toolbox (BMLT).
Find out more at: http://magshare.org/bmlt
BMLT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
BMLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this code. If not, see <http://www.gnu.org/licenses/>.
| function ChangeRadius | ( | in_radius | ) |
This responds to the popup menu in the main marker window.
| in_radius | A floating-point value. The radius of the circle, in miles. |
| function ChooseZoom | ( | in_radius | ) |
This chooses a zoom level that should accommodate the the given radius.
| in_radius | A floating-point value. The radius of the circle, in miles. |
Referenced by LoadMapMain().
| function ClearCircularOverlay | ( | ) |
This clears the circular overlay.
Referenced by CreateCircularOverlay(), DisplaySearchSpecification(), DragStart(), MapClicked(), and ZoomEnd().
| function ClearMarkers | ( | ) |
Clears all the current meeting markers.
Referenced by ChangeRadius(), DragStart(), MapClicked(), and ZoomEnd().
| function CreateCenterMarker | ( | in_lat, | |
| in_lng | |||
| ) |
This creates the central marker on the map.
| in_lat | A floating-point value. The latitude of the center of the map. |
| in_lng | A floating-point value. The longitude of the center of the map. |
Referenced by LoadMapMain(), and SmallMapClicked().
| function CreateCenterMarkerHTML | ( | filter_message | ) |
This creates the info window HTML for the main marker.
Referenced by CreateCenterMarker(), and DragEnd().
| function CreateCircularOverlay | ( | ) |
This creates a translucent circular overlay that represents the radius of the search.
Referenced by DisplayMapSearchCallback(), DisplaySearchSpecification(), and SmallMapClicked().
| function CreateMapMarker | ( | in_mtg_obj_array | ) |
This creates a single meeting's marker on the map.
| in_mtg_obj_array | A meeting object array. |
Referenced by DisplayMapSearchCallback().
| function destVincenty | ( | inGLatLng, | |
| dist, | |||
| brng | |||
| ) |
Calculate destination point given start point lat/long (numeric degrees), bearing (numeric degrees) & distance (in m).
from: Vincenty direct formula - T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975 www.ngs.noaa.gov/PUBS_LIB/inverse.pdf
This came from here: www.movable-type.co.uk/scripts/latlong-vincenty-direct.html
final bearing
| inGLatLng | The GLatLng for a point. |
| dist | The distance to be calculated (Defaults to 100 Km) |
| brng | The bearing to the next point, in degrees (defaults to 90 degrees -parallel to Equator) |
Referenced by GetPixelsPerMile().
| function DisplayMapMeetings | ( | ) |
This calls an AJAX function to fetch the search results and display them.
Referenced by DragEnd().
| function DisplayMapSearchCallback | ( | in_text, | |
| in_param_1, | |||
| in_param_2, | |||
| in_last_call | |||
| ) |
This is the AJAX callback for the map search. The AJAX handler returns a JSON object with the basic meeting data. This creates a number of markers, each representing a meeting.
| in_text | This is the text returned by the AJAX handler. It is a JSON object. |
Referenced by DisplayMapMeetings(), and ZoomEnd().
| function DragEnd | ( | ) |
This redraws the circle, and starts a new AJAX search.
Referenced by ChangeRadius(), CreateCenterMarker(), LoadMapMain(), and MapClicked().
| function DragStart | ( | ) |
This "clears the decks" before a drag is started.
Referenced by CreateCenterMarker().
| function GetPixelsPerMile | ( | inPoint | ) |
| inPoint | If this is not given, the map center is used. |
Referenced by CreateCircularOverlay().
| function LoadMapMain | ( | ) |
This fills the entire window with a map. The scale (zoom) is automatically determined, based upon the radius.
Referenced by DisplaySearchResultsMap().
| function MapClicked | ( | overlay, | |
| in_point | |||
| ) |
If the map is clicked, the main marker is moved there, and a new AJAX search is performed.
Referenced by LoadMapMain(), and MarkerSetCallback().
| function MapOverlappingMarkers | ( | in_meeting_array | ) |
This returns an array, mapping out markers that overlap.
| in_meeting_array | An array of JSON objects that will be sorted. |
Referenced by DisplayMapSearchCallback().
| function MarkerSetCallback | ( | in_result | ) |
This is a callback that comes from the Google Bar being used to do a map search. What it does is hide the default search result marker (for the first result), and moves the center marker (and the search itself) to the location of the first result.
| in_result | A search result object array. |
| function openMarkerInfoWindow | ( | in_marker | ) |
This simply opens whatever window was assigned to a marker.
Referenced by CreateCenterMarker(), and CreateMapMarker().
| function ZoomEnd | ( | ) |
This redraws the circle, and starts a new AJAX search.
Referenced by LoadMapMain(), and MakeSmallMap().
| var g_last_callback_result = null |
Contains the JSON object from the last search callback.
Referenced by ChangeRadius(), DisplayMapSearchCallback(), and ZoomEnd().
| var main_allocated_markers = null |
This will hold all of the allocated markers.
Referenced by ClearMarkers(), and CreateMapMarker().
| var main_kbh = null |
The keyboard handler.
| var main_lat = null |
The latitude of the center point
Referenced by LoadMapMain(), MakeSmallMap(), and ToggleMapVisibility().
| var main_lng = null |
The longitude of the center point
Referenced by DisplaySearchResultsMap(), LoadMapMain(), MakeSmallMap(), and ToggleMapVisibility().
| var main_map = null |
The main map object.
Referenced by ChooseZoom(), ClearCircularOverlay(), ClearMarkers(), CreateCenterMarker(), CreateCircularOverlay(), CreateMapMarker(), DisplayMapMeetings(), DisplayMapSearchCallback(), DisplaySearchSpecification(), DragStart(), GetPixelsPerMile(), LoadMapMain(), MakeSmallMap(), MapOverlappingMarkers(), MarkerSetCallback(), SmallMapClicked(), WhereAmI_CallBack(), and ZoomEnd().
| var main_marker = null |
The center marker.
Referenced by CreateCenterMarker(), CreateCenterMarkerHTML(), CreateCircularOverlay(), DisplayMapMeetings(), DisplayMapSearchCallback(), DisplaySearchSpecification(), DragEnd(), MapClicked(), SmallMapClicked(), ToggleMapVisibility(), WhereAmI_CallBack(), and ZoomEnd().
| var main_overlay = null |
The main circular overlay.
Referenced by ClearCircularOverlay(), and CreateCircularOverlay().
| var main_radius = null |
The radius, in miles.
Referenced by ChangeRadius(), CreateCenterMarkerHTML(), CreateCircularOverlay(), DisplayMapMeetings(), DisplaySearchResultsMap(), and LoadMapMain().
1.7.4