GeographicPositionProperty.fromCrawledProperty constructor
GeographicPositionProperty.fromCrawledProperty(
- CrawledProperty property
Implementation
factory GeographicPositionProperty.fromCrawledProperty(
CrawledProperty property) {
assert(
property.name.toUpperCase() == "GEO",
"Received invalid property: ${property.name}",
);
return GeographicPositionProperty(
lat: FloatValue.fromCrawledStringValue(property.value.split(";").first)
.value,
long: FloatValue.fromCrawledStringValue(property.value.split(";").last)
.value,
);
}