Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Ministry Tools > Map Extension > Usage of the radius search in 2.0
Total Posts: 4 - Pages (1): [1]
Author: Thomas Reindlmeier
Posted: Apr 11 2008 - 03:37 AM
Subject: Usage of the radius search in 2.0
Good morning,

I have a question how about to use the new "radius search" feature. How do I use it?

I'm currently writing an TYPO3 extension which uses WEC_map for showing addresses on GoogleMaps. The radius search comes where handy at the right time ;)

In the source code I found the function setRadius(), which looks like to be used like $map->setRadius(50,0) (=search within a 50 kilometer radius) ? I'm asking because in the API documentation this feature isn't mentioned, therefore I'm unsure how about using it.

Perhaps you could give me a hint how to use it?

If I specify some markes via $map->addMarkerByAddress, what happens if some of them would be out of the specified radius? Will they be simply ignored?

/Edit: I forgot to ask how I define the center point for the radius being created. Is it possible to pass a zip code entered via form to define this center point?

Greetings from Germany
Thomas
user picture Author: Christoph Koehler
Posted: Apr 11 2008 - 12:40 PM
Subject: re: Usage of the radius search in 2.0
Thomas,

Sorry about that, it should be in the docs. I will add it with the update today.
You are right, the first argument for the setRadius method is the radius, the second one is a boolean to indicate whether or not to use kilometers. The default is false, for using miles.
The API takes care of the rest, so that if a radius is set, no markers are added that are outside the radius.
There is a setCenterByAddress method, arguments are street,city,zip,state,country. You should give it at least a country and city or zip, that should work.

Again, sorry about the lousy docs. I am updating them as we speak.

Christoph
Author: Thomas Reindlmeier
Posted: Apr 14 2008 - 09:02 AM
Subject: re: re: Usage of the radius search in 2.0
Christoph Koehler wrote:
Again, sorry about the lousy docs.


No problem. Compared to other TYPO3 extensions using Google Maps WEC_Map has the most comprehensive documentation. Two days after releasing a new version and the documentation is not up-to-date at the same time is a very little problem.

I know very well that writing/updating documentations can be a pain and time-consuming.

In fact, your WEC_Map extension is imho the best one. It offers a simple and unterstandable documentation and it offers API functionality. Go and compare to other extensions like rggooglemaps and then you will understand what I mean.

Thomas
user picture Author: Christoph Koehler
Posted: Apr 14 2008 - 11:23 AM
Subject: re: Usage of the radius search in 2.0
Thanks for the praise
We have a technical writer on staff who does most of the writing for us and he does a really good job. I am the one to do all the API and reference stuff, so that's on me and I am late sometimes

Thanks again!

Christoph
Total Posts: 4 - Pages (1): [1]
You must login to post a message to this conference.