JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap.

Related tags

Maps JDSwiftHeatMap
Overview

Alt text

JDSwiftMap is an IOS Native MapKit Library.

You can easily make a highly customized HeatMap.

Alt text Alt text Alt text Alt text

Alt text

Installation

  • Cocoapods
	pod 'JDSWiftHeatMap'

Usage

JDSwiftHeatMap is based on IOS native MKMapView,

so you must familiar with.

Init

  • Give a frame.
  • Follow JDHeatMapDelegate.
  • Choose a MapType Below
  map = JDRealHeatMap(frame: self.view.frame, delegate: self, maptype: .FlatDistinct)
  self.view.addSubview(map!)

With ColorSetting

  map = JDSwiftHeatMap(frame: mapsView.frame, delegate: self, maptype: .FlatDistinct, BasicColors: [UIColor.yellow,UIColor.red], devideLevel: 2)
  self.view.addSubview(map!)

BasicColors is element color array.

Devide Level = How Many Middle Colors between Basic Colors.

Delegate - Most Important

There are two delegate you need to pay close.

  1. MKMapViewDelegate - (Optional)

    This is the delegate you familiar,( AnnoationView For.., Render For...) You sure can use this delegate in old way, or not to follow this delegate.

    But if you do, you may need to follow two essential function.

    extension ViewController:MKMapViewDelegate
    {
       func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer
        {
       	if let heatoverlay = map?.heatmapView(mapView, rendererFor: overlay)
       	{
         	  return heatoverlay
       	}
       	else
       	{
       	    var yourownRender = yourownRenderClass()
       	    return yourownRender
       	}
       }
    
       func mapViewWillStartRenderingMap(_ mapView: MKMapView)
        {
       	map?.heatmapViewWillStartRenderingMap(mapView)
       }
    }
    map.delegate = self
    
  2. JDHeatMapDelegate

    When we talk to Heat Map, the most important thing is "Data" ! You should provide the data you want to display in this delegate.

    public protocol JDHeatMapDelegate {
    func heatmap(HeatPointCount heatmap:JDRealHeatMap) -> Int
    func heatmap(HeatLevelFor index:Int) -> Int
    @Optional func heatmap(RadiusInKMFor index:Int) -> Double
    func heatmap(CoordinateFor index:Int) -> CLLocationCoordinate2D
    }

    The default radius in km is 100KM.

Notice

More data will cause large memory using, should be notice.

Setting

  1. public func setType(type:JDMapType)

    change the display type, it will refresh automatically.

  2. public func refresh()

    Call this function when data changed.

  3. public var showindicator:Bool

    Set the loading indicator showing or not.

You might also like...
Tip-Calculation- - A program for calculate the tip. You can easily calculate it and you can split money easily
Tip-Calculation- - A program for calculate the tip. You can easily calculate it and you can split money easily

Tip-Calculation- It is a program for calculate the tip. You can easily calculate

It is a highly configurable iOS library which allows easy styling with built in styles as well as extra header and footer views so that you can make extremely unique alerts and action sheets.
It is a highly configurable iOS library which allows easy styling with built in styles as well as extra header and footer views so that you can make extremely unique alerts and action sheets.

 CFAlertViewController CFAlertViewController is a library that helps you display and customise Alerts, Action Sheets, and Notifications on iPad and i

Pop-up based view(e.g. alert sheet), can be easily customized.
Pop-up based view(e.g. alert sheet), can be easily customized.

MMPopupView 中文介绍 A basic Pop-Up Kit allows you to easily create Pop-Up view. You can focus on the only view you want to show. Besides, it comes with 2

This app is a sample app that recognizes specific voice commands such as
This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "make it black" and change the background color of the view in the frame.

VoiceOperationSample This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "mak

You can touch My Swift, MapKit, UX skills! :D
You can touch My Swift, MapKit, UX skills! :D

What is it? 🙋🏻 It's a pet project which has been developed as a code challenge. It's written purely in Swift without using 3rd party frameworks. Wha

Repositório com app exemplo para o uso do gráfico de Heatmap
Repositório com app exemplo para o uso do gráfico de Heatmap

HeatmapExample Repositório com app exemplo para o uso do gráfico de Heatmap O gráfico Heatmap retrata os dados entre duas variaveis diferentes como um

A calendar based heatmap which presenting a time series of data points in colors.
A calendar based heatmap which presenting a time series of data points in colors.

Calendar Heatmap Introduction CalendarHeatmap is a calendar based heatmap which presenting a time series of data points in colors, inspired by Github

PTPopupWebView is a simple and useful WebView for iOS, which can be popup and has many of the customized item.
PTPopupWebView is a simple and useful WebView for iOS, which can be popup and has many of the customized item.

PTPopupWebView PTPopupWebView is a simple and useful WebView for iOS, which can be popup and has many of the customized item. Requirement iOS 8.0 Inst

WWFortuneWheelView - A scroll wheel that can be customized.
WWFortuneWheelView - A scroll wheel that can be customized.

WWFortuneWheelView A scroll wheel that can be customized. 一個可以自訂數量的滾輪. Installation with Swift Package Manager dependencies: [ .package(url: "http

An instagram-like image editor that can apply preset filters passed to it and customized editings to a binded image.
An instagram-like image editor that can apply preset filters passed to it and customized editings to a binded image.

CZImageEditor CZImageEditor is an instagram-like image editor with clean and intuitive UI. It is pure swift and can apply preset filters and customize

Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework
Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework

NAMapKit Lets you drop pins or custom annotations onto a standard UIImage or a tiled NATiledImageView. Includes callouts, multi-colored pins, animatio

Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.
Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.

kishikawakatsumi/SpreadsheetView has moved! It is being actively maintained at bannzai/SpreadsheetView. This fork was created when the project was mov

Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.
Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.

kishikawakatsumi/SpreadsheetView has moved! It is being actively maintained at bannzai/SpreadsheetView. This fork was created when the project was mov

BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.
BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

BPStatusBarAlert BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.
An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.

ClusterKit is an elegant and efficiant clustering controller for maps. Its flexible architecture make it very customizable, you can use your own algor

Example app using MessagesUI + CoreLocation + MapKit

iOS Example MapKit App Ejemplo de código de una aplicación de mapas usando MessagesUI, MapKit y CoreLocation Built using XCode 13.0 (Swift 5) ¿Cómo ej

SwiftUI app with MapKit
SwiftUI app with MapKit

InterestingPlaces app that contains information about unusual places in the world.

SwiftUI wrapper for MapKit's MKMapView (UIKit).
SwiftUI wrapper for MapKit's MKMapView (UIKit).

SwiftUIMKMapView SwiftUI wrapper for MapKit's MKMapView (UIKit). ▶️ Usage Add as a dependecy to your project using Swift Package Manager. Embed map vi

Using CoreLocation and MapKit Together
Using CoreLocation and MapKit Together

Using_CoreLocation_and_MapKit_Together CoreLocation and Mapkit were used togethe

Comments
  • CocoaPod dependency problem

    CocoaPod dependency problem

    I'm trying to use the Pod for this library but i constantly get this error:

    pod install Analyzing dependencies [!] Unable to find a specification for JDSWiftHeatMap

    How can i resolve this?

    opened by andresousaribeiro 9
  • Rendering Heatmap on ImageView

    Rendering Heatmap on ImageView

    Hi, what would be the best practice to render heatmap on top of ImageView with CGPoints (x-y coordinates) instead of CLLocations with longitute-latitude?

    opened by orkasan 4
  • Adding multiple location

    Adding multiple location

    Hi,

    Thanks for the update.

    I have created the CLLocationCoordinate2D for the different location.

    var testpointCoor1 = [ CLLocationCoordinate2D(latitude: 47.60, longitude: -122.37), CLLocationCoordinate2D(latitude: 33.946208, longitude: -118.190918), CLLocationCoordinate2D(latitude: 35.871942, longitude: -114.873047), CLLocationCoordinate2D(latitude: 32.9771323, longitude: -116.938477) ]

    But its showing heat map on one location. How to show the multiple heat maps in the different location?

    opened by yuvarajagna 5
Releases(2.0.0)
Owner
郭介騵
Chinese iOS Developer, Check out my website for more
郭介騵
An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.

ClusterKit is an elegant and efficiant clustering controller for maps. Its flexible architecture make it very customizable, you can use your own algor

null 502 Dec 25, 2022
Example app using MessagesUI + CoreLocation + MapKit

iOS Example MapKit App Ejemplo de código de una aplicación de mapas usando MessagesUI, MapKit y CoreLocation Built using XCode 13.0 (Swift 5) ¿Cómo ej

Manu Martinez 0 Oct 19, 2021
MapKit, but for SwiftUI

MapKit, but for SwiftUI

Lawrence Bensaid 2 Jul 1, 2022
MKMapView wrapper for SwiftUI as drop-in to MapKit's SwiftUI view

MKMapView wrapper for SwiftUI as drop-in to MapKit's SwiftUI view. Easily extensible annotations and overlays, iOS 13 support and backwards compatible with MKAnnotation and MKOverlay!

Paul 73 Dec 26, 2022
MSFlightMapView allows you to easily add and animate geodesic flights to Google map

MSFlightMapView Demo Requirements iOS 10.0+ Xcode 9.0+ Installation Just add the MSFlightMapView folder to your project. or use CocoaPods: pod 'MSFlig

Muhammad Abdul Subhan 48 Aug 13, 2022
A spatial analysis library written in Swift for native iOS, macOS, tvOS, watchOS, and Linux applications, ported from Turf.js.

Turf for Swift ?? ?? ?? ?? ⌚️ A spatial analysis library written in Swift for native iOS, macOS, tvOS, watchOS, and Linux applications, ported from Tu

Mapbox 187 Dec 19, 2022
Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL

Mapbox GL Native A C++ library that powers customizable vector maps in native applications on multiple platforms by taking stylesheets that conform to

Mapbox 4.2k Jan 9, 2023
Campus Atlas -- a Mapping & GIS solution which provides easy access to navigating the campus around you.

Campus Atlas Welcome to Campus Atlas -- a Mapping & GIS solution which provides easy access to navigating the campus around you. Technical Implementat

Larry Tseng 5 Nov 12, 2021
Location, motion, and activity recording framework for iOS

LocoKit A Machine Learning based location recording and activity detection framework for iOS. Location and Motion Recording Combined, simplified Core

Matt Greenfield 1.5k Jan 2, 2023
Google Directions API helper for iOS, written in Swift

PXGoogleDirections Google Directions API SDK for iOS, entirely written in Swift. ?? Features Supports all features from the Google Directions API as o

Romain L 268 Aug 18, 2022