Waze for WP7 – yet another “It’s about time” feature

Up until now, when you wanted to browse the map you would scroll it around. Problem was that after you put your finger up I had the MouseLeftButtonUp event skipped and therefore caused incomplete experience where you drag and drag just to get to the same place.

public void refresh(List<UIElement> list)
    Dispatcher.BeginInvoke(() =>
        for (int i = MainGraphics.Children.Count - 1; i >= 0; i--)
            if (!(MainGraphics.Children[i] is MediaElement))

        foreach (UIElement ui in list)
            ui.IsHitTestVisible = false;

As you can see, each frame I remove all objects (except MediaElement so sound will be still available) and put the new objects instead.  Problem was that MouseLeftButtonDown event was caught by one of the objects on the map (Polygon, line, etc.) but as soon as the user moved the map around, this frame has been erased and new objects replaced the old ones. This causes SilverLight (and maybe other frameworks) to think you should not get the MouseLeftButtonUp event since the original control is not there anymore.

The “ui.IsHitTestVisible = false;” line directs SilverLight to pass the Left Button event ‘through’ all controls so it will be recieved by the canvas which is there all the time. This way I was able to receive the corresponding Button Up event and update the map current X,Y accordingly for the following scrollings.


This entry was posted in Waze, WP7 and tagged . Bookmark the permalink.

3 Responses to Waze for WP7 – yet another “It’s about time” feature

  1. CAO says:

    Is there any way to submit the waze app to the marketplace. I would love to use all these versions, but unlocking the app is the only way to get it on a live, non-developer phone, right? I don’t want to unlock the phone, that violates the eula.

    • Meir Tsvi says:

      Since the code is GPLv2 it might violate Microsoft’s policy – i’m stil checking this up.
      You can try chevron – they should be approved by Microsoft for dev-opening your device.

  2. CAO says:

    So GPL or GPLv2 violates Microsoft’s policy? And thus, you can’t put a very popular app up? There’s no way around it?

    Chevron is out of tokens. And the MS license is $99 per year. Any other suggestions (I ask because i am not tried to compromise my WP7 or develop for it, though I have for iPhone and Android)

    I’ve gone through your code and, if this worked out, would really to offer any help I could provide in stabilizing and making the App better. Just some thoughts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s