138 Commits

Author SHA1 Message Date
Jon Atkins
3c90960e4c work-in-progress - checking in while looking at other code on master. may be broken 2013-08-25 17:50:28 +01:00
Jon Atkins
07c28538fd work in progress - first attempt to use new rendering code
lots of things currently broken though...
2013-08-22 22:32:31 +01:00
Jon Atkins
fee3a73767 move map data tile cache code into it's own file and clase 2013-08-19 20:55:07 +01:00
Jon Atkins
92433c5d4b merge patch from #491, that updates things to getThinnedEntitiesV4
also a couple of plugins that were missed
2013-08-16 17:36:17 +01:00
Jon Atkins
3ea40952ce niantic are tweaking the web protocol. so far, seen getThinnedEntitiesV2 renamed to V3 - but no changes in request/response format?! 2013-08-13 21:11:32 +01:00
Jon Atkins
b9a4f91f39 tweaks to data tile fetching and cached tiles - should end up with fresher data when the niantic servers are struggling 2013-08-08 11:56:00 +01:00
Jon Atkins
a43bd3ef0c fix resonator rendering on zoom after changing to avoid re-rendering unchanged data
this whole area of code could do with some restructuring really - this will do for now though...
2013-08-05 20:10:58 +01:00
Jon Atkins
3d7440b06a add ent[1] - the data modification timestamp, to beforePortalReRender
alsoi include the previous timestamp
for #324
2013-08-05 14:16:49 +01:00
Inye
55c055425b Avoid using Object.keys(obj).length in hot code paths
Complexity of Object.keys(obj).length is O(n) where n is the number of
object keys. Unfortunately, JavaScript have no built-in means of
determining number of object keys in constant time. Therefore, we have
to count object keys using separate counter variable.

It may look ugly (and indeed it is), but it greatly improves smoothness
and overall feel of IITC.
2013-08-02 20:00:03 +04:00
Jon Atkins
0a5200b7fa improve handling of deleted entities, and of constructed entities
fix #450
2013-07-31 19:19:47 +01:00
Jon Atkins
e9ea00cd08 map data tile tweaks. tiles are put into buckets based on a simple tile count, rather than coordinates. should help things when re-requesting failed tiles when the others are cached - and possibly is closer behaviour to the stock intel page 2013-07-25 02:33:08 +01:00
Jon Atkins
c3576d566b linkedEdges data for portals remains in some cases (when they decay?), so don't process the link data in this case 2013-07-20 20:27:24 +01:00
Jon Atkins
f232de3617 fill fields in with geodesic polygons, to match the changes made for links 2013-07-17 22:20:35 +01:00
qnstie
dc6961667c Changed link from polyline to geodesicPolyline 2013-07-17 13:31:46 +02:00
qnstie
5b3220cb98 Extracted portal marker into a separate function
This allows creation of plugins providing alternate portal marker styles and shapes (for third party plugin development). And it makes sense anyway :)
2013-07-07 20:01:03 +02:00
Jon Atkins
0494e6c988 simplify logic for grouping map data requests into buckets - zero advantages seen with various different grouping methods tried
reduce the bucket size limit - same number of requests at normal resolutions, and less timeouts (but more requests) at higher resolutions
2013-06-26 22:04:39 +01:00
Jon Atkins
7061f5f561 cache improvements
- min and max size - expire early if over max size, don't expire if below min size
- increase max cache age to an hour
2013-06-26 15:13:14 +01:00
Jon Atkins
8a71f7fdf0 map status improvements, reporting status of cache. basic 'error/out of date/up to date' message, and tool tip with tile counts
for #394
2013-06-24 16:15:44 +01:00
Jon Atkins
e9b05d7aa0 order requests to inprove the odds of getting missing tile data when some requests are likely to timeout, by putting uncached tile ids at the start of the request, cached (but stale) at the end 2013-06-24 12:20:16 +01:00
Jon Atkins
9e4f6d45b7 reduce cache fresh time from 2 minutes to 1 minute
some experimental bucket selections - commented out
fixed north/south lat variables being backwards. only affected the debug tiles, which coped with it without problems
2013-06-18 05:09:03 +01:00
Jon Atkins
3bdbc1bd39 tweak 2013-06-17 17:27:29 +01:00
Jon Atkins
d8db52d84c add some debug visualisation to the tile requests/cache usage.
could do with some further code cleanups/improvements
2013-06-17 17:26:30 +01:00
Jon Atkins
6f4c98aa7e cache bug fix - don't put used stale cache entries back into the cache 2013-06-16 20:09:30 +01:00
Jon Atkins
c2b567f053 data tile cache: send ajax requests before processing cached data 2013-06-15 19:11:47 +01:00
Jon Atkins
1507347acd remove partial portal zoom level boost from code - moving complete code into a plugin
log data vs map zoom to console
2013-06-15 17:54:27 +01:00
Jon Atkins
c776a07fd6 decrease standard refresh time to 30 seconds, so chat is more up to date
increase map tile cache to 2 minutes, so the increased refresh for chat does not impact map data tile requests
2013-06-15 17:08:59 +01:00
Jon Atkins
985bf78e47 cache the map data tiles for a short time. this can vastly reduce our load on the niantic servers, especially in the case of multiple repeated scroll/zoom actions in the same area 2013-06-15 05:34:23 +01:00
Jon Atkins
3abca8720c minor tweak to bucket allocation for data tiles. may help reduce response sizes and load on niantic servers 2013-06-10 04:44:57 +01:00
Jon Atkins
cb64b4dbfc replace generated link data with no creator with the more complete data when available. often occurs when zooming in on a region.
also, some comments to clarify things
2013-06-06 23:19:14 +01:00
Jon Atkins
3b46f5d54e log when response map tiles have individual tile errors
for debugging #320
2013-06-05 03:37:41 +01:00
Jon Atkins
50b3e0be38 remove some debugging console.log calls left in by mistake 2013-05-27 03:21:35 +01:00
Jon Atkins
9dc0ac4234 add a limit on the number of map tile data requests merged into a single bucket - the server seems to have some limits on this
yes - it will cause more requests in this case, but that's nicer than just completely failing

