Page 1 of 1

Speeding up the google app marker locations

Posted: Sun Aug 25, 2013 8:04 pm
by Willie Sims

I have tried to load markers numerous ways, I have Both Latitude and Longitude for all my locations

One I tried to use Fusion Layers this worked ok but then I ran into an issue when trying to figure out a way of finding the nearest location to the device.
The other I used the cloud database and the tutorial adding multible markers from rest service, The issue I ran into however is that I have close to 600 locations using the google api It throws an over Quota error after showing 50 markers

So I used the example https://getsatisfaction.com/apperyio/...
With the code
code
var coordsArray = data.coordinate;
var marker;
for (var i = 0, j = coordsArray&#46;length; i < j; i++) {
marker = new google&#46;maps&#46;Marker({
position: new google&#46;maps&#46;LatLng( coordsArray&#46;latitudine, coordsArray&#46;longitudine ),
map: Appery("Map1")&#46;gmap
});
}
/code
And Mapping to Markers in the map object
But the markers load slow

(App)
http://appery.io/app/mobile-frame?src...

Any suggestions on how I can speed this up, I tried creating a local variable but it only lets me map a single object to it


Speeding up the google app marker locations

Posted: Sun Aug 25, 2013 9:26 pm
by Igor

Hello,

There is an error in browser console. Please fix the error after that we'll continue.


Speeding up the google app marker locations

Posted: Sun Aug 25, 2013 9:58 pm
by Willie Sims

I know Trying to figure out the Error
This is the code that is throwing the error
for (var i = 0, j = coordsArray.length; i < j; i++) {


Speeding up the google app marker locations

Posted: Sun Aug 25, 2013 11:31 pm
by Igor

One more error please fix it too.

pre
code
Uncaught TypeError: Cannot read property 'length' of undefined
/code
/pre