Answer the question
In order to leave comments, you need to log in
How to connect api 2 gis to ionic 3?
I determine the user's location in the ionic 3 application using the Geolocation plugin, get the coordinates. I need to use api 2 gis to search for buildings, etc. how to connect api 2 gis to the application?
script src="https://maps.api.2gis.ru/2.0/loader.js?pkg=full">/script>
- this is not an option Answer the question
In order to leave comments, you need to log in
npm i 2gis-maps
We put in the template page
map.html
In the map.ts component file
.....
import DG from '2gis-maps';
....
export class MapPage {
map: any;
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
this.map = DG.map('map', {
'center': [54.98, 82.89],
'zoom': 13
});
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question