We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23491 ☆ A M B ☆
    • 1,056 Posts
    Quote from: ApoXX at Jun 19, 2007, 11:35 AM

    I added a couple new parameters which might be useful to some - one parameter for hiding the list of marker links and the other for making each marker a link rather than opening up the info box.

    Awesome, Thx Brian. smiley
      Mike Reid - www.pixelchutes.com
      MODx Ambassador / Contributor
      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
      ________________________________
      Where every pixel matters.
      • 5004
      • 62 Posts
      Hi,
      I’m using this

      [!GoogleMapMarker? &apiKey=`ABQIAAAABf02XkJoLwADfxymKdAn1xQxGBmIeOe3ncPMnZuTqHoYOgMMTBSwUQhNrBuWJnRAan6T2_kDx8FpOA` &startID=`17,18,19` &defaultZoom=`8` &centerPos=`45.483244,9.261475`&openMouseOverMarker=`1`!]

      I would like to know if there is a way to filter the marker on the map with a TV, or to extract on the map only document with a specific value for example all document with a TV value Nord or Sud ecc.
      Thank you.
        • 7923
        • 4,213 Posts
        Quote from: checco at Sep 11, 2007, 10:40 AM

        I would like to know if there is a way to filter the marker on the map with a TV, or to extract on the map only document with a specific value for example all document with a TV value Nord or Sud ecc.
        Thank you.
        Sure.. if you use the code that I have posted to page 6 (at the top) of this thread, seach for this:

        @CODE:var point = new GLatLng([+description+]); var marker = createMarker(point, \'[+title:slashandstrip+]\', \'[+content:slashandstrip+]\'); map.addOverlay(marker);


        Replace that with a chunk name, then create the chunk and put the same thing in it and use PHx to do some logic to it. Make it return that content only if certain things matches, eg. some TV value.


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 5004
          • 62 Posts
          Thank you for the fast answer - I’ll try smiley
            • 5568
            • 35 Posts
            How would one find out why the Google script is not loading in the header of the page?

            I don’t think this part of my script is executing:
            	//register scripts
            	$modx->regClientScript($script);
            	$modx->regClientStartupScript("http://maps.google.com/maps?file=api&v=2&key=".$apiKey);
            


            Why? because this is what I receive when executing the snippet:
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
              "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
                <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
                <title>Google Maps JavaScript API Example</title>
              </head>
              <body onload="load()" onunload="GUnload()">
                <div id="map" style="float:left; width: 350px; height: 350px;">Loading map...</div>
                <div id="maplinks" style="margin-left: 10px; padding-right: 10px; float: left; display: block; height: 350px; overflow: auto;"></div>
              </body>
            </html>
            


            As you can see above the built-in error msgs are not showing so it must be executing the
            if($apiKey != "" && $modx->getChunk($dittoChunk) != "") {
            correctly?

            I am using modx 9.6.0 and followed your instructions and cannot find anything I have left out.  Any ideas would be greatly appreciated.
            Hoping to get this snippet working soon, so I can say good things about it, lol!
            Mark

              • 7923
              • 4,213 Posts
              Hmm.. I really don’t know why that would happen.. There has been bugs relating those functions, but they should be OK in 0.9.6.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 22303 MODX Staff
                • 10,725 Posts
                Might be related to this. Try making sure the page is not cacheable and you are calling the snippet cacheable, i.e. [[ ]] vs. [! !].
                  • 22381
                  • 2 Posts
                  Hi,

                  I use MODx 0.9.6 and the last snippet found on this thread (version 1.0d). It’s work fine, but the map is not display when i’m not login. I would like to display the map to all visitor on the web site.

                  Any suggestion ?

                  Regards,
                    • 22381
                    • 2 Posts
                    5 minutes later ... smiley
                    I have check out "cacheable" on the page...

                    Thanks,
                      • 30897
                      • 311 Posts
                      Quote from: doze at Jul 27, 2007, 04:31 PM

                      Do a TV to the template what the marker documents use, then in the marker document define a path to the icon you want for that marker (or 2 tvs if you want to define the shadow image also). Then put this to the snippet in to the line that I said in the other post:

                      // Create our "tiny" marker icon
                      var icon = new GIcon();
                      icon.image = "[*your_icon_tv*]";
                      icon.shadow = "[*your_icon_shadow_tv*]";
                      icon.iconSize = new GSize(20, 35);
                      icon.shadowSize = new GSize(29, 18);
                      icon.iconAnchor = new GPoint(10, 15);
                      icon.infoWindowAnchor = new GPoint(5, 1);
                      


                      and replace those [*your_icon_tv*] and [*your_icon_shadow_tv*] with your TV name

                      Hi,

                      I have a problem with the TV like in this example. I put these lines in my snippet code and I update with "New GMarker(point,icon)". I create TV which image url but my map is empty... the marker are here but not the image...

                      Any ideas ?

                      Thx
                        TylerD - In MODx we trust
                        [Derni