Add more Constructors to MapLocation to prevent throttling

Just made a FR for it:

3 Likes

Added some points to the case. This needs fixed.

Better add the text [edited for clarification] as otherwise a search might not find this:

Problem:

MapLocation is seriously flawed as it performs a lookup on EVERY creation of a MapLocation.

Often you do not need to lookup a location as you already have the coordinates (eg a runner’s GPStrack).

Furthermore you are supposed to provide coordinates with the locations in your app, and should store coordinates that you need to look up for reuse.

According to Apple you should only do lookups “in response to user action at one per minute”.

It seems whoever implemented MapLocation was unaware that lookups get throttled when you do more than 50 in “a short space of time”. And to clarify that: a timer isn’t much help. With with a 100 ms period will get throttled when it hits 50 lookups - that is after FIVE SECONDS for just 50 items. [I think even a 1 sec timer will hit the throttling limit]

So if you want to show a runner’s GPS track with a few thousand coordinates or the current location of all the buses of your bus company etc then you can’t - because Xojo did not implement a Constructor that just accepts coordinates to show the location on a map.

Considering that 99.999% of locations don’t even HAVE addresses (eg the sea covering 70% of the Earth, nearly all the land mass on Earth (eg countryside, forests, mountains, nature reserves, geo-caches for treasure hunts, archaeological digs, etc) someone seems to have seriously misunderstood how locations work.

Luckily it’s an easy fix. Add a constructor that has coordinates as parameter, and just set the address to empty strings.

Workarounds:

Buy the MBS plug-ins - but if Christian does it properly and implement the required Constructor, then why not Xojo?

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.