How to integrate google map in struts2 application
I need to integrate the google map inside my struts2 application. How can i d开发者_开发问答o this ?
Thanks
Google Map is java script based API all you can provide it the required data which it will send to the Google API server to send back the results.
All you can do is to prepare the required data in side the Action class which needs to be send to Google MAP API like latitude,longitude or any address component etc.
Rest how you will handle Google geo code functionality is at jsp level.
I have found a link http://googlemap-struts2.blogspot.com/2009/12/dynamic-google-map-with-struts2.html which shows how this must be done. I hope this works too :)
This is the best and most simple way to add google maps to struts2 web app https://github.com/lalotech/struts2-map-plugin
Lot of javascript is avoided and you can do it struts2 way i.e using tag lib.
Wonderful and needs more exposure.
精彩评论