源码介绍
This code example demonstrates how to use PowerBuilder with Google Maps through the Google Maps API.
For this example to work, you will need to register and received a Google Maps API Key. You can register for free at http://maps.谷歌.com.
Once you receive your API Key you will need to modify the following objects to enable this application:
1. p_pbgmap_webform in the pbgmap.pbl (under the pbgmap target). Click on the Configuration tab in the project painter and then click on the User-defined configuration settings radio button. Select the GoogleMapsAPIKey key and click on the edit button. Paste your API key into the Value field.
2. w_谷歌maps_demo in the pbgmap.pbl (any target). Open the window and then edit the init_map function. Replace the "Get GoogleMaps API Key at http://maps.谷歌.com" text with your API Key.
To see the PowerBuilder 11 cities when you click the PowerBuilder 11! button you need to replace the easdemo110.db file in the C:\Program Files\Sybase\Shared\PowerBuilder folder with the one included in the Zip file of this application.
Once you have made these changes you can deploy any of the three targets and run the application.
Note: The address geocoding web service included in this example only works with US addresses. If you do not know of any US addresses to test with you can try these:
1600 Pennsylvania Ave., Washington DC
5001 Hacienda Blvd., Dublin, CA
此代码示例演示如何运用谷歌舆图,通过谷歌舆图API PowerBuilder的。
在这个例子中事情,您需要注册,并收到了谷歌舆图API密钥。您能够免费注册在http://maps.谷歌.com。
一旦您收到您的API密钥,您需要修改下面的对象,使这个应用程序:
1。 p_pbgmap_webform的pbgmap.pbl(根据pbgmap目标)。单击配置选项卡上的项目中的画家,然后在用户点击自定义配置设置单选按钮。选择GoogleMapsAPIKey键并单击编辑按钮。粘贴到您的API值字段的关头。
2。 w_谷歌maps_demo在pbgmap.pbl(所有目标)。打开窗口,然后编辑init_map功能。取代“在http://maps.谷歌.com猎取Google舆图API密钥与您的API密钥”文本。
要查看PowerBuilder的11个都市当您单击PowerBuilder的11!按钮,您需要替换在C easdemo110.db资料:与1 \程序资料\赛贝斯\共享\ PowerBuilder的资料夹包括在此应用程序的压缩资料。
一旦你取得了这些更改,您能够部署的三大目标,所有和运行应用程序。
PPB代码pbGMap (1 folders, 1 files, 694 bytes, 11.51 MB in total.)
pbGMap (0 folders, 11 files, 11.51 MB, 11.51 MB in total.)
easdemo110.db 11.09 MB
GeoCode_Service.dll 10.00 KB
谷歌maps.pbl 102.00 KB
pbgmap.pbd 104.50 KB
pbgmap.pbl 216.00 KB
pbgmap.pbt 314 bytes
pbGMap.pbw 205 bytes
pbgmap_winform.pbt 187 bytes
pbgmapW32.pbt 143 bytes
readme.txt 1.40 KB