TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed elbarbary
NA
1.6k
275.5k
How to add multilocations on google map using angular 7 ?
Jan 6 2020 12:49 AM
How to add multilocations on google map using angular 7 ?
How to
step 1 : on html component
<agm-map
[latitude]=
"lat"
[longitude]=
"lng"
[zoom]=
"zoom"
[disableDefaultUI]=
"false"
[zoomControl]=
"false"
>
<agm-marker
*ngFor=
"let m of markers;"
[latitude]=
"m.lat"
[longitude]=
"m.long"
>
</agm-marker>
</agm-map>
step2 :on component.ts
export
class
ManagelocationsComponent implements OnInit, AfterViewInit {
markers=[];
this
.partDetailsService.getLocationData(locationArr).subscribe(res => {
res.forEach((item, index) => {
let dataLocation = res[index][
'_source'
][
'GPS1'
];
})
console.log(
"
dataLocation
values is"
+
dataLocation
);
Result points for latitude and longtude from browser :
dataLocation
values is
5.2951916,100.28825170000005,
30.788892,120.632503,
13.658933,100.634069,
10.328074,123.983185,
31.332119,120.723465
I need to add latitude and longtude above on googlemap
so How to represent this please
Reply
Answers (
4
)
cannot display latitude and longitud for more locations go ?
How validate old password with current password exist on db