bing-maps

Map APIs not working for windows phone in HTML

落爺英雄遲暮 提交于 2019-12-02 06:40:18
问题 Ran into this strange issue recently. I'm more of a web programmer and I've only just ventured into developing apps. I've been trying to develop this mapping app on windows phone 8.1 using HTML and I came across a problem. When I try to integrate Bing maps, I'm supposed to add this to my HTML page as a script: http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-gb Now, when I try to initialize my map using if (Microsoft.Maps.ClientRegion) { Microsoft.Maps.loadModule(

Change image for pushpin WPF [closed]

断了今生、忘了曾经 提交于 2019-12-02 06:26:17
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I have 2 pushpins, pin1 and pin2. How do I change the default black image to my own image? Please help. Thanks 回答1: You could use a Image and add it to a MapLayer if you don't necesserily need all pushpin

How do I eliminate rogue “counters” on my Windows Store main page?

末鹿安然 提交于 2019-12-02 05:04:09
I have a minimalistic main page - 4 buttons and a Bing Map. When I run the app, though, I see two rogue "counters" (don't know how else to describe them) in the upper left and upper right. Here's the one on the upper left: What's causing them, and how can I get rid of them? BTW, the black vertical strip on the left is "as designed" (no pun intended) - below the "counter" are my four buttons, stacked vertically (I deliberately gave the Bing Map only 80% of the page, not the 100% it greedily grabbed from the git-go). UPDATE For Ashok: Here's all there is to the XAML: <Page x:Class="Platypus

How should I handle click events on pushpins in my Bing Maps control for WP7

北战南征 提交于 2019-12-02 04:17:26
I'm about to add templated <Button> controls inside each of my Pushpins on my Map, in order to interact with the user clicking (er, touching) a pushpin. Is this the proper way to work with pushpins? I don't want to handle MouseDown and MouseUp and reinvent everything (and nobody should). I just need confirmation. Why dont you add an Invisible styled button inside the MapItemsControl.ItemTemplate and use Click on the button. MouseLeftBUttonUp ? I have only the emulator and it works on my custom pushpin : <Maps:MapItemsControl ItemsSource="{Binding Stores}"> <Maps:MapItemsControl.ItemTemplate>

Change image for pushpin WPF [closed]

我怕爱的太早我们不能终老 提交于 2019-12-02 00:59:14
I have 2 pushpins, pin1 and pin2. How do I change the default black image to my own image? Please help. Thanks You could use a Image and add it to a MapLayer if you don't necesserily need all pushpin functionality. Example: MapLayer mapLayer = new MapLayer(); Image myPushPin = new Image(); myPushPin.Source = new BitmapImage(new Uri("YOUR IMAGE URL",UriKind.Relative)); myPushPin.Width = 32; myPushPin.Height = 32; mapLayer.AddChild(myPushPin, <LOCATION_OF_PIN>, PositionOrigin.Center); bingMap.Children.Add(mapLayer); If you do need have certain Pushpin functionality, another option is to use the

HTML 5 - Use <img> element vs. Canvas drawImage

南笙酒味 提交于 2019-12-01 22:10:04
问题 I'm working with a customHTML section, currently I'm using a canvas html5 element. Now, I need to display an image, but not sure if it will be a good idea to draw it in this canvas element or use a <img> html element directly. My first approach is this: a) var customHTML = "<canvas id='viewport'></canvas>" var canvas = document.getElementById('viewport'), context = canvas.getContext('2d'); make_base(); function make_base() { base_image = new Image(); base_image.src = 'img/base.png'; base

HTML 5 - Use <img> element vs. Canvas drawImage

半腔热情 提交于 2019-12-01 21:23:21
I'm working with a customHTML section, currently I'm using a canvas html5 element. Now, I need to display an image, but not sure if it will be a good idea to draw it in this canvas element or use a <img> html element directly. My first approach is this: a) var customHTML = "<canvas id='viewport'></canvas>" var canvas = document.getElementById('viewport'), context = canvas.getContext('2d'); make_base(); function make_base() { base_image = new Image(); base_image.src = 'img/base.png'; base_image.onload = function(){ context.drawImage(base_image, 100, 100); } Second approach: b) var customHTML =

Setting a min/max zoom for Bing maps in Silverlight

允我心安 提交于 2019-12-01 20:51:02
问题 I am using the Silverlight sdk for Bing Maps. I have my map, I have my PushPins all mapped out. Now I want to disable the user from zooming out so far they see the whole world and keep it constricted to the just the US. It would be nice if there was something simple like Map.MaxZoom but there is not. Any help? 回答1: public class MyMapMode : Microsoft.Maps.MapControl.Core.MercatorMode { public Range<double> MapZoomRange = new Range<double>(1.0, 10.0); protected override Range<double>

Setting a min/max zoom for Bing maps in Silverlight

ぐ巨炮叔叔 提交于 2019-12-01 18:27:49
I am using the Silverlight sdk for Bing Maps. I have my map, I have my PushPins all mapped out. Now I want to disable the user from zooming out so far they see the whole world and keep it constricted to the just the US. It would be nice if there was something simple like Map.MaxZoom but there is not. Any help? public class MyMapMode : Microsoft.Maps.MapControl.Core.MercatorMode { public Range<double> MapZoomRange = new Range<double>(1.0, 10.0); protected override Range<double> GetZoomRange(Location center) { return this.MapZoomRange; } } you can try it! 来源: https://stackoverflow.com/questions

BingMap - getting prototype of null error

不问归期 提交于 2019-12-01 12:49:33
I have searched google and stackoverflow , but could not find a solution for this issue. I am loading the map like this, in my view . <img ng-src='https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/ {{Latitude.__text}},{{Longitude.__text}}/12?mapSize=77,120& key={{Key}}'></img> Below is how its loaded in index.html <script type='text/javascript' src='https://www.bing.com/mapspreview/sdkrelease/mapcontrol?callback=loadMapScenario' async defer></script> <script type='text/javascript' src='app/services/bing.js?' async defer></script> Below is my controller code, where i am trying to call the