It sounds like you're trying to combine the standard API geocoder with
a pointed local search algorithm. If that's the case, then the order
of things in your map should be like:
1. User enters their address in a input text box and clicks the submit
button.
2. The Javascript geocoder is used to determine the user's
coordinates.
3. Using the setCenter method, zoom the map to the user's coordinates.
4. Execute a local search using the keywords you describe, which would
be something like this in code:
searchControl.execute("not for profit") ;
The code for the searchControl goes like this:
var searchControl = new google.maps.LocalSearch( ) ;
map.addControl(searchControl) ;
You'll need to add the javascript load for the local search API,
here's a link to the developer's page:
Thanks for this. I got it to work but there are a few things I can't
figure out.
1) I already have an input field where the user enters his location.
I use the local search API to automatically call the search for 'not
for profit' as described by John. So I want to hide the search input
field that comes up on the map. Is this possible?
2) I notice that only a handful of markers show up. Would it be
possible to modify an option so that it will list 'x' amount? Or
possibly even all the results?
Thanks!
On Jun 28, 12:45 am, "maps.huge.info [Maps API Guru]"
<cor...@gmail.com> wrote:
> It sounds like you're trying to combine the standard API geocoder with
> a pointed local search algorithm. If that's the case, then the order
> of things in your map should be like:
> 1. User enters their address in a input text box and clicks the submit
> button.
> 2. The Javascript geocoder is used to determine the user's
> coordinates.
> 3. Using the setCenter method, zoom the map to the user's coordinates.
> 4. Execute a local search using the keywords you describe, which would
> be something like this in code:
> searchControl.execute("not for profit") ;
> The code for the searchControl goes like this:
> var searchControl = new google.maps.LocalSearch( ) ;
> map.addControl(searchControl) ;
> You'll need to add the javascript load for the local search API,
> here's a link to the developer's page:
> Thanks for this. I got it to work but there are a few things I can't
> figure out.
> 1) I already have an input field where the user enters his location.
> I use the local search API to automatically call the search for 'not
> for profit' as described by John. So I want to hide the search input
> field that comes up on the map. Is this possible?
> 2) I notice that only a handful of markers show up. Would it be
> possible to modify an option so that it will list 'x' amount? Or
> possibly even all the results?
> Thanks!
> On Jun 28, 12:45 am, "maps.huge.info [Maps API Guru]"
> <cor...@gmail.com> wrote:
> > It sounds like you're trying to combine the standard API geocoder with
> > a pointed local search algorithm. If that's the case, then the order
> > of things in your map should be like:
> > 1. User enters their address in a input text box and clicks the submit
> > button.
> > 2. The Javascript geocoder is used to determine the user's
> > coordinates.
> > 3. Using the setCenter method, zoom the map to the user's coordinates.
> > 4. Execute a local search using the keywords you describe, which would
> > be something like this in code:
> > searchControl.execute("not for profit") ;
> > The code for the searchControl goes like this:
> > var searchControl = new google.maps.LocalSearch( ) ;
> > map.addControl(searchControl) ;
> > You'll need to add the javascript load for the local search API,
> > here's a link to the developer's page:
But it's on my local test server, so it might not be accessible
depending if my computer is on.
Yeah I've looked through the documentation but can't seem to find how
to add more. Which is a problem because I basically want the user to
input his/her location and have the thing pop-up with a bunch of
balloons of non-profit organizations around the person's area.
John
On Jun 28, 11:46 am, "maps.huge.info [Maps API Guru]"
<cor...@gmail.com> wrote:
> How about showing your link?
> There's no need for a search box.
> I believe you get what you get in terms of results with a max of 8.
> Check the documentation though. I don't recall there being an option
> for this.
Here I have moved it onto my live site... if anyone could help me with
this I would really appreciate it as I'm stuck right now!
http://imusion.net/provictus/map.html
On Jun 29, 2:21 pm, Johnathan Hok <john...@gmail.com> wrote:
> But it's on my local test server, so it might not be accessible
> depending if my computer is on.
> Yeah I've looked through the documentation but can't seem to find how
> to add more. Which is a problem because I basically want the user to
> input his/her location and have the thing pop-up with a bunch of
> balloons of non-profit organizations around the person's area.
> John
> On Jun 28, 11:46 am, "maps.huge.info [Maps API Guru]"
> <cor...@gmail.com> wrote:
> > How about showing your link?
> > There's no need for a search box.
> > I believe you get what you get in terms of results with a max of 8.
> > Check the documentation though. I don't recall there being an option
> > for this.