We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    PLEASE NOTE: The Yahoo! Maps AJAX API is just a beta release and may therefore change. But this is cool, so I had to share.

    Well, after an exhaustive five day crash course in AJAX, and a quick brush up on my JavaScript skills (ugh), I finally finished a fairly stable snippet for creating custom Yahoo Maps on a MODx site. So without further ado, here it is. If someone wants to help write a tutorial for using this thing once they figure it out, that would be wonderful (hint, hint). It should be fairly straight forward to configure the snippet, but here is example document content which you can see in action at http://www.jasoncoward.com/yahoo-maps-ajax-api.html :

    <div id="mapContainer"></div>
    
    [[YahooAjaxMap? &zoomLevel=`12` &location=`76904` &mapPortWidth=`392` &mapPortHeight=`488` &yahooAppID=`validYahooAppId` &addZoomLong=`1` &addPan=`1` &geoRssUrl=`http://xml.weather.yahoo.com/forecastrss||p::76904`]]


    This uses a GeoRSS feed from Yahoo! Weather to render a marker on the map containing the latest weather information in what is called a Smart Window. I’ll be working on an example that uses the GeoRSS data, and possibly other techniques, to build menus and detail panes that can display additional information outside the map, based on clicking the markers, or opening smart windows when clicking in the menu of markers, etc. For additional info on the Yahoo! Maps API’s and GeoRSS, visit the Yahoo! Developer page at http://developer.yahoo.net/maps/ajax/index.html

    Oh, and you’ll need to get your own Yahoo Web Services Application ID here in order to make it work, replacing the `validYahooAppId` with the one you are assigned. This also allows you to track usage.

    The snippet code is attached as a text file. Just copy and paste the contents into a snippet called YahooAjaxMap, or whatever you want to call it, create a document and save the content. That should be it.

    Let me know if you have any questions, or suggestions for the future of the snippet.
      • 696
      • 46 Posts
      Cool Snipit but its a shame that yahoo only works with the US so far...

      Untill then i will have to use googlemaps...

      Thank you for sharing however... laugh
        • 32241
        • 1,495 Posts
        Finally, grin


        My name is Jason Coward. I’m a freelance web developer, drummer, and I enjoy playing a lot of pool.
        Btw, we should hang out sometime Jason. I’m a guitaris, and I like to play pool, plus I’m a web developer as well wink Maybe we can jamming a little bit and after that lets hit to the pool table, while discussing the development of Tattoo and MODx wink Maybe we can ask Ryan to be the the lead singer, and the rest will be the choir and backing vocal grin j/k j/k grin
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
          • 18397
          • 3,250 Posts
          Very cool! Nice work Jason!
            • 14431
            • 65 Posts
            why isn’t this snippet in the downloads page? Seems like it should be treated as an equal to the google maps snippet laugh
            joe
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: JoeP at Oct 22, 2006, 09:43 AM

              why isn’t this snippet in the downloads page? Seems like it should be treated as an equal to the google maps snippet laugh
              joe

              This was written against a very early version of the Yahoo! Maps AJAX API, which is now quite outdated. I’ll see about updating it to the current version of the API and add this to the repository when I get a chance.
                • 14431
                • 65 Posts
                Cool! Thanks!
                I’d hate to see Google get busted for Monopoly like MS did grin
                Do you have any comment on comparison between the two APIs?
                joe