We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19980 ☆ A M B ☆
    • 275 Posts
    Hi
    thank you for getting back to this!
    Having updated the map area code with:

    Event Location [[*mkrLatLngTv]]

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

    The page has:

    Event Location 24.20689,85.357361 and the map but without marker again I am afraid
      modx and ecommerce pro
      • 5811
      • 1,717 Posts
      Ok, look at this post this is I think the reason of your problem. You could patch your code with the correction proposed.
      I will deliver this weekend a new release 1.0.1 with the following fixes for Revo 2.1 users:
      Gmaps 1.0.1
      ========================================================================
      - [#01] Use of an image name instead of chunk name
      - [#02] Compliance with Revo 2.1
      - [#03] Not possible to change mkrLatLngTv
        • 19980 ☆ A M B ☆
        • 275 Posts
        Thanks, I’d better not touch this php files to avoid issues and forum bombing msgs after that wink

        It’s a cool component, looking forward to new release, thank you!
          modx and ecommerce pro
          • 5811
          • 1,717 Posts

          Release 1.0.1 of Gmaps for Revo available from the repository.

          No new features for this version. Only fixes. This version is required for Revo 2.1 and upper.

          I also added a new demo named "one map one marker" to show how display a map from a document marker.

          Note: the package includes a release 1.2 of the documentation. But since the update of the package a release 1.3 is now available from the demo site.
            • 19980 ☆ A M B ☆
            • 275 Posts

            Hello


            this is very appriciated, thank you.

            Special thanks to 1 map 1 maker example ;-)

            As for my site, is’s got google maker visible now.

            When user point over the maker it shows the page’s title (good) but then loads a home page I think which is set to not found in settings I believe.

            I think that Gmap snippet cann’t find the URL with doc 98 in my case as I am having friendly URLs enabled, Babel installed, nested URLs path enabled.

            In the demo we can see index.php?id=XX example, may be that’s why infobox snippet works perfect?

            SettingUPinfoboxContentTVtext-per-event1.jpg -is how the info box text updated.

            Hope this helps if a bug found ...

              modx and ecommerce pro
              • 25132
              • 129 Posts
              Instead of making the mkrContent tv a RichText field, can I also use a chunk name as the default value? I don’t want to have to write up text for the Ajax infobox for each map listing separately as all of the required information is already available in other tvs for each property being listed on the map.

              However, it’s not working for me. The map and markers are fine, but the infobox stays blank. My various calls are as follows:

              On page displaying the map:

              [!Gmaps? &mapWidth=`840px` &mapHeight=`840px` &mkrClick=`link` &mkrOver=`info` &infoboxAjaxId=`98` &markers=`c3` !]



              On AjaxInfobox page (which is resource 98 and set to blank template and html/plain):

              [!GmapsInfobox? &mkrTextTv=`mkrContent`!]


              The mkrContent tv is Input Type: Text and Default Value: {{green-door-map-infobox}}

              The {{green-door-map-infobox}} chunk is:

              <p><strong>Property Ref:</strong> [+code+]<br />
              <strong>Property Name:</strong> [+longtitle+]<br />
              <strong>Need to book tour?</strong> [+gd-book+]<br />
              <strong>Tour Times:</strong> [+gd-tour-times+]<br />
              <strong>Max. no. of participants per tour:</strong> [+gd-tour-max+]<br />
              <strong>Viewing Times:</strong> [+gd-open-times+]<br />
              <strong>Other Info:</strong> [+gd-other-info+]<br />
              </p>



              Does anybody have any suggestions what I’m doing wrong? I am using latest version of Evo. I have found an alternative method using Google Fusion Tables to display the map witht he necessary info, but all of that required a double-entry of information which I would prefer to avoid. All help appreciated!



                • 5811
                • 1,717 Posts
                To fix this issue try to do as follow:

                Edit the file gmaps/snippet.gmapsinfobox.txt and replace the line 37:
                        $sql  = "SELECT DISTINCT tv.id AS id, value ";
                by the line:
                        $sql  = "SELECT DISTINCT tv.id AS id, IFNULL(`tvc`.`value`, `tv`.`default_text`) AS `value` ";
                I haven’t the time and the correct environment to test it myself. Let me know the results.

                EDIT: And obviously, copy/paste the content of the new file into the content of you snippet gmapsinfobox
                  • 14822
                  • 61 Posts
                  Hi, first all tnx for this great snippet, now the question smiley

                  I made a website that used gmaps for show sites from my city, but I used the address instead of coordinates, I made (based on a code from other) this snippet for geocoding the address:

                  <?php
                  $aDep = explode(",",$direccion);
                  $aCal = explode("#",$aDep[0]);
                  $aNum = explode(" ",$aCal[1]);
                  
                  $google_maps_key='google api';
                  $adr = urlencode(".".$aCal[0]." #".$aNum[0].",".$aDep[1].", Colombia");
                  $url = "http://maps.google.com/maps/geo?q=".$adr."&output=xml&key=$google_maps_key";
                  $xml = simplexml_load_file($url);
                  $status = $xml->Response->Status->code;
                  if ($status='200') { //address geocoded correct, show results
                    $counter    = 0;
                    foreach ($xml->Response->Placemark as $node) { // loop through the responses
                      if ($counter++ == 1) {break;} 
                      $address = $node->address;
                      $quality = $node->AddressDetails['Accuracy'];
                      $coordinates = $node->Point->coordinates;
                      $coordenadas = explode(",",$coordinates);
                      echo $coordenadas[1].",".$coordenadas[0];
                    }
                  } else { // address couldn't be geocoded show error message
                  echo ("The address $adr could not be geocoded
                  ");
                  }


                  work fine and I used in &mapLatLng,

                      [[Gmaps? 
                      	&language=`es` 
                      	&zoom=`16` 
                      	&mapHeight=`300px` 
                      	&mapLatLng=`[[GeoCod? &direccion=`[[*dirPropiedad]],[[*cPropiedad]]`]]` 
                      ]]



                  how can I used this same coordinates for a mark without made a tv? [ed. note: JoZ3 last edited this post 15 years ago.]
                    • 36426
                    • 197 Posts
                    Hi I'm struggling setting up Gmaps, I've created the TVs, installed Getids and used the following call:

                    [[!Gmaps?
                    &mapWidth=`100%`
                    &mapHeight=`500px`
                    &markers=`[[GetIds? &ids=`c7`]]
                    &mkrClick=`link`
                    &mkrOver=`info`
                    &mkrIconTv=`mkrImg`
                    &mkrTextTv=`mkrContent`
                    &infoboxAjaxId=`32`	]]


                    For some reason no markers are showing up and the map still shows France... Can anyone please help me fix this. Thanks.
                      Yorkshire UK based hosting provider: https://www.simulant.uk
                      • 5811
                      • 1,717 Posts
                      To still show France is not a so bad thing .... smiley

                      Simply add spaces behind each parameter declaration and replace :

                      &markers=`[[GetIds? &ids=`c7`]]
                      by
                      &markers=`[[GetIds? &ids=`c7`]]`


                      It will be better. [ed. note: coroico last edited this post 15 years, 1 month ago.]