
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
mappls-maps-openlayers
Advanced tools
Easy To Integrate MapmyIndia Mappls map to your openlayer applications.
Our APIs, SDKs, and live updating map data available for 200+ nations and territories give developer-friendly, easy-to-integrate plugins to add capabilities like intelligent search and routes on map, to your web or mobile applications.
Not a mappls user yet? Sign up for an account here. Once you're signed in, all you need to start building is a mappls key. You can create and manage your access tokens on your Mappls Account page.
Your MapmyIndia Maps SDK usage needs a set of license keys (get them here ) and is governed by the API terms and conditions. As part of the terms and conditions, you cannot remove or hide the MapmyIndia logo and copyright information in your project. Please see branding guidelines on MapmyIndia website for more details. The allowed hits are described on the plans page. Note that your usage is shared between platforms, so the API hits you make from a web application, Android app or an iOS app all add up to your allowed daily limit.
| Version | Last Updated | Author | Remarks |
|---|---|---|---|
| 1.0.0 | 05 May, 2023 | MapmyIndia API Team | Initial Commit |
Node.js based OpenLayer map plugin
Web
Between 2-22 ie. minZoom:2
npm i mappls-maps-openlayers
import { initialize, initMapplsStyle } from 'mappls-maps-openlayers'
import { Component, OnInit } from '@angular/core';
import { initialize, initMap } from 'mappls-maps-openlayers'
import Map from 'ol/Map.js';
import View from 'ol/View.js';
import {useGeographic} from 'ol/proj.js';
import VectorSource from 'ol/source/Vector.js';
import Feature from 'ol/Feature.js';
import Point from 'ol/geom/Point.js';
import {Icon, Style} from 'ol/style.js';
import {Vector as VectorLayer} from 'ol/layer.js';
useGeographic();
@Component({
selector: 'app-root',
template : `<div id="map" style="width: 99%; height: 99vh; background-color: white;"></div>`,
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'mappls-ol-angular';
ngOnInit() {
initialize( 'token')
.then(() => {
let mbLayer = initMap('map'); //div id for map
map.getLayers().insertAt(0, mbLayer.layer);
})
.catch((error:any) => {
console.log(error);
});
//Map
const map = new Map({
target: 'map',
view: new View({
center: [77.2689480979551, 28.55082571701708],
zoom: 3,
minZoom:2
}),
});
//Marker
const iconFeature = new Feature({
geometry: new Point([77,28]),
name: 'Null Island',
});
const iconStyle = new Style({
image: new Icon({
anchor: [0.5, 46],
scale: 0.4,
anchorXUnits: 'fraction',
anchorYUnits: 'pixels',
src: 'https://www.mappls.com/images/general.png',
}),
});
iconFeature.setStyle(iconStyle);
const vectorSource = new VectorSource({
features: [iconFeature],
});
const vectorLayer = new VectorLayer({
source: vectorSource,
});
map.addLayer(vectorLayer);
}
}
import { useEffect, useRef } from 'react';
import { initialize, initMap} from 'mappls-maps-openlayers'
import Map from 'ol/Map.js';
import View from 'ol/View.js';
import {useGeographic} from 'ol/proj.js';
import Feature from 'ol/Feature.js';
import Point from 'ol/geom/Point.js';
import {Icon, Style} from 'ol/style.js';
import {Vector as VectorLayer} from 'ol/layer.js';
import VectorSource from 'ol/source/Vector.js';
function App() {
const styleMap = { width: '99%', height: '99vh', display: 'inline-block' };
const mapRef = useRef(null);
useGeographic();
useEffect(() => {
initialize( 'token')
.then(() => {
let mbLayer = initMap('map');
map.getLayers().insertAt(0, mbLayer.layer);
})
.catch((error) => {
console.log(error);
});
//Map
const map = new Map({
target: 'map',
view: new View({
center: [77.2689480979551, 28.55082571701708],
zoom: 3,
minZoom:2
}),
});
//Marker
const iconFeature = new Feature({
geometry: new Point([77,28]),
name: 'Null Island',
});
const iconStyle = new Style({
image: new Icon({
anchor: [0.5, 46],
scale: 0.4,
anchorXUnits: 'fraction',
anchorYUnits: 'pixels',
src: 'https://www.mappls.com/images/general.png',
}),
});
iconFeature.setStyle(iconStyle);
const vectorSource = new VectorSource({
features: [iconFeature],
});
const vectorLayer = new VectorLayer({
source: vectorSource,
});
map.addLayer(vectorLayer);
}, []);
return <div id="map" style={styleMap} ref={mapRef}></div>;
}
export default App;
That's All !
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!
FAQs
[ ](https://www.mapmyindia.com/api)
The npm package mappls-maps-openlayers receives a total of 2 weekly downloads. As such, mappls-maps-openlayers popularity was classified as not popular.
We found that mappls-maps-openlayers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.