Gao Deyun Storage Introduction

Source: Internet
Author: User

Today we are concerned about Gao Deyun storage, that is, we upload a bunch of location information to the cloud manager provided by gold, and then we call our saved map information in the region.

Specific is what, own Baidu a bit on the line.

The services offered by the German:

Today I will talk about the specific process. I will use the Web Services API with the Android Service SDK. First we look at a picture

The relevant APIs are as follows:

Cloud Search api:http://lbs.amap.com/yuntu/reference/cloudsearch/

Cloud storage api:http://lbs.amap.com/yuntu/reference/cloudstorage/#t1

Android Cloud sdk:http://lbs.amap.com/api/android-sdk/guide/cloud/

You will find that gold does not provide the ability to manipulate (add and remove) data from the cloud in the Android Service SDK.

Why is this?

Consider the user security issue (as long as there is tableid, and key can directly modify the cloud database. ), it is not recommended to operate the data in the cloud storage directly at the terminal (Add and remove).

It is recommended () to have a common server (personal) in the middle to operate cloud imagery.

What key to apply for?

APIkey: The main purpose is to use the development services provided by the high-D map. Example Android Platform SDK.

Webkey: If you need to implement cloud storage capabilities, you need to request a cloud storage service key. There are a number of options, such as Web service APIs.

Why we want to use webkey because we want to modify data in cloud storage directly from Android. The HTTP protocol makes it easy to implement.

link to request key: http://lbs.amap.com/dev/key#/

Don't forget to open the "cloud storage" permission. Otherwise you won't be able to access the cloud.

We need to fill in the SHA1, the path can be found in Eclipse path as follows:

Eclipse>preferences>android>build

I recommend using a debug KeyStore (which is the debug version of Security Code SHA1), because the SHA1 code in Eclipse is sometimes changed, then the code prompts "INVALID USER SCODE".

By entering the command in the CMD Command line window:

Keytool-genkey-alias androiddebugkey-keyalg rsa-validity 20000-keystore debug.keystore-storepass Android-keypass an Droid

Then open eclipse>preferences>android>build Add custom debug KeyStore

Where is the generated key?

C Disk user> own >.android directory will have debug.keystore file import into it. Then copy to the debug version of security Code SHA1

After the application you can see such as:

Special Note: If you use the Android Platform SDK you must add the user key (Android Platform SDK) in the project "Androidmanifest.xml" file.

<ApplicationAndroid:icon= "@drawable/icon"Android:label= "@string/app_name">         <Meta-dataAndroid:name= "Com.amap.api.v2.apikey"Android:value= "Please enter your user key"></Meta-data>          <ActivityAndroid:name= "Com.amap.map3d.demo.MainActivity">             <Intent-filter>                <ActionAndroid:name= "Android.intent.action.MAIN">                <categoryAndroid:name= "Android.intent.category.LAUNCHER">             </category></Action></Intent-filter>         </Activity></Application>

Reference: http://lbs.amap.com/api/android-sdk/guide/mapshow/

To create a cloud image:

Quick drawing: http://lbs.amap.com/yuntu/operation/make/

To create a cloud image manually:

We first need to log in to the Data management console: http://yuntu.amap.com/datamanager/

1. Log in to the Data management console

2. Click "New Map"

3. Add Data

You can think of this platform as a database.

This cloud map is a table.

Fixed field: Id,name,image,geo-x,geo-y,address,createtime,updatetime

Add a custom field: Click the Red box to add it.

We need an identification number (TABLEID) when we need to access this table, and TABLEID is used in the code to access this table.

Where's TableID?

Click on "Development Options"

Then we can see that there is an index management button.

What is index management? is when you want to search for a row of data when you add field to the query.

We can add a maximum of 5 custom indexes.

To add an index:

1 The index field is obtained by {keyword= indexed field value} when reading data in code.

2 Default resource name,address You can add a custom field.

Next we continue to look at the cloud search

Cloud Search:

The main points above several search methods can be referred to the API.

Local Search: when the retrieval area is national, it is equivalent to retrieving the data stored in the cloud image in a full table. Keywords is a keyword query for the corresponding column content of the text index field;

Peripheral Search: in the specified TableID data table, search for the location data that matches the filter criteria within the specified center point and radius range. Service agreement: Http/https GET.

Polygon Search: in the specified TableID data table, search for location data within the specified polygon range that matches the filter criteria. Multi-point multiplexing. Service agreement: Http/https GET.

ID Retrieval: in the specified TableID data table, query the data details of the corresponding data ID. Only with _id, service agreement: Http/https GET.

Cloud Search api:http://lbs.amap.com/yuntu/reference/cloudsearch/

The next section we talk about the implementation of the method ~

Gao Deyun Storage Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.