资源简介

我是第一次在CSDN上发表资源,希望大家多多支持啦。这个软件是基于谷歌地图的SDK做成的,它实现色功能有定位、随时更新位置信息、显示当前的坐标与海拔,还可以查询某一具体的地方并且显示轨迹等多方面功能。

资源截图

代码片段和文件信息

/*
 * Copyright (C) 2015 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License Version 2.0 (the “License“);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing software
 * distributed under the License is distributed on an “AS IS“ BASIS
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.androidwearmap;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

import android.app.Activity;
import android.os.Bundle;
import android.support.wearable.activity.WearableActivity;
import android.support.wearable.view.DismissOverlayView;
import android.view.View;
import android.view.WindowInsets;
import android.widget.frameLayout;

/**
 * Sample that shows how to set up a basic Google Map on Android Wear.
 */
public class MainActivity extends WearableActivity implements OnMapReadyCallback
        GoogleMap.OnMapLongClickListener {

    private static final LatLng SYDNEY = new LatLng(-33.85704 151.21522);

    /**
     * Overlay that shows a short help text when first launched. It also provides an option to
     * exit the app.
     */
    private DismissOverlayView mDismissOverlay;

    /**
     * The map. It is initialized when the map has been fully loaded and is ready to be used.
     *
     * @see #onMapReady(com.google.android.gms.maps.GoogleMap)
     */
    private GoogleMap mMap;

    private MapFragment mMapFragment;

    public void onCreate(Bundle savedState) {
        super.onCreate(savedState);

        // Set the layout. It only contains a SupportMapFragment and a DismissOverlay.
        setContentView(R.layout.activity_main);

        // Enable ambient support so the map remains visible in simplified low-color display
        // when the user is no longer actively using the app but the app is still visible on the
        // watch face.
        setAmbientEnabled();

        // Retrieve the containers for the root of the layout and the map. Margins will need to be
        // set on them to account for the system window insets.
        final frameLayout topframeLayout = (frameLayout) findViewById(R.id.root_container);
        final frameLayout mapframeLayout = (frameLayout) findViewById(R.id.map_container);

        // Set the system view insets on the containers when they become available.
        topframeLayout.setOnApplyWindowInsetsListener(new View.OnApplyWindowInsetsListener() {
            @Override
            public WindowInsets onApplyWin

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-03-24 03:15  android-samples-master\
     文件          54  2016-03-24 03:15  android-samples-master\.gitignore
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\
     文件          81  2016-03-24 03:15  android-samples-master\AndroidWearMap\.gitignore
     文件       11361  2016-03-24 03:15  android-samples-master\AndroidWearMap\LICENSE
     文件        2662  2016-03-24 03:15  android-samples-master\AndroidWearMap\README.md
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\
     文件           7  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\.gitignore
     文件        1555  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\build.gradle
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\libs\
     文件          95  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\libs\.gitignore
     文件         657  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\proguard-rules.pro
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\debug\
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\debug\res\
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\debug\res\values\
     文件        1126  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\debug\res\values\google_maps_api.xml
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\
     文件        1997  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\AndroidManifest.xml
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\java\
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\java\com\
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\java\com\example\
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\java\com\example\androidwearmap\
     文件        5678  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\java\com\example\androidwearmap\MainActivity.java
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\res\
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\res\layout\
     文件        1550  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\res\layout\activity_main.xml
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\res\mipmap-hdpi\
     文件        3366  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\res\mipmap-hdpi\ic_launcher.png
     目录           0  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\res\mipmap-mdpi\
     文件        2075  2016-03-24 03:15  android-samples-master\AndroidWearMap\Wearable\src\main\res\mipmap-mdpi\ic_launcher.png
............此处省略166个文件信息

评论

共有 条评论