Overlay a single geographic image on a map
Hello,
I have a single image of the United Kingdom (see below) that I want to use as a map layer. I'll be putting small dot markers onto the map (specified by their lat,lon).
I've used the Map Transformation Calculator to get the information for the graphic. I'm having trouble figuring out which MapProvider to subclass. Most providers are tile-based but my map will be at this small, fixed size and zoom level so I don't need that level of complexity.
Should I subclass the AbstractMapProvider and override the paint() method to paint this image? How I should use the coordinate parameter that's passed in as I don't see how the row/column properties map to an x,y position on the screen.
Can anyone give me a hint on where to start with this or perhaps point me in the directions of an example please.
Many thanks,
Andrew

I have a single image of the United Kingdom (see below) that I want to use as a map layer. I'll be putting small dot markers onto the map (specified by their lat,lon).
I've used the Map Transformation Calculator to get the information for the graphic. I'm having trouble figuring out which MapProvider to subclass. Most providers are tile-based but my map will be at this small, fixed size and zoom level so I don't need that level of complexity.
Should I subclass the AbstractMapProvider and override the paint() method to paint this image? How I should use the coordinate parameter that's passed in as I don't see how the row/column properties map to an x,y position on the screen.
Can anyone give me a hint on where to start with this or perhaps point me in the directions of an example please.
Many thanks,
Andrew

1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Modest Maps is *only* for tiled maps, so there's no sensible way to repurpose a map provider to work with a single image. It sounds like what you need is a function that turns a lat,lon into an x,y on your image, which is different to all the tiling, panning and zooming that Modest Maps provides, but sadly outside of the scope of this library and forum.
Or maybe I misunderstood? -
Inappropriate?That's exactly what I was asking -- I need to map the lat,lons to a position over the image so I guess modest maps can't help.
Thanks for your response. -
Inappropriate?Yeah Modest Maps is total overkill for this, sorry. It doesn't look like your map is in Mercator projection, so I'm not even sure there's any code in Modest Maps that would help you.
If you can figure out the projection of your map and project your lat/lon coordinates, then putting them in the right place on your image is a matter of figuring out the coordinates of the image corners in the same projection and applying a simple linear mapping. Feel free to ask here if you get stuck, but as I say it's not really a Modest Maps thing so you might want to find a more general Flash or mapping forum. -
Inappropriate?I've managed to get a copy of the image in mercator projection and the coordinates of the top, bottom, left and right.
Is there a function in modest maps that could help with mapping those coordinates into position on screen. Or even a site somewhere that would help me with the projections.
Thanks. -
Inappropriate?To map between Location (lat, lon) and points on the screen, try the Map methods locationPoint() and pointLocation().
1 person says
this answers the question
Loading Profile...



EMPLOYEE
EMPLOYEE