angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Image and auto fit not working...

Open MauritzKruger opened this issue 12 years ago • 5 comments

I'm using the library and it is displaying my pointers in the correct places, but my images/icons aren't correct and markers aren't auto fitted into view.

My code as follow: Map JSON: { "zoom": 3, "center": { "latitude": -27.710107168204548, "longitude": 22.964427999999998 }, "markers": [ { "latitude": "-27.757197", "longitude": "23.010919", "showWindow": false, "title": "BR44", "icon": "images/maps/neutral.png" }, { "latitude": "-27.662997", "longitude": "22.941562", "showWindow": false, "title": "CURTIS1", "icon": "images/maps/negative.png" }, { "latitude": "-27.670504", "longitude": "22.917937", "showWindow": false, "title": "CURTIS2", "icon": "images/maps/positive.png" } ] }

Map HTML: <google-map center="map.center" zoom="map.zoom" draggable="true"> <markers models="map.markers" coords="'self'" fit="true"></markers> </google-map>

MauritzKruger avatar Mar 31 '14 08:03 MauritzKruger

Your saying that the icons are not completely in view correct? Where fit is working but some of the icons are clipped?

nmccready avatar Mar 31 '14 13:03 nmccready

Please replicate this on the jsbin with the exact images on the jsbin. My guess the images are too large. The fit to bounds is only taking marker position in to account. This is how the google sdk works.

nmccready avatar Mar 31 '14 13:03 nmccready

I have verified that fit is working on master. So there has to be something wrong with the code here.

nmccready avatar Mar 31 '14 13:03 nmccready

Hi nmccready

Here link to my JSBin: http://jsbin.com/suhum/3/edit

MauritzKruger avatar Apr 01 '14 12:04 MauritzKruger

Trying to clean up issues, if this still exists, please re-open with a plnkr demonstrating the issue.

cthrax avatar Aug 03 '14 16:08 cthrax