FileMaker Maps – Swap Container Fields for Google Street View

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!

 [ba-button link=”https://www.seedcode.com/promaps/” color=”Yellow” target=”blank”]Learn more about the ProMaps FileMaker Add-On[/ba-button]

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode

1 Comment

  • Corey

    Note: The ‘Street View Static API’ must be enabled for your API key in order for this to work

Leave a Reply

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

Check out some of our other posts ...

Comments in FileMaker Calendar

Highlight Notes and Comments in Your Calendar

Inline Notes in DayBack Calendar The latest DayBack extension adds an icon to your events when there is a comment present that matches your criteria. You can

Closed Through the New Year

SeedCode is closed for our holiday break from December 19th through the end of the year. We’ll have folks available in case of emergencies and

COMPANY

FOLLOW ALONG

Stay up to date with the latest news & examples from SeedCode

© 2023 SeedCode, Inc.