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

The Archive Base Latest Questions

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

I need to perform some tasks with google map, 1. first I need the

  • 0

I need to perform some tasks with google map,
1. first I need the user to be able to place only one marker
2. Then retrieve the city and other details such as street address

Does anyone know about this?

  • 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-18T08:21:42+00:00Added an answer on May 18, 2026 at 8:21 am

    I wrote a minimal example to show how you could achieve what you’re looking for:

    public void onModuleLoad() {
        RootPanel.get().add(new GoogleMaps());
    }
    
    private class GoogleMaps extends Composite {
    
        private MapWidget fMap;
        private Geocoder fCoder;
        private Marker fMarker;
    
        public GoogleMaps() {
            fMap = new MapWidget(LatLng.newInstance(47.0559084, 8.3114878), 6);
            fMap.setSize("300px", "300px");
            fCoder = new Geocoder();
            MarkerOptions options = MarkerOptions.newInstance();
            options.setDraggable(true);
            fMarker = new Marker(LatLng.newInstance(47.0559084, 8.3114878), options);
            fMap.addOverlay(fMarker);
            fMarker.setVisible(false);
            addHandlers();
            initWidget(fMap);
        }
    
        private void addHandlers() {
            fMap.addMapDoubleClickHandler(new MapDoubleClickHandler() {
    
                @Override
                public void onDoubleClick(MapDoubleClickEvent event) {
                    if (event.getLatLng() != null) {
                        performReverseLookup(event.getLatLng());
                    }
                }
    
            });
    
            fMarker.addMarkerDragEndHandler(new MarkerDragEndHandler() {
    
                @Override
                public void onDragEnd(MarkerDragEndEvent event) {
                    LatLng point = event.getSender().getLatLng();
                    if (point != null) {
                        performReverseLookup(point);
                    }
                }
    
            });
        }
    
        private void performReverseLookup(final LatLng point) {
            fCoder.getLocations(point, new LocationCallback() {
    
                @Override
                public void onSuccess(JsArray<Placemark> locations) {
                    if (locations.length() > 0) {
                        LatLng point = locations.get(0).getPoint();
                        fMarker.setLatLng(point);
                        fMarker.setVisible(true);
                        fMap.getInfoWindow().open(point, new InfoWindowContent(locations.get(0).getAddress()));
                    }
                }
    
                @Override
                public void onFailure(int statusCode) {}
            });
        }
    }
    

    To your first point: Create only one instance of Marker and update its LatLng upon user interaction (done in performReverseLookup()).

    Your second question: After performing the reverse lookup you can get the Placemark object out of the locations array and retrieve details like the address.

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

Sidebar

Related Questions

I need some advice on techniques to perform page redirect in asp.net. Which one
I need to perform some tasks on object1 when some state change happens on
I need to perform some action when my application receives focus. I've tried hooking
I need to perform some operations on all folders within a file share which
I have a class that I need to perform some actions on but I
I have a lotus view that stores a number. I need to perform some
I'm currently maintaining some web server software and I need to perform a lot
I need to perform Diffs between Java strings. I would like to be able
I need to write some scripts to carry out some tasks on my server
Sometimes we need to perform small administrative tasks in SharePoint. A simple PowerShell script

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.