Giter VIP home page Giter VIP logo

realm-mapview's Introduction

A MapView that is powered by Realm

A simple, yet powerful wrapper around the SupportMapFragment with support for clustering and built-in support for querying and rendering a Realm results.

##How To Include It:

	repositories {
        // ...
        maven { url "https://jitpack.io" }
    }
	dependencies {
	        compile 'com.github.thorbenprimke:realm-mapview:0.9.1'
	}

##Demo

Screenshot

How To Get Started:

Using the RealmClusterMapFragment is as simple as extending it and implementing three methods. The following is an example:

public class BusinessRealmClusterMapFragment extends
    RealmClusterMapFragment<Business> {

    @Override
    protected String getTitleColumnName() {
        return "name";
    }

    @Override
    protected String getLatitudeColumnName() {
        return "latitude";
    }

    @Override
    protected String getLongitudeColumnName() {
        return "longitude";
    }
}

The fragment loads data from the Realm of type Business and the provided columnNames are used to look up the latitude, longitude and the marker's title.

All that's left at this point, is to include the fragment in your Activity's layout file or create it programmatically.

##Other:

Your projects's AndroidManifest has to include the following valid Map V2 key. You can obtain a key from Google Developer Console

<meta-data
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="YOUR_KEY"/>

##Feedback/More Features: I would love to hear your feedback. Do you find the RealmClusterMapFragment useful? What functionality are you missing? Open a Github issue and let me know. Thanks!

License

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.

Included dependencies are:
Realm (https://github.com/realm/realm-java)
Google Maps Android API utility library (https://github.com/googlemaps/android-maps-utils)

realm-mapview's People

Contributors

donnfelker avatar thorbenprimke avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.