Giter Club home page Giter Club logo

cordova-plugin-googlemaps's Introduction

Cordova GoogleMaps plugin for Android, iOS and Browser v2.7.1

Download Build test (multiple_maps branch)

This plugin displays Google Maps in your application. This plugin uses these libraries for each platforms:

Both PhoneGap and Apache Cordova are supported.

Android, iOS

Browser


Guides

Quick install

$> cordova plugin add cordova-plugin-googlemaps

Then set your Google Maps API keys into your config.xml (Android / iOS).

<widget ...>
  <preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="(api key)" />
  <preference name="GOOGLE_MAPS_IOS_API_KEY" value="(api key)" />
</widget>

For browser platform,

// If your app runs this program on browser,
// you need to set `API_KEY_FOR_BROWSER_RELEASE` and `API_KEY_FOR_BROWSER_DEBUG`
// before `plugin.google.maps.Map.getMap()`
//
//   API_KEY_FOR_BROWSER_RELEASE for `https:` protocol
//   API_KEY_FOR_BROWSER_DEBUG for `http:` protocol
//
plugin.google.maps.environment.setEnv({
  'API_KEY_FOR_BROWSER_RELEASE': '(YOUR_API_KEY_IS_HERE)',
  'API_KEY_FOR_BROWSER_DEBUG': ''  // optional
});

// Create a Google Maps native view under the map_canvas div.
var map = plugin.google.maps.Map.getMap(div);

PhoneGap Build settings

<widget ...>

  <!--
    You need to specify cli-7.1.0 or greater version.
    https://build.phonegap.com/current-support
  -->
  <preference name="phonegap-version" value="cli-8.1.1" />
</widget>

Install optional variables (config.xml)

  • GOOGLE_MAPS_PLAY_SERVICES_VERSION = (16.0.1)
    The Google Play Services SDK version. You need to specify the same version number with all other plugins. Check out the latest version here.

  • ANDROID_SUPPORT_V4_VERSION = (27.1.1)
    This plugin requires the Android support library v4. The minimum version is 24.1.0. Check out the latest version here.

  • LOCATION_WHEN_IN_USE_DESCRIPTION
    This message is displayed when your application requests LOCATION PERMISSION for only necessary times.

  • LOCATION_ALWAYS_USAGE_DESCRIPTION
    This message is displayed when your application requests LOCATION PERMISSION for always.


Please support this plugin activity.

In order to keep this plugin as free, please consider to donate little amount for this project.

Donate


Release Notes

  • v2.7.1

    • Fix: (iOS) UiWebView references present in v2.7.0
  • v2.7.0

    • Re-adoption: cordova-plugin-googlemaps-sdk dependency
    • Important update: No longer support UIWebView on iOS. WKWebView only.
    • Fix: (iOS) Can't load image files from local host on ionic 4 / 5
    • Update: (Android) prevent null pointer error in AsyncLoadImage.java
    • Fix: Css animation interference when call setDiv and there is a push/pop page
    • Fix: (Android/iOS/Browser) KML parser crash
    • Fix: flickering and wrong rendering of some DOM elements
    • Add: map.stopAnimation()
    • Fix: can't remove map while map.animateCamera() is running
    • Update: (Android) Increase cache memory size
    • Update: (Android/iOS) Danish localization
    • Fix: (Android) Prevent resize event after map.setDiv(null)
    • Fix: (Android/iOS) Can not interactive with the map inside
    • Fix: jslint errors
    • Fix: marker.setIcon crashes
    • Update: Set default value range to heading and tilt
    • Fix: (Android/iOS) touch detection is wrong after clicking on back button very soon.
    • Fix: An error occurs when you click a marker of marker cluster #2660
    • Remove promise-7.0.4-min.js.map
    • Fix: (iOS) bug fix: App crashes if "bearing" property is ""
    • Fix: HTMLColor2RGBA() converts to incorrect value
    • Fix: (Android) Can't load marker image from the Internet
    • many bug fixes...

