3 Replies Latest reply on Nov 9, 2015 6:33 AM by ryanmead83

    Anyone familiar with FMEasyMaps?


      FMEasyMaps | An Open Source Map Solution for the FileMaker Platform


      I'm trying to use this to implement google maps in my FileMaker database.  Just wondering if anyone else uses this or is familiar with it as I'm having some issues.  In the demo file for this, you can either plot all found records on a map, or plot all records, so multiple points.  It seems like if you just want it to plot the found set, that it uses a script parameter like this:


      "ShowMap¶( \"CONTACT ID MATCHING FIELD\" IN ( " & Substitute ( Contacts::Found_Set_IDs; ¶; ", " ) & " ) )"


      The ShowMap is a section in the script, and then in the demo, the Contacts::Found_Set_IDs is a List summary field numeric of "CONTACT ID MATCHING FIELD" which is the primary key.


      The problem I'm having is that when I use that exact same parameter but change the field name to "ID_Account" and Accounts::Found_Set_IDs, the SQL always fails because for whatever reason it never seems to realize that ID_Account is a field, even though it's copied the same as the demo example.  I've tried putting the value in a variable and using that, but I cannot get it to work.  So instead what happens for me, is if I just do the script parameter as "ShowMap" it just adds the plot to the list, and shows a map with every other plot I've ever put on it.  I have NO idea where FileMaker is storing that data, as I've even rebooted my system, but sure enough it plots all.  So it seems that the script parameter above is what I need, to have it just show the found records on the map.  I just don't get why it doesn't work, instead I get a SQL error in the WebViewer that says:


      Error encountered when retrieving address information.

      The SQL used was:

      SELECT "Address_Latitude", "Address_Longitude", "EM_Info", "Name", "Name" FROM "Accounts" WHERE ( "Address_Latitude" IS NOT NULL ) AND ( "Address_Longitude" IS NOT NULL ) AND ( ( \"ID_Account"\ IN ( 3054 ) ) )


      I feel like I've added brackets, removed them, done quotes, removed them etc.  I have it copied the exact way as the demo, but it just never works, only does if I make script parameter ShowMap.  Just wondering if anyone has used this before or might know why it doesn't work.  In the demo file I can rename that CONTACT ID MATCHING FIELD and rename it in the parameter field and it still works, but doesn't work with anything in my own database.  Thanks!

        • 1. Re: Anyone familiar with FMEasyMaps?

          I've have not used  but here is a link to there website with demo database FMEasyMaps | An Open Source Map Solution for the FileMaker Platform and troubleshooting.




          I had created my own system that uses google maps api.  Here is a sample of my database, which does not use FMEasyMaps.

          Dropbox - GoogleMapsPinSample.fmp12

          • 2. Re: Anyone familiar with FMEasyMaps?

            ryanmead83 wrote:



            Error encountered when retrieving address information.

            The SQL used was:

            SELECT "Address_Latitude", "Address_Longitude", "EM_Info", "Name", "Name" FROM "Accounts" WHERE ( "Address_Latitude" IS NOT NULL ) AND ( "Address_Longitude" IS NOT NULL ) AND ( ( \"ID_Account"\ IN ( 3054 ) ) )


            From the first look at the SQL error ((\"ID_Account"\ IN (... is messed up.


            This is already parsed out in the script so you should not see the quote escaping in the result. This \" should become only a double quote ". The second one is even more messed up because there's a backslash after a double quote "\.

            This will not fly with SQL.


            Can you check again the script parameter that is passed to the ShowMap script?



            In your case it should be:

            "ShowMap¶( \"ID_Account\" IN ( " & Substitute ( Accounts::Found_Set_IDs; ¶; ", " ) & " ) )"


            and the tail end of your SQL should read: ... AND (("ID_Account" IN (3054, ..., ..., etc if you have more than one record in the found set)))


            If you solve that puzzle than it should work, bare in mind that for the IN part the data and field types must match as well.

            If it's a number field then it's ok, otherwise each passed value must be in single quotes. '3054','3055', etc.

            • 3. Re: Anyone familiar with FMEasyMaps?

              Thanks everyone,


              I tried the sample map but it has the same issue some of my others do, the map doesn't fill the container unless you have a monitor that displays at 100% scaling.  On High DPI it only shows up in 1/4th of the box.


              Electon I tried your suggestion and that did work to pass the SQL (what I don't get is that I copied and pasted the parameter exactly from the sample so not sure) however it still insists on plotting every map point that's ever been plotted before and not just the one I did.  I'll try it again from scratch since I edited the scripts a bunch trying to make it work.  How is that possible though, that even closing shutting down rebooting, it still remembers all the map points?  The web viewer is a variable which is a html file that gets generated, and in that file (as well as the $map_data variable before) it shows every point ever plotted.  If I interrupt the script before it continues and edit that line to keep it as just the one address I want, then it plots properly.It's just so weird, if I go to data viewer none of my variables have any values in them. 


              I'll try to do the script from scratch again after since I've probably messed it up a bunch now, as I could never get it to work passing that value over so I'd always remove references to that from the script.  Thanks for the tips!