-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wildcard search #22
Comments
Hello, yes it works as i thought it should. $results = $osm->search(array("highway" => "*"));
foreach ($results as $result) {
$name = $result->getTag('name');
if (!in_array($name, $resultarray)){
$resultarray[]=$name;
}
} This way it give my for example all streetnames of all streettypes back. Additionally in the Code i check if the Name exists in the array, to not have duplicates. Thank you! |
Excellent :-) Unless you can think of any directly related enhancements for this, I'm going to consider closing this issue as fixed, thanks! |
In the current state you can just search for exact key value pairs in the loaded XML/data.
For example: "highway => residential" or "country => FR" in the search-Method.
I dont know if the OSM API has some kind of wildcard search already. But i do know that the Overpass/Turbo API has a Wildcard Search in the form of "key=*" . Overpass Tag Search.
It would be nice if you can perform an wildcard search, like if you want to get all highway-types from an loaded Area.
The text was updated successfully, but these errors were encountered: