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
The documents state
ReplyDeleteStart 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)