On Feb 5, 4:59 am, Jason Andreoni <[email protected]> wrote:
> Thank you, Andrew, that was exactly it. I read your suggestion
> earlier, I just didn't know how to implement it.
>
> Next obstacle is how to get just the value from the search to appear
> in the box. Right now, I get the value from the search, but it's also
> returning 3 "undefined" values from the DB.

Another reason to modify the createMarker function.  Either change it
to not include parameters that are null/undefined or write another
version that only uses the 2 parameters you need for the center
marker.

  -- Larry




>
> Thanks again!
>
> --Jason
>
> On Fri, Feb 5, 2010 at 5:41 AM, Andrew Leach
>
>
>
> <[email protected]> wrote:
> > On Feb 5, 10:03 am, jandreoni <[email protected]> wrote:
>
> >> I said that in my previous post (" I would like the address that the
> >> user is searching against to appear on the map as well. ").
>
> > I think what you're looking for is to add two statements between these
> > lines
> >  }
> >  map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
> > so it looks like this:
> >  }
> >  map.addOverlay(createMarker(center,
> > document.getElementById('addressInput').value));
> >  bounds.extend(center);
> >  map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
>
> > ...which is what I suggested earlier: add a marker at "center" and
> > extend the bounds to include it. I haven't been able to test this
> > though.
>
> > Note that you may need to change createMarker() and the lines which
> > call it so you can specify an icon to use for the marker it creates.
>
> > Andrew
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Maps API" 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 
> > athttp://groups.google.com/group/google-maps-api?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-maps-api?hl=en.

Reply via email to