tariq
Posts: 0
Joined: Wed Nov 13, 2013 5:23 pm

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

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??

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

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

Hi Tariq,

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

tariq
Posts: 0
Joined: Wed Nov 13, 2013 5:23 pm

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

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

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

Tariq,

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

tariq
Posts: 0
Joined: Wed Nov 13, 2013 5:23 pm

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

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

tariq
Posts: 0
Joined: Wed Nov 13, 2013 5:23 pm

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

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

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

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

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

tariq
Posts: 0
Joined: Wed Nov 13, 2013 5:23 pm

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

hi Maryana,

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

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

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

Return to “Issues”