Google Groups Home
Help | Sign in
Display Markers from A Search Query
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Johnathan Hok  
View profile
 More options Jun 27, 11:49 pm
From: Johnathan Hok <john...@gmail.com>
Date: Fri, 27 Jun 2008 20:49:10 -0700 (PDT)
Local: Fri, Jun 27 2008 11:49 pm
Subject: Display Markers from A Search Query
I'm really new to the Google Maps API and have searched around but to
no avail.

I'm trying to create a map where the user can enter their location and
the map will display:
1) A marker for their location.
2) All the markers that display when I search this on Google Maps:
http://maps.google.com/maps?f=q&hl=en&geocode=&q=not+for+profit+loc:+...

Where "16 14th Avenue, Markham, Ontario" would just be the location
where the user entered.

Basically all the markers that come up when I search for "not for
profit" near the location.

If anyone can point me in the right direction I would appreciate that.

Thanks a lot!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
maps.huge.info [Maps API Guru]  
View profile
 More options Jun 28, 12:45 am
From: "maps.huge.info [Maps API Guru]" <cor...@gmail.com>
Date: Fri, 27 Jun 2008 21:45:15 -0700 (PDT)
Local: Sat, Jun 28 2008 12:45 am
Subject: Re: Display Markers from A Search Query
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:

http://code.google.com/apis/ajaxsearch/local.html

-John Coryat

http://maps.huge.info

http://www.usnaviguide.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johnathan Hok  
View profile
 More options Jun 28, 1:58 am
From: Johnathan Hok <john...@gmail.com>
Date: Fri, 27 Jun 2008 22:58:51 -0700 (PDT)
Local: Sat, Jun 28 2008 1:58 am
Subject: Re: Display Markers from A Search Query
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]"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johnathan Hok  
View profile
 More options Jun 28, 11:41 am
From: Johnathan Hok <john...@gmail.com>
Date: Sat, 28 Jun 2008 08:41:15 -0700 (PDT)
Local: Sat, Jun 28 2008 11:41 am
Subject: Re: Display Markers from A Search Query
I've hidden the search box now by overriding the CSS:
  .gmls-search-form {
        display: none;
  }

But now I'm stuck on number 2 and showing all the results or at least
more markers.  Any help/direction would be appreciated.

On Jun 28, 1:58 am, Johnathan Hok <john...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
maps.huge.info [Maps API Guru]  
View profile
 More options Jun 28, 11:46 am
From: "maps.huge.info [Maps API Guru]" <cor...@gmail.com>
Date: Sat, 28 Jun 2008 08:46:13 -0700 (PDT)
Local: Sat, Jun 28 2008 11:46 am
Subject: Re: Display Markers from A Search Query
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.

-John Coryat

http://maps.huge.info

http://www.usnaviguide.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johnathan Hok  
View profile
 More options Jun 29, 2:21 pm
From: Johnathan Hok <john...@gmail.com>
Date: Sun, 29 Jun 2008 11:21:17 -0700 (PDT)
Local: Sun, Jun 29 2008 2:21 pm
Subject: Re: Display Markers from A Search Query
The URL is: http://wiiftw.com/provictus/map.html

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]"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johnathan Hok  
View profile
 More options Jul 5, 2:22 pm
From: Johnathan Hok <john...@gmail.com>
Date: Sat, 5 Jul 2008 11:22:07 -0700 (PDT)
Local: Sat, Jul 5 2008 2:22 pm
Subject: Re: Display Markers from A Search Query
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:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ralph Ames  
View profile
 More options Jul 5, 9:25 pm
From: Ralph Ames <ralph.a...@gmail.com>
Date: Sun, 6 Jul 2008 04:25:40 +0300
Local: Sat, Jul 5 2008 9:25 pm
Subject: RE: Display Markers from A Search Query
Try changing this:

searchControl.execute('not for profit loc:' + address);

to this

searchControl.execute('non profit');

might work.

Ralph

www.easypagez.com
-


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google