Should I be using Mapbox-iOS-SDK or Mapbox. I ask because I cannot seem to find much information on MGLMapView Currently It crashes randomly on startup without any consistency (issues related to threading and pointers)and when I am able to load the map I attempt to use mapView.styleID which causes an instant error shown bellow.(MapID taken from random style uploaded to account from Mapbox Editor). I seem to find more information on RMMapView. It should be noted I am using xcode 7 with Swift 2.0
[ERROR] {Map}[Setup]: loading style failed: HTTP status code 404
Just as an added I need styled maps and directions from one point on the map to another
Crashes are a separate issue over in https://stackoverflow.com/questions/31929157/mapbox-occasional-threading-errors. To be useful, we would need crash logs that show what crash is happening and in which thread.
Regarding the 404, it looks like you are actually using a mapID, not a styleID, meaning trying to send a source of raster imagery tiles to a place designed for a vector style source.
Currently, in order to use styles generated with Mapbox Studio or the Mapbox Editor, you want something like this:
https://www.mapbox.com/mapbox-gl-ios/examples/raster-styles/
Related
I am working on a weather app in Mapbox and trying to get geoJSON files to update tornado warning polygons live on the map. (This would be done by a file called "warnings.geojson" in the same path as the html file and re-written frequently by a back end c++ app). Anyway, I found the following example on how to update live JSON files :
https://www.mapbox.com/mapbox-gl-js/example/live-geojson/
This works for what it is designed to do (and I understand what it is doing - it is what I am looking for), but I cannot seem to replace the code with my own. I would like to have it update the following test polygon file instead.
https://manidoo.000webhostapp.com/test.geoJSON
The above code is just a polygon of the Bermuda triangle. (Once I get this working, I can modify it on my own) I have tried so many variations of code that listing them here would just be a huge mess. Surely it should very simple and I am just missing it?
I believe what I should be changing is the map.addLayer() function, but I am not sure what to do. Any help would be so greatly appreciated.
The correct answer to my own question was testing the app in the wrong browser. Edge will not show geoJSON polygons that are on a local directory (atleast in this specific scenario). As MeltedPenguin pointed out - the JSON was valid. Once I uploaded my HTML and geoJSON to a server online with a http:// prefix, it worked great. Firefox showed the polygon even in offline mode.
I am trying to make an offline application with a bundled map. The map is running in SKConnectivityMode.Offline, so I have put the map data in: SKMaps.Bundle/PreinstalledMaps/v1/20150413/package
I have also copied the metadata into:
SKMaps.Bundle/PreinstalledMaps/v1/20150413/meta
The problem is that the data in the meta-folder is not picked up, and the map does not render. I tried to copy the meta-folder into the Library/Caches-location of a Simulator app, and then the map renders as expected.
A workaround I had in mind was to copy the meta-folder into the Library/Caches-area when the application is started the first time - but it will lead to double storage of files, and seems a bit dirty.
Any ideas what I might be doing wrong?
The version of the Skobbler API is 2.5.
I found a solution to the problem, with help from the API developers. The SKMaps.bundle was for some reason not being replaced in the application package by the build script, and I needed to run a Product->Clean from XCode.
I am using Parse SDK as a backend and when application loading data from server i see label "Loading". But my app using another language and i wanna translate it. How can i fix it?
Image here
I am tried to change simulator language and and changing value of Localization native development region key in plist.
Anyone had this problem? I think there is very simple answer, but i cannot find it. :)
Thank you for help!
So after a long search, i discovered that you should create a file named "ParseUI.strings" in order to change UI elements like "Loading.." as you mentioned. You can see the file in the image below. You should use at least ParseUI framework 1.1.6 for this method.
After you create a file and named it as "ParseUI.strings" you can change UI elements which parse provides us. You can see which strings are editable here.
In your example you want to change "Loading..." string, so all you have to do is enter the code in your ParseUI.strings file.
"Loading..." = "Whatever thing you want to say...";
Thats it, it worked for me.
I'm taking over an app for a friend who had a developer stop working for him. We want to change the icons of the characters in cocos2d. It's a small running game like temple run. We had a graphic designer create another image with the same size and same file name.
We then simply drag and dropped the image to replace the old ones. At first it was running fine, then when we switched a few more, the game crashed.
just posting as an answer so it may help others too.
What it may be :
hitting the logs would let you know that "failed to load data from xyz.png" which means the file you are referring is not present in the project which in your case may be due to excessive refactoring.
Also, check the extensions ".png" vs ".PNG".
The information for placemarks that I have created in a kml file does
not show on the iPad. The window opens up, but there is no content. It
has worked in the past and it works fine in Google Earth for Windows
and Android. I have a feeling that this might be an issue with Google
Earth on the iPad more than a kml issue.
Here is the file if anybody is interested in taking a look:
http://dl.dropbox.com/u/18240150/GoogleEarthAirports30Apr12.kml
Thanks
Your KML looks good (actually, it's very nicely done; the airports look and behave great):
Visual desk check in a text editor and it looks good
Loaded in Google Earth without problems (confirms the behavior you saw)
Also there is an Interactive KML Parser available online - your KML ran through the parse without errors
Your suspicion that the root cause of your problem lies with the iPad or Google Earth on the iPad appears to be correct. I don't have an iPad, so I can't test that, but knowing that an independent test had similar results at least helps to pinpoint the problem.
Here is a work around for this problem.
Prepare a KML file with NetworkLink tag referring to your remote KML file and download the file.
Then description rendering works well even on iOS5.
"Remote", which means a file places at a server like "http://example.com/sample.kml", is important. Local files like a file in a .kmz file don't work currently.