Skip to main content

Is startUpdatingMyLocation mandatory to call the location manager"s didUpdateToLocation method in iphone sdk



I need a clarification that. Is startUpdatingMyLocation method mandatory to call didUpdateToLocation? isn't the didUpdateToLocation method automatically called when the location is updated?





Guy's please clear my clarification.


Comments

  1. The documents state


    Start standard location services by calling the startUpdatingLocation
    method. This service is most appropriate for applications that need
    more fine-grained control over the delivery of location events.
    Specifically, it takes into account the values in the desiredAccuracy
    and distanceFilter property to determine when to deliver new events.
    The precision of the standard location services are needed by
    navigation applications or any application where high-precision
    location data or a regular stream of updates is required. However,
    these services typically require the location-tracking hardware to be
    enabled for longer periods of time, which can result in higher power
    usage.

    For applications that do not need a regular stream of location events,
    consider using the startMonitoringSignificantLocationChanges method to
    start the delivery of events instead. This method is more appropriate
    for the majority of applications that just need an initial user
    location fix and need updates only when the user moves a significant
    distance. This interface delivers new events only when it detects
    changes to the device’s associated cell towers, resulting in less
    frequent updates and significantly lower power usage.

    Regardless of which location service you use, location data is
    reported to your application via the location manager’s associated
    delegate object. Because it can take several seconds to return an
    initial location, the location manager typically delivers the
    previously cached location data immediately and then delivers more
    up-to-date location data as it becomes available. Therefore it is
    always a good idea to check the timestamp of any location object
    before taking any actions. If both location services are enabled
    simultaneously, they deliver events using the same set of delegate
    methods.


    So you can use any of the two , either startUpdatingLocation or startMonitoringSignificantLocationChanges to get the location updates but you will have to call any one of these for the delegate method being called. (IMHO)

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex