Using Potlatch 2 with Open Street Maps offline? - actionscript-3

Does anyone have experience with Potlatch 2, the Flash client for openStreetMaps? I am trying to determine how feasible it might be to hack it to work offline with local data. I saw this question from 6 years ago (Flash library for OpenStreetMap) but couldn't find much of anything specifically about customizing Potlatch.
My project involves a presentation tool for displaying saved cellphone data and being able to customize how the data is displayed etc.

I wonder if you need editing functionality or if you just want to style some existing data. Potlatch2 is primarily an OSM editor, different styling options are not the main focus.
Umap might be better suited for your use case. You can also fork it and create your local instance.
Regarding the Potlatch2 offline usage, please a look at the response Richard (potlatch developer) gave some time back: https://help.openstreetmap.org/questions/7735/using-potlatch2-off-line-as-a-teaching-tool

Related

Can I make CNC Editor with HTML5?

I would like to make my own CNC Editor.
I am looking for some guidance. I don’t know if it is even possible with HTML5. But it would be great if I can. If possible, please list what I should research and learn.
I don’t need it to be online accessible, I will only have it on my computer. I will be accessing it via local network from multiple different computers. I don’t want it accessing the internet, because it’s not always available.
Desired Features:
⁃ Read and Write files with different extensions (all files used are easily opened in notepad)
⁃ Store and retrieve data from a simple database file.
⁃ Make calculations
⁃ Have a text Editor window
⁃ Have a Display area for simple vector graphics depending on data loaded and provided by user.
It is possible but requires a lot of work. I would say that these are technologies you would need to master in order to pull this off:
Node.js (use express.js) - for storing and retrieving files from database and for reading/writing local files with extensions you want (server-side)
Vue.js or Angular.js or React - for building frontend interface to manipulate your vector graphics. It can also do calculations and It's good with svgs and that kind of stuff.
Electron.js (not mandatory) - it wraps it in native-app like experience. This framework actually gives you ability to write desktop apps for any os and arch.
So as I said, It would be a lot of work but its possible in the end.
Funny coincidence is that my brother is planning to build CNC machine so I might be doing this as well in next couple of months. Feel free to contact me if you need any further help!
UPDATE: You cant do it with just HTML5. It would be like trying to make wooden space shuttle.

MySQL into iOS Application (Xcode 5)

I am new to app making, but I have a small tech review site that I am trying to grow and I want to make an app for. Its pretty simple what I am setting up. To start, I am using MySQL to have three basic things. The review's picture, the title, and the review itself. The idea of this is so I can have other users log in to write reviews and it can load easily on an app, the website, etc... The most trouble I am having is in Xcode trying to make an app for this. I want two basic screens. A list of all the reviews with the picture on the left, and the title, and when you click on it, it takes you to the second screen displaying the review itself. Does that make sense?
(I am using Xcode 5 on Mac OS X 10.9. This App is intended for iOS)
-Thank You!
*Moderators, I apologize if this is a duplicate question, I have searched and have not found an answer.
If I understand correctly what is your asking then you probably need to rephrase the question and edit the tags. Because it has nothing to do with xcode5, mysql, uitableview or even iOS.
Before you start designing your iOS app, you need to think the overall architecture for your service. The client iOS app shouldn't (and usually can't) communicate directly with a database server (mysql in your case), you need to think about a server side API layer for your iOS app to consume.
You need to outline your web API and decide what is its interface (entry points, resources, data structures), take a look at REST architecture, for example. Decide on your data exchange format (e.g. JSON, XML). Then decide what platform and framework you want to create your API layer with (e.g. PHP, Python, Ruby on Rails, Asp.net etc).
Your iOS app itself sounds like a simple classic Master-Detail pattern and what you wrote is a good start (Google for master detail examples, plenty of them for iOS as well). Your question is too broad here, you need to be more specific in order for people to be able to help you with the app itself.

What is allowed in in-app purchases

