I want to find the distance using wi-fi and plot the marker on map in iPhone.
So any idea or code i can get for that?
What are you trying to achieve here?
If you are trying to plot your position on a map using the Iphone then this feature is already a part of the Iphone which has a GPS receiver and will do that "out of the box".
If you are trying to find the position of your laptop using wifi and send that location to an iphone then you have quite a difficult problem to solve that is probably not doable without a lot of work.
There are facilities to enable you to triangulate your position from GSM masts but these are in fixed positions with know lat/longs. Wifi Access points do not have a database of geographical locations so triangulating from those will be very difficult/impossible.
You can use 3rd party services such as this to track your position using GSM however these are wildly inaccurate unless you are in a large city and would require you having a GSM modem in whatever it is you are tracking.