Today I will tell you how to, you can use Google Map on your website. It's not only Google Map tutorial, also I'll show you how to you can show exact location by using latitude and longitude and much more with the source files, read all the details.
Our map will show likeas -
At first go here https://www.google.com/maps. By using the Google map search form, you can find your exact location or you can add your own location by another way. Suppose I've written San Diego in search form. After coming the search result, right click and click 'What is here'.
You'll see a pop-up, where showing latitude and longitude numbers. Copy and save the number. Now download the HTML/Javascript files from here.Actuallay here have our all source code.
The main thing is-
1. Open index.html and add the style andjQuery file.
2. Paste the code where you want to show the map.
3. Then openjs folder and open gmap . js -
Here line number 11 has latitude and longitude numbers, which indicate your place. Forusing custom icon see line number 42, where I've called an image. See line number 25, where I've shown, what you want to show after clicking the custom icon.
See the JS file carefully, you'll understand all things.
If you think you no need to custom icon, you can just copy paste the embed link. It's so easy way. After searching the place name, click on it.
Click 'Share' button, a pop-up will open, click 'Embed map' tab and copy the code.
Then paste the code in your website where you want.
Thanks.
-Mofizul
Our map will show like
At first go here https://www.google.com/maps. By using the Google map search form, you can find your exact location or you can add your own location by another way. Suppose I've written San Diego in search form. After coming the search result, right click and click 'What is here'.
You'll see a pop-up, where showing latitude and longitude numbers. Copy and save the number. Now download the HTML/Javascript files from here.
The main thing is-
1. Open index.html and add the style and
2. Paste the code where you want to show the map.
<id="map_wrapper"> div
<div id="map_canvas" class="mapping"></div>
</> div
3. Then open
jQuery function ( $) { (
// Asynchronously Load the map API
script = document var . createElement 'script'); (
script . = "http://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize"; src
document body . . appendChild script); (
});
initialize function ) { (
map; var
// Set the latitude & longitude for our location (London Eye)
var = new google myLatlng maps . LatLng . 32.722628, -117.174859); (
var = { mapOptions
: center , // Set our point as the myLatlng location centre
: 14, // Set the zoom level zoom
: 'roadmap' // set the default map type mapTypeId
};
// Display a map on the page
= new google map maps . Map . document ( . getElementById "map_canvas"), ( ); mapOptions
// Allow our satellite view have a tilted display (This only workscertain locations) for
map . setTilt 45); (
// Create our info window content
var infoWindowContent = '<div class="info_content">' +
'<h3>Themepack LLC</h3>' +
'<p>Dhaka, Bangladesh</p>' +
'<>Web: < p href="http://themepack.net" target="_blank">http://themepack.net</a></p>' + a
'<>Blog: < p href="http://ithousebd.blogspot.com/" target="_blank">http://ithousebd.blogspot.com</a></p>' + a
'<>+88 01738 631 658</p>' + p
'</>'; div
//the Initialise inforWindow
var = new google infoWindow maps . InfoWindow . { (
: content infoWindowContent
});
// Add a marker to the map based on our coordinates
marker = new google var maps . Marker . { (
: position , myLatlng
: map, map
: 'Themepack LLC., Dhaka', title
"": 'images/gmaplogo.png' icon
});
// Display our info window when the marker is clicked
maps . event . . addListener marker, 'click', function ( ) { (
infoWindow open . map, marker); (
});
}
Here line number 11 has latitude and longitude numbers, which indicate your place. For
See the JS file carefully, you'll understand all things.
If you think you no need to custom icon, you can just copy paste the embed link. It's so easy way. After searching the place name, click on it.
Click 'Share' button, a pop-up will open, click 'Embed map' tab and copy the code.
Then paste the code in your website where you want.
Thanks.
-





vai ami akta noton place google map a add korta chai jodi akto help kortan.plz.
উত্তরমুছুনHave you learned in the mean time how to use Google map?
মুছুন