fix #320
2013-05-27 02:16:52 +01:00
Jon Atkins
140c5c2cb9 re-do request bucket handling - instead of grouping up to four requests together, so large window sizes make more requests, group requests into max 4 blocks
I think this is closer to the stock intel site behaviour, and should vastly reduce requests, especially at high resolutions
2013-05-22 17:35:59 +01:00
Xelio
b5381603b8 Bug fix: Resonators didn't redraw sometimes after level of portal hide and reshow
And some code simplification.
2013-05-18 17:27:46 +08:00
Xelio
07bf9b1299 Bug fix: Double removal of portalAccessIndicator cause exception when layer is hidden 2013-05-18 14:53:38 +08:00
Jon Atkins
7b44784c02 fix comment 2013-05-18 01:06:01 +01:00
Jon Atkins
ca76e7ed60 add the concept of portal detail level zoom, separate from map level zoom
this allows us to override the zoom used to retrieve server data, giving options to either retrieve lower zoom levels to reduce the number of requests, or higher zoom levels to retrieve lower level portals from the server
2013-05-17 23:45:14 +01:00
Xelio
3980a19e46 Bug fix in portal render limit handler and add function to clean up left over portals which should be removed after minimum display portal level rise. 2013-05-14 00:26:26 +08:00
Jon Atkins
e4ad933bb2 clamp bounds used for map data requests. no point in trying to request data outside +-90, +-180 coordinates, as it's pointless, and the server returns an error code anyway 2013-05-13 01:11:28 +01:00
Jeremy Lindgren
55be1dd2af Merge master 2013-05-01 12:53:59 -05:00
Kevin
79af80d0c3 More updates to url links to be compatible with stock intel map 2013-04-30 22:33:07 -07:00
vita10gy
15d52b1897 Merge branch 'master' into highlighter 2013-04-24 14:20:45 -05:00
Paul Tsupikoff
f7f8e1ca94 Rewritten tile request calculation 2013-04-24 12:58:31 +03:00
vita10gy
f43e7f1ba7 Merge branch 'master' into highlighter 2013-04-24 00:56:13 -05:00
goodsoft
0010626c91 Recreate links omitted from Niantic data
See #192
2013-04-24 06:17:36 +03:00
Jon Atkins
59094e48bc looks like ingress.com/intel is in the process of changing the protocol. passing in zoom level rather than minLevelOfDetail parameters when requesting entities 2013-04-23 21:45:01 +01:00
vita10gy
8fb3d0ed0f Merge branch 'master' into highlighter 2013-04-21 14:23:27 -05:00
Kevin
86a7996db5 Change portal image urls to https if necessary in the portal object 2013-04-17 22:53:14 -07:00
vita10gy
3cd664c25c Merge branch 'master' into highlighter 2013-04-16 23:07:03 -05:00
Fragger
4529f6c3ec Add portalGuid to beforePortalReRender hook data 2013-04-13 21:08:11 -07:00