bjorn2404 / jQuery-Store-Locator-Plugin

A store locator plugin using Google Maps API version 3
MIT License
495 stars 235 forks source link

Custom Marker #34

Closed Redani closed 9 years ago

Redani commented 9 years ago

Hi, I'm trying to change the marker, i'm using "markerImg": "/path/img/img.png" but nothing seems to change! any idea shat that may be??

Thanks

bjorn2404 commented 9 years ago

Did you try without that first slash?

Redani commented 9 years ago

Yes, but the same result!! i found a solution, it works but i dont know why!! markerImg: "/path/img/img.png", markerDim: { height: 32, width: 32 }, catMarkers: { }

I had to add "catMarkers" even if it's empty, is that normal?

I cease the opportunity to ask you 3 other questions please: 1- when selecting a location, is it possible to bounce the marker 2 times or 3 times, or more? 2- how can I use the callback function to find out if no result has been found? 3- I'm using Mac, and when i scroll using my 2 fingers on the map, it gets zoomed, is it possible to disable this??

Thank you

bjorn2404 commented 9 years ago

Thanks, yes the markerImg setting has a bug. I should have an updated version up before the end of the weekend.

  1. There is nothing built into my plugin to support this but I would think you could do it if you wanted. See the if statement at line 1802 in the current version.
  2. I'll add a no results callback
  3. Yes, this is just a Google Maps setting that you can override with the mapSettings setting. When you use this setting you need to make sure to include the zoom and mapTypeId, which you can copy from the defaults - then just keep adding whatever you want. I've done something similar with the following settings:

$('#map-container').storeLocator({ 'mapSettings' : { zoom : 12, mapTypeId: google.maps.MapTypeId.ROADMAP, zoomControl: false, disableDoubleClickZoom: true, scaleControl: false, scrollwheel: false, navigationControl: false, draggable: false } });

Redani commented 9 years ago

Cool, thanks a lot, looking forward to the new updated version :) HAve a great sunday.

bjorn2404 commented 9 years ago

Fixed in v2.0.2.

Redani commented 9 years ago

Thanks, Any idea when you'll release the update with the no results callback ?

bjorn2404 commented 9 years ago

It's in v2.0.2 with the callbackNoResults setting.

Redani commented 9 years ago

oh cool, didn't see it in the changelog :)

Thanks for all ;)

Redani commented 9 years ago

Hi Again,

i checked in the options list but didn't find a callback function when a marker and/or a place from the list are being clicked. How can I do so without altering the original js code? I'll need to transmit the reference of the marker...

And also I'd love to send extra parameter to dataLocation file in addition to origAddress, is that possible?

Thanks a lot and happy holidays ;)

Redani commented 9 years ago

Hi,

I'm really stuck and your help would be much appreciated. maybe i shouldn't have upgraded to V2 :/ Looking forward hearing back from you