IPhone - Is it possible to add a Custom Image as the data source for a Map View? - iphone

I want to have a map view that loads from an image that I provide rather than using Google maps. This is basically because the internet will not be available where this app will be used.
I have heard that this is possible since map view is a CATiledLayer, so I should be able to provide custom content, but I am struggling to find information on the topic.
Could someone point me in the right direction?

You can't and doing this would be a violation of Google Map API terms. So Apple cannot even provide you such a feature. You must revert to third-party (and often non-free) services that use other maps.
The terms are here:
Google Maps API terms
This is a relevant (for this answer) extract from the terms:
License Restrictions. Except as expressly permitted under the Terms, or unless you have received prior written authorization from Google (or, as applicable, from the provider of particular Content), Google's licenses above are subject to your adherence to all of the restrictions below. Except as explicitly permitted in Section 7, you must not (nor may you permit anyone else to):
10.1 access or use the Service or any Content through any technology or means other than those provided in the Service, or through other explicitly authorized means Google may designate;
10.2 copy, translate, modify, create a derivative work of, or publicly display any Content or any part thereof (for example, the following are prohibited: (a) creating server-side modification of map tiles; and (b) stitching multiple static map images together to display a map that is larger than permitted in the Maps API Documentation);
10.3 pre-fetch, cache, or store any Content, except that you may store limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily, securely, and in a manner that does not permit use of the Content outside of the Service;
10.4 charge users or any other third party any incremental fee solely for the use of the Maps API Implementation, the Service, or the Content, unless you have entered into a separate written agreement with Google or obtained Google's written permission to do so (but if you are a consultant who creates or hosts Maps API Implementations for third party customers, you may charge such customers a fee for your consulting or hosting services);
10.5 reverse engineer, decompile or otherwise attempt to extract the source code of the Service or any part thereof, unless this is expressly permitted or required by applicable law;
10.6 use the Service in a manner that gives you or any other person access to mass downloads or bulk feeds of any Content, including but not limited to numerical latitude or longitude coordinates, imagery, and visible map data;
10.7 delete, obscure, or in any manner alter any warning, notice (including but not limited to any copyright or other proprietary rights notice), or link that appears in the Service or the Content;
10.8 use the Static Maps API other than in an implementation in a web browser;
10.9 use the Service or Content with any products, systems, or applications for or in connection with:
(a) real time navigation or route guidance, including but not limited to turn-by-turn route guidance that is synchronized to the position of a user's sensor-enabled device;
(b) any systems or functions for automatic or autonomous control of vehicle behavior; or
(c) dispatch, fleet management, business asset tracking, or similar enterprise applications (the Google Maps API can be used to track assets (such as cars, buses or other vehicles) as long as the tracking application is made available to the public without charge. For example, you may offer a free, public Maps API Implementation that displays real-time public transit or other transportation status information.

After some digging I found that this was not possible using a Map View
I ended up re-implementing a map view from a UIScroll View using a tiled layer as the content view. There is a tutorial how to do this in the 2010 WWDC videos on scroll views.
I then used open maps tiles.
This wasn't easy by any means. It took about a week to implement.

Related

RESTful design for accessing the same resource in different formats from different audiences

Use case
I am building a webshop where people can register/sign in and can purchase (and afterwards manage) their SaaS licenses. For this purpose I created (among others) the following REST endpoints:
// Lists all licenses which are linked to this user
r.Get("/users/{userID}/licenses", api.LicenseSvc.HandleGetLicenses())
// List details (such as purchase date, seat information, ...) for a given licenseID
r.Get("/users/{userID}/licenses/{licenseID}", api.LicenseSvc.HandleGetLicense())
// Creates a new license for the signed in user
r.Post("/users/{userID}/licenses", api.LicenseSvc.HandleCreateLicense())
// Each license has a limited number of seats. The license manager can free up seats to make room for others
r.Delete("/users/{userID}/licenses/{licenseID}/seats/{seatID}", api.LicenseSvc.HandleDeleteSeat())
The above endpoints are only supposed to be used in the webshop/license management panel. At the same time the same service has to serve endpoints for the SaaS products which actually use the license(s) a user has created/purchased before. This SaaS product needs different endpoints such as:
An endpoint to check at startup whether a given license is valid at all
An endpoint which also gets the license by ID (see above), but it should only return a subset of the license resource (e. g. it shouldn't return the date when the license was purchased)
My question
Due to the fact that I am building one REST API which is consumed by two different "audiences" (on the one hand the license manager/customer and on the other hand the SaaS software) I feel like I am running into conflicts.
The authentication of both audiences is different, both audiences want to access the same kind of resource (e. g. a license) but the resource "format" (no customer sensitive data for the SaaS requester) should be different depending on the audience.
Should this be reflected via different REST URLs or should I handle all that logic inside of my route handlers?
Should I even create two different services serving these different audiences? Like one API for the userpanel/license management and one for the SaaS products!?
REST is not very well prepared for these multi-client scenarios. i have seen many REST apis where certain attributes of resources will only be filled under certain circumstances where i find that perfectly fine. however i have also seen many examples of multiple use cases bunched into single resource models where the swagger documentation with its limiting structure terribly fails to communicate the purpose of each field.
so: as long as the use cases do not differ too much, i would try to keep the count of endpoints low.
tip: have a look at GraphQL, it is much better equipped for handling such cases with querying only for certain sets or even only asking for certain fields, putting the client in control. however using GraphQL as the primary interface is still somewhat exotic and comes with quite substantial initial cost compared to the plentiful REST infrastructure available. still worth it.

In-Store pickup not fully available in ATG reference store?

I had a question on in-store pickup. I see that there is support for it in the CRS module (it has GeoLocatorService, GeoLocatorDroplet etc), but don't see any buttons or JSPs that display or let you use it out of the box. On the other hand, commerce service center has this functionality fully exposed, with in-store pickup buttons, popup widgets to search for stores and shopping carts showing store pickup line items etc. Looks like the web stores would need this functionality exclusively coded, which would involve creating JSPs and components as required.
Is there something I can copy over from CSC (commerce service center) that will enable store pickup in web module (store US or home US etc?) very quickly? Please let me know. Thanks for your response!
Not sure if you want to capture payment and collect from store , or reserve in store and pay when you pick up the item.
In both the cases your DOM (distributed Order Management) and WMS (warehouse management system) has important role to play. ATG can lookup the selected store inventory , both locally (location repository) or using realtime webservice interface to the system that manages your global inventory.
In all cases ATG will be able to capture the order, but this order has to be handled by DOM in such a way that its routed to local store for fulfillment. If by any chance this order is not available in local store, your DOM/ WMS system should be able to send order item to local store from warehouse or from another store.
Walmart has both the functionality available (click to collect and reserve and pay at store) , walmart has proprietary software DOM3 which eventually addresses these interfaces.
Please realize ATG is just your online order capture system, Click to Collect and any 'commerce anywhere' functionality must be offered by your DOM. if this is offered by your DOM , all you need to do is exchange messages with DOM to achieve this.
I am not sure if this answers your question, but its not recommended to over engineer ATG , and ATG should follow the heart beat of your DOM.
In Store Pickup - often called Click & Collect - has not been implemented as a feature in the CRS. It is also not in CSC either.
You will need to do quite a bit of customisation to support it.
The feature that is part of CRS is Store Locator. This allows you to find and view details of physical stores.
You can use this as a basis to build Click & Collect functionality.
Assuming that other back-end systems can handle it, and your business is set up to consider things like promotions, pricing etc. for a Click & Collect proposition...
Basically, you will need to implement a new Shipping Method, a New subtype of Hardgood Shipping Group that can use a Store Code instead of a Customer Address, as well as the UI to support choosing a store during checkout.
Depending on how sophisticated your multi channel requirements are, you may need to modify the Inventory Manager to accommodate knowing local stock in store as well as central stock.
Other shipping related entities may need to change to represent any new statuses such as Arrived in Store or Ready for Collection.
If you are using ATG Fulfilment, you may need to change messaging there to accommodate, say, conveying a store code instead of a delivery address to fulfillers and carriers.

How to plot route on a map?

Is there a way to plot route on a mapview? I can do it through opening a webview, but is there a way to plot it inside the application?
Please go through below links which includes Github project:
https://github.com/kishikawakatsumi/MapKit-Route-Directions
https://github.com/route-me/route-me/tree/master/samples
This is just the demo applications you need to edit as per your requirements.
If oyou are thinking of drawing a route between two locations obtained from Google API then unfortunately, Google license won't let you do what:
10.9 use the Service or Content with any products, systems, or applications for or in connection with:
(a) real time navigation or route guidance, including but not limited
to turn-by-turn route guidance that is synchronized to the position of
a user's sensor-enabled device;
(b) any systems or functions for automatic or autonomous control of
vehicle behavior; or
(c) dispatch, fleet management, business asset tracking, or similar
enterprise applications (the Google Maps API can be used to track
assets (such as cars, buses or other vehicles) as long as the tracking
application is made available to the public without charge. For
example, you may offer a free, public Maps API Implementation that
displays real-time public transit or other transportation status
information.
Here is a similar question:
Drawing a route in MapKit in iPhone SDK

iOS data sharing to Google Apps for social features: Workable?

I'm putting on my thinking cap for this one, looking for a high level overview of possibility. I'm the author of an iPhone app that tracks user generated statistics. Data is essentially stored in a table on the device, with each entry having several fields/columns. Users can then sort that data, view graphs, and do other nerdy number crunching stuff. I want to take it farther and incorporate a sharing platform online. Game Center, Open Feint and other third party platforms are too narrow in scope. I'm interested in writing a web app, that users can visit to do three things:
Post New Table entries (automated by device)
View own entries and share via web (read only)
View other members table entries (read only)
Is Google App Engine a viable solution for this? My iOS app will require a POST URL, and the web app will need to save that authenticated user's data, and possibly return an "identifier" value to be referenced in the future in case the user needs to modify the item on the web. It will also require a GET URL to retrieve the authenticated user's statistics one by one or in total.
Next, the user will be able to visit the website and type in a "username" (probably email address) and see read-only statistics that have been submitted.
Thank you in advance for your input.
Sure, you could do all that with App Engine. If you wanted to, you could even make that local table of data sync with your app on GAE.
Really, there's not much on GAE that you can't do, although sometimes the database layer take some time to get used to.
My personal preference would be to set up a Django instance, but you could use any Python or Java-based app, depending on what you're comfortable with.
In short, yeah, you won't have any trouble doing basic REST work with GAE, and you could probably push it harder to do some more number crunching on those stats.

Is it a violation of terms and services to embedd google's turn by turn directions into an iphone app?

I'm trying to embed Google's directions into an iphone app There doesn't seem to be a straightforward way to pull turn by turn data (specifically JSON data) other than adding a UIWebView.
I was wondering if it's a terms of service violation problem or is it something that just hasn't been implemented yet for the iphone.
I've seen Google's directions data imported and styled in flash but I haven't seen anything relating to maps other than linking out to the Google maps iphone app.
From the Google Maps Terms of Use
2: Restrictions on Use. Unless you have received prior written
authorization from Google (or, as
applicable, from the provider of
particular Content), you must not:
(a)
access or use the Products or any
Content through any technology or
means other than those provided in the
Products, or through other explicitly
authorized means Google may designate
(such as through the Google
Maps/Google Earth APIs);
(b) copy,
translate, modify, or make derivative
works of the Content or any part
thereof;
(c) redistribute, sublicense,
rent, publish, sell, assign, lease,
market, transfer, or otherwise make
the Products or Content available to
third parties;
(d) reverse engineer,
decompile or otherwise attempt to
extract the source code of the Service
or any part thereof, unless this is
expressly permitted or required by
applicable law;
(e) use the Products
in a manner that gives you or any
other person access to mass downloads
or bulk feeds of any Content,
including but not limited to numerical
latitude or longitude coordinates,
imagery, and visible map data;
(f)
delete, obscure, or in any manner
alter any warning, notice (including
but not limited to any copyright or
other proprietary rights notice), or
link that appears in the Products or
the Content; or
(g) use the Service or Content with any products, systems, or applications
for or in connection with (i) real
time navigation or route guidance,
including but not limited to
turn-by-turn route guidance that is
synchronized to the position of a
user's sensor-enabled device; or (ii)
any systems or functions for automatic
or autonomous control of vehicle
behavior.
I don't know the specifics of your app, but I'm thinking it's easy to run into issues with clause 2.g.