4 ways to paint maps with jQuery and JavaScript

- Andrés Cruz

En español

4 ways to paint maps with jQuery and JavaScript

Maps are a fundamental resource in some applications in which it is required to know the location of some entity but we do not necessarily want it to be exact - as in the case of Google Map - but only to obtain the country, region or state in a certain way. graph.

There are many plugins to paint world maps, continental maps, regions, states and in this post we will see some of them.

Vector is king

corona

A common point in all the map painting plugins that we will see here is the use of vectors as fundamental technologies to paint the maps; You can corroborate this by looking at the source code of the maps:

jquery vector tags de un mapa del mundo

And that all plugins for drawing maps use jQuery:

jquery logo

jVectorMap

jVectorMap is an interesting option for painting maps; you will see that you can zoom in on the different sections that make up the map and they do not become pixelated (and it is a fundamental characteristic in vectors); In general it allows:

World map:

jVectorMap mapa del mundo

Map by country and its states:

jVectorMap mapa de los EEUU

Even by regions that we define:

jVectorMap mapa de una región

The only downside is that it is paid for commercial projects, see more about the license in the following link.

World Map Generator

The World Map Generator plugin gives us a few fewer options than the previous plugin since it does not allow us to view the states of a country (one less level of detail) or zoom, although you must take into account the license to incorporate into our projects; in this case it is MIT:

World Map Generator mapa del mundo

jQuery Mapael

This jQuery Mapael plugin has many options to customize maps; allows you to select by countries, states, regions and we can even incorporate other graphics and texts to further enrich the content:

jQuery Mapael, varios mapas

Among other things such as event handling; its license, MIT.

HTML5 Interactive Maps

HTML5 Interactive Maps also offers several ways to view maps by country, sectors, and even allows you to add layers of information on the map, among other customization options; the bad thing is that it has to be paid and quite expensive:

HTML5 Interactive Maps, varios mapas
Andrés Cruz

Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz In Udemy

I agree to receive announcements of interest about this Blog.