Msdn windows phone push pin
First I am gonna add the pushpin as map item template in the resource section. Then I am going to add this to the Bing map control. Now run and check the output screen below. Labels Bing databind pushpin collection Dynamic pushpin binding Map Map control Metro style Modern style multi pushpins Pushpin template pushpind Windows 8. Labels: Bing databind pushpin collection Dynamic pushpin binding Map Map control Metro style Modern style multi pushpins Pushpin template pushpind Windows 8.
Unknown 12 November at Essentially you would add a mouse down event to the pushpin which would set a flag to capture to allow dragging the pin. Then you would use the mouse move event on the map to reposition the pushpin and the mouse up event on the map to turn the dragging flag off.
You will also likely want to display panning of the map. Try capturing the center value when the mouse down event fires, then set the center of the map to this value constantly on the mouse move event when the drag flag it turned on.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Is there a way to move adjust a pushpin position manualy on windows phone 8 using bing maps? Ask Question. Asked 7 years, 3 months ago. Active 7 years, 3 months ago. Viewed times.
Add new RowDefinition ; MyGrid. Transparent ; pin. The mapping services can calculate routes from a given starting point to a given ending point. The Map control itself is capable of displaying the route, which can be calculated as driving routes or walking routes.
The code is fairly straightforward. The static function MapRouteFinder. GetDrivingRouteAsync is passed a starting point, an ending point, an optimization parameter described later and a parameter that specifies restrictions also described later. This is useful when routes are calculated while the user is driving. The first few legs of the route will contain maneuvers that get the user to the best possible route, which is especially useful within cities where the user might be on a one-way road heading in the wrong direction.
Changing the heading to in the code in Figure 8 causes the route to be calculated such that it contains a legal way to change directions.
Once you have a result from the MapRouteFinder. If a route was successfully retrieved, it can then be displayed as turn-by-turn instructions. The route can also be visually displayed in a Map control. The MapRoute object contains summary information that indicates how long it should take to traverse the route and the length of the route in meters.
The information that will be shown to the user is in the MapRouteManeuver object. The Kind property is also very useful. Sample values include left turn, right turn, and so forth. It can be used to associate an image with each maneuver. A full list of possible values for the Kind property can be found at bit. Figure 10 shows what these directions would look like in an application.
To show a route in a Map control you first need to create a view of the route using the MapRouteView class. Once you have a view you can add it to the Routes collection of the Map control.
This function even comes with an animation parameter that provides a visual effect as the Map control is being redrawn to accommodate the route. Figure 12 shows what this would look like in an application. Route Optimizations Driving routes can be optimized with respect to time, distance and traffic. The MapRouteOptimization enumeration provides the values in Figure 13 for optimizing the calculation of a route. These values can be logically combined.
For example, the following code is a restriction that prevents the use of highways and toll roads:. Walking Routes Calculating walking routes is very similar to calculating driving routes. The following code calculates a walking route based on the same end points as the driving route example:. GetWalkingRouteAsync is used to perform this calculation.
Unlike the corresponding function for calculating driving routes, this function has no overloads that allow for optimizations, restrictions or current heading. Also, the current heading can be easily changed. Add the Silverlight for Windows Phone Toolkit to your project. I used NuGet for it. Reference it in the App. Add it to our custom UserControl like this:.
0コメント