I think what I want is quite complex, but maybe someone can help me with some basics of it.
In d7 I have a content type and each node uses address field and via geocoder creates the geo data for that node. I use taxonomy terms here to categorize the node (eg: shop, restaurant, hotel, etc ..) and some nodes may have multiple categories added as they may be multiple types at the same time(one may be a restaurant as well as hotel).
I have created a taxonomy tree as such:
country -> city, eg:
england -> london
-> manchester
-> newcastle
Each city also has geo data attached to it. The country and city will be used in the url to filter the results based on a set proximity.
So, for example I could have this url
www.example.com/england/london/restaurant
which is equal to (for examples sake)
www.example.com/country/$2/$3
The country page is a static page that may list taxonomy terms (cities) for that country.
The next page up - selecting the city from the country page - does not yet display a view, but gives options for which category the node is in (this taxonomy term is attached to the node (Shop, Restaurant, etc ..))
Now I want to create a view that uses term $2 to set the location from which to start the proximity search from (the geo data is already added to the taxonomy field for cities and mustn't first get geocoded from the city name)
Then term $3 is the category which is attached to the node.
It then displays all the nodes from that category at a previously set distance (radius) away from the cities geo data. I presume I can either create an admin field where the distance can be set or simply hard code it in the module.
So, I am quite new to creating my own custom module and apart from field api I have not had much experience with other drupal api's - especially the views api.
Here is what I need to do - as far as I am aware:
Create a custom module - I don't think I can get around that - that:
1) gets the $2 and the attached geodata
2) creates a view for all nodes with taxonomy term $3 attached to it and filters them using proximity to only show nodes in a XX km radius from the geo point supplied by $2. This obviously includes converting lat/long to distances from the set point...
3) I want to be able to display a proximity slider so the radius value can be changed and the view refreshes.
I know this sounds like a massive job, but I thought that maybe I could do some of it directly in views and then maybe use some alter_hooks to add queries (for example to grab the geo data for $2)...
Can anyone help me with this, or give me some tips on how this can be done?
I just need some sort of strating point as I am totally new to this. I would also supply any code written back to the community and document my processes for others to follow.
Many thanks in advance.