We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4673
    • 577 Posts
    HI!

    I really like this but ... I can’t get markers to show ... IS there a way to test from this call
    [[!Gmaps?
      &zoom=`17`
      &zoomControl=`true`
      &mapTypeControl=`true`
      &mapLatLng=`42.881825, 141.583450`
      &mapWidth=`100%` 
      &mapHeight=`600px` 
      &markers=`[[GetIds? &ids=`c25`]]`
      &mkrClick=`link` 
      &mkrOver=`info` 
      &mkrIconTv=`mkrImg`
      &mkrTextTv=`mkrContent` 
      &infoboxAjaxId=`24` 
    ]]
    


    straight to see if it is a setting error or something?

    Change numbers for the chunk and ajaxinfobox.

    Also, pdf is good for reading but very a little troublesome because you just can’t copy and paste to the admin.

    I also tried this on a different template than modxhost but ... the magnifying bar disappears ... must be css problem.
      Tangent-Warrior smiley
      • 5811
      • 1,717 Posts

      Also, pdf is good for reading but very a little troublesome because you just can’t copy and paste to the admin.
      Yes, but sometimes, copy is not enought to install a component wink

      &mapTypeControl=`true`, &mapTypeControl=`true` ; these parameters are not parameters of Gmaps.

      &mkrIconTv=`mkrImg`
      &mkrTextTv=`mkrContent`

      Have you defined these TVs ?

      Do you run Gmaps with Evo or Revo (even if the features are the same, it could be interested to know it).
        • 4673
        • 577 Posts
        Have you defined these TVs ?
        Do you mean in the template variable tab for the document?
        Yes

        rolleyes read your pdf about 4 times. I’m sure I missed something ....

        I’m using 2.0.8 revo.
          Tangent-Warrior smiley
          • 4673
          • 577 Posts
          HI,

          I noticed that the image marker and places are not being set.
          function setMarkers(map){
              var places = new Array();
              places = [
              ];
              var imgMkrs = new Array();
          
          }
          



          Everything else works .... huh
            Tangent-Warrior smiley
            • 32083
            • 5 Posts
            Hi Coroico,

            Great work with the Gmaps package. I’m lovin’ it! But I’m having trouble getting two maps on one page.
            I have two snippets in a Template calling the gMaps chunk together with some html-code. The only difference in the snippets are the map identifier and the zoom variables. The HTML containers in the snippets are on the page, but only the first one shows a map.

            These are the snippets:

            Big map:
            [[!Gmaps?
                        &mapid=`big`
                        &mapWidth=`552px`
                        &mapHeight=`330px`
                        &zoom=`11`
                        &markers=`19`
                        &mkrIconTv=`mkrImg`
                        &mkrLatLngTv=`mkrLatLng`
                    ]]

            And the small map:
            [[!Gmaps?
                        &mapid=`small`
                        &mapWidth=`552px`
                        &mapHeight=`330px`
                        &zoom=`15`
                        &markers=`19`
                        &mkrIconTv=`mkrImg`
                        &mkrLatLngTv=`mkrLatLng`
                    ]]


            As you mentioned it is possible to have multiple maps on a page, I assume I’m doing something wrong.

            Kind regards,
            Webbiker.
              • 4673
              • 577 Posts
              There is conflict with CSS that google maps uses.
              max-width: 100%;

              Here is a fix to use with this addon laugh

              /* Google map fix */
              #Gmaps img { max-width: none; }
              


                Tangent-Warrior smiley
                • 4673
                • 577 Posts
                I’m still working on this bit of code that causes this addon to go funky ...

                	<meta name="description" content="[[*introtext:empty=`[[*content:strip_tags:strip]]`:limit=`200`]]">
                	<meta name="author" content="[[If? &subject=`[[*publishedby]]` &operator=`>` &operand=`0` &then=`[[*publishedby:userinfo=`fullname`]]` &else=`[[*createdby:userinfo=`fullname`]]`]]" />
                


                Will turn into ...

                <meta name="description" content="Map
                <div id="Gmaps" style="width:99%; height:400px"></div>
                <noscript>
                <b>JavaScript must be enabled in order for you to use Google Maps.</b>
                However, it seems JavaScript is either disabled or not supported by your browser.
                To view Google Maps, enable JavaScript by changing your browser options, and then
                try again.
                </noscript>">
                <meta name="author" content="" />
                  Tangent-Warrior smiley
                  • 4673
                  • 577 Posts
                  This got my marker and pop up bubble working ... not sure what it was ...
                  [[!Gmaps?
                    &mapWidth=`100%` 
                    &mapHeight=`400px` 
                    &mkrClick=`none` 
                    &mkrOver=`info` 
                    &zoom=`15`
                    &markers=`24`
                    &mkrIconTv=`mkrImg`
                    &mkrLatLngTv=`mkrLatLng`
                    &infoboxAjaxId=`24` 
                  ]]
                  

                    Tangent-Warrior smiley
                    • 4673
                    • 577 Posts
                    Just wondering ... how do you add more markers on the same map?
                      Tangent-Warrior smiley
                      • 5811
                      • 1,717 Posts
                      @Webbiker : With the Evo release you can add several maps on a page. With Revo an issue exists.
                      To fix it, edit the core/components/gmaps/model/gmaps/gmaps.class.inc file and line #68 replace:
                              $mapId = str_replace(' ', '', $this->modx->getOption('mapId',$scriptProperties,'Gmaps'));

                      by
                              $mapId = str_replace(' ', '', $this->modx->getOption('mapId',$cfg,'Gmaps'));


                      As example see this demo.

                      You are lucky, because your example works.
                      But if you have not the same markers on the maps. It can’t run. I work on a new release to take into account this point.