markaspot / mark-a-spot

Public Civic Issue Tracking and Crowdsourcing / Mapping Platform based on Drupal. Open311 Server and Client Software
http://mark-a-spot.com
55 stars 30 forks source link

Update markaspot_radar.module #26

Closed gsiotas closed 10 years ago

gsiotas commented 10 years ago

Under the default installation, when adding a report the Radar module doesn't work properly. I think the leaflet.js must be included as the leaflet.markercluster.js is included

markaspot commented 10 years ago

Thanks for that, but I can't reproduce. The leaflet library is added by the geolocation osm submodule. Having both enabled, the radar module works as expected. Are you working with OSM or with google maps?

gsiotas commented 10 years ago

Hi! Thank you for your prompt response. I am using google maps. The errors that I get are: Uncaught ReferenceError: L is not defined - leaflet.markercluster.js?nfz845:6 Uncaught ReferenceError: L is not defined - leaflet.awesome-markers.min.js?nfz845:7 Uncaught TypeError: undefined is not a function - markaspot_radar.js?nfz845:21

You can see a demo here: http://sb261de2984b1ef3.s3.simplytest.me/node/add/report I haven't change anything in the above demo except from changing the maps (both in map and report page) to google maps from OSM.

Also in the map page the markers are 10-20px above the correct coordinates. Don't know if that's relevant.

markaspot commented 10 years ago

I see, the Google Maps field widget is the problem. If your solution works for your installation, perfect. I wont merge that request, as it could have side effects on installation with Leaflet / OSM as field widget. A bug report is filed at https://www.drupal.org/node/2386085, testing the proposed solution soon. Thanks again.