modolabs / Kurogo-Mobile-Web

Kurogo is a PHP framework for delivering high quality, data driven customizable content to a wide range of mobile devices. Its strengths lie in the customizable system that allows you to adapt content from a variety of sources and easily present that to mobile devices from feature phones, to early generation smart phones, to modern devices and tablets
http://kurogo.org
GNU Lesser General Public License v2.1
198 stars 99 forks source link

Map Search results in catchable error #38

Closed eebs closed 12 years ago

eebs commented 12 years ago

I'm running into a problem when searching through the map module. If I search for something, I get an error saying "Argument 1 passed to MapDataController::featureMatchesTokens() must be an instance of MapFeature". Line 41 of MapDataController. Only problem is, MapFeature doesn't exist anywhere in the code base (that I could find with grep). This is on our dev site, which is up to date with the most recent commits.

I found MapFeature on our live site, so I guess it's just something left over from some old code.

sonya commented 12 years ago

Thanks for catching that Eebs. The MapFeature interface was renamed to Placemark awhile ago and I really thought I had found all references to the old name in the code, but apparently not that one. I fixed this in the latest push -- can you see if that helps?

eebs commented 12 years ago

Just pulled, it doesn't throw the error any more, thank you. However if there is only one result, instead of going directly to that result, it displays the result list with one item. You can see this if you go here: http://m-dev.uvm.edu/map/ and search for "Williams".

eebs commented 12 years ago

I'm also noticing that it is not centered on the placemark. Clicking the center icon does center it however.

sonya commented 12 years ago

Thanks. I am closing this issue as the particular problem specified by the title is fixed.

The reason the single result still shows up in a list view is because there is now an option to use Google Places as the map module search engine, but when doing so, Google requires that you display their logo alongside the search results. There are certainly better ways to address this than require that all searches display in a list regardless of search engine, but I just haven't gotten around to it.

The placemark looks centered in my browser. Would you mind pinging me (sonya.huang@modolabs.com) with more details about what device/browser you're seeing the centering problem in?