(small) maps possible with CONNECT IQ?

Hello programmers,

would it theoretically possible to add the ability to work with (small) maps on the fr920xt or any other CONNECT IQ compatible device?
I mean, as the fenix, tactic, fenix 2 can already display, a small basemap or gmapsupp up to 3 mb (or something like that).

I know that the memory of these devices is limited, but I like to know...;)

regards

VOLKTE
  • Yeah, the memory limitations are going to be interesting, but I fear the RAM may be more limiting than the device's internal storage

    The memory limitation of each device is given in the bottom right of the simulator, along with the current memory usage of the app. For all currently simulated devices this limit is 75kB. If your JSON reply is coming back with 180kB in one reply you'll have issues on hardware. For now the simulator does not cause an error when going over the device's memory limit.

    Also, currently the simulator crashes if I try to save a property larger than a few KB.

    Thanks for the report. We'll take a look and get this fixed. I'm curious what you're saving that is this large.
  • Thanks for your answer.

    The memory limitation of each device is given in the bottom right of the simulator, along with the current memory usage of the app. For all currently simulated devices this limit is 75kB. If your JSON reply is coming back with 180kB in one reply you'll have issues on hardware. For now the simulator does not cause an error when going over the device's memory limit.


    Got it. Decoding the json to native format counts towards the app's memory then (as opposed to the framework for example?). Is that 75kB (or whatever it is on real hardware) meant to be shared among all apps, or is it a limit per app (plus, the obviously a limit on the number of apps running)?
    I think I can deal with that, I'll just need to store and transfer things differently.

    I'm curious what you're saving that is this large.


    Well, the map data :) It can get as large as you want ;) What I'm trying to do is request the map data via json, it gets parsed by the monkey C framework, then I just want to store the resulting object as a property.
    Since JSON parsing crashes the simulator right now, I just hardcode the map data in the source file, and on initialization, store it in a property.

    But I'll split it up though. I think the app will have to read chunks of the map stored in smaller properties, and load/unload them on demand.
    It will be tricky, but 75kB should still be enough to render the map, there isn't that much information you can put on a small screen.

    Unless you revise your plans and make a directory on the filesystem accessible ;) Even if it's read-only.

    BTW, how do I delete a property? setProperty(key, null)? will that delete the space used by the key as well?
  • I had done some testing and found that if the size of the app properties file (%TEMP%\Garmin\Apps\Data\APP.str) exceeded 8KB, the application properties can't be loaded or saved. Each property name and its value are stored in the file, along with 8b of overhead for per pair, and a 128b overhead for the entire file. So, if you used only one property with a single character for a name, you'd get about 8055b.

    Travis
  • I had done some testing and found that if the size of the app properties file (%TEMP%\Garmin\Apps\Data\APP.str)


    I also looked at that (in fact, when the emulator starts crashing, I delete this file and start over). But I assumed this would be implemented very differently on the hardware, so I didn't care much.
    I surely hope that more will be available, or writing a mapping app, without pulling too much hair, would get pretty hard :)
  • Got it. Decoding the json to native format counts towards the app's memory then (as opposed to the framework for example?). Is that 75kB (or whatever it is on real hardware) meant to be shared among all apps, or is it a limit per app (plus, the obviously a limit on the number of apps running)?

    The limit is for a single app. Data Fields will have a smaller memory allowance, but the simulator does not currently reflect this.

    BTW, how do I delete a property? setProperty(key, null)? will that delete the space used by the key as well?

    The next release will have Application.deleteProperty(key) to delete a single entry and Application.clearProperties() to delete them all.