Page 1 of 3

Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 5:56 am
by tariq

I followed the Tutorial :
(http://docs.appery.io/tutorials/addin...)
and used my query to put markers on map, always everything OK for the first query but with another queries each query add the markers to previous ones, and i can't clear old markers.
i tried everything for 3 days but no luck.

Any help please??


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 7:38 am
by Kateryna Grynko

Hi Tariq,

Try calling:prevar map = Appery('multiGoogleMap');
map.refresh();/preWhere 'multiGoogleMap' is your map name.


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 9:04 am
by tariq

Hi Katya, I tried this code too, in all events. Is there anything can i do to the following java script to refresh map as it's new or delete markers??

function log2(m) {
return ((Math.log(m)) / (Math.log(2)));
};
for (var k in value.geometry) {
if (locationHelper.checkLocation(k)) {
locationHelper.aLocations.push([value.geometry.location.lat, value.geometry.location.lng]);
}
}
var maxLatitude = -90,
minLatitude = 90,
maxLongitude = -180,
minLongitude = 180;
for (i = 0; i < locationHelper.aLocations.length; i++) {
maxLatitude = locationHelper.aLocations[0] maxLatitude ? locationHelper.aLocations[0] : maxLatitude;
minLatitude = locationHelper.aLocations[0] < minLatitude ? locationHelper.aLocations[0] : minLatitude;
maxLongitude = locationHelper.aLocations[1] maxLongitude ? locationHelper.aLocations[1] : maxLongitude;
minLongitude = locationHelper.aLocations[1] < minLongitude ? locationHelper.aLocations[1] : minLongitude;
}

var map = new google.maps.Map($('div[dsid="multiGoogleMap"]')[0], {
zoom: 5,
center: new google.maps.LatLng((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2),
mapTypeId: google.maps.MapTypeId.ROADMAP
});

var marker, i;
for (i = 0; i < locationHelper.aLocations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locationHelper.aLocations[0], locationHelper.aLocations[1]),
map: map,
});
}

or maybe refresh page as first time opened.


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 10:50 am
by Kateryna Grynko

Tariq,

Share the app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tell how to reproduce this please.


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 1:50 pm
by tariq

Hi Katya,

there is another problem Now, and it is more important than map issue.
i made many changes to my program so it made some error. i saved package name and Key password and Keystore password on my pc, then i backup the project and try to retrieve previous backup that i made yesterday.
i notice that package name changed, and google play didn't accept change on package name, so i changed package name and put Key password, and Keystore password as previous backup version, but i can't re generate that apk again so what can i do?? please help me


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 2:42 pm
by tariq

when i tried to regenerate apk with different keys google play show this error: Image

and i can't generate apk with old keys!!


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 4:27 pm
by tariq

Any update please??


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 4:29 pm
by Maryna Brodina

Hello! Sorry, not yet. We're working on it.


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 4:35 pm
by tariq

hi Maryana,

i didn't share my project can i share it, because i'm dying here :(


Adding Multiple Location Points on Google Map Working but cumulatively!!

Posted: Mon Dec 09, 2013 4:36 pm
by Maryna Brodina

Yes, please share it with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a