You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

capacitor-custom-google-maps

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-custom-google-maps

capacitor custom plugin google maps


Version published
Weekly downloads
321
decreased by-26.54%
Maintainers
0
Created
Weekly downloads
 

Readme

Source

capacitor-custom-google-maps

capacitor custom plugin google maps

  • add function for create circle on the maps (support for web, android and ios)
  • support hide my location button if the my location is true

Install

npm install capacitor-custom-google-maps
npx cap sync

API

create(...)

create(options: CreateMapArgs) => Promise<void>
ParamType
optionsCreateMapArgs

addCircle(...)

addCircle(args: CircleOptions) => Promise<void>
ParamType
argsCircleOptions

addMarker(...)

addMarker(args: AddMarkerArgs) => Promise<{ id: string; }>
ParamType
argsAddMarkerArgs

Returns: Promise<{ id: string; }>


addMarkers(...)

addMarkers(args: AddMarkersArgs) => Promise<{ ids: string[]; }>
ParamType
argsAddMarkersArgs

Returns: Promise<{ ids: string[]; }>


removeMarker(...)

removeMarker(args: RemoveMarkerArgs) => Promise<void>
ParamType
argsRemoveMarkerArgs

removeMarkers(...)

removeMarkers(args: RemoveMarkersArgs) => Promise<void>
ParamType
argsRemoveMarkersArgs

enableClustering(...)

enableClustering(args: { id: string; }) => Promise<void>
ParamType
args{ id: string; }

disableClustering(...)

disableClustering(args: { id: string; }) => Promise<void>
ParamType
args{ id: string; }

destroy(...)

destroy(args: DestroyMapArgs) => Promise<void>
ParamType
argsDestroyMapArgs

setCamera(...)

setCamera(args: CameraArgs) => Promise<void>
ParamType
argsCameraArgs

setMapType(...)

setMapType(args: MapTypeArgs) => Promise<void>
ParamType
argsMapTypeArgs

enableIndoorMaps(...)

enableIndoorMaps(args: IndoorMapArgs) => Promise<void>
ParamType
argsIndoorMapArgs

enableTrafficLayer(...)

enableTrafficLayer(args: TrafficLayerArgs) => Promise<void>
ParamType
argsTrafficLayerArgs

enableAccessibilityElements(...)

enableAccessibilityElements(args: AccElementsArgs) => Promise<void>
ParamType
argsAccElementsArgs

enableCurrentLocation(...)

enableCurrentLocation(args: CurrentLocArgs) => Promise<void>
ParamType
argsCurrentLocArgs

setMyLocationButtonEnabled(...)

setMyLocationButtonEnabled(args: CurrentLocArgs) => Promise<void>
ParamType
argsCurrentLocArgs

setPadding(...)

setPadding(args: PaddingArgs) => Promise<void>
ParamType
argsPaddingArgs

onScroll(...)

onScroll(args: OnScrollArgs) => Promise<void>
ParamType
argsOnScrollArgs

dispatchMapEvent(...)

dispatchMapEvent(args: { id: string; focus: boolean; }) => Promise<void>
ParamType
args{ id: string; focus: boolean; }

getMapBounds(...)

getMapBounds(args: { id: string; }) => Promise<LatLngBounds>
ParamType
args{ id: string; }

Returns: Promise<LatLngBounds>


checkMockLocation(...)

checkMockLocation(args: { id: string; }) => Promise<{ isMockLocation: boolean; }>
ParamType
args{ id: string; }

Returns: Promise<{ isMockLocation: boolean; }>


Interfaces

CreateMapArgs

An interface containing the options used when creating a map.

PropTypeDescriptionDefault
idstringA unique identifier for the map instance.
apiKeystringThe Google Maps SDK API Key.
configGoogleMapConfigThe initial configuration settings for the map.
elementHTMLElementThe DOM element that the Google Map View will be mounted on which determines size and positioning.
forceCreatebooleanDestroy and re-create the map instance if a map with the supplied id already existsfalse
GoogleMapConfig

For web, all the javascript Google Maps options are available as GoogleMapConfig extends google.maps.MapOptions. For iOS and Android only the config options declared on GoogleMapConfig are available.

