We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22295
    • 153 Posts
    Disclaimer: this is a quick solution, haven’t tested it on various browsers and setups. It is not supported by me. In case of bugs - it is release for free in the wild, feel free to fix and change.

    This widget allows backend editors to set geolocation on a map.
    The result tv will contain the Lat+Lng, which can later be used with your favorite map (whether via php backend or client js, there’s a million ready-made solution around)

    googlemap v0.11 - Features:
    - Based on Google Maps api v2
    - Support multiple maps in single document
    - Double click to set marker
    - Drag and drop support to move markers
    - Address search support (with multiple results)
    How to:
    1. Copy googlemap folder to /assets/plugins/managermanager/widgets
    2. Create one or more TVs that will hold the geolocation (with 'Input Type' as 'Text')
    3. Add rule to your mm_rules:  mm_widget_googlemap(fields, apiKey, default, roles, templates)
    (mandatory) 'fields' is the TV name(s)
    (mandatory) 'apiKey' (free) Google Maps API Key (optional when working on localhost dev server)
    (optional) 'default' is the default position of the map
    minimal (note, no api works only on localhost afaik):
    full (2 maps, api key, default location):

    Good luck
      • 22295
      • 153 Posts
      v0.11 uploaded (in original post)
      small change - added the forgotten api key setting...
      when testing on localhost, it should work without any key (just leave that field empty).
      on production server, get one free at: http://code.google.com/apis/maps/signup.html

      mm_widget_googlemap($fields, $default=’’,$googleApiKey=’’, $roles=’’, $templates=’’)
        • 29201
        • 239 Posts
        I think this is really smart. cool Thank you for the contribution and your time. I wish I had the brains huh to use this properly but I’m hoping someone might be able to help.

        The end result I’m looking for is to generate a Google Map with Streetview for multiple properties. I have the address stored as a variable and need a way to get the Longitude and Latitude for each address and automatically generate the Google map (without any input from a user).

        Would anyone be able to lend a hand and help me get over the hump?

          • 26931
          • 2,314 Posts
          hey oori,

          this is looking nice, will try it later - thanks for sharing!


          edit: holy moly, this is awesome! smiley
            • 12584
            • 208 Posts
            Any ideas how to get this working with Revolution as there is no plugins folder.

              • 22295
              • 153 Posts
              This is for Evo’s managermanager, it will not work in Revo.
              Look at this: http://modx.com/extras/package/googlemapstv

                • 36805
                • 354 Posts
                Thanks a bunch for this. In the past I used address based markers. But now I need markers on arbitrary locations so this should prove very handy! I will definitely give this a try soon!

                I see it uses maps api v2, which requires a domain specific key. V3 would ease the setup/launch to production. Not a big deal though. If I can manage to get it to work with v3 I will share.
                  • 36416
                  • 589 Posts
                  Here, this works better after GoogleMaps API v2 deprecation:

                  ManagerManager 0.3.10 or newer...