Collection of custom controls in the Map.
overlays — Array layers — Array singleLayers — Object markers — Array polylines — Array routes — Array polygons — Array zoom — Integer map — google.maps.MapNative google.maps.Map object.
Set a context menu for the entire Map or a marker.
setContextMenu
accepts a hash of options.
map
or marker
. options array Collection of context menu items. Each item in this collection has three options. Context menu item options: Name Type Description title string Text displayed in the menu item. name string Unique name used by GMaps to build the menu item. action function Action performed when user selects a context menu item. It takes 1 parameter, which contains the coordinate in the map where the context menu is displayed.
Hide current context menu displayed.
refreshTrigger the resize
event of a Map. Useful when the Map is created in a dynamic container
Fit zoom level to show all markers in the viewport.
fitLatLngBoundsFit zoom level to show a bound of coordinates.
fitLatLngBounds
accepts 1 parameter.
Set center in the Map.
setCenter
accepts 3 parameters.
Get current coordinates of the center.
getDivGet div object described above.
setZoomSet zoom level.
setZoom
accepts 1 parameter.
Increase zoom level.
zoomIn
accepts 1 parameter.
Decrease zoom level.
zoomOut
accepts 1 parameter.
Add a control in the Map UI.
addControl
accepts a hash of options.
Create a marker and return it.
createMarker
accepts a hash of options.
Also, createMarker
accepts any option defined in google.maps.MarkerOptions and any marker event defined in google.maps.Marker ('Events' section).
Create a marker and add it in the Map and the markers collection.
addMarker
accepts the same options of createMarker
.
Add a collection of markers.
addMarkers
accept one parameter, which is an array of the same options used in addMarker
.
Hide all infoWindows shown in the Map.
removeMarkersDelete all markers and clear the markers collection.
drawOverlayDraw a HTML overlay and add it in the Map.
drawOverlay
accepts a hash of options.
Options Name Type Description lat float Latitude of the coordinate where the overlay is placed. lng float Longitude of the coordinate where the overlay is placed. content string HTML that will be drawn in the overlay. layer string Id of any of the layers defined in google.maps.MapPanes:lat
, lng
):
lat
, lng
):
Delete a overlay.
removeOverlay
accepts 1 parameter, which is a google.maps.OverlayView object.
Delete all overlays.
drawPolylineDraw a polyline and add it in the Map and the polylines collection.
drawPolyline
accepts a hash of options.
Also, drawPolyline
accepts any event defined in google.maps.Polyline ('Events' section).
Draw a circle and add it in the Map.
drawCircle
accepts a hash of options.
Also, drawCircle
accepts any option defined in google.maps.CircleOptions and any event defined in google.maps.Circle ('Events' section).
Draw a rectangle and add it in the Map.
drawRectangle
accepts a hash of options.
Also, drawRectangle
accepts any option defined in google.maps.RectangleOptions and any event defined in google.maps.Rectangle ('Events' section).
Draw a polygon and add it in the Map and the polygons collection.
drawPolygon
accepts a hash of options.
Also, drawPolygon
accepts any option defined in google.maps.PolygonOptions and any event defined in google.maps.Polygon ('Events' section).
Get data from a Fusion Tables table and create the layer in the Map.
loadFromFusionTables
accepts a hash of options.
Also, loadFromFusionTables
accepts any option defined in google.maps.FusionTablesLayerOptions.
Get data from a KML file or a GeoRSS file and create the layer in the Map.
loadFromKML
accepts a hash of options.
Also, loadFromKML
accepts any option defined in google.maps.KmlLayerOptions.
Get routes between two coordinates.
getRoutes
accepts a hash of options.
Also, getRoutes
accepts any option defined in google.maps.DirectionsRequest.
Get elevation information of locations or routes.
getElevations
accepts a hash of options.
Delete all polylines.
drawRouteDraw a route using polylines.
drawRoute
accepts a hash of options.
driving
, bicycling
or walking
. waypoints array Array of google.maps.DirectionsWaypoint objects. strokeColor string Color of the polyline. Can be hexadecimal or CSS name. strokeOpacity float Opacity of the polyline from 0.0 to 1.0 strokeWeight integer Polyline width in pixels. cleanRoute
Alias for removePolylines
.
Travel a route automatically.
travelRoute
accepts a hash of options.
driving
, bicycling
or walking
. waypoints array Array of google.maps.DirectionsWaypoint objects. route google.maps.DirectionsRoute google.maps.DirectionsRoute object. start function Fired before the first step. It pass a single parameter, which is a DirectionsRoute object. step function Fired each step in the route. It pass 2 parameters, which is a DirectionsStep object and the total length of the steps. end function Fired after the last step. It pass a single parameter, which is a DirectionsRoute object. drawSteppedRoute
Draw and travel a route automatically step by step.
drawSteppedRoute
accepts a hash of options.
driving
, bicycling
or walking
. waypoints array Array of google.maps.DirectionsWaypoint objects. route google.maps.DirectionsRoute google.maps.DirectionsRoute object. strokeColor string Color of the polyline. Can be hexadecimal or CSS name. strokeOpacity float Opacity of the polyline from 0.0 to 1.0 strokeWeight integer Polyline width in pixels. start function Fired before the first step. It pass a single parameter, which is a DirectionsRoute object. step function Fired each step in the route. It pass 2 parameters, which is a DirectionsStep object and the total length of the steps. end function Fired after the last step. It pass a single parameter, which is a DirectionsRoute object. checkGeofence
Check if a coordinate is inside or outside of a geofence.
Use three arguments and return true or false depending if a coordinate is inside or outside a geofence.
Arguments Name Type Description lat float Latitude of the coordinate lng float Longitude of the coordinate fence google.maps.Polygon Any polygon drawn in the map checkMarkerGeofenceTrigger a callback when a marker is outside its geofences.
Arguments Name Type Description marker google.maps.Marker Marker created withaddMarker
. outside_callback function Function that triggers at each marker fence (defined with fences
option in addMarker
). addLayer
Add a layer to the maps.
Arguments Name Options Description LayerName string The name of the layer. e.gweather
, clouds
, transit
, traffic
, bicycling
, panoramio
, places
options object An object with options for the layer.
Places specific
nearbySearch
Remove a layer from the maps.
Arguments Name Options Description LayerName string The name of the layer. e.gweather
, clouds
, transit
, traffic
, bicycling
, panoramio
, places
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4