Friday 22 January 2016 0 comments

To display location on google map with latitude and longitude



<html>
<dsp:page>
<head>
<script src="http://maps.google.com/maps?file=api&amp;amp;amp;amp;amp;v=2&amp;amp;amp;amp;amp;sensor=false&amp;amp;amp;amp;amp;key=<<<<< google API KEY comes here. modify this>>>>>"
            type="text/javascript"></script>
    <script type="text/javascript">


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

 
    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng( 29.566603 , -98.4812067), 13);
        map.openInfoWindow(map.getCenter(),
                           document.createTextNode("Hello, world"));
      }
}
    </script>
</head>

<body onload="initialize()" onunload="GUnload()">
    <div id="map_canvas" style="width: 500px; height: 300px"></div>
</body>
 </html>

NOTE: Using google maps we can display single location on the single map or multi locations in a single map.
Kindly go through the links given below for more details.

and for converting
COVERTING DEGREES AND MINUTES TO DECIMALS: go through below link 
degrees and minutes to Decimals

 


REFERENCES: http: //www.geoplaner.com/

1 comments

Integration of ATG with Rest Web Services


Step 1: Create a folder say ‘REST’ in your project. 

Step 2: Create a sub-folder say ‘/config / atg /rest’ and again a sub-folder as ‘registry’ in your project.

Step 3: In registry folder, create a File with  “ ActorChainRestRegistry.properties ” name.

Step 4: In ActorChainRestRegistry.properties which is a out of box component contains all the OOB REST services registered by default, register all the URI’s that are customized/ added i.e.,mention the path of properties file with the required method names extended.

Step 5: That property file contains the path of the actor file as “definitionFile = aaa.xml”.

Step 6: Define all your actors in aaaActor.xml with required inputs and outputs.

Step 7: Provide the REST module in build modules of your build script
 
Sample ActorChainRestRegistry.properties:

registeredUrls+=\
/atg/userprofiling/ProfileActor/addresses,\
/atg/userprofiling/ProfileActor/creditCards,\
/atg/userprofiling/LoginActor/loginWithFB,\
/atg/userprofiling/
LoginActor/loginloginWithFB-success,\
/atg/userprofiling/
LoginActor/loginloginWithFB-error

 here LoginActor is our properties file and loginWithFB, loginloginWithFB-success, loginloginWithFB-error are the actor chains in the defined propertiesfile.


Sample LoginActor.properties

$class=atg.service.actor.ActorChainService //similar for all files

definitionFile=/atg/userprofiling/loginActorDefinition.xml


In the loginActorDefinition.xml we will define the actor chains.



NOTE: Complete Notes regarding REST web services and actor chains and other detailed explanation will be provided in next posts
 


 
;