Demos

Demo (Browser)


Documentation

All documentations are here!!

https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.6.0/README.md

Quick examples


Map
var options = {
  camera: {
    target: {lat: ..., lng: ...},
    zoom: 19
  }
};
var map = plugin.google.maps.Map.getMap(mapDiv, options)

Marker
var marker = map.addMarker({
  position: {lat: ..., lng: ...},
  title: "Hello Cordova Google Maps for iOS and Android",
  snippet: "This plugin is awesome!"
})

MarkerCluster
var markerCluster = map.addMarkerCluster({
  //maxZoomLevel: 5,
  boundsDraw: true,
  markers: dummyData(),
  icons: [
      {min: 2, max: 100, url: "./img/blue.png", anchor: {x: 16, y: 16}},
      {min: 100, max: 1000, url: "./img/yellow.png", anchor: {x: 16, y: 16}},
      {min: 1000, max: 2000, url: "./img/purple.png", anchor: {x: 24, y: 24}},
      {min: 2000, url: "./img/red.png",anchor: {x: 32,y: 32}}
  ]
});

HtmlInfoWindow
var html = "<img src='./House-icon.png' width='64' height='64' >" +
           "<br>" +
           "This is an example";
htmlInfoWindow.setContent(html);
htmlInfoWindow.open(marker);

Circle
var circle = map.addCircle({
  'center': {lat: ..., lng: ...},
  'radius': 300,
  'strokeColor' : '#AA00FF',
  'strokeWidth': 5,
  'fillColor' : '#880000'
});

Polyline
var polyline = map.addPolyline({
  points: AIR_PORTS,
  'color' : '#AA00FF',
  'width': 10,
  'geodesic': true
});

Polygon
var polygon = map.addPolygon({
  'points': GORYOKAKU_POINTS,
  'strokeColor' : '#AA00FF',
  'strokeWidth': 5,
  'fillColor' : '#880000'
});

GroundOverlay
var groundOverlay = map.addGroundOverlay({
  'url': "./newark_nj_1922.jpg",
  'bounds': [
    {"lat": 40.712216, "lng": -74.22655},
    {"lat": 40.773941, "lng": -74.12544}
  ],
  'opacity': 0.5
});

TileOverlay
var tileOverlay = map.addTileOverlay({
  debug: true,
  opacity: 0.75,
  getTile: function(x, y, zoom) {
    return "../images/map-for-free/" + zoom + "_" + x + "-" + y + ".gif"
  }
});

KmlOverlay
map.addKmlOverlay({
  'url': 'polygon.kml'
}, function(kmlOverlay) { ... });

Geocoder
plugin.google.maps.Geocoder.geocode({
  // US Capital cities
  "address": [
    "Montgomery, AL, USA", ... "Cheyenne, Wyoming, USA"
  ]
}, function(mvcArray) { ... });

poly utility
var GORYOKAKU_POINTS = [
  {lat: 41.79883, lng: 140.75675},
  ...
  {lat: 41.79883, lng: 140.75673}
]
var contain = plugin.google.maps.geometry.poly.containsLocation(
                    position, GORYOKAKU_POINTS);
marker.setIcon(contain ? "blue" : "red");

encode utility
var GORYOKAKU_POINTS = [
  {lat: 41.79883, lng: 140.75675},
  ...
  {lat: 41.79883, lng: 140.75673}
]
var encodedPath = plugin.google.maps.geometry.
                       encoding.encodePath(GORYOKAKU_POINTS);

spherical utility
var heading = plugin.google.maps.geometry.spherical.computeHeading(
                        markerA.getPosition(), markerB.getPosition());
label.innerText = "heading : " + heading.toFixed(0) + "°";

