The Maps API is a JavaScript API that runs entirely in the browser. It's completely independent of the language or framework that you use on the server.
This means that any or all of the existing JavaScript examples can be used in your site. They don't need to be specially adapted to work with Scala or Lift. The only involvement your Lift code would have with the Maps API would be to: 1) Host any static or dynamic HTML and JavaScript files you need. 2) Handle any requests to fetch or upload data that your JavaScript code makes (or push data to the JavaScript code using Comet, same principle either way) For example, suppose you have a Maps API page that lets your visitor search your database for points of interest and displays them on a map. You'd have separate browser and server code for this. In the browser, JavaScript code creates and manages the map using the Maps API. When the user does a search, you use jQuery's getJSON() or ajax() or any similar function to send a GET request to your server. On the server, your Lift code receives that GET request and generates a JSON data object which it sends back to the browser. Back in the browser, your JavaScript code receives that data and makes the appropriate Maps API calls to display markers or whatever you want. Note the clean separation here: Your JavaScript code doesn't know or care that the server code is written in Scala and Lift. It just asks for JSON data when it needs it and the server sends it back. The server code doesn't know or care that that the browser is using the Maps API. It just has to provide the correct JSON response for any particular GET. So, don't worry if you don't find examples of using the Maps API with Lift. The examples you really need are: * Using the Maps API in JavaScript * Requesting JSON data from JavaScript (or using Comet, or whatever) * Handling JSON data requests in Lift (GET, POST, Comet, etc.) With those you can piece together what you need. -Mike On Sun, Sep 5, 2010 at 12:30 PM, Langley <[email protected]> wrote: > Does anyone know of any good examples using Google Maps API in a scala > based liftweb application? > > Thanks in advance > -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
