mapbox / which-polygon

Index for matching points against a set of GeoJSON polygons
ISC License
133 stars 14 forks source link

whichPolygon is not defined #8

Closed MinhduongUNO closed 6 years ago

MinhduongUNO commented 6 years ago

Hello,

I was trying to incorporate "whichpolygon" into my Javascript to test it

var geojson = require('./countries.json'); var query = whichPolygon(geojson); query([30.5, 50.5]).admin;

but it kept telling me that it was not defined. I am afraid that I didn't find anything on this GitHub page that could explain how I could fix that. Appreciate it if you could help me

Thank you

mourner commented 6 years ago

Perhaps you forgot to do var whichPolygon = require('which-polygon');?