Location service
plugin.google.maps.LocationService.getMyLocation(function(result) {
  alert(["Your current location:\n",
      "latitude:" + location.latLng.lat.toFixed(3),
      "longitude:" + location.latLng.lng.toFixed(3),
      "speed:" + location.speed,
      "time:" + location.time,
      "bearing:" + location.bearing].join("\n"));
});

StreetView
var div = document.getElementById("pano_canvas1");
var panorama = plugin.google.maps.StreetView.getPanorama(div, {
  camera: {
    target: {lat: 42.345573, lng: -71.098326}
  }
});

What is the difference between this plugin and Google Maps JavaScript API v3?

Google Maps JavaScript API v3 works on any platforms, but it does not work if device is offline.

This plugin uses three different APIs:

In Android and iOS applications, this plugin displays native Google Maps views, which is faster than Google Maps JavaScript API v3. And it even works if the device is offline.

In Browser platform, this plugin displays JS map views (Google Maps JavaScript API v3). It should work as PWA (progressive web application), but the device has to be online.

In order to work for all platforms, this plugin provides own API instead of each original APIs. You can write your code similar to the Google Maps JavaScript API v3.

Feature comparison table

Google Maps JavaScript API v3 Cordova-Plugin-GoogleMaps(Android,iOS) Cordova-Plugin-GoogleMaps(Browser)
Rendering system JavaScript + HTML JavaScript + Native API's JavaScript
Offline map Not possible Possible (only your displayed area) Not possible
3D View Not possible Possible Not possible
Platform All browsers Android and iOS applications only All browsers
Tile image Bitmap Vector Bitmap

Class comparison table

Google Maps JavaScript API v3 Cordova-Plugin-GoogleMaps
google.maps.Map Map
google.maps.Marker Marker
google.maps.InfoWindow Default InfoWindow, and HtmlInfoWindow
google.maps.Circle Circle
google.maps.Rectangle Polygon
google.maps.Polyline Polyline
google.maps.Polygon Polygon
google.maps.GroundOverlay GroundOverlay
google.maps.ImageMapType TileOverlay
google.maps.MVCObject BaseClass
google.maps.MVCArray BaseArrayClass
google.maps.Geocoder plugin.google.maps.geocoder
google.maps.geometry.spherical plugin.google.maps.geometry.spherical
google.maps.geometry.encoding plugin.google.maps.geometry.encoding
google.maps.geometry.poly plugin.google.maps.geometry.poly
(not available) MarkerCluster
google.maps.KmlLayer KmlOverlay
(not available) LocationService
google.maps.StreetView StreetView ✨
google.maps.Data (not available)
google.maps.DirectionsService (not available)
google.maps.DistanceMatrixService (not available)
google.maps.TransitLayer (not available)
google.maps.places.* (not available)
google.maps.visualization.* (not available)

How does this plugin work (Android, iOS)?

This plugin generates native map views, and puts them under the browser.

The map views are not HTML elements. This means that they are not a <div> or anything HTML related. But you can specify the size and position of the map view using its containing <div>.

This plugin changes the background to transparent in your application. Then the plugin detects your touch position, which is either meant for the native map or an html element (which can be on top of your map, or anywhere else on the screen).

The benefit of this plugin is the ability to automatically detect which HTML elements are over the map or not.

For instance, in the image below, say you tap on the header div (which is over the map view). The plugin will detect whether your tap is for the header div or for the map view and then pass the touch event appropriately.

This means you can use the native Google Maps views similar to HTML elements.


Official Communities

cordova-plugin-googlemaps's People

Contributors

adamduren avatar alexbonhomme avatar canadaka avatar chadevans avatar chrisantaki avatar dasois avatar denisbabineau avatar ebhsgit avatar eikooc avatar einfachhans avatar fabriziogiordano avatar gennarobotta avatar goinnn avatar hanskrywalsky avatar hirbod avatar iz-podpolja avatar longzheng avatar makers-mark avatar maxshevchenkomd avatar skydragonsz avatar stalniy avatar supa-creation avatar tdoubleg avatar tsbgarner avatar tswayne avatar watacoz3 avatar webalchemist avatar wf9a5m75 avatar xming13 avatar zgluis-safesigner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-googlemaps's Issues

