[PLUGIN] - Google Maps Geometry/Drawing + W3W

Hi Paul, I don’t understand what you mean by 2 lists. There is only one list of Addresses that I am displaying on the map. Within this one list some addresses repeat several times because they have several units for sale within the same location/geographical address. That’s why you notice a overlap of text as I shared before - see below for reference

For such instances the cluster function doesn’t work - I would need a separate option to cluster 1 address with multiple records.

  1. That didn’t help, the big picture with my marker is still huge at the end of the page.

  2. When I updated the plugin version - it started to load the page heavily and it stopped responding. I had to roll the plugin version back.

  3. I will discuss with my colleagues and send our proposal to you in a private message.

Can we add images on the map? And can we draw a custom line between two objects on the map dynamically based on two addresses as inputs?

Say I have address-1 and address-2 which needs to be shown on the map and a line between them in red color when the maps loads. Is this possible?

Is there any chance I can get view access to your editor to take a look?
Sorry, by 2 lists I just meant the list of addresses and then the list of texts so I can see how they look. I think to make it work like you want it to, may need some grouping somewhere, unsure at the moment. I’ll have a think.

Yes, please. Keep me informed. Best thing is if you can just open up the editor as everyone can view and PM me the URL to the editor, then I’ll jump in and take a look.

Hi @ritz7

You can use the “Add image overlay” action to get an image onto the map, there’s also the “Remove image overlay” action to remove it.

To draw a polyline between 2 markers, you want the “Draw shape” action with polyline selected as the shape type. The coordinates you need to pass will be 2 pairs of latitude/longitude representing each marker, in the format of lat,lng,lat,lng

Once it’s drawn, you can get the length of the polyline in the measured length state if needed.

Paul

Okay, let me try that and get back in case I face any issues.

Thanks for the quick support.

@rentforsale9188
I see the issue with that marker. I’ll put a fix in for it. My apologies, I hadn’t spotted that before, I’ve realised what’s happening here. Will let you know as soon as it’s fixed.

@kash1
I’m running to tests to see what I can do with this problem. I’ll get back to you.

Paul

Update v1.251.0

@rentforsale9188 @anon7950936

  • A bug has been fixed which was causing a marker icon to appear outside of the map. This was my bad! I left in some test code by accident which I forgot to remove, thanks for all who reported it. You should no longer see that now.

  • Fixed an issue where a marker would attempt to be placed on to the map when there was no latitude or longitude extracted from a geographical address (or the address field was empty).

@kash1

  • Two new options have been added as shown below.
    This option is used through the markers which you can add directly through the map element, the ‘set marker’ action and the ‘set list of markers’ action. It will reformat the text to show the abbreviations for thousand, million, billion and trillion (K, M, B, T).

I’m still trying to find a solution to your other issue you raised, right now I’m unsure how to do it but if I find a way, I’ll let you know.

Paul

Hi!

Thanks for the fixed bug, but I have a different problem now. When I update the plugin to version 1.246.0 and above, the page where the map is located hangs. The browser page stops responding. And on different browsers and different devices. See screenshot below:

Ahhh ok, I will get onto that, this happened to someone else recently too but we thought it just sorted itself out, clearly not! Leave it with me and I will get it looked at as soon as I can. I’m away from tomorrow for a week but have my laptop with me so will try not to keep you waiting. Thanks very much for letting me know.

@pork1977gm I am trying to run the ‘Contains Location’ on the server side, and populate a list of unique id’s into a database. The database field is a list of texts field. I do this same thing on the frontend and it works perfectly. However, when I run it on the backed it does not populate the list. Any idea why?

I am trying to do this server-side because I need to run this without the map being shown on the front end at times. With the frontend workflow, the workflow fails if the map is in a hidden group.


Hi @jeffprewitt

Is the “search for polygon’s coordinates” returning a single list of text based polygon coordinates? I assume it is as it works client side but just double checking. You might need to take a look into the Logs section when it runs and see if there is any error being produced, it will help me figure out what’s going on.

I’m currently away for this week and back on Tuesday next week, but if I get some time, I’ll see if it I can run some tests also.

@pork1977gm Yeah I believe it is passing in the coordinates correctly. I am not sure though if the issue is potentially with the list of id’s, latitudes, and longitudes that are being passed in.

I appreciate you taking a look when you are back next week. Thanks!

No problems. I think the next thing to do would be to validate the result of step 2, the unique ID’s, latitudes and longitudes, just to rule out there’s no issue with the data.

Do you think you could replicate the same backend action but through the front end? That way, you can run step-by-step and see the data, then send to me in a screenshot. Next week, I’ll try and replicate it also.

I am not sure if I did what you were asking, but I create a workflow on the font end that sets the lists in step 2 of the backend. Then I just created text fields that display the unique ids, latitudes and longitudes for each of the items in the list. It seems to display those fine.



@rentforsale9188 @kash1
Your issues should now be resolved in this update, please see below.

@jeffprewitt
I’ll get back to you soon!

----------------------------------------------------

v1.252.0

Fixes

I’m think I’ve now fixed the loading issue where the map would just freeze up, although time will tell. A minor change to a condition which checks the loaded map options on first launch was the culprit. This bug has been around for some time now, so hopefully this is now resolved. Let me know if you see it happen after the update.

New shiny things

There are 2 new settings added into the main map options, shown below. The documentation sections have been written so hopefully all is explained there.

Allow duplicate markers with the same position
Enable spiderfier

I’ve also spent some considerable time on how the clustering of markers works. There was a few issues here so it’s been revamped with a load of options and there’s now a new section sitting right at the bottom, shown below with all documentation fields updated. Take the time to read these and if you have any questions @kash just shout and I’ll help you out.

The “Cluster markers” action is still there and can be used on it’s own, but you can’t use it to set the info windows and tie in the data.

The info window section has some default HTML in it which generates a list of elements to represent the markers inside the clicked cluster. Each list item (or cell if you prefer) has a click event setup on it which updates a new state called “Current marker” and that will allow you to access all fields.

States and Events

Spider marker Ids
This gets populated upon clicking a marker which would expand to show others. If the marker doesn’t expand then no value is set.

Cluster marker Ids
This gets populated when a cluster is clicked. It will contain the marker Id’s that are inside that cluster only.

Current marker
Exactly the same as Bubble’s standard map plugin. It contains the data type of the marker which is clicked allowing you to get at all the fields for that particular marker. This is only set when you use the dynamic markers section in the main map options because that’s the only place which allows you to set the data type and fields.


One new event called cluster info window item is clicked which is triggered upon clicking one of the list items inside the info window.

Hopefully this all helps. Any issues, please let me know!

I know a couple of you mentioned about paying for some of these features etc, I’m happy either way but if you did feel you wanted to, then just PM me and we’ll go from there.

Paul

Morning @jeffprewitt,

I’ve found the problem with the Google Maps - Contains location action.

The returned marker ID’s were only working when supplying a list of address and not when supplying a list of latitudes and longitudes. I’m just pushed an update so if you try that, it should hopefully now return those unique identifiers.

I’ve updated some of the fields and text in that action.

Paul

@pork1977gm Thanks so much for the update! It works perfectly now!

Quick question on Google Map API keys. Do I need two different keys, one for the plugin and a separate for the app Maps API on the settings page? This seems to be the case in your demo editor.

I ask because, I got an error with Get Distances function after hiding and then showing the map again. Although maps was working otherwise I noticed a warning for duplicate JavaScript Maps API library loads, which was solved by removing the maps API key from my app settings. This also cleared the errors, however now I’m getting an error about geographic search boxes not functioning properly without the Maps API key (of course.) Did I miss a step in setup?