Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8805199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:48:20+00:00 2026-06-14T01:48:20+00:00

IN my android map application I am trying to replace marker on touch event.This

  • 0

IN my android map application I am trying to replace marker on touch event.This is my overlay item class and my default marker defined in main class .

public class MyItemizedOverlay extends ItemizedOverlay<OverlayItem> {

Bitmap marker = BitmapFactory.decodeResource( null, R.drawable.image_pin);//Replace with this marker

private ArrayList<OverlayItem> myOverlaysNormal ;



Context mContext;


public MyItemizedOverlay(Drawable defaultMarker) {
    super(boundCenterBottom(defaultMarker));
    myOverlaysNormal = new ArrayList<OverlayItem>();
    populate();

}

public void addOverlay(OverlayItem overlay){
    myOverlaysNormal.add(overlay);
    populate();
}

@Override
protected OverlayItem createItem(int i) {
    return myOverlaysNormal.get(i);
}
@Override
protected boolean onTap(int index) {

myOverlaysNormal.get(index).getPoint();


return true;
}

// Removes overlay item i
public void removeItem(int i){
    myOverlaysNormal.remove(i);

    populate();
}

// Returns present number of items in list
@Override
public int size() {
    return myOverlaysNormal.size();
}


public void addOverlayItem(OverlayItem overlayItem) {
    myOverlaysNormal.add(overlayItem);
    populate();
}



}

How can I replace touched marker with another marker(R.Drawable.image_pin)..
OR How can I expand the marker default marker?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T01:48:21+00:00Added an answer on June 14, 2026 at 1:48 am

    There is multi-way to do it i hope i can help in your code but u should make good search and good read.

    here some link will help u :

    First Example

    2 example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Android application and I'm trying to populate a Google Map with
I'm trying to make an Android application that will display a map of a
I am trying to make simple google map Application in android. my Apps. is
I'm trying to use Google Map in Android Application. MainActivity contains EditText, ImageButton and
I have a map application in Android and am testing this app on Android
I am developing a map application in android i have made maplocation class to
I am trying to make a custom map application for Android. I have the
I am working on an Android application that shows a map with the user's
I have this code in Android: Map<String, String> idObject1 = new LinkedHashMap<String, String>(); idObject1.put(Id,
I am trying to develop a simple map application, which will display a map

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.