thank you, for this detailed answer!

another idea to fix my problem, is to change the location where google
local search sets its markers.
i dont know why google sets its markers anywhere in the map. bei my
marker is allways in the very center.

maybe it is possible, that if i use the local search and than klick on
one result of the resultlist, that google shows the location (i
clicked on) exactely in the center? this workaround would help me a
lot? but is it possible?

the function of my website is to find any location with one of the two
search fields. and than i just need to get the latitude and
longitude.
" thats all " :)

On 21 Okt., 18:46, Jeremy Geerdes <[EMAIL PROTECTED]> wrote:
> Well, this is interesting.  Apparently, since the last time I really  
> looked, the dev team has pushed some interesting updates to the  
> google.maps.LocalSearch.  But that's another post.
>
> Anyway, the answer to your question is going to be a little  
> complicated.  First, you have to define at least one custom GIcon for  
> your custom marker(s).  The best way to figure out how to do this is  
> to check out Mike Williams' excellent Google Maps tutorial.  The  
> custom icons lesson is linked below:
>
> http://econym.googlepages.com/custom.htm
>
> Once you've done that, you need to build an options object to hand to  
> the google.maps.LocalSearch constructor, as below:
>
> var options={
>   pins:{
>    local:[
>     your_a_pin,
>     your_b_pin,
>     your_c_pin,
>     your_d_pin,
>     your_e_pin,
>     your_f_pin,
>     your_g_pin,
>     your_h_pin
>    ],
>    kml:[
>     your_a_pin,
>     your_b_pin,
>     your_c_pin,
>     your_d_pin,
>     your_e_pin,
>     your_f_pin,
>     your_g_pin,
>     your_h_pin
>    ]
>   }
>
> };
>
> Now, please note two VERY important things about this code.  First,  
> you do NOT have to define BOTH the local AND kml portions of that  
> object.  You can define custom pins for local, but not kml, or vise  
> versa.  And second, you can make all of the pins as the same GIcon  
> object, but you have to include that GIcon object 8 times in the array  
> or you'll get some rather unexpected results.  For example, if you say  
> local:[myPin] (i.e., only enter it once), the first returned result  
> will get the custom pin but all others will be standard GMarkers  
> (i.e., the red pin with a black dot).
>
> Then you just have to hand that options object to the  
> google.maps.LocalSearch constructor, as below:
>
> map.addControl(new google.maps.LocalSearch(options)); // where map is  
> your GMap object.
>
> I hope that helps!
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.com
> [EMAIL PROTECTED]
>
> Unless otherwise noted, any price quotes contained within this  
> communication are given in US dollars.
>
> If you're in the Des Moines, IA, area, check out Debra Heights  
> Wesleyan Church!
>
> On Oct 21, 2008, at 5:59 AM, whiskyman007 wrote:
>
>
>
>
>
> > Hi,
>
> > on this url you can see my little website:http://citnamor.de/geo.html
>
> > there are two search fields. my own one and the google localsearch
> > field.
>
> > if i just use my on search field, everything works fine. but if i use
> > the google localsearch field. the location of a localsearch result
> > wont be presented as a marker.
>
> > does anyone know how can i bringt the two thinks together?
> > i want that, if i do a localsearch and than click on a result, that my
> > own defined maker goes to this position!
>
> > at present my marker is allways located in the center.
>
> > i would appreciate any kind of help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to