You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 25, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 25, 2023. It is now read-only.
Issue #36 was about whether we should re-factor MBXMapViewTileOverlay and how TileJSON is loaded. It seems like there is some general agreement that we should in fact do that, so this ticket is for discussing how to re-factor. I want to start experimenting with some re-factored code in a new branch, and I need an issue number for it, so that's why I'm making this issue (and for comments, patches, etc once the code is written).
@incanus, I'm expecting for this experiment to be on the quick and dirty side, and that it won't get merged, so I'm going to be a little sloppy about api doc comments in header files and such. If the ideas seem good, I expect to break the work out into issues and smaller commits.
That's the whole point though -- you don't know whether the layer has full-world coverage or not until you get the TileJSON. That affects the toggling of canReplaceMapContent and reloading as fallout of that.
Per chat: maybe we just assume full coverage, let the user override with the BOOL argument we have now, but get loading without waiting for TileJSON in the default case by piecing together tile URLs. There are two cases that I want to avoid:
Adding an alpha transparent and/or regional overlay as above does not show Apple's map underneath, losing context, and
Adding a full coverage map loads Apple's maps underneath, making for a poor-looking experience and increased overhead
The solutions don't have to be automatic, necessarily.
Per chat, outlining every scenario that I can think of and that the current version covers in some way. These are all various uses of mapID on our hosting and should be covered, but perhaps automatic detection of each isn't the best route.
By Constraints below, I mean that the app developer could wish for a layer only to be used in a region or zoom range and disallow panning and/or zooming, or they could allow free use, depending upon app design.
Notes: Point overlay always needs Apple for context. Note that in this project, I have added an OSM basemap in the online version for context, but the tiles that come down for the overlay have transparency and no basemap.
as far as I can tell there aren't any properties related to imposing limits on scrolling and zooming other than totally turning them off.
I think you're right here -- sorry to not clarify. I meant to say that suppose the user wants to show a view of exactly that size with panning disabled? Constrained by way of not allowing interaction.
which reduces (but doesn't eliminate) 404's
Why doesn't it eliminate? That seems odd. Even in the case of #35 the map view should know that the tiles won't be there.
Apple basically gives you on/off switches for pan and zoom, but that's it.
And that's what I mean. Say you are showing a non-interactive map view at the top of a view controller that programmatically changes its center as you scroll through a table view below. The map is always at the top of the screen. In all cases, the points that you are iterating through are in your regional coverage, but in no case do you want Apple maps to load underneath. You always cover your regional area and there is no chance of the user panning outside of that region.
Basically my take is that a few handfuls of 404's are way better than overlays failing to render consistently, crashes, or other flakey stuff of the sort I've been seeing in my experiments this afternoon.
Ok, if that's what it looks like, 👍
ghost added a commit that references this issue on Mar 5, 2014
#61 Delegate callbacks for JSON load/parse errors. More comments.
Activity
incanus commentedon Mar 3, 2014
Sounds great.
incanus commentedon Mar 3, 2014
That's the whole point though -- you don't know whether the layer has full-world coverage or not until you get the TileJSON. That affects the toggling of
canReplaceMapContentand reloading as fallout of that.incanus commentedon Mar 3, 2014
Cool, that works for me.
incanus commentedon Mar 3, 2014
Per chat: maybe we just assume full coverage, let the user override with the
BOOLargument we have now, but get loading without waiting for TileJSON in the default case by piecing together tile URLs. There are two cases that I want to avoid:The solutions don't have to be automatic, necessarily.
incanus commentedon Mar 3, 2014
Third thing we don't want:
incanus commentedon Mar 3, 2014
Per chat, outlining every scenario that I can think of and that the current version covers in some way. These are all various uses of
mapIDon our hosting and should be covered, but perhaps automatic detection of each isn't the best route.By Constraints below, I mean that the app developer could wish for a layer only to be used in a region or zoom range and disallow panning and/or zooming, or they could allow free use, depending upon app design.
examples.map-pgygbwdmjustin.map-9tlo4knwjustin.map-mf07hryqMKOverlayLevelAboveRoadsand use Apple's labeling.justin.NACIS2012justin.clp-2011-11-03-1200justin.pdx_metersincanus commentedon Mar 4, 2014
I think you're right here -- sorry to not clarify. I meant to say that suppose the user wants to show a view of exactly that size with panning disabled? Constrained by way of not allowing interaction.
Why doesn't it eliminate? That seems odd. Even in the case of #35 the map view should know that the tiles won't be there.
incanus commentedon Mar 4, 2014
And that's what I mean. Say you are showing a non-interactive map view at the top of a view controller that programmatically changes its center as you scroll through a table view below. The map is always at the top of the screen. In all cases, the points that you are iterating through are in your regional coverage, but in no case do you want Apple maps to load underneath. You always cover your regional area and there is no chance of the user panning outside of that region.
Ok, if that's what it looks like, 👍
#61 Delegate callbacks for JSON load/parse errors. More comments.
#61 Starting the Mac demo app. Added MBXStandardDelegate.
#61 Mac demo app is done (matches iOS demo app)
#61 Ads namespacing for delegate callbacks
#61 Remove some orphaned code
incanus commentedon Mar 7, 2014
Specific to the
issue61branch, I just opened #71 above so we have a place to discuss those particulars.