Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Google Maps not showing in an OAF Page - V3 API

875812Sep 22 2011 — edited Nov 1 2011
Hi all,

We were using google maps v2 api and now I am trying to upgrade to V3. I just wrote a simple code to show just the map in an oaf page. I could see the div element but not the map. Below is the code in oa framework to call the js.


pageContext.putJavaScriptLibrary("myJsLibrary", "mapLibrary.js");
String googleJSRegistration = "<script language='javascript' src='http://maps.googleapis.com/maps/api/js?sensor=false'> </script>\n";


String loadFunc =
"var gmap = new GoogleInterface();" +
"gmap.enableLogging(" + loggingEnabled + ");" +
"function LoadGMap() { gmap.instantiateMap(); }";

Js file:


function GoogleInterface()
{
function instantiateMap()
{

// Map = new GMap2(document.getElementById('googleMap'));
var myOptions = {
zoom: 4,
center: new google.maps.LatLng(37.062500, -95.677068),
panControl: true,
mapTypeControl: true,
scaleControl: true,
streetViewControl: true,
overviewMapControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.SMALL
},
mapTypeId: google.maps.MapTypeId.ROADMAP
};

Map = new google.maps.Map(document.getElementById("googleMap"),myOptions);
}
`}

Could someone please help me with this?

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2011
Added on Sep 22 2011
3 comments
564 views