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 8948669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:03:14+00:00 2026-06-15T13:03:14+00:00

The default Google maps marker is a red pin. Is it possible to replace

  • 0

The default Google maps marker is a red pin. Is it possible to replace the default marker image with a custom image through an intent?

Edit:
This is when sending a geouri intent to launch an external map app. Not when doing it within the app with a MapActivity subclass.

  • 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-15T13:03:15+00:00Added an answer on June 15, 2026 at 1:03 pm

    You can send an Integer with the image position in the array:

    Intent i = new Intent (yourClass.this, MapActivity.class)
    i.putExtra("pinPosition",2);
    startActivity(i);
    

    And in your map activity:

     public class MyMapActivity extends MapActivity {
        private int drawables[] = { R.drawable.pin1, R.drawable.pin2, R.drawable.tutorial_pin3 };
        int position;
    
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                if (getIntent().getSerializableExtra("pinPosition")!=null) {
            position = getIntent().getSerializableExtra("pinPosition");
                }
    
                setContentView(R.layout.publish_map_activity);
                map = (MapView) findViewById(R.id.mapview);
                ImageView pin = (ImageView) findViewById(R.id.drag);
                pin.setImageResource(drawables[position]);
        ....
    
        }
    
        }
    

    If you use a similar google code, your xml should be:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/mapLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    
        <com.google.android.maps.MapView
            android:id="@+id/mapview"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:apiKey="@string/googlemaps_key"
            android:clickable="true" />
    
        <ImageView
            android:id="@+id/drag"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:contentDescription="@string/contentDescription"
            android:src="@drawable/mapitempng"
            android:visibility="gone" />
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how do i change the default blue animated marker for MyLocationOverlay in google maps?
I have successfully added a custom image for the marker on the google map.
Im just wondering how to set a default zoom on my google maps application
Instead of Google Maps API's default info window, I'm going to use other jQuery
With the Google Maps JS API v3, I want to drop a marker where
This is example I'm trying to modify: http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-google-maps-geocoding.html I want to add single marker.
I tried to 'imitate' the code from this map: https://google-developers.appspot.com/maps/documentation/javascript/examples/geocoding-simple only changing Syney to
The following example shows a simple Marker (standard icon) on Google maps for the
I'm switching icon types of google maps markers between a default one and another
I stopped at this issue 4h, if ignores my bool when Google maps event

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.