//
// ViewController.swift
// baidumapfirsttest
//
// Created by targetcloud on 2016/11/16.
// Copyright © 2016年 targetcloud. All rights reserved.
import UIKit
class ViewController: UIViewController {
var _mapView: BMKMapView?
lazy var searcher: BMKPoiSearch = {
let searcher = BMKPoiSearch()
searcher.delegate = self
return searcher
}()
override func viewDidLoad() {
super.viewDidLoad()
_mapView = BMKMapView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height))
self.view.addSubview(_mapView!)
//设置起始中心点
let center = CLLocationCoordinate2D(latitude: 31.272881101147327, longitude: 121.61539365113157)
_mapView?.centerCoordinate = center
//设置区域
let span = BMKCoordinateSpanMake(0.011929035022411938, 0.0078062748817018246)
let region = BMKCoordinateRegionMake(center, spa