Guest User

Untitled

a guest
Nov 17th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <script>
  2. proj4.defs('EPSG=26986', 'PROJCS["NAD83 / Massachusetts Mainland",GEOGCS["NAD83",DATUM["North_American_Datum_1983",' +
  3. SPHEROID["GRS 1980",6378137,298.257222101]],PRIMEM["Greenwich",0],' +
  4. 'UNIT["degree",0.0174532925199433],PROJECTION["Lambert_Conformal_Conic_2SP"],' +
  5. 'PARAMETER["false_easting",200000],' +
  6. 'PARAMETER["false_northing",750000],' +
  7. 'PARAMETER[""central_meridian",-71.5],' +
  8. 'PARAMETER["latitude_of_origin",41],' +
  9. 'UNIT["metre"]]');
  10.  
  11. var map = new ol.Map({
  12. layers: [
  13. new ol.layer.Tile({
  14. source: new ol.source.OSM()
  15. })
  16. ],
  17. target: 'map',
  18. view: new ol.View({
  19. projection: 'EPSG=26986',
  20. center: ol.proj.fromLonLat([-71, 42], 'EPSG=26986'),
  21. zoom: 7,
  22. extent: ol.proj.transformExtent([-172.54, 23.81, -47.74, 86.46],
  23. 'EPSG:4326', 'EPSG=26986'),
  24. minZoom: 6
  25. })
  26. });
  27.  
  28. map.addControl(new ol.control.ScaleLine({units: 'us'}));
  29. </script>
Add Comment
Please, Sign In to add comment