<title>"Auto Detect" Lokasi Sekitar Google Maps</title>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk&libraries=geometry"></script>
<div id="map"></div>
var markers = [
["Cemerlang Kemindo Abadi. PT", "Kota Kosong", "Jl. Taman Siswa No.35/43, Wirogunan, Mergangsan, Kota Yogyakarta, Daerah Istimewa Yogyakarta 55111, Indonesia", -7.8066567, 110.3778149],
["Transportasi Sari Rejeki", "Kota Kosong", "Jl. Dr. Soeradji Tirtonegoro No.190, Punden, Sumberejo, Klaten Sel., Kabupaten Klaten, Jawa Tengah 57424, Indonesia", -7.7172799, 110.5841084],
["RENTAL ALAT BERAT(DTS)", "Kota Kosong", "Dusun DADIREJO, Dusun II, Tlingsing, Cawas, Kabupaten Klaten, Jawa Tengah, Indonesia", -7.750473, 110.744113],
["RENTAL FORKLIFT 24 JAM JOGJA - YOGYAKARTA", "Kota Kosong", "Jl. Imogiri Barat KM 4,5 No. 42, Tanjung, Bangunharjo, Sewon, Bantul, Daerah Istimewa Yogyakarta 55188, Indonesia https://mitrakaryaforklift.co.id/", -7.8342519, 110.3743642],
];
var map;
var infowindow;
var image = '1.png';
var image2 = '0.png';
function initialize() {
var pusatRadius = new google.maps.LatLng(-7.805817, 110.377857);
map = new google.maps.Map(document.getElementById('map'), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: pusatRadius,
zoom: 17
});
var PusatMarker = new google.maps.Marker({
position: pusatRadius,
map: map,
// icon: image,
title: 'Lokasi Properti'
});
var circle = new google.maps.Circle({
map: map,
radius: 100, // in metres
fillColor: '#AA0000'
});
circle.bindTo('center', PusatMarker, 'position');
var request = {
location: pusatRadius,
radius: 100 /* jarak meter */
};
infowindow = new google.maps.InfoWindow();
createMarker(circle);
}
function createMarker(circle) {
var bounds = new google.maps.LatLngBounds(); // diluar looping
for (i = 0; i < markers.length; i++) {
pos = new google.maps.LatLng(markers[i][3], markers[i][4]);
if (google.maps.geometry.spherical.computeDistanceBetween(pos, circle.getCenter()) < circle.getRadius()) {
bounds.extend(pos); // di dalam looping
gambar = image2;
marker = new...
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.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
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!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.