Re: [Leaflet] ImageOverlay struggle

28 views
Skip to first unread message

Olav Peeters

unread,
Jan 1, 2017, 2:50:52 PM1/1/17
to leafl...@googlegroups.com

Hi Craig,

I just tested it, this does indeed seem to work correctly:

var map = L.map('map', {
}).fitBounds([[40.712216, -74.22655],[40.773941, -74.12544]]);

var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',
      imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
var newark_overlay = L.imageOverlay(imageUrl, imageBounds, {transparent: true, opacity: 0.7, projection: 'EPSG:4326', units: 'm'}).addTo(map);

On closer inspection the georeferencing seems a little of. The overlay is probably in a different projection than what I assumed.

Cheers,

Olav


On 01/01/2017 15:57, Craig wrote:
Been fighting with the image overlay, I have my bounding box calculated using variables from this php script
just cant get it to display. Is the format top-left and bottom-right? The image heading is due north.
var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg', imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
^ Top Left? ^ Bottom Right?
--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages