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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:59:19+00:00 2026-05-28T02:59:19+00:00

I am triggering a mouse event on the map from an absolutely positioned dom

  • 0

I am triggering a mouse event on the map from an absolutely positioned dom element that is over the map (this element follows my mouse). I want the mouseup element to trigger on the map as if the mouseup had been performed on the map directly. Most importantly, I want the latLng coordinates for the position over which the mouse button was released. Here is the relevant portion of my code (regarding the element that follows the mouse).

var mouseup = google.maps.event.addListenerOnce(_map, 'mouseup', function(event) {
  placeMarker(event.latLng);
  addPinClone.remove();
  return bean.remove(window, "mousemove.window__temp__");
});

var addPinClone = $("<div class='map-add-pin'>").css({
  opacity: .4,
  position: "absolute"
}).mouseup(function(evt) {
  return google.maps.event.trigger(_map, "mouseup", evt);
}).appendTo("#map");

If I click the map directly, I get event.latLng in my mouseup event. When I trigger the event from the floating element, I do not.

I tried to omit the mouseup function on addPinClone altogether, hoping the event would bubble up to the map properly, but that didn’t work either.

How do I get the latLng from here?

  • 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-28T02:59:19+00:00Added an answer on May 28, 2026 at 2:59 am

    mouseup is not a documented event on the Map class (it is on Marker, Polygon, Rectangle and Circle, i.e. things you might drag around on the map). So I’d guess it’s impossible for you to trigger that event. Although interesting that anything happens at all for a normal click on the map.

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

Sidebar

Related Questions

We have a server application that we want to restrict non-users from triggerring it
I currently have a button triggering this: def spam(self,event): t = workingthread() t.start() Which
How would I go about developing cross-browser event triggering for mouse buttons (left, middle
i'm using a mouse event for an outer element. how to cance l the
how can I prevent triggering and showing JPopupMenu only if is Mouse Cursor over
How do I know what action is triggering a particular event? org.w3c.dom.events.EventListener refreshAnnotationsListener =
I have the problem that my code isn't triggering the action in my backing
I'm trying to achieve a fairly easy triggering mechanism for deleting multiple items from
I'm trying to figure out why a variable isn't triggering a conditional that it
Let me describe the problem in details: I want to show an absolute positioned

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.