【发布时间】:2013-04-09 19:30:30
【问题描述】:
我正在尝试让 Googlemaps v3 与 Google 网络工具包一起使用。 我正在使用 GWT 2.5.1。我一直在尝试使用 GWT 搜索最新版本的 Google 地图,最终找到了 page。 按照那里的说明,我已经下载了这 3 个 jar 文件。
gwt-maps-api-v3-3.8.1-javadoc.jar
gwt-maps-api-v3-3.8.1-sources.jar
gwt-maps-api-v3-3.8.1.jar
我已将这些 jar 文件放在我的 WEB-inf 中
我已将这些 jar 文件添加到我的类路径中
在我的 map_geolocation.gwt.xml 中,我继承了该模块。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to="map_geolocation">
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.maps.gwt.GoogleMaps" />
<source path="client" />
<entry-point class="com.google.maps.gwt.samples.basics.client.MapGeolocation" />
</module>
当我尝试运行我的代码时,我得到了这个错误。
Loading modules
com.google.maps.gwt.samples.basics.map_geolocation
Loading inherited module 'com.google.maps.gwt.samples.basics.map_geolocation'
Loading inherited module 'com.google.maps.gwt.GoogleMaps'
[ERROR] Unable to find 'com/google/maps/gwt/GoogleMaps.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 6: Unexpected exception while processing element 'inherits
做了一些研究后我继承了
<inherits name='com.google.gwt.maps.Maps' />
而不是
<inherits name="com.google.maps.gwt.GoogleMaps" />
仍然失败。有谁知道怎么回事?
更新:我不关心使用 V3。在哪里可以找到最新的稳定版 GWT 的谷歌地图插件?
【问题讨论】:
-
您能分享一下您找到该教程的页面吗?
标签: java google-maps gwt google-maps-api-3