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
karthika pommudu
NA
321
35k
How to zoom map...
Feb 23 2019 5:52 AM
var i,j;
var icon = "Markers/letter_m.png";
//var icon = "Markers/letter_m.png";
var bounds = new google.maps.LatLngBounds();
for (i = 0; i < v.length; i++) {
var loc = v[i];
var reg = arraylorry[i];
var spdval = spdarr[i];
var t_disval = t_dis[i];
var up_dateval = up_date[i];
var statusval = statusval1[i];
//console.log(data);
// for (var j = 0; j < v.length; j++) {
var content = "<div class='map_marker'><div style=font-weight:bold;><span>Lorry Number :</span>"+reg+ "</div><div class='lorry_name'><span>Location:</span>"+loc+ "</div><div><span>Speed:</span>"+spdval+ "</div><div><span>Today_Distance:</span>"+t_disval+ "</div><div><span>Update:</span>"+up_dateval+ "</div><div><span>Status:</span>"+statusval+ "</div>";
var infoWindow = new google.maps.InfoWindow({
content: content
});
var marker = new google.maps.Marker({
position: new google.maps.LatLng(parseFloat(js_lats[i]), parseFloat(js_longs[i])),
icon:icon,
map:map
});
/*marker.addListener('click', function() {
infowindow.open(map, marker);
});*/
google.maps.event.addListener(marker,'click', (function(marker,content,infoWindow){
return function() {
infoWindow.setContent(content);
infoWindow.open(map,marker);
};
})(marker,content,infoWindow));
}
map.fitBounds(bounds);
google.maps.event.addDomListener(window, "load");
Reply
Answers (
1
)
How to seperate the array...waiting to solve it
Host asp.net mvc application in hosting server at low cost.