How to save bing map to image on windows phone 7.1 - c#

I have a map allow user marked your location. I want to save this MapView.

I am not sure if it's possible to save a map view as an image.
However, you could use the imagery REST service from Bing Maps to generate images. See this link: http://msdn.microsoft.com/en-us/library/ff701724.aspx
Your other option is to take a screen shot of the whole screen. See this link on how to do this:
http://www.developer.nokia.com/Community/Wiki/index.php?title=How_to_capture_screen_programmatically_in_Windows_Phone_7&ampdiff=184613&ampoldid=184561

Related

Windows Phone 8.1 show nearby places on map c#

I have create one windows phone app. In this app, I am using MapControl to show user current location on map.
xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps"
<Maps:MapControl Grid.Row="0" Name="myMap" LandmarksVisible="True" TrafficFlowVisible="True" PedestrianFeaturesVisible="True">
</Maps:MapControl>
When user start the app, it show his/her current location. Here I want to show nearby places such as restaurant, petrol pumps and all others available on maps. In map control you can see I have added LandmarksVisible="True". But it is not showing all the places. When I start default Maps app provided by Microsoft in my phone, it shows me all the places around me. But in my project I can't see.
Note: I have also added MapServiceToken to myMap.
How can I show nearby places ?
It isn't possible to do with just a MapControl. What you need to do is to fetch POIs from some kind of API, e.g. Google Places API (perhaps Bing has something similar), parse the result and display POIs you got on the map using pushpins.

WP8.1 Live Tile with badge

I've two questions regarding TileSquare71x71IconWithBadge/TileSquare150x150IconWithBadge/TileWide310x150IconWithBadgeAndText templates.
Why do I have to set "image" attribute? I provided all the logos (in visual assets in package manifest), why doesn't the app just grab the icons from there?
Where can I find logo templates for those tiles? I can't seem to get it to look right using regular app logos.
You don't need to update the tile to set a badge. If you want the default tile plus a badge then you can just update the badge and leave the tile alone.
The *IconWithBadge tiles allow for custom icons, which is why you need to set the image. You won't necessarily use the app's default icon. For example, the Phone app changes its icon from a phone to a phone with a tape to indicate the presence of voice mail messages.
You can find descriptions of the templates and example XML in the tile template catalog. Also see Details on sizing, padding, scaling, and transparency for Windows Phone Store apps

How to use a specific google map with WP8 Maps control - C#

I want to use this map: http://www.subway.com/storelocator/ with all the subway restaurant positions in my map on Windows Phone 8. I know how to find out the position of the phone and how to zoom in, but I don't know how I can bind in these subway positions. Thanks for any helpful answer.
Based on your question and the original title, I assume you're not actually trying to use Google maps on WP but rather provide your users with the ability to search for Subway store locations within your app? If so, what you really need is the way to get the store locations, which you can do by calling Subway's store location webservice, and then fill and bind the pushpin collection using natively supported Bing maps control.
If I have misunderstood and you are asking how to use Google maps (or rather Google map tiles in the WP Maps control), I'm not sure that's entirely legal. See 10.1.1. in the terms of use.
If you don't need to access or manipulate the store locations data in any way and only want to provide an in-app experience for the app users, you can also simply embed the WebBrowser control and navigate to the store locator page.

Custom zoomable images using Bing maps

I want to use the Bing map WPF control and I'm wondering if it is possible to set our own "image source".
Basically I'd like to use the control to provide deep zoom functionality for various images that would be loaded by my application.
I know that it's possible with Google maps (as shown here: http://blog.mikecouturier.com/2011/07/create-zoomable-images-using-google.html#maps_code_tilesgen)
but I was wondering we can do something similar with Bing maps?
P.S.: I would prefer using Bing because Microsoft provides a native WPF control, something that Google doesn't.
In order to add a custom map (or image) tile provider you would have to implement a TileSource and override its GetUri method to provide the URI of an image tile.
See Adding Tile Overlays to the Map for the details. The code sample there is not that great, since some things they do in code could better be done in XAML, but it is a starting point.
Note however that even if you don't use Bing Maps content, using the WPF control forces you to use a Bing Maps API Key. The control authenticates your key at the Bing Maps service provider, which will require an internet connection. Hence your image display application won't run in an offline environment, or to be more precise, it will run but display an ugly error message in the center of the control area.
You certainly can and it's incredibly easy to do in Bing Maps. Microsoft has developed a tool called MapCruncher that cuts a supplied image into tiles with the structure expected by Bing Maps. This is really important because, although Bing Maps and Google share the same tile structure, Bing Maps uses something called a quadkey to define each tile (meaning, the z-x-y of the tile).
Note: it's also possible to load tiles made for Google Maps in Bing Maps. You just need to tweak the tile source.
Anyway, better shown than said.
Here's a really detailed tutorial by the Microsoft Research team on using MapCruncher:
http://research.microsoft.com/en-us/um/redmond/projects/mapcruncher/tutorial/version3.0docs/index.htm

WP7 Bing Maps navigate to a ZIP code

This is really simple, but I haven't figured out how to do it yet. On Bing Maps for Windows Phone 7, how do I navigate to a ZIP code? I just want to center and zoom the map to a specific ZIP code. Is this possible without knowing the long/lat?
With the current version of the tools this isn't possible.
You'll have to get the lat/long for the ZIP code and then manipulate the map accordingly.
Hopefully, CivicAddressResolver will be implemented in an update soon so that this can be done with the SDK on the device.

Categories

Resources