Location Input Showcase

Location

Loading Map

Dark Color Scheme:

Search Within Map Boundries:

Include POI Categories:

Exclude POI Categories:

Limit to Countries:

Filter Result Type:

Include Address Categories:

Exclude Address Categories:

{
  "place_id": "I1B2A279E956AFF37",
  "muid": "1957420550111035191",
  "latitude": 39.9782211,
  "longitude": -83.0031064,
  "name": "The Lox",
  "formatted_address": "772 N High St, Unit 106, Columbus, OH 43215, United States",
  "country": "United States",
  "country_code": "US",
  "administrative_area": "Ohio",
  "administrative_area_code": "OH",
  "locality": "Columbus",
  "sub_locality": "Italian Village",
  "full_thoroughfare": "772 N High St"
}

Component Documentation

Component Name

LocationInput

Builder Function Name

create_location_input_manager

Description

Selects a geographic location using MapKit JS, optionally with search and filters for POIs/countries/addresses. Outputs place details.

Use like example

Config

PropertyTypeDefaultDescription
valobject or null

Current location data (place_id, latitude, longitude, etc.). If non-null, will be used for initial map view.

mapkit_js_tokenstring

MapKit JS token for Apple Maps usage.

is_popoverboolean

true

If true, the component is rendered in a popover (centered modal).

is_popover_buttonboolean

false

If true, shows a button that opens the map popover, rather than rendering inline.

is_show_searchboolean

true

If true, includes a search box for place name/POI/address search.

labelstring or null

Label text displayed near the location input.

heightnumber (REM) or null

Map container height. If null, defaults to 'min(40rem, 50vh)'.

widthnumber (REM) or null

Map container width. If null, defaults to 'clamp(60rem, 80vw, 100%)'.

is_dark_color_schemeboolean

false

Sets the initial map color scheme (light or dark).

on_finishfunction

Optional callback, called with final location data when finishing.

Methods

MethodDescriptionParametersReturns
initialize_map

Loads the MapKit JS script if needed and initializes the Apple Map instance once loaded.

No Params

void
set_val

Sets the manager's val (location object).

input: object with place info or null

void

Returned Properties

PropertyTypeDescription
valobject or null

Selected location object with place details (latitude, longitude, name, etc.).

mapobject or null

Reference to the underlying MapKit map instance if loaded.

popover_managerobject

Popover manager controlling the parent popover if is_popover=true.

popover_button_managerobject

Button manager if is_popover_button=true.

labelstring or null

Display label for the location input.

heightstring (CSS size)

Map container height CSS, e.g. '40rem' or '50vh'.

widthstring (CSS size)

Map container width CSS, e.g. '60rem' or '80vw'.

is_show_searchboolean

Whether the search UI is visible.

extra_popover_managerobject

Popover manager for extra search filters popover.

extra_popover_button_managerobject

Button manager that opens the extra filters popover.

finish_button_managerobject

Button manager for final 'Finish' button in popover footer.

suggestions_preppedarray

List of prepared search suggestions from MapKit's autocomplete results.

is_dark_mode_checkbox_managerobject

Checkbox manager toggling the map color scheme (light/dark).

clear_suggestions_button_managerobject

Clears the suggestions_prepped array.

search_text_input_managerobject

Text input manager for the search query.

search_button_managerobject

Button manager that triggers full map search by text.

search_filter_within_map_boundries_checkbox_managerobject

Checkbox manager for restricting search to the visible map region.

search_filter_include_poi_categories_dropdown_managerobject

Dropdown manager for specifying POI categories to include in results.

search_filter_exclude_poi_categories_dropdown_managerobject

Dropdown manager for specifying POI categories to exclude from results.

search_filter_limit_to_countries_dropdown_managerobject

Dropdown manager for restricting search results to specified countries.

search_filter_result_type_dropdown_managerobject

Dropdown manager for toggling inclusion of address / POI / query / physicalFeature results.

search_filter_include_address_categories_dropdown_managerobject

Dropdown manager for address categories to include (country, locality, postal code, etc.).

search_filter_exclude_address_categories_dropdown_managerobject

Dropdown manager for address categories to exclude (country, locality, postal code, etc.).

mapkit_js_tokenstring or null

MapKit JS token for Apple Maps usage.

icon
Sponsored byContibase