latitude and longudute from database
I created Page Map with name pointLocation ,onpageshow event I invoke service to get the lat and long from database as follows
[
{
"longitude":"-122.2647787775173",
"latitude":"37.55734701646847",
"address":"Renukunda"
},
{
"longitude":"-122.2649596907653",
"latitude":"37.55655186484956",
"address":"Namakkal"
},
{
"longitude":"-122.2647776734692",
"latitude":"37.55734765189495",
"address":"Namakkal"
},
{
"longitude":"-122.2647463812355",
"latitude":"37.5574136147385",
"address":"Namakkal"
},
{
"longitude":"-122.2648969228191",
"latitude":"37.55725434545304",
"address":"Namakkal"
},
{
"longitude":"-122.2648391338808",
"latitude":"37.55727267875164",
"address":"Namakkal"
},
{
"longitude":"-122.2590955993949",
"latitude":"37.56078604175209",
"address":"Renukunda"
},
{
"longitude":"-122.2645645631482",
"latitude":"37.55715390840967",
"address":"Rangapattanam"
},
{
"longitude":"-122.2647573635601",
"latitude":"37.55723796459216",
"address":"Mysore"
},
{
"longitude":"-122.2648168601335",
"latitude":"37.55737274453138",
"address":"Ramachamuddu"
}
]
I stored response into location variable
i used your code on service success event as
var coordsArray = JSON.parse( localStorage.getItem('location') ),
marker = [];
console.log(coordsArray);
for (var i = 0; i < coordsArray.length; i++) {
marker.push(new google.maps.Marker({
position: new google.maps.LatLng(coordsArray.latitude, coordsArray.longitude),
map: Appery("pointLocation").gmap
}));
}
but its not working ,please help me to resolve this issue....