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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:16:54+00:00 2026-06-08T11:16:54+00:00

I’m using the GWT google maps V3 API and I need to display custom

  • 0

I’m using the GWT google maps V3 API and I need to display custom shapes over the map.
For simple elements I used Polygon, Circle and InfoWidnow classes, but I want to display some other widgets like button or custom panels.
Is there any way to do that using OverlayView class ? I tried a simple solution: an AbsolutePanel that contains the MapWidget and my custom widgets, placed on top, but I would like to use the gwt google maps classes as much as I can. I’ve read the documentation and also searched for an answer but I could’t figure it out so a code example would be great.
Thanx!

  • 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-08T11:16:56+00:00Added an answer on June 8, 2026 at 11:16 am

    I found what i needed here (the javascript v3 api):
    https://developers.google.com/maps/documentation/javascript/overlays#CustomOverlays

    the method names and classes are very similar so it isn’t so difficult to figure out how the GWT classes should be used (like OverlayView).

    Here is an example with custom widgets (containing SVG elements and animation) rendered on the map:

    private class TargettingOverlay extends OverlayView {
    
        protected Element div ;
        protected PanelWrapper panelWrapper;
        private TargettingEffect targetEffect;
    
        TargettingOverlay(){
            targetEffect = new TargettingEffect();
            targetEffect.setLinedDimension(10500);
            targetEffect.setLinesOffset(-5000);
        }
    
        void positionTarget(LatLng loc, boolean withoutLines){
            if (targetEffect == null )
                return;
    
            if (loc == null) {
                targetEffect.setElementsVisible(false);
                return;
            }
            targetEffect.setElementsVisible(true);
    
    
            Point p = null;
            Point sw = null;
            Point ne = null;
            LatLng locSW = (LatLng)this.getMap().getBounds().getSouthWest();
            LatLng locNE = (LatLng)this.getMap().getBounds().getNorthEast();
    
            //
            p = (Point)getProjection().fromLatLngToDivPixel(loc);
            sw = (Point)getProjection().fromLatLngToDivPixel(locSW);
            ne = (Point)getProjection().fromLatLngToDivPixel(locNE);
    
    
    
            targetEffect.setWithoutLinles(withoutLines);
            targetEffect.target((int)ne.getY(), (int)p.getY(), (int)sw.getX(), (int)p.getX());
        }
    
        @Override
        public void draw() {
            Point ne = (Point)getProjection().fromLatLngToDivPixel((LatLng)
                    this.getMap().getBounds().getNorthEast());
            Point sw = (Point)getProjection().fromLatLngToDivPixel((LatLng)
                    this.getMap().getBounds().getSouthWest());
    
    
            div.getStyle().setTop(ne.getY(), Unit.PX);
            div.getStyle().setLeft(sw.getX(), Unit.PX); 
        }
    
        @Override
        public void onAdd() {
            div = DOM.createDiv();
    
            getPanes().getOverlayLayer().appendChild(div);
    
            panelWrapper = new PanelWrapper(div);
            panelWrapper.attach();          
    
            targetEffect.setContainer(panelWrapper);
        }
    
        @Override
        public void onRemove() {
            div.removeFromParent();
            panelWrapper.removeFromParent();
    
            div = null;
            panelWrapper = null;
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
In my XML file chapters tag has more chapter tag.i need to display chapters
I have thousands of HTML files to process using Groovy/Java and I need to
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I am reading a book about Javascript and jQuery and using one of the

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.