English 中文(简体)
我应该使用哪个javascript库?
原标题:Which javascript library should I use?
  • 时间:2011-06-01 08:21:02
  •  标签:
  • javascript

我会尽量把我的问题说清楚,但我在编程方面有点新手,所以请耐心等待。

我目前正在制作一张地图,最终需要在网站上运行。我正在Adobe Illustrator中处理这个文件,我有几个图层可以绘制地图。我需要的是一个直观、图形美观的应用程序,用户可以在谷歌地图上平移和缩放地图。我需要的另一个关键功能是能够隐藏/显示图层,并能够单击其中一个图层上的一些突出显示点来显示其他信息。我曾经尝试过直接在SVG中创建层切换,但我真的需要在一个单独的侧边栏上使用它们,这样当用户最终平移和放大地图时,它们就会保持静止。

So far in to my research I ve come to the conclusion that OpenLayers and Google Maps API are not for me as the map is relatively small and I don t need to tie it in to a larger map. Instead I think it s best to treat it as a biggish floating vector image. I ve also played around creating layer toggles straight in to an SVG but I really need them on a separate sidebar so they stay static when the user is eventually panning and zooming in to the map. I tried working with Raphaël and while I especially like the graphical side of it, I m struggling to work my Illustrator file in to it and the zooming/panning script I found isn t really working for me either.

那么我该走哪条路呢?我为我对事情的不了解道歉,但我在这里很失落,希望能朝着正确的方向前进。

Thank you! -Ilkka

最佳回答

Raphael JS is a very good Javascript vector-handling library, you may find it useful. By the way, this question has a link to a tutorial on it.

问题回答

jVectorMap用于将矢量地图嵌入HTML页面,它具有地图缩放和移动功能。我可以帮助将地图转换为适当的格式(您需要从源文件中提取svg路径)。

我认为Dojo与jQuery结合使用HTML和SVG可以给您带来不错的结果。Dojo是一个更像图形的JS库,它与SVG和jQuery配合得很好,使您能够比大多数其他JS框架更快地使用HTML

You should try Raphael by all means, perhabs in conjunction with jquery. Using dojo sounds a bit like an overkill.





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签