Friday, February 5, 2010

Re: Google Map Store Locator: How do I have the Users address appear a green arrow/marker upon searching?

On Feb 5, 10:03 am, jandreoni <jandre...@gmail.com> 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 google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate