Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var map;
- function Initialize() {
- google.maps.visualRefresh = true;
- var Tabriz = new google.maps.LatLng(38.07147, 46.30068);
- var mapOptions = {
- zoom: 14,
- center: Tabriz,
- mapTypeId: google.maps.MapTypeId.G_NORMAL_MAP
- };
- map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
- var myLatlng = new google.maps.LatLng(53.40091, -2.994464);
- var marker = new google.maps.Marker({
- position: myLatlng,
- map: map,
- title: 'Tate Gallery'
- });
- marker.setIcon('http://maps.google.com/mapfiles/ms/icons/green-dot.png')
- }
- $("document").ready(function () {
- var W_Id = null;
- var valid = null;
- Initialize();
- //////////////
- //////////////
- ////////////////
- google.maps.event.addListener(map, "click", function (event) {
- // get lat/lon of click
- var clickLat = event.latLng.lat();
- var clickLon = event.latLng.lng();
- // show in input box
- document.getElementById("Longitude").value = clickLat.toFixed(5);
- document.getElementById("Latitude").value = clickLon.toFixed(5);
- var marker = new google.maps.Marker({
- position: new google.maps.LatLng(clickLat, clickLon),
- map: map
- });
- });
- ////////////////
- });
Add Comment
Please, Sign In to add comment