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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -