Denny.NET


Having trouble getting the ondoubleclick event to fire (2d mode). Here is some of my code:

Code Snippet

map = new VEMap( noteMap._mapDiv );

map.AttachEvent( "ondoubleclick", noteMap._MSVESetPushPin );

/* etc... */

The onclick event works fine. Here is my event handler:

Code Snippet

_MSVESetPushPin : function(e) {

var mapX = e.view.LatLong.Latitude;

var mapY = e.view.LatLong.Longitude;

var pin = new VEPushpin( "pin", new VELatLong( mapX, mapY ) );

/* etc... */

Anyone know what is causing it not to fire I'm running IE 6.0 sp2




Re: AttachEvent: ondoubleclick

Duncan Garratt


It looks like you are using version 4 rather that version 5 API. Version 5 has changed the way event handlers are coded. If you look at the version 5 event handler code and class reference in version 5 Virtual Earth interactive SDK you should find some good examples.

Duncan Garratt

www.gis-logic.co.uk







Re: AttachEvent: ondoubleclick

i-developer

Hiii

Can we get the city name on the map when clicked because i want to make search when user selected the city on the map

Thank you very much.







Re: AttachEvent: ondoubleclick

Duncan Garratt

What you are asking for doesnĄ¯t exist in the Virtual Earth API. If you want to search for a city try using the find function in the VE API. If you have a small number of cities you could use a combo box to store the search string e.g. value : London, UK., Paris, France etc

Version 5 Example

var txtWhere = "London, UK";

map.Find(null, txtWhere);

Duncan Garratt

www.GIS-Logic.co.uk






Re: AttachEvent: ondoubleclick

i-developer

Hii Duncan;

How can we thank you for VE It's unvaluable really (your codes especially);

i want to that;

While user is using map for searching area. For example i want to find the users in UK, the user shouldn't type by keyboard , he/she would select on the map by mouse click.

is it possible if it's possible how can we do that Thank you very much for answering.






Re: AttachEvent: ondoubleclick

Denny.NET

Duncan,

I thought I was using v5. I used nearly the same code as the iSDK, the only difference is that I loaded the script dynamically:

Code Snippet

var scr = refDocument.createElement( 'script' );

scr.id = 'mapScript';

scr.type = 'text/javascript';

scr.src = 'http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx v=5';

I tried various different ways but I still get the same results.





Re: AttachEvent: ondoubleclick

Denny.NET

any ideas