the query looks now like this:
// Search the rows in the markers table
$query = sprintf("SELECT address, name, lat, lng, color, ( 3959 * acos
( cos( radians('%s') ) * cos( radians( lat ) ) * cos( radians( lng ) -
radians('%s') ) + sin( radians('%s') ) * sin( radians( lat ) ) ) ) AS
distance FROM markers HAVING distance < '%s' ORDER BY distance LIMIT
0 , 20",
mysql_real_escape_string($center_lat),
mysql_real_escape_string($center_lng),
mysql_real_escape_string($center_lat),
mysql_real_escape_string($radius));
$result = mysql_query($query);
$result = mysql_query($query);
if (!$result) {
die("Invalid query: " . mysql_error());
}
On 2 dec, 11:56, Milcoi <[EMAIL PROTECTED]> wrote:
> in my database I have a collom named color.
> there are 4 different color (blue, gray, green, red)
>
> the markers I show are called blue.png red.png......
>
> Now all colors (markers) are shown when search.
>
> I like it to show only 1 color (marker)
>
> example "red" stands for airflight location
>
> does this comment makes it more understandable?
>
> On 1 dec, 22:42, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Dec 1, 12:45 pm, Milcoi <[EMAIL PROTECTED]> wrote:
>
> > > query is searching through the database for color
> > > they display via a icon called a color.
>
> > I don't understand your response.
> > from my previous message:
>
> > > Do you need the red, grey or green markers to ever show?
> > > You probably should configure your query to the database to not return
> > > them.
>
> > -- Larry
>
> > > On 1 dec, 21:20, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > > On Dec 1, 11:27 am, Milcoi <[EMAIL PROTECTED]> wrote:
>
> > > > > link:www.modelbouwlocaties.nl/modelvliegclubs/
>
> > > > > I have a database with a color collum.
> > > > > there are 4 colors, blue, red, gray, green
>
> > > > > I want only the blue rows to be visible / show
>
> > > > But do you need the red, grey or green markers to ever show?
>
> > > > I don't see any of those markers on the page to which you provided a
> > > > link (I searched for 50km around Amsterdam), your "red" marker looks
> > > > white with a picture of an airplane on it. Is that correct?
>
> > > > You probably should configure your query to the database to not return
> > > > them.
>
> > > > -- Larry
>
> > > > (PS - Code dumps are not required or useful. Links are much better)
>
> > > > > On 1 dec, 20:22, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > > > > On Dec 1, 10:53 am, Milcoi <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hello,
>
> > > > > > > in my script I have this script to search my database for
> > > > > > > different
> > > > > > > color markers:
>
> > > > > > > function coloredRideshareIcon(iconColor) {
> > > > > > > var color;
> > > > > > > if ((typeof(iconColor)=="undefined") ||
> > > > > > > (iconColor==null)) {
> > > > > > > color = "red"
> > > > > > > } else {
> > > > > > > color = iconColor;
> > > > > > > }
> > > > > > > if (!icons[iconColor]) {
> > > > > > > var icon = new GIcon(baseIcon);
> > > > > > > icon.image = "http://www.modelbouwlocaties.nl/"+ color
> > > > > > > +".png";
> > > > > > > icons[iconColor]=icon;
> > > > > > > }
> > > > > > > return icons[iconColor];
> > > > > > > }
>
> > > > > > > I like to show only the blue icons but need a little help.
>
> > > > > > A link to your map would allow us to help by better understanding
> > > > > > where you are.
> > > > > > What exactly is it you trying to do? If you are only going to show
> > > > > > blue markers _ever_, you don't need the function defined above, you
> > > > > > can just define and use a custom blue icon.
>
> > > > > > -- Larry- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > > > > > - Tekst uit oorspronkelijk bericht weergeven -- Hide quoted text -
>
> > > > > - Show quoted text -- Tekst uit oorspronkelijk bericht niet weergeven
> > > > > -
>
> > > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit
> > > > oorspronkelijk bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk
> > bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---