在 Java 桌面应用程序中嵌入谷歌地图 [英] Embed google maps in Java desktop Application

查看:49
本文介绍了在 Java 桌面应用程序中嵌入谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 JPanel 上嵌入谷歌地图.由于我想要放大/缩小等功能,因此使用静态图像是不可行的.

I want to embed google maps on a JPanel. Since I want features like zoom-in/out, using static images isn't feasible.

为了实现这一点,我可能需要在我的 Java 桌面应用程序中嵌入一个网页(显示谷歌地图).我已经读到我需要像 WebKit(替代品?)这样的东西来完成这个.

To achieve this, I'll probably need to embed a webpage (which displays google maps) in my Java desktop application. And I've read that I'll need something like WebKit (alternatives?) to accomplish this.

如果有任何帮助,我将不胜感激:

I'd appreciate any help that'll help me:

  1. 在 Jpanel 中嵌入网页.
  2. 显示谷歌地图的网页.

推荐答案

是的,Google Maps API 现在可以在桌面应用程序中使用

Yes, the Google Maps APIs can now be used in Desktop applications

查看这些 Stack Overflow 线程:

Check out these Stack Overflow threads:

JAVA Swing 中的 Google 地图

在 Java 中嵌入 Gecko/Webkit

Java 应用程序中的 Webkit 浏览器

使用 Java 中的 WebKit 渲染网页

您还可以查看 教程 在 Java 桌面应用程序中使用地图.

You can also see the tutorail of using Maps in Java Desktop Application.

这篇关于在 Java 桌面应用程序中嵌入谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