[mapserver-users] small maps of alaska and hawaii

Fawcett, David (MPCA) David.Fawcett at state.mn.us
Tue Feb 23 11:20:00 EST 2010


Depending on the spatial reference system that your data is in, you could try 'just moving the shapes' as you suggested.  I don't know what it would look like, but it might be worth a try.

If you figured out where you wanted Alaska to fall, you could determine a coordinate shift to apply to your Alaska features.  It is possible that you could come up with a custom spatial reference definition that you could add to the table that comes with Proj.4 .  Then, it really wouldn't be that hard to automate the shifting of all of your data layers using a tool like ogr2ogr.

This is completely untested, and possibly impossible, but maybe worth a try.

David.

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Julie Knoll
Sent: Tuesday, February 23, 2010 10:08 AM
To: Stephen Woodbridge
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] small maps of alaska and hawaii

We aren't using open layers, its a completely custom written site. It could definitely be done, but then there would be a lot of processing going on the background x 3 and I don't think thats practicle.  I also thought about just physically moving the shapes closer to the US, but theres about 15 layers that would have to be updated, that still might just be easiest though.  I was hoping there was maybe someway I could use mapservers querymap feature to do this, but I guess not?
On Tue, Feb 23, 2010 at 10:03 AM, Stephen Woodbridge <woodbri at swoodbridge.com<mailto:woodbri at swoodbridge.com>> wrote:
If you are using something like OpenLayers under the hood, you might just create three separate maps, one for each region. You can set the maxextents for each map to prevent scrolling outside that area.

This way each map would have its own controls and its own div and each could respond to events in their respective div.

This is definitely not a mapserver issue, but it is an interesting problem.

-Steve

Julie Knoll wrote:
Thats what I originally thought about doing, but I don't know how I would go about converting it to the right coordinates when the user clicks on the map. The site I'm working on is http://geofred.stlouisfed.org  There's so many other things going on server side to calculate the data and what not that maybe its just not worth the effort.

Julie
On Mon, Feb 22, 2010 at 1:35 PM, Stephen Woodbridge <woodbri at swoodbridge.com<mailto:woodbri at swoodbridge.com> <mailto:woodbri at swoodbridge.com<mailto:woodbri at swoodbridge.com>>> wrote:

   Julie Knoll wrote:

       Hi, I am working on a site that displays thematic data for the
       United States, and I would like to include small maps for Alaska
       and Hawaii in the corners of the main map, rather than having to
       zoom so far out to see them.  Does anyone have any suggestions
       about the best way of going about doing this? Thanks.


   This is really a composition problem where you need to compose a
   single image from multiple separate images. The answer really
   depends on what media you are using like html, pdf, etc.

   If you are trying to do this in a web application I would recommend
   an approach some like:

   Using PHP/Mapscript, generate you three images and then use PHP GD
   to compose the three images into a single image and then return that
   to the browser. You can use a similar approach if you are using PDF
   depending on the PDF lib you are using.

   -Steve W



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100223/220663f6/attachment-0001.html


More information about the mapserver-users mailing list