This package has been deprecated

Author message:

This package has reached end of life and is deprecated. Please refer to our support policy, https://www.itwinjs.org/learning/api-support-policies/, and changelog, https://www.itwinjs.org/v3/changehistory/3.0.0/#package-name-changes.

@bentley/geonames-extension

2.19.53 • Public • Published

Geonames Example Extension

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

An iTwin.js Extension that displays markers at locations of named geographic features from the GeoNames geographical database. Hovering over a marker shows a tooltip containing the name of the location and its population. Clicking a marker causes the view to zoom to that location.

This extension is an example of a extension that can be added to iTwin.js host applications. See http://itwinjs.org for comprehensive documentation on the iTwin.js API and the various constructs used in this sample.

Development Setup

  1. Select and prepare an iTwin.js host application. You can use the Simple Viewer App, for example.

  2. The dependencies are installed as part of "rush install" in the iTwin.js monorepository.

  3. Build the extension as part of the "rush build" in the iTwin.js monorepository, or separately build using the npm build command.

npm run build
  1. Copy all the output files in the lib/build directory tree to the host app's ./build/imjs_extensions/geoNames directory.

  2. Start the host application - go to its directory and run:

npm run start:servers
  1. Open a web browser (e.g., Chrome or Edge), and browse to localhost:3000.
  2. Add the following line to the app's startup method - ExtensionTool.run("localhost:3000/geoNames");. Where localhost:3000 is the location of the app locally
  3. The following toolIds will be available: GeoNamesOnTool, GeoNamesOffTool, GeoNamesUpdateTool

Contributing

Contributing to iTwin.js

Package Sidebar

Install

npm i @bentley/geonames-extension

Weekly Downloads

1

Version

2.19.53

License

MIT

Unpacked Size

63.1 kB

Total Files

6

Last publish

Collaborators

  • aruniverse
  • colinkerr
  • cshafer
  • imodeljs
  • wgoehrig