Giter Club home page Giter Club logo

jsvectormapmarkers's Introduction

JSVectorMap Markers

In Development...

jsvectormapmarkers is a npm package that contains a comprehensive list of country/jurisdictions/territories and city coordinates (latitude and longitude) for markers in the jsVectorMap interactive map package. The project serves as a utility packgage for jsVectorMap[1] which highlights many countries within their interactive maps.

Many countries/jurisdictions/territories are too small or unavailable in the maps, therefore this package was created to easily integrate those small parts of the world that are unavailable or too small to see in the jsVectorMap maps using Markers e.g. Marshall Islands, Aruba, Seychelles etc. Markers are little vectors that can be added to a map to highlight a specific part of the world. Coming soon is a similar methodology but for major cities of the world...

License

Version

Issues

Size Commits

Table of Contents

Installation

The jsVectorMap library is a pre-requisite to using this pacakge, it can be installed via npm:

npm i jsvectormap

jsvectormapmarkers can then also be installed via npm:

npm i jsvectormapmarkers

Import via CDN key:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/src/jsvectormapmarkers.min.js">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/src/jsvectormapcitymarkers.min.js">

Usage

import jsVectorMap from 'jsvectormap'
import 'jsvectormap/dist/maps/world.js' //import World Map 
import jsvectormapmarkers from 'jsvectormapmarkers'

//create new jsVectorMap interactive map
const map = new jsVectorMap({
  selector: '#map',
  map: 'world',
})

//the country name, its 2 letter ISO alpha-2 OR ISO alpha-3 code are compatible with function
const countryName = "Bermuda";
const countryISOAlpha2 = "BM";
const countryISOAlpha3 = "BMU";

var markerLatLang = getMarkerLatLng(countryName);
// var markerLatLang = getMarkerLatLng(countryISOAlpha2);
// var markerLatLang = getMarkerLatLng(countryISOAlpha3);

//marker object contains lat/long on map, the name of the marker and the status 
var marker = {latLng: markerLatLang, name: "Bermuda", status: 'mrk'}

//call function to add marker to map
map.addMarkers(marker);

bermuda

Issues

Please feel free to raise an Issue in the Issues tab for any such cases and I will try to rectify it.

Any other issues, errors or bugs can be raised via the Issues tab in the repository.

Contact

If you have any questions or feedback, please contact [email protected] or visit my LinkedIn:

LinkedIn

License

Distributed under the MIT License. See LICENSE for more details.

References

[1]: https://github.com/themustafaomar/jsvectormap

Back to top

jsvectormapmarkers's People

Contributors

amckenna41 avatar

Watchers

 avatar  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.