Jodit Google Maps is the plugin for easy inserting and editing Google Maps into the pages. You can specify your office location, draw the route to it, place all of your travel targets or anything else.
The main features of this Jodit plugin are:
This option is required for Google Maps to work on your site. The cards won't work without it.
CopyJodit.make('#editor', { googleMaps: { API_KEY: 'AIzaSyDjnR03hxN8fo0QJ85Jkkvk2DALTh3eynY' } });
Option for specifying JS API download url.
If True - Do not generate Google Maps JS API, but leave a static image.
If this setting is enabled, the plugin will remember the position and zoom of the map in the local storage.
CopyJodit.make('#editor', { googleMaps: { saveStateInStorage: false } });
Copy{ buttons: ['bold', 'italic', 'link', 'brush', 'fontsize', 'image'] }`;
Text editor settings for markers in the map. You can use any options from Jodit.
CopyJodit.make('#editor', { googleMaps: { inlineEditorOptions: { buttons: ['bold', 'italic', 'link', 'googleMaps'], // Yes, it works! =) filebrowser: { // Options } } } });
Default card type.
CopyJodit.make('#editor', { googleMaps: { map: { type: 'hybrid' } } });
The center of the map to which it will be installed at the first start. If the auto mode is enabled, then geolocation will be requested.
Default map zoom.
Q: do I need any API key to use Google Map?
A: Yes, you need API key. How to create API_KEY for Google Maps. And need set option: API_KEY
Q: I see static image instead of Google Maps frame in the Jodit?
A: it is OK, it is just a preview in area of my editor. In the page where HTML code (which you a edit with editor) is displayed, Google Maps widget is shown.
Q: Why can't I see elements - circles - on a static picture?
A: Google Maps Static API does not support the Circle object.
Q: Can I show static image on the result page too?
A: Yes, you can change options useStaticImage
You can find all the information on this.
In short, the algorithm is as follows:
Geocoding API
, Maps JavaScript API
, Maps Static API
and Places API
Google Maps Platform
> Credentials
.Create Credentials
> API key
.Close
.Credentials
page under API Keys.Remember to restrict the API key before using it in production.
Credentials
page and click on your keyApplication restrictions
field, select HTTP referrers (websites)
so that your key can only be used on your websites.Website restrictions
add all the sites where you allow your key to be used.API restrictions
select: Geocoding API
, Maps JavaScript API
, Maps Static API
and Places API
Save