A customer recently wanted ProMaps to default to Satellite mode, and since customers have access to the map’s html, this was a pretty easy mod to make. Step by step instructions follow, but here’s what it looks like:

(You can toggle the 3D display and switch back to an overhead display by clicking the grid icon in the lower right.)

Making satellite mode the default in your FileMaker map

1. To make this change in your copy of ProMaps, first backup your file. Really.

2. ProMaps stores its settings in a single FileMaker record on the MapSettings table. The HTML template is stored in the MapDataTemplate field. To update the MapDataTemplate, you’ll have to add the MapDataTemplate field to one of the Settings layouts. I chose the General Settings layout. Once you can get at this MapDataTemplate field, enter browse mode and select all the contents of the field, copy them, and paste all that HTML into a text editor of your choice.

3. In your text editor, search for the following line:

mapTypeId: google.maps.MapTypeId.ROADMAP,

Change that line to the following:

mapTypeId: google.maps.MapTypeId.SATELLITE,

4. Once you’ve made that change, copy the contents of your text editor and paste the entirety back into the MapDataTemplate field in your settings layout and commit the record. After making this change, you can run the “Upon Opening ProMaps” script and your map will now default to satellite view. =)

5. If the file is cloned, this record will get deleted, so we needed a way to restore the default settings automatically. To do this, you’ll find a hidden layout called “ProMaps Template”. You’ll want to update the layout in order to ensure these settings are carried over if you ever clone the file in the future.

In order to update the layout, navigate to the ProMaps Template layout in layout mode. Then replace the contents of the left-most field with your text editor contents and save the layout. Don’t add a new object to the layout: select the text in the object already there and replace the text with the new HTML you’ve edited.

With these changes, you should be all set to have ProMaps open in satellite mode by default, and any cloned files will have the settings preserved.

Enjoy!

Learn more about adding ProMaps to your file

Tagged with →  

Leave a Reply

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

Share →
DOWNLOAD
DayBack Calendar
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