JS API v 1.4
Javascript Store Locator API Reference v 1.4- Loader class
- BaseView class
- DataSearchSource class
- DataSource class
- LocatorWindow class
- MapsLoader class
- TemplateRenderer class
- TiledView class
- View class
- ZipCodeProvider class
- BaseLayer class
- DataLayer class
- TiledDataOverlay class
- TiledImageLayer class
- BaseRenderer class
- DefaultRenderer class
- MarkersRenderer class
- DirectionsProvider class
- DistanceProvider class
- GeocoderSearchSource class
- LocationProvider class
- NearbyStoresSource class
- PlacesSearchSource class
- Data class
- Feature class
- LatLng class
- LatLngBounds class
- Point class
- Size class
- F class
- Field class
- Query class
- SearchParameters class
- SearchQuery class
- Styler class
- DirectionsResultsDisplayer class
- InfoBox class
- MailView class
- OriginDestinationInput class
- SearchView class
- TableView class
- TravelModeSelector class
- DelegateProtocol class
- DelegateReturn class
- MVCObject class
- Address Interface
- BaiduDirectionsRouteParams Interface
- BaiduDistance Interface
- BaiduDuration Interface
- BaiduMapsOptions Interface
- BaiduPolylineOptions Interface
- BaseViewOptions Interface
- BoundsPadding Interface
- Contact Interface
- DataLayerOptions Interface
- DataStyle Interface
- DeprecatedStyleRule Interface
- DirectionsRouteInformationsParams Interface
- EventListeners Interface
- EventName Interface
- FeatureData Interface
- GeoJSON Interface
- GeocoderOptions Interface
- Geometry Interface
- GoogleGeocoderErrorCallback Interface
- JSONPOptions Interface
- LatLngLiteral Interface
- LoadOptions Interface
- MapsLoaderOptions Interface
- MarkerStyleOptions Interface
- NearbyOptions Interface
- OdInputOptions Interface
- OriginDestination Interface
- PolylineFilter Interface
- RendererOptions Interface
- SearchParametersOptions Interface
- SelectedAndUnselectedRendererOptions Interface
- Store Interface
- StoreEventCallback Interface
- Style Interface
- StyleRule Interface
- TileStyle Interface
- TiledImageLayerOptions Interface
- TiledOverlayOptions Interface
- TiledViewOptions Interface
- TrafficLayerOptions Interface
- TypesRules Interface
- createMapOptions Interface
- QuerySearchOptions Interface
- TextSearchQuery Interface
- InfoBoxOptions Interface
- SearchViewOptions Interface
- ControlPosition Enum
- BoolOperators Enum
- Operators Enum
Loader class
Loader
Constructs a new WoosmapLoader instance.
Constructor |
Loader() Parameters:
None
Constructs a new WoosmapLoader instance. |
Methods | |
load(loadOptions) Parameters:
Load method with one parameter and no version aliases. |
BaseView class
woosmap.BaseView
MVCObject
.
Constructor |
BaseView() Parameters:
None
Constructs a new BaseView
|
Properties | |
Type:
LatLngLiteral The user defined location. This property is bindable. | |
Type:
google.maps.Marker This marker is positioned on the map when | |
Type:
BoundsPadding Controls the viewport padding used by fitBounds. | |
Type:
Store The currently selected store. This property is bindable. | |
Type:
Store[] List of stores displayed. This property is bindable. |
Methods | |
init(map, options) Parameters:
Initializer method to call in subclasses. This is splitted from the constructor to allow subclasses to use it as their prototype. | |
panTo(center, padding?, force?) Parameters:
Sets the center of the map.
Takes in account the | |
fitBounds(bounds, padding?) Parameters:
Sets the viewport to contain the given bounds.
Takes in account the | |
enableZoom(activate) Parameters:
Enable or Disable zoom when select a store | |
enablePan(activate) Parameters:
Enable or Disable pan when select a store | |
enablePaddedStoreCenter(activate) Parameters:
Enable or Disable padded Store Center the padded store center triggers panning only if the selected store is outside the ‘visible zone’ ie. the current map bounds minus padding. | |
stores_changed() Parameters:
None
This is the function called when the stores property has changed. | |
selectedStore_changed() Parameters:
None
This function is called when | |
getDataBounds() Parameters:
None
Return Type:
google.maps.LatLngBounds Process each feature in the dataLayer to compute the bounds of the displayed data. | |
getMap() Parameters:
None
Return Type:
google.maps.Map Returns the google maps used by the BaseView. | |
removeAllStores() Parameters:
None
Removes all the stores from the map. | |
displayStore(store) Parameters:
Adds a single store to the map, zoom + pan on it | |
location_changed() Parameters:
None
This function is called when | |
addListener(eventName, callback) Parameters:
Return Type:
StoreEventListener Adds a store event listener. | |
removeListener(storeEventListener) Parameters:
Removes a store event listener. |
DataSearchSource class
woosmap.DataSearchSource
woosmap.utils.MVCObject
.
Constructs a new DataSearchSource
Constructor |
DataSearchSource(dataSource, searchTextOptions, nearbyOptions, polylineFilter?) Parameters:
Constructs a new DataSearchSource |
Properties | |
Type:
string Observes his query to launch the search into store’s data. | |
Type:
LatLngLiteral Observes his location to narrow the search around a location. Needs to be completed with a maxStore and a maxDistanceFromUser in constructors option nearbyOptions | |
Type:
SearchParameters Contains options to searchStores |
Methods | |
autocomplete_query_changed() Parameters:
None
Listens the changes of query. | |
location_changed() Parameters:
None
Listens the changes of location. | |
updateSearchQuery(key, value) Parameters:
Updated the searchQuery value. | |
updateSearchQueryAndSearch(key, value) Parameters:
Updated the searchQuery value and launch a search with the new value. | |
addFieldToSearchTextOptions(fieldName, operator) Parameters:
Add a new field to searchTextOptions or update an existing field (new field will be used for store filtering). | |
removeFieldFromSearchTextOptions(fieldName) Parameters:
Remove a field from searchTextOptions (so field will not be use anymore for filtering).Update stores list after removal. | |
updateTextSearchQuery() Parameters:
None
Get the value of ‘autocomplete_query’ and searchTextOptions and update the SearchQuery with them. Then request new store list. | |
updateTextSearchQueryAndSearch() Parameters:
None
Get the value of ‘autocomplete_query’ and searchTextOptions and update the SearchQuery with them. Then request new store list. | |
search(querySearchParameters?) Parameters:
Use the woosmap API to search into store’s data with nearbyOptions, polylineFilter, searchQuery and location as parameters. | |
setPolylineFilter(polylineFilter) Parameters:
Add or update the polylineFilter for the searchSource.To remove the filter set is value to | |
setMaxStores(maxStores) Parameters:
Update the maxStores value.To remove the search option set is value to | |
setMaxDistanceFromUser(maxDistanceFromUser) Parameters:
Update the maxDistanceFromUser value.To remove the search option set is value to |
DataSource class
woosmap.DataSource
Constructor |
DataSource(api_url?, api_key?) Parameters:
The DataSource object is the bridge to the server API. |
Methods | |
getFromApi(url, callback) Parameters:
Make an ajax call with the url and call the callback if success | |
getAllStores(callback) Parameters:
Return Type:
Promise Returns all the stores. | |
getNearbyStores(lat, lng, callback, maxStores, maxDistanceFromUser) Parameters:
Return Type:
Promise Fetches stores that are near the (lng, lat) position and pass it to the callback.
if | |
getStoreById(store_id, callback) Parameters:
Return Type:
Promise Fetches a store by its store_id. | |
getStoresBySearchQuery(query, callback) Parameters:
Return Type:
Promise Fetches stores that name matches the search query and pass it to the callback. | |
searchStores(searchQuery, callback) Parameters:
Return Type:
Promise Fetches stores that matches the search query and pass it to the callback. | |
searchNearbyStores(searchQuery, lat, lng, callback, maxStores, maxDistanceFromUser) Parameters:
Return Type:
Promise Fetches nearby stores that matches the search query and pass it to the callback. | |
searchStoresByParameters(searchParameters, callback) Parameters:
Return Type:
Promise Search on store given a list of information | |
countStoresByParameters(searchParameters, callback) Parameters:
Return Type:
Promise return the number of stores matching parameters | |
storesBoundsByParameters(searchParameters, callback) Parameters:
Return Type:
Promise return the bounds for all stores matching parameters | |
getProjectConfig(callback) Parameters:
Return Type:
Promise Get the config object for the Project. |
LocatorWindow class
woosmap.LocatorWindow
woosmap.utils.MVCObject
.
Constructor |
LocatorWindow(map, renderer, infoBoxOptions?) Parameters:
Construct a LocatorWindow. |
Properties | |
Type:
Store The currently |
Methods | |
selectedStore_changed() Parameters:
None
When selectedStore changes open the InfoWindow on the current store. if selectedStore is null then close the InfoWindow. | |
getAnchorForCoordinates(coordinates) Parameters:
Return Type:
google.maps.MVCObject Computes the Window anchor for | |
getMarkerForCoordinates(coordinates) Parameters:
Return Type:
google.maps.Marker Return a marker for | |
openOn(store) Parameters:
Opens the info window on the | |
close() Parameters:
None
Closes the Locatorwindow | |
setOpeningCallback(openingCallback?) Parameters:
Adds a listener for | |
setInfoBoxOptions(options?) Parameters:
Method to set InfoboxOptions if it’s not a google InfoWindow |
MapsLoader class
woosmap.MapsLoader
Constructor |
MapsLoader(clientIdOrOptions?, librariesToLoad?) Parameters:
Construct a MapsLoader instance |
Methods | |
load(callback) Parameters:
Loads the google maps api and calls the callback when done. |
TemplateRenderer class
woosmap.TemplateRenderer
Constructs a TemplateRendererInstance
Constructor |
TemplateRenderer(template) Parameters:
Constructs a TemplateRendererInstance |
Methods | |
render(properties?) Parameters:
Return Type:
any Renders the compiled template with the context | |
registerLambda(name, lambda) Parameters:
Registers a template Lambda |
TiledView class
woosmap.TiledView
BaseView
.
TiledView this view is mostly compatible with {woosmap.View}. This object mixes two layers:
- a tiled image layer for higher zoom levels
- a tiled vector layer for lower zoom levels
Constructor |
TiledView(map, options?) Parameters:
|
Methods | |
setSearchParameters(searchParameters) Parameters:
Sets the | |
setSearchQuery(searchQuery) Parameters:
Sets the | |
setPolylineFilter(polylineFilter) Parameters:
Sets the |
View class
woosmap.View
woosmap.BaseView
.
Constructs a View
Constructor |
View(map, markersOrOptions?, zoomLevel?) Parameters:
|
ZipCodeProvider class
woosmap.ZipCodeProvider
woosmap.utils.MVCObject
.
Constructs a new ZipCodeProvider
Constructor |
ZipCodeProvider() Parameters:
None
Constructs a new ZipCodeProvider |
Properties | |
Type:
LatLngLiteral The | |
Type:
string Stores the |
Methods | |
getZipCode() Parameters:
None
Return Type:
string Get the currently saved zipcode | |
getZipCodeType() Parameters:
None
Return Type:
string Get the zipcode type | |
location_changed() Parameters:
None
This method is called when the location has changed. It updates the zipcode by reverse geocoding |
BaseLayer class
woosmap.layers.BaseLayer
Constructor |
BaseLayer(options) Parameters:
BaseLayer. |
Methods | |
setHidden(isHidden) Parameters:
Set the visibility of the data | |
getHidden() Parameters:
None
Return Type:
Boolean Getter to access to the visibility state | |
selectStore(selectedStore) Parameters:
Set the map instance |
DataLayer class
woosmap.layers.DataLayer
woosmap.layers.BaseLayer
.
Constructor |
Methods | |
displayStores(stores) Parameters:
Displays on the map the stores passed as parameter. | |
displayNumberedStores(stores) Parameters:
Displays the stores with numbered icons. |
TiledDataOverlay class
woosmap.layers.TiledDataOverlay
BaseLayer
.
TiledDataOverlay Uses marker vector tiles and displays it using a renderer.
Constructor |
Methods | |
clear() Parameters:
None
Clears the overlay data and cache. | |
setSearchParameters(searchParameters) Parameters:
Sets the search parameters used to filter the displayed data. | |
setSearchQuery(searchQuery) Parameters:
Sets the searchQuery used to filter the displayed data. | |
setPolylineFilter(polylineFilter) Parameters:
Sets the polylineFilter used to filter the displayed data. | |
onAdd() Parameters:
None
| |
onRemove() Parameters:
None
| |
tilesDidLoad() Parameters:
None
Called when all the tiles requested from the api server were fetched. |
TiledImageLayer class
woosmap.layers.TiledImageLayer
Constructor |
TiledImageLayer(options?) Parameters:
Constructs a new TiledImageLayer |
Methods | |
setMap(map) Parameters:
Set an overlay to a map with the tiles generated by the tiler server | |
getMap() Parameters:
None
Return Type:
google.maps.Map Returns the google map bound to the image layer. | |
setSearchParameters(searchParameters) Parameters:
Sets the search parameters used to filter the displayed data. | |
setSearchQuery(searchQuery) Parameters:
Sets the searchQuery used to filter the displayed data. | |
setPolylineFilter(polylineFilter) Parameters:
Sets the polylineFilter used to filter the displayed data. |
BaseRenderer class
woosmap.layers.renderers.BaseRenderer
Base renderer.
Constructor |
BaseRenderer(options) Parameters:
|
Methods | |
addEventListener(event, listener) Parameters:
Adds an eventListener triggered when the event is triggered on markers. | |
setClick(callback) Parameters:
Build the click listener with the callback argument | |
displayNumberedStores(stores) Parameters:
Call to display the stores with the numbered style | |
tilesDidLoad() Parameters:
None
Called once all tiles request are finished. | |
selectStore(selectedStore) Parameters:
Use the | |
clear() Parameters:
None
Removes all the data and style from the layer. |
DefaultRenderer class
woosmap.layers.renderers.DefaultRenderer
woosmap.layers.renderers.BaseRenderer
.
Default renderer.
Constructor |
DefaultRenderer(options) Parameters:
|
Methods | |
displayNumberedStores(stores) Parameters:
Call to display the stores with the numbered style | |
tilesDidLoad() Parameters:
None
Called once all tiles request are finished. | |
selectStore(selectedStore) Parameters:
Use the | |
clear() Parameters:
None
Removes all the data and style from the layer. |
MarkersRenderer class
woosmap.layers.renderers.MarkersRenderer
DefaultRenderer
.
Constructor |
Methods | |
displayMarkers(features, markers?) Parameters:
Display the markers of each features | |
clear() Parameters:
None
Hide the markers and remove the idleListener | |
getDisplayingMarkers() Parameters:
None
Return Type:
google.maps.Marker[] Return the markers object for the current bounds | |
getDisplayingFeatures() Parameters:
None
Return Type:
Array Return the features objects for the current bounds | |
tileDidLoad(geojson) Parameters:
| |
displayCurrentMarkers() Parameters:
None
Display the markers in the current bounds | |
displayNumberedStores(stores) Parameters:
Display the stores list with a numbered style | |
tilesDidLoad() Parameters:
None
| |
selectStore(data) Parameters:
|
DirectionsProvider class
woosmap.location.DirectionsProvider
MVCObject
.
Constructor |
DirectionsProvider(directionRendererOptions?, googleDirectionsRequestOptions?, directionsRequestErrorCallback?) Parameters:
Constructs a new DirectionsProvider |
Properties | |
Type:
String This property is observable A link to open google map with the current itinerary | |
Type:
google.maps.DirectionsRenderer[] This property is observable An array containing renderer about each route | |
This property is observable An array containing information about each route | |
Type:
LatLngLiteral This property is observable | |
Type:
String This property is observable |
Methods | |
originDestination_changed() Parameters:
None
Triggered when originDestination attribute changed (observer) | |
selectedTravelMode_changed() Parameters:
None
Triggered when selectedTravelMode attribute changed (observer) | |
cleanMapFromRoutes() Parameters:
None
Trigger setMap and setPanel with null parameter for each renderer to remove their polyline and panel details | |
getRouteEncodedPolyline(rendererIndex) Parameters:
Return Type:
string | |
getDirectionsFromOrToStore() Parameters:
None
Get directions from, or to, store with google directions services and set results in directionsRenderers | |
route(requestParams, successCallback, failCallback) Parameters:
Return Type:
any | |
setDirectionsObjectsWithResponse(response) Parameters:
Set directionsRenderers and directionsSummary objects | |
getDirectionsLink(origin, destination, travelMode) Parameters:
Get the direct link to google or baidu directions from the user’s input | |
getAvailableTravelModes() Parameters:
None
Return Type:
any Gets available travel modes. |
DistanceProvider class
woosmap.location.DistanceProvider
MVCObject
.
Constructs a new DistanceProvider. It should be bound to a location property or it needs to be set manually.
Constructor |
DistanceProvider(options?) Parameters:
Constructs a new DistanceProvider. It should be bound to a location property or it needs to be set manually. |
Properties | |
Type:
LatLngLiteral The location to compute a distance from. This property is bindable. |
Methods | |
updateStoresDistanceWithGoogle(stores, user_callback, orderby) Parameters:
This method updates or adds the following properties of each
|
GeocoderSearchSource class
woosmap.location.GeocoderSearchSource
MVCObject
.
GeocoderSearchSource
Constructor |
GeocoderSearchSource(geocoderOptions?) Parameters:
Constructs a new GecoderSearchSource |
Properties | |
Type:
LatLngLiteral When google answer a geocoding requests with only one result, it sets this property. If maxResultsReturn is set to one then google’s answer always set this property. This property is bindable | |
Type:
Array When google answer a geocoding requests with more than one result, it sets this property. This property is bindable | |
Type:
string Observes his query to launch the geocoding. |
Methods | |
query_changed() Parameters:
None
Listens the changes of query. | |
search(query) Parameters:
Use the google maps geocoder to geocode the query. |
LocationProvider class
woosmap.location.LocationProvider
MVCObject
.
Constructs a new LocationProvider, in order to track browser location
Constructor |
LocationProvider() Parameters:
None
Constructs a new LocationProvider, in order to track browser location |
Properties | |
Type:
LatLngLiteral When the LocationProvider returns a result it sets this property. This property is bindable |
Methods | |
askForLocation(geoLocationProvider) Parameters:
Set user location given provider. |
NearbyStoresSource class
woosmap.location.NearbyStoresSource
MVCObject
.
Constructor |
NearbyStoresSource(dataSource, maxStores, maxDistanceFromUser) Parameters:
Builds a NearbyStoresSource |
Properties | |
Type:
LatLngLiteral The location to search stores from. This property is bindable. | |
Type:
Array An array of stores. This property is bindable. |
Methods | |
location_changed() Parameters:
None
This method is called when the location has changed. |
PlacesSearchSource class
woosmap.location.PlacesSearchSource
MVCObject
.
Constructs a new PlacesSearchSourceAutocompleteRequest can be biased using location, radius or bounds property through the options param
Constructor |
PlacesSearchSource(options?, minQuerySize?, searchCallback?) Parameters:
Constructs a new PlacesSearchSourceAutocompleteRequest can be biased using location, radius or bounds property through the options param |
Properties | |
Type:
String Observes his autocomplete_query to launch the autocomplete. | |
Type:
Number If autocomplete query change but with a length smaller than minQuerySize then no request to google map is done. | |
Type:
Object Observes this property to launch configure autocomplete. should comply to google’s specifications See : AutocompletionRequest | |
Type:
Array When Places returns a prediction list it sets this property. This property is observable | |
Type:
null Callback to execute after search if needed |
Methods | |
autocomplete_query_changed() Parameters:
None
Listens the changes of autocomplete_query. |
Data class
woosmap.maps.data.Data
A layer for displaying geospatial data. Points can be displayed.
Constructor |
Data() Parameters:
None
Creates an empty collection. |
Methods | |
addGeoJson(geojson, options?) Parameters:
Adds GeoJSON features to the collection. Give this method a parsed JSON. The imported features are returned. Throws an exception if the GeoJSON could not be imported. | |
toGeoJson(callback) Parameters:
Exports the features in the collection to a GeoJSON object. | |
contains(feature) Parameters:
Return Type:
boolean Checks whether the given feature is in the collection. | |
forEach(callback) Parameters:
Repeatedly invokes the given function, passing a feature in the collection to the function on each invocation. The order of iteration through the features is undefined. | |
getFeatureById(id) Parameters:
Return Type:
Feature Returns the feature matching the id. | |
getMap() Parameters:
None
Return Type:
google.maps.Map Returns the map on which the features are displayed. | |
setMap(map) Parameters:
Renders the features on the specified map. If map is set to null, the features will be removed from the map. | |
setStyle(style) Parameters:
Sets the style for all features in the collection. Styles specified on a per-feature basis via | |
getStyle() Parameters:
None
Return Type:
any Gets the style for all features in the collection. | |
overrideStyle(feature, style) Parameters:
Changes the style of a feature.
These changes are applied on top of the style specified by | |
revertStyle(feature?) Parameters:
Removes the effect of previous | |
addListener(event, callback) Parameters:
Adds a listener for event | |
trigger(event, eventData) Parameters:
Trigger event listeners. |
Feature class
woosmap.maps.data.Feature
Constructor |
Feature(featureData) Parameters:
|
Methods | |
getGeometry() Parameters:
None
Return Type:
google.maps.LatLng Returns the feature geometry. | |
getId() Parameters:
None
Return Type:
String Returns the feature id. | |
getProperty(name) Parameters:
Return Type:
any Returns the feature property | |
removeProperty(name) Parameters:
Removes property | |
setProperty(name, newValue) Parameters:
| |
toGeoJson(callback) Parameters:
Exports the feature to a GeoJSON object. |
LatLng class
woosmap.maps.geometry.LatLng
Constructor |
LatLng(lat, lng) Parameters:
|
Properties | |
Type:
Number The latitude. | |
Type:
Number The latitude. |
Methods | |
LatLngBounds class
woosmap.maps.geometry.LatLngBounds
Constructor |
LatLngBounds(ne, sw) Parameters:
|
Methods | |
isEmpty() Parameters:
None
Return Type:
Boolean Checks if the current bounds are empty. | |
intersects(other) Parameters:
Return Type:
Boolean Checks if bounds are intersecting with other. | |
union(other) Parameters:
| |
contains(latlng) Parameters:
Return Type:
Boolean Checks if current bounds contain latlng. | |
extend(point) Parameters:
Return Type:
LatLngBounds Extends the current bounds with point. | |
Point class
woosmap.maps.geometry.Point
Constructor |
Point(x, y) Parameters:
|
Properties | |
Type:
Number x coordinate. | |
Type:
Number y coordinate. |
Size class
woosmap.maps.geometry.Size
Constructor |
Size(width, height) Parameters:
|
Properties | |
Type:
Number | |
Type:
Number |
F class
woosmap.query.F
Function helper to instantiate a Field, used to form queries.
Constructor |
F(key, value, operator?) Parameters:
Function helper to instantiate a Field, used to form queries. |
Field class
woosmap.query.Field
Represents a field filter
Constructor |
Field(key, value, operator?) Parameters:
|
Methods | |
toString() Parameters:
None
Return Type:
string Returns the field clause in query format. |
Query class
woosmap.query.Query
Represents a Query
Constructor |
Query(children, connector, negate) Parameters:
|
Methods | |
toString() Parameters:
None
Return Type:
String Returns the Query as a string usable for the search endpoint query parameter. |
SearchParameters class
woosmap.search.SearchParameters
Constructor |
SearchParameters(searchParametersOptions?) Parameters:
Constructs a new SearchParameters |
Properties | |
Type:
String Allowed values for the groupBy parameter. | |
Bounds in which the search will be performed | |
Type:
woosmap.search.SearchParameters.GroupByValues Count the stores by group values | |
Type:
Number Latitude of the position to search nearest stores | |
Type:
Number Longitude of the position to search nearest stores. | |
Type:
Number Maximum distance from user (in meter). | |
Type:
Number Maximum number of stores to return. | |
Type:
Number The expected page | |
Type:
PolylineFilter PolylineFilter to filter on polyline path | |
Type:
SearchQuery Query to filter on store’s properties (text, types and tags). | |
Type:
Number Number of store in one page (default: 100, max: 300) | |
Type:
Boolean Whether the search should perform an intersection between point and zones. |
Methods | |
buildUrl() Parameters:
None
Return Type:
String Build encoded parameters of an url to search stores (&max_number=3). |
SearchQuery class
woosmap.search.SearchQuery
MVCObject
.
Constructor |
SearchQuery(querySearchOptions) Parameters:
Constructs a new SearchQuery |
Properties | |
Type:
string AND query operator | |
Type:
string OR query operator | |
Type:
TextSearchQuery Property for text search | |
Type:
String[] Property for tag search | |
Type:
String[] Property for type search |
Methods | |
addTagFilter(tagName, operator) Parameters:
Adds a tag filter to the query. | |
addTypeFilter(typeName, operator) Parameters:
Adds a type filter to the query. | |
setQuery(queryText, options?) Parameters:
Sets the query text | |
addQueryOption(name, operator) Parameters:
Adds a query option | |
removeQueryOption(name) Parameters:
Removes a QueryOption by name. |
Styler class
woosmap.style.Styler
Styler duty is to style google maps Data Layer
Constructor |
Styler(options) Parameters:
|
Methods | |
getMarkerStyleForStore(store, options) Parameters:
Return Type:
google.maps.Icon Resolves style for the store feature using options. |
DirectionsResultsDisplayer class
woosmap.ui.DirectionsResultsDisplayer
MVCObject
.
You must bind directionsLink property to directionsProvider if you want to handle the click button on an object with the CSS class woosmap-mobile-link-button to redirect mobile user on Gmaps app.
Constructor |
DirectionsResultsDisplayer(map, summaryTemplate, displayNewRenderersCallback, selectedAndUnselectedRendererOptions) Parameters:
You must bind directionsLink property to directionsProvider if you want to handle the click button on an object with the CSS class woosmap-mobile-link-button to redirect mobile user on Gmaps app. |
Methods | |
displayRouteSteps(rendererIndex) Parameters:
Display route’s steps on panel | |
cleanRoutes() Parameters:
None
Clean all routes on panel | |
cleanRouteSteps() Parameters:
None
Clean all route’s step on panel | |
cleanMapFromRoutes() Parameters:
None
Hide all route’s Polyline on map | |
displayAllRoutes() Parameters:
None
Display all the route on the map | |
displayRouteOnMap(rendererIndex) Parameters:
Display a selected route polyline on map | |
setSelectedRenderer(rendererIndex) Parameters:
Set renderer options to |
InfoBox class
woosmap.ui.InfoBox
Creates an InfoBox with the options specified in InfoBoxOptions. Call InfoBox.open to add the box to the map.
Constructor |
InfoBox(opt_opts?) Parameters:
Creates an InfoBox with the options specified in InfoBoxOptions. Call InfoBox.open to add the box to the map. |
Methods | |
onRemove() Parameters:
None
Invoked when close is called. Do not call it directly. | |
draw() Parameters:
None
Draws the InfoBox based on the current map projection and zoom level. | |
setInfoBoxOptions(opt_opts) Parameters:
Sets the options for the InfoBox. Note that changes to the maxWidth, closeBoxMargin, closeBoxURL, and enableEventPropagation properties have no affect until the current InfoBox is closed and a new one is opened. | |
setContent(content) Parameters:
Sets the content of the InfoBox. The content can be plain text or an HTML DOM node. | |
setZIndex(index) Parameters:
Sets the zIndex style for the InfoBox. | |
setVisible(isVisible) Parameters:
Sets the visibility of the InfoBox. | |
getContent() Parameters:
None
Return Type:
string Returns the content of the InfoBox. | |
getZIndex() Parameters:
None
Return Type:
number Returns the zIndex for the InfoBox. | |
getVisible() Parameters:
None
Return Type:
boolean Returns a flag indicating whether the InfoBox is visible. | |
show() Parameters:
None
Shows the InfoBox. [Deprecated; use setVisible instead.] | |
hide() Parameters:
None
Hides the InfoBox. [Deprecated; use setVisible instead.] | |
open(map, anchor?) Parameters:
Adds the InfoBox to the specified map or Street View panorama. If anchor (usually a google.maps.Marker) is specified, the position of the InfoBox is set to the position of the anchor. If the anchor is dragged to a new location, the InfoBox moves as well. | |
close() Parameters:
None
Removes the InfoBox from the map. |
Events | |
This event is fired when the DIV containing the InfoBox’s content is attached to the DOM. | |
This event is fired when the InfoBox’s close box is clicked. | |
This event is fired when the content of the InfoBox changes. | |
This event is fired when the position of the InfoBox changes. | |
This event is fired when the zIndex of the InfoBox changes. |
MailView class
woosmap.ui.MailView
woosmap.utils.DelegateProtocol
.
Constructs a new MailView, in order to ask our API endpoint to send a mail for directions
Template example
<div>
<input type="text" placeholder="email" class="woosmap-mail-input"/>
<button class="woosmap-send-button">Send mail</button>
</div>
Delegates
mailSending
called when mail is insending
state.mailError
called when mail is inerror
state.mailSent
called when mail is insent
state.
Constructor |
MailView(template, custom_params) Parameters:
Constructs a new MailView, in order to ask our API endpoint to send a mail for directions |
Properties | |
Type:
mailStatus When the MailView returns a result it sets this property. This property is bindable | |
Type:
String When the MailView sends an email with directions, it needs to have the currently selected store set in in order to send the proper directions. This property is bindable | |
Type:
Object Contains all the available status for the MailView.
Status states |
Methods | |
sendDirectionsMail(receiver_mail) Parameters:
Sends a request to the datastore to send a mail with directions link to the mail provided | |
getContainer() Parameters:
None
Return Type:
any |
OriginDestinationInput class
woosmap.ui.OriginDestinationInput
MVCObject
.
Take the template for an Origin Destination Panel and link with an originDestination object
Constructor |
OriginDestinationInput(originDestinationPanelTemplate, odInputOptions?) Parameters:
Take the template for an Origin Destination Panel and link with an originDestination object |
Properties | |
Type:
LatLngLiteral The location to use to compute the directions. | |
Type:
OriginDestination | |
Type:
Store The selected store. This property is bindable. | |
Type:
boolean Flag to decide where to put the store name. |
Methods | |
isSelectedStoreName(name) Parameters:
Return true if the selectedStore has a name equal to the name in parameters | |
updateOriginDestination() Parameters:
None
Set the originDestination object {origin: **, destination: **} with value containing in woosmap-origin and woosmap-destination input If one name is the same that selectedStore’s name then store position is set instead of the name | |
setOriginValue(newOriginValue) Parameters:
Set the value of woosmap-origin input | |
setDestinationValue(newDestinationValue) Parameters:
Set the value of woosmap-destination input | |
getOriginValue(useLatLng?) Parameters:
Get the value of woosmap-origin input return selectedStore position is value is the same tha store name | |
getDestinationValue(useLatLng?) Parameters:
Get the value of woosmap-destination input return selectedStore position is value is the same tha store name | |
onKeyUp(event) Parameters:
Method called when keyUp on origin or destination input | |
selectedStore_changed() Parameters:
None
Method called when selectedStore changed | |
location_changed() Parameters:
None
Method called when location changed | |
getODContainer() Parameters:
None
Return the container instantiated with origin-destination panel |
SearchView class
woosmap.ui.SearchView
woosmap.utils.DelegateProtocol
.
Constructs a SearchView
didSearchClear
is called when the search query is validated.
Constructor |
SearchView(searchViewOptions?) Parameters:
Constructs a SearchView
|
Methods | |
setupInteraction() Parameters:
None
Setups the interactions with the input, button, and clear button | |
setSearchQueryWithInputValue(property) Parameters:
Sets the query property with the value of the input. | |
clearResults() Parameters:
None
Method called when searchView need to clear its results. | |
clearInput() Parameters:
None
Method called when searchView need to clear its input. | |
getContainer() Parameters:
None
Return Type:
any | |
locationResults_changed() Parameters:
None
Method called when locationResults changed.When changed is trigger searchView will display location results into resultSelector container. | |
getResultsSelector() Parameters:
None
Return Type:
any Return resultsSelector container. |
TableView class
woosmap.ui.TableView
MVCObject
.
Constructs a new TableView
TableView container
<div class="woosmap-tableview-container"></div>
TableView Store Cell template example
<div>{{name}}</div>
<a class="title">{{name}}</a><br/>
<small class="quiet">{{address.city}}</small>
<div>{{address.lines}} {{address.city}} {{address.zip}}</div>
<div>Tel : <a href="tel:{{phone}}">{{phone}}</a></div>
TableView Places Cell template example
<div>{{description}}</div>
If a card is selected its container will bear woosmap-tableview-selected-cell
class.
If a card is highlighted using arrow keys, its container will bear woosmap-tableview-highlighted-cell
class.
Constructor |
TableView(templates, placesSearchSource?) Parameters:
Constructs a new TableView |
Properties | |
Type:
Object When user selects a places prediction it sets this property with places details This property is observable | |
Type:
Object When user click on a Places cell, it sets this property This property is observable | |
Type:
Array An array of Places predictions. This property is bindable. | |
Type:
Object When user click on a Store cell, it sets this property This property is observable | |
Type:
Array An array of stores. This property is bindable. |
Methods | |
setupInteraction() Parameters:
None
Setups the interactions with the keyboard | |
selectedStore_changed() Parameters:
None
When the selectedStore changes select the right cell in the table view. If the table view cell is not visible then scroll the list to render it visible. | |
scrollToCell($cell) Parameters:
Scrolls the table view to show the | |
stores_changed() Parameters:
None
When the stores list changes update the table view accordingly. | |
predictions_changed() Parameters:
None
When the predictions list changes update the table view accordingly. | |
getContainer() Parameters:
None
Return Type:
any Returns the container of the TableView. | |
update() Parameters:
None
Displays the | |
setStoresTemplate(storesTemplate) Parameters:
Set new template for stores cells. | |
setPlacesTemplate(placesTemplate) Parameters:
Set new template for places cells. | |
setOnCellCreatedCallback(callback) Parameters:
Set a function to be called by the tableView after the rendering of the cells. |
TravelModeSelector class
woosmap.ui.TravelModeSelector
MVCObject
.
Take the template of travelModePanel to generate an object
Constructor |
TravelModeSelector(travelModeSelectionPanelTemplate) Parameters:
Take the template of travelModePanel to generate an object |
Methods | |
initializedTravelModeChoice() Parameters:
None
Initialized comportement of travel mode panel’s objects | |
getSelectorContainer() Parameters:
None
Return the container instantiated with travel mode panel |
DelegateProtocol class
woosmap.utils.DelegateProtocol
MVCObject
.
Constructor |
DelegateProtocol() Parameters:
None
Constructs a new DelegateProtocol |
Properties | |
Type:
Object The delegate object. |
Methods | |
callDelegateMethod(methodName) Parameters:
Return Type:
DelegateReturn Calls the method |
DelegateReturn class
woosmap.utils.DelegateReturn
MVCObject
.
Constructor |
DelegateReturn() Parameters:
None
Builds a delegate return value. |
Methods | |
or(defaultValue) Parameters:
Return Type:
any Returns |
MVCObject class
woosmap.utils.MVCObject
Constructor for MVCObject.
Constructor |
MVCObject() Parameters:
None
Constructor for MVCObject. |
Methods | |
bindTo(key, target, target_key?, notify?) Parameters:
Return Type:
void Binds the property identified by ‘key’ to the specified target. | |
isPropertyBound(key) Parameters:
Return Type:
boolean Is this property a complex object - is it bound as either observer or target | |
get(key) Parameters:
Return Type:
mixed Returns the value of the property specified by ‘key’ | |
set(key, value, force_callback?) Parameters:
Return Type:
void Sets ‘value’ to ‘key’ on ‘this’. | |
setValues(key_value_pairs) Parameters:
Return Type:
void Set all the values of the properties contained in ‘key_value_pairs’ | |
unbind(key) Parameters:
Return Type:
void Un-bind the property identified by ‘key’ from its current target | |
unbindAll() Parameters:
None
Return Type:
void Unbind all bound properties on this object |
Address Interface
Address
Properties | |
Type:
String | |
Type:
String[] the address lines. | |
Type:
String |
BaiduDirectionsRouteParams Interface
BaiduDistance Interface
Properties | |
Type:
string A string representation of the distance value. | |
Type:
number The distance in meters. |
BaiduDuration Interface
Properties | |
Type:
string A string representation of the duration value. | |
Type:
number The duration in seconds. |
BaiduMapsOptions Interface
object
Properties | |
Type:
BMap.MapStyle Baidu Map Style |
BaiduPolylineOptions Interface
BaiduPolylineOptions
Properties | |
Type:
BMap.Map Map on which to display Polyline. | |
Type:
BMap.Point[] The ordered sequence of coordinates of the Polyline | |
Type:
string | |
Type:
number | |
Type:
string | |
Type:
number |
BaseViewOptions Interface
Properties | |
Type:
Style | |
Type:
Number |
BoundsPadding Interface
BoundsPadding All properties values are expected to be in pixels.
Properties | |
Type:
Number | |
Type:
Number | |
Type:
Number | |
Type:
Number |
Contact Interface
Contact
Properties | |
Type:
String the location email contact. | |
Type:
String the location phone. | |
Type:
String the location website. |
DataLayerOptions Interface
Properties | |
Type:
StoreEventCallback | |
Type:
Styler |
DataStyle Interface
Properties | |
Type:
DeprecatedStyleRule[] deprecated marker style format used in BaseView. | |
Type:
Style |
DeprecatedStyleRule Interface
Properties | |
Type:
String base url for the marker icon. | |
Type:
String base url for the marker icon in its selected state. | |
Type:
String the type for which the rules applies. Use |
DirectionsRouteInformationsParams Interface
Properties | |
Type:
number distance | |
Type:
String durationInTrafficLong | |
Type:
number durationInTrafficShort | |
Type:
String durationLong | |
Type:
number durationShort | |
Type:
number rendererIndex | |
Type:
String summary | |
Type:
String travelMode |
EventListeners Interface
Properties | |
Type:
StoreEventCallback event handler function for | |
Type:
StoreEventCallback event handler function for | |
Type:
StoreEventCallback event handler function for | |
Type:
StoreEventCallback event handler function for | |
Type:
StoreEventCallback event handler function for |
EventName Interface
String
EventName
EventName should be one of the following: click
, mousedown
, mouseout
, mouseover
, mouseup
.
FeatureData Interface
FeatureData
Properties | |
Type:
LatLngLiteral | |
Type:
String | |
Type:
Object |
GeoJSON Interface
GeoJSON
Properties | |
Type:
Store[] |
GeocoderOptions Interface
Properties | |
The function to call when a geocoder error occurs. Google Maps only | |
Type:
Number Maximum number of geocoding results return by the geocoder. If google find more result then only the N first results will be returned. |
Geometry Interface
Geometry
Properties | |
Type:
Number[] WGS84 longitude, latitude. |
GoogleGeocoderErrorCallback Interface
Function
The function to call when a google geocoder error occurs.
Function |
GoogleGeocoderErrorCallback(status) Parameters:
The function to call when a google geocoder error occurs. |
JSONPOptions Interface
Properties | |
Type:
String callback prefix (defaults to | |
Type:
String parameter (defaults to | |
Type:
Number how long after the request until a timeout error
is emitted (defaults to |
LatLngLiteral Interface
Location
Properties | |
Type:
Number the latitude. | |
Type:
Number the longitude. |
LoadOptions Interface
Properties | |
Type:
Function | |
Type:
Boolean | |
Type:
String | |
Type:
Object | |
Type:
String |
MapsLoaderOptions Interface
MapsLoaderOptions example
var mapsOptions = {
clientId: "a_client_id",
librariesToLoad: ["places"],
channelId: "a_channel_id",
language: "fr",
region: "FR"
version: "3.26"
}
Properties | |
Type:
String is a string to track usage across different applications using the same client ID | |
Type:
string the google client id. | |
Type:
String a google maps api key. | |
Type:
String desired for google maps api | |
Type:
Array a list of String containing additional google libraries to load. | |
Type:
String desired for google maps api | |
Type:
String desired for google maps api |
MarkerStyleOptions Interface
NearbyOptions Interface
Properties | |
Type:
Number the maximum distance allowed between the user and a store. | |
Type:
Number the maximum number of stores to return |
OdInputOptions Interface
Properties | |
Type:
String Text to display in input field after geolocation |
OriginDestination Interface
Properties | |
Type:
String | |
Type:
String |
PolylineFilter Interface
Properties | |
Type:
String a polyline encoded to the google format | |
Type:
Number max distance to retrieve store from the polyline (in meter). Default value is 10000 |
RendererOptions Interface
Properties | |
Type:
StoreEventListener The click callback. | |
Type:
EventListeners | |
Type:
Styler |
SearchParametersOptions Interface
Properties | |
Bounds in which the search will be performed | |
Type:
woosmap.search.SearchParameters.GroupByValues Aggregate stores by type or tag. Only available when using DataSource.countStoresByParameters method | |
Type:
Number latitude of the position to search nearest stores. | |
Type:
Number longitude of the position to search nearest stores. | |
Type:
Number maximum distance from user (in meter). | |
Type:
Number maximum number of stores to return (deprecated use pagination instead). | |
Type:
Number the request page | |
Type:
PolylineFilter to filter on polyline path. | |
search query that replaces the searchTextOptions. | |
Type:
QuerySearchOptions options to filter on store’s text properties. | |
Type:
Number the number of store by page (default:100, max:300) | |
Type:
Boolean whether the search should perform an intersection between point and zones. |
SelectedAndUnselectedRendererOptions Interface
Properties | |
options for selected renderer. | |
options for unselected renderers. |
Store Interface
Store
Properties | |
Type:
Address the Store address | |
Type:
Contact the contact information. | |
Type:
Geometry The geometry associated to this store | |
Type:
String the store name. | |
Type:
String the unique Id for this store. | |
Type:
String[] the store tags. | |
Type:
String[] the store types. | |
Type:
Object user definied properties |
StoreEventCallback Interface
Function
The marker parameter is only valued when the event is generated from a MarkersRenderer.
Function |
StoreEventCallback(store, marker?) Parameters:
The marker parameter is only valued when the event is generated from a MarkersRenderer. |
Style Interface
Style Example
{
rules: [
{
type: 'value1',
icon: {url: 'http://url/img/marker1.png'},
selectedIcon: {url: 'http://url/img/marker1-selected.png'}
},
{
type: 'value2',
icon: {url: 'http://url/img/marker2.png'},
selectedIcon: {url: 'http://url/img/marker2-selected.png'}
}
],
default: {
icon: {url: 'http://url/img/marker.png'},
numberedIcon: {url: 'http://url/img/{number}.png'},
selectedIcon: {url: 'http://url/img/selected.png'}
}
}
Properties | |
Type:
StyleRule the default styling rules, applies when no typed rule matched. | |
Type:
StyleRule[] the typed rules, each rule bears a |
StyleRule Interface
Properties | |
Type:
google.maps.Icon | |
Type:
google.maps.Icon | |
Type:
google.maps.Icon | |
Type:
String a |
TileStyle Interface
TileStyle Object specifications.
Properties | |
Type:
String a color rgba formatted | |
Type:
Number the minimum size acceptable for the marker. | |
Type:
Number the size of the marker in pixels, between 1 and 16. | |
Type:
TypesRules[] rules to display different color depending of types. Two different rules cannot be applied to the same store. In case of conflict the latest type in the array win. If a store has no rule, the default type is apply. | |
Type:
Number the timestamp at which the data was updated. |
TiledImageLayerOptions Interface
TiledImageLayerOptions
Properties | |
Type:
google.maps.Map the map where the layer will be displayed. | |
Type:
Number the layer will be visible between 0 and | |
Type:
SearchParameters | |
Type:
TileStyle object that contains style parameters for the current layer. |
TiledOverlayOptions Interface
Properties | |
Type:
Number | |
Type:
PolylineFilter Deprecated - use | |
Type:
SearchParameters | |
Type:
SearchQuery Deprecated - use |
TiledViewOptions Interface
TiledViewOptions
Properties | |
Type:
Number the zoom level to change the representation. | |
Type:
Boolean when gentleCenter is true the view will center on the selectedStore only if it’s not already in the padded zone. | |
Type:
DefaultRenderer the renderer used to display search results. | |
Type:
Boolean sets the paddedStoreCenter | |
Type:
PolylineFilter a polylineFilter to filter stores. | |
Type:
SearchParameters | |
Type:
SearchQuery Deprecated - use | |
Type:
Style the style for the tiled vector layer. | |
Type:
TileStyle the style for the tiled image layer. | |
Type:
DefaultRenderer the renderer used to display vector tiles. |
TrafficLayerOptions Interface
Properties | |
Type:
boolean Whether the traffic layer refreshes with updated information automatically. This is true by default. | |
Type:
BMap.Map Map on chich to display the traffic layer. |
TypesRules Interface
TypesRules Object specifications.
Properties | |
Type:
String a color rgba formatted | |
Type:
String of a store | |
Type:
Number the zIndex priority of the points |
createMapOptions Interface
Properties | |
Type:
LatLng Zoom center. | |
Type:
boolean Enable scroll wheel zoom with Baidu. | |
Type:
Number If set and positive, set zoom level. |
QuerySearchOptions Interface
Example value
var querySearchOptions = {
'query': {
'value': 'string to search',
'options': {
'name': SearchQuery.OR,
'city': SearchQuery.AND
}
},
'tags': [{
'value': 'a tag name',
'operator': SearchQuery.OR
}],
'types': [{
'value': 'a type name', 'operator': SearchQuery.AND
}]
}
Properties | |
Type:
TextSearchQuery search string and its options. | |
Type:
String[] a list of tags object | |
Type:
String[] a list of types object |
TextSearchQuery Interface
Example value
var textSearchQuery = {
'value': 'string to search',
'options': {
'name': SearchQuery.OR,
'city': SearchQuery.AND
}
}
Properties | |
Type:
Object keys are the attributes of the store where the search will be performed,
attached value are operator that will be used. Attributes can be | |
Type:
String the text to be searched. |
InfoBoxOptions Interface
This object represents the optional parameter passed to the InfoBox constructor.
Properties | |
Type:
boolean Align the bottom left corner of the InfoBox to the position location (default is false which means that the top left corner of the InfoBox is aligned). | |
Type:
string The name of the CSS class defining the styles for the InfoBox container. | |
Type:
Object An object literal whose properties define specific CSS style values to be applied to the InfoBox. Style values defined here override those that may be defined in the boxClass style sheet. If this property is changed after the InfoBox has been created, all previously set styles (except those defined in the style sheet) are removed from the InfoBox before the new style values are applied. | |
Type:
string The CSS margin style value for the close box. The default is “2px” (a 2-pixel margin on all sides). | |
Type:
string The URL of the image representing the close box. Note: The default is the URL for Google’s standard close box. Set this property to “” if no close box is required. | |
Type:
string The content of the InfoBox (plain text or an HTML DOM node). | |
Type:
boolean Disable auto-pan on open. | |
Type:
boolean Propagate mousedown, mousemove, mouseover, mouseout, mouseup, click, dblclick, touchstart, touchend, touchmove, and contextmenu events in the InfoBox (default is false to mimic the behavior of a google.maps.InfoWindow). Set this property to true if the InfoBox is being used as a map label. | |
Type:
Size Minimum offset (in pixels) from the InfoBox to the map edge after an auto-pan. | |
Type:
boolean Hide the InfoBox on open. [Deprecated in favor of the visible property.] | |
Type:
number The maximum width (in pixels) of the InfoBox. Set to 0 if no maximum. | |
Type:
string The pane where the InfoBox is to appear (default is “floatPane”). Set the pane to “mapPane” if the InfoBox is being used as a map label. Valid pane names are the property names for the google.maps.MapPanes object. | |
Type:
Size The offset (in pixels) from the top left corner of the InfoBox (or the bottom left corner if the alignBottom property is true) to the map pixel corresponding to position. | |
Type:
LatLng The geographic location at which to display the InfoBox. | |
Type:
boolean Show the InfoBox on open. | |
Type:
number The CSS z-index style value for the InfoBox. Note: This value overrides a zIndex setting specified in the boxStyle property. |
SearchViewOptions Interface
Template sample
<div>
<input class="woosmap-search-input"/>
<span class="woosmap-search-clear">✕</span>
<span class="woosmap-my-location-button">My location</span>
<button class="woosmap-search-button">Search</button>
<div>
CSS classes purpose
woosmap-search-input
The input used to fill the search querywoosmap-search-clear
The element used to clear the search inputwoosmap-search-button
The element used to trigger the search on click.woosmap-my-location-button
The element used to trigger geolocation based search
Additionaly the search is triggered when the search input is validated (ie: Enter key is pressed).
Location template sample
<div>
{{formattedAddress}}
</div>
Properties | |
Type:
string text to display on input field after a geolocation | |
Type:
string location results template. | |
Type:
string Search input template. |
ControlPosition Enum
Allowed values for control position.
Constants | |
Position control to the very bottom left of the map (alongside google watermark). | |
Position control to the very bottom right of the map (alongside google watermark). | |
Position control to the bottom left of the map. | |
Position control to the bottom right of the map. | |
Position control to the top left of the map. | |
Position control to the top right of the map. |
BoolOperators Enum
Represents Query Boolean operators.
Constants | |
And boolean operator | |
Not boolean operator | |
Or boolean operator |
Operators Enum
Represents Query operators.
Constants | |
Greater-than operator | |
Greater-than or equal-to operator | |
Less-than-or-equal-to operator | |
Less-than-or-equal-to operator |