Love this mod sent in by Scott Walker at NMR Group, Inc. Scott wanted to replace the container field image for each address with a Google Street View of the same address inside ProMaps. Great idea!

Scott did this with a quick change to the calc field “gm_MapData” that’s added to your properties table in ProMaps. In that calc, replace this…

Let (
sc_propertyImage =
Case (
not IsEmpty ( GetValue (sc_dataArray ; 8) ) ;
GetValue (sc_dataArray ; 9) ;
not IsEmpty (GetValue (sc_dataArray ; 10)) ;
“noimage.png”
)
;
Case (
not IsEmpty (sc_propertyImage) ;
“<img src=\”” & “[[tempPath]]” & sc_propertyImage & “\” />”
)
) &

… with this:

“<img src=\”https://maps.googleapis.com/maps/api/streetview?size=150×150&location=” & AddressString & “&key=” & MapSettings::GoogleAPIKey & “\” />”

The calc above references “MapSettings::GoogleAPIKey” and it’s likely that your properties table doesn’t have a relationship to MapSettings. So try making a relationship there, making MapSettings::GoogleAPIKey a global field, or using your API key in that calc instead of the field containing it.

That’s it!

Once you’re no longer using the container field images you can also disable the script which exports them to the temp folder on start up =) To do so,  disable all the lines in the script “Load Thumbnails”. Big thanks to Scott and NMR Group, Inc. for sharing this!

Tagged with →  

Leave a Reply

Your email address will not be published. Required fields are marked *

Share →
DOWNLOAD
DayBack Calendar
DayBack's 30-day trial is unlocked so you can customize it and integrate it with your files.
Download DayBack and we'll send you a couple short emails with tips on how to modify it and use some of the coolest features.
Thank you! Please download: DayBack Calendar
Need More?
SeedCode tips & example files in your inbox
Need More?
SeedCode tips & example files in your inbox
Want More?
Be the first to see articles and tips like these
DOWNLOAD
TimeZync
Download TimeZync and we'll send you a couple short emails with tips syncing your FileMaker Go files.
Thank you! Please download: TimeZync
Want More?
Be the first to see articles and tips like these