Pregunta

I am trying to do a task that involves Bing maps where I need to know the pixel location of a particular lat long pin item.

I am using the Bing map SDK to do this using the function LocationToViewportPoint that was provided by Bing maps.

I am worried that this may be affection performance of my application and was wondering if it would be more efficient to write my own function that can achieve this. The problem I am not sure how to achieve this if I was to write my own function as obviously the function would output different values at different zoom levels?

Any guidance is appreciated.

Thanks

¿Fue útil?

Solución

If you have a lot of points to convert check to see if you can pass in an array of points into that method or if there is an equivalent method designed for taking an array of points. I know that some of the Bing Maps controls have this. Using the built in functionality would be easiest and fastest if there is support for arrays. If the version of Bing Maps you are using doesn't support an array of locations then it might be faster to create a method that does this calculation and caches some of the constant variables. Take a look at this documentation to find all the calculations you would need: http://msdn.microsoft.com/en-us/library/bb259689.aspx

I've done a lot of work over the past 6 year with these calculations and very rarely do I find the need to write my own methods for these calculations now as the built in location to pixel stuff tends to be just as fast and requires less work.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top