On my page I have a section containing UL's and each UL gets populated from an array of strings
dealers = [{
title : "Brecksville",
address : "8383 Chippewa Rd.,",
locale : "Brecksville, Ohio - 44141",
phone : "(440) 740-0535",
location: {lat: 41.32134300, lng: -81.62338300}
}];
For brevity I only show one of the strings in the array of strings...
This string is populated into the UL like so...
function populatDealerSummaryList(select, dealers) {
$listSelector = $("#dealersList"); //The Dealer Summary List
$.each(dealers, function (i, obj) {
$listSelector.append(
"<ul class='dealer-summary-list'>" +
"<li class='dealerName'>" + obj.title + "</li>" +
"<li class='dealer-summary-listItem'>" + obj.address + "</li>" +
"<li class='dealer-summary-listItem'>" + obj.locale + "</li>" +
"<li class='dealer-summary-listItem'>" + obj.location + "</li>" +
"<li class='dealer-summary-listItem'>" + obj.phone + "</li>" +
"</ul>");
});
}
above...the latitude and longitude are represented by obj.location...
the problem is...the lat long only renders as [object, object]
I'm not sure how to pass it correctly to get it to render...please help
[object Object]. You'll need to do that a little more manually.