Comments (7)
The png file I was trying to load is very large (dimensionally and file size) so just as a test, I created a new image in illustrator that just has a single solid color in it and exported to jpg. The dimensions are still 13997px by 10413px but the file size is only 1.6 MB. But I am still getting the error. I really like mapstraction's implementation, but I need to be able to overlay the image.
from mxn.
Hi, this problem seem to come from a limitation in openlayers API (the bug don't seem to be due to mapstraction). I've found a post where someone have a similar problem with openlayers API :
http://lists.osgeo.org/pipermail/openlayers-users/2010-February/015982.html
Can you try to load your image only using openlayers API (without mapstration) ? If it don't load, the bug is certainly in OL API, and you can close this issue.
++
from mxn.
I was able to load the image in native openlayers. Sadly I wasn't able to use mxn, but I'd very much like to in future versions. Here is the code snippet I used in native OL to load the large image:
if (type == "lon") {
var newll = ll \* 20037508.34 / 180;
} else {
var newll = Math.log(Math.tan((90 + ll) \* Math.PI / 360)) / (Math.PI / 180);
newll = newll \* 20037508.34 / 180;
}
return newll;
}
imgbounds = new OpenLayers.Bounds(ll2ol(-105.424392,'lon'),ll2ol(43.975458,'lat'),ll2ol(-105.317911,'lon'),ll2ol(44.087556,'lat'));
var overlay = new OpenLayers.Layer.Image(
"Aerial View",
"/media/mapassets/CORDEROAPR11.jpg", // TO DO: make the url to the image dynamic from db
imgbounds,
new OpenLayers.Size(27994, 20832),
{'isBaseLayer': false, 'alwaysInRange': true}
);
layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Open Street Maps",{transparent: true},{buffer:3, tileLoadingDelay: 0,isBaseLayer: true});
map.addLayers([overlay,layerMapnik]);```
Hope that helps solve the problem.
from mxn.
Could you provide us a link to this big image in order to debug your problem ?
from mxn.
Hi, are you still having this issue ?
If yes, could you provide us a link to your image ? If no, you can close this issue.
++
from mxn.
Since there is no update for this issue for a long time, i think we should close it. Any objection ?
from mxn.
Likewise
from mxn.
Related Issues (20)
- Sort out Declutter markers
- Geocoders - allow bounds limit specification
- Can I use the 3.0 branch in production code? HOT 6
- Add Branch Recommendations To README.md HOT 1
- Update Documentation For v3.0 HOT 1
- Add the ability to restrict the bounds of the map to a specific area.
- Minimum api version checking
- Here 'KeyboardEvent.keyLocation'' is deprecated HOT 1
- Mapstraction via https HOT 2
- Remove provider specific functions from mxn.js HOT 3
- Add Mapstraction to cdnjs and update examples HOT 2
- Cloudmade Geocoder not Loading
- Actions need callbacks
- Locale setting for geocoding
- Are you going to release new version?! HOT 4
- What happened to the Mapstruction? HOT 14
- VehicleDrawType.SNAPTOPATH fails to draw the correct path
- projects/plugins nav link broken HOT 1
- Abandoned?
- The store
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mxn.