Created
September 23, 2016 18:46
-
-
Save Pan-Maciek/fb161c75d3494a86d9c1b104ccc42fd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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