Skip to content

Schkar/Map-of-Poland

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map-of-Poland

Interactive map of Poland.

version 1.0

(map downloaded from simplemaps.com ************* Copyright (c) 2017 Pareto Softare, LLC DBA Simplemaps.com ******************* ************* Free for Commercial Use, full terms at http://simplemaps.com/resources/svg-license ************ )

Map comes with 439 Polish cities. Their location is based on latitude (N only) and longitude (E only).

How does it work?

Inside js file, there is an array cities. It is an array of objects - every object is a single city, with such properties as:

  • name - self explanatory
  • N - latitude in decimal notation (this is important - check info below)
  • E - longitude in decimal notation (this is important - check info below)
  • active - it is responsible for showing/hiding city.

About decimal notation

Usually coordinates are written as degrees, minutes and seconds (like this: 52°14'50.4"N 21°00'48.8"E). This, however, can be easily translated into decimal notation (which would be this for above coordinates: 52.247335, 21.013552). Google Maps gives both of those when checking up on point on map.

But how does it know where to put a point on map?

JavaScript checks for active cities inside cities array, grabs its N and E coordinates, translates them to X/Y coordiantes of SVG map and creates a "dot" on map in those coordiantes. Every "dot" has a name of city appearing on hover.

__But I don't like the colors. They are ugly :( __

Since it is a SVG file, one can easily manipulate every part of it through css. There is a hover effect and click effect on voivodships. Of course it can be changed to suit your needs.

My hometown isn't in the array. What can I do to see it?

It is quite easy to add new cities, towns, villages, places and more. You just need it's name and decimal coordinates. Add them somewhere in cities array and you're all set.

I want to use it on my page!

Feel free to do so and feel free to modify it - for both commercial and personal use. Attribution is appreciated!

About

Interactive, SVG map of Poland with built-in 439 cities database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published