Skip to content

Latest commit

 

History

History
61 lines (49 loc) · 1.27 KB

target.md

File metadata and controls

61 lines (49 loc) · 1.27 KB

creator

let p = new P(<plainOption>).use(<Factory>);;
let map = p.Map(<MapOption>);
let marker = p.Marker(<MarkerOption>);

Plain

  1. P.Map(container: String | HTMLElement, options: MapOption)

  2. P.Marker(MarkerOption)

  3. P.Polyline(PolylineOption)

  4. P.Icon(IconOption)

  5. P.Popup(PopupOption)

  6. P.Point(pointOption)

map

  1. map.setZoom();
  2. map.getZoom();
  3. map.getMaxZoom(); [optional]
  4. map.getMinZoom(); [optional]
  5. map.open(popup | label); // open layer
  6. map.close();
  7. map.removeLayer();
  8. map.setCenter([lat, lng]);
  9. map.fitView()
  10. map.addLayer([layer,])
  11. map.clearLayers()

layer

  1. layer.getMap() return
  2. layer.getOriginal() return

marker (extends layer)

  1. marker.eventList // ?
  2. marker.setLatLng([lat, lng])
  3. marker.getLatLng()
  4. marker.setIcon()
  5. marker.on(, )

path (extends Layer)

  1. path.setPath()
  2. path.getPath()
  3. path.getBounds()

polyline (extends Path)

  1. polyline.eventList ? 是否需要

popup (extends Layer)

  1. popup.setContent()
  2. popup.getContent() return String|HTMLElement

info

  1. P.MAP_TYPE

use Factory

Plain.use(Factory)