1

Is it possible to create markers along a country's border in Google Maps?

All the posts I've been able to find only give advice on how to create markers along the roads.

1

markers are icons that helps to represent the given lat and long coordinates. so as long as we have lat and long coordinates and as long as we know how to represent it on a map i think it is possible for us to represent the border of country with markers. something that you should to know is that a marker represents only a single coordinate point, and a border covers so may coordinates so to represent a border with a marker you must have many markers along the border

here is a sample java script code that display a marker on google map in this sample code you must set the center of the marker to lat and long of the needed border

   function BorderMap() {
    var myLatLng = {lat: 9.005401, lng: 38.763611};

    var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 4,
      center: myLatLng
    });

    var marker = new google.maps.Marker({
      position: myLatLng,
      map: map,
      title: 'Hello Addis!'
    });
  } 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.