3

I am building a restaurant application which would have a search functionality, and when somebody searches of restaurants for a zip code, it would return the data. The data would be the name of the restaurant, the description and the map. When a user is adding the restaurant, I am using address field and geofield to get the latitude and longitude, so getting the maps up and running isn't an issue now.

However, I trying to create the search view, but I am unable to create a view which has a path, and which would display the title, description and then the map.

ex: Title | Description
    MAP1(map for first restaurant)

    Title | Description
    MAP2

Can somebody tell me how would I build it?

The modules I am using to build this are geofield, geophp, geocoder, addressfield, openlayers, views, ctools and libraries.

1 Answer 1

2
+50

Step 1

Install and enable the Geofield Map module. Create a view with the Geofield (latitude and longitude) fields with a contextual filter node ID. Change Formatter to Geofield Map.

screenshot

Step 2

Install and enable the Views Field View module. Create another view for the restaurant details. For viewing the map, you can select Global: view in the field. You then select which view to embed in that field and give the arguments it requires in the field settings.

screenshot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.