Title: Multiple Pins in Web Viewer
Post:
I have a solution that uses the web viewer to display the location of properties. I've been using it one at a time. Now they want to see all properties that are managed and assigned to a particular office. There are several offices.
The Web Viewer setup page ( I am using Google) allows me to insert fields and that works fine for "one at a time" viewing. It also gives me the option to insert a calculated field for each parameter. Tech Support suggests the following syntax:
"http://local.google.com/maps?" & "q=" & /*Address=*/ Untitled::Address & "," & /*City=*/ Untitled::City & "," & /*State=*/ Untitled::State & "," & Untitled::Address 1 & "," & Untitled::City_1 & "," & Untitled::State_1
This produces a starting point and and a pin (a green arrow and a red pin). Map Quest is also supported on the setup page with the same parameters.
Since these properties will change without notice, both in number and in location, I would like to use something that will calculate automatically as the file changes. I guess I could build it with a script but it sounds very slow.
Any suggestions?
RESPONSE
Sorry if this doesn't scan correctly. We have other steps before and after these steps that check, for example, if GoogleMaps can handle the total number of destinations, or whether it needs to be split into two sections. (If it needs 3 sections we reckon they'll get lost after 56 different destinations...) So I had to try and extract just the part that builds the journey. (For PostCode read ZipCode if you are in the US.)
#
#Now build the first batch destination list
#
Sort Records [ Specified Sort Order: [Call the field you want to sort the destination sequence by]; ascending ] [ Restore; No dialog ]
#
#Build the first two addresses
Go to Record/Request/Page [ First ]
Set Variable [ $GoogleDirections; Value:"http://maps.google.co.uk/maps?f=d&hl=en&saddr=" & //Initial AddressClientAddressNumber & "+" & ClientAddressLine1 & "+" & ClientAddressPostCodeFull & "&daddr=" ]
Go to Record/Request/Page [ Next ]
Set Variable [ $GoogleDirections; Value:$GoogleDirections & //Destination Address ClientAddressNumber & "+" & ClientAddressLine1 & "+" & ClientAddressPostCodeFull ]
#
#If more than two records, build rest of list by a loop
If [ Get ( FoundCount ) > 2 ]
Loop
Go to Record/Request/Page [ Next; Exit after last ]
Set Variable [ $GoogleDirections; Value:$GoogleDirections & "+to:" & //Next Destination Address ClientAddressNumber & "+" & ClientAddressLine1 & "+" & ClientAddressPostCodeFull ]
End Loop
End If
#
#
#Trap the first destination list
Set Field [ ROTA::gGoogleDirections; $GoogleDirections ]
#
#
Your new post is loading...