просто Google Maps повернуть пользовательский маркер JQuery Javascript

Я получаю все значения широты и долготы в базе данных FireBase и отображаю все значения на моей карте Google.

Моя проблема в том, что мои автомобильные образы не могут вращать водителей. Моя самостоятельная загрузка изображения SVG также.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=myapi"></script>
<script type="text/javascript">
onload = function() {

setInterval(function() {
$.ajax({
type: 'json',
url: 'google-ajax.php',
cache: false,
data: $('#dvMap').serialize(),
dataType: 'json',
success: function(data) {
var markers = data;

var mapOptions = {
center: new google.maps.LatLng(markers[0].lat, markers[0].lng),
zoom: 6,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var map = new google.maps.Map(document.getElementById("dvMap"), mapOptions);

var infoWindow = new google.maps.InfoWindow();

var lat_lng = new Array();

var latlngbounds = new google.maps.LatLngBounds();

for (i = 0; i < markers.length; i++) {var data = markers[i]
var myLatlng = new google.maps.LatLng(data.lat, data.lng);
lat_lng.push(myLatlng);var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: data.title,
icon: {
url: "http://localhost/uberx/admin/images/carnew.svg"}

//icon:"http://localhost/uberx/admin/images/carnew.svg"

});

latlngbounds.extend(marker.position);
(function(marker, data) {
google.maps.event.addListener(marker, "click", function(e) {
infoWindow.setContent(data.description);
infoWindow.open(map, marker);
});
})(marker, data);
}
map.setCenter(latlngbounds.getCenter());
map.fitBounds(latlngbounds);}
});

}, 5000);
}/*$(document).ready(function(){

onload(); //Call auto_load() function when DOM is Ready});

//Refresh auto_load() function after 10000 milliseconds
setInterval(onload,10000);*/
</script>

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]