Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing Events #10

Closed
siddharthlatest opened this issue Aug 17, 2016 · 7 comments
Closed

Exposing Events #10

siddharthlatest opened this issue Aug 17, 2016 · 7 comments
Milestone

Comments

@siddharthlatest
Copy link
Member

  • Single click, Double click, Right click, Hover over pin, anything else that's relevant.
@siddharthlatest
Copy link
Member Author

Use-case: Pins represent all the user data (checkins, reviews, different kinds of meta data), as a user - how can I add a popover functionality on hover to this lib?

@siddharthlatest siddharthlatest added this to the v1.0 milestone Aug 31, 2016
@siddharthlatest
Copy link
Member Author

@farhan687 what's the status on this?

@farhan687
Copy link

Events name - markerOnIndex, markerOnDelete, markerOnClick, markerOnDblclick, markerOnMouseover, markerOnMouseout

Popover related props:

  • We can specify events in showPopoverOn prop: "onClick", "onMouseOver", "onDbClick"
  • We can generate markup according to marker data. pass the function in popoverContent, receive data in first argument and generate markup
<AppbaseMap
...
showPopoverOn: "onClick"
popoverContent: {generateHtmlMarkup}
/>

generateHtmlMarkup(markerData) {
 return (<div>{markerData} </div>)
}

@siddharthlatest
Copy link
Member Author

@farhan687 For indexing data to the map, we want to separate indexing and streaming updates.

Indexing can have multiple markers in the result that can be passed as an array for efficient representation.

Streaming updates will have one marker object passed at a time.

@farhan687
Copy link

markerOnIndex is done over here: edd26fc

Data will be received in following format:

{
 method: 'historic',
 data: data
}

// or

{
 method: 'stream',
 data: data
}

@farhan687
Copy link

Right now I can see old method created earlier: markerOnDelete, Do we need such method?

@farhan687
Copy link

Now exposing following map events:
onIdle, onMouseover, onMouseout, onClick, onDblclick, onDrag, onDragstart, onDragend, onMousemove, onMouseout, onMouseover, onResize, onRightclick, onTilesloaded, onBoundsChanged, onCenterChanged, onProjectionChanged, onTiltChanged, onZoomChanged
7f75c8f

working demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants