| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // All of the types that follow are simple mappings of the types defined by the | |
| 6 // "Google Maps JavaScript API v3" defined here: | |
| 7 // https://developers.google.com/maps/documentation/javascript/geocoding | |
| 8 | |
| 9 [DartPackage="mojo_services"] | |
| 10 module mojo; | |
| 11 | |
| 12 import "location/public/interfaces/location.mojom"; | |
| 13 | |
| 14 struct LocationType { | |
| 15 const string ROOFTOP = "ROOFTOP"; | |
| 16 const string RANGE_INTERPOLATED = "RANGE_INTERPOLATED"; | |
| 17 const string GEOMETRIC_CENTER = "GEOMETRIC_CENTER"; | |
| 18 const string APPROXIMATE = "APPROXIMATE"; | |
| 19 }; | |
| 20 | |
| 21 struct Bounds { | |
| 22 Location northeast; | |
| 23 Location southwest; | |
| 24 }; | |
| 25 | |
| 26 struct ComponentRestrictions { | |
| 27 string? administrative_area; | |
| 28 string? country; | |
| 29 string? locality; | |
| 30 string? postal_code; | |
| 31 string? route; | |
| 32 }; | |
| 33 | |
| 34 struct Options { | |
| 35 ComponentRestrictions? restrictions; | |
| 36 Location? location; | |
| 37 string? region; | |
| 38 }; | |
| 39 | |
| 40 struct Geometry { | |
| 41 Location location; | |
| 42 LocationType location_type; | |
| 43 Bounds viewport; | |
| 44 Bounds? bounds; | |
| 45 }; | |
| 46 | |
| 47 struct Result { | |
| 48 bool partial_match; | |
| 49 Geometry geometry; | |
| 50 string formatted_address; | |
| 51 array<string> types; | |
| 52 // TBD address_components | |
| 53 }; | |
| 54 | |
| 55 struct Status { | |
| 56 const string OK = "OK"; | |
| 57 const string ZERO_RESULTS = "ZERO_RESULTS"; | |
| 58 const string OVER_QUERY_LIMIT = "OVER_QUERY_LIMIT"; | |
| 59 const string REQUEST_DENIED = "REQUEST_DENIED"; | |
| 60 const string INVALID_REQUEST = "INVALID_REQUEST"; | |
| 61 }; | |
| 62 | |
| 63 interface Geocoder { | |
| 64 AddressToLocation(string address, Options? options) => (string status, array<R
esult>? results); | |
| 65 LocationToAddress(Location location, Options? options) => (string status, arra
y<Result>? results); | |
| 66 }; | |
| OLD | NEW |