Microsoft Developer Network >
Forums Home
>
Windows Live Developer Forums Forums
>
Bing Maps: Map Control Development
>
how to do category wise search?
how to do category wise search?
- how we do category wise search as shown in the link:
http://www.bing.com/mapindia/?FORM=ZDLE4#JndoZXJlMT1QaXp6YSZiYj00MC43ODA1NDE0MzE4NjAzJTdlMTA0Ljk0MTQwNjI1JTdlNC45MTU4MzI4MDEzMTMxNyU3ZTU0LjU4MDA3ODEyNQ==
I try the map.find method for searching "Park" but it is showing string wise locations means if any hotel contain the string park in their name it shows that hotel also but i want to search only park or pizza or schools or institute.
Can anybody tell me how can we do this?
Answers
- hi Richard,
Thanks for ur coperation my prob is solved.- Marked As Answer byGuest11 Monday, November 09, 2009 10:13 AM
All Replies
- Using map.Find limits your ability to filter the search. You will need to use either the Bing Maps Web Services or the MapPoint web services. These services will give you much more flexibility in terms of filtering. You can use AJAX to integrate these services with Bing Maps. http://msdn2.microsoft.com/en-us/library/cc316940.aspx
Windows Live Developer MVP - http://rbrundritt.spaces.live.com - I tried the example shown in the link
http://msdn2.microsoft.com/en-us/library/cc316940.aspx
But i am getting an error saying
Got the response text:
Alert('Error:System.Net.WebException:The request failed with HTTP status 401:Unathorized. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage:mMessage, WebResponse response, Stream responseStream,Boolen asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodname,Object[] parameters) at MSWFind.MapPointService.FindServiceSoap.FindByProperty(FindByPropertySpecification specification) in
C:\Document and Settings\Desktop\New Folder\MSWFind\MSWFind\WebReferences\MapPointService\Reference.cs:line 607 at MSWFind.MSWFindGenerator.FindByProperty(String datasource, String entityname, String findExpression,String parameters) in C:\Document and Settings\Desktop\New Folder\MSFing\MSWFind\MSWFindGenerator.aspx.cs:line84')
Where is the problem? i don't understand this error. - You need to get a developers account and use the credentials in the code to access MapPoint. You can get a developers account here: https://mappoint-css.live.com/MwsSignUp/Default.aspx
Windows Live Developer MVP - http://rbrundritt.spaces.live.com - I had a developer account and i also add web reference.
I have to manually give credentials information or it will automatically get the credential information after adding web reference. - In the article code the Class MWSFindGenerator has the following global variables:
This code retrieves the credentials from a web config. You can either stor your credentials in a web.config file or simply set the values of MPUSer and MPPass to your username and password.//TODO: Change the following values to your username and password private String MPUser = ConfigurationManager.AppSettings["username"]; private String MPPass = ConfigurationManager.AppSettings["password"];
Windows Live Developer MVP - http://rbrundritt.spaces.live.com - I set the values of MPUser and MPPass. But than also it shows the same error.
I tried to add web reference from the sample in the link
http://msdn.microsoft.com/en-us/library/cc980844.aspx
here they give example off Requesting Bing Map token. I follow the same steps as shown there i copied the url and paste it in the web reference option when i add web reference in my application when i paste the url and click Go it ask for user id and password i enter bothe user id and passwork and click ok but it gives error as
"There was an error downloading 'https://staging.common.virtualearth.net/find-30/common.asmx?wsdl'.
The request failed with HTTP status 400: Bad Request."
What the error is? it think it is an url error. - The initial error was a 401 error which was an error with credentials. If your getting an error adding the common service it could be the url. Try this url instead: https://staging.common.virtualearth.net/find-30/common.asmx
The token services don't have ?wsdl appended to them.
Windows Live Developer MVP - http://rbrundritt.spaces.live.com - I am also facing the same problem I tried with the above url suggested by Richard https://staging.common.virtualearth.net/find-30/common.asmx it ask for user id and password i enter both id and password but it is giving the same error as above
"There was an error downloading 'https://staging.common.virtualearth.net/find-30/common.asmx'.
The request failed with HTTP status 400: Bad Request." - Try to access the URL from a browser. If you get the same error it is possible that either a proxy server or firewall is blocking the connection.
Windows Live Developer MVP - http://rbrundritt.spaces.live.com - https://staging.common.virtualearth.net/find-30/common.asmx i tried this url on browser and i get the blank page nothing on the page.
- This is probably an issue with either a firewall or proxy server on your end or just network restrictions. If you send me an email at ricky_brundritt@hotmail.com I'll send you a list of IP's that you will need to allow.
Windows Live Developer MVP - http://rbrundritt.spaces.live.com - hi Richard,
Thanks for ur coperation my prob is solved.- Marked As Answer byGuest11 Monday, November 09, 2009 10:13 AM

