We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9375
    • 5 Posts
    Thank you for your so fast answer.

    But I’ve already applied this correction and erased the cache files into /assets/cache/ during my tests.
    I’ve just done this a second time but nothing happens.

    I have deleted and re-created the "mkrLatLng" TV, just to test.

    No more ideas in my mind...




      • 5811
      • 1,717 Posts
      [!Gmaps?&language=`fr` &zoom=`14` &mapType=`ROADMAP` &mapWidth=`100%` &mapHeight=`450px` &scalable=`1` &mapLatLng=`[*mkrLatLng*]` &mkrLatLngTv=`mkrLatLng` &mkrClick=`none` &mkrIconTv=``!]

      Where is your marker id ?
      you need to have &markers=`yourDocId`. The map is centered on the barycenter of the group of markers. You need to have at least one marker.

      The correct snippet call should be:
      [!Gmaps?&language=`fr` &zoom=`14` &mapWidth=`100%` &mapHeight=`450px` &mapLatLng=`[*mkrLatLng*]` &mkrLatLngTv=`mkrLatLng` &mkrClick=`none` &markers=`yourDocId`!]


      mapType = ROADMAP by default
      mkrIconTv = ’’ by default
      scalable = ’yes’ or ’no’ = ’no’ by default
        • 9375
        • 5 Posts
        You’re great!

        It was the "markers" parameter.
        I hadn’t understood the importance of this: &markers=`yourDocId`.
        In my website: &markers=`[*id*]`

        In the documentation, you should specify that the default value for &markers doesn’t display any icon.
        I thought that the default value was for the default Google icon. laugh

        Thank you so much for your work and your efficient help.

        Have a nice evening.

          • 7455
          • 2,204 Posts
          I moved a site to a new server and now gmaps stopt working, there is no errors in the logs and all the js is made but this part stay’s empty:
          function setMarkers(map){
              var places = new Array();
              places = [
              ];
              var imgMkrs = new Array();
          
          }
          


          Where on the old location this is filled.

          All path looks ok, namespace hase good url.

          is there a specific php-function you use that could be missing on this server?

          so the complete map is renderd but the pointers are missing.

          http://www.unitedcarshops.nl/vestigingen/spreidingskaart.html

          this is my call (that works on the old server)
          [[Gmaps? &language=`nl` &mapLatLng=`52.143918,5.587063` &zoom=`7` &mapWidth=`500px` &mapHeight=`700px` &markers=`[[GetIds? &ids=`c30`]]` &mkrOver=`info` &infoboxAjaxId=`40` &mkrClick=`none`]]

          thanks.


          this is de debug info:
          2011-07-22 15:51:49] (INFO @ /index.php)
          
          Config before checking: Array
          (
              [corePath] => /home/ucs/domains/unitedcarshops.nl/public_html/core/components/gmaps/
              [chunksPath] => /home/ucs/domains/unitedcarshops.nl/public_html/core/components/gmaps/elements/chunks/
              [mapId] => Gmaps
              [language] => nl
              [mapLatLng] => 52.143918,5.587063
              [zoom] => 7
              [mapType] => ROADMAP
              [mapWidth] => 500px
              [mapHeight] => 700px
              [scalable] => no
              [markers] => 73,36,74,38,37,39,67,71,76,79
              [kml] => 
              [mkrLatLngTv] => mkrLatLng
              [mkrClick] => none
              [mkrOver] => info
              [mkrIconTv] => 
              [iconDir] => assets/components/gmaps/images/
              [infoboxAjaxId_desc] => 0
              [debug] => 1
              [infoboxAjaxId] => 40
          )
          
          [2011-07-22 15:51:49] (INFO @ /index.php)
          
          Config after checking: Array
          (
              [corePath] => /home/ucs/domains/unitedcarshops.nl/public_html/core/components/gmaps/
              [chunksPath] => /home/ucs/domains/unitedcarshops.nl/public_html/core/components/gmaps/elements/chunks/
              [mapId] => Gmaps
              [language] => nl
              [mapLatLng] => 52.143918,5.587063
              [zoom] => 7
              [mapType] => ROADMAP
              [mapWidth] => 500px
              [mapHeight] => 700px
              [scalable] => no
              [markers] => 73,36,74,38,37,39,67,71,76,79
              [kml] => 
              [mkrLatLngTv] => mkrLatLng
              [mkrClick] => none
              [mkrOver] => info
              [mkrIconTv] => 
              [iconDir] => assets/components/gmaps/images/
              [infoboxAjaxId_desc] => 0
              [debug] => 1
              [infoboxAjaxId] => 40
              [lat] => 52.143918
              [lng] => 5.587063
          )
          
          [2011-07-22 15:51:49] (INFO @ /index.php)
          
          SELECT `id, pagetitle` FROM `modx_site_content` AS `modResource` WHERE (id IN (73,36,74,38,37,39,67,71,76,79)) 
          
          [2011-07-22 15:51:49] (ERROR @ /index.php)
          
          Error 42S22 executing statement: 
          Array
          (
              [0] => 42S22
              [1] => 1054
              [2] => Unknown column 'id, pagetitle' in 'field list'
          )
          

            follow me on twitter: @dimmy01
            • 7455
            • 2,204 Posts
            OK We got the fix for this bug, (thanks to b03tz)

            this part starting at line 210 in

              $c = $this->modx->newQuery('modResource');
                        $c->select(array("id, pagetitle"));
                        $c->where(array("(id IN (" . $lstMkrsid . "))"));
            


            should be:

              $c = $this->modx->newQuery('modResource');
                        $c->select(array("id", "pagetitle"));
                        $c->where(array("(id IN (" . $lstMkrsid . "))"));
            


            that solved the problem for me.

            Dimmy
              follow me on twitter: @dimmy01
              • 5811
              • 1,717 Posts
                • 19980 ☆ A M B ☆
                • 275 Posts
                Hello

                this is probably on of the yet anther issue, sorry to trouble ;-)

                Here is the thing:

                [[!Gmaps?
                &mapWidth=`100%`
                &mapHeight=`400px`
                &mapLatLng=`[[*mkrLatLngTv]]`
                &mkrLatLngTv=`23,83`
                &markers=`[[*id]]`
                &mkrClick=`link`
                &mkrOver=`info`
                &mkrTextTv=`mkrText`
                &infoboxAjaxId=`98`
                ]]

                where [[*mkrLatLngTv]] is set to 24.20689,85.357361

                Question: is it necessarily to set &mkrLatLngTv or set it lower then &mapLatLng?


                The problem is that I do not see the standart / default google marker on the map nevetherless the map is ok.

                Can you help, please?
                  modx and ecommerce pro
                  • 5811
                  • 1,717 Posts
                  [[!Gmaps?
                  &mapWidth=`100%`
                  &mapHeight=`400px`
                  &mapLatLng=`[[*latLng]]`
                  &mkrLatLngTv=`latLng`
                  &markers=`[[*id]]`
                  &mkrClick=`link`
                  &mkrOver=`info`
                  &mkrTextTv=`mkrText`
                  &infoboxAjaxId=`98`
                  ]]

                  where ’latLng’ (or any other name) is the name of your document tv filled with 23,83
                    • 19980 ☆ A M B ☆
                    • 275 Posts
                    Thanks, fixed.
                    However, this
                    [[!Gmaps?
                    &mapWidth=`100%`
                    &mapHeight=`400px`
                    &mapLatLng=`[[*mkrLatLngTv]]`
                    &mkrLatLngTv=`mkrLatLngTv`
                    &markers=`[[*id]]`
                    &mkrClick=`link`
                    &mkrOver=`info`
                    &mkrTextTv=`mkrText`
                    &infoboxAjaxId=`98`
                    ]]

                    Still does not output a Google Marker.

                    In the doc 98 resource has: [[!GmapsInfobox? &mkrTextTv=`mkrText`]]

                    which uses the same TV name mkrText as in the Gmap snippet.

                    If everything is coorect, then probably I am wrong with &markers=`[[*id]]` ?

                    Give some feedback plz once you have a min, thanks a lot.
                      modx and ecommerce pro
                      • 5811
                      • 1,717 Posts
                      &mkrTextTv=`mkrText` in the Gmaps snippet call is useless. The content of the info popup windwo is provided by your document 98 through ajax.

                      The current documentation is probably not the best. I have released a new version of the cheasheet document (1.2) see here.
                      Still does not output a Google Marker.
                      If you use &markers=[[*id]], this means that you would like a map with only this marker. So the tv mkrLatLngTV of this document should have the value filled with 23,83