Prashant Singh
Prashant Singh

Reputation: 75

how to use Mapbox-gl-geocoder in ionic

I want to use geocoding in ionic-4 using mapbox.

import { MapboxGeocoder } from '@mapbox/mapbox-gl-geocoder';

But I have the error:

Cannot find module '@mapbox/mapbox-gl-geocoder'

How to import MapboxGeocoder in ionic.

Upvotes: 1

Views: 490

Answers (1)

Gouri Shankar Karanam
Gouri Shankar Karanam

Reputation: 63

Try this:

import * as MapboxGeocoder from '@mapbox/mapbox-gl-geocoder';

Upvotes: 2

Related Questions