{"id":21285582,"url":"https://github.com/takeyuweb/mt-plugin-location","last_synced_at":"2025-03-15T15:13:14.676Z","repository":{"id":9889754,"uuid":"11894524","full_name":"takeyuweb/mt-plugin-Location","owner":"takeyuweb","description":"Movable Type で位置情報に基づく記事の検索・地図表示などを実現します。","archived":false,"fork":false,"pushed_at":"2014-05-26T05:38:41.000Z","size":355,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T05:16:19.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takeyuweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-05T09:20:34.000Z","updated_at":"2022-01-21T05:49:08.000Z","dependencies_parsed_at":"2022-08-27T21:00:29.131Z","dependency_job_id":null,"html_url":"https://github.com/takeyuweb/mt-plugin-Location","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeyuweb%2Fmt-plugin-Location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeyuweb%2Fmt-plugin-Location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeyuweb%2Fmt-plugin-Location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takeyuweb%2Fmt-plugin-Location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takeyuweb","download_url":"https://codeload.github.com/takeyuweb/mt-plugin-Location/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746201,"owners_count":20341203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T11:21:16.406Z","updated_at":"2025-03-15T15:13:14.640Z","avatar_url":"https://github.com/takeyuweb.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"Location プラグイン\n==================\n\n* Author:: Yuichi Takeuchi \u003cinfo@takeyu-web.com\u003e\n* Website:: http://takeyu-web.com/\n* Copyright:: Copyright 2013 Yuichi Takeuchi\n* License:: MIT License\n\nMovable Type 6 で位置情報に基づく記事の検索・地図表示などを実現します。\n\n![利用イメージ](https://raw.github.com/uzuki05/mt-plugin-Location/master/edit_entry.png)\n\n* ブログ記事編集画面に「位置情報」を追加\n  * Google Map上のマーカーをドラッグ＆ドロップで指定可能\n  * Geocoding APIを利用した名称・住所からの位置指定が可能\n* Data APIに位置検索用のパラメータを追加\n  * 指定地点から半径○kmに含まれる\n    例）現在地から500m以内で検索\n  * 矩形領域に含まれる\n    例）Google Mapの表示領域内を検索\n* 位置情報表示用のテンプレートタグを提供（スタティック/ダイナミック）\n\n\n## Data API\n\n### Entries list\n\n記事一覧取得APIで以下のパラメータを指定できるようになります。\n指定しない場合は標準の動作となります。\n\n#### 指定地点から半径\u003cdistance\u003ekmに含まれる\n\n| パラメータ | 種類         | デフォルト | 説明                  |\n|:-----------|:-------------|:-----------|:----------------------|\n| lat        | float        |            | 中心点の緯度（WGS84） |\n| lng        | float        |            | 中心点の経度（WGS84） |\n| distance   | float        | 1.0        | 検索半径（km）        |\n\n    http://test.host/mt/mt-data-api.cgi/v1/sites/1/entries?lat=35.710139\u0026lng=139.810833\u0026distance=1.0\n\n#### 矩形領域に含まれる\n\n| パラメータ | 種類         | デフォルト | 説明                            |\n|:-----------|:-------------|:-----------|:--------------------------------|\n| sw_lat     | float        |            | 矩形領域の南西端の緯度（WGS84） |\n| sw_lng     | float        |            | 矩形領域の南西端の経度（WGS84） |\n| ne_lat     | float        |            | 矩形領域の北東端の緯度（WGS84） |\n| ne_lng     | float        |            | 矩形領域の北東端の経度（WGS84） |\n\n    http://test.host/mt/mt-data-api.cgi/v1/sites/1/entries?sw_lat=35.0547\u0026sw_lng=133.9907\u0026ne_lat=35.0617\u0026ne_lng=134.0046\n\n\n### Entries resource\n\nData APIから返却される記事リソースに以下のプロパティが追加されます。\n\n| プロパティ   | 種類         | データ種別   | カラム                | 読込専用 | 説明                  |\n|:-------------|:-------------|:-------------|:----------------------|:---------|:----------------------|\n| useLocation  | value        | Boolean      | mt_entry.use_location |          | 位置情報有効フラグ    |\n| lat          | value        | float        | mt_entry.lat          |          | 緯度（WGS84）         |\n| lng          | value        | float        | mt_entry.lng          |          | 経度（WGS84）         |\n\n\n## テンプレートタグ\n\nスタティックパブリッシング・ダイナミックパブリッシングのどちらでも使用できます。\n\n### コンディショナルタグ\n\n#### MTEntryIfPositioned\n\n記事の位置情報が「有効」のときブロック内を処理\n\n### ファンクションタグ\n\n#### MTEntryLat\n\n記事の緯度を表示\n\n#### MTEntryLng\n\n記事の経度を表示\n\n### 使用例\n\n    \u003cmt:EntryIfPositioned\u003e\n        緯度:\u003c$MTEntryLat$\u003e\n        経度:\u003c$MTEntryLng$\u003e\n        \u003ca href=http://maps.google.co.jp/maps?ie=UTF8\u0026q=\u003c$MTEntryLat$\u003e,\u003c$MTEntryLng$\u003e\u0026ll=\u003c$MTEntryLat$\u003e,\u003c$MTEntryLng$\u003e\u0026z=15\";\u003eGoogleMap\u003c/a\u003e\n    \u003c/mt:EntryIfPositioned\u003e\n\n## サンプル\n\nGoogle Map + Data API + Location のサンプルを sample.tmpl として用意しています。\n\nコピペして適当なインデックステンプレートを作成すれば、地図検索を試せます。\n\n## TODO\n\nできればやりたいこと。（無理っぽいことも含まれる）\n\n* 検索\n  * 指定地点からの距離を取得\n  * 指定地点からの近い順でソート\n* テンプレートタグ\n  * 測地系変換モディファイア\n  * 度分秒表記モディファイア\n* 管理\n  * Listing Frameworkで位置検索\n\n##Contributing to Location\n\nFork, fix, then send me a pull request.\n\n##Copyright\n\n© 2013 Yuichi Takeuchi, released under the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakeyuweb%2Fmt-plugin-location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakeyuweb%2Fmt-plugin-location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakeyuweb%2Fmt-plugin-location/lists"}