I have a Google map working nicely and all the markers are there from my query. But I want to add another set of markers to the same map using a different query which is structured slightly differently. I thought it would be a simple process of adding another dynamic markers to the page but I now realise they are part of the map and there’s only provision for one data source per map.
What’s the best way to achieve this? I’m reluctant to redo all my query (it’s quite a complex one) to include both sets into one output so I’m hoping there is another way.
I haven’t used google maps and the markers but I think that you could just join these 2 queries in your api with the server arrayList and come up with a new joined query (arrayList)…
Is that doable for you?
Thanks @famousmag. Yep, that was my kind of last resort option. I was hoping I could just have two separate sources and have both populate the one map.
Yep, it’s a good soluton and will be worth it. It would just be nice to leave the existing one alone and add a second one rather than modify the original.
Thanks @Teodor. I did look at this as I thought it might be the solution but I don’t think it will help me in this case.
Imagine two tables - customers and suppliers. Both tables contain data including the longitude and latitude values. I want to show all the records from both tables in my map.
Will the Join action allow me to do this? It looks like I have to have a common field linking the two tables (an id in the example shown) but I won’t have that.
In this case it won’t work. You will either need to create a custom query, which gets the records as you need or create a database view which does this and then use it as a data source.