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

  • SEARCH
  • Home
  • 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 3484732
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:49:21+00:00 2026-05-18T10:49:21+00:00

I have a Google map with these kind of items on it: drawable3 =

  • 0

I have a Google map with these kind of items on it:

drawable3 = this.getResources().getDrawable(R.drawable.trazeicon);

but automatically, Android draws a shadow of the image trazeicon on the map, and I don’t want to have that shadow.

How can I remove it?

EDIT:

I got the error: Syntax error, insert "}" to complete ClassBody

Here is the full code:

package com.GPSLoc;

import java.util.ArrayList;

import android.app.AlertDialog;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapView;
import com.google.android.maps.OverlayItem;

public class MyItemizedOverlay extends ItemizedOverlay {

    
    private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>();
    private Context mContext;
    
    public MyItemizedOverlay(Drawable defaultMarker) {
        super(boundCenterBottom(defaultMarker));
    }

    protected OverlayItem createItem(int i) {
      return mOverlays.get(i);
    }

    public int size() {
      return mOverlays.size();
    }
    
    public void addOverlay(OverlayItem overlay) {
        mOverlays.add(overlay);
        populate();
    }
    
    public MyItemizedOverlay(Drawable defaultMarker, Context context) {
          //super(defaultMarker);
          super(boundCenterBottom(defaultMarker));
          mContext = context;
    }
    public void clear()
    {
        mOverlays.clear();
    }
    
    protected boolean onTap(int index) {
      OverlayItem item = mOverlays.get(index);
      AlertDialog.Builder dialog = new AlertDialog.Builder(mContext);
      dialog.setTitle(item.getTitle());
      dialog.setMessage(item.getSnippet());
      dialog.show();
      return true;
    }
    
    public void draw(Canvas canvas, MapView mapView, boolean shadow)
    {
        if(!shadow)
        {
            super.draw(canvas, mapView, false);
        }
    }
}
  • 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-05-18T10:49:22+00:00Added an answer on May 18, 2026 at 10:49 am

    You need to override the draw() method when you extend ItemizedOverlay. Like this:

    public class MyItemizedOverlay extends ItemizedOverlay {
        @Override
        public void draw(Canvas canvas, MapView mapView, boolean shadow) {
            if(!shadow) {
                super.draw(canvas, mapView, false);
            }
        }
        ....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Outline OK, I have Google'd this and already expecting a big fat NO!! But
I have a Google Map that suddenly stopped working for no apparent reason (I
I have searched but apparently my google foo is weak. What I need is
I have a Google map that is showing a number of markers. When the
I'm coding a map app for iPhone , like Google Maps but with my
I have a Google Map, and I am adding event listeners to different things.
Hi I have to set two address at a time in google map. User
I have a page which shows a Google map. I'd like to use Javascript
I have a google map displaying a polyline. I can detect mouseover events for
I have a map with a couple of markers on it. These markers are

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.