Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var winh = $(window).height();
- var winw = $(window).width();
- var maph = $('#map').height();
- var mapw = $('#map').width();
- var offset = $('#map').offset();
- var centerX = offset.left + mapw / 2;
- var centerY = offset.top + maph / 2;
- var changem = false;
- var cbut = $('#building');
- var southWest = new L.LatLng(winh, 0);
- var northEast = new L.LatLng(0, winw);
- var bounds = L.latLngBounds(southWest, northEast);
- var map = L.map('map', {
- maxBounds: bounds,
- maxZoom: 2,
- minZoom: 0,
- crs: L.CRS.Simple
- }).setView([winh, winw], 0);
- // .setView([winh, winw], 0)
- map.setMaxBounds(bounds);
- // map.panTo(new L.LatLng(centerY,centerX));
- // ----------------------------------
- // Load the images for the map
- // ----------------------------------
- var imageUrl = 'http://rigailoveyou.exflairdigital.com/public/img/houses.png'
- var imageUrl2 = 'http://rigailoveyou.exflairdigital.com/public/img/road.png'
- var imageBounds = [[winh,0], [0,winw]];
- var map1 = L.imageOverlay(imageUrl, bounds,'Riga I Love You').addTo(map);
- var map2 = L.imageOverlay(imageUrl2, bounds).addTo(map);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement