Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Website with Google Map

Subscribe

Get notified when there's activity on this post

This question has been flagged
website_builder
8 Replies
26464 Views
Avatar
Mark Wells

I need to create a Locations page on the Website that has multiple maps for each location. It seemed like this would be a pretty simple thing to do but it seems when ever I try to embed the Google Map API <iframe> in the buit in HTML editor, it will not save the file.  It rejects the <iframe>.

So, simple question?  how do you add a map element to a website page in Odoo?

Please Note: I also looked at the map on the default Contct Us page but the template doesn't seem to allow you to extract the map element from the template and I don't wnat to go digging though python etc to find out how to just put a simple HTML element on a page.

Thanks for any help

4
Avatar
Discard
Yenthe Van Ginneken (Mainframe Monkey)

Thanks You, That worked great.  I was using the pre-built Google API maps that creates an

Stephen Mack

Mark feel free to upvote good answers so that the user can build karma points.

OdooBot
Done 

Mark R. Wells
Data Solutions & Technology
9901 Business Parkway Suite R
Lanham, MD. 20706
(301) 583-3500
(240) 487-1453 (direct)
(571) 421-6295 (cell)


From: Stephen Mack <smack815@gmail.com>
Reply-To: "Odoo S.A." <catchall@mail.odoo.com>
Date: Mon, 5 Jan 2015 21:21:21 +0000
To: Mark Wells <mwells@dstincorporated.com>
Subject: Re: Website with Google Map

Mark feel free to upvote good answers so that the user can build karma points.

--Stephen
odoo
(I'm not an odoo employee just playing around with the signature feature)


Sent by Odoo S.A. using Odooabout Forum Post Website with Google Map
Avatar
Kazim Mirza | Founder at TechUltra Solutions
Best Answer

Hello Mark

Steps to set multiple google map in page

Step 1: Select page where you want to add google map and select customize.

Step 2: You have to add following code in page 

             <script src="http://maps.googleapis.com/maps/api/js"></script>
            <script>
                     function initialize() {
                            var mapProp = {
                                center:new google.maps.LatLng(51.508742,-0.120850),zoom:5,mapTypeId:google.maps.MapTypeId.ROADMAP
                                 };
                    var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
                        } 
                       google.maps.event.addDomListener(window, 'load', initialize);
              </script>
            <div id="googleMap" style="width:250px;height:250px;"></div>

Step 3: If you want to use more than one Google Map in single page then you have to just change the boldtext whis the ID of the google frame which uses as a DIV tag.

If you get the answer as you need then please accept the answer.

Thank You 

7
Avatar
Discard
Mohit Kotak (MK)

@Thanks..It's work..!

Avatar
Silvestar j
Best Answer


<iframe

  width="600"

  height="450"

  frameborder="0" style="border:0"

  src="https://www.google.com/maps/embed/v1/place?key=APIKey

  &q=Chennai+Tamil Nadu

   &attribution_source=Google+Maps+Embed+API

  &attribution_web_url=http://example.com/" allowfullscreen>

</iframe>


This will give you more info - https://developers.google.com/maps/documentation/embed/guide#api_key


Regards

Silvestar J

1
Avatar
Discard
Avatar
74n3r
Best Answer

guys.. i had some problem ..when write in xml (Res.partner's form)..

<script src="http://maps.googleapis.com/maps/api/js"></script> <script> function initialize() { var mapProp = { center:new google.maps.LatLng(51.508742,-0.120850),zoom:5,mapTypeId:google.maps.MapTypeId.ROADMAP };

                    var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);

                        } google.maps.event.addDomListener(window, 'load', initialize);

              </script> <div id="googleMap" style="width:250px;height:250px;"></div>

it's gives to me this error..  how can i solve this ?

Uncaught ReferenceError: google is not definedhttp://localhost:8069/web?#id=1&view_type=form&model=res.partner&action=307:8Traceback:

ReferenceError: google is not defined at eval (eval at <anonymous> (http://localhost:8069/web/content/285-ddc7143/web.assets_common.js:473:213), <anonymous>:8:24) at eval (<anonymous>) at http://localhost:8069/web/content/285-ddc7143/web.assets_common.js:473:213 at Function.globalEval (http://localhost:8069/web/content/285-ddc7143/web.assets_common.js:473:233) at jQuery.fn.init.domManip (http://localhost:8069/web/content/285-ddc7143/web.assets_common.js:833:306) at jQuery.fn.init.append (http://localhost:8069/web/content/285-ddc7143/web.assets_common.js:819:295) at Object.append (http://localhost:8069/web/content/326-6394053/web.assets_backend.js:3263:50) at Array.<anonymous> (http://localhost:8069/web/content/326-6394053/web.assets_backend.js:3159:11) at fire (http://localhost:8069/web/content/285-ddc7143/web.assets_common.js:644:299) at Object.fireWith [as resolveWith] (http://localhost:8069/web/content/285-ddc7143/web.assets_common.js:649:198)

0
Avatar
Discard
Avatar
Daniel Haas
Best Answer

Hey 74n3r,
Dont know if this will help or not but couple things i was able to do to get this to work.  On your page you are inserting the code into make sure it is placed after the tag for the website.layout  (t-call=) and before the end of the call </t>
doing this i was able to get the map to populate but i was still getting an unknown error on map. turning the web developer on in my browser the error was associated with no API key


To resolve this issue i needed to change the src to include an API key.  i know in the past you didnt need an API key with google but i cannot seam to load a map without it now.  Anyways here is the change to the src.  Hope it helps.  You will need to get an API key from google (free) and replace API_KEY in my code with the one provided by google.

<script src="https://maps.googleapis.com/maps/api/js?key=API_KEY"></script>

Dan

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
(((Guia~JetBlue!@!Oficial^Hablo//+182)) ¿Cómo llamar a JetBlue desde República Dominicana?
website_builder
Avatar
0
Dec 25
41
(((Guia~ Latam!@!Oficial^Hablo//0800))) ¿Cómo llamar a LATAM Airlines desde Chile?
website_builder
Avatar
0
Dec 25
142
Website Builder theme breaks after upgrading to Odoo 17 — CSS not loading
website_builder
Avatar
0
Dec 25
32
AssertionError while install Appoinment in website
website_builder
Avatar
Avatar
Avatar
2
Nov 25
522
Website Issue
website_builder
Avatar
Avatar
Avatar
Avatar
4
May 25
9667
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now