That should be fairly straightforward....yet I think you're going to have to
figure out how to eval the stuff going BACK to the map.html page in JS.
 Gawd I hate JavaScript.  Actually, I'm probably going to have to figure out
something similar in the next day or two.  It'll be easy enough...but
possibly painful...as web dev these days requires knowing like 8 languages
at once for any given app.  yay!

Pass the fields in as vars, set them to a numeric order and then tuck them
in an array and sort order them for the display?  That's possibly over
engineered....  Anyway, you get the picture, yes?

k


On Thu, Apr 8, 2010 at 9:50 PM, Eric <[email protected]> wrote:

> Well what I am trying to do is setup so the locations I am listing
> have an opportunity to pay to have their location "featured" on our
> site.  What this means for them is increased amount of location
> information, but I am also wanting those locations to appear first.
> For instance, say a search was performed this is how I want the
> results returned:
>
> Featured Location A (.25 miles)
> Featured Location B (1.75 miles)
> Featured Location C (8 miles)
> Standard Locations 1 (.1 mile)
> Standard Locations 2 (2 miles)
> Standard Locations 3 ... etc
>
> So I want the featured locations to show up first, even though they
> are not closer than the standard locations.
>
> So it would be an if $row[18] == 'y' or maybe a while statement... I'm
> a little new to programming, which brings me to my next point... you
> lost me on your explanation of the filter results (basically I want
> something like the Ace Hardware store locator example they gave on the
> Google tutorial).
>
> On Apr 8, 11:33 pm, Karen Windus <[email protected]> wrote:
> > Oh and I haven't played around with the searchLocationsNear function
> > yet...but would love to hear more about what you're trying to do with it.
>  I
> > would imagine it's a matter of passing a geocode or a Lat/Lng into it
> with a
> > parameter of some sort to define the "Near" part, no?
> >
> >
> >
> > On Thu, Apr 8, 2010 at 9:05 PM, Eric <[email protected]> wrote:
> > > !!!!! FINALLY!
> >
> > > Thank you Karen!  You set me in the right direction.  I also added
> > > "id" into the $query = sprintf line on the genxml.php page and added a
> > > $newnode at the bottom.  It's working.
> >
> > > That leaves me with 3 more questions still:
> >
> > > First, on the results page it is zooming to the correct location but
> > > not adding a marker... This is the only one that I am super concerned
> > > about.
> >
> > > Second, I have a filter on the search that I would like to
> > > incorporate.  I need to run an if statement on the results and only
> > > display certain ones.  I have fields in my table for these locations
> > > and the values are either y or n to indicate if they fall into that
> > > category (some fall into multiple categories).
> >
> > > Finally, I would like the option to have "featured" locations and I
> > > would like them to appear first, so if the searchLocationsNear
> > > function could separate those out first, then display the rest, that
> > > would be great.  I have another field with a y or n value to determine
> > > if the location is featured or not.
> >
> > > On Apr 8, 10:32 pm, Eric <[email protected]> wrote:
> > > > Thanks for the response... However, now the search does not work...
> > > > I've triple checked the code and everything seems to be in place, it
> > > > just doesn't return any results (it doesn't even return a "no results
> > > > found"... Is there anything I need to change in the genxml.php file?
> > > > I tried adding a $newnode for id but nothing seems to help...
> >
> > > > On Apr 8, 11:31 am, Karen Windus <[email protected]> wrote:
> >
> > > > > This is how I did it for some basic info with a link that I built
> from
> > > my
> > > > > XML file...granted, this was built just before the release of v3
> API,
> > > but
> > > > > I'm thinking that it should still work.  If it doesn't, let me
> know.
> > >  It
> > > > > would be nice to know what I need to do to upgrade parts of my code
> > > from 2.5
> > > > > to 3.0...
> >
> > > > > var marker = createMarker(point, name, address, city, state, zip,
> > > rooms,
> > > > > id);
> > > > >          //alert(markers.length);
> > > > >          map.addOverlay(marker);
> > > > >          var sidebarEntry = createSidebarEntry(marker, name,
> address,
> > > city,
> > > > > state, zip, rooms, distance);
> > > > >          sidebar.appendChild(sidebarEntry);
> > > > >          bounds.extend(point);
> > > > >        }
> > > > >        map.setCenter(bounds.getCenter(),
> > > map.getBoundsZoomLevel(bounds));
> > > > >      });
> > > > >    }
> >
> > > > >     function createMarker(point, name, address, city, state, zip,
> > > rooms, id)
> > > > > {
> > > > >       var marker = new GMarker(point);
> > > > >       var html = '<b>' + name + '</b> <br/>' + address + '<br/>' +
> city
> > > +
> > > > > ',&nbsp;&nbsp;' + state + ',&nbsp;&nbsp;' + zip + '<br/><b><font
> > > > > color="red">Number of rooms:</font>&nbsp;' + beds + '</b><br/><a
> > > > > href=localhost/member.php?id=' + id + '>Profile</a>';
> > > > >       GEvent.addListener(marker, 'click', function() {
> > > > >         marker.openInfoWindowHtml(html);
> > > > >       });
> > > > >       return marker;
> > > > >     }
> >
> > > > > That should be the code to answer your question I hope.  If not or
> if I
> > > > > misread your question let me know...
> >
> > > > > Best of luck,
> >
> > > > > Karen
> >
> > > > > On Thu, Apr 8, 2010 at 9:21 AM, Eric <[email protected]>
> wrote:
> > > > > > My test site is
> > > > > >http://www.byebyewithbaby.com/test3.php. I have searched but
> haven't
> > > > > > found any answers on this...
> >
> > > > > > I used the tutorial at
> > > > > >http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html
> > > > > > for the code to this search.
> >
> > > > > > I have a page (http://www.byebyewithbaby.com/locations.php)
> that,
> > > > > > when
> > > > > > passed a "location_number" (ie locations.php?&location_number=[id
> > > > > > goes
> > > > > > here]) it will dynamically display more details on the entry for
> that
> > > > > > particular id number (which is in $row[0]).
> >
> > > > > > What code would I enter (and where would I enter it - I'm
> assuming in
> > > > > > the "function createMarker" area) to have it display a
> > > > > > link of "<a href='http://www.byebyewithbaby.com/locations.php?
> > > > > > &location_number=".$row[0]."'>Click Here for More Info</a>"?
> >
> > > > > > --
> > > > > > You received this message because you are subscribed to the
> Google
> > > Groups
> > > > > > "Google Maps JavaScript API v3" group.
> > > > > > To post to this group, send email to
> > > > > > [email protected].
> > > > > > To unsubscribe from this group, send email to
> > > > > > [email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3%2B
> [email protected]><google-maps-js-api-v3%2B
> > > [email protected]>
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Maps JavaScript API v3" group.
> > > To post to this group, send email to
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3%2B
> [email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

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

Reply via email to