Git Product home page Git Product logo

map4d-map-angular-support's Introduction

Map4d Map AngularJS Support

Map4D Map Javascript SDKs Documents⚡️

How to use

  1. Copy map4d-map.component.ts to your projects
  2. Places code below to your template of your component, where you want map to show
<map4d-map 
[options]="__options__" 
id="__id__"
version="__version__"
accessKey="__your_key___"
(onMapReady)="onMapReady($event)"
></map4d-map>
  1. Inside your component, add the method onMapReady
onMapReady(data: {map: any, id: string}){
    console.log(`map with id = (${data.id}) is ready`)
    console.log(data)
    //https://docs.map4d.vn/map4d-map/web/v2.4/#/guides/marker
    // Tạo đối tượng marker từ MarkerOption    
    let marker = new map4d.Marker({
      position: {lat: 16.068046, lng: 108.192189},
      label: 'Demo marker'
    })
  
    // Thêm marker vào bản đồ
    marker.setMap(data.map)
    console.log(marker)
  }

Now you can interact to map via data.map with id is data.id from onMapReady

More docs here

Notice

  1. The id of map4d-map component must be unique
  2. When use with Typescript, to bypass type checking just add declare var map4d: any to your source

map4d-map-angular-support's People

Contributors

suale-dev avatar

Watchers

 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.