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 ...

Suggesting Appointment Slots

Show Available Slots that Match Multiple Criteria Schedulers often look for gaps in their schedules to find the open resources for each opportunity. But sometimes,

Introducing Draft Settings Mode

Following up on this idea that people stretch themselves when they feel a little safer, we’ve been very focused on the customization experience for DayBack

New Longer Timescales for DayBack

Resource Scheduling Swimlanes You can now extend the pivoted scheduling view in DayBack to show items by week instead of solely by day. This lets

FileMaker Summer Camp – Recap

Unconference Sessions If you missed Pause in October, here’s a look at the sessions that attendees hosted. All the sessions are listed in this post

COMPANY

FOLLOW ALONG

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

© 2024 SeedCode, Inc.