Select to view content in your preferred language

notification when user moves map

3763
11
08-12-2015 01:46 AM
Armandvan_der_Zwan
Emerging Contributor

Hi all,

I can't seem to find a way to get notified when the user has moved the map.

I want to know this, because when he/she did, I don't want to update the map to the user location anymore.

Any idea's?

Armand.

0 Kudos
11 Replies
DanPatterson_Retired
MVP Emeritus

Can you be more specific

  • What software?
  • Do you mean move it within the software? or removed offsite?
  • Do you want to include moves without saving or with?
  • Are notifications to be kept in a log file or do you want real time notification?

Elaborations would be useful.

Armandvan_der_Zwan
Emerging Contributor

Sorry, I'm on the iOS SDK, Objective-C.

So when a user moves the map with his finger, I would like to be notified.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Robert Scheitlin, GISP​  or Timothy Hales  can you move this to its rightful home...I don't have Moderator access to the main Developer's level

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Done

DavidLednik
Frequent Contributor

Hi Armand van der Zwan,

I'll assume this is for version 10.2.4

You can try implementing AGSMapViewTouchDelegate and using one of the didMoveTapAndHoldAtPoint: methods. This way you will know when the user stops panning the map.

But I don't quite understand what you mean by don't wan't to update the map to user location.

Can you explain in more detail please.

regards,

David

0 Kudos
Armandvan_der_Zwan
Emerging Contributor

Thanks. I will look into it.

I want the map not to center to the user location the moment the user moves the map.

0 Kudos
Armandvan_der_Zwan
Emerging Contributor

didMoveTapAndHoldAtPoint is not triggered when the user is moving the map...

0 Kudos
Armandvan_der_Zwan
Emerging Contributor

I got it working with:

// register for pan notifications

        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(respondToEnvChange:)

name:AGSMapViewDidEndPanningNotification object:nil];

Armandvan_der_Zwan
Emerging Contributor

Still not working. I can't figure out if the zoom/pan is user initiated, or otherwise.

0 Kudos