Draggable not Working !!

map.addMarker({
'position': new plugin.google.maps.LatLng(sessionStorage.currentLatitude, sessionStorage.currentLongitude),
'draggable': true
}, function(marker) {
marker.setDraggable(true);
marker.addEventListener(plugin.google.maps.event.MARKER_DRAG_END, function(marker) {
marker.getPosition(function(latLng) {
marker.setTitle(latLng.toUrlValue());
marker.showInfoWindow();
});
});
});

map.closeDialog() on embedded maps instantly re-shows map (iOS)

There is code inside GoogleMaps.m _removeMapView that re-adds a map view when the map is embedded (lines 201-206 in current code). Therefore if, in JS, you call map.closeDialog() the map will get removed and then instantly re-added - basically you see the map re-draw itself.

I'd suggest that this code should be removed, and that closeDialog should remove the map from the screen.

Cordova IOS not working

Tried the basic IOS tutorial - twice - and could not get it to work. Cordova 3.4.1-0.1.0. xCode 5.1.1. API set up + key. GoogleMaps-iOS-1.7.2 sdk (for manual attempt).

Missing files (wrong places it seems). Compilation errors. Really wanted this to work. Started through the "manual process" but got lost at the AppDelegate step and files not matching.

Is there any hope for this to work / get fixed?

Thanks, Randy

Java Error when clicking the demo app's "Init a map" twice

I get the following error when I click "Init a map" for the second time, after closing the initial map:

Java Error
android.widget.FrameLayout$LayoutParams cannot be casted to android.widget.AbsoluteLayout$LayoutParams

Any help? I could help fixing this if I had any idea how to recompile the plugin...

Cant install with phonegap

Hi!
I use phonegap instead of cordova.
I do step by step "Tutorial for Windows".
At 5 step i use command:

phonegap plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID="HERE_MY_KEY"

but only get

[phonegap] adding the plugin: plugin.google.maps
[Error: Variable(s) missing: API_KEY_FOR_ANDROID]
[error] Variable(s) missing: API_KEY_FOR_ANDROID

in terminal.

Map Directions

Hello.

Excellent plugin, really love using it.

Is it possible for you to put Direction features

Thanks

HTML Selectbox items not appearing

Hi.

HTML select box items are suddenly disappearing after appearing for 1-2 seconds,this is only happening when i include the map plugin.

i have tested by deleting the map plugin and it works, any workaround for this.

Thanks

map.getCameraPosition

map.getCameraPosition didn't work drung camerachange event, even try after map init also failure cause undefine function exception. and it will let map can't run anymore. By the way, I only try it on IOS emulator.

getMyLocation not working,never execute callback.

I have using cordova 3.4.1 to build android app.Because of the navigator.geolocation.getCurrentPosition function sometimes not working,I must reboot my phone often to use it.
So I install the phonegap-googlemaps-plugin, I have installed it successful and see the google map in android,but the map.getMyLocation function never fire callback, and I can't get my location.
I am sure I have turn on the device's all the gps settings.
My android version is 4.1.2.
here is my code below, why it not works?

var onDeviceReady = function(){
        window.map = plugin.google.maps.Map.getMap();
        alert(typeof map); //execute 
        alert(typeof map.getMyLocation); //execute 
        map.addEventListener(plugin.google.maps.event.MAP_READY, function(map){
            alert('map init');//execute 
            map.showDialog();//execute I can see the earth map
            map.getMyLocation(function(location) {
                alert('get location');  //never execute 
                alert(typeof location);//never execute 
                alert(JSON.stringify(location));//never execute 
                alert(location.latLng.lat);//never execute 
                alert(location.latLng.lng);//never execute 
            });  
    });
}
document.addEventListener('deviceready', onDeviceReady, false);

