Announcement Announcement Module
Collapse
No announcement yet.
Spring integration with any Map (Google Maps, Yahoo Maps etc.) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring integration with any Map (Google Maps, Yahoo Maps etc.)

    Hello,

    I do want to start implement my server-side application in Spring MVC but before starting i need to know how can I integrate my Spring with GMaps or any other Map service?! is there any Maps API for Spring?

    Any help would be appreciated!

  • #2
    First you posted in the wrong forum. The forum is for Spring Integration project http://www.springsource.org/spring-integration
    But anyway, I think i can answer.
    No there is no Spring API for Maps, but I don't think we need one since for example Google provides everything you need for both
    - static maps (REST API) http://code.google.com/apis/maps/doc...on/staticmaps/
    - and dynamic (Javascript) http://code.google.com/apis/maps/doc...on/javascript/

    There is really no Java code involved on the server side. For static the REST request returns an Image and for dynamic its all client side Javascript

    Comment


    • #3
      But how it will work?! Can you pls explain the working mechanism on below structure:

      Project will have client-side (its an Android app) and server-side (in Spring MVC) parts. Server-side will get user coordinates from client-side application through web services and according to these coordinates I'm going to find out the nearest direction to get to location B and also server-side application will prefer traffic less direction (i'll simulate traffic on server-side assigning each street surrent speed limit)...and finally direction from user to B will be sent back to user via web services...

      Where I'll use Javascript here? how to integrate them on server-side?! is there any examples related?! (i'm newbie in spring)

      Comment


      • #4
        I suggest you look at Google API. The use case you are trying to accomplish is not Spring related. You may use Spring controller to submit the data and Spring will make the REST call to Google API to get what it needs and you can transmit it back to the client or you can just simply use Google API directly from the client. They have tons of samples that you can try

        Comment


        • #5
          Ok, thanks a lot

          Comment


          • #6
            Spring web flow+google map integration with java script api

            hello plz help me?,when i am implementing google map with spring web flow framework,

            1.<script type="text/javascript">
            2. var map;
            3. function initialize() {
            4. var myOptions = {
            5. zoom: 8,
            6.center: new google.maps.LatLng(-34.397, 150.644),
            mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            map = new google.maps.Map(document.getElementById('map_canva s'),
            myOptions);
            }

            google.maps.event.addDomListener(window, 'load', initialize);
            </script>
            </head>
            <body>
            <div id="map_canvas"></div>



            in 6 line it give error,google is undefined,y????????????

            Comment


            • #7
              You posted on the wrong forum. The forum is for Spring Integration project http://www.springsource.org/spring-integration
              Please repost to the webflow forums

              Comment

              Working...
              X