WordPress.org

Ready to get started?Download WordPress

Forums

Comprehensive Google Map Plugin
[resolved] Utilizing the google maps v3 maps api with plugin (2 posts)

  1. aware
    Member
    Posted 2 years ago #

    What I am trying to do may potentially be a feature request.

    I am trying to reference the google maps v3 api from a map that is rendered from the plugins shortcode. I looked in the DOM using firebug but didn't actually see the "map" object that I was expecting.

    The site I am building is following a responsive webdesign pattern.
    My map is set to 100% width (from the shortcode generator). When dynamically resizing my browser to test my responsive layout. The map coordinates get a little bit mucked up.

    This is a pretty easy fix in the v3 of the api

    var center = map.get_center();
    google.maps.event.trigger(map, 'resize');
    map.set_center(center);

    But it appears that the map object isn't defined

    Before I go digging into the javascript you guys are utilizing I just wanted to ask if you are using a different element other than "map" to reference the map object? Or maybe you possibly have it scoped within another object or function.

    Thanks in advance. Great plugin btw.

    http://wordpress.org/extend/plugins/comprehensive-google-map-plugin/

  2. aware
    Member
    Posted 2 years ago #

    Saw that you had the map defined within your closure. Ended up for the time being just adding in a global var for now. It'd be great to either get a reference to the map instead of me making a global. I guess throw that in the feature request bin. Again kudos on the plugin

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic