Showing maps with markers


#1

Hi,

I Have a JSON code

{
id: 1,
title: "Rabat",
latitude: "33.9886539",
longitude: "-6.8708246"
},
-{
id: 2,
title: "Kenitra",
latitude: "34.249519",
longitude: "-6.589254"
},
-{
id: 3,
title: "Casablanca",
latitude: "33.586740",
longitude: "-7.551721"
},
-{
id: 4,
title: "Marrakech",
latitude: "31.629472",
longitude: "-7.981084"
},
-{
id: 5,
title: "Mohamedia",
latitude: "33.6586648",
longitude: "-7.4132709"
},
-{
id: 6,
title: "Paris",
latitude: "48.8588377",
longitude: "2.2770202"
}

And i want to show it on maps as markers but only the nearest one ?
Any tutorial for this specific case ?


#2

1 - https://www.joshmorony.com/ionic-2-how-to-use-google-maps-geolocation-video-tutorial/

2 - Calculate distance in km from longitude e latitude of google maps