Search Posts

Category: google-maps

Location coordinates blank in service.nearbySearch in ionic2 using google-geolocation

I am trying to use google maps in my application.I want to show nearby places in map. I have done it using this link in this link location.json file is used and location coordinates passed to marker. what i want to do is i want to take the location coordinates in run time and put marker in map.I am getting the list of places but location coordinated are blank. below is my code […]

marker information is not updating on marker click – angular

I want to display information about the marker on right side of map on marker click.right now after marker click a modal window will appear in that i am entering a mobile number after that corresponding marker information is displaying, after that clicking on the other marker view is not updating , same view is retaining . here is the code for (var i = 0; i < $scope.centers.length; i++) { var marker = new […]

how to set LatLng as a numeric value

I am having trouble trying to display markers on a map from a JSON file. The map loads fine, yet it doesn’t display any markers on it…when I look into the javascript console I can see I am getting a continuous error (although the lat and lon objects all display the correct positions with console.log). I will post the error below along with my marker functionality. Any help is appreciated, thank you! the error: the […]

Markers not loading in Google Maps

I am able to load markers from a local database I include in my Ionic app that is just a simple array of lat/lon coords. The trouble is when I try and load them from a JSON file on the web. Any help would be appreciated. Thanks! this is the call I use: get(‘assets/data/markers.json’) And that all works fine for populating the map from a local data file. Now my issue is that I would […]

angular $q and google.maps.api

I’m struggleling since hours trying to understand how is working $q. I’m trying to make it works with a function from the google.maps api but I’m definitely not able to answer it by myself or maybe I totally don’t understand $q. I hope you’ll be able to help me or at least give me some explanation. Here is a very simple example of what I would like to do : var geocoder = new google.maps.Geocoder(); […]

Google Map API AngularJS – Error on InforWindow when clicking ng-click buttons.

Finally figured out how to add a map in Angularjs, with icons. Added some content but now wanted to uses a clickable button on the content…which unfortunately does not work. I’m pretty sure it’s a $compile error, I just can’t quite figure it out. Any help would be great 🙂 This is my full code: app.controller(‘travelCtrl’, [‘$scope’, ‘$compile’, function($scope, $compile) { $scope.initialize = function() { $scope.mapOptions = { zoom: 3, center: new google.maps.LatLng(39.95606977009003, -75.146484375) }; […]

Angularjs Google Map API Integration

I’m trying to add a google map in angular JS… and have been struggling. I didn’t want to use one of the angular dependencies, but simulate the ‘async defer’ on the Google JS API site. I’m pretty new to Angularjs but get the concept of keeping things assigned to the controllers scope. Pretty sure it’s just something dumb, but not sure what… any help would be awesome 🙂 (function () { ‘use strict’; app.controller(‘travelCtrl’, [‘$scope’, […]

displaying infomation view in ionic 2 geolocation

please i want add an information view on my map, currently when clicked on a location is just showing an empty information view please help me enter image description here my controller is $ionicSideMenuDelegate.canDragContent(false) $ = {center: {latitude: 40.1451, longitude: -99.6680 }, zoom: 8 }; $scope.options = {scrollwheel: true}; $scope.markers = [] // $scope.infor // get position of user and then set the center of the map to that position $cordovaGeolocation .getCurrentPosition() .then(function (position) { […]

Way-points – How can i remove a specific way-point from google maps?

I am making this app with the help of google maps, i am successfully adding waypoints in a route and making a route between them. But on dbclick i remove that way point from the map. Now when i make the route it includes the deleted waypoint too. Because of the fact it does not delete from the waypoint array. The question is how can i remove a specific waypoint from the waypoint array. I […]

Loading address data into google maps from database using Angularjs

I am using angularjs for my application.I am trying to load the address from user_address table in database and display it on map on load. Here is the script i am using to load google maps <script async defer src=” key=myKey&callback=initMap”> </script> Here is the html <div id=”map”></div> <div id=”repeatmap” data-ng-repeat=”marker in markers | orderBy : ‘title'”> <a id=”country_container” href=”#” ng- click=”openInfoWindow($event, marker)”> <label id=”namesformap” >{{marker.title}}</label></a> </div> Here is the Controller.js var mapOptions = { […]

Next Page »