Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: examples/js/maps/geocoder.mojom

Issue 848213003: JS Mojo Geocoder Demo (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « examples/js/maps/demo.js ('k') | examples/js/maps/geocoder_service.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 module geocoder;
10
11 struct Location {
12 float latitude;
13 float longitude;
14 };
15
16 struct LocationType {
17 const string ROOFTOP = "ROOFTOP";
18 const string RANGE_INTERPOLATED = "RANGE_INTERPOLATED";
19 const string GEOMETRIC_CENTER = "GEOMETRIC_CENTER";
20 const string APPROXIMATE = "APPROXIMATE";
21 };
22
23 struct Bounds {
24 Location northeast;
25 Location southwest;
26 };
27
28 struct ComponentRestrictions {
29 string? administrative_area;
30 string? country;
31 string? locality;
32 string? postal_code;
33 string? route;
34 };
35
36 struct Options {
37 ComponentRestrictions? restrictions;
38 Location? location;
39 string? region;
40 };
41
42 struct Geometry {
43 Location location;
44 LocationType location_type;
45 Bounds viewport;
46 Bounds? bounds;
47 };
48
49 struct Result {
50 bool partial_match;
51 Geometry geometry;
52 string formatted_address;
53 array<string> types;
54 // TBD address_components
55 };
56
57 struct Status {
58 const string OK = "OK";
59 const string ZERO_RESULTS = "ZERO_RESULTS";
60 const string OVER_QUERY_LIMIT = "OVER_QUERY_LIMIT";
61 const string REQUEST_DENIED = "REQUEST_DENIED";
62 const string INVALID_REQUEST = "INVALID_REQUEST";
63 };
64
65 interface Geocoder {
66 AddressToLocation(string address, Options? options) => (string status, array<R esult>? results);
67 LocationToAddress(Location location, Options? options) => (string status, arra y<Result>? results);
68 };
OLDNEW
« no previous file with comments | « examples/js/maps/demo.js ('k') | examples/js/maps/geocoder_service.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698