<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Setting the initial map extent in the Google Maps API in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setting-the-initial-map-extent-in-the-google-maps/m-p/36544#M3015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a map app with the Google Map API to display one of my map services on a Google Map basemap.&amp;nbsp; I'd like to have the map app start with a map extent closer to the extent of my map service rather than the whole globe.&amp;nbsp; Sure, Google Map API is completely documented and I can find that the initial map extent is a property of the &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISServer/apis/javascript/gmaps/help/topics/apiref.htm#class_esri.arcgis.gmaps.DynamicMapServiceLayer" rel="nofollow noopener noreferrer" target="_blank"&gt;class esri.arcgis.gmaps.DynamicMapServiceLayer&lt;/A&gt;&lt;SPAN&gt; But I'm having trouble figuring out what the syntax is to add a property to the class is.&amp;nbsp; Are there any examples online?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I did this with an ESRI online basemap my initial extent was set with &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var initExtent = new esri.geometry.Extent({"xmin":-13785833.373418408,"ymin":5680675.316201857,"xmax":-13006175.684909647,"ymax":6045127.06706556,"spatialReference":{"wkid":102100}});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("map",{extent:initExtent});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this with the Google MAP API but I get an syntax error right away in my IDE: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var dynamicMap = new esri.arcgis.gmaps.DynamicMapServiceLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("http://host119.yakama.com/ArcGIS/rest/services/facilitiesWGSWebMer2/MapServer",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null, 0.75, dynmapcallback, initialExtent{"xmin":-13785833.373418408,"ymin":5680675.316201857,"xmax":-13006175.684909647,"ymax":6045127.06706556,"spatialReference":{"wkid":102100}});&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 21:24:40 GMT</pubDate>
    <dc:creator>PaulHuffman</dc:creator>
    <dc:date>2021-12-10T21:24:40Z</dc:date>
    <item>
      <title>Setting the initial map extent in the Google Maps API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setting-the-initial-map-extent-in-the-google-maps/m-p/36544#M3015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a map app with the Google Map API to display one of my map services on a Google Map basemap.&amp;nbsp; I'd like to have the map app start with a map extent closer to the extent of my map service rather than the whole globe.&amp;nbsp; Sure, Google Map API is completely documented and I can find that the initial map extent is a property of the &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISServer/apis/javascript/gmaps/help/topics/apiref.htm#class_esri.arcgis.gmaps.DynamicMapServiceLayer" rel="nofollow noopener noreferrer" target="_blank"&gt;class esri.arcgis.gmaps.DynamicMapServiceLayer&lt;/A&gt;&lt;SPAN&gt; But I'm having trouble figuring out what the syntax is to add a property to the class is.&amp;nbsp; Are there any examples online?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I did this with an ESRI online basemap my initial extent was set with &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var initExtent = new esri.geometry.Extent({"xmin":-13785833.373418408,"ymin":5680675.316201857,"xmax":-13006175.684909647,"ymax":6045127.06706556,"spatialReference":{"wkid":102100}});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map = new esri.Map("map",{extent:initExtent});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this with the Google MAP API but I get an syntax error right away in my IDE: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var dynamicMap = new esri.arcgis.gmaps.DynamicMapServiceLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("http://host119.yakama.com/ArcGIS/rest/services/facilitiesWGSWebMer2/MapServer",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null, 0.75, dynmapcallback, initialExtent{"xmin":-13785833.373418408,"ymin":5680675.316201857,"xmax":-13006175.684909647,"ymax":6045127.06706556,"spatialReference":{"wkid":102100}});&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:24:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setting-the-initial-map-extent-in-the-google-maps/m-p/36544#M3015</guid>
      <dc:creator>PaulHuffman</dc:creator>
      <dc:date>2021-12-10T21:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the initial map extent in the Google Maps API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setting-the-initial-map-extent-in-the-google-maps/m-p/36545#M3016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found some good examples of dealing with the Goggle Map API at &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://code.google.com/apis/maps/documentation/javascript/v2/examples/index.html"&gt;http://code.google.com/apis/maps/documentation/javascript/v2/examples/index.html&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The example at &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://code.google.com/apis/maps/documentation/javascript/v2/examples/map-markers.html"&gt;http://code.google.com/apis/maps/documentation/javascript/v2/examples/map-markers.html&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;was enough to show me how to set the map extent when generating the new &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Google Map instance, rather than when adding the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DynamicMapServiceLayer.&amp;nbsp; Now I have something that is working better.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 20:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setting-the-initial-map-extent-in-the-google-maps/m-p/36545#M3016</guid>
      <dc:creator>PaulHuffman</dc:creator>
      <dc:date>2010-12-15T20:10:34Z</dc:date>
    </item>
  </channel>
</rss>

