We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9419
    • 15 Posts
    fanan_camane Reply #1, 18 years ago
    Hello!
    I need your help to set the google map functionality. I followed all the instructions and honestly I don’t know I can’t put this working.
    I’ve downloaded and installed the google map of http://modxcms.com/GoogleMap-658.html
    Then I created the snippet and I’m using this call:
    [!GoogleMap? &key=`ABQIAAAALfc6POhSDFWs44KZR4ElzRS33jlEExAbzfYNOEMouCQbHL7qZhSKrHFAvlSKLDvR8o3-XbpsVjTsQg` &title=`My Office` &address=`101 My Road` &width=`300` &height=`300`!]

    I don’t get nothing as output:...what might be wrong?!

    Thks,
    Fanan
      • 12808
      • 70 Posts
      Hi Fanan,
      take a look at bottom map on my website: http://www.spotkg.com/index.php?q=95.html

      Here is solution:
      On landing page put call to google snippet (I have used GoogleMapMarker):

      [[GoogleMapMarker? &apiKey=`your_API_key` &startID=`ID_of_the_container_document_where_you_will_put_cities_with_coordinates` &mapType=`hybrid` &centerPos=`43.755225,21.417847` &defaultZoom=`2` &tpl=`map`]]

      In my case, &startID is 96 ( as you can see in URL, 95 is ID of the document where the snippet is).

      Document ID 96 is parent for child documents with all cities I need, like:
      96 -
      - Kragujevac (97)
      - Belgrade (98)
      - Zagreb (99)
      - Inglostadt (100)
      ...
      ...

      then, create chunk ’map’ for &tpl like mine:
      <div id="map" style="float:left; width: 550px; height: 350px; clear: both;’">Loading map...</div>
      <div id="maplinks" style=" width: 550px; float:left; margin-left: 10px; padding-right: 10px; display: block; height: 350px; overflow: auto;"></div>

      This is a placeholders for map and for pinpoints.

      Then, create child documents for every pinpoint you want. Example:

      Under document ID 95 in my case, I have about 10 documents (kragujevac, belgrade, zagreb, inglostadt,...)
      Every document has it’s own:

      Title: Name of the city
      Long title: Name of the city
      Description: coordinates of the city, like 44.021972,20.908619
      Document content: what will be on the screen when you hover mouse over the city on the map.

      Hope this helps..
      Be free to ask additional questions...

      With regards,
      Ivan Mandic
      Serbia
        --
        www.spotkg.com
        • 9419
        • 15 Posts
        fanan_camane Reply #3, 18 years ago
        Hi imandic!
        Thank you very much for your help!
        Actually I’m not still able to put a marker on my map...don’t know why because I’m following all the indications...but the rest it’s done!
        I have Ditto installed and I created all the documents as described ... :-s

        Thks again,
        Fanan
          • 12808
          • 70 Posts
          Do you have PHx support installed?

          * 1. Create a snippet "phx:slashandstrip" with this content:
          * return addcslashes(preg_replace("~([\n\r\t\s]+)~"," ",$output), "’");
            --
            www.spotkg.com
            • 29774
            • 386 Posts
            therebechips Reply #5, 18 years ago
            @fanan_camane

            Hi, I’m the author of GoogleMap, the original snippet you were trying to use. GoogleMap changed between version 1.2 and version 1.3 to use a differEnt syntax in the parameters - to allow for multiple maps per page. Make sure you download the latest version. Then your call would now look something like this:

            [!GoogleMap? &key=`ABQ...` &maps=`mapid : map | address1 : 21 My Street | city : My City | state : My State | zip : ABC123 | title : My Office | width : 300  | height : 300`!]
            

              Snippets: GoogleMap | FileDetails | Related Plugin: SSL
              • 9419
              • 15 Posts
              fanan_camane Reply #6, 18 years ago
              Hi imandic, hi therebechips!!
              Thank you very much for your replies.
              For imandic: since I unpublish the document of the city I got the marker in the map. Then it was a question of defining the content of the marker.
              Thks for your tip.

              For therebechips: I wasn’t aware of that changes. I searched a lot for info about the usage but it was very scarce (maybe my bad search).
              I couldn’t find it in the wiki of modx. Nevertheless thks for the input. I’m sure that it will be useful in a near future.

              Thks,
              Fanan