Skip to content
Map4D SDK for Web
Branch: master
Clone or download
Latest commit 898d0f1 Mar 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs/vi
examples + add example for objectClick Feb 28, 2019
sdk
simplemap
.gitignore
LICENSE
README.md

README.md

Map4D SDK

Map4D SDK for Web, written in Javascript.

CocoaPods

Installation

  1. Download map4dsdk from here

  2. Add script to your website

<script src="[PATH]/map4dsdk@[version].js"></script>

Note: SDK script name must contains "map4dsdk@"

Using

  1. Initialize map with access key
<body>
<div id="map"></div>

<script src="[PATH]/map4dsdk@[version].js"></script>

<script>
  let map = new map4d.Map(document.getElementById("map"),
      {
        zoom: 13,
        center: [10.793113, 106.720739],
        geolocate: true,
        accessKey: "98fd21346d83bee24dc734231f7609c9"
      }
    )
  //set switch mode Auto for automatically switching between 2D & 3D
  map.setSwitchMode(map4d.SwitchMode.Auto)
</script>

</body>
  1. Style your view
  <style>
	body {
	  margin: 0px;
	  height: 100%;
	}

	#map {
	  position: absolute;
	  width: 100%;
	  height: 100%;
	  background-color: #f2efe9;
	}
  </style>

License

Copyright (C) 2016 IOT Link Ltd. All Rights Reserved.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.