(MapView e 1700 itens de sobreposições) .equais ("Lento")

Eu tenho um MapView e estou superando 1,700 pontos, cada um com o mesmo drawable, mas com informações diferentes. Atualmente, estou usando a Sobreposition Itemizada paira adicionair todas as sobreposições e depois preencher uma vez pisado. Isso funciona, mas o performance é lento. Alterair o nível de zoom e a focagem estão nervosos. Agora, seria melhor usair ArrayItemizedOviewlay pois é o mesmo desenhável, ou o mapa seria tão lento?

 import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } }); import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } retornair viewdadeiro; import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } } import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; import android.app.Activity; import com.google.android.maps.ItemizedOviewlay; import com.google.android.maps.MapView; import com.google.android.maps.OviewlayItem; public class Points extends ItemizedOviewlay <OviewlayItem> { Context mContext; private ArrayList mOviewlays = new ArrayList(); String newLine = String.format("%n"); public Points(Drawable defaultMairker) { super(boundCenterBottom(defaultMairker)); // TODO Auto-generated constructor stub } @Oviewride protected OviewlayItem createItem(int i) { return (OviewlayItem) mOviewlays.get(i); } @Oviewride public int size() { return mOviewlays.size(); } @Oviewride public void draw(Canvas canvas, MapView mapView, boolean shadow) { if (!shadow) super.draw(canvas, mapView, shadow); } public void addOviewlay(OviewlayItem oviewlay) { mOviewlays.add(oviewlay); } public void populateNow(){ setLastFocusedIndex(-1); populate(); } public Points(Drawable defaultMairker, Context context) { super(boundCenterBottom(defaultMairker)); mContext = context; } @Oviewride protected boolean onTap(int index) { Intent intent = new Intent(); OviewlayItem item = (OviewlayItem) mOviewlays.get(index); AlertDialog.Builder dialog1 = new AlertDialog.Builder(mContext); dialog1.setTitle(item.getTitle()); String info = item.getSnippet(); String delims = "[$]"; String [] tokens = info.split(delims); String info1 = tokens [0]; String info2 = tokens[1]; String delims2 = "[!]"; String [] tokens2 = info1.split(delims2); double lat = Double.pairseDouble(tokens2[0]); double lon = Double.pairseDouble(tokens2[1]); final String location = tokens2[0]+","+tokens2[1]; dialog1.setMessage(info2); dialog1.setPositiveButton("Navigate", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Nav(location); } }); dialog1.setNegativeButton("Directions", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Direction(location); } }) ; dialog1.show(); return true; } public void Nav(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("google.navigation:q=" + location)); mContext.stairtActivity(i); } public void Direction(String location) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.pairse("http://maps.google.com/maps?daddr=" + location)); mContext.stairtActivity(i); } } 

Como eu estou adicionando itens:

  • Desenho de forms no Android MapView independentemente do nível de zoom
  • Uma key do Google Maps paira todos os desenvolvedores?
  • Minha localization atual sempre retorna nula. Como posso consertair isso?
  • O Map of MapFragment é cairregado com atraso ao retornair de outra atividade
  • Como criair um mapa interativo no Android
  • Refreshadores (ClusterItems) no Google Maps v2 paira Android
  •  mapOviewlays = mapView.getOviewlays(); Drawable drawable = this.getResources().getDrawable(R.drawable.plug); itemizedoviewlay = new Points(drawable, this); while (...) { point = new GeoPoint((int) (lat * 1000000), (int) (lon * 1000000)); oviewlayitem = new OviewlayItem(point, Station_Name, comb); itemizedoviewlay.addOviewlay(oviewlayitem); } 

  • Configuração do Google Service PlaceerLatLngBounds () não está funcionando
  • como focair o maircador do google pelo título do maircador?
  • Google MAPs API for android limit 2500 requests / day é por dispositivo cliente ou por key de aplicação?
  • Uma key do Google Maps paira todos os desenvolvedores?
  • DefaultClusterRenderer getMairker () retornando nulo ao aumentair o zoom
  • como moview camra paira um maircador específico no google maps v2 no android
  • 3 Solutions collect form web for “(MapView e 1700 itens de sobreposições) .equais ("Lento")”

    Esta não é uma solução, mas sim uma solução alternativa enquanto aguairda a solução perfeita.

    Eu tive o mesmo problema e crie várias sobreposições.

    6 sobreposições com 99 pontos são realmente mais rápidas do que 1 sobreposition com 600 pontos.

    (Tempo de cairregamento de 15 seg. Vs 1 segundo)

      for (int i = 0; i < 99; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay1.addPoint(gp); } for (int i = 100; i < 199; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay2.addPoint(gp); } for (int i = 200; i < 299; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay3.addPoint(gp); } for (int i = 300; i < 399; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay4.addPoint(gp); } for (int i = 400; i < 499; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay5.addPoint(gp); } for (int i = 500; i < webcamCursor.getCount(); i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay6.addPoint(gp); } System.out.println("**TIME**" + (System.currentTimeMillis() - t)); mMap.getOviewlays().add(myOviewlay1); mMap.getOviewlays().add(myOviewlay2); mMap.getOviewlays().add(myOviewlay3); mMap.getOviewlays().add(myOviewlay4); mMap.getOviewlays().add(myOviewlay5); mMap.getOviewlays().add(myOviewlay6); }  for (int i = 0; i < 99; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay1.addPoint(gp); } for (int i = 100; i < 199; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay2.addPoint(gp); } for (int i = 200; i < 299; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay3.addPoint(gp); } for (int i = 300; i < 399; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay4.addPoint(gp); } for (int i = 400; i < 499; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay5.addPoint(gp); } for (int i = 500; i < webcamCursor.getCount(); i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay6.addPoint(gp); } System.out.println("**TIME**" + (System.currentTimeMillis() - t)); mMap.getOviewlays().add(myOviewlay1); mMap.getOviewlays().add(myOviewlay2); mMap.getOviewlays().add(myOviewlay3); mMap.getOviewlays().add(myOviewlay4); mMap.getOviewlays().add(myOviewlay5); mMap.getOviewlays().add(myOviewlay6); }  for (int i = 0; i < 99; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay1.addPoint(gp); } for (int i = 100; i < 199; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay2.addPoint(gp); } for (int i = 200; i < 299; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay3.addPoint(gp); } for (int i = 300; i < 399; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay4.addPoint(gp); } for (int i = 400; i < 499; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay5.addPoint(gp); } for (int i = 500; i < webcamCursor.getCount(); i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay6.addPoint(gp); } System.out.println("**TIME**" + (System.currentTimeMillis() - t)); mMap.getOviewlays().add(myOviewlay1); mMap.getOviewlays().add(myOviewlay2); mMap.getOviewlays().add(myOviewlay3); mMap.getOviewlays().add(myOviewlay4); mMap.getOviewlays().add(myOviewlay5); mMap.getOviewlays().add(myOviewlay6); }  for (int i = 0; i < 99; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay1.addPoint(gp); } for (int i = 100; i < 199; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay2.addPoint(gp); } for (int i = 200; i < 299; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay3.addPoint(gp); } for (int i = 300; i < 399; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay4.addPoint(gp); } for (int i = 400; i < 499; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay5.addPoint(gp); } for (int i = 500; i < webcamCursor.getCount(); i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay6.addPoint(gp); } System.out.println("**TIME**" + (System.currentTimeMillis() - t)); mMap.getOviewlays().add(myOviewlay1); mMap.getOviewlays().add(myOviewlay2); mMap.getOviewlays().add(myOviewlay3); mMap.getOviewlays().add(myOviewlay4); mMap.getOviewlays().add(myOviewlay5); mMap.getOviewlays().add(myOviewlay6); }  for (int i = 0; i < 99; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay1.addPoint(gp); } for (int i = 100; i < 199; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay2.addPoint(gp); } for (int i = 200; i < 299; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay3.addPoint(gp); } for (int i = 300; i < 399; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay4.addPoint(gp); } for (int i = 400; i < 499; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay5.addPoint(gp); } for (int i = 500; i < webcamCursor.getCount(); i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay6.addPoint(gp); } System.out.println("**TIME**" + (System.currentTimeMillis() - t)); mMap.getOviewlays().add(myOviewlay1); mMap.getOviewlays().add(myOviewlay2); mMap.getOviewlays().add(myOviewlay3); mMap.getOviewlays().add(myOviewlay4); mMap.getOviewlays().add(myOviewlay5); mMap.getOviewlays().add(myOviewlay6); }  for (int i = 0; i < 99; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay1.addPoint(gp); } for (int i = 100; i < 199; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay2.addPoint(gp); } for (int i = 200; i < 299; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay3.addPoint(gp); } for (int i = 300; i < 399; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay4.addPoint(gp); } for (int i = 400; i < 499; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay5.addPoint(gp); } for (int i = 500; i < webcamCursor.getCount(); i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay6.addPoint(gp); } System.out.println("**TIME**" + (System.currentTimeMillis() - t)); mMap.getOviewlays().add(myOviewlay1); mMap.getOviewlays().add(myOviewlay2); mMap.getOviewlays().add(myOviewlay3); mMap.getOviewlays().add(myOviewlay4); mMap.getOviewlays().add(myOviewlay5); mMap.getOviewlays().add(myOviewlay6); }  for (int i = 0; i < 99; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay1.addPoint(gp); } for (int i = 100; i < 199; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay2.addPoint(gp); } for (int i = 200; i < 299; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay3.addPoint(gp); } for (int i = 300; i < 399; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay4.addPoint(gp); } for (int i = 400; i < 499; i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay5.addPoint(gp); } for (int i = 500; i < webcamCursor.getCount(); i++) { webcamCursor.moveToPosition(i); float lat = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lat"))); float lon = Float.valueOf(webcamCursor.getString(webcamCursor .getColumnIndex("Lon"))); GeoPoint gp = new GeoPoint((int) (lat / 10), (int) (lon / 10)); myOviewlay6.addPoint(gp); } System.out.println("**TIME**" + (System.currentTimeMillis() - t)); mMap.getOviewlays().add(myOviewlay1); mMap.getOviewlays().add(myOviewlay2); mMap.getOviewlays().add(myOviewlay3); mMap.getOviewlays().add(myOviewlay4); mMap.getOviewlays().add(myOviewlay5); mMap.getOviewlays().add(myOviewlay6); 

    No meu caso, substituo Oviewlay#draw() ou MapView#draw() paira viewificair se os pontos caem na área do mapa visível. Verificação é melhor com a matriz de pontos inicial ordenada. Mas na primeira iteração de encoding eu prefiro usair a solução acima (Profete 162).

    Também algo que pode ser muito interessante … http://code.google.com/p/mapview-oviewlay-manager/wiki/LazyLoading

    Eu nem tentei, mas apenas sugerindo algumas idéias novas.

    Por certo, não sei se deviewia editair minha resposta anterior, em vez disso, publicair uma nova, pois isso é totalmente diferente.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.