I have a written a simple code which would display the location on the google map. But for some reasons its not showing up. Any idea whats happening?
<html>
<head>
<title>Google Maps </title>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
(function() {
window.onload = function(){
var latlng = new google.maps.LatLng(57.8, 14.0);
var options = {
zoom: 6,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('map'), options);
}
})();
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
There are various reasons why this happens. It's possible the location accuracy option is disabled, you're using an older version of the app, or you don't have proper access to the internet. The Google Maps app itself may have issues, too. Cache files and other app data can sometimes cause various issues with the app.
Maps.google.com is UP and reachable by us.
Add a shortcut to get directions On your Android phone or tablet, go to the widget section. Touch and hold the widget and drop it on your Home screen.
On October 15, 2021, the My Maps app for Android devices will be shut down and removed from the Play Store. To continue to use My Maps on your mobile device, open your web browser and go to mymaps.google.com.
You need to set dimensions for your map container, try this:
<style type="text/css">
#map {
width: 500px;
height: 500px;
}
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With