Commit cb74a2bf authored by Manideep2897's avatar Manideep2897 Committed by GitHub

Add files via upload

complete retrive to map
parent c4609866
......@@ -12,7 +12,14 @@
</ion-header>
<ion-content padding>
hi
<agm-map [latitude]="16.4419" [streetViewControl]="true" [longitude]="80.6225" [mapTypeId]="'hybrid'" [zoom]="15">
<ion-item *ngFor="let item of items">
<agm-marker [label]="options" [latitude]="item.LATITUDE" [longitude]="item.LONGITUDE" [markerClickable]="true"></agm-marker>
</ion-item>
</agm-map>
</ion-content>
page-vijay {
agm-map {
height: 500px;
width: 1000px;
position: absolute;
left: 0;
bottom: 5;
}
}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { IonicPage, NavController, NavParams,Platform } from 'ionic-angular';
import { HttpClient } from '@angular/common/http';
import { AgmCoreModule } from '@agm/core';
import { Geolocation } from '@ionic-native/geolocation';
/**
* Generated class for the VijayPage page.
*
......@@ -14,12 +16,53 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
templateUrl: 'vijay.html',
})
export class VijayPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
coords:any;
location:any;
latitude:any;
LATITUDE:any;
help:any;
ite:any;
public items : Array<any> = [];
constructor(public navCtrl: NavController, private geolocation: Geolocation,public platform:Platform, public http:HttpClient,public navParams: NavParams) {
}
options={
colorl:'#ASDF96',
fontfamilyl:'',
fontsizel:'14px',
fontweightl:'bold',
textl:'B',
}
ionViewWillEnter() : void
{
this.load();
}
ionViewDidLoad() {
console.log('ionViewDidLoad VijayPage');
load() : void
{
let LATITUDE: any
this.http
.get('http://192.168.1.1/mani/retrive.php')
.subscribe((data : any) =>
{
console.log(data);
this.items=data;
let vamsi=this.items;
console.log(vamsi.toString() );
},
(error : any) =>
{
console.dir(error);
});
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment