NgMapyCz
An unofficially integration of MapyCZ API for Angular2+ Framework
Code scaffolding
Run npm install ng-mapy-cz --save
to install this package
In index.html add to section this two lines
---- ----
Import this module
;; @ {}
Create new map:
a) In your component add configuration for your map (example at https://api.mapy.cz/view?page=instruction)
;@ implements OnInit mapConfiguration = `<script type="text/javascript"> var stred = SMap.Coords.fromWGS84(14.41, 50.08); var mapa = new SMap(JAK.gel("my-map-id"), stred, 10); mapa.addDefaultLayer(SMap.DEF_BASE).enable(); mapa.addDefaultControls(); </script>`; { } { }
b) In your template:
You can put anything inside tag, but you have to use the same ID as in mapConfiguration variable
c) Enjoy mapy-cz in your Angular Apps :)