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.
Related
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.
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 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
I want to create a zoomable draggable etc. map of a really big image, the functionality should be like google maps but the map itself comes from me (it will be a galaxy picture).
So I think I have to use this components:
Frontend: http://openlayers.org/
(Example)
Backend: http://sharpmap.codeplex.com/
And connect them with each other, so the frontend will call the backend to display tiles in the current zoomlevel of the map.
I'm new to that map building thing and just want to make sure to not going in the wrong direction, so does it makes sense? Anyone did that before? Or any better ideas?
EDIT
Sorry, forgot that: The user should not have to install any additional stuff and it should run on an Ipad too, so I'm not able to use silverlight, flash etc. Just good old plain JS :)
I had worked on similar requirement but development platform was Silverlight. I had used "DeepEarth" (extended deep zoom) with tiles hosted on the local server.
DeepEarth
DeepZoom
You can try using Bing Control and services which is a paid service. In trial version, you will get Bing logo in the background. Bing Services
Bing control or any such controls with tiling services are appropriate when you want real world map - cities/roads. If you just need to have a zoom in/out feature on an image you can use deepzoom.
I ended up with using openlayers.org for the frontend and building the backend by myself.
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);