silverlight - disable map movement from flicks -


I have a map on which I display the pushpin dynamically, and with pushpin without interacting with the map (I can not disable the map just by setting it to IsEnabled = "False" , and I can not use an image of the map).

I have used the techniques shown here: which works very well for zooming and panning.

To expand this idea, I have set up an event handler for all the events that will appear to match:

  hold = "map_Hold" MapPan = " Map_mayppan "Mpzum =" Map_mpzum "Manipultionstarted =" Map_manipultionstarted "Manipultiondelta =" Map_manipultiondelta "Manipultionsompleted =" Map_manipultionsompleted "Museleftbuttondown =" Map_museleftbuttondown "Museleftbutonup =" Map_museleftbutonup "Targetviawchanged =" Map_targetviawchanged "Viawchangestart =" Map_viawchangestart "Viawchangind =" Map_viawchangind "Viawchangeonfrne =" Map_ViewChangeOnFrame "  

(In the event handlers I just set <> D> E Handle = true; )

Pan the map by creating a flipping speed on it (like how you can flip the next image in the photo app) / P>

Is there any way to disable the map completely? Or what is a way to interact with a pin if isEnabled = "False" ?

This post was just a while ago, so you've probably solved this problem so far. But today I had this problem and it was my solution. (It's not very elegant, but seems to work fine).

This problem occurred to me when pushpin was abandoned after dragging and dropping - although I had disabled the map_pan event while dragging a pushpin, the map still 'jerk' gesture when After dragging and dropping it will move from letting it push a push pin.

First of all, create a page, DespatchTimer will be scoped and one integer our counter:

  Dispatcher timer DTI = new dispatch timer (); Int counter = 0; After this, the MouseLeftButton Up Event of Pushpin, with its interval of dispatch timer, disabled in your map, with the interval of 1. Also start making tick event handler for.  
  Private Zero pushpin_MouseLeftButtonUp (Object Sender, MouseButtonEventArgs e) {map.isEnabled = false; Dti.Interval = New timezone (0, 0, 0, 0, 1); // 1 second dti.Start (); Dti.Tick + = new event handler (DTIC); // other code logic}   

Next, create a dti_Tick event, within the tick event, close the Dispatcher timer when it will run second in the tick event and enable the map again. Reset the counter for future use.

  void dti_Tick (object sender, EventArgs e) {counter ++; If (counter> = 1) {dti.Stop (); Map.IsEnabled = true; Counter = 0; }}   

This process has prevented any 'jerk' from coming after your drag and drop popin logic. This code can be customized more clearly, but hopefully this is helpful for you.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -