Menu
Close

Get Panchayat

3 km
mappls.com Map Data © MapmyIndia | Report

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">Get Panchayat</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="pun">&amp;</span><span class="pln">libraries</span><span class="pun">=</span><span class="pln">geoanalytics</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">
            
            </span><span class="pun">});</span><span class="pln">
            map</span><span class="pun">.</span><span class="pln">on</span><span class="pun">(</span><span class="str">'load'</span><span class="pun">,</span><span class="kwd">function</span><span class="pun">(){</span><span class="pln">
                    geoParams </span><span class="pun">=</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
                        </span><span class="str">"AccessToken"</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Token</span><span class="pun">,</span><span class="pln">
                        </span><span class="str">"GeoBoundType"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"stt_nme"</span><span class="pun">,</span><span class="pln">
                        </span><span class="str">"GeoBound"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">[</span><span class="pln">
                            </span><span class="str">"assam"</span><span class="pun">,</span><span class="pln"> 
                            </span><span class="str">"bihar"</span><span class="pln">
                        </span><span class="pun">],</span><span class="pln">
                        </span><span class="str">"Attribute"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"t_p"</span><span class="pun">,</span><span class="pln">
                        </span><span class="str">"Query"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"&gt;0"</span><span class="pun">,</span><span class="pln">
                        </span><span class="str">"Style"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
                            </span><span class="typ">BorderColor</span><span class="pun">:</span><span class="pln"> </span><span class="str">"000000"</span><span class="pun">,</span><span class="pln">
                            </span><span class="typ">BorderWidth</span><span class="pun">:</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln">
                            </span><span class="typ">FillColor</span><span class="pun">:</span><span class="pln"> </span><span class="str">"b71c1c"</span><span class="pun">,</span><span class="pln">
                            </span><span class="typ">Geometry</span><span class="pun">:</span><span class="pln"> </span><span class="str">"polygon"</span><span class="pun">,</span><span class="pln">
                            </span><span class="typ">Opacity</span><span class="pun">:</span><span class="pln"> </span><span class="lit">0.5</span><span class="pun">,</span><span class="pln">
                        </span><span class="pun">},</span><span class="pln">
                        </span><span class="str">"SpatialLayer"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"geoAnalyticsPanchayat"</span><span class="pun">,</span><span class="pln">
                        </span><span class="str">"SpatialLayer1"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"panchayat"</span><span class="pln">
                    </span><span class="pun">};</span><span class="pln">
        
                    map</span><span class="pun">.</span><span class="pln">addSource</span><span class="pun">(</span><span class="str">'wms-test-source'</span><span class="pun">,</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
                    </span><span class="str">'type'</span><span class="pun">:</span><span class="pln"> </span><span class="str">'raster'</span><span class="pun">,</span><span class="pln">
                    </span><span class="str">'tiles'</span><span class="pun">:</span><span class="pln"> </span><span class="pun">[</span><span class="pln">geoAnalytics</span><span class="pun">.</span><span class="pln">getPanchayat</span><span class="pun">(</span><span class="pln">geoParams</span><span class="pun">)],</span><span class="pln">
                    </span><span class="str">'tileSize'</span><span class="pun">:</span><span class="pln"> </span><span class="lit">256</span><span class="pln">
                    </span><span class="pun">});</span><span class="pln">

                    map</span><span class="pun">.</span><span class="pln">addLayer</span><span class="pun">(</span><span class="pln">
                        </span><span class="pun">{</span><span class="pln">
                        </span><span class="str">'id'</span><span class="pun">:</span><span class="pln"> </span><span class="str">'wms-test-layer'</span><span class="pun">,</span><span class="pln">
                        </span><span class="str">'type'</span><span class="pun">:</span><span class="pln"> </span><span class="str">'raster'</span><span class="pun">,</span><span class="pln">
                        </span><span class="str">'source'</span><span class="pun">:</span><span class="pln"> </span><span class="str">'wms-test-source'</span><span class="pun">,</span><span class="pln">
                        </span><span class="str">'paint'</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="pun">);</span><span class="pln">

                    map</span><span class="pun">.</span><span class="pln">fitBounds</span><span class="pun">(</span><span class="pln">geoAnalytics</span><span class="pun">.</span><span class="pln">getBounds</span><span class="pun">(</span><span class="str">'panchayat'</span><span class="pun">,</span><span class="pln">geoParams</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