I'm going to create an application that has a section for displaying the marked location on Google Maps. Everything works fine, but Google Map tools, such as navigationControl, mapTypeControland scaleControl, are hidden in some devices, such as Samsung Galaxy Tab 10.1 (they seem to go for the map). Even I changed their value to true, but they are still hidden on some devices.
Here is what I did:
<--! The HTML -->
<article class="container">
.
.
.
...( some tags go here )
<section class="span12">
<div id="mapDiv"> </div>
</section>
</article>
/*The Javascript*/
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
var position = new google.maps.LatLng(38.89655520572012, -77.03372955322266);
var myOptions = {
zoom: 15,
center: position,
mapTypeId: google.maps.MapTypeId.ROADMAP,
};
var map = new google.maps.Map(
document.getElementById("mapDiv"), myOptions);
var marker = new google.maps.Marker({
position: position,
map: map,
title:"We are here.",
});
}
</script>
Does anyone know why they are hiding?
Any help is appreciated.
Arash source
share