Salem's Euphoria

Sharing Experience

Leave a comment

Google Maps , Flex and JSP

The sample application provided on this post explains a simple way of using Google Maps API on Flex to mark some places and add a discription to the Marker.

Google Maps & JSP

Google Maps API Sample

To use the jsp, we first define a HttpService objet in our MXML  with a result and an error handler:

<mx:HTTPService id="saveCoordSrv"

then we need a model for our entity to manage , I preferred to make it binded to input fields(inAdress,inLat,…):

<!-- The marker model -->
<mx:Model id="coordToSave">

and then just make the call :


In the insert JSP, we just collect sent params using request.getParameter(“param_name”) :

String adr = request.getParameter("adress");
String lat = request.getParameter("lat");

and then manipulate your database driver to make an insert/delete/update query. In this sample i used MySql.

Next time we’ll be discussing google maps events use.  If you need any explanation about the code, please do not hesitate 🙂

Send me an email ( to get Source Code(I uploaded it in many providers but links are dead).