[OSM-dev] Name finder for the main OSM page?

David Earl david at frankieandshadow.com
Wed Aug 8 15:07:52 BST 2007


On 08/08/2007 11:40, Tom Hughes wrote:
> In message <46B98BDC.7080206 at frankieandshadow.com>
>         David Earl <david at frankieandshadow.com> wrote:
> 
>>> A link would be better than nothing, but even one example would
>>> help. It can be in tiny type.
>> I see you did that anyway. I think it looks fine. Thanks.
> 
> Indeed - currently it points at the Namefinder wiki page, but it
> should probably be a more general one that mentions being able to
> search for postcodes and things.
> 
> Any volunteers to write a wiki page for it?

I'm happy to do it, just let me know the page name.

>> Re the marker, the reason I used an arrow and offset it is because it
>> often obscures the very name you're trying to show, as the diamond
>> marker you've used does.
> 
> If you've got a better icon I'm sure I can persuade OL to use it...

I've attached the one I used.

Here's the code for it, which shows the offset (otherwise the tip of the 
arrow is in the wrong place) and size

     var size = new OpenLayers.Size(25,22);
     var offset = new OpenLayers.Pixel(-30,-27);
     var icon = new OpenLayers.Icon('pointer.png',size,offset);
     if (currentMarker != null) {
       layerMarkers.removeMarker(currentMarker);
     }
     currentMarker = new OpenLayers.Marker(new 
OpenLayers.LonLat(lon,lat),icon);
     layerMarkers.addMarker(currentMarker);


>> I had enough fun working out that your "direction" was anti-clockwise
>> starting from west rather than clockwise starting from north like any
>> sane compass bearing ;-)
>> 

Sorry, I was thinking in terms of cartesian coordinate systems. It 
should have been documented in the wiki page with the rest. It is now!

David


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pointer.png
Type: image/png
Size: 3971 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070808/a8cce650/attachment.png>


More information about the dev mailing list