-1

i am working on an application which has more then 10000 markers on google map , i am using google map v2 ,and as library android-maps-extensions https://code.google.com/p/android-maps-extensions/. but when i load markers on map it make application slower and 10\5 times force close beacause of java.lang.OutOfMemoryError Exception.
all the markers have its own images , images loads form url, condition in which image is not loading , defult image will be displat

is there any way to handle this kind of condition..?

Imtiyaz Khalani
  • 2,037
  • 18
  • 32

2 Answers2

0

You can use android:largeHeap="true" in your AndroidManifest.xml in order to request more memory from the Android's Virtual Machine.

Naskov
  • 4,121
  • 5
  • 38
  • 62
-1

Use below code for your Image Loading.

Download jar from here: http://code.google.com/p/android-query/

   private AQuery androidAQuery;
        androidAQuery=new AQuery(this);

    androidAQuery.id(YOUR IMAGEVIEW).image(YOUR IMAGE URL, true, true,default icon(optional));
Pratik Dasa
  • 7,439
  • 4
  • 30
  • 44
  • but @pratik it is about loading an image in imageview, this application loads many of images for displaying and also loads 1000 markers at a time so this make application slower and consume more memory , it cauase out of memory Exception, so is there any way to handle this condition.please read my question again and think on it. it is not only for loading an images.. – Imtiyaz Khalani Sep 23 '13 at 07:22
  • Just try this, and see whats going on? Because we need to go for it step by step. – Pratik Dasa Sep 23 '13 at 07:24
  • okay pratik i'll study AQuery and i am implemanting your suggestion in my porject i need to change lot of code so i request to keep in touch,i'll contact soon. – Imtiyaz Khalani Sep 23 '13 at 08:57