I would like to have some info about apple's in-app purchases option.
I can't seem to find any place where they are explaining what is actually allowed. Becaus i wanted to make a digital bookstore with interactive books in asctionscript and offer the user interactive books (seperate swf files) via in-app purchases but apparently it is not allowed to have any code in your swf file, so that option is out of the window (btw if anyone knows of another option instead of swf files, please let me know).
Then have have thought of maybe starting in cocos2d but again i have no idea how i would distribute separate interactive books to the users. What are the options here?
So my questions are: what is allowed with in-app purchase, how can i offer interactive books (with posibility to click on elements and view animations etc) through in-app purchases.
And secondly and more important:
Would it be possible to do it via as3.0? Preferably i would like to do it through actionscript but can anyone tell me if its possible? Can i offer the user interactive books with elements that are pressable and animations etc through in-app purchases? And having all the books inside the application and unlocking them is not an option. I want to be able to provide books separatly.
Definitely on the right track,
I think if you are looking to do an animated books series or something that's more interactive that a simple text format you should be fine using In-App Purchases for this. You'll only get in trouble if you're duplicating something iBooks can already provide.
You'll need an ANE to give you access to the InApp Purchases API from AS3, there are a few out there and I'll shamelessly plug mine:
http://distriqt.com/native-extensions#in-app-purchase
The major problem you'll have is actually distributing the additional content, as you may not be able to load in a swf and play it in a compiled iOS AIR application as you would a normal flash/AIR application. You'll have to do some research and see if you can create a player that just loads images and animation sequences (in xml or other).
Good luck
1) You can't play swf files on the iPhone. Not without converting them to HTML5 or video. Which probably makes them non-interactive (not sure about HTML5).
2) Downloading any executable code to an iOS device is out of the question. There are some gray areas, for example downloaded Lua scripts which only contain data but due to their nature are executable code. It's a risk to do something like that, instead of just downloading XML or pure text/binary files.
3) Apple never tells you exactly what is allowed. They tell you what is not allowed, and even there they remain vague. There are always some gray areas and Apple reserves the right to define whether something in the grey area is acceptable to them or not. If you think your app is in the gray area, you need to have a backup plan in case Apple won't like it, or removes the app because they didn't initially find something wrong with it but later changed their mind.
4) Read the iOS Developer Program License Agreement and the App Store Review Guidelines. You may need to re-read some sentences because it's somewhat lawyer speak, though not really that hard to understand.
5) There are no guarantees. Best option: look at apps like yours and see if you can find your payment model implemented by other apps. If you find several such apps, it's most likely ok to do that. If you can't find any app that does something even remotely like you want to do it, beware.
6) I think you're on the wrong path. Use iBooks. Problem solved.

Advice on Where to Start with My App

I'm a relative beginner using Google Apps Script and JavaScript, but I've been playing around with bot for days now and I've created a few simple programs and I'd really like to try and get started on my dream project, even if it takes me forever. I'd like some advice on what I should use in terms of making the UI and what database I should use to hold the information (and if this app is even possible).
The App
I'd like to create an online novel management app that utilizes Google Drive as it's source for files. The UI would have a tree that showcases all the google drive files in the novel. When a scene is clicked, the scene opens up for editting.
Questions
Is this app a possibility?
If so, in terms of a UI, what do you think I should use? The google
provided UIbuilder? The HTML service - for example, can I have a
frame on the right that the google doc that needs to be editted
can open up in on the right?
Lastly, what database should I use? The database would have to store
chapter names and positions, as well as scene names, positions,
and the google doc ID that the scene corresponds to. I've got a
handle on ScriptDB and Spreadsheets... And if either of these two
aren't the best option, would some other database work better? And
why?
This app will, hopefully, be able to give an overview of a novel in tree form, allow you to open a particular scene and edit it, create new scenes, and also change the order in which the scenes are displayed. And then when the person finishes their novel, the app will compile all the scenes into one novel (also in google Drive).
Any insight or suggestions would be greatly appreciated!
Having a look at the questions you recently posted I think I have a pretty good idea of what you are trying to do and it looks like an exciting project... I can only encourage you to start it as soon as you can even if you're not comfortable with all the tools you will need to use, the best learning method is probably to work on something important to you.
Now your 3 questions : 1 - This is perfectly doable in the GAS environment and shouldn't be too hard to go through.
2 - the GUI builder is an easy way to start with UI but it lacks a number of features and tools that you will be needing (tree for example ) and is not so easy to expand if you ever need to. Depending on your knowledge in html, the choice is mainly between UiApp and html service... I would choose UiApp because I'm not good at all in html (but that's not relevant here ;-) but both are capable of building what you want, are easily expandable and not too hard to debug. The advantage could go to html service if you are going to look for 'nice looking features' because it opens the door to 3rd party tools... but again, this is a matter of personal choice.
3 - A recent post from Mogsdad showed that spreadsheet are faster than scriptDb for data storage and manipulation. I find it also easier since I can have a global view on data in the spreadsheet when debugging. Of course Spreadsheet must be considered as a container and data manipulated at array level to benefit from maximum performance. I use that in a lot of database application with full satisfaction.
Sorry for these "general considerations" that don't comply to sto standards ;-)
Yes, it seems that all of the things you are requesting are not too ridiculous. I recommend sticking to Google services because they are all easily integrated. To start off, you may want to use the UI builder/UI services. There may be a point in this project where you may want some functionality that the UiApp doesn't provide. At that point, you might want to switch over to HtmlService.
My answer is the same for the databases question. You might want to use a spreadsheet for your database so that you will be able to easily edit it by hand if you need to. You may not have the performance that another database would give you, but it will be fairly easy to test and mess around with your spreadsheet "database."
You could start out with getting the basics down. There's a serious amount of data out there. I would suggest you research on an "as-needed" basis. Design some work-/dataflow patterns for your app, for which you could try to use the Fluid UI extension for Chrome. Have a look at this from Mozilla on the designing of apps.
When you've gone through this you might want to have a look at Phonegap and the basics of web development and how you could combine the two.
There's also several ways of using/storing data. You could try WebSQL though it they no longer develop it. You could look at IndexedDB. You could try to use cookies.
Seriously, have a look around. You might also like the books of Wrox. They're very informative and have great work with reading demo's. Though the books are huge ;)

