How to show 2 different item types on the same map?

12 views
Skip to first unread message

Vincent Borghi

unread,
Dec 22, 2021, 10:43:58 AM12/22/21
to SIMILE Widgets
Hello,

I am building a Simile Exhibit (3.0) to allow my users to browse thru field interventions tickets. And I have a question...

My data:
My JSON data includes 2 item types: Ticket and FE ("FE" means field engineer).
There is a relation between both types: a Ticket may be (or not) assigned to a FE.
  • Sample Ticket item (simplified):
    { "type": "Ticket", "label": "211108-TR0004",, "FE": "John Smith",  "zipcode": "92240", "city": "Malakoff", "country": "FR", "eta-date": "2021-12-04", "customer": "", "latlng": "48.817275,2.2977599", "area": "FR Paris Suburbs" } 
  • Sample FE item (simplified):
    {"type": "FE", "label": " John Smith ", "firstname": "John", "lastname": "Smith", "email": "john...@foobarexample.com", "phone": "+33712345678", 'baselatlng': "48.817222,2.2977400"}
My Exhibit Views:
In my HTML, I have
<div data-ex-role="exhibit-collection" data-ex-item-types="Ticket"></div>
Then I have a viewPanel containing a (Tile) exhibit-view that lists and filters the Tickets.
Then I have a "Map" exhibit-view that shows locations of Tickets based on their latlng. 
Basically; all is working as I want. But...

My question!:
Well, I do not know how to make the map also show the "base location" of the FEs (this base location is available from the FE item data as the "baselatlng" value). 
This would allow to visually evaluate which FEs are near or far from the different Ticket (intervention) locations.
In other words, I want that the same map shows both the Tickets and the FEs (with different color codes or icons for the pins).

How can I do that?

Thanks!
Vincent
Reply all
Reply to author
Forward
0 new messages