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.
Related
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.
I'm currently developing a Windows Phone 7 app in which I would like to display a map with a layer of the road traffic.
First, I tried to display a Bing AJAX Map and a Google Map through the webBrowser control. If the map is displayed, the UX is just awful. In fact, the webBrowser control doesn't allow the user to navigate or zoom with his fingers. It captures all the manipulations and doesn't apply them on its content.
Then, I tried to use the Bing Maps control and override the Tile layer with another API like the Nokia one or the OpenStreetMap one (like explained on the Nokia wiki here and here). It works, but none of these API allows to display a traffic layer (or I can't find the way to do it).
Finally, I used the trick to use the Google Maps tiles with a traffic info layer. If it works, I'm pretty sure that this solution is not legal. Some apps on the Windows Phone Store display the Google Maps with a traffic layer, but if they don't use the Bing Map control and override the Tile layer, I don't know how they do...
Does someone know how to display a map with a traffic layer into a Windows Phone 7 app in a legal way ? Did I miss something ? Maybe there is a solution I don't know or I don't think about ?
I really hope that someone will be able to help me !
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&diff=184613&oldid=184561
I can't understand why my bing map doesn't show buildings.
The ShowBuildings is True.
You can compare 2 screenshots and the difference is huge.First - Bing Maps for Windows Store appp (My app)
Second - Native Bing Maps inside Windows 8 Pro
My xaml is pretty simple.
<MapsCore:Map x:Name="PART_Map"
Credentials="STRING_KEY"
ShowBuildings="True"
ShowBreadcrumb="True"
ShowNavigationBar="True"
/>
What is wrong?
According to this website, some features of the Bing Maps API (like BirdsEye Imagery) are not available for public testing yet, and are only available through the Extended Modes SDK. This may be where your problem is coming from.
The built-in emulator from the WP7 Tools doesn't have the Bing App installed, and I don't have any phone hardware to test with. So I'm simply wondering, how can I open the Bing Maps Application to a specific Lat/Long?
Related Questions:
iPhone -- How can I launch the Google Maps iPhone application from within my own native application?
Android -- https://developer.android.com/guide/appendix/g-app-intents.html
It seems that starting from the OS version 7.1 there's a specific task available for this, see BingMapsTask and for directions the BingMapsDirectionsTask.
Unfortunately there is no way to launch the Bing Maps App from within your own application.
In an early CTP there was a way but this has been removed. Hopefully it will return in the future but it is not on any current, public, roadmaps.
This leaves two alternatives.
Option 1
You could perform a search for the lat/long you want to show. The search app does directly integrate with the bing maps app so, assuming that bing can take the lat/long you provide and return something useful, the user would still be able to do whatever they wished within the bing maps app.
This has 2 downsides though. Firstly, you have no control over the search results. And, secondly, you cannot test this on the emulator.
Option 2
You could use the BingMaps control within your own silverlight application.
(Prior to the RTM, it was posible to use the full Silverlight version of the control within your app. But, this had a few quirks and was only ever intended as a stop gap solution.)
While not as fully featured as the app, the control does offer a lot of functionality.
Without a real device, but you could simulate location data, for testing, with the Reactive Extensions.
Even with a real device you will probably want to look at doing this as it's a lot easier than trying to debug while walking or driving around.
Edit:
As per this post by Kevin Marshall, if you're going to use the WebBrowserTask() (option 1 above) prefix your query with "maps:" and URL encode your query string. eg:
var task = new WebBrowserTask();
task.URL = "maps:1%20N%20Franklin%2060606";
or
task.URL = "maps:37.788153%2C-122.440162";
Bing maps silverlight control is now supported out of the box and is part of the tools... learn more about it here: http://channel9.msdn.com/Learn/Courses/WP7TrainingKit/WP7Silverlight/UsingBingMapsLab/Exercise-1-Introduction-to-the-Bing-Map-Control
Yes you can do this. I've got it running in the emulator (however, as many people have said there's no guarantee the Bing Maps for Silverlight control will run on the actual device)
Here is the xaml:
<m:Map Grid.Row="0" x:Name="mapMain" ZoomLevel="5" Mode="AerialWithLabels" CredentialsProvider="YOURBINGMAPSLICENSE" />
and here's some code to set the location in the .cs class
var ppLoc = new Location(-37.821285, 144.97785);
mapMain.SetView(ppLoc, 17);