Where can I define default map marker? After module installation and adding widget marker is not showing.
define icon

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webengr’s picture

I think I am seeing the same thing, no place marker shows after I click, true for chrome and firefox browsers.

If I click twice, I get an error when submitting that I had more than one geofield, so it is doing something, and sure enough if I am careful and click just once and save, then my content display for geofield using leaflet show that I have a geofield place marker....

So as an admin I know I can use leaflet.widget, but on a community website this would not suffice to explain to users that they need to click only once and that due to a software issue the marker is not showing...

good module, but as stated, beta2

webengr’s picture

Component: Documentation » User interface
Category: support » bug

I tried different versions of leaflet and leaflet.widget but the place marker is not visible

I tried different appearance themes

I deleted the leaflet library so it would only use leaflet included with leaflet.widget, that changed nothing on widget use,
and I had to put back leaflet so views would work again.

Is anyone else missing the place marker, is this a known issue, or just for some users?

I changed the issue component to "User Interface" and category from support request to "bug"

webengr’s picture

changed title to be "Missing Place Marker"

BTW for the that website I setup leaflet to display, and setup openlayer to be the widget to input with. Interestingly that was the work around for now pending this being fixed.... would prefer not to only use leaflet w/ widget.

jjchinquist’s picture

Title: Where define default icon? » Missing Place Marker

Getting the same thing here. Tomorrow I will check out what values are trying to be saved to the field instance and get a patch rolled if possible.

I think though, that there are two separate issues here. One, the marker is missing, and two, multiple values are attempted to be saved to the database.

ranelpadon’s picture

there is now a good documentation for using this module:
https://drupal.org/node/2036539

mradcliffe’s picture

Locally I don't get this error, but after I deployed I got the following js error in console. I found the cause of the issue to be turning on JS aggregation.

var path = L.Icon.Default.imagePath;
if (!path) {
  throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");
}
  return path + '/marker-' + name + '.png';
} 

Seems very similar to #2013415: L.Icon.Default.imagePath undefined. Leaflet widget error when loaded via AJAX / Inline entity form., and maybe providing a path manually can fix this in this case too. Maybe a configuration option should be added to leaflet_widget?

mradcliffe’s picture

imagePath changes from "sites/all/libraries/leaflet/dist//images" to "undefined". Seems like this is an issue with leaflet module, which provides integration with the leaflet library.

balagan’s picture

Also, after drawing a polygon or linestring I am not able to draw another.

SocialNicheGuru’s picture

Issue summary: View changes
das-peter’s picture

Status: Active » Needs review
FileSize
984 bytes

Could you please test the attached patch?
It set's the JS variable L.Icon.Default.imagePath to the path given in the library definition. That way leaflet hasn't to rely on "magic" to detect the path.