How to use Google Maps v2 API with MVVMCross - xamarin.android

I'm trying to get the Google Maps v2 API working with MvvmCross v2 (vNext) and have run into some problems.
The example that I have for using Google Maps with MvvmCross has a view that inherits from MvxBindingMapActivityView. The trouble is that this uses MapView from the Google Maps v1 API, but this API is deprecated and Google is no longer issuing license keys.
I have some code adapted from the Xamarin Google Maps v2 example which works great:
https://github.com/xamarin/monodroid-samples/tree/master/MapsAndLocationDemo_v2
But I don't understand how to get this working with MvvmCross v2. It also uses fragments, and I'm not sure whether this is supported with the current version of MvvmCross?
I can get my Google Maps v2 Activity working fine outside of the MvvmCross framework by firing off an Intent from a MvvmCross view, and this is definitely an option, but I was wondering if there was any support inside MvvmCross for Google Maps v2 or whether the hackery involved would be more trouble than it's worth.
Thanks!
Matthew

The maps code in v1 (master) and v2 (vNext) MvvmCross both relied on the Google Maps v1 API - so is no longer an option for new apps.
Meanwhile, master and vNext were also firmly rooted in Android v1 and v2 - so don't contain any fragment support.
So your analysis of the situation is right.
Some options for developing with Google Maps v2 are:
Add a non-Mvvm Activity within your app for the page/tab that needs the new style map.
Try to implement an ExFragmentActivity - with or without data-binding support.
To do this you first need to inherit from Android's FragmentActivity class and then you need to provide some additional methods and properties. More on this in Insert a Monogame view inside MvvmCross monodroid Activity.
There's a lot of cut and paste in doing this, but I think it should be trivial to get an ExFragmentActivity working to a non data-binding level.
To go further - to get data-binding working as well - you may then find that you need to adjust the binding/inflation code - the code around LayoutInflater. The way that the FragmentManager hooks into the parent FragmentActivity may need to be adjusted. Sorry I don't have more details on how to do this - I think this is where hackery and some experimentation might be involved.
v3 will have full Fragment support - so switching to v3 (when it ships) and using fragments is one option for future support. However, the changes from older versions to v3 are quite large - so doing this may not be an option right now - depends where you are in your project.

Related

MapBox Map integration

I am new to map box and I want to have a customised map for my application, I have gone through all the guides of mapBox provided online but they seems to be a bit confusing , I have two things over there,
Create a map using MapBox studio
Integrate a map in your ios application
I just want to know that if I create a map using MapBox studio can I use the same map for my application, plus will the default mapKit API will also work in the same project.
Will the delegate functions of mapKit API works for the mapBox and most importantly, how I can do all the things I am not able to find a example code.
If anyone can provide me with the some example code in which they have integrated a map using mapBox will be really helpful.
Thanks in advance.
It is possible for you to use Mapbox GL to use and integrate in your app. and the delegates for Mapbox GL are provided in their sites and their API will also work for sure, so don't worry give it a try, to have a reference about the example on MapboxGL go to this sites
Mapbox GL example
official site

KML Viewer for iOS (any update example?)

I´m beginner and I trying to add on a predefined routes on a map application. I have seen the example of Apple's documentation: KMLViewer
It's just what I need, but uses outdated procedures, such as not using ARC (which can be edited) and other functions not well as updating. The advantage would KML me is that I create a file from My Maps in Google, with fully custom route.
I have seen examples (GitHub and Stackoverflow) using alternative libraries, but I get them working.
Do you know of any valid example for at least iOS 7.1 or alternative?

What is the functional difference between addProduct & addProductImpression in GAIDictionaryBuilder (Google Analytics iOS SDK 3.10)

I am using Google Analytics iOS SDK 3.10 and am trying to use the Enhanced ECommerce. I am confused about the functional difference between
- (GAIDictionaryBuilder *)addProduct:(GAIEcommerceProduct *)product;
and
- (GAIDictionaryBuilder *)addProductImpression:(GAIEcommerceProduct*) productimpressionList:(NSString *)name impressionSource:(NSString *)source;
Specifically I am trying to track an impression when a user is viewing the product on a detail view screen. Therefore, I don't see why specifying a product impression list in neccessary since there is no list.
It appears from the Google Docs that addProduct: does the same function but without the "list" attribute.
I realize that I could simple pass an empty string to addProductImpression. However, does anyone know if addProduct will give me the same result without the excess code?

Using here maps in blackberry

Can i use Here Maps
http://here.com/,
in blackberry RIM version 5.0 and above development?
Because i have an application which gets the user location and i need to put 2 pins on the map and get the distance between them , and the client wants Here maps.
I used bing map lately, but i need here map now.
Bing Maps SDK For Blackberry 6.0
Option 1) Use the Maps API for Java ME with the Blackberry JDK
There is no native Maps API marketed for Blackberry, however the Maps API for Asha is a general Java ME API, whose only dependencies are CLDC1.1 and MIDP2.0, so there is no reason why it shouldn't work with the Blackberry JDE. This article describes the similarities.
There are a series of code examples available which should work out of the box, except for one thing - you'll need to get hold of the jar files which usually reside in
C:/Nokia/Devices/Nokia_Asha_SDK_1_0/plugins/maps api/lib/
which can be obtained from the Nokia Asha SDK.
So all you'll need to do is download the SDK, extract the file maps-core.jar or any of the other packages you want and access them as external JAR dependencies in the usual manner. See the examples on github for an idea of the capabilities of the library.
Option 2) Use the Map Image API with the low level i/o
Now, if all you need is a single "quick and dirty map", you can make a series of http calls to m.nokia.me using javax.microedition.io to get a map on screen. This article explains why using a static map is probably a bad idea, but it would be a simple solution.
Option 3) Create a cross-platform HTML5 app using Cordova or Web Apps
This would be where the Maps API for JavaScript would be useful,
Basically if you would visit the developer.here.com native APIs section, you could see that there is no offering for Blackberry.
Anyway, thus, if you really want to use HERE maps with the platform, you should check out the Javascript API

Google Maps Javascript SDK v3 or switch to Google Maps iOS SDK

My iOS application is currently using Google Maps JavaScript Application v2 and since its getting deprecated, i have two possible solutions.
There is a need to either upgrade to next version i.e v3 or use the google SDK (say GMSMapView).
Although i can't use apple maps for various reasons.
Both from higher view seems to work, but not worked on both in depth till date.
Upgrading my Google Maps JavaScript Application To v3 : upgrading to v3 will require rewriting part of my map related code. and since a lot has changed between v2 and v3 of the Google Maps JavaScript API, which is not just an incremental upgrade. So, i need to research changes and check for all requirements are met and changes will not affect anything else.
Google maps SDK : This will be a complete rework but usage seems more simple than upgrading to newer version and reliable. But don't know how complex it will be later. and all the things done using the Google Maps JavaScript Application v2 should work with SDK too.
Help me in choosing the best solution or tell me if you have any better solution.

Resources