On Mar 9, 5:13 pm, Andrew Leach <[email protected]> wrote:
> On Mar 9, 11:59 am, Asif <[email protected]> wrote:
>
>
>
> > Now there is change in requirement.
>
> Hmm... are we being asked to write your code for you?

Sorry misunderstood. I am not asking for witting code but instead idea
to resolve conflict.
And thanx for giving hint.

>
> > The application should find out all the objects that are located in
> > Amsterdam, also the objects which are not exactly located in Amsterdam
> > but nearby having service range up to Amsterdam.
>
> > So i have known latitude, longitude values for Amsterdam returned by
> > google map, also the objects having respective lat,lng value and
> > service range/radius stored in database. How can i make it possible?
>
> If you give Amsterdam a point location, then you can just select every
> object which is within range of Amsterdam.
>
> select * from table where (distance to Amsterdam) < (service_range)
>
> That will select everything within range of Amsterdam, whether it's in
> Amsterdam or outside the city. For objects within Amsterdam, the
> distance will [presumably] always be less than their service range, so
> they will always be included -- and if the distance from an object is
> more than its service range you don't want to include it anyway.
>
> Andrew


Absolutely above solution is working. But always working. There might
be objects that are in Amsterdam but having service range less that
the distance from Amsterdam.

For e.g. if my object is 51 KM apart from Ammsterdam but having
service range 50 KM. Now above solution doesn't include this point as
having service range less than the distance from Amsterdam.
We have to display all the objects that resides in Amsterdam and also
the objects which are not in Amsterdam but having service range in the
Ammsterdam






--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to