Avatar of twands
Flag for United States of America asked on

Want to display an InfoWindow when clicking a Marker on a Google Map

Hello:   This is a followup to a earlier wuestion dealing with using Google Maps within Access.  I am having an issue getting an InfoWindow to Popup on my map when I click a marker.  I have what I believe to be the right code but it is giving me a syntax error when I try to map the markers.  If I rem out the code the markers plot fine.  I have attached a Database and the associated map.

Here is the code that is giving me the problem.

// Create an InfoWindow to display a Message about the Marker when clicked
  var infowindow = new google.maps.InfoWindow({
       content: 'It Works'

// Adding a click Event for the Marker
 google.maps.event.addListener(oMap.markers, 'click', function() {
//  Call the open method of the InfoWindow
     infowindow.open(omap, oMap.markers);

You can run the code by opening the New Properties and selecting New Properties from the Mapping Options drop down and then click Map my Properties.

Any help or suggestions will be greatly appreciated.


Tim Google-Mapping-.zip
Microsoft AccessWeb BrowsersScripting Languages

Avatar of undefined
Last Comment

8/22/2022 - Mon
Simon Ball

your mdb is well locked down, i cannot get into the form to fiddle and try and diagnose the problem.

Here is a unzipped version.  Let me know if you have any other issues getting in. Geocoding.html MapGeocoding.mdb
Simon Ball

have you you locked the mdb so i cannot go into design mode or open the DB window using f11.

i cannot get in to the code to step through, and test

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes

All rescrictions have been taken off of theis DB.   MapGeocoding.mdb
Simon Ball

Sorry i have been on holidays, setting up new business and working on some contracts..

I shall have a look at your new opened DB now..

Do you still need this question answered?

Yes please
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Simon Ball

OK i am in it, stepped through and see where the problem occurs... will dig around for you.
Simon Ball

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Thanks for taking a look at it.  I appreciate your time.  I was hoping it was something simple but apprarently it is not.  I may have to start over with the mapping with mapping code that does what I need and then try to add my database logic into that.  
Simon Ball

good idea.

sorry i was not much help :P
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
James Murrell

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

I don't have a problem closing this question but I don't think any point should be awarded.  No solution was ever given.  I would prefer that someone would give a viable solution but so far there has been none.