6 Replies Latest reply on Jun 12, 2012 12:51 AM by Sorbsbuster

    Creating a Map View via Web Viewer.

    jebber6685

      Title

      Creating a Map View via Web Viewer.

      Post

      I want to create a map view of the address from the current record in my database. 

      I created a Web Viewer field in a new layout, specified the "address", "city", "state" and "zip" fields in the Web Viewer Setup;  "http://local.google.com/maps?" & "q=" & /*Address=*/ Cleveland Accounts::Address & "," & /*City=*/ Cleveland Accounts::City & "," & /*State=*/ "" & "," & /*Zip Code=*/ Cleveland Accounts::Zip & "," & /*Country=*/ "&output=embed&iwloc=near"

      But nothing is generated. No map at all.  

      Can someone help me out or direct me to detailed instructions on how to do this?

       

      I have FMPro Advanced 12 v1
      OS - Windows Vista on desktop, Windows 7 on laptop

        • 1. Re: Creating a Map View via Web Viewer.
          davidanders

          This thread went into it in great detail, it may help.

          Google Map

          • 2. Re: Creating a Map View via Web Viewer.
            jebber6685

            OK. I redid the entire layout starting from scratch and it works well now. I added the "&output=embed&iwloc=near" at the end ( in country location ) to strip out all the added googlemap things and it is just a map with a red point showing the location of the company. This is just what I wanted. 

            However, I have a few more questions that I am hoping someone could answer;

            1. Is there a way to do multiple company locations shown on a single map?  I envision finding a group of companies in an area and then having all of their locations shown on a single web viewer layout map display. Is this possible? How can this be done?

            2. Where can I go to get more information on Google maps and the suffixes used to strip out or in some way enhance the map view? Is there a book or web site that has all the tips and tricks to using Google Maps?

            3. Can I set the default map magnification for my specific web viewer window? I want it to start zoomed much further out than the stanard default starting magnification. 

            4. Is there a way that I can add the company name to the address information such that when you click on teh red marker, not only is the address shown but the company name drawn from a field in the record?

            Any help here is greatly appreciated. 

            • 3. Re: Creating a Map View via Web Viewer.
              Sorbsbuster

              1.  Yes.  You can show multiple locations, and plot the route as well if you want.

              2.  Yes. Google provide quite a bit of support documnetation - a web search for google map integration tutorial will return lots of hits.

              3.  Yes, you can set the zoom level on the end, by adding (from memory) "&z=20" (for example).

              4.  Don't know, but:

              Sorry for not being more definite and specific with links, but the best way I found to explore the options (apart from the forum help, of course) was to start the map, check out the content of the URL that links to it, then change the map to be a bit different (in a controlled way) and then see how the URL changed.  Same with getting directions etc.

              • 4. Re: Creating a Map View via Web Viewer.
                jebber6685

                Thanks for your input Sorbsbuster!

                Does anyone know a location that shows, step-by-step, how to go about showing multiple company locations on a single view?

                 

                • 5. Re: Creating a Map View via Web Viewer.
                  Sorbsbuster

                  We use this to plot and route calls to clients.  We build up the $Variable from the first address on the list, then the second, and then the rest.  If you are not looking for the directions as well as the locations you may have an easier way to do it.  There may also be a way to set the variable in one step, but Google needs a start, an end, and then all the middle locations, and I prefer to build slower but clearer rather than very clever-clever but not be able to follow my own logic in a year's time.

                  We set the $Variable with the first address:

                  "http://maps.google.co.uk/maps?f=d&hl=en&saddr=" &

                  //Initial Address

                  rota_Clients::ClientAddressNumber & "+" & rota_Clients::ClientAddressLine1 & "+" & rota_Clients::ClientAddressPostCodeFull

                  & "&daddr="

                   

                  Then we add the next address to the $Variable:

                  $GoogleDirections &

                  //Destination Address

                  rota_Clients::ClientAddressNumber & "+" & rota_Clients::ClientAddressLine1 & "+" & rota_Clients::ClientAddressPostCodeFull

                   

                  Then we loop through any remaining records in the rota list and add their addresses (in a loop):

                  $GoogleDirections & "+to:" &

                  //Next Destination Address

                  rota_Clients::ClientAddressNumber & "+" & rota_Clients::ClientAddressLine1 & "+" & rota_Clients::ClientAddressPostCodeFull

                  • 6. Re: Creating a Map View via Web Viewer.
                    Sorbsbuster

                    I don't know how many points the map will show, but the Directions will run out of steam once it passes the 20-mark.  Presumably because Google ran out of letters.