You are not logged in.
- Topics: Active | Unanswered
Announcement
*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
#1 2015-05-12 03:20:55
- WayneSchlegel
- Member
- From: Baden-Württemberg
- Registered: 2011-11-03
- Posts: 71
OpenLayers.Layer.PopupMarker / dynamische Größe
Holla,
ich verwende für mein Projekt das Wimmel Script vom Netzwolf.
Dort blende ich Marker ein, die je nach Zoomlevel eine unterschiedliche Größe haben sollen.
Die benötigte Größe kommt direkt aus der DB und wird via data.iconSize übergeben.
createIconFromData: function (data)
{
return new OpenLayers.Icon (this.getIconUrl(data), {w:data.iconSize, h:data.iconSize});
// return new OpenLayers.Icon (this.getIconUrl(data), {w:26,h:26});
},Das funktioniert auch soweit.
Wenn ich jetzt aber durch klicken das Popup einzelner Marker aufrufe,
dann kann sein das es ohne Probleme funktioniert oder plötzlich an eine ganz andere Kartenstelle springt.
Irgendwie kommt das Script da etwas mit den GPS Daten durcheinander.
Testseite: http://tinyurl.com/ouu86nl
Grüße Wayne
Offline