I am currently building an application using Cordova and Ionic. I need to implement a map in my app that will display only specific establishments, such as police stations or doctors' offices.
This is the code I have so far:
var posOptions = {timeout: 10000, enableHighAccuracy: false};
var myOptions = '';
$cordovaGeolocation
.getCurrentPosition(posOptions)
.then(function (position) {
var getLat = position.coords.latitude
var getLong = position.coords.longitude
myOptions = {
zoom: 16,
center: new google.maps.LatLng(getLat, getLong),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
console.log(getLat);
var map = new google.maps.Map(document.getElementById("map"), myOptions);
}, function(err) {
// handle error
});