brnkhy / mapzengo Goto Github PK
View Code? Open in Web Editor NEWPokemon Go clone using Unity3D & Mapzen/OpenStreetMap
Home Page: http://www.barankahyaoglu.com
License: MIT License
Pokemon Go clone using Unity3D & Mapzen/OpenStreetMap
Home Page: http://www.barankahyaoglu.com
License: MIT License
Awesome project first of all! I am getting this error and some null reference exceptions when building to IOS. It looks like it was taken care of in CachedDynamicTileManager.cs with the checks for IOS or Android and the related file paths but not sure what I am missing to get this to run. Thanks in advance.
Hi all,
im struggeling with the POI system, when i downloaded the latest version of Mapzen GO there wasn't any POI thing going on, so i searched in the script files and found a POI script and a PoIFacetorySettings script.
I added the POI script to the PoiContainer object. But i don't understand the Id, Type, Kind, etc. How does this work? I'm a bit of a noob at the moment so I don't know all these things yet.
I hope somebody can help me,
Thanks!
Sometimes, a building is not rendered properly. It may be that the wall normal are in the wrong direction, e.g. the wall is not drawn when looking from outside to inside, but is visible the other way round.
For example, see the building within the red line (three times the same building, seen from the top, the bottom, and in the camera).
Lat: 51.45179
Lon: 5.481454
Range: 2
Zoom: 17
Tile Size: 100
Hi, Thank you for sharing this
great job sir
I'm wondering if you could add feature for offline data map and saving the map mesh on editor? Openstreetmap can export specific area, and we can convert it into geojson with geojson.io, or Mapzen provide an extracted data geojson files, but i couldn't understand how to convert it to your tilemap because I'm not understand enough about the long/lat conversion.
Thank you very much, I'm sorry for my poor English
You can add saving and loading files from disk.
private void LoadTile(Vector2 tileTms, Tile tile) {
var url = string.Format(_mapzenUrl, _mapzenLayers, Zoom, tile.GetTileTms.x, tile.GetTileTms.y, _mapzenFormat, _key);
var pathFile = PathSaveJsonFile + tile.GetTileTms.x + "-" + tile.GetTileTms.y;
if (File.Exists(pathFile)) tile.ConstructTile(pathFile, true);
else { ObservableWWW.Get(url).Subscribe(
tile.ConstructTile, //success
exp => Debug.Log("Error fetching -> " + url)); }
}
I was wondering how you go about implementing zoom in, zoom out to load new zoom of tiles?
Hi,
Does MapzenGO support hololens projects?
The ground material is always instanced on the map tiles. This prevents ground tiles from being batched. I'd make a material member in the World class that you can drag a material to (The default Ground material, perhaps) and then assign this material to the ground as tiles are built. That way you aren't creating a new material instance for each ground tile.
I get a bunch of Null Reference Exceptions when I run the Basic Loader in the latest version:
NullReferenceException: Object reference not set to an instance of an object
Assets.Models.Factories.BuildingFactory+c__Iterator1.MoveNext () (at Assets/MapzenGo/Models/Factories/BuildingFactory.cs:31)
System.Linq.Enumerable+c__Iterator122[JSONObject,UnityEngine.MonoBehaviour].MoveNext () Assets.Tile.RunFactories (.JSONObject mapData) (at Assets/MapzenGo/Models/Tile.cs:94) Assets.Tile+<ConstructAsync>c__AnonStorey38.<>m__15 (.JSONObject mapData) (at Assets/MapzenGo/Models/Tile.cs:70) UniRx.Observer+Subscribe
1[JSONObject].OnNext (.JSONObject value) (at Assets/MapzenGo/Plugins/UniRx/Scripts/Observer.cs:164)
UniRx.Operators.ObserveOnObservable1+ObserveOn_[JSONObject].OnNext_ (.JSONObject value) (at Assets/MapzenGo/Plugins/UniRx/Scripts/Operators/ObserveOn.cs:159) UniRx.Scheduler+MainThreadScheduler+QueuedAction
1[JSONObject].Invoke (System.Object state) (at Assets/MapzenGo/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs:203)
UniRx.InternalUtil.ThreadSafeQueueWorker.ExecuteAll (System.Action`1 unhandledExceptionCallback) (at
Hi,
You are doing great work.
I can able to build exe file for project but unable to build apk for android. can you please help me out
Thank You!
i.e. boundary width should be like 10-20 in lvl16 but 2000+ in lvl5
it's hard changing it every time. not sure if it's forcing it too much though, cant have everything automated right?
The ConvertToEnum in class Extensions throws sometimes an exception. The problem is with composite words in the enum name.
E.g.
The enum definition LanduseKind has enum "RecreationGround" but geojson returns "Recreation_Ground".
The easy way is to remove the "_" from the string before converting.
Every exception is a large performance penalty!
Created blank project, included files in assets, tried to run BasicLoader and got null exception error in World:26. Putting Tilemanager in World component solved problem.
This is Unit 5.4.0p4 Personal.
I have no idea why I put them in the first place. Will fix this asap
It would be great to add Unity's Input.location service (lat/long) data and provide the coordinate conversion routines from lat/long to actual player position along with some interface to elegantly change the ThirdPersonCharacter position.
(great work so far!)
I modified the Factory class to have a material member:
public Material objectMaterial;
And then in each Factory's subclass, I assign that material to the mesh after it's created. I can merge this change in, I suppose. But it's a simple fix to make. That way you can easily change the color of the buildings, water, etc. upon creation.
If you load a new scene, the Interval will continue to execute on DynamicTileManager causing an exception since the objects are all destroyed that it is referring to.
Can you cancel the observable on destroy/disable? I saw some reference on how to cancel observables with a token here:
http://stackoverflow.com/questions/35361336/cancellation-token-for-observable
Developed and tested using only level16. It simply doesn't work for other levels.
i.e. Tile positions are totally messed up in lvl14
OSM road data is just a bunch of unrelated segments and I feel that it limits mapzengo quite a lot. Is there a way to get a proper connected graph from osm or any other free services? OR can we connect those road segments with %90+ success procedurally? It can be done for sure but it'll be a quite painful task and probably take lots of time.
and it breaks factory xml tag queries.
it would be so much better and easier forcing at least 2 layer requests really. like request earth layer secretly, it's small anyway.
The Convert.ToDouble is used to see if it is a number or a json treeleaf, Using FormatException handler has large performance penalty. Loading json file 1000 bytes took 60 sec; with TryParse 4 msec (in hololens emulator)
Fix included in attachement
If you reach the South, North, West or East, the tiles stop...
We need a way to smoothly change the coordinates without blink the existing tiles.
now we have one object for all buildings under a tile
if we change that to one obj for standard buildings, one for hospitals one for religious buildings etc, we'll be able to use type materials on those objects as well.
There'll be a small performance hit but probably wont even be noticable
Maybe there's a better way to do this, but I can't place 3D objects on top of the map in world coordinates (say, a monster 4 units away from the player in world units) because the camera / player is reset back to 0,0,0, when he moves off the screen and the tiles are dynamically loaded.
I guess you could either not reset the camera/player position, or maybe we need a function that converts lat/lng to world coordinates based on the current player location--and then those game objects can have their world position updated based on their lat/lng whenever the camera resets?
gotta change that to double or something
This may be totally due to my ignorance of unity materials and textures, which is vast, but I can't seem to get a textured material to render properly on roads or buildings.
Sorry to create an "issue" out of it, Baran.
I think we should somehow move all of the assets to a subfolder, like Assets/MapzenGo so that you could export that folder as a unity package and import it into another project. As it stands now, the files are all scattered around the root assets folder which makes it hard to import into other projects and modify.
Currently, you specify in Unity (TileManager script) the layers to load. Alternatively, you could determine them automatically, so the user will never load more layers than he actually needs, based on the XmlTags that are in use. I.e.
In TileManager.cs:
private void InitLayers()
{
var layers = new List<string>();
foreach (Factory plugin in _plugins)
{
if (layers.Contains(plugin.XmlTag)) continue;
layers.Add(plugin.XmlTag);
}
_mapzenLayers = string.Join(",", layers.ToArray());
}
Hi, can make saving json files into separate folders depending on the zoom, but not to keep adding to the name.
Maybe it's due to the null exceptions, but the DynamicLoader scene brings my MacBook Pro to its knees. Didn't have this problem with previous versions. Not sure what the problem is, because when I try to run the profiler, Unity hangs.
When trying to build inserting only the CachedDynamicLoader as a scene I get the following error and no build files are generated. I think is because some paths with mixed separators (I'm on Windows) like this:
"C:\Tactics\OpenMap3/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml"
Can you point me at the settings files where these paths are set?
Here is the message extracted from the log
Invoking UnusedByteCodeStripper2 with arguments: -out "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed\tempStrip" -l none -c link -b False -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\Whitelists\Core.xml" -f "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "C:\Tactics\OpenMap3/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "C:\Tactics\OpenMap3\Temp\StagingArea\Data\preserved_derived_types.xml" -d "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed" -a "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll" -a "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed\UnityEngine.Analytics.dll"
C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe exited after 698 ms.
Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed\tempStrip" -l none -c link -b False -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\Whitelists\Core.xml" -f "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "C:\Tactics\OpenMap3/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "C:\Tactics\OpenMap3\Temp\StagingArea\Data\preserved_derived_types.xml" -d "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed" -a "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll" -a "C:\Tactics\OpenMap3\Temp\StagingArea\Data\Managed\UnityEngine.Analytics.dll"
stdout:
ERROR: Failed to resolve base type System.Configuration.ApplicationSettingsBase for type SSAA.Properties.Settings
Fatal error in Mono CIL Linker
System.Exception: ERROR: Failed to resolve base type System.Configuration.ApplicationSettingsBase for type SSAA.Properties.Settings
at UnusedBytecodeStripper2.ResolveFromMonoBehaviours.IsMonoBehaviourOrScriptableObject(TypeDefinition type)
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at UnusedBytecodeStripper2.ResolveFromMonoBehaviours.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Mono.Linker.Driver.RunDriver(Driver driver)
stderr:
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:98)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\AssemblyStripper.cs:104)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\AssemblyStripper.cs:97)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\AssemblyStripper.cs:208)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\AssemblyStripper.cs:128)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:205)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:139)
UnityEditor.WebGL.WebGlBuildPostprocessor:PostProcess(BuildPostProcessArgs) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:373)
UnityEditor.PostprocessBuildPlayer:Postprocess(BuildTarget, String, String, String, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry, BuildReport) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\PostprocessBuildPlayer.cs:176)
(Filename: /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs Line: 373)
Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) [0x00160] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:100
at UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) [0x00034] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\AssemblyStripper.cs:104
at UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable`1 additionalBlacklist, Boolean developmentBuild) [0x001b1] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\AssemblyStripper.cs:97
at UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.String stagingAreaData, IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, Boolean developmentBuild) [0x000cc] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\AssemblyStripper.cs:208
at UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, Boolean developmentBuild) [0x0002b] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\AssemblyStripper.cs:128
at UnityEditorInternal.IL2CPPBuilder.Run () [0x00051] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:205
at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean developmentBuild) [0x0000d] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:139
at UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) [0x001ee] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:373
at UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) [0x000ce] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\PostprocessBuildPlayer.cs:176
(Filename: /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs Line: 373)
Hi there,
first of all amazing work!
I recognized that roads of different type and color flicker.
The reason for this is probably the same as with #29.
Maybe you should consider to give the different road types a height as well, so that the layers don't overlap.
Greetings and thanks for your work,
Erik
Roads floating 2 units above ground. I've identified and submitted a fix in patch-1 branch based off dev.
somehow I forgot adding that to road factory I guess
Hi Baran, you've probably noticed too that Mapzen also offers 3D elevation data (https://mapzen.com/blog/elevation/). Wouldn't it be great if MapzenGo would use this (tiled) data too?
There's a UnityEditor using statement in World.cs that needs to be removed, otherwise you can't build for devices.
So is there a way with the MapZen API to get tiles with no street names on them and no bitmap image for the tile? It seems like these tiles have buildings and roads as vector objects built on top of a tile bitmap that has the street names etc. on them. Can we have options to choose tile styles? I really just want to show the 3D roads / water / land / buildings, but not the tile bitmap.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.