impress-org / google-maps-builder

One Google Maps plugin to rule them all. Google Maps Builder is intuitive, sleek, powerful and easy to use. Forget the rest, use the best.
https://wordpress.org/plugins/google-maps-builder/
32 stars 9 forks source link

Clicking "Places" map icons doesn't do anything #212

Closed sstruemph closed 8 years ago

sstruemph commented 8 years ago

Steps to replicate:

(tested with free and pro)

  1. Create new map
  2. Enable Google Places: Google Places > Show Places? > select "Yes"
  3. Choose a place category to show. For testing I chose "Bakeries". Click update map
  4. Publish map
  5. Click on an icon for a "Place"
  6. Nothing happens but there are errors in the console

Errors: mapsbuilder-free-places-error

DevinWalker commented 8 years ago

@sstruemph just to make sure - are you using the latest version?

sstruemph commented 8 years ago

@DevinWalker Does this look right?

gmb

gmb

DevinWalker commented 8 years ago

It looks like you're on the latest version of pro - Just make sure that the core has the latest version too in the vendor/wordimpress/ subdirectory of the plugin

lchski commented 8 years ago

With the latest version of core, this seems to be a free and pro issue on the front-end only. I wonder if some of the new window code that I was working on got accidentally committed when it was generated. I’m digging into it.

lchski commented 8 years ago

I just put together a fix in core that I believe addresses this.

@DevinWalker, I noticed something in the code as I addressed this problem. It seems like sometimes a global gmb.info_window object is used to deal with the info window, and sometimes a function parameter is used. I switched to the former in this case, and it solved the problem—the function parameter hadn’t been defined, up the tree. Is this a byproduct of how the plugin JS used to be architected? Is the gmb.info_window global the right way to handle this, now? Just want to make sure I’m sticking with the right convention/method for the project.

DevinWalker commented 8 years ago

@lchski you're correct here https://github.com/WordImpress/maps-builder-core/pull/43/files

Since our refactor we're using the object to interact with the info window throughout the plugin