Pin not visible when first added

Feb 6, 2010 at 10:36 PM

Hi Josh,

When adding a pin from code, do I need to call some sort of refresh to make it immediately visible?

It only appears after moving and returning to the location.


Feb 7, 2010 at 12:22 AM

Pushpins should become visible as soon as you add it to the items or databound collection.

Can you provide a code sample (ideally based upon one of the provided samples) that shows this behavior?

Feb 7, 2010 at 9:46 AM
Edited Feb 7, 2010 at 9:56 AM

Well, this morning (after a reboot) the Pin appears! Personally I blame cosmic rays or maybe global warming  #8^)

However, to avoid my total embarrassment it is still behaving a bit strangley:

I added a Surface Button to drop a pin at the screen centre using the code below.

If you try this from the Surface Demo before moving the Camera it's clearer to see; the pin slides in from the right, stops in the Atlantic for a second then moves to the correct position.

 private void btnDropPin_Click(object sender, RoutedEventArgs e)
            Point AimPoint = new Point(512,384);
            VELatLong myLatLong = map.PointToLatLong(AimPoint);
            VEPushPin pin = new VEPushPin(myLatLong);
            pin.Content = "Test Pin";
Feb 10, 2010 at 1:24 AM

For the pin animation, take a look at the response I just posted on this thread: