Skip to content

Instantly share code, notes, and snippets.

@Pan-Maciek
Created September 23, 2016 18:46
Show Gist options
  • Save Pan-Maciek/fb161c75d3494a86d9c1b104ccc42fd6 to your computer and use it in GitHub Desktop.
Save Pan-Maciek/fb161c75d3494a86d9c1b104ccc42fd6 to your computer and use it in GitHub Desktop.
var fenway = new google.maps.LatLng(42.345573, -71.098326)
$("#map").gmap3({
map: {
options: {
center:[50.0469245, 19.9208745],
zoom: 13
},
streetviewpanorama: {
options: {
container: $(document.createElement("div")).addClass("googlemap").insertAfter($("#draw")),
opts:{
position: fenway,
pov: {
heading: 34,
pitch: 10,
zoom: 1
}
}
}
},
events: {
click: function (m, e) {
setMarker([e.latLng.lat(), e.latLng.lng()])
addBookMark("miejsce" + markers.length, [e.latLng.lat(), e.latLng.lng()], m.zoom)
markers.push({
cords: [e.latLng.lat(), e.latLng.lng()],
name: "miejsce" + markers.length,
zoom: m.zoom
})
$("#map").gmap3({
map: {
streetviewpanorama: {
options:{
opts:{
position: new google.maps.LatLng(42.345573, -71.098326),
//[e.latLng.lat(), e.latLng.lng()],
pov: {
heading: 34,
pitch: 10,
}
}
}
}
}
})
},
dragend: function (e) {
$("#lng").val(e.getCenter().lng)
$("#lat").val(e.getCenter().lat)
}
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment