0

EDIT:

  1. How is it possible to get a DirectionsResult json object from Google maps Web Service APIv3 without breaking the "laws" of xss?

  2. if so, how is it possible to parse that result and show it on a map (in the js API I use DirectionsRenderer) ?

I can do the above with the js API, but am failing miserably with the Web Service. also, use of JQuery / JQM is available.

Any ideas?

Pingi
  • 342
  • 3
  • 11
  • You don't need the whole JavaScript interpreter/runtime just to parse JSON. You can find JSON parsers written in Java. – Pointy Jan 23 '12 at 14:19

2 Answers2

1

Sounds like you don't actually want to execute Javascript, you just want to parse JSON. There are many libraries available to do this.

funkybro
  • 8,432
  • 6
  • 39
  • 52
0

I recommend you to use Javascript OpenLayers Library displaying map data including Google Maps in most modern web browsers, with no server-side dependencies and Vaadin's OpenLayers Wrapper which contains server side wrapper component for OpenLayers Maps.

Check out some of the applications that were built using these tools:

http://trac.osgeo.org/openlayers/wiki/Gallery

Korhan Ozturk
  • 11,148
  • 6
  • 36
  • 49
  • Thakns Korhan, does this support Routing? Directions? UTF-8? location searches in other languages? – Pingi Jan 23 '12 at 15:01
  • Your welcome, Pingi. OpenLayers support both routing and directions. You can find plenty of useful source in the web for these characteristics of the library. Furthermore, you can set your program's character encoding in your application since you will be developing with Java. – Korhan Ozturk Jan 23 '12 at 15:21