adilyalcin / Keshif

Keshif - Data Made Explorable (Prototype)
https://keshif.me
BSD 3-Clause "New" or "Revised" License
457 stars 123 forks source link

Show exact coordinates of records with a marker on map #175

Open cschwantes opened 7 years ago

cschwantes commented 7 years ago

Is it possible to show the position of single records on the map? I went through all demos, but haven't found such an example. Leaflet should be capable of this.

adilyalcin commented 7 years ago

Hi @cschwantes,

You can show an area / polygon for each record with current Keshif version. I have a public example using counties as records. The record display can show a map which shows each county.

www.keshif.me/demo/surplus_gear

Currently, you need to load the GeoJSON yourself, and describe how each record (say, county) should be represented (currently, Keshif only accepts geojson path objects).

You can find the source code for this example here: https://github.com/adilyalcin/Keshif/blob/master/demo/surplus_gear.html

The code of interest is in the recordDisplay specification :: geo: 'geo',

And, on loading the data, JSON file is parsed and then a geo property is added to each county. The code is further up in the code for that, and the statement is: record.data.geo = feature;

This is not a stable API. It is flexible, so will require some coding.

If you have more questions or new feature requests, feel free to send an update on this thread.

Adil

cschwantes commented 7 years ago

Hello @adilyalcin

Instead of representing areas such as counties or countries, I would like to represent individual sets of coordinates with a marker. Each record would have it's exact coordinates (such as it's exact address), which should be shown on a map.

You can see an example of what I'm referring to as marker here: Image of Marker Example

Chris