bkhezry / Extramaputils
Licence: apache-2.0
π the simple utility for google maps in android
Stars: β 293
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Extramaputils
Fakeit
The Kotlin fake data generator library!
Stars: β 482 (+64.51%)
Mutual labels: utility, library
C Utils
Tiny, modular, drop-in, library of some most commonly used utility methods for C (embedded) applications. Intended to be used as a git-submodule inside your projects to kickstart development. See https://c-utils.gotomain.io for more details.
Stars: β 47 (-83.96%)
Mutual labels: utility, library
Python Common Cache
This project is a cache component based on the memory and it is lightweight, simple and customizable. π π
Stars: β 21 (-92.83%)
Mutual labels: utility, library
Layerjs
layerJS: Javascript UI composition framework
Stars: β 1,825 (+522.87%)
Mutual labels: library, navigation
Paco
Small utility library for coroutine-driven asynchronous generic programming in Python 3.4+
Stars: β 198 (-32.42%)
Mutual labels: utility, library
Angular Google Maps
Angular 2+ Google Maps Components
Stars: β 1,982 (+576.45%)
Mutual labels: library, google-maps
Potato Library
Easy to use Utility library for Android
Stars: β 45 (-84.64%)
Mutual labels: utility, library
Leku
π Map location picker component for Android. Based on Google Maps. An alternative to Google Place Picker.
Stars: β 612 (+108.87%)
Mutual labels: library, google-maps
Txeh
Go library and CLI utilty for /etc/hosts management.
Stars: β 181 (-38.23%)
Mutual labels: utility, library
Php Ip Tools
Useful tools for IP manipulations
Stars: β 152 (-48.12%)
Mutual labels: utility, library
Mapdrawingtools
this library Drawing polygon, polyline and points in Google Map and return coordinates to your App
Stars: β 122 (-58.36%)
Mutual labels: library, google-maps
Dual-color-Polyline-Animation
This library will help to show the polyline in dual color similar as Uber.
Stars: β 73 (-75.09%)
Mutual labels: navigation, google-maps
Jvfloatingdrawer
An easy to use floating drawer view controller.
Stars: β 1,424 (+386.01%)
Mutual labels: library, navigation
Navigationtabstrip
Navigation tab strip with smooth interaction.
Stars: β 2,234 (+662.46%)
Mutual labels: library, navigation
Bubble Navigation
π [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of π¨ customization option.
Stars: β 1,537 (+424.57%)
Mutual labels: library, navigation
Text Minimap
Generate text minimap/preview using Braille Patterns
Stars: β 21 (-92.83%)
Mutual labels: utility, library
Navigationtabbar
Navigation tab bar with colorful interactions.
Stars: β 4,907 (+1574.74%)
Mutual labels: library, navigation
Navigation Toolbar
Navigation toolbar is a slide-modeled UI navigation controller made by @Ramotion
Stars: β 587 (+100.34%)
Mutual labels: library, navigation
Weihanli.common
common tools,methods,extension methods etc... .net εΈΈη¨ε·₯ε
·η±»οΌε
¬ε
±ζΉζ³οΌεΈΈη¨ζ©ε±ζΉζ³ηοΌεΊη‘η±»εΊ
Stars: β 152 (-48.12%)
Mutual labels: utility, library
Ethereum Input Data Decoder
Ethereum smart contract transaction input data decoder
Stars: β 242 (-17.41%)
Mutual labels: utility, library
simple library for handle markers, polygons and polylines on google maps.
ExtraMapUtils is an android library to make working with map markers, polygon and polyline drawing on googlemaps, more convenient.
Project Setup and Dependencies
- JDK 8
- Android SDK Build tools 28.0.3
- Supports API Level +17
- AppCompat & Cardview libraries of androidx 1.0.0
- Google Play Services Maps 16.0.0
Highlights
- Provides multiple themea to apply on MapView
- Add multiple markers, polygons & polylines easily
- Supports vector drawable for marker icon
- Supports Lite Mode
- Supports calculating
area
of polygon &length
of polyline - Supports
GeoJson
&KML
as layer from url or resource file
Preview
Demo
You can download the latest demo APK from here: https://github.com/bkhezry/ExtraMapUtils/blob/master/assets/DemoExtraMapUtils.apk
Screenshots
Setup
1. Provide the gradle dependency
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Add the dependency:
dependencies {
implementation 'com.github.bkhezry:ExtraMapUtils:1.2.2'
}
2. Add your code
add MapView to UI layout
<com.google.android.gms.maps.MapView
android:id="@+id/mapLite"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="300dp"
app:liteMode="true"
app:mapType="normal" />
new ViewOptionBuilder()
.withStyleName(ViewOption.StyleDef.RETRO)
.withCenterCoordinates(new LatLng(35.6892, 51.3890))
.withMarkers(AppUtils.getListExtraMarker())
.withPolygons(
AppUtils.getPolygon_1()
)
.withPolylines(
AppUtils.getPolyline_2(),
AppUtils.getPolyline_4()
)
.withForceCenterMap(false)
.build();
after declaring the ViewOption, add this code for showing elements on the MapView
MapUtils.showElements(viewOption, googleMap, getActivity());
ViewOption attributes
Name | Type | Default | Description |
---|---|---|---|
title | String | @NullAble | use in demo as CardView tile |
centerLatLng | LatLng | @NullAble | center of Map |
forceCenterMap | boolean | false | force map moving to centerLatLng point |
mapsZoom | float | 14 | zoom of map when map moving to centerLatLng |
markers | ExtraMarker | @NullAble | list of ExtraMarker that showing on Map |
polygons | ExtraPolygon | @NullAble | list of ExtraPolygon that showing on Map |
polylines | ExtraPolyline | @NullAble | list of ExtraPolyline that showing on Map |
isListView | boolean | false | when using utils in ListView this parameter should be true. because fixing zoom of bounded map |
styleName | StyleDef | DEFAULT | style of google map |
declare ExtraMarker
new ExtraMarkerBuilder()
.setName("Start")
.setCenter(latLngs_3[0])
.setIcon(icons_2[0])
.build()
ExtraMarker attributes
Name | Type | Default | Description |
---|---|---|---|
name | String | @NullAble | label of Marker |
center | LatLng | @NoneNull | center of Marker |
icon | int | @NoneNull | icon of marker |
delare ExtraPolygon
new ExtraPolygonBuilder()
.setPoints(latLngs_1)
.setzIndex(0)
.setStrokeWidth(10)
.setStrokeColor(Color.argb(100, 0, 0, 0))
.setFillColor(Color.argb(100, 200, 200, 200))
.build();
ExtraPolygon attributes
Name | Type | Default | Description |
---|---|---|---|
points | LatLang[] | @NoneNull | list of point |
fillColor | int | none color | color of polygon filling |
uiOptions | UiOption | @NoneNull | some parameter of polygon |
declare ExtraPolyline
new ExtraPolylineBuilder()
.setPoints(latLngs_2)
.setzIndex(0)
.setStrokeWidth(10)
.setStrokeColor(Color.argb(100, 255, 0, 0))
.build();
ExtraPolyline attributes
Name | Type | Default | Description |
---|---|---|---|
points | LatLang[] | @NoneNull | list of point |
uiOptions | UiOption | @NoneNull | some parameter of polyline |
UiOption attributes
Name | Type | Default | Description |
---|---|---|---|
strokeColor | int | Color.BLACK | line color |
strokeWidth | int | 10 | width of line |
zIndex | int | 0 | zIndex of polyline or polygon |
strokePattern | StrokePatternDef | Default | stroke pattern of line |
getArea() method in ExtraPolygon return Area of polygon in square meters. getLength method in ExtraPolyline return Length of polyline in meters.
add GeoJson to ViewOption
new ViewOptionBuilder()
.withTitle("GeoJson")
.withGeoJson(context.getString(R.string.geo_json_url))
.withStyleName(ViewOption.StyleDef.DEFAULT)
.withGeoJsonEventListener(new onGeoJsonEventListener() {
@Override
public void onFeatureClick(Feature feature) {
//Do more things.
}
@Override
public void onGeoJsonLoaded(GeoJsonLayer geoJsonLayer) {
AppUtils.addColorsToMarkers(geoJsonLayer);
}
})
.withIsListView(true)
.build();
Todo
- [ ] clustering support for markers
- [x] add GeoJson & KML layers to map
- [ ] add more demo for mixed elements.
- [ ] javadoc
- ...
Developed By
- Behrouz Khezry
- @bkhezry
License
Copyright 2017 Behrouz Khezry
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.
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].