Is there a way to open Bing maps that are inbuilt to Windows phone on click of a button. If you have used the Foresquare app, it loads bing maps and show the destination latitude and longitude when you click the directions button. I want to do the exact same thing. Please help me with any resource you have.
Until now I tried the code in this link
https://msdn.microsoft.com/library/windows/apps/jj710324%28v=vs.105%29.aspx
Problem is when I click the button it says do you want to search an app in the appstore. Please help.
You have to use BingMapsDirectionsTask like this (just replace latitude and longitude with yours):
BingMapsDirectionsTask bingMapsDirectionsTask = new BingMapsDirectionsTask();
GeoCoordinate spaceNeedleLocation = new GeoCoordinate(47.6204,-122.3493);
LabeledMapLocation spaceNeedleLML = new LabeledMapLocation("Space Needle", spaceNeedleLocation);
bingMapsDirectionsTask.End = spaceNeedleLML;
bingMapsDirectionsTask.Show();
You can reed more here about Bind Maps directions task.
Related
I wonder if it is possible to open the bing map application after button click and send there my own .png icon for push pin. For now I can open the bing maps and I have a default pushpin, but I want to change that pushpin for my own.
This is my code for it:
var bingMapsTask = new BingMapsTask
{
SearchTerm = item.CoordinatesString
};
bingMapsTask.Show();
Thanks in advance.
You won't be able to modify the pushpin when using the Bing Maps Task as that opens up a separate app. If you want to be able to customize the map you will need to use the map SDK in WP.
I have a Windows Phone 8.1 XAML app that uses the MapControl to display maps. In the MapControls Loaded event, I set a valid Bing API key
void MyMap_Loaded(object sender, RoutedEventArgs e)
{
MyMap.MapServiceToken = the key
MapService.ServiceToken = the key
}
I know the Bing API key is valid because the watermark in the MapControl is not shown.
From the page with the MapControl I navigate to another Page where in the ViewModel I try to find a driving route:
var driving = await MapRouteFinder.GetDrivingRouteAsync(new Geopoint(new BasicGeoposition
{
Latitude = Latitude,
Longitude = Longitude
}), Detail.GeneralInfo.GpsCoordinates.Position, MapRouteOptimization.Time);
The problem is that driving.Status is always InvaldiCredentials.
Is there something that I am missing?
The documentation says
Note that you have to provide the authentication token in two separate properties in an app that uses both Map services and the Map control.
and I did this.
The Bing API key I use is generated for Basic / Public Windows Phone App. I also tried to generate one for Basic / Public Windows App, no change.
I have a working app that uses this token. I only set it to a Map control in XAML, and then I can use both the Map and the MapService, apparently.
My Maps key token is 22 characters long. The only way to get it is, AFAIK
Make an app
Upload it to the store but do not submit
You app gets associated with a store ID and you will see a map token
THAT is the token you will need
See screenshot. Is that the procedure you followed?
Also, make sure xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps", not the old Bing control. Don't even know if the old control is still available in the Universal Apps btw
I'm trying to create a mobile app in xamarin in c# for ios using the google maps api
When you click a marker, the title appears, but when you click it again the title goes away. Is there any way to keep the title from disappearing on the second click?
I want the double click to change the content of the title, but I can't display the info if the title disappears.
Ive been playing around with different combinations of setting mapview.SelectedMarker = marker when I detect a second click on the same marker, but it won't work and I can't find any answers online.
Any help would be appreciated, thanks.
This seems to be working if anybody is having the same problem.
mapView.TappedMarker = (map, marker) => {
//Change the title
mapView.SelectedMarker = null;
return false;
}
So I want to add a Iconic live tile to my app to display the latest RSS news to its Iconic tile.
Noob here. Anyone can tell me how to do so?
I suppose you have now code which gather RSS news and store it somewhere.
After that you just can use code from here (Nokia Dev Center) - there is nice example.
Just create object and set some properties:
IconicTileData oIcontile = new IconicTileData(); // Create icon tile
// Now you can set some properties
oIcontile.Title = "Tile title";
oIcontile.Count = 7; // Some counter
If you don't have code for RSS - here is tutorial from MSDN site.
I am developing a windows phone 7.1 application, which will search through different search engine after taking in the text from the textbox. I have textbox(searchBox), four buttons for bing, google, facebook and yahoo and a web browser control. Now i need to pass the text from the textbox to the web browser. But the thing is it should be of the form "www.bing.com?q= textbox.text". how can i implement this?
You can adjust WebBrowser.Url property
Link : http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.url.aspx
Or you can use Navigate method
var address = "www.bing.com?q=" + textbox.Text;
webBrowser1.Navigate(new Uri(address));
Link : http://msdn.microsoft.com/en-us/library/ms161352.aspx