Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8709691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:25:37+00:00 2026-06-13T04:25:37+00:00

I am creating an app for the iPhone using Cordova. I am not very

  • 0

I am creating an app for the iPhone using Cordova.
I am not very good with objective-c, but have written some plugins before, so I can if needed.

I have a list of locations (gps cords) for a chain of stores. I want to popup a notification whenever a user of the app is near one of the locations.

Does phonegap support this? If not, can anyone point me in the right direction about implementing this in objective-c?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:25:39+00:00Added an answer on June 13, 2026 at 4:25 am

    Yes, it does!
    First you should have a watchPosition for getting the new position of the user if it moves.

    For more information of watchPosition look here:

    http://docs.phonegap.com/en/2.1.0/cordova_geolocation_geolocation.md.html#geolocation.watchPosition

    Then, depending of the radius of nearness of the user to the point of interest you should notificate with the popup.

    EDIT

    If you’re using google maps first you should initialize the map and call the function geolocalization, then with the function calculateNearLocation looks in the array of POIs if the distance is less than 1Km, for example. If it does, it alerts with vibration.

    The code would be something as this using google maps:

      var watchID = null;
      function geolocalization()
      {
          //Each 3 seconds looks new position
      var options = { frequency: 3000 };
      watchID = navigator.geolocation.watchPosition(onSuccessG, onErrorG, options);
       }
    

    On success of the geolocalization:

      function onSuccessG(position) {
       var mipos = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); 
    calculateNearLocation(mipos);
     }
    

    For calculating if the user’s location is near a POI:

      function calculateNearLocation(mipos) {
       var indice = 0;
       $.each(listPOI, function() {
    
        var distanceBetween = Math.ceil(google.maps.geometry.spherical.computeDistanceBetween(new google.maps.LatLng(listPOI[indice].latitudes, listPOI[indice].longitudes), mipos));
    
        if(distanceBetween < 10000) {
            navigator.notification.vibrate(2000);
    
        }
        indice++;
    });
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an app for iPhone using phoneGap, but I'm sure it is not
I am creating an iphone app in which i have some vale in integer
Here I am creating an iPhone app using facebook api. I have loaded the
I'm creating an iphone app using xcode 4.2, and trying to use the AVFoundation
I've been creating an iPhone App using Core Data. First of all, does it
I am currently creating a point and click app for the iphone using cocos2d.
I'm creating an iPhone app that will have a preloaded set of locations with
I'm creating an iPhone app for a client who's not comfortable with allowing users
I'm currently creating an iPhone app and we need some testing with about 20~30
I'm creating a Map app in iPhone using MKMapView . I did successfully find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.