A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/maps/documentation/javascript/reference/journey-sharing-map-view below:

Map View | Maps JavaScript API

Skip to main content Map View

Stay organized with collections Save and categorize content based on your preferences.

JourneySharingMapView class

google.maps.journeySharing.JourneySharingMapView class

The map view.

Access by calling const {JourneySharingMapView} = await google.maps.importLibrary("journeySharing").
See Libraries in the Maps JavaScript API.

Properties automaticViewportMode Type:  AutomaticViewportMode

This Field is read-only. Automatic viewport mode.

element Type:  Element

This Field is read-only. The DOM element backing the view.

enableTraffic

Type:  boolean

Enables or disables the traffic layer.

locationProviders Type:  Array<LocationProvider> optional

This field is read-only. Sources of tracked locations to be shown in the tracking map view. To add or remove location providers, use the

JourneySharingMapView.addLocationProvider

and

JourneySharingMapView.removeLocationProvider

methods.

map Type:  Map

This Field is read-only. The map object contained in the map view.

mapOptions Type:  MapOptions

This Field is read-only. The map options passed into the map via the map view.

locationProvider

Deprecated: Use JourneySharingMapView.locationProviders instead.

Type:  LocationProvider optional

This Field is read-only. A source of tracked locations to be shown in the tracking map view.

destinationMarkerSetup

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup

Configures options for a destination location marker. Invoked whenever a new destination marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

originMarkerSetup

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup

Configures options for an origin location marker. Invoked whenever a new origin marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

taskOutcomeMarkerSetup

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup

Configures options for a task outcome location marker. Invoked whenever a new task outcome location marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

unsuccessfulTaskMarkerSetup

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup

Configures options for an unsuccessful task location marker. Invoked whenever a new unsuccessful task marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

vehicleMarkerSetup

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup

Configures options for a vehicle location marker. Invoked whenever a new vehicle marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

waypointMarkerSetup

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup

Configures options for a waypoint location marker. Invoked whenever a new waypoint marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

anticipatedRoutePolylineSetup

Deprecated: Polyline setup is deprecated. Use the PolylineCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  PolylineSetup

Configures options for an anticipated route polyline. Invoked whenever a new anticipated route polyline is rendered.

If specifying a function, the function can and should modify the input's defaultPolylineOptions field containing a google.maps.PolylineOptions object, and return it as polylineOptions in the output PolylineSetupOptions object.

Specifying a PolylineSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same PolylineSetupOptions object in different PolylineSetup functions or static values, and do not reuse the same google.maps.PolylineOptions object for the polylineOptions key in different PolylineSetupOptions objects. If polylineOptions or visible is unset or null, it will be overwritten with the default. Any values set for polylineOptions.map or polylineOptions.path will be ignored.

takenRoutePolylineSetup

Deprecated: Polyline setup is deprecated. Use the PolylineCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  PolylineSetup

Configures options for a taken route polyline. Invoked whenever a new taken route polyline is rendered.

If specifying a function, the function can and should modify the input's defaultPolylineOptions field containing a google.maps.PolylineOptions object, and return it as polylineOptions in the output PolylineSetupOptions object.

Specifying a PolylineSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same PolylineSetupOptions object in different PolylineSetup functions or static values, and do not reuse the same google.maps.PolylineOptions object for the polylineOptions key in different PolylineSetupOptions objects.

Any values set for polylineOptions.map or polylineOptions.path will be ignored. Any unset or null value will be overwritten with the default.

pingMarkerSetup

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup

Configures options for a ping location marker. Invoked whenever a new ping marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

successfulTaskMarkerSetup

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup

Configures options for a successful task location marker. Invoked whenever a new successful task marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

destinationMarkers

Deprecated: getting a list of markers via the MapView is deprecated. Use the MarkerCustomizationFunctions for your location provider to receive callbacks when a marker is added to the map or updated.

Type:  Array<Marker>

Returns the destination markers, if any.

originMarkers

