iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
991 stars 552 forks source link

[Plugin] draw-tools: Expand the saving character limit please. #558

Closed donghaerang closed 11 years ago

donghaerang commented 11 years ago

Easily, I save like this. [{"type":"marker","latLng":{"lat":33.235446,"lng":126.314514}},{"type":"marker","latLng":{"lat":33.236593,"lng":126.313113}}............,{"type":"marker","latLng":{"lat":33.241683,"lng":126.304893}}] This is 200 characters.

By the way, I just can save 62124 characters as the data for draw-tools. 62124 characters is maybe saving limit. Expand the saving character limit please.

jonatkins commented 11 years ago

I think you're saying that draw tools is failing because the JSON string stored in localStorage is too long?

How many items are you drawing? What browser are you using?

Can you visit this site - http://arty.name/localstorage.html - and report back on it's size limit for localStorage.

I suspect any size limits are not because of restrictions on the length of the draw-tools data, but the overall browser limits on localStorage. IITC uses this to cache player names, and also keep track of guessed player levels.Neither of these has any automatic clearing of old data, so could easily take up a large part of the space if you regularly view large areas of the map with many individual players.

jonatkins commented 11 years ago

If you open 'guess player levels' and choose 'reset guesses', this will free one part of the data. Let me know if this increases the space available for draw tools.

ZasoGD commented 11 years ago

@donghaerang previously have you pasted a huge string in local storage?

donghaerang commented 11 years ago

@jonatkins I pasted a huge string not drawed. and I'm using chrome. Also, I clicked 'reset quesses'. the situation is same. T_T

@ZasoGD Yes, right. I pasted 127660 characters. but, 62124 characters is survived, the others are gone. Actually, When I refresh intel page after pasting 127660 characters, the plugin is disappear because it's maybe crashed with the huge string. And at that time, when I check the data of plugin-draw-tools-layer, I just saw 62124 characters.

ZasoGD commented 11 years ago

@donghaerang don't worry, my english is not better. Anyway... It's a browser limit. I tried with a 70'000 characters. Not works if I paste it in local storage by Resources > Local Storage browser panel (the browser curtails the string), instead if I import it by prompt('', myHugeString); function it works well (@jonatkins see import function in bookmarks plugin).

jonatkins commented 11 years ago

OK, have confirmed there's no IITC or draw tools limit of 65000ish characters.

So I assume you're trying to copy+paste data using the browser developer tools? This must be a limit of that, rather than IITC itself.

This is not a supported method of getting data into/out of draw tools. Improvements in this area are planned, but not sure when I'll get the time to finish this.