Closed markwatsonatx closed 7 years ago
I have some code working that does this @markwatsonatx but it doesn't quite seem right unless the popup is also triggered. Centering is easy. Firing the mouse click event properly to get the popup to happen is harder. @ryanbaumann any thoughts?
@rajrsingh Can you send me that code? I am working on that now. I have the mouse click event firing. I had to change the way we rendered the messages from the server.
@rajrsingh @markwatsonatx here are the map navigation links to the native maps platform https://github.com/ibm-cds-labs/cognitive-event-finder/blob/master/public/js/eventList.js#L104-L125
I would recommend adding an event listener to text click event from the Watson chat bot. The callback could look like:
function onClickText(map, point, popup) {
map.flyTo({center: point});
popup.setLngLat(point)
.setHTML('this is the popup')
.addTo(map);
}
This is in there now. I also added links for recent searches. However, they do not work on mobile. Will investigate if I have time.
In the chat results add links on the events that fly to/center on icon in map.