Wasn't it [EMAIL PROTECTED] who wrote:
>But I can't just delete my switch code, since the purpose of this page
>is to load all the markers latlng within the current map viewpoint
>from database, to cut the long story short, i have a marker table
>contains the lat and lng, now i will generate the sql to load the
>markers, the sql will looks like
>
>select xxx from xxx where lat<[maxLat] and lat>[minLat] and
>lng<[maxLng] and lng>[minLng]
Don't do the switch on the client side. Pass the information that you
got from the API to the server.
In your server, check to see if minLng<maxLng. If that is the case
perform your normal
SELECT ... and lng<[maxLng] and lng>[minLng]
else invert that clause
SELECT ... and (lng>[maxLng] OR lng<[minLng])
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---