https://github.com/yuukitoriyama/ryokucha
FlickrAPIから取得したデータをOpenStreetMap上に表示する
https://github.com/yuukitoriyama/ryokucha
flickr-api html5 javascript leafletjs openstreetmap-api ruby
Last synced: 5 months ago
JSON representation
FlickrAPIから取得したデータをOpenStreetMap上に表示する
- Host: GitHub
- URL: https://github.com/yuukitoriyama/ryokucha
- Owner: YuukiToriyama
- License: mit
- Created: 2019-07-15T09:34:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-17T11:26:23.000Z (almost 4 years ago)
- Last Synced: 2025-09-23T20:46:47.881Z (6 months ago)
- Topics: flickr-api, html5, javascript, leafletjs, openstreetmap-api, ruby
- Language: TypeScript
- Homepage: https://yuukitoriyama.github.io/ryokucha/index.html?q=8479tqi2fVw
- Size: 462 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @toriyama/ryokucha
## Example
下記の条件に当てはまる写真を Flickr から取得し、GeoJSON に変換します。
- tag に`kyoto`,`shrine`を含む
- `2015-01-01`から`2015-01-31`の間に撮影された
- geo タグを含む
```env
APIKey=0123456789abcdefghgi
```
```javascript
import { FlickrAPI } from "@toriyama/ryokucha";
import "dotenv/config";
(async () => {
const flickr = new FlickrAPI({
key: process.env.APIKey,
});
const response = await flickr.photos.search({
tags: ["kyoto", "shrine"],
taken_date: {
min: new Date(2015, 1, 1),
max: new Date(2015, 1, 31),
},
has_geo: true,
extras: [
"geo",
"url_o",
"url_sq",
"date_taken",
"owner_name",
"description",
],
});
const geojson = response.toGeoJSON();
console.log(JSON.stringify(geojson, null, "\t"));
})();
```