|
| Hi All,
I am trying to show Google Map on jsr 168 portlet using Google Map API for that I developed sample html file which works perfectly and give me proper result after that I copied code and paste it in appropriate jsp file of jsr 168 portlet but when I see th
at page at that time I can't see whole map.
I can see only some part of page... I don't know what's happening...
Below is that code of jsp file...
Can anyone please let me know why it is happening... I am also trying to attach screen shot of page...
I will appreciate your help...
Thanks,
HJ
-----------------------------------------------------------
<DIV >
<script src="http://maps.google.com/maps?file=api&v=2"
type="text/javascript"></script>
<body onunload="GUnload()">
<div id="map" style="width: 650px; height: 390px"></div>
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b> </noscript>
<script type="text/javascript">
if (GBrowserIsCompatible()) {
function createMarker(point,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
// Display the map, with some controls and set the initial location
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.setCenter(new GLatLng(39.479395, 19.746094),1);
// Set up three markers with info windows
var point = new GLatLng(38.479395, 139.746094);
var marker = createMarker(point,'Marker 1')
map.addOverlay(marker);
// Asia
var point = new GLatLng(59.479395, 90.746094);
var marker = createMarker(point,'abc')
map.addOverlay(marker);
}
// display a warning if the browser was not compatible
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
}
</script>
</body>
</DIV>
-----------------------------------------------------------
|
|