When I add click listener for a polyline object, click on it also causes the map click, which I want to avoid, since map click triggers the expensive network operation. How should I subscribe to polyline clicks to avoid map clicks?
You can call stopPropagation() on the event to prevent it from being passed to the polyline hierarchy. See https://developer.here.com/javascript-apis/documentation/v3/maps/topics_api_nlp/h-mapevents-event.html
Related
I'm currently using the cursor component with the raycaster to determine if an object in my scene is clicked:
<a-entity cursor="rayOrigin: mouse" raycaster="objects: .deck"></a-entity>
I'm able to successfully listen to click events in my object. The problem I'm facing now is that the event payload does not contain any mouse details. Specifically I was hoping to determine if the click was a left or right click. The payload I get for the click event looks like this:
I noticed the cursor component was emitting the event. The only way I can think of to do this is to duplicate the cursor component and modify it to emit mouse data as well.
I was wondering if there is a better way to do this.
I have an Echarts graph (similar to a network graph), which has many nodes and edges. When I put the mouse on a node, the adjacent edges and nodes will be highlighted, but how can I move the mouse The highlighting of these nodes is still maintained after leaving. In other words, I want to trigger and cancel the highlighting by clicking, rather than hovering over the mouse.
In your tooltip chart options, add the option trigger:
tooltip : {
triggerOn : 'click'
}
in my case using click, mouseout, highlight event worked.
I can't find way to avoid default mouse hover event. so set click and mouseout event callback.
When click event occur, save the node 'dataIndex'. And when mouseout event occur, emit 'highlight' event with 'dataIndex' (use dispatchAction api)
When drag external event I use draggable and option drag. Then I get information every move. Now I need the same for internal event, but are availabe only dragStart and dragStop, which run only one times.
----SOLVED----
I use eventAllow in Fullcalendar
I can't seem to find the map event in Here that equals to Google Map "idle" event.
The definition of Google Map event "idle" is "This event is fired when the map becomes idle after panning or zooming."
So, when any of the map actions are done completely the map becomes idle and the idle event is fired — with this event i can guarantee all map's animations, actions and other stuff are done completely.
For example, if i zoom or pan the map with the animation option enabled zoom_changed and dragend events will be fired immediately but only after the idle event i can safely use getZoom or getBounds or getCenter methods and get correct values instead of some intermediate values (while animation is still running).
In Here maps i can see only pointer, drag and tap events. There is no any zoom change event at all. And all those events cannot guarantee the map is ready to give correct zoom/bounds/center/etc values after some interaction.
For example, Here dragend event is firing but drag animation is still running, so i cannot guarantee getBounds or getCenter will return correct values if i try to read them right in dragend callback.
In Yandex maps i have actionend event which is equivalent to the Google's "idle" event.
What i have in Here maps which is equal to the Google Map or Yandex Map "idle" event?
If you refer to the JavaScript API you may want to look at the mapviewchangeend event
Is there a way to intercept the following user gestures, and create a circle on the map?
User clicks mouse on the desired centerpoint and keeps mouse button down.
User extends the radius and lets the mouse button up
Can the API return the geolocation beneath the mouse pointer on mousedown and return the geolocation beneath the mouse pointer on mouseup?
i think this should help -> http://www.imapbuilder.com/gmap-builder/map-editor-user-guide/add_polygon_rectangle_circle_clickable_area.php, maybe also this -> https://developers.google.com/maps/articles/mvcfun
never needed to do this kind of work, but this is where i would start and also google is your number one friend...