How to render additional pins on a map view?

46 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

David Karger

unread,
Dec 22, 2021, 12:36:35 PM12/22/21
to simile-...@googlegroups.com

The easiest solution I can think of would be to rename baselatln as latlng in your FE items, then use both item types, instead of only Ticket, in your map view.  And you can certainly color code the map pins based on the type.   However, it isn't clear what you want to have happening with filtering.  For example, if you filter tickets, do you want to show only FEs whose tickets pass the filter?  That gets trickier. 

--
You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simile-widget...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simile-widgets/83568c1b-cbf4-4a05-856d-a852f2e89fe7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages