Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. var point = new OpenLayers.Geometry.Point(pt.lon, pt.lat);
  2. var markerStyle = OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'], {
  3. externalGraphic: iconURL
  4. });
  5. var marker = new OpenLayers.Feature.Vector(point, attributes, markerStyle);
  6.  
  7. var marker = this.findSelectedMarker();
  8. if (marker) {
  9. marker.style.externalGraphic = newIconUrl;
  10. this.layer.redraw();
  11. }
  12.  
  13. this.layerStyle = new OpenLayers.StyleMap({
  14. 'default': {
  15. externalGraphic: media_url + '${iconURL}',
  16. graphicHeight: 32,
  17. graphicWidth: 32,
  18. graphicXOffset: -16,
  19. graphicYOffset: -32,
  20. fillOpacity: 0.75
  21. }
  22. });
  23.  
  24. focusedMarker.attributes.iconURL = this.focusedURL;
  25. this.layer.redraw();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement