Gascho Rempel


I have a function that creates a polygon if it finds a feature from a tile service through a arcims call based on the lat,long of a click.

This works fine in 2d by attaching the event to the map click and grabbing the mapx, mapy values and converting pixel to lat long.

In 3d, before I downloaded the newest version of VE, I was able to get the lat long value from the e.latlong. Now it returns wrong values (ie. 2330, -6442).

Is this a bug or is there another way of determing the lat long value in 3d

Marc




Re: 3d e.latlong returning different values in newest ve download

Derrick (MSFT)


I'm not seeing this problem. Could you post the code you're using and also which broswer you're using Thanks






Re: 3d e.latlong returning different values in newest ve download

Gascho Rempel

Here is the relevant code that I have been using to get the lat, long.

I attach the onClickHandler function to my map on load.

function onClickHandler(e)
{

var LL = null;
var mode = map.GetMapMode();
//2D
if (mode == 1)
{
var x = e.mapX;
var y = e.mapY;
pixel = new VEPixel(x, y);
LL = map.PixelToLatLong(pixel);
}
//3D
else if (mode == 2)
{
LL = e.latLong;
}
var Lat = LL.Latitude;
var Long = LL.Longitude;

.....

I then use the Lat, Long values to post to a webservice to generate polygons based on the spatial intersection.

I have tried the code in both IE 7 and Firefox 2.0 and get the values I mentioned earlier. This only showed up with the most recent Virtual Earth download. On a coworkers computer that still has the previous version, this function works as expected.

I noticed that a similiar post is occuring at:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2281331&SiteID=1.

My problem sounds exactly like that one.


Marc








Re: 3d e.latlong returning different values in newest ve download

Derrick (MSFT)

Ok. I'm able to repro this on v5. I assumed that you were using v6. I'm sorry.

I have reported the bug. Thanks.





Re: 3d e.latlong returning different values in newest ve download

uptaphunk

Derrick (MSFT) wrote:

Ok. I'm able to repro this on v5. I assumed that you were using v6. I'm sorry.

I have reported the bug. Thanks.

There are so many bugs with V6 that I am surprised people can actually use it.





Re: 3d e.latlong returning different values in newest ve download

Richard_Brundritt

A large number of the "reported" bugs were due to unsupported, undocumented methods being used.All the new features of VE6 have not been released yet. When they are many of bugs should be resolved in the process.




Re: 3d e.latlong returning different values in newest ve download

SoulSolutions

From memory I think we have seen less then 10 unique bugs reported here at this forum, most pretty minor although understandably causing problems for the person involved. The only "unsupported, undocument methods" ones I can recall are those that access the find services directly, a work around was posted pretty quickly.

Lets not forgot that the control is used in many very different projects and situations and I personally like that we have such fast release cycle with new functionality and anyone (not just a restricted set of testers) can test the new version and report "bugs" or issues. I hope this forum has given some great feedback to the dev team in pretty quick time. I look forward to some little updates to fix these.

You must remember the same process occured for V5 and V4 prior to that. I guess the only suggestion that could be made is to let people know what minor release we are upto, rather then use a V6.0 for production, wait for V6.1. I think this would be very confusing, add a whole bunch of extra management overhead and slow the process. I would prefer to see it kept super simple.

Maybe we just need a way to publicly track what the bugs are in each main version What do you think If you also had a features table by version people could decide on if the bugs effects them versus the features. eg V6 support Safari but currently there is a bug with infoboxes appearing in the top corner.

John.






Re: 3d e.latlong returning different values in newest ve download

SnoopDougEDoug

uptaphunk wrote:
...There are so many bugs with V6 that I am surprised people can actually use it.

I'm not sure what the problem is. It runs fine on V6 for me. Are you sure you are using the correct tag:

<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx v=6"></script>

doug





Re: 3d e.latlong returning different values in newest ve download

uptaphunk

Yup, am using that tag.

Several issues prevent me from using V6. I have verified the following issues personally by creating a standard HTML page from the template.

1. I need to have more than one map on the page at a a time. If you attempt this you will see that the zoom controls are missing from the second map. Not usable.

2. Which mouse button that was pressed is missing from the 3D event structure. If you attempt this you will get a "clicked" event but all of the mouse buttons are false. Not usable.

3. Add pins to your map. Change the view from road to hybrid. Move the map with your mouse. Change the view again. You will see that your pins are "moving" around the map. Not usable.

Perhaps you have a very simple application that has very little interactivity with it. I'm glad it works for you. There are other issues apparently which I have not verified personally such as events being cross-posted between map instances, but I have verified at least the 3 above.

I've done quite a bit of dev work with VE and Google Maps API, I have to say I like VE better and it has been improving in terms of a feature set. It just saddens me when bugs get introduced in areas that were already working. I expected there to be huge problems from V5 to V4 since there were breaking API changes, but to V6 Quite surprising.