virtual-earth

Is it possible to make a Polygon clickable using the Bing Maps API?

房东的猫 提交于 2019-12-24 19:07:55
问题 I can put a pushpin in the center of each Polygon to achieve a "clickable" region but that is an extra step I'd rather not take. 回答1: Yes, but it's kind of a pain. The steps are: 1.) attach to the mousclick event within VEMap 2.) determine if the mouseclick was within the area of your polygon or on a shape 3.) stop event propogation to the map object itself The mousehandler portion here: http://www.codeproject.com/KB/scripting/Use_of_VEMap.aspx#heading0012 is a decent primer, though if you

VirtualEarth: determine min/max visible latitude/longitude

旧时模样 提交于 2019-12-23 04:07:13
问题 Is there an easy way to determine the maximum and minimum visible latitude and longitude in a VirtualEarth map? Given that it's not a flat surface (VE uses Mercator projection it looks like) I can see the math getting fairly complicated, I figured somebody may know of a snippet to accomplish this. 回答1: Found it! VEMap.GetMapView() returns the bounding rectangle, even works for 3D mode as well (where the boundary is not even a rectangle). var view = map.GetMapView(); latMin = view

Bing Virtual Earth 7.0 calculate area

流过昼夜 提交于 2019-12-11 00:44:01
问题 I have a map where i have created pushPin for all the places i have checked in on facebook. I want to zoom in on the area where i have the most checkinplaces (pushPins). I could have a static zoom level and calculate some kind of median value but if i check in 20 times in Paris and 20 times in Los Angeles I'd end up somewhere in the middle of the Atlantic Ocean (or the North Pacific or something). I have an array with all the locations (longitudes and latitudes) to play with. 回答1: You can

Virtual Earth / Bing Maps - How To Calculate Best Zoom Level

一曲冷凌霜 提交于 2019-12-08 05:02:35
问题 I'm working on some map stuff and I'm stuck with something that seems to be quite basic. The gist of what I'm doing is adding 10 flags to a map, and I need to dynamically set the zoom level and center of the map based on the position of the pins (map needs to be zoomed in as far as possible while still showing all pins). This works exactly as expected with MultiMap without any intervention (as expected), but the Virtual Earth map doesn't play nice. If I don't give it a center Lat/Lon, it

Virtual Earth or Google Maps

夙愿已清 提交于 2019-12-07 16:36:20
问题 Simple question, the answer may not be... I'm going to be developing a web app (ASP.NET MVC) for a client. They have asked me for an opinion on whether to use Google Maps or Virtual Earth for providing a mapping solution. Which would you go for and why? Or are there others you can recommend? What else do you need to know? Street view (or equivalent) won't be necessary in the near future, but one day it might. The client wants to identify certain mappable features, and beyond that find these

Virtual Earth / Bing Maps - How To Calculate Best Zoom Level

左心房为你撑大大i 提交于 2019-12-06 15:52:17
I'm working on some map stuff and I'm stuck with something that seems to be quite basic. The gist of what I'm doing is adding 10 flags to a map, and I need to dynamically set the zoom level and center of the map based on the position of the pins (map needs to be zoomed in as far as possible while still showing all pins). This works exactly as expected with MultiMap without any intervention (as expected), but the Virtual Earth map doesn't play nice. If I don't give it a center Lat/Lon, it defaults to showing all of the USA. Can anyone point me in the right direction in order to get this working

Smooth movement to ascend through the atmosphere

為{幸葍}努か 提交于 2019-12-02 10:42:45
问题 I'm moving through the atmosphere with Microsoft Virtual Earth 3D and I can descend smoothly, but I don't know the math to ascend smoothly. I'm descending like this: for(int curAlt = startAlt; curAlt < endAlt; curAlt--){ //do something curAlt -= curAlt/150 } This works by decreasing the size of the jump the closer I get to the earth (lower altitude). I need a solution that would do similar, just in reverse, while still keeping the smaller jumps at the lower altitude. How can I do this? Or is

Smooth movement to ascend through the atmosphere

孤街醉人 提交于 2019-12-02 07:11:52
I'm moving through the atmosphere with Microsoft Virtual Earth 3D and I can descend smoothly, but I don't know the math to ascend smoothly. I'm descending like this: for(int curAlt = startAlt; curAlt < endAlt; curAlt--){ //do something curAlt -= curAlt/150 } This works by decreasing the size of the jump the closer I get to the earth (lower altitude). I need a solution that would do similar, just in reverse, while still keeping the smaller jumps at the lower altitude. How can I do this? Or is what I am doing unacceptable and should be done differently (say with logarithms)? An even better

An effective algorithm for buffering a polyline to create a polygon?

被刻印的时光 ゝ 提交于 2019-12-02 04:49:01
问题 I need to write some code that will buffer a line to create a polygon as shown below. http://www.sli.unimelb.edu.au/gisweb/BuffersModule/Buff_line.htm From following the steps outlined, I can create polygon shapes around simple lines that do not cross themselves or have too tight curves, but as the lines I'm trying to buffer are squiggly swhirly hurricane tracks, it's really not good enough. I know there's a function in SQL Server 2008 that can do this, but I'm afraid that's currently a no go