I get these notices

Notice: Undefined index: lat in geofield_field_formatter_view()
Notice: Undefined index: lon in geofield_field_formatter_view()

I've rewritten the switch code block and moved the foreach loop outside of it. I find the code easier to read as a result.

To fix the notices I make sure the lat/lon is not empty in the item.

Comments

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new11.83 KB

patch also fixes various white space issues.

mikeytown2’s picture

same patch for 7.x-2.x

noslokire’s picture

Looks good to me

mikeytown2’s picture

StatusFileSize
new558 bytes

A simpler way to achieve the same thing.