[ka-Map-users] Zoom-to-search result

Raghavendra TK raghavendra.tk at gmail.com
Tue Nov 11 12:32:45 EST 2008


Hi Bob,

Do you display all the search results? If so then, you can embed a zoom
button next to the search results with its onclick method defined as follows
-

*onClick="myKaMap.zoomToExtents(50,50,60,60)"*

So when the zoom button is clicked corresponding to a search result, it will
zoom to corresponding area in the map. In my example, it will zoom to area
bounded by the co-ordinates (50,50) and (60,60). You might have to code
these values depending on ur results.

Also, Ominiverdi's blog captures a lot of other intricacies on Search. You
can see the blog
here<http://ka-map.ominiverdi.org/wiki/index.php/Search_By_Filter_Implementation>

Thanks,
Raghavendra

On *Mon Nov 10 16:42:08 EST 2008* , Bistrais, Bob wrote:

> *Bistrais, Bob* Bob.Bistrais at maine.gov
> <ka-map-users%40lists.maptools.org?Subject=%5Bka-Map-users%5D%20Zoom-to-search%20result&In-Reply-To=>
> *Mon Nov 10 16:42:08 EST 2008*
>
>    - Previous message: [ka-Map-users] Re: ka-Map-users Digest, Vol 43,
>    Issue 4
>    <http://lists.maptools.org/pipermail/ka-map-users/2008-November/003748.html>
>    - Next message: [ka-Map-users] problem with overlay in ie7
>    <http://lists.maptools.org/pipermail/ka-map-users/2008-November/003750.html>
>    - *Messages sorted by:* [ date ]<http://lists.maptools.org/pipermail/ka-map-users/2008-November/date.html#3749> [
>    thread ]<http://lists.maptools.org/pipermail/ka-map-users/2008-November/thread.html#3749> [
>    subject ]<http://lists.maptools.org/pipermail/ka-map-users/2008-November/subject.html#3749> [
>    author ]<http://lists.maptools.org/pipermail/ka-map-users/2008-November/author.html#3749>
>
> ------------------------------
>
> I want to set up a tool where a user can select a town name from a drop
> box, and automatically zoom to it.  It seems simple enough.  The part I
> have not yet figured out is how to automatically zoom.  I can get my
> search results, but still need to click the magnifying glass icon to
> zoom to it.  Has anyone tried this before, and could you point me in the
> right direction?
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20081110/d1eb8067/attachment.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20081111/31a2c6fb/attachment.html


More information about the ka-Map-users mailing list