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
278.4k
How to store value of latitude and longtude on two variables
Dec 30 2019 4:35 AM
How to store values of loc[0] and loc[1] on two variables latitude and longtude
and what type of two variables ?
this
.partDetailsService.getLocationData(locationArr).subscribe(res => {
console.log(res);
res.forEach((item, index) => {
let dataLocation = res[index][
'_source'
][
'GPS1'
];
console.log(dataLocation);
let loc = dataLocation.split(
','
);
console.log(
"After"
);
console.log(loc);
success
console.log(loc[0].trim());
success
console.log(loc[1].trim());
success
});
latitude= result of loc[0].trim after loop finish
longtude= result of loc[1].trim after loop finish
and what datatype assigned to two variables ?
Reply
Answers (
9
)
error Cannot read property ‘split’ of undefined
How to display more than locaions gps on googlemap?