Dear Remko,

# Code for you question

df <- read.table(text="
                       lat long
                 -33.611137 150.74058
                 -33.611255 150.740684
                 -33.61135 150.740789
                 -33.611089 150.740648
                 -33.611201 150.740757
                 -33.61131 150.740863", header=TRUE)
coordinates(df) <- c("long","lat")
proj4string(df) <- CRS("+proj=longlat +datum=WGS84")


ic=iconlabels(attribute=rep("",6),  # icon label
           colPalette=NULL,  # color
           at=NULL,
           height=10,  # icon height in pixel
           icon=TRUE,  # set icon
           scale=0.4 )  #set icon scale

m=plotGoogleMaps(df, filename="tmp.htm",
                 iconMarker=ic )

# Or you can use your icon

m=plotGoogleMaps(df, filename="tmp2.htm",
                 iconMarker=rep('
http://maps.google.com/mapfiles/kml/paddle/pink-blank.png',6) )

Best,






On Thu, May 9, 2013 at 7:38 AM, Remko Duursma <[email protected]>wrote:

> Dear Milan,
>
>
> thanks for developing the plotGoogleMaps package, it is quite amazing!
>
> I have a question, it does not seem possible (?) to make a plot
> without also specifying zcol. That is, I just want to plot locations
> using the same marker type for all locations. If I have this example,
>
> df <- read.table(text="
>                        lat long
> -33.611137 150.74058
>                          -33.611255 150.740684
>                          -33.61135 150.740789
>                          -33.611089 150.740648
>                          -33.611201 150.740757
>                          -33.61131 150.740863")
> coordinates(df) <- c("long","lat")
> proj4string(df) <- CRS("+proj=longlat +datum=WGS84")
>
>
>
> Then it is necessary to add a dummy variable (as I found in a
> stackexchange forum post),
>
> df <- SpatialPointsDataFrame(df, data=data.frame(i=1:6))
>
> plotGoogleMaps(df, filename="tmp.htm")
>
>
> But I actually want the markers to be the same for all, and not
> coloured by another variable. Is this possible?
>
> Also, is it possible to avoid having to add a dummy variable as above?
>
> Final question : I don't understand how I can change the icon (to,
> say, a small dot), using the iconMarker argument. Do you have a simple
> example available?
>
>
> thanks and sorry for the barrage of questions,
>
> remko
>
>
> -------------------------------------------------
> Remko Duursma
> Lecturer
>
> Hawkesbury Institute for the Environment
> University of Western Sydney
> Hawkesbury Campus, Richmond
>
> Mobile: +61 (0)422 096908
> www.remkoduursma.com
>



-- 
Milan Kilibarda

University of Belgrade,
Faculty of Civil Engineering,
Department of Geodesy and Geoinformatics,
Address: Bulevar kralja Aleksandra 73  11000 Belgrade, Serbia,
Mail:  [email protected]

tel:+381 11 3218516

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to