JS API v 1.3
Javascript Store Locator API Reference v 1.3- Loader class
- PolylineFilter class
- StoreEventListener class
- BaseView class
- DataCollector class
- DataSearchSource class
- DataSource class
- DeviceDetector class
- LocatorWindow class
- MapsLoader class
- QuerySearchOptions class
- TemplateRenderer class
- TextSearchQuery class
- TiledView class
- View class
- ZipCodeProvider class
- DataLayer class
- TiledDataOverlay class
- TiledImageLayer class
- DefaultRenderer class
- MarkersRenderer class
- DirectionsProvider class
- DistanceProvider class
- GeocoderSearchSource class
- LocationProvider class
- NearbyStoresSource class
- PlacesSearchSource class
- F function
- Field class
- Query class
- and function
- not function
- or function
- SearchParameters class
- SearchQuery class
- DataStyler class
- Styler class
- DirectionsResultsDisplayer class
- InfoBox class
- InfoBoxOptions class
- MailView class
- OriginDestinationInput class
- SearchView class
- TableView class
- TravelModeSelector class
- DelegateProtocol class
- DelegateReturn class
- MVCObject class
- Address object Specification
- BaseViewOptions object Specification
- BoundsPadding object Specification
- Contact object Specification
- DataLayerOptions object Specification
- DataStyle object Specification
- DeprecatedStyleRule object Specification
- EventListeners object Specification
- EventName object Specification
- GeoJSON object Specification
- GeocoderOptions object Specification
- Geometry object Specification
- GoogleGeocoderErrorCallback function definition
- LoadOptions object Specification
- Location object Specification
- MapsLoaderOptions object Specification
- MarkerStyleOptions object Specification
- NearbyOptions object Specification
- OdInputOptions object Specification
- OriginDestination object Specification
- RendererOptions object Specification
- RouteInformation object Specification
- SearchParametersOptions object Specification
- SelectedAndUnselectedRendererOptions object Specification
- Store object Specification
- StoreEventCallback function definition
- Style object Specification
- StyleRule object Specification
- TileStyle object Specification
- TiledImageLayerOptions object Specification
- TiledOverlayOptions object Specification
- TiledViewOptions object Specification
- TypesRules object Specification
- SearchViewOptions object Specification
- BoolOperators constants
- Operators constants
- SearchParameters.GroupByValues constants
Loader class 🔗
Loader
Constructor | |
Loader( |
Constructs a new WoosmapLoader instance. |
Methods | |
load( |
Load method with one parameter and no version aliases. |
PolylineFilter class 🔗
PolylineFilter
Properties | |
encodedPolyline |
Type: String
a polyline encoded to the google format See : polylineutility |
radius? |
Type: Integer
max distance to retrieve store from the polyline (in meter). Default value is 10000 |
StoreEventListener class 🔗
StoreEventListener
Constructor | |
StoreEventListener( |
Instantiate a StoreEventListener, should not be called by user code. |
Methods | |
remove( |
Removes event listener. |
BaseView class 🔗
Abstract
woosmap.BaseView
Constructor | |
BaseView( |
Constructs a new BaseView |
Methods | |
init( |
Initializer method to call in subclasses. This is splitted from the constructor to allow subclasses to use it as their prototype. |
panTo( |
Sets the center of the map.
Takes in account the |
fitBounds( |
Sets the viewport to contain the given bounds.
Takes in account the |
enableZoom( |
Enable or Disable zoom when select a store |
enablePan( |
Enable or Disable pan when select a store |
enablePaddedStoreCenter( |
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( |
This is the function called when the stores property has changed. |
selectedStore_changed( |
This function is called when |
getDataBounds( |
Return Value: google.maps.LatLngBounds|Null Process each feature in the dataLayer to compute the bounds of the displayed data. |
getMap( |
Return Value: google.maps.Map Returns the google maps used by the BaseView. |
removeAllStores( |
Removes all the stores from the map. |
displayStore( |
Adds a single store to the map, zoom + pan on it |
location_changed( |
This function is called when |
addListener( |
Return Value: StoreEventListener Adds a store event listener. |
removeListener( |
Removes a store event listener. |
Properties | |
stores |
Type: Array.<Store>
List of stores displayed. This property is bindable. |
selectedStore |
Type: Store
The currently selected store. This property is bindable. |
location |
Type: Location
The user defined location. This property is bindable. |
padding |
Type: BoundsPadding
Controls the viewport padding used by fitBounds. |
marker |
Type: google.maps.Marker
This marker is positioned on the map when |
DataCollector class 🔗
woosmap.DataCollector
Constructor | |
DataCollector( |
Constructs a new DataCollector |
Methods | |
sendDirectionsMail( |
Sends a request to the datastore to send a mail with directions link to the mail provided |
DataSearchSource class 🔗
woosmap.DataSearchSource
Constructor | |
DataSearchSource( |
Constructs a new DataSearchSource |
Methods | |
autocomplete_query_changed( |
Listens the changes of query. |
location_changed( |
Listens the changes of location. |
updateSearchQuery( |
Updated the searchQuery value. |
updateSearchQueryAndSearch( |
Updated the searchQuery value and launch a search with the new value. |
addFieldToSearchTextOptions( |
Add a new field to searchTextOptions or update an existing field (new field will be used for store filtering). |
removeFieldFromSearchTextOptions( |
Remove a field from searchTextOptions (so field will not be use anymore for filtering). Update stores list after removal. |
updateTextSearchQuery( |
Deprecated Get the value of ‘autocomplete_query’ and searchTextOptions and update the SearchQuery with them. Then request new store list. |
updateTextSearchQueryAndSearch( |
Get the value of ‘autocomplete_query’ and searchTextOptions and update the SearchQuery with them. Then request new store list. |
search( |
Use the woosmap API to search into store’s data with nearbyOptions, polylineFilter, searchQuery and location as parameters. |
setPolylineFilter( |
Add or update the polylineFilter for the searchSource. To remove the filter set is value to |
setMaxStores( |
Update the maxStores value. To remove the search option set is value to |
setMaxDistanceFromUser( |
Update the maxDistanceFromUser value. To remove the search option set is value to |
Properties | |
searchParameters |
Type: SearchParameters
Contains options to searchStores |
autocomplete_query |
Type: String
Observes his query to launch the search into store’s data. |
location |
Type: Location
Observes his location to narrow the search around a location. Needs to be completed with a maxStore and a maxDistanceFromUser in constructors option nearbyOptions |
DataSource class 🔗
woosmap.DataSource
Constructor | |
DataSource( |
The DataSource object is the bridge to the server API. |
Methods | |
getFromApi( |
Make an ajax call with the url and call the callback if success |
getAllStores( |
Return Value: $.Deferred Returns all the stores. |
getNearbyStores( |
Return Value: $.Deferred Fetches stores that are near the (lng, lat) position and pass it to the callback.
if |
getStoreById( |
Return Value: $.Deferred Fetches a store by it’s store_id. |
getStoresBySearchQuery( |
Return Value: $.Deferred Deprecated Fetches stores that name matches the search query and pass it to the callback. |
searchStores( |
Return Value: $.Deferred Deprecated Fetches stores that matches the search query and pass it to the callback. |
searchNearbyStores( |
Return Value: $.Deferred Deprecated Fetches nearby stores that matches the search query and pass it to the callback. |
searchStoresByParameters( |
Return Value: $.Deferred Search on store given a list of information |
countStoresByParameters( |
Return Value: $.Deferred return the number of stores matching parameters |
storesBoundsByParameters( |
Return Value: $.Deferred return the bounds for all stores matching parameters |
getProjectConfig( |
Return Value: $.Deferred Get the config object for the Project. |
DeviceDetector class 🔗
woosmap.DeviceDetector
Constructor | |
DeviceDetector( |
Constructs a new DeviceDetector (base on mobile-detect library) |
Methods | |
getDeviceType( |
Return Value: String Return type of the user device |
LocatorWindow class 🔗
woosmap.LocatorWindow
Constructor | |
LocatorWindow( |
Construct a LocatorWindow. |
Methods | |
selectedStore_changed( |
When selectedStore changes open the InfoWindow on the current store. if selectedStore is null then close the InfoWindow. |
getAnchorForCoordinates( |
Return Value: google.maps.MVCObject Computes the Window anchor for |
getMarkerForCoordinates( |
Return Value: google.maps.Marker Return a marker for |
openOn( |
Opens the info window on the |
close( |
Closes the Locatorwindow |
setOpeningCallback( |
Adds a listener for |
setInfoBoxOptions( |
Method to set InfoboxOptions if it’s not a google InfoWindow |
Properties | |
selectedStore |
Type: Store
The currently |
MapsLoader class 🔗
woosmap.MapsLoader
Constructor | |
MapsLoader( |
Construct a MapsLoader instance with the |
Methods | |
load( |
Loads the google maps api and calls the callback when done. |
QuerySearchOptions class 🔗
woosmap.QuerySearchOptions
Properties | |
query? |
Type: TextSearchQuery
search string and its options. |
tags? |
Type: Array.<String>
a list of tags object |
types? |
Type: Array.<String>
a list of types object |
TemplateRenderer class 🔗
woosmap.TemplateRenderer
Constructor | |
TemplateRenderer( |
Constructs a TemplateRendererInstance |
Methods | |
render( |
Return Value: * Renders the compiled template with the context |
registerLambda( |
Registers a template Lambda |
TextSearchQuery class 🔗
woosmap.TextSearchQuery
Properties | |
value? |
Type: String
the text to be searched. |
options? |
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 |
TiledView class 🔗
woosmap.TiledView
This class extends BaseView.
Constructor | |
TiledView( |
TiledView this view is mostly compatible with {woosmap.View}. |
Methods | |
setSearchParameters( |
Sets the |
setSearchQuery( |
Deprecated Sets the |
setPolylineFilter( |
Deprecated Sets the |
Properties | |
stores |
Type: Array.<Store>
List of stores displayed. This property is bindable. |
selectedStore |
Type: Store
The currently selected store. This property is bindable. |
location |
Type: Location
The user defined location. This property is bindable. |
padding |
Type: BoundsPadding
Controls the viewport padding used by fitBounds. |
marker |
Type: google.maps.Marker
This marker is positioned on the map when |
View class 🔗
woosmap.View
This class extends BaseView.
Constructor | |
View( |
Constructs a View |
Methods |
Properties | |
stores |
Type: Array.<Store>
List of stores displayed. This property is bindable. |
selectedStore |
Type: Store
The currently selected store. This property is bindable. |
location |
Type: Location
The user defined location. This property is bindable. |
padding |
Type: BoundsPadding
Controls the viewport padding used by fitBounds. |
marker |
Type: google.maps.Marker
This marker is positioned on the map when |
ZipCodeProvider class 🔗
woosmap.ZipCodeProvider
Constructor | |
ZipCodeProvider( |
Constructs a new ZipCodeProvider |
Methods | |
getZipCode( |
Return Value: String Get the currently saved zipcode |
getZipCodeType( |
Return Value: String Get the zipcode type |
location_changed( |
This method is called when the location has changed. It updates the zipcode by reverse geocoding |
Properties | |
zipcode |
Type: String
Stores the |
location |
Type: Location
The |
DataLayer class 🔗
woosmap.layers.DataLayer
This class extends woosmap.layers.BaseLayer.
Constructor | |
DataLayer( |
DataLayer |
Methods | |
displayStores( |
Displays on the map the stores passed as parameter. |
displayNumberedStores( |
Displays the stores with numbered icons. |
TiledDataOverlay class 🔗
woosmap.layers.TiledDataOverlay
This class extends woosmap.layers.BaseLayer.
Constructor | |
TiledDataOverlay( |
TiledDataOverlay. |
Methods | |
clear( |
Clears the overlay data and cache. |
setMap( |
Set the map instance |
setSearchParameters( |
Sets the search parameters used to filter the displayed data. |
setSearchQuery( |
Deprecated Sets the searchQuery used to filter the displayed data. |
setPolylineFilter( |
Deprecated Sets the polylineFilter used to filter the displayed data. |
onAdd( |
|
onRemove( |
|
tileDidLoad( |
Abstract Called when a tile has finished loading |
tilesDidLoad( |
Abstract Called when all the tiles requested from the api server were fetched. |
TiledImageLayer class 🔗
woosmap.layers.TiledImageLayer
Constructor | |
TiledImageLayer( |
Constructs a new TiledImageLayer |
Methods | |
setMap( |
Set an overlay to a map with the tiles generated by the tiler server |
getMap( |
Return Value: google.maps.Map|Null Returns the google map bound to the image layer. |
setSearchParameters( |
Sets the search parameters used to filter the displayed data. |
setSearchQuery( |
Deprecated Sets the searchQuery used to filter the displayed data. |
setPolylineFilter( |
Deprecated Sets the polylineFilter used to filter the displayed data. |
DefaultRenderer class 🔗
woosmap.layers.renderers.DefaultRenderer
Constructor | |
DefaultRenderer( |
Default renderer. |
Methods | |
addEventListener( |
Adds an eventListener triggered when the event is triggered on markers. |
removeEventListener( |
Removes the event listener for event. |
setClick( |
Deprecated Build the click listener with the callback argument |
getMap( |
Return Value: google.maps.Map Getter to access to the map instance |
setMap( |
Set the map instance |
displayStores( |
Call to display the stores with the basic style |
displayNumberedStores( |
Call to display the stores with the numbered style |
tileDidLoad( |
Call on each tiles request. |
tilesDidLoad( |
Called once all tiles request are finished. |
selectStore( |
Use the |
clear( |
Removes all the data and style from the layer. |
MarkersRenderer class 🔗
woosmap.layers.renderers.MarkersRenderer
This class extends DefaultRenderer.
Constructor | |
MarkersRenderer( |
Markers renderer. |
Methods | |
displayMarkers( |
Display the markers of each features |
getMap( |
Return Value: Undefined|google.maps.Map Return the map instance |
getDisplayingMarkers( |
Return Value: Array.<google.maps.Marker> Return the markers object for the current bounds |
getDisplayingFeatures( |
Return Value: Array Return the features objects for the current bounds |
displayCurrentMarkers( |
Display the markers in the current bounds |
displayMarkersForStores( |
Display the marker for a stores list |
displayStores( |
Display the stores list |
displayNumberedStores( |
Display the stores list with a numbered style |
DirectionsProvider class 🔗
woosmap.location.DirectionsProvider
Constructor | |
DirectionsProvider( |
Constructs a new DirectionsProvider |
Methods | |
getDirectionsFromOrToStore( |
Get directions from, or to, store with google directions services and set results in directionsRenderers |
setDirectionsObjectsWithResponse( |
Set directionsRenderers and directionsSummary objects |
getDirectionsLink( |
Get the direct link to google directions from the user’s input |
getRouteEncodedPolyline( |
Return Value: String Return an encodedPolyline of a simplify version of a route |
Properties | |
directionsSummaries |
Type: Array.<RouteInformation>
This property is observable An array containing information about each route |
directionsRenderers |
Type: Array.<google.maps.DirectionsRenderers>
This property is observable An array containing renderer about each route |
directionsLink |
Type: String
This property is observable A link to open google map with the current itinerary |
selectedTravelMode |
Type: String
This property is observable |
originDestination |
Type: Location
This property is observable |
DistanceProvider class 🔗
woosmap.location.DistanceProvider
Constructor | |
DistanceProvider( |
Constructs a new DistanceProvider. It should be bound to a location property or it needs to be set manually. |
Methods | |
updateStoresDistanceWithGoogle( |
This method updates or adds the following properties of each
|
Properties | |
location |
Type: Location
The location to compute a distance from. This property is bindable. |
GeocoderSearchSource class 🔗
woosmap.location.GeocoderSearchSource
Constructor | |
GeocoderSearchSource( |
Constructs a new GecoderSearchSource |
Methods | |
query_changed( |
Listens the changes of query. |
search( |
Use the google maps geocoder to geocode the query. |
Properties | |
location |
Type: Location
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 |
locationResults |
Type: Array
When google answer a geocoding requests with more than one result, it sets this property. This property is bindable |
query |
Type: String
Observes his query to launch the geocoding. |
LocationProvider class 🔗
woosmap.location.LocationProvider
Constructor | |
LocationProvider( |
Constructs a new LocationProvider, in order to track browser location |
Methods | |
askForLocation( |
Set user location given provider. |
Properties | |
location |
Type: Location
When the LocationProvider returns a result it sets this property. This property is bindable |
NearbyStoresSource class 🔗
woosmap.location.NearbyStoresSource
Constructor | |
NearbyStoresSource( |
Builds a NearbyStoresSource |
Methods | |
location_changed( |
This method is called when the location has changed. |
Properties | |
stores |
Type: Array
An array of stores. This property is bindable. |
location |
Type: Location
The location to search stores from. This property is bindable. |
PlacesSearchSource class 🔗
woosmap.location.PlacesSearchSource
This class extends MVCObject.
Constructor | |
PlacesSearchSource( |
Constructs a new PlacesSearchSource |
Methods | |
autocomplete_query_changed( |
Listens the changes of autocomplete_query. |
search( |
Use the google Places AutoCompleteService to fetch predictions |
getDetails( |
Get the precise location of Place result |
Properties | |
autocomplete_query |
Type: String
Observes his autocomplete_query to launch the autocomplete. |
predictions |
Type: Array
When Places returns a prediction list it sets this property. This property is observable |
options |
Type: Object
Observes this property to launch configure autocomplete. should comply to google’s specifications See : AutocompletionRequest |
minQuerySize |
Type: Number
If autocomplete query change but with a length smaller than minQuerySize then no request to google map is done. |
F function 🔗
woosmap.query.F
Function | F( |
Function helper to instantiate a Field, used to form queries. |
Field class 🔗
woosmap.query.Field
Constructor | |
Field( |
Represents a field filter |
Methods | |
toString( |
Return Value: String Returns the field clause in query format. |
Query class 🔗
woosmap.query.Query
Constructor | |
Query( |
Represents a Query |
Methods | |
toString( |
Return Value: String Returns the Query as a string usable for the search endpoint query parameter. |
and function 🔗
woosmap.query.and
Example
var q = woosmap.query;
var query = q.and([q.F('type', 'myType'), q.F('type', 'myOtherType')])
query.toString()
should return '(type:"myType" AND type:"myOtherType")'
Function | and( |
Helper function to instantiate a Query with AND connector |
not function 🔗
woosmap.query.not
Example
var q = woosmap.query;
var query = q.not(q.F('type', 'myType')])
query.toString()
should return 'NOT type:"myType"'
Function | not( |
Helper function to instantiate a negated Query |
or function 🔗
woosmap.query.or
Example
var q = woosmap.query;
var query = q.or([q.F('type', 'myType'), q.F('type', 'myOtherType')])
query.toString()
should return '(type:"myType" OR type:"myOtherType")'
Function | or( |
Helper function to instantiate a Query with OR connector |
SearchParameters class 🔗
woosmap.search.SearchParameters
Constructor | |
SearchParameters( |
Constructs a new SearchParameters |
Methods | |
buildUrl( |
Return Value: String Build encoded parameters of an url to search stores (&max_number=3). |
Properties | |
lat |
Type: Number
Latitude of the position to search nearest stores |
lng |
Type: Number
Longitude of the position to search nearest stores. |
maxStores |
Type: Number
Maximum number of stores to return. |
maxDistanceFromUser |
Type: Number
Maximum distance from user (in meter). |
searchQuery |
Type: SearchQuery
Query to filter on store’s properties (text, types and tags). |
query |
Type: Query| |
polylineFilter |
Type: PolylineFilter
PolylineFilter to filter on polyline path |
page |
Type: Number
The expected page |
storesByPage |
Type: Number
Number of store in one page (default: 100, max: 300) |
groupBy |
Type: GroupByValues
Count the stores by group values |
bounds |
Type: google.maps.LatLngBoundsLiteral
Bounds in which the search will be performed |
SearchQuery class 🔗
Deprecated
woosmap.search.SearchQuery
Constructor | |
SearchQuery( |
Constructs a new SearchQuery |
Methods | |
addTagFilter( |
Adds a tag filter to the query. |
addTypeFilter( |
Adds a type filter to the query. |
setQuery( |
Sets the query text |
addQueryOption( |
Adds a query option |
removeQueryOption( |
Removes a QueryOption by name. |
Properties | |
query |
Type: TextSearchQuery
Property for text search |
tags |
Type: Array.<String>
Property for tag search |
types |
Type: Array.<String>
Property for type search |
AND |
Type: String
AND query operator |
OR |
Type: String
OR query operator |
DataStyler class 🔗
woosmap.style.DataStyler
Constructor | |
DataStyler( |
Applies style to google.maps.Data. |
Methods | |
style( |
Styles the data layer using Styles rules given at construction. |
styleNumbered( |
Override the style to use numbered icons for the stores array parameter. |
selectStore( |
Overrides the current style with selectedStyle for the selectedStore |
clear( |
Clear the style of the data layer. |
Styler class 🔗
woosmap.style.Styler
Constructor | |
Styler( |
Styler duty is to style google maps Data Layer |
Methods | |
getDefaultStyle( |
Return Value: StyleRule Returns the default style. |
getMarkerStyleForStore( |
Return Value: google.maps.Icon Resolves style for the store feature using options. |
DirectionsResultsDisplayer class 🔗
woosmap.ui.DirectionsResultsDisplayer
This class extends MVCObject.
Constructor | |
DirectionsResultsDisplayer( |
You must bind directionsLink property to directionsProvider |
Methods | |
displayRouteSteps( |
Display route’s steps on panel |
cleanRoutes( |
Clean all routes on panel |
cleanRouteSteps( |
Clean all route’s step on panel |
cleanMapFromRoutes( |
Hide all route’s Polyline on map |
displayAllRoutes( |
Display all the route on the map |
displayRouteOnMap( |
Display a selected route polyline on map |
setSelectedRenderer( |
Set renderer options to |
InfoBox class 🔗
woosmap.ui.InfoBox
Constructor | |
InfoBox( |
Creates an InfoBox with the options specified in {@link InfoBoxOptions}. |
Methods | |
onRemove( |
Invoked when close is called. Do not call it directly. |
draw( |
Draws the InfoBox based on the current map projection and zoom level. |
setInfoBoxOptions( |
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( |
Sets the content of the InfoBox. The content can be plain text or an HTML DOM node. |
setPosition( |
Sets the geographic location of the InfoBox. |
setZIndex( |
Sets the zIndex style for the InfoBox. |
setVisible( |
Sets the visibility of the InfoBox. |
getContent( |
Return Value: String Returns the content of the InfoBox. |
getPosition( |
Return Value: Latlng Returns the geographic location of the InfoBox. |
getZIndex( |
Return Value: Number Returns the zIndex for the InfoBox. |
getVisible( |
Return Value: Boolean Returns a flag indicating whether the InfoBox is visible. |
show( |
Shows the InfoBox. [Deprecated; use setVisible instead.] |
hide( |
Hides the InfoBox. [Deprecated; use setVisible instead.] |
open( |
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( |
Removes the InfoBox from the map. |
InfoBoxOptions class 🔗
woosmap.ui.InfoBoxOptions
Properties | |
content |
Type: String| The content of the InfoBox (plain text or an HTML DOM node). |
disableAutoPan? |
Type: Boolean
Disable auto-pan on open. |
maxWidth |
Type: Number
The maximum width (in pixels) of the InfoBox. Set to 0 if no maximum. |
pixelOffset |
Type: Size
The offset (in pixels) from the top left corner of the InfoBox
(or the bottom left corner if the |
position |
Type: Latlng
The geographic location at which to display the InfoBox. |
zIndex |
Type: Number
The CSS z-index style value for the InfoBox. Note: This value overrides a zIndex setting specified in the boxStyle property. |
boxClass? |
Type: String
The name of the CSS class defining the styles for the InfoBox container. |
boxStyle? |
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 |
closeBoxMargin |
Type: String
The CSS margin style value for the close box. The default is “2px” (a 2-pixel margin on all sides). |
closeBoxURL |
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. |
infoBoxClearance |
Type: Size
Minimum offset (in pixels) from the InfoBox to the map edge after an auto-pan. |
isHidden? |
Type: Boolean
Hide the InfoBox on open. [Deprecated in favor of the visible property.] |
visible? |
Type: Boolean
Show the InfoBox on open. |
alignBottom |
Type: Boolean
Align the bottom left corner of the InfoBox to the |
pane |
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. |
enableEventPropagation |
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. |
MailView class 🔗
woosmap.ui.MailView
This class extends MVCObject, DelegateProtocol.
Constructor | |
MailView( |
Constructs a new MailView, in order to ask our API endpoint to send a mail for directions |
Methods | |
sendDirectionsMail( |
Sends a request to the datastore to send a mail with directions link to the mail provided |
getContainer( |
Return Value: * |
Properties | |
mailStatus |
Type: Mailstatus
When the MailView returns a result it sets this property. This property is bindable |
selectedStore |
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 |
delegate |
Type: Object
The delegate object. |
status |
Type: Object
Contains all the available status for the MailView.
Status states |
OriginDestinationInput class 🔗
woosmap.ui.OriginDestinationInput
This class extends MVCObject.
Constructor | |
OriginDestinationInput( |
Take the template for an Origin Destination Panel and link with an originDestination object |
Methods | |
isSelectedStoreName( |
Return true if the selectedStore has a name equal to the name in parameters |
updateOriginDestination( |
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( |
Set the value of woosmap-origin input |
setDestinationValue( |
Set the value of woosmap-destination input |
getOriginValue( |
Get the value of woosmap-origin input return selectedStore position is value is the same tha store name |
getDestinationValue( |
Get the value of woosmap-destination input return selectedStore position is value is the same tha store name |
onKeyUp( |
Method called when keyUp on origin or destination input |
selectedStore_changed( |
Method called when selectedStore changed |
location_changed( |
Method called when location changed |
getODContainer( |
Return the container instantiated with origin-destination panel |
Properties | |
originDestination |
Type: OriginDestination
|
storeIsDestination |
Type: Boolean
Flag to decide where to put the store name. |
selectedStore |
Type: Store
The selected store. This property is bindable. |
location |
Type: Location
The location to use to compute the directions. |
SearchView class 🔗
woosmap.ui.SearchView
This class extends MVCObject, DelegateProtocol.
Constructor | |
SearchView( |
Constructs a SearchView |
Methods | |
setupInteraction( |
Setups the interactions with the input, button, and clear button |
setSearchQueryWithInputValue( |
Sets the query property with the value of the input. |
clearResults( |
Method called when searchView need to clear it’s results. |
clearInput( |
Method called when searchView need to clear it’s input. |
getContainer( |
Return Value: * |
locationResults_changed( |
Method called when locationResults changed. When changed is trigger searchView will display location results into resultSelector container. |
getResultsSelector( |
Return Value: * Return resultsSelector container. |
Properties | |
delegate |
Type: Object
The delegate object. |
TableView class 🔗
woosmap.ui.TableView
This class extends MVCObject.
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 it’s container will bear woosmap-tableview-selected-cell
class.
If a card is highlighted using arrow keys, it’s container will bear woosmap-tableview-highlighted-cell
class.
Deprecated CSS classes
The class card_container
is deprecated in favor of woosmap-tableview-container
.
The class selected-card
is deprecated in favor of woosmap-tableview-selected-cell
.
deprecated name | new name |
---|---|
selected-card | woosmap-tableview-selected-cell |
card_container | woosmap-tableview-container |
Constructor | |
TableView( |
Constructs a new TableView |
Methods | |
setupInteraction( |
Setups the interactions with the keyboard |
selectedStore_changed( |
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( |
Scrolls the table view to show the |
stores_changed( |
When the stores list changes update the table view accordingly. |
predictions_changed( |
When the predictions list changes update the table view accordingly. |
getContainer( |
Return Value: * Returns the container of the TableView. |
update( |
Displays the |
setStoresTemplate( |
Set new template for stores cells. |
setPlacesTemplate( |
Set new template for places cells. |
setOnCellCreatedCallback( |
Set a function to be called by the tableView after the rendering of the cells. |
Properties | |
stores |
Type: Array
An array of stores. This property is bindable. |
predictions |
Type: Array
An array of Places predictions. This property is bindable. |
selectedStore |
Type: Object
When user click on a Store cell, it sets this property This property is observable |
location |
Type: Object
When user click on a Places cell, it sets this property This property is observable |
details |
Type: Object
When user selects a places prediction it sets this property with places details This property is observable |
TravelModeSelector class 🔗
woosmap.ui.TravelModeSelector
This class extends MVCObject.
Constructor | |
TravelModeSelector( |
Take the template of travelModePanel to generate an object |
Methods | |
initializedTravelModeChoice( |
Initialized comportement of travel mode panel’s objects |
getSelectorContainer( |
Return the container instantiated with travel mode panel |
DelegateProtocol class 🔗
Abstract
woosmap.utils.DelegateProtocol
This class extends MVCObject.
Constructor | |
DelegateProtocol( |
Constructs a new DelegateProtocol |
Methods | |
callDelegateMethod( |
Return Value: DelegateReturn Calls the method |
Properties | |
delegate |
Type: Object
The delegate object. |
DelegateReturn class 🔗
woosmap.utils.DelegateReturn
This class extends MVCObject.
Constructor | |
DelegateReturn( |
Builds a delegate return value. |
Methods | |
or( |
Return Value: * Returns |
MVCObject class 🔗
woosmap.utils.MVCObject
Constructor | |
MVCObject( |
Constructor for MVCObject. |
Methods | |
bindTo( |
Return Value: Void Binds the property identified by ‘key’ to the specified target. |
isPropertyBound( |
Return Value: Boolean Is this property a complex object - is it bound as either observer or target |
get( |
Return Value: Mixed Returns the value of the property specified by ‘key’ |
set( |
Return Value: Void Sets ‘value’ to ‘key’ on ‘this’. |
setValues( |
Return Value: Void Set all the values of the properties contained in ‘key_value_pairs’ |
unbind( |
Return Value: Void Un-bind the property identified by ‘key’ from it’s current target |
unbindAll( |
Return Value: Void Unbind all bound properties on this object |
Address object Specification 🔗
Properties | |
lines |
Type: Array.<String>
the address lines. |
city |
Type: String
|
zipCode |
Type: String
|
BaseViewOptions object Specification 🔗
Properties | |
style? |
Type: Style
|
zoomLevel? |
Type: Number
|
BoundsPadding object Specification 🔗
All properties values are expected to be in pixels.
Properties | |
top? |
Type: Number
|
bottom? |
Type: Number
|
right? |
Type: Number
|
left? |
Type: Number
|
Contact object Specification 🔗
Properties | |
website |
Type: String
the location website. |
phone |
Type: String
the location phone. |
Type: String
the location email contact. |
DataLayerOptions object Specification 🔗
Properties | |
styler |
Type: Styler
|
click |
Type: StoreEventCallback
|
DataStyle object Specification 🔗
Properties | |
markers? |
Type: Array.<DeprecatedStyleRule>
deprecated marker style format used in BaseView. |
style? |
Type: Style
|
DeprecatedStyleRule object Specification 🔗
Properties | |
type |
Type: String
the type for which the rules applies. Use |
default |
Type: String
base url for the marker icon. |
selected |
Type: String
base url for the marker icon in it’s selected state. |
EventListeners object Specification 🔗
Properties | |
click? |
Type: StoreEventCallback
event handler function for |
mousedown? |
Type: StoreEventCallback
event handler function for |
mouseout? |
Type: StoreEventCallback
event handler function for |
mouseover? |
Type: StoreEventCallback
event handler function for |
mouseup? |
Type: StoreEventCallback
event handler function for |
EventName object Specification 🔗
EventName should be one of the following: click
, mousedown
, mouseout
, mouseover
, mouseup
.
GeoJSON object Specification 🔗
Properties | |
features |
Type: Array.<Store>
|
GeocoderOptions object Specification 🔗
Properties | |
maxResultsReturn? |
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. |
bounds? |
The bounding box of the viewport |
key? |
Your application’s API key |
language? |
The language in which to return results |
region? |
The region code, specified as a ccTLD (“top-level domain”) two-character value |
errorCallback? |
Type: GoogleGeocoderErrorCallback
The function to call when a geocoder error occurs. |
Geometry object Specification 🔗
Properties | |
coordinates |
Type: Array.<Number>
WGS84 longitude, latitude. |
GoogleGeocoderErrorCallback function definition 🔗
GoogleGeocoderErrorCallback
Function | function(status:google.maps.GeocoderStatus) |
The function to call when a google geocoder error occurs. |
LoadOptions object Specification 🔗
Properties | |
loadJQuery |
Type: Boolean
|
version |
Type: String
|
publicKey |
Type: String
|
callback |
Type: Function
|
scope |
Type: Object
|
Location object Specification 🔗
Properties | |
lat |
Type: Number
the latitude. |
lng |
Type: Number
the longitude. |
MapsLoaderOptions object Specification 🔗
MapsLoaderOptions example
var mapsOptions = {
clientId: "a_client_id",
librariesToLoad: ["places"],
channelId: "a_channel_id",
language: "fr",
region: "FR"
version: "3.26"
}
Properties | |
clientId? |
Type: String
the google client id. |
librariesToLoad? |
Type: Array
a list of String containing additional google libraries to load. |
channelId? |
Type: String
is a string to track usage across different applications using the same client ID |
key? |
Type: String
a google maps api key. |
language? |
Type: String
desired for google maps api |
region? |
Type: String
desired for google maps api |
version? |
Type: String
desired for google maps api |
MarkerStyleOptions object Specification 🔗
Properties | |
selected? |
|
number? |
|
NearbyOptions object Specification 🔗
Properties | |
maxStores |
Type: Number
the maximum number of stores to return |
maxDistanceFromUser |
Type: Number
the maximum distance allowed between the user and a store. |
OdInputOptions object Specification 🔗
Properties | |
geolocText? |
Type: String
Text to display in input field after geolocation |
OriginDestination object Specification 🔗
Properties | |
origin |
Type: String
|
destination |
Type: String
|
RendererOptions object Specification 🔗
Properties | |
click? |
Type: StoreEventListener
The click callback. |
eventListeners |
Type: EventListeners
|
styler |
Type: Styler
|
RouteInformation object Specification 🔗
Properties | |
rendererIndex |
Type: Number
integer corresponding to the route index on the directionsRenderers property. |
travelMode |
Type: String
the travelMode for the route. |
summary |
Type: String
the travelMode for the route. |
distance |
Type: String
distance of the route. |
durationLong |
Type: String
duration of the route. |
durationShort |
Type: String
duration of the route (abbreviation). |
durationInTrafficLong? |
Type: String
duration of the route with traffic. |
durationInTrafficShort? |
Type: String
duration of the route with traffic (abbreviation). |
SearchParametersOptions object Specification 🔗
Properties | |
lat? |
Type: Number
latitude of the position to search nearest stores. |
lng? |
Type: Number
longitude of the position to search nearest stores. |
maxDistanceFromUser? |
Type: Number
maximum distance from user (in meter). |
maxStores? |
Type: Number
maximum number of stores to return (deprecated use pagination instead). |
searchTextOptions? |
Type: QuerySearchOptions
options to filter on store’s text properties. |
query? |
Type: Query| search query that replaces the searchTextOptions. |
polylineFilter? |
Type: PolylineFilter
to filter on polyline path. |
page? |
Type: Number
the request page |
storesByPage? |
Type: Number
the number of store by page (default:100, max:300) |
bounds? |
Type: google.maps.LatLngBounds| Bounds in which the search will be performed |
groupBy? |
Type: GroupByValues
Aggregate stores by type or tag. Only available when using DataSource.countStoresByParameters method |
SelectedAndUnselectedRendererOptions object Specification 🔗
Properties | |
unselectedRenderersOptions |
Type: google.maps.DirectionsRendererOptions
options for unselected renderers. |
selectedRendererOptions |
Type: google.maps.DirectionsRendererOptions
options for selected renderer. |
Store object Specification 🔗
Properties | |
storeId |
Type: String
the unique Id for this store. |
name |
Type: String
the store name. |
geometry |
Type: Geometry
The geometry associated to this store |
types? |
Type: Array.<String>
the store types. |
tags? |
Type: Array.<String>
the store tags. |
user_properties? |
Type: Object
user definied properties |
address? |
Type: Address
the Store address |
contact? |
Type: Contact
the contact information. |
StoreEventCallback function definition 🔗
StoreEventCallback
Function | function(store:Store,marker?:google.maps.Marker) |
The marker parameter is only valued when the event is generated from a MarkersRenderer. |
Style object Specification 🔗
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 | |
default |
Type: StyleRule
the default styling rules, applies when no typed rule matched. |
rules |
Type: Array.<StyleRule>
the typed rules, each rule bears a |
StyleRule object Specification 🔗
{@link https://developers.google.com/maps/documentation/javascript/3.exp/reference#Icon}
Properties | |
icon |
Type: google.maps.Icon
|
selectedIcon |
Type: google.maps.Icon
|
numberedIcon |
Type: google.maps.Icon
|
type? |
Type: String
a |
TileStyle object Specification 🔗
Properties | |
color? |
Type: String
a color rgba formatted |
size? |
Type: Integer
the size of the marker in pixels, between 1 and 16. |
minSize? |
Type: Integer
the minimum size acceptable for the marker. |
updatedAt |
Type: Integer
the timestamp at which the data was updated. |
typeRules? |
Type: Array.<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. |
TiledImageLayerOptions object Specification 🔗
Properties | |
map? |
Type: google.maps.Map
the map where the layer will be displayed. |
style? |
Type: TileStyle
object that contains style parameters for the current layer. |
maxZoom? |
Type: Integer
the layer will be visible between 0 and |
searchParameters |
Type: SearchParameters
|
TiledOverlayOptions object Specification 🔗
Properties | |
searchParameters? |
Type: SearchParameters
|
searchQuery? |
Type: SearchQuery
Deprecated use |
polylineFilter? |
Type: PolylineFilter
Deprecated use |
minZoom? |
Type: Integer
|
TiledViewOptions object Specification 🔗
This object specification extends BaseViewOptions.
Properties | |
paddedStoreCenter? |
Type: Boolean
sets the paddedStoreCenter |
style? |
Type: Style
the style for the tiled vector layer. |
breakPoint? |
Type: Number
the zoom level to change the representation. |
tileStyle? |
Type: TileStyle
the style for the tiled image layer. |
searchQuery? |
Type: SearchQuery
Deprecated use |
searchParameters? |
Type: SearchParameters
|
polylineFilter? |
Type: PolylineFilter
a polylineFilter to filter stores. |
interactionRenderer? |
Type: DefaultRenderer
the renderer used to display search results. |
tiledDataRenderer? |
Type: DefaultRenderer
the renderer used to display vector tiles. |
gentleCenter? |
Type: Boolean
when gentleCenter is true the view will center on the selectedStore only if it’s not already in the padded zone. |
TypesRules object Specification 🔗
Properties | |
type |
Type: String
of a store |
color |
Type: String
a color rgba formatted |
zIndex? |
Type: Number
the zIndex priority of the points |
SearchViewOptions object Specification 🔗
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 | |
template? |
Type: String
Search input template. |
resultsTemplate? |
Type: String
location results template. |
geolocText? |
Type: String
text to display on input field after a geolocation |
BoolOperators constants 🔗
Represents Query Boolean operators.
Constants | |
AND |
And boolean operator |
OR |
Òr boolean operator |
NOT |
Not boolean operator |
Operators constants 🔗
Represents Query operators.
Constants | |
gt |
Greater-than operator |
lt |
Less-than-or-equal-to operator |
lte |
Less-than-or-equal-to operator |
gte |
Greater-than or equal-to operator |
SearchParameters.GroupByValues constants 🔗
Allowed values for the groupBy parameter.
Constants | |
TYPE |
Group By Type |
TAG |
Group By Tags |