We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36551
    • 416 Posts
    *Bump*
      • 5811
      • 1,717 Posts
      Unfortunately, you can't have two different maps (whatever the mapId) on the same page.
      The main reason is that the last javascript function created by the last map overwrite the first one.

      To allow several maps on the same page I need to review and improve the design of this addon.
        • 36551
        • 416 Posts
        Thanks for getting back to me.

        Perhaps a note on the cheatsheet or the demo site would be helpful to save us some time until you have it working.

        Can't wait to see it updated! Thanks for the great work!
          • 36551
          • 416 Posts
          Thanks for getting back to me.

          Perhaps a note on the cheatsheet or the demo site would be helpful to save us some time until you have it working.

          Can't wait to see it updated! Thanks for the great work!
            • 38182
            • 2 Posts
            Quote from: messyp at Mar 19, 2012, 05:05 PM
            Would there be a way to get the markers from a database or a list with lat/long values? Rather than using getIds could I get values with the snippet rowboat?

            for example something like this:

            &markers=`
                [[!Rowboat?
               &table=`stores`
               &tpl=`storeslatlong`
               &limit=`100`
              &where=`{"Store:LIKE":"%latlong%"}`
              &columns=`{"State"}   
            ]]
            
            

            I need exactly the same like messyp
              • 17723
              • 221 Posts
              Hello,
              Thank You coroico for creating this great snipped. I'm very exited to us it.

              I'm struggling to get to infobox populate with data from actual resources.
              In my AjaxInfoBox I have this call:
              [[!Gmapsinfobox? &mkrTextTv=`GmapsInfo` ]] 
              
              
              The GmapsInfo TV have this code:
              <h4>[[*pagetitle]]</h4>
               <img src="[[*PanoIMG:phpthumbof=`w=225&h=90`]]" width="225" height="90" alt="[[*pagetitle]]" />
              <p>[[*infotext]]</p>
              

              When I open info box in google maps the info I get is actualy the AjaxInfoBox. So the pagetitle is AjaxInfoBox and all other info is the one set in AjaxInfoBox, not in the resource that it should link to.
              I'm using Revo 2.2.4 and gmaps 1.0.3
              [ed. note: lx last edited this post 14 years, 3 months ago.]
                Lucas from AroundCyprus.net
                • 17723
                • 221 Posts
                Apart from the problem previous problem I can't manager to use custom icons.
                Whatever I do I'll always get the default google maps red icon.
                  [[!Gmaps? 
                &markers=`[[!getResources? &tpl=`IdList` &tplLast=`IdListLast` &parents=`2` ]]`
                &infoboxAjaxId=`35`
                &apiVersion=`3.9`
                &mkrLatLngTv=`coordinates`
                &mkrIconTv=`markericon`
                &mapLatLng=`34.941111, 33.053513`
                &zoom=`9`
                &mapWidth=`980px`
                &mapHeight=`368px`
                 ]]
                
                In the [[*markericon]] I've put just [[$beachflag]] (for testing purposes) . 
                

                I've copied the beachflag.png and shadow-beachflag.png to assets/images/gmaps

                But still no success










                [ed. note: lx last edited this post 14 years, 3 months ago.]
                  Lucas from AroundCyprus.net
                  • 8898
                  • 181 Posts
                  enigmatic_user Reply #168, 14 years ago
                  Quote from: redstormj at Nov 24, 2011, 10:41 PM
                  I recently installed this and noticed my coordenates were being changed from:

                  46.538362 , 2.42775

                  to:

                  46,538362 , 2,42775

                  This of course would not render the form properly.

                  Going through the code I found this:

                          $lat = (float) $latLng[0];
                  
                          $cfg['lat'] = (($lat >= -90.) && ($lat <= 90.)) ? $lat : '46.538362';
                  
                          $lng = (float) (isset($latLng[1]) ? $latLng[1] : '2.427753');
                  
                          $cfg['lng'] = (($lng >= -180.) && ($lng <= 180.)) ? $lng : '2.427753';


                  I changed to:

                          $lat = $latLng[0];
                  
                          $cfg['lat'] = (($lat >= -90.) && ($lat <= 90.)) ? $lat : '46.538362';
                  
                          $lng = (isset($latLng[1]) ? $latLng[1] : '2.427753');
                  
                          $cfg['lng'] = (($lng >= -180.) && ($lng <= 180.)) ? $lng : '2.427753';


                  So I basically removed the (float). Then it was all working correctly.
                  I just did the same and wanted to report the problem, but it seems to be quite old...

                  Quote from: redstormj at Nov 24, 2011, 10:41 PM
                  I'm not entirely sure what the purpose of the float is.
                  It's there to make sure it's a float (decimal) number without elements not belonging to a float (like letters, symbols, spaces etc.). Normally this would e.g. make 1.234 out of the string '1.234xy'. When your locale belongs to a country where a different symbol is used instead of the decimal point, it makes e.g. '1,234' (German locale in my case) out of it, which leads to the problem you reported.

                  It would be nice if this could be corrected in Gmaps. Also, in line 396

                          $js = '<meta name="viewport" content="initial-scale=1.0, user-scalable=' . $this->config['scalable'] . '"/>
                  <script type="text/javascript" src="http://maps.google.com/maps/api/js?' . $version . 'sensor=false&language=' . $this->config['language'] .'"></script>
                  <script type="text/javascript">
                  //<![CDATA[';

                  the & should be &amp; (for validation purposes).

                  Has Gmaps gone from https://github.com/Coroico? I'd like to translate the lexicon files to German, but I don't know where to send them...

                  BTW: Some of the links in the Cheat Sheet aren't working anymore.

                  Cheers,
                  Jan
                    This message has been ROT-13 encrypted twice for higher security.
                    • 5811
                    • 1,717 Posts
                    Please send me the german lexicon files. (use my profile email). I have (slowly) started to work on a new release of Gmaps.
                    This is the reason why I haven't published a fixed release of gmaps.
                      • 8898
                      • 181 Posts
                      enigmatic_user Reply #170, 14 years ago
                      Quote from: coroico at Sep 06, 2012, 04:26 PM
                      Please send me the german lexicon files. (use my profile email).
                      Done. smiley


                      Cheers,
                      Jan
                        This message has been ROT-13 encrypted twice for higher security.