How to create location search widgets for JS web apps?

The Search API, custom JavaScript library from the The United States Geological Survey will help coders to create location widgets
03 August 2017   1827

The United States Geological Survey released is a custom JavaScript library - Search API. This is reported by the USGS official website

It can be used for creating a location search widget in a webpage, with connection to a web map. The widget connects to a database created for the API, to find quickly and suggest locations as the user enters text to navigate to areas of interest.

The goal of this solution is to provide a search tool for locations contained in the Geographic Names Information System database, the official United States government registry of places names.

The GNIS contains abundant information about the official names for places, features and areas in the 50 states, District of Columbia and territories and outlying areas of the U.S., such as Puerto Rico, Guam and the U.S. Virgin Islands. It is exciting to see the new USGS Search API leverage these data and provide new opportunities for the public to access GNIS and expand its use into a wide array of web products.
 

Lou Yost
Executive secretary, U.S. Board on Geographic Names

The Search Api can be also used for a hydrologic applications, excludes commercial locations.

Main features:

  • Framework Independence: The widget can be used in conjunction with Leaflet, ESRI JSAPI or other web-mapping frameworks.
  • Database Richness: Beyond cities and towns, GNIS is the authoritative place name registry for the nation that also includes streams, lakes, dams, basins, parks, bridges, hospitals, schools and much more.
  • Suggestion Organization: Suggestions are grouped by category, making it easier to find what you are looking for.
  • Automatic State Filtering: An entry ending in a two-character U.S. state abbreviation automatically restricts suggestions to that state.
  • Wild Card Support: Wild card matching is performed on entries containing one or more asterisks.
  • Latitude-Longitude Recognition: Entries such as "40.1 -90.2" are automatically identified as geographic coordinates in decimal form.
  • Customizable Behavior: Many options are available for configuring the widget, such as the search area and types of suggestions to include.
  • Customizable Appearance: A structured CSS class system allows flexible customization of widget appearance.

Search API
Search API

API contains about 3.7M location, from different resources including:

  • GNIS Places: Approximately 2.1 million places registered with the Geographic Names Information System.
  • USGS Monitoring Stations: Over 1.4 million USGS surface water, groundwater, spring, atmospheric and other sites in the USGS National Water Information System.
  • Hydrologic Units: Over 120,000 two-, four-, six-, eight-, 10- and 12-digit hydrologic unit codes.
  • Zip Codes: Over 30,000 5-digit postal (zip) codes compiled from the ESRI USA ZIP Code Areas dataset.
  • Area Codes: About 290 three-digit telephone area codes for the nation.
  • U.S. States: The 50 U.S. states plus the District of Columbia, the U.S. Virgin Islands and Puerto Rico.

You can learn more at the official website of USGS.

Bootstrap 3.4.0 to be Out

The project team is focused on developing Bootstrap 4.2, so the current version didn’t get as many changes
17 December 2018   97

Bootstrap 3.4 is out - a free framework for creating websites and web applications. The project team is focused on developing Bootstrap 4.2, so the current version didn’t get many changes. In particular, the documentation has been updated, the problem with the XSS vulnerability has been fixed, and the Algolia search function has been added.

New features in the tool:

  • The developers added a new class .row-no-gutters, the ability to search for documents through Algolia and the addition to .navbar-fixed- * when opening a pop-up notification.
  • An issue with vulnerability to XSS attacks in Alert, Carousel, Collapse, Dropdown, Modal and Tab components has been fixed.
  • The developers have removed the double frame in the <abbr> elements. In addition, they refused to support dragging and dropping from the customizer and creating in the Gist web customizer, since GitHub had long since disabled this feature.

What has changed in the documentation

  • Developers have added a drop-down menu for new and previous versions to the documentation navigation.
  • The library for copying text to the ZeroClipboard clipboard was replaced with clipboard.js, and the testing was transferred to BrowserStack.
  • Reorganized CSS v3 documentation to use Less.
  • baseurl replaced by/docs/3.4/.
  • Updating links will allow you to open them only via HTTPS and fix broken URLs.

A detailed description of all the features of Bootstrap 3.4.0 is available in the official documentation. To upgrade to Bootstrap 3.4.0 using the npm package manager, thenpm i bootstrap @ previous or npm i bootstrap@3.4.0 commands are provided. Upgrading to this version via Bower is not available.