Hi everybody,

Is it possible to use Rhino to run the Google Maps JavaScript code
server-side (instead on the client's browser as is usually done)?

I would like to use Rhino to convert pixel coordinates to/from lat/lon-
coordinates on the server.

What I need to be able to do is to (i) load and execute the JavaScript
file,

  http://maps.google.com/maps?file=api&v=2&key=abcdefg

and (ii) perform something like

  function initialize()
  {
    if (GBrowserIsCompatible()) {
      var map = new GMap2(document.getElementById("map_canvas"));
      map.setCenter(new GLatLng(37.4419, -122.1419), 13);
    }

    // my conversion:
    var point = new GLatLng(-10, 10);
    return map.fromLatLngToContainerPixel(point);
  }

(The code for this comes more or less from <http://code.google.com/
apis/maps/documentation/
introduction.html#The_Hello_World_of_Google_Maps>.)

I suppose this is not so easy as Rhino probably does not provide a
browser environment?!

Many thanks for any guidance,
hbf
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to