开发者

How to utilise google maps to replicate functionality similar to rightmoves' draw-a-search?

I know this will be a complex solution. I would appreciate it if you could push me in the right direction.

Please have a look at http://www.rightmove.co.uk/draw-a-search.html. I am interested in finding out how this is possible开发者_StackOverflow中文版. what steps do I have to take to achieve this?


There's quite a few things going on here.
You need to have event listeners for when the user clicks on the map.
You need to place markers where they click.
You need to draw two types of polylines; the static type connecting two markers, and the dynamic dotted line as they move the cursor or drag a marker.
When you've closed up the polygon, you need to make your search only return properties inside that shape (although they're actually doing it within X miles radius from that shape).
They're also inserting markers half-way along the lines that you can drag - this will require the geographical library, using the interpolate function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