Offline Maps marker Overlapping - ios

I am using the Leaflet JavaScript library to display the offline maps in an iOS application under the Titanium platform.
I am able to show it in my application but I have a problem regarding the click event on multiple markers at the same position.
How can I handle it or cycling the click event on the marker.
First it clicks on one and then another.
Is there any way the library provides, or another way to achieve this.
Screenshot
Please provide me any ideas on how to solve that.

You can use Leaflet Overlapping Marker Spiderifier or Leaflet.markercluster plugins to make this situation more user-friendly.

Related

How to implement clickable info-bubble on tap of marker in HERE maps in iOS?

I have integrated HERE maps successfully in my iOS app, but now I am facing an issue in implementing info-bubble on tap of markers on HERE map.I have searched on HERE documentation for iOS SDK, but can't find anything relevant. There are many solutions for JS, but nothing for iOS.
This feature doesn't seem to exist on iOS and Android. In order to create a similar behaviour in iOS, you should use NMAMapOverlay instead and add your own subviews/styling to it.
The iOS SDK documentation states that NMAMapOverlay can be used to display custom UIView-based content at a fixed location on the map. (...) Then, give the overlay a NMAGeoCoordinates location and add it to a map. The overlay will automatically be repositioned on the screen as the map moves.
You can find more information about the best practices for the implementation here:
https://developer.here.com/documentation/ios-premium/3.15/api_reference_jazzy/Classes/NMAMapOverlay.html

How to detect and click on Mapbox markers in native Android application?

We are trying to create automated tests for Mapbox's Maps SDK for Android based native mobile application. The automated tests need to determine the number of markers present on the screen, the number of marker clusters present on the screen, click on marker or cluster etc.
When looking at the Mapbox maps on Android application through UIAutomatorViewer or through Appium inspector, the markers visible on the map are not shown in the object hierarchy.
What can the Android native mobile application development team do to surface the markers/clusters so that they are visible to Appium?
Alternately, what other options can the automation team explore to develop automated tests? Espresso is not ideal as automation team does not have access to source code for the native mobile application.
Please see Mapbox demo application's -> Annotations -> Draw a marker for an example of a marker that we would like to detect and click on.
Since the Mapbox SDK uses OpenGL rendering, not native components, most test automation frameworks won't be able to recognise UI elements like the markers or clusters you add to the map.
There are some testers using image recognition from the Accelerated-KAZE Features project to find items on screen in order to count and select them. Some example code can be found at https://github.com/bitbar/bitbar-samples/tree/master/image-recognition
Another approach may be to have the mobile app developers include testing hooks that allow your testing code to use the Mapbox API to query rendered features. Mapbox documentation for that is here: https://www.mapbox.com/android-docs/maps/overview/query/#query-rendered-features
I had come across this scenario earlier that an element, even when it's displayed on the screen, was not highlighted when selected from Appium inspector.
Later, when I scanned the complete hierarchy tree clicking on each node was I able to find the element.
I would suggest you to click on every node and check, the marker will be there in the hierarchy tree. It's just that inspector cursor is not able to highlight it.

Is it possible to change a route by dragging its polyline in a GMSMapView?

I'm currently working on an app using the latest version of the Google Maps SDK for iOS and I've been wondering if it's possible to achieve the same "drag and drop" feature available in the web version of Google Maps to get a custom route.
After completely reading the official documentation I still haven't found an answer or guidance related to this feature, so any help will be appreciated.
Enabling the drag and drop feature can be done by creating an instance of GMDraggableMarkerManager and sets itself as the delegate in order to be notified of drag events.
Steps given in google-maps-sdk-ios-drag-drop are as follows:
To initialize the drag & drop functionality you have to import
the GMDraggableMarkerManager.h in your UIViewController displaying
the map.
Create a property for the GMDraggableMarkerManager.
After the initialization of the Google Maps View you have to
initialize the draggableMarkerManager.
Please note that to fully implement drag and drop feature, a long press on the marker enables you to drag it around and set it to another position
This SO post -
How to implement GMSMarker drag drop on GMSMapView? might also help.

iOS Custom InfoWindow Google Maps SDK 1.7.2

I have been searching and coding with the Google Maps iOS SDK 1.7.2
I need to build an app that displays custom InfoWindow after the marker is tapped.
Google posted a YouTube Video, that shows how to do it with just ONE marker.
The practical use scenario uses more than ONE marker, but if we follow the example of YouTube Video adding more than one marker, all the markers would show the same info inside the custom InfoWindows.
I did a iOS sample and uploaded to GitHub Sample Here
My Question is: Could anyone download the sample at GitHub and help me to implement that feature, display more than one marker with custom InfoWindow displaying different info for each marker ? In my sample inside the InfoWindow there is a WebView. For my use scenario I would need to load for each marker a different WebView(url) for each marker on the map but I couldn't load the WebView inside the custom InfoWindow. That WebView would be the size of the custom InfoWindow.I would load all the info for the markers as different webpages in the size of the info window.
It also would help a lot of other people that right now can't find a complete and fully working sample of that custom InfoWindow for iOS.
Thanks and Cheers!
Another vote for SMCalloutView. Check out my answer here for a quick start on implementing it.
Sorry to not actually answer your question per se, but Google's rendered UIView info windows are more hassle than they're worth, I think. You may be able to get a webview to load inside one of them, but the Maps SDK takes the custom UIView you set and then renders it into OpenGL, ignoring most (all?) updates you try to make.
Using SMCalloutView skips all of that and we put its view on top of the map, allowing you better control before and after drawing.
SMCalloutView helps you to custom the InfoWindow, you can download the Sample project and run it.
For displaying multiple InfoWindows, you have to treat GoogleMaps SDK (GMSMapView has a #property(nonatomic, strong) GMSMarker *selectedMarker property, which is not a Set), see the Sample project, in mapView:didTapAtMarker: delegate method.

Is it possible to embed webapp functionality into a map using google maps?

Okay, so we have an app written in objective-c for iOS. My job is to rewrite it using html/css/javascript and phonegap as a multiplatform app for ios and android.
Part of the existing objective-c app works like this: you select an item off a list, and it loads an embedded map from ios's built-in maps (not google maps) and puts a marker on the map where that item is. You can tap on the marker and it brings up a little info box with a button to "See more info," which if pressed takes you to a separate part of the app with information regarding the item.
This is the part I'm trying to get working in html/css right now, and I don't even know if that's possible.
So here's my question: can that be done using the google maps api, the whole embedding functionality into the map? i need that little info box which brings me back to the app; that's the crucial portion. Does anyone know whether this is possible, and whether there are any good references, examples, or tutorials to help out?
In the Google Maps API you can add Markers.
You can add a "click" event listener to the Marker where you can then open an InfoWindow.
In the InfoWindow, you can place some HTML, including a link or button that invokes a JavaScript function that will take you to the next screen of your web app.

Resources