Subject: Re: Possible to attach photos with interactive maps? + video
To: vikram ranga <babuawara@gmail.com>


Hi,

library(plotGoogleMaps)

nk_sp <- data.frame(lon= 18.900579,lat= 42.797387,
                    img="<img src='
http://1.bp.blogspot.com/_iwoGSH7hdAk/S_GYgVGE8HI/AAAAAAAAAfI/JwEXw4FJcDM/s640/kr4.jpg'
alt='Krupac' />")
coordinates(nk_sp) <- c("lon", "lat")
proj4string(nk_sp) <-  CRS("+proj=longlat +ellps=WGS84 +datum=WGS84")   #
define projection
# image in Info Window
m<-plotGoogleMaps(nk_sp, zcol='img')
# map control width 0
m<-plotGoogleMaps(nk_sp, control.width=0)

# image as icon marker
NK<-as(nk_sp,'SpatialPoints')
m<-plotGoogleMaps(NK,iconMarker='
http://1.bp.blogspot.com/_iwoGSH7hdAk/S_GYgVGE8HI/AAAAAAAAAfI/JwEXw4FJcDM/s640/kr4.jpg'
)

# You can also add video
nk_sp$img=NULL
nk_sp$video="<iframe width='420' height='315' src='
http://www.youtube.com/embed/xBiaItG5GR0' frameborder='0'
allowfullscreen></iframe>"

m<-plotGoogleMaps(nk_sp,  control.width=0)


On Thu, May 9, 2013 at 9:23 AM, vikram ranga <babuawara@gmail.com> wrote:

> Dear Milan,
> I have been using plotGoolgeMaps, I successfully created interactive and
> clickable maps with it. Very nice package; congratulations!
> I was wondering if it is possible to add a photograph as well so that we
> can see the photograph as well e.g. a point of a house, also shows photo of
> same on clicking.
> I was browsing here and there but could not find anything for this task
> (in R).
> Do you know any function which can be used for this task?
>
> Thanks in advance,
>
>
> Vikram.
>



-- 
Milan Kilibarda

University of Belgrade,
Faculty of Civil Engineering,
Department of Geodesy and Geoinformatics,
Address: Bulevar kralja Aleksandra 73  11000 Belgrade, Serbia,
Mail:  kili@grf.bg.ac.rs

tel:+381 11 3218516



-- 
Milan Kilibarda

University of Belgrade,
Faculty of Civil Engineering,
Department of Geodesy and Geoinformatics,
Address: Bulevar kralja Aleksandra 73  11000 Belgrade, Serbia,
Mail:  kili@grf.bg.ac.rs

tel:+381 11 3218516

	[[alternative HTML version deleted]]