PropTypeDescriptionDefaultSince
widthnumberOverride width for native map.
heightnumberOverride height for native map.
xnumberOverride absolute x coordinate position for native map.
ynumberOverride absolute y coordinate position for native map.
centerLatLngDefault location on the Earth towards which the camera points.
zoomnumberSets the zoom of the map.
androidLiteModebooleanEnables image-based lite mode on Android.false
devicePixelRationumberOverride pixel ratio for native map.
stylesMapTypeStyle[] | nullStyles to apply to each of the default map types. Note that for satellite, hybrid and terrain modes, these styles will only apply to labels and geometry.4.3.0
LatLng

An interface representing a pair of latitude and longitude coordinates.

PropTypeDescription
latnumberCoordinate latitude, in degrees. This value is in the range [-90, 90].
lngnumberCoordinate longitude, in degrees. This value is in the range [-180, 180].
CircleOptions

An interface representing the viewports latitude and longitude bounds.

PropType
radiusnumber
mapIdstring
centerLatLng
fillColorstring
strokeColorstring
strokeWidthnumber
AddMarkerArgs
PropType
idstring
markerMarker
Marker

A marker is an icon placed at a particular point on the map's surface.

PropTypeDescriptionDefaultSince
coordinateLatLngMarker position
opacitynumberSets the opacity of the marker, between 0 (completely transparent) and 1 inclusive.1
titlestringTitle, a short description of the overlay.
snippetstringSnippet text, shown beneath the title in the info window when selected.
isFlatbooleanControls whether this marker should be flat against the Earth's surface or a billboard facing the camera.false
iconUrlstringPath to a marker icon to render. It can be relative to the web app public directory, or a https url of a remote marker icon. SVGs are not supported on native platforms.4.2.0
iconSizeSizeControls the scaled size of the marker image set in iconUrl.4.2.0
iconOriginPointThe position of the image within a sprite, if any. By default, the origin is located at the top left corner of the image .4.2.0
iconAnchorPointThe position at which to anchor an image in correspondence to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image.4.2.0
tintColor{ r: number; g: number; b: number; a: number; }Customizes the color of the default marker image. Each value must be between 0 and 255. Only for iOS and Android.4.2.0
draggablebooleanControls whether this marker can be dragged interactivelyfalse
Size
PropType
widthnumber
heightnumber
Point
PropType
xnumber
ynumber
AddMarkersArgs
PropType
idstring
markersMarker[]
RemoveMarkerArgs
PropType
idstring
markerIdstring
RemoveMarkersArgs
PropType
idstring
markerIdsstring[]
DestroyMapArgs
PropType
idstring
CameraArgs
PropType
idstring
configCameraConfig
CameraConfig

Configuration properties for a Google Map Camera

PropTypeDescriptionDefault
coordinateLatLngLocation on the Earth towards which the camera points.
zoomnumberSets the zoom of the map.
bearingnumberBearing of the camera, in degrees clockwise from true north.0
anglenumberThe angle, in degrees, of the camera from the nadir (directly facing the Earth). The only allowed values are 0 and 45.0
animatebooleanAnimate the transition to the new Camera properties.false
animationDurationnumberThis configuration option is not being used.
MapTypeArgs
PropType
idstring
mapTypeMapType
IndoorMapArgs
PropType
idstring
enabledboolean
TrafficLayerArgs
PropType
idstring
enabledboolean
AccElementsArgs
PropType
idstring
enabledboolean
CurrentLocArgs
PropType
idstring
enabledboolean
PaddingArgs
PropType
idstring
paddingMapPadding
MapPadding

Controls for setting padding on the 'visible' region of the view.

PropType
topnumber
leftnumber
rightnumber
bottomnumber
OnScrollArgs
PropType
idstring
mapBounds{ x: number; y: number; width: number; height: number; }
LatLngBounds

An interface representing the viewports latitude and longitude bounds.

PropType
southwestLatLng
centerLatLng
northeastLatLng

Enums

MapType
MembersValueDescription
Normal'Normal'Basic map.
Hybrid'Hybrid'Satellite imagery with roads and labels.
Satellite'Satellite'Satellite imagery with no labels.
Terrain'Terrain'Topographic data.
None'None'No base map tiles.
# capacitor-custom-google-maps

Keywords

FAQs

Package last updated on 23 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc