如何在 Flash 中的 Google Maps API 中按街道名称缩放到某个地点?
如果我问一个基本问题,我很抱歉,但我在任何地方都找不到它,而且我对提供的文档了解不多。基本上,我想制作一个 *.SWF,其中用户在第一帧中插入地址,然后在第二帧中 Google 地图显示该地点。问题是我不知道如何在没有 LatLng 参数的情况下缩放点。地理编码可能是解决方案,但正如我之前所说,我不明白它在 Flash 中是如何工作的。有人可以发布几行内容或指导我查看 Flash 中的地理编码示例吗?非常感谢。
I'm sorry if I'm asking a basic question, but I can't find it anywhere and I don't understand too much from the provided documentation. Basically, I want to make a *.SWF in which the user inserts an address in the first frame, then in the second frame Google Maps shows that place. The problem is that I don't know how to zoom on a point without LatLng parameter. Probably, Geocoding would be the solution, but as I said earlier, I don't understand how it works in Flash. Could someone please either post a few lines or direct me to an example of geocoding in Flash? Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 com.google.maps.services.ClientGeocoder 来实现此目的。
以下是一些代码片段,不是完整的代码,但它可能会给您一些开始的东西:
You would use a com.google.maps.services.ClientGeocoder for that.
Here are some code fragments, not complete code, but it may give you something to start with:
除了Lars的回答之外,将地图设置为地理编码结果的方法(包括根据结果的准确性缩放到适当的级别)是这样的:
这些字段的参考取自这篇文章:
< a href="https://groups.google.com/group/google-maps-api-for-flash/browse_thread/thread/1a6ede093d053903" rel="nofollow">https://groups.google.com/group/ google-maps-api-for-flash/browse_thread/thread/1a6ede093d053903
其中引用了此示例:
http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/GeocodingDetails/GeocodingDetails.html
In addition to Lars's answer, the way to set the map to the result of the geocode (including zooming to an appropriate level based on the accuracy of the result), is like this:
The reference for these fields is taken from this post:
https://groups.google.com/group/google-maps-api-for-flash/browse_thread/thread/1a6ede093d053903
Which references this sample:
http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/GeocodingDetails/GeocodingDetails.html