Menu
Close

Custom InfoWindow

3 km
mappls.com Map Data © MapmyIndia | Report

Complex Info Window

Building looks like:

MapmyIndia Head Office, Delhi

Mappls Maps

Sample Implementation

    
      <span class="pln">
      </span><span class="tag">&lt;html&gt;</span><span class="pln">
        </span><span class="tag">&lt;head&gt;</span><span class="pln">
          </span><span class="tag">&lt;title&gt;</span><span class="pln">Custom InfoWindow</span><span class="tag">&lt;/title&gt;</span><span class="pln">
          </span><span class="tag">&lt;meta</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"viewport"</span><span class="pln"> </span><span class="atn">content</span><span class="pun">=</span><span class="atv">"initial-scale=1.0"</span><span class="tag">&gt;</span><span class="pln">
          </span><span class="tag">&lt;meta</span><span class="pln"> </span><span class="atn">charset</span><span class="pun">=</span><span class="atv">"utf-8"</span><span class="tag">&gt;</span><span class="pln">
          </span><span class="tag">&lt;style&gt;</span><span class="pln">
          html</span><span class="pun">,</span><span class="pln">
          body</span><span class="pun">,</span><span class="pln">
          </span><span class="com">#map {</span><span class="pln">
            margin</span><span class="pun">:</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
            padding</span><span class="pun">:</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln">
            width</span><span class="pun">:</span><span class="pln"> </span><span class="lit">100</span><span class="pun">%;</span><span class="pln">
            height</span><span class="pun">:</span><span class="pln"> </span><span class="lit">100vh</span><span class="pun">;</span><span class="pln">
          </span><span class="pun">}</span><span class="pln">
                          
          </span><span class="tag">&lt;/style&gt;</span><span class="pln">
             &lt;script src="https://apis.mappls.com/advancedmaps/api/</span><span class="tag">&lt;Token&gt;</span><span class="pun">/</span><span class="pln">map_sdk</span><span class="pun">?</span><span class="pln">layer</span><span class="pun">=</span><span class="pln">vector</span><span class="pun">&amp;</span><span class="pln">v</span><span class="pun">=</span><span class="lit">3.0</span><span class="pun">&amp;</span><span class="pln">callback</span><span class="pun">=</span><span class="pln">initMap1</span><span class="str">" defer async&gt;</span><span class="tag">&lt;/script&gt;</span><span class="pln">
            </span><span class="tag">&lt;/head&gt;</span><span class="pln">
        </span><span class="tag">&lt;body&gt;</span><span class="pln">
                    </span><span class="tag">&lt;div</span><span class="pln"> </span><span class="atn">id</span><span class="pun">=</span><span class="atv">"map"</span><span class="tag">&gt;&lt;/div&gt;</span><span class="pln">
                        </span><span class="tag">&lt;script&gt;</span><span class="pln">
        </span><span class="kwd">var</span><span class="pln"> map</span><span class="pun">;</span><span class="pln">
        </span><span class="kwd">function</span><span class="pln"> initMap1</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
            map </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> mappls</span><span class="pun">.</span><span class="typ">Map</span><span class="pun">(</span><span class="str">'map'</span><span class="pun">,</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
                center</span><span class="pun">:</span><span class="pln"> </span><span class="pun">[</span><span class="lit">28.44</span><span class="pun">,</span><span class="pln"> </span><span class="lit">77.26</span><span class="pun">],</span><span class="pln">
                zoomControl</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">,</span><span class="pln">
                location</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">true</span><span class="pun">,</span><span class="pln">
            </span><span class="pun">});</span><span class="pln">
            </span><span class="kwd">var</span><span class="pln"> window </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> mappls</span><span class="pun">.</span><span class="typ">InfoWindow</span><span class="pun">({</span><span class="pln">
                map</span><span class="pun">:</span><span class="pln"> map</span><span class="pun">,</span><span class="pln">
                content</span><span class="pun">:</span><span class="pln"> </span><span class="str">"&lt;div&gt;&lt;h2 style=\"font: bold 16px arial helvetica\"&gt;Complex Info Window&lt;/h2&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
                    </span><span class="str">"&lt;p style=\"font: italic 14px/20px times\"&gt;Building looks like:&lt;/p&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
                    </span><span class="str">"&lt;img style=\"width: 200px;height: 100px;\" src=\"https://www.ft.com/__origami/service/image/v2/images/raw/https%253A%252F%252Fs3-ap-northeast-1.amazonaws.com%252Fpsh-ex-ftnikkei-3937bb4%252Fimages%252F0%252F1%252F5%252F2%252F2762510-8-eng-GB%252F20170519T-CE-Info-Systems.jpg?width=700&amp;fit=cover&amp;gravity=faces&amp;dpr=2&amp;quality=medium&amp;source=nar-cms\"&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
                    </span><span class="str">"&lt;p&gt;MapmyIndia Head Office, Delhi&lt;/p&gt;"</span><span class="pln"> </span><span class="pun">+</span><span class="pln">
                    </span><span class="str">"&lt;p&gt;&lt;a href=\"https://www.mappls.com\"&gt;Mappls Maps&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;"</span><span class="pun">,</span><span class="pln">
                position</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
                    lat</span><span class="pun">:</span><span class="pln"> </span><span class="lit">28.55</span><span class="pun">,</span><span class="pln">
                    lng</span><span class="pun">:</span><span class="pln"> </span><span class="lit">77.26</span><span class="pln">
                </span><span class="pun">},</span><span class="pln">

            </span><span class="pun">});</span><span class="pln">
        </span><span class="pun">}</span><span class="pln">
    </span><span class="tag">&lt;/script&gt;</span><span class="pln">
        </span><span class="tag">&lt;/body&gt;</span><span class="pln">
      </span><span class="tag">&lt;/html&gt;</span><span class="pln">
      </span>
      
      
    
  
Call at Mappls
Request Call Back

Personalisation SDK, by Mappls, is India's first O2O engagement tool that can 3X your customer engagement, retention and conversion.

There's so much that Mappls MapmyIndia can do for your enterprise or individual requirements. Explore our website to learn more or request a callback/email if you'd like us to connect with you.

or