Deprecated: getting a list of markers via the MapView is deprecated. Use the MarkerCustomizationFunctions for your location provider to receive callbacks when a marker is added to the map or updated.

Type:  Array<Marker>

Returns the origin markers, if any.

successfulTaskMarkers

Deprecated: getting a list of markers via the MapView is deprecated. Use the MarkerCustomizationFunctions for your location provider to receive callbacks when a marker is added to the map or updated.

Type:  Array<Marker>

Returns the successful task markers, if any.

taskOutcomeMarkers

Deprecated: getting a list of markers via the MapView is deprecated. Use the MarkerCustomizationFunctions for your location provider to receive callbacks when a marker is added to the map or updated.

Type:  Array<Marker>

Returns the task outcome markers, if any.

unsuccessfulTaskMarkers

Deprecated: getting a list of markers via the MapView is deprecated. Use the MarkerCustomizationFunctions for your location provider to receive callbacks when a marker is added to the map or updated.

Type:  Array<Marker>

Returns the unsuccessful task markers, if any.

vehicleMarkers

Deprecated: getting a list of markers via the MapView is deprecated. Use the MarkerCustomizationFunctions for your location provider to receive callbacks when a marker is added to the map or updated.

Type:  Array<Marker>

Returns the vehicle markers, if any.

waypointMarkers

Deprecated: getting a list of markers via the MapView is deprecated. Use the MarkerCustomizationFunctions for your location provider to receive callbacks when a marker is added to the map or updated.

Type:  Array<Marker>

Returns the waypoint markers, if any.

anticipatedRoutePolylines

Deprecated: getting a list of polylines via the MapView is deprecated. Use the PolylineCustomizationFunctions for your location provider to receive callbacks when a polyline is added to the map or updated.

Type:  Array<Polyline>

Returns the anticipated route polylines, if any.

takenRoutePolylines

Deprecated: getting a list of polylines via the MapView is deprecated. Use the PolylineCustomizationFunctions for your location provider to receive callbacks when a polyline is added to the map or updated.

Type:  Array<Polyline>

Returns the taken route polylines, if any.

Methods addLocationProvider

addLocationProvider(locationProvider)

Parameters: 

Return Value:  None

Adds a location provider to the map view. If the location provider is already added, no action is performed.

removeLocationProvider

removeLocationProvider(locationProvider)

Parameters: 

Return Value:  None

Removes a location provider from the map view. If the location provider is not already added to the map view, no action is performed.

JourneySharingMapViewOptions interface

google.maps.journeySharing.JourneySharingMapViewOptions interface

Options for the map view.

Properties element Type:  Element

The DOM element backing the view. Required.

anticipatedRoutePolylineSetupoptional

Deprecated: Polyline setup is deprecated. Use the PolylineCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  PolylineSetup optional

Configures options for an anticipated route polyline. Invoked whenever a new anticipated route polyline is rendered.

If specifying a function, the function can and should modify the input's defaultPolylineOptions field containing a google.maps.PolylineOptions object, and return it as polylineOptions in the output PolylineSetupOptions object.

Specifying a PolylineSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same PolylineSetupOptions object in different PolylineSetup functions or static values, and do not reuse the same google.maps.PolylineOptions object for the polylineOptions key in different PolylineSetupOptions objects. If polylineOptions or visible is unset or null, it will be overwritten with the default. Any values set for polylineOptions.map or polylineOptions.path will be ignored.

automaticViewportMode optional Type:  AutomaticViewportMode optional

Automatic viewport mode. Default value is FIT_ANTICIPATED_ROUTE, which enables the map view to automatically adjust the viewport to fit vehicle markers, location markers, and any visible anticipated route polylines. Set this to NONE to turn off automatic fitting.

destinationMarkerSetupoptional

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup optional

Configures options for a destination location marker. Invoked whenever a new destination marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

locationProvideroptional

Deprecated: Use JourneySharingMapViewOptions.locationProviders instead.

Type:  LocationProvider optional

A source of tracked locations to be shown in the tracking map view. Optional.