Thank you for build the plugin.

Don't install in android

Hi you,
i interested your plugin, but i can not install in android. You can detail use guide install android !
Tks you, wish you a good day !

Zoom to group of points

With GoogleMaps you can zoom with CameraUpdateFactory.newLatLngBounds so that a group of locations are all visible. It also supports defining a margin in pixels to leave clear in the corners of the map, so that the furthest away locations are not directly at the edges of the screen. This is a highly useful feature in many cases, so I would recommend implementing it :)

cannot install the plugin

Hey guys,

seems like a very good pluggin. I've followed the install process step by step and when doing the following command:

cordova plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"

With my own credentials, nothing happen in the command line but a ">" added at the following line :
YohannM$ cordova plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID="AI***************" --variable API_KEY_FOR_IOS=“AI********************"
`>

What should I do from here ?
Note:
the "`" before the ">" sign is here only to have the sign shown otherwise this forum understand it as a citation
when doing echo $JAVA_HOME I can't see anyting but I've installed it properly
when doing which android I don't have anything but I have installed eclipse and SDK properly form the official doc.
I'm working with mac osx 10.9

thanks

Unable to add other Cordova plugin

Dear Masashi Katsumata,

I really appreciate your work and everybody know its best plugin of Google maps.
but the problem is i add this plugin by CLI

=>cordova plugin add \phonegap-googlemaps-plugin-master --variable API_KEY_FOR_ANDROID="Google Simple API Key"

=>cordova plugin add com.google.playservices

i compiled the cordova project and run on my android device it work good.

but when i add more plugin like device,motion,camera,etc
an error occurred state Class not found.

Thanks
Best Regards
Saad Mehmood

Possible BAD_ACCESS in "GoogleMapsViewController"

In the constructor of the mentioned GoogleMapsViewController.m "initOptions" field is initialized with a reference to the passed "options param:

  • (id)initWithOptions:(NSDictionary *) options {
    ...
    initOptions = options;
    ...
    }

In order to avoid BAD_ACCESS in "- (void)viewDidLoad" options should be copied using
initOptions = [[NSDictionary alloc] initWithDictionary:options];

There may be a better solution but this worked for me.

Animating map view re-positioning

I'd really like to animate the position of the map view. The scenario I'm imagining is that the user presses a button and the map slides to the right to reveal a menu hidden underneath the map (displayed in the cordova web view).

I've looked at the code, and it seems to me that the logical place to put support for this on the JS side would be to add an "animated" flag to the map.refreshLayout method. I guess that the animation duration could be a default value which could get overridden in params passed into the getMap method.

[question] Search Bar and Result Table over Map

Hi,

first let me thank you for this plugin. It's awesome and makes us happy, espacially when coming from the JavaScript Version of GoogleMaps.

I want to ask what general hints you have when we want to add a search bar over the map and show search results in front of the map? Do you already implement something like that? We struggle with layouting the view.

Thanks in advance.

HTML in Snippet

Hi

Can we render html code in snippet? i mean any image tag / link etc

Back button on Android closes the whole app after map init

Hi, first thank you for the plugin. It works great! But I’m experiencing one issue both in my app and the sample SimpleMap apk on Android phone. After the map shows, Phonegap will lose control over the back button. Then every back button press closes the whole application. I’m not sure if it is an issue of the Phonegap or the plugin. Do you know any solution for this? Thanks.

Marker or image always on center

Hi, i need to put a image over the map in order to keep it always in the center at the map. Also i need to set a button over the map. How can i do that?

MARKER_CLICK event not firing (urgent)

