Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
I have attached a sample QVW file that I need some direction on. In the QVW file, I've loaded some sample retail account information for the San Francisco area. What I would like to do is be able to search and select one (or more) stores/accounts and then have another chart (straight table) display all the accounts that are within X distance from the selections.
Does anybody know how to do this? I have the latitude and longitude information for each account as part of the sample data.
Hi mpejskar,
I've been trying to do exactly this for my build.
At the moment I have a Google Maps extension on my screen which pin points any company that is selected onto the map.
I also have a table which shows the surrounding companies of the selected company.
What I am trying to achieve is to also have the surrounding companies show up on the map.
Would you be able to provide any insight into how you went in achieving this?
Is it a matter of altering the Google maps expressions?
Any help on this matter will be greatly appreciated.
Tony.
Hi Mike, May I know how did you capture the latitude and logitude information for each account here?
Hey Tony,
I think I'm trying to do just what you do. Would you mind uploading your qvw document or send it to me? I'd be thankful.
Thanks,
Netanel
Hi Swuehl,
I am trying to implement your logic in script level, but in my case I have lack of data if I do outer join it's going to hang stage and even computer takes 100% memory and system is going to hang.
In my scenario I have to give radius dynamically for pickup city & Delivery city in the two separate input boxs.
kindly suggest me some alternative solution.
Thanks,
Ashok.
You would need to give some more details about your setting to understand the difference between yours and the one discussed here.
And why do you use two input boxes (two radii) for the two cities? Are you trying to find other cities that are located in the intersecting area?
Hi
I have latitude and longitude for both pick up city and delivery city, and the scenario is I need to calculate radius for both pickup and delivery & both radius should change dynamically.. so how shall I proceed wid this.
Sorry, I don't understand how you want to calculcate the radius.
I would suggest that you create a new thread, and post as much information as possible:
Your current data model, some sample lines of data, your current chart and your expected result for the sample data.
Hi Swuehl,
As u provided formula for km is below one
atan2(sqrt(sqr(sin((only({1}Latitude)*PI()/180-vLat1)/2))+cos(vLat1)*cos(only({1}Latitude)*PI()/180)*sqr(sin((only({1}Longitude)*PI()/180-vLon1)/2)))
,sqrt(1-(sqr(sin((only({1}Latitude)*PI()/180-vLat1)/2))
+cos(vLat1)*cos(only({1}Latitude)*PI()/180)*sqr(sin((only({1}Longitude)*PI()/180-vLon1)/2)))))*2*6371
My requirement is user will enter miles instead of kilometers,so what should i do change in above formula.
Thanks,
Ashok.
Hi Stefan,
I have data a below, i want to calculate the distance using latitude and longitude, please help me out.
I tried the way you did but by distance in expression is showing zero
Please help me out wite below link
Calculating distance using Latitude and Longitude
employeid | name | state | District | Latitude | Longitude |
1 | john | asd | newyork | 22.37 | 114.12 |
2 | ricky | adsd | carolina | 22.36 | 114.13 |
3 | patrik | affdf | WDC | 22.32 | 114.21 |
4 | micheal | agffsf | London | 22.32 | 114.16 |
5 | harry | addsdsdfs | Hong Kong | 22.28 | 114.18 |