Example: Integrating Google Maps into AMS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • TJS
    Indigo Rose Customer
    • Oct 2005
    • 524

    Example: Integrating Google Maps into AMS

    Here's a simple example of how to integrate google maps into AMS. There is tons of additional functionality you can add using the published API:


    In this example user instructions are substituted into the javascript in the maps.html document. It sounds like you could get return values from the site, but I haven't tried that yet.

    Some helpful links when using this example:

    1) Sign up for your own Google API Key and add it to the maps.html in the Docs folder


    2) Look up some coordinates to enter when you preview/build the app
    Attached Files
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================
  • johnraus
    Indigo Rose Customer
    • May 2004
    • 170

    #2
    Thnx, great tip, worth looking into ...

    Comment

    • V3RT1G0
      Forum Member
      • May 2006
      • 1

      #3
      wow very nice... will definately use in an app

      Comment

      • lucasecpc
        Indigo Rose Customer
        • Jul 2006
        • 9

        #4
        API Key Question

        When I go to get an API Key what URL should I enter?

        Comment

        • altyfc
          Forum Member
          • Nov 2006
          • 1

          #5
          We have recently developed a tool that works in conjunction with Google Maps and this might help those of you that want to avoid going down the API route. It's a very simple tool that allows you to quickly create custom Google Maps for free. You plot whatever information you want, and then just grab some code... and you can embed it in a web page, a forum post or in an email.

          If you'd like to check it out, the URL is http://www.aardvarkmap.net - any feedback on it would be welcomed.

          Thanks

          Aaron

          Comment

          • Zapperz
            Forum Member
            • Apr 2009
            • 3

            #6
            Google maps

            I just went to google map, put in my address, found the map area to my house, then copied that URL and then just went to that web site addrss. It worked fine but only the 1st time, I open the link, and I if i leave that page and go back it doesn't refresh and work a second time. I don't know how to use and API or java code, so googles link is nice, but it is over my head technically unless someone would be kind enough to post the code.

            I am making business cards and I want the google map to be a button on the contact page i am setting up.

            any help would be appriceated

            Comment

            • .SWFGames
              Forum Member
              • Nov 2009
              • 20

              #7
              Is it possible to search for areas using a search box, like on the real google maps?

              Comment

              • DaSoulRed
                Forum Member
                • Aug 2007
                • 407

                #8
                How to See Satelite Modo

                Well this is a nice one....

                I wonder where can change de view mode the default is "map mode"

                How can we change to "satelite mode"

                here is the code at the html file

                <head>
                <meta **********="content-type" content="text/html; charset=utf-8"/>
                <title>Google Maps JavaScript API Example</title>
                <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=YOUR_KEY_HERE"
                type="text/javascript"></script>
                <script type="text/javascript">
                //<![CDATA[
                function load() {
                if (GBrowserIsCompatible()) {
                var map = new GMap2(document.getElementById("map"));
                map.setCenter(new GLatLng(21.131038, -101.677494), 13);

                }
                }
                //]]>
                </script>
                </head>
                <body onload="load()" onunload="GUnload()">
                <div id="map" style="width: 716px; height: 408px"></div>
                </body>
                </html>

                Comment

                • holtgrewe
                  Indigo Rose Customer
                  • Jul 2002
                  • 779

                  #9
                  DaSoulRed

                  Originally posted by DaSoulRed View Post
                  Well this is a nice one....

                  I wonder where can change de view mode the default is "map mode"

                  How can we change to "satelite mode"

                  here is the code at the html file

                  <head>
                  <meta **********="content-type" content="text/html; charset=utf-8"/>
                  <title>Google Maps JavaScript API Example</title>
                  <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=YOUR_KEY_HERE"
                  type="text/javascript"></script>
                  <script type="text/javascript">
                  //<![CDATA[
                  function load() {
                  if (GBrowserIsCompatible()) {
                  var map = new GMap2(document.getElementById("map"));
                  map.setCenter(new GLatLng(21.131038, -101.677494), 13);
                  map.setMapType(G_SATELLITE_MAP);
                  }
                  }
                  //]]>
                  </script>
                  </head>
                  <body onload="load()" onunload="GUnload()">
                  <div id="map" style="width: 716px; height: 408px"></div>
                  </body>
                  </html>
                  Add the line in red to your HTML...
                  The default is the road map.
                  I prefer the Hybrid...(to each his own)


                  Common Map Types
                  The following map types are commonly used in the Google Maps API:

                  •G_NORMAL_MAP displays the default road map view
                  •G_SATELLITE_MAP displays Google Earth satellite images
                  •G_HYBRID_MAP displays a mixture of normal and satellite views
                  •G_DEFAULT_MAP_TYPES contains an array of the above three types, useful for iterative processing.
                  •G_PHYSICAL_MAP displays a physical map based on terrain information.
                  You can set the map type using the GMap2 object's setMapType() method. For example, the following code sets the map to use the satellite view from Google Earth:

                  var map = new GMap2(document.getElementById("map_canvas"));
                  map.setMapType(G_SATELLITE_MAP);
                  hth

                  Comment

                  • DaSoulRed
                    Forum Member
                    • Aug 2007
                    • 407

                    #10
                    Boom Shaka Laka Paka Naka Draka Thnaks

                    Good Shoot There...

                    Thanks, im Using rigth Now...

                    Nice, thanks.

                    Remember Enjoy Life Any How...

                    Until next time Bytes

                    Comment

                    • O'Callaghan
                      Indigo Rose Customer
                      • Sep 2010
                      • 630

                      #11
                      In this example user instructions are substituted into the javascript in the maps.html document. It sounds like you could get return values from the site, but I haven't tried that yet.
                      Hi TJS,

                      After some years out, now back in town.

                      Got my own API key (not included in the map.html file in the docs folder and loaded on page show event) and being playing around a bit with your Maps.apz, please find it with the for i,j in pairs...code replaced, not a big job indeed.

                      That being said, my goal, which I believe it might be possible, is geocode a list of addresses automatically from a grid object, I've tried to do it with Google Fusion Tables and after I achieved it, I realized that the output export files no matter if CSV or KLM, do not export the coordinates.

                      That's why now I would like to try to do it with AMS.

                      Can you (or anyone else) be kind enough to give me some highlights or bullet points on how the workflow should be like? Sending and retrieving data from a web site is not one of my best skills.

                      Great thanks in advance.
                      Attached Files

                      Comment

                      Working...
                      X