Tuesday, March 26, 2013

ADF 11G : How to Integrate Google Map with ADF ?

ADF 11G : How to Integrate Google Map with ADF ?
h





First get the API key(ex, AIzaSyCMo41QVf8uVaE1LDNaTCrkU_edbGBv5yk) from Google Map






















 google.load("maps", "2.x");
                    // Call this function when the page has been loaded
                    function initialize() {
                    var map = new google.maps.Map2(document.getElementById("map"));
                    map.setCenter(new google.maps.LatLng(0,0), 1);
                    map.addControl(new GLargeMapControl());
                    map.addControl(new GMapTypeControl());
                    }
                    google.setOnLoadCallback(initialize);

function doNavigate(evt)
                          { long = evt.getSource().getProperty("long");
                            lat = evt.getSource().getProperty("lat");

                            var latlng = new GLatLng(lat,long);
                            var map = new google.maps.Map2(document.getElementById("map"));            

                            map.addControl(new GLargeMapControl());
                            map.addControl(new GMapTypeControl());

                            map.setCenter(new GLatLng(lat,long), 16);
                            map.addOverlay(new GMarker(latlng));
                          }