Seb
Seb

Reputation: 152

jQuery plugin and integrating Google Maps with autocomplete

I'm building a custom made jquery plugin.

I have a trigger ( which sits on a default google map ), which pops out a sort of a plugin option ( let's call it toolbox ). In this toolbox I have an input which serves as the autocomplete input. Everything works fine so far, the dropdown list appears and I get the marker in the right spot. Now, I'd like the plugin to replace the default map from the html with the one generated by the autocomplete.
Here's the code: http://jsfiddle.net/rcbnG/

EDIT: I've updated the jsfiddle code so it looks a bit cleaner: http://jsfiddle.net/rcbnG/1/

EDIT 2: ( because I did not make myself understood )
The attached code works fine. The autocomplete ( which is a really important point in this plugin ) and the generated map are good.

What's wrong then?
What I'm actually trying to replace in my html is the Google Map embedded code. I'm trying to replace the default one with a NEW IFRAME code which is displaying the map that I just generated using the autocomplete function of my plugin. Basically I need the coordinates ( longitude & latitude ) so I can generate a new iframe with the appropriate values.

Upvotes: 0

Views: 863

Answers (1)

charlietfl
charlietfl

Reputation: 171669

jQuery gmap3 plugin has an integrated solution for autocomplete to map http://gmap3.net/examples/address-lookup.html

Upvotes: 1

Related Questions