tags:

views:

124

answers:

3

i am doing one concept.but i have no idea to do that concept. plz nybody give an idea for that....

actually there is a site which have the registered restaurents on that site at the same another side user registration is there. now user login then automatically display distinct restaurents which is in that site. how to display distinct restaurents?

and next problem is administrator divided 3 jones . each jone having diffrent shipping charge. i mean the distance between restaurent and user address is equall to with in the one mile then charge one shipping charge. if there is a 2 miles distance between restaurent and user then charges another shipping charge?

how to do this...anybody give an idea for this problem...

thanks.

A: 

I'm not sure if I got your question right, but I think you might find Google Maps API useful, specifically XML/JSON Web services.

Gray Fox
+1  A: 

I answered a question possibly related to this one a while back: StackOverflow: Distance between two addresses

Lucanos
thanks for your reply. first i have a small question.i want to create 2regions(region:1,shape:circle, distance:1km),(region:2,shape:circle, distance:2km) of origin.
muralikalpana
That is really alot of questions tied together. My solution (above) should allow you to determine the actual road distance between two addresses (which, from what I understand of your question, would be the best solution for you). To determine distances, as-the-crow-flies (that is, straight line distances), you can again use Google to turn Addresses into Lat/Long co-ords, and then use a calculation called "The Great Circle" to determine the distances between two addresses. There is an answer at http://stackoverflow.com/questions/574691/mysql-great-circle-distance-haversine-formula for that.
Lucanos
ok. actually i want to display restaurents which is in that region when registered user login.
muralikalpana
In that case, you will want to use the Google API to get the Latitude/Longitude of each restaurant as you do your data entry (turning the address into that as you go). Then, when the visitor accesses the directory, turn their nominated address (again using the Google API) into a Latitude/Longitude. You would then use the equation from http://www.marketingtechblog.com/technology/calculate-distance/ to determine as-the-crow-flies distances between the Visitor and the Restaurant. (But be sure to limit the Query a bit - otherwise it is ALOT of processing to run on EVERY row.)
Lucanos
Also - Please respect the community here and review some of your older questions, marking the correct answers as such. Doing do encourages and rewards users like myself for putting in the time and effort to read, ruminate and respond to these questions and help users like yourself out. Alot of users (especially the more skilled) will just ignore questions from people who don't do this. Ever moreso when they have a 0% Accept Rate.
Lucanos
sure...Lucanos. and thanks for your reply.
muralikalpana
when i divide work into tasks then each task will be looking tough. again i am looking for "how to draw two regions (jone1: 1mile,shape:circle)(jone2:2mile,shape:circle) of origin?
muralikalpana
Lucanos
sure..you gave correct solutions.but client asking like this exactly http://meyerweb.com/eric/tools/gmap/hydesim.html. he(restaurents) wants to select regions like this from origin dynamically which they are willing to deliver to. when new user register in this account then automatically display restaurent names which is in that region
muralikalpana
That is just a graphic representation of data you need to retrieve from the database - a simple task. Anyway - as said before, this is beyond the scope of the initial question. Happy to discuss via email, or subcontract for you.
Lucanos
is this your email [email protected]?
muralikalpana
Lucanos
A: 

thanks to all for replys. first i have a small question. i want to create 2regions(region:1,shape:circle, distance:1km),(region:2,shape:circle, distance:2km) of origin.

muralikalpana