Pure Krome


HI folks,

can we query VE via some server side code Google does this using REST but the search arguments are very limited Sad Of course the results coming back would be text .. eg. list of locations, etc.

Also, MapPoint has a WSDL and is excellent, but it is not an option for us in this case.

thanks!





Re: Query VE via Server Side - eg. REST, SOAP, WSDL?

Pure Krome


* Pure Krome politely bumps this thread.

Maybe someone from SoulSolutions might help a fellow Aussie Smile







Re: Query VE via Server Side - eg. REST, SOAP, WSDL?

SoulSolutions

With a pretty pink bump message and a direct question how can i say no

I assume you mean query the find service You can but they tell us its not supported. They actually turned it off with the release of V6 and then from public outcry turned it back on but moved it.

http://www.viavirtualearth.com/wiki/UseLiveSearch.ashx

So the endpoint is now "http://dev.virtualearth.net/legacyservice/search.ashx"

I notice someone has actually updated that wiki entry but a note was added it doesn't work.

I suspect that the parameters or return values may have changed.

The offical solution is to use the MapPoint Web Service methods. They are completly supported from the server side and more an dmore are becomming part of the VE application.

One commonly overlooked feature is the bulk geocode from MWS, it runs offpeak but currently does cost any transactions.

John.







Re: Query VE via Server Side - eg. REST, SOAP, WSDL?

Pure Krome

Thanks heaps John for the prompt reply Smile

Thank link definately does help. It's what i thought someone was going to say -> parset he VE results, as opposed to some really simple and clean XML schema result.

I was also hoping it might return the break up of the address, very similar to MWS and Googles REST service. (eg. addressLine, primaryCity, SecondaryCity, Subdivision, CountryRegion).

You suggested to use MWS (which is an excellent service btw .. i should know .. we use it .. yep, a paying MWS customer) but i've found that it doesn't work very well at all for a SINGLE search line, while VE handles a single search argument really well.

For example.

In VE, if i search for Victoria St, Richmond, Australia (http://dev.virtualearth.net/legacyservice/search.ashx a=&b=600%20victoria%20st,%20richmond,%20vic,%20australia&c=0.0&d=0.0&e=0.0&f=0.0&g=&i=&r=0) ... i get the lat long and the fully formatted address.

If i search for Richmond, Australia (http://dev.virtualearth.net/legacyservice/search.ashx a=&b=richmond,%20vic,%20australia&c=0.0&d=0.0&e=0.0&f=0.0&g=&i=&r=0) ... i also get the lat long + formattedAddress.

Kewl!

In MWS, if i search for a non-street using a single formatted address property to search for that address, i get street related results. It's like VE has the smarts to figure out that the thing u're searching for might not be an address .. and if that's the case .. it correctly finds it (eg. Melbourne, Australia .. as described above). But MWS, using the single address proprty for searching .. always looks for street level results Sad Very frustrating at times Sad

I also used FIDDLER to see what code the VE Javascript does to 'call home' when i do a VE search .. Smile

why can't things be so simple Sad




Re: Query VE via Server Side - eg. REST, SOAP, WSDL?

Tomi Schumacher

Hi,

I am running into the exact same problem !

I would like to call the Map.find equivalent from the server side (happens to be Java).

First I looked into MapPoint, which I can call via SOAP. The problem is, that the particular functionality I need, is not supported by MapPoint ( I need to parse single line US addresses, where the commas are missing e.g. 12 Main AnyTown 99999 CA ).

Using Firebug, I found the URL, that Map.find is internally calling: It is just an HTTP GET, with the URL encoded parameters, which returns a nice JSON object. (a nice example of RESTfull)

If you would like to try it out, here is the URL:

http://dev.virtualearth.net//services/v1/geocodeservice/geocodeservice.asmx/Geocode count=&query="714%20Vine%20Anaheim%20CA"&landmark=&addressLine=&locality=&postalTown=&adminDistrict=&district=&postalCode=&countryRegion=&mapBounds=&currentLocation=&curLocAccuracy=&entityTypes=&rankBy=&culture="en-us"&format=json


But as far as I understand, this is not a supported API, and it could change at any time without notice. (But there is the <<v1>> as part of the URL, which I read as version 1 ... )

I am still new to VirtualEarth and MapPoint, but the documentation is good, and it got me started quickly. But now I seem to hit a brick wall.

I am sure, I am not the only one, who tries to do this, and I wounder what other people are doing

Thanks

Tomi