Logicify / jquery-locationpicker-plugin

JQuery Location Picker plugin
MIT License
389 stars 260 forks source link

show path track on map #77

Closed waqasraza123 closed 8 years ago

waqasraza123 commented 8 years ago

Is this possible to show show path track on map??

nevenne commented 8 years ago

with polymer

waqasraza123 commented 8 years ago

any reference link?

nevenne commented 8 years ago

try google track on map tutorial

Sumragen commented 8 years ago

@waqasraza123 hi! Use polylines. For example

$('#us3').locationpicker({
    oninitialized: function () {
        var map = $('#us3').locationpicker('map').map;
        var flightPlanCoordinates = [
            {lat: 37.772, lng: -122.214},
            {lat: 21.291, lng: -157.821},
            {lat: -18.142, lng: 178.431},
            {lat: -27.467, lng: 153.027}
        ];
        var flightPath = new google.maps.Polyline({
            path: flightPlanCoordinates,
            geodesic: true,
            strokeColor: '#FF0000',
            strokeOpacity: 1.0,
            strokeWeight: 2
        });
        flightPath.setMap(map);
    }
});