[OpenLayers-Users] General Questions

Christopher Schmidt crschmidt at metacarta.com
Mon Feb 19 15:56:37 EST 2007


On Mon, Feb 19, 2007 at 02:54:00PM -0500, Robert J Becraft wrote:
> I am trying to use the OpenLayers code on my own web pages, but I have
> encountered a number of anomolies that I cannot address without
> assistance.
>  
> 1) I have successfully placed the latitude/longitude display on my map.
> However, the example I used to do this causes it to appear in the lower
> right hand corner of the map.  I cannot determine why this happens in
> the example, and cannot get mine to replicate that location for this
> display.  It will only appear in the upper left-hand corner and
> conflicts with the directional graphics there.

It sounds like you're missing the 'theme/' directory. The theme
directory includes the CSS which correctly positions some of the
controls.

http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#WhydoestheOverviewMapdisplayonthetopleftofthemapandnotinthedefaultposition
addresses this for the OvervieMap -- the issue is the same.

> 2) I need to know "how" to include a tiled image of my personal maps to
> the code.  All the examples go to map servers that provide that option
> for the images.  None of the examples show how to include a set of tiled
> images that I've created.  I am hoping that I do not have to create a
> map server to do this.

How are your tiles generated now? If you can generate them according to
TMS http://wiki.osgeo.org/index.php/Tile_Map_Service_Specification you
can use the TMS layer with OL 2.3.

> 3) Some of the examples create a map from a pre-determined location on
> Earth.  Is there a way of defining a new world?  For example if one
> wanted to use OpenLayers to map Mars or the Moon, how would you define
> the latitude/longitude orientation of the maps?
>  

http://location.highearthorbit.com/space/mars.html is an example.

> 4) After zooming in on my primary map, it pixelizes and becomes
> unreadable.  How do you transition from the primary layer to a new layer
> that has higher detail at that zoom level?  A map-server would do this
> automatically for you.  However, all my maps are generated by me and as
> in #2, I don't want to have to set up a map server to do this.

Again, it depends on how you're currently generating your tiles.

> 5) One anomoly I encountered concerned the box tool and the pan tool.
> Using the published 2.2 code, and clicking on the box tool, when
> dragging across the map had both active.  I used the 2.3 code and it
> appears that a fix is included in that.  HOWEVER, the examples all have
> this bug fixed and do not exhibit this problem leading me to believe
> that the code they are using isn't 2.2 code like they indicate.

http://trac.openlayers.org/wiki/DefaultControls is probably helpful.
There is, by default, a mousedefaults control: the mousetoolbar control
is a subclass of this. Including both will probably have the affect you
describe.


> 6) Is it possible to include a layer on the map that contains hot-spots?
> Can hot-spots be added to a map layer?

I have no idea what a 'hot-spot' is, so I don't know :)

> 7) I added labels to my map by creating a gif layer that has a
> transparent background.  Is it possible to add text labels to
> objects/locations on the map to do this in a scalable fashion?

OpenLayers has support for markers and popups, so you could put dots on
the map to do this, but there isn't a way to do this with text. 

> 8) In order to get my image to load, I have to access the image through
> an http reference and am running WAMP to serve up the image.  Is it
> possible to code the layer reference to get a graphic from the root or
> sub-directory?

Unfortunately, I don't understand this question. A piece of sample
Javascript code may help me here. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list