<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=geometry,places&ext=.js"></script>
<script src="https://cdn.jsdelivr.net/gh/geocodezip/v3-utility-library@master/archive/maplabel/src/maplabel.js"></script>
<div id="map_canvas"></div>
<div class="overlay-gray-banner">
<div class="uk-container uk-container-center">
<h1>Contact Us</h1>
<p class="banner-short-desc">We are happy to hear from you. Please contact us through the form below and we will get back to you as soon as we can.</p>
</div>
</div>
CSS
#map_canvas {
width: 100%;
height: 400px;
}
JavaScript
var geocoder, map;
function initialize() {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(58.5452824, -92.4986259);
var myOptions = {
zoom: 15,
center: new google.maps.LatLng(34.515233, -100.918565), // latlng,
mapTypeControl: false
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
// codeAddress();
var mapLabel = new MapLabel({
text: 'Ali desidero ve girişim ortaklığına ait bir yerdir burası',
position: new google.maps.LatLng(34.515233, -100.918565),
map: map,
fontSize: 8,
strokeWeight: 3,
align: 'center'
});
}
var icon = {
url: 'images/map_icon.png'
};
function codeAddress() {
var address = "New York, NY";
geocoder.geocode({
'address': address
}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
address: address,
icon: icon,
position: results[0].geometry.location
});
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
jQuery(document).ready(function () {
initialize(); //run the map
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.