我需要一个方便的 jQuery 工具(插件)来处理地图
我需要一个方便的 jQuery 工具(插件)来处理地图。
该项目有 narisovanaya 地图,上面标有城市和可能的路线。
示例
我想要:
- 在地图顶部应用路线(在本示例中以绿色显示) (img)
- 显示一个带有城市信息的小div
现在倾向于认为可以通过canvas来实现地图,但不确定是否方便显示带有城市信息的div。
也许有人遇到过类似的问题并帮助我避免错误。
I need a handy jQuery tool (plugin) to work with the map.
The project has narisovanaya map with cities marked on it, the possible routes.
Example
I want to:
- To apply the route (in this example it is shown in green) on top of the map (img)
- Display a small div with information about city
Now inclined to think that would work to implement the map through the canvas, but is not sure whether it is convenient to display the div with information about the city.
Maybe someone encountered a similar problem and help me avoid mistakes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 Canvas 会更容易。 jQuery 在这种情况下无法提供太多帮助。我想你可以使用 jQuery 将 div 绝对定位在路线和节点上,但这需要大量工作。
It would be easier to use a Canvas. jQuery can't provide much help in this instance. I suppose you could use jQuery to absolutely position divs over the routes and nodes, but that would be a lot of work.
我最近也有类似的概念。我认为在地图上显示路线的最佳方法是挂钩 Google 地图 API。这是一个复杂的系统,需要大量的阅读、学习和尝试才能正确使用,但它使您的用户可以完全控制地图,允许他们缩放、移动和计算路线。您甚至可以在地图上放置地标。
I have recently had a similar concept. I decided that the best way to show routes on maps was to Hook into the Google Maps API. This is a complex system and will take a great deal of reading, learning and trying to get it right, but it gives your users full control over the map, allowing them to zoom, move, and calculate routes. You can even put placemarkers on the map.