ios - Limit map visibility to its overlay -
i want place image on map , limit map visibility image overlay, user can see image , not map behind it. tried used solution offered google maps api gmsgroundoverlay, so:
let southwest = cllocationcoordinate2d(latitude: 40.712216, longitude: 32.22655) let northeast = cllocationcoordinate2d(latitude: 40.773941, longitude: 23.12544) let overlaybounds = gmscoordinatebounds(coordinate: southwest, coordinate: northeast) let icon = uiimage(named: “someimg”) let overlay = gmsgroundoverlay(bounds: overlaybounds, icon: icon) overlay.bearing = 0 overlay.map = mapview
also, set cameratarget of map bounding box:
mapview.cameratargetbounds = overlaybounds
this limit user scrolling map infinitely, expected these limits go far overlay goes. image looks sticker on map, can still see map around image.
i not sure understand way gmscoordinatebounds , gmsgroundoverlay work..so i'm asking here if can give me hints on adjustments can make want.
Comments
Post a Comment