developing location/map based web site

I wanna start developing a map-based web site.
At first I ordered a regulat Gps device just to test the site, later on I would like to use Iphone's gps and other cell devices.
So I need something pretty generic.
I searched the web for map-based development framework and come up with too many of them :
Geo server, Map server, Open layers, Geoext , Google maps's api , and more.
I'm not a seasoned web developr (more of a c++ kind of guy) so I need something pretty straightforward , though robust at the same time.
Moreover, I need one which is free, and won't have licensing problem down the road.
At first I just need basic capabilities as displaying the gps data on my web site in real-time.
Can someone experienced recommend one ?
Thanks
Client
I'd go with OpenLayers - this is an opensource JavaScript client library, similar to the Google Maps API, or Bing API. However OpenLayers will free you of any licensing worries, or changing APIs as the source is available and can be modified - this is not the case with the Google/Bing/Yahoo APIs. You can however use the data from these services as layers in OpenLayers and drop them if they suddenly become filled with adverts or have commercial restrictions.
Have a look at examples to see if there is one you can use to make your first test application - http://openlayers.org/dev/examples/
GeoExtJS is a collection of extra tools and widgets that work with OpenLayers, built on top of another JavaScript framework ExtJS - also open source. ExtJS is mainly used for building user interfaces - data entry forms, grids etc. using JavaScript, to display in the browser.
If you are looking for tree structures to switch layers on and off and other more advanced UI widgets then GeoExtJS is worth looking into.
Server
If you are only displaying points then you can create dynamic KML or GeoJSON on your web server and reference this in OpenLayers. There are libraries in all languages that you can build on. Python has become a key languages in geospatial technologies, and has GeoJSON libraries you could script with.
GeoServer and MapServer are both server-side programs that allow you to serve out spatial data from databases with symbology, labelling etc. If you are having lots of different datasets then its worth spending time setting this up.
MapServer is written in C++ so it is probably easier for you to try this - however you may be able to get away without needing any specialist server side software, especially if your data consists of X,Y / Lon,Lat values that can be easily plotted as points.
For the beginning (you said that you need to show gps position in a real time) I think that Google Maps are good option here. This solution has very simple API and community support is also an advantage here (I've never compared with something else but I have good experince with GMaps and its tutorials/resources). This is for the client side, for server side any web framework should do the work (I use Django and it also have dupport for some geo things - mentioned later in this answer).
You need probably to build application that follows this rules:
Your GPS device sends data to your server(web application) periodically, data is stored in a db.
Users use browser to display data with map (eg. Google Map) which updates position periodicaly on some scheduled interval (eg. ajax calls to the server for the most current position). Each time response is recieved map need to be updated.
I don't know if there are more specialized solutions for this case.
If you need to improve your application and add some features you need to consider some more sophisticated geo frameworks. I have heard some positive opinions on GeoDjango, mainly because it can be easily incorporated with Django(which is very easy web framework to learn and it has a lot of capabilities).
All technologies I mentioned here are free.
I can recommend using the Google Maps API to render your maps in a browser. You can find my reasons in this answer.
The current version of the API has support for getting geo-location information for mobile devices.
I use Bing Maps for mobile. Mainly because its fast, and provides much better looking maps, 3d models, and satellite views for the UK than Google maps does.
I have also had issues with Google changing their service to provide some enhancements and it breaking my app, where at least with the Bing API theres a bit more compatability considered for existing apps. Not that I dont like the Google maps, I do. Its a backup service for me..
I generate maps from both providers, Bing as the primary, Goole secondary... this means that if ones offline of not working, which happens, my users still get to use my app.
Heres a link to Bing Maps Dev on a WIndows Phone for example
I'd take a look at Cloudmade. They have a number of API's, free options, paid options and use OpenStreetMap which for many places is one of the most accurate mapping solutions out there.
free , open source:
www.openstreetmap.org,
u can build ur own server as well using the same technolgogy:
http://weait.com/content/build-your-own-openstreetmap-server
API: http://wiki.openstreetmap.org/wiki/OpenLayers
Although its still in draft form, HTML5 will be supporting Geolocation API. Most major browsers and hand held devices should be supporting it in the near future and should make life a lot easier for developers who want a service independent solution. You would however still need a mapping service like google maps if you need to display locations.
function showMap(position) {
// Show a map centered at (position.coords.latitude, position.coords.longitude)
}
// One-shot position request.
navigator.geolocation.getCurrentPosition(showMap);
EDIT:
Its already supported in several major browsers:
Mozilla Firefox: supported in Firefox
3.5 and later versions.
Chrome: Supports thru Google Gears
Geolocation API
Opera: Supported in
nightly builds
Safari: Support is
coming soon in the IPhone’s Safari
browser.
Internet Explorer:
experimental support available from
IE8.