Ich habe Linienzug Karten wie diese Wie Google Map Api Polylinie mit Pin machen?
aber ich möchte setzen Stift in jedem Punkt erstellt worden ... wie diese:
Wie kann ich das tun?
dieser Code mein Javascript das ist ...
<script>
latawal = <?php echo json_encode($locationawal['lat'])?>;
longawal = <?php echo json_encode($locationawal['lon'])?>;
var GoogleMaps = function() {
var mapPolylines = function() {
var map = new GMaps({
div: '#gmap_polylines',
lat: latawal,
lng: longawal,
click: function(e){
console.log(e);
}
});
path = [
<?php foreach ($locationawal10 as $row){ ?>
[<?php echo json_encode($row['lat'])?>, <?php echo json_encode($row['lon'])?>],
<?php } ?>
];
map.drawPolyline({
path: path,
strokeColor: 'Red',
strokeOpacity: 0.6,
strokeWeight: 4
});
}
return {
//main function to initiate map samples
init: function() {
mapPolylines();
}
};
}();
</script>
Dank vor .... ich hoffe, jemand kann mir diesen ... sorry für mein schlechtes Englisch ..
Was sind 'latawal',' lngawal' und 'path'? Geben Sie ein Beispiel [Minimales, vollständiges, getestetes und lesbares Beispiel] (minimales, vollständiges, getestetes und lesbares Beispiel) an, das das Problem veranschaulicht. – geocodezip