The example uses a geocoder data source that has already been created (a bing geocoder). You can create a Google geocoder using File - Create - New Data Source - more... and using the [...] browse button next to the Source box to specify your API key. You can then write the SQL code you want that uses that data source. If you also want to create the new data source using SQL, that's what the Edit Query button is for. Set up the New Data Source dialog as you would above with your API key but instead of pushing the Create Data Source button, push the Edit Query Button, and that will open the Command Window with SQL to create the data source. I just did that using an API key of 12345678 and got the following SQL: -- $manifold$ -- -- Auto-generated -- New Data Source -- CREATE DATASOURCE [Data Source] ( PROPERTY 'Source' '{ "Source": "https:\\/\\/maps.googleapis.com\\/maps\\/api\\/geocode\\/json?address={address}&key={key}", "SourceAgent": "Mozilla\\/5.0 Manifold\\/9.0", "SourceApiKey": "12345678", "SourceCache": true, "SourceCacheTemp": true, "SourceGeocodeReverse": "https:\\/\\/maps.googleapis.com\\/maps\\/api\\/geocode\\/json?latlng={lat},{lon}&key={key}", "SourceGeocodeSearch": "https:\\/\\/maps.googleapis.com\\/maps\\/api\\/place\\/nearbysearch\\/json?keyword={query}&type={category}&location={lat},{lon}&rankby=distance&key={key}", "SourceGeocodeSearchCircle": "https:\\/\\/maps.googleapis.com\\/maps\\/api\\/place\\/nearbysearch\\/json?keyword={query}&type={category}&location={lat},{lon}&radius={radius}&key={key}", "SourceSubtype": "google", "SourceUuid": "e45f498c-9a7d-4d60-a01c-b07626defdf6" }', PROPERTY 'Type' 'geocodeserver' ); (I added newlines in the above to make the code more compact for this forum) You can then use that SQL to create a data source if you don't want to do it manually. But I'm not sure why you'd use SQL to do that unless you want to automate such things to create a new data source in a project that does not already have one.
|