Click here to Skip to main content
15,038,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Friends,

for (Index in BingArray) {

                map.Find(null, BingArray[Index].BingAddressString, null, null, 0, 1, true, false, false, false,

                function (shapeLayer, results, places, moreResults, error) {
                    debugger;
                    if (places != null) {
                        var place = places[0];
                        var pin = new VEShape(VEShapeType.Pushpin, place.LatLong);
                        pin.SetTitle(BingArray[PinIndex].CustomerName);
                        pin.SetDescription(BingArray[PinIndex].BingAddressString);
                        pin.SetMoreInfoURL(BingArray[PinIndex].linkURL);
                        map.AddShape(pin);
                        map.SetCenterAndZoom(place.LatLong, 12);
                    }

                    PinIndex = PinIndex + 1;

                });

                Sleep(1);
            }


BingArray I declared above contains array of addresses.map.Find is getting called one by one for all the addresses inside array.

Once Find function gets called it receives callback for each address to plot the retrieved place value on bing map.

It is not neccesary that for any address map.Find() I called will get exact address in place returned, however I am picking here first retrieved value.

I just want to keep track while callback gets received defining for which address I passed, callback I received. There's isn't any value that I can pass to Find function that I get same on callback received.

Regards,
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900