Hi thank you for the modules and all the help you have provided.

I have a content type with two fields
ne called field_address where the user inputs the street address.
One called field_lat_lng which allows the user to put the latitude/longitute

The user can select only one of these fields.

If I create a view where I set the lat/lng off just one fields I get the map for example just field_address those nodes will show on the map, and there will be errors for the nodes which dont contain any address values, but the locations would be under field_lat_lng.

So if I now switch it around and user field_lat_lng to popuplate the latitude and longitude under the settings for the map display options, I will get markers for all the nodes which have the field_lat_lng filled, and will get erros for the nodes which have the address field completed.

What I have been trying to do is have the view display nodes which have either of the fields completed.

So I thought if I create an extra field in the view and rewrite it to contain both of the fields I could use that to set the latitude and longitude.

But this is not working.

I thought it should have worked, as the user could only select the lat_lng or address field so the new custom field will now display either of those options. When I view the field I get values such as
latitude: 51.49517
Longitude: 0.08806

When I get an error saying none of the rows could have the lat/lng set I get an array underneath with the select field displayed like.
views_custom = Array ( [0] =>
Latitude: 52.3236
Longitude: -2.00368
)

So I am unsure why this is not working.

Could you help me with getting locations from more than one field to work with the views map?

Thank you again

Comments

rdeboer’s picture

Version: 7.x-1.9 » 7.x-1.22

Hi Noopal,
I believe we can make this work.

I need more details. I have to do quite a bit of reading between the lines here... If I can log into your website that would be even better.

So I'm guessing this field_address is an AddressField (as in the AddressField module). It collects the postal address and then I assume you use Geocoder to convert this automatically to an (invisible) Geofield field?
This field_lat_lon is a Geofield?
And finally can you tell me details of the Rewriting you're doing? Are you rewriting into a third field or into the existing field_lat_lon field?

Can you please post a full screenshot of the page with the yellow warning telling about locations that do not have their lat/lon set?

Have you tried putting "views_custom" for both the latitude and longitude field specifiers in the IPGV&M View configuration panel?

Rik

rdeboer’s picture

Status: Active » Closed (won't fix)

Closing due to inactivity.