When the following code is used the marker does not fire the click event:

    map.addMarker({
        icon: icon,
        position: new plugin.google.maps.LatLng(stops[i].latitude, stops[i].longitude),
    }, function(marker) {
        marker.addEventListener(plugin.google.maps.event.MARKER_CLICK, function(){
            alert("HELLO!");
    });

Also, it might be better to use the 'touchend' event to bind as this will respond much faster than click.

Enhancement: getVisibleRegion

Hey there again. We needed a function to get the lat lng boundaries the map is currently showing and figured others may need it too so I'm sharing the code with you:

_ANDROID_*

@SuppressWarnings("unused")
   private void getVisibleRegion(final JSONArray args, final CallbackContext callbackContext) {
      try {
         final VisibleRegion visibleRegion = map.getProjection().getVisibleRegion();
         final LatLngBounds latLngBounds = visibleRegion.latLngBounds;
         final JSONObject result = new JSONObject();
         final JSONObject northeast = new JSONObject();
         final JSONObject southwest = new JSONObject();
         northeast.put("lat", latLngBounds.northeast.latitude);
         northeast.put("lng", latLngBounds.northeast.longitude);
         southwest.put("lat", latLngBounds.southwest.latitude);
         southwest.put("lng", latLngBounds.southwest.longitude);
         result.put("northeast", northeast);
         result.put("southwest", southwest);
         callbackContext.success(result);
      } catch (final JSONException e) {
         // TODO Handle exception
         throw new RuntimeException("Unhandeled Exception!", e);
      }
   }

_END_ANDROID_*

_iOS_*

- (void)getVisibleRegion:(CDVInvokedUrlCommand*)command {
    GMSVisibleRegion visibleRegion = self.mapCtrl.map.projection.visibleRegion;
    GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] initWithRegion:visibleRegion];
    NSMutableDictionary *json = [NSMutableDictionary dictionary];
    NSMutableDictionary *northeast = [NSMutableDictionary dictionary];
    [northeast setObject:[NSNumber numberWithFloat:bounds.northEast.latitude] forKey:@"lat"];
    [northeast setObject:[NSNumber numberWithFloat:bounds.northEast.longitude] forKey:@"lng"];
    [json setObject:northeast forKey:@"northeast"];
    NSMutableDictionary *southwest = [NSMutableDictionary dictionary];
    [southwest setObject:[NSNumber numberWithFloat:bounds.southWest.latitude] forKey:@"lat"];
    [southwest setObject:[NSNumber numberWithFloat:bounds.southWest.longitude] forKey:@"lng"];
    [json setObject:southwest forKey:@"southwest"];
    CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:json];
    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}

_END_iOS_*
***_JAVASCRIPT_

getVisibleRegion = function(successCallback, errorCallback) {
    cordova.exec(successCallback, self.errorHandler, PLUGIN_NAME, 'exec', ['Map.getVisibleRegion']);
 };

***_END_JAVASCRIPT_

Map idle event?

Is there an event that fires after the map has been moved?

For example:

  1. The map is still
  2. I pan around and move the camera
  3. When the map is still after being moved, fire event

Google map Librarie

Hi,
Nice work, but i'd like to know how to implement Gmap Libraries such as PlaceService, should i use javascript or you need to implement it in your plugin ?

Can not remove polygon

var polygon = new plugin.google.maps.Polygon();
polygon.remove();

Does not work the above code.

iOS 6 Closebar not fully visible

Hello

On iOS 6 is the closebar at the bottom not fully visible. There are 20px (40px on Retina-Display) margin. I Think, it’s because the Statusbar on iOS 7 ist not there.

Is there any Workaround for this?

Thanks in advance.

Integration into views

It's probably not possible to embed the map into a view, but is there the ability to adjust the layout of the overlay to make it appear to be part of a view?

Custom position of the Map container

Is it possible to add option to map.showDialog(); in the Javascript to arrange the map in a specific location on the screen.

eg:

map.showDialog({
  position: {
    landscape: {
      top: "20px",
      bottom: "10px"
    },
    portrait: {
      top: "30px",
      bottom: "0"
    }
  }
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.