The best of Magic Earth for every iOS app

Help your app users perform searches, navigate and view a specific location using Magic Earth URL schemes. No matter whether they are online or offline.




Launch Magic Earth and perform a specific action


To launch Magic Earth and perform one of the supported action, use a URL scheme:

magicearth://?parameters

Display a map

Use this URL scheme to display the map at a specified zoom level and location. You can also choose to display different map modes (standard, satellite, terrain and hybrid).

 


ParametersMeaningObservation
open_mapOpen Map view.
latLatitude.
lonLongitude.
nameName for POI.
strStreet name.
noNumber.
zipZip code.
settSettlement
cityCity.
cntyCounty.
stateState.
ctryCountry.
zoomZoom level (value between 32 and 115)
map modeThe map type:
• standard
• satellite
• terrain
• hybrid (terrain + satellite)

Search

Use this scheme to display search queries in a specified viewport location.

 


ParametersMeaningObservation
show_on_mapPresent location on the map.*
qSearch query.
what_is_nearbyProvides nearby POIs around current position.*
search_aroundOpen Search view having current position as reference search point.*
open_searchOpen Search view.

* Latitude and longitude fields are mandatory.

Navigate

Use this scheme to display directions between two locations and to navigate to a specific location. You can also specify the transportation mode.

 


ParametersMeaningObservation
get_directionsOpen Directions view.*
drive_toStart car navigation from current position.*
drive_viaAdd intermediate waypoint to the active car route.*
walk_toStart pedestrian navigation from current position.*
walk_viaAdd intermediate waypoint to the active pedestrian route.*
bike_toStart bike navigation from current position.*
bike_viaAdd intermediate waypoint to the active bike route.*
public_transport_toStart public transport navigation from current position.*
navigate_homeStart navigation to home favourites.*
navigate_workStart navigation to work favourites.*
saddrSource address (departure).
daddrDestination address.

* Latitude and longitude fields are mandatory.

Show weather

Use the below parameter to display the weather data for a location. Weather forecast is available for 14 days.

 


ParametersMeaningObservation
show_weatherOpens Weather view.*

* Latitude and longitude fields are mandatory.

Save location

Use one of the below parameters to save a specific location in your app.

 


ParametersMeaningObservation
add_to_favoritesAdd location to favourites category.*
save_as_homeSave location as home favourites.*
save_as_workSave location as work favourites.*
save_as_contactOpen Save as Contact view*

* Latitude and longitude fields are mandatory.

Send location

Use the below parameters to share your current location.

 


ParametersMeaningObservation
sendOpen Share my location view.

ParametersMeaningObservation
open_mapOpen Map view.
show_on_mapPresent location on the map.*
qSearch query.
what_is_nearbyProvides nearby POIs around current position.*
search_aroundOpen Search view having current position as reference search point.*
open_searchOpen Search view.
get_directionsOpen Directions view.*
drive_toStart car navigation from current position.*
drive_viaAdd intermediate waypoint to the active car route.*
walk_toStart pedestrian navigation from current position.*
walk_viaAdd intermediate waypoint to the active pedestrian route.*
bike_toStart bike navigation from current position.*
bike_viaAdd intermediate waypoint to the active bike route.*
public_transport_toStart public transport navigation from current position.*
navigate_homeStart navigation to home favourites.*
navigate_workStart navigation to work favourites.*
add_to_favoritesAdd location to favourites category.*
save_as_homeSave location as home favourites.*
save_as_workSave location as work favourites.*
show_weatherOpen Weathers view.*
sendOpen Share my location view.
latLatitude.
lonLongitude.
nameName for POI.
strStreet name.
noNumber.
zipZip code.
settSettlement
cityCity.
cntyCounty.
stateState.
ctryCountry.
saddrSource address (departure).
daddrDestination address.
zoomZoom level (value between 32 and 115)
madmodeThe map type:
• standard
• satellite
• terrain
• hybrid (terrain + satellite)
* Latitude and longitude fields are mandatory.

Examples:


Show Paris on the standard map.magicearth://?q=Paris&mapmode=standard
Navigate to CH1 6BJ United Kingdom.magicearth://?daddr=CH1+6BJ+United+Kingdom
Drive to latitude=48.85649 and longitude=2.35216.magicearth://?drive_to&lat=48.85649&lon=2.35216.

The following code snippet example will navigate to latitude and longitude if Magic Earth is installed or will launch the AppStore to install Magic Earth:


func navigateTo(latitude:Double, longitude:Double)
{
    let urlScheme = NSURL(string:"magicearth://")

    if UIApplication.sharedApplication().canOpenURL(urlScheme!)
    {
        let string = String(format: "magicearth://?drive_to&lat=%f&lon=%f", arguments: [latitude, longitude])
            
        let urlRoute = NSURL(string: string)

        // Launch Magic Earth and start navigation.
        UIApplication.sharedApplication().openURL(urlRoute!)
     }
     else
     {
        let urlStore = NSURL(string:"https://itunes.apple.com/app/id1007331679")

        // Magic Earth is not installed. Launch AppStore.
        UIApplication.sharedApplication().openURL(urlStore!)
     }
}


Feature comparison:


FunctionalityMagic EarthApple MapsGoogle Maps
Navigation (by car)xxx
Navigation (by foot)xxx
Navigation (by bike)xx
Navigation (by transit)xxx
Navigation to Homex
Navigation Workx
Navigation intermediate waypointx
Map type: standard, satellitexxx
Map type: terrainx
Map type: transitx
Map type: streetviewx
Zoom levelxxx
Search locationxxx
Mark location as Homex
Mark location as Workx
Mark location as favoritesx



Magic Earth

Available for free
on iOS and Android


 
 
 




Safety Lens

The world’s first Advanced Driver Assistance System for iPhone.


buy yours now

Safety Lens requires a compatible iPhone, Apple Watch is not required except for Apple Watch specific features.
iPhone and Apple Watch are not included in Safety Lens.