{"id":4146,"date":"2014-03-30T08:21:28","date_gmt":"2014-03-30T08:21:28","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-overlayitem-collection-of-common-programming-errors\/"},"modified":"2014-03-30T08:21:28","modified_gmt":"2014-03-30T08:21:28","slug":"problem-about-overlayitem-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/problem-about-overlayitem-collection-of-common-programming-errors\/","title":{"rendered":"problem about overlayitem-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d32d053cd59f42db8740fe7b8058f538?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1707887<br \/>\nandroid android-asynctask overlayitem<br \/>\nI am building an android application that uses google maps to overlay items. The latitude and longitude for the items I get from a MySQL database. To do this I connect to a php script using HTTP in Async Task. My code for displaying items on the map is in the onPostExecute() method of Async Task. Everything works fine but when I for example rotate the phone all my overlayed items disappear. How can I resolve this issue?Should overlaying the items happen in the main thread? If so, I need to someh<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d0e19a253b555ff5b7633f6e80940325?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMicha\u00ebl<br \/>\nandroid google-maps out-of-memory itemizedoverlay overlayitem<br \/>\nI&#8217;d like to display many icons with the Google API (more than 2,000 icons). I created a simple activity, based on this tuto .It displays without any problem icons when accessing the map. However, when I zoom in\/out a few times, a java.lang.OutOfMemoryError:12-16 08:48:29.415: E\/dalvikvm-heap(606): 680640-byte external allocation too large for this process. 12-16 08:48:29.415: E\/GraphicsJNI(606): VM won&#8217;t let us allocate 680640 bytes 12-16 08:48:29.415: D\/AndroidRuntime(606): Shutting down VM 12-<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>user1707887 android android-asynctask overlayitem I am building an android application that uses google maps to overlay items. The latitude and longitude for the items I get from a MySQL database. To do this I connect to a php script using HTTP in Async Task. My code for displaying items on the map is in the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4146","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4146"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4146\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}