2019年11月17日日曜日

FileMakerでGoogle Mapを表示、Google Maps JavaScript API v3使用|作成方法

FileMakerでGoogle Mapを表示
Google Maps JavaScript API v3 使用
APIキー取得方法
https://qbxxdp.blogspot.com/2019/11/filemakergoogle-mapgoogle-maps.html

動作検証
Windows 10
FileMaker 13,14,15,16,17,18

Mac OS 10.13.3
FileMaker Pro 18

iOS13
FileMaker Go 18

サンプルファイル
GMap_Limited.zip(無料)管理者権限無し
https://fm-aid.stores.jp/items/5dd0e28063794452d5012237

作るのが面倒な場合、有料サンプルをどうぞ。
また、ご支援頂ける場合、ご購入頂けると幸いです。
GMap_Unlimited.zip(500円)管理者権限あり
https://fm-aid.stores.jp/items/5dd0ec45a3423d5602e165c2




FileMaker
テーブル:



レイアウト:


リレーション:

スクリプト:
変数を設定 [ $map.js; 値:" var address= '{{address}}'; var Zoom = {{Zoom}}; var myLatlng; function codeAddress() { var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { myLatlng=results[0].geometry.location; initialize(); } else { alert('Geocode was not successful for the following reason: ' + status); } }); } function initialize() { var mapOptions = { zoom: Zoom, center: myLatlng }; var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: address }); } " /*参考:Geocoding Service   |   Google Maps JavaScript API   |   Google Developers : https://developers.google.com/maps/documentation/javascript/geocoding*/ ]
変数を設定 [ $map.js; 値:Substitute ( $map.js ; [ "{{address}}" ; GMap::address ] ; [ "{{Zoom}}" ; GMap::Zoom ] ) ]
変数を設定 [ $html; 値:Let([html= "data:text/html;charset=utf-8, <html> <head> <meta http-equiv='content-type' content='text/html; charset=utf-8'/> <meta http-equiv='X-UA-Compatible' content='IE=edge'/> <style type='text/css'> html, body, #map_canvas { width: 100%; height: 100%; margin: 0; padding: 0; } body { border:0;padding:0;margin:0;overflow:hidden; font-size:75%; font-family: 'メイリオ', Meiryo ; } #map_canvas { position: relative; } </style> <script type='text/javascript' src='http://maps.google.com/maps/api/js?key={api_key}'></script> <script type='text/javascript'>{map.js}</script> </head> <body onload='codeAddress()'> <div id='map_canvas'></div> </body></html>" ]; Substitute ( html ; ["{api_key}" ; google_project::api_Key] ; ["{map.js}" ; $map.js] ) ) ]
Web ビューアの設定 [ オブジェクト名: "WEB1"; URL: $html ]


FileMakerでGoogle Mapを表示。Google Maps JavaScript API v3使用。APIキー取得方法

FileMakerでGoogle Mapを表示
Google Maps JavaScript API v3 使用
APIキー取得方法

動作検証
Windows 10
FileMaker 13,14,15,16,17,18

Mac OS 10.13.3
FileMaker Pro 18

iOS13
FileMaker Go 18

サンプルファイル
GMap_Limited.zip(無料)管理者権限無し
https://fm-aid.stores.jp/items/5dd0e28063794452d5012237

作成方法:
https://qbxxdp.blogspot.com/2019/11/filemakergoogle-mapgoogle-maps_17.html

作るのが面倒な場合、有料サンプルをどうぞ。
また、ご支援頂ける場合、ご購入頂けると幸いです。
GMap_Unlimited.zip(500円)管理者権限あり
https://fm-aid.stores.jp/items/5dd0ec45a3423d5602e165c2


準備
Google API Key の取得(2019.11.17現在)
Google Developer Console にアクセス。
https://console.developers.google.com/

[プロジェクトの選択]をクリック
[新しいプロジェクト]をクリック


プロジェクト名 を記入
[作成]をクリック

APIを有効にするために
[ライブラリ]をクリック

Maps JavaScript API と、
Geocoding API を有効にします。
Geocoding で検索すると両方検索できます。


[認証情報]をクリック
[認証情報を作成]をクリック
[APIキー...]をクリック

[キーを制限]をクリック

[キーを制限]
Maps JavaScript API と、
Geocoding API を有効に設定



請求先アカウントの設定
[お支払い]をクリック


請求先アカウントが無い場合、
[請求先アカウントをリンク]
[請求先アカウントを管理] どちらをクリックしても 請求先アカウントを追加になります(たしか...)

[請求先アカウントを追加]をクリック

[続行]


 カードを登録して、
[無料トライアルを開始]をクリック
今は、Google Cloud Platform の無料トライアルに強制的になる模様...



[認証情報]で
APIキーをコピー

FileMaker設定
[歯車アイコン]をクリック

APIキーを設定

住所を記入して[GO]をクリック
地図が表示されます。




2019年11月4日月曜日

FileMakerのフィールドにPDF,WORD,EXCEL,一太郎などのテキストを抽出保存

FileMakerのフィールドにPDF,WORD,EXCEL,一太郎などのテキストを抽出保存

動作検証
Windows 10
FileMaker Pro 13,14,15,16,17,18


http://ebstudio.info/ さんの xdoc2txt を使用します。
xdoc2txt とFileMakerの連携に ProcessMakerTL を使用します。
ProcessMakerTL の作者は、私です。

準備:
────────── xdoc2txt ──────────
xdoc2txt をダウンロードし任意のフォルダに展開します。
例では、D:\xdoc2txt 2.19.1 に保存。
ダウンロードページの説明にあるように
「Microsoft Visual C++ 2010 再頒布可能パッケージ (x86)」または、
「Microsoft Visual C++ 2010 再頒布可能パッケージ (x64)」をインストール

────────── ProcessMakerTL ──────────
ProcessMakerTL をダウンロードし任意のフォルダに展開します。
例では、C:\ProcessMakerTL に保存。
試用認証キー をダウンロードし、ProcessMakerTL.exe と同じフォルダに保存。

※起動しない場合、ProcessMakerTL.exe のファイルプロパティーを確認し、ブロックされている場合は、[ブロックの解除]をおこなって下さい。

────────── FileManager.fmp12 ──────────
サンプルファイル FileManager.fmp12 をダウンロード
https://sites.google.com/site/processmakertl/example/filemaker-gettext-pdf-word-excel
Path_ProcessMakerTL に ProcessMakerTL.exe のフルパスを設定
Path_xdoc2txt に xdoc2txt.exe のフルパスを設定

実行:
obj_File に PDF,WORD,EXCEL,一太郎などのファイルを挿入し、[Grt Text]ボタンをクリック。ファイル内のテキストが取得できます。