-
Notifications
You must be signed in to change notification settings - Fork 109
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
Update portal counts plugin to integrate with draw tools and uniques #371
base: master
Are you sure you want to change the base?
Update portal counts plugin to integrate with draw tools and uniques #371
Conversation
Integrate with the uniques plugin, if active.
Integrate with draw tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest not to convert coordinates to string when passing a variable to function. And specify a link to description of function. That's what I did in comments to PR.
Co-authored-by: Alexander Danilov <[email protected]>
Co-authored-by: Alexander Danilov <[email protected]>
Co-authored-by: Alexander Danilov <[email protected]>
Co-authored-by: Alexander Danilov <[email protected]>
Co-authored-by: Alexander Danilov <[email protected]>
Good suggestions! All proposed changes merged. |
// Determine if a point is inside of a polygon. | ||
// ray-casting algorithm based on | ||
// https://observablehq.com/@tmcw/understanding-point-in-polygon | ||
window.plugin.portalcounts.portalinpolygon = function(portal,LatLngsObjectsArray) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Shouldn't we include some pip algorithm in IITC api? It is used in many plugins already.
- I'm going to open separate issue to discuss another opportunity: what if we provide general portal-filtering API?
For example, it'd be possible to use more convenient region selection tools, like these: Idea: region selection utility #27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if common functions were included in API. We can replace this code when corresponding API appears
a34b800
to
7b9edd5
Compare
@erikchristiansson |
intel portal history not supported yet
Display count of unvisited and uncaptured portals if the uniques plugin is installed.
If any polygons are draw, only count portals in the polygons.