Oddly enough, I copied/pasted your code and I am getting a class not found issue.. for some reason I can't get the Launcher to start. Can you paste your layout xml and string resources as well?
On Mon, Feb 1, 2010 at 8:32 PM, andrew android <[email protected]>wrote: > Any example of what I may be missing? Thanks! > > On Jan 31, 12:10 pm, Kevin Duffey <[email protected]> wrote: > > Hmm.. I don't know.. I did not set the overlay position.. I just added it > to > > my mapView and mine shows up. Try working with your location settings. I > am > > not sure why the Location is needed tho. I use an ItemizedOverlay for a > list > > of items I pull down from a server, which works fine. My map then > responds > > to a click on an item, and puts another overlay above it with text. > > > > On Sun, Jan 31, 2010 at 9:44 AM, andrew android <[email protected] > >wrote: > > > > > > > > > My map overlay is not showing up after several attempts > > > > > Here is my Overlay class code: > > > > > public class myOverlay extends Overlay{ > > > > > private final int mRadius = 6; > > > @Override > > > public void draw(Canvas canvas, MapView mapView, boolean > > > shadow) { > > > super.draw(canvas, mapView, shadow); > > > Projection projection = > > > mapView.getProjection(); > > > // if (shadow == false) { > > > Double latitude = location.getLatitude()*1E6; > > > Double longitude = location.getLongitude()*1E6; > > > GeoPoint geoPoint; > > > geoPoint = new > > > GeoPoint(latitude.intValue(),longitude.intValue > > > ()); > > > Point point = new Point(); > > > projection.toPixels(geoPoint, point); > > > RectF oval = new RectF(point.x - mRadius, > point.y - > > > mRadius, > > > point.x + mRadius, point.y + mRadius); > > > // Setup the paint > > > Paint paint = new Paint(); > > > paint.setARGB(250, 255, 0, 0); > > > paint.setAntiAlias(true); > > > paint.setFakeBoldText(true); > > > Paint backPaint = new Paint(); > > > backPaint.setARGB(175, 50, 50, 50); > > > backPaint.setAntiAlias(true); > > > RectF backRect = new RectF(point.x + 2 + > mRadius, > > > point.y - > > > 3*mRadius, point.x + 65, point.y + mRadius); > > > // Draw the marker > > > canvas.drawOval(oval, paint); > > > canvas.drawRoundRect(backRect, 5, 5, backPaint); > > > canvas.drawText(noteName, point.x + 2*mRadius, > > > point.y, paint); > > > > > // } > > > // else { > > > > > // } > > > > > } > > > @Override > > > public boolean onTap(GeoPoint point, MapView mapView) { > > > // Return true if screen tap is handled by this overlay > > > return false; > > > } > > > Location location; > > > > > public Location getLocation() { > > > return location; > > > } > > > public void setLocation(Location location) { > > > this.location = location; > > > } > > > String noteName; > > > public String getNoteName(){ > > > return noteName; > > > } > > > public void setNoteName(String n){ > > > this.noteName = n; > > > } > > > } > > > > > Here is the call to add the overlay: > > > > > positionOverlay = new myOverlay(); > > > Location loc = new Location("over"); > > > loc.setLatitude(lat); > > > loc.setLongitude(lng); > > > positionOverlay.setLocation(loc); > > > positionOverlay.setNoteName(nm); > > > mapView.getOverlays().add(positionOverlay); > > > mapView.invalidate(); > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to > [email protected] > > > To unsubscribe from this group, send email to > > > [email protected]<android-developers%[email protected]> > <android-developers%2bunsubsĀ[email protected]> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en- Hide quoted > text - > > > > - Show quoted text - > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

