bing-maps

how to get the geolocation of a click on a bing map in C#

感情迁移 提交于 2019-12-04 20:09:48
is it possible to get the geolocation of the point where i clicked on a bing Map in c#? Alright, since you're in WinRT in C#, you're using the Bing Maps Windows Store App control. Add the map into your XAML markup: <Page x:Class="Win8PublicApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:m="using:Bing.Maps"> <Grid Background="{StaticResource

Bing Maps V7 Context Menu

亡梦爱人 提交于 2019-12-04 18:29:19
I use Bing Maps Ajax V7. I want on right click to get an infobox and show my links inside. function GetMap(){ // Initialize the map map = new Microsoft.Maps.Map(document.getElementById("mapDiv"),{credentials:""}); attachrightclick = Microsoft.Maps.Events.addHandler(map, 'rightclick',showPopupMenu); } function showPopupMenu(e){ var latlong = new Microsoft.Maps.Location(e.getY(),e.getX()); var defaultInfobox = new Microsoft.Maps.Infobox(latlong, {title: '<div>My Pushpin<div>', visible: true} ); map.entities.push(defaultInfobox); } Infobox added but unfortunately have no sense with to point I

Display locations based on KML file in Bing Windows Phone 7

送分小仙女□ 提交于 2019-12-04 18:23:42
Currently i am using the following code to display locations on a map in my application: //Bustop 8448 – Pushpin BusStop8448 = new Pushpin(); BusStop8448.Background = new SolidColorBrush(Colors.Red); BusStop8448.Location = new GeoCoordinate(-36.934608, 174.73016); BusStop8448.Content = "Bus Stop: 8448 "; BusStop8448.MouseLeftButtonUp += new MouseButtonEventHandler(BusStop8448_MouseLeftButtonUp); var BusStop8448Press = sender as Pushpin; this.Map.Children.Add(BusStop8448); This is very tedious as there are hundreds of locations to add, so I was thinking about displaying locations based on a KML

Get list of Local Businesses using Bing Maps Search service API

☆樱花仙子☆ 提交于 2019-12-04 17:47:51
I am developing a Windows Phone 7 Silverlight application that currently displays a map that show's the user where they are by getting the coordinates from location services. I can get an address using bing Reverse geocoding API. I would like to display local businesses to the user that may be off interest by placing pushpins on the map. However I'm not able to get any search results from the Search Service API . Whatever I enter I get 0 results and I find the documentation lacking. I've tried following this example but very little description is given of the filter parameters for example.

How do I move GPS watcher to App.xaml superclass and Dispatch events to other pages/classes?

久未见 提交于 2019-12-04 14:57:08
I am new to developing for silverlight/WPF and WP7, however I am familiar with developing C# using console or windows form, so bear with me! I am trying to create a location aware app using the Silverlight SDK and the Microsoft.Maps.MapControl and the System.Device.Location classes. The problem I am having is accessing the "watcher" from other pages. What is the best way to do this. I want to put it outside of my GUI page classes so that when switching between pages, you are not checking for a new location on the UI thread and doing duplicate work.. Here is an outline of how I think it should

Using Google maps in Windows Phone 8

坚强是说给别人听的谎言 提交于 2019-12-04 11:21:29
It's possible using Google maps in Windows Phone 8? The question may seem strange, since the internet is very much a post about it. But in practice, I was faced with real problems. The only way I know to use Google maps (with MapTileLayer.TileSources) is described in this article . But you can not replace the tiles in the new map control in WP 8. Of course we can use the old map contol plugging the appropriate library. This is where I have problems begin. The old Bing Map control in WP8 has a memory leak, and using them is not possible. Perhaps more accurately, but over time will be a huge

WP7 Bing Map Pushpin - how to tweak the location of the custom pushpin?

我与影子孤独终老i 提交于 2019-12-04 11:15:57
Ok, simple question, but I haven't found the obviously easy answer yet! I have a Windows Phone 7 app with map integration, with a set of pushpins on the map. The pushpin is custom (just a ellipse/circle). Unfortunately, the location of the custom pushpin is "off" from the geolocation. when you zoom in, it gets closer and closer to accurate, and is the farthest off in the most zoomed out level. I think this is an offset issue. I looked at RenderTransformOnOrigin, but it didn't appear to help me. Thanks in advance, here is the relevant code: <phone:PhoneApplicationPage.Resources>

Bing Maps Ajax API - get location from address

旧街凉风 提交于 2019-12-04 04:05:36
I'm using Microsoft.Maps API (AJAX control v. 7). I want to display pin for an address. When I use: var loc = new Microsoft.Maps.Location(47.592, -122.332); var pOptions = {icon: 'img/ICN_Bullet_Blue_25x38.gif', text: '1'}; var pin = new Microsoft.Maps.Pushpin(loc, pOptions); It's working fine. How can I get latitude and longitude from address, so I will later use it for pin location ? Bing Maps includes geocoding support (finding location by addresses). You have two options for this: Use the REST api directly. http://msdn.microsoft.com/en-us/library/ff701714.aspx In that page you can find

Get height of a building from a maps API

让人想犯罪 __ 提交于 2019-12-04 03:54:31
It's any public maps API (google, microsoft, openstreet...) that returns the height of the roof for certain points? Imagine: you request some address and the API returns the coordinates, some information and the height of the building, if available. OpenStreetMap has a height tag and various other building related tags like building:levels from which you could estimate the height. However note that currently most buildings lack those tags as they aren't widely in use so far. Still you could give it a try and request all buildings around a specific point or area using Overpass API / overpass

How to zoom to fit in WP7 Bing Maps control using LocationCollection?

假如想象 提交于 2019-12-04 03:41:15
How can I zoom the Microsoft.Phone.Controls.Maps.Map control to the correct zoom level on Windows Phone 7? I have a LocationCollection of GeoCoordinates and I calculated the Center myself, but now how do I calculate the correct zoom level to fit the LocationCollection? P.S. Is there an out of the box method to calculate the center of GeoCoordinates so I don't have to calculate it myself? EDIT: I've found another fine solution: http://4mkmobile.com/2010/09/quick-tip-position-a-map-based-on-a-collection-of-pushpins/ map.SetView(LocationRect.CreateLocationRect(points)); You can use the following