Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const mapHere = document.getElementById("map");
- const marker0 = {
- lat: -38.414506,
- long: 144.851985
- };
- const marker1 = {
- lat: -38.404351,
- long: 144.841955
- };
- const line = [marker0, marker1];
- if (mapHere) {
- const map = new google.maps.Map(mapHere, {
- zoom: 8,
- mapTypeId: google.maps.MapTypeId.HYBRID,
- center: marker0
- });
- const marker_0 = new google.maps.Marker({
- position: marker0,
- map: map,
- title: "marker 0"
- });
- const marker_1 = new google.maps.Marker({
- position: marker1,
- map: map,
- title: "marker 1"
- });
- const lineSymbol = {
- path: 'M 0,-1 0,1',
- strokeOpacity: 1,
- scale: 4
- };
- var flightPath = new google.maps.Polyline({
- path: line,
- geodesic: true,
- strokeColor: '#f8fc09',
- strokeOpacity: 0,
- icons: [{
- icon: lineSymbol,
- offset: '0',
- repeat: '20px'
- }],
- strokeWeight: 2
- });
- flightPath.setMap(map);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement