Created by Serkan Haytac / Urban4M
git clone https://github.com/serkanh/google-maps-demo.git
cd google-maps-demo
git checkout basicmap
git clone https://github.com/serkanh/google-maps-demo.git
cd google-maps-demo
git checkout mapwithmarker
... map = new google.maps.Map(document.getElementById('map'),mapOptions);
--> marker = new google.maps.Marker({
position:mapOptions.center
})
marker.setMap(map);
} <--
... google.maps.event.addDomListener(window, 'load', initialize);
}
git clone https://github.com/serkanh/google-maps-demo.git
cd google-maps-demo
git checkout mapwithicon
marker = new google.maps.Marker({
position:mapOptions.center,
icon:'urban4m.png'
})
git clone https://github.com/serkanh/google-maps-demo.git
cd google-maps-demo
git checkout mapwithmultiplemarkers
... map = new google.maps.Map(document.getElementById('map'),mapOptions);
var locations = [
['Miami 1',25.7616798, -80.19179021000000],
['Miami 2',25.7616798, -80.20179022000000],
['Miami 2',25.7616798, -80.21179023000000]
]
var marker, i
for (i = 0; i < locations.length; i++){
marker = new google.maps.Marker({
position:new google.maps.LatLng(locations[i][1],locations[i][2]),
map:map
});
}
}
... google.maps.event.addDomListener(window, 'load', initialize);
git checkout markeranimatedbounce
...marker = new google.maps.Marker({
position:new google.maps.LatLng(locations[i][1],locations[i][2]),
map:map,
animation: google.maps.Animation.BOUNCE
});
git checkout markeranimateddrop
...marker = new google.maps.Marker({
position:new google.maps.LatLng(locations[i][1],locations[i][2]),
map:map,
animation: google.maps.Animation.DROP
});
git clone https://github.com/serkanh/google-maps-demo.git
cd google-maps-demo
git checkout mapwithpolygon
var miami1=new google.maps.LatLng(25.7616798, -80.19179021000000);
var miami2=new google.maps.LatLng(25.8616798, -80.20179022000000);
var miami3=new google.maps.LatLng(25.7616798, -80.31179023000000);
var locations = [miami1,miami2,miami3]
var tri=new google.maps.Polygon({
path:locations,
strokeColor:"#0000FF",
strokeOpacity:0.8,
strokeWeight:2,
fillColor:"#0000FF",
fillOpacity:0.4
});
tri.setMap(map);
}
git clone https://github.com/serkanh/google-maps-demo.git
cd google-maps-demo
git checkout geocode
var map;
function initialize() {
geocoder = new google.maps.Geocoder();
var latLng = new google.maps.LatLng(25.7616798,-80.19179020000001)
var mapOptions = {
zoom: 13,
center: latLng
};
map = new google.maps.Map(document.getElementById('map'),mapOptions);
}
function codeAddress() {
var address = document.getElementById('address').value;
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,
position: results[0].geometry.location
});
} else {
alert('Geocode failed, reason was ' + status);
}
});
}
git clone https://github.com/aboutPLACE/cheapeats.git
cd cheapeats
git clone https://github.com/aboutPLACE/vibe.git
cd vibe