locationProviders optional Type:  Array<LocationProvider> optional

Sources of tracked locations to be shown in the tracking map view. Optional.

mapOptions optional Type:  MapOptions optional

Map options passed into the google.maps.Map constructor.

originMarkerSetupoptional

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup optional

Configures options for an origin location marker. Invoked whenever a new origin marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

pingMarkerSetupoptional

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup optional

Configures options for a ping location marker. Invoked whenever a new ping marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

successfulTaskMarkerSetupoptional

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup optional

Configures options for a successful task location marker. Invoked whenever a new successful task marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

takenRoutePolylineSetupoptional

Deprecated: Polyline setup is deprecated. Use the PolylineCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  PolylineSetup optional

Configures options for a taken route polyline. Invoked whenever a new taken route polyline is rendered.

If specifying a function, the function can and should modify the input's defaultPolylineOptions field containing a google.maps.PolylineOptions object, and return it as polylineOptions in the output PolylineSetupOptions object.

Specifying a PolylineSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same PolylineSetupOptions object in different PolylineSetup functions or static values, and do not reuse the same google.maps.PolylineOptions object for the polylineOptions key in different PolylineSetupOptions objects.

Any values set for polylineOptions.map or polylineOptions.path will be ignored. Any unset or null value will be overwritten with the default.

taskOutcomeMarkerSetupoptional

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup optional

Configures options for a task outcome location marker. Invoked whenever a new task outcome location marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

unsuccessfulTaskMarkerSetupoptional

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup optional

Configures options for an unsuccessful task location marker. Invoked whenever a new unsuccessful task marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

vehicleMarkerSetupoptional

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup optional

Configures options for a vehicle location marker. Invoked whenever a new vehicle marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

waypointMarkerSetupoptional

Deprecated: Marker setup is deprecated. Use the MarkerCustomizationFunction methods for your location provider instead. This field will be removed in the future.

Type:  MarkerSetup optional

Configures options for a waypoint location marker. Invoked whenever a new waypoint marker is rendered.

If specifying a function, the function can and should modify the input's defaultMarkerOptions field containing a google.maps.MarkerOptions object, and return it as markerOptions in the output MarkerSetupOptions object.

Specifying a MarkerSetupOptions object has the same effect as specifying a function that returns that static object.

Do not reuse the same MarkerSetupOptions object in different MarkerSetup functions or static values, and do not reuse the same google.maps.MarkerOptions object for the markerOptions key in different MarkerSetupOptions objects. If markerOptions is unset or null, it will be overwritten with the default. Any value set for markerOptions.map or markerOptions.position will be ignored.

AutomaticViewportMode constants

google.maps.journeySharing.AutomaticViewportMode constants

Automatic viewport mode.

Access by calling const {AutomaticViewportMode} = await google.maps.importLibrary("journeySharing").
See Libraries in the Maps JavaScript API.

Constants FIT_ANTICIPATED_ROUTE Automatically adjust the viewport to fit markers and any visible anticipated route polylines. This is the default. NONE Do not automatically adjust the viewport. LocationProvider abstract class

google.maps.journeySharing.LocationProvider abstract class

Parent class of all location providers.

PollingLocationProvider abstract class

google.maps.journeySharing.PollingLocationProvider abstract class

Parent class of polling location providers.

This abstract class extends LocationProvider.

Properties isPolling

Type:  boolean

True if this location provider is polling. Read only.

pollingIntervalMillis

Type:  number

Minimum time between fetching location updates in milliseconds. If it takes longer than

pollingIntervalMillis

to fetch a location update, the next location update is not started until the current one finishes.

Setting this value to 0, Infinity, or a negative value disables automatic location updates. A new location update is fetched once if the tracking ID parameter (for example, the shipment tracking ID of the shipment location provider), or a filtering option (for example, viewport bounds or attribute filters for fleet location providers) changes.

The default, and minimum, polling interval is 5000 milliseconds. If you set the polling interval to a lower positive value, 5000 is stored and used.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-09 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[]]


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