(Translated by https://www.hiragana.jp/)
GitHub - 1993hzw/TiledMapView: Tiled map loader for Android , based on the pyramid model, supports a variety of projections, including Web Mercator projection, latitude and longitude projection and custom projection; supports locating, adding layers and overlays. Android瓦片地图加载控件,基于金字塔模型,支持多种投影,包括Web墨卡托投影,经纬度直投及自定义投影等;支持定位,添加图层和覆盖物。
Skip to content

Tiled map loader for Android , based on the pyramid model, supports a variety of projections, including Web Mercator projection, latitude and longitude projection and custom projection; supports locating, adding layers and overlays. Androidかわら片地かたじ图加载控けん金字塔きんじとう模型もけい支持しじ投影とうえい包括ほうかつWebすみ卡托投影とうえい,经纬ちょくとう及自てい投影とうえいとう支持しじ定位ていい添加てんか图层くつがえ盖物。

Notifications You must be signed in to change notification settings

1993hzw/TiledMapView

Repository files navigation

TiledMapView

Tiled map loader for Android, based on the pyramid model, supports a variety of projections, including Web Mercator projection, latitude and longitude projection and custom projection; supports locating, adding layers and overlays.

Androidかわら片地かたじ图加载,金字塔きんじとう模型もけい支持しじ投影とうえい包括ほうかつWebすみ卡托投影とうえい,经纬ちょくとう及自てい投影とうえいとう支持しじ定位ていい添加てんか图层くつがえ盖物。

googlemap

tianditu

Usage 用法ようほう

Gradle

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
 
dependencies {
    compile 'com.github.1993hzw:TiledMapView:1.2'
}

TiledMapView uses the library Picasso as the default images loader. So you should add the additional dependence if you want to use the Picasso :

TiledMapView使用しようPicasso库作为默认图ぞう载程じょよし此,如果你想使用しようPicasso,应该额外增加ぞうか赖:

dependencies {
    implementation 'com.squareup.picasso:picasso:2.71828'
}

Code

Add the TiledMapView to your layout.xml:

ざいぬのきょくさと添加てんかTiledMapView:

<cn.forward.tiledmapview.TiledMapView
    android:id="@+id/mapview"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
TiledMapView mapView = (TiledMapView)findViewById(R.id.mapview);

Now, you can add a tile layer. For example, you can add the Google tiled map:

现在你可以添加てんかかわらへん图层。以加载谷图为れい

TiledMapView mapView = (TiledMapView) findViewById(R.id.mapview);
ITileLayer googleTileLayer = new GoogleTileLayer(mMapView, GoogleOnlineTileImageSource.ImgType.SATILLITE_WITH_MARKER);
mapView.getLayerGroup().add(googleTileLayer);

Currently, Tiled MapView directly supports loading Google maps (GoogleTileLayer), Tianditu maps(TiandituTileLayer), and the custom tiled maps.

目前もくぜん,TiledMapView直接ちょくせつ支持しじ载谷图(GoogleTileLayer),天地てんち图(TiandituTileLayer),以及てい义瓦片地かたじ图。

Also, you can add some overlays:

另外,你也添加てんかくつがえ盖物:

TextPixelOverlay textPixelOverlay = new TextPixelOverlay("Hello world!");
textPixelOverlay.setBackgroundColor(0x99ffffff);
textPixelOverlay.getTextPaint().setColor(Color.BLUE);
textPixelOverlay.getTextPaint().setTextSize(Util.dp2px(getApplicationContext(), 14));
textPixelOverlay.setLocationOnMap(0,-300);
mapView.getLayerGroup().add(textPixelOverlay);

You can use BitmapPixelOverlay/BitmapMapOverlay, if you want add a bitmap overlay.

以通过使用しようBitmapPixelOverlay/BitmapMapOverlay添加てんか图片くつがえ盖物

Extending つぶせてん

There is a sample of LOL game map which shows how to load the custom tiled map.

这里ゆういち个加载LOLゆう戏地图的しめせれい,显示りょう如何いか载自てい义瓦片地かたじ

lol

TiledMapView is a powerful, customizable and extensible loading library. There will be more documentation in the future, but you can now find more features by reading the code. Just enjoy it!

TiledMapViewいち个功のう强大きょうだいじょうせい扩展てき载库。将来しょうらいかい提供ていきょうさらてきぶん档,当然とうぜん,现在您可以通过阅读代码来找到さらてき特性とくせいつきじょう探索たんさく吧!

Tile cutter かわらへんきりわり工具こうぐ

The local tiles in this project are generated by tile-cutter. For more information, please go to tile-cutter.

ほん项目ちゅうてき本地ほんじかわらへんひとしゆかりtile-cutter生成せいせいそうよう了解りょうかいさら请前往tile-cutter

The developer 开发しゃ

154330138@qq.com hzw19933@gmail.com

Q&A TiledMap交流群 QQ Group ID: 885437848

License

    Copyright (C) 2019  Ziwei Huang
    
    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.

About

Tiled map loader for Android , based on the pyramid model, supports a variety of projections, including Web Mercator projection, latitude and longitude projection and custom projection; supports locating, adding layers and overlays. Androidかわら片地かたじ图加载控けん金字塔きんじとう模型もけい支持しじ投影とうえい包括ほうかつWebすみ卡托投影とうえい,经纬ちょくとう及自てい投影とうえいとう支持しじ定位ていい添加てんか图层くつがえ盖物。

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages