Automatically Show markerWindowContent (CFMAP / CFMAPITEM)


hello. trying re-center google map , show marker window automatically specific point after map has been re-centered.

 

i have re-centering part down fine with:

 

function map(address){

          coldfusion.map.getlatitudelongitude(address, refresh)

}

 

function refresh(latlong){

          var mapobj = coldfusion.map.getmapobject('map');

          mapobj.setcenter(new glatlng(latlong.y,latlong.x), 10);

}

 

but trying figure out how manipulate map object show specific marker window. have searched through quite bit of blogs , search results. have feeling along lines of following?

 

mapobj.addoverlay(marker10);

 

this not needed, here cfmap tag fyi

 

<cfmap name="map" width="945" zoomlevel="4" zoomcontrol="large3d" showscale="true" showallmarkers="true" showcentermarker="false" centeraddress="united states">

          <cfloop index=i from="1" to="#site.recordcount#">

                    <cfmapitem latitude="#site.latitude[i]#" longitude="#site.longitude[i]#" name="marker#i#" markerwindowcontent="

                              <span class='maptitle'>

                                        #site.name[i]#<br />

                              </span>

                              <span class='mapaddress'>

                                        #site.address[i]#<br />

                                        #site.city[i]# #site.state[i]#<br />

                                        #site.phone[i]#<br />

                                        <a target='_blank' href='https://maps.google.com/maps?daddr=#site.address[i]# #site.city[i]#, #site.state[i]#'>get driving directions</a>

                              </span>"

                    />

          </cfloop>

</cfmap>

 

thanks pointers in right direction.

 

~ ben



More discussions in ColdFusion


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support