@aligassan wrote:
i would like to use google map including data weather json and i succeeded to getting data json from server and show marker cities on map . I am trying to make custom Google map marker , l mean l want to shows text Temperature on map not marker .
What i have in my app
Here simple example what i mean .
any idea what should l do ?
My code :
async ngOnInit() { await this.platform.ready(); await this.loadMap() await this.getData() } getData(){ this.http.get('xxxxxxxxxxxxxxxxxxx',{},{}).then(data=>{ let DataJson = JSON.parse(data.data) for (let datas of DataJson['features']) { this.points.push({ lng: datas.geometry.coordinates[0], lat: datas.geometry.coordinates[1] }); } for (let i = 0; i < DataJson.features.length; i++) { let coords = DataJson.features[i].geometry.coordinates; let latLng = new LatLng(coords[1], coords[0]); let icoa = DataJson.features[i].properties.id let markera: Marker = this.map.addMarkerSync({ position: latLng, title:icoa }) } }) } loadMap() { let mapOptions: GoogleMapOptions = { camera: { target: { lat: 33.263, lng: 44.232 }, zoom: 6, } }; this.map = GoogleMaps.create('map_canvas', mapOptions); }
Posts: 1
Participants: 1