Cluster Maps Update – fixed popup formatting bug

Fixed formatting issue on the popup box. This version also uses V3 of the markercluster.js file.

Download the Demo File

Popup box formatting issue


Previous versions of the Cluster Maps demo have suffered from a formatting issue. I have known about this for a while, but haven’t had the time to fix it. I also thought it was a Javascript problem and dreaded trying to fix it. A recent email from a reader prompted me to revisit the issue. Turns out there is a simple fix in FileMaker Pro to do with line breaks. In my script previously, I substituted out all carriage returns, which was required to get the Javascript to work. Unfortunately, there seems to be a spacing issue with the white popup box — it is not dynamic to the text. When the script generates the JSON text for each map point, the problem can be fixed by adding some ‘<br/> tags.

New improved popup box


This is a screen shot of the new demo file’s export.

If you are adding it to your solution, edit this script


Look for this line in the Loop — Set Variable ‘$info’


Edit this Set Variable step.

Add some BR tags to get the carriage returns back in place

Trim(Data::Address_Street)& “, “&Trim(Data::Address_City)& ” “&Trim(Data::Address_Prov|State)& ” “&Trim(Data::Address_Zip|PostalCode)& ” “&Trim(Data::Address_Country) &”<br />”& $InfoURL&”<br /><br /><br />”;
[“¶”;” “];
[”    “;””];
[”                                       “;””];
[“\””;” “])

Remember to add the Google API Key to your solution


You will receive an error message when attempting to display the maps without your own API key. This is a Global Field, so be sure to add it before you put the file on a server or share it.

11 Responses to “Cluster Maps Update – fixed popup formatting bug”

  1. hi, when generating the html, if I have 2 points nearby shows no more than a summary, it can be corrected?

    • This seems to be one of the limitations of the markercluster.js library. Other readers have noted the issue. I am looking at alternatives to see if this can be fixed. Stay tuned.

  2. I’m having an issue displaying the maps in a web viewer on I pads. It does not seem to pass the temporary path or documents path to the ios side. Windows side works perfect.

    • Hi Wade, I believe you can only use the Documents path on iOS. I checked and the file is generating. Look in the Documents folder of your iPad, (plug it a host computer with iTunes, select your Device, go to Apps and File Sharing Apps. Click on FileMaker and review the documents in the folder. If you have run the Generate HTML File script it should show up there)

      It seems to be an issue with the path. My substitute %20 for spaces doesn’t seem to be working. I added a third Case (iOS) for not Macs or Windows.

      In the Display Map script, modify the $localPath variable to this:

      Abs(Get(SystemPlatform))=1; “file:/” & $tmpPath;
      Abs(Get(SystemPlatform))=2; “file://” & $tmpPath;

      I will update the demo file.

      • Douglas , Thanks for the quick reply. I attempted the modification above and unfortunately its still not working for me. I checked my documents folder as instructed and do not see the generated html file , I see it in windows and in Mac but not itunes , Maybe its something I did I the implementation. I don’t suppose that you know when you will have a chance to update the demo file?

        Also Get System Platform on my end returns a 1 for macs a -2 for windows and a 3 for ios but I notice that in the generate html file the coding is If [Get(SystemPlatform)=”Ipad” ; Get(Documentspath)&Settings:gFile_Name ; $Path$Filename)]

        I’m confused?


  1. Creating Google Cluster Maps from FileMaker | HomeBase Software - June 17, 2014

    […] Cluster Maps – Update – Fixed Popup Formatting Bug […]

  2. Cluster Maps and Instant Web Publishing | HomeBase Software - June 17, 2014

    […] Cluster Maps – Update – Fixed Popup Formatting Bug […]

  3. Cluster Maps Continued: Perimeter Search in FileMaker Pro 12 | HomeBase Software - June 17, 2014

    […] Cluster Maps – Update – Fixed Popup Formatting Bug […]

  4. Cluster Maps Update – Running URL Scripts in a Web Viewer | HomeBase Software - June 17, 2014

    […] Cluster Maps – Update – Fixed Popup Formatting Bug […]

  5. FileMaker Cluster Maps Formatting Bug Fixed - June 19, 2014

    […] FileMaker Cluster Maps Formatting Bug Fixed | HomeBase Software […]

%d bloggers like this: