When the 'html' element is specified in the features array used to create a point, DivIcon is used to create Markers and many of the options that can be applied to Icons are not applied (e.g. popupAnchor).

Since DivIcon extends Icon all Icon options should be applied regardless of whether the icon is created via Icon or DivIcon.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

caxy4’s picture

Reworked code that adds options from groupFeature array to icon.options when creating a Marker with Marker_options, which has been defined by either Icon or DivIcon.

This way all options specified in the groupFeature array are applied to the generated Marker regardless of whether it's options were created via Icon or DivIcon. Previously only two options (iconSize & iconAnchor) were being applied when the Marker_options were generated via DivIcon.

caxy4’s picture

Status: Active » Needs review
robertwb’s picture

Hey @caxcy4 - I would love to review this patch, but I cannot figure out how to actually use DivIcon in a view. If you could post up a screenshot of the views field text that you are using -- I assume that one uses a Global:Text or a Rewrite to create the DivIcon code.

Then, I will verify your approach and use case and support you getting it into the current dev git if all works well. Thanks.