All Projects → 1993hzw → Tiledmapview

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墨卡托投影,经纬度直投及自定义投影等;支持定位,添加图层和覆盖物。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Tiledmapview

Go Staticmaps
A go (golang) library and command line tool to render static map images using OpenStreetMap tiles.
Stars: ✭ 246 (+446.67%)
Mutual labels:  tilemap, gis, geo, map
Openlayers Editor
OpenLayers Editor
Stars: ✭ 138 (+206.67%)
Mutual labels:  gis, geo, map
Mapsui
Mapsui is a .NET Map component for WPF, Xamarin.Forms, Xamarin.Android, Xamarin.iOS and UWP
Stars: ✭ 447 (+893.33%)
Mutual labels:  gis, geo, map
font-gis
Icon font and SVG for use with GIS and spatial analysis tools
Stars: ✭ 121 (+168.89%)
Mutual labels:  map, geo, gis
Awesome Gis
😎Awesome GIS is a collection of geospatial related sources, including cartographic tools, geoanalysis tools, developer tools, data, conference & communities, news, massive open online course, some amazing map sites, and more.
Stars: ✭ 2,582 (+5637.78%)
Mutual labels:  gis, geo, map
UMapControl
轻量级跨平台瓦片地图库
Stars: ✭ 35 (-22.22%)
Mutual labels:  map, gis, tilemap
Shapefile.jl
Parsing .shp files in Julia
Stars: ✭ 40 (-11.11%)
Mutual labels:  gis, geo
Blendergis
Blender addons to make the bridge between Blender and geographic data
Stars: ✭ 4,642 (+10215.56%)
Mutual labels:  gis, map
Litiengine
LITIENGINE 🕹 The pure 2D java game engine.
Stars: ✭ 384 (+753.33%)
Mutual labels:  tile, tilemap
Go Geom
Package geom implements efficient geometry types for geospatial applications.
Stars: ✭ 456 (+913.33%)
Mutual labels:  gis, geo
TileMapGenerator
Create your own 2D Maps with layer-by-layer system using Noise-Sample and BufferedImage pattern
Stars: ✭ 19 (-57.78%)
Mutual labels:  map, tilemap
Vector Datasource
Tilezen vector tile service - OpenStreetMap data in several formats
Stars: ✭ 427 (+848.89%)
Mutual labels:  tile, map
Node Gdal
Node.js bindings for GDAL (Geospatial Data Abstraction Library)
Stars: ✭ 459 (+920%)
Mutual labels:  gis, geo
Maptalks.js
A light and plugable JavaScript library for integrated 2D/3D maps.
Stars: ✭ 3,377 (+7404.44%)
Mutual labels:  gis, map
Solaris
CosmiQ Works Geospatial Machine Learning Analysis Toolkit
Stars: ✭ 290 (+544.44%)
Mutual labels:  gis, geo
Orb
Types and utilities for working with 2d geometry in Golang
Stars: ✭ 378 (+740%)
Mutual labels:  gis, geo
Election Geodata
Precinct shapes (and vote results) for US elections past, present, and future
Stars: ✭ 289 (+542.22%)
Mutual labels:  geo, map
Lpfmpoints
Evolution of LPFM Stations
Stars: ✭ 19 (-57.78%)
Mutual labels:  gis, map
Sharpmap
An easy-to-use mapping library for use in web and desktop applications
Stars: ✭ 613 (+1262.22%)
Mutual labels:  gis, map
Proj4.jl
Julia wrapper for the PROJ cartographic projections library
Stars: ✭ 23 (-48.89%)
Mutual labels:  gis, geo

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 开发者

[email protected] [email protected]

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.

Donations 打赏

If this project helps you a lot and you want to support the project's development and maintenance of this project, feel free to scan the following QR code for donation. Your donation is highly appreciated. Thank you!

如果这个项目对您有很大帮助,并且您想支持该项目的项目开发和维护,请扫描以下二维码进行捐赠。非常感谢您的支持!

donate

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].