diff --git a/docs/api/mapml-viewer-api.mdx b/docs/api/mapml-viewer-api.mdx index 7d2d7c926..a834813de 100644 --- a/docs/api/mapml-viewer-api.mdx +++ b/docs/api/mapml-viewer-api.mdx @@ -13,13 +13,13 @@ The HTMLMapmlViewerElement interface represents the `` element. | Property name | Description | |-------------- |-------------------------------------------------------- | -| [controls](#controls) | Turns native map controls on or off. Reflects the controls attribute. | -| [controlsList](#controlslist) | Allows to change the set of native controls. Reflects the controlslist attribute. | +| [controls](#controls) | Turns native map controls on or off. Reflects the `controls` attribute. | +| [controlsList](#controlslist) | Allows to change the set of native controls with script. Note use of camelCase of the property name vs lowercase attribute name. Reflects the `controlslist` attribute. | | [extent](#extent) | Returns the extent of the current map view. Read only. | | [lat](#lat) | Get or set the map's latitude. Reflects to the lat content attribute. No effect on map dynamic state. | | [lon](#lon) | Get or set the map's longitude. Reflects to the lon content attribute. No effect on map dynamic state. | -| [projection](#projection) | The map's projection. Reflects the projection attribute. | -| [zoom](#zoom) | Get or set the map's zoom level. Reflects to the zoom content attribute. No effect on map dynamic state. | +| [projection](#projection) | The map's projection. Reflects the `projection` attribute. | +| [zoom](#zoom) | Get or set the map's zoom level. Reflects to the `zoom` content attribute. No effect on map dynamic state. | ### controls @@ -45,8 +45,10 @@ that helps the user select what controls to display on the `mapml-viewer` elemen To set the controlslist attribute: ```js let map = document.querySelector('mapml-viewer'); -map.controlsList.value = "noreload nozoom"; // values can be noreload | nofullscreen | nozoom | nolayer +map.controlsList.value = "noreload nozoom"; // values can be noreload | nofullscreen | nozoom | nolayer | search | geolocation map.controlsList.add("nofullscreen"); // can also add using the 'add' method +map.controlsList.add("geolocation"); // adds the locate control +map.controlsList.add("search"); // adds the search control, disabled until a search URL template link is defined map.controlsList.toggle("nolayer"); // can also toggle using the 'toggle' method // view all methods here - https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList ``` @@ -406,6 +408,79 @@ state of the queried map properties (projection, zoom, extent); any change to th | zoomend | Fired after the map has changed zoom level | | preclick | Fired before a click on the map is triggered. May not be a primitive. | | contextmenu | Fired when user right-clicks or long presses on map. May not be a primitive.| +| [mapsearch](#mapsearch) | Fired after search responses arrive from all search-enabled layers. | +| [mapsuggestions](#mapsuggestions) | Fired after typeahead suggestion responses arrive from all search-enabled layers. | + +### mapsearch + +Fired on the `` element after search responses have been received +from all checked layers that contain a +[`